@steemit/steem-js 0.7.11 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +203 -87
  2. package/dist/api/index.d.ts +128 -0
  3. package/dist/api/methods.d.ts +9 -0
  4. package/dist/api/rpc-auth.d.ts +43 -0
  5. package/dist/api/transports/base.d.ts +13 -0
  6. package/dist/api/transports/http.d.ts +9 -0
  7. package/dist/api/transports/index.d.ts +9 -0
  8. package/dist/api/transports/types.d.ts +35 -0
  9. package/dist/api/transports/ws.d.ts +18 -0
  10. package/dist/auth/ecc/index.d.ts +9 -0
  11. package/dist/auth/ecc/src/address.d.ts +13 -0
  12. package/dist/auth/ecc/src/aes.d.ts +16 -0
  13. package/dist/auth/ecc/src/brain_key.d.ts +1 -0
  14. package/dist/auth/ecc/src/ecdsa.d.ts +28 -0
  15. package/dist/auth/ecc/src/ecsignature.d.ts +19 -0
  16. package/dist/auth/ecc/src/enforce_types.d.ts +5 -0
  17. package/dist/auth/ecc/src/hash.d.ts +25 -0
  18. package/dist/auth/ecc/src/index.d.ts +9 -0
  19. package/dist/auth/ecc/src/key_private.d.ts +38 -0
  20. package/dist/auth/ecc/src/key_public.d.ts +41 -0
  21. package/dist/auth/ecc/src/key_utils.d.ts +9 -0
  22. package/dist/auth/ecc/src/signature.d.ts +18 -0
  23. package/dist/auth/ecc.d.ts +3 -0
  24. package/dist/auth/index.d.ts +48 -0
  25. package/dist/auth/key_classes.d.ts +3 -0
  26. package/dist/auth/serializer.d.ts +19 -0
  27. package/dist/broadcast/helpers.d.ts +11 -0
  28. package/dist/broadcast/index.d.ts +43 -0
  29. package/dist/broadcast/operations.d.ts +6 -0
  30. package/dist/config.d.ts +25 -0
  31. package/dist/crypto/index.d.ts +25 -0
  32. package/dist/formatter/index.d.ts +92 -0
  33. package/dist/index.cjs +25848 -0
  34. package/dist/index.cjs.map +1 -0
  35. package/dist/index.d.ts +30 -0
  36. package/dist/index.js +25812 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/index.umd.js +57513 -0
  39. package/dist/index.umd.js.map +1 -0
  40. package/dist/memo/index.d.ts +11 -0
  41. package/dist/operations/index.d.ts +44 -0
  42. package/dist/serializer/convert.d.ts +12 -0
  43. package/dist/serializer/index.d.ts +11 -0
  44. package/dist/serializer/number_utils.d.ts +8 -0
  45. package/dist/serializer/precision.d.ts +5 -0
  46. package/dist/serializer/types.d.ts +36 -0
  47. package/dist/types/index.d.ts +131 -0
  48. package/dist/types.d.ts +34 -0
  49. package/dist/utils/index.d.ts +8 -0
  50. package/dist/utils.d.ts +2 -0
  51. package/package.json +72 -67
  52. package/.circleci/config.yml +0 -23
  53. package/.dockerignore +0 -12
  54. package/.editorconfig +0 -20
  55. package/.eslintrc +0 -27
  56. package/LICENSE +0 -21
  57. package/circle.yml +0 -3
  58. package/config.json +0 -10
  59. package/dist/statistics.html +0 -208
  60. package/dist/steem-tests.min.js +0 -23
  61. package/dist/steem-tests.min.js.gz +0 -0
  62. package/dist/steem-tests.min.js.map +0 -1
  63. package/dist/steem.min.js +0 -18
  64. package/dist/steem.min.js.gz +0 -0
  65. package/dist/steem.min.js.map +0 -1
  66. package/lib/api/index.js +0 -422
  67. package/lib/api/methods.js +0 -413
  68. package/lib/api/transports/base.js +0 -72
  69. package/lib/api/transports/http.js +0 -172
  70. package/lib/api/transports/index.js +0 -20
  71. package/lib/api/transports/ws.js +0 -228
  72. package/lib/auth/ecc/README.md +0 -20
  73. package/lib/auth/ecc/index.js +0 -13
  74. package/lib/auth/ecc/package.json +0 -36
  75. package/lib/auth/ecc/src/address.js +0 -84
  76. package/lib/auth/ecc/src/aes.js +0 -184
  77. package/lib/auth/ecc/src/brain_key.js +0 -13
  78. package/lib/auth/ecc/src/ecdsa.js +0 -219
  79. package/lib/auth/ecc/src/ecsignature.js +0 -128
  80. package/lib/auth/ecc/src/enforce_types.js +0 -49
  81. package/lib/auth/ecc/src/hash.js +0 -67
  82. package/lib/auth/ecc/src/key_private.js +0 -212
  83. package/lib/auth/ecc/src/key_public.js +0 -215
  84. package/lib/auth/ecc/src/key_utils.js +0 -112
  85. package/lib/auth/ecc/src/signature.js +0 -187
  86. package/lib/auth/index.js +0 -126
  87. package/lib/auth/memo.js +0 -147
  88. package/lib/auth/serializer/README.md +0 -13
  89. package/lib/auth/serializer/index.js +0 -21
  90. package/lib/auth/serializer/package.json +0 -32
  91. package/lib/auth/serializer/src/ChainTypes.js +0 -90
  92. package/lib/auth/serializer/src/convert.js +0 -37
  93. package/lib/auth/serializer/src/error_with_cause.js +0 -42
  94. package/lib/auth/serializer/src/fast_parser.js +0 -77
  95. package/lib/auth/serializer/src/number_utils.js +0 -67
  96. package/lib/auth/serializer/src/object_id.js +0 -68
  97. package/lib/auth/serializer/src/operations.js +0 -787
  98. package/lib/auth/serializer/src/precision.js +0 -95
  99. package/lib/auth/serializer/src/serializer.js +0 -211
  100. package/lib/auth/serializer/src/template.js +0 -17
  101. package/lib/auth/serializer/src/types.js +0 -1238
  102. package/lib/auth/serializer/src/validation.js +0 -360
  103. package/lib/broadcast/helpers.js +0 -177
  104. package/lib/broadcast/index.js +0 -127
  105. package/lib/broadcast/operations.js +0 -255
  106. package/lib/browser.js +0 -29
  107. package/lib/config.js +0 -45
  108. package/lib/formatter.js +0 -189
  109. package/lib/index.js +0 -19
  110. package/lib/utils.js +0 -55
  111. package/node-4.dockerfile +0 -6
  112. package/node-6.dockerfile +0 -6
  113. package/test/Crypto.js +0 -100
  114. package/test/KeyFormats.js +0 -105
  115. package/test/all_types.js +0 -115
  116. package/test/api.test.js +0 -326
  117. package/test/broadcast.test.js +0 -225
  118. package/test/browser/BrowserTests.js +0 -55
  119. package/test/comment.test.js +0 -69
  120. package/test/hf20-accounts.test.js +0 -76
  121. package/test/hf21-sps.test.js +0 -78
  122. package/test/memo.test.js +0 -37
  123. package/test/number_utils.js +0 -28
  124. package/test/operations_test.js +0 -39
  125. package/test/smt.test.js +0 -347
  126. package/test/test-post.json +0 -13
  127. package/test/test.html +0 -13
  128. package/test/test_helper.js +0 -19
  129. package/test/types_test.js +0 -139
  130. package/webpack/makeConfig.js +0 -105
  131. package/webpack.config.js +0 -2
  132. package/yarn.lock +0 -3336
package/dist/steem.min.js DELETED
@@ -1,18 +0,0 @@
1
- !function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,r){(function(n){"use strict";var i=r(1),o=r(236),s=r(237),a=r(238),u=r(42),f=r(240)(i),c=r(97),h={api:i,auth:o,memo:s,broadcast:a,config:u,formatter:f,utils:c};"undefined"!=typeof window&&(window.steem=h),"undefined"!=typeof n&&(n.steem=h),e=t.exports=h}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=r(2),c=n(f),h=r(3),l=n(h),p=r(42),d=n(p),y=r(83),_=n(y),v=r(84),g=n(v),m=r(97),b=r(98),w=r(194),E=r(85),S=r(205),B=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._setTransport(t),r._setLogger(t),r.options=t,r.seqNo=0,_.default.forEach(function(t){var e=t.method_name||(0,m.camelCase)(t.method),n=t.params||[];r[e+"With"]=function(e,i){return r.send(t.api,{method:t.method,params:n.map(function(t){return e[t]})},i)},r[e]=function(){for(var t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];var s=n.reduce(function(t,e,r){return t[e]=i[r],t},{}),a=i[n.length];return r[e+"With"](s,a)},r[e+"WithAsync"]=l.default.promisify(r[e+"With"]),r[e+"Async"]=l.default.promisify(r[e])}),r.callAsync=l.default.promisify(r.call),r.signedCallAsync=l.default.promisify(r.signedCall),r}return s(e,t),u(e,[{key:"_setTransport",value:function(t){if(t.url&&t.url.match("^((http|https)?://)"))t.uri=t.url,t.transport="http",this._transportType=t.transport,this.options=t,this.transport=new g.default.http(t);else if(t.url&&t.url.match("^((ws|wss)?://)"))t.websocket=t.url,t.transport="ws",this._transportType=t.transport,this.options=t,this.transport=new g.default.ws(t);else if(t.transport)if(this.transport&&this._transportType!==t.transport&&this.transport.stop(),this._transportType=t.transport,"string"==typeof t.transport){if(!g.default[t.transport])throw new TypeError("Invalid `transport`, valid values are `http`, `ws` or a class");this.transport=new g.default[t.transport](t)}else this.transport=new t.transport(t);else this.transport=new g.default.ws(t)}},{key:"_setLogger",value:function(t){if(t.hasOwnProperty("logger"))switch(a(t.logger)){case"function":this.__logger={log:t.logger};break;case"object":if("function"!=typeof t.logger.log)throw new Error("setOptions({logger:{}}) must have a property .log of type function");this.__logger=t.logger;break;case"undefined":if(this.__logger)break;default:this.__logger=!1}}},{key:"log",value:function(t){if(this.__logger)if(arguments.length>1&&"function"==typeof this.__logger[t]){var e=Array.prototype.slice.call(arguments,1);this.__logger[t].apply(this.__logger,e)}else this.__logger.log.apply(this.__logger,arguments)}},{key:"start",value:function(){return this.transport.start()}},{key:"stop",value:function(){return this.transport.stop()}},{key:"send",value:function(t,e,r){var n=r;if(this.__logger){var i=Math.random(),o=this;this.log("xmit:"+i+":",e),n=function(t,e){t?o.log("error","rsp:"+i+":\n\n",t,e):o.log("rsp:"+i+":",e),r&&r.apply(o,arguments)}}return this.transport.send(t,e,n)}},{key:"call",value:function(t,e,r){if("http"!==this._transportType)return void r(new Error("RPC methods can only be called when using http transport"));var n=++this.seqNo;(0,E.jsonRpc)(this.options.uri,{method:t,params:e,id:n}).then(function(t){r(null,t)},function(t){r(t)})}},{key:"signedCall",value:function(t,e,r,n,i){if("http"!==this._transportType)return void i(new Error("RPC methods can only be called when using http transport"));var o=++this.seqNo,s=void 0;try{s=(0,S.sign)({method:t,params:e,id:o},r,[n])}catch(t){return void i(t)}(0,E.jsonRpc)(this.options.uri,s).then(function(t){i(null,t)},function(t){i(t)})}},{key:"setOptions",value:function(t){Object.assign(this.options,t),this._setLogger(t),this._setTransport(t),this.transport.setOptions(t),t.hasOwnProperty("useTestNet")&&d.default.set("address_prefix",t.useTestNet?"TST":"STM")}},{key:"setWebSocket",value:function(t){this.setOptions({websocket:t})}},{key:"setUri",value:function(t){this.setOptions({uri:t})}},{key:"streamBlockNumber",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;"function"==typeof t&&(r=t,t="head");var i="",o=!0,s=function s(){o&&e.getDynamicGlobalPropertiesAsync().then(function(e){var o="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(o!==i)if(i)for(var a=i;a<o;a++)a!==i&&r(null,a),i=a;else i=o,r(null,o);l.default.delay(n).then(function(){s()})},function(t){r(t)})};return s(),function(){o=!1}}},{key:"streamBlock",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",r=arguments[1];"function"==typeof e&&(r=e,e="head");var n="",i="",o=this.streamBlockNumber(e,function(e,s){return e?(o(),void r(e)):(n=s,void(n!==i&&(i=n,t.getBlock(n,r))))});return o}},{key:"streamTransactions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=arguments[1];"function"==typeof t&&(e=t,t="head");var r=this.streamBlock(t,function(t,n){return t?(r(),void e(t)):void(n&&n.transactions&&n.transactions.forEach(function(t){e(null,t)}))});return r}},{key:"streamOperations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=arguments[1];"function"==typeof t&&(e=t,t="head");var r=this.streamTransactions(t,function(t,n){return t?(r(),void e(t)):void n.operations.forEach(function(t){e(null,t)})});return r}},{key:"broadcastTransactionSynchronousWith",value:function(t,e){var r=t.trx;return this.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[r]},function(t,n){if(t){var i=w.ops.signed_transaction,o=i.toObject(r),s=i.toBuffer(r);t.digest=b.hash.sha256(s).toString("hex"),t.transaction_id=s.toString("hex"),t.transaction=JSON.stringify(o),e(t,"")}else e("",n)})}}]),e}(c.default),k=new B(d.default);e=t.exports=k,e.Steem=B},function(t,e){"use strict";function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"===("undefined"==typeof t?"undefined":a(t))&&null!==t}function s(t){return void 0===t}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,a,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(r=this._events[t],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),f=r.slice(),i=f.length,u=0;u<i;u++)f[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=r(4)();o.noConflict=n,t.exports=o},function(t,e,r){(function(e){"use strict";t.exports=function(){function n(){}function i(t,e){if(null==t||t.constructor!==o)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new m("expecting a function but got "+d.classString(e))}function o(t){t!==w&&i(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function s(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var f,c=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},h=function(){return new o.PromiseInspection(this._target())},l=function(t){return o.reject(new m(t))},p={},d=r(6);f=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(o,"_getDomain",f);var y=r(7),_=r(8),v=new _;y.defineProperty(o,"_async",{value:v});var g=r(13),m=o.TypeError=g.TypeError;o.RangeError=g.RangeError;var b=o.CancellationError=g.CancellationError;o.TimeoutError=g.TimeoutError,o.OperationalError=g.OperationalError,o.RejectionError=g.OperationalError,o.AggregateError=g.AggregateError;var w=function(){},E={},S={},B=r(14)(o,w),k=r(15)(o,w,B,l,n),T=r(16)(o),x=T.create,A=r(17)(o,T),I=(A.CapturedTrace,r(18)(o,B,S)),C=r(19)(S),O=r(20),j=d.errorObj,R=d.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var o=arguments[r];if(!d.isObject(o))return l("Catch statement predicate: expecting an object but got "+d.classString(o));n[i++]=o}return n.length=i,t=arguments[r],this.then(void 0,C(n,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(h,h,void 0,this,void 0)},o.prototype.then=function(t,e){if(A.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(r+=", "+d.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var r=this._then(t,e,void 0,void 0,void 0);r._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?l("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,E,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},o.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},o.getNewLibraryCopy=t.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=R(t)(O(e,r));return n===j&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new k(t).promise()},o.cast=function(t){var e=B(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+d.classString(t));return v.setScheduler(t)},o.prototype._then=function(t,e,r,n,i){var s=void 0!==i,a=s?i:new o(w),u=this._target(),c=u._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&c)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var h=f();if(0!==(50397184&c)){var l,p,y=u._settlePromiseCtx;0!==(33554432&c)?(p=u._rejectionHandler0,l=t):0!==(16777216&c)?(p=u._fulfillmentHandler0,l=e,u._unsetRejectionIsUnhandled()):(y=u._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),u._attachExtraTrace(p),l=e),v.invoke(y,u,{handler:null===h?l:"function"==typeof l&&d.domainBind(h,l),promise:a,receiver:n,value:p})}else u._addCallbacks(t,e,a,n,h);return a},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==p)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(e,r,n,i,null)},o.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:d.domainBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:d.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var r=B(t,this);if(!(r instanceof o))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(c());var i=n._bitField;if(0===(50397184&i)){var s=this._length();s>0&&n._migrateCallback0(this);for(var a=1;a<s;++a)n._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&i))this._fulfill(n._value());else if(0!==(16777216&i))this._reject(n._reason());else{var u=new b("late cancellation observer");n._attachExtraTrace(u),this._reject(u)}}},o.prototype._rejectCallback=function(t,e,r){var n=d.ensureErrorObject(t),i=n===t;if(!i&&!r&&A.warnings()){var o="a promise was rejected with a non-error: "+d.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},o.prototype._resolveFromExecutor=function(t){if(t!==w){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},o.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0===(65536&i)){n._pushContext();var o;e===E?r&&"number"==typeof r.length?o=R(t).apply(this._boundValue(),r):(o=j,o.e=new m("cannot .spread() a non-array: "+d.classString(r))):o=R(t).call(e,r);var s=n._popContext();i=n._bitField,0===(65536&i)&&(o===S?n._reject(r):o===j?n._rejectCallback(o.e,!1):(A.checkForgottenReturns(o,s,"",n,this),n._resolveCallback(o)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var s=t instanceof o,a=this._bitField,u=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof I&&r.isFinallyHandler()?(r.cancelPromise=t,R(e).call(r,i)===j&&t._reject(j.e)):e===h?t._fulfill(h.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?s?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):s&&(u&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof o?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof o&&r._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=c();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,d.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){A.deprecated("Promise.defer","new Promise");var t=new o(w);return{promise:t,resolve:s,reject:a}},d.notEnumerableProp(o,"_makeSelfResolutionError",c),r(21)(o,w,B,l,A),r(22)(o,w,B,A),r(23)(o,k,l,A),r(24)(o),r(25)(o),r(26)(o,k,B,w,v,f),o.Promise=o,o.version="3.5.1",r(27)(o,k,l,B,w,A),r(28)(o),r(29)(o,l,B,x,w,A),r(30)(o,w,A),r(31)(o,l,w,B,n,A),r(32)(o),r(33)(o,w),r(34)(o,k,B,l),r(35)(o,w,B,l),r(36)(o,k,l,B,w,A),r(37)(o,k,A),r(38)(o,k,l),r(39)(o,w),r(40)(o,w),r(41)(o),d.toFastProperties(o),d.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),A.setBounds(_.firstLineError,d.lastLineError),o}}).call(e,r(5))},function(t,e){"use strict";function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){y&&p&&(y=!1,p.length?d=p.concat(d):_=-1,d.length&&a())}function a(){if(!y){var t=i(s);y=!0;for(var e=d.length;e;){for(p=d,d=[];++_<e;)p&&p[_].run();_=-1,e=d.length}p=null,y=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function f(){}var c,h,l=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(t){c=r}try{h="function"==typeof clearTimeout?clearTimeout:n}catch(t){h=n}}();var p,d=[],y=!1,_=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||y||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=f,l.addListener=f,l.once=f,l.off=f,l.removeListener=f,l.removeAllListeners=f,l.emit=f,l.prependListener=f,l.prependOnceListener=f,l.listeners=function(t){return[]},l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e,r){(function(e,n){"use strict";function i(){try{var t=O;return O=null,t.apply(this,arguments)}catch(t){return C.e=t,C}}function o(t){return O=t,i}function s(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function a(t){return"function"==typeof t||"object"===("undefined"==typeof t?"undefined":x(t))&&null!==t}function u(t){return s(t)?new Error(v(t)):t}function f(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function c(t,e,r){if(!A.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function h(t,e,r){if(s(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return A.defineProperty(t,e,n),t}function l(t){throw t}function p(t){try{if("function"==typeof t){var e=A.names(t.prototype),r=A.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=F.test(t+"")&&A.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function d(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function y(t){return U.test(t)}function _(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function v(t){try{return t+""}catch(t){return"[no string representation]"}}function g(t){return t instanceof Error||null!==t&&"object"===("undefined"==typeof t?"undefined":x(t))&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{h(t,"isOperational",!0)}catch(t){}}function b(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function w(t){return g(t)&&A.propertyIsWritable(t,"stack")}function E(t){return{}.toString.call(t)}function S(t,e,r){for(var n=A.names(t),i=0;i<n.length;++i){var o=n[i];if(r(o))try{A.defineProperty(e,o,A.getDescriptor(t,o))}catch(t){}}}function B(t){return q?n.env[t]:void 0}function k(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function T(t,e){return t.bind(e)}var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A=r(7),I="undefined"==typeof navigator,C={e:{}},O,j="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof e?e:null,R=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},L=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(A.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=r(t)}catch(t){return n}for(var s=0;s<o.length;++s){var a=o[s];if(!i[a]){i[a]=!0;var u=Object.getOwnPropertyDescriptor(t,a);null!=u&&null==u.get&&null==u.set&&n.push(a)}}t=A.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var s=0;s<t.length;++s)if(n.call(t[s],o))continue t;i.push(o)}return i}}(),F=/this\s*\.\s*\S+\s*=/,U=/^[a-z$_][a-z$_0-9]*$/i,P=function(){return"stack"in new Error?function(t){return w(t)?t:new Error(v(t))}:function(t){if(w(t))return t;try{throw new Error(v(t))}catch(t){return t}}}(),M=function(t){return A.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};M=function(t){return A.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?D(t):null}}var N="undefined"!=typeof n&&"[object process]"===E(n).toLowerCase(),q="undefined"!=typeof n&&"undefined"!=typeof n.env,z={isClass:p,isIdentifier:y,inheritedDataKeys:L,getDataPropertyOrDefault:c,thrower:l,isArray:A.isArray,asArray:M,notEnumerableProp:h,isPrimitive:s,isObject:a,isError:g,canEvaluate:I,errorObj:C,tryCatch:o,inherits:R,withAppended:f,maybeWrapAsError:u,toFastProperties:d,filledRange:_,toString:v,canAttachTrace:w,ensureErrorObject:P,originatesFromRejection:b,markAsOriginatingFromRejection:m,classString:E,copyDescriptors:S,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:q,env:B,global:j,getNativePromise:k,domainBind:T};z.isRecentNode=z.isNode&&function(){var t=n.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),z.isNode&&z.toFastProperties(n);try{throw new Error}catch(t){z.lastLineError=t}t.exports=z}).call(e,function(){return this}(),r(5))},function(t,e){"use strict";var r=function(){return void 0===this}();if(r)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var n={}.hasOwnProperty,i={}.toString,o={}.constructor.prototype,s=function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e},a=function(t,e){return{value:t[e]}},u=function(t,e,r){return t[e]=r.value,t},f=function(t){return t},c=function(t){try{return Object(t).constructor.prototype}catch(t){return o}},h=function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}};t.exports={isArray:h,keys:s,names:s,defineProperty:u,getDescriptor:a,freeze:f,getPrototypeOf:c,isES5:r,propertyIsWritable:function(){return!0}}}},function(t,e,r){(function(e){"use strict";function n(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new f(16),this._normalQueue=new f(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=u}function i(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function o(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(t){a=t}var u=r(9),f=r(12),c=r(6);n.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},n.prototype.hasCustomScheduler=function(){
2
- return this._customScheduler},n.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},n.prototype.disableTrampolineIfNecessary=function(){c.hasDevTools&&(this._trampolineEnabled=!1)},n.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},n.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},n.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},c.hasDevTools?(n.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},n.prototype.invoke=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},n.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(n.prototype.invokeLater=i,n.prototype.invoke=o,n.prototype.settlePromises=s),n.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},n.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},n.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},n.prototype._reset=function(){this._isTickUsed=!1},t.exports=n,t.exports.firstLineError=a}).call(e,r(5))},function(t,e,r){(function(e,n,i){"use strict";var o,s=r(6),a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},u=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var f=e.setImmediate,c=n.nextTick;o=s.isRecentNode?function(t){f.call(e,t)}:function(t){c.call(n,t)}}else if("function"==typeof u&&"function"==typeof u.resolve){var h=u.resolve();o=function(t){h.then(t)}}else o="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof i?function(t){i(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:a:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});i.observe(n,e);var o=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),o()}}();t.exports=o}).call(e,function(){return this}(),r(5),r(10).setImmediate)},function(t,e,r){"use strict";function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(11),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){"use strict";!function(t,r){function n(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return y[d]=n,p(d),d++}function i(t){delete y[t]}function o(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}function s(t){if(_)setTimeout(s,0,t);else{var e=y[t];if(e){_=!0;try{o(e)}finally{i(t),_=!1}}}}function a(){p=function(t){e.nextTick(function(){s(t)})}}function u(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}function f(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&s(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),p=function(r){t.postMessage(e+r,"*")}}function c(){var t=new MessageChannel;t.port1.onmessage=function(t){var e=t.data;s(e)},p=function(e){t.port2.postMessage(e)}}function h(){var t=v.documentElement;p=function(e){var r=v.createElement("script");r.onreadystatechange=function(){s(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}function l(){p=function(t){setTimeout(s,0,t)}}if(!t.setImmediate){var p,d=1,y={},_=!1,v=t.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(t);g=g&&g.setTimeout?g:t,"[object process]"==={}.toString.call(t.process)?a():u()?f():t.MessageChannel?c():v&&"onreadystatechange"in v.createElement("script")?h():l(),g.setImmediate=n,g.clearImmediate=i}}("undefined"==typeof self?"undefined"==typeof t?void 0:t:self)}).call(e,function(){return this}(),r(5))},function(t,e){"use strict";function r(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity<t},n.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},n.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},n.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},n.prototype.length=function(){return this._length},n.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},n.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},t.exports=n},function(t,e,r){"use strict";function n(t,e){function r(n){return this instanceof r?(h(this,"message","string"==typeof n?n:e),h(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return c(r,Error),r}function i(t){return this instanceof i?(h(this,"name","OperationalError"),h(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(h(this,"message",t.message),h(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=r(7),u=a.freeze,f=r(6),c=f.inherits,h=f.notEnumerableProp,l=n("Warning","warning"),p=n("CancellationError","cancellation error"),d=n("TimeoutError","timeout error"),y=n("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(t){o=n("TypeError","type error"),s=n("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<_.length;++v)"function"==typeof Array.prototype[_[v]]&&(y.prototype[_[v]]=Array.prototype[_[v]]);a.defineProperty(y.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),y.prototype.isOperational=!0;var g=0;y.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return g--,e},c(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=u({CancellationError:p,TimeoutError:d,OperationalError:i,RejectionError:i,AggregateError:y}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:l}},function(t,e,r){"use strict";t.exports=function(t,e){function n(r,n){if(c(r)){if(r instanceof t)return r;var i=o(r);if(i===f){n&&n._pushContext();var u=t.reject(i.e);return n&&n._popContext(),u}if("function"==typeof i){if(s(r)){var u=new t(e);return r._then(u._fulfill,u._reject,void 0,u,null),u}return a(r,i,n)}}return r}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return f.e=t,f}}function s(t){try{return h.call(t,"_promise0")}catch(t){return!1}}function a(r,n,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,h,!0),a=null)}var a=new t(e),c=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var h=!0,l=u.tryCatch(n).call(r,o,s);return h=!1,a&&l===f&&(a._rejectCallback(l.e,!0,!0),a=null),c}var u=r(6),f=u.errorObj,c=u.isObject,h={}.hasOwnProperty;return n}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(r){var n=this._promise=new t(e);r instanceof t&&n._propagateFrom(r,3),n._setOnCancel(this),this._values=r,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=r(6);u.isArray;return u.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(r,o){var a=n(this._values,this._promise);if(a instanceof t){a=a._target();var f=a._bitField;if(this._values=a,0===(50397184&f))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0===(33554432&f))return 0!==(16777216&f)?this._reject(a._reason()):this._cancel();a=a._value()}if(a=u.asArray(a),null===a){var c=i("expecting an array or an iterable object but got "+u.classString(a)).reason();return void this._promise._rejectCallback(c,!1)}return 0===a.length?void(o===-5?this._resolveEmptyArray():this._resolve(s(o))):void this._iterate(a)},a.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<r;++a){var u=n(e[a],i);u instanceof t?(u=u._target(),s=u._bitField):s=null,o?null!==s&&u.suppressUnhandledRejections():null!==s?0===(50397184&s)?(u._proxy(this,a),this._values[a]=u):o=0!==(33554432&s)?this._promiseFulfilled(u._value(),a):0!==(16777216&s)?this._promiseRejected(u._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(u,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},function(t,e){"use strict";t.exports=function(t){function e(){this._trace=new e.CapturedTrace(n())}function r(){if(i)return new e}function n(){var t=o.length-1;if(t>=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},function(t,e,r){(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t,i){function o(t,e){return{promise:e}}function s(){return!1}function a(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+N.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function u(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?N.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function f(){return this._onCancelField}function c(t){this._onCancelField=t}function h(){this._cancellationParent=void 0,this._onCancelField=void 0}function l(t,e){if(0!==(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function d(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function y(){this._trace=new R(this._peekContext())}function _(t,e){if(q(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=k(t);N.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),N.notEnumerableProp(t,"__stackCleaned__",!0)}}}function v(t,e,r,n,i){if(void 0===t&&null!==e&&Z){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&n._bitField))return;r&&(r+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),u=S(a),f=u.length-1;f>=0;--f){var c=u[f];if(!V.test(c)){var h=c.match(H);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(u.length>0)for(var l=u[0],f=0;f<a.length;++f)if(a[f]===l){f>0&&(s="\n"+a[f-1]);break}}var p="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(p,!0,e)}}function g(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),m(r)}function m(e,r,n){if(at.warnings){var i,o=new D(e);if(r)n._attachExtraTrace(o);else if(at.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=k(o);o.stack=s.message+"\n"+s.stack.join("\n")}rt("warning",o)||T(o,"",!0)}}function b(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function w(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function E(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}function S(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||K.test(n),o=i&&it(n);i&&!o&&(Y&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function B(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||K.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}function k(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?B(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:S(e)}}function T(t,e,r){if("undefined"!=typeof console){var i;if(N.isObject(t)){var o=t.stack;i=e+X(o,t)}else i=e+String(t);"function"==typeof U?U(i,r):"function"!=typeof console.log&&"object"!==n(console.log)||console.log(i)}}function x(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){M.throwLater(t)}"unhandledRejection"===t?rt(t,r,n)||i||T(r,"Unhandled rejection "):rt(t,n)}function A(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():N.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+I(e)+">, no stack trace)"}function I(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function C(){return"function"==typeof st}function O(t){var e=t.match(ot);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function j(t,e){if(C()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,u=0;u<i.length;++u){var f=O(i[u]);if(f){r=f.fileName,s=f.line;break}}for(var u=0;u<o.length;++u){var f=O(o[u]);if(f){n=f.fileName,a=f.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(it=function(t){if(z.test(t))return!0;var e=O(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}}function R(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);st(this,R),e>32&&this.uncycle()}var L,F,U,P=t._getDomain,M=t._async,D=r(13).Warning,N=r(6),q=N.canAttachTrace,z=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=/\((?:timers\.js):\d+:\d+\)/,H=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,K=null,X=null,Y=!1,G=!(0==N.env("BLUEBIRD_DEBUG")||!N.env("BLUEBIRD_DEBUG")&&"development"!==N.env("NODE_ENV")),W=!(0==N.env("BLUEBIRD_WARNINGS")||!G&&!N.env("BLUEBIRD_WARNINGS")),$=!(0==N.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!N.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=N.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!N.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},t.prototype._notifyUnhandledRejectionIsHandled=function(){x("rejectionHandled",L,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),x("unhandledRejection",F,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return m(t,e,r||this)},t.onPossiblyUnhandledRejection=function(t){var e=P();F="function"==typeof t?null===e?t:N.domainBind(e,t):void 0},t.onUnhandledRejectionHandled=function(t){var e=P();L="function"==typeof t?null===e?t:N.domainBind(e,t):void 0};var J=function(){};t.longStackTraces=function(){if(M.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&C()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace;at.longStackTraces=!0,J=function(){if(M.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=r,i.deactivateLongStackTraces(),M.enableTrampoline(),at.longStackTraces=!1},t.prototype._captureStackTrace=y,t.prototype._attachExtraTrace=_,i.activateLongStackTraces(),M.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return at.longStackTraces&&C()};var Q=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!N.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!N.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),N.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!N.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),tt=function(){return N.isNode?function(){return e.emit.apply(e,arguments)}:N.global?function(t){var e="on"+t.toLowerCase(),r=N.global[e];return!!r&&(r.apply(N.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),et={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:o},rt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(t){M.throwLater(t),e=!0}var r=!1;try{r=Q(t,et[t].apply(null,arguments))}catch(t){M.throwLater(t),r=!0}return r||e};t.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&J()),"warnings"in e){var r=e.warnings;at.warnings=!!r,Z=at.warnings,N.isObject(r)&&"wForgottenReturn"in r&&(Z=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!at.cancellation){if(M.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=h,t.prototype._propagateFrom=l,t.prototype._onCancel=f,t.prototype._setOnCancel=c,t.prototype._attachCancellationCallback=u,t.prototype._execute=a,nt=l,at.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!at.monitoring?(at.monitoring=!0,t.prototype._fireEvent=rt):!e.monitoring&&at.monitoring&&(at.monitoring=!1,t.prototype._fireEvent=s)),t},t.prototype._fireEvent=s,t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(t){},t.prototype._attachCancellationCallback=function(t){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var nt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;N.inherits(R,Error),i.CapturedTrace=R,R.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n<t;++n){var s=e[n].stack,a=r[s];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;a<t-1?(u._parent=e[a+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var f=u._length+1,c=n-2;c>=0;--c)e[c]._length=f,f++;return}}}},R.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(S(i.stack.split("\n"))),i=i._parent;E(n),w(n),N.notEnumerableProp(t,"stack",b(r,n)),N.notEnumerableProp(t,"__stackCleaned__",!0)}};var st=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():A(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,K=t,X=e;var r=Error.captureStackTrace;return it=function(t){return z.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return K=/@/,X=e,Y=!0,function(t){t.stack=(new Error).stack};var o;try{throw new Error}catch(t){o="stack"in t}return"stack"in i||!o||"number"!=typeof Error.stackTraceLimit?(X=function(t,e){return"string"==typeof t?t:"object"!==("undefined"==typeof e?"undefined":n(e))&&"function"!=typeof e||void 0===e.name||void 0===e.message?A(e):e.toString()},null):(K=t,X=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(U=function(t){console.warn(t)},N.isNode&&e.stderr.isTTY?U=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}:N.isNode||"string"!=typeof(new Error).stack||(U=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return $&&t.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return nt},boundValueFunction:function(){return d},checkForgottenReturns:v,setBounds:j,warn:m,deprecated:g,CapturedTrace:R,fireDomEvent:Q,fireGlobalEvent:tt}}}).call(e,r(5))},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function s(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return f.call(this,this.promise._target()._settledValue())}function u(t){if(!s(this,t))return l.e=t,l}function f(r){var i=this.promise,f=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?f.call(i._boundValue()):f.call(i._boundValue(),r);if(c===n)return c;if(void 0!==c){i._setReturnedNonUndefined();var p=e(c,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new h("late cancellation observer");return i._attachExtraTrace(d),l.e=d,l}p.isPending()&&p._attachCancellationCallback(new o(this))}return p._then(a,u,void 0,this,void 0)}}}return i.isRejected()?(s(this),l.e=r,l):(s(this),r)}var c=r(6),h=t.CancellationError,l=c.errorObj,p=r(19)(n);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new i(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,f,f)},t.prototype.tap=function(t){return this._passThrough(t,1,f)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,f);var n,i=new Array(r-1),o=0;for(n=0;n<r-1;++n){var s=arguments[n];if(!c.isObject(s))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+c.classString(s)));i[o++]=s}i.length=o;var a=arguments[n];return this._passThrough(p(i,a,this),1,void 0,f)},i}},function(t,e,r){"use strict";t.exports=function(t){function e(e,r,a){return function(u){var f=a._boundValue();t:for(var c=0;c<e.length;++c){var h=e[c];if(h===Error||null!=h&&h.prototype instanceof Error){if(u instanceof h)return o(r).call(f,u)}else if("function"==typeof h){var l=o(h).call(f,u);if(l===s)return l;if(l)return o(r).call(f,u)}else if(n.isObject(u)){for(var p=i(h),d=0;d<p.length;++d){var y=p[d];if(h[y]!=u[y])continue t}return o(r).call(f,u)}}return t}}var n=r(6),i=r(7).keys,o=n.tryCatch,s=n.errorObj;return e}},function(t,e,r){"use strict";function n(t){return t instanceof Error&&c.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new f(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=c.keys(t),i=0;i<r.length;++i){var o=r[i];h.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(r,n){if(null!==t){if(r){var o=i(a(r));t._attachExtraTrace(o),t._reject(o)}else if(e){for(var s=arguments.length,u=new Array(Math.max(s-1,0)),f=1;f<s;++f)u[f-1]=arguments[f];t._fulfill(u)}else t._fulfill(n);t=null}}}var s=r(6),a=s.maybeWrapAsError,u=r(13),f=u.OperationalError,c=r(7),h=/^(?:name|message|stack|cause)$/;t.exports=o},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var s=r(6),a=s.tryCatch;t.method=function(r){if("function"!=typeof r)throw new t.TypeError("expecting a function but got "+s.classString(r));return function(){var n=new t(e);n._captureStackTrace(),n._pushContext();var i=a(r).apply(this,arguments),s=n._popContext();return o.checkForgottenReturns(i,s,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(r){if("function"!=typeof r)return i("expecting a function but got "+s.classString(r));var n=new t(e);n._captureStackTrace(),n._pushContext();var u;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var f=arguments[1],c=arguments[2];u=s.isArray(f)?a(r).apply(c,f):a(r).call(c,f)}else u=a(r)();var h=n._popContext();return o.checkForgottenReturns(u,h,"Promise.try",n),n._resolveFromSyncValue(u),n},t.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},function(t,e){"use strict";t.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var f=r(o),c=new t(e);c._propagateFrom(this,1);var h=this._target();if(c._setBoundTo(f),f instanceof t){var l={promiseRejectionQueued:!1,promise:c,target:h,bindingPromise:f};h._then(e,s,void 0,c,l),f._then(a,u,void 0,c,l),c._setOnCancel(f)}else c._resolveCallback(h);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o=r(6),s=o.tryCatch,a=o.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break;
3
- }t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=s(t).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},function(t,e){"use strict";t.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},function(t,e){"use strict";t.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a,u=r(6),f=u.canEvaluate,c=u.tryCatch,h=u.errorObj;if(f){for(var l=function(t){return new Function("value","holder"," \n\t 'use strict'; \n\t holder.pIndex = value; \n\t holder.checkFulfillment(this); \n\t ".replace(/Index/g,t))},p=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},d=function(e){for(var r=new Array(e),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",s="var promise;\n"+r.map(function(t){return" \n\t promise = "+t+"; \n\t if (promise instanceof Promise) { \n\t promise.cancel(); \n\t } \n\t "}).join("\n"),a=r.join(", "),u="Holder$"+e,f="return function(tryCatch, errorObj, Promise, async) { \n\t 'use strict'; \n\t function [TheName](fn) { \n\t [TheProperties] \n\t this.fn = fn; \n\t this.asyncNeeded = true; \n\t this.now = 0; \n\t } \n\t \n\t [TheName].prototype._callFunction = function(promise) { \n\t promise._pushContext(); \n\t var ret = tryCatch(this.fn)([ThePassedArguments]); \n\t promise._popContext(); \n\t if (ret === errorObj) { \n\t promise._rejectCallback(ret.e, false); \n\t } else { \n\t promise._resolveCallback(ret); \n\t } \n\t }; \n\t \n\t [TheName].prototype.checkFulfillment = function(promise) { \n\t var now = ++this.now; \n\t if (now === [TheTotal]) { \n\t if (this.asyncNeeded) { \n\t async.invoke(this._callFunction, this, promise); \n\t } else { \n\t this._callFunction(promise); \n\t } \n\t \n\t } \n\t }; \n\t \n\t [TheName].prototype._resultCancelled = function() { \n\t [CancellationCode] \n\t }; \n\t \n\t return [TheName]; \n\t }(tryCatch, errorObj, Promise, async); \n\t ";return f=f.replace(/\[TheName\]/g,u).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,a).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,s),new Function("tryCatch","errorObj","Promise","async",f)(c,h,t,o)},y=[],_=[],v=[],g=0;g<8;++g)y.push(d(g+1)),_.push(l(g+1)),v.push(p(g+1));a=function(t){this._reject(t)}}t.join=function(){var r,o=arguments.length-1;if(o>0&&"function"==typeof arguments[o]&&(r=arguments[o],o<=8&&f)){var c=new t(i);c._captureStackTrace();for(var h=y[o-1],l=new h(r),p=_,d=0;d<o;++d){var g=n(arguments[d],c);if(g instanceof t){g=g._target();var m=g._bitField;0===(50397184&m)?(g._then(p[d],a,void 0,c,l),v[d](g,l),l.asyncNeeded=!1):0!==(33554432&m)?p[d].call(c,g._value(),l):0!==(16777216&m)?c._reject(g._reason()):c._cancel()}else p[d].call(c,g,l)}if(!c._isFateSealed()){if(l.asyncNeeded){var b=s();null!==b&&(l.fn=u.domainBind(b,l.fn))}c._setAsyncGuaranteed(),c._setOnCancel(l)}return c}for(var w=arguments.length,E=new Array(w),S=0;S<w;++S)E[S]=arguments[S];r&&E.pop();var c=new e(E).promise();return void 0!==r?c.spread(r):c}}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t,e,i,o,s,a){function u(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:h.domainBind(i,e),this._preservedValues=n===s?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function f(e,r,o,s){if("function"!=typeof r)return i("expecting a function but got "+h.classString(r));var a=0;if(void 0!==o){if("object"!==("undefined"==typeof o?"undefined":n(o))||null===o)return t.reject(new TypeError("options argument must be an object but it is "+h.classString(o)));if("number"!=typeof o.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+h.classString(o.concurrency)));a=o.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new u(e,r,a,s).promise()}var c=t._getDomain,h=r(6),l=h.tryCatch,p=h.errorObj,d=t._async;h.inherits(u,e),u.prototype._asyncInit=function(){this._init$(void 0,-2)},u.prototype._init=function(){},u.prototype._promiseFulfilled=function(e,r){var n=this._values,i=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var f=this._promise,c=this._callback,h=f._boundValue();f._pushContext();var d=l(c).call(h,e,r,i),y=f._popContext();if(a.checkForgottenReturns(d,y,null!==s?"Promise.filter":"Promise.map",f),d===p)return this._reject(d.e),!0;var _=o(d,this._promise);if(_ instanceof t){_=_._target();var v=_._bitField;if(0===(50397184&v))return u>=1&&this._inFlight++,n[r]=_,_._proxy(this,(r+1)*-1),!1;if(0===(33554432&v))return 0!==(16777216&v)?(this._reject(_._reason()),!0):(this._cancel(),!0);d=_._value()}n[r]=d}var g=++this._totalResolved;return g>=i&&(null!==s?this._filter(n,s):this._resolve(n),!0)},u.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},u.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},u.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return f(this,t,e,null)},t.map=function(t,e,r,n){return f(t,e,r,n)}}},function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){function e(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var i="Object "+c.classString(e)+" has no method '"+c.toString(r)+"'";throw new t.TypeError(i)}return n}function n(t){var r=this.pop(),n=e(t,r);return n.apply(t,this)}function s(t){return t[this]}function a(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var u,f,c=r(6),h=c.canEvaluate,l=c.isIdentifier,p=function(t){return new Function("ensureMethod"," \n\t return function(obj) { \n\t 'use strict' \n\t var len = this.length; \n\t ensureMethod(obj, 'methodName'); \n\t switch(len) { \n\t case 1: return obj.methodName(this[0]); \n\t case 2: return obj.methodName(this[0], this[1]); \n\t case 3: return obj.methodName(this[0], this[1], this[2]); \n\t case 0: return obj.methodName(); \n\t default: \n\t return obj.methodName.apply(obj, this); \n\t } \n\t }; \n\t ".replace(/methodName/g,t))(e)},d=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},y=function(t,e,r){var n=r[t];if("function"!=typeof n){if(!l(t))return null;if(n=e(t),r[t]=n,r[" size"]++,r[" size"]>512){for(var i=Object.keys(r),o=0;o<256;++o)delete r[i[o]];r[" size"]=i.length-256}}return n};u=function(t){return y(t,p,i)},f=function(t){return y(t,d,o)},t.prototype.call=function(t){for(var e=arguments.length,r=new Array(Math.max(e-1,0)),i=1;i<e;++i)r[i-1]=arguments[i];if(h){var o=u(t);if(null!==o)return this._then(o,void 0,void 0,r,void 0)}return r.push(t),this._then(n,void 0,void 0,r,void 0)},t.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=a;else if(h){var n=f(t);e=null!==n?n:s}else e=s;return this._then(e,void 0,void 0,t,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){function a(t){setTimeout(function(){throw t},0)}function u(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function f(e,r){function i(){if(s>=f)return c._fulfill();var o=u(e[s++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(t){return a(t)}if(o instanceof t)return o._then(i,a,null,null,null)}i()}var s=0,f=e.length,c=new t(o);return i(),c}function c(t,e,r){this._data=t,this._promise=e,this._context=r}function h(t,e,r){this.constructor$(t,e,r)}function l(t){return c.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function p(t){this.length=t,this.promise=null,this[t-1]=null}var d=r(6),y=r(13).TypeError,_=r(6).inherits,v=d.errorObj,g=d.tryCatch,m={};c.prototype.data=function(){return this._data},c.prototype.promise=function(){return this._promise},c.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},c.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==m?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},c.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},_(h,c),h.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},p.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var r=arguments.length;if(r<2)return e("you must pass at least 2 arguments to Promise.using");var i=arguments[r-1];if("function"!=typeof i)return e("expecting a function but got "+d.classString(i));var o,a=!0;2===r&&Array.isArray(arguments[0])?(o=arguments[0],r=o.length,a=!1):(o=arguments,r--);for(var u=new p(r),h=0;h<r;++h){var y=o[h];if(c.isDisposer(y)){var _=y;y=y.promise(),y._setDisposable(_)}else{var m=n(y);m instanceof t&&(y=m._then(l,null,null,{resources:u,index:h},void 0))}u[h]=y}for(var b=new Array(u.length),h=0;h<b.length;++h)b[h]=t.resolve(u[h]).reflect();var w=t.all(b).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return v.e=r.error(),v;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),i=g(i);var n=a?i.apply(void 0,t):i(t),o=E._popContext();return s.checkForgottenReturns(n,o,"Promise.using",E),n}),E=w.lastly(function(){var e=new t.PromiseInspection(w);return f(u,e)});return u.promise=E,E._setOnCancel(u),E},t.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new h(t,this,i());throw new y}}},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=r(6),u=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var f=function(t){return c(+this).thenReturn(t)},c=t.delay=function(r,o){var s,a;return void 0!==o?(s=t.resolve(o)._then(f,null,null,r,void 0),n.cancellation()&&o instanceof t&&s._setOnCancel(o)):(s=new t(e),a=setTimeout(function(){s._fulfill()},+r),n.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};t.prototype.delay=function(t){return c(t,this)};var h=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),a.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};t.prototype.timeout=function(t,e){t=+t;var r,a,u=new i(setTimeout(function(){r.isPending()&&h(r,e,a)},t));return n.cancellation()?(a=this.then(),r=a._then(o,s,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,s,void 0,u,void 0),r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){function a(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=p(r[o])(e);if(n._popContext(),s===l){n._pushContext();var a=t.reject(l.e);return n._popContext(),a}var u=i(s,n);if(u instanceof t)return u}return null}function u(e,r,i,o){if(s.cancellation()){var a=new t(n),u=this._finallyPromise=new t(n);this._promise=a.lastly(function(){return u}),a._captureStackTrace(),a._setOnCancel(this)}else{var f=this._promise=new t(n);f._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}var f=r(13),c=f.TypeError,h=r(6),l=h.errorObj,p=h.tryCatch,d=[];h.inherits(u,o),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var e,r="undefined"!=typeof this._generator.return;if(r)this._promise._pushContext(),e=p(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),e=p(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=p(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=p(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(e){var r=this._promise;if(e===l)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(e.done===!0)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(!(o instanceof t)&&(o=a(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new c("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?t._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},t.coroutine=function(t,e){if("function"!=typeof t)throw new c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=u,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new c("expecting a function but got "+h.classString(t));d.push(t)},t.spawn=function(r){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new u(r,this),i=n.promise();return n._run(t.spawn),i}}},function(t,e,r){"use strict";t.exports=function(t){function e(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=a(e).apply(r._boundValue(),[null].concat(t));i===u&&s.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?a(e).call(n,null):a(e).call(n,null,t);i===u&&s.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=new Error(t+"");n.cause=t,t=n}var i=a(e).call(r._boundValue(),t);i===u&&s.throwLater(i.e)}var o=r(6),s=t._async,a=o.tryCatch,u=o.errorObj;t.prototype.asCallback=t.prototype.nodeify=function(t,r){if("function"==typeof t){var o=n;void 0!==r&&Object(r).spread&&(o=e),this._then(o,i,void 0,this,t)}return this}}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t,e){function i(t){return!S.test(t)}function o(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function s(t,e,r){var n=d.getDataPropertyOrDefault(t,e+r,w);return!!n&&o(n)}function a(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function u(t,e,r,n){for(var i=d.inheritedDataKeys(t),u=[],f=0;f<i.length;++f){var c=i[f],h=t[c],l=n===B||B(c,h,t);"function"!=typeof h||o(h)||s(t,c,e)||!n(c,h,t,l)||u.push(c,h)}return a(u,e,r),u}function f(r,n,i,o,s,a){function u(){var i=n;n===p&&(i=this);var o=new t(e);o._captureStackTrace();var s="string"==typeof c&&this!==f?this[c]:r,u=y(o,a);try{s.apply(i,_(arguments,u))}catch(t){o._rejectCallback(v(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var f=function(){return this}(),c=r;return"string"==typeof c&&(r=o),d.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,r,n,i){for(var o=new RegExp(k(e)+"$"),s=u(t,e,o,r),a=0,f=s.length;a<f;a+=2){var c=s[a],h=s[a+1],l=c+e;if(n===C)t[l]=C(c,p,c,h,e,i);else{var y=n(h,function(){return C(c,p,c,h,e,i)});d.notEnumerableProp(y,"__isPromisified__",!0),t[l]=y}}return d.toFastProperties(t),t}function h(t,e,r){return C(t,e,void 0,t,null,r)}var l,p={},d=r(6),y=r(20),_=d.withAppended,v=d.maybeWrapAsError,g=d.canEvaluate,m=r(13).TypeError,b="Async",w={__isPromisified__:!0},E=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],S=new RegExp("^(?:"+E.join("|")+")$"),B=function(t){return d.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},k=function(t){return t.replace(/([$])/,"\\$")},T=function(t){for(var e=[t],r=Math.max(0,t-1-3),n=t-1;n>=r;--n)e.push(n);for(var n=t+1;n<=3;++n)e.push(n);return e},x=function(t){return d.filledRange(t,"_arg","")},A=function(t){return d.filledRange(Math.max(t,3),"_arg","")},I=function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0};l=function(r,n,i,o,s,a){function u(t){var e,r=x(t).join(", "),i=t>0?", ":"";return e=l?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===n?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",e.replace("{{args}}",r).replace(", ",i)}function f(){for(var t="",e=0;e<h.length;++e)t+="case "+h[e]+":"+u(h[e]);return t+=" \n\t default: \n\t var args = new Array(len + 1); \n\t var i = 0; \n\t for (var i = 0; i < len; ++i) { \n\t args[i] = arguments[i]; \n\t } \n\t args[i] = nodeback; \n\t [CodeForCall] \n\t break; \n\t ".replace("[CodeForCall]",l?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}var c=Math.max(0,I(o)-1),h=T(c),l="string"==typeof r||n===p,g="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",m="'use strict'; \n\t var ret = function (Parameters) { \n\t 'use strict'; \n\t var len = arguments.length; \n\t var promise = new Promise(INTERNAL); \n\t promise._captureStackTrace(); \n\t var nodeback = nodebackForPromise(promise, "+a+"); \n\t var ret; \n\t var callback = tryCatch([GetFunctionCode]); \n\t switch(len) { \n\t [CodeForSwitchCase] \n\t } \n\t if (ret === errorObj) { \n\t promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\t } \n\t if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\t return promise; \n\t }; \n\t notEnumerableProp(ret, '__isPromisified__', true); \n\t return ret; \n\t ".replace("[CodeForSwitchCase]",f()).replace("[GetFunctionCode]",g);return m=m.replace("Parameters",A(c)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",m)(t,o,n,_,v,y,d.tryCatch,d.errorObj,d.notEnumerableProp,e)};var C=g?l:f;t.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+d.classString(t));if(o(t))return t;e=Object(e);var r=void 0===e.context?p:e.context,n=!!e.multiArgs,s=h(t,r,n);return d.copyDescriptors(t,s,i),s},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!==("undefined"==typeof t?"undefined":n(t)))throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var r=!!e.multiArgs,i=e.suffix;"string"!=typeof i&&(i=b);var o=e.filter;"function"!=typeof o&&(o=B);var s=e.promisifier;if("function"!=typeof s&&(s=C),!d.isIdentifier(i))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=d.inheritedDataKeys(t),u=0;u<a.length;++u){var f=t[a[u]];"constructor"!==a[u]&&d.isClass(f)&&(c(f.prototype,i,o,s,r),c(f,i,o,s,r))}return c(t,i,o,s,r)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){function o(t){var e,r=!1;if(void 0!==a&&t instanceof a)e=h(t),r=!0;else{var n=c.keys(t),i=n.length;e=new Array(2*i);for(var o=0;o<i;++o){var s=n[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function s(e){var r,s=n(e);return f(s)?(r=s instanceof t?s._then(t.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof t&&r._propagateFrom(s,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,u=r(6),f=u.isObject,c=r(7);"function"==typeof Map&&(a=Map);var h=function(){function t(t,n){this[e]=t,this[e+r]=n,e++}var e=0,r=0;return function(n){r=n.size,e=0;var i=new Array(2*n.size);return n.forEach(t,i),i}}(),l=function(t){for(var e=new a,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],o=t[n];e.set(i,o)}return e};u.inherits(o,e),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){var n;if(this._isMap)n=l(this._values);else{n={};for(var i=this.length(),o=0,s=this.length();o<s;++o)n[this._values[o+i]]=this._values[o]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return s(this)},t.props=function(t){return s(t)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){function o(r,o){var u=n(r);if(u instanceof t)return a(u);if(r=s.asArray(r),null===r)return i("expecting an array or an iterable object but got "+s.classString(r));
4
- var f=new t(e);void 0!==o&&f._propagateFrom(o,3);for(var c=f._fulfill,h=f._reject,l=0,p=r.length;l<p;++l){var d=r[l];(void 0!==d||l in r)&&t.cast(d)._then(c,h,void 0,f,null)}return f}var s=r(6),a=function(t){return t.then(function(e){return o(e,t)})};t.race=function(t){return o(t,void 0)},t.prototype.race=function(){return o(this,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){function a(e,r,n,i){this.constructor$(e);var s=l();this._fn=null===s?r:p.domainBind(s,r),void 0!==n&&(n=t.resolve(n),n._attachCancellationCallback(this)),this._initialValue=n,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function f(t,e,r,i){if("function"!=typeof e)return n("expecting a function but got "+p.classString(e));var o=new a(t,e,r,i);return o.promise()}function c(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(h,void 0,void 0,this,void 0)):h.call(this,r)}function h(e){var r=this.array,n=r._promise,i=d(r._fn);n._pushContext();var o;o=void 0!==r._eachValues?i.call(n._boundValue(),e,this.index,this.length):i.call(n._boundValue(),this.accum,e,this.index,this.length),o instanceof t&&(r._currentCancellable=o);var a=n._popContext();return s.checkForgottenReturns(o,a,void 0!==r._eachValues?"Promise.each":"Promise.reduce",n),o}var l=t._getDomain,p=r(6),d=p.tryCatch;p.inherits(a,e),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(e){return e===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel()))},a.prototype._iterate=function(e){this._values=e;var r,n,i=e.length;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<i;++n){var o={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(c,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},t.prototype.reduce=function(t,e){return f(this,t,e,null)},t.reduce=function(t,e,r,n){return f(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t){this.constructor$(t)}var o=t.PromiseInspection,s=r(6);s.inherits(i,e),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var s=r(6),a=r(13).RangeError,u=r(13).AggregateError,f=s.isArray,c={};s.inherits(i,e),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=f(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==c&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return o(t,e)},t.prototype.some=function(t){return o(this,t)},t._SomePromiseArray=i}},function(t,e){"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},function(t,e){"use strict";t.exports=function(t,e){function r(){return o(this)}function n(t,r){return i(t,r,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},function(t,e){"use strict";t.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(43),a=n(s),u=r(82),f=function(){function t(e){var r=this;i(this,t),(0,a.default)(e,function(t,e){r[e]=t})}return o(t,[{key:"get",value:function(t){return this[t]}},{key:"set",value:function(t,e){this[t]=e}}]),t}();if(t.exports=new f(u),"undefined"!=typeof t.exports.Config)throw new Error("default config.json file may not contain a property 'Config'");t.exports.Config=f},function(t,e,r){"use strict";t.exports=r(44)},function(t,e,r){"use strict";function n(t,e){var r=a(t)?i:o;return r(t,s(e))}var i=r(45),o=r(46),s=r(80),a=r(62);t.exports=n},function(t,e){"use strict";function r(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}t.exports=r},function(t,e,r){"use strict";var n=r(47),i=r(79),o=i(n);t.exports=o},function(t,e,r){"use strict";function n(t,e){return t&&i(t,e,o)}var i=r(48),o=r(50);t.exports=n},function(t,e,r){"use strict";var n=r(49),i=n();t.exports=i},function(t,e){"use strict";function r(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(r(o[u],u,o)===!1)break}return e}}t.exports=r},function(t,e,r){"use strict";function n(t){return s(t)?i(t):o(t)}var i=r(51),o=r(72),s=r(76);t.exports=n},function(t,e,r){"use strict";function n(t,e){var r=s(t),n=!r&&o(t),c=!r&&!n&&a(t),l=!r&&!n&&!c&&f(t),p=r||n||c||l,d=p?i(t.length,String):[],y=d.length;for(var _ in t)!e&&!h.call(t,_)||p&&("length"==_||c&&("offset"==_||"parent"==_)||l&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||u(_,y))||d.push(_);return d}var i=r(52),o=r(53),s=r(62),a=r(63),u=r(66),f=r(67),c=Object.prototype,h=c.hasOwnProperty;t.exports=n},function(t,e){"use strict";function r(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}t.exports=r},function(t,e,r){"use strict";var n=r(54),i=r(61),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e,r){"use strict";function n(t){return o(t)&&i(t)==s}var i=r(55),o=r(61),s="[object Arguments]";t.exports=n},function(t,e,r){"use strict";function n(t){return null==t?void 0===t?u:a:f&&f in Object(t)?o(t):s(t)}var i=r(56),o=r(59),s=r(60),a="[object Null]",u="[object Undefined]",f=i?i.toStringTag:void 0;t.exports=n},function(t,e,r){"use strict";var n=r(57),i=n.Symbol;t.exports=i},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(58),o="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,s=i||o||Function("return this")();t.exports=s},function(t,e){(function(e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n="object"==("undefined"==typeof e?"undefined":r(e))&&e&&e.Object===Object&&e;t.exports=n}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t){var e=s.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var i=a.call(t);return n&&(e?t[u]=r:delete t[u]),i}var i=r(56),o=Object.prototype,s=o.hasOwnProperty,a=o.toString,u=i?i.toStringTag:void 0;t.exports=n},function(t,e){"use strict";function r(t){return i.call(t)}var n=Object.prototype,i=n.toString;t.exports=r},function(t,e){"use strict";function r(t){return null!=t&&"object"==("undefined"==typeof t?"undefined":n(t))}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e){"use strict";var r=Array.isArray;t.exports=r},function(t,e,r){(function(t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(57),o=r(65),s="object"==n(e)&&e&&!e.nodeType&&e,a=s&&"object"==n(t)&&t&&!t.nodeType&&t,u=a&&a.exports===s,f=u?i.Buffer:void 0,c=f?f.isBuffer:void 0,h=c||o;t.exports=h}).call(e,r(64)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){"use strict";function r(){return!1}t.exports=r},function(t,e){"use strict";function r(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<e}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e,r){"use strict";var n=r(68),i=r(70),o=r(71),s=o&&o.isTypedArray,a=s?i(s):n;t.exports=a},function(t,e,r){"use strict";function n(t){return s(t)&&o(t.length)&&!!O[i(t)]}var i=r(55),o=r(69),s=r(61),a="[object Arguments]",u="[object Array]",f="[object Boolean]",c="[object Date]",h="[object Error]",l="[object Function]",p="[object Map]",d="[object Number]",y="[object Object]",_="[object RegExp]",v="[object Set]",g="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",E="[object Float32Array]",S="[object Float64Array]",B="[object Int8Array]",k="[object Int16Array]",T="[object Int32Array]",x="[object Uint8Array]",A="[object Uint8ClampedArray]",I="[object Uint16Array]",C="[object Uint32Array]",O={};O[E]=O[S]=O[B]=O[k]=O[T]=O[x]=O[A]=O[I]=O[C]=!0,O[a]=O[u]=O[b]=O[f]=O[w]=O[c]=O[h]=O[l]=O[p]=O[d]=O[y]=O[_]=O[v]=O[g]=O[m]=!1,t.exports=n},function(t,e){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}var n=9007199254740991;t.exports=r},function(t,e){"use strict";function r(t){return function(e){return t(e)}}t.exports=r},function(t,e,r){(function(t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(58),o="object"==n(e)&&e&&!e.nodeType&&e,s=o&&"object"==n(t)&&t&&!t.nodeType&&t,a=s&&s.exports===o,u=a&&i.process,f=function(){try{return u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=f}).call(e,r(64)(t))},function(t,e,r){"use strict";function n(t){if(!i(t))return o(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}var i=r(73),o=r(74),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},function(t,e){"use strict";function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e,r){"use strict";var n=r(75),i=n(Object.keys,Object);t.exports=i},function(t,e){"use strict";function r(t,e){return function(r){return t(e(r))}}t.exports=r},function(t,e,r){"use strict";function n(t){return null!=t&&o(t.length)&&!i(t)}var i=r(77),o=r(69);t.exports=n},function(t,e,r){"use strict";function n(t){if(!o(t))return!1;var e=i(t);return e==a||e==u||e==s||e==f}var i=r(55),o=r(78),s="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",f="[object Proxy]";t.exports=n},function(t,e){"use strict";function r(t){var e="undefined"==typeof t?"undefined":n(t);return null!=t&&("object"==e||"function"==e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,r){"use strict";function n(t,e){return function(r,n){if(null==r)return r;if(!i(r))return t(r,n);for(var o=r.length,s=e?o:-1,a=Object(r);(e?s--:++s<o)&&n(a[s],s,a)!==!1;);return r}}var i=r(76);t.exports=n},function(t,e,r){"use strict";function n(t){return"function"==typeof t?t:i}var i=r(81);t.exports=n},function(t,e){"use strict";function r(t){return t}t.exports=r},function(t,e){t.exports={transport:"http",websocket:"wss://gtg.steem.house:8090",uri:"https://api.steemit.com",url:"",dev_uri:"https://api.steemitdev.com",stage_uri:"https://api.steemitstage.com",address_prefix:"STM",chain_id:"0000000000000000000000000000000000000000000000000000000000000000"}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[{api:"database_api",method:"set_subscribe_callback",params:["callback","clearFilter"]},{api:"database_api",method:"set_pending_transaction_callback",params:["cb"]},{api:"database_api",method:"set_block_applied_callback",params:["cb"]},{api:"database_api",method:"cancel_all_subscriptions"},{api:"database_api",method:"get_trending_tags",params:["afterTag","limit"]},{api:"database_api",method:"get_tags_used_by_author",params:["author"]},{api:"database_api",method:"get_post_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_comment_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_discussions_by_trending",params:["query"]},{api:"database_api",method:"get_discussions_by_trending30",params:["query"]},{api:"database_api",method:"get_discussions_by_created",params:["query"]},{api:"database_api",method:"get_discussions_by_active",params:["query"]},{api:"database_api",method:"get_discussions_by_cashout",params:["query"]},{api:"database_api",method:"get_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_discussions_by_votes",params:["query"]},{api:"database_api",method:"get_discussions_by_children",params:["query"]},{api:"database_api",method:"get_discussions_by_hot",params:["query"]},{api:"database_api",method:"get_discussions_by_feed",params:["query"]},{api:"database_api",method:"get_discussions_by_blog",params:["query"]},{api:"database_api",method:"get_discussions_by_comments",params:["query"]},{api:"database_api",method:"get_discussions_by_promoted",params:["query"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"database_api",method:"get_state",params:["path"]},{api:"database_api",method:"get_trending_categories",params:["after","limit"]},{api:"database_api",method:"get_best_categories",params:["after","limit"]},{api:"database_api",method:"get_active_categories",params:["after","limit"]},{api:"database_api",method:"get_recent_categories",params:["after","limit"]},{api:"database_api",method:"get_config"},{api:"database_api",method:"get_dynamic_global_properties"},{api:"database_api",method:"get_chain_properties"},{api:"database_api",method:"get_feed_history"},{api:"database_api",method:"get_current_median_history_price"},{api:"database_api",method:"get_witness_schedule"},{api:"database_api",method:"get_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"account_by_key_api",method:"get_key_references",params:["key"]},{api:"database_api",method:"get_accounts",params:["names"]},{api:"database_api",method:"get_account_references",params:["accountId"]},{api:"database_api",method:"lookup_account_names",params:["accountNames"]},{api:"database_api",method:"lookup_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_account_count"},{api:"database_api",method:"get_conversion_requests",params:["accountName"]},{api:"database_api",method:"get_account_history",params:["account","from","limit"]},{api:"database_api",method:"get_owner_history",params:["account"]},{api:"database_api",method:"get_recovery_request",params:["account"]},{api:"database_api",method:"get_escrow",params:["from","escrowId"]},{api:"database_api",method:"get_withdraw_routes",params:["account","withdrawRouteType"]},{api:"database_api",method:"get_account_bandwidth",params:["account","bandwidthType"]},{api:"database_api",method:"get_savings_withdraw_from",params:["account"]},{api:"database_api",method:"get_savings_withdraw_to",params:["account"]},{api:"database_api",method:"get_order_book",params:["limit"]},{api:"database_api",method:"get_open_orders",params:["owner"]},{api:"database_api",method:"get_liquidity_queue",params:["startAccount","limit"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{api:"database_api",method:"get_transaction",params:["trxId"]},{api:"database_api",method:"get_required_signatures",params:["trx","availableKeys"]},{api:"database_api",method:"get_potential_signatures",params:["trx"]},{api:"database_api",method:"verify_authority",params:["trx"]},{api:"database_api",method:"verify_account_authority",params:["nameOrId","signers"]},{api:"database_api",method:"get_active_votes",params:["author","permlink"]},{api:"database_api",method:"get_account_votes",params:["voter"]},{api:"database_api",method:"get_content",params:["author","permlink"]},{api:"database_api",method:"get_content_replies",params:["author","permlink"]},{api:"database_api",method:"get_discussions_by_author_before_date",params:["author","startPermlink","beforeDate","limit"]},{api:"database_api",method:"get_replies_by_last_update",params:["startAuthor","startPermlink","limit"]},{api:"database_api",method:"get_witnesses",params:["witnessIds"]},{api:"database_api",method:"get_witness_by_account",params:["accountName"]},{api:"database_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"database_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_witness_count"},{api:"database_api",method:"get_active_witnesses"},{api:"database_api",method:"get_miner_queue"},{api:"database_api",method:"get_reward_fund",params:["name"]},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit"]},{api:"login_api",method:"login",params:["username","password"]},{api:"login_api",method:"get_api_by_name",params:["database_api"]},{api:"login_api",method:"get_version"},{api:"follow_api",method:"get_followers",params:["following","startFollower","followType","limit"]},{api:"follow_api",method:"get_following",params:["follower","startFollowing","followType","limit"]},{api:"follow_api",method:"get_follow_count",params:["account"]},{api:"follow_api",method:"get_feed_entries",params:["account","entryId","limit"]},{api:"follow_api",method:"get_feed",params:["account","entryId","limit"]},{api:"follow_api",method:"get_blog_entries",params:["account","entryId","limit"]},{api:"follow_api",method:"get_blog",params:["account","entryId","limit"]},{api:"follow_api",method:"get_account_reputations",params:["lowerBoundName","limit"]},{api:"follow_api",method:"get_reblogged_by",params:["author","permlink"]},{api:"follow_api",method:"get_blog_authors",params:["blogAccount"]},{api:"network_broadcast_api",method:"broadcast_transaction",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_with_callback",params:["confirmationCallback","trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_synchronous",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_block",params:["b"]},{api:"network_broadcast_api",method:"set_max_block_age",params:["maxBlockAge"]},{api:"market_history_api",method:"get_ticker",params:[]},{api:"market_history_api",method:"get_volume",params:[]},{api:"market_history_api",method:"get_order_book",method_name:"getMarketOrderBook",params:["limit"]},{api:"market_history_api",method:"get_trade_history",params:["start","end","limit"]},{api:"market_history_api",method:"get_recent_trades",params:["limit"]},{api:"market_history_api",method:"get_market_history",params:["bucket_seconds","start","end"]},{api:"market_history_api",method:"get_market_history_buckets",params:[]},{api:"condenser_api",method:"find_proposals",params:["id_set"]},{api:"condenser_api",method:"list_proposals",params:["start","limit","order_by","order_direction","status"]},{api:"condenser_api",method:"list_proposal_votes",params:["start","limit","order_by","order_direction","status"]},{api:"condenser_api",method:"get_nai_pool",params:[]}]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(85),o=n(i),s=r(94),a=n(s);e.default={http:o.default,ws:a.default}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var r=e.method,n=e.id,i=e.params,o=e.fetchMethod,s=void 0===o?c.default:o,a={id:n,jsonrpc:"2.0",method:r,params:i};return s(t,{body:JSON.stringify(a),method:"post",mode:"cors",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"}}).then(function(t){if(!t.ok)throw new Error("HTTP "+t.status+": "+t.statusText);return t.json()}).then(function(t){if(t.id!==n)throw new Error("Invalid response id: "+t.id);if(t.error)throw new g(t.error);return t.result})}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.jsonRpc=a;var f=r(86),c=n(f),h=r(87),l=n(h),p=r(90),d=n(p),y=r(93),_=n(y),v=(0,l.default)("steem:http"),g=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return r.name="RPCError",r.code=t.code,r.data=t.data,r}return s(e,t),e}(Error),m=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),u(e,[{key:"send",value:function(t,e,r){var n=this;this.options.useAppbaseApi&&(t="condenser_api"),v("Steem::send",t,e);var i=e.id||this.id++,o=[t,e.method,e.params],s=this.retriable(t,e),u=this.options.fetchMethod;s?s.attempt(function(t){a(n.options.uri,{method:"call",id:i,params:o,fetchMethod:u}).then(function(t){r(null,t)},function(t){s.retry(t)||r(s.mainError())})}):a(this.options.uri,{method:"call",id:i,params:o,fetchMethod:u}).then(function(t){r(null,t)},function(t){r(t)})}},{key:"retriable",value:function(t,e){return this.nonRetriableOperations.some(function(t){return t===e.method})?null:Object(this.options.retry)===this.options.retry?d.default.operation(this.options.retry):this.options.retry?d.default.operation():null}},{key:"nonRetriableOperations",get:function(){return this.options.nonRetriableOperations||["broadcast_transaction","broadcast_transaction_with_callback","broadcast_transaction_synchronous","broadcast_block"]}}]),e}(_.default);e.default=m},function(t,e){"use strict";var r={};!function(t){function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function r(t){return"string"!=typeof t&&(t=String(t)),t}function n(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function s(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function a(t){var e=new FileReader,r=s(e);return e.readAsArrayBuffer(t),r}function u(t){var e=new FileReader,r=s(e);return e.readAsText(t),r}function f(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(v.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(v.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(v.arrayBuffer&&v.blob&&m(t))this._bodyArrayBuffer=c(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!b(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(a)}),this.text=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(f(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(t){var e=t.toUpperCase();return w.indexOf(e)>-1?e:t}function p(t,e){e=e||{};var r=e.body;if(t instanceof p){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=l(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function y(t){var e=new i;return t.split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}}),e}function _(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var v={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(v.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&g.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,n){t=e(t),n=r(n);var i=this.map[t];this.map[t]=i?i+","+n:n},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,n){this.map[e(t)]=r(n)},i.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),n(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),n(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),n(t)},v.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];
5
- p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},h.call(p.prototype),h.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];_.redirect=function(t,e){if(E.indexOf(e)===-1)throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=p,t.Response=_,t.fetch=function(t,e){return new Promise(function(r,n){var i=new p(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:y(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;r(new _(e,t))},o.onerror=function(){n(new TypeError("Network request failed"))},o.ontimeout=function(){n(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&v.blob&&(o.responseType="blob"),i.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof r?r:void 0);var n=r.fetch;n.fetch=n,n.Response=r.Response,n.Headers=r.Headers,n.Request=r.Request,t.exports=n},function(t,e,r){(function(n){"use strict";function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,n)}}function s(){return"object"===("undefined"==typeof console?"undefined":c(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof n&&"env"in n&&(t=n.env.DEBUG),t}function f(){try{return window.localStorage}catch(t){}}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e=t.exports=r(88),e.log=s,e.formatArgs=o,e.save=a,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:f(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,r(5))},function(t,e,r){"use strict";function n(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function i(t){function r(){if(r.enabled){var t=r,n=+new Date,i=n-(f||n);t.diff=i,t.prev=f,t.curr=n,f=n;for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var a=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;a++;var i=e.formatters[n];if("function"==typeof i){var s=o[a];r=i.call(t,s),o.splice(a,1),a--}return r}),e.formatArgs.call(t,o);var u=r.log||e.log||console.log.bind(console);u.apply(t,o)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=n(t),"function"==typeof e.init&&e.init(r),r}function o(t){e.save(t),e.names=[],e.skips=[];for(var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(t=r[i].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=i.debug=i.default=i,e.coerce=u,e.disable=s,e.enable=o,e.enabled=a,e.humanize=r(89),e.names=[],e.skips=[],e.formatters={};var f},function(t,e){"use strict";function r(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*h;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*f;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=f?Math.round(t/f)+"h":t>=u?Math.round(t/u)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function i(t){return o(t,c,"day")||o(t,f,"hour")||o(t,u,"minute")||o(t,a,"second")||t+" ms"}function o(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=1e3,u=60*a,f=60*u,c=24*f,h=365.25*c;t.exports=function(t,e){e=e||{};var o="undefined"==typeof t?"undefined":s(t);if("string"===o&&t.length>0)return r(t);if("number"===o&&isNaN(t)===!1)return e.long?i(t):n(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";t.exports=r(91)},function(t,e,r){"use strict";var n=r(92);e.operation=function(t){var r=e.timeouts(t);return new n(r,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<e.retries;i++)n.push(this.createTimeout(i,e));return t&&t.forever&&!n.length&&n.push(this.createTimeout(i,e)),n.sort(function(t,e){return t-e}),n},e.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,n=Math.round(r*e.minTimeout*Math.pow(e.factor,t));return n=Math.min(n,e.maxTimeout)},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n){n=[];for(var i in t)"function"==typeof t[i]&&n.push(i)}for(var o=0;o<n.length;o++){var s=n[o],a=t[s];t[s]=function(n){var i=e.operation(r),o=Array.prototype.slice.call(arguments,1),s=o.pop();o.push(function(t){i.retry(t)||(t&&(arguments[0]=i.mainError()),s.apply(this,arguments))}),i.attempt(function(){n.apply(t,o)})}.bind(t,a),t[s].options=r}}},function(t,e){"use strict";function r(t,e){"boolean"==typeof e&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=(new Date).getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift()}var n=this,i=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r);return this._options.unref&&i.unref(),!0},r.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},r.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},r.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(0===this._errors.length)return null;for(var t={},e=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,s=(t[o]||0)+1;t[o]=s,s>=r&&(e=i,r=s)}return e}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),f=n(u),c=r(2),h=n(c),l=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.options=t,r.id=0,r}return s(e,t),a(e,[{key:"setOptions",value:function(t){Object.assign(this.options,t),this.stop()}},{key:"listenTo",value:function(t,e,r){return t.addEventListener?t.addEventListener(e,r):t.on(e,r),function(){t.removeEventListener?t.removeEventListener(e,r):t.removeListener(e,r)}}},{key:"send",value:function(){}},{key:"start",value:function(){}},{key:"stop",value:function(){}}]),e}(h.default);e.default=l,f.default.promisifyAll(l.prototype)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),f=n(u),c=r(95),h=n(c),l=r(87),p=n(l),d=r(93),y=n(d),_=void 0;if(h.default)_=r(96);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");_=window.WebSocket}var v=(0,p.default)("steem:ws"),g=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Object.assign({id:0},t)));return r._requests=new Map,r.inFlight=0,r.isOpen=!1,r}return s(e,t),a(e,[{key:"start",value:function(){var t=this;return this.startPromise?this.startPromise:(this.startPromise=new f.default(function(e,r){t.ws=new _(t.options.websocket),t.ws.onerror=function(e){t.startPromise=null,r(e)},t.ws.onopen=function(){t.isOpen=!0,t.ws.onerror=t.onError.bind(t),t.ws.onmessage=t.onMessage.bind(t),t.ws.onclose=t.onClose.bind(t),e()}}),this.startPromise)}},{key:"stop",value:function(){v("Stopping..."),this.startPromise=null,this.isOpen=!1,this._requests.clear(),this.ws&&(this.ws.onerror=this.ws.onmessage=this.ws.onclose=null,this.ws.close(),this.ws=null)}},{key:"send",value:function(t,e,r){var n=this;return v("Steem::send",t,e),this.start().then(function(){var i={};new f.default(function(t,e){i.resolve=function(e){t(e),r(null,e)},i.reject=function(t){e(t),r(t)}}),n.options.useAppbaseApi&&(t="condenser_api");var o={deferral:i,startedAt:Date.now(),message:{id:e.id||n.id++,method:"call",jsonrpc:"2.0",params:[t,e.method,e.params]}};return n.inFlight++,n._requests.set(o.message.id,o),n.ws.send(JSON.stringify(o.message)),i})}},{key:"onError",value:function(t){var e=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;s.deferral.reject(t)}}catch(t){r=!0,n=t}finally{try{!e&&o.return&&o.return()}finally{if(r)throw n}}this.stop()}},{key:"onClose",value:function(){var t=new Error("Connection was closed"),e=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;s.deferral.reject(t)}}catch(t){r=!0,n=t}finally{try{!e&&o.return&&o.return()}finally{if(r)throw n}}this._requests.clear()}},{key:"onMessage",value:function(t){var e=JSON.parse(t.data);if(v("-- Steem.onMessage -->",e.id),!this._requests.has(e.id))throw new Error("Panic: no request in queue for message id "+e.id);var r=this._requests.get(e.id);this._requests.delete(e.id);var n=e.error;if(n){var i=new Error((n.message||"Failed to complete operation")+" (see err.payload for the full error payload)");i.payload=e,r.deferral.reject(i)}else this.emit("track-performance",r.message.method,Date.now()-r.startedAt),r.deferral.resolve(e.result)}}]),e}(y.default);e.default=g},function(t,e){(function(e){"use strict";t.exports=!1;try{t.exports="[object process]"===Object.prototype.toString.call(e.process)}catch(t){}}).call(e,function(){return this}())},function(t,e){},function(t,e){"use strict";function r(t){return t.replace(i,function(t,e){return e.toUpperCase()})}function n(t){var e=void 0,r=void 0,n=void 0,i=void 0;if(i="Account name should ",!t)return i+"not be empty.";var o=t.length;if(o<3)return i+"be longer.";if(o>16)return i+"be shorter.";/\./.test(t)&&(i="Each account segment should ");var s=t.split(".");for(e=0,n=s.length;e<n;e++){if(r=s[e],!/^[a-z]/.test(r))return i+"start with a letter.";if(!/^[a-z0-9-]*$/.test(r))return i+"have only letters, digits, or dashes.";if(/--/.test(r))return i+"have only one dash in a row.";if(!/[a-z0-9]$/.test(r))return i+"end with a letter or digit.";if(!(r.length>=3))return i+"be longer"}return null}Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=r,e.validateAccountName=n;var i=/_([a-z])/g},function(t,e,r){"use strict";t.exports={Address:r(99),Aes:r(150),PrivateKey:r(187),PublicKey:r(177),Signature:r(188),brainKey:r(192),key_utils:r(193),hash:r(108),ecc_config:r(42)}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(104),s=r(42),a=r(108),u=r(148),f=function(){function t(e){n(this,t),this.addy=e}return i(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.get("address_prefix"),r=a.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+u.encode(n)}}],[{key:"fromBuffer",value:function(e){var r=a.sha512(e),n=a.ripemd160(r);return new t(n)}},{key:"fromString",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.get("address_prefix"),i=r.slice(0,n.length);o.equal(n,i,"Expecting key to begin with "+n+", instead got "+i);var f=r.slice(n.length);f=new e(u.decode(f),"binary");var c=f.slice(-4);f=f.slice(0,-4);var h=a.ripemd160(f);return h=h.slice(0,4),o.deepEqual(c,h,"Checksum did not match"),new t(f)}},{key:"fromPublic",value:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=a.sha256(r.toBuffer(n)),s=a.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var f=e.concat([u,s]),c=a.sha256(f);c=a.sha256(c);var h=e.concat([f,c.slice(0,4)]);return new t(a.ripemd160(h))}}]),t}();t.exports=f}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=s.prototype):(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return a(this,t,e,r)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e,r,n){return u(e),e<=0?o(t,e):void 0!==r?"string"==typeof n?o(t,e).fill(r,n):o(t,e).fill(r):o(t,e)}function c(t,e){if(u(e),t=o(t,e<0?0:0|y(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(e,r);t=o(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function l(t,e){var r=e.length<0?0:0|y(e.length);t=o(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),s.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=s.prototype):t=l(t,e),t}function d(t,e){if(s.isBuffer(e)){var r=0|y(e.length);return t=o(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||$(e.length)?o(t,0):l(t,e);if("Buffer"===e.type&&Q(e.data))return l(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function _(t){return+t!=t&&(t=0),s.alloc(+t)}function v(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return K(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return j(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var f;if(i){var c=-1;for(f=r;f<a;f++)if(o(t,f)===o(e,c===-1?0:f-c)){if(c===-1&&(c=f),f-c+1===u)return c*s}else c!==-1&&(f-=f-c),c=-1}else for(r+u>a&&(r=a-u),f=r;f>=0;f--){for(var h=!0,l=0;l<u;l++)if(o(t,f+l)!==o(e,l)){h=!1;break}if(h)return f}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function S(t,e,r,n){return W(K(e,t.length-r),t,r,n)}function B(t,e,r,n){return W(X(e),t,r,n)}function k(t,e,r,n){return B(t,e,r,n)}function T(t,e,r,n){return W(G(e),t,r,n)}function x(t,e,r,n){return W(Y(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,f,c,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],f=t[i+2],128===(192&u)&&128===(192&f)&&(h=(15&o)<<12|(63&u)<<6|63&f,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],f=t[i+2],c=t[i+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(h=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&c,h>65535&&h<1114112&&(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 C(n)}function C(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function j(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function L(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function F(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function D(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,i){return i||D(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,n,23,4),r+4}function q(t,e,r,n,i){return i||D(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,n,52,8),r+8}function z(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function X(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function Y(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function G(t){return Z.toByteArray(z(t))}function W(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t){return t!==t}var Z=r(101),J=r(102),Q=r(103);e.Buffer=s,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),e.kMaxLength=i(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return a(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return f(null,t,e,r)},s.allocUnsafe=function(t){return c(null,t)},s.allocUnsafeSlow=function(t){return c(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=v,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?I(this,0,t):g.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,u=Math.min(o,a),f=this.slice(n,i),c=t.slice(e,r),h=0;h<u;++h)if(f[h]!==c[h]){o=f[h],a=c[h];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},s.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return B(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var n;if(s.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||F(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||F(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||F(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){
6
- return e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||F(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){e||F(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||F(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||F(t,4,this.length),J.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||F(t,4,this.length),J.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||F(t,8,this.length),J.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||F(t,8,this.length),J.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;U(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;U(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);U(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);U(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return q(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return q(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=s.isBuffer(t)?t:K(new s(t,n).toString()),u=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,s,a=t.length;o=r(t),s=new c(3*a/4-o),n=o>0?a-4:a;var u=0;for(e=0;e<n;e+=4)i=f[t.charCodeAt(e)]<<18|f[t.charCodeAt(e+1)]<<12|f[t.charCodeAt(e+2)]<<6|f[t.charCodeAt(e+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,s[u++]=255&i):1===o&&(i=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(o(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",o=[],a=16383,f=0,c=r-n;f<c;f+=a)o.push(s(t,f,f+a>c?c:f+a));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=a;for(var u=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=h.length;l<p;++l)u[l]=h[l],f[h.charCodeAt(l)]=l;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(t,e){"use strict";e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*y}},function(t,e){"use strict";var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(e){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function o(t){return Object.prototype.toString.call(t)}function s(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function a(t){if(w.isFunction(t)){if(B)return t.name;var e=t.toString(),r=e.match(T);return r&&r[1]}}function u(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function f(t){if(B||!w.isFunction(t))return w.inspect(t);var e=a(t),r=e?": "+e:"";return"[Function"+r+"]"}function c(t){return u(f(t.actual),128)+" "+t.operator+" "+u(f(t.expected),128)}function h(t,e,r,n,i){throw new k.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function l(t,e){t||h(t,!0,e,"==",k.ok)}function p(t,e,r,a){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(w.isDate(t)&&w.isDate(e))return t.getTime()===e.getTime();if(w.isRegExp(t)&&w.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"===("undefined"==typeof t?"undefined":b(t))||null!==e&&"object"===("undefined"==typeof e?"undefined":b(e))){if(s(t)&&s(e)&&o(t)===o(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;a=a||{actual:[],expected:[]};var u=a.actual.indexOf(t);return u!==-1&&u===a.expected.indexOf(e)||(a.actual.push(t),a.expected.push(e),y(t,e,r,a))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function y(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(w.isPrimitive(t)||w.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=d(t),o=d(e);if(i&&!o||!i&&o)return!1;if(i)return t=S.call(t),e=S.call(e),p(t,e,r);var s,a,u=x(t),f=x(e);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),a=u.length-1;a>=0;a--)if(u[a]!==f[a])return!1;for(a=u.length-1;a>=0;a--)if(s=u[a],!p(t[s],e[s],r,n))return!1;return!0}function _(t,e,r){p(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",_)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function g(t){var e;try{t()}catch(t){e=t}return e}function m(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=g(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!t&&w.isError(i),a=!t&&i&&!r;if((s&&o&&v(i,r)||a)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w=r(105),E=Object.prototype.hasOwnProperty,S=Array.prototype.slice,B=function(){return"foo"===function(){}.name}(),k=t.exports=l,T=/\s*function\s+([^\(\s]*)\s*/;k.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=a(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},w.inherits(k.AssertionError,Error),k.fail=h,k.ok=l,k.equal=function(t,e,r){t!=e&&h(t,e,r,"==",k.equal)},k.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",k.notEqual)},k.deepEqual=function(t,e,r){p(t,e,!1)||h(t,e,r,"deepEqual",k.deepEqual)},k.deepStrictEqual=function(t,e,r){p(t,e,!0)||h(t,e,r,"deepStrictEqual",k.deepStrictEqual)},k.notDeepEqual=function(t,e,r){p(t,e,!1)&&h(t,e,r,"notDeepEqual",k.notDeepEqual)},k.notDeepStrictEqual=_,k.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",k.strictEqual)},k.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",k.notStrictEqual)},k.throws=function(t,e,r){m(!0,t,e,r)},k.doesNotThrow=function(t,e,r){m(!1,t,e,r)},k.ifError=function(t){if(t)throw t};var x=Object.keys||function(t){var e=[];for(var r in t)E.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t,n){"use strict";function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var o=f(t,r);if(o)return o;var s=Object.keys(r),y=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(r);if(0===s.length){if(T(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(B(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return c(r)}var v="",g=!1,b=["{","}"];if(d(r)&&(g=!0,b=["[","]"]),T(r)){var w=r.name?": "+r.name:"";v=" [Function"+w+"]"}if(E(r)&&(v=" "+RegExp.prototype.toString.call(r)),B(r)&&(v=" "+Date.prototype.toUTCString.call(r)),k(r)&&(v=" "+c(r)),0===s.length&&(!g||0==r.length))return b[0]+v+b[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var S;return S=g?h(t,r,n,y,s):s.map(function(e){return l(t,r,n,y,e,g)}),t.seen.pop(),p(S,v,b)}function f(t,e){if(w(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)O(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,a,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?a=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(a=t.stylize("[Setter]","special")),O(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(f.value)<0?(a=_(r)?u(t,f.value,null):u(t,f.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(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=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function _(t){return null===t}function v(t){return null==t}function g(t){return"number"==typeof t}function m(t){return"string"==typeof t}function b(t){return"symbol"===("undefined"==typeof t?"undefined":j(t))}function w(t){return void 0===t}function E(t){return S(t)&&"[object RegExp]"===A(t)}function S(t){return"object"===("undefined"==typeof t?"undefined":j(t))&&null!==t}function B(t){return S(t)&&"[object Date]"===A(t)}function k(t){return S(t)&&("[object Error]"===A(t)||t instanceof Error)}function T(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===("undefined"==typeof t?"undefined":j(t))||"undefined"==typeof t}function A(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}function C(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(R,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),a=n[r];r<o;a=n[++r])s+=_(a)||!S(a)?" "+a:" "+i(a);return s},e.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(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var L,F={};e.debuglog=function(t){if(w(L)&&(L=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!F[t])if(new RegExp("\\b"+t+"\\b","i").test(L)){var r=n.pid;F[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else F[t]=function(){};return F[t]},e.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"},e.isArray=d,e.isBoolean=y,e.isNull=_,e.isNullOrUndefined=v,e.isNumber=g,e.isString=m,e.isSymbol=b,e.isUndefined=w,e.isRegExp=E,e.isObject=S,e.isDate=B,e.isError=k,e.isFunction=T,e.isPrimitive=x,e.isBuffer=r(106);var U=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(107),e._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(5))},function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return t&&"object"===("undefined"==typeof t?"undefined":r(t))&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"use strict";"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){return(0,c.default)("sha1").update(t).digest(e)}function o(t,e){return(0,c.default)("sha256").update(t).digest(e)}function s(t,e){return(0,c.default)("sha512").update(t).digest(e)}function a(t,e){return(0,l.default)("sha256",e).update(t).digest()}function u(t){return(0,c.default)("rmd160").update(t).digest()}var f=r(109),c=n(f),h=r(146),l=n(h);t.exports={sha1:i,sha256:o,sha512:s,HmacSHA256:a,ripemd160:u}},function(t,e,r){(function(e){"use strict";function n(t){f.call(this,"digest"),this._hash=t,this.buffers=[]}function i(t){f.call(this,"digest"),this._hash=t}var o=r(110),s=r(111),a=r(113),u=r(136),f=r(144);o(n,f),n.prototype._update=function(t){this.buffers.push(t)},n.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},o(i,f),i.prototype._update=function(t){this._hash.update(t)},i.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return t=t.toLowerCase(),"md5"===t?new n(s):new i("rmd160"===t||"ripemd160"===t?new a:u(t))}}).call(e,r(100).Buffer)},107,function(t,e,r){"use strict";function n(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,i=-1732584194,c=271733878,h=0;h<t.length;h+=16){var l=r,p=n,d=i,y=c;r=o(r,n,i,c,t[h+0],7,-680876936),c=o(c,r,n,i,t[h+1],12,-389564586),i=o(i,c,r,n,t[h+2],17,606105819),n=o(n,i,c,r,t[h+3],22,-1044525330),r=o(r,n,i,c,t[h+4],7,-176418897),c=o(c,r,n,i,t[h+5],12,1200080426),i=o(i,c,r,n,t[h+6],17,-1473231341),n=o(n,i,c,r,t[h+7],22,-45705983),r=o(r,n,i,c,t[h+8],7,1770035416),c=o(c,r,n,i,t[h+9],12,-1958414417),i=o(i,c,r,n,t[h+10],17,-42063),n=o(n,i,c,r,t[h+11],22,-1990404162),r=o(r,n,i,c,t[h+12],7,1804603682),c=o(c,r,n,i,t[h+13],12,-40341101),i=o(i,c,r,n,t[h+14],17,-1502002290),n=o(n,i,c,r,t[h+15],22,1236535329),r=s(r,n,i,c,t[h+1],5,-165796510),c=s(c,r,n,i,t[h+6],9,-1069501632),i=s(i,c,r,n,t[h+11],14,643717713),n=s(n,i,c,r,t[h+0],20,-373897302),r=s(r,n,i,c,t[h+5],5,-701558691),c=s(c,r,n,i,t[h+10],9,38016083),i=s(i,c,r,n,t[h+15],14,-660478335),n=s(n,i,c,r,t[h+4],20,-405537848),r=s(r,n,i,c,t[h+9],5,568446438),c=s(c,r,n,i,t[h+14],9,-1019803690),i=s(i,c,r,n,t[h+3],14,-187363961),n=s(n,i,c,r,t[h+8],20,1163531501),r=s(r,n,i,c,t[h+13],5,-1444681467),c=s(c,r,n,i,t[h+2],9,-51403784),i=s(i,c,r,n,t[h+7],14,1735328473),n=s(n,i,c,r,t[h+12],20,-1926607734),r=a(r,n,i,c,t[h+5],4,-378558),c=a(c,r,n,i,t[h+8],11,-2022574463),i=a(i,c,r,n,t[h+11],16,1839030562),n=a(n,i,c,r,t[h+14],23,-35309556),r=a(r,n,i,c,t[h+1],4,-1530992060),c=a(c,r,n,i,t[h+4],11,1272893353),i=a(i,c,r,n,t[h+7],16,-155497632),n=a(n,i,c,r,t[h+10],23,-1094730640),r=a(r,n,i,c,t[h+13],4,681279174),c=a(c,r,n,i,t[h+0],11,-358537222),i=a(i,c,r,n,t[h+3],16,-722521979),n=a(n,i,c,r,t[h+6],23,76029189),r=a(r,n,i,c,t[h+9],4,-640364487),c=a(c,r,n,i,t[h+12],11,-421815835),i=a(i,c,r,n,t[h+15],16,530742520),n=a(n,i,c,r,t[h+2],23,-995338651),r=u(r,n,i,c,t[h+0],6,-198630844),c=u(c,r,n,i,t[h+7],10,1126891415),i=u(i,c,r,n,t[h+14],15,-1416354905),n=u(n,i,c,r,t[h+5],21,-57434055),r=u(r,n,i,c,t[h+12],6,1700485571),c=u(c,r,n,i,t[h+3],10,-1894986606),i=u(i,c,r,n,t[h+10],15,-1051523),n=u(n,i,c,r,t[h+1],21,-2054922799),r=u(r,n,i,c,t[h+8],6,1873313359),c=u(c,r,n,i,t[h+15],10,-30611744),i=u(i,c,r,n,t[h+6],15,-1560198380),n=u(n,i,c,r,t[h+13],21,1309151649),r=u(r,n,i,c,t[h+4],6,-145523070),c=u(c,r,n,i,t[h+11],10,-1120210379),i=u(i,c,r,n,t[h+2],15,718787259),n=u(n,i,c,r,t[h+9],21,-343485551),r=f(r,l),n=f(n,p),i=f(i,d),c=f(c,y)}return[r,n,i,c]}function i(t,e,r,n,i,o){return f(c(f(f(e,t),f(n,o)),i),r)}function o(t,e,r,n,o,s,a){return i(e&r|~e&n,t,e,o,s,a)}function s(t,e,r,n,o,s,a){return i(e&n|r&~n,t,e,o,s,a)}function a(t,e,r,n,o,s,a){return i(e^r^n,t,e,o,s,a)}function u(t,e,r,n,o,s,a){return i(r^(e|~n),t,e,o,s,a)}function f(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function c(t,e){return t<<e|t>>>32-e}var h=r(112);t.exports=function(t){return h(t,n)}},function(t,e,r){(function(e){"use strict";function r(t){if(t.length%n!==0){var r=t.length+(n-t.length%n);t=e.concat([t,i],r)}for(var o=new Array(t.length>>>2),s=0,a=0;s<t.length;s+=n,a++)o[a]=t.readInt32LE(s);return o}var n=4,i=new e(n);i.fill(0);var o=8,s=16;t.exports=function(t,n){var i=n(r(t),t.length*o);t=new e(s);for(var a=0;a<i.length;a++)t.writeInt32LE(i[a],a<<2,!0);return t}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(){h.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function i(t,e){return t<<e|t>>>32-e}function o(t,e,r,n,o,s,a,u){return i(t+(e^r^n)+s+a|0,u)+o|0}function s(t,e,r,n,o,s,a,u){return i(t+(e&r|~e&n)+s+a|0,u)+o|0}function a(t,e,r,n,o,s,a,u){return i(t+((e|~r)^n)+s+a|0,u)+o|0}function u(t,e,r,n,o,s,a,u){return i(t+(e&n|r&~n)+s+a|0,u)+o|0}function f(t,e,r,n,o,s,a,u){return i(t+(e^(r|~n))+s+a|0,u)+o|0}var c=r(110),h=r(114);c(n,h),n.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,c=this._c,h=this._d,l=this._e;r=o(r,n,c,h,l,t[0],0,11),c=i(c,10),l=o(l,r,n,c,h,t[1],0,14),n=i(n,10),h=o(h,l,r,n,c,t[2],0,15),r=i(r,10),c=o(c,h,l,r,n,t[3],0,12),l=i(l,10),n=o(n,c,h,l,r,t[4],0,5),h=i(h,10),r=o(r,n,c,h,l,t[5],0,8),c=i(c,10),l=o(l,r,n,c,h,t[6],0,7),n=i(n,10),h=o(h,l,r,n,c,t[7],0,9),r=i(r,10),c=o(c,h,l,r,n,t[8],0,11),l=i(l,10),n=o(n,c,h,l,r,t[9],0,13),h=i(h,10),r=o(r,n,c,h,l,t[10],0,14),c=i(c,10),l=o(l,r,n,c,h,t[11],0,15),n=i(n,10),h=o(h,l,r,n,c,t[12],0,6),r=i(r,10),c=o(c,h,l,r,n,t[13],0,7),l=i(l,10),n=o(n,c,h,l,r,t[14],0,9),h=i(h,10),r=o(r,n,c,h,l,t[15],0,8),c=i(c,10),l=s(l,r,n,c,h,t[7],1518500249,7),n=i(n,10),h=s(h,l,r,n,c,t[4],1518500249,6),r=i(r,10),c=s(c,h,l,r,n,t[13],1518500249,8),l=i(l,10),n=s(n,c,h,l,r,t[1],1518500249,13),h=i(h,10),r=s(r,n,c,h,l,t[10],1518500249,11),c=i(c,10),l=s(l,r,n,c,h,t[6],1518500249,9),n=i(n,10),h=s(h,l,r,n,c,t[15],1518500249,7),r=i(r,10),c=s(c,h,l,r,n,t[3],1518500249,15),l=i(l,10),n=s(n,c,h,l,r,t[12],1518500249,7),h=i(h,10),r=s(r,n,c,h,l,t[0],1518500249,12),c=i(c,10),l=s(l,r,n,c,h,t[9],1518500249,15),n=i(n,10),h=s(h,l,r,n,c,t[5],1518500249,9),r=i(r,10),c=s(c,h,l,r,n,t[2],1518500249,11),l=i(l,10),n=s(n,c,h,l,r,t[14],1518500249,7),h=i(h,10),r=s(r,n,c,h,l,t[11],1518500249,13),c=i(c,10),l=s(l,r,n,c,h,t[8],1518500249,12),n=i(n,10),h=a(h,l,r,n,c,t[3],1859775393,11),r=i(r,10),c=a(c,h,l,r,n,t[10],1859775393,13),l=i(l,10),n=a(n,c,h,l,r,t[14],1859775393,6),h=i(h,10),r=a(r,n,c,h,l,t[4],1859775393,7),c=i(c,10),l=a(l,r,n,c,h,t[9],1859775393,14),n=i(n,10),h=a(h,l,r,n,c,t[15],1859775393,9),r=i(r,10),c=a(c,h,l,r,n,t[8],1859775393,13),l=i(l,10),n=a(n,c,h,l,r,t[1],1859775393,15),h=i(h,10),r=a(r,n,c,h,l,t[2],1859775393,14),c=i(c,10),l=a(l,r,n,c,h,t[7],1859775393,8),n=i(n,10),h=a(h,l,r,n,c,t[0],1859775393,13),r=i(r,10),c=a(c,h,l,r,n,t[6],1859775393,6),l=i(l,10),n=a(n,c,h,l,r,t[13],1859775393,5),h=i(h,10),r=a(r,n,c,h,l,t[11],1859775393,12),c=i(c,10),l=a(l,r,n,c,h,t[5],1859775393,7),n=i(n,10),h=a(h,l,r,n,c,t[12],1859775393,5),r=i(r,10),c=u(c,h,l,r,n,t[1],2400959708,11),l=i(l,10),n=u(n,c,h,l,r,t[9],2400959708,12),h=i(h,10),r=u(r,n,c,h,l,t[11],2400959708,14),c=i(c,10),l=u(l,r,n,c,h,t[10],2400959708,15),n=i(n,10),h=u(h,l,r,n,c,t[0],2400959708,14),r=i(r,10),c=u(c,h,l,r,n,t[8],2400959708,15),l=i(l,10),n=u(n,c,h,l,r,t[12],2400959708,9),h=i(h,10),r=u(r,n,c,h,l,t[4],2400959708,8),c=i(c,10),l=u(l,r,n,c,h,t[13],2400959708,9),n=i(n,10),h=u(h,l,r,n,c,t[3],2400959708,14),r=i(r,10),c=u(c,h,l,r,n,t[7],2400959708,5),l=i(l,10),n=u(n,c,h,l,r,t[15],2400959708,6),h=i(h,10),r=u(r,n,c,h,l,t[14],2400959708,8),c=i(c,10),l=u(l,r,n,c,h,t[5],2400959708,6),n=i(n,10),h=u(h,l,r,n,c,t[6],2400959708,5),r=i(r,10),c=u(c,h,l,r,n,t[2],2400959708,12),l=i(l,10),n=f(n,c,h,l,r,t[4],2840853838,9),h=i(h,10),r=f(r,n,c,h,l,t[0],2840853838,15),c=i(c,10),l=f(l,r,n,c,h,t[5],2840853838,5),n=i(n,10),h=f(h,l,r,n,c,t[9],2840853838,11),r=i(r,10),c=f(c,h,l,r,n,t[7],2840853838,6),l=i(l,10),n=f(n,c,h,l,r,t[12],2840853838,8),h=i(h,10),r=f(r,n,c,h,l,t[2],2840853838,13),c=i(c,10),l=f(l,r,n,c,h,t[10],2840853838,12),n=i(n,10),h=f(h,l,r,n,c,t[14],2840853838,5),r=i(r,10),c=f(c,h,l,r,n,t[1],2840853838,12),l=i(l,10),n=f(n,c,h,l,r,t[3],2840853838,13),h=i(h,10),r=f(r,n,c,h,l,t[8],2840853838,14),c=i(c,10),l=f(l,r,n,c,h,t[11],2840853838,11),n=i(n,10),h=f(h,l,r,n,c,t[6],2840853838,8),r=i(r,10),c=f(c,h,l,r,n,t[15],2840853838,5),l=i(l,10),n=f(n,c,h,l,r,t[13],2840853838,6),h=i(h,10);var p=this._a,d=this._b,y=this._c,_=this._d,v=this._e;p=f(p,d,y,_,v,t[5],1352829926,8),y=i(y,10),v=f(v,p,d,y,_,t[14],1352829926,9),d=i(d,10),_=f(_,v,p,d,y,t[7],1352829926,9),p=i(p,10),y=f(y,_,v,p,d,t[0],1352829926,11),v=i(v,10),d=f(d,y,_,v,p,t[9],1352829926,13),_=i(_,10),p=f(p,d,y,_,v,t[2],1352829926,15),y=i(y,10),v=f(v,p,d,y,_,t[11],1352829926,15),d=i(d,10),_=f(_,v,p,d,y,t[4],1352829926,5),p=i(p,10),y=f(y,_,v,p,d,t[13],1352829926,7),v=i(v,10),d=f(d,y,_,v,p,t[6],1352829926,7),_=i(_,10),p=f(p,d,y,_,v,t[15],1352829926,8),y=i(y,10),v=f(v,p,d,y,_,t[8],1352829926,11),d=i(d,10),_=f(_,v,p,d,y,t[1],1352829926,14),p=i(p,10),y=f(y,_,v,p,d,t[10],1352829926,14),v=i(v,10),d=f(d,y,_,v,p,t[3],1352829926,12),_=i(_,10),p=f(p,d,y,_,v,t[12],1352829926,6),y=i(y,10),v=u(v,p,d,y,_,t[6],1548603684,9),d=i(d,10),_=u(_,v,p,d,y,t[11],1548603684,13),p=i(p,10),y=u(y,_,v,p,d,t[3],1548603684,15),v=i(v,10),d=u(d,y,_,v,p,t[7],1548603684,7),_=i(_,10),p=u(p,d,y,_,v,t[0],1548603684,12),y=i(y,10),v=u(v,p,d,y,_,t[13],1548603684,8),d=i(d,10),_=u(_,v,p,d,y,t[5],1548603684,9),p=i(p,10),y=u(y,_,v,p,d,t[10],1548603684,11),v=i(v,10),d=u(d,y,_,v,p,t[14],1548603684,7),_=i(_,10),p=u(p,d,y,_,v,t[15],1548603684,7),y=i(y,10),v=u(v,p,d,y,_,t[8],1548603684,12),d=i(d,10),_=u(_,v,p,d,y,t[12],1548603684,7),p=i(p,10),y=u(y,_,v,p,d,t[4],1548603684,6),v=i(v,10),d=u(d,y,_,v,p,t[9],1548603684,15),_=i(_,10),p=u(p,d,y,_,v,t[1],1548603684,13),y=i(y,10),v=u(v,p,d,y,_,t[2],1548603684,11),d=i(d,10),_=a(_,v,p,d,y,t[15],1836072691,9),p=i(p,10),y=a(y,_,v,p,d,t[5],1836072691,7),v=i(v,10),d=a(d,y,_,v,p,t[1],1836072691,15),_=i(_,10),p=a(p,d,y,_,v,t[3],1836072691,11),y=i(y,10),v=a(v,p,d,y,_,t[7],1836072691,8),d=i(d,10),_=a(_,v,p,d,y,t[14],1836072691,6),p=i(p,10),y=a(y,_,v,p,d,t[6],1836072691,6),v=i(v,10),d=a(d,y,_,v,p,t[9],1836072691,14),_=i(_,10),p=a(p,d,y,_,v,t[11],1836072691,12),y=i(y,10),v=a(v,p,d,y,_,t[8],1836072691,13),d=i(d,10),_=a(_,v,p,d,y,t[12],1836072691,5),p=i(p,10),y=a(y,_,v,p,d,t[2],1836072691,14),v=i(v,10),d=a(d,y,_,v,p,t[10],1836072691,13),_=i(_,10),p=a(p,d,y,_,v,t[0],1836072691,13),y=i(y,10),v=a(v,p,d,y,_,t[4],1836072691,7),d=i(d,10),_=a(_,v,p,d,y,t[13],1836072691,5),p=i(p,10),y=s(y,_,v,p,d,t[8],2053994217,15),v=i(v,10),d=s(d,y,_,v,p,t[6],2053994217,5),_=i(_,10),p=s(p,d,y,_,v,t[4],2053994217,8),y=i(y,10),v=s(v,p,d,y,_,t[1],2053994217,11),d=i(d,10),_=s(_,v,p,d,y,t[3],2053994217,14),p=i(p,10),y=s(y,_,v,p,d,t[11],2053994217,14),v=i(v,10),d=s(d,y,_,v,p,t[15],2053994217,6),_=i(_,10),p=s(p,d,y,_,v,t[0],2053994217,14),y=i(y,10),v=s(v,p,d,y,_,t[5],2053994217,6),d=i(d,10),_=s(_,v,p,d,y,t[12],2053994217,9),p=i(p,10),y=s(y,_,v,p,d,t[2],2053994217,12),v=i(v,10),d=s(d,y,_,v,p,t[13],2053994217,9),_=i(_,10),p=s(p,d,y,_,v,t[9],2053994217,12),y=i(y,10),v=s(v,p,d,y,_,t[7],2053994217,5),d=i(d,10),_=s(_,v,p,d,y,t[10],2053994217,15),p=i(p,10),y=s(y,_,v,p,d,t[14],2053994217,8),v=i(v,10),d=o(d,y,_,v,p,t[12],0,8),_=i(_,10),p=o(p,d,y,_,v,t[15],0,5),y=i(y,10),v=o(v,p,d,y,_,t[10],0,12),d=i(d,10),_=o(_,v,p,d,y,t[4],0,9),p=i(p,10),y=o(y,_,v,p,d,t[1],0,12),v=i(v,10),d=o(d,y,_,v,p,t[5],0,5),_=i(_,10),p=o(p,d,y,_,v,t[8],0,14),y=i(y,10),v=o(v,p,d,y,_,t[7],0,6),d=i(d,10),_=o(_,v,p,d,y,t[6],0,8),p=i(p,10),y=o(y,_,v,p,d,t[2],0,13),v=i(v,10),d=o(d,y,_,v,p,t[13],0,6),_=i(_,10),p=o(p,d,y,_,v,t[14],0,5),y=i(y,10),v=o(v,p,d,y,_,t[0],0,15),d=i(d,10),_=o(_,v,p,d,y,t[3],0,13),p=i(p,10),y=o(y,_,v,p,d,t[9],0,11),v=i(v,10),d=o(d,y,_,v,p,t[11],0,11),_=i(_,10);var g=this._b+c+_|0;this._b=this._c+h+v|0,this._c=this._d+l+p|0,this._d=this._e+r+d|0,this._e=this._a+n+y|0,this._a=g},n.prototype._digest=function(){this._block[this._blockOffset++]=128,
7
- this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=n}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t){i.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var i=r(115).Transform,o=r(110);o(n,i),n.prototype._transform=function(t,r,n){var i=null;try{"buffer"!==r&&(t=new e(t,r)),this.update(t)}catch(t){i=t}n(i)},n.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},n.prototype.update=function(t,r){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");e.isBuffer(t)||(t=new e(t,r||"binary"));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,a=this._length[s]/4294967296|0,a>0&&(this._length[s]-=4294967296*a);return this},n.prototype._update=function(t){throw new Error("_update is not implemented")},n.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n}).call(e,r(100).Buffer)},function(t,e,r){"use strict";function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(110);o(n,i),n.Readable=r(116),n.Writable=r(132),n.Duplex=r(133),n.Transform=r(134),n.PassThrough=r(135),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&f.pause&&f.pause()}function n(){f.readable&&f.resume&&f.resume()}function o(){c||(c=!0,t.end())}function s(){c||(c=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){f.removeListener("data",r),t.removeListener("drain",n),f.removeListener("end",o),f.removeListener("close",s),f.removeListener("error",a),t.removeListener("error",a),f.removeListener("end",u),f.removeListener("close",u),t.removeListener("close",u)}var f=this;f.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(f.on("end",o),f.on("close",s));var c=!1;return f.on("error",a),t.on("error",a),f.on("end",u),f.on("close",u),t.on("close",u),t.emit("pipe",f),t}},function(t,e,r){"use strict";e=t.exports=r(117),e.Stream=e,e.Readable=e,e.Writable=r(127),e.Duplex=r(126),e.Transform=r(130),e.PassThrough=r(131)},function(t,e,r){(function(e,n){"use strict";function i(t){return P.from(t)}function o(t){return P.isBuffer(t)||t instanceof M}function s(t,e,r){return"function"==typeof t.prependListener?t.prependListener(e,r):void(t._events&&t._events[e]?L(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r))}function a(t,e){R=R||r(126),t=t||{},this.objectMode=!!t.objectMode,e instanceof R&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new V,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(z||(z=r(129).StringDecoder),this.decoder=new z(t.encoding),this.encoding=t.encoding)}function u(t){return R=R||r(126),this instanceof u?(this._readableState=new a(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),void U.call(this)):new u(t)}function f(t,e,r,n,o){var s=t._readableState;if(null===e)s.reading=!1,y(t,s);else{var a;o||(a=h(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===P.prototype||(e=i(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):c(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?c(t,s,e,!1):g(t,s)):c(t,s,e,!1))):n||(s.reading=!1)}return l(s)}function c(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&_(t)),g(t,e)}function h(t,e){var r;return o(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function p(t){return t>=X?t=X:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function d(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=p(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function y(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,_(t)}}function _(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(q("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?j(v,t):v(t))}function v(t){q("emit readable"),t.emit("readable"),B(t)}function g(t,e){e.readingMore||(e.readingMore=!0,j(m,t,e))}function m(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(q("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function b(t){return function(){var e=t._readableState;q("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&F(t,"data")&&(e.flowing=!0,B(t))}}function w(t){q("readable nexttick read 0"),t.read(0)}function E(t,e){e.resumeScheduled||(e.resumeScheduled=!0,j(S,t,e))}function S(t,e){e.reading||(q("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(q("flow",e.flowing);e.flowing&&null!==t.read(););}function k(t,e){if(0===e.length)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=T(t,e.buffer,e.decoder),r}function T(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?x(t,e):A(t,e),n}function x(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(i+=s===o.length?o:o.slice(0,t),t-=s,0===t){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}function A(t,e){var r=P.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),t-=s,0===t){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,j(C,e,t))}function C(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function O(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}var j=r(118);t.exports=u;var R,L=r(103);u.ReadableState=a;var F=(r(2).EventEmitter,function(t,e){return t.listeners(e).length}),U=r(119),P=r(120).Buffer,M=e.Uint8Array||function(){},D=r(122);D.inherits=r(110);var N=r(123),q=void 0;q=N&&N.debuglog?N.debuglog("stream"):function(){};var z,V=r(124),H=r(125);D.inherits(u,U);var K=["error","close","destroy","pause","resume"];Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),u.prototype.destroy=H.destroy,u.prototype._undestroy=H.undestroy,u.prototype._destroy=function(t,e){this.push(null),e(t)},u.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=P.from(t,e),e=""),r=!0),f(this,t,e,!1,r)},u.prototype.unshift=function(t){return f(this,t,null,!0,!1)},u.prototype.isPaused=function(){return this._readableState.flowing===!1},u.prototype.setEncoding=function(t){return z||(z=r(129).StringDecoder),this._readableState.decoder=new z(t),this._readableState.encoding=t,this};var X=8388608;u.prototype.read=function(t){q("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return q("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):_(this),null;if(t=d(t,e),0===t&&e.ended)return 0===e.length&&I(this),null;var n=e.needReadable;q("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,q("length less than watermark",n)),e.ended||e.reading?(n=!1,q("reading or ended",n)):n&&(q("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=d(r,e)));var i;return i=t>0?k(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==i&&this.emit("data",i),i},u.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(t,e){function r(t,e){q("onunpipe"),t===l&&e&&e.hasUnpiped===!1&&(e.hasUnpiped=!0,o())}function i(){q("onend"),t.end()}function o(){q("cleanup"),t.removeListener("close",f),t.removeListener("finish",c),t.removeListener("drain",_),t.removeListener("error",u),t.removeListener("unpipe",r),l.removeListener("end",i),l.removeListener("end",h),l.removeListener("data",a),v=!0,!p.awaitDrain||t._writableState&&!t._writableState.needDrain||_()}function a(e){q("ondata"),g=!1;var r=t.write(e);!1!==r||g||((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&O(p.pipes,t)!==-1)&&!v&&(q("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,g=!0),l.pause())}function u(e){q("onerror",e),h(),t.removeListener("error",u),0===F(t,"error")&&t.emit("error",e)}function f(){t.removeListener("finish",c),h()}function c(){q("onfinish"),t.removeListener("close",f),h()}function h(){q("unpipe"),l.unpipe(t)}var l=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,q("pipe count=%d opts=%j",p.pipesCount,e);var d=(!e||e.end!==!1)&&t!==n.stdout&&t!==n.stderr,y=d?i:h;p.endEmitted?j(y):l.once("end",y),t.on("unpipe",r);var _=b(l);t.on("drain",_);var v=!1,g=!1;return l.on("data",a),s(t,"error",u),t.once("close",f),t.once("finish",c),t.emit("pipe",l),p.flowing||(q("pipe resume"),l.resume()),t},u.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=O(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},u.prototype.on=function(t,e){var r=U.prototype.on.call(this,t,e);if("data"===t)this._readableState.flowing!==!1&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&_(this):j(w,this))}return r},u.prototype.addListener=u.prototype.on,u.prototype.resume=function(){var t=this._readableState;return t.flowing||(q("resume"),t.flowing=!0,E(this,t)),this},u.prototype.pause=function(){return q("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(q("pause"),this._readableState.flowing=!1,this.emit("pause")),this},u.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(q("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(q("wrapped data"),e.decoder&&(i=e.decoder.write(i)),(!e.objectMode||null!==i&&void 0!==i)&&(e.objectMode||i&&i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<K.length;o++)t.on(K[o],n.emit.bind(n,K[o]));return n._read=function(e){q("wrapped _read",e),r&&(r=!1,t.resume())},n},u._fromList=k}).call(e,function(){return this}(),r(5))},function(t,e,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(e,r(5))},function(t,e,r){"use strict";t.exports=r(2).EventEmitter},function(t,e,r){"use strict";function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e,r){return s(t,e,r)}var o=r(121),s=o.Buffer;s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=o:(n(o,e),e.Buffer=i),n(s,i),i.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return s(t,e,r)},i.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=s(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return s(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o.SlowBuffer(t)}},function(t,e,r){(function(t){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}function i(e){if(e>$)throw new RangeError("Invalid typed array length");var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return u(t)}return o(t,e,r)}function o(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return K(t)?h(t,e,r):"string"==typeof t?f(t,e):l(t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,e,r){return s(t),t<=0?i(t):void 0!==e?"string"==typeof r?i(t).fill(e,r):i(t).fill(e):i(t)}function u(t){return s(t),i(t<0?0:0|p(t))}function f(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,r),o=i(n),s=o.write(e,r);return s!==n&&(o=o.slice(0,s)),o}function c(t){for(var e=t.length<0?0:0|p(t.length),r=i(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;return i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),i.__proto__=t.prototype,i}function l(e){if(t.isBuffer(e)){var r=0|p(e.length),n=i(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(e){if(X(e)||"length"in e)return"number"!=typeof e.length||Y(e.length)?i(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return 0|t}function d(e){return+e!=e&&(e=0),t.alloc(+e)}function y(e,r){if(t.isBuffer(e))return e.length;if(X(e)||K(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return N(e).length;r=(""+r).toLowerCase(),i=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Y(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:m(e,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):m(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var f;if(i){var c=-1;for(f=r;f<a;f++)if(o(t,f)===o(e,c===-1?0:f-c)){if(c===-1&&(c=f),f-c+1===u)return c*s}else c!==-1&&(f-=f-c),c=-1}else for(r+u>a&&(r=a-u),f=r;f>=0;f--){for(var h=!0,l=0;l<u;l++)if(o(t,f+l)!==o(e,l)){h=!1;break}if(h)return f}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(Y(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return H(N(e,t.length-r),t,r,n)}function E(t,e,r,n){return H(q(e),t,r,n)}function S(t,e,r,n){return E(t,e,r,n)}function B(t,e,r,n){return H(V(e),t,r,n)}function k(t,e,r,n){return H(z(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?G.fromByteArray(t):G.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,f,c,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],f=t[i+2],128===(192&u)&&128===(192&f)&&(h=(15&o)<<12|(63&u)<<6|63&f,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],f=t[i+2],c=t[i+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(h=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&c,h>65535&&h<1114112&&(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 A(n)}function A(t){var e=t.length;if(e<=Z)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Z));return r}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function O(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=D(t[o]);return i}function j(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return e=+e,r>>>=0,i||F(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return e=+e,r>>>=0,i||F(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,r,n,52,8),r+8}function M(t){if(t=t.trim().replace(J,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function V(t){return G.toByteArray(M(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function X(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function Y(t){return t!==t}var G=r(101),W=r(102);e.Buffer=t,e.SlowBuffer=d,e.INSPECT_MAX_BYTES=50;var $=2147483647;e.kMaxLength=$,t.TYPED_ARRAY_SUPPORT=n(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(t,e,r){return o(t,e,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(t,e,r){return a(t,e,r)},t.allocUnsafe=function(t){return u(t)},t.allocUnsafeSlow=function(t){return u(t)},t.isBuffer=function(t){return null!=t&&t._isBuffer===!0},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=y,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},t.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):_.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),f=this.slice(i,o),c=e.slice(r,n),h=0;h<u;++h)if(f[h]!==c[h]){s=f[h],a=c[h];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return B(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return i.__proto__=t.prototype,i},t.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),W.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),W.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),W.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),W.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;L(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;L(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},t.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},t.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},t.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},t.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),
8
- this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},t.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:new t(e,i),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var J=/[^+\/0-9A-Za-z-_]/g}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===_(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"==typeof t}function a(t){return"string"==typeof t}function u(t){return"symbol"===("undefined"==typeof t?"undefined":v(t))}function f(t){return void 0===t}function c(t){return"[object RegExp]"===_(t)}function h(t){return"object"===("undefined"==typeof t?"undefined":v(t))&&null!==t}function l(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(t)||t instanceof Error}function d(t){return"function"==typeof t}function y(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===("undefined"==typeof t?"undefined":v(t))||"undefined"==typeof t}function _(t){return Object.prototype.toString.call(t)}var v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=s,e.isString=a,e.isSymbol=u,e.isUndefined=f,e.isRegExp=c,e.isObject=h,e.isDate=l,e.isError=p,e.isFunction=d,e.isPrimitive=y,e.isBuffer=t.isBuffer}).call(e,r(100).Buffer)},96,function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,r){t.copy(e,r)}var o=r(120).Buffer;t.exports=function(){function t(){n(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var e=o.allocUnsafe(t>>>0),r=this.head,n=0;r;)i(r.data,e,n),n+=r.data.length,r=r.next;return e},t}()},function(t,e,r){"use strict";function n(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?void(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||s(o,this,t)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),void this._destroy(t||null,function(t){!e&&t?(s(o,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}))}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(t,e){t.emit("error",e)}var s=r(118);t.exports={destroy:n,undestroy:i}},function(t,e,r){"use strict";function n(t){return this instanceof n?(f.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(t){t.end()}var s=r(118),a=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=n;var u=r(122);u.inherits=r(110);var f=r(117),c=r(127);u.inherits(n,f);for(var h=a(c.prototype),l=0;l<h.length;l++){var p=h[l];n.prototype[p]||(n.prototype[p]=c.prototype[p])}Object.defineProperty(n.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),n.prototype._destroy=function(t,e){this.push(null),this.end(),s(e,t)}},function(t,e,r){(function(e,n,i){"use strict";function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){x(e,t)}}function s(t){return L.from(t)}function a(t){return L.isBuffer(t)||t instanceof F}function u(){}function f(t,e){I=I||r(126),t=t||{},this.objectMode=!!t.objectMode,e instanceof I&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){g(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function c(t){return I=I||r(126),P.call(c,this)||this instanceof I?(this._writableState=new f(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),void R.call(this)):new c(t)}function h(t,e){var r=new Error("write after end");t.emit("error",r),A(e,r)}function l(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),A(n,o),i=!1),i}function p(t,e,r){return t.objectMode||t.decodeStrings===!1||"string"!=typeof e||(e=L.from(e,r)),e}function d(t,e,r,n,i,o){if(!r){var s=p(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else y(t,e,!1,a,n,i,o);return u}function y(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,r,n,i){--e.pendingcb,r?(A(i,n),A(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),k(t,e))}function v(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function g(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(v(r),e)_(t,r,n,e,i);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?C(m,t,r,o,i):m(t,r,o,i)}}function m(t,e,r,n){r||b(t,e),e.pendingcb--,n(),k(t,e)}function b(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,y(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e)}else{for(;r;){var f=r.chunk,c=r.encoding,h=r.callback,l=e.objectMode?1:f.length;if(y(t,e,!1,l,f,c,h),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)})}function B(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,A(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function k(t,e){var r=E(e);return r&&(B(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}function T(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?A(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function x(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}var A=r(118);t.exports=c;var I,C=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:A;c.WritableState=f;var O=r(122);O.inherits=r(110);var j={deprecate:r(128)},R=r(119),L=r(120).Buffer,F=i.Uint8Array||function(){},U=r(125);O.inherits(c,R),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:j.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(t){return!!P.call(this,t)||t&&t._writableState instanceof f}})):P=function(t){return t instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=a(t)&&!n.objectMode;return o&&!L.isBuffer(t)&&(t=s(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=u),n.ended?h(this,r):(o||l(this,n,t,r))&&(n.pendingcb++,i=d(this,n,o,t,e,r)),i},c.prototype.cork=function(){var t=this._writableState;t.corked++},c.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},c.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},c.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||T(this,n,r)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),c.prototype.destroy=U.destroy,c.prototype._undestroy=U.undestroy,c.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(5),r(10).setImmediate,function(){return this}())},function(t,e){(function(e){"use strict";function r(t,e){function r(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}if(n("noDeprecation"))return t;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function i(t){var e=n(t);if("string"!=typeof e&&(g.isEncoding===m||!m(t)))throw new Error("Unknown encoding: "+t);return e||t}function o(t){this.encoding=i(t);var e;switch(this.encoding){case"utf16le":this.text=l,this.end=p,e=4;break;case"utf8":this.fillLast=f,e=4;break;case"base64":this.text=d,this.end=y,e=3;break;default:return this.write=_,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(e)}function s(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:-1}function a(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r?0:(i=s(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r?0:(i=s(e[n]),i>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0))}function u(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}function f(t){var e=this.lastTotal-this.lastNeed,r=u(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){var r=a(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e}function l(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function p(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function d(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function y(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function _(t){return t.toString(this.encoding)}function v(t){return t&&t.length?this.write(t):""}var g=r(120).Buffer,m=g.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=h,o.prototype.text=c,o.prototype.fillLast=function(t){return this.lastNeed<=t.length?(t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),void(this.lastNeed-=t.length))}},function(t,e,r){"use strict";function n(t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&t.push(r),i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t,r){s(e,t,r)}):s(e)})}function s(t,e,r){if(e)return t.emit("error",e);null!==r&&void 0!==r&&t.push(r);var n=t._writableState,i=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}t.exports=o;var a=r(126),u=r(122);u.inherits=r(110),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;a.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(130),o=r(122);o.inherits=r(110),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";t.exports=r(127)},function(t,e,r){"use strict";t.exports=r(126)},function(t,e,r){"use strict";t.exports=r(116).Transform},function(t,e,r){"use strict";t.exports=r(116).PassThrough},function(t,e,r){"use strict";var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(137),n.sha1=r(139),n.sha224=r(140),n.sha256=r(141),n.sha384=r(142),n.sha512=r(143)},function(t,e,r){"use strict";function n(){this.init(),this._w=h,u.call(this,64,56)}function i(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var a=r(110),u=r(138),f=r(120).Buffer,c=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);a(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,a=0|this._c,u=0|this._d,f=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=e[h-3]^e[h-8]^e[h-14]^e[h-16];for(var l=0;l<80;++l){var p=~~(l/20),d=i(r)+s(p,n,a,u)+f+e[l]+c[p]|0;f=u,u=a,a=o(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var t=f.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=n},function(t,e,r){"use strict";function n(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}var i=r(120).Buffer;n.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=i.from(t,e));for(var r=this._block,n=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%n,f=Math.min(o-a,n-u),c=0;c<f;c++)r[u+c]=t[a+c];s+=f,a+=f,s%n===0&&this._update(r)}return this._len+=o,this},n.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=4294967295&r,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e,r){"use strict";function n(){this.init(),this._w=l,f.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var u=r(110),f=r(138),c=r(120).Buffer,h=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);u(n,f),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,u=0|this._c,f=0|this._d,c=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=i(e[l-3]^e[l-8]^e[l-14]^e[l-16]);for(var p=0;p<80;++p){var d=~~(p/20),y=o(r)+a(d,n,u,f)+c+e[p]+h[d]|0;c=f,f=u,u=s(n),n=r,r=y}this._a=r+this._a|0,this._b=n+this._b|0,this._c=u+this._c|0,this._d=f+this._d|0,this._e=c+this._e|0},n.prototype._hash=function(){var t=c.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=n},function(t,e,r){"use strict";function n(){this.init(),this._w=u,s.call(this,64,56)}var i=r(110),o=r(141),s=r(138),a=r(120).Buffer,u=new Array(64);i(n,o),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=n},function(t,e,r){"use strict";function n(){this.init(),this._w=d,h.call(this,64,56)}function i(t,e,r){return r^t&(e^r)}function o(t,e,r){return t&e|r&(t|e)}function s(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function u(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function f(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var c=r(110),h=r(138),l=r(120).Buffer,p=[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],d=new Array(64);c(n,h),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,c=0|this._c,h=0|this._d,l=0|this._e,d=0|this._f,y=0|this._g,_=0|this._h,v=0;v<16;++v)e[v]=t.readInt32BE(4*v);for(;v<64;++v)e[v]=f(e[v-2])+e[v-7]+u(e[v-15])+e[v-16]|0;for(var g=0;g<64;++g){var m=_+a(l)+i(l,d,y)+p[g]+e[g]|0,b=s(r)+o(r,n,c)|0;_=y,y=d,d=l,l=h+m|0,h=c,c=n,n=r,r=m+b|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=c+this._c|0,this._d=h+this._d|0,this._e=l+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=_+this._h|0},n.prototype._hash=function(){var t=l.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=n},function(t,e,r){"use strict";function n(){this.init(),this._w=u,s.call(this,128,112)}var i=r(110),o=r(143),s=r(138),a=r(120).Buffer,u=new Array(160);i(n,o),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}var e=a.allocUnsafe(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=n},function(t,e,r){"use strict";function n(){this.init(),this._w=v,d.call(this,128,112)}function i(t,e,r){return r^t&(e^r)}function o(t,e,r){return t&e|r&(t|e)}function s(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function c(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function h(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function l(t,e){return t>>>0<e>>>0?1:0}var p=r(110),d=r(138),y=r(120).Buffer,_=[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],v=new Array(160);p(n,d),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,p=0|this._ch,d=0|this._dh,y=0|this._eh,v=0|this._fh,g=0|this._gh,m=0|this._hh,b=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,B=0|this._el,k=0|this._fl,T=0|this._gl,x=0|this._hl,A=0;A<32;A+=2)e[A]=t.readInt32BE(4*A),e[A+1]=t.readInt32BE(4*A+4);for(;A<160;A+=2){var I=e[A-30],C=e[A-30+1],O=u(I,C),j=f(C,I);I=e[A-4],C=e[A-4+1];var R=c(I,C),L=h(C,I),F=e[A-14],U=e[A-14+1],P=e[A-32],M=e[A-32+1],D=j+U|0,N=O+F+l(D,j)|0;D=D+L|0,N=N+R+l(D,L)|0,D=D+M|0,N=N+P+l(D,M)|0,e[A]=N,e[A+1]=D}for(var q=0;q<160;q+=2){N=e[q],D=e[q+1];var z=o(r,n,p),V=o(b,w,E),H=s(r,b),K=s(b,r),X=a(y,B),Y=a(B,y),G=_[q],W=_[q+1],$=i(y,v,g),Z=i(B,k,T),J=x+Y|0,Q=m+X+l(J,x)|0;J=J+Z|0,Q=Q+$+l(J,Z)|0,J=J+W|0,Q=Q+G+l(J,W)|0,J=J+D|0,Q=Q+N+l(J,D)|0;var tt=K+V|0,et=H+z+l(tt,K)|0;m=g,x=T,g=v,T=k,v=y,k=B,B=S+J|0,y=d+Q+l(B,S)|0,d=p,S=E,p=n,E=w,n=r,w=b,b=J+tt|0,r=Q+et+l(b,J)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+B|0,this._fl=this._fl+k|0,this._gl=this._gl+T|0,this._hl=this._hl+x|0,this._ah=this._ah+r+l(this._al,b)|0,this._bh=this._bh+n+l(this._bl,w)|0,this._ch=this._ch+p+l(this._cl,E)|0,this._dh=this._dh+d+l(this._dl,S)|0,this._eh=this._eh+y+l(this._el,B)|0,this._fh=this._fh+v+l(this._fl,k)|0,this._gh=this._gh+g+l(this._gl,T)|0,this._hh=this._hh+m+l(this._hl,x)|0},n.prototype._hash=function(){function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}var e=y.allocUnsafe(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=n},function(t,e,r){"use strict";function n(t){o.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var i=r(120).Buffer,o=r(115).Transform,s=r(145).StringDecoder,a=r(110);a(n,o),n.prototype.update=function(t,e,r){"string"==typeof t&&(t=i.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},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(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},n.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},n.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),
9
- e},n.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new s(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=n},function(t,e,r){"use strict";function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(121).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},f=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),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};f.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},f.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},f.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){"use strict";function n(t,e){s.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;if(this._alg=t,this._key=e,e.length>r){var n="rmd160"===t?new f:c(t);e=n.update(e).digest()}else e.length<r&&(e=a.concat([e,h],r));for(var i=this._ipad=a.allocUnsafe(r),o=this._opad=a.allocUnsafe(r),u=0;u<r;u++)i[u]=54^e[u],o[u]=92^e[u];this._hash="rmd160"===t?new f:c(t),this._hash.update(i)}var i=r(110),o=r(147),s=r(144),a=r(120).Buffer,u=r(111),f=r(113),c=r(136),h=a.alloc(128);i(n,s),n.prototype._update=function(t){this._hash.update(t)},n.prototype._final=function(){var t=this._hash.digest(),e="rmd160"===this._alg?new f:c(this._alg);return e.update(this._opad).update(t).digest()},t.exports=function(t,e){return t=t.toLowerCase(),"rmd160"===t||"ripemd160"===t?new n("rmd160",e):"md5"===t?new o(u,e):new n(t,e)}},function(t,e,r){"use strict";function n(t,e){s.call(this,"digest"),"string"==typeof e&&(e=o.from(e)),this._alg=t,this._key=e,e.length>u?e=t(e):e.length<u&&(e=o.concat([e,a],u));for(var r=this._ipad=o.allocUnsafe(u),n=this._opad=o.allocUnsafe(u),i=0;i<u;i++)r[i]=54^e[i],n[i]=92^e[i];this._hash=[r]}var i=r(110),o=r(120).Buffer,s=r(144),a=o.alloc(128),u=64;i(n,s),n.prototype._update=function(t){this._hash.push(t)},n.prototype._final=function(){var t=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,t]))},t.exports=n},function(t,e,r){"use strict";var n=r(149),i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";t.exports=n(i)},function(t,e,r){"use strict";var n=r(120).Buffer;t.exports=function(t){function e(e){if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var i=0,o=e[n];i<r.length;++i)o+=r[i]<<8,r[i]=o%s,o=o/s|0;for(;o>0;)r.push(o%s),o=o/s|0}for(var a="",u=0;0===e[u]&&u<e.length-1;++u)a+=t[0];for(var f=r.length-1;f>=0;--f)a+=t[r[f]];return a}function r(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.allocUnsafe(0);for(var e=[0],r=0;r<t.length;r++){var i=o[t[r]];if(void 0===i)return;for(var u=0,f=i;u<e.length;++u)f+=e[u]*s,e[u]=255&f,f>>=8;for(;f>0;)e.push(255&f),f>>=8}for(var c=0;t[c]===a&&c<t.length-1;++c)e.push(0);return n.from(e.reverse())}function i(t){var e=r(t);if(e)return e;throw new Error("Non-base"+s+" character")}for(var o={},s=t.length,a=t.charAt(0),u=0;u<t.length;u++){var f=t.charAt(u);if(void 0!==o[f])throw new TypeError(f+" is ambiguous");o[f]=u}return{encode:e,decodeUnsafe:r,decode:i}}},function(t,e,r){(function(t){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f();return s(t,e,n,r)}function o(t,e,r,n,i){return s(t,e,r,n,i).message}function s(e,r,n,i,o){if(e=T(e),!e)throw new TypeError("private_key is required");if(r=x(r),!r)throw new TypeError("public_key is required");if(n=A(n),!n)throw new TypeError("nonce is required");if(!t.isBuffer(i)){if("string"!=typeof i)throw new TypeError("message should be buffer or string");i=new t(i,"binary")}if(o&&"number"!=typeof o)throw new TypeError("checksum should be a number");var s=e.get_shared_secret(r),f=new p.default(p.default.DEFAULT_CAPACITY,p.default.LITTLE_ENDIAN);f.writeUint64(n),f.append(s.toString("binary"),"binary"),f=new t(f.copy(0,f.offset).toBinary(),"binary");var c=S.default.sha512(f),h=c.slice(32,48),l=c.slice(0,32),d=S.default.sha256(c);d=d.slice(0,4);var y=p.default.fromBinary(d.toString("binary"),p.default.DEFAULT_CAPACITY,p.default.LITTLE_ENDIAN);if(d=y.readUint32(),o){if(d!==o)throw new Error("Invalid key");i=a(i,l,h)}else i=u(i,l,h);return{nonce:n,message:i,checksum:d}}function a(e,r,n){(0,v.default)(e,"Missing cipher text"),e=I(e);var i=y.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}function u(e,r,n){(0,v.default)(e,"Missing plain text"),e=I(e);var i=y.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}function f(){if(null===k){var t=h.default.randomUint8Array(2);k=parseInt(t[0]<<8|t[1],10)}var e=B.fromNumber(Date.now()),r=++k%65535;return e=e.shiftLeft(16).or(B.fromNumber(r)),e.toString()}Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=i,e.decrypt=o;var c=r(151),h=n(c),l=r(153),p=n(l),d=r(156),y=n(d),_=r(104),v=n(_),g=r(177),m=n(g),b=r(187),w=n(b),E=r(108),S=n(E),B=p.default.Long,k=null,T=function(t){return t?t.d?t:w.default.fromWif(t):t},x=function(t){return t?t.Q?t:m.default.fromString(t):t},A=function(t){return t?B.isLong(t)?t:B.fromString(t):t},I=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,r(100).Buffer)},function(t,e,r){var n,i;(function(o,s){"use strict";!function(a){function u(t,e){if(e=e||{type:"Array"},"undefined"!=typeof o&&"number"==typeof o.pid&&o.versions&&o.versions.node)return f(t,e);var r=window.crypto||window.msCrypto;if(!r)throw new Error("Your browser does not support window.crypto.");return c(t,e)}function f(t,e){var n=r(152),i=n.randomBytes(t);switch(e.type){case"Array":return[].slice.call(i);case"Buffer":return i;case"Uint8Array":for(var o=new Uint8Array(t),s=0;s<t;++s)o[s]=i.readUInt8(s);return o;default:throw new Error(e.type+" is unsupported.")}}function c(t,e){var r=new Uint8Array(t),n=window.crypto||window.msCrypto;switch(n.getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new s(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new s(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}n=[],i=function(){return u}.apply(e,n),!(void 0!==i&&(t.exports=i)),u.randomArray=function(t){return u(t,{type:"Array"})},u.randomUint8Array=function(t){return u(t,{type:"Uint8Array"})},u.randomBuffer=function(t){return u(t,{type:"Buffer"})}}(void 0)}).call(e,r(5),r(100).Buffer)},96,function(t,e,r){var n,i,o;(function(t){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(a,u){r(154).amd?(i=[r(155)],n=u,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"===s(t)&&t&&t.exports?t.exports=function(){var t;try{t=r(155)}catch(t){}return u(t)}():(a.dcodeIO=a.dcodeIO||{}).ByteBuffer=u(a.dcodeIO.Long)}(void 0,function(t){function e(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function r(){var t=[],e=[];return function(){return 0===arguments.length?e.join("")+f.apply(String,t):(t.length+arguments.length>1024&&(e.push(f.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function n(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)}function i(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*y}var o=function t(e,r,n){if("undefined"==typeof e&&(e=t.DEFAULT_CAPACITY),"undefined"==typeof r&&(r=t.DEFAULT_ENDIAN),"undefined"==typeof n&&(n=t.DEFAULT_NOASSERT),!n){if(e|=0,e<0)throw RangeError("Illegal capacity");r=!!r,n=!!n}this.buffer=0===e?u:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=r,this.noAssert=n};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=t||null;var a=o.prototype;a.__isByteBuffer__,Object.defineProperty(a,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var u=new ArrayBuffer(0),f=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(t,e,r){return new o(t,e,r)},o.concat=function(t,e,r,n){"boolean"!=typeof e&&"string"==typeof e||(n=r,r=e,e=void 0);for(var i,s=0,a=0,u=t.length;a<u;++a)o.isByteBuffer(t[a])||(t[a]=o.wrap(t[a],e)),i=t[a].limit-t[a].offset,i>0&&(s+=i);if(0===s)return new o(0,r,n);var f,c=new o(s,r,n);for(a=0;a<u;)f=t[a++],i=f.limit-f.offset,i<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=i);return c.limit=c.offset,c.offset=0,c},o.isByteBuffer=function(t){return(t&&t.__isByteBuffer__)===!0},o.type=function(){return ArrayBuffer},o.wrap=function(t,e,r,n){if("string"!=typeof e&&(n=r,r=e,e=void 0),"string"==typeof t)switch("undefined"==typeof e&&(e="utf8"),e){case"base64":return o.fromBase64(t,r);case"hex":return o.fromHex(t,r);case"binary":return o.fromBinary(t,r);case"utf8":return o.fromUTF8(t,r);case"debug":return o.fromDebug(t,r);default:throw Error("Unsupported encoding: "+e)}if(null===t||"object"!==("undefined"==typeof t?"undefined":s(t)))throw TypeError("Illegal buffer");var i;if(o.isByteBuffer(t))return i=a.clone.call(t),i.markedOffset=-1,i;if(t instanceof Uint8Array)i=new o(0,r,n),t.length>0&&(i.buffer=t.buffer,i.offset=t.byteOffset,i.limit=t.byteOffset+t.byteLength,i.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)i=new o(0,r,n),t.byteLength>0&&(i.buffer=t,i.offset=0,i.limit=t.byteLength,i.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");i=new o(t.length,r,n),i.limit=t.length;for(var u=0;u<t.length;++u)i.view[u]=t[u]}return i},a.writeBitSet=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,s=o>>3,a=0;for(e+=this.writeVarint32(o,e);s--;)n=1&!!t[a++]|(1&!!t[a++])<<1|(1&!!t[a++])<<2|(1&!!t[a++])<<3|(1&!!t[a++])<<4|(1&!!t[a++])<<5|(1&!!t[a++])<<6|(1&!!t[a++])<<7,this.writeByte(n,e++);if(a<o){var u=0;for(n=0;a<o;)n|=(1&!!t[a++])<<u++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},a.readBitSet=function(t){var e="undefined"==typeof t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>3,s=0,a=[];for(t+=n.length;o--;)r=this.readByte(t++),a[s++]=!!(1&r),a[s++]=!!(2&r),a[s++]=!!(4&r),a[s++]=!!(8&r),a[s++]=!!(16&r),a[s++]=!!(32&r),a[s++]=!!(64&r),a[s++]=!!(128&r);if(s<i){var u=0;for(r=this.readByte(t++);s<i;)a[s++]=!!(r>>u++&1)}return e&&(this.offset=t),a},a.readBytes=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var n=this.slice(e,e+t);return r&&(this.offset+=t),n},a.writeBytes=a.append,a.writeInt8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},a.writeByte=a.writeInt8,a.readInt8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128===(128&r)&&(r=-(255-r+1)),e&&(this.offset+=1),r},a.readByte=a.readInt8,a.writeUint8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},a.writeUInt8=a.writeUint8,a.readUint8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return e&&(this.offset+=1),r},a.readUInt8=a.readUint8,a.writeInt16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},a.writeShort=a.writeInt16,a.readInt16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),32768===(32768&r)&&(r=-(65535-r+1)),e&&(this.offset+=2),r},a.readShort=a.readInt16,a.writeUint16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},a.writeUInt16=a.writeUint16,a.readUint16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),e&&(this.offset+=2),r},a.readUInt16=a.readUint16,a.writeInt32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},a.writeInt=a.writeInt32,a.readInt32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),r|=0,e&&(this.offset+=4),r},a.readInt=a.readInt32,a.writeUint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},a.writeUInt32=a.writeUint32,a.readUint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),e&&(this.offset+=4),r},a.readUInt32=a.readUint32,t&&(a.writeInt64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},a.writeLong=a.writeInt64,a.readInt64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!1);return r&&(this.offset+=8),o},a.readLong=a.readInt64,a.writeUint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},a.writeUInt64=a.writeUint64,a.readUint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!0);return r&&(this.offset+=8),o},a.readUInt64=a.readUint64),a.writeFloat32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,i(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},a.writeFloat=a.writeFloat32,a.readFloat32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},a.readFloat=a.readFloat32,a.writeFloat64=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=8,i(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},a.writeDouble=a.writeFloat64,a.readFloat64=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},a.readDouble=a.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},o.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},o.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},a.writeVarint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=o.calculateVarint32(t);e+=i;var s=this.buffer.byteLength;for(e>s&&this.resize((s*=2)>e?s:e),e-=i,t>>>=0;t>=128;)n=127&t|128,this.view[e++]=n,t>>>=7;return this.view[e++]=t,r?(this.offset=e,this):i},a.writeVarint32ZigZag=function(t,e){return this.writeVarint32(o.zigZagEncode32(t),e)},a.readVarint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}r=this.view[t++],n<5&&(i|=(127&r)<<7*n),++n}while(0!==(128&r));return i|=0,e?(this.offset=t,i):{value:i,length:n}},a.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"===("undefined"==typeof e?"undefined":s(e))?e.value=o.zigZagDecode32(e.value):e=o.zigZagDecode32(e),e},t&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var r=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},o.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},a.writeVarint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var i=o.calculateVarint64(e),s=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,u=e.shiftRightUnsigned(56).toInt()>>>0;r+=i;var f=this.buffer.byteLength;switch(r>f&&this.resize((f*=2)>r?f:r),r-=i,i){case 10:this.view[r+9]=u>>>7&1;case 9:this.view[r+8]=9!==i?128|u:127&u;case 8:this.view[r+7]=8!==i?a>>>21|128:a>>>21&127;case 7:this.view[r+6]=7!==i?a>>>14|128:a>>>14&127;case 6:this.view[r+5]=6!==i?a>>>7|128:a>>>7&127;case 5:this.view[r+4]=5!==i?128|a:127&a;case 4:this.view[r+3]=4!==i?s>>>21|128:s>>>21&127;case 3:this.view[r+2]=3!==i?s>>>14|128:s>>>14&127;case 2:this.view[r+1]=2!==i?s>>>7|128:s>>>7&127;case 1:this.view[r]=1!==i?128|s:127&s}return n?(this.offset+=i,this):i},a.writeVarint64ZigZag=function(t,e){return this.writeVarint64(o.zigZagEncode64(t),e)},a.readVarint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,s=0,a=0;if(a=this.view[e++],i=127&a,128&a&&(a=this.view[e++],i|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],i|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],i|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],s=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],s|=(127&a)<<7,128&a||this.noAssert&&"undefined"==typeof a))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return r?(this.offset=e,u):{value:u,length:e-n}},a.readVarint64ZigZag=function(e){var r=this.readVarint64(e);return r&&r.value instanceof t?r.value=o.zigZagDecode64(r.value):r=o.zigZagDecode64(r),r}),a.writeCString=function(t,r){var n="undefined"==typeof r;n&&(r=this.offset);var i,o=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(i=0;i<o;++i)if(0===t.charCodeAt(i))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}o=h.calculateUTF16asUTF8(e(t))[1],r+=o+1;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=o+1,h.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),this.view[r++]=0,
10
- n?(this.offset=r,this):o},a.readCString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,i=t,o=-1;return h.decodeUTF8toUTF16(function(){if(0===o)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return o=this.view[t++],0===o?null:o}.bind(this),n=r(),!0),e?(this.offset=t,n()):{string:n(),length:t-i}},a.writeIString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=h.calculateUTF16asUTF8(e(t),this.noAssert)[1],r+=4+i;var s=this.buffer.byteLength;if(r>s&&this.resize((s*=2)>r?s:r),r-=4+i,this.littleEndian?(this.view[r+3]=i>>>24&255,this.view[r+2]=i>>>16&255,this.view[r+1]=i>>>8&255,this.view[r]=255&i):(this.view[r]=i>>>24&255,this.view[r+1]=i>>>16&255,this.view[r+2]=i>>>8&255,this.view[r+3]=255&i),r+=4,h.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==o+4+i)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+4+i));return n?(this.offset=r,this):r-o},a.readIString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),i=this.readUTF8String(n,o.METRICS_BYTES,t+=4);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",a.writeUTF8String=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=h.calculateUTF16asUTF8(e(t))[1],r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,h.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),n?(this.offset=r,this):r-o},a.writeString=a.writeUTF8String,o.calculateUTF8Chars=function(t){return h.calculateUTF16asUTF8(e(t))[0]},o.calculateUTF8Bytes=function(t){return h.calculateUTF16asUTF8(e(t))[1]},o.calculateString=o.calculateUTF8Bytes,a.readUTF8String=function(t,e,n){"number"==typeof e&&(n=e,e=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),"undefined"==typeof e&&(e=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var s,a=0,u=n;if(e===o.METRICS_CHARS){if(s=r(),h.decodeUTF8(function(){return a<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++a,h.UTF8toUTF16(t,s)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=n,s()):{string:s(),length:n-u}}if(e===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(h.decodeUTF8toUTF16(function(){return n<f?this.view[n++]:null}.bind(this),s=r(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,s()):{string:s(),length:n-u}}throw TypeError("Unsupported metrics: "+e)},a.readString=a.readUTF8String,a.writeVString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,a=r;i=h.calculateUTF16asUTF8(e(t),this.noAssert)[1],s=o.calculateVarint32(i),r+=s+i;var u=this.buffer.byteLength;if(r>u&&this.resize((u*=2)>r?u:r),r-=s+i,r+=this.writeVarint32(i,r),h.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==a+i+s)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+s));return n?(this.offset=r,this):r-a},a.readVString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),i=this.readUTF8String(n.value,o.METRICS_BYTES,t+=n.length);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},a.append=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=i,n&&(this.offset+=i),this},a.appendTo=function(t,e){return t.append(this,e),this},a.assert=function(t){return this.noAssert=!t,this},a.capacity=function(){return this.buffer.byteLength},a.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},a.clone=function(t){var e=new o(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},a.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var r=e-t;if(0===r)return this.buffer=u,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(r),i=new Uint8Array(n);return i.set(this.view.subarray(t,e)),this.buffer=n,this.view=i,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},a.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new o(0,this.littleEndian,this.noAssert);var r=e-t,n=new o(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,e),n},a.copyTo=function(t,e,r,n){var i,s;if(!this.noAssert&&!o.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(s="undefined"==typeof e)?t.offset:0|e,r=(i="undefined"==typeof r)?this.offset:0|r,n="undefined"==typeof n?this.limit:0|n,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var a=n-r;return 0===a?t:(t.ensureCapacity(e+a),t.view.set(this.view.subarray(r,n),e),i&&(this.offset+=a),s&&(t.offset+=a),this)},a.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},a.fill=function(t,e,r){var n="undefined"==typeof e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e>=r)return this;for(;e<r;)this.view[e++]=t;return n&&(this.offset=e),this},a.flip=function(){return this.limit=this.offset,this.offset=0,this},a.mark=function(t){if(t="undefined"==typeof t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},a.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},a.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},a.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},a.prepend=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;var s=i-r;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(r,this.buffer.byteLength),i),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,r+=s}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),r-i),t.offset=t.limit,n&&(this.offset-=i),this},a.prependTo=function(t,e){return t.prepend(this,e),this},a.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},a.remaining=function(){return this.limit-this.offset},a.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},a.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},a.reverse=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},a.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},a.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=t,r.limit=e,r},a.toBuffer=function(t){var e=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(!t&&0===e&&r===this.buffer.byteLength)return this.buffer;if(e===r)return u;var n=new ArrayBuffer(r-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,r),0),n},a.toArrayBuffer=a.toBuffer,a.toString=function(t,e,r){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,r=e),t){case"utf8":return this.toUTF8(e,r);case"base64":return this.toBase64(e,r);case"hex":return this.toHex(e,r);case"binary":return this.toBinary(e,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var c=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(i|=n>>4&15,r(e[63&(i|n>>4&15)]),i=(15&n)<<2,null!==(n=t())?(r(e[63&(i|n>>6&3)]),r(e[63&n])):(r(e[63&i]),r(61))):(r(e[63&i]),r(61),r(61))},t.decode=function(t,e){function n(t){throw Error("Illegal character code: "+t)}for(var i,o,s;null!==(i=t());)if(o=r[i],"undefined"==typeof o&&n(i),null!==(i=t())&&(s=r[i],"undefined"==typeof s&&n(i),e(o<<2>>>0|(48&s)>>4),null!==(i=t()))){if(o=r[i],"undefined"==typeof o){if(61===i)break;n(i)}if(e((15&s)<<4>>>0|(60&o)>>2),null!==(i=t())){if(s=r[i],"undefined"==typeof s){if(61===i)break;n(i)}e((3&o)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();a.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var n;return c.encode(function(){return t<e?this.view[t++]:null}.bind(this),n=r()),n()},o.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new o(t.length/4*3,r),i=0;return c.decode(e(t),function(t){n.view[i++]=t}),n.limit=i,n},o.btoa=function(t){return o.fromBinary(t).toBase64()},o.atob=function(t){return o.fromBase64(t).toBinary()},a.toBinary=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},o.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,i=t.length,s=new o(i,e);n<i;){if(r=t.charCodeAt(n),r>255)throw RangeError("illegal char code: "+r);s.view[n++]=r}return s.limit=i,s},a.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r<n;){if(r!==-1&&(e=this.view[r],i+=e<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16===0&&r!==n){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}i+=r===this.offset&&r===this.limit?r===this.markedOffset?"!":"|":r===this.offset?r===this.markedOffset?"[":"<":r===this.limit?r===this.markedOffset?"]":">":r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},o.fromDebug=function(t,e,r){for(var n,i,s=t.length,a=new o((s+1)/3|0,e,r),u=0,f=0,c=!1,h=!1,l=!1,p=!1,d=!1;u<s;){switch(n=t.charAt(u++)){case"!":if(!r){if(h||l||p){d=!0;break}h=l=p=!0}a.offset=a.markedOffset=a.limit=f,c=!1;break;case"|":if(!r){if(h||p){d=!0;break}h=p=!0}a.offset=a.limit=f,c=!1;break;case"[":if(!r){if(h||l){d=!0;break}h=l=!0}a.offset=a.markedOffset=f,c=!1;break;case"<":if(!r){if(h){d=!0;break}h=!0}a.offset=f,c=!1;break;case"]":if(!r){if(p||l){d=!0;break}p=l=!0}a.limit=a.markedOffset=f,c=!1;break;case">":if(!r){if(p){d=!0;break}p=!0}a.limit=f,c=!1;break;case"'":if(!r){if(l){d=!0;break}l=!0}a.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!r&&c){d=!0;break}if(i=parseInt(n+t.charAt(u++),16),!r&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[f++]=i,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!r){if(!h||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+s)}return a},a.toHex=function(t,e){if(t="undefined"==typeof t?this.offset:t,e="undefined"==typeof e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var r,n=new Array(e-t);t<e;)r=this.view[t++],r<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},o.fromHex=function(t,e,r){if(!r){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,i=t.length,s=new o(i/2|0,e),a=0,u=0;a<i;a+=2){if(n=parseInt(t.substring(a,a+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=n}return s.limit=u,s};var h=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<128?e(127&r):r<2048?(e(r>>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},t.decodeUTF8=function(t,e){for(var r,n,i,o,s=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(0===(128&r))e(r);else if(192===(224&r))null===(n=t())&&s([r,n]),e((31&r)<<6|63&n);else if(224===(240&r))(null===(n=t())||null===(i=t()))&&s([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!==(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(o=t()))&&s([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},t.UTF16toUTF8=function(t,e){for(var r,n=null;;){if(null===(r=null!==n?n:t()))break;r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r)}null!==n&&e(n)},t.UTF8toUTF16=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(r-=65536,e((r>>10)+55296),e(r%1024+56320)),r=null},t.encodeUTF16toUTF8=function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},t.decodeUTF8toUTF16=function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},t.calculateUTF16asUTF8=function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(t){++r,n+=t<128?1:t<2048?2:t<65536?3:4}),[r,n]},t}();return a.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var n;try{h.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),n=r())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return n()},o.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new o(h.calculateUTF16asUTF8(e(t),!0)[1],r,n),s=0;return h.encodeUTF16toUTF8(e(t),function(t){i.view[s++]=t}),i.limit=s,i},o})}).call(e,r(64)(t))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,r){var n,i,o;(function(t){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(a,u){r(154).amd?(i=[],n=u,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"===s(t)&&t&&t.exports?t.exports=u():(a.dcodeIO=a.dcodeIO||{}).Long=u()}(void 0,function(){function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return(t&&t.__isLong__)===!0}function r(t,e){var r,n,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(n=u[t])?n:(r=i(t,(0|t)<0?-1:0,!0),o&&(u[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(n=a[t])?n:(r=i(t,t<0?-1:0,!1),o&&(a[t]=r),r))}function n(t,e){if(isNaN(t)||!isFinite(t))return e?_:y;if(e){if(t<0)return _;if(t>=l)return w}else{if(t<=-p)return E;if(t+1>=p)return b}return t<0?n(-t,e).neg():i(t%h|0,t/h|0,e)}function i(e,r,n){return new t(e,r,n)}function o(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return y;if("number"==typeof e?(r=e,e=!1):e=!!e,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return o(t.substring(1),e,r).neg();for(var s=n(f(r,8)),a=y,u=0;u<t.length;u+=8){var c=Math.min(8,t.length-u),h=parseInt(t.substring(u,u+c),r);if(c<8){var l=n(f(r,c));a=a.mul(l).add(n(h))}else a=a.mul(s),a=a.add(n(h))}return a.unsigned=e,a}function s(e){return e instanceof t?e:"number"==typeof e?n(e):"string"==typeof e?o(e):i(e.low,e.high,e.unsigned)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var a={},u={};t.fromInt=r,t.fromNumber=n,t.fromBits=i;var f=Math.pow;t.fromString=o,t.fromValue=s;var c=1<<24,h=4294967296,l=0x10000000000000000,p=l/2,d=r(c),y=r(0);t.ZERO=y;var _=r(0,!0);t.UZERO=_;var v=r(1);t.ONE=v;var g=r(1,!0);t.UONE=g;var m=r(-1);t.NEG_ONE=m;var b=i(-1,2147483647,!1);t.MAX_VALUE=b;var w=i(-1,-1,!0);t.MAX_UNSIGNED_VALUE=w;var E=i(0,-2147483648,!1);t.MIN_VALUE=E;var S=t.prototype;return S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},S.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=n(t),r=this.div(e),i=r.mul(e).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=n(f(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=s.sub(u.mul(o)).toInt()>>>0,h=c.toString(t);if(s=u,s.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},S.isZero=function(){return 0===this.high&&0===this.low},S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||this.high>=0},S.isOdd=function(){return 1===(1&this.low)},S.isEven=function(){return 0===(1&this.low)},S.equals=function(t){return e(t)||(t=s(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.compare=function(t){if(e(t)||(t=s(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(v)},S.neg=S.negate,S.add=function(t){e(t)||(t=s(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,a=65535&this.low,u=t.high>>>16,f=65535&t.high,c=t.low>>>16,h=65535&t.low,l=0,p=0,d=0,y=0;return y+=a+h,d+=y>>>16,y&=65535,d+=o+c,p+=d>>>16,d&=65535,p+=n+f,l+=p>>>16,p&=65535,l+=r+u,l&=65535,i(d<<16|y,l<<16|p,this.unsigned)},S.subtract=function(t){return e(t)||(t=s(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return y;if(e(t)||(t=s(t)),t.isZero())return y;if(this.eq(E))return t.isOdd()?E:y;if(t.eq(E))return this.isOdd()?E:y;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return n(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,a=this.low>>>16,u=65535&this.low,f=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,p=0,_=0,v=0,g=0;return g+=u*l,v+=g>>>16,g&=65535,v+=a*l,_+=v>>>16,v&=65535,v+=u*h,_+=v>>>16,v&=65535,_+=o*l,p+=_>>>16,_&=65535,_+=a*h,p+=_>>>16,_&=65535,_+=u*c,p+=_>>>16,_&=65535,p+=r*l+o*h+a*c+u*f,p&=65535,i(v<<16|g,p<<16|_,this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(e(t)||(t=s(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?_:y;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return _;if(t.gt(this.shru(1)))return g;o=_}else{if(this.eq(E)){if(t.eq(v)||t.eq(m))return E;if(t.eq(E))return v;var a=this.shr(1);return r=a.div(t).shl(1),r.eq(y)?t.isNegative()?v:m:(i=this.sub(t.mul(r)),o=r.add(i.div(t)))}if(t.eq(E))return this.unsigned?_:y;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=y}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(r)/Math.LN2),c=u<=48?1:f(2,u-48),h=n(r),l=h.mul(t);l.isNegative()||l.gt(i);)r-=c,h=n(r,this.unsigned),l=h.mul(t);h.isZero()&&(h=v),o=o.add(h),i=i.sub(l)}return o},S.div=S.divide,S.modulo=function(t){return e(t)||(t=s(t)),this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.not=function(){return i(~this.low,~this.high,this.unsigned)},S.and=function(t){return e(t)||(t=s(t)),i(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return e(t)||(t=s(t)),i(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return e(t)||(t=s(t)),i(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):i(0,this.low<<t-32,this.unsigned)},S.shl=S.shiftLeft,S.shiftRight=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):i(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),t&=63,0===t)return this;var r=this.high;if(t<32){var n=this.low;return i(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?i(r,0,this.unsigned):i(r>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})}).call(e,r(64)(t))},function(t,e,r){"use strict";function n(){return Object.keys(s)}var i=r(157),o=r(176),s=r(168);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=o.createDecipher,e.createDecipheriv=e.Decipheriv=o.createDecipheriv,e.listCiphers=e.getCiphers=n},function(t,e,r){"use strict";function n(t,e,r){h.call(this),this._cache=new i,this._cipher=new l.AES(e),this._prev=f.from(r),this._mode=t,this._autopadding=!0}function i(){this.cache=f.allocUnsafe(0)}function o(t,e,r){var i=a[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=f.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=f.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new c(i.module,e,r):"auth"===i.type?new u(i.module,e,r):new n(i.module,e,r)}function s(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=p(e,!1,r.key,r.iv);return o(t,n.key,n.iv)}var a=r(158),u=r(169),f=r(120).Buffer,c=r(172),h=r(144),l=r(170),p=r(173),d=r(110);d(n,h),n.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return f.concat(n)};var y=f.alloc(16,16);n.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(y))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},i.prototype.add=function(t){this.cache=f.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){for(var t=16-this.cache.length,e=f.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return f.concat([this.cache,e])},e.createCipheriv=o,e.createCipher=s},function(t,e,r){"use strict";var n={ECB:r(159),CBC:r(160),CFB:r(162),CFB8:r(163),CFB1:r(164),OFB:r(165),CTR:r(166),GCM:r(166)},i=r(168);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e){"use strict";e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){"use strict";var n=r(161);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){(function(e){"use strict";t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o];return i}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";function n(t,e,r){var n=e.length,s=o(e,t._cache);return t._cache=t._cache.slice(n),t._prev=i.concat([t._prev,r?e:s]),s}var i=r(120).Buffer,o=r(161);e.encrypt=function(t,e,r){for(var o,s=i.allocUnsafe(0);e.length;){
11
- if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=i.allocUnsafe(0)),!(t._cache.length<=e.length)){s=i.concat([s,n(t,e,r)]);break}o=t._cache.length,s=i.concat([s,n(t,e.slice(0,o),r)]),e=e.slice(o)}return s}},function(t,e,r){"use strict";function n(t,e,r){var n=t._cipher.encryptBlock(t._prev),o=n[0]^e;return t._prev=i.concat([t._prev.slice(1),i.from([r?e:o])]),o}var i=r(120).Buffer;e.encrypt=function(t,e,r){for(var o=e.length,s=i.allocUnsafe(o),a=-1;++a<o;)s[a]=n(t,e[a],r);return s}},function(t,e,r){"use strict";function n(t,e,r){for(var n,o,s,a=-1,u=8,f=0;++a<u;)n=t._cipher.encryptBlock(t._prev),o=e&1<<7-a?128:0,s=n[0]^o,f+=(128&s)>>a%8,t._prev=i(t._prev,r?o:s);return f}function i(t,e){var r=t.length,n=-1,i=o.allocUnsafe(t.length);for(t=o.concat([t,o.from([e])]);++n<r;)i[n]=t[n]<<1|t[n+1]>>7;return i}var o=r(120).Buffer;e.encrypt=function(t,e,r){for(var i=e.length,s=o.allocUnsafe(i),a=-1;++a<i;)s[a]=n(t,e[a],r);return s}},function(t,e,r){(function(t){"use strict";function n(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}var i=r(161);e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),i(r,o)}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";function n(t){var e=t._cipher.encryptBlockRaw(t._prev);return s(t._prev),e}var i=r(161),o=r(120).Buffer,s=r(167),a=16;e.encrypt=function(t,e){var r=Math.ceil(e.length/a),s=t._cache.length;t._cache=o.concat([t._cache,o.allocUnsafe(r*a)]);for(var u=0;u<r;u++){var f=n(t),c=s+u*a;t._cache.writeUInt32BE(f[0],c+0),t._cache.writeUInt32BE(f[1],c+4),t._cache.writeUInt32BE(f[2],c+8),t._cache.writeUInt32BE(f[3],c+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,h)}},function(t,e){"use strict";function r(t){for(var e,r=t.length;r--;){if(e=t.readUInt8(r),255!==e){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}t.exports=r},function(t,e){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(t,e,r){"use strict";function n(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}function i(t,e,r){if(12===e.length)return t._finID=a.concat([e,a.from([0,0,0,1])]),a.concat([e,a.from([0,0,0,2])]);var n=new c(r),i=e.length,o=i%16;n.update(e),o&&(o=16-o,n.update(a.alloc(o,0))),n.update(a.alloc(8,0));var s=8*i,u=a.alloc(8);u.writeUIntBE(s,0,8),n.update(u),t._finID=n.state;var f=a.from(t._finID);return l(f),f}function o(t,e,r,n){u.call(this);var o=a.alloc(4,0);this._cipher=new s.AES(e);var f=this._cipher.encryptBlock(o);this._ghash=new c(f),r=i(this,r,f),this._prev=a.from(r),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}var s=r(170),a=r(120).Buffer,u=r(144),f=r(110),c=r(171),h=r(161),l=r(167);f(o,u),o.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=a.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&n(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},o.prototype.getAuthTag=function(){if(this._decrypt||!a.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},o.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},o.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=o},function(t,e,r){"use strict";function n(t){a.isBuffer(t)||(t=a.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(4*n);return r}function i(t){for(var e=0;e<t.length;t++)t[e]=0}function o(t,e,r,n,i){for(var o,s,a,u,f=r[0],c=r[1],h=r[2],l=r[3],p=t[0]^e[0],d=t[1]^e[1],y=t[2]^e[2],_=t[3]^e[3],v=4,g=1;g<i;g++)o=f[p>>>24]^c[d>>>16&255]^h[y>>>8&255]^l[255&_]^e[v++],s=f[d>>>24]^c[y>>>16&255]^h[_>>>8&255]^l[255&p]^e[v++],a=f[y>>>24]^c[_>>>16&255]^h[p>>>8&255]^l[255&d]^e[v++],u=f[_>>>24]^c[p>>>16&255]^h[d>>>8&255]^l[255&y]^e[v++],p=o,d=s,y=a,_=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[y>>>8&255]<<8|n[255&_])^e[v++],s=(n[d>>>24]<<24|n[y>>>16&255]<<16|n[_>>>8&255]<<8|n[255&p])^e[v++],a=(n[y>>>24]<<24|n[_>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[v++],u=(n[_>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&y])^e[v++],o>>>=0,s>>>=0,a>>>=0,u>>>=0,[o,s,a,u]}function s(t){this._key=n(t),this._reset()}var a=r(120).Buffer,u=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var f=a^a<<1^a<<2^a<<3^a<<4;f=f>>>8^255&f^99,r[s]=f,n[f]=s;var c=t[s],h=t[c],l=t[h],p=257*t[f]^16843008*f;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*l^65537*h^257*c^16843008*s,o[0][f]=p<<24|p>>>8,o[1][f]=p<<16|p>>>16,o[2][f]=p<<8|p>>>24,o[3][f]=p,0===s?s=a=1:(s=c^t[t[t[l^c]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e===0?(s=s<<8|s>>>24,s=f.SBOX[s>>>24]<<24|f.SBOX[s>>>16&255]<<16|f.SBOX[s>>>8&255]<<8|f.SBOX[255&s],s^=u[o/e|0]<<24):e>6&&o%e===4&&(s=f.SBOX[s>>>24]<<24|f.SBOX[s>>>16&255]<<16|f.SBOX[s>>>8&255]<<8|f.SBOX[255&s]),i[o]=i[o-e]^s}for(var a=[],c=0;c<n;c++){var h=n-c,l=i[h-(c%4?0:4)];c<4||h<=4?a[c]=l:a[c]=f.INV_SUB_MIX[0][f.SBOX[l>>>24]]^f.INV_SUB_MIX[1][f.SBOX[l>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[l>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=a},s.prototype.encryptBlockRaw=function(t){return t=n(t),o(t,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},s.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=a.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},s.prototype.decryptBlock=function(t){t=n(t);var e=t[1];t[1]=t[3],t[3]=e;var r=o(t,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),i=a.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},s.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},t.exports.AES=s},function(t,e,r){"use strict";function n(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function i(t){var e=s.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function o(t){this.h=t,this.state=s.alloc(16,0),this.cache=s.allocUnsafe(0)}var s=r(120).Buffer,a=s.alloc(16,0);o.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},o.prototype._multiply=function(){for(var t,e,r,o=n(this.h),s=[0,0,0,0],a=-1;++a<128;){for(e=0!==(this.state[~~(a/8)]&1<<7-a%8),e&&(s[0]^=o[0],s[1]^=o[1],s[2]^=o[2],s[3]^=o[3]),r=0!==(1&o[3]),t=3;t>0;t--)o[t]=o[t]>>>1|(1&o[t-1])<<31;o[0]=o[0]>>>1,r&&(o[0]=o[0]^225<<24)}this.state=i(s)},o.prototype.update=function(t){this.cache=s.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},o.prototype.final=function(t,e){return this.cache.length&&this.ghash(s.concat([this.cache,a],16)),this.ghash(i([0,t,0,e])),this.state},t.exports=o},function(t,e,r){"use strict";function n(t,e,r,n){s.call(this),this._cipher=new i.AES(e),this._prev=o.from(r),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=n,this._mode=t}var i=r(170),o=r(120).Buffer,s=r(144),a=r(110);a(n,s),n.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},n.prototype._final=function(){this._cipher.scrub()},t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=i.alloc(s),u=i.alloc(n||0),f=i.alloc(0);s>0||n>0;){var c=new o;c.update(f),c.update(t),e&&c.update(e),f=c.digest();var h=0;if(s>0){var l=a.length-s;h=Math.min(s,f.length),f.copy(a,l,0,h),s-=h}if(h<f.length&&n>0){var p=u.length-n,d=Math.min(n,f.length-h);f.copy(u,p,h,h+d),n-=d}}return f.fill(0),{key:a,iv:u}}var i=r(120).Buffer,o=r(174);t.exports=n},function(t,e,r){(function(e){"use strict";function n(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(t,e){return t<<e|t>>>32-e}function o(t,e,r,n,o,s,a){return i(t+(e&r|~e&n)+o+s|0,a)+e|0}function s(t,e,r,n,o,s,a){return i(t+(e&n|r&~n)+o+s|0,a)+e|0}function a(t,e,r,n,o,s,a){return i(t+(e^r^n)+o+s|0,a)+e|0}function u(t,e,r,n,o,s,a){return i(t+(r^(e|~n))+o+s|0,a)+e|0}var f=r(110),c=r(175),h=new Array(16);f(n,c),n.prototype._update=function(){for(var t=h,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,f=this._d;r=o(r,n,i,f,t[0],3614090360,7),f=o(f,r,n,i,t[1],3905402710,12),i=o(i,f,r,n,t[2],606105819,17),n=o(n,i,f,r,t[3],3250441966,22),r=o(r,n,i,f,t[4],4118548399,7),f=o(f,r,n,i,t[5],1200080426,12),i=o(i,f,r,n,t[6],2821735955,17),n=o(n,i,f,r,t[7],4249261313,22),r=o(r,n,i,f,t[8],1770035416,7),f=o(f,r,n,i,t[9],2336552879,12),i=o(i,f,r,n,t[10],4294925233,17),n=o(n,i,f,r,t[11],2304563134,22),r=o(r,n,i,f,t[12],1804603682,7),f=o(f,r,n,i,t[13],4254626195,12),i=o(i,f,r,n,t[14],2792965006,17),n=o(n,i,f,r,t[15],1236535329,22),r=s(r,n,i,f,t[1],4129170786,5),f=s(f,r,n,i,t[6],3225465664,9),i=s(i,f,r,n,t[11],643717713,14),n=s(n,i,f,r,t[0],3921069994,20),r=s(r,n,i,f,t[5],3593408605,5),f=s(f,r,n,i,t[10],38016083,9),i=s(i,f,r,n,t[15],3634488961,14),n=s(n,i,f,r,t[4],3889429448,20),r=s(r,n,i,f,t[9],568446438,5),f=s(f,r,n,i,t[14],3275163606,9),i=s(i,f,r,n,t[3],4107603335,14),n=s(n,i,f,r,t[8],1163531501,20),r=s(r,n,i,f,t[13],2850285829,5),f=s(f,r,n,i,t[2],4243563512,9),i=s(i,f,r,n,t[7],1735328473,14),n=s(n,i,f,r,t[12],2368359562,20),r=a(r,n,i,f,t[5],4294588738,4),f=a(f,r,n,i,t[8],2272392833,11),i=a(i,f,r,n,t[11],1839030562,16),n=a(n,i,f,r,t[14],4259657740,23),r=a(r,n,i,f,t[1],2763975236,4),f=a(f,r,n,i,t[4],1272893353,11),i=a(i,f,r,n,t[7],4139469664,16),n=a(n,i,f,r,t[10],3200236656,23),r=a(r,n,i,f,t[13],681279174,4),f=a(f,r,n,i,t[0],3936430074,11),i=a(i,f,r,n,t[3],3572445317,16),n=a(n,i,f,r,t[6],76029189,23),r=a(r,n,i,f,t[9],3654602809,4),f=a(f,r,n,i,t[12],3873151461,11),i=a(i,f,r,n,t[15],530742520,16),n=a(n,i,f,r,t[2],3299628645,23),r=u(r,n,i,f,t[0],4096336452,6),f=u(f,r,n,i,t[7],1126891415,10),i=u(i,f,r,n,t[14],2878612391,15),n=u(n,i,f,r,t[5],4237533241,21),r=u(r,n,i,f,t[12],1700485571,6),f=u(f,r,n,i,t[3],2399980690,10),i=u(i,f,r,n,t[10],4293915773,15),n=u(n,i,f,r,t[1],2240044497,21),r=u(r,n,i,f,t[8],1873313359,6),f=u(f,r,n,i,t[15],4264355552,10),i=u(i,f,r,n,t[6],2734768916,15),n=u(n,i,f,r,t[13],1309151649,21),r=u(r,n,i,f,t[4],4149444226,6),f=u(f,r,n,i,t[11],3174756917,10),i=u(i,f,r,n,t[2],718787259,15),n=u(n,i,f,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+f|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=n}).call(e,r(100).Buffer)},function(t,e,r){"use strict";function n(t,e){if(!o.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}function i(t){s.call(this),this._block=o.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var o=r(120).Buffer,s=r(115).Transform,a=r(110);a(i,s),i.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},i.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},i.prototype.update=function(t,e){if(n(t,"Data"),this._finalized)throw new Error("Digest already called");o.isBuffer(t)||(t=o.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)r[s++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,u=8*t.length;u>0;++a)this._length[a]+=u,u=this._length[a]/4294967296|0,u>0&&(this._length[a]-=4294967296*u);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i},function(t,e,r){"use strict";function n(t,e,r){l.call(this),this._cache=new i,this._last=void 0,this._cipher=new p.AES(e),this._prev=f.from(r),this._mode=t,this._autopadding=!0}function i(){this.cache=f.allocUnsafe(0)}function o(t){for(var e=t[15],r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}function s(t,e,r){var i=c[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=f.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=f.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===i.type?new h(i.module,e,r,!0):"auth"===i.type?new u(i.module,e,r,!0):new n(i.module,e,r)}function a(t,e){var r=c[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=d(e,!1,r.key,r.iv);return s(t,n.key,n.iv)}var u=r(169),f=r(120).Buffer,c=r(158),h=r(172),l=r(144),p=r(170),d=r(173),y=r(110);y(n,l),n.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return f.concat(n)},n.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return o(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},i.prototype.add=function(t){this.cache=f.concat([this.cache,t])},i.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=a,e.createDecipheriv=s},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(178),s=r(182),a=s.getCurveByName("secp256k1");o=r(178);var u=r(148),f=r(108),c=r(42),h=r(104),l=a.G,p=a.n,d=function(){function t(e){n(this,t),this.Q=e}return i(t,[{key:"toBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Q?this.Q.compressed:null;return null===this.Q?e.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=s.Point.decodeFrom(a,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=f.sha512(t);return f.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=f.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return this.pubdata=u.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix"),r=this.toBuffer(),n=f.sha512(r),i=f.ripemd160(n),o=f.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+u.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=f.sha256(t),n=f.ripemd160(r);n=e.concat([new e([56]),n]);var i=f.sha256(n);return i=f.sha256(i),n=e.concat([n,i.slice(0,4)]),u.encode(n)}},{key:"child",value:function(r){h(e.isBuffer(r),"Buffer required: offset"),h.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=f.sha256(r);var n=o.fromBuffer(r);if(n.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=l.multiply(n),s=this.Q.add(i);if(a.isInfinity(s))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(s)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(r){return t.fromBuffer(new e(r,"binary"))}},{key:"fromBuffer",value:function(e){return new t("000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?null:s.Point.decodeFrom(a,e))}},{key:"fromPoint",value:function(e){return new t(e)}},{key:"fromString",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix");try{return t.fromStringOrThrow(e,r)}catch(t){return null}}},{key:"fromStringOrThrow",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix"),i=r.slice(0,n.length);h.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length),r=new e(u.decode(r),"binary");var o=r.slice(-4);r=r.slice(0,-4);var s=f.ripemd160(r);return s=s.slice(0,4),h.deepEqual(o,s,"Checksum did not match"),t.fromBuffer(r)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"fromStringHex",value:function(r){return t.fromString(new e(r,"hex"))}}]),t}();t.exports=d}).call(e,r(100).Buffer)},function(t,e,r){"use strict";var n=r(179);r(181),t.exports=n},function(t,e,r){"use strict";function n(t,e,r){return this instanceof n?void(null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))):new n(t,e,r)}function i(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i}function o(t){return oe.charAt(t)}function s(t,e){var r=se[t.charCodeAt(e)];return null==r?-1:r}function a(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function u(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+ee:this.t=0}function f(t){var e=new n;return e.fromInt(t),e}function c(t,e){var r,i=this;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void i.fromRadix(t,e);r=2}i.t=0,i.s=0;for(var o=t.length,a=!1,u=0;--o>=0;){var f=8==r?255&t[o]:s(t,o);f<0?"-"==t.charAt(o)&&(a=!0):(a=!1,0==u?i[i.t++]=f:u+r>i.DB?(i[i.t-1]|=(f&(1<<i.DB-u)-1)<<u,i[i.t++]=f>>i.DB-u):i[i.t-1]|=f<<u,u+=r,u>=i.DB&&(u-=i.DB))}8==r&&0!=(128&t[0])&&(i.s=-1,u>0&&(i[i.t-1]|=(1<<i.DB-u)-1<<u)),i.clamp(),a&&n.ZERO.subTo(i,i)}function h(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function l(t){var e=this;if(e.s<0)return"-"+e.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return e.toRadix(t);r=2}var n,i=(1<<r)-1,s=!1,a="",u=e.t,f=e.DB-u*e.DB%r;if(u-- >0)for(f<e.DB&&(n=e[u]>>f)>0&&(s=!0,a=o(n));u>=0;)f<r?(n=(e[u]&(1<<f)-1)<<r-f,n|=e[--u]>>(f+=e.DB-r)):(n=e[u]>>(f-=r)&i,f<=0&&(f+=e.DB,--u)),n>0&&(s=!0),s&&(a+=o(n));return s?a:"0"}function p(){var t=new n;return n.ZERO.subTo(this,t),t}function d(){return this.s<0?this.negate():this}function y(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(e=r-t.t,0!=e)return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function _(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function v(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)}function g(){return this.bitLength()>>3}function m(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function b(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function w(t,e){var r,n=this,i=t%n.DB,o=n.DB-i,s=(1<<o)-1,a=Math.floor(t/n.DB),u=n.s<<i&n.DM;for(r=n.t-1;r>=0;--r)e[r+a+1]=n[r]>>o|u,u=(n[r]&s)<<i;for(r=a-1;r>=0;--r)e[r]=0;e[a]=u,e.t=n.t+a+1,e.s=n.s,e.clamp()}function E(t,e){var r=this;e.s=r.s;var n=Math.floor(t/r.DB);if(n>=r.t)return void(e.t=0);var i=t%r.DB,o=r.DB-i,s=(1<<i)-1;e[0]=r[n]>>i;for(var a=n+1;a<r.t;++a)e[a-n-1]|=(r[a]&s)<<o,e[a-n]=r[a]>>i;i>0&&(e[r.t-n-1]|=(r.s&s)<<o),e.t=r.t-n,e.clamp()}function S(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]-t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i-=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i-=t[n],e[n++]=i&r.DM,i>>=r.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=r.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()}function B(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)}function k(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function T(t,e,r){var i=this,o=t.abs();if(!(o.t<=0)){var s=i.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=r&&i.copyTo(r));null==r&&(r=new n);var a=new n,u=i.s,f=t.s,c=i.DB-_(o[o.t-1]);c>0?(o.lShiftTo(c,a),s.lShiftTo(c,r)):(o.copyTo(a),s.copyTo(r));var h=a.t,l=a[h-1];if(0!=l){var p=l*(1<<i.F1)+(h>1?a[h-2]>>i.F2:0),d=i.FV/p,y=(1<<i.F1)/p,v=1<<i.F2,g=r.t,m=g-h,b=null==e?new n:e;for(a.dlShiftTo(m,b),r.compareTo(b)>=0&&(r[r.t++]=1,r.subTo(b,r)),n.ONE.dlShiftTo(h,b),b.subTo(a,a);a.t<h;)a[a.t++]=0;for(;--m>=0;){var w=r[--g]==l?i.DM:Math.floor(r[g]*d+(r[g-1]+v)*y);if((r[g]+=a.am(0,w,r,m,0,h))<w)for(a.dlShiftTo(m,b),r.subTo(b,r);r[g]<--w;)r.subTo(b,r)}null!=e&&(r.drShiftTo(h,e),u!=f&&n.ZERO.subTo(e,e)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),u<0&&n.ZERO.subTo(r,r)}}}function x(t){var e=new n;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e}function A(t){this.m=t}function I(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function C(t){return t}function O(t){t.divRemTo(this.m,null,t)}function j(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function R(t,e){t.squareTo(e),this.reduce(e)}function L(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function F(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function U(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e}function P(t){var e=new n;return t.copyTo(e),this.reduce(e),e}function M(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function D(t,e){t.squareTo(e),this.reduce(e)}function N(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function q(){return 0==(this.t>0?1&this[0]:this.s)}function z(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=_(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<<s)>0)e.mulTo(i,o,r);else{var a=r;r=i,i=a}return e.revert(r)}function V(t,e){var r;return r=t<256||e.isEven()?new A(e):new F(e),this.exp(t,r)}function H(){var t=new n;return this.copyTo(t),t}function K(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function X(){return 0==this.t?this.s:this[0]<<24>>24}function Y(){return 0==this.t?this.s:this[0]<<16>>16}function G(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function W(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function $(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=f(r),o=new n,s=new n,a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a}function Z(t,e){var r=this;r.fromInt(0),null==e&&(e=10);for(var i=r.chunkSize(e),o=Math.pow(e,i),a=!1,u=0,f=0,c=0;c<t.length;++c){var h=s(t,c);h<0?"-"==t.charAt(c)&&0==r.signum()&&(a=!0):(f=e*f+h,++u>=i&&(r.dMultiply(o),r.dAddOffset(f,0),u=0,f=0))}u>0&&(r.dMultiply(Math.pow(e,u)),r.dAddOffset(f,0)),a&&n.ZERO.subTo(r,r)}function J(t,e,r){var i=this;if("number"==typeof e)if(t<2)i.fromInt(1);else for(i.fromNumber(t,r),i.testBit(t-1)||i.bitwiseTo(n.ONE.shiftLeft(t-1),st,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(e);)i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(n.ONE.shiftLeft(t-1),i);else{var o=new Array,s=7&t;o.length=(t>>3)+1,e.nextBytes(o),s>0?o[0]&=(1<<s)-1:o[0]=0,i.fromString(o,256)}}function Q(){var t=this,e=t.t,r=new Array;r[0]=t.s;var n,i=t.DB-e*t.DB%8,o=0;if(e-- >0)for(i<t.DB&&(n=t[e]>>i)!=(t.s&t.DM)>>i&&(r[o++]=n|t.s<<t.DB-i);e>=0;)i<8?(n=(t[e]&(1<<i)-1)<<8-i,n|=t[--e]>>(i+=t.DB-8)):(n=t[e]>>(i-=8)&255,i<=0&&(i+=t.DB,--e)),0!=(128&n)&&(n|=-256),0===o&&(128&t.s)!=(128&n)&&++o,(o>0||n!=t.s)&&(r[o++]=n);return r}function tt(t){return 0==this.compareTo(t)}function et(t){return this.compareTo(t)<0?this:t}function rt(t){return this.compareTo(t)>0?this:t}function nt(t,e,r){var n,i,o=this,s=Math.min(t.t,o.t);for(n=0;n<s;++n)r[n]=e(o[n],t[n]);if(t.t<o.t){for(i=t.s&o.DM,n=s;n<o.t;++n)r[n]=e(o[n],i);r.t=o.t}else{for(i=o.s&o.DM,n=s;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(o.s,t.s),r.clamp()}function it(t,e){return t&e}function ot(t){var e=new n;return this.bitwiseTo(t,it,e),e}function st(t,e){return t|e}function at(t){var e=new n;return this.bitwiseTo(t,st,e),e}function ut(t,e){return t^e}function ft(t){var e=new n;return this.bitwiseTo(t,ut,e),e}function ct(t,e){return t&~e}function ht(t){var e=new n;return this.bitwiseTo(t,ct,e),e}function lt(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function pt(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function dt(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function yt(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function _t(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+yt(this[t]);return this.s<0?this.t*this.DB:-1}function vt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function gt(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=vt(this[r]^e);return t}function mt(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)}function bt(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r}function wt(t){return this.changeBit(t,st)}function Et(t){return this.changeBit(t,ct)}function St(t){return this.changeBit(t,ut)}function Bt(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]+t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i+=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i+=t[n],e[n++]=i&r.DM,i>>=r.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=r.DV+i),e.t=n,e.clamp()}function kt(t){var e=new n;return this.addTo(t,e),e}function Tt(t){var e=new n;return this.subTo(t,e),e}function xt(t){var e=new n;return this.multiplyTo(t,e),e}function At(){var t=new n;return this.squareTo(t),t}function It(t){var e=new n;return this.divRemTo(t,e,null),e}function Ct(t){var e=new n;return this.divRemTo(t,null,e),e}function Ot(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)}function jt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Rt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Lt(){}function Ft(t){return t}function Ut(t,e,r){t.multiplyTo(e,r)}function Pt(t,e){t.squareTo(e)}function Mt(t){return this.exp(t,new Lt)}function Dt(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,t[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t[n],r,n,0,e-n);r.clamp()}function Nt(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)}function qt(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function zt(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=new n;return t.copyTo(e),this.reduce(e),e}function Vt(t){return t}function Ht(t){var e=this;for(t.drShiftTo(e.m.t-1,e.r2),t.t>e.m.t+1&&(t.t=e.m.t+1,
12
- t.clamp()),e.mu.multiplyUpperTo(e.r2,e.m.t+1,e.q3),e.m.multiplyLowerTo(e.q3,e.m.t+1,e.r2);t.compareTo(e.r2)<0;)t.dAddOffset(1,e.m.t+1);for(t.subTo(e.r2,t);t.compareTo(e.m)>=0;)t.subTo(e.m,t)}function Kt(t,e){t.squareTo(e),this.reduce(e)}function Xt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function Yt(t,e){var r,i,o=t.bitLength(),s=f(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new A(e):e.isEven()?new qt(e):new F(e);var a=new Array,u=3,c=r-1,h=(1<<r)-1;if(a[1]=i.convert(this),r>1){var l=new n;for(i.sqrTo(a[1],l);u<=h;)a[u]=new n,i.mulTo(l,a[u-2],a[u]),u+=2}var p,d,y=t.t-1,v=!0,g=new n;for(o=_(t[y])-1;y>=0;){for(o>=c?p=t[y]>>o-c&h:(p=(t[y]&(1<<o+1)-1)<<c-o,y>0&&(p|=t[y-1]>>this.DB+o-c)),u=r;0==(1&p);)p>>=1,--u;if((o-=u)<0&&(o+=this.DB,--y),v)a[p].copyTo(s),v=!1;else{for(;u>1;)i.sqrTo(s,g),i.sqrTo(g,s),u-=2;u>0?i.sqrTo(s,g):(d=s,s=g,g=d),i.mulTo(g,a[p],s)}for(;y>=0&&0==(t[y]&1<<o);)i.sqrTo(s,g),d=s,s=g,g=d,--o<0&&(o=this.DB-1,--y)}return i.revert(s)}function Gt(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function Wt(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function $t(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=f(1),s=f(0),a=f(0),u=f(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;u.compareTo(t)>=0;)u.subTo(t,u);for(;u.signum()<0;)u.addTo(t,u);return u}function Zt(t){var e,r=this.abs();if(1==r.t&&r[0]<=ae[ae.length-1]){for(e=0;e<ae.length;++e)if(r[0]==ae[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<ae.length;){for(var n=ae[e],i=e+1;i<ae.length&&n<ue;)n*=ae[i++];for(n=r.modInt(n);e<i;)if(n%ae[e++]==0)return!1}return r.millerRabin(t)}function Jt(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);t=t+1>>1,t>ae.length&&(t=ae.length);for(var o,s=new n(null),a=[],u=0;u<t;++u){for(;o=ae[Math.floor(Math.random()*ae.length)],a.indexOf(o)!=-1;);a.push(o),s.fromInt(o);var f=s.modPow(i,this);if(0!=f.compareTo(n.ONE)&&0!=f.compareTo(e)){for(var o=1;o++<r&&0!=f.compareTo(e);)if(f=f.modPowInt(2,this),0==f.compareTo(n.ONE))return!1;if(0!=f.compareTo(e))return!1}}return!0}var Qt=n.prototype;Qt.__bigi=r(180).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===Qt.__bigi)};var te;n.prototype.am=i,te=26,n.prototype.DB=te,n.prototype.DM=(1<<te)-1;var ee=n.prototype.DV=1<<te,re=52;n.prototype.FV=Math.pow(2,re),n.prototype.F1=re-te,n.prototype.F2=2*te-re;var ne,ie,oe="0123456789abcdefghijklmnopqrstuvwxyz",se=new Array;for(ne="0".charCodeAt(0),ie=0;ie<=9;++ie)se[ne++]=ie;for(ne="a".charCodeAt(0),ie=10;ie<36;++ie)se[ne++]=ie;for(ne="A".charCodeAt(0),ie=10;ie<36;++ie)se[ne++]=ie;A.prototype.convert=I,A.prototype.revert=C,A.prototype.reduce=O,A.prototype.mulTo=j,A.prototype.sqrTo=R,F.prototype.convert=U,F.prototype.revert=P,F.prototype.reduce=M,F.prototype.mulTo=N,F.prototype.sqrTo=D,Qt.copyTo=a,Qt.fromInt=u,Qt.fromString=c,Qt.clamp=h,Qt.dlShiftTo=m,Qt.drShiftTo=b,Qt.lShiftTo=w,Qt.rShiftTo=E,Qt.subTo=S,Qt.multiplyTo=B,Qt.squareTo=k,Qt.divRemTo=T,Qt.invDigit=L,Qt.isEven=q,Qt.exp=z,Qt.toString=l,Qt.negate=p,Qt.abs=d,Qt.compareTo=y,Qt.bitLength=v,Qt.byteLength=g,Qt.mod=x,Qt.modPowInt=V,Lt.prototype.convert=Ft,Lt.prototype.revert=Ft,Lt.prototype.mulTo=Ut,Lt.prototype.sqrTo=Pt,qt.prototype.convert=zt,qt.prototype.revert=Vt,qt.prototype.reduce=Ht,qt.prototype.mulTo=Xt,qt.prototype.sqrTo=Kt;var ae=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ue=(1<<26)/ae[ae.length-1];Qt.chunkSize=G,Qt.toRadix=$,Qt.fromRadix=Z,Qt.fromNumber=J,Qt.bitwiseTo=nt,Qt.changeBit=bt,Qt.addTo=Bt,Qt.dMultiply=jt,Qt.dAddOffset=Rt,Qt.multiplyLowerTo=Dt,Qt.multiplyUpperTo=Nt,Qt.modInt=Wt,Qt.millerRabin=Jt,Qt.clone=H,Qt.intValue=K,Qt.byteValue=X,Qt.shortValue=Y,Qt.signum=W,Qt.toByteArray=Q,Qt.equals=tt,Qt.min=et,Qt.max=rt,Qt.and=ot,Qt.or=at,Qt.xor=ft,Qt.andNot=ht,Qt.not=lt,Qt.shiftLeft=pt,Qt.shiftRight=dt,Qt.getLowestSetBit=_t,Qt.bitCount=gt,Qt.testBit=mt,Qt.setBit=wt,Qt.clearBit=Et,Qt.flipBit=St,Qt.add=kt,Qt.subtract=Tt,Qt.multiply=xt,Qt.divide=It,Qt.remainder=Ct,Qt.divideAndRemainder=Ot,Qt.modPow=Yt,Qt.modInverse=$t,Qt.pow=Mt,Qt.gcd=Gt,Qt.isProbablePrime=Zt,Qt.square=At,n.ZERO=f(0),n.ONE=f(1),n.valueOf=f,t.exports=n},function(t,e){t.exports={name:"bigi",version:"1.4.2",description:"Big integers.",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},repository:{url:"https://github.com/cryptocoinjs/bigi",type:"git"},main:"./lib/index.js",scripts:{"browser-test":"./node_modules/.bin/mochify --wd -R spec",test:"./node_modules/.bin/_mocha -- test/*.js",jshint:"./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",unit:"./node_modules/.bin/mocha",coverage:"./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"},dependencies:{},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]}}},function(t,e,r){(function(t){"use strict";var e=r(104),n=r(179);n.fromByteArrayUnsigned=function(t){return new n(128&t[0]?[0].concat(t):t)},n.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},n.fromDERInteger=function(t){return new n(t)},n.prototype.toDERInteger=n.prototype.toByteArray,n.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new n([0].concat(e))}return new n(t)},n.fromHex=function(t){return""===t?n.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new n(t,16))},n.prototype.toBuffer=function(e){for(var r=this.toByteArrayUnsigned(),n=[],i=e-r.length;n.length<i;)n.push(0);return new t(n.concat(r))},n.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";var n=r(183),i=r(184),o=r(185);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){"use strict";function n(t,e,r,n){i.notStrictEqual(n,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}var i=r(104),o=r(120).Buffer,s=r(178),a=s.valueOf(3);Object.defineProperty(n.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(n.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(n.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),n.fromAffine=function(t,e,r){return new n(t,e,r,s.ONE)},n.prototype.equals=function(t){if(t===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(t);if(this.curve.isInfinity(t))return this.curve.isInfinity(this);var e=t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p);if(0!==e.signum())return!1;var r=t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p);return 0===r.signum()},n.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new n(this.curve,this.x,t,this.z)},n.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,i=t.x,o=t.y,s=o.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),u=i.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===u.signum())return 0===s.signum()?this.twice():this.curve.infinity;var f=u.square(),c=f.multiply(u),h=e.multiply(f),l=s.square().multiply(this.z),p=l.subtract(h.shiftLeft(1)).multiply(t.z).subtract(c).multiply(u).mod(this.curve.p),d=h.multiply(a).multiply(s).subtract(r.multiply(c)).subtract(l.multiply(s)).multiply(t.z).add(s.multiply(c)).mod(this.curve.p),y=c.multiply(this.z).multiply(t.z).mod(this.curve.p);return new n(this.curve,p,d,y)},n.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),i=r.multiply(e).mod(this.curve.p),o=this.curve.a,s=t.square().multiply(a);0!==o.signum()&&(s=s.add(this.z.square().multiply(o))),s=s.mod(this.curve.p);var u=s.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),f=s.multiply(a).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new n(this.curve,u,f,c)},n.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(a),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var s=r.testBit(o),u=e.testBit(o);i=i.twice(),s!==u&&(i=i.add(s?this:n))}return i},n.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var s=t.testBit(n),a=r.testBit(n);i=i.twice(),s?i=a?i.add(o):i.add(this):a&&(i=i.add(e)),--n}return i},n.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return o.alloc(1,0);var e,r=this.affineX,n=this.affineY,i=this.curve.pLength;return t?(e=o.allocUnsafe(1+i),e.writeUInt8(n.isEven()?2:3,0)):(e=o.allocUnsafe(1+i+i),e.writeUInt8(4,0),n.toBuffer(i).copy(e,1+i)),r.toBuffer(i).copy(e,1),e},n.decodeFrom=function(t,e){var r,o=e.readUInt8(0),a=4!==o,u=Math.floor((t.p.bitLength()+7)/8),f=s.fromBuffer(e.slice(1,1+u));if(a){i.equal(e.length,u+1,"Invalid sequence length"),i(2===o||3===o,"Invalid sequence tag");var c=3===o;r=t.pointFromX(c,f)}else{i.equal(e.length,1+u+u,"Invalid sequence length");var h=s.fromBuffer(e.slice(1+u));r=n.fromAffine(t,f,h)}return r.compressed=a,r},n.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n,i,a,u){this.p=t,this.a=e,this.b=r,this.G=s.fromAffine(this,n,i),this.n=a,this.h=u,this.infinity=new s(this,null,null,o.ZERO),this.pOverFour=t.add(o.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}var i=r(104),o=r(178),s=r(183);n.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p),n=r.modPow(this.pOverFour,this.p),i=n;return n.isEven()^!t&&(i=this.p.subtract(i)),s.fromAffine(this,e,i)},n.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},n.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},n.prototype.validate=function(t){i(!this.isInfinity(t),"Point is at infinity"),i(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return i(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=n},function(t,e,r){"use strict";function n(t){var e=o[t];if(!e)return null;var r=new i(e.p,16),n=new i(e.a,16),a=new i(e.b,16),u=new i(e.n,16),f=new i(e.h,16),c=new i(e.Gx,16),h=new i(e.Gy,16);return new s(r,n,a,c,h,u,f)}var i=r(178),o=r(186),s=r(184);t.exports=n},function(t,e){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(182),s=o.Point,a=o.getCurveByName("secp256k1"),u=r(178),f=r(148),c=r(104),h=r(108),l=r(177),p=(a.G,a.n),d=function(){function t(e){n(this,t),this.d=e}return i(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=h.sha256(t);r=h.sha256(r),r=r.slice(0,4);var n=e.concat([t,r]);return f.encode(n)}},{key:"toString",value:function(){return this.toWif()}},{key:"toPublicKeyPoint",value:function(){var t;return t=a.G.multiply(this.d)}},{key:"toPublic",value:function(){return this.public_key?this.public_key:this.public_key=l.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){t=y(t);var e=t.toUncompressed().toBuffer(),r=s.fromAffine(a,u.fromBuffer(e.slice(1,33)),u.fromBuffer(e.slice(33,65))),n=this.toBuffer(),i=r.multiply(u.fromBuffer(n)),o=i.affineX.toBuffer({size:32});return h.sha512(o)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=h.sha256(r);var n=u.fromBuffer(r);if(n.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new t(i)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toPublicKey",value:function(){return this.toPublic()}}],[{key:"fromBuffer",value:function(r){if(!e.isBuffer(r))throw new Error("Expecting paramter to be a Buffer type");if(32!==r.length&&console.log("WARN: Expecting 32 bytes, instead got "+r.length+", stack trace:",(new Error).stack),0===r.length)throw new Error("Empty buffer");return new t(u.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(h.sha256(e))}},{key:"isWif",value:function(t){try{return this.fromWif(t),!0}catch(t){return!1}}},{key:"fromWif",value:function(r){var n=new e(f.decode(r)),i=n.readUInt8(0);c.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.slice(-4),a=h.sha256(o);if(a=h.sha256(a),a=a.slice(0,4),s.toString()!==a.toString())throw new Error("Invalid WIF key (checksum miss-match)");return o=o.slice(1),t.fromBuffer(o)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}}]),t}();t.exports=d;var y=function(t){return null==t?t:t.Q?t:l.fromStringOrThrow(t)}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(189),s=r(108),a=r(182).getCurveByName("secp256k1"),u=r(104),f=r(178),c=r(177),h=r(187),l=function(){function t(e,r,i){n(this,t),this.r=e,this.s=r,this.i=i,u.equal(null!=this.r,!0,"Missing parameter"),u.equal(null!=this.s,!0,"Missing parameter"),u.equal(null!=this.i,!0,"Missing parameter")}return i(t,[{key:"toBuffer",value:function(){var t;return t=new e(65),t.writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t}},{key:"recoverPublicKeyFromBuffer",value:function(t){return this.recoverPublicKey(s.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e=void 0,r=void 0,n=void 0;return r=f.fromBuffer(t),n=this.i,n-=27,n&=3,e=o.recoverPubKey(a,r,this,n),c.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=s.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return u.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),o.verify(a,t,{r:this.r,s:this.s},e.Q)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,r){var n;return n=new e(t,"hex"),this.verifyBuffer(n,r)}}],[{key:"fromBuffer",value:function(e){var r,n,i;return u.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),u.equal(r-27,r-27&7,"Invalid signature parameter"),n=f.fromBuffer(e.slice(1,33)),i=f.fromBuffer(e.slice(33)),new t(n,i,r)}},{key:"signBuffer",value:function(e,r){var n=s.sha256(e);return t.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(r,n){if(32!==r.length||!e.isBuffer(r))throw new Error("buf_sha256: 32 byte buffer requred");n=p(n),u(n,"private_key required");var i,s,c,h,l,d,y;for(h=null,y=0,s=f.fromBuffer(r);;){if(c=o.sign(a,r,n.d,y++),i=c.toDER(),l=i[3],d=i[5+l],32===l&&32===d){h=o.calcPubKeyRecoveryParam(a,s,c,n.toPublicKey().Q),h+=4,h+=27;break}y%10===0&&console.log("WARN: "+y+" attempts to find canonical signature")}return new t(c.r,c.s,h)}},{key:"sign",value:function(r,n){return t.signBuffer(new e(r),n)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"signHex",value:function(r,n){var i;return i=new e(r,"hex"),t.signBuffer(i,n)}}]),t}(),p=function(t){return t?t.d?t:h.fromWif(t):t};t.exports=l}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,r,n,i,o){h("Buffer",r),h(l,n),o&&(r=c.sha256(e.concat([r,new e(o)]))),f.equal(r.length,32,"Hash must be 256 bit");var s=n.toBuffer(32),a=new e(32),u=new e(32);u.fill(1),a.fill(0),a=c.HmacSHA256(e.concat([u,new e([0]),s,r]),a),u=c.HmacSHA256(u,a),a=c.HmacSHA256(e.concat([u,new e([1]),s,r]),a),u=c.HmacSHA256(u,a),u=c.HmacSHA256(u,a);for(var p=l.fromBuffer(u);p.signum()<=0||p.compareTo(t.n)>=0||!i(p);)a=c.HmacSHA256(e.concat([u,new e([0])]),a),u=c.HmacSHA256(u,a),u=c.HmacSHA256(u,a),p=l.fromBuffer(u);return p}function i(t,e,r,i){var o,s,a=l.fromBuffer(e),u=t.n,f=t.G,c=(n(t,e,r,function(e){var n=f.multiply(e);return!t.isInfinity(n)&&(o=n.affineX.mod(u),0!==o.signum()&&(s=e.modInverse(u).multiply(a.add(r.multiply(o))).mod(u),0!==s.signum()))},i),u.shiftRight(1));return s.compareTo(c)>0&&(s=u.subtract(s)),new p(o,s)}function o(t,e,r,n){var i=t.n,o=t.G,s=r.r,a=r.s;if(s.signum()<=0||s.compareTo(i)>=0)return!1;if(a.signum()<=0||a.compareTo(i)>=0)return!1;var u=a.modInverse(i),f=e.multiply(u).mod(i),c=s.multiply(u).mod(i),h=o.multiplyTwo(f,n,c);if(t.isInfinity(h))return!1;var l=h.affineX,p=l.mod(i);return p.equals(s)}function s(t,e,r,n){var i=l.fromBuffer(e);return o(t,i,r,n)}function a(t,e,r,n){f.strictEqual(3&n,n,"Recovery param is more than two bits");var i=t.n,o=t.G,s=r.r,a=r.s;f(s.signum()>0&&s.compareTo(i)<0,"Invalid r value"),f(a.signum()>0&&a.compareTo(i)<0,"Invalid s value");var u=1&n,c=n>>1,h=c?s.add(i):s,l=t.pointFromX(u,h),p=l.multiply(i);f(t.isInfinity(p),"nR is not a valid curve point");var d=e.negate().mod(i),y=s.modInverse(i),_=l.multiplyTwo(a,o,d).multiply(y);return t.validate(_),_}function u(t,e,r,n){for(var i=0;i<4;i++){var o=a(t,e,r,i);if(o.equals(n))return i}throw new Error("Unable to find valid recovery factor")}var f=r(104),c=r(108),h=r(190),l=r(178),p=r(191);t.exports={calcPubKeyRecoveryParam:u,deterministicGenerateK:n,recoverPubKey:a,sign:i,verify:s,verifyRaw:o}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function r(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){o(s,t),o(s,e),this.r=t,this.s=e}var i=r(104),o=r(190),s=r(178);n.parseCompact=function(t){i.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;i.equal(e,7&e,"Invalid signature parameter");var r=!!(4&e);e&=3;var o=s.fromBuffer(t.slice(1,33)),a=s.fromBuffer(t.slice(33));return{compressed:r,i:e,signature:new n(o,a)}},n.fromDER=function(t){i.equal(t.readUInt8(0),48,"Not a DER sequence"),i.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),i.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);i(e>0,"R length is zero");var r=4+e;i.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var o=t.readUInt8(r+1);i(o>0,"S length is zero");var a=t.slice(4,r),u=t.slice(r+2);r+=2+o,e>1&&0===a.readUInt8(0)&&i(128&a.readUInt8(1),"R value excessively padded"),o>1&&0===u.readUInt8(0)&&i(128&u.readUInt8(1),"S value excessively padded"),i.equal(r,t.length,"Invalid DER encoding");var f=s.fromDERInteger(a),c=s.fromDERInteger(u);return i(f.signum()>=0,"R value is negative"),i(c.signum()>=0,"S value is negative"),new n(f,c)},n.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=e&-129;return i(r>0&&r<4,"Invalid hashType"),{signature:n.fromDER(t.slice(0,-1)),hashType:e}},n.prototype.toCompact=function(t,r){r&&(t+=4),t+=27;var n=new e(65);return n.writeUInt8(t,0),this.r.toBuffer(32).copy(n,1),this.s.toBuffer(32).copy(n,33),n},n.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),n=n.concat(t),n.push(2,r.length),n=n.concat(r),n.unshift(48,n.length),new e(n)},n.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=n}).call(e,r(100).Buffer)},function(t,e){"use strict";function r(t){if("string"!=typeof t)throw new Error("string required for brain_key");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")}Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=r},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(108),o=r(151),s=250,a=0,u=0,f=o.randomBuffer(101);t.exports={addEntropy:function(){u++;for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=!0,i=!1,o=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var h=s.value,l=a++%101,p=f[l]+=h;p>9007199254740991&&(f[l]=0)}}catch(t){i=!0,o=t}finally{try{!n&&c.return&&c.return()}finally{if(i)throw o}}},random32ByteBuffer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();if("string"!=typeof t)throw new Error("string required for entropy");if(t.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var r=Date.now();Date.now()-r<s;)t=i.sha256(t);var n=[];return n.push(t),n.push(o.randomBuffer(32)),i.sha256(e.concat(n))},get_random_key:function(t){return n.fromBuffer(this.random32ByteBuffer(t))},browserEntropy:function(){var t=Array(f).join();try{t+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var r,n=0;n<navigator.mimeTypes.length;n++)r=navigator.mimeTypes[n],t+=r.description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",u,"events")}catch(e){t+=i.sha256((new Date).toString())}var o=new e(t);return t+=o.toString("binary")+" "+(new Date).toString()}}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";t.exports={Serializer:r(195),fp:r(197),types:r(198),ops:r(203),template:r(204),number_utils:r(199)}},function(t,e,r){(function(e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(153),a=r(196),u=e.env.npm_config__graphene_serializer_hex_dump,f=function(){function t(e,r){i(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return o(t,[{key:"fromByteBuffer",value:function(e){var r={},n=null;try{for(var n,i=this.keys,o=0;o<i.length;o++){n=i[o];var s=this.types[n];try{if(u)if(s.operation_name)console.error(s.operation_name);else{var f=e.offset;s.fromByteBuffer(e);var c=e.offset;e.offset=f;var h=e.copy(f,c);console.error(this.operation_name+"."+n+"\t",h.toHex())}r[n]=s.fromByteBuffer(e)}catch(r){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),r}}}catch(t){a.throw(this.operation_name+"."+n,t)}return r}},{key:"appendByteBuffer",value:function(t,e){var r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r];o.appendByteBuffer(t,e[r])}}catch(t){try{a.throw(this.operation_name+"."+r+" = "+JSON.stringify(e[r]),t)}catch(n){a.throw(this.operation_name+"."+r+" = "+e[r],t)}}}},{key:"fromObject",value:function(t){var e={},r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r],s=t[r],u=o.fromObject(s);e[r]=u}}catch(t){a.throw(this.operation_name+"."+r,t)}return e}},{key:"toObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{use_default:!1,annotate:!1},r={},n=null;try{if(!this.types)return r;for(var n,i=this.keys,o=0;o<i.length;o++){n=i[o];var f=this.types[n],c=f.toObject("undefined"!=typeof t&&null!==t?t[n]:void 0,e);if(r[n]=c,u){var h=new s(s.DEFAULT_CAPACITY,s.LITTLE_ENDIAN),l="undefined"!=typeof t&&null!==t;if(l){var p=t[n];p&&f.appendByteBuffer(h,p)}h=h.copy(0,h.offset),console.error(this.operation_name+"."+n,h.toHex())}}}catch(t){a.throw(this.operation_name+"."+n,t)}return r}},{key:"compare",value:function(t,e){var r=this.keys[0],i=this.types[r],o=t[r],s=e[r];if(i.compare)return i.compare(o,s);if("number"==typeof o&&"number"==typeof s)return o-s;var a=void 0;n.isBuffer(o)&&n.isBuffer(s)&&(a="hex");var u=o.toString(a),f=s.toString(a);return u>f?1:u<f?-1:0}},{key:"fromHex",value:function(t){var e=s.fromHex(t,s.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"fromBuffer",value:function(t){var e=s.fromBinary(t.toString("binary"),s.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"toHex",value:function(t){var e=this.toByteBuffer(t);return e.toHex()}},{key:"toByteBuffer",value:function(t){var e=new s(s.DEFAULT_CAPACITY,s.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)}},{key:"toBuffer",value:function(t){return new n(this.toByteBuffer(t).toBinary(),"binary")}}]),t}();t.exports=f}).call(e,r(5),r(100).Buffer)},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,n){r(this,t),this.message=e,("undefined"!=typeof n&&null!==n?n.message:void 0)&&(this.message="cause\t"+n.message+"\t"+this.message);var i="";("undefined"!=typeof n&&null!==n?n.stack:void 0)&&(i="caused by\n\t"+n.stack+"\t"+i),this.stack=this.message+"\n"+i}return n(t,null,[{key:"throw",value:function(t,e){var r=t;throw("undefined"!=typeof e&&null!==e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),("undefined"!=typeof e&&null!==e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)}}]),t}();t.exports=i},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(98),s=function(){function t(){n(this,t)}return i(t,null,[{key:"fixed_data",value:function(t,r,n){if(t){if(!n){var i=t.copy(t.offset,t.offset+r);return t.skip(r),new e(i.toBinary(),"binary")}var o=n.slice(0,r).toString("binary");for(t.append(o,"binary");r-- >o.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(r){var n=r.toBuffer();return void e.append(n.toString("binary"),"binary")}return n=t.fixed_data(e,33),o.PublicKey.fromBuffer(n)}}},{key:"ripemd160",value:function(e,r){if(e)return r?void t.fixed_data(e,20,r):t.fixed_data(e,20)}},{key:"time_point_sec",value:function(t,e){return e?(e=Math.ceil(e/1e3),void t.writeInt32(e)):(e=t.readInt32(),new Date(1e3*e))}}]),t}();t.exports=s}).call(e,r(100).Buffer)},function(t,e,r){(function(e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){if(t>=1e8)throw new Error("Expected value less than 100000000, instead got "+t);
13
- var e=[0,30,10,70,50,90,80,60,40,20,70,0,90,20,10,50,40,80,60,30,40,20,0,60,80,70,10,30,50,90,10,70,50,0,90,80,30,40,20,60,60,10,20,30,0,40,50,90,70,80,30,60,70,40,20,0,90,50,80,10,50,80,60,90,70,20,0,10,30,40,80,90,40,50,30,60,20,0,10,70,90,40,30,80,60,10,70,20,0,50,20,50,80,10,40,30,60,70,90,0],r=t/10,n=t%10,i=r/10,o=r%10,s=i/10,a=i%10,u=s/10,f=s%10,c=u/10,h=u%10,l=c/10,p=c%10,d=l%10,y=l/10,_=e[y];return _=e[_+d],_=e[_+p],_=e[_+h],_=e[_+f],_=e[_+a],_=e[_+o],_=e[_+n],_/10}var s=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=r(98),f=r(199),c=r(42),h=i(c),l=r(200),p=r(202),d=r(197),y=r(201),_={};t.exports=_;var v=e.env.npm_config__graphene_serializer_hex_dump;_.asset={fromByteBuffer:function(t){var e=t.readInt64(),r=t.readUint8(),i="",s="";if(r>=16){var a=t.copy(t.offset-1,t.offset+3),u=new n(a.toBinary(),"binary").readInt32();u/=32,s="@@"+u.toString().padStart(8,"0")+o(u).to_String(),r%=16,t.skip(3),i=(0,f.fromImpliedDecimal)(e,r)}else{var c=t.copy(t.offset,t.offset+7);s=new n(c.toBinary(),"binary").toString().replace(/\x00/g,""),t.skip(7),i=(0,f.fromImpliedDecimal)(e,r)}return i+" "+s},appendByteBuffer:function(t,e){var r="",n="",i=0,s=0;if(e.nai){n=e.nai,i=parseInt(n.slice(2));i=Math.floor(i/10);o(i);switch(e.nai){case"@@000000021":s=3,n="STM"==h.default.get("address_prefix")?"STEEM":"TESTS";break;case"@@000000013":s=3,n="STM"==h.default.get("address_prefix")?"SBD":"TBD";break;case"@@000000037":s=6,n="VESTS"}s=parseInt(e.precision),t.writeInt64(l.to_long(parseInt(e.amount)))}else{if(e=e.trim(),!/^[0-9]+\.?[0-9]* [A-Za-z0-9@]+$/.test(e))throw new Error("Expecting amount like '99.000 SYMBOL', instead got '"+e+"'");var a=e.split(" ");if(r=a[0],n=a[1],n.startsWith("@@")){i=parseInt(n.slice(2));i=Math.floor(i/10);o(i)}else if(n.length>6)throw new Error("Symbols are not longer than 6 characters "+n+"-"+n.length);t.writeInt64(l.to_long(r.replace(".","")));var u=r.indexOf(".");s=u===-1?0:r.length-u-1}if(n.startsWith("@@"))i=(i<<5)+16+s,t.writeUint32(i);else{t.writeUint8(s),t.append(n.toUpperCase(),"binary");for(var f=0;f<7-n.length;f++)t.writeUint8(0)}},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0.000 STEEM":t}},_.asset_symbol={fromByteBuffer:function(t){var e=t.readUint8(),r="";if(e>=16){var i=t.copy(t.offset-1,t.offset+3),s=new n(i.toBinary(),"binary").readInt32();s/=32,r="@@"+s.toString().padStart(8,"0")+o(s).to_String(),e%=16,t.skip(3)}else{var a=t.copy(t.offset,t.offset+7),u=new n(a.toBinary(),"binary").toString().replace(/\x00/g,"");if("STEEM"==u||"TESTS"==u)r="@@000000021";else if("SBD"==u||"TBD"==u)r="@@000000013";else{if("VESTS"!=u)throw new Error("Expecting non-smt core asset symbol, instead got '"+u+"'");r="@@000000037"}t.skip(7)}return{nai:r,precision:e}},appendByteBuffer:function(t,e){var r=0;if(!e.nai.startsWith("@@"))throw new Error("Asset Symbols NAIs must be prefixed with '@@'. Was "+e.nai);r=parseInt(e.nai.slice(2));r=Math.floor(r/10);var n=(o(r),0),i="";switch(e.nai){case"@@000000021":n=3,i="STM"==h.default.get("address_prefix")?"STEEM":"TESTS";break;case"@@000000013":n=3,i="STM"==h.default.get("address_prefix")?"SBD":"TBD";break;case"@@000000037":n=6,i="VESTS"}if(n>0){t.writeUint8(n),t.append(i,"binary");for(var s=0;s<7-i.length;s++)t.writeUint8(0)}else r=(r<<5)+16+e.precision,t.writeUint32(r)},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"STEEM":t}},_.uint8={fromByteBuffer:function(t){return t.readUint8()},appendByteBuffer:function(t,e){l.require_range(0,255,e,"uint8 "+e),t.writeUint8(e)},fromObject:function(t){return l.require_range(0,255,t,"uint8 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(l.require_range(0,255,t,"uint8 "+t),parseInt(t))}},_.uint16={fromByteBuffer:function(t){return t.readUint16()},appendByteBuffer:function(t,e){l.require_range(0,65535,e,"uint16 "+e),t.writeUint16(e)},fromObject:function(t){return l.require_range(0,65535,t,"uint16 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(l.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},_.uint32={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){l.require_range(0,4294967295,e,"uint32 "+e),t.writeUint32(e)},fromObject:function(t){return l.require_range(0,4294967295,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(l.require_range(0,4294967295,t,"uint32 "+t),parseInt(t))}};var g=-1*Math.pow(2,31),m=Math.pow(2,31)-1;_.varint32={fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(t,e){l.require_range(g,m,e,"uint32 "+e),t.writeVarint32(e)},fromObject:function(t){return l.require_range(g,m,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(l.require_range(g,m,t,"uint32 "+t),parseInt(t))}},_.int16={fromByteBuffer:function(t){return t.readInt16()},appendByteBuffer:function(t,e){t.writeInt16(e)},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:parseInt(t)}},_.int64={fromByteBuffer:function(t){return t.readInt64()},appendByteBuffer:function(t,e){l.required(e),t.writeInt64(l.to_long(e))},fromObject:function(t){return l.required(t),l.to_long(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":(l.required(t),l.to_long(t).toString())}},_.uint64={fromByteBuffer:function(t){return t.readUint64()},appendByteBuffer:function(t,e){t.writeUint64(l.to_long(l.unsigned(e)))},fromObject:function(t){return l.to_long(l.unsigned(t))},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":l.to_long(t).toString()}},_.uint128={fromByteBuffer:function(t){return t.readBigInt64(),t.readBigInt64()},appendByteBuffer:function(t,e){t.writeUint64(l.to_long(l.unsigned(0))),t.writeUint64(l.to_long(l.unsigned(e)))},fromObject:function(t){return l.to_long(l.unsigned(t))},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":l.to_long(t).toString()}},_.string={fromByteBuffer:function(t){return new n(t.readVString(),"utf8")},appendByteBuffer:function(t,e){l.required(e),t.writeVString(e.toString())},fromObject:function(t){return l.required(t),new n(t,"utf8")},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"":t.toString("utf8")}},_.string_binary={fromByteBuffer:function(t){var e,r=t.readVarint32();return e=t.copy(t.offset,t.offset+r),t.skip(r),new n(e.toBinary(),"binary")},appendByteBuffer:function(t,e){t.writeVarint32(e.length),t.append(e.toString("binary"),"binary")},fromObject:function(t){return l.required(t),new n(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"":t.toString()}},_.bytes=function(t){return{fromByteBuffer:function(e){if(void 0===t){var r,i=e.readVarint32();return r=e.copy(e.offset,e.offset+i),e.skip(i),new n(r.toBinary(),"binary")}return r=e.copy(e.offset,e.offset+t),e.skip(t),new n(r.toBinary(),"binary")},appendByteBuffer:function(e,r){l.required(r),"string"==typeof r&&(r=new n(r,"hex")),void 0===t&&e.writeVarint32(r.length),e.append(r.toString("binary"),"binary")},fromObject:function(t){return l.required(t),n.isBuffer(t)?t:new n(t,"hex")},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e){var n=function(t){return new Array(t).join("00")};return n(t)}return l.required(e),e.toString("hex")}}},_.bool={fromByteBuffer:function(t){return 1===t.readUint8()},appendByteBuffer:function(t,e){t.writeUint8(JSON.parse(e)?1:0)},fromObject:function(t){return!!JSON.parse(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(!e.use_default||void 0!==t)&&!!JSON.parse(t)}},_.void={fromByteBuffer:function(t){throw new Error("(void) undefined type")},appendByteBuffer:function(t,e){throw new Error("(void) undefined type")},fromObject:function(t){throw new Error("(void) undefined type")},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.use_default||void 0!==t)throw new Error("(void) undefined type")}},_.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();v&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return S(n,t)},appendByteBuffer:function(e,r){l.required(r),r=S(r,t),e.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],t.appendByteBuffer(e,n)},fromObject:function(e){l.required(e),e=S(e,t);for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e)return[t.toObject(e,r)];l.required(e),e=S(e,t);for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}}},_.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=_.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(l.required(t),"number"==typeof t)return t;if(t.getTime)return Math.floor(t.getTime()/1e3);if("string"!=typeof t)throw new Error("Unknown date type: "+t);return"string"!=typeof t||/Z$/.test(t)||(t+="Z"),Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.use_default&&void 0===t)return new Date(0).toISOString().split(".")[0];if(l.required(t),"string"==typeof t)return t;if(t.getTime)return t.toISOString().split(".")[0];var r=parseInt(t);return l.require_range(0,4294967295,r,"uint32 "+t),new Date(1e3*r).toISOString().split(".")[0]}},_.set=function(t){return{validate:function(e){for(var r,n={},i=0;i<e.length;i++){r=e[i];var o;if(o="undefined"==typeof r?"undefined":a(r),["string","number"].indexOf(o)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return S(e,t)},fromByteBuffer:function(e){var r=e.readVarint32();return v&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return n}())},appendByteBuffer:function(e,r){r||(r=[]),e.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],t.appendByteBuffer(e,n)},fromObject:function(e){return e||(e=[]),this.validate(function(){for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n}())},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.use_default&&void 0===e?[t.toObject(e,r)]:(e||(e=[]),this.validate(function(){for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}()))}}},_.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i,o,s;for(s=[],n=i=0,o=t;i<o;n=i+=1)s.push(e.fromByteBuffer(r));return S(s,e)},appendByteBuffer:function(r,n){var i,o,s;for(0!==t&&(l.required(n),n=S(n,e)),i=o=0,s=t;o<s;i=o+=1)e.appendByteBuffer(r,n[i])},fromObject:function(r){var n,i,o,s;for(0!==t&&l.required(r),s=[],n=i=0,o=t;i<o;n=i+=1)s.push(e.fromObject(r[n]));return s},toObject:function(r,n){var i,o,s,a,u,f,c;if(null==n&&(n={}),n.use_default&&void 0===r){for(f=[],i=o=0,a=t;o<a;i=o+=1)f.push(e.toObject(void 0,n));return f}for(0!==t&&l.required(r),c=[],i=s=0,u=t;s<u;i=s+=1)c.push(e.toObject(r[i],n));return c}}};var b=function(t,e){return l.required(t,"reserved_spaces"),l.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,n){l.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=l.get_instance(t,e,n)),r.writeVarint32(l.to_number(n))},fromObject:function(r){return l.required(r),void 0!==r.resolve&&(r=r.resolve),l.is_digits(r)?l.to_number(r):l.get_instance(t,e,r)},toObject:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=y.object_type[e];return n.use_default&&void 0===r?t+"."+i+".0":(l.required(r),void 0!==r.resolve&&(r=r.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(r)&&(r=l.get_instance(t,e,r)),t+"."+i+"."+r)}}};_.protocol_id_type=function(t){return l.required(t,"name"),b(y.reserved_spaces.protocol_ids,t)},_.object_id_type={fromByteBuffer:function(t){return p.fromByteBuffer(t)},appendByteBuffer:function(t,e){l.required(e),void 0!==e.resolve&&(e=e.resolve),e=p.fromString(e),e.appendByteBuffer(t)},fromObject:function(t){return l.required(t),void 0!==t.resolve&&(t=t.resolve),p.fromString(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0.0.0":(l.required(t),void 0!==t.resolve&&(t=t.resolve),t=p.fromString(t),t.toString())}},_.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(t){var e=t.readUint32();return{type:e&this.TYPE,id:e&this.ID}},appendByteBuffer:function(t,e){l.required(e),"string"===e&&(e=_.vote_id.fromObject(e));var r=e.id<<8|e.type;t.writeUint32(r)},fromObject:function(t){if(l.required(t,"(type vote_id)"),"object"===("undefined"==typeof t?"undefined":a(t)))return l.required(t.type,"type"),l.required(t.id,"id"),t;l.require_test(/^[0-9]+:[0-9]+$/,t,"vote_id format "+t);var e=t.split(":"),r=s(e,2),n=r[0],i=r[1];return l.require_range(0,255,n,"vote type "+t),l.require_range(0,16777215,i,"vote id "+t),{type:n,id:i}},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0:0":(l.required(t),"string"==typeof t&&(t=_.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==("undefined"==typeof t?"undefined":a(t))&&(t=_.vote_id.fromObject(t)),"object"!==("undefined"==typeof e?"undefined":a(e))&&(e=_.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},_.optional=function(t){return l.required(t,"st_operation"),{fromByteBuffer:function(e){if(1===e.readUint8())return t.fromByteBuffer(e)},appendByteBuffer:function(e,r){null!==r&&void 0!==r?(e.writeUint8(1),t.appendByteBuffer(e,r)):e.writeUint8(0)},fromObject:function(e){if(void 0!==e)return t.fromObject(e)},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){return r.use_default||void 0!==e?t.toObject(e,r):void 0}();return r.annotate&&("object"===("undefined"==typeof n?"undefined":a(n))?n.__optional="parent is optional":n={__optional:n}),n}}},_.static_variant=function(t){return{nosort:!0,st_operations:t,opTypeId:function(t){var e=0,r=void 0;if("number"==typeof t)r=t;else{var n=!0,i=!1,o=void 0;try{for(var s,a=this.st_operations[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var u=s.value;if(u.operation_name===t){r=e;break}e++}}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}return r},fromByteBuffer:function(t){var e=t.readVarint32(),r=this.st_operations[e];return v&&console.error("static_variant id 0x"+e.toString(16)+" ("+e+")"),l.required(r,"operation "+e),[e,r.fromByteBuffer(t)]},appendByteBuffer:function(t,e){l.required(e);var r=this.opTypeId(e[0]),n=this.st_operations[r];l.required(n,"operation "+r),t.writeVarint32(r),n.appendByteBuffer(t,e[1])},fromObject:function(t){l.required(t);var e=this.opTypeId(t[0]),r=this.st_operations[e];return l.required(r,"operation "+e),[e,r.fromObject(t[1])]},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.use_default&&void 0===t)return[this.st_operations[0].operation_name,this.st_operations[0].toObject(void 0,e)];l.required(t);var r=this.opTypeId(t[0]),n=this.st_operations[r];return l.required(n,"operation "+r),[n.operation_name,n.toObject(t[1],e)]},compare:function(t,e){return w(this.opTypeId(t[0]),this.opTypeId(e[0]))}}},_.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},i=0;i<e.length;i++){r=e[i];var o;if(2!==r.length)throw new Error("expecting two elements");if(o=a(r[0]),["number","string"].indexOf(o)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return S(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;0<i?o++:o++)n.push([t.fromByteBuffer(r),e.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o<n.length;o++)i=n[o],t.appendByteBuffer(r,i[0]),e.appendByteBuffer(r,i[1])},fromObject:function(r){l.required(r);for(var n,i=[],o=0;o<r.length;o++)n=r[o],i.push([t.fromObject(n[0]),e.fromObject(n[1])]);return this.validate(i)},toObject:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.use_default&&void 0===r)return[[t.toObject(void 0,n),e.toObject(void 0,n)]];l.required(r),r=this.validate(r);for(var i,o=[],s=0;s<r.length;s++)i=r[s],o.push([t.toObject(i[0],n),e.toObject(i[1],n)]);return o}}},_.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:u.PublicKey.fromStringOrThrow(t)},fromByteBuffer:function(t){return d.public_key(t)},appendByteBuffer:function(t,e){l.required(e),d.public_key(t,_.public_key.toPublic(e))},fromObject:function(t){return l.required(t),t.Q?t:_.public_key.toPublic(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?u.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(l.required(t),t.toString())},compare:function(t,e){return 1*w(t.toString(),e.toString())}},_.address={_to_address:function(t){return l.required(t),t.addy?t:u.Address.fromString(t)},fromByteBuffer:function(t){return new u.Address(d.ripemd160(t))},appendByteBuffer:function(t,e){d.ripemd160(t,_.address._to_address(e).toBuffer())},fromObject:function(t){return _.address._to_address(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?u.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":_.address._to_address(t).toString()},compare:function(t,e){return-1*w(t.toString(),e.toString())}};var w=function(t,e){return t>e?1:t<e?-1:0},E=function(t){return Array.isArray(t)?t[0]:t},S=function(t,e){return e.nosort?t:e.compare?t.sort(function(t,r){return e.compare(E(t),E(r))}):t.sort(function(t,e){return"number"==typeof E(t)&&"number"==typeof E(e)?E(t)-E(e):n.isBuffer(E(t))&&n.isBuffer(E(e))?w(E(t).toString("hex"),E(e).toString("hex")):w(E(t).toString(),E(e).toString())})}}).call(e,r(5),r(100).Buffer)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){"number"==typeof t?((0,f.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString()),(0,f.default)("string"==typeof t,"number should be an actual number or string: "+("undefined"==typeof t?"undefined":a(t))),t=t.trim(),(0,f.default)(/^[0-9]*\.?[0-9]*$/.test(t),"Invalid decimal number "+t);var r=t.split("."),n=s(r,2),i=n[0],o=void 0===i?"":i,u=n[1],c=void 0===u?"":u,h=e-c.length;(0,f.default)(h>=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var l=0;l<h;l++)c+="0";for(;"0"===o.charAt(0);)o=o.substring(1);return o+c}function o(t,e){for("number"==typeof t?((0,f.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString());t.length<e+1;)t="0"+t;var r=t.substring(t.length-e);return t.substring(0,t.length-e)+(r?"."+r:"")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.toImpliedDecimal=i,e.fromImpliedDecimal=o;var u=r(104),f=n(u)},function(t,e,r){"use strict";var n,i,o,s,a,u,f,c,h,l,p,d,y,_,v,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m=r(153).Long,b=r(201),w=9007199254740991,E=-9007199254740991;t.exports=n={is_empty:i=function(t){return null===t||void 0===t},required:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))throw new Error("value required "+e+" "+t);return t},require_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!m.isLong(t))throw new Error("Long value required "+e+" "+t);return t},string:function(t){if(i(t))return t;if("string"!=typeof t)throw new Error("string required: "+t);return t},number:function(t){if(i(t))return t;if("number"!=typeof t)throw new Error("number required: "+t);return t},whole_number:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if(/\./.test(t))throw new Error("whole number required "+e+" "+t);return t},unsigned:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if(/-/.test(t))throw new Error("unsigned required "+e+" "+t);return t},is_digits:o=function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;n.no_overflow53(t,e);var r=function(){return"number"==typeof t?t:parseInt(t)}();return r},to_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:m.isLong(t)?t:(n.no_overflow64(t,e),"number"==typeof t&&(t=""+t),m.fromString(t))},to_string:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if("string"==typeof t)return t;if("number"==typeof t)return n.no_overflow53(t,e),""+t;if(m.isLong(t))return t.toString();throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":g(t))+") "+t},require_test:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(e))return e;if(!t.test(e))throw new Error("unmatched "+t+" "+r+" "+e);return e},require_match:a=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(e))return e;var n=e.match(t);if(null===n)throw new Error("unmatched "+t+" "+r+" "+e);return n},require_range:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;s(r);if(r<t||r>e)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;var o=b.object_type[e];if(!o)throw new Error("Unknown object type: "+e+", "+n+", "+r);var s=new RegExp(t+"."+o+".[0-9]+$");if(!s.test(r))throw new Error("Expecting "+e+" in format "+(t+"."+o+".[0-9]+ ")+("instead of "+r+" "+n+" "+r));return r},get_instance:c=function(t,e,r,n){return i(r)?r:(f(t,e,r,n),s(r.split(".")[2]))},require_relative_type:h=function(t,e,r){return f(0,t,e,r),e},get_relative_instance:l=function(t,e,r){return i(e)?e:(f(0,t,e,r),s(e.split(".")[2]))},require_protocol_type:p=function(t,e,r){return f(1,t,e,r),e},get_protocol_instance:d=function(t,e,r){return i(e)?e:(f(1,t,e,r),s(e.split(".")[2]))},get_protocol_type:y=function(t,e){if(i(t))return t;u(t,e);var r=t.split(".");return s(r[1])},get_protocol_type_name:function(t,e){if(i(t))return t;var r=y(t,e);return Object.keys(b.object_type)[r]},require_implementation_type:_=function(t,e,r){return f(2,t,e,r),e},get_implementation_instance:v=function(t,e,r){return i(e)?e:(f(2,t,e,r),s(e.split(".")[2]))},no_overflow53:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("number"!=typeof t){if("string"!=typeof t){if(m.isLong(t))return void n.no_overflow53(t.toInt(),e);throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":g(t))+") "+t}parseInt(t);if(t>w||t<E)throw new Error("overflow "+e+" "+t)}else if(t>w||t<E)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!m.isLong(t)){if(void 0!==t.t&&void 0!==t.s)return void n.no_overflow64(t.toString(),e);if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":g(t))+") "+t;if(t>w||t<E)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0");var r=m.fromString(t).toString();if(r!==t.trim())throw new Error("overflow "+e+" "+t)}}}}},function(t,e){"use strict";var r;t.exports=r={},r.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},r.operations={vote:0,comment:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,limit_order_create:5,limit_order_cancel:6,feed_publish:7,convert:8,account_create:9,account_update:10,witness_update:11,account_witness_vote:12,account_witness_proxy:13,pow:14,custom:15,report_over_production:16,delete_comment:17,custom_json:18,comment_options:19,set_withdraw_vesting_route:20,limit_order_create2:21,claim_account:22,create_claimed_account:23,request_account_recovery:24,recover_account:25,change_recovery_account:26,escrow_transfer:27,escrow_dispute:28,escrow_release:29,pow2:30,escrow_approve:31,transfer_to_savings:32,transfer_from_savings:33,cancel_transfer_from_savings:34,custom_binary:35,decline_voting_rights:36,reset_account:37,set_reset_account:38,claim_reward_balance:39,delegate_vesting_shares:40,account_create_with_delegation:41,witness_set_properties:42,account_update2:43,create_proposal:44,update_proposal_votes:45,remove_proposal:46,claim_reward_balance2:47,vote2:48,smt_setup:49,smt_setup_emissions:50,smt_setup_ico_tier:51,smt_set_setup_parameters:52,smt_set_runtime_parameters:53,smt_create:54,smt_contribute:55,fill_convert_request:56,author_reward:57,curation_reward:58,comment_reward:59,liquidity_reward:60,interest:61,fill_vesting_withdraw:62,fill_order:63,shutdown_witness:64,fill_transfer_from_savings:65,hardfork:66,comment_payout_update:67,return_vesting_delegation:68,comment_benefactor_reward:69},r.object_type={null:0,base:1}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(153).Long,s=r(200),a=o.fromNumber(Math.pow(2,48)-1),u=function(){function t(e,r,i){n(this,t),this.space=e,this.type=r,this.instance=i;var o=this.instance.toString(),a=this.space+"."+this.type+"."+o;if(!s.is_digits(o))throw new("Invalid object id "+a)}return i(t,[{key:"toLong",value:function(){return o.fromNumber(this.space).shiftLeft(56).or(o.fromNumber(this.type).shiftLeft(48).or(this.instance))}},{key:"appendByteBuffer",value:function(t){return t.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=s.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,s.required(e,"object_id"),"object_id");return new t(parseInt(r[1]),parseInt(r[2]),o.fromString(r[3]))}},{key:"fromLong",value:function(e){var r=e.shiftRight(56).toInt(),n=255&e.shiftRight(48).toInt(),i=e.and(a);return new t(r,n,i)}},{key:"fromByteBuffer",value:function(e){return t.fromLong(e.readUint64())}}]),t}();t.exports=u},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(198),o=n(i),s=r(195),a=n(s),u=o.default.uint8,f=o.default.uint16,c=o.default.int16,h=o.default.uint32,l=o.default.uint64,p=o.default.int64,d=o.default.uint128,y=o.default.string,_=o.default.string_binary,v=o.default.bytes,g=o.default.bool,m=o.default.array,b=o.default.static_variant,w=o.default.map,E=o.default.set,S=o.default.public_key,B=o.default.time_point_sec,k=o.default.optional,T=o.default.asset,x=o.default.asset_symbol,A=o.default.void,I=o.default.void,C=o.default.void,O=o.default.void,j=o.default.void,R=b();t.exports.operation=R;var L=function(e,r){var n=new a.default(e,r);return t.exports[e]=n},F=new L("beneficiaries",{account:y,weight:f}),U=new L(0,{beneficiaries:E(F)}),P=new L("votable_asset_options",{max_accepted_payout:p,allow_curation_rewards:g,beneficiaries:U}),M=new L(1,{votable_assets:w(x,P)}),D=new L("smt_generation_unit",{steem_unit:w(y,f),token_unit:w(y,f)}),N=new L(0,{generation_unit:D,extensions:E(A)}),q=new L("smt_emissions_unit",{token_unit:w(y,f)}),z=new L(0,{value:g}),V=new L(0,{cashout_window_seconds:h,reverse_auction_window_seconds:h}),H=new L(1,{vote_regeneration_period_seconds:h,votes_per_regeneration_period:h}),K=new L(2,{content_constant:d,percent_curation_rewards:f,author_reward_curve:p,curation_reward_curve:p}),X=new L(3,{value:g}),Y=new L("signed_transaction",{ref_block_num:f,ref_block_prefix:h,expiration:B,operations:m(R),extensions:E(A),signatures:m(v(65))}),G=(new L("signed_block",{previous:v(20),timestamp:B,witness:y,transaction_merkle_root:v(20),extensions:E(b([A,C,I,O,j])),witness_signature:v(65),transactions:m(Y)}),new L("block_header",{previous:v(20),timestamp:B,witness:y,transaction_merkle_root:v(20),extensions:E(b([A,C,I]))}),new L("signed_block_header",{previous:v(20),timestamp:B,witness:y,transaction_merkle_root:v(20),extensions:E(b([A,C,I,O,j])),witness_signature:v(65)})),W=new L("vote",{voter:y,author:y,permlink:y,weight:c}),$=new L("comment",{parent_author:y,parent_permlink:y,author:y,permlink:y,title:y,body:y,json_metadata:y}),Z=new L("transfer",{from:y,to:y,amount:T,memo:y}),J=new L("transfer_to_vesting",{from:y,to:y,amount:T}),Q=new L("withdraw_vesting",{account:y,vesting_shares:T}),tt=new L("limit_order_create",{owner:y,orderid:h,amount_to_sell:T,min_to_receive:T,fill_or_kill:g,expiration:B}),et=new L("limit_order_cancel",{owner:y,orderid:h}),rt=new L("price",{base:T,quote:T}),nt=new L("feed_publish",{publisher:y,exchange_rate:rt}),it=new L("convert",{owner:y,requestid:h,amount:T}),ot=new L("authority",{weight_threshold:h,account_auths:w(y,f),key_auths:w(S,f)}),st=new L("account_create",{fee:T,creator:y,new_account_name:y,owner:ot,active:ot,posting:ot,memo_key:S,json_metadata:y}),at=new L("account_update",{account:y,owner:k(ot),active:k(ot),posting:k(ot),memo_key:S,json_metadata:y}),ut=new L("chain_properties",{account_creation_fee:T,maximum_block_size:h,sbd_interest_rate:f}),ft=new L("witness_update",{owner:y,url:y,block_signing_key:S,props:ut,fee:T}),ct=new L("account_witness_vote",{account:y,witness:y,approve:g}),ht=new L("account_witness_proxy",{account:y,
14
- proxy:y}),lt=new L("pow",{worker:S,input:v(32),signature:v(65),work:v(32)}),pt=new L("custom",{required_auths:E(y),id:f,data:v()}),dt=new L("report_over_production",{reporter:y,first_block:G,second_block:G}),yt=new L("delete_comment",{author:y,permlink:y}),_t=new L("custom_json",{required_auths:E(y),required_posting_auths:E(y),id:y,json:y}),vt=new L("comment_options",{author:y,permlink:y,max_accepted_payout:T,percent_steem_dollars:f,allow_votes:g,allow_curation_rewards:g,extensions:E(b([U,M]))}),gt=new L("set_withdraw_vesting_route",{from_account:y,to_account:y,percent:f,auto_vest:g}),mt=new L("limit_order_create2",{owner:y,orderid:h,amount_to_sell:T,exchange_rate:rt,fill_or_kill:g,expiration:B}),bt=new L("claim_account",{creator:y,fee:T,extensions:E(A)}),wt=new L("create_claimed_account",{creator:y,new_account_name:y,owner:ot,active:ot,posting:ot,memo_key:S,json_metadata:y,extensions:E(A)}),Et=new L("request_account_recovery",{recovery_account:y,account_to_recover:y,new_owner_authority:ot,extensions:E(A)}),St=new L("recover_account",{account_to_recover:y,new_owner_authority:ot,recent_owner_authority:ot,extensions:E(A)}),Bt=new L("change_recovery_account",{account_to_recover:y,new_recovery_account:y,extensions:E(A)}),kt=new L("escrow_transfer",{from:y,to:y,sbd_amount:T,steem_amount:T,escrow_id:h,agent:y,fee:T,json_meta:y,ratification_deadline:B,escrow_expiration:B}),Tt=new L("escrow_dispute",{from:y,to:y,agent:y,who:y,escrow_id:h}),xt=new L("escrow_release",{from:y,to:y,agent:y,who:y,receiver:y,escrow_id:h,sbd_amount:T,steem_amount:T}),At=new L("pow2_input",{worker_account:y,prev_block:v(20),nonce:l}),It=new L("pow2",{input:At,pow_summary:h}),Ct=new L("equihash_proof",{n:h,k:h,seed:v(32),inputs:m(h)}),Ot=(new L("equihash_pow",{input:At,proof:Ct,prev_block:v(20),pow_summary:h}),new L("escrow_approve",{from:y,to:y,agent:y,who:y,escrow_id:h,approve:g})),jt=new L("transfer_to_savings",{from:y,to:y,amount:T,memo:y}),Rt=new L("transfer_from_savings",{from:y,request_id:h,to:y,amount:T,memo:y}),Lt=new L("cancel_transfer_from_savings",{from:y,request_id:h}),Ft=new L("custom_binary",{required_owner_auths:E(y),required_active_auths:E(y),required_posting_auths:E(y),required_auths:m(ot),id:y,data:v()}),Ut=new L("decline_voting_rights",{account:y,decline:g}),Pt=new L("reset_account",{reset_account:y,account_to_reset:y,new_owner_authority:ot}),Mt=new L("set_reset_account",{account:y,current_reset_account:y,reset_account:y}),Dt=new L("claim_reward_balance",{account:y,reward_steem:T,reward_sbd:T,reward_vests:T}),Nt=new L("delegate_vesting_shares",{delegator:y,delegatee:y,vesting_shares:T}),qt=new L("account_create_with_delegation",{fee:T,delegation:T,creator:y,new_account_name:y,owner:ot,active:ot,posting:ot,memo_key:S,json_metadata:y,extensions:E(A)}),zt=new L("witness_set_properties",{owner:y,props:y,extensions:E(A)}),Vt=new L("account_update2",{account:y,owner:k(ot),active:k(ot),posting:k(ot),memo_key:k(S),json_metadata:y,posting_json_metadata:y,extensions:E(A)}),Ht=new L("create_proposal",{creator:y,receiver:y,start_date:B,end_date:B,daily_pay:T,subject:y,permlink:y,extensions:E(A)}),Kt=new L("update_proposal_votes",{voter:y,proposal_ids:m(l),approve:g,extensions:E(A)}),Xt=new L("remove_proposal",{proposal_owner:y,proposal_ids:m(l),extensions:E(A)}),Yt=new L("claim_reward_balance2",{account:y,reward_tokens:m(T),extensions:E(A)}),Gt=new L("vote2",{voter:y,author:y,permlink:y,rshares:w(x,p),extensions:E(A)}),Wt=new L("smt_create",{control_account:y,symbol:x,smt_creation_fee:T,precision:u,extensions:E(A)}),$t=new L("smt_setup",{control_account:y,symbol:x,max_supply:p,contribution_begin_time:B,contribution_end_time:B,launch_time:B,steem_units_min:p,min_unit_ratio:h,max_unit_ratio:h,extensions:E(A)}),Zt=new L("smt_setup_emissions",{control_account:y,symbol:x,schedule_time:B,emissions_unit:q,interval_seconds:h,emission_count:h,lep_time:B,rep_time:B,lep_abs_amount:p,rep_abs_amount:p,lep_rel_amount_numerator:h,rep_rel_amount_numerator:h,rel_amount_denom_bits:u,remove:g,floor_emissions:g,extensions:E(A)}),Jt=new L("smt_setup_ico_tier",{control_account:y,symbol:x,steem_units_cap:p,generation_policy:b([N]),remove:g,extensions:E(A)}),Qt=new L("smt_set_setup_parameters",{control_account:y,symbol:x,setup_parameters:E(b([z])),extensions:E(A)}),te=new L("smt_set_runtime_parameters",{control_account:y,symbol:x,runtime_parameters:E(b([V,H,K,X])),extensions:E(A)}),ee=new L("smt_contribute",{contributor:y,symbol:x,contribution_id:h,contribution:T,extensions:E(A)}),re=new L("fill_convert_request",{owner:y,requestid:h,amount_in:T,amount_out:T}),ne=new L("author_reward",{author:y,permlink:y,sbd_payout:T,steem_payout:T,vesting_payout:T}),ie=new L("curation_reward",{curator:y,reward:T,comment_author:y,comment_permlink:y}),oe=new L("comment_reward",{author:y,permlink:y,payout:T}),se=new L("liquidity_reward",{owner:y,payout:T}),ae=new L("interest",{owner:y,interest:T}),ue=new L("fill_vesting_withdraw",{from_account:y,to_account:y,withdrawn:T,deposited:T}),fe=new L("fill_order",{current_owner:y,current_orderid:h,current_pays:T,open_owner:y,open_orderid:h,open_pays:T}),ce=new L("shutdown_witness",{owner:y}),he=new L("fill_transfer_from_savings",{from:y,to:y,amount:T,request_id:h,memo:y}),le=new L("hardfork",{hardfork_id:h}),pe=new L("comment_payout_update",{author:y,permlink:y}),de=new L("return_vesting_delegation",{account:y,vesting_shares:T}),ye=new L("comment_benefactor_reward",{benefactor:y,author:y,permlink:y,reward:T});R.st_operations=[W,$,Z,J,Q,tt,et,nt,it,st,at,ft,ct,ht,lt,pt,dt,yt,_t,vt,gt,mt,bt,wt,Et,St,Bt,kt,Tt,xt,It,Ot,jt,Rt,Lt,Ft,Ut,Pt,Mt,Dt,Nt,qt,zt,Vt,Ht,Kt,Xt,Yt,Gt,$t,Zt,Jt,Qt,te,Wt,ee,re,ne,ie,oe,se,ae,ue,fe,ce,he,le,pe,de,ye];new L("transaction",{ref_block_num:f,ref_block_prefix:h,expiration:B,operations:m(R),extensions:E(A)}),new L("encrypted_memo",{from:S,to:S,nonce:l,check:h,encrypted:_})},function(t,e){"use strict";t.exports=function(t){var e=t.toObject(void 0,{use_default:!0,annotate:!0});console.error(JSON.stringify(e,null,4)),e=t.toObject(void 0,{use_default:!0,annotate:!1}),console.error(JSON.stringify(e))}},function(t,e,r){(function(t){"use strict";function n(t,r,n,i,o){var s=c.createHash("sha256");s.update(t),s.update(r),s.update(n),s.update(i);var a=c.createHash("sha256");return a.update(e.K),a.update(s.digest()),a.update(o),a.digest()}function i(e,r,i){if(!e.params)throw new Error("Unable to sign a request without params");for(var o=t.from(JSON.stringify(e.params),"utf8").toString("base64"),s=c.randomBytes(8),a=s.toString("hex"),u=(new Date).toISOString(),h=n(u,r,e.method,o,s),l=[],p=0,d=i;p<d.length;p++){var y=d[p];"string"==typeof y&&(y=f.PrivateKey.from(y));var _=f.hexify(y.sign(h.buffer));l.push(_)}return{jsonrpc:"2.0",method:e.method,id:e.id,params:{__signed:{account:r,nonce:a,params:o,signatures:l,timestamp:u}}}}function o(e,r){return a(this,void 0,void 0,function(){var i,o,s,a,f,c,l;return u(this,function(u){switch(u.label){case 0:if("2.0"!==e.jsonrpc||"string"!=typeof e.method)throw new h("Invalid JSON RPC Request");if(void 0==e.params||void 0==e.params.__signed)throw new h("Signed payload missing");if(1!==Object.keys(e.params).length)throw new h("Invalid request params");if(i=e.params.__signed,void 0==i.account)throw new h("Missing account");try{s=t.from(i.params,"base64").toString("utf8"),o=JSON.parse(s)}catch(t){throw new h("Invalid encoded params",t)}if(void 0==i.nonce||"string"!=typeof i.nonce)throw new h("Invalid nonce");if(a=t.from(i.nonce,"hex"),8!==a.length)throw new h("Invalid nonce");if(f=Date.parse(i.timestamp),Number.isNaN(f))throw new h("Invalid timestamp");if(Date.now()-f>6e4)throw new h("Signature expired");c=n(i.timestamp,i.account,e.method,i.params,a),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,r(c,i.signatures,i.account)];case 2:return u.sent(),[3,4];case 3:throw l=u.sent(),new h("Verification failed",l);case 4:return[2,o]}})})}var s=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}u((n=n.apply(t,e||[])).next())})},u=function(t,e){function r(t){return function(e){return n([t,e])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(s=o[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(t,u)}catch(t){r=[6,t],o=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,o,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(e,"__esModule",{value:!0});var f=r(206),c=r(207);e.K=t.from("3b3b081e46ea808d5a96b08c4bc5003f5e15767090f344faab531ec57565136b","hex");var h=function(t){function e(e,r){var n=t.call(this,e)||this;return n.name="ValidationError",r&&(n.cause=r,n.message+=" ("+r.message+")"),n}return s(e,t),e}(Error);e.sign=i,e.validate=o}).call(e,r(100).Buffer)},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,r){"object"===n(e)&&"string"!=typeof e.nodeName?r(e):(t.steemit=t.steemit||{},r(t.steemit.crypto={}))}("undefined"!=typeof self?self:void 0,function(e){function i(t,e){this.getPublicKey=function(){return e||(e=d.ecc.ecdsa.generateKeys(d.ecc.curves.k256,void 0,d.bn.fromBits(t.get())).pub),new o(e)},this.sign=function(e){return p(d.codec.steemit.signRecoverably(t,l(e)))}}function o(t){this._p=t}function s(){var t=d.ecc.ecdsa.generateKeys(d.ecc.curves.k256);return h(t)}function a(t,e){var r=d.codec.steemit.keysFromPassword(t,e);return{owner:h(r.owner),memo:h(r.memo),posting:h(r.posting),active:h(r.active)}}function u(t){return p(d.hash.sha256.hash(l(t)))}function f(t){return p(d.hash.ripemd160.hash(l(t)))}function c(t){for(var e="",r=new Uint8Array(t),n=0;n<r.byteLength;n++)r[n]<16&&(e+="0"),e+=r[n].toString(16);return e}function h(t){return{private:d.codec.steemit.serializePrivateKey(t.sec),public:d.codec.steemit.serializePublicKey(t.pub)}}function l(t){if(t instanceof ArrayBuffer)return d.codec.arrayBuffer.toBits(t);throw new Error("You must supply an ArrayBuffer")}function p(t){return d.codec.arrayBuffer.fromBits(t,0,0)}e.PrivateKey=i,e.PublicKey=o,e.generateKeys=s,e.keysFromPassword=a,e.sha256=u,e.ripemd160=f,e.hexify=c;var d=function(){var e={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};e.bitArray={bitSlice:function(t,r,n){return t=e.bitArray._shiftRight(t.slice(r/32),32-(31&r)).slice(1),void 0===n?t:e.bitArray.clamp(t,n-r)},extract:function(t,e,r){var n,i=Math.floor(-e-r&31);return n=(e+r-1^e)&-32?t[e/32|0]<<32-i^t[e/32+1|0]>>>i:t[e/32|0]>>>i,n&(1<<r)-1},concat:function(t,r){if(0===t.length||0===r.length)return t.concat(r);var n=t[t.length-1],i=e.bitArray.getPartial(n);return 32===i?t.concat(r):e.bitArray._shiftRight(r,i,0|n,t.slice(0,t.length-1))},bitLength:function(t){var r,n=t.length;return 0===n?0:(r=t[n-1],32*(n-1)+e.bitArray.getPartial(r))},clamp:function(t,r){if(32*t.length<r)return t;t=t.slice(0,Math.ceil(r/32));var n=t.length;return r&=31,n>0&&r&&(t[n-1]=e.bitArray.partial(r,t[n-1]&2147483648>>r-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,r){if(e.bitArray.bitLength(t)!==e.bitArray.bitLength(r))return!1;var n,i=0;for(n=0;n<t.length;n++)i|=t[n]^r[n];return 0===i},_shiftRight:function(t,r,n,i){var o,s,a=0;for(void 0===i&&(i=[]);r>=32;r-=32)i.push(n),n=0;if(0===r)return i.concat(t);for(o=0;o<t.length;o++)i.push(n|t[o]>>>r),n=t[o]<<32-r;return a=t.length?t[t.length-1]:0,s=e.bitArray.getPartial(a),i.push(e.bitArray.partial(r+s&31,r+s>32?n:i.pop(),1)),i},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,r,n=65280;for(e=0;e<t.length;++e)r=t[e],t[e]=r>>>24|r>>>8&n|(r&n)<<8|r<<24;return t}},e.cipher.aes=function(t){this._tables[0][0][0]||this._precompute();var r,n,i,o,s,a=this._tables[0][4],u=this._tables[1],f=t.length,c=1;if(4!==f&&6!==f&&8!==f)throw new e.exception.invalid("invalid aes key size");for(this._key=[o=t.slice(0),s=[]],r=f;r<4*f+28;r++)i=o[r-1],(r%f===0||8===f&&r%f===4)&&(i=a[i>>>24]<<24^a[i>>16&255]<<16^a[i>>8&255]<<8^a[255&i],r%f===0&&(i=i<<8^i>>>24^c<<24,c=c<<1^283*(c>>7))),o[r]=o[r-f]^i;for(n=0;r;n++,r--)i=o[3&n?r:r-4],r<=4||n<4?s[n]=i:s[n]=u[0][a[i>>>24]]^u[1][a[i>>16&255]]^u[2][a[i>>8&255]]^u[3][a[255&i]]},e.cipher.aes.prototype={encrypt:function(t){return this._crypt(t,0)},decrypt:function(t){return this._crypt(t,1)},_tables:[[[],[],[],[],[]],[[],[],[],[],[]]],_precompute:function(){var t,e,r,n,i,o,s,a,u,f=this._tables[0],c=this._tables[1],h=f[4],l=c[4],p=[],d=[];for(t=0;t<256;t++)d[(p[t]=t<<1^283*(t>>7))^t]=t;for(e=r=0;!h[e];e^=n||1,r=d[r]||1)for(s=r^r<<1^r<<2^r<<3^r<<4,s=s>>8^255&s^99,h[e]=s,l[s]=e,o=p[i=p[n=p[e]]],u=16843009*o^65537*i^257*n^16843008*e,a=257*p[s]^16843008*s,t=0;t<4;t++)f[t][e]=a=a<<24^a>>>8,c[t][s]=u=u<<24^u>>>8;for(t=0;t<5;t++)f[t]=f[t].slice(0),c[t]=c[t].slice(0)},_crypt:function(t,r){if(4!==t.length)throw new e.exception.invalid("invalid aes block size");var n,i,o,s,a=this._key[r],u=t[0]^a[0],f=t[r?3:1]^a[1],c=t[2]^a[2],h=t[r?1:3]^a[3],l=a.length/4-2,p=4,d=[0,0,0,0],y=this._tables[r],_=y[0],v=y[1],g=y[2],m=y[3],b=y[4];for(s=0;s<l;s++)n=_[u>>>24]^v[f>>16&255]^g[c>>8&255]^m[255&h]^a[p],i=_[f>>>24]^v[c>>16&255]^g[h>>8&255]^m[255&u]^a[p+1],o=_[c>>>24]^v[h>>16&255]^g[u>>8&255]^m[255&f]^a[p+2],h=_[h>>>24]^v[u>>16&255]^g[f>>8&255]^m[255&c]^a[p+3],p+=4,u=n,f=i,c=o;for(s=0;s<4;s++)d[r?3&-s:s]=b[u>>>24]<<24^b[f>>16&255]<<16^b[c>>8&255]<<8^b[255&h]^a[p++],n=u,u=f,f=c,c=h,h=n;return d}},e.bn=function(t){this.initWith(t)},e.bn.prototype={radix:24,maxMul:8,_class:e.bn,copy:function(){return new this._class(this)},initWith:function(t){var e,r=0;switch("undefined"==typeof t?"undefined":n(t)){case"object":this.limbs=t.limbs.slice(0);break;case"number":this.limbs=[t],this.normalize();break;case"string":for(t=t.replace(/^0x/,""),this.limbs=[],e=this.radix/4,r=0;r<t.length;r+=e)this.limbs.push(parseInt(t.substring(Math.max(t.length-r-e,0),t.length-r),16));break;default:this.limbs=[0]}return this},equals:function(t){"number"==typeof t&&(t=new this._class(t));var e,r=0;for(this.fullReduce(),t.fullReduce(),e=0;e<this.limbs.length||e<t.limbs.length;e++)r|=this.getLimb(e)^t.getLimb(e);return 0===r},getLimb:function(t){return t>=this.limbs.length?0:this.limbs[t]},greaterEquals:function(t){"number"==typeof t&&(t=new this._class(t));var e,r,n,i=0,o=0;for(e=Math.max(this.limbs.length,t.limbs.length)-1;e>=0;e--)r=this.getLimb(e),n=t.getLimb(e),o|=n-r&~i,i|=r-n&~o;return(o|~i)>>>31},toString:function(){this.fullReduce();var t,e,r="",n=this.limbs;for(t=0;t<this.limbs.length;t++){for(e=n[t].toString(16);t<this.limbs.length-1&&e.length<6;)e="0"+e;r=e+r}return"0x"+r},addM:function(t){"object"!==("undefined"==typeof t?"undefined":n(t))&&(t=new this._class(t));var e,r=this.limbs,i=t.limbs;for(e=r.length;e<i.length;e++)r[e]=0;for(e=0;e<i.length;e++)r[e]+=i[e];return this},doubleM:function(){var t,e,r=0,n=this.radix,i=this.radixMask,o=this.limbs;for(t=0;t<o.length;t++)e=o[t],e=e+e+r,o[t]=e&i,r=e>>n;return r&&o.push(r),this},halveM:function(){var t,e,r=0,n=this.radix,i=this.limbs;for(t=i.length-1;t>=0;t--)e=i[t],i[t]=e+r>>1,r=(1&e)<<n;return i[i.length-1]||i.pop(),this},subM:function(t){"object"!==("undefined"==typeof t?"undefined":n(t))&&(t=new this._class(t));var e,r=this.limbs,i=t.limbs;for(e=r.length;e<i.length;e++)r[e]=0;for(e=0;e<i.length;e++)r[e]-=i[e];return this},mod:function(t){var r=!this.greaterEquals(new e.bn(0));t=new e.bn(t).normalize();var n=new e.bn(this).normalize(),i=0;for(r&&(n=new e.bn(0).subM(n).normalize());n.greaterEquals(t);i++)t.doubleM();for(r&&(n=t.sub(n).normalize());i>0;i--)t.halveM(),n.greaterEquals(t)&&n.subM(t).normalize();return n.trim()},inverseMod:function(t){var r,n,i=new e.bn(1),o=new e.bn(0),s=new e.bn(this),a=new e.bn(t),u=1;if(!(1&t.limbs[0]))throw new e.exception.invalid("inverseMod: p must be odd");do for(1&s.limbs[0]&&(s.greaterEquals(a)||(r=s,s=a,a=r,r=i,i=o,o=r),s.subM(a),s.normalize(),i.greaterEquals(o)||i.addM(t),i.subM(o)),s.halveM(),1&i.limbs[0]&&i.addM(t),i.normalize(),i.halveM(),n=u=0;n<s.limbs.length;n++)u|=s.limbs[n];while(u);if(!a.equals(1))throw new e.exception.invalid("inverseMod: p and x must be relatively prime");return o},add:function(t){return this.copy().addM(t)},sub:function(t){return this.copy().subM(t)},mul:function(t){"number"==typeof t&&(t=new this._class(t));var e,r,n,i=this.limbs,o=t.limbs,s=i.length,a=o.length,u=new this._class,f=u.limbs,c=this.maxMul;for(e=0;e<this.limbs.length+t.limbs.length+1;e++)f[e]=0;for(e=0;e<s;e++){for(n=i[e],r=0;r<a;r++)f[e+r]+=n*o[r];--c||(c=this.maxMul,u.cnormalize())}return u.cnormalize().reduce()},square:function(){return this.mul(this)},power:function(t){t=new e.bn(t).normalize().trim().limbs;var r,n,i=new this._class(1),o=this;for(r=0;r<t.length;r++)for(n=0;n<this.radix&&(t[r]&1<<n&&(i=i.mul(o)),r!=t.length-1||t[r]>>n+1!=0);n++)o=o.square();return i},mulmod:function(t,e){return this.mod(e).mul(t.mod(e)).mod(e)},powermod:function(t,r){if(t=new e.bn(t),r=new e.bn(r),1==(1&r.limbs[0])){var n=this.montpowermod(t,r);if(0!=n)return n}var i,o,s=t.normalize().trim().limbs,a=new this._class(1),u=this;for(i=0;i<s.length;i++)for(o=0;o<this.radix&&(s[i]&1<<o&&(a=a.mulmod(u,r)),i!=s.length-1||s[i]>>o+1!=0);o++)u=u.mulmod(u,r);return a},montpowermod:function(t,r){t=new e.bn(t).normalize().trim(),r=new e.bn(r);var n,i,o,s,a,u=this.radix,f=new this._class(1),c=this.copy(),h=t.bitLength();for(o=new e.bn({limbs:r.copy().normalize().trim().limbs.map(function(){return 0})}),s=this.radix;s>0;s--)if(1==(r.limbs[r.limbs.length-1]>>s&1)){o.limbs[o.limbs.length-1]=1<<s;break}if(0==h)return this;a=h<18?1:h<48?3:h<144?4:h<768?5:6;for(var l=o.copy(),p=r.copy(),d=new e.bn(1),y=new e.bn(0),_=o.copy();_.greaterEquals(1);)_.halveM(),0==(1&d.limbs[0])?(d.halveM(),y.halveM()):(d.addM(p),d.halveM(),y.halveM(),y.addM(l));d=d.normalize(),y=y.normalize(),l.doubleM();var v=l.mulmod(l,r);if(!l.mul(d).sub(r.mul(y)).equals(1))return!1;var g=function(t){return m(t,v)},m=function(t,e){var n,i,a,f,c=(1<<s+1)-1;for(i=t.mul(e),a=i.mul(y),a.limbs=a.limbs.slice(0,o.limbs.length),a.limbs.length==o.limbs.length&&(a.limbs[o.limbs.length-1]&=c),a=a.mul(r),f=i.add(a).normalize().trim(),f.limbs=f.limbs.slice(o.limbs.length-1),n=0;n<f.limbs.length;n++)n>0&&(f.limbs[n-1]|=(f.limbs[n]&c)<<u-s-1),f.limbs[n]=f.limbs[n]>>s+1;return f.greaterEquals(r)&&f.subM(r),f},b=function(t){return m(t,1)};c=g(c),f=g(f);var w,E={},S=(1<<a-1)-1;for(E[1]=c.copy(),E[2]=m(c,c),w=1;w<=S;w++)E[2*w+1]=m(E[2*w-1],E[2]);var B=function(t,e){var r=e%t.radix;return(t.limbs[Math.floor(e/t.radix)]&1<<r)>>r};for(n=t.bitLength()-1;n>=0;)if(0==B(t,n))f=m(f,f),n-=1;else{for(var k=n-a+1;0==B(t,k);)k++;var T=0;for(i=k;i<=n;i++)T+=B(t,i)<<i-k,f=m(f,f);f=m(f,E[T]),n=k-1}return b(f)},trim:function(){var t,e=this.limbs;do t=e.pop();while(e.length&&0===t);return e.push(t),this},reduce:function(){return this},fullReduce:function(){return this.normalize()},normalize:function(){var t,e,r,n=0,i=this.placeVal,o=this.ipv,s=this.limbs,a=s.length,u=this.radixMask;for(t=0;t<a||0!==n&&n!==-1;t++)e=(s[t]||0)+n,r=s[t]=e&u,n=(e-r)*o;return n===-1&&(s[t-1]-=i),this.trim(),this},cnormalize:function(){var t,e,r,n=0,i=this.ipv,o=this.limbs,s=o.length,a=this.radixMask;for(t=0;t<s-1;t++)e=o[t]+n,r=o[t]=e&a,n=(e-r)*i;return o[t]+=n,this},toBits:function(t){this.fullReduce(),t=t||this.exponent||this.bitLength();var r=Math.floor((t-1)/24),n=e.bitArray,i=(t+7&-8)%this.radix||this.radix,o=[n.partial(i,this.getLimb(r))];for(r--;r>=0;r--)o=n.concat(o,[n.partial(Math.min(this.radix,t),this.getLimb(r))]),t-=this.radix;return o},bitLength:function(){this.fullReduce();for(var t=this.radix*(this.limbs.length-1),e=this.limbs[this.limbs.length-1];e;e>>>=1)t++;return t+7&-8}},e.bn.fromBits=function(t){var r=this,n=new r,i=[],o=e.bitArray,s=this.prototype,a=Math.min(this.bitLength||4294967296,o.bitLength(t)),u=a%s.radix||s.radix;for(i[0]=o.extract(t,0,u);u<a;u+=s.radix)i.unshift(o.extract(t,u,s.radix));return n.limbs=i,n},e.bn.prototype.ipv=1/(e.bn.prototype.placeVal=Math.pow(2,e.bn.prototype.radix)),e.bn.prototype.radixMask=(1<<e.bn.prototype.radix)-1,e.bn.pseudoMersennePrime=function(t,r){function n(t){this.initWith(t)}var i,o,s,a=n.prototype=new e.bn;for(s=a.modOffset=Math.ceil(o=t/a.radix),a.exponent=t,a.offset=[],a.factor=[],a.minOffset=s,a.fullMask=0,a.fullOffset=[],a.fullFactor=[],a.modulus=n.modulus=new e.bn(Math.pow(2,t)),a.fullMask=0|-Math.pow(2,t%a.radix),i=0;i<r.length;i++)a.offset[i]=Math.floor(r[i][0]/a.radix-o),a.fullOffset[i]=Math.ceil(r[i][0]/a.radix-o),a.factor[i]=r[i][1]*Math.pow(.5,t-r[i][0]+a.offset[i]*a.radix),a.fullFactor[i]=r[i][1]*Math.pow(.5,t-r[i][0]+a.fullOffset[i]*a.radix),a.modulus.addM(new e.bn(Math.pow(2,r[i][0])*r[i][1])),a.minOffset=Math.min(a.minOffset,-a.offset[i]);return a._class=n,a.modulus.cnormalize(),a.reduce=function(){var t,e,r,n,i=this.modOffset,o=this.limbs,s=this.offset,a=this.offset.length,u=this.factor;for(t=this.minOffset;o.length>i;){for(r=o.pop(),n=o.length,e=0;e<a;e++)o[n+s[e]]-=u[e]*r;t--,t||(o.push(0),this.cnormalize(),t=this.minOffset)}return this.cnormalize(),this},a._strongReduce=a.fullMask===-1?a.reduce:function(){var t,e,r=this.limbs,n=r.length-1;if(this.reduce(),n===this.modOffset-1){for(e=r[n]&this.fullMask,r[n]-=e,t=0;t<this.fullOffset.length;t++)r[n+this.fullOffset[t]]-=this.fullFactor[t]*e;this.normalize()}},a.fullReduce=function(){var t,e;for(this._strongReduce(),this.addM(this.modulus),this.addM(this.modulus),this.normalize(),this._strongReduce(),e=this.limbs.length;e<this.modOffset;e++)this.limbs[e]=0;for(t=this.greaterEquals(this.modulus),e=0;e<this.limbs.length;e++)this.limbs[e]-=this.modulus.limbs[e]*t;return this.cnormalize(),this},a.inverse=function(){return this.power(this.modulus.sub(2))},n.fromBits=e.bn.fromBits,n};var i=e.bn.pseudoMersennePrime;return e.bn.prime={p127:i(127,[[0,-1]]),p25519:i(255,[[0,-19]]),p192k:i(192,[[32,-1],[12,-1],[8,-1],[7,-1],[6,-1],[3,-1],[0,-1]]),p224k:i(224,[[32,-1],[12,-1],[11,-1],[9,-1],[7,-1],[4,-1],[1,-1],[0,-1]]),p256k:i(256,[[32,-1],[9,-1],[8,-1],[7,-1],[6,-1],[4,-1],[0,-1]]),p192:i(192,[[0,-1],[64,-1]]),p224:i(224,[[0,1],[96,-1]]),p256:i(256,[[0,-1],[96,1],[192,1],[224,-1]]),p384:i(384,[[0,-1],[32,1],[96,-1],[128,-1]]),p521:i(521,[[0,-1]])},e.bn.random=function(t,r){"object"!==("undefined"==typeof t?"undefined":n(t))&&(t=new e.bn(t));for(var i,o,s=t.limbs.length,a=t.limbs[s-1]+1,u=new e.bn;;){do i=e.random.randomWords(s,r),i[s-1]<0&&(i[s-1]+=4294967296);while(Math.floor(i[s-1]/a)===Math.floor(4294967296/a));for(i[s-1]%=a,o=0;o<s-1;o++)i[o]&=t.radixMask;if(u.limbs=i,!u.greaterEquals(t))return u}},"undefined"==typeof ArrayBuffer&&!function(t){t.ArrayBuffer=function(){},t.DataView=function(){}}(this),e.codec.arrayBuffer={fromBits:function(t,r,n){var i,o,s,a,u;if(r=void 0==r||r,n=n||8,0===t.length)return new ArrayBuffer(0);if(s=e.bitArray.bitLength(t)/8,e.bitArray.bitLength(t)%8!==0)throw new e.exception.invalid("Invalid bit size, must be divisble by 8 to fit in an arraybuffer correctly");for(r&&s%n!==0&&(s+=n-s%n),a=new DataView(new ArrayBuffer(4*t.length)),o=0;o<t.length;o++)a.setUint32(4*o,t[o]<<32);if(i=new DataView(new ArrayBuffer(s)),i.byteLength===a.byteLength)return a.buffer;for(u=a.byteLength<i.byteLength?a.byteLength:i.byteLength,o=0;o<u;o++)i.setUint8(o,a.getUint8(o));return i.buffer},toBits:function(t){var r,n,i,o,s=[];if(0===t.byteLength)return[];i=new DataView(t),n=i.byteLength-i.byteLength%4;for(var r=0;r<n;r+=4)s.push(i.getUint32(r));if(i.byteLength%4!=0){o=new DataView(new ArrayBuffer(4));for(var r=0,a=i.byteLength%4;r<a;r++)o.setUint8(r+4-a,i.getUint8(n+r));s.push(e.bitArray.partial(i.byteLength%4*8,o.getUint32(0)))}return s},hexDumpBuffer:function(t){for(var e=new DataView(t),r="",i=function(t,e){return t+="",t.length>=e?t:new Array(e-t.length+1).join("0")+t},o=0;o<e.byteLength;o+=2)o%16==0&&(r+="\n"+o.toString(16)+"\t"),r+=i(e.getUint16(o).toString(16),4)+" ";void 0===("undefined"==typeof console?"undefined":n(console))&&(console=console||{log:function(){}}),console.log(r.toUpperCase())}},e.codec.utf8String={fromBits:function(t){var r,n,i="",o=e.bitArray.bitLength(t);for(r=0;r<o/8;r++)0===(3&r)&&(n=t[r/4]),i+=String.fromCharCode(n>>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(i))},toBits:function(t){t=unescape(encodeURIComponent(t));var r,n=[],i=0;for(r=0;r<t.length;r++)i=i<<8|t.charCodeAt(r),3===(3&r)&&(n.push(i),i=0);return 3&r&&n.push(e.bitArray.partial(8*(3&r),i)),n}},e.ecc={},e.ecc.point=function(t,r,n){void 0===r?this.isIdentity=!0:(r instanceof e.bn&&(r=new t.field(r)),n instanceof e.bn&&(n=new t.field(n)),this.x=r,this.y=n,this.isIdentity=!1),this.curve=t},e.ecc.point.prototype={toJac:function(){return new e.ecc.pointJac(this.curve,this.x,this.y,new this.curve.field(1))},mult:function(t){return this.toJac().mult(t,this).toAffine()},mult2:function(t,e,r){return this.toJac().mult2(t,this,e,r).toAffine()},multiples:function(){var t,r,n;if(void 0===this._multiples)for(n=this.toJac().doubl(),t=this._multiples=[new e.ecc.point(this.curve),this,n.toAffine()],r=3;r<16;r++)n=n.add(this),t.push(n.toAffine());return this._multiples},negate:function(){var t=new this.curve.field(0).sub(this.y).normalize().reduce();return new e.ecc.point(this.curve,this.x,t)},isValid:function(){return this.y.square().equals(this.curve.b.add(this.x.mul(this.curve.a.add(this.x.square()))))},toBits:function(){return e.bitArray.concat(this.x.toBits(),this.y.toBits())}},e.ecc.pointJac=function(t,e,r,n){void 0===e?this.isIdentity=!0:(this.x=e,this.y=r,this.z=n,this.isIdentity=!1),this.curve=t},e.ecc.pointJac.prototype={add:function(t){var r,n,i,o,s,a,u,f,c,h,l,p=this;if(p.curve!==t.curve)throw new e.exception.invalid("sjcl.ecc.add(): Points must be on the same curve to add them!");return p.isIdentity?t.toJac():t.isIdentity?p:(r=p.z.square(),n=t.x.mul(r).subM(p.x),n.equals(0)?p.y.equals(t.y.mul(r.mul(p.z)))?p.doubl():new e.ecc.pointJac(p.curve):(i=t.y.mul(r.mul(p.z)).subM(p.y),o=n.square(),s=i.square(),a=n.square().mul(n).addM(p.x.add(p.x).mul(o)),u=s.subM(a),f=p.x.mul(o).subM(u).mul(i),c=p.y.mul(n.square().mul(n)),h=f.subM(c),l=p.z.mul(n),new e.ecc.pointJac(this.curve,u,h,l)))},doubl:function(){if(this.isIdentity)return this;var t=this.y.square(),r=t.mul(this.x.mul(4)),n=t.square().mul(8),i=this.z.square(),o=this.curve.a.toString()==new e.bn(-3).toString()?this.x.sub(i).mul(3).mul(this.x.add(i)):this.x.square().mul(3).add(i.square().mul(this.curve.a)),s=o.square().subM(r).subM(r),a=r.sub(s).mul(o).subM(n),u=this.y.add(this.y).mul(this.z);return new e.ecc.pointJac(this.curve,s,a,u)},toAffine:function(){if(this.isIdentity||this.z.equals(0))return new e.ecc.point(this.curve);var t=this.z.inverse(),r=t.square();return new e.ecc.point(this.curve,this.x.mul(r).fullReduce(),this.y.mul(r.mul(t)).fullReduce())},mult:function(t,r){"number"==typeof t?t=[t]:void 0!==t.limbs&&(t=t.normalize().limbs);var n,i,o=new e.ecc.point(this.curve).toJac(),s=r.multiples();for(n=t.length-1;n>=0;n--)for(i=e.bn.prototype.radix-4;i>=0;i-=4)o=o.doubl().doubl().doubl().doubl().add(s[t[n]>>i&15]);return o},mult2:function(t,r,n,i){"number"==typeof t?t=[t]:void 0!==t.limbs&&(t=t.normalize().limbs),"number"==typeof n?n=[n]:void 0!==n.limbs&&(n=n.normalize().limbs);var o,s,a,u,f=new e.ecc.point(this.curve).toJac(),c=r.multiples(),h=i.multiples();for(o=Math.max(t.length,n.length)-1;o>=0;o--)for(a=0|t[o],u=0|n[o],s=e.bn.prototype.radix-4;s>=0;s-=4)f=f.doubl().doubl().doubl().doubl().add(c[a>>s&15]).add(h[u>>s&15]);return f},negate:function(){return this.toAffine().negate().toJac()},isValid:function(){var t=this.z.square(),e=t.square(),r=e.mul(t);return this.y.square().equals(this.curve.b.mul(r).add(this.x.mul(this.curve.a.mul(e).add(this.x.square()))))}},e.ecc.curve=function(t,r,n,i,o,s){this.field=t,this.r=new e.bn(r),this.a=new t(n),this.b=new t(i),this.G=new e.ecc.point(this,new t(o),new t(s))},e.ecc.curve.prototype.fromBits=function(t){var r=e.bitArray,n=this.field.prototype.exponent+7&-8,i=new e.ecc.point(this,this.field.fromBits(r.bitSlice(t,0,n)),this.field.fromBits(r.bitSlice(t,n,2*n)));if(!i.isValid())throw new e.exception.corrupt("not on the curve!");return i},e.ecc.curves={c192:new e.ecc.curve(e.bn.prime.p192,"0xffffffffffffffffffffffff99def836146bc9b1b4d22831",-3,"0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1","0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012","0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811"),c224:new e.ecc.curve(e.bn.prime.p224,"0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d",-3,"0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4","0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21","0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"),c256:new e.ecc.curve(e.bn.prime.p256,"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",-3,"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b","0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296","0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),c384:new e.ecc.curve(e.bn.prime.p384,"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973",-3,"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef","0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7","0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),c521:new e.ecc.curve(e.bn.prime.p521,"0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",-3,"0x051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","0xC6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","0x11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650"),k192:new e.ecc.curve(e.bn.prime.p192k,"0xfffffffffffffffffffffffe26f2fc170f69466a74defd8d",0,3,"0xdb4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d","0x9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"),k224:new e.ecc.curve(e.bn.prime.p224k,"0x010000000000000000000000000001dce8d2ec6184caf0a971769fb1f7",0,5,"0xa1455b334df099df30fc28a169a467e9e47075a90f7e650eb6b7a45c","0x7e089fed7fba344282cafbd6f7e319f7c0b0bd59e2ca4bdb556d61a5"),
15
- k256:new e.ecc.curve(e.bn.prime.p256k,"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",0,7,"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},e.ecc.curveName=function(t){var r;for(r in e.ecc.curves)if(e.ecc.curves.hasOwnProperty(r)&&e.ecc.curves[r]===t)return r;throw new e.exception.invalid("no such curve")},e.ecc.deserialize=function(t){var r=["elGamal","ecdsa"];if(!t||!t.curve||!e.ecc.curves[t.curve])throw new e.exception.invalid("invalid serialization");if(r.indexOf(t.type)===-1)throw new e.exception.invalid("invalid type");var n=e.ecc.curves[t.curve];if(t.secretKey){if(!t.exponent)throw new e.exception.invalid("invalid exponent");var i=new e.bn(t.exponent);return new e.ecc[t.type].secretKey(n,i)}if(!t.point)throw new e.exception.invalid("invalid point");var o=n.fromBits(e.codec.hex.toBits(t.point));return new e.ecc[t.type].publicKey(n,o)},e.ecc.basicKey={publicKey:function(t,r){this._curve=t,this._curveBitLength=t.r.bitLength(),r instanceof Array?this._point=t.fromBits(r):this._point=r,this.serialize=function(){var r=e.ecc.curveName(t);return{type:this.getType(),secretKey:!1,point:e.codec.hex.fromBits(this._point.toBits()),curve:r}},this.get=function(){var t=this._point.toBits(),r=e.bitArray.bitLength(t),n=e.bitArray.bitSlice(t,0,r/2),i=e.bitArray.bitSlice(t,r/2);return{x:n,y:i}}},secretKey:function(t,r){this._curve=t,this._curveBitLength=t.r.bitLength(),this._exponent=r,this.serialize=function(){var r=this.get(),n=e.ecc.curveName(t);return{type:this.getType(),secretKey:!0,exponent:e.codec.hex.fromBits(r),curve:n}},this.get=function(){return this._exponent.toBits()}}},e.ecc.basicKey.generateKeys=function(t){return function(r,n,i){if(r=r||256,"number"==typeof r&&(r=e.ecc.curves["c"+r],void 0===r))throw new e.exception.invalid("no such curve");i=i||e.bn.random(r.r,n);var o=r.G.mult(i);return{pub:new e.ecc[t].publicKey(r,o),sec:new e.ecc[t].secretKey(r,i)}}},e.ecc.elGamal={generateKeys:e.ecc.basicKey.generateKeys("elGamal"),publicKey:function(t,r){e.ecc.basicKey.publicKey.apply(this,arguments)},secretKey:function(t,r){e.ecc.basicKey.secretKey.apply(this,arguments)}},e.ecc.elGamal.publicKey.prototype={kem:function(t){var r=e.bn.random(this._curve.r,t),n=this._curve.G.mult(r).toBits(),i=e.hash.sha256.hash(this._point.mult(r).toBits());return{key:i,tag:n}},getType:function(){return"elGamal"}},e.ecc.elGamal.secretKey.prototype={unkem:function(t){return e.hash.sha256.hash(this._curve.fromBits(t).mult(this._exponent).toBits())},dh:function(t){return e.hash.sha256.hash(t._point.mult(this._exponent).toBits())},dhJavaEc:function(t){return t._point.mult(this._exponent).x.toBits()},getType:function(){return"elGamal"}},e.ecc.ecdsa={generateKeys:e.ecc.basicKey.generateKeys("ecdsa")},e.ecc.ecdsa.publicKey=function(t,r){e.ecc.basicKey.publicKey.apply(this,arguments)},e.ecc.ecdsa.publicKey.prototype={verify:function(t,r,n){e.bitArray.bitLength(t)>this._curveBitLength&&(t=e.bitArray.clamp(t,this._curveBitLength));var i=e.bitArray,o=this._curve.r,s=this._curveBitLength,a=e.bn.fromBits(i.bitSlice(r,0,s)),u=e.bn.fromBits(i.bitSlice(r,s,2*s)),f=n?u:u.inverseMod(o),c=e.bn.fromBits(t).mul(f).mod(o),h=a.mul(f).mod(o),l=this._curve.G.mult2(c,h,this._point).x;if(a.equals(0)||u.equals(0)||a.greaterEquals(o)||u.greaterEquals(o)||!l.equals(a)){if(void 0===n)return this.verify(t,r,!0);throw new e.exception.corrupt("signature didn't check out")}return!0},getType:function(){return"ecdsa"}},e.ecc.ecdsa.secretKey=function(t,r){e.ecc.basicKey.secretKey.apply(this,arguments)},e.ecc.ecdsa.secretKey.prototype={sign:function(t,r,n,i){e.bitArray.bitLength(t)>this._curveBitLength&&(t=e.bitArray.clamp(t,this._curveBitLength));var o=this._curve.r,s=o.bitLength(),a=i||e.bn.random(o.sub(1),r).add(1),u=this._curve.G.mult(a).x.mod(o),f=e.bn.fromBits(t).add(u.mul(this._exponent)),c=n?f.inverseMod(o).mul(a).mod(o):f.mul(a.inverseMod(o)).mod(o);return e.bitArray.concat(u.toBits(s),c.toBits(s))},getType:function(){return"ecdsa"}},function(){function t(t,e,r){return t^e^r}function r(t,e,r){return t&e|~t&r}function n(t,e,r){return(t|~e)^r}function i(t,e,r){return t&r|e&~r}function o(t,e,r){return t^(e|~r)}function s(t,e){return t<<e|t>>>32-e}function a(t){return(255&t)<<24|(65280&t)<<8|(t&255<<16)>>>8|(t&255<<24)>>>24}function u(e){for(var a,u=this._h[0],f=this._h[1],l=this._h[2],p=this._h[3],g=this._h[4],m=this._h[0],b=this._h[1],w=this._h[2],E=this._h[3],S=this._h[4],B=0;B<16;++B)a=s(u+t(f,l,p)+e[d[B]]+c[B],_[B])+g,u=g,g=p,p=s(l,10),l=f,f=a,a=s(m+o(b,w,E)+e[y[B]]+h[B],v[B])+S,m=S,S=E,E=s(w,10),w=b,b=a;for(;B<32;++B)a=s(u+r(f,l,p)+e[d[B]]+c[B],_[B])+g,u=g,g=p,p=s(l,10),l=f,f=a,a=s(m+i(b,w,E)+e[y[B]]+h[B],v[B])+S,m=S,S=E,E=s(w,10),w=b,b=a;for(;B<48;++B)a=s(u+n(f,l,p)+e[d[B]]+c[B],_[B])+g,u=g,g=p,p=s(l,10),l=f,f=a,a=s(m+n(b,w,E)+e[y[B]]+h[B],v[B])+S,m=S,S=E,E=s(w,10),w=b,b=a;for(;B<64;++B)a=s(u+i(f,l,p)+e[d[B]]+c[B],_[B])+g,u=g,g=p,p=s(l,10),l=f,f=a,a=s(m+r(b,w,E)+e[y[B]]+h[B],v[B])+S,m=S,S=E,E=s(w,10),w=b,b=a;for(;B<80;++B)a=s(u+o(f,l,p)+e[d[B]]+c[B],_[B])+g,u=g,g=p,p=s(l,10),l=f,f=a,a=s(m+t(b,w,E)+e[y[B]]+h[B],v[B])+S,m=S,S=E,E=s(w,10),w=b,b=a;a=this._h[1]+l+E,this._h[1]=this._h[2]+p+S,this._h[2]=this._h[3]+g+m,this._h[3]=this._h[4]+u+b,this._h[4]=this._h[0]+f+w,this._h[0]=a}e.hash.ripemd160=function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},e.hash.ripemd160.hash=function(t){return(new e.hash.ripemd160).update(t).finalize()},e.hash.ripemd160.prototype={reset:function(){return this._h=f.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=e.codec.utf8String.toBits(t));var r,n=this._buffer=e.bitArray.concat(this._buffer,t),i=this._length,o=this._length=i+e.bitArray.bitLength(t);if(o>9007199254740991)throw new e.exception.invalid("Cannot hash more than 2^53 - 1 bits");for(r=512+i-(512+i&511);r<=o;r+=512){for(var s=n.splice(0,16),f=0;f<16;++f)s[f]=a(s[f]);u.call(this,s)}return this},finalize:function(){var t=e.bitArray.concat(this._buffer,[e.bitArray.partial(1,1)]),r=(this._length+1)%512,n=(r>448?512:448)-r%448,i=n%32;for(i>0&&(t=e.bitArray.concat(t,[e.bitArray.partial(i,0)]));n>=32;n-=32)t.push(0);for(t.push(a(0|this._length)),t.push(a(Math.floor(this._length/4294967296)));t.length;){for(var o=t.splice(0,16),s=0;s<16;++s)o[s]=a(o[s]);u.call(this,o)}var f=this._h;this.reset();for(var s=0;s<5;++s)f[s]=a(f[s]);return f}};for(var f=[1732584193,4023233417,2562383102,271733878,3285377520],c=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0],l=4;l>=0;--l)for(var p=1;p<16;++p)c.splice(l,0,c[l]),h.splice(l,0,h[l]);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],y=[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],_=[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]}(),e.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},e.hash.sha256.hash=function(t){return(new e.hash.sha256).update(t).finalize()},e.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=e.codec.utf8String.toBits(t));var r,n=this._buffer=e.bitArray.concat(this._buffer,t),i=this._length,o=this._length=i+e.bitArray.bitLength(t);if(o>9007199254740991)throw new e.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var s=new Uint32Array(n),a=0;for(r=512+i-(512+i&511);r<=o;r+=512)this._block(s.subarray(16*a,16*(a+1))),a+=1;n.splice(0,16*a)}else for(r=512+i-(512+i&511);r<=o;r+=512)this._block(n.splice(0,16));return this},finalize:function(){var t,r=this._buffer,n=this._h;for(r=e.bitArray.concat(r,[e.bitArray.partial(1,1)]),t=r.length+2;15&t;t++)r.push(0);for(r.push(Math.floor(this._length/4294967296)),r.push(0|this._length);r.length;)this._block(r.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){function t(t){return 4294967296*(t-Math.floor(t))|0}for(var e,r,n=0,i=2;n<64;i++){for(r=!0,e=2;e*e<=i;e++)if(i%e===0){r=!1;break}r&&(n<8&&(this._init[n]=t(Math.pow(i,.5))),this._key[n]=t(Math.pow(i,1/3)),n++)}},_block:function(t){var e,r,n,i,o=this._h,s=this._key,a=o[0],u=o[1],f=o[2],c=o[3],h=o[4],l=o[5],p=o[6],d=o[7];for(e=0;e<64;e++)e<16?r=t[e]:(n=t[e+1&15],i=t[e+14&15],r=t[15&e]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+t[15&e]+t[e+9&15]|0),r=r+d+(h>>>6^h>>>11^h>>>25^h<<26^h<<21^h<<7)+(p^h&(l^p))+s[e],d=p,p=l,l=h,h=c+r|0,c=f,f=u,u=a,a=r+(u&f^c&(u^f))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10)|0;o[0]=o[0]+a|0,o[1]=o[1]+u|0,o[2]=o[2]+f|0,o[3]=o[3]+c|0,o[4]=o[4]+h|0,o[5]=o[5]+l|0,o[6]=o[6]+p|0,o[7]=o[7]+d|0}},e.prng=function(t){this._pools=[new e.hash.sha256],this._poolEntropy=[0],this._reseedCount=0,this._robins={},this._eventId=0,this._collectorIds={},this._collectorIdNext=0,this._strength=0,this._poolStrength=0,this._nextReseed=0,this._key=[0,0,0,0,0,0,0,0],this._counter=[0,0,0,0],this._cipher=void 0,this._defaultParanoia=t,this._collectorsStarted=!1,this._callbacks={progress:{},seeded:{}},this._callbackI=0,this._NOT_READY=0,this._READY=1,this._REQUIRES_RESEED=2,this._MAX_WORDS_PER_BURST=65536,this._PARANOIA_LEVELS=[0,48,64,96,128,192,256,384,512,768,1024],this._MILLISECONDS_PER_RESEED=3e4,this._BITS_PER_RESEED=80},e.prng.prototype={randomWords:function(t,r){var n,i,o=[],s=this.isReady(r);if(s===this._NOT_READY)throw new e.exception.notReady("generator isn't seeded");for(s&this._REQUIRES_RESEED&&this._reseedFromPools(!(s&this._READY)),n=0;n<t;n+=4)(n+1)%this._MAX_WORDS_PER_BURST===0&&this._gate(),i=this._gen4words(),o.push(i[0],i[1],i[2],i[3]);return this._gate(),o.slice(0,t)},setDefaultParanoia:function(t,r){if(0===t&&"Setting paranoia=0 will ruin your security; use it only for testing"!==r)throw new e.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");this._defaultParanoia=t},addEntropy:function(t,r,i){i=i||"user";var o,s,a,u,f=(new Date).valueOf(),c=this._robins[i],h=this.isReady(),l=0;switch(o=this._collectorIds[i],void 0===o&&(o=this._collectorIds[i]=this._collectorIdNext++),void 0===c&&(c=this._robins[i]=0),this._robins[i]=(this._robins[i]+1)%this._pools.length,"undefined"==typeof t?"undefined":n(t)){case"number":void 0===r&&(r=1),this._pools[c].update([o,this._eventId++,1,r,f,1,0|t]);break;case"object":if(u=Object.prototype.toString.call(t),"[object Uint32Array]"===u){for(a=[],s=0;s<t.length;s++)a.push(t[s]);t=a}else for("[object Array]"!==u&&(l=1),s=0;s<t.length&&!l;s++)"number"!=typeof t[s]&&(l=1);if(!l){if(void 0===r)for(r=0,s=0;s<t.length;s++)for(a=t[s];a>0;)r++,a>>>=1;this._pools[c].update([o,this._eventId++,2,r,f,t.length].concat(t))}break;case"string":void 0===r&&(r=t.length),this._pools[c].update([o,this._eventId++,3,r,f,t.length]),this._pools[c].update(t);break;default:l=1}if(l)throw new e.exception.bug("random: addEntropy only supports number, array of numbers or string");this._poolEntropy[c]+=r,this._poolStrength+=r,h===this._NOT_READY&&(this.isReady()!==this._NOT_READY&&this._fireEvent("seeded",Math.max(this._strength,this._poolStrength)),this._fireEvent("progress",this.getProgress()))},isReady:function(t){var e=this._PARANOIA_LEVELS[void 0!==t?t:this._defaultParanoia];return this._strength&&this._strength>=e?this._poolEntropy[0]>this._BITS_PER_RESEED&&(new Date).valueOf()>this._nextReseed?this._REQUIRES_RESEED|this._READY:this._READY:this._poolStrength>=e?this._REQUIRES_RESEED|this._NOT_READY:this._NOT_READY},getProgress:function(t){var e=this._PARANOIA_LEVELS[t?t:this._defaultParanoia];return this._strength>=e?1:this._poolStrength>e?1:this._poolStrength/e},startCollectors:function(){if(!this._collectorsStarted){if(this._eventListener={loadTimeCollector:this._bind(this._loadTimeCollector),mouseCollector:this._bind(this._mouseCollector),keyboardCollector:this._bind(this._keyboardCollector),accelerometerCollector:this._bind(this._accelerometerCollector),touchCollector:this._bind(this._touchCollector)},window.addEventListener)window.addEventListener("load",this._eventListener.loadTimeCollector,!1),window.addEventListener("mousemove",this._eventListener.mouseCollector,!1),window.addEventListener("keypress",this._eventListener.keyboardCollector,!1),window.addEventListener("devicemotion",this._eventListener.accelerometerCollector,!1),window.addEventListener("touchmove",this._eventListener.touchCollector,!1);else{if(!document.attachEvent)throw new e.exception.bug("can't attach event");document.attachEvent("onload",this._eventListener.loadTimeCollector),document.attachEvent("onmousemove",this._eventListener.mouseCollector),document.attachEvent("keypress",this._eventListener.keyboardCollector)}this._collectorsStarted=!0}},stopCollectors:function(){this._collectorsStarted&&(window.removeEventListener?(window.removeEventListener("load",this._eventListener.loadTimeCollector,!1),window.removeEventListener("mousemove",this._eventListener.mouseCollector,!1),window.removeEventListener("keypress",this._eventListener.keyboardCollector,!1),window.removeEventListener("devicemotion",this._eventListener.accelerometerCollector,!1),window.removeEventListener("touchmove",this._eventListener.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this._eventListener.loadTimeCollector),document.detachEvent("onmousemove",this._eventListener.mouseCollector),document.detachEvent("keypress",this._eventListener.keyboardCollector)),this._collectorsStarted=!1)},addEventListener:function(t,e){this._callbacks[t][this._callbackI++]=e},removeEventListener:function(t,e){var r,n,i=this._callbacks[t],o=[];for(n in i)i.hasOwnProperty(n)&&i[n]===e&&o.push(n);for(r=0;r<o.length;r++)n=o[r],delete i[n]},_bind:function(t){var e=this;return function(){t.apply(e,arguments)}},_gen4words:function(){for(var t=0;t<4&&(this._counter[t]=this._counter[t]+1|0,!this._counter[t]);t++);return this._cipher.encrypt(this._counter)},_gate:function(){this._key=this._gen4words().concat(this._gen4words()),this._cipher=new e.cipher.aes(this._key)},_reseed:function(t){this._key=e.hash.sha256.hash(this._key.concat(t)),this._cipher=new e.cipher.aes(this._key);for(var r=0;r<4&&(this._counter[r]=this._counter[r]+1|0,!this._counter[r]);r++);},_reseedFromPools:function(t){var r,n=[],i=0;for(this._nextReseed=n[0]=(new Date).valueOf()+this._MILLISECONDS_PER_RESEED,r=0;r<16;r++)n.push(4294967296*Math.random()|0);for(r=0;r<this._pools.length&&(n=n.concat(this._pools[r].finalize()),i+=this._poolEntropy[r],this._poolEntropy[r]=0,t||!(this._reseedCount&1<<r));r++);this._reseedCount>=1<<this._pools.length&&(this._pools.push(new e.hash.sha256),this._poolEntropy.push(0)),this._poolStrength-=i,i>this._strength&&(this._strength=i),this._reseedCount++,this._reseed(n)},_keyboardCollector:function(){this._addCurrentTimeToEntropy(1)},_mouseCollector:function(t){var e,r;try{e=t.x||t.clientX||t.offsetX||0,r=t.y||t.clientY||t.offsetY||0}catch(t){e=0,r=0}0!=e&&0!=r&&this.addEntropy([e,r],2,"mouse"),this._addCurrentTimeToEntropy(0)},_touchCollector:function(t){var e=t.touches[0]||t.changedTouches[0],r=e.pageX||e.clientX,n=e.pageY||e.clientY;this.addEntropy([r,n],1,"touch"),this._addCurrentTimeToEntropy(0)},_loadTimeCollector:function(){this._addCurrentTimeToEntropy(2)},_addCurrentTimeToEntropy:function(t){"undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.now?this.addEntropy(window.performance.now(),t,"loadtime"):this.addEntropy((new Date).valueOf(),t,"loadtime")},_accelerometerCollector:function(t){var e=t.accelerationIncludingGravity.x||t.accelerationIncludingGravity.y||t.accelerationIncludingGravity.z;if(window.orientation){var r=window.orientation;"number"==typeof r&&this.addEntropy(r,1,"accelerometer")}e&&this.addEntropy(e,2,"accelerometer"),this._addCurrentTimeToEntropy(0)},_fireEvent:function(t,r){var n,i=e.random._callbacks[t],o=[];for(n in i)i.hasOwnProperty(n)&&o.push(i[n]);for(n=0;n<o.length;n++)o[n](r)}},e.random=new e.prng(6),function(){function n(){try{return r(207)}catch(t){return null}}try{var i,o,s;if("undefined"!=typeof t&&t.exports&&(o=n())&&o.randomBytes)i=o.randomBytes(128),i=new Uint32Array(new Uint8Array(i).buffer),e.random.addEntropy(i,1024,"crypto.randomBytes");else if("undefined"!=typeof window&&"undefined"!=typeof Uint32Array){if(s=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(s);else{if(!window.msCrypto||!window.msCrypto.getRandomValues)return;window.msCrypto.getRandomValues(s)}e.random.addEntropy(s,1024,"crypto.getRandomValues")}}catch(t){"undefined"!=typeof window&&window.console&&(console.log("There was an error collecting entropy from the browser:"),console.log(t))}}(),e.codec.base58={alpha:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",lookup:{1:0,2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,A:9,B:10,C:11,D:12,E:13,F:14,G:15,H:16,J:17,K:18,L:19,M:20,N:21,P:22,Q:23,R:24,S:25,T:26,U:27,V:28,W:29,X:30,Y:31,Z:32,a:33,b:34,c:35,d:36,e:37,f:38,g:39,h:40,i:41,j:42,k:43,m:44,n:45,o:46,p:47,q:48,r:49,s:50,t:51,u:52,v:53,w:54,x:55,y:56,z:57},toBits:function(t){for(var r=new e.bn,n=new e.bn(58),i=0;i<t.length;i++){var o=new e.bn(e.codec.base58.lookup[t[i]]);r.addM(o.mul(n.power(t.length-i-1)))}return r.fullReduce(),r.toBits()},fromBits:function(t){for(var r=e.bn.fromBits(t),n=e.bitArray.bitLength(t),i=Math.ceil(n*(Math.log(2)/Math.log(58))),o=new e.bn(58),s="",a=i-1;a>=0;a--){for(var u=new e.bn(a),f=o.power(u),c=0;r.greaterEquals(f);)r.subM(f),r.normalize(),c++;a===i-1&&0===c||(s+=e.codec.base58.alpha[c])}return s}},e.codec.base58Check={defaultChecksumFn:function(t){return e.bitArray.bitSlice(e.hash.sha256.hash(e.hash.sha256.hash(t)),0,32)},fromBits:function(t,r,n){n=n||e.codec.base58Check.defaultChecksumFn;for(var i=e.bitArray.concat([e.bitArray.partial(8,t)],r),o=n(i),s=e.bitArray.concat(i,o),a=e.codec.base58.fromBits(s),u=0;0==e.bitArray.extract(s,u,8);)a="1"+a,u+=8;return a},toBits:function(t,r){r=r||e.codec.base58Check.defaultChecksumFn;var n=e.codec.base58.toBits(t),i=e.bitArray.bitLength(n),o=e.bitArray.bitSlice(n,0,i-32),s=e.bitArray.bitSlice(n,i-32),a=r(o);if(!e.bitArray.equal(a,s))throw new Error("Checksums do not match");return o}},e.codec.steemit={ROLES:["owner","memo","active","posting"],MAINNET:{pubHeader:0,privHeader:128,pubPrefix:"STM"},TESTNET:{pubHeader:0,privHeader:128,pubPrefix:"TST"},keyChecksum:function(t){return e.bitArray.bitSlice(e.hash.ripemd160.hash(t),0,32)},keysFromPassword:function(t,r){for(var n={},i=e.ecc.curves.k256,o=0;o<e.codec.steemit.ROLES.length;o++){var s=e.codec.steemit.ROLES[o],a=t+s+r,u=e.bn.fromBits(e.hash.sha256.hash(e.codec.utf8String.toBits(a)));n[s]=e.ecc.ecdsa.generateKeys(i,0,u)}return n},signRecoverably:function(t,r,n,i){for(e.bitArray.bitLength(r)>this._curveBitLength&&(r=e.bitArray.clamp(r,this._curveBitLength));;){var o=e.ecc.curves.k256,s=o.r,a=s.bitLength(),u=i||e.bn.random(s.sub(1),n).add(1),f=o.G.mult(u);if(i&&(i=i.add(1)),!f.isIdentity){var c=f.x.mod(s),h=e.bn.fromBits(r).add(c.mul(t._exponent)),l=h.mul(u.inverseMod(s)).mod(s),p=f.y.limbs[0]&!0,d=31;p&&d++;var y=c.toBits(a),_=l.toBits(a),v=e.bitArray.extract(y,0,8),g=e.bitArray.extract(y,8,8),m=e.bitArray.extract(_,0,8),b=e.bitArray.extract(_,8,8);if(!(128&v)&&(0!=v||128&g)&&!(128&m)&&(0!=m||128&b)){var w=e.bitArray.concat(c.toBits(a),l.toBits(a));return e.bitArray.concat([e.bitArray.partial(8,d)],w)}}}},recoverPublicKey:function(t,r){var n=e.ecc.curves.k256,i=n.r,o=n.G,s=e.bitArray.extract(r,0,8)-31,a=e.bn.fromBits(t),u=e.bn.fromBits(e.bitArray.bitSlice(r,8,264)),f=e.bn.fromBits(e.bitArray.bitSlice(r,264));if(s<0||s>4)throw new Error("Corrupt signature: recovery parameter is wrong");for(var c=1===(1&s),h=0;h<=1;h++){var l=u.add(i.mul(h)),p=e.codec.steemit._yFromX(l,c),d=new e.ecc.point(n,l,p),y=u.inverseMod(i),_=new e.bn(0).sub(a).mod(i),v=o.mult2(_,f,d).mult(y),g=new e.ecc.ecdsa.publicKey(n,v);try{return g.verify(t,e.bitArray.bitSlice(r,8)),g}catch(t){}}throw new Error("public key was unrecoverable")},serializePublicKey:function(t,r){r=r||e.codec.steemit.MAINNET;var n=t.get(),i=r.pubHeader;return i|=1&e.bn.fromBits(n.y).limbs[0]?3:2,r.pubPrefix+e.codec.base58Check.fromBits(i,n.x,e.codec.steemit.keyChecksum)},deserializePublicKey:function(t,r){r=r||e.codec.steemit.MAINNET;var n=e.ecc.curves.k256;if(0!==t.indexOf(r.pubPrefix))throw new Error('Public key is not in correct format, it should begin with "'+r.pubPrefix+'"');var i=e.codec.base58Check.toBits(t.slice(3),e.codec.steemit.keyChecksum),o=e.bitArray.extract(i,0,8),s=3==o;if((o&r.pubHeader)!==r.pubHeader)throw new Error("public key has invalid header");if(0===(3&o)&&0===(2&o))throw new Error("public key has invalid header: should set 0x2 or 0x3, but got 0x"+o.toString(16));var a=e.bitArray.bitSlice(i,8),u=e.bn.fromBits(a),f=e.codec.steemit._yFromX(u,s);return new e.ecc.ecdsa.publicKey(n,new e.ecc.point(n,u,f))},serializePrivateKey:function(t,r){return r=r||e.codec.steemit.MAINNET,e.codec.base58Check.fromBits(r.privHeader,t.get())},deserializePrivateKey:function(t,r){r=r||e.codec.steemit.MAINNET.privHeader;var n=e.ecc.curves.k256,i=e.codec.base58Check.toBits(t),o=e.bitArray.extract(i,0,8);if(o!==r)throw new Error("private key has invalid header: wanted 0x"+r.toString(16)+", got 0x"+o.toString(16));var s=e.bitArray.bitSlice(i,8);return new e.ecc.ecdsa.secretKey(n,e.bn.fromBits(s))},_yFromX:function(t,r){var n=e.ecc.curves.k256,i=e.codec.steemit._getPident(),o=t.powermod(3,n.field.modulus).add(t.mulmod(n.a,n.field.modulus)).add(n.b).mod(n.field.modulus),s=o.powermod(i,n.field.modulus),a=s.mod(2).equals(1);return a&&r||!a&&!r?s:n.field.modulus.sub(s).normalize()},_getPident:function(){return e.codec.steemit.PIDENT||(e.codec.steemit.PIDENT=e.ecc.curves.k256.field.modulus.add(1).normalize().halveM().halveM().normalize()),e.codec.steemit.PIDENT}},e}();e.sjcl=d,i.from=function(t,e){return new i(d.codec.steemit.deserializePrivateKey(t,e))},o.from=function(t){return new o(d.codec.steemit.deserializePublicKey(t))},o.recover=function(t,e){return new o(d.codec.steemit.recoverPublicKey(l(t),l(e)))},o.prototype={toString:function(){return d.codec.steemit.serializePublicKey(this._p)},verify:function(t,e){try{var r=d.bitArray.bitSlice(l(e),8);return this._p.verify(l(t),r),!0}catch(t){return!1}}}})},function(t,e,r){(function(n){"use strict";function i(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var r in t)e(t[r],r)}var s=r(208);e.createHash=r(210),e.createHmac=r(219),e.randomBytes=function(t,e){if(!e||!e.call)return new n(s(t));try{e.call(this,void 0,new n(s(t)))}catch(t){e(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var a=r(220)(e);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync,r(222)(e,t.exports),o(["createCredentials","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){i("sorry,",t,"is not implemented yet")}})}).call(e,r(100).Buffer)},function(t,e,r){(function(e,n){"use strict";!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||r(209),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),r(100).Buffer)},96,function(t,e,r){(function(e){"use strict";function n(t){return function(){var r=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),r.push(t),this},digest:function(n){var i=e.concat(r),o=t(i);return r=null,n?o.toString(n):o}};return n}}var i=r(211),o=n(r(216)),s=n(r(218));t.exports=function(t){return"md5"===t?new o:"rmd160"===t?new s:i(t)}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";var n=t.exports=function(t){var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e},i=r(121).Buffer,o=r(212)(i);n.sha1=r(213)(i,o),n.sha256=r(214)(i,o),n.sha512=r(215)(i,o)},function(t,e){"use strict";t.exports=function(t){function e(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.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=this._s||0,o=0,s=this._block;i<n;){for(var a=Math.min(e.length,o+this._blockSize-i%this._blockSize),u=a-o,f=0;f<u;f++)s[i%this._blockSize+f]=e[f+o];i+=u,o+=u,i%this._blockSize===0&&this._update(s)}return this._s=i,this},e.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,r){"use strict";var n=r(105).inherits;t.exports=function(t,e){function r(){return d.length?d.pop().init():this instanceof r?(this._w=p,e.call(this,64,56),this._h=null,void this.init()):new r}function i(t,e,r,n){return t<20?e&r|~e&n:t<40?e^r^n:t<60?e&r|e&n|r&n:e^r^n}function o(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function s(t,e){return t+e|0}function a(t,e){return t<<e|t>>>32-e}var u=0,f=4,c=8,h=12,l=16,p=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(r,e),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},r.prototype._POOL=d,r.prototype._update=function(t){var e,r,n,u,f,c,h,l,p,d;e=c=this._a,r=h=this._b,n=l=this._c,u=p=this._d,f=d=this._e;for(var y=this._w,_=0;_<80;_++){var v=y[_]=_<16?t.readInt32BE(4*_):a(y[_-3]^y[_-8]^y[_-14]^y[_-16],1),g=s(s(a(e,5),i(_,r,n,u)),s(s(f,v),o(_)));f=u,u=n,n=a(r,30),r=e,e=g}this._a=s(e,c),this._b=s(r,h),this._c=s(n,l),this._d=s(u,p),this._e=s(f,d)},r.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,u),e.writeInt32BE(0|this._b,f),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,h),e.writeInt32BE(0|this._e,l),e},r}},function(t,e,r){"use strict";var n=r(105).inherits;t.exports=function(t,e){function r(){this.init(),this._w=p,e.call(this,64,56)}function i(t,e){return t>>>e|t<<32-e}function o(t,e){return t>>>e}function s(t,e,r){return t&e^~t&r}function a(t,e,r){return t&e^t&r^e&r}function u(t){return i(t,2)^i(t,13)^i(t,22)}function f(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^o(t,3)}function h(t){return i(t,17)^i(t,19)^o(t,10)}var l=[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],p=new Array(64);return n(r,e),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(t){var e,r,n,i,o,p,d,y,_,v,g=this._w;e=0|this._a,r=0|this._b,n=0|this._c,i=0|this._d,o=0|this._e,p=0|this._f,d=0|this._g,y=0|this._h;for(var m=0;m<64;m++){var b=g[m]=m<16?t.readInt32BE(4*m):h(g[m-2])+g[m-7]+c(g[m-15])+g[m-16];_=y+f(o)+s(o,p,d)+l[m]+b,v=u(e)+a(e,r,n),y=d,d=p,p=o,o=i+_,i=n,n=r,r=e,e=_+v}this._a=e+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=p+this._f|0,this._g=d+this._g|0,this._h=y+this._h|0},r.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},r}},function(t,e,r){"use strict";var n=r(105).inherits;t.exports=function(t,e){function r(){this.init(),this._w=u,e.call(this,128,112)}function i(t,e,r){return t>>>r|e<<32-r}function o(t,e,r){return t&e^~t&r}function s(t,e,r){return t&e^t&r^e&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],u=new Array(160);return n(r,e),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(t){var e,r,n,u,f,c,h,l,p,d,y,_,v,g,m,b,w=this._w;e=0|this._a,r=0|this._b,n=0|this._c,u=0|this._d,f=0|this._e,c=0|this._f,h=0|this._g,l=0|this._h,p=0|this._al,d=0|this._bl,y=0|this._cl,_=0|this._dl,v=0|this._el,g=0|this._fl,m=0|this._gl,b=0|this._hl;for(var E=0;E<80;E++){var S,B,k=2*E;if(E<16)S=w[k]=t.readInt32BE(4*k),
16
- B=w[k+1]=t.readInt32BE(4*k+4);else{var T=w[k-30],x=w[k-30+1],A=i(T,x,1)^i(T,x,8)^T>>>7,I=i(x,T,1)^i(x,T,8)^i(x,T,7);T=w[k-4],x=w[k-4+1];var C=i(T,x,19)^i(x,T,29)^T>>>6,O=i(x,T,19)^i(T,x,29)^i(x,T,6),j=w[k-14],R=w[k-14+1],L=w[k-32],F=w[k-32+1];B=I+R,S=A+j+(B>>>0<I>>>0?1:0),B+=O,S=S+C+(B>>>0<O>>>0?1:0),B+=F,S=S+L+(B>>>0<F>>>0?1:0),w[k]=S,w[k+1]=B}var U=s(e,r,n),P=s(p,d,y),M=i(e,p,28)^i(p,e,2)^i(p,e,7),D=i(p,e,28)^i(e,p,2)^i(e,p,7),N=i(f,v,14)^i(f,v,18)^i(v,f,9),q=i(v,f,14)^i(v,f,18)^i(f,v,9),z=a[k],V=a[k+1],H=o(f,c,h),K=o(v,g,m),X=b+q,Y=l+N+(X>>>0<b>>>0?1:0);X+=K,Y=Y+H+(X>>>0<K>>>0?1:0),X+=V,Y=Y+z+(X>>>0<V>>>0?1:0),X+=B,Y=Y+S+(X>>>0<B>>>0?1:0);var G=D+P,W=M+U+(G>>>0<D>>>0?1:0);l=h,b=m,h=c,m=g,c=f,g=v,v=_+X|0,f=u+Y+(v>>>0<_>>>0?1:0)|0,u=n,_=y,n=r,y=d,r=e,d=p,p=X+G|0,e=Y+W+(p>>>0<X>>>0?1:0)|0}this._al=this._al+p|0,this._bl=this._bl+d|0,this._cl=this._cl+y|0,this._dl=this._dl+_|0,this._el=this._el+v|0,this._fl=this._fl+g|0,this._gl=this._gl+m|0,this._hl=this._hl+b|0,this._a=this._a+e+(this._al>>>0<p>>>0?1:0)|0,this._b=this._b+r+(this._bl>>>0<d>>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0<y>>>0?1:0)|0,this._d=this._d+u+(this._dl>>>0<_>>>0?1:0)|0,this._e=this._e+f+(this._el>>>0<v>>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0<g>>>0?1:0)|0,this._g=this._g+h+(this._gl>>>0<m>>>0?1:0)|0,this._h=this._h+l+(this._hl>>>0<b>>>0?1:0)|0},r.prototype._hash=function(){function e(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,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},r}},function(t,e,r){"use strict";function n(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,i=-1732584194,c=271733878,h=0;h<t.length;h+=16){var l=r,p=n,d=i,y=c;r=o(r,n,i,c,t[h+0],7,-680876936),c=o(c,r,n,i,t[h+1],12,-389564586),i=o(i,c,r,n,t[h+2],17,606105819),n=o(n,i,c,r,t[h+3],22,-1044525330),r=o(r,n,i,c,t[h+4],7,-176418897),c=o(c,r,n,i,t[h+5],12,1200080426),i=o(i,c,r,n,t[h+6],17,-1473231341),n=o(n,i,c,r,t[h+7],22,-45705983),r=o(r,n,i,c,t[h+8],7,1770035416),c=o(c,r,n,i,t[h+9],12,-1958414417),i=o(i,c,r,n,t[h+10],17,-42063),n=o(n,i,c,r,t[h+11],22,-1990404162),r=o(r,n,i,c,t[h+12],7,1804603682),c=o(c,r,n,i,t[h+13],12,-40341101),i=o(i,c,r,n,t[h+14],17,-1502002290),n=o(n,i,c,r,t[h+15],22,1236535329),r=s(r,n,i,c,t[h+1],5,-165796510),c=s(c,r,n,i,t[h+6],9,-1069501632),i=s(i,c,r,n,t[h+11],14,643717713),n=s(n,i,c,r,t[h+0],20,-373897302),r=s(r,n,i,c,t[h+5],5,-701558691),c=s(c,r,n,i,t[h+10],9,38016083),i=s(i,c,r,n,t[h+15],14,-660478335),n=s(n,i,c,r,t[h+4],20,-405537848),r=s(r,n,i,c,t[h+9],5,568446438),c=s(c,r,n,i,t[h+14],9,-1019803690),i=s(i,c,r,n,t[h+3],14,-187363961),n=s(n,i,c,r,t[h+8],20,1163531501),r=s(r,n,i,c,t[h+13],5,-1444681467),c=s(c,r,n,i,t[h+2],9,-51403784),i=s(i,c,r,n,t[h+7],14,1735328473),n=s(n,i,c,r,t[h+12],20,-1926607734),r=a(r,n,i,c,t[h+5],4,-378558),c=a(c,r,n,i,t[h+8],11,-2022574463),i=a(i,c,r,n,t[h+11],16,1839030562),n=a(n,i,c,r,t[h+14],23,-35309556),r=a(r,n,i,c,t[h+1],4,-1530992060),c=a(c,r,n,i,t[h+4],11,1272893353),i=a(i,c,r,n,t[h+7],16,-155497632),n=a(n,i,c,r,t[h+10],23,-1094730640),r=a(r,n,i,c,t[h+13],4,681279174),c=a(c,r,n,i,t[h+0],11,-358537222),i=a(i,c,r,n,t[h+3],16,-722521979),n=a(n,i,c,r,t[h+6],23,76029189),r=a(r,n,i,c,t[h+9],4,-640364487),c=a(c,r,n,i,t[h+12],11,-421815835),i=a(i,c,r,n,t[h+15],16,530742520),n=a(n,i,c,r,t[h+2],23,-995338651),r=u(r,n,i,c,t[h+0],6,-198630844),c=u(c,r,n,i,t[h+7],10,1126891415),i=u(i,c,r,n,t[h+14],15,-1416354905),n=u(n,i,c,r,t[h+5],21,-57434055),r=u(r,n,i,c,t[h+12],6,1700485571),c=u(c,r,n,i,t[h+3],10,-1894986606),i=u(i,c,r,n,t[h+10],15,-1051523),n=u(n,i,c,r,t[h+1],21,-2054922799),r=u(r,n,i,c,t[h+8],6,1873313359),c=u(c,r,n,i,t[h+15],10,-30611744),i=u(i,c,r,n,t[h+6],15,-1560198380),n=u(n,i,c,r,t[h+13],21,1309151649),r=u(r,n,i,c,t[h+4],6,-145523070),c=u(c,r,n,i,t[h+11],10,-1120210379),i=u(i,c,r,n,t[h+2],15,718787259),n=u(n,i,c,r,t[h+9],21,-343485551),r=f(r,l),n=f(n,p),i=f(i,d),c=f(c,y)}return Array(r,n,i,c)}function i(t,e,r,n,i,o){return f(c(f(f(e,t),f(n,o)),i),r)}function o(t,e,r,n,o,s,a){return i(e&r|~e&n,t,e,o,s,a)}function s(t,e,r,n,o,s,a){return i(e&n|r&~n,t,e,o,s,a)}function a(t,e,r,n,o,s,a){return i(e^r^n,t,e,o,s,a)}function u(t,e,r,n,o,s,a){return i(r^(e|~n),t,e,o,s,a)}function f(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function c(t,e){return t<<e|t>>>32-e}var h=r(217);t.exports=function(t){return h.hash(t,n,16)}},function(t,e,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,u=0;u<t.length;u+=o)i.push(a.call(t,u));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 u=i(r(t,s),t.length*a);return n(u,o,s)}var o=4,s=new e(o);s.fill(0);var a=8;t.exports={hash:i}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function r(t,e,r){return t^e^r}function n(t,e,r){return t&e|~t&r}function i(t,e,r){return(t|~e)^r}function o(t,e,r){return t&r|e&~r}function s(t,e,r){return t^(e|~r)}function a(t,e){return t<<e|t>>>32-e}function u(t){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=y(t),i=8*t.length,o=8*t.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;s<5;s++){var a=r[s];r[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var u=_(r);return new e(u)}t.exports=u;var f=[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],c=[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],l=[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],p=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],y=function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},_=function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},v=function(t,e,u){for(var y=0;y<16;y++){var _=u+y,v=e[_];e[_]=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8)}var g,m,b,w,E,S,B,k,T,x;S=g=t[0],B=m=t[1],k=b=t[2],T=w=t[3],x=E=t[4];for(var A,y=0;y<80;y+=1)A=g+e[u+f[y]]|0,A+=y<16?r(m,b,w)+p[0]:y<32?n(m,b,w)+p[1]:y<48?i(m,b,w)+p[2]:y<64?o(m,b,w)+p[3]:s(m,b,w)+p[4],A|=0,A=a(A,h[y]),A=A+E|0,g=E,E=w,w=a(b,10),b=m,m=A,A=S+e[u+c[y]]|0,A+=y<16?s(B,k,T)+d[0]:y<32?o(B,k,T)+d[1]:y<48?i(B,k,T)+d[2]:y<64?n(B,k,T)+d[3]:r(B,k,T)+d[4],A|=0,A=a(A,l[y]),A=A+x|0,S=x,x=T,T=a(k,10),k=B,B=A;A=t[1]+b+T|0,t[1]=t[2]+w+x|0,t[2]=t[3]+E+S|0,t[3]=t[4]+g+B|0,t[4]=t[0]+m+k|0,t[0]=A}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,r){if(!(this instanceof n))return new n(t,r);this._opad=u,this._alg=t;var s="sha512"===t?128:64;r=this._key=e.isBuffer(r)?r:new e(r),r.length>s?r=i(t).update(r).digest():r.length<s&&(r=e.concat([r,o],s));for(var a=this._ipad=new e(s),u=this._opad=new e(s),f=0;f<s;f++)a[f]=54^r[f],u[f]=92^r[f];this._hash=i(t).update(a)}var i=r(210),o=new e(128);o.fill(0),t.exports=n,n.prototype.update=function(t,e){return this._hash.update(t,e),this},n.prototype.digest=function(t){var e=this._hash.digest();return i(this._alg).update(this._opad).update(e).digest(t)}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";var n=r(221);t.exports=function(t,e){e=e||{};var r=n(t);return e.pbkdf2=r.pbkdf2,e.pbkdf2Sync=r.pbkdf2Sync,e}},function(t,e,r){(function(e){"use strict";t.exports=function(t){function r(t,e,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(t,e,r,i,o)}catch(t){return s(t)}s(void 0,a)})}function n(r,n,i,o,s){if("number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0)throw new TypeError("Bad key length");s=s||"sha1",e.isBuffer(r)||(r=new e(r)),e.isBuffer(n)||(n=new e(n));var a,u,f,c=1,h=new e(o),l=new e(n.length+4);n.copy(l,0,0,n.length);for(var p=1;p<=c;p++){l.writeUInt32BE(p,n.length);var d=t.createHmac(s,r).update(l).digest();if(!a&&(a=d.length,f=new e(a),c=Math.ceil(o/a),u=o-(c-1)*a,o>(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(f,0,0,a);for(var y=1;y<i;y++){d=t.createHmac(s,r).update(d).digest();for(var _=0;_<a;_++)f[_]^=d[_]}var v=(p-1)*a,g=p==c?u:a;f.copy(h,v,0,g)}return h}return{pbkdf2:r,pbkdf2Sync:n}}}).call(e,r(100).Buffer)},function(t,e,r){"use strict";t.exports=function(t,e){function n(){return Object.keys(s)}e=e||{};var i=r(223)(t);e.createCipher=i.createCipher,e.createCipheriv=i.createCipheriv;var o=r(235)(t);e.createDecipher=o.createDecipher,e.createDecipheriv=o.createDecipheriv;var s=r(226);e.listCiphers=n}},function(t,e,r){(function(e){"use strict";function n(t,r,a){return this instanceof n?(s.call(this),this._cache=new i,this._cipher=new o.AES(r),this._prev=new e(a.length),a.copy(this._prev),void(this._mode=t)):new n(t,r,a)}function i(){return this instanceof i?void(this.cache=new e("")):new i}var o=r(224),s=r(225),a=r(110),u=r(226),f=r(227),c=r(228);a(n,s),n.prototype._transform=function(t,e,r){this._cache.add(t);for(var n,i;n=this._cache.get();)i=this._mode.encrypt(this,n),this.push(i);r()},n.prototype._flush=function(t){var e=this._cache.flush();this.push(this._mode.encrypt(this,e)),this._cipher.scrub(),t()},i.prototype.add=function(t){this.cache=e.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){for(var t=16-this.cache.length,r=new e(t),n=-1;++n<t;)r.writeUInt8(t,n);var i=e.concat([this.cache,r]);return i};var h={ECB:r(229),CBC:r(230),CFB:r(232),OFB:r(233),CTR:r(234)};t.exports=function(t){function r(t,r,i){var o=u[t];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new e(i)),"string"==typeof r&&(r=new e(r)),r.length!==o.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new c(h[o.mode],r,i):new n(h[o.mode],r,i)}function i(e,n){var i=u[e];if(!i)throw new TypeError("invalid suite type");var o=f(t,n,i.key,i.iv);return r(e,o.key,o.iv)}return{createCipher:i,createCipheriv:r}}}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function r(t){var e,r;return e=t>a||t<0?(r=Math.abs(t)%a,t<0?a-r:r):t}function n(t){var e,r,n;for(e=r=0,n=t.length;0<=n?r<n:r>n;e=0<=n?++r:--r)t[e]=0;return!1}function i(){var t;this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var e,r;for(r=[],t=e=0;e<4;t=++e)r.push([]);return r}(),this.INV_SUB_MIX=function(){var e,r;for(r=[],t=e=0;e<4;t=++e)r.push([]);return r}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function o(t){for(var e=t.length/4,r=new Array(e),n=-1;++n<e;)r[n]=t.readUInt32BE(4*n);return r}function s(t){this._key=o(t),this._doReset()}var a=Math.pow(2,32);i.prototype.init=function(){var t,e,r,n,i,o,s,a,u,f;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,u=0,e=f=0;f<256;e=++f)r=u^u<<1^u<<2^u<<3^u<<4,r=r>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,o=t[i],s=t[o],a=t[s],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^t[t[t[a^o]]],u^=t[t[u]]);return!0};var u=new i;s.blockSize=16,s.prototype.blockSize=s.blockSize,s.keySize=32,s.prototype.keySize=s.keySize,s.ivSize=s.blockSize,s.prototype.ivSize=s.ivSize,s.prototype._doReset=function(){var t,e,r,n,i,o,s,a;for(r=this._key,e=r.length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],n=s=0;0<=i?s<i:s>i;n=0<=i?++s:--s)this._keySchedule[n]=n<e?r[n]:(o=this._keySchedule[n-1],n%e===0?(o=o<<8|o>>>24,o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o],o^=u.RCON[n/e|0]<<24):e>6&&n%e===4?o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]:void 0,this._keySchedule[n-e]^o);for(this._invKeySchedule=[],t=a=0;0<=i?a<i:a>i;t=0<=i?++a:--a)n=i-t,o=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?o:u.INV_SUB_MIX[0][u.SBOX[o>>>24]]^u.INV_SUB_MIX[1][u.SBOX[o>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[o>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&o]];return!0},s.prototype.encryptBlock=function(e){e=o(new t(e));var r=this._doCryptBlock(e,this._keySchedule,u.SUB_MIX,u.SBOX),n=new t(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},s.prototype.decryptBlock=function(e){e=o(new t(e));var r=[e[3],e[1]];e[1]=r[0],e[3]=r[1];var n=this._doCryptBlock(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX),i=new t(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},s.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},s.prototype._doCryptBlock=function(t,e,n,i){var o,s,a,u,f,c,h,l,p,d,y,_;for(a=t[0]^e[0],u=t[1]^e[1],f=t[2]^e[2],c=t[3]^e[3],o=4,s=y=1,_=this._nRounds;1<=_?y<_:y>_;s=1<=_?++y:--y)h=n[0][a>>>24]^n[1][u>>>16&255]^n[2][f>>>8&255]^n[3][255&c]^e[o++],l=n[0][u>>>24]^n[1][f>>>16&255]^n[2][c>>>8&255]^n[3][255&a]^e[o++],p=n[0][f>>>24]^n[1][c>>>16&255]^n[2][a>>>8&255]^n[3][255&u]^e[o++],d=n[0][c>>>24]^n[1][a>>>16&255]^n[2][u>>>8&255]^n[3][255&f]^e[o++],a=h,u=l,f=p,c=d;return h=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&c])^e[o++],l=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[c>>>8&255]<<8|i[255&a])^e[o++],p=(i[f>>>24]<<24|i[c>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^e[o++],d=(i[c>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^e[o++],[r(h),r(l),r(p),r(d)]},e.AES=s}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(){i.call(this)}var i=r(115).Transform,o=r(110);t.exports=n,o(n,i),n.prototype.update=function(t,r,n){this.write(t,r);for(var i,o=new e("");i=this.read();)o=e.concat([o,i]);return n&&(o=o.toString(n)),o},n.prototype.final=function(t){this.end();for(var r,n=new e("");r=this.read();)n=e.concat([n,r]);return t&&(n=n.toString(t)),n}}).call(e,r(100).Buffer)},function(t,e){"use strict";e["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},e["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},e["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},e["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},e["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},e["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},e.aes128=e["aes-128-cbc"],e.aes192=e["aes-192-cbc"],e.aes256=e["aes-256-cbc"],e["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},e["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},e["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},e["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},e["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},e["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},e["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},e["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},e["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"}},function(t,e,r){(function(e){"use strict";t.exports=function(t,r,n,i){n/=8,i=i||0;for(var o,s,a,u=0,f=0,c=new e(n),h=new e(i),l=0;;){if(o=t.createHash("md5"),l++>0&&o.update(s),o.update(r),s=o.digest(),a=0,n>0)for(;;){if(0===n)break;if(a===s.length)break;c[u++]=s[a],n--,a++}if(i>0&&a!==s.length)for(;;){if(0===i)break;if(a===s.length)break;h[f++]=s[a],i--,a++}if(0===n&&0===i)break}for(a=0;a<s.length;a++)s[a]=0;return{key:c,iv:h}}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,r,s,a){return this instanceof n?(o.call(this),this._cipher=new i.AES(r),this._prev=new e(s.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,s.copy(this._prev),void(this._mode=t)):new n(t,r,s)}var i=r(224),o=r(225),s=r(110);s(n,o),t.exports=n,n.prototype._transform=function(t,e,r){r(null,this._mode.encrypt(this,t,this._decrypt))},n.prototype._flush=function(t){this._cipher.scrub(),t()}}).call(e,r(100).Buffer)},function(t,e){"use strict";e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){"use strict";var n=r(231);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){(function(e){"use strict";function r(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=-1;++o<n;)i.writeUInt8(t[o]^r[o],o);return i}t.exports=r}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function n(e,r,n){var o=r.length,s=i(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,n?r:s]),s}var i=r(231);e.encrypt=function(e,r,i){for(var o,s=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){s=t.concat([s,n(e,r,i)]);break}o=e._cache.length,s=t.concat([s,n(e,r.slice(0,o),i)]),r=r.slice(o)}return s}}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function n(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}var i=r(231);e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),i(r,o)}}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function n(t){var e=t._cipher.encryptBlock(t._prev);return i(t._prev),e}function i(t){for(var e,r=t.length;r--;){if(e=t.readUInt8(r),255!==e){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}var o=r(231);e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var i=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),o(r,i)}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,r,o){return this instanceof n?(a.call(this),this._cache=new i,this._last=void 0,this._cipher=new s.AES(r),this._prev=new e(o.length),o.copy(this._prev),void(this._mode=t)):new n(t,r,o)}function i(){return this instanceof i?void(this.cache=new e("")):new i}function o(t){var e=t[15];if(16!==e)return t.slice(0,16-e)}var s=r(224),a=r(225),u=r(110),f=r(226),c=r(228),h=r(227);u(n,a),n.prototype._transform=function(t,e,r){this._cache.add(t);for(var n,i;n=this._cache.get();)i=this._mode.decrypt(this,n),this.push(i);r()},n.prototype._flush=function(t){var e=this._cache.flush();return e?(this.push(o(this._mode.decrypt(this,e))),void t()):t},i.prototype.add=function(t){this.cache=e.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>16){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var l={ECB:r(229),CBC:r(230),CFB:r(232),OFB:r(233),CTR:r(234)};t.exports=function(t){function r(t,r,i){var o=f[t];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new e(i)),"string"==typeof r&&(r=new e(r)),r.length!==o.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new c(l[o.mode],r,i,!0):new n(l[o.mode],r,i)}function i(e,n){var i=f[e];if(!i)throw new TypeError("invalid suite type");var o=h(t,n,i.key,i.iv);return r(e,o.key,o.iv)}return{createDecipher:i,createDecipheriv:r}}}).call(e,r(100).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(178),i=r(148),o=r(182),s=o.Point,a=o.getCurveByName("secp256k1"),u=r(42),f=r(203),c=r(188),h=r(187),l=r(177),p=r(108),d={},y=f.transaction,_=f.signed_transaction;d.verify=function(t,e,r){var n=!1,i=[];for(var o in r)i.push(o);var s=this.generateKeys(t,e,i);return i.forEach(function(t){r[t][0][0]===s[t]&&(n=!0)}),n},d.generateKeys=function(t,r,o){var f={};return o.forEach(function(o){var c=t+o+r,h=c.trim().split(/[\t\n\v\f\r ]+/).join(" "),l=p.sha256(h),d=n.fromBuffer(l),y=a.G.multiply(d),_=new s(y.curve,y.x,y.y,y.z),v=_.getEncoded(y.compressed),g=p.ripemd160(v),m=e.concat([v,g.slice(0,4)]);f[o]=u.get("address_prefix")+i.encode(m)}),f},d.getPrivateKeys=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["owner","active","posting","memo"],n={};return r.forEach(function(r){n[r]=this.toWif(t,e,r),n[r+"Pubkey"]=this.wifToPublic(n[r])}.bind(this)),n},d.isWif=function(t){var r=!1;try{var n=new e(i.decode(t)),o=n.slice(0,-4),s=n.slice(-4),a=p.sha256(o);a=p.sha256(a),a=a.slice(0,4),s.toString()==a.toString()&&(r=!0)}catch(t){}return r},d.toWif=function(t,r,n){var o=t+n+r,s=o.trim().split(/[\t\n\v\f\r ]+/).join(" "),a=p.sha256(s),u=e.concat([new e([128]),a]),f=p.sha256(u);f=p.sha256(f),f=f.slice(0,4);var c=e.concat([u,f]);return i.encode(c)},d.wifIsValid=function(t,e){return this.wifToPublic(t)==e},d.wifToPublic=function(t){var e=h.fromWif(t);return e=e.toPublic().toString()},d.isPubkey=function(t,e){return null!=l.fromString(t,e)},d.signTransaction=function(t,r){var n=[];t.signatures&&(n=[].concat(t.signatures));var i=new e(u.get("chain_id"),"hex"),o=y.toBuffer(t);for(var s in r){var a=c.signBuffer(e.concat([i,o]),r[s]);n.push(a.toBuffer())}return _.toObject(Object.assign(t,{signatures:n}))},t.exports=d}).call(e,r(100).Buffer)},function(t,e,r){(function(t){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(e,r){if((0,h.default)(r,"memo is required"),h.default.equal("undefined"==typeof r?"undefined":a(r),"string","memo"),!/^#/.test(r))return r;r=r.substring(1),(0,h.default)(e,"private_key is required"),s(),e=g(e),r=p.default.decode(r),r=_.fromBuffer(new t(r,"binary"));var n=r,i=n.from,o=n.to,u=n.nonce,c=n.check,l=n.encrypted,y=e.toPublicKey().toString(),v=y===i.toString()?o.toString():i.toString();r=d.Aes.decrypt(e,v,u,l,c);var m=f.default.fromBinary(r.toString("binary"),f.default.DEFAULT_CAPACITY,f.default.LITTLE_ENDIAN);try{return m.mark(),"#"+m.readVString()}catch(e){return m.reset(),r=new t(m.toString("binary"),"binary").toString("utf-8"),"#"+r}}function o(e,r,n,i){if((0,h.default)(n,"memo is required"),h.default.equal("undefined"==typeof n?"undefined":a(n),"string","memo"),!/^#/.test(n))return n;n=n.substring(1),(0,h.default)(e,"private_key is required"),(0,h.default)(r,"public_key is required"),s(),e=g(e),r=m(r);var o=new f.default(f.default.DEFAULT_CAPACITY,f.default.LITTLE_ENDIAN);o.writeVString(n),n=new t(o.copy(0,o.offset).toBinary(),"binary");var u=d.Aes.encrypt(e,r,n,i),c=u.nonce,l=u.message,y=u.checksum;return n=_.fromObject({from:e.toPublicKey(),to:r,nonce:c,check:y,encrypted:l}),n=_.toBuffer(n),"#"+p.default.encode(new t(n,"binary"))}function s(){if(void 0===v){var t=void 0;v=!0;try{var e="5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw",r="STM8m5UgaFAAYQRuaNejYdS8FVLVp9Ss3K1qAVk5de6F8s3HnVbvA",n=o(e,r,"#memo爱");t=i(e,n)}catch(t){console.error(t)}finally{v="#memo爱"===t}}if(v===!1)throw new Error("This environment does not support encryption.")}Object.defineProperty(e,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.decode=i,e.encode=o;var u=r(153),f=n(u),c=r(104),h=n(c),l=r(148),p=n(l),d=r(98),y=r(194),_=y.ops.encrypted_memo,v=void 0,g=function(t){return t?t.d?t:d.PrivateKey.fromWif(t):t},m=function(t){return t?t.Q?t:d.PublicKey.fromString(t):t}}).call(e,r(100).Buffer)},function(t,e,r){(function(n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=r(3),a=i(s),u=r(87),f=i(u),c=r(239),h=i(c),l=r(240),p=i(l),d=r(283),y=i(d),_=r(1),v=i(_),g=r(236),m=i(g),b=r(97),w=(0,f.default)("steem:broadcast"),E=function(){},S=(0,p.default)(v.default),B={};B.send=function(t,e,r){var n=B._prepareTransaction(t).then(function(t){return w("Signing transaction (transaction, transaction.operations)",t,t.operations),a.default.join(t,m.default.signTransaction(t,e))}).spread(function(t,e){return w("Broadcasting transaction (transaction, transaction.operations)",t,t.operations),v.default.broadcastTransactionSynchronousAsync(e).then(function(t){return Object.assign({},t,e)})});n.nodeify(r||E)},B._prepareTransaction=function(t){var e=v.default.getDynamicGlobalPropertiesAsync();return e.then(function(e){var r=new Date(e.time+"Z"),i=e.last_irreversible_block_num-1&65535;return v.default.getBlockHeaderAsync(e.last_irreversible_block_num).then(function(e){var o=e?e.previous:"0000000000000000000000000000000000000000";return Object.assign({ref_block_num:i,ref_block_prefix:new n(o,"hex").readUInt32LE(4),expiration:new Date(r.getTime()+6e5)},t)})})},y.default.forEach(function(t){var e=(0,b.camelCase)(t.operation),r=t.params||[],n=r.indexOf("parent_author")!==-1&&r.indexOf("parent_permlink")!==-1;B[e+"With"]=function(r,i,o){w('Sending operation "'+e+'" with',{options:i,callback:o});var s={};return t.roles&&t.roles.length&&(s[t.roles[0]]=r),B.send({extensions:[],operations:[[t.operation,Object.assign({},i,null!=i.json_metadata?{json_metadata:k(i.json_metadata)}:{},n&&null==i.permlink?{permlink:S.commentPermlink(i.parent_author,i.parent_permlink)}:{})]]},s,o)},B[e]=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];w('Parsing operation "'+e+'" with',{args:i});var s=r.reduce(function(t,e,r){return t[e]=i[r],t},{}),a=i[r.length];return B[e+"With"](t,s,a)}});var k=function(t){return"object"===("undefined"==typeof t?"undefined":o(t))?JSON.stringify(t):t};(0,h.default)(B),a.default.promisifyAll(B),e=t.exports=B}).call(e,r(100).Buffer)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(1),s=n(o);e=t.exports=function(t){t.addAccountAuth=function(e,r){var n=e.signingKey,o=e.username,a=e.authorizedUsername,u=e.role,f=void 0===u?"posting":u,c=e.weight;s.default.getAccounts([o],function(e,o){var s=i(o,1),u=s[0];if(e)return r(new Error(e),null);if(!u)return r(new Error("Invalid account name"),null);var h=u[f],l=h.account_auths.map(function(t){return t[0]}),p=l.indexOf(a)!==-1;if(p)return r(null,null);c=c||u[f].weight_threshold,h.account_auths.push([a,c]);var d="owner"===f?h:void 0,y="active"===f?h:void 0,_="posting"===f?h:void 0;t.accountUpdate(n,u.name,d,y,_,u.memo_key,u.json_metadata,r)})},t.removeAccountAuth=function(e,r){var n=e.signingKey,o=e.username,a=e.authorizedUsername,u=e.role,f=void 0===u?"posting":u;s.default.getAccounts([o],function(e,o){var s=i(o,1),u=s[0];if(e)return r(new Error(e),null);if(!u)return r(new Error("Invalid account name"),null);for(var c=u[f],h=c.account_auths.length,l=0;l<h;l++){var p=c.account_auths[l];if(p[0]===a){c.account_auths.splice(l,1);break}}if(h===c.account_auths.length)return r(null,null);var d="owner"===f?c:void 0,y="active"===f?c:void 0,_="posting"===f?c:void 0;t.accountUpdate(n,u.name,d,y,_,u.memo_key,u.json_metadata,r)})},t.addKeyAuth=function(e,r){var n=e.signingKey,o=e.username,a=e.authorizedKey,u=e.role,f=void 0===u?"posting":u,c=e.weight;s.default.getAccounts([o],function(e,o){var s=i(o,1),u=s[0];if(e)return r(new Error(e),null);if(!u)return r(new Error("Invalid account name"),null);var h=u[f],l=h.key_auths.map(function(t){return t[0]}),p=l.indexOf(a)!==-1;if(p)return r(null,null);c=c||u[f].weight_threshold,h.key_auths.push([a,c]);var d="owner"===f?h:void 0,y="active"===f?h:void 0,_="posting"===f?h:void 0;t.accountUpdate(n,u.name,d,y,_,u.memo_key,u.json_metadata,r)})},t.removeKeyAuth=function(e,r){var n=e.signingKey,o=e.username,a=e.authorizedKey,u=e.role,f=void 0===u?"posting":u;s.default.getAccounts([o],function(e,o){var s=i(o,1),u=s[0];if(e)return r(new Error(e),null);if(!u)return r(new Error("Invalid account name"),null);for(var c=u[f],h=c.key_auths.length,l=0;l<h;l++){var p=c.key_auths[l];if(p[0]===a){c.key_auths.splice(l,1);break}}if(h===c.key_auths.length)return r(null,null);var d="owner"===f?c:void 0,y="active"===f?c:void 0,_="posting"===f?c:void 0;t.accountUpdate(n,u.name,d,y,_,u.memo_key,u.json_metadata,r)})}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(241),s=n(o),a=r(98);t.exports=function(t){function e(t){return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}function r(t,e){var r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]),i=parseFloat(e.total_vesting_fund_steem.split(" ")[0]),o=i*(r/n);return o}function n(t,e){var r=t?t.reduce(function(t,e){return e.sell_price.base.indexOf("SBD")!==-1&&(t+=e.for_sale),t},0)/e:0,n=t?t.reduce(function(t,e){return e.sell_price.base.indexOf("STEEM")!==-1&&(t+=e.for_sale),t},0)/e:0;return{steemOrders:n,sbdOrders:r}}function o(t){var e=0,r=0;return t.forEach(function(t){var n=t.amount.split(" "),o=i(n,2),s=o[0],a=o[1];"STEEM"===a?e+=parseFloat(s):"SBD"===a&&(r+=parseFloat(s))}),{savings_pending:e,savings_sbd_pending:r}}function u(t){var e=void 0,r=t.base,n=t.quote;return/ SBD$/.test(r)&&/ STEEM$/.test(n)&&(e=parseFloat(r.split(" ")[0])/parseFloat(n.split(" ")[0])),e}function f(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.gprops,f=i.feed_price,c=i.open_orders,h=i.savings_withdraws,l=i.vesting_steem,p=[],d=e.name,y=1e3,_=void 0,v=void 0;return l&&f||(a&&f?l=r(e,a):p.push(t.getStateAsync("/@"+d).then(function(t){a=t.props,f=t.feed_price,l=r(e,a)}))),c?_=n(c,y):p.push(t.getOpenOrdersAsync(d).then(function(t){_=n(t,y)})),h?v=o(h):p.push(t.getSavingsWithdrawFromAsync(d).then(function(t){v=o(t)})),Promise.all(p).then(function(){var t=u(f),r=e.savings_balance,n=e.savings_sbd_balance,i=parseFloat(e.balance.split(" ")[0]),o=parseFloat(r.split(" ")[0]),a=parseFloat(e.sbd_balance),c=parseFloat(n.split(" ")[0]),h=0,p=(new Date).getTime();(e.other_history||[]).reduce(function(t,e){
17
- if("convert"!==(0,s.default)(e,[1,"op",0],""))return t;var r=new Date((0,s.default)(e,[1,"timestamp"])).getTime(),n=r+3024e5;if(n<p)return t;var i=parseFloat((0,s.default)(e,[1,"op",1,"amount"]).replace(" SBD",""));h+=i},[]);var d=a+c+v.savings_sbd_pending+_.sbdOrders+h,y=l+i+o+v.savings_pending+_.steemOrders;return(y*t+d).toFixed(2)})}function c(){var t=32,e=a.key_utils.get_random_key();return e.toWif().substring(3,3+t)}return{reputation:function(t){if(null==t)return t;t=parseInt(t);var e=String(t),r="-"===e.charAt(0);e=r?e.substring(1):e;var n=e,i=parseInt(n.substring(0,4)),o=Math.log(i)/Math.log(10),s=n.length-1,a=s+(o-parseInt(o));return isNaN(a)&&(a=0),a=Math.max(a-9,0),a*=r?-1:1,a=9*a+25,a=parseInt(a)},vestToSteem:function(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))},commentPermlink:function(t,e){var r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();return e=e.replace(/(-\d{8}t\d{9}z)/g,""),"re-"+t+"-"+e+"-"+r},amount:function(t,e){return t.toFixed(3)+" "+e},numberWithCommas:e,vestingSteem:r,estimateAccountValue:f,createSuggestedPassword:c,pricePerSteem:u}}},function(t,e,r){"use strict";function n(t,e,r){var n=null==t?void 0:i(t,e);return void 0===n?r:n}var i=r(242);t.exports=n},function(t,e,r){"use strict";function n(t,e){e=i(e,t);for(var r=0,n=e.length;null!=t&&r<n;)t=t[o(e[r++])];return r&&r==n?t:void 0}var i=r(243),o=r(282);t.exports=n},function(t,e,r){"use strict";function n(t,e){return i(t)?t:o(t,e)?[t]:s(a(t))}var i=r(62),o=r(244),s=r(246),a=r(279);t.exports=n},function(t,e,r){"use strict";function n(t,e){if(o(t))return!1;var r="undefined"==typeof t?"undefined":i(t);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!s(t))||(u.test(t)||!a.test(t)||null!=e&&t in Object(e))}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=r(62),s=r(245),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=n},function(t,e,r){"use strict";function n(t){return"symbol"==("undefined"==typeof t?"undefined":i(t))||s(t)&&o(t)==a}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=r(55),s=r(61),a="[object Symbol]";t.exports=n},function(t,e,r){"use strict";var n=r(247),i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,a=n(function(t){var e=[];return i.test(t)&&e.push(""),t.replace(o,function(t,r,n,i){e.push(n?i.replace(s,"$1"):r||t)}),e});t.exports=a},function(t,e,r){"use strict";function n(t){var e=i(t,function(t){return r.size===o&&r.clear(),t}),r=e.cache;return e}var i=r(248),o=500;t.exports=n},function(t,e,r){"use strict";function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var r=function r(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(n.Cache||i),r}var i=r(249),o="Expected a function";n.Cache=i,t.exports=n},function(t,e,r){"use strict";function n(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(250),o=r(273),s=r(276),a=r(277),u=r(278);n.prototype.clear=i,n.prototype.delete=o,n.prototype.get=s,n.prototype.has=a,n.prototype.set=u,t.exports=n},function(t,e,r){"use strict";function n(){this.size=0,this.__data__={hash:new i,map:new(s||o),string:new i}}var i=r(251),o=r(264),s=r(272);t.exports=n},function(t,e,r){"use strict";function n(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(252),o=r(260),s=r(261),a=r(262),u=r(263);n.prototype.clear=i,n.prototype.delete=o,n.prototype.get=s,n.prototype.has=a,n.prototype.set=u,t.exports=n},function(t,e,r){"use strict";function n(){this.__data__=i?i(null):{},this.size=0}var i=r(253);t.exports=n},function(t,e,r){"use strict";var n=r(254),i=n(Object,"create");t.exports=i},function(t,e,r){"use strict";function n(t,e){var r=o(t,e);return i(r)?r:void 0}var i=r(255),o=r(259);t.exports=n},function(t,e,r){"use strict";function n(t){if(!s(t)||o(t))return!1;var e=i(t)?d:f;return e.test(a(t))}var i=r(77),o=r(256),s=r(78),a=r(258),u=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,c=Function.prototype,h=Object.prototype,l=c.toString,p=h.hasOwnProperty,d=RegExp("^"+l.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){"use strict";function n(t){return!!o&&o in t}var i=r(257),o=function(){var t=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=n},function(t,e,r){"use strict";var n=r(57),i=n["__core-js_shared__"];t.exports=i},function(t,e){"use strict";function r(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var n=Function.prototype,i=n.toString;t.exports=r},function(t,e){"use strict";function r(t,e){return null==t?void 0:t[e]}t.exports=r},function(t,e){"use strict";function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=r},function(t,e,r){"use strict";function n(t){var e=this.__data__;if(i){var r=e[t];return r===o?void 0:r}return a.call(e,t)?e[t]:void 0}var i=r(253),o="__lodash_hash_undefined__",s=Object.prototype,a=s.hasOwnProperty;t.exports=n},function(t,e,r){"use strict";function n(t){var e=this.__data__;return i?void 0!==e[t]:s.call(e,t)}var i=r(253),o=Object.prototype,s=o.hasOwnProperty;t.exports=n},function(t,e,r){"use strict";function n(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?o:e,this}var i=r(253),o="__lodash_hash_undefined__";t.exports=n},function(t,e,r){"use strict";function n(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(265),o=r(266),s=r(269),a=r(270),u=r(271);n.prototype.clear=i,n.prototype.delete=o,n.prototype.get=s,n.prototype.has=a,n.prototype.set=u,t.exports=n},function(t,e){"use strict";function r(){this.__data__=[],this.size=0}t.exports=r},function(t,e,r){"use strict";function n(t){var e=this.__data__,r=i(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():s.call(e,r,1),--this.size,!0}var i=r(267),o=Array.prototype,s=o.splice;t.exports=n},function(t,e,r){"use strict";function n(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}var i=r(268);t.exports=n},function(t,e){"use strict";function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){"use strict";function n(t){var e=this.__data__,r=i(e,t);return r<0?void 0:e[r][1]}var i=r(267);t.exports=n},function(t,e,r){"use strict";function n(t){return i(this.__data__,t)>-1}var i=r(267);t.exports=n},function(t,e,r){"use strict";function n(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var i=r(267);t.exports=n},function(t,e,r){"use strict";var n=r(254),i=r(57),o=n(i,"Map");t.exports=o},function(t,e,r){"use strict";function n(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}var i=r(274);t.exports=n},function(t,e,r){"use strict";function n(t,e){var r=t.__data__;return i(e)?r["string"==typeof e?"string":"hash"]:r.map}var i=r(275);t.exports=n},function(t,e){"use strict";function r(t){var e="undefined"==typeof t?"undefined":n(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,r){"use strict";function n(t){return i(this,t).get(t)}var i=r(274);t.exports=n},function(t,e,r){"use strict";function n(t){return i(this,t).has(t)}var i=r(274);t.exports=n},function(t,e,r){"use strict";function n(t,e){var r=i(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var i=r(274);t.exports=n},function(t,e,r){"use strict";function n(t){return null==t?"":i(t)}var i=r(280);t.exports=n},function(t,e,r){"use strict";function n(t){if("string"==typeof t)return t;if(s(t))return o(t,n)+"";if(a(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=r(56),o=r(281),s=r(62),a=r(245),u=1/0,f=i?i.prototype:void 0,c=f?f.toString:void 0;t.exports=n},function(t,e){"use strict";function r(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}t.exports=r},function(t,e,r){"use strict";function n(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}var i=r(245),o=1/0;t.exports=n},function(t,e){"use strict";t.exports=[{roles:["posting","active","owner"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["posting","active","owner"],operation:"comment",params:["parent_author","parent_permlink","author","permlink","title","body","json_metadata"]},{roles:["active","owner"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active","owner"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["active","owner"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["active","owner"],operation:"limit_order_create",params:["owner","orderid","amount_to_sell","min_to_receive","fill_or_kill","expiration"]},{roles:["active","owner"],operation:"limit_order_cancel",params:["owner","orderid"]},{roles:["active","owner"],operation:"price",params:["base","quote"]},{roles:["active","owner"],operation:"feed_publish",params:["publisher","exchange_rate"]},{roles:["active","owner"],operation:"convert",params:["owner","requestid","amount"]},{roles:["active","owner"],operation:"account_create",params:["fee","creator","new_account_name","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"account_update",params:["account","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"witness_update",params:["owner","url","block_signing_key","props","fee"]},{roles:["active","owner"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["active","owner"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["active","owner"],operation:"pow",params:["worker","input","signature","work"]},{roles:["active","owner"],operation:"custom",params:["required_auths","id","data"]},{roles:["posting","active","owner"],operation:"delete_comment",params:["author","permlink"]},{roles:["posting","active","owner"],operation:"custom_json",params:["required_auths","required_posting_auths","id","json"]},{roles:["posting","active","owner"],operation:"comment_options",params:["author","permlink","max_accepted_payout","percent_steem_dollars","allow_votes","allow_curation_rewards","extensions"]},{roles:["active","owner"],operation:"set_withdraw_vesting_route",params:["from_account","to_account","percent","auto_vest"]},{roles:["active","owner"],operation:"limit_order_create2",params:["owner","orderid","amount_to_sell","exchange_rate","fill_or_kill","expiration"]},{roles:["active","owner"],operation:"claim_account",params:["creator","fee","extensions"]},{roles:["active","owner"],operation:"create_claimed_account",params:["creator","new_account_name","owner","active","posting","memo_key","json_metadata","extensions"]},{roles:["active","owner"],operation:"request_account_recovery",params:["recovery_account","account_to_recover","new_owner_authority","extensions"]},{roles:["owner"],operation:"recover_account",params:["account_to_recover","new_owner_authority","recent_owner_authority","extensions"]},{roles:["owner"],operation:"change_recovery_account",params:["account_to_recover","new_recovery_account","extensions"]},{roles:["active","owner"],operation:"escrow_transfer",params:["from","to","agent","escrow_id","sbd_amount","steem_amount","fee","ratification_deadline","escrow_expiration","json_meta"]},{roles:["active","owner"],operation:"escrow_dispute",params:["from","to","agent","who","escrow_id"]},{roles:["active","owner"],operation:"escrow_release",params:["from","to","agent","who","receiver","escrow_id","sbd_amount","steem_amount"]},{roles:["active","owner"],operation:"pow2",params:["input","pow_summary"]},{roles:["active","owner"],operation:"escrow_approve",params:["from","to","agent","who","escrow_id","approve"]},{roles:["active","owner"],operation:"transfer_to_savings",params:["from","to","amount","memo"]},{roles:["active","owner"],operation:"transfer_from_savings",params:["from","request_id","to","amount","memo"]},{roles:["active","owner"],operation:"cancel_transfer_from_savings",params:["from","request_id"]},{roles:["posting","active","owner"],operation:"custom_binary",params:["id","data"]},{roles:["owner"],operation:"decline_voting_rights",params:["account","decline"]},{roles:["active","owner"],operation:"reset_account",params:["reset_account","account_to_reset","new_owner_authority"]},{roles:["owner","posting"],operation:"set_reset_account",params:["account","current_reset_account","reset_account"]},{roles:["posting","active","owner"],operation:"claim_reward_balance",params:["account","reward_steem","reward_sbd","reward_vests"]},{roles:["active","owner"],operation:"delegate_vesting_shares",params:["delegator","delegatee","vesting_shares"]},{roles:["active","owner"],operation:"account_create_with_delegation",params:["fee","delegation","creator","new_account_name","owner","active","posting","memo_key","json_metadata","extensions"]},{roles:["active","owner"],operation:"witness_set_properties",params:["owner","props","extensions"]},{roles:["posting","active","owner"],operation:"account_update2",params:["account","owner","active","posting","memo_key","json_metadata","posting_json_metadata","extensions"]},{roles:["active","owner"],operation:"create_proposal",params:["creator","receiver","start_date","end_date","daily_pay","subject","permlink","extensions"]},{roles:["active","owner"],operation:"update_proposal_votes",params:["voter","proposal_ids","approve","extensions"]},{roles:["active","owner"],operation:"remove_proposal",params:["proposal_owner","proposal_ids","extensions"]},{roles:["posting","active","owner"],operation:"claim_reward_balance2",params:["account","reward_tokens","extensions"]},{roles:["posting","active","owner"],operation:"vote2",params:["voter","author","permlink","rshares","extensions"]},{roles:["active","owner"],operation:"smt_create",params:["control_account","symbol","smt_creation_fee","precision","extensions"]},{roles:["active","owner"],operation:"smt_setup",params:["control_account","symbol","max_supply","contribution_begin_time","contribution_end_time","launch_time","steem_units_min","min_unit_ratio","max_unit_ratio","extensions"]},{roles:["active","owner"],operation:"smt_setup_emissions",params:["control_account","symbol","schedule_time","emissions_unit","interval_seconds","interval_coount","lep_time","rep_time","lep_abs_amount","rep_abs_amount","lep_rel_amount_numerator","rep_rel_amount_numerator","rel_amount_denom_bits","remove","floor_emissions","extensions"]},{roles:["active","owner"],operation:"smt_setup_ico_tier",params:["control_account","symbol","steem_units_cap","generation_policy","remove","extensions"]},{roles:["active","owner"],operation:"smt_set_setup_parameters",params:["control_account","symbol","setup_parameters","extensions"]},{roles:["active","owner"],operation:"smt_set_runtime_parameters",params:["control_account","symbol","runtime_parameters","extensions"]},{roles:["active","owner"],operation:"smt_contribute",params:["contributor","symbol","contribution_id","contribution","extensions"]},{roles:["active","owner"],operation:"fill_convert_request",params:["owner","requestid","amount_in","amount_out"]},{roles:["posting","active","owner"],operation:"comment_reward",params:["author","permlink","payout"]},{roles:["active","owner"],operation:"liquidity_reward",params:["owner","payout"]},{roles:["active","owner"],operation:"interest",params:["owner","interest"]},{roles:["active","owner"],operation:"fill_vesting_withdraw",params:["from_account","to_account","withdrawn","deposited"]},{roles:["posting","active","owner"],operation:"fill_order",params:["current_owner","current_orderid","current_pays","open_owner","open_orderid","open_pays"]},{roles:["posting","active","owner"],operation:"fill_transfer_from_savings",params:["from","to","amount","request_id","memo"]}]}]));
18
- //# sourceMappingURL=steem.min.js.map