viz-js-lib 0.12.6 → 0.13.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.
- package/.qoder/docs/spec/prediction-market-library-integration-spec.md +1138 -0
- package/VIZ-JS-LIB-COVERAGE-STATUS.md +70 -5
- package/api-frontend/app.js +890 -0
- package/api-frontend/index.html +41 -0
- package/api-frontend/jsonrpc-api-spec.json +1353 -0
- package/api-frontend/style.css +600 -0
- package/config.json +1 -1
- package/dist/statistics.html +1 -1
- package/dist/viz-tests.min.js +6 -272
- package/dist/viz-tests.min.js.gz +0 -0
- package/dist/viz.min.js +6 -6
- package/dist/viz.min.js.gz +0 -0
- package/lib/api/methods.js +136 -153
- package/lib/auth/serializer/src/ChainTypes.js +42 -0
- package/lib/auth/serializer/src/operations.js +446 -3
- package/lib/auth/serializer/src/types.js +24 -0
- package/lib/broadcast/operations.js +92 -0
- package/lib/formatter.js +47 -0
- package/package.json +6 -3
- package/test/api.test.js +11 -164
- package/test/api.ws.test.js +162 -0
- package/test/methods_by_version.js +56 -35
- package/test/types_test.js +2 -2
package/dist/viz-tests.min.js
CHANGED
|
@@ -1,300 +1,34 @@
|
|
|
1
|
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,n.c=e,n.p="",n(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 n=e.slice(1),r=t[e[0]];return function(t,e,i){r.apply(this,[t,e,i].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){(function(t){"use strict";var e=f(n(3)),r=f(n(181)),i=f(n(303)),o=f(n(339)),s=n(1),a=f(s),u=f(n(171)),c=f(n(346));function f(t){return t&&t.__esModule?t:{default:t}}function l(t){return function(){var n=t.apply(this,arguments);return new e.default(function(t,r){return function i(o,s){try{var a=n[o](s),u=a.value}catch(t){return void r(t)}if(!a.done)return e.default.resolve(u).then(function(t){i("next",t)},function(t){i("throw",t)});t(u)}("next")})}}n(347),describe("viz.api:",function(){var n=this;this.timeout(3e4),describe("new VIZ",function(){it("doesn't open a connection until required",function(){(0,r.default)(!a.default.ws,"There was a connection on the singleton?"),(0,r.default)(!(new s.VIZ).ws,"There was a connection on a new instance?")}),it("opens a connection on demand",function(e){var n=new s.VIZ;(0,r.default)(!(new s.VIZ).ws,"There was a connection on a new instance?"),n.start(),t.nextTick(function(){(0,r.default)(n.ws,"There was no connection?"),e()})})}),describe("setWebSocket",function(){it("works",function(){a.default.setWebSocket("ws://localhost"),u.default.get("websocket").should.be.eql("ws://localhost")})}),beforeEach(l(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.default.apiIdsP;case 2:case"end":return t.stop()}},t,n)}))),describe("getFollowers",function(){describe("getting viz's followers",function(){it("works",l(regeneratorRuntime.mark(function t(){var e,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=1,t.next=3,a.default.getFollowersAsync("viz",0,"blog",e);case 3:i=t.sent,(0,r.default)(i,"getFollowersAsync resoved to null?"),i.should.have.lengthOf(e);case 6:case"end":return t.stop()}},t,n)}))),it("the startFollower parameter has an impact on the result",l(regeneratorRuntime.mark(function t(){var e,r,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=1,t.next=3,a.default.getFollowersAsync("viz",0,"blog",e);case 3:return(r=t.sent).should.have.lengthOf(e),t.next=7,a.default.getFollowersAsync("viz",r[r.length-1].follower,"blog",e);case 7:(i=t.sent).should.have.lengthOf(e),r.should.not.be.eql(i);case 10:case"end":return t.stop()}},t,n)}))),it("clears listeners",l(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.default.listeners("message").should.have.lengthOf(0);case 1:case"end":return t.stop()}},t,n)})))})}),describe("getContent",function(){describe("getting a random post",function(){it("works",l(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.default.getContentAsync("pal","2scmtp-test");case 2:t.sent.should.have.properties(c.default);case 4:case"end":return t.stop()}},t,n)}))),it("clears listeners",l(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a.default.listeners("message").should.have.lengthOf(0);case 1:case"end":return t.stop()}},t,n)})))})}),describe("streamBlockNumber",function(){it("streams viz transactions",function(t){var e=0,n=a.default.streamBlockNumber(function(r,i){o.default.exist(i),i.should.be.instanceOf(Number),2===++e&&(n(),t())})})}),describe("streamBlock",function(){it("streams viz blocks",function(t){var e=0,n=a.default.streamBlock(function(r,i){try{o.default.exist(i),i.should.have.properties(["previous","transactions","timestamp"])}catch(r){return n(),void t(r)}2===++e&&(n(),t())})})}),describe("streamTransactions",function(){it("streams viz transactions",function(t){var e=0,n=a.default.streamTransactions(function(r,i){try{o.default.exist(i),i.should.have.properties(["ref_block_num","operations","extensions"])}catch(r){return n(),void t(r)}2===++e&&(n(),t())})})}),describe("streamOperations",function(){it("streams viz operations",function(t){var e=0,n=a.default.streamOperations(function(r,i){try{o.default.exist(i)}catch(r){return n(),void t(r)}2===++e&&(n(),t())})})}),describe("when there are network failures (the ws closes)",function(){var t=s.VIZ.prototype.start;(0,i.default)(s.VIZ.prototype,"start",function(){return t.apply(this,arguments)});var o=s.VIZ.prototype.stop;(0,i.default)(s.VIZ.prototype,"stop",function(){return o.apply(this,arguments)}),it("tries to reconnect automatically",l(regeneratorRuntime.mark(function t(){var i,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=new s.VIZ,(0,r.default)(!i.ws,"There was a websocket connection before a call?"),o=1,t.next=5,i.getFollowersAsync("viz",0,"blog",o);case 5:return(0,r.default)(i.ws,"There was no websocket connection after a call?"),t.next=8,e.default.delay(1e3);case 8:return(0,r.default)(!i.stop.calledOnce,"VIZ::stop was already called before disconnect?"),i.ws.emit("close"),(0,r.default)(!i.ws),(0,r.default)(!i.startP),(0,r.default)(i.stop.calledOnce,"VIZ::stop wasn't called when the connection closed?"),t.next=15,i.getFollowersAsync("viz",0,"blog",o);case 15:(0,r.default)(i.ws,"There was no websocket connection after a call?"),(0,r.default)(i.isOpen,"There was no websocket connection after a call?");case 17:case"end":return t.stop()}},t,n)})))})})}).call(e,n(5))},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=p(n(2)),o=p(n(3)),s=p(n(42)),a=p(n(154)),u=(p(n(167)),p(n(168))),c=p(n(171)),f=p(n(173)),l=n(174),h=p(n(267));function p(t){return t&&t.__esModule?t:{default:t}}var d=(0,u.default)("viz:emitters"),y=(0,u.default)("viz:protocol"),v=(0,u.default)("viz:setup"),g=(0,u.default)("viz:ws"),m={id:0},b=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return(0,a.default)(t,m),n.options=(0,s.default)(t),n.id=0,n.inFlight=0,n.currentP=o.default.fulfilled(),n.isOpen=!1,n.releases=[],n.requests={},n}return function(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)}(e,i.default),r(e,[{key:"_setTransport",value:function(t){if(t&&t.match("^((http|https)?://)"))this.transport=new h.default.http;else{if(!t||!t.match("^((ws|wss)?://)"))throw Error("unknown transport! ["+t+"]");this.transport=new h.default.ws}}},{key:"setWebSocket",value:function(t){console.warn("viz.api.setWebSocket(url) is now deprecated instead use viz.config.set('websocket',url)"),v("Setting WS",t),c.default.set("websocket",t),this._setTransport(t),this.stop()}},{key:"start",value:function(){var t=c.default.get("websocket");return this._setTransport(t),this.transport.start()}},{key:"stop",value:function(){var t=this.transport.stop();return this.transport=null,t}},{key:"listenTo",value:function(t,e,n){return d("Adding listener for",e,"from",t.constructor.name),t.addEventListener?t.addEventListener(e,n):t.on(e,n),function(){d("Removing listener for",e,"from",t.constructor.name),t.removeEventListener?t.removeEventListener(e,n):t.removeListener(e,n)}}},{key:"onMessage",value:function(t,e){var n=e.api,r=e.data,i=e.resolve,o=e.reject,s=e.start_time;g("-- VIZ.onMessage --\x3e",t.id);var a=t.error;if(a){var u=new Error((a.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return u.payload=t,void o(u)}y("Resolved",n,r,"->",t),this.emit("track-performance",r.method,Date.now()-s),delete this.requests[t.id],i(t.result)}},{key:"send",value:function(t,e,n){this.transport||this.start();var r=n;if(this.__logger){var i=Math.random(),o=this;this.log("xmit:"+i+":",e),r=function(t,e){t?o.log("error","rsp:"+i+":\n\n",t,e):o.log("rsp:"+i+":",e),n&&n.apply(o,arguments)}}return this.transport.send(t,e,r)}},{key:"streamBlockNumber",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=this,n=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;"function"==typeof t&&(n=t,t="head");var i="",s=!0;return function a(){s&&e.getDynamicGlobalPropertiesAsync().then(function(e){var s="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(s!==i)if(i)for(var u=i;u<s;u++)u!==i&&n(null,u),i=u;else i=s,n(null,s);o.default.delay(r).then(function(){a()})},function(t){n(t)})}(),function(){s=!1}}},{key:"streamBlock",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",n=arguments[1];"function"==typeof e&&(n=e,e="head");var r="",i="",o=this.streamBlockNumber(e,function(e,s){if(e)return o(),void n(e);(r=s)!==i&&(i=r,t.getBlock(r,n))});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 n=this.streamBlock(t,function(t,r){if(t)return n(),void e(t);r&&r.transactions&&r.transactions.forEach(function(t){e(null,t)})});return n}},{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 n=this.streamTransactions(t,function(t,r){if(t)return n(),void e(t);r.operations.forEach(function(t){e(null,t)})});return n}}]),e}();f.default.forEach(function(t){var e=t.method_name||(0,l.camelCase)(t.method),n=t.params||[];b.prototype[e+"With"]=function(e,r){var i=n.map(function(t){return e[t]});return this.send(t.api,{method:t.method,params:i},r)},b.prototype[e]=function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=n.reduce(function(t,e,n){return t[e]=r[n],t},{}),s=r[n.length];return this[e+"With"](o,s)}}),o.default.promisifyAll(b.prototype);var _=new b;(e=t.exports=_).VIZ=b,e.VIZ.DEFAULTS=m},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,s,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var f=new Error('Uncaught, unspecified "error" event. ('+e+")");throw f.context=e,f}if(o(n=this._events[t]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),s=(c=n.slice()).length,u=0;u<s;u++)c[u].apply(this,a);return!0},n.prototype.addListener=function(t,e){var s;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(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},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;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(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";var r;"undefined"!=typeof Promise&&(r=Promise);var i=n(4)();i.noConflict=function(){try{Promise===i&&(Promise=r)}catch(t){}return i},t.exports=i},function(t,e,n){(function(e){"use strict";t.exports=function(){var r=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},i=function(){return new B.PromiseInspection(this._target())},o=function(t){return B.reject(new m(t))};function s(){}var a={},u=n(6);u.setReflectHandler(i);var c=function(){var t=e.domain;return void 0===t?null:t},f=function(){return{domain:c(),async:null}},l=u.isNode&&u.nodeSupportsAsyncResource?n(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource:null,h=function(){return{domain:c(),async:new l("Bluebird::Promise")}},p=u.isNode?f:function(){return null};u.notEnumerableProp(B,"_getContext",p);var d=n(7),y=n(8),v=new y;d.defineProperty(B,"_async",{value:v});var g=n(13),m=B.TypeError=g.TypeError;B.RangeError=g.RangeError;var b=B.CancellationError=g.CancellationError;B.TimeoutError=g.TimeoutError,B.OperationalError=g.OperationalError,B.RejectionError=g.OperationalError,B.AggregateError=g.AggregateError;var _=function(){},w={},E={},x=n(14)(B,_),T=n(15)(B,_,x,o,s),S=n(16)(B),k=S.create,A=n(17)(B,S,function(){p=h,u.notEnumerableProp(B,"_getContext",h)},function(){p=f,u.notEnumerableProp(B,"_getContext",f)}),j=(A.CapturedTrace,n(18)(B,x,E)),O=n(19)(E),C=n(20),I=u.errorObj,R=u.tryCatch;function B(t){t!==_&&function(t,e){if(null==t||t.constructor!==B)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 "+u.classString(e))}(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 P(t){this.promise._resolveCallback(t)}function F(t){this.promise._rejectCallback(t,!1)}function M(t){var e=new B(_);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return B.prototype.toString=function(){return"[object Promise]"},B.prototype.caught=B.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;n<e-1;++n){var s=arguments[n];if(!u.isObject(s))return o("Catch statement predicate: expecting an object but got "+u.classString(s));r[i++]=s}if(r.length=i,"function"!=typeof(t=arguments[n]))throw new m("The last argument to .catch() must be a function, got "+u.toString(t));return this.then(void 0,O(r,t,this))}return this.then(void 0,t)},B.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},B.prototype.then=function(t,e){if(A.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(n+=", "+u.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},B.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},B.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},B.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},B.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new T(this).promise()},B.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},B.getNewLibraryCopy=t.exports,B.is=function(t){return t instanceof B},B.fromNode=B.fromCallback=function(t){var e=new B(_);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=R(t)(C(e,n));return r===I&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},B.all=function(t){return new T(t).promise()},B.cast=function(t){var e=x(t);return e instanceof B||((e=new B(_))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},B.resolve=B.fulfilled=B.cast,B.reject=B.rejected=function(t){var e=new B(_);return e._captureStackTrace(),e._rejectCallback(t,!0),e},B.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+u.classString(t));return v.setScheduler(t)},B.prototype._then=function(t,e,n,r,i){var o=void 0!==i,s=o?i:new B(_),a=this._target(),c=a._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&c)?this._boundValue():a===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=p();if(0!=(50397184&c)){var l,h,d=a._settlePromiseCtx;0!=(33554432&c)?(h=a._rejectionHandler0,l=t):0!=(16777216&c)?(h=a._fulfillmentHandler0,l=e,a._unsetRejectionIsUnhandled()):(d=a._settlePromiseLateCancellationObserver,h=new b("late cancellation observer"),a._attachExtraTrace(h),l=e),v.invoke(d,a,{handler:u.contextBind(f,l),promise:s,receiver:r,value:h})}else a._addCallbacks(t,e,s,r,f);return s},B.prototype._length=function(){return 65535&this._bitField},B.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},B.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},B.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},B.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},B.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},B.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},B.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},B.prototype._isFinal=function(){return(4194304&this._bitField)>0},B.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},B.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},B.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},B.prototype._setAsyncGuaranteed=function(){if(!v.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},B.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},B.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},B.prototype._promiseAt=function(t){return this[4*t-4+2]},B.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},B.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},B.prototype._boundValue=function(){},B.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(e,n,r,i,null)},B.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=a),this._addCallbacks(n,r,i,o,null)},B.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=u.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=u.contextBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=u.contextBind(i,t)),"function"==typeof e&&(this[s+1]=u.contextBind(i,e))}return this._setLength(o+1),o},B.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},B.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(r(),!1);var n=x(t,this);if(!(n instanceof B))return this._fulfill(t);e&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a<s;++a)i._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new b("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(r())}},B.prototype._rejectCallback=function(t,e,n){var r=u.ensureErrorObject(t),i=r===t;if(!i&&!n&&A.warnings()){var o="a promise was rejected with a non-error: "+u.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,!!e&&i),this._reject(t)},B.prototype._resolveFromExecutor=function(t){if(t!==_){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},B.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0==(65536&i)){var o;r._pushContext(),e===w?n&&"number"==typeof n.length?o=R(t).apply(this._boundValue(),n):(o=I).e=new m("cannot .spread() a non-array: "+u.classString(n)):o=R(t).call(e,n);var s=r._popContext();0==(65536&(i=r._bitField))&&(o===E?r._reject(n):o===I?r._rejectCallback(o.e,!1):(A.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},B.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},B.prototype._followee=function(){return this._rejectionHandler0},B.prototype._setFollowee=function(t){this._rejectionHandler0=t},B.prototype._settlePromise=function(t,e,n,r){var o=t instanceof B,a=this._bitField,u=0!=(134217728&a);0!=(65536&a)?(o&&t._invokeInternalOnCancel(),n instanceof j&&n.isFinallyHandler()?(n.cancelPromise=t,R(e).call(n,r)===I&&t._reject(I.e)):e===i?t._fulfill(i.call(n)):n instanceof s?n._promiseCancelled(t):o||t instanceof T?t._cancel():n.cancel()):"function"==typeof e?o?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,n,r,t)):e.call(n,r,t):n instanceof s?n._isResolved()||(0!=(33554432&a)?n._promiseFulfilled(r,t):n._promiseRejected(r,t)):o&&(u&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(r):t._reject(r))},B.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,i=t.value;"function"==typeof e?n instanceof B?this._settlePromiseFromHandler(e,r,i,n):e.call(r,i,n):n instanceof B&&n._reject(i)},B.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},B.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},B.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},B.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},B.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return v.fatalError(t,u.isNode);(65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled()}},B.prototype._fulfillPromises=function(t,e){for(var n=1;n<t;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},B.prototype._rejectPromises=function(t,e){for(var n=1;n<t;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},B.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},B.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(B.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),B.defer=B.pending=function(){return A.deprecated("Promise.defer","new Promise"),{promise:new B(_),resolve:P,reject:F}},u.notEnumerableProp(B,"_makeSelfResolutionError",r),n(21)(B,_,x,o,A),n(22)(B,_,x,A),n(23)(B,T,o,A),n(24)(B),n(25)(B),n(26)(B,T,x,_,v),B.Promise=B,B.version="3.7.2",n(27)(B),n(28)(B,o,_,x,s,A),n(29)(B,T,o,x,_,A),n(30)(B),n(31)(B,_),n(32)(B,T,x,o),n(33)(B,_,x,o),n(34)(B,T,o,x,_,A),n(35)(B,T,A),n(36)(B,T,o),n(37)(B,_,A),n(38)(B,o,x,k,_,A),n(39)(B),n(40)(B,_),n(41)(B,_),u.toFastProperties(B),u.toFastProperties(B.prototype),M({a:1}),M({b:2}),M({c:3}),M(1),M(function(){}),M(void 0),M(!1),M(new B(_)),A.setBounds(y.firstLineError,u.lastLineError),B}}).call(e,n(5))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=a(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||f||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){(function(e,r){"use strict";var i=n(7),o="undefined"==typeof navigator,s={e:{}},a,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0!==this?this:null;function c(){try{var t=a;return a=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function f(t){return a=t,c}var l=function(t,e){var n={}.hasOwnProperty;function r(){for(var r in this.constructor=t,this.constructor$=e,e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}return r.prototype=e.prototype,t.prototype=new r,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function p(t){return"function"==typeof t||"object"==typeof t&&null!==t}function d(t){return h(t)?new Error(k(t)):t}function y(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;n<r;++n)i[n]=t[n];return i[n]=e,i}function v(t,e,n){if(!i.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function g(t,e,n){if(h(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(t,e,r),t}function m(t){throw t}var b=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(i.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],o=Object.create(null);null!=t&&!e(t);){var s;try{s=n(t)}catch(t){return r}for(var a=0;a<s.length;++a){var u=s[a];if(!o[u]){o[u]=!0;var c=Object.getOwnPropertyDescriptor(t,u);null!=c&&null==c.get&&null==c.set&&r.push(u)}}t=i.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),_=/this\s*\.\s*\S+\s*=/;function w(t){try{if("function"==typeof t){var e=i.names(t.prototype),n=i.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=_.test(t+"")&&i.names(t).length>0;if(n||r||o)return!0}return!1}catch(t){return!1}}function E(t){function e(){}e.prototype=t;var n=new e;function r(){return typeof n.foo}return r(),r(),t}var x=/^[a-z$_][a-z$_0-9]*$/i;function T(t){return x.test(t)}function S(t,e,n){for(var r=new Array(t),i=0;i<t;++i)r[i]=e+i+n;return r}function k(t){try{return t+""}catch(t){return"[no string representation]"}}function A(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function j(t){try{g(t,"isOperational",!0)}catch(t){}}function O(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function C(t){return A(t)&&i.propertyIsWritable(t,"stack")}var I="stack"in new Error?function(t){return C(t)?t:new Error(k(t))}:function(t){if(C(t))return t;try{throw new Error(k(t))}catch(t){return t}};function R(t){return{}.toString.call(t)}function B(t,e,n){for(var r=i.names(t),o=0;o<r.length;++o){var s=r[o];if(n(s))try{i.defineProperty(e,s,i.getDescriptor(t,s))}catch(t){}}}var P=function(t){return i.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var F="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};P=function(t){return i.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?F(t):null}}var M=void 0!==r&&"[object process]"===R(r).toLowerCase(),N=void 0!==r&&void 0!==r.env,L;function D(t){return N?r.env[t]:void 0}function U(){if("function"==typeof Promise)try{if("[object Promise]"===R(new Promise(function(){})))return Promise}catch(t){}}function q(t,e){if(null===t||"function"!=typeof e||e===L)return e;null!==t.domain&&(e=t.domain.bind(e));var n=t.async;if(null!==n){var r=e;e=function(){for(var t=arguments.length+2,e=new Array(t),i=2;i<t;++i)e[i]=arguments[i-2];return e[0]=r,e[1]=this,n.runInAsyncScope.apply(n,e)}}return e}var V={setReflectHandler:function(t){L=t},isClass:w,isIdentifier:T,inheritedDataKeys:b,getDataPropertyOrDefault:v,thrower:m,isArray:i.isArray,asArray:P,notEnumerableProp:g,isPrimitive:h,isObject:p,isError:A,canEvaluate:o,errorObj:s,tryCatch:f,inherits:l,withAppended:y,maybeWrapAsError:d,toFastProperties:E,filledRange:S,toString:k,canAttachTrace:C,ensureErrorObject:I,originatesFromRejection:O,markAsOriginatingFromRejection:j,classString:R,copyDescriptors:B,isNode:M,hasEnvVariables:N,env:D,global:u,getNativePromise:U,contextBind:q};V.isRecentNode=V.isNode&&function(){var t;return r.versions&&r.versions.node?t=r.versions.node.split(".").map(Number):r.version&&(t=r.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),V.nodeSupportsAsyncResource=V.isNode&&function(){var t=!1;try{t="function"==typeof n(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),V.isNode&&V.toFastProperties(r);try{throw new Error}catch(t){V.lastLineError=t}t.exports=V}).call(e,function(){return this}(),n(5))},function(t,e){var n=function(){"use strict";return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var r={}.hasOwnProperty,i={}.toString,o={}.constructor.prototype,s=function(t){var e=[];for(var n in t)r.call(t,n)&&e.push(n);return e};t.exports={isArray:function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}},keys:s,names:s,defineProperty:function(t,e,n){return t[e]=n.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return o}},isES5:n,propertyIsWritable:function(){return!0}}}},function(t,e,n){(function(e){"use strict";var r;try{throw new Error}catch(t){r=t}var i=n(9),o=n(12);function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function a(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}s.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},s.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")}},s.prototype.invokeLater=function(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()},s.prototype.invoke=function(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()},s.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},s.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=r}).call(e,n(5))},function(t,e,n){(function(e,r,i){"use strict";var o,s=n(6),a=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var u=e.setImmediate,c=r.nextTick;o=s.isRecentNode?function(t){u.call(e,t)}:function(t){c.call(r,t)}}else if("function"==typeof a&&"function"==typeof a.resolve){var f=a.resolve();o=function(t){f.then(t)}}else o="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),n=!1}).observe(r,e);return function(i){var o=new MutationObserver(function(){o.disconnect(),i()});o.observe(t,e),n||(n=!0,r.classList.toggle("foo"))}}():void 0!==i?function(t){i(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};t.exports=o}).call(e,function(){return this}(),n(5),n(10).setImmediate)},function(t,e,n){var r=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(r.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(r.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.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))},n(11),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){f(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&f(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),r=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){f(t.data)},r=function(e){t.port2.postMessage(e)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var t=a.documentElement;r=function(e){var n=a.createElement("script");n.onreadystatechange=function(){f(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(f,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var s={callback:t,args:e};return o[i]=s,r(i),i++},u.clearImmediate=c}function c(t){delete o[t]}function f(t){if(s)setTimeout(f,0,t);else{var e=o[t];if(e){s=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{c(t),s=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,function(){return this}(),n(5))},function(t,e){"use strict";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),this[this._front+e&this._capacity-1]=t,this._length=e+1},n.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},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,function(t,e,n,r,i){for(var o=0;o<i;++o)n[o+r]=t[o+e],t[o+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},t.exports=n},function(t,e,n){"use strict";var r,i,o=n(7),s=o.freeze,a=n(6),u=a.inherits,c=a.notEnumerableProp;function f(t,e){function n(r){if(!(this instanceof n))return new n(r);c(this,"message","string"==typeof r?r:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(n,Error),n}var l=f("Warning","warning"),h=f("CancellationError","cancellation error"),p=f("TimeoutError","timeout error"),d=f("AggregateError","aggregate error");try{r=TypeError,i=RangeError}catch(t){r=f("TypeError","type error"),i=f("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<y.length;++v)"function"==typeof Array.prototype[y[v]]&&(d.prototype[y[v]]=Array.prototype[y[v]]);o.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;function m(t){if(!(this instanceof m))return new m(t);c(this,"name","OperationalError"),c(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(c(this,"message",t.message),c(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.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 n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];e+=(r=i.join("\n"))+"\n"}return g--,e},u(m,Error);var b=Error.__BluebirdErrorTypes__;b||(b=s({CancellationError:h,TimeoutError:p,OperationalError:m,RejectionError:m,AggregateError:d}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:r,RangeError:i,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:l}},function(t,e,n){"use strict";t.exports=function(t,e){var r=n(6),i=r.errorObj,o=r.isObject;var s={}.hasOwnProperty;return function(n,a){if(o(n)){if(n instanceof t)return n;var u=function(t){try{return function(t){return t.then}(t)}catch(t){return i.e=t,i}}(n);if(u===i){a&&a._pushContext();var c=t.reject(u.e);return a&&a._popContext(),c}if("function"==typeof u)return function(t){try{return s.call(t,"_promise0")}catch(t){return!1}}(n)?(c=new t(e),n._then(c._fulfill,c._reject,void 0,c,null),c):function(n,o,s){var a=new t(e),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var c=!0,f=r.tryCatch(o).call(n,function(t){a&&(a._resolveCallback(t),a=null)},function(t){a&&(a._rejectCallback(t,c,!0),a=null)});return c=!1,a&&f===i&&(a._rejectCallback(f.e,!0,!0),a=null),u}(n,u,a)}return n}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o){var s=n(6);s.isArray;function a(n){var r=this._promise=new t(e);n instanceof t&&(r._propagateFrom(n,3),n.suppressUnhandledRejections()),r._setOnCancel(this),this._values=n,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(n,o){var a=r(this._values,this._promise);if(a instanceof t){var u=(a=a._target())._bitField;if(this._values=a,0==(50397184&u))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var c=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(c,!1)}},a.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<n;++a){var u=r(e[a],i);s=u instanceof t?(u=u._target())._bitField: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){return this._values[e]=t,++this._totalResolved>=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 n=0;n<e.length;++n)e[n]instanceof t&&e[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},function(t,e){"use strict";t.exports=function(t){var e=!1,n=[];function r(){this._trace=new r.CapturedTrace(i())}function i(){var t=n.length-1;if(t>=0)return n[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},r.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},r.prototype._popContext=function(){if(void 0!==this._trace){var t=n.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},r.CapturedTrace=null,r.create=function(){if(e)return new r},r.deactivateLongStackTraces=function(){},r.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;r.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=r.prototype._pushContext,t.prototype._popContext=r.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},r}},function(t,e,n){(function(e){"use strict";t.exports=function(t,r,i,o){var s,a,u,c,f=t._async,l=n(13).Warning,h=n(6),p=n(7),d=h.canAttachTrace,y=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,v=/\((?:timers\.js):\d+:\d+\)/,g=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,b=null,_=!1,w=!(0==h.env("BLUEBIRD_DEBUG")||!h.env("BLUEBIRD_DEBUG")&&"development"!==h.env("NODE_ENV")),E=!(0==h.env("BLUEBIRD_WARNINGS")||!w&&!h.env("BLUEBIRD_WARNINGS")),x=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),T=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(E||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function n(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();r()}function r(){e.length=0}c=function(t){e.push(t),setTimeout(n,1)},p.defineProperty(t,"_unhandledRejectionCheck",{value:n}),p.defineProperty(t,"_unhandledRejectionClear",{value:r})}(),t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),c(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){Y("rejectionHandled",s,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(),Y("unhandledRejection",a,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,n){return H(t,e,n||this)},t.onPossiblyUnhandledRejection=function(e){var n=t._getContext();a=h.contextBind(n,e)},t.onUnhandledRejectionHandled=function(e){var n=t._getContext();s=h.contextBind(n,e)};var S=function(){};t.longStackTraces=function(){if(f.haveItemsQueued()&&!nt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!nt.longStackTraces&&K()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;nt.longStackTraces=!0,S=function(){if(f.haveItemsQueued()&&!nt.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=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),nt.longStackTraces=!1},t.prototype._captureStackTrace=q,t.prototype._attachExtraTrace=V,t.prototype._dereferenceTrace=z,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return nt.longStackTraces&&K()};var k={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},A=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var n;try{return n=t.before(),!h.global.dispatchEvent(e)}finally{t.after(n)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new CustomEvent(e,{detail:n,cancelable:!0});return p.defineProperty(r,"promise",{value:n.promise}),p.defineProperty(r,"reason",{value:n.reason}),t(k[e],r)}}if("function"==typeof Event){e=new Event("CustomEvent");return h.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=new Event(e,{cancelable:!0});return r.detail=n,p.defineProperty(r,"promise",{value:n.promise}),p.defineProperty(r,"reason",{value:n.reason}),t(k[e],r)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,n){e=e.toLowerCase();var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!1,!0,n),t(k[e],r)}}catch(t){}return function(){return!1}}(),j=h.isNode?function(){return e.emit.apply(e,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),n=h.global[e];return!!n&&(n.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function O(t,e){return{promise:e}}var C={promiseCreated:O,promiseFulfilled:O,promiseRejected:O,promiseResolved:O,promiseCancelled:O,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:O},I=function(t){var e=!1;try{e=j.apply(null,arguments)}catch(t){f.throwLater(t),e=!0}var n=!1;try{n=A(t,C[t].apply(null,arguments))}catch(t){f.throwLater(t),n=!0}return n||e};function R(){return!1}function B(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+h.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function F(){return this._onCancelField}function M(t){this._onCancelField=t}function N(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&S()),"warnings"in e){var n=e.warnings;nt.warnings=!!n,T=nt.warnings,h.isObject(n)&&"wForgottenReturn"in n&&(T=!!n.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!nt.cancellation){if(f.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=N,t.prototype._propagateFrom=L,t.prototype._onCancel=F,t.prototype._setOnCancel=M,t.prototype._attachCancellationCallback=P,t.prototype._execute=B,D=L,nt.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!nt.monitoring?(nt.monitoring=!0,t.prototype._fireEvent=I):!e.monitoring&&nt.monitoring&&(nt.monitoring=!1,t.prototype._fireEvent=R)),"asyncHooks"in e&&h.nodeSupportsAsyncResource){var r=nt.asyncHooks,s=!!e.asyncHooks;r!==s&&(nt.asyncHooks=s,s?i():o())}return t},t.prototype._fireEvent=R,t.prototype._execute=function(t,e,n){try{t(e,n)}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._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var D=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function U(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function q(){this._trace=new tt(this._peekContext())}function V(t,e){if(d(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=X(t);h.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function H(e,n,r){if(nt.warnings){var i,o=new l(e);if(n)r._attachExtraTrace(o);else if(nt.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=X(o);o.stack=s.message+"\n"+s.stack.join("\n")}I("warning",o)||G(o,"",!0)}}function W(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||m.test(r),o=i&&Z(r);i&&!o&&(_&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function X(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||m.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:W(e)}}function G(t,e,n){if("undefined"!=typeof console){var r;if(h.isObject(t)){var i=t.stack;r=e+b(i,t)}else r=e+String(t);"function"==typeof u?u(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function Y(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){f.throwLater(t)}"unhandledRejection"===t?I(t,n,r)||i||G(n,"Unhandled rejection "):I(t,r)}function J(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():h.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){if(t.length<41)return t;return t.substr(0,38)+"..."}(e)+">, no stack trace)"}function K(){return"function"==typeof et}var Z=function(){return!1},$=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(t){var e=t.match($);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function tt(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);et(this,tt),e>32&&this.uncycle()}h.inherits(tt,Error),r.CapturedTrace=tt,tt.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;for(r=(t=this._length=r)-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(r=0;r<t;++r){var s=n[e[r].stack];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var a=r>0?e[r-1]:this;s<t-1?(a._parent=e[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var u=a._length+1,c=r-2;c>=0;--c)e[c]._length=u,u++;return}}}},tt.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=X(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(W(i.stack.split("\n"))),i=i._parent;!function(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(a=s;a>=0;--a){var u=r[a];if(e[i]!==u)break;e.pop(),i--}e=r}}(r),function(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--)}(r),h.notEnumerableProp(t,"stack",function(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}(n,r)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var et=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():J(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,m=t,b=e;var n=Error.captureStackTrace;return Z=function(t){return y.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return m=/@/,b=e,_=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){r="stack"in t}return"stack"in i||!r||"number"!=typeof Error.stackTraceLimit?(b=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?J(e):e.toString()},null):(m=t,b=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(u=function(t){console.warn(t)},h.isNode&&e.stderr.isTTY?u=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(u=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var nt={warnings:E,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return x&&t.longStackTraces(),{asyncHooks:function(){return nt.asyncHooks},longStackTraces:function(){return nt.longStackTraces},warnings:function(){return nt.warnings},cancellation:function(){return nt.cancellation},monitoring:function(){return nt.monitoring},propagateFromFunction:function(){return D},boundValueFunction:function(){return U},checkForgottenReturns:function(t,e,n,r,i){if(void 0===t&&null!==e&&T){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),u=W(a),c=u.length-1;c>=0;--c){var f=u[c];if(!v.test(f)){var l=f.match(g);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(u.length>0){var h=u[0];for(c=0;c<a.length;++c)if(a[c]===h){c>0&&(s="\n"+a[c-1]);break}}}var p="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(p,!0,e)}},setBounds:function(t,e){if(K()){for(var n,r,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,u=0;u<i.length;++u)if(c=Q(i[u])){n=c.fileName,s=c.line;break}for(u=0;u<o.length;++u){var c;if(c=Q(o[u])){r=c.fileName,a=c.line;break}}s<0||a<0||!n||!r||n!==r||s>=a||(Z=function(t){if(y.test(t))return!0;var e=Q(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}},warn:H,deprecated:function(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),H(n)},CapturedTrace:tt,fireDomEvent:A,fireGlobalEvent:j}}}).call(e,n(5))},function(t,e,n){"use strict";t.exports=function(t,e,r){var i=n(6),o=t.CancellationError,s=i.errorObj,a=n(19)(r);function u(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function c(t){this.finallyHandler=t}function f(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function l(){return p.call(this,this.promise._target()._settledValue())}function h(t){if(!f(this,t))return s.e=t,s}function p(n){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),n);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=e(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),s.e=d,s}p.isPending()&&p._attachCancellationCallback(new c(this))}return p._then(l,h,void 0,this,void 0)}}}return i.isRejected()?(f(this),s.e=n,s):(f(this),n)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){f(this.finallyHandler)},t.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new u(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,p,p)},t.prototype.tap=function(t){return this._passThrough(t,1,p)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,p);var r,o=new Array(n-1),s=0;for(r=0;r<n-1;++r){var u=arguments[r];if(!i.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(u)));o[s++]=u}o.length=s;var c=arguments[r];return this._passThrough(a(o,c,this),1,void 0,p)},u}},function(t,e,n){"use strict";t.exports=function(t){var e=n(6),r=n(7).keys,i=e.tryCatch,o=e.errorObj;return function(n,s,a){return function(u){var c=a._boundValue();t:for(var f=0;f<n.length;++f){var l=n[f];if(l===Error||null!=l&&l.prototype instanceof Error){if(u instanceof l)return i(s).call(c,u)}else if("function"==typeof l){var h=i(l).call(c,u);if(h===o)return h;if(h)return i(s).call(c,u)}else if(e.isObject(u)){for(var p=r(l),d=0;d<p.length;++d){var y=p[d];if(l[y]!=u[y])continue t}return i(s).call(c,u)}}return t}}}},function(t,e,n){"use strict";var r=n(6),i=r.maybeWrapAsError,o=n(13).OperationalError,s=n(7);var a=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var n=s.keys(t),i=0;i<n.length;++i){var u=n[i];a.test(u)||(e[u]=t[u])}return e}return r.markAsOriginatingFromRejection(t),t}t.exports=function(t,e){return function(n,r){if(null!==t){if(n){var o=u(i(n));t._attachExtraTrace(o),t._reject(o)}else if(e){for(var s=arguments.length,a=new Array(Math.max(s-1,0)),c=1;c<s;++c)a[c-1]=arguments[c];t._fulfill(a)}else t._fulfill(r);t=null}}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o){var s=n(6),a=s.tryCatch;t.method=function(n){if("function"!=typeof n)throw new t.TypeError("expecting a function but got "+s.classString(n));return function(){var r=new t(e);r._captureStackTrace(),r._pushContext();var i=a(n).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},t.attempt=t.try=function(n){if("function"!=typeof n)return i("expecting a function but got "+s.classString(n));var r,u=new t(e);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],f=arguments[2];r=s.isArray(c)?a(n).apply(f,c):a(n).call(f,c)}else r=a(n)();var l=u._popContext();return o.checkForgottenReturns(r,l,"Promise.try",u),u._resolveFromSyncValue(r),u},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,n,r){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=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var c=n(o),f=new t(e);f._propagateFrom(this,1);var l=this._target();if(f._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:f,target:l,bindingPromise:c};l._then(e,s,void 0,f,h),c._then(a,u,void 0,f,h),f._setOnCancel(c)}else f._resolveCallback(l);return f},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i){var o=n(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 n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},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 n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),u.throwLater(r.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 n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();return this.caught(n,function(){return r})}}},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 n=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()},r=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 n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o){var s,a=n(6),u=a.canEvaluate,c=a.tryCatch,f=a.errorObj;if(u){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))},h=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},p=function(e){for(var n=new Array(e),r=0;r<n.length;++r)n[r]="this.p"+(r+1);var i=n.join(" = ")+" = null;",s="var promise;\n"+n.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=n.join(", "),u="Holder$"+e,l="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 l=l.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",l)(c,f,t,o)},d=[],y=[],v=[],g=0;g<8;++g)d.push(p(g+1)),y.push(l(g+1)),v.push(h(g+1));s=function(t){this._reject(t)}}t.join=function(){var n,o=arguments.length-1;if(o>0&&"function"==typeof arguments[o]&&(n=arguments[o],o<=8&&u)){(w=new t(i))._captureStackTrace();for(var c=new(0,d[o-1])(n),f=y,l=0;l<o;++l){var h=r(arguments[l],w);if(h instanceof t){var p=(h=h._target())._bitField;0==(50397184&p)?(h._then(f[l],s,void 0,w,c),v[l](h,c),c.asyncNeeded=!1):0!=(33554432&p)?f[l].call(w,h._value(),c):0!=(16777216&p)?w._reject(h._reason()):w._cancel()}else f[l].call(w,h,c)}if(!w._isFateSealed()){if(c.asyncNeeded){var g=t._getContext();c.fn=a.contextBind(g,c.fn)}w._setAsyncGuaranteed(),w._setOnCancel(c)}return w}for(var m=arguments.length,b=new Array(m),_=0;_<m;++_)b[_]=arguments[_];n&&b.pop();var w=new e(b).promise();return void 0!==n?w.spread(n):w}}},function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}t.exports=function(t){var e,r,s=n(6),a=s.canEvaluate,u=s.isIdentifier,c=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))(h)},f=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},l=function(t,e,n){var r=n[t];if("function"!=typeof r){if(!u(t))return null;if(r=e(t),n[t]=r,n[" size"]++,n[" size"]>512){for(var i=Object.keys(n),o=0;o<256;++o)delete n[i[o]];n[" size"]=i.length-256}}return r};function h(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var i="Object "+s.classString(e)+" has no method '"+s.toString(n)+"'";throw new t.TypeError(i)}return r}function p(t){return h(t,this.pop()).apply(t,this)}function d(t){return t[this]}function y(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e=function(t){return l(t,c,i)},r=function(t){return l(t,f,o)},t.prototype.call=function(t){for(var n=arguments.length,r=new Array(Math.max(n-1,0)),i=1;i<n;++i)r[i-1]=arguments[i];if(a){var o=e(t);if(null!==o)return this._then(o,void 0,void 0,r,void 0)}return r.push(t),this._then(p,void 0,void 0,r,void 0)},t.prototype.get=function(t){var e;if("number"==typeof t)e=y;else if(a){var n=r(t);e=null!==n?n:d}else e=d;return this._then(e,void 0,void 0,t,void 0)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o,s){var a=n(13).TypeError,u=n(6),c=u.errorObj,f=u.tryCatch,l=[];function h(e,n,i,o){if(s.cancellation()){var a=new t(r),u=this._finallyPromise=new t(r);this._promise=a.lastly(function(){return u}),a._captureStackTrace(),a._setOnCancel(this)}else{(this._promise=new t(r))._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(l):l,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(h,o),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=f(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=f(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},h.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(e){var n=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(e.e,!1);var r=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(o instanceof t||null!==(o=function(e,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(e);if(r._popContext(),s===c){r._pushContext();var a=t.reject(c.e);return r._popContext(),a}var u=i(s,r);if(u instanceof t)return u}return null}(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._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()}else this._promiseRejected(new a("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(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(t,e){if("function"!=typeof t)throw new a("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=h,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new a("expecting a function but got "+u.classString(t));l.push(t)},t.spawn=function(n){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof n)return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new h(n,this),i=r.promise();return r._run(t.spawn),i}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o,s){var a=n(6),u=a.tryCatch,c=a.errorObj,f=t._async;function l(e,n,r,i){this.constructor$(e),this._promise._captureStackTrace();var s=t._getContext();if(this._callback=a.contextBind(s,n),this._preservedValues=i===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0),a.isArray(e))for(var u=0;u<e.length;++u){var c=e[u];c instanceof t&&c.suppressUnhandledRejections()}}function h(e,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+a.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+a.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(i.concurrency)));s=i.concurrency}return new l(e,n,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}a.inherits(l,e),l.prototype._asyncInit=function(){this._init$(void 0,-2)},l.prototype._init=function(){},l.prototype._promiseFulfilled=function(e,n){var r=this._values,o=this.length(),a=this._preservedValues,f=this._limit;if(n<0){if(r[n=-1*n-1]=e,f>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(f>=1&&this._inFlight>=f)return r[n]=e,this._queue.push(n),!1;null!==a&&(a[n]=e);var l=this._promise,h=this._callback,p=l._boundValue();l._pushContext();var d=u(h).call(p,e,n,o),y=l._popContext();if(s.checkForgottenReturns(d,y,null!==a?"Promise.filter":"Promise.map",l),d===c)return this._reject(d.e),!0;var v=i(d,this._promise);if(v instanceof t){var g=(v=v._target())._bitField;if(0==(50397184&g))return f>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}r[n]=d}return++this._totalResolved>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},l.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},l.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;o<n;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},l.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return h(this,t,e,null)},t.map=function(t,e,n,r){return h(t,e,n,r)}}},function(t,e,n){"use strict";t.exports=function(t){var e=n(6),r=t._async,i=e.tryCatch,o=e.errorObj;function s(t,n){if(!e.isArray(t))return a.call(this,t,n);var s=i(n).apply(this._boundValue(),[null].concat(t));s===o&&r.throwLater(s.e)}function a(t,e){var n=this._boundValue(),s=void 0===t?i(e).call(n,null):i(e).call(n,null,t);s===o&&r.throwLater(s.e)}function u(t,e){if(!t){var n=new Error(t+"");n.cause=t,t=n}var s=i(e).call(this._boundValue(),t);s===o&&r.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if("function"==typeof t){var n=a;void 0!==e&&Object(e).spread&&(n=s),this._then(n,u,void 0,this,t)}return this}}},function(t,e,n){"use strict";t.exports=function(t,e){var r={},i=n(6),o=n(20),s=i.withAppended,a=i.maybeWrapAsError,u=i.canEvaluate,c=n(13).TypeError,f={__isPromisified__:!0},l=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(t){return i.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!l.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function y(t,e,n){var r=i.getDataPropertyOrDefault(t,e+n,f);return!!r&&d(r)}function v(t,e,n,r){for(var o=i.inheritedDataKeys(t),s=[],a=0;a<o.length;++a){var u=o[a],f=t[u],l=r===h||h(u,f,t);"function"!=typeof f||d(f)||y(t,u,e)||!r(u,f,t,l)||s.push(u,f)}return function(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new c("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(s,e,n),s}var g=function(t){return t.replace(/([$])/,"\\$")},m=function(t){return i.filledRange(t,"_arg","")};var b=u?function(n,u,c,f,l,h){var p=Math.max(0,function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0}(f)-1),d=function(t){for(var e=[t],n=Math.max(0,t-1-3),r=t-1;r>=n;--r)e.push(r);for(r=t+1;r<=3;++r)e.push(r);return e}(p),y="string"==typeof n||u===r;function v(t){var e=m(t).join(", "),n=t>0?", ":"";return(y?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===u?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n").replace("{{args}}",e).replace(", ",n)}var g="string"==typeof n?"this != null ? this['"+n+"'] : fn":"fn",b="'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, "+h+"); \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]",function(){for(var t="",e=0;e<d.length;++e)t+="case "+d[e]+":"+v(d[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]",y?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}()).replace("[GetFunctionCode]",g);return b=b.replace("Parameters",function(t){return i.filledRange(Math.max(t,3),"_arg","")}(p)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",b)(t,f,u,s,a,o,i.tryCatch,i.errorObj,i.notEnumerableProp,e)}:function(n,u,c,f,l,h){var p=function(){return this}(),d=n;function y(){var i=u;u===r&&(i=this);var c=new t(e);c._captureStackTrace();var f="string"==typeof d&&this!==p?this[d]:n,l=o(c,h);try{f.apply(i,s(arguments,l))}catch(t){c._rejectCallback(a(t),!0,!0)}return c._isFateSealed()||c._setAsyncGuaranteed(),c}return"string"==typeof d&&(n=f),i.notEnumerableProp(y,"__isPromisified__",!0),y};function _(t,e,n,o,s){for(var a=new RegExp(g(e)+"$"),u=v(t,e,a,n),c=0,f=u.length;c<f;c+=2){var l=u[c],h=u[c+1],p=l+e;if(o===b)t[p]=b(l,r,l,h,e,s);else{var d=o(h,function(){return b(l,r,l,h,e,s)});i.notEnumerableProp(d,"__isPromisified__",!0),t[p]=d}}return i.toFastProperties(t),t}t.promisify=function(t,e){if("function"!=typeof t)throw new c("expecting a function but got "+i.classString(t));if(d(t))return t;var n=function(t,e,n){return b(t,e,void 0,t,null,n)}(t,void 0===(e=Object(e)).context?r:e.context,!!e.multiArgs);return i.copyDescriptors(t,n,p),n},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new c("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(e=Object(e)).multiArgs,r=e.suffix;"string"!=typeof r&&(r="Async");var o=e.filter;"function"!=typeof o&&(o=h);var s=e.promisifier;if("function"!=typeof s&&(s=b),!i.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=i.inheritedDataKeys(t),u=0;u<a.length;++u){var f=t[a[u]];"constructor"!==a[u]&&i.isClass(f)&&(_(f.prototype,r,o,s,n),_(f,r,o,s,n))}return _(t,r,o,s,n)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i){var o,s=n(6),a=s.isObject,u=n(7);"function"==typeof Map&&(o=Map);var c=function(){var t=0,e=0;function n(n,r){this[t]=n,this[t+e]=r,t++}return function(r){e=r.size,t=0;var i=new Array(2*r.size);return r.forEach(n,i),i}}();function f(t){var e,n=!1;if(void 0!==o&&t instanceof o)e=c(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var s=0;s<i;++s){var a=r[s];e[s]=t[a],e[s+i]=a}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function l(e){var n,o=r(e);return a(o)?(n=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new f(o).promise(),o instanceof t&&n._propagateFrom(o,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(f,e),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var n;if(this._isMap)n=function(t){for(var e=new o,n=t.length/2|0,r=0;r<n;++r){var i=t[n+r],s=t[r];e.set(i,s)}return e}(this._values);else{n={};for(var r=this.length(),i=0,s=this.length();i<s;++i)n[this._values[i+r]]=this._values[i]}return this._resolve(n),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return l(this)},t.props=function(t){return l(t)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i){var o=n(6),s=function(t){return t.then(function(e){return a(e,t)})};function a(n,a){var u=r(n);if(u instanceof t)return s(u);if(null===(n=o.asArray(n)))return i("expecting an array or an iterable object but got "+o.classString(n));var c=new t(e);void 0!==a&&c._propagateFrom(a,3);for(var f=c._fulfill,l=c._reject,h=0,p=n.length;h<p;++h){var d=n[h];(void 0!==d||h in n)&&t.cast(d)._then(f,l,void 0,c,null)}return c}t.race=function(t){return a(t,void 0)},t.prototype.race=function(){return a(this,void 0)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o,s){var a=n(6),u=a.tryCatch;function c(e,n,r,i){this.constructor$(e);var s=t._getContext();this._fn=a.contextBind(s,n),void 0!==r&&(r=t.resolve(r))._attachCancellationCallback(this),this._initialValue=r,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function f(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){return"function"!=typeof e?r("expecting a function but got "+a.classString(e)):new c(t,e,n,i).promise()}function h(e){this.accum=e,this.array._gotAccum(e);var n=i(this.value,this.array._promise);return n instanceof t?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(e){var n,r=this.array,i=r._promise,o=u(r._fn);i._pushContext(),(n=void 0!==r._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(r._currentCancellable=n);var a=i._popContext();return s.checkForgottenReturns(n,a,void 0!==r._eachValues?"Promise.each":"Promise.reduce",i),n}a.inherits(c,e),c.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},c.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var n,r;this._values=e;var i=e.length;void 0!==this._initialValue?(n=this._initialValue,r=0):(n=t.resolve(e[0]),r=1),this._currentCancellable=n;for(var o=r;o<i;++o){var s=e[o];s instanceof t&&s.suppressUnhandledRejections()}if(!n.isRejected())for(;r<i;++r){var a={accum:null,value:e[r],index:r,length:i,array:this};n=n._then(h,void 0,void 0,a,void 0),0==(127&r)&&n._setNoAsyncGuarantee()}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(f,f,void 0,n,this)},t.prototype.reduce=function(t,e){return l(this,t,e,null)},t.reduce=function(t,e,n,r){return l(t,e,n,r)}}},function(t,e,n){"use strict";t.exports=function(t,e,r){var i=t.PromiseInspection;function o(t){this.constructor$(t)}n(6).inherits(o,e),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var n=new i;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},o.prototype._promiseRejected=function(t,e){var n=new i;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},t.settle=function(t){return r.deprecated(".settle()",".reflect()"),new o(t).promise()},t.allSettled=function(t){return new o(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,n){"use strict";t.exports=function(t,e,r){var i=n(6),o=n(13).RangeError,s=n(13).AggregateError,a=i.isArray,u={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function f(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new c(t),i=n.promise();return n.setHowMany(e),n.init(),i}i.inherits(c,e),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.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)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return f(t,e)},t.prototype.some=function(t){return f(this,t)},t._SomePromiseArray=c}},function(t,e,n){"use strict";t.exports=function(t,e,r){var i=n(6),o=t.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return u(+this).thenReturn(t)},u=t.delay=function(n,i){var o,u;return void 0!==i?(o=t.resolve(i)._then(a,null,null,n,void 0),r.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(e),u=setTimeout(function(){o._fulfill()},+n),r.cancellation()&&o._setOnCancel(new s(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(t){return u(t,this)};function c(t){return clearTimeout(this.handle),t}function f(t){throw clearTimeout(this.handle),t}t.prototype.timeout=function(t,e){var n,a;t=+t;var u=new s(setTimeout(function(){n.isPending()&&function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()}(n,e,a)},t));return r.cancellation()?(a=this.then(),(n=a._then(c,f,void 0,u,void 0))._setOnCancel(u)):n=this._then(c,f,void 0,u,void 0),n}}},function(t,e,n){"use strict";t.exports=function(t,e,r,i,o,s){var a=n(6),u=n(13).TypeError,c=n(6).inherits,f=a.errorObj,l=a.tryCatch,h={};function p(t){setTimeout(function(){throw t},0)}function d(e,n){var i=0,s=e.length,a=new t(o);return function o(){if(i>=s)return a._fulfill();var u=function(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(e[i++]);if(u instanceof t&&u._isDisposable()){try{u=r(u._getDisposer().tryDispose(n),e.promise)}catch(t){return p(t)}if(u instanceof t)return u._then(o,p,null,null,null)}o()}(),a}function y(t,e,n){this._data=t,this._promise=e,this._context=n}function v(t,e,n){this.constructor$(t,e,n)}function g(t){return y.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}y.prototype.data=function(){return this._data},y.prototype.promise=function(){return this._promise},y.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},y.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==h?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},y.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(v,y),v.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},m.prototype._resultCancelled=function(){for(var e=this.length,n=0;n<e;++n){var r=this[n];r instanceof t&&r.cancel()}},t.using=function(){var n=arguments.length;if(n<2)return e("you must pass at least 2 arguments to Promise.using");var i,o=arguments[n-1];if("function"!=typeof o)return e("expecting a function but got "+a.classString(o));var u=!0;2===n&&Array.isArray(arguments[0])?(n=(i=arguments[0]).length,u=!1):(i=arguments,n--);for(var c=new m(n),h=0;h<n;++h){var p=i[h];if(y.isDisposer(p)){var v=p;(p=p.promise())._setDisposable(v)}else{var b=r(p);b instanceof t&&(p=b._then(g,null,null,{resources:c,index:h},void 0))}c[h]=p}var _=new Array(c.length);for(h=0;h<_.length;++h)_[h]=t.resolve(c[h]).reflect();var w=t.all(_).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return f.e=n.error(),f;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}E._pushContext(),o=l(o);var r=u?o.apply(void 0,t):o(t),i=E._popContext();return s.checkForgottenReturns(r,i,"Promise.using",E),r}),E=w.lastly(function(){var e=new t.PromiseInspection(w);return d(c,e)});return c.promise=E,E._setOnCancel(c),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=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,i());throw new u}}},function(t,e){"use strict";t.exports=function(t){var e=t._SomePromiseArray;function n(t){var n=new e(t),r=n.promise();return n.setHowMany(1),n.setUnwrap(),n.init(),r}t.any=function(t){return n(t)},t.prototype.any=function(){return n(this)}}},function(t,e){"use strict";t.exports=function(t,e){var n=t.reduce,r=t.all;function i(){return r(this)}t.prototype.each=function(t){return n(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return n(this,t,e,e)},t.each=function(t,r){return n(t,r,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,r){return n(t,r,e,e)}}},function(t,e){"use strict";t.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},function(t,e,n){var r=n(43),i=1,o=4;t.exports=function(t){return r(t,i|o)}},function(t,e,n){var r=n(44),i=n(88),o=n(89),s=n(92),a=n(115),u=n(119),c=n(120),f=n(121),l=n(125),h=n(129),p=n(131),d=n(132),y=n(137),v=n(138),g=n(152),m=n(100),b=n(101),_=n(68),w=n(94),E=1,x=2,T=4,S="[object Arguments]",k="[object Function]",A="[object GeneratorFunction]",j="[object Object]",O={};O[S]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[j]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[k]=O["[object WeakMap]"]=!1,t.exports=function t(e,n,C,I,R,B){var P,F=n&E,M=n&x,N=n&T;if(C&&(P=R?C(e,I,R,B):C(e)),void 0!==P)return P;if(!_(e))return e;var L=m(e);if(L){if(P=y(e),!F)return c(e,P)}else{var D=d(e),U=D==k||D==A;if(b(e))return u(e,F);if(D==j||D==S||U&&!R){if(P=M||U?{}:g(e),!F)return M?l(e,a(P,e)):f(e,s(P,e))}else{if(!O[D])return R?e:{};P=v(e,D,t,F)}}B||(B=new r);var q=B.get(e);if(q)return q;B.set(e,P);var V=N?M?p:h:M?keysIn:w,z=L?void 0:V(e);return i(z||e,function(r,i){z&&(r=e[i=r]),o(P,i,t(r,n,C,i,e,B))}),P}},function(t,e,n){var r=n(45),i=n(53),o=n(54),s=n(55),a=n(56),u=n(57);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(46),i=n(47),o=n(50),s=n(51),a=n(52);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(48),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(49);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(48);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(48);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(48);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(45);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(45),i=n(58),o=n(73),s=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<s-1)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(59)(n(64),"Map");t.exports=r},function(t,e,n){var r=n(60),i=n(72);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(61),i=n(69),o=n(68),s=n(71),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,l=c.hasOwnProperty,h=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:a).test(s(t))}},function(t,e,n){var r=n(62),i=n(68),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=r(t);return e==s||e==a||e==o||e==u}},function(t,e,n){var r=n(63),i=n(66),o=n(67),s="[object Null]",a="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:u&&u in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(64).Symbol;t.exports=r},function(t,e,n){var r=n(65),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,function(){return this}())},function(t,e,n){var r=n(63),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(70),i=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(64)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(74),i=n(82),o=n(85),s=n(86),a=n(87);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(75),i=n(45),o=n(58);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(76),i=n(78),o=n(79),s=n(80),a=n(81);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(77);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(59)(Object,"create");t.exports=r},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(77),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===i?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(77),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(77),i="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?i:e,this}},function(t,e,n){var r=n(83);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,n){var r=n(84);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(83);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(83);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(83);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(90),i=n(49),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];o.call(t,e)&&i(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(91);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(59),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(93),i=n(94);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(89),i=n(90);t.exports=function(t,e,n,o){var s=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var c=e[a],f=o?o(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),s?i(n,c,f):r(n,c,f)}return n}},function(t,e,n){var r=n(95),i=n(110),o=n(114);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(96),i=n(97),o=n(100),s=n(101),a=n(104),u=n(105),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),f=!n&&i(t),l=!n&&!f&&s(t),h=!n&&!f&&!l&&u(t),p=n||f||l||h,d=p?r(t.length,String):[],y=d.length;for(var v in t)!e&&!c.call(t,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||a(v,y))||d.push(v);return d}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(98),i=n(99),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(62),i=n(99),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){(function(t){var r=n(64),i=n(103),o="object"==typeof e&&e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u}).call(e,n(102)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){t.exports=function(){return!1}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){var r=n(106),i=n(108),o=n(109),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},function(t,e,n){var r=n(62),i=n(107),o=n(99),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(65),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(e,n(102)(t))},function(t,e,n){var r=n(111),i=n(112),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(113)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(61),i=n(107);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(93),i=n(116);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(95),i=n(117),o=n(114);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(68),i=n(111),o=n(118),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){(function(t){var r=n(64),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}}).call(e,n(102)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(93),i=n(122);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(123),i=n(124),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),r(s(t),function(e){return o.call(t,e)}))}:i;t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(93),i=n(126);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(127),i=n(128),o=n(122),s=n(124),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:s;t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(113)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(130),i=n(122),o=n(94);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(127),i=n(100);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(130),i=n(126),o=n(116);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(133),i=n(58),o=n(134),s=n(135),a=n(136),u=n(62),c=n(71),f=c(r),l=c(i),h=c(o),p=c(s),d=c(a),y=u;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||o&&"[object Promise]"!=y(o.resolve())||s&&"[object Set]"!=y(new s)||a&&"[object WeakMap]"!=y(new a))&&(y=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(59)(n(64),"DataView");t.exports=r},function(t,e,n){var r=n(59)(n(64),"Promise");t.exports=r},function(t,e,n){var r=n(59)(n(64),"Set");t.exports=r},function(t,e,n){var r=n(59)(n(64),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(139),i=n(141),o=n(142),s=n(146),a=n(147),u=n(150),c=n(151),f="[object Boolean]",l="[object Date]",h="[object Map]",p="[object Number]",d="[object RegExp]",y="[object Set]",v="[object String]",g="[object Symbol]",m="[object ArrayBuffer]",b="[object DataView]",_="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",x="[object Int16Array]",T="[object Int32Array]",S="[object Uint8Array]",k="[object Uint8ClampedArray]",A="[object Uint16Array]",j="[object Uint32Array]";t.exports=function(t,e,n,O){var C=t.constructor;switch(e){case m:return r(t);case f:case l:return new C(+t);case b:return i(t,O);case _:case w:case E:case x:case T:case S:case k:case A:case j:return c(t,O);case h:return o(t,O,n);case p:case v:return new C(t);case d:return s(t);case y:return a(t,O,n);case g:return u(t)}}},function(t,e,n){var r=n(140);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e,n){var r=n(64).Uint8Array;t.exports=r},function(t,e,n){var r=n(139);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e,n){var r=n(143),i=n(144),o=n(145),s=1;t.exports=function(t,e,n){var a=e?n(o(t),s):o(t);return i(a,r,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.set(e[0],e[1]),t}},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(148),i=n(144),o=n(149),s=1;t.exports=function(t,e,n){var a=e?n(o(t),s):o(t);return i(a,r,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.add(e),t}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},function(t,e,n){var r=n(63),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,n){var r=n(139);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(153),i=n(128),o=n(111);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(68),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e,n){var r=n(155),i=n(156),o=n(158),s=n(166),a=o(function(t){return t.push(void 0,s),r(i,void 0,t)});t.exports=a},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(93),i=n(157),o=n(116),s=i(function(t,e,n,i){r(e,o(e),t,i)});t.exports=s},function(t,e,n){var r=n(158),i=n(165);t.exports=function(t){return r(function(e,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,s)}return e})}},function(t,e,n){var r=n(159),i=n(160),o=n(161);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(155),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s<a;)u[s]=o[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=o[s];return c[e]=n(u),r(t,this,c)}}},function(t,e,n){var r=n(162),i=n(164)(r);t.exports=i},function(t,e,n){var r=n(163),i=n(91),o=n(159),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var n=800,r=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var s=i(),a=r-(s-o);if(o=s,a>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(49),i=n(114),o=n(104),s=n(68);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?i(n)&&o(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(49),i=Object.prototype,o=i.hasOwnProperty;t.exports=function(t,e,n,s){return void 0===t||r(t,i[n])&&!o.call(s,n)?e:t}},function(t,e){(function(e){t.exports=!1;try{t.exports="[object process]"===Object.prototype.toString.call(e.process)}catch(t){}}).call(e,function(){return this}())},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(169)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"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+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),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(i())}).call(e,n(5))},function(t,e,n){var r;function i(t){function n(){if(n.enabled){var t=n,i=+new Date,o=i-(r||i);t.diff=o,t.prev=r,t.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;u++;var i=e.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(t,o),s.splice(u,1),u--}return n}),e.formatArgs.call(t,s),(n.log||e.log||console.log.bind(console)).apply(t,s)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),"function"==typeof e.init&&e.init(n),n}(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(t=n[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(170),e.names=[],e.skips=[],e.formatters={}},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;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)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?function(t){return a(t,o,"day")||a(t,i,"hour")||a(t,r,"minute")||a(t,n,"second")||t+" ms"}(t):function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){"use strict";var r=n(172);t.exports=function(){var t=r;return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}()},function(t,e){t.exports={websocket:"",address_prefix:"VIZ",chain_id:"2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd",broadcast_transaction_with_callback:!1,reference_irreversible_block:!1,tx_expiration_seconds:60}},function(t,e){"use strict";t.exports=[{api:"validator_api",method:"get_miner_queue"},{api:"validator_api",method:"get_validator_schedule"},{api:"validator_api",method:"get_witness_schedule"},{api:"validator_api",method:"get_validators",params:["validatorIds"]},{api:"validator_api",method:"get_witnesses",params:["witnessIds"]},{api:"validator_api",method:"get_validator_by_account",params:["accountName"]},{api:"validator_api",method:"get_witness_by_account",params:["accountName"]},{api:"validator_api",method:"get_validators_by_vote",params:["from","limit"]},{api:"validator_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"validator_api",method:"get_validators_by_counted_vote",params:["from","limit"]},{api:"validator_api",method:"get_witnesses_by_counted_vote",params:["from","limit"]},{api:"validator_api",method:"get_validator_count"},{api:"validator_api",method:"get_witness_count"},{api:"validator_api",method:"lookup_validator_accounts",params:["lowerBoundName","limit"]},{api:"validator_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"validator_api",method:"get_active_validators"},{api:"validator_api",method:"get_active_witnesses"},{api:"account_history",method:"get_account_history",params:["account","from","limit"]},{api:"operation_history",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"operation_history",method:"get_transaction",params:["trxId"]},{api:"tags",method:"get_trending_tags",params:["afterTag","limit"]},{api:"tags",method:"get_tags_used_by_author",params:["author"]},{api:"tags",method:"get_discussions_by_payout",params:["query"]},{api:"tags",method:"get_discussions_by_trending",params:["query"]},{api:"tags",method:"get_discussions_by_created",params:["query"]},{api:"tags",method:"get_discussions_by_active",params:["query"]},{api:"tags",method:"get_discussions_by_cashout",params:["query"]},{api:"tags",method:"get_discussions_by_votes",params:["query"]},{api:"tags",method:"get_discussions_by_children",params:["query"]},{api:"tags",method:"get_discussions_by_hot",params:["query"]},{api:"tags",method:"get_discussions_by_feed",params:["query"]},{api:"tags",method:"get_discussions_by_blog",params:["query"]},{api:"tags",method:"get_discussions_by_contents",params:["query"]},{api:"tags",method:"get_discussions_by_author_before_date",params:["author","startPermlink","beforeDate","limit"]},{api:"tags",method:"get_languages"},{api:"social_network",method:"get_replies_by_last_update",params:["startAuthor","startPermlink","limit","voteLimit"]},{api:"social_network",method:"get_content",params:["author","permlink","voteLimit"]},{api:"social_network",method:"get_content_replies",params:["parent","parentPermlink","voteLimit"]},{api:"social_network",method:"get_all_content_replies",params:["parent","parentPermlink","voteLimit"]},{api:"social_network",method:"get_active_votes",params:["author","permlink","voteLimit"]},{api:"social_network",method:"get_account_votes",params:["voter","from","voteLimit"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block_header",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block",params:["blockNum"]},{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_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"database_api",method:"get_account_count"},{api:"database_api",method:"get_owner_history",params:["account"]},{api:"database_api",method:"get_master_history",params:["account"]},{api:"database_api",method:"set_block_applied_callback",params:["callback"]},{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_transaction_hex",params:["trx"]},{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:["name","signers"]},{api:"database_api",method:"get_accounts",params:["accountNames"]},{api:"database_api",method:"lookup_account_names",params:["accountNames"]},{api:"database_api",method:"lookup_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_proposed_transaction",params:["account"]},{api:"database_api",method:"get_database_info"},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit","type"]},{api:"database_api",method:"get_expiring_vesting_delegations",params:["account","from","limit"]},{api:"database_api",method:"get_proposed_transactions",params:["account","from","limit"]},{api:"database_api",method:"get_accounts_on_sale",params:["from","limit"]},{api:"database_api",method:"get_accounts_on_auction",params:["from","limit"]},{api:"database_api",method:"get_subaccounts_on_sale",params:["from","limit"]},{api:"follow",method:"get_followers",params:["following","startFollower","followType","limit"]},{api:"follow",method:"get_following",params:["follower","startFollowing","followType","limit"]},{api:"follow",method:"get_follow_count",params:["account"]},{api:"follow",method:"get_feed_entries",params:["account","entryId","limit"]},{api:"follow",method:"get_feed",params:["account","entryId","limit"]},{api:"follow",method:"get_blog_entries",params:["account","entryId","limit"]},{api:"follow",method:"get_blog",params:["account","entryId","limit"]},{api:"follow",method:"get_reblogged_by",params:["author","permlink"]},{api:"follow",method:"get_blog_authors",params:["blogAccount"]},{api:"account_by_key",method:"get_key_references",params:["account_name_type"]},{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:["block"]},{api:"committee_api",method:"get_committee_request",params:["request_id","votes_count"]},{api:"committee_api",method:"get_committee_request_votes",params:["request_id"]},{api:"committee_api",method:"get_committee_requests_list",params:["status"]},{api:"invite_api",method:"get_invites_list",params:["status"]},{api:"invite_api",method:"get_invite_by_id",params:["id"]},{api:"invite_api",method:"get_invite_by_key",params:["invite_key"]},{api:"paid_subscription_api",method:"get_paid_subscriptions",params:["from","limit"]},{api:"paid_subscription_api",method:"get_paid_subscription_options",params:["account"]},{api:"paid_subscription_api",method:"get_paid_subscription_status",params:["subscriber","account"]},{api:"paid_subscription_api",method:"get_active_paid_subscriptions",params:["subscriber"]},{api:"paid_subscription_api",method:"get_inactive_paid_subscriptions",params:["subscriber"]},{api:"custom_protocol_api",method:"get_account",params:["account","custom_protocol_id"]},{api:"auth_util",method:"check_authority_signature",params:["account_name","level","signatures"]},{api:"block_info",method:"get_block_info",params:["start_block_num","count"]},{api:"block_info",method:"get_blocks_with_info",params:["start_block_num","count"]},{api:"raw_block",method:"get_raw_block",params:["block_num"]}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});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};e.camelCase=function(t){return t.replace(o,function(t,e){return e.toUpperCase()})},e.validateAccountName=function(t){var e=void 0,n=void 0,r=void 0,i=void 0;if(i="Account name should ",!t)return i+"not be empty.";var o=t.length;if(o<2)return i+"be longer.";if(o>25)return i+"be shorter.";/\./.test(t)&&(i="Each account segment should ");var s=t.split(".");for(e=0,r=s.length;e<r;e++){if(n=s[e],!/^[a-z]/.test(n))return i+"start with a letter.";if(!/^[a-z0-9-]*$/.test(n))return i+"have only letters, digits, or dashes.";if(/--/.test(n))return i+"have only one dash in a row.";if(!/[a-z0-9]$/.test(n))return i+"end with a letter or digit.";if(!(n.length>=2))return i+"be longer"}return null},e.voiceEvent=function(t,e,n,r,i,o,s,a){a=void 0===a?function(){}:a;var u=function(t,e,n,r,i,o,s,a){var u={p:s,e:n,b:i};r!==e&&(u.a=r),void 0!==o&&(u.d=o),viz.broadcast.custom(t,[],[e],"VE",JSON.stringify(u),function(t,e){a(!t)})};!1!==(s=void 0!==s&&s)?u(t,e,n,r,i,o,s,a):viz.api.getAccount(e,"VE",function(s,c){s?a(!1):u(t,e,n,r,i,o,c.custom_sequence_block_num,a)})},e.voiceText=function(t,e,n,r,i,o,s,a){r=void 0!==r&&r,i=void 0!==i&&i,o=void 0!==o&&o,a=void 0===a?function(){}:a;var u=function(t,e,n,r,i,o,s,a){var u={p:s,d:{t:n}};r?u.d.r=r:i&&(u.d.s=i),o&&(u.d.b=o),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(u),function(t,e){a(!t)})};!1!==(s=void 0!==s&&s)?u(t,e,n,r,i,o,s,a):viz.api.getAccount(e,"V",function(s,c){s?a(!1):u(t,e,n,r,i,o,c.custom_sequence_block_num,a)})},e.voiceEncodedText=function(t,e,n,o,s,a,u,c,f,l){a=void 0!==a&&a,u=void 0!==u&&u,c=void 0!==c&&c,l=void 0===l?function(){}:l;var h=function(t,e,n,o,s,a,u,c,f,l){var h={d:{t:s}};if(a?h.d.r=a:u&&(h.d.s=u),c&&(h.d.b=c),"object"===(void 0===n?"undefined":r(n))){for(var p in n=n.reverse(),"object"===(void 0===o?"undefined":r(o))&&(o=o.reverse()),n){var d=p;h.nt=0==d?"t":"e",console.log("encode object",h,"with passphrase",n[d],"and comment",o[d]),h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,n[d]),"object"===(void 0===o?"undefined":r(o))&&"string"==typeof o[d]&&(h.c=o[d])}delete h.nt}else h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,n),void 0!==o&&(h.c=o);h.t="e",h.p=f,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(h),function(t,e){l(!t)})};!1!==(f=void 0!==f&&f)?h(t,e,n,o,s,a,u,c,f,l):viz.api.getAccount(e,"V",function(r,i){r?l(!1):h(t,e,n,o,s,a,u,c,i.custom_sequence_block_num,l)})},e.voicePublication=function(t,e,n,r,i,o,s,a,u,c,f){i=void 0!==i&&i,o=void 0!==o&&o,s=void 0!==s&&s,a=void 0!==a&&a,u=void 0!==u&&u,f=void 0===f?function(){}:f;var l=function(t,e,n,r,i,o,s,a,u,c,f){var l={p:c,t:"p",d:{t:n,m:r}};i&&(l.d.d=i),o&&(l.d.i=o),s?l.d.r=s:a&&(l.d.s=a),u&&(l.d.b=u),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(l),function(t,e){f(!t)})};!1!==(c=void 0!==c&&c)?l(t,e,n,r,i,o,s,a,u,c,f):viz.api.getAccount(e,"V",function(c,h){c?f(!1):l(t,e,n,r,i,o,s,a,u,h.custom_sequence_block_num,f)})},e.voiceEncodedPublication=function(t,e,n,o,s,a,u,c,f,l,h,p,d){u=void 0!==u&&u,c=void 0!==c&&c,f=void 0!==f&&f,l=void 0!==l&&l,h=void 0!==h&&h,d=void 0===d?function(){}:d;var y=function(t,e,n,o,s,a,u,c,f,l,h,p,d){var y={t:"p",d:{t:s,m:a}};if(u&&(y.d.d=u),c&&(y.d.i=c),f?y.d.r=f:l&&(y.d.s=l),h&&(y.d.b=h),"object"===(void 0===n?"undefined":r(n))){for(var v in n=n.reverse(),"object"===(void 0===o?"undefined":r(o))&&(o=o.reverse()),n){var g=v;y.nt=0==g?"p":"e",console.log("encode object",y,"with passphrase",n[g],"and comment",o[g]),y.d=JSON.stringify(y),y.d=i.Aes.simpleEncoder(y.d,n[g]),"object"===(void 0===o?"undefined":r(o))&&"string"==typeof o[g]&&(y.c=o[g])}delete y.nt}else y.d.nt=y.t,y.d=JSON.stringify(y),y.d=i.Aes.simpleEncoder(y.d,n),void 0!==o&&(y.c=o);y.t="e",y.p=p,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(y),function(t,e){d(!t)})};!1!==(p=void 0!==p&&p)?y(t,e,n,o,s,a,u,c,f,l,h,p,d):viz.api.getAccount(e,"V",function(r,i){r?d(!1):y(t,e,n,o,s,a,u,c,f,l,h,i.custom_sequence_block_num,d)})};var i=n(175),o=/_([a-z])/g},function(t,e,n){"use strict";t.exports={Address:n(176),Aes:n(227),PrivateKey:n(260),PublicKey:n(250),Signature:n(261),brainKey:n(265),key_utils:n(266),hash:n(185),ecc_config:n(171)}},function(t,e,n){(function(e){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=n(181),o=n(171),s=n(185),a=n(225),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.addy=e}return r(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.get("address_prefix"),n=s.ripemd160(this.addy),r=e.concat([this.addy,n.slice(0,4)]);return t+a.encode(r)}}],[{key:"fromBuffer",value:function(e){var n=s.sha512(e);return new t(s.ripemd160(n))}},{key:"fromString",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get("address_prefix"),u=n.slice(0,r.length);i.equal(r,u,"Expecting key to begin with "+r+", instead got "+u);var c=n.slice(r.length),f=(c=new e(a.decode(c),"binary")).slice(-4);c=c.slice(0,-4);var l=s.ripemd160(c);return l=l.slice(0,4),i.deepEqual(f,l,"Checksum did not match"),new t(c)}},{key:"fromPublic",value:function(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=s.sha256(n.toBuffer(r)),a=s.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var c=e.concat([u,a]),f=s.sha256(c);f=s.sha256(f);var l=e.concat([c,f.slice(0,4)]);return new t(s.ripemd160(l))}}]),t}();t.exports=u}).call(e,n(177).Buffer)},function(t,e,n){(function(t){
|
|
1
|
+
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,r.c=e,r.p="",r(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){"use strict";var n=a(r(181)),i=(a(r(303)),r(1)),o=a(i),s=a(r(171));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){return function n(i,o){try{var s=e[i](o),a=s.value}catch(t){return void r(t)}if(!s.done)return Promise.resolve(a).then(function(t){n("next",t)},function(t){n("throw",t)});t(a)}("next")})}}r(310),describe("viz.api:",function(){var t=this;this.timeout(3e4),describe("new VIZ",function(){it("doesn't open a connection until required",function(){(0,n.default)(!o.default.ws,"There was a connection on the singleton?"),(0,n.default)(!(new i.VIZ).ws,"There was a connection on a new instance?")})}),describe("setWebSocket",function(){var t=s.default.get("websocket");after(function(){o.default.setWebSocket(t)}),it("works",function(){o.default.setWebSocket("ws://localhost"),s.default.get("websocket").should.be.eql("ws://localhost")})}),beforeEach(u(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.default.apiIdsP;case 2:case"end":return t.stop()}},e,t)}))),describe("getAccounts",function(){describe("getting viz's account",function(){it("works",u(regeneratorRuntime.mark(function e(){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.default.getAccountsAsync(["viz"]);case 2:r=t.sent,(0,n.default)(r,"getAccountsAsync resolved to null?"),r.should.have.lengthOf(1),r[0].should.have.property("name","viz");case 6:case"end":return t.stop()}},e,t)}))),it("clears listeners",u(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.default.listeners("message").should.have.lengthOf(0);case 1:case"end":return t.stop()}},e,t)})))})})})},function(t,e,r){"use strict";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=p(r(2)),o=p(r(3)),s=p(r(42)),a=p(r(154)),u=(p(r(167)),p(r(168))),f=p(r(171)),c=p(r(173)),h=r(174),l=p(r(267));function p(t){return t&&t.__esModule?t:{default:t}}var d=(0,u.default)("viz:emitters"),v=(0,u.default)("viz:protocol"),y=(0,u.default)("viz:setup"),g=(0,u.default)("viz:ws"),m={id:0},_=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return(0,a.default)(t,m),r.options=(0,s.default)(t),r.id=0,r.inFlight=0,r.currentP=o.default.fulfilled(),r.isOpen=!1,r.releases=[],r.requests={},r}return function(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)}(e,i.default),n(e,[{key:"_setTransport",value:function(t){if(t&&t.match("^((http|https)?://)"))this.transport=new l.default.http;else{if(!t||!t.match("^((ws|wss)?://)"))throw Error("unknown transport! ["+t+"]");this.transport=new l.default.ws}}},{key:"setWebSocket",value:function(t){console.warn("viz.api.setWebSocket(url) is now deprecated instead use viz.config.set('websocket',url)"),y("Setting WS",t),f.default.set("websocket",t),this._setTransport(t),this.stop()}},{key:"start",value:function(){var t=f.default.get("websocket");return this._setTransport(t),this.transport.start()}},{key:"stop",value:function(){var t=this.transport.stop();return this.transport=null,t}},{key:"listenTo",value:function(t,e,r){return d("Adding listener for",e,"from",t.constructor.name),t.addEventListener?t.addEventListener(e,r):t.on(e,r),function(){d("Removing listener for",e,"from",t.constructor.name),t.removeEventListener?t.removeEventListener(e,r):t.removeListener(e,r)}}},{key:"onMessage",value:function(t,e){var r=e.api,n=e.data,i=e.resolve,o=e.reject,s=e.start_time;g("-- VIZ.onMessage --\x3e",t.id);var a=t.error;if(a){var u=new Error((a.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return u.payload=t,void o(u)}v("Resolved",r,n,"->",t),this.emit("track-performance",n.method,Date.now()-s),delete this.requests[t.id],i(t.result)}},{key:"send",value:function(t,e,r){this.transport||this.start();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:"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="",s=!0;return function a(){s&&e.getDynamicGlobalPropertiesAsync().then(function(e){var s="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(s!==i)if(i)for(var u=i;u<s;u++)u!==i&&r(null,u),i=u;else i=s,r(null,s);o.default.delay(n).then(function(){a()})},function(t){r(t)})}(),function(){s=!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){if(e)return o(),void r(e);(n=s)!==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){if(t)return r(),void e(t);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){if(t)return r(),void e(t);n.operations.forEach(function(t){e(null,t)})});return r}}]),e}();c.default.forEach(function(t){var e=t.method_name||(0,h.camelCase)(t.method),r=t.params||[];_.prototype[e+"With"]=function(e,n){var i=r.map(function(t){return e[t]});return this.send(t.api,{method:t.method,params:i},n)},_.prototype[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=r.reduce(function(t,e,r){return t[e]=n[r],t},{}),s=n[r.length];return this[e+"With"](o,s)}}),o.default.promisifyAll(_.prototype);var b=new _;(e=t.exports=b).VIZ=_,e.VIZ.DEFAULTS=m},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===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(!function(t){return"number"==typeof t}(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,s,a,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(r=this._events[t]))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(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(f=r.slice()).length,u=0;u<s;u++)f[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var s;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]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(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){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,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(n(r=this._events[t]))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){return 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";var n;"undefined"!=typeof Promise&&(n=Promise);var i=r(4)();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(t){}return i},t.exports=i},function(t,e,r){(function(e){"use strict";t.exports=function(){var n=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},i=function(){return new R.PromiseInspection(this._target())},o=function(t){return R.reject(new m(t))};function s(){}var a={},u=r(6);u.setReflectHandler(i);var f=function(){var t=e.domain;return void 0===t?null:t},c=function(){return{domain:f(),async:null}},h=u.isNode&&u.nodeSupportsAsyncResource?r(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource:null,l=function(){return{domain:f(),async:new h("Bluebird::Promise")}},p=u.isNode?c:function(){return null};u.notEnumerableProp(R,"_getContext",p);var d=r(7),v=r(8),y=new v;d.defineProperty(R,"_async",{value:y});var g=r(13),m=R.TypeError=g.TypeError;R.RangeError=g.RangeError;var _=R.CancellationError=g.CancellationError;R.TimeoutError=g.TimeoutError,R.OperationalError=g.OperationalError,R.RejectionError=g.OperationalError,R.AggregateError=g.AggregateError;var b=function(){},w={},E={},T=r(14)(R,b),S=r(15)(R,b,T,o,s),x=r(16)(R),k=x.create,A=r(17)(R,x,function(){p=l,u.notEnumerableProp(R,"_getContext",l)},function(){p=c,u.notEnumerableProp(R,"_getContext",c)}),j=(A.CapturedTrace,r(18)(R,T,E)),O=r(19)(E),B=r(20),I=u.errorObj,C=u.tryCatch;function R(t){t!==b&&function(t,e){if(null==t||t.constructor!==R)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 "+u.classString(e))}(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 P(t){this.promise._resolveCallback(t)}function F(t){this.promise._rejectCallback(t,!1)}function M(t){var e=new R(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return R.prototype.toString=function(){return"[object Promise]"},R.prototype.caught=R.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 s=arguments[r];if(!u.isObject(s))return o("Catch statement predicate: expecting an object but got "+u.classString(s));n[i++]=s}if(n.length=i,"function"!=typeof(t=arguments[r]))throw new m("The last argument to .catch() must be a function, got "+u.toString(t));return this.then(void 0,O(n,t,this))}return this.then(void 0,t)},R.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},R.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: "+u.classString(t);arguments.length>1&&(r+=", "+u.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},R.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},R.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},R.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},R.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},R.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},R.getNewLibraryCopy=t.exports,R.is=function(t){return t instanceof R},R.fromNode=R.fromCallback=function(t){var e=new R(b);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=C(t)(B(e,r));return n===I&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},R.all=function(t){return new S(t).promise()},R.cast=function(t){var e=T(t);return e instanceof R||((e=new R(b))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},R.resolve=R.fulfilled=R.cast,R.reject=R.rejected=function(t){var e=new R(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},R.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+u.classString(t));return y.setScheduler(t)},R.prototype._then=function(t,e,r,n,i){var o=void 0!==i,s=o?i:new R(b),a=this._target(),f=a._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&f)?this._boundValue():a===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var c=p();if(0!=(50397184&f)){var h,l,d=a._settlePromiseCtx;0!=(33554432&f)?(l=a._rejectionHandler0,h=t):0!=(16777216&f)?(l=a._fulfillmentHandler0,h=e,a._unsetRejectionIsUnhandled()):(d=a._settlePromiseLateCancellationObserver,l=new _("late cancellation observer"),a._attachExtraTrace(l),h=e),y.invoke(d,a,{handler:u.contextBind(c,h),promise:s,receiver:n,value:l})}else a._addCallbacks(t,e,s,n,c);return s},R.prototype._length=function(){return 65535&this._bitField},R.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},R.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},R.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},R.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},R.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},R.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},R.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},R.prototype._isFinal=function(){return(4194304&this._bitField)>0},R.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},R.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},R.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},R.prototype._setAsyncGuaranteed=function(){if(!y.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},R.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},R.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},R.prototype._promiseAt=function(t){return this[4*t-4+2]},R.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},R.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},R.prototype._boundValue=function(){},R.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(e,r,n,i,null)},R.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=a),this._addCallbacks(r,n,i,o,null)},R.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=u.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=u.contextBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=u.contextBind(i,t)),"function"==typeof e&&(this[s+1]=u.contextBind(i,e))}return this._setLength(o+1),o},R.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},R.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=T(t,this);if(!(r instanceof R))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a<s;++a)i._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new _("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(n())}},R.prototype._rejectCallback=function(t,e,r){var n=u.ensureErrorObject(t),i=n===t;if(!i&&!r&&A.warnings()){var o="a promise was rejected with a non-error: "+u.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},R.prototype._resolveFromExecutor=function(t){if(t!==b){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)}},R.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0==(65536&i)){var o;n._pushContext(),e===w?r&&"number"==typeof r.length?o=C(t).apply(this._boundValue(),r):(o=I).e=new m("cannot .spread() a non-array: "+u.classString(r)):o=C(t).call(e,r);var s=n._popContext();0==(65536&(i=n._bitField))&&(o===E?n._reject(r):o===I?n._rejectCallback(o.e,!1):(A.checkForgottenReturns(o,s,"",n,this),n._resolveCallback(o)))}},R.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},R.prototype._followee=function(){return this._rejectionHandler0},R.prototype._setFollowee=function(t){this._rejectionHandler0=t},R.prototype._settlePromise=function(t,e,r,n){var o=t instanceof R,a=this._bitField,u=0!=(134217728&a);0!=(65536&a)?(o&&t._invokeInternalOnCancel(),r instanceof j&&r.isFinallyHandler()?(r.cancelPromise=t,C(e).call(r,n)===I&&t._reject(I.e)):e===i?t._fulfill(i.call(r)):r instanceof s?r._promiseCancelled(t):o||t instanceof S?t._cancel():r.cancel()):"function"==typeof e?o?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,n,t)):e.call(r,n,t):r instanceof s?r._isResolved()||(0!=(33554432&a)?r._promiseFulfilled(n,t):r._promiseRejected(n,t)):o&&(u&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(n):t._reject(n))},R.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof R?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof R&&r._reject(i)},R.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},R.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)},R.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},R.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():y.settlePromises(this),this._dereferenceTrace())}},R.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return y.fatalError(t,u.isNode);(65535&e)>0?y.settlePromises(this):this._ensurePossibleRejectionHandled()}},R.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)}},R.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)}},R.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()},R.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(R.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),R.defer=R.pending=function(){return A.deprecated("Promise.defer","new Promise"),{promise:new R(b),resolve:P,reject:F}},u.notEnumerableProp(R,"_makeSelfResolutionError",n),r(21)(R,b,T,o,A),r(22)(R,b,T,A),r(23)(R,S,o,A),r(24)(R),r(25)(R),r(26)(R,S,T,b,y),R.Promise=R,R.version="3.7.2",r(27)(R),r(28)(R,o,b,T,s,A),r(29)(R,S,o,T,b,A),r(30)(R),r(31)(R,b),r(32)(R,S,T,o),r(33)(R,b,T,o),r(34)(R,S,o,T,b,A),r(35)(R,S,A),r(36)(R,S,o),r(37)(R,b,A),r(38)(R,o,T,k,b,A),r(39)(R),r(40)(R,b),r(41)(R,b),u.toFastProperties(R),u.toFastProperties(R.prototype),M({a:1}),M({b:2}),M({c:3}),M(1),M(function(){}),M(void 0),M(!1),M(new R(b)),A.setBounds(v.firstLineError,u.lastLineError),R}}).call(e,r(5))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,f=[],c=!1,h=-1;function l(){c&&u&&(c=!1,u.length?f=u.concat(f):h=-1,f.length&&p())}function p(){if(!c){var t=a(l);c=!0;for(var e=f.length;e;){for(u=f,f=[];++h<e;)u&&u[h].run();h=-1,e=f.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.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];f.push(new d(t,e)),1!==f.length||c||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){(function(e,n){"use strict";var i=r(7),o="undefined"==typeof navigator,s={e:{}},a,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0!==this?this:null;function f(){try{var t=a;return a=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function c(t){return a=t,f}var h=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function l(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function p(t){return"function"==typeof t||"object"==typeof t&&null!==t}function d(t){return l(t)?new Error(k(t)):t}function v(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 y(t,e,r){if(!i.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 g(t,e,r){if(l(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(t,e,n),t}function m(t){throw t}var _=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(i.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],o=Object.create(null);null!=t&&!e(t);){var s;try{s=r(t)}catch(t){return n}for(var a=0;a<s.length;++a){var u=s[a];if(!o[u]){o[u]=!0;var f=Object.getOwnPropertyDescriptor(t,u);null!=f&&null==f.get&&null==f.set&&n.push(u)}}t=i.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}}(),b=/this\s*\.\s*\S+\s*=/;function w(t){try{if("function"==typeof t){var e=i.names(t.prototype),r=i.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=b.test(t+"")&&i.names(t).length>0;if(r||n||o)return!0}return!1}catch(t){return!1}}function E(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var T=/^[a-z$_][a-z$_0-9]*$/i;function S(t){return T.test(t)}function x(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function k(t){try{return t+""}catch(t){return"[no string representation]"}}function A(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function j(t){try{g(t,"isOperational",!0)}catch(t){}}function O(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function B(t){return A(t)&&i.propertyIsWritable(t,"stack")}var I="stack"in new Error?function(t){return B(t)?t:new Error(k(t))}:function(t){if(B(t))return t;try{throw new Error(k(t))}catch(t){return t}};function C(t){return{}.toString.call(t)}function R(t,e,r){for(var n=i.names(t),o=0;o<n.length;++o){var s=n[o];if(r(s))try{i.defineProperty(e,s,i.getDescriptor(t,s))}catch(t){}}}var P=function(t){return i.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var F="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};P=function(t){return i.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?F(t):null}}var M=void 0!==n&&"[object process]"===C(n).toLowerCase(),L=void 0!==n&&void 0!==n.env,U;function N(t){return L?n.env[t]:void 0}function D(){if("function"==typeof Promise)try{if("[object Promise]"===C(new Promise(function(){})))return Promise}catch(t){}}function q(t,e){if(null===t||"function"!=typeof e||e===U)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){for(var t=arguments.length+2,e=new Array(t),i=2;i<t;++i)e[i]=arguments[i-2];return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return e}var z={setReflectHandler:function(t){U=t},isClass:w,isIdentifier:S,inheritedDataKeys:_,getDataPropertyOrDefault:y,thrower:m,isArray:i.isArray,asArray:P,notEnumerableProp:g,isPrimitive:l,isObject:p,isError:A,canEvaluate:o,errorObj:s,tryCatch:c,inherits:h,withAppended:v,maybeWrapAsError:d,toFastProperties:E,filledRange:x,toString:k,canAttachTrace:B,ensureErrorObject:I,originatesFromRejection:O,markAsOriginatingFromRejection:j,classString:C,copyDescriptors:R,isNode:M,hasEnvVariables:L,env:N,global:u,getNativePromise:D,contextBind:q};z.isRecentNode=z.isNode&&function(){var t;return n.versions&&n.versions.node?t=n.versions.node.split(".").map(Number):n.version&&(t=n.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof r(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),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){var r=function(){"use strict";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};t.exports={isArray:function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}},keys:s,names:s,defineProperty:function(t,e,r){return t[e]=r.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return o}},isES5:r,propertyIsWritable:function(){return!0}}}},function(t,e,r){(function(e){"use strict";var n;try{throw new Error}catch(t){n=t}var i=r(9),o=r(12);function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function a(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}s.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},s.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")}},s.prototype.invokeLater=function(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()},s.prototype.invoke=function(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()},s.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},s.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=n}).call(e,r(5))},function(t,e,r){(function(e,n,i){"use strict";var o,s=r(6),a=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var u=e.setImmediate,f=n.nextTick;o=s.isRecentNode?function(t){u.call(e,t)}:function(t){f.call(n,t)}}else if("function"==typeof a&&"function"==typeof a.resolve){var c=a.resolve();o=function(t){c.then(t)}}else o="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),r=!1}).observe(n,e);return function(i){var o=new MutationObserver(function(){o.disconnect(),i()});o.observe(t,e),r||(r=!0,n.classList.toggle("foo"))}}():void 0!==i?function(t){i(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};t.exports=o}).call(e,function(){return this}(),r(5),r(10).setImmediate)},function(t,e,r){var n=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(n.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(n.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.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){!function(t,r){"use strict";if(!t.setImmediate){var n,i=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){c(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&c(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},n=function(e){t.port2.postMessage(e)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var t=a.documentElement;n=function(e){var r=a.createElement("script");r.onreadystatechange=function(){c(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=function(t){setTimeout(c,0,t)},u.setImmediate=function(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 s={callback:t,args:e};return o[i]=s,n(i),i++},u.clearImmediate=f}function f(t){delete o[t]}function c(t){if(s)setTimeout(c,0,t);else{var e=o[t];if(e){s=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}(e)}finally{f(t),s=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,function(){return this}(),r(5))},function(t,e){"use strict";function r(t){this._capacity=t,this._length=0,this._front=0}r.prototype._willBeOverCapacity=function(t){return this._capacity<t},r.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},r.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},r.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},r.prototype.length=function(){return this._length},r.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},r.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},t.exports=r},function(t,e,r){"use strict";var n,i,o=r(7),s=o.freeze,a=r(6),u=a.inherits,f=a.notEnumerableProp;function c(t,e){function r(n){if(!(this instanceof r))return new r(n);f(this,"message","string"==typeof n?n:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var h=c("Warning","warning"),l=c("CancellationError","cancellation error"),p=c("TimeoutError","timeout error"),d=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<v.length;++y)"function"==typeof Array.prototype[v[y]]&&(d.prototype[v[y]]=Array.prototype[v[y]]);o.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;function m(t){if(!(this instanceof m))return new m(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.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];e+=(n=i.join("\n"))+"\n"}return g--,e},u(m,Error);var _=Error.__BluebirdErrorTypes__;_||(_=s({CancellationError:l,TimeoutError:p,OperationalError:m,RejectionError:m,AggregateError:d}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:_,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:_.CancellationError,OperationalError:_.OperationalError,TimeoutError:_.TimeoutError,AggregateError:_.AggregateError,Warning:h}},function(t,e,r){"use strict";t.exports=function(t,e){var n=r(6),i=n.errorObj,o=n.isObject;var s={}.hasOwnProperty;return function(r,a){if(o(r)){if(r instanceof t)return r;var u=function(t){try{return function(t){return t.then}(t)}catch(t){return i.e=t,i}}(r);if(u===i){a&&a._pushContext();var f=t.reject(u.e);return a&&a._popContext(),f}if("function"==typeof u)return function(t){try{return s.call(t,"_promise0")}catch(t){return!1}}(r)?(f=new t(e),r._then(f._fulfill,f._reject,void 0,f,null),f):function(r,o,s){var a=new t(e),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var f=!0,c=n.tryCatch(o).call(r,function(t){a&&(a._resolveCallback(t),a=null)},function(t){a&&(a._rejectCallback(t,f,!0),a=null)});return f=!1,a&&c===i&&(a._rejectCallback(c.e,!0,!0),a=null),u}(r,u,a)}return r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var s=r(6);s.isArray;function a(r){var n=this._promise=new t(e);r instanceof t&&(n._propagateFrom(r,3),r.suppressUnhandledRejections()),n._setOnCancel(this),this._values=r,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.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){var u=(a=a._target())._bitField;if(this._values=a,0==(50397184&u))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var f=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(f,!1)}},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);s=u instanceof t?(u=u._target())._bitField: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){return this._values[e]=t,++this._totalResolved>=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){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},function(t,e,r){(function(e){"use strict";t.exports=function(t,n,i,o){var s,a,u,f,c=t._async,h=r(13).Warning,l=r(6),p=r(7),d=l.canAttachTrace,v=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,y=/\((?:timers\.js):\d+:\d+\)/,g=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,_=null,b=!1,w=!(0==l.env("BLUEBIRD_DEBUG")||!l.env("BLUEBIRD_DEBUG")&&"development"!==l.env("NODE_ENV")),E=!(0==l.env("BLUEBIRD_WARNINGS")||!w&&!l.env("BLUEBIRD_WARNINGS")),T=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),S=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(E||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}f=function(t){e.push(t),setTimeout(r,1)},p.defineProperty(t,"_unhandledRejectionCheck",{value:r}),p.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),f(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){J("rejectionHandled",s,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(),J("unhandledRejection",a,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return H(t,e,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();a=l.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();s=l.contextBind(r,e)};var x=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!rt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!rt.longStackTraces&&Z()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;rt.longStackTraces=!0,x=function(){if(c.haveItemsQueued()&&!rt.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,t.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),rt.longStackTraces=!1},t.prototype._captureStackTrace=q,t.prototype._attachExtraTrace=z,t.prototype._dereferenceTrace=V,n.activateLongStackTraces()}},t.hasLongStackTraces=function(){return rt.longStackTraces&&Z()};var k={unhandledrejection:{before:function(){var t=l.global.onunhandledrejection;return l.global.onunhandledrejection=null,t},after:function(t){l.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=l.global.onrejectionhandled;return l.global.onrejectionhandled=null,t},after:function(t){l.global.onrejectionhandled=t}}},A=function(){var t=function(t,e){if(!t)return!l.global.dispatchEvent(e);var r;try{return r=t.before(),!l.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return l.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),t(k[e],n)}}if("function"==typeof Event){e=new Event("CustomEvent");return l.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),t(k[e],n)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(k[e],n)}}catch(t){}return function(){return!1}}(),j=l.isNode?function(){return e.emit.apply(e,arguments)}:l.global?function(t){var e="on"+t.toLowerCase(),r=l.global[e];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function O(t,e){return{promise:e}}var B={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},I=function(t){var e=!1;try{e=j.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var r=!1;try{r=A(t,B[t].apply(null,arguments))}catch(t){c.throwLater(t),r=!0}return r||e};function C(){return!1}function R(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: "+l.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?l.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function F(){return this._onCancelField}function M(t){this._onCancelField=t}function L(){this._cancellationParent=void 0,this._onCancelField=void 0}function U(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)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&x()),"warnings"in e){var r=e.warnings;rt.warnings=!!r,S=rt.warnings,l.isObject(r)&&"wForgottenReturn"in r&&(S=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!rt.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=L,t.prototype._propagateFrom=U,t.prototype._onCancel=F,t.prototype._setOnCancel=M,t.prototype._attachCancellationCallback=P,t.prototype._execute=R,N=U,rt.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!rt.monitoring?(rt.monitoring=!0,t.prototype._fireEvent=I):!e.monitoring&&rt.monitoring&&(rt.monitoring=!1,t.prototype._fireEvent=C)),"asyncHooks"in e&&l.nodeSupportsAsyncResource){var n=rt.asyncHooks,s=!!e.asyncHooks;n!==s&&(rt.asyncHooks=s,s?i():o())}return t},t.prototype._fireEvent=C,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._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var N=function(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 q(){this._trace=new tt(this._peekContext())}function z(t,e){if(d(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=Y(t);l.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),l.notEnumerableProp(t,"__stackCleaned__",!0)}}}function V(){this._trace=void 0}function H(e,r,n){if(rt.warnings){var i,o=new h(e);if(r)n._attachExtraTrace(o);else if(rt.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=Y(o);o.stack=s.message+"\n"+s.stack.join("\n")}I("warning",o)||G(o,"",!0)}}function W(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||m.test(n),o=i&&K(n);i&&!o&&(b&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function Y(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?function(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||m.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:W(e)}}function G(t,e,r){if("undefined"!=typeof console){var n;if(l.isObject(t)){var i=t.stack;n=e+_(i,t)}else n=e+String(t);"function"==typeof u?u(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function J(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){c.throwLater(t)}"unhandledRejection"===t?I(t,r,n)||i||G(r,"Unhandled rejection "):I(t,n)}function X(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():l.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){if(t.length<41)return t;return t.substr(0,38)+"..."}(e)+">, no stack trace)"}function Z(){return"function"==typeof et}var K=function(){return!1},$=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(t){var e=t.match($);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function tt(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);et(this,tt),e>32&&this.uncycle()}l.inherits(tt,Error),n.CapturedTrace=tt,tt.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;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<t;++n){var s=r[e[n].stack];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var a=n>0?e[n-1]:this;s<t-1?(a._parent=e[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var u=a._length+1,f=n-2;f>=0;--f)e[f]._length=u,u++;return}}}},tt.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=Y(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(W(i.stack.split("\n"))),i=i._parent;!function(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(a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}(n),function(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--)}(n),l.notEnumerableProp(t,"stack",function(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")}(r,n)),l.notEnumerableProp(t,"__stackCleaned__",!0)}};var et=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():X(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,m=t,_=e;var r=Error.captureStackTrace;return K=function(t){return v.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return m=/@/,_=e,b=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return"stack"in i||!n||"number"!=typeof Error.stackTraceLimit?(_=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?X(e):e.toString()},null):(m=t,_=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(u=function(t){console.warn(t)},l.isNode&&e.stderr.isTTY?u=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:l.isNode||"string"!=typeof(new Error).stack||(u=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var rt={warnings:E,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return T&&t.longStackTraces(),{asyncHooks:function(){return rt.asyncHooks},longStackTraces:function(){return rt.longStackTraces},warnings:function(){return rt.warnings},cancellation:function(){return rt.cancellation},monitoring:function(){return rt.monitoring},propagateFromFunction:function(){return N},boundValueFunction:function(){return D},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&S){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=W(a),f=u.length-1;f>=0;--f){var c=u[f];if(!y.test(c)){var h=c.match(g);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(u.length>0){var l=u[0];for(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)}},setBounds:function(t,e){if(Z()){for(var r,n,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,u=0;u<i.length;++u)if(f=Q(i[u])){r=f.fileName,s=f.line;break}for(u=0;u<o.length;++u){var f;if(f=Q(o[u])){n=f.fileName,a=f.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(K=function(t){if(v.test(t))return!0;var e=Q(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}},warn:H,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),H(r)},CapturedTrace:tt,fireDomEvent:A,fireGlobalEvent:j}}}).call(e,r(5))},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=t.CancellationError,s=i.errorObj,a=r(19)(n);function u(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function f(t){this.finallyHandler=t}function c(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function h(){return p.call(this,this.promise._target()._settledValue())}function l(t){if(!c(this,t))return s.e=t,s}function p(r){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),r);if(u===n)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=e(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),s.e=d,s}p.isPending()&&p._attachCancellationCallback(new f(this))}return p._then(h,l,void 0,this,void 0)}}}return i.isRejected()?(c(this),s.e=r,s):(c(this),r)}return u.prototype.isFinallyHandler=function(){return 0===this.type},f.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,p,p)},t.prototype.tap=function(t){return this._passThrough(t,1,p)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,p);var n,o=new Array(r-1),s=0;for(n=0;n<r-1;++n){var u=arguments[n];if(!i.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(u)));o[s++]=u}o.length=s;var f=arguments[n];return this._passThrough(a(o,f,this),1,void 0,p)},u}},function(t,e,r){"use strict";t.exports=function(t){var e=r(6),n=r(7).keys,i=e.tryCatch,o=e.errorObj;return function(r,s,a){return function(u){var f=a._boundValue();t:for(var c=0;c<r.length;++c){var h=r[c];if(h===Error||null!=h&&h.prototype instanceof Error){if(u instanceof h)return i(s).call(f,u)}else if("function"==typeof h){var l=i(h).call(f,u);if(l===o)return l;if(l)return i(s).call(f,u)}else if(e.isObject(u)){for(var p=n(h),d=0;d<p.length;++d){var v=p[d];if(h[v]!=u[v])continue t}return i(s).call(f,u)}}return t}}}},function(t,e,r){"use strict";var n=r(6),i=n.maybeWrapAsError,o=r(13).OperationalError,s=r(7);var a=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=s.keys(t),i=0;i<r.length;++i){var u=r[i];a.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}t.exports=function(t,e){return function(r,n){if(null!==t){if(r){var o=u(i(r));t._attachExtraTrace(o),t._reject(o)}else if(e){for(var s=arguments.length,a=new Array(Math.max(s-1,0)),f=1;f<s;++f)a[f-1]=arguments[f];t._fulfill(a)}else t._fulfill(n);t=null}}}},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,u=new t(e);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var f=arguments[1],c=arguments[2];n=s.isArray(f)?a(r).apply(c,f):a(r).call(c,f)}else n=a(r)();var h=u._popContext();return o.checkForgottenReturns(n,h,"Promise.try",u),u._resolveFromSyncValue(n),u},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=-2097153&this._bitField},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}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];return this.caught(t,function(){throw e})},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();return this.caught(r,function(){return n})}}},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){var s,a=r(6),u=a.canEvaluate,f=a.tryCatch,c=a.errorObj;if(u){for(var h=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))},l=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},p=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,h="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 h=h.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",h)(f,c,t,o)},d=[],v=[],y=[],g=0;g<8;++g)d.push(p(g+1)),v.push(h(g+1)),y.push(l(g+1));s=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&&u)){(w=new t(i))._captureStackTrace();for(var f=new(0,d[o-1])(r),c=v,h=0;h<o;++h){var l=n(arguments[h],w);if(l instanceof t){var p=(l=l._target())._bitField;0==(50397184&p)?(l._then(c[h],s,void 0,w,f),y[h](l,f),f.asyncNeeded=!1):0!=(33554432&p)?c[h].call(w,l._value(),f):0!=(16777216&p)?w._reject(l._reason()):w._cancel()}else c[h].call(w,l,f)}if(!w._isFateSealed()){if(f.asyncNeeded){var g=t._getContext();f.fn=a.contextBind(g,f.fn)}w._setAsyncGuaranteed(),w._setOnCancel(f)}return w}for(var m=arguments.length,_=new Array(m),b=0;b<m;++b)_[b]=arguments[b];r&&_.pop();var w=new e(_).promise();return void 0!==r?w.spread(r):w}}},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){var e,n,s=r(6),a=s.canEvaluate,u=s.isIdentifier,f=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))(l)},c=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},h=function(t,e,r){var n=r[t];if("function"!=typeof n){if(!u(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};function l(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var i="Object "+s.classString(e)+" has no method '"+s.toString(r)+"'";throw new t.TypeError(i)}return n}function p(t){return l(t,this.pop()).apply(t,this)}function d(t){return t[this]}function v(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e=function(t){return h(t,f,i)},n=function(t){return h(t,c,o)},t.prototype.call=function(t){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),i=1;i<r;++i)n[i-1]=arguments[i];if(a){var o=e(t);if(null!==o)return this._then(o,void 0,void 0,n,void 0)}return n.push(t),this._then(p,void 0,void 0,n,void 0)},t.prototype.get=function(t){var e;if("number"==typeof t)e=v;else if(a){var r=n(t);e=null!==r?r:d}else e=d;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){var a=r(13).TypeError,u=r(6),f=u.errorObj,c=u.tryCatch,h=[];function l(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{(this._promise=new t(n))._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(l,o),l.prototype._isResolved=function(){return null===this._promise},l.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},l.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},l.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=c(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},l.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=c(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},l.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},l.prototype.promise=function(){return this._promise},l.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},l.prototype._continue=function(e){var r=this._promise;if(e===f)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=function(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=c(r[o])(e);if(n._popContext(),s===f){n._pushContext();var a=t.reject(f.e);return n._popContext(),a}var u=i(s,n);if(u instanceof t)return u}return null}(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._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()}else this._promiseRejected(new a("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")))},t.coroutine=function(t,e){if("function"!=typeof t)throw new a("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=l,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 a("expecting a function but got "+u.classString(t));h.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 l(r,this),i=n.promise();return n._run(t.spawn),i}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(6),u=a.tryCatch,f=a.errorObj,c=t._async;function h(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var s=t._getContext();if(this._callback=a.contextBind(s,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),a.isArray(e))for(var u=0;u<e.length;++u){var f=e[u];f instanceof t&&f.suppressUnhandledRejections()}}function l(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+a.classString(r));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+a.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(i.concurrency)));s=i.concurrency}return new h(e,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}a.inherits(h,e),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var h=this._promise,l=this._callback,p=h._boundValue();h._pushContext();var d=u(l).call(p,e,r,o),v=h._popContext();if(s.checkForgottenReturns(d,v,null!==a?"Promise.filter":"Promise.map",h),d===f)return this._reject(d.e),!0;var y=i(d,this._promise);if(y instanceof t){var g=(y=y._target())._bitField;if(0==(50397184&g))return c>=1&&this._inFlight++,n[r]=y,y._proxy(this,-1*(r+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(y._reason()),!0):(this._cancel(),!0);d=y._value()}n[r]=d}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},h.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)}},h.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)},h.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return l(this,t,e,null)},t.map=function(t,e,r,n){return l(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t){var e=r(6),n=t._async,i=e.tryCatch,o=e.errorObj;function s(t,r){if(!e.isArray(t))return a.call(this,t,r);var s=i(r).apply(this._boundValue(),[null].concat(t));s===o&&n.throwLater(s.e)}function a(t,e){var r=this._boundValue(),s=void 0===t?i(e).call(r,null):i(e).call(r,null,t);s===o&&n.throwLater(s.e)}function u(t,e){if(!t){var r=new Error(t+"");r.cause=t,t=r}var s=i(e).call(this._boundValue(),t);s===o&&n.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if("function"==typeof t){var r=a;void 0!==e&&Object(e).spread&&(r=s),this._then(r,u,void 0,this,t)}return this}}},function(t,e,r){"use strict";t.exports=function(t,e){var n={},i=r(6),o=r(20),s=i.withAppended,a=i.maybeWrapAsError,u=i.canEvaluate,f=r(13).TypeError,c={__isPromisified__:!0},h=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),l=function(t){return i.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!h.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function v(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,c);return!!n&&d(n)}function y(t,e,r,n){for(var o=i.inheritedDataKeys(t),s=[],a=0;a<o.length;++a){var u=o[a],c=t[u],h=n===l||l(u,c,t);"function"!=typeof c||d(c)||v(t,u,e)||!n(u,c,t,h)||s.push(u,c)}return function(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 f("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(s,e,r),s}var g=function(t){return t.replace(/([$])/,"\\$")},m=function(t){return i.filledRange(t,"_arg","")};var _=u?function(r,u,f,c,h,l){var p=Math.max(0,function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0}(c)-1),d=function(t){for(var e=[t],r=Math.max(0,t-1-3),n=t-1;n>=r;--n)e.push(n);for(n=t+1;n<=3;++n)e.push(n);return e}(p),v="string"==typeof r||u===n;function y(t){var e=m(t).join(", "),r=t>0?", ":"";return(v?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===u?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n").replace("{{args}}",e).replace(", ",r)}var g="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",_="'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, "+l+"); \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]",function(){for(var t="",e=0;e<d.length;++e)t+="case "+d[e]+":"+y(d[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]",v?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}()).replace("[GetFunctionCode]",g);return _=_.replace("Parameters",function(t){return i.filledRange(Math.max(t,3),"_arg","")}(p)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",_)(t,c,u,s,a,o,i.tryCatch,i.errorObj,i.notEnumerableProp,e)}:function(r,u,f,c,h,l){var p=function(){return this}(),d=r;function v(){var i=u;u===n&&(i=this);var f=new t(e);f._captureStackTrace();var c="string"==typeof d&&this!==p?this[d]:r,h=o(f,l);try{c.apply(i,s(arguments,h))}catch(t){f._rejectCallback(a(t),!0,!0)}return f._isFateSealed()||f._setAsyncGuaranteed(),f}return"string"==typeof d&&(r=c),i.notEnumerableProp(v,"__isPromisified__",!0),v};function b(t,e,r,o,s){for(var a=new RegExp(g(e)+"$"),u=y(t,e,a,r),f=0,c=u.length;f<c;f+=2){var h=u[f],l=u[f+1],p=h+e;if(o===_)t[p]=_(h,n,h,l,e,s);else{var d=o(l,function(){return _(h,n,h,l,e,s)});i.notEnumerableProp(d,"__isPromisified__",!0),t[p]=d}}return i.toFastProperties(t),t}t.promisify=function(t,e){if("function"!=typeof t)throw new f("expecting a function but got "+i.classString(t));if(d(t))return t;var r=function(t,e,r){return _(t,e,void 0,t,null,r)}(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return i.copyDescriptors(t,r,p),r},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new f("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n="Async");var o=e.filter;"function"!=typeof o&&(o=l);var s=e.promisifier;if("function"!=typeof s&&(s=_),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=i.inheritedDataKeys(t),u=0;u<a.length;++u){var c=t[a[u]];"constructor"!==a[u]&&i.isClass(c)&&(b(c.prototype,n,o,s,r),b(c,n,o,s,r))}return b(t,n,o,s,r)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o,s=r(6),a=s.isObject,u=r(7);"function"==typeof Map&&(o=Map);var f=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}();function c(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=f(t),r=!0;else{var n=u.keys(t),i=n.length;e=new Array(2*i);for(var s=0;s<i;++s){var a=n[s];e[s]=t[a],e[s+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function h(e){var r,o=n(e);return a(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new c(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(c,e),c.prototype._init=function(){},c.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(t){for(var e=new o,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],s=t[n];e.set(i,s)}return e}(this._values);else{r={};for(var n=this.length(),i=0,s=this.length();i<s;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},c.prototype.shouldCopyValues=function(){return!1},c.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return h(this)},t.props=function(t){return h(t)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o=r(6),s=function(t){return t.then(function(e){return a(e,t)})};function a(r,a){var u=n(r);if(u instanceof t)return s(u);if(null===(r=o.asArray(r)))return i("expecting an array or an iterable object but got "+o.classString(r));var f=new t(e);void 0!==a&&f._propagateFrom(a,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}t.race=function(t){return a(t,void 0)},t.prototype.race=function(){return a(this,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(6),u=a.tryCatch;function f(e,r,n,i){this.constructor$(e);var s=t._getContext();this._fn=a.contextBind(s,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function h(t,e,r,i){return"function"!=typeof e?n("expecting a function but got "+a.classString(e)):new f(t,e,r,i).promise()}function l(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(p,void 0,void 0,this,void 0)):p.call(this,r)}function p(e){var r,n=this.array,i=n._promise,o=u(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var a=i._popContext();return s.checkForgottenReturns(r,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}a.inherits(f,e),f.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},f.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},f.prototype._init=function(){},f.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},f.prototype.shouldCopyValues=function(){return!1},f.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},f.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},f.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var s=e[o];s instanceof t&&s.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var a={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,a,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},t.prototype.reduce=function(t,e){return h(this,t,e,null)},t.reduce=function(t,e,r,n){return h(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=t.PromiseInspection;function o(t){this.constructor$(t)}r(6).inherits(o,e),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},t.allSettled=function(t){return new o(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=r(13).RangeError,s=r(13).AggregateError,a=i.isArray,u={};function f(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(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 f(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(f,e),f.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},f.prototype.init=function(){this._initialized=!0,this._init()},f.prototype.setUnwrap=function(){this._unwrap=!0},f.prototype.howMany=function(){return this._howMany},f.prototype.setHowMany=function(t){this._howMany=t},f.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)},f.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},f.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},f.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},f.prototype._fulfilled=function(){return this._totalResolved},f.prototype._rejected=function(){return this._values.length-this.length()},f.prototype._addRejected=function(t){this._values.push(t)},f.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},f.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},f.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},f.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return c(t,e)},t.prototype.some=function(t){return c(this,t)},t._SomePromiseArray=f}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=t.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return u(+this).thenReturn(t)},u=t.delay=function(r,i){var o,u;return void 0!==i?(o=t.resolve(i)._then(a,null,null,r,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(e),u=setTimeout(function(){o._fulfill()},+r),n.cancellation()&&o._setOnCancel(new s(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(t){return u(t,this)};function f(t){return clearTimeout(this.handle),t}function c(t){throw clearTimeout(this.handle),t}t.prototype.timeout=function(t,e){var r,a;t=+t;var u=new s(setTimeout(function(){r.isPending()&&function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()}(r,e,a)},t));return n.cancellation()?(a=this.then(),(r=a._then(f,c,void 0,u,void 0))._setOnCancel(u)):r=this._then(f,c,void 0,u,void 0),r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(6),u=r(13).TypeError,f=r(6).inherits,c=a.errorObj,h=a.tryCatch,l={};function p(t){setTimeout(function(){throw t},0)}function d(e,r){var i=0,s=e.length,a=new t(o);return function o(){if(i>=s)return a._fulfill();var u=function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(e[i++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(t){return p(t)}if(u instanceof t)return u._then(o,p,null,null,null)}o()}(),a}function v(t,e,r){this._data=t,this._promise=e,this._context=r}function y(t,e,r){this.constructor$(t,e,r)}function g(t){return v.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}v.prototype.data=function(){return this._data},v.prototype.promise=function(){return this._promise},v.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():l},v.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==l?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},v.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},f(y,v),y.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},m.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,o=arguments[r-1];if("function"!=typeof o)return e("expecting a function but got "+a.classString(o));var u=!0;2===r&&Array.isArray(arguments[0])?(r=(i=arguments[0]).length,u=!1):(i=arguments,r--);for(var f=new m(r),l=0;l<r;++l){var p=i[l];if(v.isDisposer(p)){var y=p;(p=p.promise())._setDisposable(y)}else{var _=n(p);_ instanceof t&&(p=_._then(g,null,null,{resources:f,index:l},void 0))}f[l]=p}var b=new Array(f.length);for(l=0;l<b.length;++l)b[l]=t.resolve(f[l]).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 c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=h(o);var n=u?o.apply(void 0,t):o(t),i=E._popContext();return s.checkForgottenReturns(n,i,"Promise.using",E),n}),E=w.lastly(function(){var e=new t.PromiseInspection(w);return d(f,e)});return f.promise=E,E._setOnCancel(f),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=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new y(t,this,i());throw new u}}},function(t,e){"use strict";t.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},function(t,e){"use strict";t.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},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,r){var n=r(43),i=1,o=4;t.exports=function(t){return n(t,i|o)}},function(t,e,r){var n=r(44),i=r(88),o=r(89),s=r(92),a=r(115),u=r(119),f=r(120),c=r(121),h=r(125),l=r(129),p=r(131),d=r(132),v=r(137),y=r(138),g=r(152),m=r(100),_=r(101),b=r(68),w=r(94),E=1,T=2,S=4,x="[object Arguments]",k="[object Function]",A="[object GeneratorFunction]",j="[object Object]",O={};O[x]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[j]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[k]=O["[object WeakMap]"]=!1,t.exports=function t(e,r,B,I,C,R){var P,F=r&E,M=r&T,L=r&S;if(B&&(P=C?B(e,I,C,R):B(e)),void 0!==P)return P;if(!b(e))return e;var U=m(e);if(U){if(P=v(e),!F)return f(e,P)}else{var N=d(e),D=N==k||N==A;if(_(e))return u(e,F);if(N==j||N==x||D&&!C){if(P=M||D?{}:g(e),!F)return M?h(e,a(P,e)):c(e,s(P,e))}else{if(!O[N])return C?e:{};P=y(e,N,t,F)}}R||(R=new n);var q=R.get(e);if(q)return q;R.set(e,P);var z=L?M?p:l:M?keysIn:w,V=U?void 0:z(e);return i(V||e,function(n,i){V&&(n=e[i=n]),o(P,i,t(n,r,B,i,e,R))}),P}},function(t,e,r){var n=r(45),i=r(53),o=r(54),s=r(55),a=r(56),u=r(57);function f(t){var e=this.__data__=new n(t);this.size=e.size}f.prototype.clear=i,f.prototype.delete=o,f.prototype.get=s,f.prototype.has=a,f.prototype.set=u,t.exports=f},function(t,e,r){var n=r(46),i=r(47),o=r(50),s=r(51),a=r(52);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(48),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},function(t,e,r){var n=r(49);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(48);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(48);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(48);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(45);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(45),i=r(58),o=r(73),s=200;t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<s-1)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(59)(r(64),"Map");t.exports=n},function(t,e,r){var n=r(60),i=r(72);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(61),i=r(69),o=r(68),s=r(71),a=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,c=u.toString,h=f.hasOwnProperty,l=RegExp("^"+c.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?l:a).test(s(t))}},function(t,e,r){var n=r(62),i=r(68),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=n(t);return e==s||e==a||e==o||e==u}},function(t,e,r){var n=r(63),i=r(66),o=r(67),s="[object Null]",a="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:u&&u in Object(t)?i(t):o(t)}},function(t,e,r){var n=r(64).Symbol;t.exports=n},function(t,e,r){var n=r(65),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e,r){var n=r(63),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(70),i=function(){var t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(64)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(74),i=r(82),o=r(85),s=r(86),a=r(87);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,r){var n=r(75),i=r(45),o=r(58);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(76),i=r(78),o=r(79),s=r(80),a=r(81);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,r){var n=r(77);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(59)(Object,"create");t.exports=n},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(77),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===i?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(77),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(77),i="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?i:e,this}},function(t,e,r){var n=r(83);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,r){var n=r(84);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(83);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(83);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(83);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},function(t,e,r){var n=r(90),i=r(49),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var s=t[e];o.call(t,e)&&i(s,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(91);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(59),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(93),i=r(94);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(89),i=r(90);t.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var f=e[a],c=o?o(r[f],t[f],f,r,t):void 0;void 0===c&&(c=t[f]),s?i(r,f,c):n(r,f,c)}return r}},function(t,e,r){var n=r(95),i=r(110),o=r(114);t.exports=function(t){return o(t)?n(t):i(t)}},function(t,e,r){var n=r(96),i=r(97),o=r(100),s=r(101),a=r(104),u=r(105),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),c=!r&&i(t),h=!r&&!c&&s(t),l=!r&&!c&&!h&&u(t),p=r||c||h||l,d=p?n(t.length,String):[],v=d.length;for(var y in t)!e&&!f.call(t,y)||p&&("length"==y||h&&("offset"==y||"parent"==y)||l&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,v))||d.push(y);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(98),i=r(99),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){var n=r(62),i=r(99),o="[object Arguments]";t.exports=function(t){return i(t)&&n(t)==o}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){(function(t){var n=r(64),i=r(103),o="object"==typeof e&&e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u}).call(e,r(102)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){t.exports=function(){return!1}},function(t,e){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){return!!(e=null==e?r:e)&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){var n=r(106),i=r(108),o=r(109),s=o&&o.isTypedArray,a=s?i(s):n;t.exports=a},function(t,e,r){var n=r(62),i=r(107),o=r(99),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[n(t)]}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(65),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i&&n.process,a=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(e,r(102)(t))},function(t,e,r){var n=r(111),i=r(112),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(113)(Object.keys,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(61),i=r(107);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){var n=r(93),i=r(116);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(95),i=r(117),o=r(114);t.exports=function(t){return o(t)?n(t,!0):i(t)}},function(t,e,r){var n=r(68),i=r(111),o=r(118),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&r.push(a);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){(function(t){var n=r(64),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}).call(e,r(102)(t))},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(93),i=r(122);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(123),i=r(124),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),n(s(t),function(e){return o.call(t,e)}))}:i;t.exports=a},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(93),i=r(126);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(127),i=r(128),o=r(122),s=r(124),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:s;t.exports=a},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},function(t,e,r){var n=r(113)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,r){var n=r(130),i=r(122),o=r(94);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(127),i=r(100);t.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},function(t,e,r){var n=r(130),i=r(126),o=r(116);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(133),i=r(58),o=r(134),s=r(135),a=r(136),u=r(62),f=r(71),c=f(n),h=f(i),l=f(o),p=f(s),d=f(a),v=u;(n&&"[object DataView]"!=v(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||s&&"[object Set]"!=v(new s)||a&&"[object WeakMap]"!=v(new a))&&(v=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?f(r):"";if(n)switch(n){case c:return"[object DataView]";case h:return"[object Map]";case l:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,r){var n=r(59)(r(64),"DataView");t.exports=n},function(t,e,r){var n=r(59)(r(64),"Promise");t.exports=n},function(t,e,r){var n=r(59)(r(64),"Set");t.exports=n},function(t,e,r){var n=r(59)(r(64),"WeakMap");t.exports=n},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&r.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},function(t,e,r){var n=r(139),i=r(141),o=r(142),s=r(146),a=r(147),u=r(150),f=r(151),c="[object Boolean]",h="[object Date]",l="[object Map]",p="[object Number]",d="[object RegExp]",v="[object Set]",y="[object String]",g="[object Symbol]",m="[object ArrayBuffer]",_="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",k="[object Uint8ClampedArray]",A="[object Uint16Array]",j="[object Uint32Array]";t.exports=function(t,e,r,O){var B=t.constructor;switch(e){case m:return n(t);case c:case h:return new B(+t);case _:return i(t,O);case b:case w:case E:case T:case S:case x:case k:case A:case j:return f(t,O);case l:return o(t,O,r);case p:case y:return new B(t);case d:return s(t);case v:return a(t,O,r);case g:return u(t)}}},function(t,e,r){var n=r(140);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(64).Uint8Array;t.exports=n},function(t,e,r){var n=r(139);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},function(t,e,r){var n=r(143),i=r(144),o=r(145),s=1;t.exports=function(t,e,r){var a=e?r(o(t),s):o(t);return i(a,n,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.set(e[0],e[1]),t}},function(t,e){t.exports=function(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},function(t,e){var r=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,r.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,r){var n=r(148),i=r(144),o=r(149),s=1;t.exports=function(t,e,r){var a=e?r(o(t),s):o(t);return i(a,n,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.add(e),t}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e,r){var n=r(63),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,r){var n=r(139);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(153),i=r(128),o=r(111);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},function(t,e,r){var n=r(68),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},function(t,e,r){var n=r(155),i=r(156),o=r(158),s=r(166),a=o(function(t){return t.push(void 0,s),n(i,void 0,t)});t.exports=a},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(93),i=r(157),o=r(116),s=i(function(t,e,r,i){n(e,o(e),t,i)});t.exports=s},function(t,e,r){var n=r(158),i=r(165);t.exports=function(t){return n(function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,s)}return e})}},function(t,e,r){var n=r(159),i=r(160),o=r(161);t.exports=function(t,e){return o(i(t,e,n),t+"")}},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(155),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s<a;)u[s]=o[e+s];s=-1;for(var f=Array(e+1);++s<e;)f[s]=o[s];return f[e]=r(u),n(t,this,f)}}},function(t,e,r){var n=r(162),i=r(164)(n);t.exports=i},function(t,e,r){var n=r(163),i=r(91),o=r(159),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=800,n=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var s=i(),a=n-(s-o);if(o=s,a>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(49),i=r(114),o=r(104),s=r(68);t.exports=function(t,e,r){if(!s(r))return!1;var a=typeof e;return!!("number"==a?i(r)&&o(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},function(t,e,r){var n=r(49),i=Object.prototype,o=i.hasOwnProperty;t.exports=function(t,e,r,s){return void 0===t||n(t,i[r])&&!o.call(s,r)?e:t}},function(t,e){(function(e){t.exports=!1;try{t.exports="[object process]"===Object.prototype.toString.call(e.process)}catch(t){}}).call(e,function(){return this}())},function(t,e,r){(function(n){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(169)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return;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&&"%c"===t&&(o=++i)}),t.splice(o,0,n)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"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+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),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(i())}).call(e,r(5))},function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;u++;var i=e.formatters[n];if("function"==typeof i){var o=s[u];r=i.call(t,o),s.splice(u,1),u--}return r}),e.formatArgs.call(t,s),(r.log||e.log||console.log.bind(console)).apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(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]}(t),"function"==typeof e.init&&e.init(r),r}(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(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,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(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},e.humanize=r(170),e.names=[],e.skips=[],e.formatters={}},function(t,e){var r=1e3,n=60*r,i=60*n,o=24*i,s=365.25*o;function a(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;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)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?function(t){return a(t,o,"day")||a(t,i,"hour")||a(t,n,"minute")||a(t,r,"second")||t+" ms"}(t):function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=n)return Math.round(t/n)+"m";if(t>=r)return Math.round(t/r)+"s";return t+"ms"}(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";var n=r(172);t.exports=function(){var t=n;return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}()},function(t,e){t.exports={websocket:"https://api.viz.world/",address_prefix:"VIZ",chain_id:"2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd",broadcast_transaction_with_callback:!1,reference_irreversible_block:!1,tx_expiration_seconds:60}},function(t,e){"use strict";t.exports=[{api:"validator_api",method:"get_validator_schedule"},{api:"validator_api",method:"get_witness_schedule"},{api:"validator_api",method:"get_validators",params:["validatorIds"]},{api:"validator_api",method:"get_witnesses",params:["witnessIds"]},{api:"validator_api",method:"get_validator_by_account",params:["accountName"]},{api:"validator_api",method:"get_witness_by_account",params:["accountName"]},{api:"validator_api",method:"get_validators_by_vote",params:["from","limit"]},{api:"validator_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"validator_api",method:"get_validators_by_counted_vote",params:["from","limit"]},{api:"validator_api",method:"get_witnesses_by_counted_vote",params:["from","limit"]},{api:"validator_api",method:"get_validator_count"},{api:"validator_api",method:"get_witness_count"},{api:"validator_api",method:"lookup_validator_accounts",params:["lowerBoundName","limit"]},{api:"validator_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"validator_api",method:"get_active_validators"},{api:"validator_api",method:"get_active_witnesses"},{api:"account_history",method:"get_account_history",params:["account","from","limit"]},{api:"operation_history",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"operation_history",method:"get_transaction",params:["trxId"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block_header",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block",params:["blockNum"]},{api:"database_api",method:"set_block_applied_callback",params:["callback"]},{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_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"database_api",method:"get_accounts",params:["accountNames"]},{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_master_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_vesting_delegations",params:["account","from","limit","type"]},{api:"database_api",method:"get_expiring_vesting_delegations",params:["account","from","limit"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{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:["name","signers"]},{api:"database_api",method:"get_database_info"},{api:"database_api",method:"get_proposed_transactions",params:["account","from","limit"]},{api:"database_api",method:"get_accounts_on_sale",params:["from","limit"]},{api:"database_api",method:"get_accounts_on_auction",params:["from","limit"]},{api:"database_api",method:"get_subaccounts_on_sale",params:["from","limit"]},{api:"account_by_key",method:"get_key_references",params:["account_name_type"]},{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:["block"]},{api:"committee_api",method:"get_committee_request",params:["request_id","votes_count"]},{api:"committee_api",method:"get_committee_request_votes",params:["request_id"]},{api:"committee_api",method:"get_committee_requests_list",params:["status"]},{api:"invite_api",method:"get_invites_list",params:["status"]},{api:"invite_api",method:"get_invite_by_id",params:["id"]},{api:"invite_api",method:"get_invite_by_key",params:["invite_key"]},{api:"paid_subscription_api",method:"get_paid_subscriptions",params:["from","limit"]},{api:"paid_subscription_api",method:"get_paid_subscription_options",params:["account"]},{api:"paid_subscription_api",method:"get_paid_subscription_status",params:["subscriber","account"]},{api:"paid_subscription_api",method:"get_active_paid_subscriptions",params:["subscriber"]},{api:"paid_subscription_api",method:"get_inactive_paid_subscriptions",params:["subscriber"]},{api:"custom_protocol_api",method:"get_account",params:["account","custom_protocol_id"]},{api:"auth_util",method:"check_authority_signature",params:["account_name","level","signatures"]},{api:"block_info",method:"get_block_info",params:["start_block_num","count"]},{api:"block_info",method:"get_blocks_with_info",params:["start_block_num","count"]},{api:"raw_block",method:"get_raw_block",params:["block_num"]},{api:"prediction_market_api",method:"get_market",params:["market_id"]},{api:"prediction_market_api",method:"list_markets",params:["status","from","limit","show_risky"]},{api:"prediction_market_api",method:"list_markets_by_oracle",params:["oracle","from","limit"]},{api:"prediction_market_api",method:"list_markets_by_creator",params:["creator","from","limit"]},{api:"prediction_market_api",method:"get_market_outcomes",params:["market_id"]},{api:"prediction_market_api",method:"get_market_weight_sums",params:["market_id"]},{api:"prediction_market_api",method:"get_market_bets",params:["market_id","from","limit"]},{api:"prediction_market_api",method:"get_account_positions",params:["account","from","limit"]},{api:"prediction_market_api",method:"get_market_liquidity",params:["market_id","from","limit"]},{api:"prediction_market_api",method:"get_market_full",params:["market_id","account"]},{api:"prediction_market_api",method:"get_account_leverage_positions",params:["account","from","limit"]},{api:"prediction_market_api",method:"get_market_leverage_positions",params:["market_id","from","limit"]},{api:"prediction_market_api",method:"get_creator_ban",params:["account"]},{api:"prediction_market_api",method:"get_leverage_quote",params:["market_id","outcome_index","collateral"]},{api:"prediction_market_api",method:"get_leverage_close_preview",params:["position_id"]},{api:"prediction_market_api",method:"get_leverage_convert_preview",params:["position_id"]},{api:"prediction_market_api",method:"get_oracle",params:["owner"]},{api:"prediction_market_api",method:"list_oracles",params:["from","limit"]},{api:"prediction_market_api",method:"get_dispute",params:["market_id"]},{api:"prediction_market_api",method:"get_dispute_votes",params:["market_id"]},{api:"prediction_market_api",method:"get_lazy_pool"},{api:"prediction_market_api",method:"get_lazy_deposit",params:["account"]},{api:"prediction_market_api",method:"get_lazy_allocations",params:["from","limit"]},{api:"prediction_market_api",method:"get_market_lazy_allocation",params:["market_id"]},{api:"prediction_market_api",method:"get_pm_chain_properties"},{api:"prediction_market_api",method:"get_market_meta",params:["market_id"]},{api:"prediction_market_api",method:"list_markets_by_category",params:["category","from","limit","jurisdiction","subcategory","tag","sort"]},{api:"prediction_market_api",method:"get_market_categories"},{api:"prediction_market_api",method:"get_market_kline",params:["market_id","from","limit"]}]},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});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};e.camelCase=function(t){return t.replace(o,function(t,e){return e.toUpperCase()})},e.validateAccountName=function(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<2)return i+"be longer.";if(o>25)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>=2))return i+"be longer"}return null},e.voiceEvent=function(t,e,r,n,i,o,s,a){a=void 0===a?function(){}:a;var u=function(t,e,r,n,i,o,s,a){var u={p:s,e:r,b:i};n!==e&&(u.a=n),void 0!==o&&(u.d=o),viz.broadcast.custom(t,[],[e],"VE",JSON.stringify(u),function(t,e){a(!t)})};!1!==(s=void 0!==s&&s)?u(t,e,r,n,i,o,s,a):viz.api.getAccount(e,"VE",function(s,f){s?a(!1):u(t,e,r,n,i,o,f.custom_sequence_block_num,a)})},e.voiceText=function(t,e,r,n,i,o,s,a){n=void 0!==n&&n,i=void 0!==i&&i,o=void 0!==o&&o,a=void 0===a?function(){}:a;var u=function(t,e,r,n,i,o,s,a){var u={p:s,d:{t:r}};n?u.d.r=n:i&&(u.d.s=i),o&&(u.d.b=o),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(u),function(t,e){a(!t)})};!1!==(s=void 0!==s&&s)?u(t,e,r,n,i,o,s,a):viz.api.getAccount(e,"V",function(s,f){s?a(!1):u(t,e,r,n,i,o,f.custom_sequence_block_num,a)})},e.voiceEncodedText=function(t,e,r,o,s,a,u,f,c,h){a=void 0!==a&&a,u=void 0!==u&&u,f=void 0!==f&&f,h=void 0===h?function(){}:h;var l=function(t,e,r,o,s,a,u,f,c,h){var l={d:{t:s}};if(a?l.d.r=a:u&&(l.d.s=u),f&&(l.d.b=f),"object"===(void 0===r?"undefined":n(r))){for(var p in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var d=p;l.nt=0==d?"t":"e",console.log("encode object",l,"with passphrase",r[d],"and comment",o[d]),l.d=JSON.stringify(l),l.d=i.Aes.simpleEncoder(l.d,r[d]),"object"===(void 0===o?"undefined":n(o))&&"string"==typeof o[d]&&(l.c=o[d])}delete l.nt}else l.d=JSON.stringify(l),l.d=i.Aes.simpleEncoder(l.d,r),void 0!==o&&(l.c=o);l.t="e",l.p=c,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(l),function(t,e){h(!t)})};!1!==(c=void 0!==c&&c)?l(t,e,r,o,s,a,u,f,c,h):viz.api.getAccount(e,"V",function(n,i){n?h(!1):l(t,e,r,o,s,a,u,f,i.custom_sequence_block_num,h)})},e.voicePublication=function(t,e,r,n,i,o,s,a,u,f,c){i=void 0!==i&&i,o=void 0!==o&&o,s=void 0!==s&&s,a=void 0!==a&&a,u=void 0!==u&&u,c=void 0===c?function(){}:c;var h=function(t,e,r,n,i,o,s,a,u,f,c){var h={p:f,t:"p",d:{t:r,m:n}};i&&(h.d.d=i),o&&(h.d.i=o),s?h.d.r=s:a&&(h.d.s=a),u&&(h.d.b=u),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(h),function(t,e){c(!t)})};!1!==(f=void 0!==f&&f)?h(t,e,r,n,i,o,s,a,u,f,c):viz.api.getAccount(e,"V",function(f,l){f?c(!1):h(t,e,r,n,i,o,s,a,u,l.custom_sequence_block_num,c)})},e.voiceEncodedPublication=function(t,e,r,o,s,a,u,f,c,h,l,p,d){u=void 0!==u&&u,f=void 0!==f&&f,c=void 0!==c&&c,h=void 0!==h&&h,l=void 0!==l&&l,d=void 0===d?function(){}:d;var v=function(t,e,r,o,s,a,u,f,c,h,l,p,d){var v={t:"p",d:{t:s,m:a}};if(u&&(v.d.d=u),f&&(v.d.i=f),c?v.d.r=c:h&&(v.d.s=h),l&&(v.d.b=l),"object"===(void 0===r?"undefined":n(r))){for(var y in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var g=y;v.nt=0==g?"p":"e",console.log("encode object",v,"with passphrase",r[g],"and comment",o[g]),v.d=JSON.stringify(v),v.d=i.Aes.simpleEncoder(v.d,r[g]),"object"===(void 0===o?"undefined":n(o))&&"string"==typeof o[g]&&(v.c=o[g])}delete v.nt}else v.d.nt=v.t,v.d=JSON.stringify(v),v.d=i.Aes.simpleEncoder(v.d,r),void 0!==o&&(v.c=o);v.t="e",v.p=p,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(v),function(t,e){d(!t)})};!1!==(p=void 0!==p&&p)?v(t,e,r,o,s,a,u,f,c,h,l,p,d):viz.api.getAccount(e,"V",function(n,i){n?d(!1):v(t,e,r,o,s,a,u,f,c,h,l,i.custom_sequence_block_num,d)})};var i=r(175),o=/_([a-z])/g},function(t,e,r){"use strict";t.exports={Address:r(176),Aes:r(227),PrivateKey:r(260),PublicKey:r(250),Signature:r(261),brainKey:r(265),key_utils:r(266),hash:r(185),ecc_config:r(171)}},function(t,e,r){(function(e){"use strict";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}}();var i=r(181),o=r(171),s=r(185),a=r(225),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.addy=e}return n(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.get("address_prefix"),r=s.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+a.encode(n)}}],[{key:"fromBuffer",value:function(e){var r=s.sha512(e);return new t(s.ripemd160(r))}},{key:"fromString",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get("address_prefix"),u=r.slice(0,n.length);i.equal(n,u,"Expecting key to begin with "+n+", instead got "+u);var f=r.slice(n.length),c=(f=new e(a.decode(f),"binary")).slice(-4);f=f.slice(0,-4);var h=s.ripemd160(f);return h=h.slice(0,4),i.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=s.sha256(r.toBuffer(n)),a=s.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var f=e.concat([u,a]),c=s.sha256(f);c=s.sha256(c);var h=e.concat([f,c.slice(0,4)]);return new t(s.ripemd160(h))}}]),t}();t.exports=u}).call(e,r(177).Buffer)},function(t,e,r){(function(t){
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
"use strict";var r=n(178),i=n(179),o=n(180);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(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 l(t,e){if(f(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function m(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function b(t,e,n,r){return V(U(e,t.length-n),t,n,r)}function _(t,e,n,r){return V(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return _(t,e,n,r)}function E(t,e,n,r){return V(q(e),t,n,r)}function x(t,e,n,r){return V(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=k));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return f(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(r,i),f=t.slice(e,n),l=0;l<a;++l)if(c[l]!==f[l]){o=c[l],s=f[l];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function j(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function O(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=D(t[o]);return i}function C(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function B(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function P(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function F(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||F(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function N(t,e,n,r,o){return o||F(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return N(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return N(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:U(new u(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(e,function(){return this}())},function(t,e){"use strict";e.byteLength=function(t){return 3*t.length/4-u(t)},e.toByteArray=function(t){var e,n,o,s,a,c,f=t.length;a=u(t),c=new i(3*f/4-a),o=a>0?f-4:f;var l=0;for(e=0,n=0;e<o;e+=4,n+=3)s=r[t.charCodeAt(e)]<<18|r[t.charCodeAt(e+1)]<<12|r[t.charCodeAt(e+2)]<<6|r[t.charCodeAt(e+3)],c[l++]=s>>16&255,c[l++]=s>>8&255,c[l++]=255&s;2===a?(s=r[t.charCodeAt(e)]<<2|r[t.charCodeAt(e+1)]>>4,c[l++]=255&s):1===a&&(s=r[t.charCodeAt(e)]<<10|r[t.charCodeAt(e+1)]<<4|r[t.charCodeAt(e+2)]>>2,c[l++]=s>>8&255,c[l++]=255&s);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o="",s=[],a=0,u=r-i;a<u;a+=16383)s.push(f(t,a,a+16383>u?u:a+16383));1===i?(e=t[r-1],o+=n[e>>2],o+=n[e<<4&63],o+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],o+=n[e>>10],o+=n[e>>4&63],o+=n[e<<2&63],o+="=");return s.push(o),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function u(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 c(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(c(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?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=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(e){"use strict";
|
|
8
|
+
"use strict";var n=r(178),i=r(179),o=r(180);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(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 h(this,t)}return f(this,t,e,r)}function f(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,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");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=l(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):l(t,e);if("Buffer"===e.type&&o(e.data))return l(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(c(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var 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 D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return D(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(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=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;l<u;l++)if(f(t,o+l)!==f(e,l)){h=!1;break}if(h)return o}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(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 _(t,e,r,n){return z(D(e,t.length-r),t,r,n)}function b(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return b(t,e,r,n)}function E(t,e,r,n){return z(q(e),t,r,n)}function T(t,e,r,n){return z(function(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}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.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,s,a,u,f=t[i],c=null,h=f>239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return f(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return c(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var 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},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)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},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):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))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 A(this,e,r);case"latin1":case"binary":return j(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",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+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.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(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),f=this.slice(n,i),c=t.slice(e,r),h=0;h<a;++h)if(f[h]!==c[h]){o=f[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},u.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 m(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function A(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 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+=N(t[o]);return i}function B(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 I(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 C(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(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 P(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 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 M(t,e,r,n,o){return o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(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},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(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},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.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||!u.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},u.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&&!u.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;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:D(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>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=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(e,function(){return this}())},function(t,e){"use strict";e.byteLength=function(t){return 3*t.length/4-u(t)},e.toByteArray=function(t){var e,r,o,s,a,f,c=t.length;a=u(t),f=new i(3*c/4-a),o=a>0?c-4:c;var h=0;for(e=0,r=0;e<o;e+=4,r+=3)s=n[t.charCodeAt(e)]<<18|n[t.charCodeAt(e+1)]<<12|n[t.charCodeAt(e+2)]<<6|n[t.charCodeAt(e+3)],f[h++]=s>>16&255,f[h++]=s>>8&255,f[h++]=255&s;2===a?(s=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,f[h++]=255&s):1===a&&(s=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,f[h++]=s>>8&255,f[h++]=255&s);return f},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o="",s=[],a=0,u=n-i;a<u;a+=16383)s.push(c(t,a,a+16383>u?u:a+16383));1===i?(e=t[n-1],o+=r[e>>2],o+=r[e<<4&63],o+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],o+=r[e>>10],o+=r[e>>4&63],o+=r[e<<2&63],o+="=");return s.push(o),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(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 f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(f(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){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:1/0*(p?-1:1);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,v=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))*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*v}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(e){"use strict";
|
|
9
9
|
/*!
|
|
10
10
|
* The buffer module from node.js, for the browser.
|
|
11
11
|
*
|
|
12
12
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
13
13
|
* @license MIT
|
|
14
|
-
*/function r(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=n(182),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function f(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))))}var l=t.exports=g,h=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(h);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function y(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,n,r,i){throw new l.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function g(t,e){t||v(t,!0,e,"==",l.ok)}function m(t,e,n,s){if(t===e)return!0;if(i(t)&&i(e))return 0===r(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===r(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=b(t),s=b(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),m(t,e,n);var u,c,f=E(t),l=E(e);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),c=f.length-1;c>=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!m(t[u],e[u],n,r))return!1;return!0}(t,e,n,s))}return n?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&v(i,n,"Missing expected exception"+r);var s="string"==typeof r,a=!t&&i&&!n;if((!t&&o.isError(i)&&s&&_(i,n)||a)&&v(i,n,"Got unwanted exception"+r),t&&i&&n&&!_(i,n)||!t&&i)throw i}l.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return d(y(t.actual),128)+" "+t.operator+" "+d(y(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=p(e),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},o.inherits(l.AssertionError,Error),l.fail=v,l.ok=g,l.equal=function(t,e,n){t!=e&&v(t,e,n,"==",l.equal)},l.notEqual=function(t,e,n){t==e&&v(t,e,n,"!=",l.notEqual)},l.deepEqual=function(t,e,n){m(t,e,!1)||v(t,e,n,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(t,e,n){m(t,e,!0)||v(t,e,n,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(t,e,n){m(t,e,!1)&&v(t,e,n,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function t(e,n,r){m(e,n,!0)&&v(e,n,r,"notDeepStrictEqual",t)},l.strictEqual=function(t,e,n){t!==e&&v(t,e,n,"===",l.strictEqual)},l.notStrictEqual=function(t,e,n){t===e&&v(t,e,n,"!==",l.notStrictEqual)},l.throws=function(t,e,n){w(!0,t,e,n)},l.doesNotThrow=function(t,e,n){w(!1,t,e,n)},l.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(e,function(){return this}())},function(t,e,n){(function(t,r){var i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,s=String(t).replace(i,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<o;u=r[++n])y(u)||!_(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(n,i){if(m(t.process))return function(){return e.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var o=!1;return function(){if(!o){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),o=!0}return n.apply(this,arguments)}};var o,s={};function a(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),f(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"["+a.colors[n][0]+"m"+t+"["+a.colors[n][1]+"m":t}function c(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return g(i)||(i=f(t,i,r)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(g(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),E(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(n);if(0===s.length){if(x(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(E(n))return l(n)}var c,_="",T=!1,S=["{","}"];(p(n)&&(T=!0,S=["[","]"]),x(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(_=" "+RegExp.prototype.toString.call(n)),w(n)&&(_=" "+Date.prototype.toUTCString.call(n)),E(n)&&(_=" "+l(n)),0!==s.length||T&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=T?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)A(e,String(s))?o.push(h(t,e,n,r,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,n,r,i,!0))}),o}(t,n,r,a,s):s.map(function(e){return h(t,n,r,a,e,T)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,_,S)):S[0]+_+S[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),A(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=y(n)?f(t,u.value,null):f(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),m(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function v(t){return"number"==typeof t}function g(t){return"string"==typeof t}function m(t){return void 0===t}function b(t){return _(t)&&"[object RegExp]"===T(t)}function _(t){return"object"==typeof t&&null!==t}function w(t){return _(t)&&"[object Date]"===T(t)}function E(t){return _(t)&&("[object Error]"===T(t)||t instanceof Error)}function x(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(m(o)&&(o=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=b,e.isObject=_,e.isDate=w,e.isError=E,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(183);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=n(184),e._extend=function(t,e){if(!e||!_(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(e,function(){return this}(),n(5))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";var r=o(n(186)),i=o(n(223));function o(t){return t&&t.__esModule?t:{default:t}}t.exports={sha1:function(t,e){return(0,r.default)("sha1").update(t).digest(e)},sha256:function(t,e){return(0,r.default)("sha256").update(t).digest(e)},sha512:function(t,e){return(0,r.default)("sha512").update(t).digest(e)},HmacSHA256:function(t,e){return(0,i.default)("sha256",e).update(t).digest()},ripemd160:function(t){return(0,r.default)("rmd160").update(t).digest()}}},function(t,e,n){(function(e){"use strict";var r=n(187),i=n(188),o=n(190),s=n(214),a=n(222);function u(t){a.call(this,"digest"),this._hash=t,this.buffers=[]}function c(t){a.call(this,"digest"),this._hash=t}r(u,a),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=e.concat(this.buffers),n=this._hash(t);return this.buffers=null,n},r(c,a),c.prototype._update=function(t){this._hash.update(t)},c.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new c("rmd160"===t||"ripemd160"===t?new o:s(t))}}).call(e,n(177).Buffer)},184,function(t,e,n){"use strict";var r=n(189);function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,l=0;l<t.length;l+=16){var h=n,p=r,d=i,y=o;r=c(r=c(r=c(r=c(r=u(r=u(r=u(r=u(r=a(r=a(r=a(r=a(r=s(r=s(r=s(r=s(r,i=s(i,o=s(o,n=s(n,r,i,o,t[l+0],7,-680876936),r,i,t[l+1],12,-389564586),n,r,t[l+2],17,606105819),o,n,t[l+3],22,-1044525330),i=s(i,o=s(o,n=s(n,r,i,o,t[l+4],7,-176418897),r,i,t[l+5],12,1200080426),n,r,t[l+6],17,-1473231341),o,n,t[l+7],22,-45705983),i=s(i,o=s(o,n=s(n,r,i,o,t[l+8],7,1770035416),r,i,t[l+9],12,-1958414417),n,r,t[l+10],17,-42063),o,n,t[l+11],22,-1990404162),i=s(i,o=s(o,n=s(n,r,i,o,t[l+12],7,1804603682),r,i,t[l+13],12,-40341101),n,r,t[l+14],17,-1502002290),o,n,t[l+15],22,1236535329),i=a(i,o=a(o,n=a(n,r,i,o,t[l+1],5,-165796510),r,i,t[l+6],9,-1069501632),n,r,t[l+11],14,643717713),o,n,t[l+0],20,-373897302),i=a(i,o=a(o,n=a(n,r,i,o,t[l+5],5,-701558691),r,i,t[l+10],9,38016083),n,r,t[l+15],14,-660478335),o,n,t[l+4],20,-405537848),i=a(i,o=a(o,n=a(n,r,i,o,t[l+9],5,568446438),r,i,t[l+14],9,-1019803690),n,r,t[l+3],14,-187363961),o,n,t[l+8],20,1163531501),i=a(i,o=a(o,n=a(n,r,i,o,t[l+13],5,-1444681467),r,i,t[l+2],9,-51403784),n,r,t[l+7],14,1735328473),o,n,t[l+12],20,-1926607734),i=u(i,o=u(o,n=u(n,r,i,o,t[l+5],4,-378558),r,i,t[l+8],11,-2022574463),n,r,t[l+11],16,1839030562),o,n,t[l+14],23,-35309556),i=u(i,o=u(o,n=u(n,r,i,o,t[l+1],4,-1530992060),r,i,t[l+4],11,1272893353),n,r,t[l+7],16,-155497632),o,n,t[l+10],23,-1094730640),i=u(i,o=u(o,n=u(n,r,i,o,t[l+13],4,681279174),r,i,t[l+0],11,-358537222),n,r,t[l+3],16,-722521979),o,n,t[l+6],23,76029189),i=u(i,o=u(o,n=u(n,r,i,o,t[l+9],4,-640364487),r,i,t[l+12],11,-421815835),n,r,t[l+15],16,530742520),o,n,t[l+2],23,-995338651),i=c(i,o=c(o,n=c(n,r,i,o,t[l+0],6,-198630844),r,i,t[l+7],10,1126891415),n,r,t[l+14],15,-1416354905),o,n,t[l+5],21,-57434055),i=c(i,o=c(o,n=c(n,r,i,o,t[l+12],6,1700485571),r,i,t[l+3],10,-1894986606),n,r,t[l+10],15,-1051523),o,n,t[l+1],21,-2054922799),i=c(i,o=c(o,n=c(n,r,i,o,t[l+8],6,1873313359),r,i,t[l+15],10,-30611744),n,r,t[l+6],15,-1560198380),o,n,t[l+13],21,1309151649),i=c(i,o=c(o,n=c(n,r,i,o,t[l+4],6,-145523070),r,i,t[l+11],10,-1120210379),n,r,t[l+2],15,718787259),o,n,t[l+9],21,-343485551),n=f(n,h),r=f(r,p),i=f(i,d),o=f(o,y)}return[n,r,i,o]}function o(t,e,n,r,i,o){return f(function(t,e){return t<<e|t>>>32-e}(f(f(e,t),f(r,o)),i),n)}function s(t,e,n,r,i,s,a){return o(e&n|~e&r,t,e,i,s,a)}function a(t,e,n,r,i,s,a){return o(e&r|n&~r,t,e,i,s,a)}function u(t,e,n,r,i,s,a){return o(e^n^r,t,e,i,s,a)}function c(t,e,n,r,i,s,a){return o(n^(e|~r),t,e,i,s,a)}function f(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}t.exports=function(t){return r(t,i)}},function(t,e,n){(function(e){"use strict";var n=4,r=new e(n);r.fill(0);t.exports=function(t,i){var o=i(function(t){if(t.length%n!=0){var i=t.length+(n-t.length%n);t=e.concat([t,r],i)}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}(t),8*t.length);t=new e(16);for(var s=0;s<o.length;s++)t.writeInt32LE(o[s],s<<2,!0);return t}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";var r=n(187),i=n(191);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function s(t,e){return t<<e|t>>>32-e}function a(t,e,n,r,i,o,a,u){return s(t+(e^n^r)+o+a|0,u)+i|0}function u(t,e,n,r,i,o,a,u){return s(t+(e&n|~e&r)+o+a|0,u)+i|0}function c(t,e,n,r,i,o,a,u){return s(t+((e|~n)^r)+o+a|0,u)+i|0}function f(t,e,n,r,i,o,a,u){return s(t+(e&r|n&~r)+o+a|0,u)+i|0}function l(t,e,n,r,i,o,a,u){return s(t+(e^(n|~r))+o+a|0,u)+i|0}r(o,i),o.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,o=this._d,h=this._e;h=a(h,n=a(n,r,i,o,h,t[0],0,11),r,i=s(i,10),o,t[1],0,14),r=a(r=s(r,10),i=a(i,o=a(o,h,n,r,i,t[2],0,15),h,n=s(n,10),r,t[3],0,12),o,h=s(h,10),n,t[4],0,5),o=a(o=s(o,10),h=a(h,n=a(n,r,i,o,h,t[5],0,8),r,i=s(i,10),o,t[6],0,7),n,r=s(r,10),i,t[7],0,9),n=a(n=s(n,10),r=a(r,i=a(i,o,h,n,r,t[8],0,11),o,h=s(h,10),n,t[9],0,13),i,o=s(o,10),h,t[10],0,14),i=a(i=s(i,10),o=a(o,h=a(h,n,r,i,o,t[11],0,15),n,r=s(r,10),i,t[12],0,6),h,n=s(n,10),r,t[13],0,7),h=u(h=s(h,10),n=a(n,r=a(r,i,o,h,n,t[14],0,9),i,o=s(o,10),h,t[15],0,8),r,i=s(i,10),o,t[7],1518500249,7),r=u(r=s(r,10),i=u(i,o=u(o,h,n,r,i,t[4],1518500249,6),h,n=s(n,10),r,t[13],1518500249,8),o,h=s(h,10),n,t[1],1518500249,13),o=u(o=s(o,10),h=u(h,n=u(n,r,i,o,h,t[10],1518500249,11),r,i=s(i,10),o,t[6],1518500249,9),n,r=s(r,10),i,t[15],1518500249,7),n=u(n=s(n,10),r=u(r,i=u(i,o,h,n,r,t[3],1518500249,15),o,h=s(h,10),n,t[12],1518500249,7),i,o=s(o,10),h,t[0],1518500249,12),i=u(i=s(i,10),o=u(o,h=u(h,n,r,i,o,t[9],1518500249,15),n,r=s(r,10),i,t[5],1518500249,9),h,n=s(n,10),r,t[2],1518500249,11),h=u(h=s(h,10),n=u(n,r=u(r,i,o,h,n,t[14],1518500249,7),i,o=s(o,10),h,t[11],1518500249,13),r,i=s(i,10),o,t[8],1518500249,12),r=c(r=s(r,10),i=c(i,o=c(o,h,n,r,i,t[3],1859775393,11),h,n=s(n,10),r,t[10],1859775393,13),o,h=s(h,10),n,t[14],1859775393,6),o=c(o=s(o,10),h=c(h,n=c(n,r,i,o,h,t[4],1859775393,7),r,i=s(i,10),o,t[9],1859775393,14),n,r=s(r,10),i,t[15],1859775393,9),n=c(n=s(n,10),r=c(r,i=c(i,o,h,n,r,t[8],1859775393,13),o,h=s(h,10),n,t[1],1859775393,15),i,o=s(o,10),h,t[2],1859775393,14),i=c(i=s(i,10),o=c(o,h=c(h,n,r,i,o,t[7],1859775393,8),n,r=s(r,10),i,t[0],1859775393,13),h,n=s(n,10),r,t[6],1859775393,6),h=c(h=s(h,10),n=c(n,r=c(r,i,o,h,n,t[13],1859775393,5),i,o=s(o,10),h,t[11],1859775393,12),r,i=s(i,10),o,t[5],1859775393,7),r=f(r=s(r,10),i=f(i,o=c(o,h,n,r,i,t[12],1859775393,5),h,n=s(n,10),r,t[1],2400959708,11),o,h=s(h,10),n,t[9],2400959708,12),o=f(o=s(o,10),h=f(h,n=f(n,r,i,o,h,t[11],2400959708,14),r,i=s(i,10),o,t[10],2400959708,15),n,r=s(r,10),i,t[0],2400959708,14),n=f(n=s(n,10),r=f(r,i=f(i,o,h,n,r,t[8],2400959708,15),o,h=s(h,10),n,t[12],2400959708,9),i,o=s(o,10),h,t[4],2400959708,8),i=f(i=s(i,10),o=f(o,h=f(h,n,r,i,o,t[13],2400959708,9),n,r=s(r,10),i,t[3],2400959708,14),h,n=s(n,10),r,t[7],2400959708,5),h=f(h=s(h,10),n=f(n,r=f(r,i,o,h,n,t[15],2400959708,6),i,o=s(o,10),h,t[14],2400959708,8),r,i=s(i,10),o,t[5],2400959708,6),r=l(r=s(r,10),i=f(i,o=f(o,h,n,r,i,t[6],2400959708,5),h,n=s(n,10),r,t[2],2400959708,12),o,h=s(h,10),n,t[4],2840853838,9),o=l(o=s(o,10),h=l(h,n=l(n,r,i,o,h,t[0],2840853838,15),r,i=s(i,10),o,t[5],2840853838,5),n,r=s(r,10),i,t[9],2840853838,11),n=l(n=s(n,10),r=l(r,i=l(i,o,h,n,r,t[7],2840853838,6),o,h=s(h,10),n,t[12],2840853838,8),i,o=s(o,10),h,t[2],2840853838,13),i=l(i=s(i,10),o=l(o,h=l(h,n,r,i,o,t[10],2840853838,12),n,r=s(r,10),i,t[14],2840853838,5),h,n=s(n,10),r,t[1],2840853838,12),h=l(h=s(h,10),n=l(n,r=l(r,i,o,h,n,t[3],2840853838,13),i,o=s(o,10),h,t[8],2840853838,14),r,i=s(i,10),o,t[11],2840853838,11),r=l(r=s(r,10),i=l(i,o=l(o,h,n,r,i,t[6],2840853838,8),h,n=s(n,10),r,t[15],2840853838,5),o,h=s(h,10),n,t[13],2840853838,6),o=s(o,10);var p=this._a,d=this._b,y=this._c,v=this._d,g=this._e;g=l(g,p=l(p,d,y,v,g,t[5],1352829926,8),d,y=s(y,10),v,t[14],1352829926,9),d=l(d=s(d,10),y=l(y,v=l(v,g,p,d,y,t[7],1352829926,9),g,p=s(p,10),d,t[0],1352829926,11),v,g=s(g,10),p,t[9],1352829926,13),v=l(v=s(v,10),g=l(g,p=l(p,d,y,v,g,t[2],1352829926,15),d,y=s(y,10),v,t[11],1352829926,15),p,d=s(d,10),y,t[4],1352829926,5),p=l(p=s(p,10),d=l(d,y=l(y,v,g,p,d,t[13],1352829926,7),v,g=s(g,10),p,t[6],1352829926,7),y,v=s(v,10),g,t[15],1352829926,8),y=l(y=s(y,10),v=l(v,g=l(g,p,d,y,v,t[8],1352829926,11),p,d=s(d,10),y,t[1],1352829926,14),g,p=s(p,10),d,t[10],1352829926,14),g=f(g=s(g,10),p=l(p,d=l(d,y,v,g,p,t[3],1352829926,12),y,v=s(v,10),g,t[12],1352829926,6),d,y=s(y,10),v,t[6],1548603684,9),d=f(d=s(d,10),y=f(y,v=f(v,g,p,d,y,t[11],1548603684,13),g,p=s(p,10),d,t[3],1548603684,15),v,g=s(g,10),p,t[7],1548603684,7),v=f(v=s(v,10),g=f(g,p=f(p,d,y,v,g,t[0],1548603684,12),d,y=s(y,10),v,t[13],1548603684,8),p,d=s(d,10),y,t[5],1548603684,9),p=f(p=s(p,10),d=f(d,y=f(y,v,g,p,d,t[10],1548603684,11),v,g=s(g,10),p,t[14],1548603684,7),y,v=s(v,10),g,t[15],1548603684,7),y=f(y=s(y,10),v=f(v,g=f(g,p,d,y,v,t[8],1548603684,12),p,d=s(d,10),y,t[12],1548603684,7),g,p=s(p,10),d,t[4],1548603684,6),g=f(g=s(g,10),p=f(p,d=f(d,y,v,g,p,t[9],1548603684,15),y,v=s(v,10),g,t[1],1548603684,13),d,y=s(y,10),v,t[2],1548603684,11),d=c(d=s(d,10),y=c(y,v=c(v,g,p,d,y,t[15],1836072691,9),g,p=s(p,10),d,t[5],1836072691,7),v,g=s(g,10),p,t[1],1836072691,15),v=c(v=s(v,10),g=c(g,p=c(p,d,y,v,g,t[3],1836072691,11),d,y=s(y,10),v,t[7],1836072691,8),p,d=s(d,10),y,t[14],1836072691,6),p=c(p=s(p,10),d=c(d,y=c(y,v,g,p,d,t[6],1836072691,6),v,g=s(g,10),p,t[9],1836072691,14),y,v=s(v,10),g,t[11],1836072691,12),y=c(y=s(y,10),v=c(v,g=c(g,p,d,y,v,t[8],1836072691,13),p,d=s(d,10),y,t[12],1836072691,5),g,p=s(p,10),d,t[2],1836072691,14),g=c(g=s(g,10),p=c(p,d=c(d,y,v,g,p,t[10],1836072691,13),y,v=s(v,10),g,t[0],1836072691,13),d,y=s(y,10),v,t[4],1836072691,7),d=u(d=s(d,10),y=u(y,v=c(v,g,p,d,y,t[13],1836072691,5),g,p=s(p,10),d,t[8],2053994217,15),v,g=s(g,10),p,t[6],2053994217,5),v=u(v=s(v,10),g=u(g,p=u(p,d,y,v,g,t[4],2053994217,8),d,y=s(y,10),v,t[1],2053994217,11),p,d=s(d,10),y,t[3],2053994217,14),p=u(p=s(p,10),d=u(d,y=u(y,v,g,p,d,t[11],2053994217,14),v,g=s(g,10),p,t[15],2053994217,6),y,v=s(v,10),g,t[0],2053994217,14),y=u(y=s(y,10),v=u(v,g=u(g,p,d,y,v,t[5],2053994217,6),p,d=s(d,10),y,t[12],2053994217,9),g,p=s(p,10),d,t[2],2053994217,12),g=u(g=s(g,10),p=u(p,d=u(d,y,v,g,p,t[13],2053994217,9),y,v=s(v,10),g,t[9],2053994217,12),d,y=s(y,10),v,t[7],2053994217,5),d=a(d=s(d,10),y=u(y,v=u(v,g,p,d,y,t[10],2053994217,15),g,p=s(p,10),d,t[14],2053994217,8),v,g=s(g,10),p,t[12],0,8),v=a(v=s(v,10),g=a(g,p=a(p,d,y,v,g,t[15],0,5),d,y=s(y,10),v,t[10],0,12),p,d=s(d,10),y,t[4],0,9),p=a(p=s(p,10),d=a(d,y=a(y,v,g,p,d,t[1],0,12),v,g=s(g,10),p,t[5],0,5),y,v=s(v,10),g,t[8],0,14),y=a(y=s(y,10),v=a(v,g=a(g,p,d,y,v,t[7],0,6),p,d=s(d,10),y,t[6],0,8),g,p=s(p,10),d,t[2],0,13),g=a(g=s(g,10),p=a(p,d=a(d,y,v,g,p,t[13],0,6),y,v=s(v,10),g,t[14],0,5),d,y=s(y,10),v,t[0],0,15),d=a(d=s(d,10),y=a(y,v=a(v,g,p,d,y,t[3],0,13),g,p=s(p,10),d,t[9],0,11),v,g=s(g,10),p,t[11],0,11),v=s(v,10);var m=this._b+i+v|0;this._b=this._c+o+g|0,this._c=this._d+h+p|0,this._d=this._e+n+d|0,this._e=this._a+r+y|0,this._a=m},o.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(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=o}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";var r=n(192).Transform;function i(t){r.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(187)(i,r),i.prototype._transform=function(t,n,r){var i=null;try{"buffer"!==n&&(t=new e(t,n)),this.update(t)}catch(t){i=t}r(i)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.prototype.update=function(t,n){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,n||"binary"));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},i.prototype._update=function(t){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();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(e,n(177).Buffer)},function(t,e,n){t.exports=i;var r=n(2).EventEmitter;function i(){r.call(this)}n(187)(i,r),i.Readable=n(193),i.Writable=n(210),i.Duplex=n(211),i.Transform=n(212),i.PassThrough=n(213),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===r.listenerCount(this,"error"))throw t}function f(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",f),n.removeListener("close",f),t.removeListener("close",f)}return n.on("error",c),t.on("error",c),n.on("end",f),n.on("close",f),t.on("close",f),t.emit("pipe",n),t}},function(t,e,n){(e=t.exports=n(194)).Stream=e,e.Readable=e,e.Writable=n(205),e.Duplex=n(204),e.Transform=n(208),e.PassThrough=n(209)},function(t,e,n){(function(e,r){"use strict";var i=n(195);t.exports=b;var o,s=n(180);b.ReadableState=m;n(2).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=n(196),c=n(197).Buffer,f=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(n(199));l.inherits=n(187);var h=n(200),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,y=n(201),v=n(203);l.inherits(b,u);var g=["error","close","destroy","pause","resume"];function m(t,e){t=t||{};var r=e instanceof(o=o||n(204));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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&&(d||(d=n(207).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(204),!(this instanceof b))return new b(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(t,e,n,r,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,T(t)}(t,s)):(i||(o=function(t,e){var n;(function(t){return c.isBuffer(t)||t instanceof f})(e)||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):k(t,s)):w(t,s,e,!1))):r||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&T(t)),k(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=c.from(t,e),e=""),n=!0),_(this,t,e,!1,n)},b.prototype.unshift=function(t){return _(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return d||(d=n(207).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var E=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){p("emit readable"),t.emit("readable"),C(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(A,t,e))}function A(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function j(t){p("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function I(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0===(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(B,e,t))}function B(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}b.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):T(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&R(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(n,e))),null===(r=t>0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?f:b;function c(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",g),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",v),t.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",b),n.removeListener("data",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var l=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,C(t))}}(n);t.on("drain",l);var h=!1;var d=!1;function y(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!h&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),n.pause())}function v(e){p("onerror",e),b(),t.removeListener("error",v),0===a(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",m),b()}function m(){p("onfinish"),t.removeListener("close",g),b()}function b(){p("unpipe"),n.unpipe(t)}return n.on("data",y),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",v),t.once("close",g),t.once("finish",m),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=P(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)},b.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&T(this):i.nextTick(j,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(O,t,e))}(this,t)),this},b.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){p("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=I}).call(e,function(){return this}(),n(5))},function(t,e,n){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(e,n(5))},function(t,e,n){t.exports=n(2).EventEmitter},function(t,e,n){var r=n(198),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){(function(t){
|
|
14
|
+
*/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)}var o=r(182),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function c(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))))}var h=t.exports=g,l=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(l);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function y(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function g(t,e){t||y(t,!0,e,"==",h.ok)}function m(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&f(t)===f(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;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=_(t),s=_(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),m(t,e,r);var u,f,c=E(t),h=E(e);if(c.length!==h.length)return!1;for(c.sort(),h.sort(),f=c.length-1;f>=0;f--)if(c[f]!==h[f])return!1;for(f=c.length-1;f>=0;f--)if(u=c[f],!m(t[u],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function _(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function b(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(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=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&y(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&b(i,r)||a)&&y(i,r,"Got unwanted exception"+n),t&&i&&r&&!b(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return d(v(t.actual),128)+" "+t.operator+" "+d(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=g,h.equal=function(t,e,r){t!=e&&y(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&y(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){m(t,e,!1)||y(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){m(t,e,!0)||y(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){m(t,e,!1)&&y(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){m(e,r,!0)&&y(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&y(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&y(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){w(!0,t,e,r)},h.doesNotThrow=function(t,e,r){w(!1,t,e,r)},h.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,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}}),u=n[r];r<o;u=n[++r])v(u)||!b(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,i){if(m(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),o=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function c(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 g(i)||(i=c(t,i,n)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(T(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return h(r)}var f,b="",S=!1,x=["{","}"];(p(r)&&(S=!0,x=["[","]"]),T(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),E(r)&&(b=" "+h(r)),0!==s.length||S&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=S?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)A(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}(t,r,n,a,s):s.map(function(e){return l(t,r,n,a,e,S)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,b,x)):x[0]+b+x[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),A(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=v(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),m(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return"number"==typeof t}function g(t){return"string"==typeof t}function m(t){return void 0===t}function _(t){return b(t)&&"[object RegExp]"===S(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===S(t)}function E(t){return b(t)&&("[object Error]"===S(t)||t instanceof Error)}function T(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(m(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=_,e.isObject=b,e.isDate=w,e.isError=E,e.isFunction=T,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(183);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=r(184),e._extend=function(t,e){if(!e||!b(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){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";var n=o(r(186)),i=o(r(223));function o(t){return t&&t.__esModule?t:{default:t}}t.exports={sha1:function(t,e){return(0,n.default)("sha1").update(t).digest(e)},sha256:function(t,e){return(0,n.default)("sha256").update(t).digest(e)},sha512:function(t,e){return(0,n.default)("sha512").update(t).digest(e)},HmacSHA256:function(t,e){return(0,i.default)("sha256",e).update(t).digest()},ripemd160:function(t){return(0,n.default)("rmd160").update(t).digest()}}},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(188),o=r(190),s=r(214),a=r(222);function u(t){a.call(this,"digest"),this._hash=t,this.buffers=[]}function f(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},n(f,a),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new f("rmd160"===t||"ripemd160"===t?new o:s(t))}}).call(e,r(177).Buffer)},184,function(t,e,r){"use strict";var n=r(189);function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,h=0;h<t.length;h+=16){var l=r,p=n,d=i,v=o;n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n=a(n=a(n=a(n=a(n=s(n=s(n=s(n=s(n,i=s(i,o=s(o,r=s(r,n,i,o,t[h+0],7,-680876936),n,i,t[h+1],12,-389564586),r,n,t[h+2],17,606105819),o,r,t[h+3],22,-1044525330),i=s(i,o=s(o,r=s(r,n,i,o,t[h+4],7,-176418897),n,i,t[h+5],12,1200080426),r,n,t[h+6],17,-1473231341),o,r,t[h+7],22,-45705983),i=s(i,o=s(o,r=s(r,n,i,o,t[h+8],7,1770035416),n,i,t[h+9],12,-1958414417),r,n,t[h+10],17,-42063),o,r,t[h+11],22,-1990404162),i=s(i,o=s(o,r=s(r,n,i,o,t[h+12],7,1804603682),n,i,t[h+13],12,-40341101),r,n,t[h+14],17,-1502002290),o,r,t[h+15],22,1236535329),i=a(i,o=a(o,r=a(r,n,i,o,t[h+1],5,-165796510),n,i,t[h+6],9,-1069501632),r,n,t[h+11],14,643717713),o,r,t[h+0],20,-373897302),i=a(i,o=a(o,r=a(r,n,i,o,t[h+5],5,-701558691),n,i,t[h+10],9,38016083),r,n,t[h+15],14,-660478335),o,r,t[h+4],20,-405537848),i=a(i,o=a(o,r=a(r,n,i,o,t[h+9],5,568446438),n,i,t[h+14],9,-1019803690),r,n,t[h+3],14,-187363961),o,r,t[h+8],20,1163531501),i=a(i,o=a(o,r=a(r,n,i,o,t[h+13],5,-1444681467),n,i,t[h+2],9,-51403784),r,n,t[h+7],14,1735328473),o,r,t[h+12],20,-1926607734),i=u(i,o=u(o,r=u(r,n,i,o,t[h+5],4,-378558),n,i,t[h+8],11,-2022574463),r,n,t[h+11],16,1839030562),o,r,t[h+14],23,-35309556),i=u(i,o=u(o,r=u(r,n,i,o,t[h+1],4,-1530992060),n,i,t[h+4],11,1272893353),r,n,t[h+7],16,-155497632),o,r,t[h+10],23,-1094730640),i=u(i,o=u(o,r=u(r,n,i,o,t[h+13],4,681279174),n,i,t[h+0],11,-358537222),r,n,t[h+3],16,-722521979),o,r,t[h+6],23,76029189),i=u(i,o=u(o,r=u(r,n,i,o,t[h+9],4,-640364487),n,i,t[h+12],11,-421815835),r,n,t[h+15],16,530742520),o,r,t[h+2],23,-995338651),i=f(i,o=f(o,r=f(r,n,i,o,t[h+0],6,-198630844),n,i,t[h+7],10,1126891415),r,n,t[h+14],15,-1416354905),o,r,t[h+5],21,-57434055),i=f(i,o=f(o,r=f(r,n,i,o,t[h+12],6,1700485571),n,i,t[h+3],10,-1894986606),r,n,t[h+10],15,-1051523),o,r,t[h+1],21,-2054922799),i=f(i,o=f(o,r=f(r,n,i,o,t[h+8],6,1873313359),n,i,t[h+15],10,-30611744),r,n,t[h+6],15,-1560198380),o,r,t[h+13],21,1309151649),i=f(i,o=f(o,r=f(r,n,i,o,t[h+4],6,-145523070),n,i,t[h+11],10,-1120210379),r,n,t[h+2],15,718787259),o,r,t[h+9],21,-343485551),r=c(r,l),n=c(n,p),i=c(i,d),o=c(o,v)}return[r,n,i,o]}function o(t,e,r,n,i,o){return c(function(t,e){return t<<e|t>>>32-e}(c(c(e,t),c(n,o)),i),r)}function s(t,e,r,n,i,s,a){return o(e&r|~e&n,t,e,i,s,a)}function a(t,e,r,n,i,s,a){return o(e&n|r&~n,t,e,i,s,a)}function u(t,e,r,n,i,s,a){return o(e^r^n,t,e,i,s,a)}function f(t,e,r,n,i,s,a){return o(r^(e|~n),t,e,i,s,a)}function c(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}t.exports=function(t){return n(t,i)}},function(t,e,r){(function(e){"use strict";var r=4,n=new e(r);n.fill(0);t.exports=function(t,i){var o=i(function(t){if(t.length%r!=0){var i=t.length+(r-t.length%r);t=e.concat([t,n],i)}for(var o=new Array(t.length>>>2),s=0,a=0;s<t.length;s+=r,a++)o[a]=t.readInt32LE(s);return o}(t),8*t.length);t=new e(16);for(var s=0;s<o.length;s++)t.writeInt32LE(o[s],s<<2,!0);return t}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(191);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function s(t,e){return t<<e|t>>>32-e}function a(t,e,r,n,i,o,a,u){return s(t+(e^r^n)+o+a|0,u)+i|0}function u(t,e,r,n,i,o,a,u){return s(t+(e&r|~e&n)+o+a|0,u)+i|0}function f(t,e,r,n,i,o,a,u){return s(t+((e|~r)^n)+o+a|0,u)+i|0}function c(t,e,r,n,i,o,a,u){return s(t+(e&n|r&~n)+o+a|0,u)+i|0}function h(t,e,r,n,i,o,a,u){return s(t+(e^(r|~n))+o+a|0,u)+i|0}n(o,i),o.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,i=this._c,o=this._d,l=this._e;l=a(l,r=a(r,n,i,o,l,t[0],0,11),n,i=s(i,10),o,t[1],0,14),n=a(n=s(n,10),i=a(i,o=a(o,l,r,n,i,t[2],0,15),l,r=s(r,10),n,t[3],0,12),o,l=s(l,10),r,t[4],0,5),o=a(o=s(o,10),l=a(l,r=a(r,n,i,o,l,t[5],0,8),n,i=s(i,10),o,t[6],0,7),r,n=s(n,10),i,t[7],0,9),r=a(r=s(r,10),n=a(n,i=a(i,o,l,r,n,t[8],0,11),o,l=s(l,10),r,t[9],0,13),i,o=s(o,10),l,t[10],0,14),i=a(i=s(i,10),o=a(o,l=a(l,r,n,i,o,t[11],0,15),r,n=s(n,10),i,t[12],0,6),l,r=s(r,10),n,t[13],0,7),l=u(l=s(l,10),r=a(r,n=a(n,i,o,l,r,t[14],0,9),i,o=s(o,10),l,t[15],0,8),n,i=s(i,10),o,t[7],1518500249,7),n=u(n=s(n,10),i=u(i,o=u(o,l,r,n,i,t[4],1518500249,6),l,r=s(r,10),n,t[13],1518500249,8),o,l=s(l,10),r,t[1],1518500249,13),o=u(o=s(o,10),l=u(l,r=u(r,n,i,o,l,t[10],1518500249,11),n,i=s(i,10),o,t[6],1518500249,9),r,n=s(n,10),i,t[15],1518500249,7),r=u(r=s(r,10),n=u(n,i=u(i,o,l,r,n,t[3],1518500249,15),o,l=s(l,10),r,t[12],1518500249,7),i,o=s(o,10),l,t[0],1518500249,12),i=u(i=s(i,10),o=u(o,l=u(l,r,n,i,o,t[9],1518500249,15),r,n=s(n,10),i,t[5],1518500249,9),l,r=s(r,10),n,t[2],1518500249,11),l=u(l=s(l,10),r=u(r,n=u(n,i,o,l,r,t[14],1518500249,7),i,o=s(o,10),l,t[11],1518500249,13),n,i=s(i,10),o,t[8],1518500249,12),n=f(n=s(n,10),i=f(i,o=f(o,l,r,n,i,t[3],1859775393,11),l,r=s(r,10),n,t[10],1859775393,13),o,l=s(l,10),r,t[14],1859775393,6),o=f(o=s(o,10),l=f(l,r=f(r,n,i,o,l,t[4],1859775393,7),n,i=s(i,10),o,t[9],1859775393,14),r,n=s(n,10),i,t[15],1859775393,9),r=f(r=s(r,10),n=f(n,i=f(i,o,l,r,n,t[8],1859775393,13),o,l=s(l,10),r,t[1],1859775393,15),i,o=s(o,10),l,t[2],1859775393,14),i=f(i=s(i,10),o=f(o,l=f(l,r,n,i,o,t[7],1859775393,8),r,n=s(n,10),i,t[0],1859775393,13),l,r=s(r,10),n,t[6],1859775393,6),l=f(l=s(l,10),r=f(r,n=f(n,i,o,l,r,t[13],1859775393,5),i,o=s(o,10),l,t[11],1859775393,12),n,i=s(i,10),o,t[5],1859775393,7),n=c(n=s(n,10),i=c(i,o=f(o,l,r,n,i,t[12],1859775393,5),l,r=s(r,10),n,t[1],2400959708,11),o,l=s(l,10),r,t[9],2400959708,12),o=c(o=s(o,10),l=c(l,r=c(r,n,i,o,l,t[11],2400959708,14),n,i=s(i,10),o,t[10],2400959708,15),r,n=s(n,10),i,t[0],2400959708,14),r=c(r=s(r,10),n=c(n,i=c(i,o,l,r,n,t[8],2400959708,15),o,l=s(l,10),r,t[12],2400959708,9),i,o=s(o,10),l,t[4],2400959708,8),i=c(i=s(i,10),o=c(o,l=c(l,r,n,i,o,t[13],2400959708,9),r,n=s(n,10),i,t[3],2400959708,14),l,r=s(r,10),n,t[7],2400959708,5),l=c(l=s(l,10),r=c(r,n=c(n,i,o,l,r,t[15],2400959708,6),i,o=s(o,10),l,t[14],2400959708,8),n,i=s(i,10),o,t[5],2400959708,6),n=h(n=s(n,10),i=c(i,o=c(o,l,r,n,i,t[6],2400959708,5),l,r=s(r,10),n,t[2],2400959708,12),o,l=s(l,10),r,t[4],2840853838,9),o=h(o=s(o,10),l=h(l,r=h(r,n,i,o,l,t[0],2840853838,15),n,i=s(i,10),o,t[5],2840853838,5),r,n=s(n,10),i,t[9],2840853838,11),r=h(r=s(r,10),n=h(n,i=h(i,o,l,r,n,t[7],2840853838,6),o,l=s(l,10),r,t[12],2840853838,8),i,o=s(o,10),l,t[2],2840853838,13),i=h(i=s(i,10),o=h(o,l=h(l,r,n,i,o,t[10],2840853838,12),r,n=s(n,10),i,t[14],2840853838,5),l,r=s(r,10),n,t[1],2840853838,12),l=h(l=s(l,10),r=h(r,n=h(n,i,o,l,r,t[3],2840853838,13),i,o=s(o,10),l,t[8],2840853838,14),n,i=s(i,10),o,t[11],2840853838,11),n=h(n=s(n,10),i=h(i,o=h(o,l,r,n,i,t[6],2840853838,8),l,r=s(r,10),n,t[15],2840853838,5),o,l=s(l,10),r,t[13],2840853838,6),o=s(o,10);var p=this._a,d=this._b,v=this._c,y=this._d,g=this._e;g=h(g,p=h(p,d,v,y,g,t[5],1352829926,8),d,v=s(v,10),y,t[14],1352829926,9),d=h(d=s(d,10),v=h(v,y=h(y,g,p,d,v,t[7],1352829926,9),g,p=s(p,10),d,t[0],1352829926,11),y,g=s(g,10),p,t[9],1352829926,13),y=h(y=s(y,10),g=h(g,p=h(p,d,v,y,g,t[2],1352829926,15),d,v=s(v,10),y,t[11],1352829926,15),p,d=s(d,10),v,t[4],1352829926,5),p=h(p=s(p,10),d=h(d,v=h(v,y,g,p,d,t[13],1352829926,7),y,g=s(g,10),p,t[6],1352829926,7),v,y=s(y,10),g,t[15],1352829926,8),v=h(v=s(v,10),y=h(y,g=h(g,p,d,v,y,t[8],1352829926,11),p,d=s(d,10),v,t[1],1352829926,14),g,p=s(p,10),d,t[10],1352829926,14),g=c(g=s(g,10),p=h(p,d=h(d,v,y,g,p,t[3],1352829926,12),v,y=s(y,10),g,t[12],1352829926,6),d,v=s(v,10),y,t[6],1548603684,9),d=c(d=s(d,10),v=c(v,y=c(y,g,p,d,v,t[11],1548603684,13),g,p=s(p,10),d,t[3],1548603684,15),y,g=s(g,10),p,t[7],1548603684,7),y=c(y=s(y,10),g=c(g,p=c(p,d,v,y,g,t[0],1548603684,12),d,v=s(v,10),y,t[13],1548603684,8),p,d=s(d,10),v,t[5],1548603684,9),p=c(p=s(p,10),d=c(d,v=c(v,y,g,p,d,t[10],1548603684,11),y,g=s(g,10),p,t[14],1548603684,7),v,y=s(y,10),g,t[15],1548603684,7),v=c(v=s(v,10),y=c(y,g=c(g,p,d,v,y,t[8],1548603684,12),p,d=s(d,10),v,t[12],1548603684,7),g,p=s(p,10),d,t[4],1548603684,6),g=c(g=s(g,10),p=c(p,d=c(d,v,y,g,p,t[9],1548603684,15),v,y=s(y,10),g,t[1],1548603684,13),d,v=s(v,10),y,t[2],1548603684,11),d=f(d=s(d,10),v=f(v,y=f(y,g,p,d,v,t[15],1836072691,9),g,p=s(p,10),d,t[5],1836072691,7),y,g=s(g,10),p,t[1],1836072691,15),y=f(y=s(y,10),g=f(g,p=f(p,d,v,y,g,t[3],1836072691,11),d,v=s(v,10),y,t[7],1836072691,8),p,d=s(d,10),v,t[14],1836072691,6),p=f(p=s(p,10),d=f(d,v=f(v,y,g,p,d,t[6],1836072691,6),y,g=s(g,10),p,t[9],1836072691,14),v,y=s(y,10),g,t[11],1836072691,12),v=f(v=s(v,10),y=f(y,g=f(g,p,d,v,y,t[8],1836072691,13),p,d=s(d,10),v,t[12],1836072691,5),g,p=s(p,10),d,t[2],1836072691,14),g=f(g=s(g,10),p=f(p,d=f(d,v,y,g,p,t[10],1836072691,13),v,y=s(y,10),g,t[0],1836072691,13),d,v=s(v,10),y,t[4],1836072691,7),d=u(d=s(d,10),v=u(v,y=f(y,g,p,d,v,t[13],1836072691,5),g,p=s(p,10),d,t[8],2053994217,15),y,g=s(g,10),p,t[6],2053994217,5),y=u(y=s(y,10),g=u(g,p=u(p,d,v,y,g,t[4],2053994217,8),d,v=s(v,10),y,t[1],2053994217,11),p,d=s(d,10),v,t[3],2053994217,14),p=u(p=s(p,10),d=u(d,v=u(v,y,g,p,d,t[11],2053994217,14),y,g=s(g,10),p,t[15],2053994217,6),v,y=s(y,10),g,t[0],2053994217,14),v=u(v=s(v,10),y=u(y,g=u(g,p,d,v,y,t[5],2053994217,6),p,d=s(d,10),v,t[12],2053994217,9),g,p=s(p,10),d,t[2],2053994217,12),g=u(g=s(g,10),p=u(p,d=u(d,v,y,g,p,t[13],2053994217,9),v,y=s(y,10),g,t[9],2053994217,12),d,v=s(v,10),y,t[7],2053994217,5),d=a(d=s(d,10),v=u(v,y=u(y,g,p,d,v,t[10],2053994217,15),g,p=s(p,10),d,t[14],2053994217,8),y,g=s(g,10),p,t[12],0,8),y=a(y=s(y,10),g=a(g,p=a(p,d,v,y,g,t[15],0,5),d,v=s(v,10),y,t[10],0,12),p,d=s(d,10),v,t[4],0,9),p=a(p=s(p,10),d=a(d,v=a(v,y,g,p,d,t[1],0,12),y,g=s(g,10),p,t[5],0,5),v,y=s(y,10),g,t[8],0,14),v=a(v=s(v,10),y=a(y,g=a(g,p,d,v,y,t[7],0,6),p,d=s(d,10),v,t[6],0,8),g,p=s(p,10),d,t[2],0,13),g=a(g=s(g,10),p=a(p,d=a(d,v,y,g,p,t[13],0,6),v,y=s(y,10),g,t[14],0,5),d,v=s(v,10),y,t[0],0,15),d=a(d=s(d,10),v=a(v,y=a(y,g,p,d,v,t[3],0,13),g,p=s(p,10),d,t[9],0,11),y,g=s(g,10),p,t[11],0,11),y=s(y,10);var m=this._b+i+y|0;this._b=this._c+o+g|0,this._c=this._d+l+p|0,this._d=this._e+r+d|0,this._e=this._a+n+v|0,this._a=m},o.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(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=o}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(192).Transform;function i(t){n.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(187)(i,n),i.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)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.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)>0&&(this._length[s]-=4294967296*a);return this},i.prototype._update=function(t){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();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(e,r(177).Buffer)},function(t,e,r){t.exports=i;var n=r(2).EventEmitter;function i(){n.call(this)}r(187)(i,n),i.Readable=r(193),i.Writable=r(210),i.Duplex=r(211),i.Transform=r(212),i.PassThrough=r(213),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(194)).Stream=e,e.Readable=e,e.Writable=r(205),e.Duplex=r(204),e.Transform=r(208),e.PassThrough=r(209)},function(t,e,r){(function(e,n){"use strict";var i=r(195);t.exports=_;var o,s=r(180);_.ReadableState=m;r(2).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(196),f=r(197).Buffer,c=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h=Object.create(r(199));h.inherits=r(187);var l=r(200),p=void 0;p=l&&l.debuglog?l.debuglog("stream"):function(){};var d,v=r(201),y=r(203);h.inherits(_,u);var g=["error","close","destroy","pause","resume"];function m(t,e){t=t||{};var n=e instanceof(o=o||r(204));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,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&&(d||(d=r(207).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function _(t){if(o=o||r(204),!(this instanceof _))return new _(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function b(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;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,S(t)}(t,s)):(i||(o=function(t,e){var r;(function(t){return f.isBuffer(t)||t instanceof c})(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(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?w(t,s,e,!1):k(t,s)):w(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(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&&S(t)),k(t,e)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),_.prototype.destroy=y.destroy,_.prototype._undestroy=y.undestroy,_.prototype._destroy=function(t,e){this.push(null),e(t)},_.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),b(this,t,e,!1,r)},_.prototype.unshift=function(t){return b(this,t,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){return d||(d=r(207).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var E=8388608;function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),B(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(A,t,e))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function j(t){p("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(p("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(p("flow",e.flowing);e.flowing&&null!==t.read(););}function I(t,e){return 0===e.length?null:(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=function(t,e,r){var n;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?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++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}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){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}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}_.prototype.read=function(t){p("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 p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):S(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:_;function f(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",g),t.removeListener("finish",m),t.removeListener("drain",h),t.removeListener("error",y),t.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",_),r.removeListener("data",v),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",f);var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",h);var l=!1;var d=!1;function v(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!l&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),r.pause())}function y(e){p("onerror",e),_(),t.removeListener("error",y),0===a(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",m),_()}function m(){p("onfinish"),t.removeListener("close",g),_()}function _(){p("unpipe"),r.unpipe(t)}return r.on("data",v),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",g),t.once("finish",m),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},_.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,{hasUnpiped:!1});return this}var s=P(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},_.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&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&&S(this):i.nextTick(j,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(O,t,e))}(this,t)),this},_.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=I}).call(e,function(){return this}(),r(5))},function(t,e,r){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,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)})}}}:t.exports=e}).call(e,r(5))},function(t,e,r){t.exports=r(2).EventEmitter},function(t,e,r){var n=r(198),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){(function(t){
|
|
15
15
|
/*!
|
|
16
16
|
* The buffer module from node.js, for the browser.
|
|
17
17
|
*
|
|
18
18
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
19
19
|
* @license MIT
|
|
20
20
|
*/
|
|
21
|
-
"use strict";var r=n(178),i=n(179);e.Buffer=t,e.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError("Invalid typed array length");var n=new Uint8Array(e);return n.__proto__=t.prototype,n}function t(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(t)}return a(t,e,n)}function a(e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?function(e,n,r){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);return i.__proto__=t.prototype,i}(e,n,r):"string"==typeof e?function(e,n){"string"==typeof n&&""!==n||(n="utf8");if(!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(e,n),i=s(r),o=i.write(e,n);o!==r&&(i=i.slice(0,o));return i}(e,n):function(e){if(t.isBuffer(e)){var n=0|l(e.length),r=s(n);return 0===r.length?r:(e.copy(r,0,0,n),r)}if(e){if(D(e)||"length"in e)return"number"!=typeof e.length||U(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(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 c(t){return u(t),s(t<0?0:0|l(t))}function f(t){for(var e=t.length<0?0:0|l(t.length),n=s(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function l(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function h(e,n){if(t.isBuffer(e))return e.length;if(D(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(i)return M(e).length;n=(""+n).toLowerCase(),i=!0}}function p(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function d(e,n,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),U(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:y(e,n,r,i,o);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,r):Uint8Array.prototype.lastIndexOf.call(e,n,r):y(e,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function v(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(U(a))return s;t[n+s]=a}return s}function g(t,e,n,r){return L(M(e,t.length-n),t,n,r)}function m(t,e,n,r){return L(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function b(t,e,n,r){return m(t,e,n,r)}function _(t,e,n,r){return L(N(e),t,n,r)}function w(t,e,n,r){return L(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=T));return n}(r)}e.kMaxLength=o,t.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),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,n){return a(t,e,n)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(t,e,n){return function(t,e,n){return u(t),t<=0?s(t):void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)}(t,e,n)},t.allocUnsafe=function(t){return c(t)},t.allocUnsafeSlow=function(t){return c(t)},t.isBuffer=function(t){return null!=t&&!0===t._isBuffer},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,s=Math.min(r,i);o<s;++o)if(e[o]!==n[o]){r=e[o],i=n[o];break}return r<i?-1:i<r?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,n){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var r;if(void 0===n)for(n=0,r=0;r<e.length;++r)n+=e[r].length;var i=t.allocUnsafe(n),o=0;for(r=0;r<e.length;++r){var s=e[r];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=h,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)p(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)p(this,e,e+3),p(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)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(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):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return x(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.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="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,n,r,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),n<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&n>=r)return 0;if(i>=o)return-1;if(n>=r)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(i>>>=0),a=(r>>>=0)-(n>>>=0),u=Math.min(s,a),c=this.slice(i,o),f=e.slice(n,r),l=0;l<u;++l)if(c[l]!==f[l]){s=c[l],a=f[l];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},t.prototype.indexOf=function(t,e,n){return d(this,t,e,n,!0)},t.prototype.lastIndexOf=function(t,e,n){return d(this,t,e,n,!1)},t.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return g(this,t,e,n);case"ascii":return m(this,t,e,n);case"latin1":case"binary":return b(this,t,e,n);case"base64":return _(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function A(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=F(t[o]);return i}function j(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(e,n,r,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||n<s)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function I(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(t,e,n,r,o){return e=+e,n>>>=0,o||I(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,o){return e=+e,n>>>=0,o||I(t,0,n,8),i.write(t,e,n,r,52,8),n+8}t.prototype.slice=function(e,n){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<e&&(n=e);var i=this.subarray(e,n);return i.__proto__=t.prototype,i},t.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},t.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(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||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(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||O(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||O(t,4,this.length),i.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},t.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},t.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,1,255,0),this[e]=255&t,e+1},t.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||C(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,n){return t=+t,e>>>=0,n||C(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,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},t.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},t.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||C(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,n){return t=+t,e>>>=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),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,n){return R(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},t.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},t.prototype.fill=function(e,n,r,i){if("string"==typeof e){if("string"==typeof n?(i=n,n=0,r=this.length):"string"==typeof r&&(i=r,r=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(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;var s;if(n>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=n;s<r;++s)this[s]=e;else{var a=t.isBuffer(e)?e:new t(e,i),u=a.length;for(s=0;s<r-n;++s)this[s+n]=a[s%u]}return this};var P=/[^+/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function N(t){return r.toByteArray(function(t){if((t=t.trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function L(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function D(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function U(t){return t!=t}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,n(177).Buffer)},function(t,e){},function(t,e,n){"use strict";var r=n(197).Buffer,i=n(202);function o(t,e,n){t.copy(e,n)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);for(var e=r.allocUnsafe(t>>>0),n=this.head,i=0;n;)o(n.data,e,i),i+=n.data.length,n=n.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},200,function(t,e,n){"use strict";var r=n(195);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,t)):r.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,r.nextTick(i,n,t)):r.nextTick(i,n,t):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";var r=n(195),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var o=Object.create(n(199));o.inherits=n(187);var s=n(194),a=n(205);o.inherits(l,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var f=u[c];l.prototype[f]||(l.prototype[f]=a.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.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)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){(function(e,r,i){"use strict";var o=n(195);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=m;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;m.WritableState=g;var c=Object.create(n(199));c.inherits=n(187);var f={deprecate:n(206)},l=n(196),h=n(197).Buffer,p=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,y=n(203);function v(){}function g(t,e){a=a||n(204),t=t||{};var r=e instanceof a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:f,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 l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(T,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),T(t,e))}(t,n,r,e,i);else{var s=E(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),r?u(_,t,n,s,i):_(t,n,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function m(t){if(a=a||n(204),!(d.call(m,this)||this instanceof a))return new m(t);this._writableState=new g(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)),l.call(this)}function b(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),T(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,f=n.encoding,l=n.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,f,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function T(t,e){var n=E(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(m,l),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===m&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,n){var r=this._writableState,i=!1,s=!r.objectMode&&function(t){return h.isBuffer(t)||t instanceof p}(t);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=v),r.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(r,s),i=!1),i}(this,r,t,n))&&(r.pendingcb++,i=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,a,r,i,o);return u}(this,r,s,t,e,n)),i},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},m.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,n){e.ending=!0,T(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,n(5),n(10).setImmediate,function(){return this}())},function(t,e){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(e,function(){return this}())},function(t,e,n){"use strict";var r=n(197).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function f(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";t.exports=o;var r=n(204),i=Object.create(n(199));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush(function(e,n){a(t,e,n)}):a(this,null,null)}function a(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(187),i.inherits(o,r),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},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 n=this;r.prototype._destroy.call(this,t,function(t){e(t),n.emit("close")})}},function(t,e,n){"use strict";t.exports=o;var r=n(208),i=Object.create(n(199));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(187),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(205)},function(t,e,n){t.exports=n(204)},function(t,e,n){t.exports=n(193).Transform},function(t,e,n){t.exports=n(193).PassThrough},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(215),e.sha1=n(217),e.sha224=n(218),e.sha256=n(219),e.sha384=n(220),e.sha512=n(221)},function(t,e,n){(function(e){var r=n(187),i=n(216),o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function f(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(a,i),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=e[l-3]^e[l-8]^e[l-14]^e[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=u(n)+f(p,r,i,s)+a+e[h]+o[p]|0;a=s,s=i,i=c(r),r=n,n=d}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.prototype._hash=function(){var t=new e(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=a}).call(e,n(177).Buffer)},function(t,e,n){(function(e){function n(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}n.prototype.update=function(t,n){"string"==typeof t&&(t=new e(t,n=n||"utf8"));for(var r=this._len+=t.length,i=this._s||0,o=0,s=this._block;i<r;){for(var a=Math.min(t.length,o+this._blockSize-i%this._blockSize)-o,u=0;u<a;u++)s[i%this._blockSize+u]=t[u+o];o+=a,(i+=a)%this._blockSize==0&&this._update(s)}return this._s=i,this},n.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 n=this._update(this._block)||this._hash();return t?n.toString(t):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(187),i=n(216),o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(a,i),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=u(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var p=0;p<80;++p){var d=~~(p/20),y=c(n)+l(d,r,i,s)+a+e[p]+o[d]|0;a=s,s=i,i=f(r),r=n,n=y}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.prototype._hash=function(){var t=new e(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=a}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(187),i=n(219),o=n(216),s=new Array(64);function a(){this.init(),this._w=s,o.call(this,64,56)}r(a,i),a.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},a.prototype._hash=function(){var t=new e(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=a}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(187),i=n(216),o=[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],s=new Array(64);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t,e,n){return n^t&(e^n)}function c(t,e,n){return t&e|n&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}r(a,i),a.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},a.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,d=0|this._f,y=0|this._g,v=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=p(e[g-2])+e[g-7]+h(e[g-15])+e[g-16]|0;for(var m=0;m<64;++m){var b=v+l(a)+u(a,d,y)+o[m]+e[m]|0,_=f(n)+c(n,r,i)|0;v=y,y=d,d=a,a=s+b|0,s=i,i=r,r=n,n=b+_|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=v+this._h|0},a.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=a}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(187),i=n(221),o=n(216),s=new Array(160);function a(){this.init(),this._w=s,o.call(this,128,112)}r(a,i),a.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},a.prototype._hash=function(){var t=new e(48);function n(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return n(this._ah,this._al,0),n(this._bh,this._bl,8),n(this._ch,this._cl,16),n(this._dh,this._dl,24),n(this._eh,this._el,32),n(this._fh,this._fl,40),t},t.exports=a}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(187),i=n(216),o=[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],s=new Array(160);function a(){this.init(),this._w=s,i.call(this,128,112)}function u(t,e,n){return n^t&(e^n)}function c(t,e,n){return t&e|n&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function h(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function d(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0<e>>>0?1:0}r(a,i),a.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},a.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,s=0|this._dh,a=0|this._eh,g=0|this._fh,m=0|this._gh,b=0|this._hh,_=0|this._al,w=0|this._bl,E=0|this._cl,x=0|this._dl,T=0|this._el,S=0|this._fl,k=0|this._gl,A=0|this._hl,j=0;j<32;j+=2)e[j]=t.readInt32BE(4*j),e[j+1]=t.readInt32BE(4*j+4);for(;j<160;j+=2){var O=e[j-30],C=e[j-30+1],I=h(O,C),R=p(C,O),B=d(O=e[j-4],C=e[j-4+1]),P=y(C,O),F=e[j-14],M=e[j-14+1],N=e[j-32],L=e[j-32+1],D=R+M|0,U=I+F+v(D,R)|0;U=(U=U+B+v(D=D+P|0,P)|0)+N+v(D=D+L|0,L)|0,e[j]=U,e[j+1]=D}for(var q=0;q<160;q+=2){U=e[q],D=e[q+1];var V=c(n,r,i),z=c(_,w,E),H=f(n,_),W=f(_,n),X=l(a,T),G=l(T,a),Y=o[q],J=o[q+1],K=u(a,g,m),Z=u(T,S,k),$=A+G|0,Q=b+X+v($,A)|0;Q=(Q=(Q=Q+K+v($=$+Z|0,Z)|0)+Y+v($=$+J|0,J)|0)+U+v($=$+D|0,D)|0;var tt=W+z|0,et=H+V+v(tt,W)|0;b=m,A=k,m=g,k=S,g=a,S=T,a=s+Q+v(T=x+$|0,x)|0,s=i,x=E,i=r,E=w,r=n,w=_,n=Q+et+v(_=$+tt|0,$)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+x|0,this._el=this._el+T|0,this._fl=this._fl+S|0,this._gl=this._gl+k|0,this._hl=this._hl+A|0,this._ah=this._ah+n+v(this._al,_)|0,this._bh=this._bh+r+v(this._bl,w)|0,this._ch=this._ch+i+v(this._cl,E)|0,this._dh=this._dh+s+v(this._dl,x)|0,this._eh=this._eh+a+v(this._el,T)|0,this._fh=this._fh+g+v(this._fl,S)|0,this._gh=this._gh+m+v(this._gl,k)|0,this._hh=this._hh+b+v(this._hl,A)|0},a.prototype._hash=function(){var t=new e(64);function n(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return n(this._ah,this._al,0),n(this._bh,this._bl,8),n(this._ch,this._cl,16),n(this._dh,this._dl,24),n(this._eh,this._el,32),n(this._fh,this._fl,40),n(this._gh,this._gl,48),n(this._hh,this._hl,56),t},t.exports=a}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(192).Transform,i=n(187),o=n(207).StringDecoder;function s(t){r.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}t.exports=s,i(s,r),s.prototype.update=function(t,n,r){"string"==typeof t&&(t=new e(t,n));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},s.prototype._flush=function(t){var e;try{this.push(this._final())}catch(t){e=t}finally{t(e)}},s.prototype._finalOrDigest=function(t){var n=this._final()||new e("");return t&&(n=this._toString(n,t,!0)),n},s.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r}}).call(e,n(177).Buffer)},function(t,e,n){"use strict";var r=n(187),i=n(224),o=n(222),s=n(197).Buffer,a=n(188),u=n(190),c=n(214),f=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var n="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>n)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.length<n&&(e=s.concat([e,f],n));for(var r=this._ipad=s.allocUnsafe(n),i=this._opad=s.allocUnsafe(n),a=0;a<n;a++)r[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:c(t),this._hash.update(r)}r(l,o),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new i(a,e):new l(t,e)}},function(t,e,n){"use strict";var r=n(187),i=n(197).Buffer,o=n(222),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var n=this._ipad=i.allocUnsafe(a),r=this._opad=i.allocUnsafe(a),u=0;u<a;u++)n[u]=54^e[u],r[u]=92^e[u];this._hash=[n]}r(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e,n){var r=n(226);t.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,n){var r=n(197).Buffer;t.exports=function(t){for(var e={},n=t.length,i=t.charAt(0),o=0;o<t.length;o++){var s=t.charAt(o);if(void 0!==e[s])throw new TypeError(s+" is ambiguous");e[s]=o}function a(t){if(0===t.length)return r.allocUnsafe(0);for(var o=[0],s=0;s<t.length;s++){var a=e[t[s]];if(void 0===a)return;for(var u=0,c=a;u<o.length;++u)c+=o[u]*n,o[u]=255&c,c>>=8;for(;c>0;)o.push(255&c),c>>=8}for(var f=0;t[f]===i&&f<t.length-1;++f)o.push(0);return r.from(o.reverse())}return{encode:function(e){if(0===e.length)return"";for(var r=[0],i=0;i<e.length;++i){for(var o=0,s=e[i];o<r.length;++o)s+=r[o]<<8,r[o]=s%n,s=s/n|0;for(;s>0;)r.push(s%n),s=s/n|0}for(var a="",u=0;0===e[u]&&u<e.length-1;++u)a+=t[0];for(var c=r.length-1;c>=0;--c)a+=t[r[c]];return a},decodeUnsafe:a,decode:function(t){var e=a(t);if(e)return e;throw new Error("Non-base"+n+" character")}}}},function(t,e,n){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){if(null===p){var t=r.default.randomUint8Array(2);p=parseInt(t[0]<<8|t[1],10)}var e=l.fromNumber(Date.now()),n=++p%65535;return(e=e.shiftLeft(16).or(l.fromNumber(n))).toString()}();return h(t,e,i,n)},e.decrypt=function(t,e,n,r,i){return h(t,e,n,r,i).message},e.simpleDecoder=function(e,n){var r=new t(e,"base64"),i=c.default.sha512(n),s=i.slice(0,32),a=i.slice(32,48),u=o.default.createDecipheriv("aes-256-cbc",s,a),f=t.concat([u.update(r),u.final()]);return new TextDecoder("utf-8",{fatal:!0}).decode(f)},e.simpleEncoder=function(e,n){var r=c.default.sha512(n),i=r.slice(0,32),s=r.slice(32,48),a=new t(e,"utf-8"),u=o.default.createCipheriv("aes-256-cbc",i,s);return t.concat([u.update(a),u.final()]).toString("base64")};var r=f(n(228)),i=f(n(230)),o=f(n(233)),s=f(n(181)),a=f(n(250)),u=f(n(260)),c=f(n(185));function f(t){return t&&t.__esModule?t:{default:t}}var l=i.default.Long;function h(e,n,r,a,u){if(!(e=d(e)))throw new TypeError("private_key is required");if(!(n=y(n)))throw new TypeError("public_key is required");if(!(r=v(r)))throw new TypeError("nonce is required");if(!t.isBuffer(a)){if("string"!=typeof a)throw new TypeError("message should be buffer or string");a=new t(a,"binary")}if(u&&"number"!=typeof u)throw new TypeError("checksum should be a number");var f=e.get_shared_secret(n),l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeUint64(r),l.append(f.toString("binary"),"binary"),l=new t(l.copy(0,l.offset).toBinary(),"binary");var h=c.default.sha512(l),p=h.slice(32,48),m=h.slice(0,32),b=c.default.sha256(h);if(b=b.slice(0,4),b=i.default.fromBinary(b.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),u){if(b!==u)throw new Error("Invalid key");a=function(e,n,r){(0,s.default)(e,"Missing cipher text"),e=g(e);var i=o.default.createDecipheriv("aes-256-cbc",n,r);return e=t.concat([i.update(e),i.final()])}(a,m,p)}else a=function(e,n,r){(0,s.default)(e,"Missing plain text"),e=g(e);var i=o.default.createCipheriv("aes-256-cbc",n,r);return e=t.concat([i.update(e),i.final()])}(a,m,p);return{nonce:r,message:a,checksum:b}}var p=null,d=function(t){return t?t.d?t:u.default.fromWif(t):t},y=function(t){return t?t.Q?t:a.default.fromString(t):t},v=function(t){return t?l.isLong(t)?t:l.fromString(t):t},g=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,n(177).Buffer)},function(t,e,n){var r;(function(i,o){!function(s){"use strict";function a(t,e){if(e=e||{type:"Array"},void 0!==i&&"number"==typeof i.pid)return function(t,e){var r=n(229).randomBytes(t);switch(e.type){case"Array":return[].slice.call(r);case"Buffer":return r;case"Uint8Array":for(var i=new Uint8Array(t),o=0;o<t;++o)i[o]=r.readUInt8(o);return i;default:throw new Error(e.type+" is unsupported.")}}(t,e);if(!(window.crypto||window.msCrypto))throw new Error("Your browser does not support window.crypto.");return function(t,e){var n=new Uint8Array(t);switch((window.crypto||window.msCrypto).getRandomValues(n),e.type){case"Array":return[].slice.call(n);case"Buffer":try{new o(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new o(n);case"Uint8Array":return n;default:throw new Error(e.type+" is unsupported.")}}(t,e)}void 0===(r=function(){return a}.apply(e,[]))||(t.exports=r),a.randomArray=function(t){return a(t,{type:"Array"})},a.randomUint8Array=function(t){return a(t,{type:"Uint8Array"})},a.randomBuffer=function(t){return a(t,{type:"Buffer"})}}()}).call(e,n(5),n(177).Buffer)},200,function(t,e,n){var r,i,o;(function(t){
|
|
21
|
+
"use strict";var n=r(178),i=r(179);e.Buffer=t,e.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)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 f(t)}return a(t,e,r)}function a(e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?function(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;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);return i.__proto__=t.prototype,i}(e,r,n):"string"==typeof e?function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|l(e,r),i=s(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r):function(e){if(t.isBuffer(e)){var r=0|h(e.length),n=s(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(e){if(N(e)||"length"in e)return"number"!=typeof e.length||D(e.length)?s(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.")}(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){return u(t),s(t<0?0:0|h(t))}function c(t){for(var e=t.length<0?0:0|h(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function l(e,r){if(t.isBuffer(e))return e.length;if(N(e)||e instanceof ArrayBuffer)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 M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(i)return M(e).length;r=(""+r).toLowerCase(),i=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),D(n=+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:v(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):v(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;l<u;l++)if(f(t,o+l)!==f(e,l)){h=!1;break}if(h)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(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(D(a))return s;t[r+s]=a}return s}function g(t,e,r,n){return U(M(e,t.length-r),t,r,n)}function m(t,e,r,n){return U(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return m(t,e,r,n)}function b(t,e,r,n){return U(L(e),t,r,n)}function w(t,e,r,n){return U(function(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}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,f=t[i],c=null,h=f>239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}e.kMaxLength=o,t.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),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 a(t,e,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},t.allocUnsafe=function(t){return f(t)},t.allocUnsafeSlow=function(t){return f(t)},t.isBuffer=function(t){return null!=t&&!0===t._isBuffer},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=l,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)p(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)p(this,e,e+3),p(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)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},t.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):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))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return E(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}}.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(this===e)return 0;for(var s=(o>>>=0)-(i>>>=0),a=(n>>>=0)-(r>>>=0),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-1!==this.indexOf(t,e,r)},t.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return d(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 y(this,t,e,r);case"utf8":case"utf-8":return g(this,t,e,r);case"ascii":return m(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(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 S=4096;function x(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 k(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 A(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+=F(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 O(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 B(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 I(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 C(t,e,r,n,o){return e=+e,r>>>=0,o||I(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e=+e,r>>>=0,o||I(t,0,r,8),i.write(t,e,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<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||O(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||O(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||O(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(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||O(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||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||O(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||O(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||O(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||O(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||O(t,4,this.length),i.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(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||B(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||B(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||B(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||B(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);B(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);B(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||B(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||B(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||B(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||B(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||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),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 C(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return R(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;var s;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"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 P=/[^+/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>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=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(t){return n.toByteArray(function(t){if((t=t.trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(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 N(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function D(t){return t!=t}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,r(177).Buffer)},function(t,e){},function(t,e,r){"use strict";var n=r(197).Buffer,i=r(202);function o(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},200,function(t,e,r){"use strict";var n=r(195);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";var n=r(195),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=Object.create(r(199));o.inherits=r(187);var s=r(194),a=r(205);o.inherits(h,s);for(var u=i(a.prototype),f=0;f<u.length;f++){var c=u[f];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){(function(e,n,i){"use strict";var o=r(195);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=m;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;m.WritableState=g;var f=Object.create(r(199));f.inherits=r(187);var c={deprecate:r(206)},h=r(196),l=r(197).Buffer,p=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,v=r(203);function y(){}function g(t,e){a=a||r(204),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))}(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(b,t,r,s,i):b(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function m(t){if(a=a||r(204),!(d.call(m,this)||this instanceof a))return new m(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function _(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 b(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),S(t,e)}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),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,_(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,h=r.callback;if(_(t,e,!1,e.objectMode?1:f.length,f,c,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(T,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}f.inherits(m,h),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===m&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&function(t){return l.isBuffer(t)||t instanceof p}(t);return s&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=y),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(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;u||(e.needDrain=!0);if(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 _(t,e,!1,a,n,i,o);return u}(this,n,s,t,e,r)),i},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},m.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.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&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=v.destroy,m.prototype._undestroy=v.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(5),r(10).setImmediate,function(){return this}())},function(t,e){(function(e){function r(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=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(197).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);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 u(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 f(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 c(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 h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))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=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=o;var n=r(204),i=Object.create(r(199));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(this,null,null)}function a(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(187),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.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;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";t.exports=o;var n=r(208),i=Object.create(r(199));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(187),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(205)},function(t,e,r){t.exports=r(204)},function(t,e,r){t.exports=r(193).Transform},function(t,e,r){t.exports=r(193).PassThrough},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(215),e.sha1=r(217),e.sha224=r(218),e.sha256=r(219),e.sha384=r(220),e.sha512=r(221)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(a,i),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,a=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=u(r)+c(p,n,i,s)+a+e[l]+o[p]|0;a=s,s=i,i=f(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.prototype._hash=function(){var t=new e(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=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){function r(t,r){this._block=new e(t),this._finalSize=r,this._blockSize=t,this._len=0,this._s=0}r.prototype.update=function(t,r){"string"==typeof t&&(t=new e(t,r=r||"utf8"));for(var n=this._len+=t.length,i=this._s||0,o=0,s=this._block;i<n;){for(var a=Math.min(t.length,o+this._blockSize-i%this._blockSize)-o,u=0;u<a;u++)s[i%this._blockSize+u]=t[u+o];o+=a,(i+=a)%this._blockSize==0&&this._update(s)}return this._s=i,this},r.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},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(a,i),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=u(e[l-3]^e[l-8]^e[l-14]^e[l-16]);for(var p=0;p<80;++p){var d=~~(p/20),v=f(r)+h(d,n,i,s)+a+e[p]+o[d]|0;a=s,s=i,i=c(n),n=r,r=v}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.prototype._hash=function(){var t=new e(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=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(219),o=r(216),s=new Array(64);function a(){this.init(),this._w=s,o.call(this,64,56)}n(a,i),a.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},a.prototype._hash=function(){var t=new e(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=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[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],s=new Array(64);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function l(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(a,i),a.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},a.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,d=0|this._f,v=0|this._g,y=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=p(e[g-2])+e[g-7]+l(e[g-15])+e[g-16]|0;for(var m=0;m<64;++m){var _=y+h(a)+u(a,d,v)+o[m]+e[m]|0,b=c(r)+f(r,n,i)|0;y=v,v=d,d=a,a=s+_|0,s=i,i=n,n=r,r=_+b|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=y+this._h|0},a.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(221),o=r(216),s=new Array(160);function a(){this.init(),this._w=s,o.call(this,128,112)}n(a,i),a.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},a.prototype._hash=function(){var t=new e(48);function r(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),t},t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[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],s=new Array(160);function a(){this.init(),this._w=s,i.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function l(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function d(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}n(a,i),a.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},a.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,s=0|this._dh,a=0|this._eh,g=0|this._fh,m=0|this._gh,_=0|this._hh,b=0|this._al,w=0|this._bl,E=0|this._cl,T=0|this._dl,S=0|this._el,x=0|this._fl,k=0|this._gl,A=0|this._hl,j=0;j<32;j+=2)e[j]=t.readInt32BE(4*j),e[j+1]=t.readInt32BE(4*j+4);for(;j<160;j+=2){var O=e[j-30],B=e[j-30+1],I=l(O,B),C=p(B,O),R=d(O=e[j-4],B=e[j-4+1]),P=v(B,O),F=e[j-14],M=e[j-14+1],L=e[j-32],U=e[j-32+1],N=C+M|0,D=I+F+y(N,C)|0;D=(D=D+R+y(N=N+P|0,P)|0)+L+y(N=N+U|0,U)|0,e[j]=D,e[j+1]=N}for(var q=0;q<160;q+=2){D=e[q],N=e[q+1];var z=f(r,n,i),V=f(b,w,E),H=c(r,b),W=c(b,r),Y=h(a,S),G=h(S,a),J=o[q],X=o[q+1],Z=u(a,g,m),K=u(S,x,k),$=A+G|0,Q=_+Y+y($,A)|0;Q=(Q=(Q=Q+Z+y($=$+K|0,K)|0)+J+y($=$+X|0,X)|0)+D+y($=$+N|0,N)|0;var tt=W+V|0,et=H+z+y(tt,W)|0;_=m,A=k,m=g,k=x,g=a,x=S,a=s+Q+y(S=T+$|0,T)|0,s=i,T=E,i=n,E=w,n=r,w=b,r=Q+et+y(b=$+tt|0,$)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+T|0,this._el=this._el+S|0,this._fl=this._fl+x|0,this._gl=this._gl+k|0,this._hl=this._hl+A|0,this._ah=this._ah+r+y(this._al,b)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+i+y(this._cl,E)|0,this._dh=this._dh+s+y(this._dl,T)|0,this._eh=this._eh+a+y(this._el,S)|0,this._fh=this._fh+g+y(this._fl,x)|0,this._gh=this._gh+m+y(this._gl,k)|0,this._hh=this._hh+_+y(this._hl,A)|0},a.prototype._hash=function(){var t=new e(64);function r(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),r(this._gh,this._gl,48),r(this._hh,this._hl,56),t},t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(192).Transform,i=r(187),o=r(207).StringDecoder;function s(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}t.exports=s,i(s,n),s.prototype.update=function(t,r,n){"string"==typeof t&&(t=new e(t,r));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this._final())}catch(t){e=t}finally{t(e)}},s.prototype._finalOrDigest=function(t){var r=this._final()||new e("");return t&&(r=this._toString(r,t,!0)),r},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(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}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";var n=r(187),i=r(224),o=r(222),s=r(197).Buffer,a=r(188),u=r(190),f=r(214),c=s.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:f(t)).update(e).digest():e.length<r&&(e=s.concat([e,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:f(t),this._hash.update(n)}n(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:f(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(a,e):new h(t,e)}},function(t,e,r){"use strict";var n=r(187),i=r(197).Buffer,o=r(222),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e,r){var n=r(226);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){var n=r(197).Buffer;t.exports=function(t){for(var e={},r=t.length,i=t.charAt(0),o=0;o<t.length;o++){var s=t.charAt(o);if(void 0!==e[s])throw new TypeError(s+" is ambiguous");e[s]=o}function a(t){if(0===t.length)return n.allocUnsafe(0);for(var o=[0],s=0;s<t.length;s++){var a=e[t[s]];if(void 0===a)return;for(var u=0,f=a;u<o.length;++u)f+=o[u]*r,o[u]=255&f,f>>=8;for(;f>0;)o.push(255&f),f>>=8}for(var c=0;t[c]===i&&c<t.length-1;++c)o.push(0);return n.from(o.reverse())}return{encode:function(e){if(0===e.length)return"";for(var n=[0],i=0;i<e.length;++i){for(var o=0,s=e[i];o<n.length;++o)s+=n[o]<<8,n[o]=s%r,s=s/r|0;for(;s>0;)n.push(s%r),s=s/r|0}for(var a="",u=0;0===e[u]&&u<e.length-1;++u)a+=t[0];for(var f=n.length-1;f>=0;--f)a+=t[n[f]];return a},decodeUnsafe:a,decode:function(t){var e=a(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}},function(t,e,r){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){if(null===p){var t=n.default.randomUint8Array(2);p=parseInt(t[0]<<8|t[1],10)}var e=h.fromNumber(Date.now()),r=++p%65535;return(e=e.shiftLeft(16).or(h.fromNumber(r))).toString()}();return l(t,e,i,r)},e.decrypt=function(t,e,r,n,i){return l(t,e,r,n,i).message},e.simpleDecoder=function(e,r){var n=new t(e,"base64"),i=f.default.sha512(r),s=i.slice(0,32),a=i.slice(32,48),u=o.default.createDecipheriv("aes-256-cbc",s,a),c=t.concat([u.update(n),u.final()]);return new TextDecoder("utf-8",{fatal:!0}).decode(c)},e.simpleEncoder=function(e,r){var n=f.default.sha512(r),i=n.slice(0,32),s=n.slice(32,48),a=new t(e,"utf-8"),u=o.default.createCipheriv("aes-256-cbc",i,s);return t.concat([u.update(a),u.final()]).toString("base64")};var n=c(r(228)),i=c(r(230)),o=c(r(233)),s=c(r(181)),a=c(r(250)),u=c(r(260)),f=c(r(185));function c(t){return t&&t.__esModule?t:{default:t}}var h=i.default.Long;function l(e,r,n,a,u){if(!(e=d(e)))throw new TypeError("private_key is required");if(!(r=v(r)))throw new TypeError("public_key is required");if(!(n=y(n)))throw new TypeError("nonce is required");if(!t.isBuffer(a)){if("string"!=typeof a)throw new TypeError("message should be buffer or string");a=new t(a,"binary")}if(u&&"number"!=typeof u)throw new TypeError("checksum should be a number");var c=e.get_shared_secret(r),h=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);h.writeUint64(n),h.append(c.toString("binary"),"binary"),h=new t(h.copy(0,h.offset).toBinary(),"binary");var l=f.default.sha512(h),p=l.slice(32,48),m=l.slice(0,32),_=f.default.sha256(l);if(_=_.slice(0,4),_=i.default.fromBinary(_.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),u){if(_!==u)throw new Error("Invalid key");a=function(e,r,n){(0,s.default)(e,"Missing cipher text"),e=g(e);var i=o.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(a,m,p)}else a=function(e,r,n){(0,s.default)(e,"Missing plain text"),e=g(e);var i=o.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(a,m,p);return{nonce:n,message:a,checksum:_}}var p=null,d=function(t){return t?t.d?t:u.default.fromWif(t):t},v=function(t){return t?t.Q?t:a.default.fromString(t):t},y=function(t){return t?h.isLong(t)?t:h.fromString(t):t},g=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,r(177).Buffer)},function(t,e,r){var n;(function(i,o){!function(s){"use strict";function a(t,e){if(e=e||{type:"Array"},void 0!==i&&"number"==typeof i.pid)return function(t,e){var n=r(229).randomBytes(t);switch(e.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(t),o=0;o<t;++o)i[o]=n.readUInt8(o);return i;default:throw new Error(e.type+" is unsupported.")}}(t,e);if(!(window.crypto||window.msCrypto))throw new Error("Your browser does not support window.crypto.");return function(t,e){var r=new Uint8Array(t);switch((window.crypto||window.msCrypto).getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new o(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new o(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}(t,e)}void 0===(n=function(){return a}.apply(e,[]))||(t.exports=n),a.randomArray=function(t){return a(t,{type:"Array"})},a.randomUint8Array=function(t){return a(t,{type:"Uint8Array"})},a.randomBuffer=function(t){return a(t,{type:"Buffer"})}}()}).call(e,r(5),r(177).Buffer)},200,function(t,e,r){var n,i,o;(function(t){
|
|
22
22
|
/**
|
|
23
23
|
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
|
|
24
24
|
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
|
|
25
25
|
* Released under the Apache License, Version 2.0
|
|
26
26
|
* see: https://github.com/dcodeIO/bytebuffer.js for details
|
|
27
27
|
*/
|
|
28
|
-
!function(s,a){n(231).amd?(i=[n(232)],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=n(232)}catch(t){}return a(t)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=a(s.dcodeIO.Long)}(this,function(t){"use strict";var e=function(t,n,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===n&&(n=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");n=!!n,i=!!i}this.buffer=0===t?r:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=n,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var n=e.prototype;n.__isByteBuffer__,Object.defineProperty(n,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var r=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function s(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function a(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)}function u(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?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=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*y}e.accessor=function(){return Uint8Array},e.allocate=function(t,n,r){return new e(t,n,r)},e.concat=function(t,n,r,i){"boolean"!=typeof n&&"string"==typeof n||(i=r,r=n,n=void 0);for(var o,s=0,a=0,u=t.length;a<u;++a)e.isByteBuffer(t[a])||(t[a]=e.wrap(t[a],n)),(o=t[a].limit-t[a].offset)>0&&(s+=o);if(0===s)return new e(0,r,i);var c,f=new e(s,r,i);for(a=0;a<u;)(o=(c=t[a++]).limit-c.offset)<=0||(f.view.set(c.view.subarray(c.offset,c.limit),f.offset),f.offset+=o);return f.limit=f.offset,f.offset=0,f},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,r,i,o){if("string"!=typeof r&&(o=i,i=r,r=void 0),"string"==typeof t)switch(void 0===r&&(r="utf8"),r){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+r)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var s;if(e.isByteBuffer(t))return(s=n.clone.call(t)).markedOffset=-1,s;if(t instanceof Uint8Array)s=new e(0,i,o),t.length>0&&(s.buffer=t.buffer,s.offset=t.byteOffset,s.limit=t.byteOffset+t.byteLength,s.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)s=new e(0,i,o),t.byteLength>0&&(s.buffer=t,s.offset=0,s.limit=t.byteLength,s.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(s=new e(t.length,i,o)).limit=t.length;for(var a=0;a<t.length;++a)s.view[a]=t[a]}return s},n.writeBitSet=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,i=e,o=t.length,s=o>>3,a=0;for(e+=this.writeVarint32(o,e);s--;)r=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(r,e++);if(a<o){var u=0;for(r=0;a<o;)r|=(1&!!t[a++])<<u++;this.writeByte(r,e++)}return n?(this.offset=e,this):e-i},n.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var n,r=this.readVarint32(t),i=r.value,o=i>>3,s=0,a=[];for(t+=r.length;o--;)n=this.readByte(t++),a[s++]=!!(1&n),a[s++]=!!(2&n),a[s++]=!!(4&n),a[s++]=!!(8&n),a[s++]=!!(16&n),a[s++]=!!(32&n),a[s++]=!!(64&n),a[s++]=!!(128&n);if(s<i){var u=0;for(n=this.readByte(t++);s<i;)a[s++]=!!(n>>u++&1)}return e&&(this.offset=t),a},n.readBytes=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var r=this.slice(e,e+t);return n&&(this.offset+=t),r},n.writeBytes=n.append,n.writeInt8=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,n&&(this.offset+=1),this},n.writeByte=n.writeInt8,n.readInt8=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=this.view[t];return 128==(128&n)&&(n=-(255-n+1)),e&&(this.offset+=1),n},n.readByte=n.readInt8,n.writeUint8=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,n&&(this.offset+=1),this},n.writeUInt8=n.writeUint8,n.readUint8=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=this.view[t];return e&&(this.offset+=1),n},n.readUInt8=n.readUint8,n.writeInt16=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r: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),n&&(this.offset+=2),this},n.writeShort=n.writeInt16,n.readInt16=function(t){var e=void 0===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)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t],n|=this.view[t+1]<<8):(n=this.view[t]<<8,n|=this.view[t+1]),32768==(32768&n)&&(n=-(65535-n+1)),e&&(this.offset+=2),n},n.readShort=n.readInt16,n.writeUint16=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r: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),n&&(this.offset+=2),this},n.writeUInt16=n.writeUint16,n.readUint16=function(t){var e=void 0===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)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t],n|=this.view[t+1]<<8):(n=this.view[t]<<8,n|=this.view[t+1]),e&&(this.offset+=2),n},n.readUInt16=n.readUint16,n.writeInt32=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r: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),n&&(this.offset+=4),this},n.writeInt=n.writeInt32,n.readInt32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0):(n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0),n|=0,e&&(this.offset+=4),n},n.readInt=n.readInt32,n.writeUint32=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r: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),n&&(this.offset+=4),this},n.writeUInt32=n.writeUint32,n.readUint32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0):(n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0),e&&(this.offset+=4),n},n.readUInt32=n.readUint32,t&&(n.writeInt64=function(e,n){var r=void 0===n;if(r&&(n=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 n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=s>>>24&255,this.view[n+2]=s>>>16&255,this.view[n+1]=s>>>8&255,this.view[n]=255&s):(this.view[n]=s>>>24&255,this.view[n+1]=s>>>16&255,this.view[n+2]=s>>>8&255,this.view[n+3]=255&s,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},n.writeLong=n.writeInt64,n.readInt64=function(e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=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,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var o=new t(r,i,!1);return n&&(this.offset+=8),o},n.readLong=n.readInt64,n.writeUint64=function(e,n){var r=void 0===n;if(r&&(n=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 n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=s>>>24&255,this.view[n+2]=s>>>16&255,this.view[n+1]=s>>>8&255,this.view[n]=255&s):(this.view[n]=s>>>24&255,this.view[n+1]=s>>>16&255,this.view[n+2]=s>>>8&255,this.view[n+3]=255&s,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},n.writeUInt64=n.writeUint64,n.readUint64=function(e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=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,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var o=new t(r,i,!0);return n&&(this.offset+=8),o},n.readUInt64=n.readUint64),n.writeFloat32=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,u(this.view,t,e,this.littleEndian,23,4),n&&(this.offset+=4),this},n.writeFloat=n.writeFloat32,n.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=a(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),n},n.readFloat=n.readFloat32,n.writeFloat64=function(t,e){var n=void 0===e;if(n&&(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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=8,u(this.view,t,e,this.littleEndian,52,8),n&&(this.offset+=8),this},n.writeDouble=n.writeFloat64,n.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var n=a(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),n},n.readDouble=n.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},n.writeVarint32=function(t,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);n+=o;var s=this.buffer.byteLength;for(n>s&&this.resize((s*=2)>n?s:n),n-=o,t>>>=0;t>=128;)i=127&t|128,this.view[n++]=i,t>>>=7;return this.view[n++]=t,r?(this.offset=n,this):o},n.writeVarint32ZigZag=function(t,n){return this.writeVarint32(e.zigZagEncode32(t),n)},n.readVarint32=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,r=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}n=this.view[t++],r<5&&(i|=(127&n)<<7*r),++r}while(0!=(128&n));return i|=0,e?(this.offset=t,i):{value:i,length:r}},n.readVarint32ZigZag=function(t){var n=this.readVarint32(t);return"object"==typeof n?n.value=e.zigZagDecode32(n.value):n=e.zigZagDecode32(n),n},t&&(e.MAX_VARINT64_BYTES=10,e.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var n=e.toInt()>>>0,r=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==r?n<16384?n<128?1:2:n<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:i<128?9:10},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},n.writeVarint64=function(n,r){var i=void 0===r;if(i&&(r=this.offset),!this.noAssert){if("number"==typeof n)n=t.fromNumber(n);else if("string"==typeof n)n=t.fromString(n);else if(!(n&&n instanceof t))throw TypeError("Illegal value: "+n+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof n?n=t.fromNumber(n,!1):"string"==typeof n?n=t.fromString(n,!1):!1!==n.unsigned&&(n=n.toSigned());var o=e.calculateVarint64(n),s=n.toInt()>>>0,a=n.shiftRightUnsigned(28).toInt()>>>0,u=n.shiftRightUnsigned(56).toInt()>>>0;r+=o;var c=this.buffer.byteLength;switch(r>c&&this.resize((c*=2)>r?c:r),r-=o,o){case 10:this.view[r+9]=u>>>7&1;case 9:this.view[r+8]=9!==o?128|u:127&u;case 8:this.view[r+7]=8!==o?a>>>21|128:a>>>21&127;case 7:this.view[r+6]=7!==o?a>>>14|128:a>>>14&127;case 6:this.view[r+5]=6!==o?a>>>7|128:a>>>7&127;case 5:this.view[r+4]=5!==o?128|a:127&a;case 4:this.view[r+3]=4!==o?s>>>21|128:s>>>21&127;case 3:this.view[r+2]=3!==o?s>>>14|128:s>>>14&127;case 2:this.view[r+1]=2!==o?s>>>7|128:s>>>7&127;case 1:this.view[r]=1!==o?128|s:127&s}return i?(this.offset+=o,this):o},n.writeVarint64ZigZag=function(t,n){return this.writeVarint64(e.zigZagEncode64(t),n)},n.readVarint64=function(e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,i=0,o=0,s=0,a=0;if(i=127&(a=this.view[e++]),128&a&&(i|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&void 0===a)&&(i|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&void 0===a)&&(i|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&void 0===a)&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&void 0===a)&&(s=127&(a=this.view[e++]),(128&a||this.noAssert&&void 0===a)&&(s|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&void 0===a))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return n?(this.offset=e,u):{value:u,length:e-r}},n.readVarint64ZigZag=function(n){var r=this.readVarint64(n);return r&&r.value instanceof t?r.value=e.zigZagDecode64(r.value):r=e.zigZagDecode64(r),r}),n.writeCString=function(t,e){var n=void 0===e;n&&(e=this.offset);var r,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(r=0;r<i;++r)if(0===t.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=f.calculateUTF16asUTF8(o(t))[1],e+=i+1;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=i+1,f.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,n?(this.offset=e,this):i},n.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,r=t,i=-1;return f.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),n=s(),!0),e?(this.offset=t,n()):{string:n(),length:t-r}},n.writeIString=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,i=e;r=f.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+r;var s=this.buffer.byteLength;if(e>s&&this.resize((s*=2)>e?s:e),e-=4+r,this.littleEndian?(this.view[e+3]=r>>>24&255,this.view[e+2]=r>>>16&255,this.view[e+1]=r>>>8&255,this.view[e]=255&r):(this.view[e]=r>>>24&255,this.view[e+1]=r>>>16&255,this.view[e+2]=r>>>8&255,this.view[e+3]=255&r),e+=4,f.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+r)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+r));return n?(this.offset=e,this):e-i},n.readIString=function(t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,n?(this.offset=t,o.string):{string:o.string,length:t-r}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",n.writeUTF8String=function(t,e){var n,r=void 0===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)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;n=f.calculateUTF16asUTF8(o(t))[1],e+=n;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=n,f.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),r?(this.offset=e,this):e-i},n.writeString=n.writeUTF8String,e.calculateUTF8Chars=function(t){return f.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return f.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,n.readUTF8String=function(t,n,r){"number"==typeof n&&(r=n,n=void 0);var i=void 0===r;if(i&&(r=this.offset),void 0===n&&(n=e.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var o,a=0,u=r;if(n===e.METRICS_CHARS){if(o=s(),f.decodeUTF8(function(){return a<t&&r<this.limit?this.view[r++]:null}.bind(this),function(t){++a,f.UTF8toUTF16(t,o)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=r,o()):{string:o(),length:r-u}}if(n===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+t+") <= "+this.buffer.byteLength)}var c=r+t;if(f.decodeUTF8toUTF16(function(){return r<c?this.view[r++]:null}.bind(this),o=s(),this.noAssert),r!==c)throw RangeError("Illegal range: Truncated data, "+r+" == "+c);return i?(this.offset=r,o()):{string:o(),length:r-u}}throw TypeError("Unsupported metrics: "+n)},n.readString=n.readUTF8String,n.writeVString=function(t,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,s,a=n;i=f.calculateUTF16asUTF8(o(t),this.noAssert)[1],s=e.calculateVarint32(i),n+=s+i;var u=this.buffer.byteLength;if(n>u&&this.resize((u*=2)>n?u:n),n-=s+i,n+=this.writeVarint32(i,n),f.encodeUTF16toUTF8(o(t),function(t){this.view[n++]=t}.bind(this)),n!==a+i+s)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+i+s));return r?(this.offset=n,this):n-a},n.readVString=function(t){var n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,n?(this.offset=t,o.string):{string:o.string,length:t-r}},n.append=function(t,n,r){"number"!=typeof n&&"string"==typeof n||(r=n,n=void 0);var i=void 0===r;if(i&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,n));var o=t.limit-t.offset;if(o<=0)return this;r+=o;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=o,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=o,i&&(this.offset+=o),this},n.appendTo=function(t,e){return t.append(this,e),this},n.assert=function(t){return this.noAssert=!t,this},n.capacity=function(){return this.buffer.byteLength},n.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},n.clone=function(t){var n=new e(0,this.littleEndian,this.noAssert);return t?(n.buffer=new ArrayBuffer(this.buffer.byteLength),n.view=new Uint8Array(n.buffer)):(n.buffer=this.buffer,n.view=this.view),n.offset=this.offset,n.markedOffset=this.markedOffset,n.limit=this.limit,n},n.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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 n=e-t;if(0===n)return this.buffer=r,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(n),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=n,this},n.copy=function(t,n){if(void 0===t&&(t=this.offset),void 0===n&&(n=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,t<0||t>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+n+" <= "+this.buffer.byteLength)}if(t===n)return new e(0,this.littleEndian,this.noAssert);var r=n-t,i=new e(r,this.littleEndian,this.noAssert);return i.offset=0,i.limit=r,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,n),i},n.copyTo=function(t,n,r,i){var o,s;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(n=(s=void 0===n)?t.offset:0|n,r=(o=void 0===r)?this.offset:0|r,i=void 0===i?this.limit:0|i,n<0||n>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+n+" <= "+t.buffer.byteLength);if(r<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var a=i-r;return 0===a?t:(t.ensureCapacity(n+a),t.view.set(this.view.subarray(r,i),n),o&&(this.offset+=a),s&&(t.offset+=a),this)},n.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},n.fill=function(t,e,n){var r=void 0===e;if(r&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===n&&(n=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 n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,e<0||e>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+n+" <= "+this.buffer.byteLength)}if(e>=n)return this;for(;e<n;)this.view[e++]=t;return r&&(this.offset=e),this},n.flip=function(){return this.limit=this.offset,this.offset=0,this},n.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},n.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},n.LE=function(t){return this.littleEndian=void 0===t||!!t,this},n.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},n.prepend=function(t,n,r){"number"!=typeof n&&"string"==typeof n||(r=n,n=void 0);var i=void 0===r;if(i&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,n));var o=t.limit-t.offset;if(o<=0)return this;var s=o-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),o),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-o),t.offset=t.limit,i&&(this.offset-=o),this},n.prependTo=function(t,e){return t.prepend(this,e),this},n.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},n.remaining=function(){return this.limit-this.offset},n.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},n.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),n=new Uint8Array(e);n.set(this.view),this.buffer=e,this.view=n}return this},n.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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)},n.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},n.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=this.clone();return n.offset=t,n.limit=e,n},n.toBuffer=function(t){var e=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,e<0||e>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+n+" <= "+this.buffer.byteLength)}if(!t&&0===e&&n===this.buffer.byteLength)return this.buffer;if(e===n)return r;var i=new ArrayBuffer(n-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,n),0),i},n.toArrayBuffer=n.toBuffer,n.toString=function(t,e,n){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(n=e=t="utf8"),t){case"utf8":return this.toUTF8(e,n);case"base64":return this.toBase64(e,n);case"hex":return this.toHex(e,n);case"binary":return this.toBinary(e,n);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],n=[],r=0,i=e.length;r<i;++r)n[e[r]]=r;return t.encode=function(t,n){for(var r,i;null!==(r=t());)n(e[r>>2&63]),i=(3&r)<<4,null!==(r=t())?(n(e[63&((i|=r>>4&15)|r>>4&15)]),i=(15&r)<<2,null!==(r=t())?(n(e[63&(i|r>>6&3)]),n(e[63&r])):(n(e[63&i]),n(61))):(n(e[63&i]),n(61),n(61))},t.decode=function(t,e){var r,i,o;function s(t){throw Error("Illegal character code: "+t)}for(;null!==(r=t());)if(void 0===(i=n[r])&&s(r),null!==(r=t())&&(void 0===(o=n[r])&&s(r),e(i<<2>>>0|(48&o)>>4),null!==(r=t()))){if(void 0===(i=n[r])){if(61===r)break;s(r)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(r=t())){if(void 0===(o=n[r])){if(61===r)break;s(r)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();n.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<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=s()),n()},e.fromBase64=function(t,n){if("string"!=typeof t)throw TypeError("str");var r=new e(t.length/4*3,n),i=0;return c.decode(o(t),function(t){r.view[i++]=t}),r.limit=i,r},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},n.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var n=[],r=[];t<e;)n.push(this.view[t++]),n.length>=1024&&(r.push(String.fromCharCode.apply(String,n)),n=[]);return r.join("")+String.fromCharCode.apply(String,n)},e.fromBinary=function(t,n){if("string"!=typeof t)throw TypeError("str");for(var r,i=0,o=t.length,s=new e(o,n);i<o;){if((r=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+r);s.view[i++]=r}return s.limit=o,s},n.toDebug=function(t){for(var e,n=-1,r=this.buffer.byteLength,i="",o="",s="";n<r;){if(-1!==n&&(i+=(e=this.view[n])<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++n,t&&n>0&&n%16==0&&n!==r){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}n===this.offset&&n===this.limit?i+=n===this.markedOffset?"!":"|":n===this.offset?i+=n===this.markedOffset?"[":"<":n===this.limit?i+=n===this.markedOffset?"]":">":i+=n===this.markedOffset?"'":t||0!==n&&n!==r?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},e.fromDebug=function(t,n,r){for(var i,o,s=t.length,a=new e((s+1)/3|0,n,r),u=0,c=0,f=!1,l=!1,h=!1,p=!1,d=!1;u<s;){switch(i=t.charAt(u++)){case"!":if(!r){if(l||h||p){d=!0;break}l=h=p=!0}a.offset=a.markedOffset=a.limit=c,f=!1;break;case"|":if(!r){if(l||p){d=!0;break}l=p=!0}a.offset=a.limit=c,f=!1;break;case"[":if(!r){if(l||h){d=!0;break}l=h=!0}a.offset=a.markedOffset=c,f=!1;break;case"<":if(!r){if(l){d=!0;break}l=!0}a.offset=c,f=!1;break;case"]":if(!r){if(p||h){d=!0;break}p=h=!0}a.limit=a.markedOffset=c,f=!1;break;case">":if(!r){if(p){d=!0;break}p=!0}a.limit=c,f=!1;break;case"'":if(!r){if(h){d=!0;break}h=!0}a.markedOffset=c,f=!1;break;case" ":f=!1;break;default:if(!r&&f){d=!0;break}if(o=parseInt(i+t.charAt(u++),16),!r&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[c++]=o,f=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!r){if(!l||!p)throw TypeError("Illegal str: Missing offset or limit");if(c<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+c+" < "+s)}return a},n.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===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 n,r=new Array(e-t);t<e;)(n=this.view[t++])<16?r.push("0",n.toString(16)):r.push(n.toString(16));return r.join("")},e.fromHex=function(t,n,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 i,o=t.length,s=new e(o/2|0,n),a=0,u=0;a<o;a+=2){if(i=parseInt(t.substring(a,a+2),16),!r&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=i}return s.limit=u,s};var f=function(){var t={MAX_CODEPOINT:1114111,encodeUTF8:function(t,e){var n=null;for("number"==typeof t&&(n=t,t=function(){return null});null!==n||null!==(n=t());)n<128?e(127&n):n<2048?(e(n>>6&31|192),e(63&n|128)):n<65536?(e(n>>12&15|224),e(n>>6&63|128),e(63&n|128)):(e(n>>18&7|240),e(n>>12&63|128),e(n>>6&63|128),e(63&n|128)),n=null},decodeUTF8:function(t,e){for(var n,r,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!==(n=t());)if(0==(128&n))e(n);else if(192==(224&n))null===(r=t())&&s([n,r]),e((31&n)<<6|63&r);else if(224==(240&n))(null===(r=t())||null===(i=t()))&&s([n,r,i]),e((15&n)<<12|(63&r)<<6|63&i);else{if(240!=(248&n))throw RangeError("Illegal starting byte: "+n);(null===(r=t())||null===(i=t())||null===(o=t()))&&s([n,r,i,o]),e((7&n)<<18|(63&r)<<12|(63&i)<<6|63&o)}},UTF16toUTF8:function(t,e){for(var n,r=null;null!==(n=null!==r?r:t());)n>=55296&&n<=57343&&null!==(r=t())&&r>=56320&&r<=57343?(e(1024*(n-55296)+r-56320+65536),r=null):e(n);null!==r&&e(r)},UTF8toUTF16:function(t,e){var n=null;for("number"==typeof t&&(n=t,t=function(){return null});null!==n||null!==(n=t());)n<=65535?e(n):(e(55296+((n-=65536)>>10)),e(n%1024+56320)),n=null},encodeUTF16toUTF8:function(e,n){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,n)})},decodeUTF8toUTF16:function(e,n){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,n)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,n=0;null!==(e=t());)n+=e<128?1:e<2048?2:e<65536?3:4;return n},calculateUTF16asUTF8:function(e){var n=0,r=0;return t.UTF16toUTF8(e,function(t){++n,r+=t<128?1:t<2048?2:t<65536?3:4}),[n,r]}};return t}();return n.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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{f.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),n=s())}catch(n){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return n()},e.fromUTF8=function(t,n,r){if(!r&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(f.calculateUTF16asUTF8(o(t),!0)[1],n,r),s=0;return f.encodeUTF16toUTF8(o(t),function(t){i.view[s++]=t}),i.limit=s,i},e})}).call(e,n(102)(t))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,n){var r,i,o;(function(t){
|
|
28
|
+
!function(s,a){r(231).amd?(i=[r(232)],void 0===(o="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=r(232)}catch(t){}return a(t)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=a(s.dcodeIO.Long)}(this,function(t){"use strict";var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function s(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function a(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:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)}function u(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,v=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))*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*v}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,s=0,a=0,u=t.length;a<u;++a)e.isByteBuffer(t[a])||(t[a]=e.wrap(t[a],r)),(o=t[a].limit-t[a].offset)>0&&(s+=o);if(0===s)return new e(0,n,i);var f,c=new e(s,n,i);for(a=0;a<u;)(o=(f=t[a++]).limit-f.offset)<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var s;if(e.isByteBuffer(t))return(s=r.clone.call(t)).markedOffset=-1,s;if(t instanceof Uint8Array)s=new e(0,i,o),t.length>0&&(s.buffer=t.buffer,s.offset=t.byteOffset,s.limit=t.byteOffset+t.byteLength,s.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)s=new e(0,i,o),t.byteLength>0&&(s.buffer=t,s.offset=0,s.limit=t.byteLength,s.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(s=new e(t.length,i,o)).limit=t.length;for(var a=0;a<t.length;++a)s.view[a]=t[a]}return s},r.writeBitSet=function(t,e){var r=void 0===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)<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},r.readBitSet=function(t){var e=void 0===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},r.readBytes=function(t,e){var r=void 0===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)<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},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===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)<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},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===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)<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},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===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)<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},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===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)<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},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===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)<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},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===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)<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},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===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)<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},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===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)<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},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===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)<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},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===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)<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},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===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)<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},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===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)<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},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===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)<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},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===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)<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},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===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)<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},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===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)<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},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=a(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=a(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var s=this.buffer.byteLength;for(r>s&&this.resize((s*=2)>r?s:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===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)<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}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.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},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),s=r.toInt()>>>0,a=r.shiftRightUnsigned(28).toInt()>>>0,u=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=o,o){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==o?128|u:127&u;case 8:this.view[n+7]=8!==o?a>>>21|128:a>>>21&127;case 7:this.view[n+6]=7!==o?a>>>14|128:a>>>14&127;case 6:this.view[n+5]=6!==o?a>>>7|128:a>>>7&127;case 5:this.view[n+4]=5!==o?128|a:127&a;case 4:this.view[n+3]=4!==o?s>>>21|128:s>>>21&127;case 3:this.view[n+2]=3!==o?s>>>14|128:s>>>14&127;case 2:this.view[n+1]=2!==o?s>>>7|128:s>>>7&127;case 1:this.view[n]=1!==o?128|s:127&s}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===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)<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(i=127&(a=this.view[e++]),128&a&&(i|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&void 0===a)&&(i|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&void 0===a)&&(i|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&void 0===a)&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&void 0===a)&&(s=127&(a=this.view[e++]),(128&a||this.noAssert&&void 0===a)&&(s|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&void 0===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}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(o(t))[1],e+=i+1;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=i+1,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=s(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var s=this.buffer.byteLength;if(e>s&&this.resize((s*=2)>e?s:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(o(t))[1],e+=r;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=r,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.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)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,a=0,u=n;if(r===e.METRICS_CHARS){if(o=s(),c.decodeUTF8(function(){return a<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++a,c.UTF8toUTF16(t,o)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-u}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(c.decodeUTF8toUTF16(function(){return n<f?this.view[n++]:null}.bind(this),o=s(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,o()):{string:o(),length:n-u}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===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)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,a=r;i=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],s=e.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),c.encodeUTF16toUTF8(o(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},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,s;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(s=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var a=i-n;return 0===a?t:(t.ensureCapacity(r+a),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=a),s&&(t.offset+=a),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===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},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var s=o-n;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,n+=s}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<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},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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)},r.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},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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},r.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 n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),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 f=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())?(r(e[63&((i|=n>>4&15)|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){var n,i,o;function s(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&s(n),null!==(n=t())&&(void 0===(o=r[n])&&s(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;s(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;s(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=s()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return f.decode(o(t),function(t){n.view[i++]=t}),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<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)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,s=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);s.view[i++]=n}return s.limit=o,s},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r<n;){if(-1!==r&&(i+=(e=this.view[r])<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=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},e.fromDebug=function(t,r,n){for(var i,o,s=t.length,a=new e((s+1)/3|0,r,n),u=0,f=0,c=!1,h=!1,l=!1,p=!1,d=!1;u<s;){switch(i=t.charAt(u++)){case"!":if(!n){if(h||l||p){d=!0;break}h=l=p=!0}a.offset=a.markedOffset=a.limit=f,c=!1;break;case"|":if(!n){if(h||p){d=!0;break}h=p=!0}a.offset=a.limit=f,c=!1;break;case"[":if(!n){if(h||l){d=!0;break}h=l=!0}a.offset=a.markedOffset=f,c=!1;break;case"<":if(!n){if(h){d=!0;break}h=!0}a.offset=f,c=!1;break;case"]":if(!n){if(p||l){d=!0;break}p=l=!0}a.limit=a.markedOffset=f,c=!1;break;case">":if(!n){if(p){d=!0;break}p=!0}a.limit=f,c=!1;break;case"'":if(!n){if(l){d=!0;break}l=!0}a.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!n&&c){d=!0;break}if(o=parseInt(i+t.charAt(u++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[f++]=o,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){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},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===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++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){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 i,o=t.length,s=new e(o/2|0,r),a=0,u=0;a<o;a+=2){if(i=parseInt(t.substring(a,a+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=i}return s.limit=u,s};var c=function(){var t={MAX_CODEPOINT:1114111,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},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)}},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)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)},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):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},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]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=s())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(c.calculateUTF16asUTF8(o(t),!0)[1],r,n),s=0;return c.encodeUTF16toUTF8(o(t),function(t){i.view[s++]=t}),i.limit=s,i},e})}).call(e,r(102)(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){
|
|
29
29
|
/**
|
|
30
30
|
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
31
31
|
* Released under the Apache License, Version 2.0
|
|
32
32
|
* see: https://github.com/dcodeIO/long.js for details
|
|
33
33
|
*/
|
|
34
|
-
!function(s,a){n(231).amd?(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=a():(s.dcodeIO=s.dcodeIO||{}).Long=a()}(this,function(){"use strict";function t(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var n={},r={};function i(t,e){var i,o,a;return e?(a=0<=(t>>>=0)&&t<256)&&(o=r[t])?o:(i=s(t,(0|t)<0?-1:0,!0),a&&(r[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(o=n[t])?o:(i=s(t,t<0?-1:0,!1),a&&(n[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?y:d;if(e){if(t<0)return y;if(t>=l)return _}else{if(t<=-h)return w;if(t+1>=h)return b}return t<0?o(-t,e).neg():s(t%f|0,t/f|0,e)}function s(e,n,r){return new t(e,n,r)}t.fromInt=i,t.fromNumber=o,t.fromBits=s;var a=Math.pow;function u(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return u(t.substring(1),e,n).neg();for(var i=o(a(n,8)),s=d,c=0;c<t.length;c+=8){var f=Math.min(8,t.length-c),l=parseInt(t.substring(c,c+f),n);if(f<8){var h=o(a(n,f));s=s.mul(h).add(o(l))}else s=(s=s.mul(i)).add(o(l))}return s.unsigned=e,s}function c(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):s(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=c;var f=4294967296,l=f*f,h=l/2,p=i(1<<24),d=i(0);t.ZERO=d;var y=i(0,!0);t.UZERO=y;var v=i(1);t.ONE=v;var g=i(1,!0);t.UONE=g;var m=i(-1);t.NEG_ONE=m;var b=s(-1,2147483647,!1);t.MAX_VALUE=b;var _=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var w=s(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),n=this.div(e),r=n.mul(e).sub(this);return n.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(a(t,6),this.unsigned),s=this,u="";;){var c=s.div(i),f=(s.sub(c.mul(i)).toInt()>>>0).toString(t);if((s=c).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?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},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=c(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=c(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(v)},E.neg=E.negate,E.add=function(t){e(t)||(t=c(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,a=t.high>>>16,u=65535&t.high,f=t.low>>>16,l=0,h=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,h+=(p+=i+f)>>>16,l+=(h+=r+u)>>>16,l+=n+a,s((p&=65535)<<16|(d&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=c(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=c(t)),t.isZero())return d;if(this.eq(w))return t.isOdd()?w:d;if(t.eq(w))return this.isOdd()?w:d;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(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,u=t.high>>>16,f=65535&t.high,l=t.low>>>16,h=65535&t.low,y=0,v=0,g=0,m=0;return g+=(m+=a*h)>>>16,v+=(g+=i*h)>>>16,g&=65535,v+=(g+=a*l)>>>16,y+=(v+=r*h)>>>16,v&=65535,y+=(v+=i*l)>>>16,v&=65535,y+=(v+=a*f)>>>16,y+=n*h+r*l+i*f+a*u,s((g&=65535)<<16|(m&=65535),(y&=65535)<<16|(v&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=c(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?y:d;var n,r,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return y;if(t.gt(this.shru(1)))return g;i=y}else{if(this.eq(w))return t.eq(v)||t.eq(m)?w:t.eq(w)?v:(n=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?v:m:(r=this.sub(t.mul(n)),i=n.add(r.div(t)));else if(t.eq(w))return this.unsigned?y:d;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();i=d}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:a(2,s-48),f=o(n),l=f.mul(t);l.isNegative()||l.gt(r);)l=(f=o(n-=u,this.unsigned)).mul(t);f.isZero()&&(f=v),i=i.add(f),r=r.sub(l)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=c(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return s(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=c(t)),s(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=c(t)),s(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=c(t)),s(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):s(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):s(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var n=this.high;return t<32?s(this.low>>>t|n<<32-t,n>>>t,this.unsigned):s(32===t?n:n>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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,n(102)(t))},function(t,e,n){var r=n(234);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv;var i=n(249);e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv;var o=n(236);e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,n){(function(t){var r=n(235),i=n(222),o=n(187),s=n(236),a=n(237),u=n(238),c=n(239);function f(e,n,o){if(!(this instanceof f))return new f(e,n,o);i.call(this),this._cache=new l,this._cipher=new r.AES(n),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function l(){if(!(this instanceof l))return new l;this.cache=new t("")}o(f,i),f.prototype._update=function(e){var n,r;this._cache.add(e);for(var i=[];n=this._cache.get();)r=this._mode.encrypt(this,n),i.push(r);return t.concat(i)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if("10101010101010101010101010101010"!==t.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(e){this.cache=t.concat([this.cache,e])},l.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},l.prototype.flush=function(){for(var e=16-this.cache.length,n=new t(e),r=-1;++r<e;)n.writeUInt8(e,r);return t.concat([this.cache,n])};var h={ECB:n(242),CBC:n(243),CFB:n(244),CFB8:n(245),CFB1:n(246),OFB:n(247),CTR:n(248),GCM:n(248)};function p(e,n,r){var i=s[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=new t(r)),"string"==typeof n&&(n=new t(n)),n.length!==i.key/8)throw new TypeError("invalid key length "+n.length);if(r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new u(h[i.mode],n,r):"auth"===i.type?new c(h[i.mode],n,r):new f(h[i.mode],n,r)}e.createCipheriv=p,e.createCipher=function(t,e){var n=s[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=a(e,!1,n.key,n.iv);return p(t,r.key,r.iv)}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){var n=Math.pow(2,32);function r(t){var e;return t>n||t<0?(e=Math.abs(t)%n,t<0?n-e:e):t}function i(t){for(;0<t.length;t++)t[0]=0;return!1}function o(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}o.prototype.init=function(){var t,e,n,r,i,o,s,a,u,c;for(t=function(){var t,n;for(n=[],e=t=0;t<256;e=++t)e<128?n.push(e<<1):n.push(e<<1^283);return n}(),i=0,u=0,e=c=0;c<256;e=++c)n=(n=u^u<<1^u<<2^u<<3^u<<4)>>>8^255&n^99,this.SBOX[i]=n,this.INV_SBOX[n]=i,a=t[s=t[o=t[i]]],r=257*t[n]^16843008*n,this.SUB_MIX[0][i]=r<<24|r>>>8,this.SUB_MIX[1][i]=r<<16|r>>>16,this.SUB_MIX[2][i]=r<<8|r>>>24,this.SUB_MIX[3][i]=r,r=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][n]=r<<24|r>>>8,this.INV_SUB_MIX[1][n]=r<<16|r>>>16,this.INV_SUB_MIX[2][n]=r<<8|r>>>24,this.INV_SUB_MIX[3][n]=r,0===i?i=u=1:(i=o^t[t[t[a^o]]],u^=t[t[u]]);return!0};var s=new o;function a(t){for(var e=t.length/4,n=new Array(e),r=-1;++r<e;)n[r]=t.readUInt32BE(4*r);return n}function u(t){this._key=a(t),this._doReset()}u.blockSize=16,u.prototype.blockSize=u.blockSize,u.keySize=32,u.prototype.keySize=u.keySize,u.prototype._doReset=function(){var t,e,n,r,i,o;for(e=(n=this._key).length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],r=0;r<i;r++)this._keySchedule[r]=r<e?n[r]:(o=this._keySchedule[r-1],r%e==0?(o=o<<8|o>>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=s.RCON[r/e|0]<<24):e>6&&r%e==4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),this._keySchedule[r-e]^o);for(this._invKeySchedule=[],t=0;t<i;t++)r=i-t,o=this._keySchedule[r-(t%4?0:4)],this._invKeySchedule[t]=t<4||r<=4?o:s.INV_SUB_MIX[0][s.SBOX[o>>>24]]^s.INV_SUB_MIX[1][s.SBOX[o>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[o>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&o]];return!0},u.prototype.encryptBlock=function(e){e=a(new t(e));var n=this._doCryptBlock(e,this._keySchedule,s.SUB_MIX,s.SBOX),r=new t(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[1],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[3],12),r},u.prototype.decryptBlock=function(e){var n=[(e=a(new t(e)))[3],e[1]];e[1]=n[0],e[3]=n[1];var r=this._doCryptBlock(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX),i=new t(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},u.prototype._doCryptBlock=function(t,e,n,i){var o,s,a,u,c,f,l,h,p;s=t[0]^e[0],a=t[1]^e[1],u=t[2]^e[2],c=t[3]^e[3],o=4;for(var d=1;d<this._nRounds;d++)f=n[0][s>>>24]^n[1][a>>>16&255]^n[2][u>>>8&255]^n[3][255&c]^e[o++],l=n[0][a>>>24]^n[1][u>>>16&255]^n[2][c>>>8&255]^n[3][255&s]^e[o++],h=n[0][u>>>24]^n[1][c>>>16&255]^n[2][s>>>8&255]^n[3][255&a]^e[o++],p=n[0][c>>>24]^n[1][s>>>16&255]^n[2][a>>>8&255]^n[3][255&u]^e[o++],s=f,a=l,u=h,c=p;return f=(i[s>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&c])^e[o++],l=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[c>>>8&255]<<8|i[255&s])^e[o++],h=(i[u>>>24]<<24|i[c>>>16&255]<<16|i[s>>>8&255]<<8|i[255&a])^e[o++],p=(i[c>>>24]<<24|i[s>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^e[o++],[r(f),r(l),r(h),r(p)]},e.AES=u}).call(e,n(177).Buffer)},function(t,e){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-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},e["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},e["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},e["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},e["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},e["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",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"},e["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},e["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},e["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},function(t,e,n){(function(e){var r=n(188);t.exports=function(t,n,i,o){e.isBuffer(t)||(t=new e(t,"binary"));n&&!e.isBuffer(n)&&(n=new e(n,"binary"));o=o||0;var s,a,u=0,c=0,f=new e(i/=8),l=new e(o),h=0,p=[];for(;;){if(h++>0&&p.push(s),p.push(t),n&&p.push(n),s=r(e.concat(p)),p=[],a=0,i>0)for(;0!==i&&a!==s.length;)f[u++]=s[a],i--,a++;if(o>0&&a!==s.length)for(;0!==o&&a!==s.length;)l[c++]=s[a],o--,a++;if(0===i&&0===o)break}for(a=0;a<s.length;a++)s[a]=0;return{key:f,iv:l}}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(235),i=n(222);function o(t,n,s,a){if(!(this instanceof o))return new o(t,n,s);i.call(this),this._cipher=new r.AES(n),this._prev=new e(s.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,s.copy(this._prev),this._mode=t}n(187)(o,i),t.exports=o,o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var r=n(235),i=n(222),o=n(187),s=n(240),a=n(241);function u(t,n,o,a){if(!(this instanceof u))return new u(t,n,o);i.call(this),this._finID=e.concat([o,new e([0,0,0,1])]),o=e.concat([o,new e([0,0,0,2])]),this._cipher=new r.AES(n),this._prev=new e(o.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,this._alen=0,this._len=0,o.copy(this._prev),this._mode=t;var c=new e(4);c.fill(0),this._ghash=new s(this._cipher.encryptBlock(c)),this._authTag=null,this._called=!1}o(u,i),t.exports=u,u.prototype._update=function(t){if(!this._called&&this._alen){var n=16-this._alen%16;n<16&&((n=new e(n)).fill(0),this._ghash.update(n))}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},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=a(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(function(t,e){var n=0;t.length!==e.length&&n++;var r=Math.min(t.length,e.length),i=-1;for(;++i<r;)n+=t[i]^e[i];return n}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=t;this._cipher.scrub()},u.prototype.getAuthTag=function(){if(!this._decrypt&&e.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},u.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},u.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}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){var n=new e(16);function r(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(t){t=t.map(s);var n=new e(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n}n.fill(0),t.exports=r,r.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},r.prototype._multiply=function(){for(var t,e,n=function(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}(this.h),r=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(r=a(r,n)),e=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,e&&(n[0]=n[0]^225<<24)}this.state=i(r)},r.prototype.update=function(t){var n;for(this.cache=e.concat([this.cache,t]);this.cache.length>=16;)n=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(n)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,n],16)),this.ghash(i([0,t,0,r])),this.state};var o=Math.pow(2,32);function s(t){var e;return t>o||t<0?(e=Math.abs(t)%o,t<0?o-e:e):t}function a(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),o=0;o<r;++o)i[o]=t[o]^n[o];return i}}).call(e,n(177).Buffer)},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,n){var r=n(241);e.encrypt=function(t,e){var n=r(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return r(i,n)}},function(t,e,n){(function(t){var r=n(241);function i(e,n,i){var o=n.length,s=r(n,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,i?n:s]),s}e.encrypt=function(e,n,r){for(var o,s=new t("");n.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=n.length)){s=t.concat([s,i(e,n,r)]);break}o=e._cache.length,s=t.concat([s,i(e,n.slice(0,o),r)]),n=n.slice(o)}return s}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){function n(e,n,r){var i=e._cipher.encryptBlock(e._prev)[0]^n;return e._prev=t.concat([e._prev.slice(1),new t([r?n:i])]),i}e.encrypt=function(e,r,i){for(var o=r.length,s=new t(o),a=-1;++a<o;)s[a]=n(e,r[a],i);return s}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){function n(t,e,n){for(var i,o,s=-1,a=0;++s<8;)i=e&1<<7-s?128:0,a+=(128&(o=t._cipher.encryptBlock(t._prev)[0]^i))>>s%8,t._prev=r(t._prev,n?i:o);return a}function r(e,n){var r=e.length,i=-1,o=new t(e.length);for(e=t.concat([e,new t([n])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}e.encrypt=function(e,r,i){for(var o=r.length,s=new t(o),a=-1;++a<o;)s[a]=n(e,r[a],i);return s}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){var r=n(241);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,n){for(;e._cache.length<n.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),r(n,o)}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){var r=n(241);function i(t){var e=t._cipher.encryptBlock(t._prev);return function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}(t._prev),e}e.encrypt=function(e,n){for(;e._cache.length<n.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),r(n,o)}}).call(e,n(177).Buffer)},function(t,e,n){(function(t){var r=n(235),i=n(222),o=n(187),s=n(236),a=n(238),u=n(239),c=n(237);function f(e,n,o){if(!(this instanceof f))return new f(e,n,o);i.call(this),this._cache=new l,this._last=void 0,this._cipher=new r.AES(n),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function l(){if(!(this instanceof l))return new l;this.cache=new t("")}o(f,i),f.prototype._update=function(e){var n,r;this._cache.add(e);for(var i=[];n=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,n),i.push(r);return t.concat(i)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15],n=-1;for(;++n<e;)if(t[n+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(e){this.cache=t.concat([this.cache,e])},l.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},l.prototype.flush=function(){if(this.cache.length)return this.cache};var h={ECB:n(242),CBC:n(243),CFB:n(244),CFB8:n(245),CFB1:n(246),OFB:n(247),CTR:n(248),GCM:n(248)};function p(e,n,r){var i=s[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=new t(r)),"string"==typeof n&&(n=new t(n)),n.length!==i.key/8)throw new TypeError("invalid key length "+n.length);if(r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new a(h[i.mode],n,r,!0):"auth"===i.type?new u(h[i.mode],n,r,!0):new f(h[i.mode],n,r)}e.createDecipher=function(t,e){var n=s[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(e,!1,n.key,n.iv);return p(t,r.key,r.iv)},e.createDecipheriv=p}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=n(251),o=n(255),s=o.getCurveByName("secp256k1");i=n(251);var a=n(225),u=n(185),c=n(171),f=n(181),l=s.G,h=s.n,p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.Q=e}return r(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),n=o.Point.decodeFrom(s,e);return t.fromPoint(n)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=u.sha512(t);return u.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 n=this.toBuffer(),r=u.ripemd160(n),i=e.concat([n,r.slice(0,4)]);return this.pubdata=a.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix"),n=this.toBuffer(),r=u.sha512(n),i=u.ripemd160(r),o=u.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+a.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),n=u.sha256(t),r=u.ripemd160(n);r=e.concat([new e([56]),r]);var i=u.sha256(r);return i=u.sha256(i),r=e.concat([r,i.slice(0,4)]),a.encode(r)}},{key:"child",value:function(n){f(e.isBuffer(n),"Buffer required: offset"),f.equal(n.length,32,"offset length"),n=e.concat([this.toBuffer(),n]),n=u.sha256(n);var r=i.fromBuffer(n);if(r.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var o=l.multiply(r),a=this.Q.add(o);if(s.isInfinity(a))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(a)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(n){return t.fromBuffer(new e(n,"binary"))}},{key:"fromBuffer",value:function(e){return"000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?new t(null):new t(o.Point.decodeFrom(s,e))}},{key:"fromPoint",value:function(e){return new t(e)}},{key:"fromString",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix");try{return t.fromStringOrThrow(e,n)}catch(t){return null}}},{key:"fromStringOrThrow",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix"),i=n.slice(0,r.length);f.equal(r,i,"Expecting key to begin with "+r+", instead got "+i),n=n.slice(r.length);var o=(n=new e(a.decode(n),"binary")).slice(-4);n=n.slice(0,-4);var s=u.ripemd160(n);return s=s.slice(0,4),f.deepEqual(o,s,"Checksum did not match"),t.fromBuffer(n)}},{key:"fromHex",value:function(n){return t.fromBuffer(new e(n,"hex"))}},{key:"fromStringHex",value:function(n){return t.fromString(new e(n,"hex"))}}]),t}();t.exports=p}).call(e,n(177).Buffer)},function(t,e,n){var r=n(252);n(254),t.exports=r},function(t,e,n){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}var i=r.prototype;i.__bigi=n(253).version,r.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===i.__bigi)},r.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},r.prototype.DB=26,r.prototype.DM=67108863;var o=r.prototype.DV=1<<26;r.prototype.FV=Math.pow(2,52),r.prototype.F1=26,r.prototype.F2=0;var s,a,u="0123456789abcdefghijklmnopqrstuvwxyz",c=new Array;for(s="0".charCodeAt(0),a=0;a<=9;++a)c[s++]=a;for(s="a".charCodeAt(0),a=10;a<36;++a)c[s++]=a;for(s="A".charCodeAt(0),a=10;a<36;++a)c[s++]=a;function f(t){return u.charAt(t)}function l(t,e){var n=c[t.charCodeAt(e)];return null==n?-1:n}function h(t){var e=new r;return e.fromInt(t),e}function p(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function d(t){this.m=t}function y(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 v(t,e){return t&e}function g(t,e){return t|e}function m(t,e){return t^e}function b(t,e){return t&~e}function _(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 w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function E(){}function x(t){return t}function T(t){this.r2=new r,this.q3=new r,r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}d.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},d.prototype.revert=function(t){return t},d.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},d.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},y.prototype.convert=function(t){var e=new r;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},y.prototype.revert=function(t){var e=new r;return t.copyTo(e),this.reduce(e),e},y.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},y.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},y.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+o:this.t=0},i.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==n?255&t[i]:l(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&r.ZERO.subTo(this,this)},i.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},i.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},i.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)e[n]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},i.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},i.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},i.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),o=n.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+n.t]=n.am(0,i[o],e,o,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},i.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},i.divRemTo=function(t,e,n){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=new r);var s=new r,a=this.s,u=t.s,c=this.DB-p(i[i.t-1]);c>0?(i.lShiftTo(c,s),o.lShiftTo(c,n)):(i.copyTo(s),o.copyTo(n));var f=s.t,l=s[f-1];if(0!=l){var h=l*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),d=this.FV/h,y=(1<<this.F1)/h,v=1<<this.F2,g=n.t,m=g-f,b=null==e?new r:e;for(s.dlShiftTo(m,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),r.ONE.dlShiftTo(f,b),b.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--m>=0;){var _=n[--g]==l?this.DM:Math.floor(n[g]*d+(n[g-1]+v)*y);if((n[g]+=s.am(0,_,n,m,0,f))<_)for(s.dlShiftTo(m,b),n.subTo(b,n);n[g]<--_;)n.subTo(b,n)}null!=e&&(n.drShiftTo(f,e),a!=u&&r.ZERO.subTo(e,e)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),a<0&&r.ZERO.subTo(n,n)}}},i.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var n=new r,i=new r,o=e.convert(this),s=p(t)-1;for(o.copyTo(n);--s>=0;)if(e.sqrTo(n,i),(t&1<<s)>0)e.mulTo(i,o,n);else{var a=n;n=i,i=a}return e.revert(n)},i.toString=function(t){var e;if(this.s<0)return"-"+this.negate().toString(t);if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=f(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=f(n));return i?o:"0"},i.negate=function(){var t=new r;return r.ZERO.subTo(this,t),t},i.abs=function(){return this.s<0?this.negate():this},i.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(t){var e=new r;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},i.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new d(e):new y(e),this.exp(t,n)},E.prototype.convert=x,E.prototype.revert=x,E.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},E.prototype.sqrTo=function(t,e){t.squareTo(e)},T.prototype.convert=function(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 r;return t.copyTo(e),this.reduce(e),e},T.prototype.revert=function(t){return t},T.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},T.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},T.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var S=[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],k=(1<<26)/S[S.length-1];i.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=h(n),o=new r,s=new r,a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},i.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),o=!1,s=0,a=0,u=0;u<t.length;++u){var c=l(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+c,++s>=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},i.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},i.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},i.changeBit=function(t,e){var n=r.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},i.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},i.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(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]}},i.multiplyLowerTo=function(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},i.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},i.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},i.millerRabin=function(t){var e=this.subtract(r.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var i=e.shiftRight(n);(t=t+1>>1)>S.length&&(t=S.length);for(var o=new r(null),s=[],a=0;a<t;++a){for(;c=S[Math.floor(Math.random()*S.length)],-1!=s.indexOf(c););s.push(c),o.fromInt(c);var u=o.modPow(i,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<n&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},i.clone=function(){var t=new r;return this.copyTo(t),t},i.intValue=function(){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]},i.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0===i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},i.equals=function(t){return 0==this.compareTo(t)},i.min=function(t){return this.compareTo(t)<0?this:t},i.max=function(t){return this.compareTo(t)>0?this:t},i.and=function(t){var e=new r;return this.bitwiseTo(t,v,e),e},i.or=function(t){var e=new r;return this.bitwiseTo(t,g,e),e},i.xor=function(t){var e=new r;return this.bitwiseTo(t,m,e),e},i.andNot=function(t){var e=new r;return this.bitwiseTo(t,b,e),e},i.not=function(){for(var t=new r,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},i.shiftLeft=function(t){var e=new r;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},i.shiftRight=function(t){var e=new r;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},i.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+_(this[t]);return this.s<0?this.t*this.DB:-1},i.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=w(this[n]^e);return t},i.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},i.setBit=function(t){return this.changeBit(t,g)},i.clearBit=function(t){return this.changeBit(t,b)},i.flipBit=function(t){return this.changeBit(t,m)},i.add=function(t){var e=new r;return this.addTo(t,e),e},i.subtract=function(t){var e=new r;return this.subTo(t,e),e},i.multiply=function(t){var e=new r;return this.multiplyTo(t,e),e},i.divide=function(t){var e=new r;return this.divRemTo(t,e,null),e},i.remainder=function(t){var e=new r;return this.divRemTo(t,null,e),e},i.divideAndRemainder=function(t){var e=new r,n=new r;return this.divRemTo(t,e,n),new Array(e,n)},i.modPow=function(t,e){var n,i,o=t.bitLength(),s=h(1);if(o<=0)return s;n=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new d(e):e.isEven()?new T(e):new y(e);var a=new Array,u=3,c=n-1,f=(1<<n)-1;if(a[1]=i.convert(this),n>1){var l=new r;for(i.sqrTo(a[1],l);u<=f;)a[u]=new r,i.mulTo(l,a[u-2],a[u]),u+=2}var v,g,m=t.t-1,b=!0,_=new r;for(o=p(t[m])-1;m>=0;){for(o>=c?v=t[m]>>o-c&f:(v=(t[m]&(1<<o+1)-1)<<c-o,m>0&&(v|=t[m-1]>>this.DB+o-c)),u=n;0==(1&v);)v>>=1,--u;if((o-=u)<0&&(o+=this.DB,--m),b)a[v].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,_),i.sqrTo(_,s),u-=2;u>0?i.sqrTo(s,_):(g=s,s=_,_=g),i.mulTo(_,a[v],s)}for(;m>=0&&0==(t[m]&1<<o);)i.sqrTo(s,_),g=s,s=_,_=g,--o<0&&(o=this.DB-1,--m)}return i.revert(s)},i.modInverse=function(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");if(this.isEven()&&e||0==t.signum())return r.ZERO;for(var n=t.clone(),i=this.clone(),o=h(1),s=h(0),a=h(0),u=h(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),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);n.compareTo(i)>=0?(n.subTo(i,n),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(n,i),e&&a.subTo(o,a),u.subTo(s,u))}if(0!=i.compareTo(r.ONE))return r.ZERO;for(;u.compareTo(t)>=0;)u.subTo(t,u);for(;u.signum()<0;)u.addTo(t,u);return u},i.pow=function(t){return this.exp(t,new E)},i.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},i.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=S[S.length-1]){for(e=0;e<S.length;++e)if(n[0]==S[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<S.length;){for(var r=S[e],i=e+1;i<S.length&&r<k;)r*=S[i++];for(r=n.modInt(r);e<i;)if(r%S[e++]==0)return!1}return n.millerRabin(t)},i.square=function(){var t=new r;return this.squareTo(t),t},r.ZERO=h(0),r.ONE=h(1),r.valueOf=h,t.exports=r},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,n){(function(t){var e=n(181),r=n(252);r.fromByteArrayUnsigned=function(t){return 128&t[0]?new r([0].concat(t)):new r(t)},r.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},r.fromDERInteger=function(t){return new r(t)},r.prototype.toDERInteger=r.prototype.toByteArray,r.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new r([0].concat(e))}return new r(t)},r.fromHex=function(t){return""===t?r.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new r(t,16))},r.prototype.toBuffer=function(e){for(var n=this.toByteArrayUnsigned(),r=[],i=e-n.length;r.length<i;)r.push(0);return new t(r.concat(n))},r.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,n(177).Buffer)},function(t,e,n){var r=n(256),i=n(257),o=n(258);t.exports={Curve:i,Point:r,getCurveByName:o}},function(t,e,n){(function(e){var r=n(181),i=n(251),o=i.valueOf(3);function s(t,e,n,i){r.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=n,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(s.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(s.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(s.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),s.fromAffine=function(t,e,n){return new s(t,e,n,i.ONE)},s.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},s.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new s(this.curve,this.x,t,this.z)},s.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,n=this.y,r=t.x,i=t.y.multiply(this.z).subtract(n.multiply(t.z)).mod(this.curve.p),a=r.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===a.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=a.square(),c=u.multiply(a),f=e.multiply(u),l=i.square().multiply(this.z),h=l.subtract(f.shiftLeft(1)).multiply(t.z).subtract(c).multiply(a).mod(this.curve.p),p=f.multiply(o).multiply(i).subtract(n.multiply(c)).subtract(l.multiply(i)).multiply(t.z).add(i.multiply(c)).mod(this.curve.p),d=c.multiply(this.z).multiply(t.z).mod(this.curve.p);return new s(this.curve,h,p,d)},s.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,n=e.multiply(this.z).mod(this.curve.p),r=n.multiply(e).mod(this.curve.p),i=this.curve.a,a=t.square().multiply(o);0!==i.signum()&&(a=a.add(this.z.square().multiply(i)));var u=(a=a.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(r)).shiftLeft(1).multiply(n).mod(this.curve.p),c=a.multiply(o).multiply(t).subtract(r.shiftLeft(1)).shiftLeft(2).multiply(r).subtract(a.pow(3)).mod(this.curve.p),f=n.pow(3).shiftLeft(3).mod(this.curve.p);return new s(this.curve,u,c,f)},s.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,n=e.multiply(o),r=this.negate(),i=this,s=n.bitLength()-2;s>0;--s){var a=n.testBit(s),u=e.testBit(s);i=i.twice(),a!==u&&(i=i.add(a?this:r))}return i},s.prototype.multiplyTwo=function(t,e,n){for(var r=Math.max(t.bitLength(),n.bitLength())-1,i=this.curve.infinity,o=this.add(e);r>=0;){var s=t.testBit(r),a=n.testBit(r);i=i.twice(),s?i=a?i.add(o):i.add(this):a&&(i=i.add(e)),--r}return i},s.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new e("00","hex");var n,r=this.affineX,i=this.affineY,o=this.curve.pLength;return t?(n=new e(1+o)).writeUInt8(i.isEven()?2:3,0):((n=new e(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(n,1+o)),r.toBuffer(o).copy(n,1),n},s.decodeFrom=function(t,e){var n,o=e.readUInt8(0),a=4!==o,u=Math.floor((t.p.bitLength()+7)/8),c=i.fromBuffer(e.slice(1,1+u));if(a){r.equal(e.length,u+1,"Invalid sequence length"),r(2===o||3===o,"Invalid sequence tag");var f=3===o;n=t.pointFromX(f,c)}else{r.equal(e.length,1+u+u,"Invalid sequence length");var l=i.fromBuffer(e.slice(1+u));n=s.fromAffine(t,c,l)}return n.compressed=a,n},s.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=s}).call(e,n(177).Buffer)},function(t,e,n){var r=n(181),i=n(251),o=n(256);function s(t,e,n,r,s,a,u){this.p=t,this.a=e,this.b=n,this.G=o.fromAffine(this,r,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}s.prototype.pointFromX=function(t,e){var n=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),r=n;return n.isEven()^!t&&(r=this.p.subtract(r)),o.fromAffine(this,e,r)},s.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},s.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,n=t.affineY,r=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(n.signum()<0||n.compareTo(o)>=0)return!1;var s=n.square().mod(o),a=e.pow(3).add(r.multiply(e)).add(i).mod(o);return s.equals(a)},s.prototype.validate=function(t){r(!this.isInfinity(t),"Point is at infinity"),r(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return r(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=s},function(t,e,n){var r=n(251),i=n(259),o=n(257);t.exports=function(t){var e=i[t];if(!e)return null;var n=new r(e.p,16),s=new r(e.a,16),a=new r(e.b,16),u=new r(e.n,16),c=new r(e.h,16),f=new r(e.Gx,16),l=new r(e.Gy,16);return new o(n,s,a,f,l,u,c)}},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,n){(function(e){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=n(255),o=i.Point,s=i.getCurveByName("secp256k1"),a=n(251),u=n(225),c=n(181),f=n(185),l=n(250),h=(s.G,s.n),p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.d=e}return r(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var n=f.sha256(t);n=(n=f.sha256(n)).slice(0,4);var r=e.concat([t,n]);return u.encode(r)}},{key:"toString",value:function(){return this.toWif()}},{key:"toPublicKeyPoint",value:function(){return s.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){var e=(t=d(t)).toUncompressed().toBuffer(),n=o.fromAffine(s,a.fromBuffer(e.slice(1,33)),a.fromBuffer(e.slice(33,65))),r=this.toBuffer(),i=n.multiply(a.fromBuffer(r)).affineX.toBuffer({size:32});return f.sha512(i)}},{key:"child",value:function(n){n=e.concat([this.toPublicKey().toBuffer(),n]),n=f.sha256(n);var r=a.fromBuffer(n);if(r.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(r);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(n){if(!e.isBuffer(n))throw new Error("Expecting paramter to be a Buffer type");if(32!==n.length&&console.log("WARN: Expecting 32 bytes, instead got "+n.length+", stack trace:",(new Error).stack),0===n.length)throw new Error("Empty buffer");return new t(a.fromBuffer(n))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(f.sha256(e))}},{key:"isWif",value:function(t){try{return this.fromWif(t),!0}catch(t){return!1}}},{key:"fromWif",value:function(n){var r=new e(u.decode(n)),i=r.readUInt8(0);c.equal(128,i,"Expected version 128, instead got "+i);var o=r.slice(0,-4),s=r.slice(-4),a=f.sha256(o);if(a=(a=f.sha256(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(n){return t.fromBuffer(new e(n,"hex"))}}]),t}();t.exports=p;var d=function(t){return null==t?t:t.Q?t:l.fromStringOrThrow(t)}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=n(262),o=n(185),s=n(255).getCurveByName("secp256k1"),a=n(181),u=n(251),c=n(250),f=n(260),l=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.s=n,this.i=r,a.equal(null!=this.r,!0,"Missing parameter"),a.equal(null!=this.s,!0,"Missing parameter"),a.equal(null!=this.i,!0,"Missing parameter")}return r(t,[{key:"toBuffer",value:function(){var t;return(t=new e(65)).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(o.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e,n,r=void 0;return n=u.fromBuffer(t),r=this.i,r-=27,r&=3,e=i.recoverPubKey(s,n,this,r),c.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var n=o.sha256(t);return this.verifyHash(n,e)}},{key:"verifyHash",value:function(t,e){return a.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),i.verify(s,t,{r:this.r,s:this.s},e.Q)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,n){var r;return r=new e(t,"hex"),this.verifyBuffer(r,n)}}],[{key:"fromBuffer",value:function(e){var n;return a.equal(e.length,65,"Invalid signature length"),n=e.readUInt8(0),a.equal(n-27,n-27&7,"Invalid signature parameter"),new t(u.fromBuffer(e.slice(1,33)),u.fromBuffer(e.slice(33)),n)}},{key:"signBuffer",value:function(e,n){var r=o.sha256(e);return t.signBufferSha256(r,n)}},{key:"signBufferSha256",value:function(n,r){if(32!==n.length||!e.isBuffer(n))throw new Error("buf_sha256: 32 byte buffer requred");var o,c,f,l,p,d,y;for(r=h(r),a(r,"private_key required"),l=null,y=0,c=u.fromBuffer(n);;){if(d=(o=(f=i.sign(s,n,r.d,y++)).toDER())[5+(p=o[3])],32===p&&32===d){l=i.calcPubKeyRecoveryParam(s,c,f,r.toPublicKey().Q),l+=4,l+=27;break}y%10==0&&console.log("WARN: "+y+" attempts to find canonical signature")}return new t(f.r,f.s,l)}},{key:"sign",value:function(n,r){return t.signBuffer(new e(n),r)}},{key:"fromHex",value:function(n){return t.fromBuffer(new e(n,"hex"))}},{key:"signHex",value:function(n,r){var i;return i=new e(n,"hex"),t.signBuffer(i,r)}},{key:"verifyData",value:function(t,n,r){var u=new e(t),f=new e(u,"hex"),l=o.sha256(f);a.equal(l.length,32,"A SHA 256 should be 32 bytes long, instead got "+l.length);var h=c.fromString(r);return i.verify(s,l,n,h.Q)}}]),t}(),h=function(t){return t?t.d?t:f.fromWif(t):t};t.exports=l}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";var r=n(181),i=n(185),o=n(263),s=n(251),a=n(264);function u(t,n,a,u,c){o("Buffer",n),o(s,a),c&&(n=i.sha256(e.concat([n,new e(c)]))),r.equal(n.length,32,"Hash must be 256 bit");var f=a.toBuffer(32),l=new e(32),h=new e(32);h.fill(1),l.fill(0),l=i.HmacSHA256(e.concat([h,new e([0]),f,n]),l),h=i.HmacSHA256(h,l),l=i.HmacSHA256(e.concat([h,new e([1]),f,n]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l);for(var p=s.fromBuffer(h);p.signum()<=0||p.compareTo(t.n)>=0||!u(p);)l=i.HmacSHA256(e.concat([h,new e([0])]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l),p=s.fromBuffer(h);return p}function c(t,e,n,r){var i=t.n,o=t.G,s=n.r,a=n.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),c=e.multiply(u).mod(i),f=s.multiply(u).mod(i),l=o.multiplyTwo(c,r,f);return!t.isInfinity(l)&&l.affineX.mod(i).equals(s)}function f(t,e,n,i){r.strictEqual(3&i,i,"Recovery param is more than two bits");var o=t.n,s=t.G,a=n.r,u=n.s;r(a.signum()>0&&a.compareTo(o)<0,"Invalid r value"),r(u.signum()>0&&u.compareTo(o)<0,"Invalid s value");var c=1&i,f=i>>1?a.add(o):a,l=t.pointFromX(c,f),h=l.multiply(o);r(t.isInfinity(h),"nR is not a valid curve point");var p=e.negate().mod(o),d=a.modInverse(o),y=l.multiplyTwo(u,s,p).multiply(d);return t.validate(y),y}t.exports={calcPubKeyRecoveryParam:function(t,e,n,r){for(var i=0;i<4;i++)if(f(t,e,n,i).equals(r))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:u,recoverPubKey:f,sign:function(t,e,n,r){var i,o,c=s.fromBuffer(e),f=t.n,l=t.G,h=(u(t,e,n,function(e){var r=l.multiply(e);return!t.isInfinity(r)&&0!==(i=r.affineX.mod(f)).signum()&&0!==(o=e.modInverse(f).multiply(c.add(n.multiply(i))).mod(f)).signum()},r),f.shiftRight(1));return o.compareTo(h)>0&&(o=f.subtract(o)),new a(i,o)},verify:function(t,e,n,r){return c(t,s.fromBuffer(e),n,r)},verifyRaw:c}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";function n(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}t.exports=function(t,r){switch(t){case"Array":if(Array.isArray(r))return;break;case"Boolean":if("boolean"==typeof r)return;break;case"Buffer":if(e.isBuffer(r))return;break;case"Number":if("number"==typeof r)return;break;case"String":if("string"==typeof r)return;break;default:if(n(r.constructor)===n(t))return}throw new TypeError("Expected "+(n(t)||t)+", got "+r)}}).call(e,n(177).Buffer)},function(t,e,n){(function(e){"use strict";var r=n(181),i=n(263),o=n(251);function s(t,e){i(o,t),i(o,e),this.r=t,this.s=e}s.parseCompact=function(t){r.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;return r.equal(e,7&e,"Invalid signature parameter"),{compressed:!!(4&e),i:e&=3,signature:new s(o.fromBuffer(t.slice(1,33)),o.fromBuffer(t.slice(33)))}},s.fromDER=function(t){r.equal(t.readUInt8(0),48,"Not a DER sequence"),r.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),r.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);r(e>0,"R length is zero");var n=4+e;r.equal(t.readUInt8(n),2,"Expected a DER integer (2)");var i=t.readUInt8(n+1);r(i>0,"S length is zero");var a=t.slice(4,n),u=t.slice(n+2);n+=2+i,e>1&&0===a.readUInt8(0)&&r(128&a.readUInt8(1),"R value excessively padded"),i>1&&0===u.readUInt8(0)&&r(128&u.readUInt8(1),"S value excessively padded"),r.equal(n,t.length,"Invalid DER encoding");var c=o.fromDERInteger(a),f=o.fromDERInteger(u);return r(c.signum()>=0,"R value is negative"),r(f.signum()>=0,"S value is negative"),new s(c,f)},s.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),n=-129&e;return r(n>0&&n<4,"Invalid hashType"),{signature:s.fromDER(t.slice(0,-1)),hashType:e}},s.prototype.toCompact=function(t,n){n&&(t+=4),t+=27;var r=new e(65);return r.writeUInt8(t,0),this.r.toBuffer(32).copy(r,1),this.s.toBuffer(32).copy(r,33),r},s.prototype.toDER=function(){var t=this.r.toDERInteger(),n=this.s.toDERInteger(),r=[];return r.push(2,t.length),(r=r.concat(t)).push(2,n.length),(r=r.concat(n)).unshift(48,r.length),new e(r)},s.prototype.toScriptSignature=function(t){var n=new e(1);return n.writeUInt8(t,0),e.concat([this.toDER(),n])},t.exports=s}).call(e,n(177).Buffer)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=function(t){if("string"!=typeof t)throw new Error("string required for brain_key");return(t=t.trim()).split(/[\t\n\v\f\r ]+/).join(" ")}},function(t,e,n){(function(e){"use strict";var r=n(260),i=n(185),o=n(228),s=0,a=0,u=o.randomBuffer(101);t.exports={addEntropy:function(){a++;for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var c,f=e[Symbol.iterator]();!(r=(c=f.next()).done);r=!0){var l=c.value,h=s++%101;(u[h]+=l)>9007199254740991&&(u[h]=0)}}catch(t){i=!0,o=t}finally{try{!r&&f.return&&f.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 n=Date.now();Date.now()-n<250;)t=i.sha256(t);var r=[];return r.push(t),r.push(o.randomBuffer(32)),i.sha256(e.concat(r))},get_random_key:function(t){return r.fromBuffer(this.random32ByteBuffer(t))},browserEntropy:function(){var t=Array(u).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 n,r=0;r<navigator.mimeTypes.length;r++)t+=(n=navigator.mimeTypes[r]).description+" "+n.type+" "+n.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",a,"events")}catch(e){t+=i.sha256((new Date).toString())}return t+=new e(t).toString("binary")+" "+(new Date).toString()}}}).call(e,n(177).Buffer)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(268)),i=o(n(271));function o(t){return t&&t.__esModule?t:{default:t}}e.default={http:r.default,ws:i.default}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.jsonRpc=d;var i=u(n(269)),o=u(n(168)),s=u(n(270)),a=u(n(171));function u(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(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 l(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 h=(0,o.default)("steem:http"),p=function(t){function e(t){c(this,e);var n=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return n.name="RPCError",n.code=t.code,n.data=t.data,n}return l(e,Error),e}();function d(t,e){var n=e.method,r=e.id,o=e.params,s={id:r,jsonrpc:"2.0",method:n,params:o};return(0,i.default)(t,{body:JSON.stringify(s),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!==r)throw new Error("Invalid response id: "+t.id);if(t.error)throw new p(t.error);return t.result})}var y=function(t){function e(){return c(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,s.default),r(e,[{key:"send",value:function(t,e,n){h("Steem::send",t,e);var r=e.id||this.id++,i=[t,e.method,e.params];d(a.default.get("websocket"),{method:"call",id:r,params:i}).then(function(t){n(null,t)},function(t){n(t)})}}]),e}();e.default=y},function(t,e){(function(n){var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n&&n,i=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==n&&n||{},i={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i.iterable&&(e[Symbol.iterator]=function(){return e}),e}function f(t){this.map={},t instanceof f?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function h(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var e=new FileReader,n=h(e);return e.readAsArrayBuffer(t),n}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i.arrayBuffer&&i.blob&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||s(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,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):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var t=l(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(){if(this._bodyArrayBuffer){var t=l(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=h(e),r=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=r?r[1]:"utf-8";return e.readAsText(t,i),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(t,e){t=a(t),e=u(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},f.prototype.delete=function(t){delete this.map[a(t)]},f.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},f.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},f.prototype.set=function(t,e){this.map[a(t)]=u(e)},f.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},f.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},f.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},f.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},i.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);var v=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function g(t,e){if(!(this instanceof g))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new f(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new f(e.headers)),this.method=function(t){var e=t.toUpperCase();return v.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in r)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function b(t,e){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new f(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},y.call(g.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var _=[301,302,303,307,308];b.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=r.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(t,n){return new Promise(function(o,s){var c=new g(t,n);if(c.signal&&c.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function h(){l.abort()}if(l.onload=function(){var t={statusText:l.statusText,headers:function(t){var e=new f;return t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{e.append(r,i)}catch(t){console.warn("Response "+t.message)}}}),e}(l.getAllResponseHeaders()||"")};0===c.url.indexOf("file://")&&(l.status<200||l.status>599)?t.status=200:t.status=l.status,t.url="responseURL"in l?l.responseURL:t.headers.get("X-Request-URL");var e="response"in l?l.response:l.responseText;setTimeout(function(){o(new b(e,t))},0)},l.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},l.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request timed out"))},0)},l.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},l.open(c.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(c.url),!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&(i.blob?l.responseType="blob":i.arrayBuffer&&(l.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof f||r.Headers&&n.headers instanceof r.Headers)){var p=[];Object.getOwnPropertyNames(n.headers).forEach(function(t){p.push(a(t)),l.setRequestHeader(t,u(n.headers[t]))}),c.headers.forEach(function(t,e){-1===p.indexOf(e)&&l.setRequestHeader(e,t)})}else c.headers.forEach(function(t,e){l.setRequestHeader(e,t)});c.signal&&(c.signal.addEventListener("abort",h),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",h)}),l.send(void 0===c._bodyInit?null:c._bodyInit)})}w.polyfill=!0,r.fetch||(r.fetch=w,r.Headers=f,r.Request=g,r.Response=b),e.Headers=f,e.Request=g,e.Response=b,e.fetch=w,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=r.fetch?r:i;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}).call(e,function(){return this}())},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=s(n(3)),o=s(n(2));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.options=t,n.id=0,n}return function(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)}(e,o.default),r(e,[{key:"setOptions",value:function(t){Object.assign(this.options,t),this.stop()}},{key:"listenTo",value:function(t,e,n){return t.addEventListener?t.addEventListener(e,n):t.on(e,n),function(){t.removeEventListener?t.removeEventListener(e,n):t.removeListener(e,n)}}},{key:"send",value:function(){}},{key:"start",value:function(){}},{key:"stop",value:function(){}}]),e}();e.default=a,i.default.promisifyAll(a.prototype)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=c(n(3)),o=c(n(167)),s=c(n(168)),a=c(n(171)),u=c(n(270));function c(t){return t&&t.__esModule?t:{default:t}}var f=void 0;if(o.default)f=n(272);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");f=window.WebSocket}var l=(0,s.default)("steem:ws"),h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Object.assign({id:0},t)));return n._requests=new Map,n.inFlight=0,n.isOpen=!1,n}return function(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)}(e,u.default),r(e,[{key:"start",value:function(){var t=this;return this.startPromise?this.startPromise:(this.startPromise=new i.default(function(e,n){t.ws=new f(a.default.get("websocket")),t.ws.onerror=function(e){t.startPromise=null,n(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(){l("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,n){var r=this;return l("Steem::send",t,e),this.start().then(function(){var o={};new i.default(function(t,e){o.resolve=function(e){t(e),n(null,e)},o.reject=function(t){e(t),n(t)}});var s={deferral:o,startedAt:Date.now(),message:{id:e.id||r.id++,method:"call",jsonrpc:"2.0",params:[t,e.method,e.params]}};return r.inFlight++,r._requests.set(s.message.id,s),r.ws.send(JSON.stringify(s.message)),o})}},{key:"onError",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.deferral.reject(t)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}this.stop()}},{key:"onClose",value:function(){var t=new Error("Connection was closed"),e=!0,n=!1,r=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.deferral.reject(t)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}this._requests.clear()}},{key:"onMessage",value:function(t){var e=JSON.parse(t.data);if(l("-- Steem.onMessage --\x3e",e.id),!this._requests.has(e.id))throw new Error("Panic: no request in queue for message id "+e.id);var n=this._requests.get(e.id);this._requests.delete(e.id);var r=e.error;if(r){var i=new Error((r.message||"Failed to complete operation")+" (see err.payload for the full error payload)");i.payload=e,n.deferral.reject(i)}else this.emit("track-performance",n.message.method,Date.now()-n.startedAt),n.deferral.resolve(e.result)}}]),e}();e.default=h},200,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";
|
|
35
|
-
/*!
|
|
36
|
-
* Dependencies
|
|
37
|
-
* --------------------------------------------------------------------------*/var r=n(304);function i(t,e,n,i,o,s){"string"==typeof n&&(n=t[n]),t[e]=r.stub(n,i,o&&(s?o.bind(t):o))}function o(t,e){t[e]&&t[e].restore&&t[e].restore()}(t.exports=function(t,e,n,r,s){"function"!=typeof n&&n||(s=r,r=n,n=e,e=t,t=n),before(function(){i(this,t,e,n,r,s)}),after(function(){o(this,t)})}).each=function(t,e,n,r,s){"function"!=typeof n&&n||(s=r,r=n,n=e,e=t,t=n),beforeEach(function(){o(this,t),i(this,t,e,n,r,s)}),afterEach(function(){o(this,t)})}},function(t,e,n){var r,i;(function(t){
|
|
38
|
-
/**
|
|
39
|
-
* Sinon core utilities. For internal use only.
|
|
40
|
-
*
|
|
41
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
42
|
-
* @license BSD
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
45
|
-
*/
|
|
46
|
-
!function(){"use strict";var o,s=void 0!==t&&t.exports&&!0;function a(t,e,n){o=n.exports=t("./sinon/util/core"),t("./sinon/extend"),t("./sinon/walk"),t("./sinon/typeOf"),t("./sinon/times_in_words"),t("./sinon/spy"),t("./sinon/call"),t("./sinon/behavior"),t("./sinon/stub"),t("./sinon/mock"),t("./sinon/collection"),t("./sinon/assert"),t("./sinon/sandbox"),t("./sinon/test"),t("./sinon/test_case"),t("./sinon/match"),t("./sinon/format"),t("./sinon/log_error")}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i):s?(a(n(306),t.exports,t),o=t.exports):o={}}()}).call(e,n(102)(t))},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){var r={"./sinon":304,"./sinon.js":304,"./sinon/assert":307,"./sinon/assert.js":307,"./sinon/behavior":309,"./sinon/behavior.js":309,"./sinon/call":310,"./sinon/call.js":310,"./sinon/collection":311,"./sinon/collection.js":311,"./sinon/extend":312,"./sinon/extend.js":312,"./sinon/format":313,"./sinon/format.js":313,"./sinon/log_error":316,"./sinon/log_error.js":316,"./sinon/match":317,"./sinon/match.js":317,"./sinon/mock":318,"./sinon/mock.js":318,"./sinon/sandbox":319,"./sinon/sandbox.js":319,"./sinon/spy":320,"./sinon/spy.js":320,"./sinon/stub":321,"./sinon/stub.js":321,"./sinon/test":322,"./sinon/test.js":322,"./sinon/test_case":323,"./sinon/test_case.js":323,"./sinon/times_in_words":324,"./sinon/times_in_words.js":324,"./sinon/typeOf":325,"./sinon/typeOf.js":325,"./sinon/util/core":326,"./sinon/util/core.js":326,"./sinon/util/event":328,"./sinon/util/event.js":328,"./sinon/util/fake_server":329,"./sinon/util/fake_server.js":329,"./sinon/util/fake_server_with_clock":330,"./sinon/util/fake_server_with_clock.js":330,"./sinon/util/fake_timers":331,"./sinon/util/fake_timers.js":331,"./sinon/util/fake_xdomain_request":333,"./sinon/util/fake_xdomain_request.js":333,"./sinon/util/fake_xml_http_request":334,"./sinon/util/fake_xml_http_request.js":334,"./sinon/util/timers_ie":335,"./sinon/util/timers_ie.js":335,"./sinon/util/xdr_ie":336,"./sinon/util/xdr_ie.js":336,"./sinon/util/xhr_ie":337,"./sinon/util/xhr_ie.js":337,"./sinon/walk":338,"./sinon/walk.js":338};function i(t){return n(o(t))}function o(t){return r[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=306},function(t,e,n){var r,i;(function(t,o){
|
|
47
|
-
/**
|
|
48
|
-
* Assertions matching the test spy retrieval interface.
|
|
49
|
-
*
|
|
50
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
51
|
-
* @license BSD
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
54
|
-
*/
|
|
55
|
-
!function(t,s){"use strict";var a=Array.prototype.slice;function u(t){var e;function n(){for(var t,r=0,i=arguments.length;r<i;++r)(t=arguments[r])||e.fail("fake is not a spy"),t.proxy&&t.proxy.isSinonProxy?n(t.proxy):("function"!=typeof t&&e.fail(t+" is not a function"),"function"!=typeof t.getCall&&e.fail(t+" is not stubbed"))}function r(t,n){((t=t||s).fail||e.fail).call(t,n)}function i(t,i,o){2===arguments.length&&(o=i,i=t),e[t]=function(s){n(s);var u=a.call(arguments,1);!function(t,n){switch(t){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==n.length&&e.fail(t+" takes 1 argument but was called with "+(n.length+1)+" arguments")}}(t,u);("function"==typeof i?!i(s):"function"==typeof s[i]?!s[i].apply(s,u):!s[i])?r(this,(s.printf||s.proxy.printf).apply(s,[o].concat(u))):e.pass(t)}}function o(t,e){return!t||/^fail/.test(e)?e:t+e.slice(0,1).toUpperCase()+e.slice(1)}return e={failException:"AssertError",fail:function(t){var n=new Error(t);throw n.name=this.failException||e.failException,n},pass:function(){},callOrder:function(){n.apply(null,arguments);var i="",o="";if(t.calledInOrder(arguments))e.pass("callOrder");else{try{i=[].join.call(arguments,", ");for(var s=a.call(arguments),u=s.length;u;)s[--u].called||s.splice(u,1);o=t.orderByFirstCall(s).join(", ")}catch(t){}r(this,"expected "+i+" to be called in order but were called as "+o)}},callCount:function(i,o){if(n(i),i.callCount!==o){var s="expected %n to be called "+t.timesInWords(o)+" but was called %c%C";r(this,i.printf(s))}else e.pass("callCount")},expose:function(t,e){if(!t)throw new TypeError("target is null or undefined");var n=e||{},r=void 0===n.prefix?"assert":n.prefix,i=void 0===n.includeFail||!!n.includeFail;for(var s in this)"expose"===s||!i&&/^(fail)/.test(s)||(t[o(r,s)]=this[s]);return t},match:function(n,i){t.match(i).test(n)?e.pass("match"):r(this,["expected value to match"," expected = "+t.format(i)," actual = "+t.format(n)].join("\n"))}},i("called","expected %n to have been called at least once but was never called"),i("notCalled",function(t){return!t.called},"expected %n to not have been called but was called %c%C"),i("calledOnce","expected %n to be called once but was called %c%C"),i("calledTwice","expected %n to be called twice but was called %c%C"),i("calledThrice","expected %n to be called thrice but was called %c%C"),i("calledOn","expected %n to be called with %1 as this but was called with %t"),i("alwaysCalledOn","expected %n to always be called with %1 as this but was called with %t"),i("calledWithNew","expected %n to be called with new"),i("alwaysCalledWithNew","expected %n to always be called with new"),i("calledWith","expected %n to be called with arguments %*%C"),i("calledWithMatch","expected %n to be called with match %*%C"),i("alwaysCalledWith","expected %n to always be called with arguments %*%C"),i("alwaysCalledWithMatch","expected %n to always be called with match %*%C"),i("calledWithExactly","expected %n to be called with exact arguments %*%C"),i("alwaysCalledWithExactly","expected %n to always be called with exact arguments %*%C"),i("neverCalledWith","expected %n to never be called with arguments %*%C"),i("neverCalledWithMatch","expected %n to never be called with match %*%C"),i("threw","%n did not throw exception%C"),i("alwaysThrew","%n did not always throw exception%C"),t.assert=e,e}var c=void 0!==o&&o.exports&&!0;function f(t,e,n){var r=t("./util/core");t("./match"),t("./format"),n.exports=u(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=f)?r.call(e,n,e,o):r)||(o.exports=i):c?f(n(308),o.exports,o):t&&u(t)}("object"==typeof sinon&&sinon,void 0!==t?t:self)}).call(e,function(){return this}(),n(102)(t))},function(t,e,n){var r={"./assert":307,"./assert.js":307,"./behavior":309,"./behavior.js":309,"./call":310,"./call.js":310,"./collection":311,"./collection.js":311,"./extend":312,"./extend.js":312,"./format":313,"./format.js":313,"./log_error":316,"./log_error.js":316,"./match":317,"./match.js":317,"./mock":318,"./mock.js":318,"./sandbox":319,"./sandbox.js":319,"./spy":320,"./spy.js":320,"./stub":321,"./stub.js":321,"./test":322,"./test.js":322,"./test_case":323,"./test_case.js":323,"./times_in_words":324,"./times_in_words.js":324,"./typeOf":325,"./typeOf.js":325,"./util/core":326,"./util/core.js":326,"./util/event":328,"./util/event.js":328,"./util/fake_server":329,"./util/fake_server.js":329,"./util/fake_server_with_clock":330,"./util/fake_server_with_clock.js":330,"./util/fake_timers":331,"./util/fake_timers.js":331,"./util/fake_xdomain_request":333,"./util/fake_xdomain_request.js":333,"./util/fake_xml_http_request":334,"./util/fake_xml_http_request.js":334,"./util/timers_ie":335,"./util/timers_ie.js":335,"./util/xdr_ie":336,"./util/xdr_ie.js":336,"./util/xhr_ie":337,"./util/xhr_ie.js":337,"./walk":338,"./walk.js":338};function i(t){return n(o(t))}function o(t){return r[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=308},function(t,e,n){var r,i;(function(t,o,s){
|
|
56
|
-
/**
|
|
57
|
-
* Stub behavior
|
|
58
|
-
*
|
|
59
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
60
|
-
* @author Tim Fischbach (mail@timfischbach.de)
|
|
61
|
-
* @license BSD
|
|
62
|
-
*
|
|
63
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
64
|
-
*/
|
|
65
|
-
!function(a){"use strict";var u=Array.prototype.slice,c=Array.prototype.join,f=-1,l=-2,h="object"==typeof t&&"function"==typeof t.nextTick?t.nextTick:"function"==typeof o?o:function(t){setTimeout(t,0)};function p(t,e){return"string"==typeof t?(this.exception=new Error(e||""),this.exception.name=t):this.exception=t||new Error("Error"),this}function d(t){function e(e,n){if("number"==typeof e.callArgAt){var r=function(t,e){var n,r=t.callArgAt;if(r>=0)return e[r];r===f&&(n=e),r===l&&(n=u.call(e).reverse());for(var i=t.callArgProp,o=0,s=n.length;o<s;++o){if(!i&&"function"==typeof n[o])return n[o];if(i&&n[o]&&"function"==typeof n[o][i])return n[o][i]}return null}(e,n);if("function"!=typeof r)throw new TypeError(function(e,n,r){var i;return e.callArgAt<0?(i=e.callArgProp?t.functionName(e.stub)+" expected to yield to '"+e.callArgProp+"', but no object with such a property was passed.":t.functionName(e.stub)+" expected to yield, but no callback was passed.",r.length>0&&(i+=" Received ["+c.call(r,", ")+"]"),i):"argument at index "+e.callArgAt+" is not a function: "+n}(e,r,n));e.callbackAsync?h(function(){r.apply(e.callbackContext,e.callbackArguments)}):r.apply(e.callbackContext,e.callbackArguments)}}var n={create:function(e){var n=t.extend({},t.behavior);return delete n.create,n.stub=e,n},isPresent:function(){return"number"==typeof this.callArgAt||this.exception||"number"==typeof this.returnArgAt||this.returnThis||this.returnValueDefined},invoke:function(t,n){if(e(this,n),this.exception)throw this.exception;return"number"==typeof this.returnArgAt?n[this.returnArgAt]:this.returnThis?t:this.returnValue},onCall:function(t){return this.stub.onCall(t)},onFirstCall:function(){return this.stub.onFirstCall()},onSecondCall:function(){return this.stub.onSecondCall()},onThirdCall:function(){return this.stub.onThirdCall()},withArgs:function(){throw new Error('Defining a stub by invoking "stub.onCall(...).withArgs(...)" is not supported. Use "stub.withArgs(...).onCall(...)" to define sequential behavior for calls with certain arguments.')},callsArg:function(t){if("number"!=typeof t)throw new TypeError("argument index is not number");return this.callArgAt=t,this.callbackArguments=[],this.callbackContext=void 0,this.callArgProp=void 0,this.callbackAsync=!1,this},callsArgOn:function(t,e){if("number"!=typeof t)throw new TypeError("argument index is not number");if("object"!=typeof e)throw new TypeError("argument context is not an object");return this.callArgAt=t,this.callbackArguments=[],this.callbackContext=e,this.callArgProp=void 0,this.callbackAsync=!1,this},callsArgWith:function(t){if("number"!=typeof t)throw new TypeError("argument index is not number");return this.callArgAt=t,this.callbackArguments=u.call(arguments,1),this.callbackContext=void 0,this.callArgProp=void 0,this.callbackAsync=!1,this},callsArgOnWith:function(t,e){if("number"!=typeof t)throw new TypeError("argument index is not number");if("object"!=typeof e)throw new TypeError("argument context is not an object");return this.callArgAt=t,this.callbackArguments=u.call(arguments,2),this.callbackContext=e,this.callArgProp=void 0,this.callbackAsync=!1,this},yields:function(){return this.callArgAt=f,this.callbackArguments=u.call(arguments,0),this.callbackContext=void 0,this.callArgProp=void 0,this.callbackAsync=!1,this},yieldsRight:function(){return this.callArgAt=l,this.callbackArguments=u.call(arguments,0),this.callbackContext=void 0,this.callArgProp=void 0,this.callbackAsync=!1,this},yieldsOn:function(t){if("object"!=typeof t)throw new TypeError("argument context is not an object");return this.callArgAt=f,this.callbackArguments=u.call(arguments,1),this.callbackContext=t,this.callArgProp=void 0,this.callbackAsync=!1,this},yieldsTo:function(t){return this.callArgAt=f,this.callbackArguments=u.call(arguments,1),this.callbackContext=void 0,this.callArgProp=t,this.callbackAsync=!1,this},yieldsToOn:function(t,e){if("object"!=typeof e)throw new TypeError("argument context is not an object");return this.callArgAt=f,this.callbackArguments=u.call(arguments,2),this.callbackContext=e,this.callArgProp=t,this.callbackAsync=!1,this},throws:p,throwsException:p,returns:function(t){return this.returnValue=t,this.returnValueDefined=!0,this.exception=void 0,this},returnsArg:function(t){if("number"!=typeof t)throw new TypeError("argument index is not number");return this.returnArgAt=t,this},returnsThis:function(){return this.returnThis=!0,this}};function r(t){return function(){var e=this[t].apply(this,arguments);return this.callbackAsync=!0,e}}for(var i in n)n.hasOwnProperty(i)&&i.match(/^(callsArg|yields)/)&&!i.match(/Async/)&&(n[i+"Async"]=r(i));return t.behavior=n,n}var y=void 0!==s&&s.exports&&!0;function v(t,e,n){var r=t("./util/core");t("./extend"),n.exports=d(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=v)?r.call(e,n,e,s):r)||(s.exports=i):y?v(n(308),s.exports,s):a&&d(a)}("object"==typeof sinon&&sinon)}).call(e,n(5),n(10).setImmediate,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
66
|
-
/**
|
|
67
|
-
* Spy calls
|
|
68
|
-
*
|
|
69
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
70
|
-
* @author Maximilian Antoni (mail@maxantoni.de)
|
|
71
|
-
* @license BSD
|
|
72
|
-
*
|
|
73
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
74
|
-
* Copyright (c) 2013 Maximilian Antoni
|
|
75
|
-
*/
|
|
76
|
-
!function(o){"use strict";var s=Array.prototype.slice;function a(t){function e(e,n,r){var i=t.functionName(e)+n;throw r.length&&(i+=" Received ["+s.call(r).join(", ")+"]"),new Error(i)}var n={calledOn:function(e){return t.match&&t.match.isMatcher(e)?e.test(this.thisValue):this.thisValue===e},calledWith:function(){var e=arguments.length;if(e>this.args.length)return!1;for(var n=0;n<e;n+=1)if(!t.deepEqual(arguments[n],this.args[n]))return!1;return!0},calledWithMatch:function(){var e=arguments.length;if(e>this.args.length)return!1;for(var n=0;n<e;n+=1){var r=this.args[n],i=arguments[n];if(!t.match||!t.match(i).test(r))return!1}return!0},calledWithExactly:function(){return arguments.length===this.args.length&&this.calledWith.apply(this,arguments)},notCalledWith:function(){return!this.calledWith.apply(this,arguments)},notCalledWithMatch:function(){return!this.calledWithMatch.apply(this,arguments)},returned:function(e){return t.deepEqual(e,this.returnValue)},threw:function(t){return void 0!==t&&this.exception?this.exception===t||this.exception.name===t:!!this.exception},calledWithNew:function(){return this.proxy.prototype&&this.thisValue instanceof this.proxy},calledBefore:function(t){return this.callId<t.callId},calledAfter:function(t){return this.callId>t.callId},callArg:function(t){this.args[t]()},callArgOn:function(t,e){this.args[t].apply(e)},callArgWith:function(t){this.callArgOnWith.apply(this,[t,null].concat(s.call(arguments,1)))},callArgOnWith:function(t,e){var n=s.call(arguments,2);this.args[t].apply(e,n)},yield:function(){this.yieldOn.apply(this,[null].concat(s.call(arguments,0)))},yieldOn:function(t){for(var n=this.args,r=0,i=n.length;r<i;++r)if("function"==typeof n[r])return void n[r].apply(t,s.call(arguments,1));e(this.proxy," cannot yield since no callback was passed.",n)},yieldTo:function(t){this.yieldToOn.apply(this,[t,null].concat(s.call(arguments,1)))},yieldToOn:function(t,n){for(var r=this.args,i=0,o=r.length;i<o;++i)if(r[i]&&"function"==typeof r[i][t])return void r[i][t].apply(n,s.call(arguments,2));e(this.proxy," cannot yield to '"+t+"' since no callback was passed.",r)},getStackFrames:function(){return this.stack&&this.stack.split("\n").slice(3)},toString:function(){var e=this.proxy?this.proxy.toString()+"(":"",n=[];if(!this.args)return":(";for(var r=0,i=this.args.length;r<i;++r)n.push(t.format(this.args[r]));return e=e+n.join(", ")+")",void 0!==this.returnValue&&(e+=" => "+t.format(this.returnValue)),this.exception&&(e+=" !"+this.exception.name,this.exception.message&&(e+="("+this.exception.message+")")),this.stack&&(e+=this.getStackFrames()[0].replace(/^\s*(?:at\s+|@)?/," at ")),e}};function r(e,r,i,o,s,a,u){if("number"!=typeof a)throw new TypeError("Call id is not a number");var c=t.create(n);return c.proxy=e,c.thisValue=r,c.args=i,c.returnValue=o,c.exception=s,c.callId=a,c.stack=u,c}return n.invokeCallback=n.yield,r.toString=n.toString,t.spyCall=r,r}var u=void 0!==t&&t.exports&&!0;function c(t,e,n){var r=t("./util/core");t("./match"),t("./format"),n.exports=a(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=c)?r.call(e,n,e,t):r)||(t.exports=i):u?c(n(308),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
77
|
-
/**
|
|
78
|
-
* Collections of stubs, spies and mocks.
|
|
79
|
-
*
|
|
80
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
81
|
-
* @license BSD
|
|
82
|
-
*
|
|
83
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
84
|
-
*/
|
|
85
|
-
!function(o){"use strict";var s=[].push,a=Object.prototype.hasOwnProperty;function u(t){return t.fakes||(t.fakes=[]),t.fakes}function c(t,e){for(var n=u(t),r=0,i=n.length;r<i;r+=1)"function"==typeof n[r][e]&&n[r][e]()}function f(t){var e={verify:function(){c(this,"verify")},restore:function(){c(this,"restore"),function(t){for(var e=u(t);0<e.length;)e.splice(0,1)}(this)},reset:function(){c(this,"reset")},verifyAndRestore:function(){var t;try{this.verify()}catch(e){t=e}if(this.restore(),t)throw t},add:function(t){return s.call(u(this),t),t},spy:function(){return this.add(t.spy.apply(t,arguments))},stub:function(e,n,r){if(n){var i=e[n];if("function"!=typeof i){if(!a.call(e,n))throw new TypeError("Cannot stub non-existent own property "+n);return e[n]=r,this.add({restore:function(){e[n]=i}})}}if(!n&&e&&"object"==typeof e){var o=t.stub.apply(t,arguments);for(var s in o)"function"==typeof o[s]&&this.add(o[s]);return o}return this.add(t.stub.apply(t,arguments))},mock:function(){return this.add(t.mock.apply(t,arguments))},inject:function(t){var e=this;return t.spy=function(){return e.spy.apply(e,arguments)},t.stub=function(){return e.stub.apply(e,arguments)},t.mock=function(){return e.mock.apply(e,arguments)},t}};return t.collection=e,e}var l=void 0!==t&&t.exports&&!0;function h(t,e,n){var r=t("./util/core");t("./mock"),t("./spy"),t("./stub"),n.exports=f(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=h)?r.call(e,n,e,t):r)||(t.exports=i):l?h(n(308),t.exports,t):o&&f(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){!function(o){"use strict";function s(t){var e=function(){var t={constructor:function(){return"0"},toString:function(){return"1"},valueOf:function(){return"2"},toLocaleString:function(){return"3"},prototype:function(){return"4"},isPrototypeOf:function(){return"5"},propertyIsEnumerable:function(){return"6"},hasOwnProperty:function(){return"7"},length:function(){return"8"},unique:function(){return"9"}},e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]());return"0123456789"!==e.join("")}();return t.extend=function(t){var n,r,i,o=Array.prototype.slice.call(arguments,1);for(r=0;r<o.length;r++){for(i in n=o[r])n.hasOwnProperty(i)&&(t[i]=n[i]);e&&n.hasOwnProperty("toString")&&n.toString!==t.toString&&(t.toString=n.toString)}return t},t.extend}function a(t,e,n){var r=t("./util/core");n.exports=s(r)}var u=void 0!==t&&t.exports&&!0;"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i):u?a(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
86
|
-
/**
|
|
87
|
-
* Format functions
|
|
88
|
-
*
|
|
89
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
90
|
-
* @license BSD
|
|
91
|
-
*
|
|
92
|
-
* Copyright (c) 2010-2014 Christian Johansen
|
|
93
|
-
*/
|
|
94
|
-
!function(o,s){"use strict";function a(e){function r(t){return""+t}var i,o=void 0!==t&&t.exports&&!0;if(o)try{s=n(314)}catch(t){}return i=s?function(){var t=s.configure({quoteStrings:!1,limitChildrenCount:250});return function(){return t.ascii.apply(t,arguments)}}():o?function(){try{var t=n(182)}catch(t){}return t?function(e){return"object"==typeof e&&e.toString===Object.prototype.toString?t.inspect(e):e}:r}():r,e.format=i,e.format}function u(t,e,n){var r=t("./util/core");n.exports=a(r)}var c=void 0!==t&&t.exports&&!0;"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):c?u(n(308),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon,"object"==typeof formatio&&formatio)}).call(e,n(102)(t))},function(t,e,n){var r,i,o;(function(s){(n(305)&&function(s){i=[n(315)],void 0===(o="function"==typeof(r=s)?r.apply(e,i):r)||(t.exports=o)}||"object"==typeof t&&function(e){t.exports=e(n(315))}||function(t){this.formatio=t(this.samsam)})(function(t){"use strict";var e={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},n=(Object.prototype.hasOwnProperty,[]);function r(t){if(!t)return"";if(t.displayName)return t.displayName;if(t.name)return t.name;var e=t.toString().match(/function\s+([^\(]+)/m);return e&&e[1]||""}function i(t,n){var i,o,s=r(n&&n.constructor),a=t.excludeConstructors||e.excludeConstructors||[];for(i=0,o=a.length;i<o;++i){if("string"==typeof a[i]&&a[i]===s)return"";if(a[i].test&&a[i].test(s))return""}return s}function o(t,e){if("object"!=typeof t)return!1;var n,r;for(n=0,r=e.length;n<r;++n)if(e[n]===t)return!0;return!1}function a(e,r,i,s){if("string"==typeof r){var u=e.quoteStrings;return i||("boolean"!=typeof u||u)?'"'+r+'"':r}if("function"==typeof r&&!(r instanceof RegExp))return a.func(r);if(o(r,i=i||[]))return"[Circular]";if("[object Array]"===Object.prototype.toString.call(r))return a.array.call(e,r,i);if(!r)return String(1/r==-1/0?"-0":r);if(t.isElement(r))return a.element(r);if("function"==typeof r.toString&&r.toString!==Object.prototype.toString)return r.toString();var c,f;for(c=0,f=n.length;c<f;c++)if(r===n[c].object)return n[c].value;return a.object.call(e,r,i,s)}function u(t){for(var e in t)this[e]=t[e]}return void 0!==s&&n.push({object:s,value:"[object global]"}),"undefined"!=typeof document&&n.push({object:document,value:"[object HTMLDocument]"}),"undefined"!=typeof window&&n.push({object:window,value:"[object Window]"}),a.func=function(t){return"function "+r(t)+"() {}"},a.array=function(t,e){(e=e||[]).push(t);var n,r,i=[];for(r=this.limitChildrenCount>0?Math.min(this.limitChildrenCount,t.length):t.length,n=0;n<r;++n)i.push(a(this,t[n],e));return r<t.length&&i.push("[... "+(t.length-r)+" more elements]"),"["+i.join(", ")+"]"},a.object=function(e,n,r){(n=n||[]).push(e),r=r||0;var s,u,c,f,l,h,p=[],d=t.keys(e).sort(),y=3;for(h=this.limitChildrenCount>0?Math.min(this.limitChildrenCount,d.length):d.length,f=0;f<h;++f)u=o(c=e[s=d[f]],n)?"[Circular]":a(this,c,n,r+2),y+=(u=(/\s/.test(s)?'"'+s+'"':s)+": "+u).length,p.push(u);var v=i(this,e),g=v?"["+v+"] ":"",m="";for(f=0,l=r;f<l;++f)m+=" ";return h<d.length&&p.push("[... "+(d.length-h)+" more elements]"),y+r>80?g+"{\n "+m+p.join(",\n "+m)+"\n"+m+"}":g+"{ "+p.join(", ")+" }"},a.element=function(t){var e,n,r,i,o,s=t.tagName.toLowerCase(),a=t.attributes,u=[];for(r=0,i=a.length;r<i;++r)n=(e=a.item(r)).nodeName.toLowerCase().replace("html:",""),o=e.nodeValue,"contenteditable"===n&&"inherit"===o||o&&u.push(n+'="'+o+'"');var c="<"+s+(u.length>0?" ":""),f=t.innerHTML;return f.length>20&&(f=f.substr(0,20)+"[...]"),(c+u.join(" ")+">"+f+"</"+s+">").replace(/ contentEditable="inherit"/,"")},u.prototype={functionName:r,configure:function(t){return new u(t)},constructorName:function(t){return i(this,t)},ascii:function(t,e,n){return a(this,t,e,n)}},u.prototype})}).call(e,function(){return this}())},function(t,e,n){var r,i;(n(305)&&function(o){void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)}||"object"==typeof t&&function(e){t.exports=e()}||function(t){this.samsam=t()})(function(){var t,e=Object.prototype,n="undefined"!=typeof document&&document.createElement("div");function r(t){return"number"==typeof t&&t!==t}function i(t){return e.toString.call(t).split(/[ \]]/)[1]}function o(t){if("Arguments"===i(t))return!0;if("object"!=typeof t||"number"!=typeof t.length||"Array"===i(t))return!1;if("function"==typeof t.callee)return!0;try{t[t.length]=6,delete t[t.length]}catch(t){return!0}return!1}function s(t){if(!t||1!==t.nodeType||!n)return!1;try{t.appendChild(n),t.removeChild(n)}catch(t){return!1}return!0}function a(t){var n,r=[];for(n in t)e.hasOwnProperty.call(t,n)&&r.push(n);return r}function u(t){return"function"==typeof t.getTime&&t.getTime()==t.valueOf()}function c(t){return 0===t&&1/t==-1/0}function f(t,e){if(t===e||r(t)&&r(e))return 0!==t||c(t)===c(e)}function l(e,n){if(0===n.length)return!0;var r,i,o,s;for(r=0,i=e.length;r<i;++r)if(t(e[r],n[0])){for(o=0,s=n.length;o<s;++o)if(!t(e[r+o],n[o]))return!1;return!0}return!1}return{isArguments:o,isElement:s,isDate:u,isNegZero:c,identical:f,deepEqual:function(t,n){var c=[],l=[],h=[],p=[],d={};function y(t){return!("object"!=typeof t||null===t||t instanceof Boolean||t instanceof Date||t instanceof Number||t instanceof RegExp||t instanceof String)}function v(t,e){var n;for(n=0;n<t.length;n++)if(t[n]===e)return n;return-1}return function t(n,g,m,b){var _=typeof n,w=typeof g;if(n===g||r(n)||r(g)||null==n||null==g||"object"!==_||"object"!==w)return f(n,g);if(s(n)||s(g))return!1;var E=u(n),x=u(g);if((E||x)&&(!E||!x||n.getTime()!==g.getTime()))return!1;if(n instanceof RegExp&&g instanceof RegExp&&n.toString()!==g.toString())return!1;var T,S,k,A,j,O,C,I,R,B,P,F=i(n),M=i(g),N=a(n),L=a(g);if(o(n)||o(g)){if(n.length!==g.length)return!1}else if(_!==w||F!==M||N.length!==L.length)return!1;for(S=0,k=N.length;S<k;S++){if(T=N[S],!e.hasOwnProperty.call(g,T))return!1;if(A=n[T],j=g[T],O=y(A),C=y(j),I=O?v(c,A):-1,R=C?v(l,j):-1,B=-1!==I?h[I]:m+"["+JSON.stringify(T)+"]",P=-1!==R?p[R]:b+"["+JSON.stringify(T)+"]",d[B+P])return!0;if(-1===I&&O&&(c.push(A),h.push(B)),-1===R&&C&&(l.push(j),p.push(P)),O&&C&&(d[B+P]=!0),!t(A,j,B,P))return!1}return!0}(t,n,"$1","$2")},match:t=function t(e,n){if(n&&"function"==typeof n.test)return n.test(e);if("function"==typeof n)return!0===n(e);if("string"==typeof n)return n=n.toLowerCase(),("string"==typeof e||!!e)&&String(e).toLowerCase().indexOf(n)>=0;if("number"==typeof n)return n===e;if("boolean"==typeof n)return n===e;if(void 0===n)return void 0===e;if(null===n)return null===e;if("Array"===i(e)&&"Array"===i(n))return l(e,n);if(n&&"object"==typeof n){if(n===e)return!0;var r;for(r in n){var o=e[r];if(void 0===o&&"function"==typeof e.getAttribute&&(o=e.getAttribute(r)),null===n[r]||void 0===n[r]){if(o!==n[r])return!1}else if(void 0===o||!t(o,n[r]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")},keys:a}})},function(t,e,n){var r,i;(function(t){
|
|
95
|
-
/**
|
|
96
|
-
* Logs errors
|
|
97
|
-
*
|
|
98
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
99
|
-
* @license BSD
|
|
100
|
-
*
|
|
101
|
-
* Copyright (c) 2010-2014 Christian Johansen
|
|
102
|
-
*/
|
|
103
|
-
!function(o){"use strict";var s=setTimeout;function a(t){function e(n,r){var i=n+" threw exception: ";function o(){throw r.message=i+r.message,r}t.log(i+"["+r.name+"] "+r.message),r.stack&&t.log(r.stack),e.useImmediateExceptions?o():e.setTimeout(o,0)}e.useImmediateExceptions=!1,e.setTimeout=function(t,e){s(t,e)};var n={};return n.log=t.log=function(){},n.logError=t.logError=e,n}function u(t,e,n){var r=t("./util/core");n.exports=a(r)}var c=void 0!==t&&t.exports&&!0;"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):c?u(n(308),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
104
|
-
/**
|
|
105
|
-
* Match functions
|
|
106
|
-
*
|
|
107
|
-
* @author Maximilian Antoni (mail@maxantoni.de)
|
|
108
|
-
* @license BSD
|
|
109
|
-
*
|
|
110
|
-
* Copyright (c) 2012 Maximilian Antoni
|
|
111
|
-
*/
|
|
112
|
-
!function(o){"use strict";function s(t){function e(e,n,r){var i=t.typeOf(e);if(i!==n)throw new TypeError("Expected type of "+r+" to be "+n+", but was "+i)}var n={toString:function(){return this.message}};function r(t){return n.isPrototypeOf(t)}function i(e,i){var o=t.create(n);switch(t.typeOf(e)){case"object":if("function"==typeof e.test)return o.test=function(t){return!0===e.test(t)},o.message="match("+t.functionName(e.test)+")",o;var s=[];for(var a in e)e.hasOwnProperty(a)&&s.push(a+": "+e[a]);o.test=function(n){return function e(n,i){if(null==i)return!1;for(var o in n)if(n.hasOwnProperty(o)){var s=n[o],a=i[o];if(r(s)){if(!s.test(a))return!1}else if("object"===t.typeOf(s)){if(!e(s,a))return!1}else if(!t.deepEqual(s,a))return!1}return!0}(e,n)},o.message="match("+s.join(", ")+")";break;case"number":o.test=function(t){return e==t};break;case"string":o.test=function(t){return"string"==typeof t&&-1!==t.indexOf(e)},o.message='match("'+e+'")';break;case"regexp":o.test=function(t){return"string"==typeof t&&e.test(t)};break;case"function":o.test=e,o.message=i||"match("+t.functionName(e)+")";break;default:o.test=function(n){return t.deepEqual(e,n)}}return o.message||(o.message="match("+e+")"),o}function o(n,r){return function(o,s){e(o,"string","property");var a=1===arguments.length,u=r+'("'+o+'"';return a||(u+=", "+s),i(function(e){return!(null==e||!n(e,o))&&(a||t.deepEqual(s,e[o]))},u+=")")}}return n.or=function(e){if(!arguments.length)throw new TypeError("Matcher expected");r(e)||(e=i(e));var o=this,s=t.create(n);return s.test=function(t){return o.test(t)||e.test(t)},s.message=o.message+".or("+e.message+")",s},n.and=function(e){if(!arguments.length)throw new TypeError("Matcher expected");r(e)||(e=i(e));var o=this,s=t.create(n);return s.test=function(t){return o.test(t)&&e.test(t)},s.message=o.message+".and("+e.message+")",s},i.isMatcher=r,i.any=i(function(){return!0},"any"),i.defined=i(function(t){return null!=t},"defined"),i.truthy=i(function(t){return!!t},"truthy"),i.falsy=i(function(t){return!t},"falsy"),i.same=function(t){return i(function(e){return t===e},"same("+t+")")},i.typeOf=function(n){return e(n,"string","type"),i(function(e){return t.typeOf(e)===n},'typeOf("'+n+'")')},i.instanceOf=function(n){return e(n,"function","type"),i(function(t){return t instanceof n},"instanceOf("+t.functionName(n)+")")},i.has=o(function(t,e){return"object"==typeof t?e in t:void 0!==t[e]},"has"),i.hasOwn=o(function(t,e){return t.hasOwnProperty(e)},"hasOwn"),i.bool=i.typeOf("boolean"),i.number=i.typeOf("number"),i.string=i.typeOf("string"),i.object=i.typeOf("object"),i.func=i.typeOf("function"),i.array=i.typeOf("array"),i.regexp=i.typeOf("regexp"),i.date=i.typeOf("date"),t.match=i,i}var a=void 0!==t&&t.exports&&!0;function u(t,e,n){var r=t("./util/core");t("./typeOf"),n.exports=s(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):a?u(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
113
|
-
/**
|
|
114
|
-
* Mock functions.
|
|
115
|
-
*
|
|
116
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
117
|
-
* @license BSD
|
|
118
|
-
*
|
|
119
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
120
|
-
*/
|
|
121
|
-
!function(o){"use strict";function s(t){var e=[].push,n=t.match;function r(e){return e?r.create(e):t.expectation.create("Anonymous mock")}function i(t,e){if(t)for(var n=0,r=t.length;n<r;n+=1)e(t[n])}function o(e,n,r){if(r&&e.length!==n.length)return!1;for(var i=0,o=e.length;i<o;i++)if(!t.deepEqual(e[i],n[i]))return!1;return!0}t.extend(r,{create:function(e){if(!e)throw new TypeError("object is null");var n=t.extend({},r);return n.object=e,delete n.create,n},expects:function(n){if(!n)throw new TypeError("method is falsy");if(this.expectations||(this.expectations={},this.proxies=[]),!this.expectations[n]){this.expectations[n]=[];var r=this;t.wrapMethod(this.object,n,function(){return r.invokeMethod(n,this,arguments)}),e.call(this.proxies,n)}var i=t.expectation.create(n);return e.call(this.expectations[n],i),i},restore:function(){var t=this.object;i(this.proxies,function(e){"function"==typeof t[e].restore&&t[e].restore()})},verify:function(){var n=this.expectations||{},r=[],o=[];return i(this.proxies,function(t){i(n[t],function(t){t.met()?e.call(o,t.toString()):e.call(r,t.toString())})}),this.restore(),r.length>0?t.expectation.fail(r.concat(o).join("\n")):o.length>0&&t.expectation.pass(r.concat(o).join("\n")),!0},invokeMethod:function(n,r,i){var s,a,u=this.expectations&&this.expectations[n]?this.expectations[n]:[],c=[],f=i||[];for(s=0;s<u.length;s+=1){o(u[s].expectedArguments||[],f,u[s].expectsExactArgCount)&&c.push(u[s])}for(s=0;s<c.length;s+=1)if(!c[s].met()&&c[s].allowsCall(r,i))return c[s].apply(r,i);var l=[],h=0;for(s=0;s<c.length;s+=1)c[s].allowsCall(r,i)?a=a||c[s]:h+=1;if(a&&0===h)return a.apply(r,i);for(s=0;s<u.length;s+=1)e.call(l," "+u[s].toString());l.unshift("Unexpected call: "+t.spyCall.toString.call({proxy:n,args:i})),t.expectation.fail(l.join("\n"))}});var s=t.timesInWords,a=Array.prototype.slice;function u(t){return"number"==typeof t.maxCalls&&t.callCount===t.maxCalls}function c(t,e){return n&&n.isMatcher(t)&&t.test(e)||!0}return t.expectation={minCalls:1,maxCalls:1,create:function(e){var n=t.extend(t.stub.create(),t.expectation);return delete n.create,n.method=e,n},invoke:function(e,n,r){return this.verifyCallAllowed(n,r),t.spy.invoke.apply(this,arguments)},atLeast:function(t){if("number"!=typeof t)throw new TypeError("'"+t+"' is not number");return this.limitsSet||(this.maxCalls=null,this.limitsSet=!0),this.minCalls=t,this},atMost:function(t){if("number"!=typeof t)throw new TypeError("'"+t+"' is not number");return this.limitsSet||(this.minCalls=null,this.limitsSet=!0),this.maxCalls=t,this},never:function(){return this.exactly(0)},once:function(){return this.exactly(1)},twice:function(){return this.exactly(2)},thrice:function(){return this.exactly(3)},exactly:function(t){if("number"!=typeof t)throw new TypeError("'"+t+"' is not a number");return this.atLeast(t),this.atMost(t)},met:function(){return!this.failed&&function(t){return!("number"==typeof t.minCalls)||t.callCount>=t.minCalls}(this)},verifyCallAllowed:function(e,n){if(u(this)&&(this.failed=!0,t.expectation.fail(this.method+" already called "+s(this.maxCalls))),"expectedThis"in this&&this.expectedThis!==e&&t.expectation.fail(this.method+" called with "+e+" as thisValue, expected "+this.expectedThis),"expectedArguments"in this){n||t.expectation.fail(this.method+" received no arguments, expected "+t.format(this.expectedArguments)),n.length<this.expectedArguments.length&&t.expectation.fail(this.method+" received too few arguments ("+t.format(n)+"), expected "+t.format(this.expectedArguments)),this.expectsExactArgCount&&n.length!==this.expectedArguments.length&&t.expectation.fail(this.method+" received too many arguments ("+t.format(n)+"), expected "+t.format(this.expectedArguments));for(var r=0,i=this.expectedArguments.length;r<i;r+=1)c(this.expectedArguments[r],n[r])||t.expectation.fail(this.method+" received wrong arguments "+t.format(n)+", didn't match "+this.expectedArguments.toString()),t.deepEqual(this.expectedArguments[r],n[r])||t.expectation.fail(this.method+" received wrong arguments "+t.format(n)+", expected "+t.format(this.expectedArguments))}},allowsCall:function(e,n){if(this.met()&&u(this))return!1;if("expectedThis"in this&&this.expectedThis!==e)return!1;if(!("expectedArguments"in this))return!0;if((n=n||[]).length<this.expectedArguments.length)return!1;if(this.expectsExactArgCount&&n.length!==this.expectedArguments.length)return!1;for(var r=0,i=this.expectedArguments.length;r<i;r+=1){if(!c(this.expectedArguments[r],n[r]))return!1;if(!t.deepEqual(this.expectedArguments[r],n[r]))return!1}return!0},withArgs:function(){return this.expectedArguments=a.call(arguments),this},withExactArgs:function(){return this.withArgs.apply(this,arguments),this.expectsExactArgCount=!0,this},on:function(t){return this.expectedThis=t,this},toString:function(){var n=(this.expectedArguments||[]).slice();this.expectsExactArgCount||e.call(n,"[...]");var r=t.spyCall.toString.call({proxy:this.method||"anonymous mock expectation",args:n}).replace(", [...","[, ...")+" "+function(t){var e=t.minCalls,n=t.maxCalls;if("number"==typeof e&&"number"==typeof n){var r=s(e);return e!==n&&(r="at least "+r+" and at most "+s(n)),r}return"number"==typeof e?"at least "+s(e):"at most "+s(n)}(this);return this.met()?"Expectation met: "+r:"Expected "+r+" ("+function(t){return 0===t?"never called":"called "+s(t)}(this.callCount)+")"},verify:function(){return this.met()?t.expectation.pass(this.toString()):t.expectation.fail(this.toString()),!0},pass:function(e){t.assert.pass(e)},fail:function(t){var e=new Error(t);throw e.name="ExpectationError",e}},t.mock=r,r}var a=void 0!==t&&t.exports&&!0;function u(t,e,n){var r=t("./util/core");t("./times_in_words"),t("./call"),t("./extend"),t("./match"),t("./spy"),t("./stub"),t("./format"),n.exports=s(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):a?u(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
122
|
-
/**
|
|
123
|
-
* Manages fake collections as well as fake utilities such as Sinon's
|
|
124
|
-
* timers and fake XHR implementation in one convenient object.
|
|
125
|
-
*
|
|
126
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
127
|
-
* @license BSD
|
|
128
|
-
*
|
|
129
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
130
|
-
*/
|
|
131
|
-
!function(o){"use strict";function s(t){var e=[].push;function n(t,n,r,i){i&&(!n.injectInto||r in n.injectInto?e.call(t.args,i):(n.injectInto[r]=i,t.injectedKeys.push(r)))}return t.sandbox=t.extend(t.create(t.collection),{useFakeTimers:function(){return this.clock=t.useFakeTimers.apply(t,arguments),this.add(this.clock)},serverPrototype:t.fakeServer,useFakeServer:function(){var e=this.serverPrototype||t.fakeServer;return e&&e.create?(this.server=e.create(),this.add(this.server)):null},inject:function(e){return t.collection.inject.call(this,e),this.clock&&(e.clock=this.clock),this.server&&(e.server=this.server,e.requests=this.server.requests),e.match=t.match,e},restore:function(){if(arguments.length)throw new Error("sandbox.restore() does not take any parameters. Perhaps you meant stub.restore()");t.collection.restore.apply(this,arguments),this.restoreContext()},restoreContext:function(){if(this.injectedKeys){for(var t=0,e=this.injectedKeys.length;t<e;t++)delete this.injectInto[this.injectedKeys[t]];this.injectedKeys=[]}},create:function(e){if(!e)return t.create(t.sandbox);var r,i,o=function(e){var n=t.create(t.sandbox);return e.useFakeServer&&("object"==typeof e.useFakeServer&&(n.serverPrototype=e.useFakeServer),n.useFakeServer()),e.useFakeTimers&&("object"==typeof e.useFakeTimers?n.useFakeTimers.apply(n,e.useFakeTimers):n.useFakeTimers()),n}(e);o.args=o.args||[],o.injectedKeys=[],o.injectInto=e.injectInto;var s=o.inject({});if(e.properties)for(var a=0,u=e.properties.length;a<u;a++)n(o,e,r=e.properties[a],i=s[r]||"sandbox"===r&&o);else n(o,e,"sandbox",i);return o},match:t.match}),t.sandbox.useFakeXMLHttpRequest=t.sandbox.useFakeServer,t.sandbox}var a=void 0!==t&&t.exports&&!0;function u(t,e,n){var r=t("./util/core");t("./extend"),t("./util/fake_server_with_clock"),t("./util/fake_timers"),t("./collection"),n.exports=s(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):a?u(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(module){
|
|
132
|
-
/**
|
|
133
|
-
* Spy functions
|
|
134
|
-
*
|
|
135
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
136
|
-
* @license BSD
|
|
137
|
-
*
|
|
138
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
139
|
-
*/
|
|
140
|
-
!function(sinonGlobal){"use strict";function makeApi(sinon){var push=Array.prototype.push,slice=Array.prototype.slice,callId=0;function spy(t,e,n){if(!e&&"function"==typeof t)return spy.create(t);if(!t&&!e)return spy.create(function(){});if(n){for(var r={},i=sinon.getPropertyDescriptor(t,e),o=0;o<n.length;o++)r[n[o]]=spy.create(i[n[o]]);return sinon.wrapMethod(t,e,r)}return sinon.wrapMethod(t,e,spy.create(t[e]))}function matchingFake(t,e,n){if(t)for(var r=0,i=t.length;r<i;r++)if(t[r].matches(e,n))return t[r]}function incrementCallCount(){this.called=!0,this.callCount+=1,this.notCalled=!1,this.calledOnce=1===this.callCount,this.calledTwice=2===this.callCount,this.calledThrice=3===this.callCount}function createCallProperties(){this.firstCall=this.getCall(0),this.secondCall=this.getCall(1),this.thirdCall=this.getCall(2),this.lastCall=this.getCall(this.callCount-1)}var vars="a,b,c,d,e,f,g,h,i,j,k,l";function createProxy(func,proxyLength){var p;return proxyLength?eval("p = (function proxy("+vars.substring(0,2*proxyLength-1)+") { return p.invoke(func, this, slice.call(arguments)); });"):p=function(){return p.invoke(func,this,slice.call(arguments))},p.isSinonProxy=!0,p}var uuid=0,spyApi={reset:function(){if(this.invoking){var t=new Error("Cannot reset Sinon function while invoking it. Move the call to .reset outside of the callback.");throw t.name="InvalidResetException",t}if(this.called=!1,this.notCalled=!0,this.calledOnce=!1,this.calledTwice=!1,this.calledThrice=!1,this.callCount=0,this.firstCall=null,this.secondCall=null,this.thirdCall=null,this.lastCall=null,this.args=[],this.returnValues=[],this.thisValues=[],this.exceptions=[],this.callIds=[],this.stacks=[],this.fakes)for(var e=0;e<this.fakes.length;e++)this.fakes[e].reset();return this},create:function(t,e){var n;"function"!=typeof t?t=function(){}:n=sinon.functionName(t),e||(e=t.length);var r=createProxy(t,e);return sinon.extend(r,spy),delete r.create,sinon.extend(r,t),r.reset(),r.prototype=t.prototype,r.displayName=n||"spy",r.toString=sinon.functionToString,r.instantiateFake=sinon.spy.create,r.id="spy#"+uuid++,r},invoke:function(t,e,n){var r,i,o=matchingFake(this.fakes,n);incrementCallCount.call(this),push.call(this.thisValues,e),push.call(this.args,n),push.call(this.callIds,callId++),createCallProperties.call(this);try{this.invoking=!0,i=o?o.invoke(t,e,n):(this.func||t).apply(e,n),this.getCall(this.callCount-1).calledWithNew()&&"object"!=typeof i&&(i=e)}catch(t){r=t}finally{delete this.invoking}if(push.call(this.exceptions,r),push.call(this.returnValues,i),push.call(this.stacks,(new Error).stack),createCallProperties.call(this),void 0!==r)throw r;return i},named:function(t){return this.displayName=t,this},getCall:function(t){return t<0||t>=this.callCount?null:sinon.spyCall(this,this.thisValues[t],this.args[t],this.returnValues[t],this.exceptions[t],this.callIds[t],this.stacks[t])},getCalls:function(){var t,e=[];for(t=0;t<this.callCount;t++)e.push(this.getCall(t));return e},calledBefore:function(t){return!!this.called&&(!t.called||this.callIds[0]<t.callIds[t.callIds.length-1])},calledAfter:function(t){return!(!this.called||!t.called)&&this.callIds[this.callCount-1]>t.callIds[t.callCount-1]},withArgs:function(){var t=slice.call(arguments);if(this.fakes){var e=matchingFake(this.fakes,t,!0);if(e)return e}else this.fakes=[];var n=this,r=this.instantiateFake();r.matchingAguments=t,r.parent=this,push.call(this.fakes,r),r.withArgs=function(){return n.withArgs.apply(n,arguments)};for(var i=0;i<this.args.length;i++)r.matches(this.args[i])&&(incrementCallCount.call(r),push.call(r.thisValues,this.thisValues[i]),push.call(r.args,this.args[i]),push.call(r.returnValues,this.returnValues[i]),push.call(r.exceptions,this.exceptions[i]),push.call(r.callIds,this.callIds[i]));return createCallProperties.call(r),r},matches:function(t,e){var n=this.matchingAguments;if(n.length<=t.length&&sinon.deepEqual(n,t.slice(0,n.length)))return!e||n.length===t.length},printf:function(t){var e,n=this,r=slice.call(arguments,1);return(t||"").replace(/%(.)/g,function(t,i){return"function"==typeof(e=spyApi.formatters[i])?e.call(null,n,r):isNaN(parseInt(i,10))?"%"+i:sinon.format(r[i-1])})}};function delegateToCalls(t,e,n,r){spyApi[t]=function(){if(!this.called)return!!r&&r.apply(this,arguments);for(var i,o=0,s=0,a=this.callCount;s<a;s+=1)if((i=this.getCall(s))[n||t].apply(i,arguments)&&(o+=1,e))return!0;return o===this.callCount}}return delegateToCalls("calledOn",!0),delegateToCalls("alwaysCalledOn",!1,"calledOn"),delegateToCalls("calledWith",!0),delegateToCalls("calledWithMatch",!0),delegateToCalls("alwaysCalledWith",!1,"calledWith"),delegateToCalls("alwaysCalledWithMatch",!1,"calledWithMatch"),delegateToCalls("calledWithExactly",!0),delegateToCalls("alwaysCalledWithExactly",!1,"calledWithExactly"),delegateToCalls("neverCalledWith",!1,"notCalledWith",function(){return!0}),delegateToCalls("neverCalledWithMatch",!1,"notCalledWithMatch",function(){return!0}),delegateToCalls("threw",!0),delegateToCalls("alwaysThrew",!1,"threw"),delegateToCalls("returned",!0),delegateToCalls("alwaysReturned",!1,"returned"),delegateToCalls("calledWithNew",!0),delegateToCalls("alwaysCalledWithNew",!1,"calledWithNew"),delegateToCalls("callArg",!1,"callArgWith",function(){throw new Error(this.toString()+" cannot call arg since it was not yet invoked.")}),spyApi.callArgWith=spyApi.callArg,delegateToCalls("callArgOn",!1,"callArgOnWith",function(){throw new Error(this.toString()+" cannot call arg since it was not yet invoked.")}),spyApi.callArgOnWith=spyApi.callArgOn,delegateToCalls("yield",!1,"yield",function(){throw new Error(this.toString()+" cannot yield since it was not yet invoked.")}),spyApi.invokeCallback=spyApi.yield,delegateToCalls("yieldOn",!1,"yieldOn",function(){throw new Error(this.toString()+" cannot yield since it was not yet invoked.")}),delegateToCalls("yieldTo",!1,"yieldTo",function(t){throw new Error(this.toString()+" cannot yield to '"+t+"' since it was not yet invoked.")}),delegateToCalls("yieldToOn",!1,"yieldToOn",function(t){throw new Error(this.toString()+" cannot yield to '"+t+"' since it was not yet invoked.")}),spyApi.formatters={c:function(t){return sinon.timesInWords(t.callCount)},n:function(t){return t.toString()},C:function(t){for(var e=[],n=0,r=t.callCount;n<r;++n){var i=" "+t.getCall(n).toString();/\n/.test(e[n-1])&&(i="\n"+i),push.call(e,i)}return e.length>0?"\n"+e.join("\n"):""},t:function(t){for(var e=[],n=0,r=t.callCount;n<r;++n)push.call(e,sinon.format(t.thisValues[n]));return e.join(", ")},"*":function(t,e){for(var n=[],r=0,i=e.length;r<i;++r)push.call(n,sinon.format(e[r]));return n.join(", ")}},sinon.extend(spy,spyApi),spy.spyCall=sinon.spyCall,sinon.spy=spy,spy}var isNode=void 0!==module&&module.exports&&!0,isAMD="object"==typeof __webpack_require__(305)&&__webpack_require__(305);function loadDependencies(t,e,n){var r=t("./util/core");t("./call"),t("./extend"),t("./times_in_words"),t("./format"),n.exports=makeApi(r)}if(isAMD)return __WEBPACK_AMD_DEFINE_FACTORY__=loadDependencies,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,void(void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));isNode?loadDependencies(__webpack_require__(308),module.exports,module):sinonGlobal&&makeApi(sinonGlobal)}("object"==typeof sinon&&sinon)}).call(exports,__webpack_require__(102)(module))},function(t,e,n){var r,i;(function(t){
|
|
141
|
-
/**
|
|
142
|
-
* Stub functions
|
|
143
|
-
*
|
|
144
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
145
|
-
* @license BSD
|
|
146
|
-
*
|
|
147
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
148
|
-
*/
|
|
149
|
-
!function(o){"use strict";function s(t){function e(n,r,i){if(i&&"function"!=typeof i&&"object"!=typeof i)throw new TypeError("Custom stub should be a function or a property descriptor");var o;if(i){if("function"==typeof i)o=t.spy&&t.spy.create?t.spy.create(i):i;else if(o=i,t.spy&&t.spy.create)for(var s=t.objectKeys(o),a=0;a<s.length;a++)o[s[a]]=t.spy.create(o[s[a]])}else{var u=0;"object"==typeof n&&"function"==typeof n[r]&&(u=n[r].length),o=e.create(u)}return n||void 0!==r?void 0===r&&"object"==typeof n?(t.walk(n||{},function(r,i,o){o!==Object.prototype&&"constructor"!==i&&"function"==typeof t.getPropertyDescriptor(o,i).value&&e(n,i)}),n):t.wrapMethod(n,r,o):t.stub.create()}function n(e){return e.defaultBehavior||function(t){return t.parent&&r(t.parent)}(e)||t.behavior.create(e)}function r(t){var e=t.behaviors[t.callCount-1];return e&&e.isPresent()?e:n(t)}var i=0,o={create:function(n){var o=function(){return r(o).invoke(this,arguments)};o.id="stub#"+i++;var s=o;return(o=t.spy.create(o,n)).func=s,t.extend(o,e),o.instantiateFake=t.stub.create,o.displayName="stub",o.toString=t.functionToString,o.defaultBehavior=null,o.behaviors=[],o},resetBehavior:function(){var t;if(this.defaultBehavior=null,this.behaviors=[],delete this.returnValue,delete this.returnArgAt,this.returnThis=!1,this.fakes)for(t=0;t<this.fakes.length;t++)this.fakes[t].resetBehavior()},onCall:function(e){return this.behaviors[e]||(this.behaviors[e]=t.behavior.create(this)),this.behaviors[e]},onFirstCall:function(){return this.onCall(0)},onSecondCall:function(){return this.onCall(1)},onThirdCall:function(){return this.onCall(2)}};function s(e){return function(){return this.defaultBehavior=this.defaultBehavior||t.behavior.create(this),this.defaultBehavior[e].apply(this.defaultBehavior,arguments),this}}for(var a in t.behavior)t.behavior.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&"create"!==a&&"withArgs"!==a&&"invoke"!==a&&(o[a]=s(a));return t.extend(e,o),t.stub=e,e}var a=void 0!==t&&t.exports&&!0;function u(t,e,n){var r=t("./util/core");t("./behavior"),t("./spy"),t("./extend"),n.exports=s(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):a?u(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
150
|
-
/**
|
|
151
|
-
* Test function, sandboxes fakes
|
|
152
|
-
*
|
|
153
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
154
|
-
* @license BSD
|
|
155
|
-
*
|
|
156
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
157
|
-
*/
|
|
158
|
-
!function(o){"use strict";function s(t){var e=Array.prototype.slice;function n(n){var r=typeof n;if("function"!==r)throw new TypeError("sinon.test needs to wrap a test function, got "+r);function i(){var r=t.getConfig(t.config);r.injectInto=r.injectIntoThis&&this||r.injectInto;var i,o,s=t.sandbox.create(r),a=e.call(arguments),u=a.length&&a[a.length-1];"function"==typeof u&&(a[a.length-1]=function(t){t?s.restore():s.verifyAndRestore(),u(t)});try{o=n.apply(this,a.concat(s.args))}catch(t){i=t}if(void 0!==i)throw s.restore(),i;return"function"!=typeof u&&s.verifyAndRestore(),o}return n.length?function(t){return i.apply(this,arguments)}:i}return n.config={injectIntoThis:!0,injectInto:null,properties:["spy","stub","mock","clock","server","requests"],useFakeTimers:!0,useFakeServer:!0},t.test=n,n}var a=void 0!==t&&t.exports&&!0;function u(t,e,n){var r=t("./util/core");t("./sandbox"),n.exports=s(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):a?u(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon||null)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
159
|
-
/**
|
|
160
|
-
* Test case, sandboxes all test functions
|
|
161
|
-
*
|
|
162
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
163
|
-
* @license BSD
|
|
164
|
-
*
|
|
165
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
166
|
-
*/
|
|
167
|
-
!function(o){"use strict";function s(t,e,n){return function(){var r,i;e&&e.apply(this,arguments);try{i=t.apply(this,arguments)}catch(t){r=t}if(n&&n.apply(this,arguments),r)throw r;return i}}function a(t){function e(e,n){if(!e||"object"!=typeof e)throw new TypeError("sinon.testCase needs an object with test functions");n=n||"test";var r,i,o,a=new RegExp("^"+n),u={},c=e.setUp,f=e.tearDown;for(r in e)e.hasOwnProperty(r)&&!/^(setUp|tearDown)$/.test(r)&&("function"==typeof(i=e[r])&&a.test(r)?(o=i,(c||f)&&(o=s(i,c,f)),u[r]=t.test(o)):u[r]=e[r]);return u}return t.testCase=e,e}var u=void 0!==t&&t.exports&&!0;function c(t,e,n){var r=t("./util/core");t("./test"),n.exports=a(r)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=c)?r.call(e,n,e,t):r)||(t.exports=i):u?c(n(308),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){!function(o){"use strict";function s(t){return t.timesInWords=function(t){switch(t){case 1:return"once";case 2:return"twice";case 3:return"thrice";default:return(t||0)+" times"}},t.timesInWords}function a(t,e,n){var r=t("./util/core");n.exports=s(r)}var u=void 0!==t&&t.exports&&!0;"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i):u?a(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
168
|
-
/**
|
|
169
|
-
* Format functions
|
|
170
|
-
*
|
|
171
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
172
|
-
* @license BSD
|
|
173
|
-
*
|
|
174
|
-
* Copyright (c) 2010-2014 Christian Johansen
|
|
175
|
-
*/
|
|
176
|
-
!function(o){"use strict";function s(t){return t.typeOf=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=Object.prototype.toString.call(t);return e.substring(8,e.length-1).toLowerCase()},t.typeOf}function a(t,e,n){var r=t("./util/core");n.exports=s(r)}var u=void 0!==t&&t.exports&&!0;"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i):u?a(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,i;(function(t){
|
|
177
|
-
/**
|
|
178
|
-
* Sinon core utilities. For internal use only.
|
|
179
|
-
*
|
|
180
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
181
|
-
* @license BSD
|
|
182
|
-
*
|
|
183
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
184
|
-
*/
|
|
185
|
-
!function(o){"use strict";var s="undefined"!=typeof document&&document.createElement("div"),a=Object.prototype.hasOwnProperty;function u(t){return s&&t&&1===t.nodeType&&function(t){var e=!1;try{t.appendChild(s),e=s.parentNode===t}catch(t){return!1}finally{try{t.removeChild(s)}catch(t){}}return e}(t)}function c(t){return"number"==typeof t&&isNaN(t)}function f(t,e){for(var n in e)a.call(t,n)||(t[n]=e[n])}function l(t){return"function"==typeof t&&"function"==typeof t.restore&&t.restore.sinon}var h="keys"in Object;function p(t){return t.wrapMethod=function(e,n,r){if(!e)throw new TypeError("Should wrap property of object");if("function"!=typeof r&&"object"!=typeof r)throw new TypeError("Method wrapper should be a function or a property descriptor");function i(t){var e;if(function(t){return"function"==typeof t||!!(t&&t.constructor&&t.call&&t.apply)}(t)){if(t.restore&&t.restore.sinon)e=new TypeError("Attempted to wrap "+n+" which is already wrapped");else if(t.calledBefore){var r=t.returns?"stubbed":"spied on";e=new TypeError("Attempted to wrap "+n+" which is already "+r)}}else e=new TypeError("Attempted to wrap "+typeof t+" property "+n+" as function");if(e)throw t&&t.stackTrace&&(e.stack+="\n--------------\n"+t.stackTrace),e}var o,s,u;function c(){i(s=e[n]),e[n]=r,r.displayName=n}var l=e.hasOwnProperty&&e.hasOwnProperty===a?e.hasOwnProperty(n):a.call(e,n);if(h){var p="function"==typeof r?{value:r}:r,d=t.getPropertyDescriptor(e,n);if(d?d.restore&&d.restore.sinon&&(o=new TypeError("Attempted to wrap "+n+" which is already wrapped")):o=new TypeError("Attempted to wrap "+typeof s+" property "+n+" as function"),o)throw d&&d.stackTrace&&(o.stack+="\n--------------\n"+d.stackTrace),o;var y=t.objectKeys(p);for(u=0;u<y.length;u++)i(s=d[y[u]]);for(f(p,d),u=0;u<y.length;u++)f(p[y[u]],d[y[u]]);Object.defineProperty(e,n,p),"function"==typeof r&&e[n]!==r&&(delete e[n],c())}else c();return r.displayName=n,r.stackTrace=new Error("Stack Trace for original").stack,r.restore=function(){if(l)h&&Object.defineProperty(e,n,d);else try{delete e[n]}catch(t){}h?t.getPropertyDescriptor(e,n).value===r&&(e[n]=s):e[n]===r&&(e[n]=s)},r.restore.sinon=!0,h||f(r,s),r},t.create=function(t){var e=function(){};return e.prototype=t,new e},t.deepEqual=function e(n,r){if(t.match&&t.match.isMatcher(n))return n.test(r);if("object"!=typeof n||"object"!=typeof r)return c(n)&&c(r)||n===r;if(u(n)||u(r))return n===r;if(n===r)return!0;if(null===n&&null!==r||null!==n&&null===r)return!1;if(n instanceof RegExp&&r instanceof RegExp)return n.source===r.source&&n.global===r.global&&n.ignoreCase===r.ignoreCase&&n.multiline===r.multiline;var i,o=Object.prototype.toString.call(n);if(o!==Object.prototype.toString.call(r))return!1;if("[object Date]"===o)return n.valueOf()===r.valueOf();var s=0,f=0;if("[object Array]"===o&&n.length!==r.length)return!1;for(i in n)if(a.call(n,i)){if(s+=1,!(i in r))return!1;if(!e(n[i],r[i]))return!1}for(i in r)a.call(r,i)&&(f+=1);return s===f},t.functionName=function(t){var e=t.displayName||t.name;if(!e){var n=t.toString().match(/function ([^\s\(]+)/);e=n&&n[1]}return e},t.functionToString=function(){if(this.getCall&&this.callCount)for(var t,e,n=this.callCount;n--;)for(e in t=this.getCall(n).thisValue)if(t[e]===this)return e;return this.displayName||"sinon fake"},t.objectKeys=function(t){if(t!==Object(t))throw new TypeError("sinon.objectKeys called on a non-object");var e,n=[];for(e in t)a.call(t,e)&&n.push(e);return n},t.getPropertyDescriptor=function(t,e){for(var n,r=t;r&&!(n=Object.getOwnPropertyDescriptor(r,e));)r=Object.getPrototypeOf(r);return n},t.getConfig=function(e){var n={};e=e||{};var r=t.defaultConfig;for(var i in r)r.hasOwnProperty(i)&&(n[i]=e.hasOwnProperty(i)?e[i]:r[i]);return n},t.defaultConfig={injectIntoThis:!0,injectInto:null,properties:["spy","stub","mock","clock","server","requests"],useFakeTimers:!0,useFakeServer:!0},t.timesInWords=function(t){return(1===t?"once":2===t&&"twice")||3===t&&"thrice"||(t||0)+" times"},t.calledInOrder=function(t){for(var e=1,n=t.length;e<n;e++)if(!t[e-1].calledBefore(t[e])||!t[e].called)return!1;return!0},t.orderByFirstCall=function(t){return t.sort(function(t,e){var n=t.getCall(0),r=e.getCall(0);return(n&&n.callId||-1)<(r&&r.callId||-1)?-1:1})},t.createStubInstance=function(e){if("function"!=typeof e)throw new TypeError("The constructor should be a function.");return t.stub(t.create(e.prototype))},t.restore=function(t){if(null!==t&&"object"==typeof t)for(var e in t)l(t[e])&&t[e].restore();else l(t)&&t.restore()},t}var d=void 0!==t&&t.exports&&!0;function y(t,e){p(e)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=y)?r.call(e,n,e,t):r)||(t.exports=i):d?y(n(327),t.exports):o&&p(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r={"./core":326,"./core.js":326,"./event":328,"./event.js":328,"./fake_server":329,"./fake_server.js":329,"./fake_server_with_clock":330,"./fake_server_with_clock.js":330,"./fake_timers":331,"./fake_timers.js":331,"./fake_xdomain_request":333,"./fake_xdomain_request.js":333,"./fake_xml_http_request":334,"./fake_xml_http_request.js":334,"./timers_ie":335,"./timers_ie.js":335,"./xdr_ie":336,"./xdr_ie.js":336,"./xhr_ie":337,"./xhr_ie.js":337};function i(t){return n(o(t))}function o(t){return r[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=327},function(t,e,n){var r,i;
|
|
186
|
-
/**
|
|
187
|
-
* Minimal Event interface implementation
|
|
188
|
-
*
|
|
189
|
-
* Original implementation by Sven Fuchs: https://gist.github.com/995028
|
|
190
|
-
* Modifications and tests by Christian Johansen.
|
|
191
|
-
*
|
|
192
|
-
* @author Sven Fuchs (svenfuchs@artweb-design.de)
|
|
193
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
194
|
-
* @license BSD
|
|
195
|
-
*
|
|
196
|
-
* Copyright (c) 2011 Sven Fuchs, Christian Johansen
|
|
197
|
-
*/"undefined"==typeof sinon&&(this.sinon={}),function(){"use strict";var o=[].push;function s(t){t.Event=function(t,e,n,r){this.initEvent(t,e,n,r)},t.Event.prototype={initEvent:function(t,e,n,r){this.type=t,this.bubbles=e,this.cancelable=n,this.target=r},stopPropagation:function(){},preventDefault:function(){this.defaultPrevented=!0}},t.ProgressEvent=function(t,e,n){this.initEvent(t,!1,!1,n),this.loaded="number"==typeof e.loaded?e.loaded:null,this.total="number"==typeof e.total?e.total:null,this.lengthComputable=!!e.total},t.ProgressEvent.prototype=new t.Event,t.ProgressEvent.prototype.constructor=t.ProgressEvent,t.CustomEvent=function(t,e,n){this.initEvent(t,!1,!1,n),this.detail=e.detail||null},t.CustomEvent.prototype=new t.Event,t.CustomEvent.prototype.constructor=t.CustomEvent,t.EventTarget={addEventListener:function(t,e){this.eventListeners=this.eventListeners||{},this.eventListeners[t]=this.eventListeners[t]||[],o.call(this.eventListeners[t],e)},removeEventListener:function(t,e){for(var n=this.eventListeners&&this.eventListeners[t]||[],r=0,i=n.length;r<i;++r)if(n[r]===e)return n.splice(r,1)},dispatchEvent:function(t){for(var e=t.type,n=this.eventListeners&&this.eventListeners[e]||[],r=0;r<n.length;r++)"function"==typeof n[r]?n[r].call(this,t):n[r].handleEvent(t);return!!t.defaultPrevented}}}var a=void 0!==t&&t.exports&&!0;function u(t){s(t("./core"))}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=u)?r.call(e,n,e,t):r)||(t.exports=i):a?u(n(327)):s(sinon)}()},function(t,e,n){var r,i;(function(t){
|
|
198
|
-
/**
|
|
199
|
-
* The Sinon "server" mimics a web server that receives requests from
|
|
200
|
-
* sinon.FakeXMLHttpRequest and provides an API to respond to those requests,
|
|
201
|
-
* both synchronously and asynchronously. To respond synchronuously, canned
|
|
202
|
-
* answers have to be provided upfront.
|
|
203
|
-
*
|
|
204
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
205
|
-
* @license BSD
|
|
206
|
-
*
|
|
207
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
208
|
-
*/
|
|
209
|
-
!function(){"use strict";var o=[].push;function s(t){var e=t;if("[object Array]"!==Object.prototype.toString.call(t)&&(e=[200,{},t]),"string"!=typeof e[2])throw new TypeError("Fake server response body should be string, but was "+typeof e[2]);return e}var a="undefined"!=typeof window?window.location:{},u=new RegExp("^"+a.protocol+"//"+a.host);function c(t,e){var n=e.url;if(/^https?:\/\//.test(n)&&!u.test(n)||(n=n.replace(u,"")),function(t,e,n){var r=t.method,i=!r||r.toLowerCase()===e.toLowerCase(),o=t.url,s=!o||o===n||"function"==typeof o.test&&o.test(n);return i&&s}(t,this.getHTTPMethod(e),n)){if("function"==typeof t.response){var r=t.url,i=[e].concat(r&&"function"==typeof r.exec?r.exec(n).slice(1):[]);return t.response.apply(t,i)}return!0}return!1}function f(t){t.fakeServer={create:function(e){var n=t.create(this);return n.configure(e),t.xhr.supportsCORS?this.xhr=t.useFakeXMLHttpRequest():this.xhr=t.useFakeXDomainRequest(),n.requests=[],this.xhr.onCreate=function(t){n.addRequest(t)},n},configure:function(t){var e,n={autoRespond:!0,autoRespondAfter:!0,respondImmediately:!0,fakeHTTPMethods:!0};for(e in t=t||{})n.hasOwnProperty(e)&&t.hasOwnProperty(e)&&(this[e]=t[e])},addRequest:function(t){var e=this;o.call(this.requests,t),t.onSend=function(){e.handleRequest(this),e.respondImmediately?e.respond():e.autoRespond&&!e.responding&&(setTimeout(function(){e.responding=!1,e.respond()},e.autoRespondAfter||10),e.responding=!0)}},getHTTPMethod:function(t){if(this.fakeHTTPMethods&&/post/i.test(t.method)){var e=(t.requestBody||"").match(/_method=([^\b;]+)/);return e?e[1]:t.method}return t.method},handleRequest:function(t){t.async?(this.queue||(this.queue=[]),o.call(this.queue,t)):this.processRequest(t)},log:function(e,n){var r;r="Request:\n"+t.format(n)+"\n\n",r+="Response:\n"+t.format(e)+"\n\n",t.log(r)},respondWith:function(t,e,n){1!==arguments.length||"function"==typeof t?(this.responses||(this.responses=[]),1===arguments.length&&(n=t,e=t=null),2===arguments.length&&(n=e,e=t,t=null),o.call(this.responses,{method:t,url:e,response:"function"==typeof n?n:s(n)})):this.response=s(t)},respond:function(){arguments.length>0&&this.respondWith.apply(this,arguments);for(var t=this.queue||[],e=t.splice(0,t.length),n=0;n<e.length;n++)this.processRequest(e[n])},processRequest:function(e){try{if(e.aborted)return;var n=this.response||[404,{},""];if(this.responses)for(var r=this.responses.length-1;r>=0;r--)if(c.call(this,this.responses[r],e)){n=this.responses[r].response;break}4!==e.readyState&&(this.log(n,e),e.respond(n[0],n[1],n[2]))}catch(e){t.logError("Fake server request processing",e)}},restore:function(){return this.xhr.restore&&this.xhr.restore.apply(this.xhr,arguments)}}}var l=void 0!==t&&t.exports&&!0;function h(t,e,n){var r=t("./core");t("./fake_xdomain_request"),t("./fake_xml_http_request"),t("../format"),f(r),n.exports=r}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=h)?r.call(e,n,e,t):r)||(t.exports=i):l?h(n(327),t.exports,t):f(sinon)}()}).call(e,n(102)(t))},function(t,e,n){var r,i;
|
|
210
|
-
/**
|
|
211
|
-
* Add-on for sinon.fakeServer that automatically handles a fake timer along with
|
|
212
|
-
* the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery
|
|
213
|
-
* 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,
|
|
214
|
-
* it polls the object for completion with setInterval. Dispite the direct
|
|
215
|
-
* motivation, there is nothing jQuery-specific in this file, so it can be used
|
|
216
|
-
* in any environment where the ajax implementation depends on setInterval or
|
|
217
|
-
* setTimeout.
|
|
218
|
-
*
|
|
219
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
220
|
-
* @license BSD
|
|
221
|
-
*
|
|
222
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
223
|
-
*/
|
|
224
|
-
/**
|
|
225
|
-
* Add-on for sinon.fakeServer that automatically handles a fake timer along with
|
|
226
|
-
* the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery
|
|
227
|
-
* 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,
|
|
228
|
-
* it polls the object for completion with setInterval. Dispite the direct
|
|
229
|
-
* motivation, there is nothing jQuery-specific in this file, so it can be used
|
|
230
|
-
* in any environment where the ajax implementation depends on setInterval or
|
|
231
|
-
* setTimeout.
|
|
232
|
-
*
|
|
233
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
234
|
-
* @license BSD
|
|
235
|
-
*
|
|
236
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
237
|
-
*/
|
|
238
|
-
!function(){"use strict";function o(t){function e(){}e.prototype=t.fakeServer,t.fakeServerWithClock=new e,t.fakeServerWithClock.addRequest=function(e){if(e.async&&("object"==typeof setTimeout.clock?this.clock=setTimeout.clock:(this.clock=t.useFakeTimers(),this.resetClock=!0),!this.longestTimeout)){var n=this.clock.setTimeout,r=this.clock.setInterval,i=this;this.clock.setTimeout=function(t,e){return i.longestTimeout=Math.max(e,i.longestTimeout||0),n.apply(this,arguments)},this.clock.setInterval=function(t,e){return i.longestTimeout=Math.max(e,i.longestTimeout||0),r.apply(this,arguments)}}return t.fakeServer.addRequest.call(this,e)},t.fakeServerWithClock.respond=function(){var e=t.fakeServer.respond.apply(this,arguments);return this.clock&&(this.clock.tick(this.longestTimeout||0),this.longestTimeout=0,this.resetClock&&(this.clock.restore(),this.resetClock=!1)),e},t.fakeServerWithClock.restore=function(){return this.clock&&this.clock.restore(),t.fakeServer.restore.apply(this,arguments)}}var s=void 0!==t&&t.exports&&!0;function a(t){var e=t("./core");t("./fake_server"),t("./fake_timers"),o(e)}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i):s?a(n(327)):o(sinon)}()},function(t,e,n){var r,i;(function(t,o,s){
|
|
239
|
-
/**
|
|
240
|
-
* Fake timer API
|
|
241
|
-
* setTimeout
|
|
242
|
-
* setInterval
|
|
243
|
-
* clearTimeout
|
|
244
|
-
* clearInterval
|
|
245
|
-
* tick
|
|
246
|
-
* reset
|
|
247
|
-
* Date
|
|
248
|
-
*
|
|
249
|
-
* Inspired by jsUnitMockTimeOut from JsUnit
|
|
250
|
-
*
|
|
251
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
252
|
-
* @license BSD
|
|
253
|
-
*
|
|
254
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
255
|
-
*/
|
|
256
|
-
!function(){"use strict";function a(e,n){var r="undefined"!=typeof lolex?lolex:n;e.useFakeTimers=function(){var t,e=Array.prototype.slice.call(arguments);t="string"==typeof e[0]?0:e.shift();var n=r.install(t||0,e);return n.restore=n.uninstall,n},e.clock={create:function(t){return r.createClock(t)}},e.timers={setTimeout:setTimeout,clearTimeout:clearTimeout,setImmediate:void 0!==t?t:void 0,clearImmediate:void 0!==o?o:void 0,setInterval:setInterval,clearInterval:clearInterval,Date:Date}}var u=void 0!==s&&s.exports&&!0;function c(t,e,n,r){var i=t("./core");a(i,r),n.exports=i}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=c)?r.call(e,n,e,s):r)||(s.exports=i):u?c(n(327),s.exports,s,n(332)):a(sinon)}()}).call(e,n(10).setImmediate,n(10).clearImmediate,n(102)(t))},function(module,exports){(function(global){
|
|
257
|
-
/**
|
|
258
|
-
* @author Christian Johansen (christian@cjohansen.no) and contributors
|
|
259
|
-
* @license BSD
|
|
260
|
-
*
|
|
261
|
-
* Copyright (c) 2010-2014 Christian Johansen
|
|
262
|
-
*/
|
|
263
|
-
!function(global){"use strict";var glbl=global;global.setTimeout=glbl.setTimeout,global.clearTimeout=glbl.clearTimeout,global.setInterval=glbl.setInterval,global.clearInterval=glbl.clearInterval,global.Date=glbl.Date,"setImmediate"in global&&(global.setImmediate=glbl.setImmediate,global.clearImmediate=glbl.clearImmediate);var NOOP=function(){},timeoutResult=setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult;clearTimeout(timeoutResult);var NativeDate=Date,uniqueTimerId=1;function parseTime(t){if(!t)return 0;var e,n=t.split(":"),r=n.length,i=r,o=0;if(r>3||!/^(\d\d:){0,2}\d\d?$/.test(t))throw new Error("tick only understands numbers and 'h:m:s'");for(;i--;){if((e=parseInt(n[i],10))>=60)throw new Error("Invalid time "+t);o+=e*Math.pow(60,r-i-1)}return 1e3*o}function getEpoch(t){if(!t)return 0;if("function"==typeof t.getTime)return t.getTime();if("number"==typeof t)return t;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(t,e,n){return n&&n.callAt>=t&&n.callAt<=e}function mirrorDateProperties(t,e){var n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return e.now?t.now=function(){return t.clock.now}:delete t.now,e.toSource?t.toSource=function(){return e.toSource()}:delete t.toSource,t.toString=function(){return e.toString()},t.prototype=e.prototype,t.parse=e.parse,t.UTC=e.UTC,t.prototype.toUTCString=e.prototype.toUTCString,t}function createDate(){return mirrorDateProperties(function t(e,n,r,i,o,s,a){switch(arguments.length){case 0:return new NativeDate(t.clock.now);case 1:return new NativeDate(e);case 2:return new NativeDate(e,n);case 3:return new NativeDate(e,n,r);case 4:return new NativeDate(e,n,r,i);case 5:return new NativeDate(e,n,r,i,o);case 6:return new NativeDate(e,n,r,i,o,s);default:return new NativeDate(e,n,r,i,o,s,a)}},NativeDate)}function addTimer(t,e){if(void 0===e.func)throw new Error("Callback must be provided to timer calls");return t.timers||(t.timers={}),e.id=uniqueTimerId++,e.createdAt=t.now,e.callAt=t.now+(e.delay||(t.duringTick?1:0)),t.timers[e.id]=e,addTimerReturnsObject?{id:e.id,ref:NOOP,unref:NOOP}:e.id}function compareTimers(t,e){return t.callAt<e.callAt?-1:t.callAt>e.callAt?1:t.immediate&&!e.immediate?-1:!t.immediate&&e.immediate?1:t.createdAt<e.createdAt?-1:t.createdAt>e.createdAt?1:t.id<e.id?-1:t.id>e.id?1:void 0}function firstTimerInRange(t,e,n){var r,i=t.timers,o=null;for(r in i)i.hasOwnProperty(r)&&(!inRange(e,n,i[r])||o&&1!==compareTimers(o,i[r])||(o=i[r]));return o}function callTimer(clock,timer){var exception;"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id];try{"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}catch(t){exception=t}if(clock.timers[timer.id]){if(exception)throw exception}else if(exception)throw exception}function timerType(t){return t.immediate?"Immediate":void 0!==t.interval?"Interval":"Timeout"}function clearTimer(t,e,n){if(e&&(t.timers||(t.timers=[]),"object"==typeof e&&(e=e.id),t.timers.hasOwnProperty(e))){var r=t.timers[e];if(timerType(r)!==n)throw new Error("Cannot clear timer: timer created with set"+n+"() but cleared with clear"+timerType(r)+"()");delete t.timers[e]}}function uninstall(t,e){var n,r,i;for(r=0,i=t.methods.length;r<i;r++)if(e[n=t.methods[r]].hadOwnProperty)e[n]=t["_"+n];else try{delete e[n]}catch(t){}t.methods=[]}function hijackMethod(t,e,n){var r;if(n[e].hadOwnProperty=Object.prototype.hasOwnProperty.call(t,e),n["_"+e]=t[e],"Date"===e){var i=mirrorDateProperties(n[e],t[e]);t[e]=i}else for(r in t[e]=function(){return n[e].apply(n,arguments)},n[e])n[e].hasOwnProperty(r)&&(t[e][r]=n[e][r]);t[e].clock=n}var timers={setTimeout:setTimeout,clearTimeout:clearTimeout,setImmediate:global.setImmediate,clearImmediate:global.clearImmediate,setInterval:setInterval,clearInterval:clearInterval,Date:Date},keys=Object.keys||function(t){var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);return n};function createClock(t){var e={now:getEpoch(t),timeouts:{},Date:createDate()};return e.Date.clock=e,e.setTimeout=function(t,n){return addTimer(e,{func:t,args:Array.prototype.slice.call(arguments,2),delay:n})},e.clearTimeout=function(t){return clearTimer(e,t,"Timeout")},e.setInterval=function(t,n){return addTimer(e,{func:t,args:Array.prototype.slice.call(arguments,2),delay:n,interval:n})},e.clearInterval=function(t){return clearTimer(e,t,"Interval")},e.setImmediate=function(t){return addTimer(e,{func:t,args:Array.prototype.slice.call(arguments,1),immediate:!0})},e.clearImmediate=function(t){return clearTimer(e,t,"Immediate")},e.tick=function(t){t="number"==typeof t?t:parseTime(t);var n,r,i=e.now,o=e.now+t,s=e.now,a=firstTimerInRange(e,i,o);for(e.duringTick=!0;a&&i<=o;){if(e.timers[a.id]){i=e.now=a.callAt;try{n=e.now,callTimer(e,a),n!==e.now&&(i+=e.now-n,o+=e.now-n,s+=e.now-n)}catch(t){r=r||t}}a=firstTimerInRange(e,s,o),s=i}if(e.duringTick=!1,e.now=o,r)throw r;return e.now},e.reset=function(){e.timers={}},e.setSystemTime=function(t){var n=getEpoch(t),r=n-e.now;for(var i in e.now=n,e.timers)if(e.timers.hasOwnProperty(i)){var o=e.timers[i];o.createdAt+=r,o.callAt+=r}},e}exports.timers=timers,exports.createClock=createClock,exports.install=function(t,e,n){var r,i;"number"==typeof t&&(n=e,e=t,t=null),t||(t=global);var o=createClock(e);for(o.uninstall=function(){uninstall(o,t)},o.methods=n||[],0===o.methods.length&&(o.methods=keys(timers)),r=0,i=o.methods.length;r<i;r++)hijackMethod(t,o.methods[r],o);return o}}(global||this)}).call(exports,function(){return this}())},function(t,e,n){var r,i;(function(t,o){"undefined"==typeof sinon&&(void 0===this?(function(){"use strict";return"undefined"!=typeof window?window:t}()).sinon={}:this.sinon={}),function(t){"use strict";var s={XDomainRequest:t.XDomainRequest};function a(e){function n(){this.readyState=n.UNSENT,this.requestBody=null,this.requestHeaders={},this.status=0,this.timeout=null,"function"==typeof n.onCreate&&n.onCreate(this)}e.xdr=s,e.extend(n.prototype,e.EventTarget,{open:function(t,e){this.method=t,this.url=e,this.responseText=null,this.sendFlag=!1,this.readyStateChange(n.OPENED)},readyStateChange:function(t){this.readyState=t;var r="";switch(this.readyState){case n.UNSENT:case n.OPENED:break;case n.LOADING:this.sendFlag&&(r="onprogress");break;case n.DONE:r=this.isTimeout?"ontimeout":this.errorFlag||this.status<200||this.status>299?"onerror":"onload"}if(r&&"function"==typeof this[r])try{this[r]()}catch(t){e.logError("Fake XHR "+r+" handler",t)}},send:function(t){!function(t){if(t.readyState!==n.OPENED)throw new Error("INVALID_STATE_ERR");if(t.sendFlag)throw new Error("INVALID_STATE_ERR")}(this),/^(get|head)$/i.test(this.method)||(this.requestBody=t),this.requestHeaders["Content-Type"]="text/plain;charset=utf-8",this.errorFlag=!1,this.sendFlag=!0,this.readyStateChange(n.OPENED),"function"==typeof this.onSend&&this.onSend(this)},abort:function(){this.aborted=!0,this.responseText=null,this.errorFlag=!0,this.readyState>e.FakeXDomainRequest.UNSENT&&this.sendFlag&&(this.readyStateChange(e.FakeXDomainRequest.DONE),this.sendFlag=!1)},setResponseBody:function(t){!function(t){if(t.readyState===n.UNSENT)throw new Error("Request not sent");if(t.readyState===n.DONE)throw new Error("Request done")}(this),function(t){if("string"!=typeof t){var e=new Error("Attempted to respond to fake XDomainRequest with "+t+", which is not a string.");throw e.name="InvalidBodyException",e}}(t);var e=this.chunkSize||10,r=0;this.responseText="";do{this.readyStateChange(n.LOADING),this.responseText+=t.substring(r,r+e),r+=e}while(r<t.length);this.readyStateChange(n.DONE)},respond:function(t,e,n){this.status="number"==typeof t?t:200,this.setResponseBody(n||"")},simulatetimeout:function(){this.status=0,this.isTimeout=!0,this.responseText=void 0,this.readyStateChange(n.DONE)}}),e.extend(n,{UNSENT:0,OPENED:1,LOADING:3,DONE:4}),e.useFakeXDomainRequest=function(){return e.FakeXDomainRequest.restore=function(n){s.supportsXDR&&(t.XDomainRequest=s.GlobalXDomainRequest),delete e.FakeXDomainRequest.restore,!0!==n&&delete e.FakeXDomainRequest.onCreate},s.supportsXDR&&(t.XDomainRequest=e.FakeXDomainRequest),e.FakeXDomainRequest},e.FakeXDomainRequest=n}s.GlobalXDomainRequest=t.XDomainRequest,s.supportsXDR=void 0!==s.GlobalXDomainRequest,s.workingXDR=!!s.supportsXDR&&s.GlobalXDomainRequest;var u=void 0!==o&&o.exports&&!0;function c(t,e,n){var r=t("./core");t("../extend"),t("./event"),t("../log_error"),a(r),n.exports=r}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=c)?r.call(e,n,e,o):r)||(o.exports=i):u?c(n(327),o.exports,o):a(sinon)}(void 0!==t?t:self)}).call(e,function(){return this}(),n(102)(t))},function(t,e,n){var r,i;(function(t,o){
|
|
264
|
-
/**
|
|
265
|
-
* Fake XMLHttpRequest object
|
|
266
|
-
*
|
|
267
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
268
|
-
* @license BSD
|
|
269
|
-
*
|
|
270
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
271
|
-
*/
|
|
272
|
-
!function(t,s){"use strict";var a="undefined"!=typeof ProgressEvent,u="undefined"!=typeof CustomEvent,c="undefined"!=typeof FormData,f="undefined"!=typeof ArrayBuffer,l=function(){try{return!!new Blob}catch(t){return!1}}(),h={XMLHttpRequest:s.XMLHttpRequest};h.GlobalXMLHttpRequest=s.XMLHttpRequest,h.GlobalActiveXObject=s.ActiveXObject,h.supportsActiveX=void 0!==h.GlobalActiveXObject,h.supportsXHR=void 0!==h.GlobalXMLHttpRequest,h.workingXHR=function(t){return void 0!==t.XMLHttpRequest?t.XMLHttpRequest:!(void 0===t.ActiveXObject)&&function(){return new t.ActiveXObject("MSXML2.XMLHTTP.3.0")}}(s),h.supportsCORS=h.supportsXHR&&"withCredentials"in new h.GlobalXMLHttpRequest;var p={"Accept-Charset":!0,"Accept-Encoding":!0,Connection:!0,"Content-Length":!0,Cookie:!0,Cookie2:!0,"Content-Transfer-Encoding":!0,Date:!0,Expect:!0,Host:!0,"Keep-Alive":!0,Referer:!0,TE:!0,Trailer:!0,"Transfer-Encoding":!0,Upgrade:!0,"User-Agent":!0,Via:!0};function d(){this.eventListeners={abort:[],error:[],load:[],loadend:[],progress:[]}}function y(){this.readyState=y.UNSENT,this.requestHeaders={},this.requestBody=null,this.status=0,this.statusText="",this.upload=new d,this.responseType="",this.response="",h.supportsCORS&&(this.withCredentials=!1);var t=this,e=["loadstart","load","abort","error","loadend"];function n(e){t.addEventListener(e,function(n){var r=t["on"+e];r&&"function"==typeof r&&r.call(this,n)})}for(var r=e.length-1;r>=0;r--)n(e[r]);"function"==typeof y.onCreate&&y.onCreate(this)}function v(t){if(t.readyState!==y.OPENED)throw new Error("INVALID_STATE_ERR");if(t.sendFlag)throw new Error("INVALID_STATE_ERR")}function g(t,e){for(var n in e=e.toLowerCase(),t)if(n.toLowerCase()===e)return n;return null}function m(t,e){if(t)for(var n=0,r=t.length;n<r;n+=1)e(t[n])}d.prototype.addEventListener=function(t,e){this.eventListeners[t].push(e)},d.prototype.removeEventListener=function(t,e){for(var n=this.eventListeners[t]||[],r=0,i=n.length;r<i;++r)if(n[r]===e)return n.splice(r,1)},d.prototype.dispatchEvent=function(t){for(var e,n=this.eventListeners[t.type]||[],r=0;null!=(e=n[r]);r++)e(t)};var b=function(t,e,n){switch(n.length){case 0:return t[e]();case 1:return t[e](n[0]);case 2:return t[e](n[0],n[1]);case 3:return t[e](n[0],n[1],n[2]);case 4:return t[e](n[0],n[1],n[2],n[3]);case 5:return t[e](n[0],n[1],n[2],n[3],n[4])}};y.filters=[],y.addFilter=function(t){this.filters.push(t)};var _=/MSIE 6/;function w(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=256)throw new TypeError("arraybuffer or blob responseTypes require binary string, invalid character "+t[r]+" found.");n[r]=i}return e}function E(t){return!t||/(text\/xml)|(application\/xml)|(\+xml)/.test(t)}function x(t){""===t.responseType||"text"===t.responseType?t.response=t.responseText="":t.response=t.responseText=null,t.responseXML=null}function T(t){t.xhr=h,t.extend(y.prototype,t.EventTarget,{async:!0,open:function(t,e,n,r,i){if(this.method=t,this.url=e,this.async="boolean"!=typeof n||n,this.username=r,this.password=i,x(this),this.requestHeaders={},this.sendFlag=!1,!0===y.useFilters){var o=arguments;if(function(t,e){for(var n=0;n<t.length;n++)if(!0===e(t[n]))return!0;return!1}(y.filters,function(t){return t.apply(this,o)}))return y.defake(this,arguments)}this.readyStateChange(y.OPENED)},readyStateChange:function(e){this.readyState=e;var n,r,i=new t.Event("readystatechange",!1,!1,this);if("function"==typeof this.onreadystatechange)try{this.onreadystatechange(i)}catch(e){t.logError("Fake XHR onreadystatechange handler",e)}this.readyState===y.DONE&&(r={loaded:this.progress||0,total:this.progress||0},n=0===this.status?this.aborted?"abort":"error":"load",a&&(this.upload.dispatchEvent(new t.ProgressEvent("progress",r,this)),this.upload.dispatchEvent(new t.ProgressEvent(n,r,this)),this.upload.dispatchEvent(new t.ProgressEvent("loadend",r,this))),this.dispatchEvent(new t.ProgressEvent("progress",r,this)),this.dispatchEvent(new t.ProgressEvent(n,r,this)),this.dispatchEvent(new t.ProgressEvent("loadend",r,this))),this.dispatchEvent(i)},setRequestHeader:function(t,e){if(v(this),p[t]||/^(Sec-|Proxy-)/.test(t))throw new Error('Refused to set unsafe header "'+t+'"');this.requestHeaders[t]?this.requestHeaders[t]+=","+e:this.requestHeaders[t]=e},setResponseHeaders:function(t){for(var e in function(t){if(t.readyState!==y.OPENED)throw new Error("INVALID_STATE_ERR - "+t.readyState)}(this),this.responseHeaders={},t)t.hasOwnProperty(e)&&(this.responseHeaders[e]=t[e]);this.async?this.readyStateChange(y.HEADERS_RECEIVED):this.readyState=y.HEADERS_RECEIVED},send:function(e){if(v(this),!/^(get|head)$/i.test(this.method)){var n=g(this.requestHeaders,"Content-Type");if(this.requestHeaders[n]){var r=this.requestHeaders[n].split(";");this.requestHeaders[n]=r[0]+";charset=utf-8"}else!c||e instanceof FormData||(this.requestHeaders["Content-Type"]="text/plain;charset=utf-8");this.requestBody=e}this.errorFlag=!1,this.sendFlag=this.async,x(this),this.readyStateChange(y.OPENED),"function"==typeof this.onSend&&this.onSend(this),this.dispatchEvent(new t.Event("loadstart",!1,!1,this))},abort:function(){this.aborted=!0,x(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyState>y.UNSENT&&this.sendFlag&&(this.readyStateChange(y.DONE),this.sendFlag=!1),this.readyState=y.UNSENT},error:function(){x(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyStateChange(y.DONE)},getResponseHeader:function(t){return this.readyState<y.HEADERS_RECEIVED?null:/^Set-Cookie2?$/i.test(t)?null:(t=g(this.responseHeaders,t),this.responseHeaders[t]||null)},getAllResponseHeaders:function(){if(this.readyState<y.HEADERS_RECEIVED)return"";var t="";for(var e in this.responseHeaders)this.responseHeaders.hasOwnProperty(e)&&!/^Set-Cookie2?$/i.test(e)&&(t+=e+": "+this.responseHeaders[e]+"\r\n");return t},setResponseBody:function(t){!function(t){if(t.readyState===y.DONE)throw new Error("Request done")}(this),function(t){if(t.async&&t.readyState!==y.HEADERS_RECEIVED)throw new Error("No headers received")}(this),function(t){if("string"!=typeof t){var e=new Error("Attempted to respond to fake XMLHttpRequest with "+t+", which is not a string.");throw e.name="InvalidBodyException",e}}(t);var e=this.getResponseHeader("Content-Type"),n=""===this.responseType||"text"===this.responseType;if(x(this),this.async){var r=this.chunkSize||10,i=0;do{this.readyStateChange(y.LOADING),n&&(this.responseText=this.response+=t.substring(i,i+r)),i+=r}while(i<t.length)}this.response=function(t,e,n){if(""===t||"text"===t)return n;if(f&&"arraybuffer"===t)return w(n);if("json"===t)try{return JSON.parse(n)}catch(t){return null}else{if(l&&"blob"===t){var r={};return e&&(r.type=e),new Blob([w(n)],r)}if("document"===t)return E(e)?y.parseXML(n):null}throw new Error("Invalid responseType "+t)}(this.responseType,e,t),n&&(this.responseText=this.response),"document"===this.responseType?this.responseXML=this.response:""===this.responseType&&E(e)&&(this.responseXML=y.parseXML(this.responseText)),this.progress=t.length,this.readyStateChange(y.DONE)},respond:function(t,e,n){this.status="number"==typeof t?t:200,this.statusText=y.statusCodes[this.status],this.setResponseHeaders(e||{}),this.setResponseBody(n||"")},uploadProgress:function(e){a&&this.upload.dispatchEvent(new t.ProgressEvent("progress",e))},downloadProgress:function(e){a&&this.dispatchEvent(new t.ProgressEvent("progress",e))},uploadError:function(e){u&&this.upload.dispatchEvent(new t.CustomEvent("error",{detail:e}))}}),t.extend(y,{UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4}),t.useFakeXMLHttpRequest=function(){return y.restore=function(t){h.supportsXHR&&(s.XMLHttpRequest=h.GlobalXMLHttpRequest),h.supportsActiveX&&(s.ActiveXObject=h.GlobalActiveXObject),delete y.restore,!0!==t&&delete y.onCreate},h.supportsXHR&&(s.XMLHttpRequest=y),h.supportsActiveX&&(s.ActiveXObject=function(t){return"Microsoft.XMLHTTP"===t||/^Msxml2\.XMLHTTP/i.test(t)?new y:new h.GlobalActiveXObject(t)}),y},t.FakeXMLHttpRequest=y}y.defake=function(t,e){var n=new h.workingXHR;m(["open","setRequestHeader","send","abort","getResponseHeader","getAllResponseHeaders","addEventListener","overrideMimeType","removeEventListener"],function(e){t[e]=function(){return b(n,e,arguments)}});var r=function(e){m(e,function(e){try{t[e]=n[e]}catch(t){if(!_.test(navigator.userAgent))throw t}})},i=function(){t.readyState=n.readyState,n.readyState>=y.HEADERS_RECEIVED&&r(["status","statusText"]),n.readyState>=y.LOADING&&r(["responseText","response"]),n.readyState===y.DONE&&r(["responseXML"]),t.onreadystatechange&&t.onreadystatechange.call(t,{target:t})};if(n.addEventListener){for(var o in t.eventListeners)t.eventListeners.hasOwnProperty(o)&&m(t.eventListeners[o],function(t){n.addEventListener(o,t)});n.addEventListener("readystatechange",i)}else n.onreadystatechange=i;b(n,"open",e)},y.useFilters=!1,y.parseXML=function(t){if(""!==t)try{if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(t,"text/xml");var e=new window.ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e}catch(t){}return null},y.statusCodes={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choice",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};var S=void 0!==o&&o.exports&&!0;function k(t,e,n){var r=t("./core");t("../extend"),t("./event"),t("../log_error"),T(r),n.exports=r}"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=k)?r.call(e,n,e,o):r)||(o.exports=i):S?k(n(327),o.exports,o):t&&T(t)}("object"==typeof sinon&&sinon,void 0!==t?t:self)}).call(e,function(){return this}(),n(102)(t))},function(t,e){
|
|
273
|
-
/**
|
|
274
|
-
* Helps IE run the fake timers. By defining global functions, IE allows
|
|
275
|
-
* them to be overwritten at a later point. If these are not defined like
|
|
276
|
-
* this, overwriting them will result in anything from an exception to browser
|
|
277
|
-
* crash.
|
|
278
|
-
*
|
|
279
|
-
* If you don't require fake timers to work in IE, don't include this file.
|
|
280
|
-
*
|
|
281
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
282
|
-
* @license BSD
|
|
283
|
-
*
|
|
284
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
285
|
-
*/
|
|
286
|
-
if("undefined"!=typeof window){sinon.timers.setTimeout,sinon.timers.clearTimeout,sinon.timers.setImmediate,sinon.timers.clearImmediate,sinon.timers.setInterval,sinon.timers.clearInterval,sinon.timers.Date}},function(t,e){if("undefined"!=typeof window){sinon.xdr.XDomainRequest||void 0}},function(t,e){
|
|
287
|
-
/**
|
|
288
|
-
* Helps IE run the fake XMLHttpRequest. By defining global functions, IE allows
|
|
289
|
-
* them to be overwritten at a later point. If these are not defined like
|
|
290
|
-
* this, overwriting them will result in anything from an exception to browser
|
|
291
|
-
* crash.
|
|
292
|
-
*
|
|
293
|
-
* If you don't require fake XHR to work in IE, don't include this file.
|
|
294
|
-
*
|
|
295
|
-
* @author Christian Johansen (christian@cjohansen.no)
|
|
296
|
-
* @license BSD
|
|
297
|
-
*
|
|
298
|
-
* Copyright (c) 2010-2013 Christian Johansen
|
|
299
|
-
*/
|
|
300
|
-
if("undefined"!=typeof window){sinon.xhr.XMLHttpRequest||void 0}},function(t,e,n){var r,i;(function(t){!function(o){"use strict";function s(t){return t.walk=function(t,e,n){return function t(e,n,r,i,o){var s,a;if("function"==typeof Object.getOwnPropertyNames)Object.getOwnPropertyNames(e).forEach(function(t){if(!0!==o[t]){o[t]=!0;var s="function"==typeof Object.getOwnPropertyDescriptor(e,t).get?i:e;n.call(r,s[t],t,s)}}),(s=Object.getPrototypeOf(e))&&t(s,n,r,i,o);else for(a in e)n.call(r,e[a],a,e)}(t,e,n,t,{})},t.walk}function a(t,e,n){var r=t("./util/core");n.exports=s(r)}var u=void 0!==t&&t.exports&&!0;"object"==typeof n(305)&&n(305)?void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i):u?a(n(308),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r=n(340),i=Object.prototype;try{var o=r.extend("should",i);r._prevShould=o}catch(t){}t.exports=r},function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var i=r(n(341)),o=r(n(342)),s=r(n(343)),a=n(344),u=n(345);function c(t){return"symbol"==typeof t?t:String(t)}var f=s.functionName,l={typeAdaptors:a.defaultTypeAdaptorStorage,getFormatter:function(t){return new s.Formatter(t||l)}};function h(t,e){return l.getFormatter(e).format(t)}function p(t){var e=l.getFormatter();return s.formatPlainObjectKey.call(e,t)}function d(t){if(u.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message},configurable:!0,enumerable:!1}),Error.captureStackTrace)Error.captureStackTrace(this,this.stackStartFunction);else{var e=new Error;if(e.stack){var n=e.stack;if(this.stackStartFunction){var r=f(this.stackStartFunction),i=n.indexOf("\n"+r);if(i>=0){var o=n.indexOf("\n",i+1);n=n.substring(o+1)}}this.stack=n}}}var y=" ";function v(t){return y+t}function g(t){u.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message}})}function m(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}function b(){m.apply(this,arguments)}d.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=h(this.actual),e="expected"in this?" "+h(this.expected):"",n="details"in this&&this.details?" ("+this.details+")":"",r=this.previous?"\n"+function(t){return t.split("\n").map(v).join("\n")}(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+n+r}}}),g.prototype={generateMessage:d.prototype.generateMessage},m.prototype={constructor:m,assert:function(t){if(t)return this;var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,this.light?new g(e):new d(e)},fail:function(){return this.assert(!1)}},b.prototype.then=function(t,e){return this.obj.then(t,e)},m.add=function(t,e){Object.defineProperty(m.prototype,t,{enumerable:!0,configurable:!0,value:function(){var n=new m(this.obj,this,t);n.anyOne=this.anyOne,n.onlyThis=this.onlyThis,n.light=!0;try{e.apply(n,arguments)}catch(t){if(t instanceof d||t instanceof g){if(this.negate)return this.obj=n.obj,this.negate=!1,this;n!==t.assertion&&(n.params.previous=t),n.negate=!1,n.light=!1,n.fail()}throw t}return this.negate&&(n.negate=!0,n.params.details="false negative fail",n.light=!1,n.fail()),this.params.operator||(this.params=n.params),this.obj=n.obj,this.negate=!1,this}}),Object.defineProperty(b.prototype,t,{enumerable:!0,configurable:!0,value:function(){var e=arguments;return this.obj=this.obj.then(function(n){return n[t].apply(n,e)}),this}})},m.addChain=function(t,e){e=e||function(){},Object.defineProperty(m.prototype,t,{get:function(){return e.call(this),this},enumerable:!0}),Object.defineProperty(b.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.obj=this.obj.then(function(e){return e[t]}),this}})},m.alias=function(t,e){var n=Object.getOwnPropertyDescriptor(m.prototype,t);if(!n)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(m.prototype,e,n);var r=Object.getOwnPropertyDescriptor(b.prototype,t);r&&Object.defineProperty(b.prototype,e,r)},m.addChain("not",function(){this.negate=!this.negate}),m.addChain("any",function(){this.anyOne=!0}),m.addChain("only",function(){this.onlyThis=!0});var _=Array.prototype.slice,w=x;function E(t,e,n,r,i){var o=new m(t);o.params={operator:r,expected:e,message:n,stackStartFunction:i||E},o.fail()}function x(t,e){t||E(t,!0,e,"==",w.ok)}function T(t,e){return!(!t||!e)&&("[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e||!0===e.call({},t))}function S(t,e,n,r){var i;"string"==typeof n&&(r=n,n=null);try{e()}catch(t){i=t}if(r=(n&&n.name?" ("+n.name+")":".")+(r?" "+r:"."),t&&!i&&E(i,n,"Missing expected exception"+r),!t&&T(i,n)&&E(i,n,"Got unwanted exception"+r),t&&i&&n&&!T(i,n)||!t&&i)throw i}w.fail=E,w.ok=x,w.equal=function(t,e,n){t!=e&&E(t,e,n,"==",w.equal)},w.notEqual=function(t,e,n){t==e&&E(t,e,n,"!=",w.notEqual)},w.deepEqual=function(t,e,n){0!==o(t,e).length&&E(t,e,n,"deepEqual",w.deepEqual)},w.notDeepEqual=function(t,e,n){o(t,e).result&&E(t,e,n,"notDeepEqual",w.notDeepEqual)},w.strictEqual=function(t,e,n){t!==e&&E(t,e,n,"===",w.strictEqual)},w.notStrictEqual=function(t,e,n){t===e&&E(t,e,n,"!==",w.notStrictEqual)},w.throws=function(){S.apply(this,[!0].concat(_.call(arguments)))},w.doesNotThrow=function(){S.apply(this,[!1].concat(_.call(arguments)))},w.ifError=function(t){if(t)throw t};var k=Array.prototype.slice;function A(t){return new m(t)}A.AssertionError=d,A.Assertion=m,A.modules={format:s,type:i,equal:o},A.format=h,A.config=l,A.extend=function(t,e){t=t||"should",e=e||Object.prototype;var n=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return A(function(t){return t instanceof Number||t instanceof String||t instanceof Boolean}(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:n,proto:e}},A.noConflict=function(t){return(t=t||A._prevShould)&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),A},A.use=function(t){return t(A,A.Assertion),this},A.use(function(t){var e=t.format;u.merge(t,w),t.exist=t.exists=function(n,r){if(null==n)throw new d({message:r||"expected "+e(n)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(n,r){if(null!=n)throw new d({message:r||"expected "+e(n)+" to not exist",stackStartFunction:t.not.exist})}}).use(function(t,e){["an","of","a","and","be","been","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}).use(function(t,e){e.add("true",function(t){this.is.exactly(!0,t)}),e.alias("true","True"),e.add("false",function(t){this.is.exactly(!1,t)}),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)})}).use(function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!=this.obj)}),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number().and.not.a.NaN().and.assert(!isFinite(this.obj))}),e.add("within",function(t,e,n){this.params={operator:"to be within "+t+".."+e,message:n},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,n){this.params={operator:"to be approximately "+t+" ±"+e,message:n},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj<t)}),e.alias("above","greaterThan"),e.alias("below","lessThan"),e.add("aboveOrEqual",function(t,e){this.params={operator:"to be above or equal"+t,message:e},this.assert(this.obj>=t)}),e.add("belowOrEqual",function(t,e){this.params={operator:"to be below or equal"+t,message:e},this.assert(this.obj<=t)}),e.alias("aboveOrEqual","greaterThanOrEqual"),e.alias("belowOrEqual","lessThanOrEqual")}).use(function(t,e){function n(n,r,i){e.add(n,function(e){1!==arguments.length?e=Array.prototype.slice.call(arguments):t(e).be.Array(),this.params={operator:r,expected:e};var n=this.obj,o=!1;a.forEach(e,function(e){try{return t(e)[i](n),o=!0,!1}catch(e){if(e instanceof t.AssertionError)return;throw e}}),this.assert(o)})}e.add("eql",function(e,n){this.params={operator:"to equal",expected:e,message:n};var r=this.obj,s=o(this.obj,e,t.config);this.params.details=s.map(function(t){return function(t,e,n){return((t.path.length>0?"at "+t.path.map(p).join(" -> "):"")+(t.a===e?"":", A has "+h(t.a))+(t.b===n?"":" and B has "+h(t.b))+(t.showReason?" because "+t.reason:"")).trim()}(t,r,e)}).join(", "),this.params.showDiff=0===o(i(r),i(e)).length,this.assert(0===s.length)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=0===o(i(this.obj),i(t)).length,this.assert(t===this.obj)}),e.alias("equal","exactly"),e.alias("eql","deepEqual"),n("equalOneOf","to be equals one of","equal"),n("oneOf","to be one of","eql")}).use(function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.have.type("number")}),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have.class("Arguments")}),e.alias("arguments","Arguments"),e.add("type",function(e,n){this.params={operator:"to have type "+e,message:n},t(typeof this.obj).be.exactly(e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+f(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.have.type("function")}),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not.null().and.have.type("object")}),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")}),e.add("Array",function(){this.params={operator:"to be an array"},this.have.class("Array")}),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")}),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)}),e.add("Date",function(){this.params={operator:"to be a date"},this.have.instanceOf(Date)}),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)}),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)}),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function()}),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function()}),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())})}).use(function(t,e){e.add("startWith",function(e,n){this.params={operator:"to start with "+t.format(e),message:n},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,n){this.params={operator:"to end with "+t.format(e),message:n},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}).use(function(t,e){var n=t.format;e.add("propertyWithDescriptor",function(e,r){this.params={actual:this.obj,operator:"to have own property with descriptor "+n(r)};var i=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(i),e)).have.properties(r)}),e.add("enumerable",function(t,e){t=c(t),this.params={operator:"to have enumerable property "+p(t)+(arguments.length>1?" equal to "+n(e):"")};var r={enumerable:!0};arguments.length>1&&(r.value=e),this.have.propertyWithDescriptor(t,r)}),e.add("enumerables",function(){var e=function(){var t={};if(arguments.length>1)t.names=k.call(arguments);else{var e=arguments[0];"string"==typeof e?t.names=[e]:Array.isArray(e)?t.names=e:(t.names=Object.keys(e),t.values=e)}return t}.apply(null,arguments);this.params={operator:"to have enumerables "+e.names.map(p)};var n=this.obj;e.names.forEach(function(e){t(n).have.enumerable(e)})}),e.add("property",function(t,e){if(t=c(t),arguments.length>1){var n={};n[t]=e,this.have.properties(n)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=k.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var r=Object(this.obj),i=[];t.forEach(function(t){t in r||i.push(p(t))});var s=i;0===s.length?s=t.map(p):this.anyOne&&(s=t.filter(function(t){return i.indexOf(p(t))<0}).map(p));var a=(1===s.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+s.join(", ");this.params={obj:this.obj,operator:a},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var u=Object.keys(e);if(u.length){var c=[];s=[],u.forEach(function(t){var i=e[t];0!==o(r[t],i).length?c.push(p(t)+" of "+n(i)+" (got "+n(r[t])+")"):s.push(p(t)+" of "+n(i))}),(0!==c.length&&!this.anyOne||this.anyOne&&0===s.length)&&(s=c),a=(1===s.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+s.join(", "),this.params={obj:this.obj,operator:a},this.assert(0===c.length||this.anyOne&&c.length!=u.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf"),e.add("ownProperty",function(t,e){t=c(t),this.params={actual:this.obj,operator:"to have own property "+p(t),message:e},this.assert(u.hasOwnProperty(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){this.params={operator:"to be empty"},this.assert(a.isEmpty(this.obj))},!0),e.add("keys",function(t){t=k.call(arguments);var e=Object(this.obj),n=t.filter(function(t){return!a.has(e,t)}),r="to have "+(this.onlyThis?"only ":"")+(1===t.length?"key ":"keys ");this.params={operator:r+t.join(", ")},n.length>0&&(this.params.operator+="\n\tmissing keys: "+n.join(", ")),this.assert(0===n.length),this.onlyThis&&e.should.have.size(t.length)}),e.add("key",function(t){this.have.keys(t),this.obj=a.get(this.obj,t)}),e.add("value",function(t,e){this.have.key(t).which.is.eql(e)}),e.add("size",function(t){this.params={operator:"to have size "+t},a.size(this.obj).should.be.exactly(t)}),e.add("propertyByPath",function(e){var n=(e=k.call(arguments)).map(p);e=e.map(c);for(var r,i=t(Object(this.obj)),o=[];e.length;)r=e.shift(),this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+p(r)},i=i.have.property(r),o.push(r);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=i.obj})}).use(function(t,e){var n=t.format;e.add("throw",function(e,r){var i=this.obj,o={},s="",a=!1;if(u.isGeneratorFunction(i))return t(i()).throw(e,r);if(u.isIterator(i))return t(i.next.bind(i)).throw(e,r);this.is.a.Function();var c=!0;try{i()}catch(t){a=!0,o=t}if(a)if(e){if("string"==typeof e)c=e==o.message;else if(e instanceof RegExp)c=e.test(o.message);else if("function"==typeof e)c=o instanceof e;else if(null!=e)try{t(o).match(e)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,c=!1}if(c){if("function"==typeof e&&r)try{t(o).match(r)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,c=!1}}else"string"==typeof e||e instanceof RegExp?s=" with a message matching "+n(e)+", but got '"+o.message+"'":"function"==typeof e&&(s=" of type "+f(e)+", but got "+f(o.constructor))}else s=" (got "+n(o)+")";this.params={operator:"to throw exception"+s},this.assert(a),this.assert(c)}),e.alias("throw","throwError")}).use(function(t,e){var n=t.format;e.add("match",function(e,r){if(this.params={operator:"to match "+n(e),message:r},0!==o(this.obj,e).length)if(e instanceof RegExp)if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(null!=this.obj&&"object"==typeof this.obj){var i=[],s=[];a.forEach(this.obj,function(t,r){e.exec(t)?s.push(p(r)):i.push(p(r)+" ("+n(t)+")")},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),s.length&&(this.params.operator+="\n matched properties: "+s.join(", ")),this.assert(0===i.length)}else this.assert(!1);else if("function"==typeof e){var u;"boolean"==typeof(u=e(this.obj))&&this.assert(u)}else null!=e&&null!=this.obj&&"object"==typeof e&&"object"==typeof this.obj?(i=[],s=[],a.forEach(e,function(e,r){try{t(this.obj).have.property(r).which.match(e),s.push(p(r))}catch(e){if(!(e instanceof t.AssertionError))throw e;i.push(p(r)+" ("+n(this.obj[r])+")")}},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),s.length&&(this.params.operator+="\n matched properties: "+s.join(", ")),this.assert(0===i.length)):this.assert(!1)}),e.add("matchEach",function(e,r){this.params={operator:"to match each "+n(e),message:r},a.forEach(this.obj,function(n){t(n).match(e)},this)}),e.add("matchAny",function(e,r){this.params={operator:"to match any "+n(e),message:r},this.assert(a.some(this.obj,function(n){try{return t(n).match(e),!0}catch(e){if(e instanceof t.AssertionError)return!1;throw e}}))}),e.alias("matchAny","matchSome"),e.alias("matchEach","matchEvery")}).use(function(t,e){var n=t.format;e.add("containEql",function(e){this.params={operator:"to contain "+n(e)},this.is.not.null().and.not.undefined();var r=this.obj;"string"==typeof r?this.assert(r.indexOf(String(e))>=0):a.isIterable(r)?this.assert(a.some(r,function(t){return 0===o(t,e).length})):a.forEach(e,function(e,n){t(r).have.value(n,e)},this)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+n(e)};var r=this.obj;if("string"==typeof r)this.is.equal(String(e));else if(a.isIterable(r)&&a.isIterable(e)){for(var i=a.iterator(r),o=a.iterator(e),s=i.next(),u=o.next();!s.done&&!u.done;){try{t(s.value[1]).containDeepOrdered(u.value[1]),u=o.next()}catch(e){if(!(e instanceof t.AssertionError))throw e}s=i.next()}this.assert(u.done)}else null!=r&&null!=e&&"object"==typeof r&&"object"==typeof e?(a.forEach(e,function(e,n){t(r[n]).containDeepOrdered(e)}),a.isEmpty(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+n(e)};var r=this.obj;if("string"==typeof r)this.is.equal(String(e));else if(a.isIterable(r)&&a.isIterable(e)){var i={};a.forEach(e,function(e){this.assert(a.some(r,function(n,r){if(r in i)return!1;try{return t(n).containDeep(e),i[r]=!0,!0}catch(e){if(e instanceof t.AssertionError)return!1;throw e}}))},this)}else null!=r&&null!=e&&"object"==typeof r&&"object"==typeof e?(a.forEach(e,function(e,n){t(r[n]).containDeep(e)}),a.isEmpty(e)&&this.eql(e)):this.eql(e)})}).use(function(t,e){e.add("Promise",function(){this.params={operator:"to be promise"};var e=this.obj;t(e).have.property("then").which.is.a.Function()}),e.prototype.fulfilled=function(){this.params={operator:"to be fulfilled"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(t){return e.negate&&e.fail(),t},function(n){return e.negate||(e.params.operator+=", but it was rejected with "+t.format(n),e.fail()),n})},e.prototype.rejected=function(){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(n){return e.negate||(e.params.operator+=", but it was fulfilled",0!=arguments.length&&(e.params.operator+=" with "+t.format(n)),e.fail()),n},function(t){return e.negate&&e.fail(),t})},e.prototype.fulfilledWith=function(e){this.params={operator:"to be fulfilled with "+t.format(e)},t(this.obj).be.a.Promise();var n=this;return this.obj.then(function(r){return n.negate&&n.fail(),t(r).eql(e),r},function(e){return n.negate||(n.params.operator+=", but it was rejected with "+t.format(e),n.fail()),e})},e.prototype.rejectedWith=function(e,n){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var r=this;return this.obj.then(function(t){return r.negate||r.fail(),t},function(i){r.negate&&r.fail();var o=!0,s="";if("string"==typeof e)o=e===i.message;else if(e instanceof RegExp)o=e.test(i.message);else if("function"==typeof e)o=i instanceof e;else if(null!==e&&"object"==typeof e)try{t(i).match(e)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,o=!1}if(o){if("function"==typeof e&&n)try{t(i).match(n)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,o=!1}}else"string"==typeof e||e instanceof RegExp?s=" with a message matching "+t.format(e)+", but got '"+i.message+"'":"function"==typeof e&&(s=" of type "+f(e)+", but got "+f(i.constructor));return r.params.operator+=s,r.assert(o),i})},Object.defineProperty(e.prototype,"finally",{get:function(){t(this.obj).be.a.Promise();var e=this;return new b(this.obj.then(function(n){var r=t(n);return r.negate=e.negate,r.anyOne=e.anyOne,r}))}}),e.alias("finally","eventually")}),t.exports=A},function(t,e,n){(function(e){"use strict";var n={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",HOST:"host",XHR:"xhr",SIMD:"simd"};function r(t,e,n){if(!t)throw new Error("Type class must be initialized at least with `type` information");this.type=t,this.cls=e,this.sub=n}r.prototype={toString:function(t){t=t||";";var e=[this.type];return this.cls&&e.push(this.cls),this.sub&&e.push(this.sub),e.join(t)},toTryTypes:function(){var t=[];return this.sub&&t.push(new r(this.type,this.cls,this.sub)),this.cls&&t.push(new r(this.type,this.cls)),t.push(new r(this.type)),t}};var i=Object.prototype.toString;function o(){this.checks=[]}o.prototype={add:function(t){return this.checks.push(t),this},addBeforeFirstMatch:function(t,e){var n=this.getFirstMatch(t);n?this.checks.splice(n.index,0,e):this.add(e)},addTypeOf:function(t,e){return this.add(function(n,i){if(i===t)return new r(e)})},addClass:function(t,e,i){return this.add(function(o,s,a){if(a===t)return new r(n.OBJECT,e,i)})},getFirstMatch:function(t){for(var e=typeof t,n=i.call(t),r=0,o=this.checks.length;r<o;r++){var s=this.checks[r].call(this,t,e,n);if(void 0!==s)return{result:s,func:this.checks[r],index:r}}},getType:function(t){var e=this.getFirstMatch(t);return e&&e.result}};var s=new o;function a(t){return s.getType(t)}s.addTypeOf(n.NUMBER,n.NUMBER).addTypeOf(n.UNDEFINED,n.UNDEFINED).addTypeOf(n.STRING,n.STRING).addTypeOf(n.BOOLEAN,n.BOOLEAN).addTypeOf(n.FUNCTION,n.FUNCTION).addTypeOf(n.SYMBOL,n.SYMBOL).add(function(t){if(null===t)return new r(n.NULL)}).addClass("[object String]",n.STRING).addClass("[object Boolean]",n.BOOLEAN).addClass("[object Number]",n.NUMBER).addClass("[object Array]",n.ARRAY).addClass("[object RegExp]",n.REGEXP).addClass("[object Error]",n.ERROR).addClass("[object Date]",n.DATE).addClass("[object Arguments]",n.ARGUMENTS).addClass("[object ArrayBuffer]",n.ARRAY_BUFFER).addClass("[object Int8Array]",n.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",n.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",n.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",n.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",n.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",n.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",n.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",n.TYPED_ARRAY,"float32").addClass("[object Float64Array]",n.TYPED_ARRAY,"float64").addClass("[object Bool16x8]",n.SIMD,"bool16x8").addClass("[object Bool32x4]",n.SIMD,"bool32x4").addClass("[object Bool8x16]",n.SIMD,"bool8x16").addClass("[object Float32x4]",n.SIMD,"float32x4").addClass("[object Int16x8]",n.SIMD,"int16x8").addClass("[object Int32x4]",n.SIMD,"int32x4").addClass("[object Int8x16]",n.SIMD,"int8x16").addClass("[object Uint16x8]",n.SIMD,"uint16x8").addClass("[object Uint32x4]",n.SIMD,"uint32x4").addClass("[object Uint8x16]",n.SIMD,"uint8x16").addClass("[object DataView]",n.DATA_VIEW).addClass("[object Map]",n.MAP).addClass("[object WeakMap]",n.WEAK_MAP).addClass("[object Set]",n.SET).addClass("[object WeakSet]",n.WEAK_SET).addClass("[object Promise]",n.PROMISE).addClass("[object Blob]",n.BLOB).addClass("[object File]",n.FILE).addClass("[object FileList]",n.FILE_LIST).addClass("[object XMLHttpRequest]",n.XHR).add(function(t){if(typeof Promise===n.FUNCTION&&t instanceof Promise||typeof t.then===n.FUNCTION)return new r(n.OBJECT,n.PROMISE)}).add(function(t){if(void 0!==e&&t instanceof e)return new r(n.OBJECT,n.BUFFER)}).add(function(t){if("undefined"!=typeof Node&&t instanceof Node)return new r(n.OBJECT,n.HTML_ELEMENT,t.nodeName)}).add(function(t){if(t.Boolean===Boolean&&t.Number===Number&&t.String===String&&t.Date===Date)return new r(n.OBJECT,n.HOST)}).add(function(){return new r(n.OBJECT)}),a.checker=s,a.TypeChecker=o,a.Type=r,Object.keys(n).forEach(function(t){a[t]=n[t]}),t.exports=a}).call(e,n(177).Buffer)},function(t,e,n){"use strict";var r=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(n(341));function i(t){for(var e=arguments,n=1,r=e.length;n<r;n++)t=t.replace(/%s/,e[n]);return t}var o=Object.prototype.hasOwnProperty;function s(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}var a="A is not equal to B",u={checkProtoEql:!0,checkSubType:!0,plusZeroAndMinusZeroEqual:!0,collectAllFails:!1};function c(t,e,n,r){e[t]="boolean"!=typeof n[t]?r[t]:n[t]}function f(t,e,n,r){c("checkProtoEql",this,t=t||{},u),c("plusZeroAndMinusZeroEqual",this,t,u),c("checkSubType",this,t,u),c("collectAllFails",this,t,u),this.a=e,this.b=n,this._meet=t._meet||[],this.fails=t.fails||[],this.path=r||[]}function l(t){this.name="ShortcutError",this.message="fail fast",this.fail=t}function h(t,e,n){return new f(n,t,e).check()}l.prototype=Object.create(Error.prototype),f.checkStrictEquality=function(t,e){this.collectFail(t!==e,a)},f.add=function(t,e,n,r){var i=Array.prototype.slice.call(arguments);r=i.pop(),f.prototype["_check_"+i.join("_")]=r},f.prototype={check:function(){try{this.check0()}catch(t){if(t instanceof l)return[t.fail];throw t}return this.fails},check0:function(){var t=this.a,e=this.b;if(t===e)return this.collectFail(0===t&&1/t!=1/e&&!this.plusZeroAndMinusZeroEqual,"+0 is not equal to -0");var n=r(t),o=r(e);if(n.type!==o.type||n.cls!==o.cls||n.sub!==o.sub)return this.collectFail(!0,i("A has type %s and B has type %s",s(n),s(o)));var a=n.type,u=n.type;n.cls&&(a+="_"+n.cls,u+="_"+n.cls),n.sub&&(u+="_"+n.sub),(this["_check_"+u]||this["_check_"+a]||this["_check_"+n.type]||this.defaultCheck).call(this,this.a,this.b)},collectFail:function(t,e,n){if(t){var r=new function(t,e,n,r){this.a=t,this.b=e,this.reason=n,this.path=r}(this.a,this.b,e,this.path);if(r.showReason=!!n,this.fails.push(r),!this.collectAllFails)throw new l(r)}},checkPlainObjectsEquality:function(t,e){for(var n,r=this._meet,s=this._meet.length;s--;){var a=r[s];if(a[0]===t&&a[1]===e)return}for(n in r.push([t,e]),e)o.call(e,n)&&(o.call(t,n)?this.checkPropertyEquality(n):this.collectFail(!0,i("%s has no key %s","A",n)));for(n in t)o.call(t,n)&&this.collectFail(!o.call(e,n),i("%s has no key %s","B",n));r.pop(),this.checkProtoEql&&this.collectFail(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e),"A and B have different prototypes",!0)},checkPropertyEquality:function(t){new f(this,this.a[t],this.b[t],this.path.concat([t])).check0()},defaultCheck:f.checkStrictEquality},f.add(r.NUMBER,function(t,e){this.collectFail(t!=t&&e==e||e!=e&&t==t||t!==e&&t==t&&e==e,a)}),[r.SYMBOL,r.BOOLEAN,r.STRING].forEach(function(t){f.add(t,f.checkStrictEquality)}),f.add(r.FUNCTION,function(t,e){this.collectFail(t.toString()!==e.toString(),"function A is not equal to B by source code value (via .toString call)"),this.checkPlainObjectsEquality(t,e)}),f.add(r.OBJECT,r.REGEXP,function(t,e){for(var n=["source","global","multiline","lastIndex","ignoreCase","sticky","unicode"];n.length;)this.checkPropertyEquality(n.shift());this.checkPlainObjectsEquality(t,e)}),f.add(r.OBJECT,r.DATE,function(t,e){this.collectFail(+t!=+e,a),this.checkPlainObjectsEquality(t,e)}),[r.NUMBER,r.BOOLEAN,r.STRING].forEach(function(t){f.add(r.OBJECT,t,function(t,e){this.collectFail(t.valueOf()!==e.valueOf(),"A wrapped value is not equal to B wrapped value"),this.checkPlainObjectsEquality(t,e)})}),f.add(r.OBJECT,function(t,e){this.checkPlainObjectsEquality(t,e)}),[r.ARRAY,r.ARGUMENTS,r.TYPED_ARRAY].forEach(function(t){f.add(r.OBJECT,t,function(t,e){this.checkPropertyEquality("length"),this.checkPlainObjectsEquality(t,e)})}),f.add(r.OBJECT,r.ARRAY_BUFFER,function(t,e){this.checkPropertyEquality("byteLength"),this.checkPlainObjectsEquality(t,e)}),f.add(r.OBJECT,r.ERROR,function(t,e){this.checkPropertyEquality("name"),this.checkPropertyEquality("message"),this.checkPlainObjectsEquality(t,e)}),f.add(r.OBJECT,r.BUFFER,function(t){this.checkPropertyEquality("length");for(var e=t.length;e--;)this.checkPropertyEquality(e)}),[r.MAP,r.SET,r.WEAK_MAP,r.WEAK_SET].forEach(function(t){f.add(r.OBJECT,t,function(t,e){this._meet.push([t,e]);for(var n=t.entries(),r=n.next();!r.done;r=n.next()){for(var o=e.entries(),s=!1,a=o.next();!a.done;a=o.next()){0===h(r.value[0],a.value[0],{collectAllFails:!1,_meet:this._meet}).length&&(s=!0,h(r.value[1],a.value[1],this))}s||this.collectFail(!0,i("Set/Map missing key %s",r.value[0]))}this._meet.pop(),this.checkPlainObjectsEquality(t,e)})}),h.EQ=f,t.exports=h},function(t,e,n){"use strict";var r=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(n(341)),i=n(344);function o(t){return!!t.match(/\d+/)}function s(t,e){var n=o(t),r=o(e);return n&&r?1*t-1*e:n&&!r?-1:!n&&r?1:t.localeCompare(e)}function a(t){var e;t=t||{},this.seen=[],e="function"==typeof t.keysFunc?t.keysFunc:!1===t.keys?Object.getOwnPropertyNames:Object.keys,this.getKeys=function(t){return function(e){var n=t(e);return n.sort(s),n}}(e),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}a.prototype={constructor:a,format:function(t){var e=r(t);if(this.alreadySeen(t))return"[Circular]";for(var n=e.toTryTypes(),i=this.defaultFormat;n.length;){var o=n.shift(),s=a.formatterFunctionName(o);if(this[s]){i=this[s];break}}return i.call(this,t).trim()},defaultFormat:function(t){return String(t)},alreadySeen:function(t){return this.seen.indexOf(t)>=0}},a.addType=function(t,e){a.prototype[a.formatterFunctionName(t)]=e},a.formatterFunctionName=function(t){return"_format_"+t.toString("_")};var u="\n";function c(t,e){return function(t,e,n){var r=!1;if(e<0&&(r=!0,e=-e),(t=String(t)).length<e){var i=new Array(e-t.length+1).join(n);return r?t+i:i+t}return t}(t,e,"0")}var f=/^\s*function\s*(\S*)\s*\(/;function l(t){if(t.name)return t.name;var e=t.toString().match(f);return null===e?"":e[1]}function h(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var n=l(e.value);if(""!==n)return n}t=Object.getPrototypeOf(t)}}var p=" ";function d(t){return function(t,e){return t.split(u).map(function(t){return e+t}).join(u)}(t,p)}function y(t,e){var n=(e=e||{}).filterKey||function(){return!0},r=e.formatKey||this.format,o=e.formatValue||this.format,s=void 0!==e.keyValueSep?e.keyValueSep:": ";this.seen.push(t);var a=0,u=[];i.forEach(t,function(t,e){if(n(e)){var i=r.call(this,e),c=o.call(this,t,e),f=i?i+s+c:c;a+=f.length,u.push(f)}},this),this.seen.pop(),(e.additionalKeys||[]).forEach(function(t){var e=t[0]+s+this.format(t[1]);a+=e.length,u.push(e)},this);var c,f,l=e.prefix||h(t)||"";l.length>0&&(l+=" "),Array.isArray(e.brackets)?(c=e.brackets[0],f=e.brackets[1]):(c="{",f="}");var p=e.value||"";return 0===u.length?p||l+c+f:a<=this.maxLineLength?l+c+" "+(p?p+" ":"")+u.join(this.propSep+" ")+" "+f:l+c+"\n"+(p?" "+p+"\n":"")+u.map(d).join(this.propSep+"\n")+"\n"+f}function v(t){return"string"==typeof t&&t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)}function g(t,e){var n=function(t,e){var n;try{n=Object.getOwnPropertyDescriptor(t,e)||{value:t[e]}}catch(t){n={value:t}}return n}(t,e);return n.get&&n.set?"[Getter/Setter]":n.get?"[Getter]":n.set?"[Setter]":this.format(n.value)}function m(t,e){return(e=e||{}).keyValueSep=": ",e.formatKey=e.formatKey||v,e.formatValue=e.formatValue||function(e,n){return g.call(this,t,n)},y.call(this,t,e)}function b(t){return m.call(this,t,{additionalKeys:[["[[PrimitiveValue]]",t.valueOf()]]})}function _(t,e,n){return function(r){for(var i=this.byteArrayMaxLength||50,o=r[t],s=[],a=0,u=0;u<i&&u<o;u++){var f=c((r[u]||0).toString(16),n);a+=f.length,s.push(f)}var l=r.constructor.name||e||"";return l&&(l+=" "),0===s.length?l+"[]":a<=this.maxLineLength?l+"[ "+s.join(this.propSep+" ")+" ]":l+"[\n"+s.map(d).join(this.propSep+"\n")+"\n]"}}function w(t){return y.call(this,t,{keyValueSep:" => "})}function E(t){return y.call(this,t,{keyValueSep:"",formatKey:function(){return""}})}function x(t,e){return function(n){for(var r=n.constructor.extractLane,i=0,o=[],s=0;s<e;s++){var a=this.format(r(n,s));i+=a.length,o.push(a)}return i<=this.maxLineLength?t+" [ "+o.join(this.propSep+" ")+" ]":t+" [\n"+o.map(d).join(this.propSep+"\n")+"\n]"}}function T(t,e){return new a(e).format(t)}T.Formatter=a,T.addSpaces=d,T.pad0=c,T.functionName=l,T.constructorName=h,T.formatPlainObjectKey=v,T.formatPlainObject=m,T.typeAdaptorForEachFormat=y,a.addType(new r.Type(r.UNDEFINED),function(){return"undefined"}),a.addType(new r.Type(r.NULL),function(){return"null"}),a.addType(new r.Type(r.BOOLEAN),function(t){return t?"true":"false"}),a.addType(new r.Type(r.SYMBOL),function(t){return t.toString()}),a.addType(new r.Type(r.NUMBER),function(t){return 0===t&&1/t<0?"-0":String(t)}),a.addType(new r.Type(r.STRING),function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),a.addType(new r.Type(r.FUNCTION),function(t){return m.call(this,t,{prefix:"Function",additionalKeys:[["name",l(t)]]})}),a.addType(new r.Type(r.OBJECT),m),a.addType(new r.Type(r.OBJECT,r.NUMBER),b),a.addType(new r.Type(r.OBJECT,r.BOOLEAN),b),a.addType(new r.Type(r.OBJECT,r.STRING),function(t){var e=t.valueOf();return m.call(this,t,{filterKey:function(t){return!(t.match(/\d+/)&&parseInt(t,10)<e.length)},additionalKeys:[["[[PrimitiveValue]]",e]]})}),a.addType(new r.Type(r.OBJECT,r.REGEXP),function(t){return m.call(this,t,{value:String(t)})}),a.addType(new r.Type(r.OBJECT,r.ARRAY),function(t){return m.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return v.call(this,t)},brackets:["[","]"]})}),a.addType(new r.Type(r.OBJECT,r.ARGUMENTS),function(t){return m.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return v.call(this,t)},brackets:["[","]"],prefix:"Arguments"})}),a.addType(new r.Type(r.OBJECT,r.DATE),function(t){return m.call(this,t,{value:function(t,e){var n=e?"UTC":"",r=t["get"+n+"FullYear"]()+"-"+c(t["get"+n+"Month"]()+1,2)+"-"+c(t["get"+n+"Date"](),2),i=c(t["get"+n+"Hours"](),2)+":"+c(t["get"+n+"Minutes"](),2)+":"+c(t["get"+n+"Seconds"](),2)+"."+c(t["get"+n+"Milliseconds"](),3),o=t.getTimezoneOffset(),s=Math.abs(o),a=Math.floor(s/60),u=s-60*a,f=(o<0?"+":"-")+c(a,2)+c(u,2);return r+" "+i+(e?"":" "+f)}(t,this.isUTCdate)})}),a.addType(new r.Type(r.OBJECT,r.ERROR),function(t){return m.call(this,t,{prefix:t.name,additionalKeys:[["message",t.message]]})}),a.addType(new r.Type(r.OBJECT,r.SET),E),a.addType(new r.Type(r.OBJECT,r.MAP),w),a.addType(new r.Type(r.OBJECT,r.WEAK_MAP),w),a.addType(new r.Type(r.OBJECT,r.WEAK_SET),E),a.addType(new r.Type(r.OBJECT,r.BUFFER),_("length","Buffer",2)),a.addType(new r.Type(r.OBJECT,r.ARRAY_BUFFER),_("byteLength","ArrayBuffer",2)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"int8"),_("length","Int8Array",2)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"uint8"),_("length","Uint8Array",2)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"uint8clamped"),_("length","Uint8ClampedArray",2)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"int16"),_("length","Int16Array",4)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"uint16"),_("length","Uint16Array",4)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"int32"),_("length","Int32Array",8)),a.addType(new r.Type(r.OBJECT,r.TYPED_ARRAY,"uint32"),_("length","Uint32Array",8)),a.addType(new r.Type(r.OBJECT,r.SIMD,"bool16x8"),x("Bool16x8",8)),a.addType(new r.Type(r.OBJECT,r.SIMD,"bool32x4"),x("Bool32x4",4)),a.addType(new r.Type(r.OBJECT,r.SIMD,"bool8x16"),x("Bool8x16",16)),a.addType(new r.Type(r.OBJECT,r.SIMD,"float32x4"),x("Float32x4",4)),a.addType(new r.Type(r.OBJECT,r.SIMD,"int16x8"),x("Int16x8",8)),a.addType(new r.Type(r.OBJECT,r.SIMD,"int32x4"),x("Int32x4",4)),a.addType(new r.Type(r.OBJECT,r.SIMD,"int8x16"),x("Int8x16",16)),a.addType(new r.Type(r.OBJECT,r.SIMD,"uint16x8"),x("Uint16x8",8)),a.addType(new r.Type(r.OBJECT,r.SIMD,"uint32x4"),x("Uint32x4",4)),a.addType(new r.Type(r.OBJECT,r.SIMD,"uint8x16"),x("Uint8x16",16)),a.addType(new r.Type(r.OBJECT,r.PROMISE),function(){return"[Promise]"}),a.addType(new r.Type(r.OBJECT,r.XHR),function(){return"[XMLHttpRequest]"}),a.addType(new r.Type(r.OBJECT,r.HTML_ELEMENT),function(t){return t.outerHTML}),a.addType(new r.Type(r.OBJECT,r.HTML_ELEMENT,"#text"),function(t){return t.nodeValue}),a.addType(new r.Type(r.OBJECT,r.HTML_ELEMENT,"#document"),function(t){return t.documentElement.outerHTML}),a.addType(new r.Type(r.OBJECT,r.HOST),function(){return"[Host]"}),t.exports=T},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(345),i=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(n(341));function o(t){this._obj=t}function s(){this._typeAdaptors=[],this._iterableTypes={}}o.prototype={__shouldIterator__:!0,next:function(){if(this._done)throw new Error("Iterator already reached the end");this._keys||(this._keys=Object.keys(this._obj),this._index=0);var t=this._keys[this._index];return this._done=this._index===this._keys.length,this._index+=1,{value:this._done?void 0:[t,this._obj[t]],done:this._done}}},"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(o.prototype[Symbol.iterator]=function(){return this}),s.prototype={add:function(t,e,n,r){return this.addType(new i.Type(t,e,n),r)},addType:function(t,e){this._typeAdaptors[t.toString()]=e},getAdaptor:function(t,e){for(var n=t.toTryTypes();n.length;){var r=n.shift(),i=this._typeAdaptors[r];if(i&&i[e])return i[e]}},requireAdaptor:function(t,e){var n=this.getAdaptor(t,e);if(!n)throw new Error("There is no type adaptor `"+e+"` for "+t.toString());return n},addIterableType:function(t){this._iterableTypes[t.toString()]=!0},isIterableType:function(t){return!!this._iterableTypes[t.toString()]}};var a=new s,u={forEach:function(t,e,n){for(var i in t)if(r.hasOwnProperty(t,i)&&r.propertyIsEnumerable(t,i)&&!1===e.call(n,t[i],i,t))return},has:function(t,e){return r.hasOwnProperty(t,e)},get:function(t,e){return t[e]},iterator:function(t){return new o(t)}};a.addType(new i.Type(i.OBJECT),u),a.addType(new i.Type(i.FUNCTION),u);var c={has:function(t,e){return t.has(e)},get:function(t,e){return t.get(e)},forEach:function(t,e,n){l(t.entries(),function(r){return e.call(n,r[1],r[0],t)})},size:function(t){return t.size},isEmpty:function(t){return 0===t.size},iterator:function(t){return t.entries()}},f=r.merge({},c);function l(t,e,n){if(r.isGeneratorFunction(t))return l(t(),e,n);if(r.isIterator(t))for(var o=t.next();!o.done;){if(!1===e.call(n,o.value,"value",t))return;o=t.next()}else{var s=i(t);a.requireAdaptor(s,"forEach")(t,e,n)}}f.get=function(t,e){if(t.has(e))return e},a.addType(new i.Type(i.OBJECT,i.MAP),c),a.addType(new i.Type(i.OBJECT,i.SET),f),a.addType(new i.Type(i.OBJECT,i.WEAK_SET),f),a.addType(new i.Type(i.OBJECT,i.WEAK_MAP),c),a.addType(new i.Type(i.STRING),{isEmpty:function(t){return""===t},size:function(t){return t.length}}),a.addIterableType(new i.Type(i.OBJECT,i.ARRAY)),a.addIterableType(new i.Type(i.OBJECT,i.ARGUMENTS)),e.defaultTypeAdaptorStorage=a,e.forEach=l,e.size=function(t){var e=i(t),n=a.getAdaptor(e,"size");if(n)return n(t);var r=0;return l(t,function(){r+=1}),r},e.isEmpty=function(t){var e=i(t),n=a.getAdaptor(e,"isEmpty");if(n)return n(t);var r=!0;return l(t,function(){return r=!1,!1}),r},e.has=function(t,e){var n=i(t);return a.requireAdaptor(n,"has")(t,e)},e.get=function(t,e){var n=i(t);return a.requireAdaptor(n,"get")(t,e)},e.reduce=function(t,e,n){var r=n;return l(t,function(n,i){r=e(r,n,i,t)}),r},e.some=function(t,e,n){var r=!1;return l(t,function(i,o){if(e.call(n,i,o,t))return r=!0,!1},n),r},e.every=function(t,e,n){var r=!0;return l(t,function(i,o){if(!e.call(n,i,o,t))return r=!1,!1},n),r},e.isIterable=function(t){return a.isIterableType(i(t))},e.iterator=function(t){return a.requireAdaptor(i(t),"iterator")(t)}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.hasOwnProperty=function(t,e){return n.call(t,e)},e.propertyIsEnumerable=function(t,e){return r.call(t,e)},e.merge=function(t,e){if(t&&e)for(var n in e)t[n]=e[n];return t},e.isIterator=function(t){return!!t&&(!!t.__shouldIterator__||"function"==typeof t.next&&"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t)},e.isGeneratorFunction=function(t){return"function"==typeof t&&/^function\s*\*\s*/.test(t.toString())}},function(t,e){t.exports={author:"pal",permlink:"2scmtp-test",category:"test",parent_author:"",parent_permlink:"test",title:"test",body:"test",allow_replies:!0,allow_votes:!0,allow_curation_rewards:!0,url:"/test/@pal/2scmtp-test"}},function(t,e,n){(function(t){"use strict";if(n(348),n(639),n(640),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function r(t,n,r){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:r})}r(String.prototype,"padLeft","".padStart),r(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&r(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(349),n(398),n(399),n(400),n(401),n(403),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(416),n(418),n(420),n(422),n(425),n(426),n(427),n(431),n(433),n(435),n(438),n(439),n(440),n(441),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(451),n(452),n(453),n(455),n(456),n(457),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(477),n(478),n(482),n(483),n(484),n(485),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(505),n(506),n(512),n(513),n(515),n(516),n(517),n(521),n(522),n(523),n(524),n(525),n(527),n(528),n(529),n(530),n(533),n(535),n(536),n(537),n(539),n(541),n(543),n(544),n(545),n(547),n(548),n(549),n(550),n(557),n(560),n(561),n(563),n(564),n(567),n(568),n(570),n(571),n(572),n(573),n(574),n(575),n(576),n(577),n(578),n(579),n(580),n(581),n(582),n(583),n(584),n(585),n(586),n(587),n(588),n(590),n(591),n(592),n(593),n(594),n(595),n(597),n(598),n(599),n(600),n(601),n(602),n(603),n(604),n(606),n(607),n(609),n(610),n(611),n(612),n(615),n(616),n(617),n(618),n(619),n(620),n(621),n(622),n(624),n(625),n(626),n(627),n(628),n(629),n(630),n(631),n(632),n(633),n(634),n(637),n(638),t.exports=n(355)},function(t,e,n){"use strict";var r=n(350),i=n(351),o=n(352),s=n(354),a=n(364),u=n(368).KEY,c=n(353),f=n(369),l=n(370),h=n(365),p=n(371),d=n(372),y=n(373),v=n(375),g=n(388),m=n(391),b=n(358),_=n(378),w=n(362),E=n(363),x=n(392),T=n(395),S=n(397),k=n(357),A=n(376),j=S.f,O=k.f,C=T.f,I=r.Symbol,R=r.JSON,B=R&&R.stringify,P=p("_hidden"),F=p("toPrimitive"),M={}.propertyIsEnumerable,N=f("symbol-registry"),L=f("symbols"),D=f("op-symbols"),U=Object.prototype,q="function"==typeof I,V=r.QObject,z=!V||!V.prototype||!V.prototype.findChild,H=o&&c(function(){return 7!=x(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=j(U,e);r&&delete U[e],O(t,e,n),r&&t!==U&&O(U,e,r)}:O,W=function(t){var e=L[t]=x(I.prototype);return e._k=t,e},X=q&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},G=function(t,e,n){return t===U&&G(D,e,n),b(t),e=w(e,!0),b(n),i(L,e)?(n.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),n=x(n,{enumerable:E(0,!1)})):(i(t,P)||O(t,P,E(1,{})),t[P][e]=!0),H(t,e,n)):O(t,e,n)},Y=function(t,e){b(t);for(var n,r=g(e=_(e)),i=0,o=r.length;o>i;)G(t,n=r[i++],e[n]);return t},J=function(t){var e=M.call(this,t=w(t,!0));return!(this===U&&i(L,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(L,t)||i(this,P)&&this[P][t])||e)},K=function(t,e){if(t=_(t),e=w(e,!0),t!==U||!i(L,e)||i(D,e)){var n=j(t,e);return!n||!i(L,e)||i(t,P)&&t[P][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=C(_(t)),r=[],o=0;n.length>o;)i(L,e=n[o++])||e==P||e==u||r.push(e);return r},$=function(t){for(var e,n=t===U,r=C(n?D:_(t)),o=[],s=0;r.length>s;)!i(L,e=r[s++])||n&&!i(U,e)||o.push(L[e]);return o};q||(a((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===U&&e.call(D,n),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),H(this,t,E(1,n))};return o&&z&&H(U,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",function(){return this._k}),S.f=K,k.f=G,n(396).f=T.f=Z,n(390).f=J,n(389).f=$,o&&!n(374)&&a(U,"propertyIsEnumerable",J,!0),d.f=function(t){return W(p(t))}),s(s.G+s.W+s.F*!q,{Symbol:I});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(Q=A(p.store),tt=0;Q.length>tt;)y(Q[tt++]);s(s.S+s.F*!q,"Symbol",{for:function(t){return i(N,t+="")?N[t]:N[t]=I(t)},keyFor:function(t){if(X(t))return v(N,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!q,"Object",{create:function(t,e){return void 0===e?x(t):Y(x(t),e)},defineProperty:G,defineProperties:Y,getOwnPropertyDescriptor:K,getOwnPropertyNames:Z,getOwnPropertySymbols:$}),R&&s(s.S+s.F*(!q||c(function(){var t=I();return"[null]"!=B([t])||"{}"!=B({a:t})||"{}"!=B(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!X(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(e=r[1])&&(n=e),!n&&m(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!X(e))return e}),r[1]=e,B.apply(R,r)}}}),I.prototype[F]||n(356)(I.prototype,F,I.prototype.valueOf),l(I,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(353)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(350),i=n(355),o=n(356),s=n(364),a=n(366),u=function(t,e,n){var c,f,l,h,p=t&u.F,d=t&u.G,y=t&u.S,v=t&u.P,g=t&u.B,m=d?r:y?r[e]||(r[e]={}):(r[e]||{}).prototype,b=d?i:i[e]||(i[e]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=e),n)l=((f=!p&&m&&void 0!==m[c])?m:n)[c],h=g&&f?a(l,r):v&&"function"==typeof l?a(Function.call,l):l,m&&s(m,c,l,t&u.U),b[c]!=l&&o(b,c,h),v&&_[c]!=l&&(_[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(357),i=n(363);t.exports=n(352)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(358),i=n(360),o=n(362),s=Object.defineProperty;e.f=n(352)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(359);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(352)&&!n(353)(function(){return 7!=Object.defineProperty(n(361)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(359),i=n(350).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(359);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(350),i=n(356),o=n(351),s=n(365)("src"),a=Function.toString,u=(""+a).split("toString");n(355).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,s)||i(n,s,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(367);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(365)("meta"),i=n(359),o=n(351),s=n(357).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(353)(function(){return u(Object.preventExtensions({}))}),f=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return c&&l.NEED&&u(t)&&!o(t,r)&&f(t),t}}},function(t,e,n){var r=n(350),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,n){var r=n(357).f,i=n(351),o=n(371)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(369)("wks"),i=n(365),o=n(350).Symbol,s="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=r},function(t,e,n){e.f=n(371)},function(t,e,n){var r=n(350),i=n(355),o=n(374),s=n(372),a=n(357).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e){t.exports=!1},function(t,e,n){var r=n(376),i=n(378);t.exports=function(t,e){for(var n,o=i(t),s=r(o),a=s.length,u=0;a>u;)if(o[n=s[u++]]===e)return n}},function(t,e,n){var r=n(377),i=n(387);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(351),i=n(378),o=n(382)(!1),s=n(386)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(379),i=n(381);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(380);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(378),i=n(383),o=n(385);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),f=o(s,c);if(t&&n!=n){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(384),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(384),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(369)("keys"),i=n(365);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(376),i=n(389),o=n(390);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(380);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(358),i=n(393),o=n(387),s=n(386)("IE_PROTO"),a=function(){},u=function(){var t,e=n(361)("iframe"),r=o.length;for(e.style.display="none",n(394).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(357),i=n(358),o=n(376);t.exports=n(352)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){t.exports=n(350).document&&document.documentElement},function(t,e,n){var r=n(378),i=n(396).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(377),i=n(387).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(390),i=n(363),o=n(378),s=n(362),a=n(351),u=n(360),c=Object.getOwnPropertyDescriptor;e.f=n(352)?c:function(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(354);r(r.S,"Object",{create:n(392)})},function(t,e,n){var r=n(354);r(r.S+r.F*!n(352),"Object",{defineProperty:n(357).f})},function(t,e,n){var r=n(354);r(r.S+r.F*!n(352),"Object",{defineProperties:n(393)})},function(t,e,n){var r=n(378),i=n(397).f;n(402)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(354),i=n(355),o=n(353);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){var r=n(404),i=n(405);n(402)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(381);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(351),i=n(404),o=n(386)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(404),i=n(376);n(402)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(402)("getOwnPropertyNames",function(){return n(395).f})},function(t,e,n){var r=n(359),i=n(368).onFreeze;n(402)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(359),i=n(368).onFreeze;n(402)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(359),i=n(368).onFreeze;n(402)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(359);n(402)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(359);n(402)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(359);n(402)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(354);r(r.S+r.F,"Object",{assign:n(415)})},function(t,e,n){"use strict";var r=n(376),i=n(389),o=n(390),s=n(404),a=n(379),u=Object.assign;t.exports=!u||n(353)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=s(t),u=arguments.length,c=1,f=i.f,l=o.f;u>c;)for(var h,p=a(arguments[c++]),d=f?r(p).concat(f(p)):r(p),y=d.length,v=0;y>v;)l.call(p,h=d[v++])&&(n[h]=p[h]);return n}:u},function(t,e,n){var r=n(354);r(r.S,"Object",{is:n(417)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(354);r(r.S,"Object",{setPrototypeOf:n(419).set})},function(t,e,n){var r=n(359),i=n(358),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(366)(Function.call,n(397).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){"use strict";var r=n(421),i={};i[n(371)("toStringTag")]="z",i+""!="[object z]"&&n(364)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(380),i=n(371)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(354);r(r.P,"Function",{bind:n(423)})},function(t,e,n){"use strict";var r=n(367),i=n(359),o=n(424),s=[].slice,a={};t.exports=Function.bind||function(t){var e=r(this),n=s.call(arguments,1),u=function(){var r=n.concat(s.call(arguments));return this instanceof u?function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("F,a","return new F("+r.join(",")+")")}return a[e](t,n)}(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(u.prototype=e.prototype),u}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(357).f,i=n(363),o=n(351),s=Function.prototype,a=/^\s*function ([^ (]*)/,u=Object.isExtensible||function(){return!0};"name"in s||n(352)&&r(s,"name",{configurable:!0,get:function(){try{var t=(""+this).match(a)[1];return o(this,"name")||!u(this)||r(this,"name",i(5,t)),t}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(359),i=n(405),o=n(371)("hasInstance"),s=Function.prototype;o in s||n(357).f(s,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(354),i=n(428);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(350).parseInt,i=n(429).trim,o=n(430),s=/^[\-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(s.test(n)?16:10))}:r},function(t,e,n){var r=n(354),i=n(381),o=n(353),s=n(430),a="["+s+"]",u=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),f=function(t,e,n){var i={},a=o(function(){return!!s[t]()||"
"!="
"[t]()}),u=i[t]=a?e(l):s[t];n&&(i[n]=u),r(r.P+r.F*a,"String",i)},l=f.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=f},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(354),i=n(432);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){var r=n(350).parseFloat,i=n(429).trim;t.exports=1/r(n(430)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(350),i=n(351),o=n(380),s=n(434),a=n(362),u=n(353),c=n(396).f,f=n(397).f,l=n(357).f,h=n(429).trim,p=r.Number,d=p,y=p.prototype,v="Number"==o(n(392)(y)),g="trim"in String.prototype,m=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=g?e.trim():h(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var s,u=e.slice(2),c=0,f=u.length;c<f;c++)if((s=u.charCodeAt(c))<48||s>i)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(v?u(function(){y.valueOf.call(n)}):"Number"!=o(n))?s(new d(m(e)),n,p):m(e)};for(var b,_=n(352)?c(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)i(d,b=_[w])&&!i(p,b)&&l(p,b,f(d,b));p.prototype=y,y.constructor=p,n(364)(r,"Number",p)}},function(t,e,n){var r=n(359),i=n(419).set;t.exports=function(t,e,n){var o,s=e.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(354),i=n(384),o=n(436),s=n(437),a=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+s.call("0",7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(353)(function(){a.call({})})),"Number",{toFixed:function(t){var e,n,r,a,u=o(this,f),c=i(t),y="",v="0";if(c<0||c>20)throw RangeError(f);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(y="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*d(2,69,1))-69)<0?u*d(2,-e,1):u/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=c;r>=7;)l(1e7,0),r-=7;for(l(d(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),l(1,1),h(2),v=p()}else l(0,n),l(1<<-e,0),v=p()+s.call("0",c);return v=c>0?y+((a=v.length)<=c?"0."+s.call("0",c-a)+v:v.slice(0,a-c)+"."+v.slice(a-c)):y+v}})},function(t,e,n){var r=n(380);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(384),i=n(381);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(354),i=n(353),o=n(436),s=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},function(t,e,n){var r=n(354);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(354),i=n(350).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(354);r(r.S,"Number",{isInteger:n(442)})},function(t,e,n){var r=n(359),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(354);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(354),i=n(442),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(354);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(354);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(354),i=n(432);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(354),i=n(428);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(354),i=n(450),o=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(354),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(354),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(354),i=n(454);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(354);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(354),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(354),i=n(458);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(354),i=n(454),o=Math.pow,s=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),c=o(2,-126);r(r.S,"Math",{fround:function(t){var e,n,r=Math.abs(t),o=i(t);return r<c?o*function(t){return t+1/s-1/s}(r/c/a)*c*a:(n=(e=(1+a/s)*r)-(e-r))>u||n!=n?o*(1/0):o*n}})},function(t,e,n){var r=n(354),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,s=0,a=arguments.length,u=0;s<a;)u<(n=i(arguments[s++]))?(o=o*(r=u/n)*r+1,u=n):o+=n>0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,n){var r=n(354),i=Math.imul;r(r.S+r.F*n(353)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(354);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(354);r(r.S,"Math",{log1p:n(450)})},function(t,e,n){var r=n(354);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(354);r(r.S,"Math",{sign:n(454)})},function(t,e,n){var r=n(354),i=n(458),o=Math.exp;r(r.S+r.F*n(353)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(354),i=n(458),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(354);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(354),i=n(385),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,s=0;r>s;){if(e=+arguments[s++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(354),i=n(378),o=n(383);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,s=[],a=0;n>a;)s.push(String(e[a++])),a<r&&s.push(String(arguments[a]));return s.join("")}})},function(t,e,n){"use strict";n(429)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(473)(!0);n(474)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(384),i=n(381);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(374),i=n(354),o=n(364),s=n(356),a=n(351),u=n(475),c=n(476),f=n(370),l=n(405),h=n(371)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,y,v,g,m){c(n,e,y);var b,_,w,E=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",T="values"==v,S=!1,k=t.prototype,A=k[h]||k["@@iterator"]||v&&k[v],j=A||E(v),O=v?T?E("entries"):j:void 0,C="Array"==e&&k.entries||A;if(C&&(w=l(C.call(new t)))!==Object.prototype&&(f(w,x,!0),r||a(w,h)||s(w,h,d)),T&&A&&"values"!==A.name&&(S=!0,j=function(){return A.call(this)}),r&&!m||!p&&!S&&k[h]||s(k,h,j),u[e]=j,u[x]=d,v)if(b={values:T?j:E("values"),keys:g?j:E("keys"),entries:O},m)for(_ in b)_ in k||o(k,_,b[_]);else i(i.P+i.F*(p||S),e,b);return b}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(392),i=n(363),o=n(370),s={};n(356)(s,n(371)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(354),i=n(473)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(354),i=n(383),o=n(479),s="".endsWith;r(r.P+r.F*n(481)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),a=void 0===n?r:Math.min(i(n),r),u=String(t);return s?s.call(e,u,a):e.slice(a-u.length,a)===u}})},function(t,e,n){var r=n(480),i=n(381);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(359),i=n(380),o=n(371)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(371)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){"use strict";var r=n(354),i=n(479);r(r.P+r.F*n(481)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(354);r(r.P,"String",{repeat:n(437)})},function(t,e,n){"use strict";var r=n(354),i=n(383),o=n(479),s="".startsWith;r(r.P+r.F*n(481)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(486)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){var r=n(354),i=n(353),o=n(381),s=/"/g,a=function(t,e,n,r){var i=String(o(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(s,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n(486)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(486)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(486)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(486)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(486)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(486)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(486)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(486)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(486)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(486)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(486)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(486)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(354);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(354),i=n(404),o=n(362);r(r.P+r.F*n(353)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var r=n(354),i=n(353),o=Date.prototype.getTime,s=function(t){return t>9?t:"0"+t};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}})},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(364)(r,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,n){var r=n(371)("toPrimitive"),i=Date.prototype;r in i||n(356)(i,r,n(504))},function(t,e,n){"use strict";var r=n(358),i=n(362);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(354);r(r.S,"Array",{isArray:n(391)})},function(t,e,n){"use strict";var r=n(366),i=n(354),o=n(404),s=n(507),a=n(508),u=n(383),c=n(509),f=n(510);i(i.S+i.F*!n(511)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,l,h=o(t),p="function"==typeof this?this:Array,d=arguments.length,y=d>1?arguments[1]:void 0,v=void 0!==y,g=0,m=f(h);if(v&&(y=r(y,d>2?arguments[2]:void 0,2)),null==m||p==Array&&a(m))for(n=new p(e=u(h.length));e>g;g++)c(n,g,v?y(h[g],g):h[g]);else for(l=m.call(h),n=new p;!(i=l.next()).done;g++)c(n,g,v?s(l,y,[i.value,g],!0):i.value);return n.length=g,n}})},function(t,e,n){var r=n(358);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(475),i=n(371)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(357),i=n(363);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(421),i=n(371)("iterator"),o=n(475);t.exports=n(355).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(371)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(354),i=n(509);r(r.S+r.F*n(353)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(354),i=n(378),o=[].join;r(r.P+r.F*(n(379)!=Object||!n(514)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){var r=n(353);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(354),i=n(394),o=n(380),s=n(385),a=n(383),u=[].slice;r(r.P+r.F*n(353)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=a(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=s(t,n),c=s(e,n),f=a(c-i),l=Array(f),h=0;h<f;h++)l[h]="String"==r?this.charAt(i+h):this[i+h];return l}})},function(t,e,n){"use strict";var r=n(354),i=n(367),o=n(404),s=n(353),a=[].sort,u=[1,2,3];r(r.P+r.F*(s(function(){u.sort(void 0)})||!s(function(){u.sort(null)})||!n(514)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),i(t))}})},function(t,e,n){"use strict";var r=n(354),i=n(518)(0),o=n(514)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(366),i=n(379),o=n(404),s=n(383),a=n(519);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,f=4==t,l=6==t,h=5==t||l,p=e||a;return function(e,a,d){for(var y,v,g=o(e),m=i(g),b=r(a,d,3),_=s(m.length),w=0,E=n?p(e,_):u?p(e,0):void 0;_>w;w++)if((h||w in m)&&(v=b(y=m[w],w,g),t))if(n)E[w]=v;else if(v)switch(t){case 3:return!0;case 5:return y;case 6:return w;case 2:E.push(y)}else if(f)return!1;return l?-1:c||f?f:E}}},function(t,e,n){var r=n(520);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(359),i=n(391),o=n(371)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(354),i=n(518)(1);r(r.P+r.F*!n(514)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(354),i=n(518)(2);r(r.P+r.F*!n(514)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(354),i=n(518)(3);r(r.P+r.F*!n(514)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(354),i=n(518)(4);r(r.P+r.F*!n(514)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(354),i=n(526);r(r.P+r.F*!n(514)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){var r=n(367),i=n(404),o=n(379),s=n(383);t.exports=function(t,e,n,a,u){r(e);var c=i(t),f=o(c),l=s(c.length),h=u?l-1:0,p=u?-1:1;if(n<2)for(;;){if(h in f){a=f[h],h+=p;break}if(h+=p,u?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?h>=0:l>h;h+=p)h in f&&(a=e(a,f[h],h,c));return a}},function(t,e,n){"use strict";var r=n(354),i=n(526);r(r.P+r.F*!n(514)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(354),i=n(382)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(s||!n(514)(o)),"Array",{indexOf:function(t){return s?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(354),i=n(378),o=n(384),s=n(383),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(514)(a)),"Array",{lastIndexOf:function(t){if(u)return a.apply(this,arguments)||0;var e=i(this),n=s(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(354);r(r.P,"Array",{copyWithin:n(531)}),n(532)("copyWithin")},function(t,e,n){"use strict";var r=n(404),i=n(385),o=n(383);t.exports=[].copyWithin||function(t,e){var n=r(this),s=o(n.length),a=i(t,s),u=i(e,s),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?s:i(c,s))-u,s-a),l=1;for(u<a&&a<u+f&&(l=-1,u+=f-1,a+=f-1);f-- >0;)u in n?n[a]=n[u]:delete n[a],a+=l,u+=l;return n}},function(t,e,n){var r=n(371)("unscopables"),i=Array.prototype;null==i[r]&&n(356)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(354);r(r.P,"Array",{fill:n(534)}),n(532)("fill")},function(t,e,n){"use strict";var r=n(404),i=n(385),o=n(383);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var r=n(354),i=n(518)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(532)("find")},function(t,e,n){"use strict";var r=n(354),i=n(518)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),r(r.P+r.F*s,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(532)(o)},function(t,e,n){n(538)("Array")},function(t,e,n){"use strict";var r=n(350),i=n(357),o=n(352),s=n(371)("species");t.exports=function(t){var e=r[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(532),i=n(540),o=n(475),s=n(378);t.exports=n(474)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(350),i=n(434),o=n(357).f,s=n(396).f,a=n(480),u=n(542),c=r.RegExp,f=c,l=c.prototype,h=/a/g,p=/a/g,d=new c(h)!==h;if(n(352)&&(!d||n(353)(function(){return p[n(371)("match")]=!1,c(h)!=h||c(p)==p||"/a/i"!=c(h,"i")}))){c=function(t,e){var n=this instanceof c,r=a(t),o=void 0===e;return!n&&r&&t.constructor===c&&o?t:i(d?new f(r&&!o?t.source:t,e):f((r=t instanceof c)?t.source:t,r&&o?u.call(t):e),n?this:l,c)};for(var y=function(t){t in c||o(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},v=s(f),g=0;v.length>g;)y(v[g++]);l.constructor=c,c.prototype=l,n(364)(r,"RegExp",c)}n(538)("RegExp")},function(t,e,n){"use strict";var r=n(358);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";n(544);var r=n(358),i=n(542),o=n(352),s=/./.toString,a=function(t){n(364)(RegExp.prototype,"toString",t,!0)};n(353)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=s.name&&a(function(){return s.call(this)})},function(t,e,n){n(352)&&"g"!=/./g.flags&&n(357).f(RegExp.prototype,"flags",{configurable:!0,get:n(542)})},function(t,e,n){n(546)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";var r=n(356),i=n(364),o=n(353),s=n(381),a=n(371);t.exports=function(t,e,n){var u=a(t),c=n(s,u,""[t]),f=c[0],l=c[1];o(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,u,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},function(t,e,n){n(546)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),s=null==r?void 0:r[e];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(546)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(546)("split",2,function(t,e,r){"use strict";var i=n(480),o=r,s=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var a=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,u,c,f,l,h=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,y=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,p+"g");for(a||(r=new RegExp("^"+v.source+"$(?!\\s)",p));(u=v.exec(n))&&!((c=u.index+u[0].length)>d&&(h.push(n.slice(d,u.index)),!a&&u.length>1&&u[0].replace(r,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(u[l]=void 0)}),u.length>1&&u.index<n.length&&s.apply(h,u.slice(1)),f=u[0].length,d=c,h.length>=y));)v.lastIndex===u.index&&v.lastIndex++;return d===n.length?!f&&v.test("")||h.push(""):h.push(n.slice(d)),h.length>y?h.slice(0,y):h}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),s=null==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){"use strict";var r,i,o,s=n(374),a=n(350),u=n(366),c=n(421),f=n(354),l=n(359),h=n(367),p=n(551),d=n(552),y=n(553),v=n(554).set,g=n(555)(),m=a.TypeError,b=a.process,_=a.Promise,w="process"==c(b=a.process),E=function(){},x=!!function(){try{var t=_.resolve(1),e=(t.constructor={})[n(371)("species")]=function(t){t(E,E)};return(w||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e}catch(t){}}(),T=function(t,e){return t===e||t===_&&e===o},S=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},k=function(t){return T(_,t)?new A(t):new i(t)},A=i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw m("Bad Promise constructor");e=t,n=r}),this.resolve=h(e),this.reject=h(n)},j=function(t){try{t()}catch(t){return{error:t}}},O=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,o=0,s=function(e){var n,o,s=i?e.ok:e.fail,a=e.resolve,u=e.reject,c=e.domain;try{s?(i||(2==t._h&&R(t),t._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&c.exit()),n===e.promise?u(m("Promise-chain cycle")):(o=S(n))?o.call(n,a,u):a(n)):u(r)}catch(t){u(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&C(t)})}},C=function(t){v.call(a,function(){var e,n,r,i=t._v;if(I(t)&&(e=j(function(){w?b.emit("unhandledRejection",i,t):(n=a.onunhandledrejection)?n({promise:t,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=w||I(t)?2:1),t._a=void 0,e)throw e.error})},I=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if((e=n[r++]).fail||!I(e.promise))return!1;return!0},R=function(t){v.call(a,function(){var e;w?b.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),O(e,!0))},P=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw m("Promise can't be resolved itself");(e=S(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(P,r,1),u(B,r,1))}catch(t){B.call(r,t)}}):(n._v=t,n._s=1,O(n,!1))}catch(t){B.call({_w:n,_d:!1},t)}}};x||(_=function(t){p(this,_,"Promise","_h"),h(t),r.call(this);try{t(u(P,this,1),u(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(556)(_.prototype,{then:function(t,e){var n=k(y(this,_));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=w?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),A=function(){var t=new r;this.promise=t,this.resolve=u(P,t,1),this.reject=u(B,t,1)}),f(f.G+f.W+f.F*!x,{Promise:_}),n(370)(_,"Promise"),n(538)("Promise"),o=n(355).Promise,f(f.S+f.F*!x,"Promise",{reject:function(t){var e=k(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!x),"Promise",{resolve:function(t){if(t instanceof _&&T(t.constructor,this))return t;var e=k(this);return(0,e.resolve)(t),e.promise}}),f(f.S+f.F*!(x&&n(511)(function(t){_.all(t).catch(E)})),"Promise",{all:function(t){var e=this,n=k(e),r=n.resolve,i=n.reject,o=j(function(){var n=[],o=0,s=1;d(t,!1,function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o&&i(o.error),n.promise},race:function(t){var e=this,n=k(e),r=n.reject,i=j(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(366),i=n(507),o=n(508),s=n(358),a=n(383),u=n(510),c={},f={};(e=t.exports=function(t,e,n,l,h){var p,d,y,v,g=h?function(){return t}:u(t),m=r(n,l,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>b;b++)if((v=e?m(s(d=t[b])[0],d[1]):m(t[b]))===c||v===f)return v}else for(y=g.call(t);!(d=y.next()).done;)if((v=i(y,m,d.value,e))===c||v===f)return v}).BREAK=c,e.RETURN=f},function(t,e,n){var r=n(358),i=n(367),o=n(371)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[o])?e:i(n)}},function(t,e,n){var r,i,o,s=n(366),a=n(424),u=n(394),c=n(361),f=n(350),l=f.process,h=f.setImmediate,p=f.clearImmediate,d=f.MessageChannel,y=0,v={},g=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},m=function(t){g.call(t.data)};h&&p||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++y]=function(){a("function"==typeof t?t:Function(t),e)},r(y),y},p=function(t){delete v[t]},"process"==n(380)(l)?r=function(t){l.nextTick(s(g,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=m,r=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",m,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),g.call(t)}}:function(t){setTimeout(s(g,t,1),0)}),t.exports={set:h,clear:p}},function(t,e,n){var r=n(350),i=n(554).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(380)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(o){var f=!0,l=document.createTextNode("");new o(c).observe(l,{characterData:!0}),n=function(){l.data=f=!f}}else if(a&&a.resolve){var h=a.resolve();n=function(){h.then(c)}}else n=function(){i.call(r,c)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(364);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(558);t.exports=n(559)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(357).f,i=n(392),o=n(556),s=n(366),a=n(551),u=n(381),c=n(552),f=n(474),l=n(540),h=n(538),p=n(352),d=n(368).fastKey,y=p?"_s":"size",v=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var l=t(function(t,r){a(t,l,e,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[y]=0,null!=r&&c(r,n,t[f],t)});return o(l.prototype,{clear:function(){for(var t=this._i,e=this._f;e;e=e.n)e.r=!0,e.p&&(e.p=e.p.n=void 0),delete t[e.i];this._f=this._l=void 0,this[y]=0},delete:function(t){var e=v(this,t);if(e){var n=e.n,r=e.p;delete this._i[e.i],e.r=!0,r&&(r.n=n),n&&(n.p=r),this._f==e&&(this._f=n),this._l==e&&(this._l=r),this[y]--}return!!e},forEach:function(t){a(this,l,"forEach");for(var e,n=s(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!v(this,t)}}),p&&r(l.prototype,"size",{get:function(){return u(this[y])}}),l},def:function(t,e,n){var r,i,o=v(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[y]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){"use strict";var r=n(350),i=n(354),o=n(364),s=n(556),a=n(368),u=n(552),c=n(551),f=n(359),l=n(353),h=n(511),p=n(370),d=n(434);t.exports=function(t,e,n,y,v,g){var m=r[t],b=m,_=v?"set":"add",w=b&&b.prototype,E={},x=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(g||w.forEach&&!l(function(){(new b).entries().next()}))){var T=new b,S=T[_](g?{}:-0,1)!=T,k=l(function(){T.has(1)}),A=h(function(t){new b(t)}),j=!g&&l(function(){for(var t=new b,e=5;e--;)t[_](e,e);return!t.has(-0)});A||((b=e(function(e,n){c(e,b,t);var r=d(new m,e,b);return null!=n&&u(n,v,r[_],r),r})).prototype=w,w.constructor=b),(k||j)&&(x("delete"),x("has"),v&&x("get")),(j||S)&&x(_),g&&w.clear&&delete w.clear}else b=y.getConstructor(e,t,v,_),s(b.prototype,n),a.NEED=!0;return p(b,t),E[t]=b,i(i.G+i.W+i.F*(b!=m),E),g||y.setStrong(b,t,v),b}},function(t,e,n){"use strict";var r=n(558);t.exports=n(559)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(518)(0),o=n(364),s=n(368),a=n(415),u=n(562),c=n(359),f=s.getWeak,l=Object.isExtensible,h=u.ufstore,p={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=f(t);return!0===e?h(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(this,t,e)}},v=t.exports=n(559)("WeakMap",d,y,u,!0,!0);7!=(new v).set((Object.freeze||Object)(p),7).get(p)&&(a((r=u.getConstructor(d)).prototype,y),s.NEED=!0,i(["delete","has","get","set"],function(t){var e=v.prototype,n=e[t];o(e,t,function(e,i){if(c(e)&&!l(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(556),i=n(368).getWeak,o=n(358),s=n(359),a=n(551),u=n(552),c=n(518),f=n(351),l=c(5),h=c(6),p=0,d=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},v=function(t,e){return l(t.a,function(t){return t[0]===e})};y.prototype={get:function(t){var e=v(this,t);if(e)return e[1]},has:function(t){return!!v(this,t)},set:function(t,e){var n=v(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var c=t(function(t,r){a(t,c,e,"_i"),t._i=p++,t._l=void 0,null!=r&&u(r,n,t[o],t)});return r(c.prototype,{delete:function(t){if(!s(t))return!1;var e=i(t);return!0===e?d(this).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!s(t))return!1;var e=i(t);return!0===e?d(this).has(t):e&&f(e,this._i)}}),c},def:function(t,e,n){var r=i(o(e),!0);return!0===r?d(t).set(e,n):r[t._i]=n,t},ufstore:d}},function(t,e,n){"use strict";var r=n(562);n(559)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(354),i=n(565),o=n(566),s=n(358),a=n(385),u=n(383),c=n(359),f=n(350).ArrayBuffer,l=n(553),h=o.ArrayBuffer,p=o.DataView,d=i.ABV&&f.isView,y=h.prototype.slice,v=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||c(t)&&v in t}}),r(r.P+r.U+r.F*n(353)(function(){return!new h(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==y&&void 0===e)return y.call(s(this),t);for(var n=s(this).byteLength,r=a(t,n),i=a(void 0===e?n:e,n),o=new(l(this,h))(u(i-r)),c=new p(this),f=new p(o),d=0;r<i;)f.setUint8(d++,c.getUint8(r++));return o}}),n(538)("ArrayBuffer")},function(t,e,n){for(var r,i=n(350),o=n(356),s=n(365),a=s("typed_array"),u=s("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,a,!0),o(r.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:a,VIEW:u}},function(t,e,n){"use strict";var r=n(350),i=n(352),o=n(374),s=n(565),a=n(356),u=n(556),c=n(353),f=n(551),l=n(384),h=n(383),p=n(396).f,d=n(357).f,y=n(534),v=n(370),g=r.ArrayBuffer,m=r.DataView,b=r.Math,_=r.RangeError,w=r.Infinity,E=g,x=b.abs,T=b.pow,S=b.floor,k=b.log,A=b.LN2,j=i?"_b":"buffer",O=i?"_l":"byteLength",C=i?"_o":"byteOffset",I=function(t,e,n){var r,i,o,s=Array(n),a=8*n-e-1,u=(1<<a)-1,c=u>>1,f=23===e?T(2,-24)-T(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=x(t))!=t||t===w?(i=t!=t?1:0,r=u):(r=S(k(t)/A),t*(o=T(2,-r))<1&&(r--,o*=2),(t+=r+c>=1?f/o:f*T(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(t*o-1)*T(2,e),r+=c):(i=t*T(2,c-1)*T(2,e),r=0));e>=8;s[l++]=255&i,i/=256,e-=8);for(r=r<<e|i,a+=e;a>0;s[l++]=255&r,r/=256,a-=8);return s[--l]|=128*h,s},R=function(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,s=o>>1,a=i-7,u=n-1,c=t[u--],f=127&c;for(c>>=7;a>0;f=256*f+t[u],u--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=e;a>0;r=256*r+t[u],u--,a-=8);if(0===f)f=1-s;else{if(f===o)return r?NaN:c?-w:w;r+=T(2,e),f-=s}return(c?-1:1)*r*T(2,f-e)},B=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},P=function(t){return[255&t]},F=function(t){return[255&t,t>>8&255]},M=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},N=function(t){return I(t,52,8)},L=function(t){return I(t,23,4)},D=function(t,e,n){d(t.prototype,e,{get:function(){return this[n]}})},U=function(t,e,n,r){var i=+n,o=l(i);if(i!=o||o<0||o+e>t[O])throw _("Wrong index!");var s=t[j]._b,a=o+t[C],u=s.slice(a,a+e);return r?u:u.reverse()},q=function(t,e,n,r,i,o){var s=+n,a=l(s);if(s!=a||a<0||a+e>t[O])throw _("Wrong index!");for(var u=t[j]._b,c=a+t[C],f=r(+i),h=0;h<e;h++)u[c+h]=f[o?h:e-h-1]},V=function(t,e){f(t,g,"ArrayBuffer");var n=+e,r=h(n);if(n!=r)throw _("Wrong length!");return r};if(s.ABV){if(!c(function(){new g})||!c(function(){new g(.5)})){for(var z,H=(g=function(t){return new E(V(this,t))}).prototype=E.prototype,W=p(E),X=0;W.length>X;)(z=W[X++])in g||a(g,z,E[z]);o||(H.constructor=g)}var G=new m(new g(2)),Y=m.prototype.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||u(m.prototype,{setInt8:function(t,e){Y.call(this,t,e<<24>>24)},setUint8:function(t,e){Y.call(this,t,e<<24>>24)}},!0)}else g=function(t){var e=V(this,t);this._b=y.call(Array(e),0),this[O]=e},m=function(t,e,n){f(this,m,"DataView"),f(t,g,"DataView");var r=t[O],i=l(e);if(i<0||i>r)throw _("Wrong offset!");if(i+(n=void 0===n?r-i:h(n))>r)throw _("Wrong length!");this[j]=t,this[C]=i,this[O]=n},i&&(D(g,"byteLength","_l"),D(m,"buffer","_b"),D(m,"byteLength","_l"),D(m,"byteOffset","_o")),u(m.prototype,{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var e=U(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=U(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return B(U(this,4,t,arguments[1]))},getUint32:function(t){return B(U(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return R(U(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return R(U(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){q(this,1,t,P,e)},setUint8:function(t,e){q(this,1,t,P,e)},setInt16:function(t,e){q(this,2,t,F,e,arguments[2])},setUint16:function(t,e){q(this,2,t,F,e,arguments[2])},setInt32:function(t,e){q(this,4,t,M,e,arguments[2])},setUint32:function(t,e){q(this,4,t,M,e,arguments[2])},setFloat32:function(t,e){q(this,4,t,L,e,arguments[2])},setFloat64:function(t,e){q(this,8,t,N,e,arguments[2])}});v(g,"ArrayBuffer"),v(m,"DataView"),a(m.prototype,s.VIEW,!0),e.ArrayBuffer=g,e.DataView=m},function(t,e,n){var r=n(354);r(r.G+r.W+r.F*!n(565).ABV,{DataView:n(566).DataView})},function(t,e,n){n(569)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(352)){var r=n(374),i=n(350),o=n(353),s=n(354),a=n(565),u=n(566),c=n(366),f=n(551),l=n(363),h=n(356),p=n(556),d=n(384),y=n(383),v=n(385),g=n(362),m=n(351),b=n(417),_=n(421),w=n(359),E=n(404),x=n(508),T=n(392),S=n(405),k=n(396).f,A=n(510),j=n(365),O=n(371),C=n(518),I=n(382),R=n(553),B=n(539),P=n(475),F=n(511),M=n(538),N=n(534),L=n(531),D=n(357),U=n(397),q=D.f,V=U.f,z=i.RangeError,H=i.TypeError,W=i.Uint8Array,X=Array.prototype,G=u.ArrayBuffer,Y=u.DataView,J=C(0),K=C(2),Z=C(3),$=C(4),Q=C(5),tt=C(6),et=I(!0),nt=I(!1),rt=B.values,it=B.keys,ot=B.entries,st=X.lastIndexOf,at=X.reduce,ut=X.reduceRight,ct=X.join,ft=X.sort,lt=X.slice,ht=X.toString,pt=X.toLocaleString,dt=O("iterator"),yt=O("toStringTag"),vt=j("typed_constructor"),gt=j("def_constructor"),mt=a.CONSTR,bt=a.TYPED,_t=a.VIEW,wt=C(1,function(t,e){return At(R(t,t[gt]),e)}),Et=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),xt=!!W&&!!W.prototype.set&&o(function(){new W(1).set({})}),Tt=function(t,e){if(void 0===t)throw H("Wrong length!");var n=+t,r=y(t);if(e&&!b(n,r))throw z("Wrong length!");return r},St=function(t,e){var n=d(t);if(n<0||n%e)throw z("Wrong offset!");return n},kt=function(t){if(w(t)&&bt in t)return t;throw H(t+" is not a typed array!")},At=function(t,e){if(!(w(t)&&vt in t))throw H("It is not a typed array constructor!");return new t(e)},jt=function(t,e){return Ot(R(t,t[gt]),e)},Ot=function(t,e){for(var n=0,r=e.length,i=At(t,r);r>n;)i[n]=e[n++];return i},Ct=function(t,e,n){q(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,r,i,o,s,a=E(t),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,h=A(a);if(null!=h&&!x(h)){for(s=h.call(a),r=[],e=0;!(o=s.next()).done;e++)r.push(o.value);a=r}for(l&&u>2&&(f=c(f,arguments[2],2)),e=0,n=y(a.length),i=At(this,n);n>e;e++)i[e]=l?f(a[e],e):a[e];return i},Rt=function(){for(var t=0,e=arguments.length,n=At(this,e);e>t;)n[t]=arguments[t++];return n},Bt=!!W&&o(function(){pt.call(new W(1))}),Pt=function(){return pt.apply(Bt?lt.call(kt(this)):kt(this),arguments)},Ft={copyWithin:function(t,e){return L.call(kt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(kt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(kt(this),arguments)},filter:function(t){return jt(this,K(kt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(kt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(kt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(kt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(kt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(kt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(kt(this),arguments)},lastIndexOf:function(t){return st.apply(kt(this),arguments)},map:function(t){return wt(kt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(kt(this),arguments)},reduceRight:function(t){return ut.apply(kt(this),arguments)},reverse:function(){for(var t,e=kt(this).length,n=Math.floor(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this},some:function(t){return Z(kt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ft.call(kt(this),t)},subarray:function(t,e){var n=kt(this),r=n.length,i=v(t,r);return new(R(n,n[gt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,y((void 0===e?r:v(e,r))-i))}},Mt=function(t,e){return jt(this,lt.call(kt(this),t,e))},Nt=function(t){kt(this);var e=St(arguments[1],1),n=this.length,r=E(t),i=y(r.length),o=0;if(i+e>n)throw z("Wrong length!");for(;o<i;)this[e+o]=r[o++]},Lt={entries:function(){return ot.call(kt(this))},keys:function(){return it.call(kt(this))},values:function(){return rt.call(kt(this))}},Dt=function(t,e){return w(t)&&t[bt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ut=function(t,e){return Dt(t,e=g(e,!0))?l(2,t[e]):V(t,e)},qt=function(t,e,n){return!(Dt(t,e=g(e,!0))&&w(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?q(t,e,n):(t[e]=n.value,t)};mt||(U.f=Ut,D.f=qt),s(s.S+s.F*!mt,"Object",{getOwnPropertyDescriptor:Ut,defineProperty:qt}),o(function(){ht.call({})})&&(ht=pt=function(){return ct.call(this)});var Vt=p({},Ft);p(Vt,Lt),h(Vt,dt,Lt.values),p(Vt,{slice:Mt,set:Nt,constructor:function(){},toString:ht,toLocaleString:Pt}),Ct(Vt,"buffer","b"),Ct(Vt,"byteOffset","o"),Ct(Vt,"byteLength","l"),Ct(Vt,"length","e"),q(Vt,yt,{get:function(){return this[bt]}}),t.exports=function(t,e,n,u){var c=t+((u=!!u)?"Clamped":"")+"Array",l="Uint8Array"!=c,p="get"+t,d="set"+t,v=i[c],g=v||{},m=v&&S(v),b=!v||!a.ABV,E={},x=v&&v.prototype,A=function(t,n){q(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[p](n*e+r.o,Et)}(this,n)},set:function(t){return function(t,n,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[d](n*e+i.o,r,Et)}(this,n,t)},enumerable:!0})};b?(v=n(function(t,n,r,i){f(t,v,c,"_d");var o,s,a,u,l=0,p=0;if(w(n)){if(!(n instanceof G||"ArrayBuffer"==(u=_(n))||"SharedArrayBuffer"==u))return bt in n?Ot(v,n):It.call(v,n);o=n,p=St(r,e);var d=n.byteLength;if(void 0===i){if(d%e)throw z("Wrong length!");if((s=d-p)<0)throw z("Wrong length!")}else if((s=y(i)*e)+p>d)throw z("Wrong length!");a=s/e}else a=Tt(n,!0),o=new G(s=a*e);for(h(t,"_d",{b:o,o:p,l:s,e:a,v:new Y(o)});l<a;)A(t,l++)}),x=v.prototype=T(Vt),h(x,"constructor",v)):F(function(t){new v(null),new v(t)},!0)||(v=n(function(t,n,r,i){var o;return f(t,v,c),w(n)?n instanceof G||"ArrayBuffer"==(o=_(n))||"SharedArrayBuffer"==o?void 0!==i?new g(n,St(r,e),i):void 0!==r?new g(n,St(r,e)):new g(n):bt in n?Ot(v,n):It.call(v,n):new g(Tt(n,l))}),J(m!==Function.prototype?k(g).concat(k(m)):k(g),function(t){t in v||h(v,t,g[t])}),v.prototype=x,r||(x.constructor=v));var j=x[dt],O=!!j&&("values"==j.name||null==j.name),C=Lt.values;h(v,vt,!0),h(x,bt,c),h(x,_t,!0),h(x,gt,v),(u?new v(1)[yt]==c:yt in x)||q(x,yt,{get:function(){return c}}),E[c]=v,s(s.G+s.W+s.F*(v!=g),E),s(s.S,c,{BYTES_PER_ELEMENT:e,from:It,of:Rt}),"BYTES_PER_ELEMENT"in x||h(x,"BYTES_PER_ELEMENT",e),s(s.P,c,Ft),M(c),s(s.P+s.F*xt,c,{set:Nt}),s(s.P+s.F*!O,c,Lt),s(s.P+s.F*(x.toString!=ht),c,{toString:ht}),s(s.P+s.F*o(function(){new v(1).slice()}),c,{slice:Mt}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!o(function(){x.toLocaleString.call([1,2])})),c,{toLocaleString:Pt}),P[c]=O?j:C,r||O||h(x,dt,C)}}else t.exports=function(){}},function(t,e,n){n(569)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(569)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(569)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(569)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(569)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(569)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(569)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(569)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(354),i=n(367),o=n(358),s=(n(350).Reflect||{}).apply,a=Function.apply;r(r.S+r.F*!n(353)(function(){s(function(){})}),"Reflect",{apply:function(t,e,n){var r=i(t),u=o(n);return s?s(r,e,u):a.call(r,e,u)}})},function(t,e,n){var r=n(354),i=n(392),o=n(367),s=n(358),a=n(359),u=n(353),c=n(423),f=(n(350).Reflect||{}).construct,l=u(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),h=!u(function(){f(function(){})});r(r.S+r.F*(l||h),"Reflect",{construct:function(t,e){o(t),s(e);var n=arguments.length<3?t:o(arguments[2]);if(h&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var u=n.prototype,p=i(a(u)?u:Object.prototype),d=Function.apply.call(t,p,e);return a(d)?d:p}})},function(t,e,n){var r=n(357),i=n(354),o=n(358),s=n(362);i(i.S+i.F*n(353)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){o(t),e=s(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(354),i=n(397).f,o=n(358);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(354),i=n(358),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(476)(o,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(397),i=n(405),o=n(351),s=n(354),a=n(359),u=n(358);s(s.S,"Reflect",{get:function t(e,n){var s,c,f=arguments.length<3?e:arguments[2];return u(e)===f?e[n]:(s=r.f(e,n))?o(s,"value")?s.value:void 0!==s.get?s.get.call(f):void 0:a(c=i(e))?t(c,n,f):void 0}})},function(t,e,n){var r=n(397),i=n(354),o=n(358);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(354),i=n(405),o=n(358);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(354);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(354),i=n(358),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(354);r(r.S,"Reflect",{ownKeys:n(589)})},function(t,e,n){var r=n(396),i=n(389),o=n(358),s=n(350).Reflect;t.exports=s&&s.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(354),i=n(358),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(357),i=n(397),o=n(405),s=n(351),a=n(354),u=n(363),c=n(358),f=n(359);a(a.S,"Reflect",{set:function t(e,n,a){var l,h,p=arguments.length<4?e:arguments[3],d=i.f(c(e),n);if(!d){if(f(h=o(e)))return t(h,n,a,p);d=u(0)}return s(d,"value")?!(!1===d.writable||!f(p)||((l=i.f(p,n)||u(0)).value=a,r.f(p,n,l),0)):void 0!==d.set&&(d.set.call(p,a),!0)}})},function(t,e,n){var r=n(354),i=n(419);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(354),i=n(382)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(532)("includes")},function(t,e,n){"use strict";var r=n(354),i=n(473)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(354),i=n(596);r(r.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(383),i=n(437),o=n(381);t.exports=function(t,e,n,s){var a=String(o(t)),u=a.length,c=void 0===n?" ":String(n),f=r(e);if(f<=u||""==c)return a;var l=f-u,h=i.call(c,Math.ceil(l/c.length));return h.length>l&&(h=h.slice(0,l)),s?h+a:a+h}},function(t,e,n){"use strict";var r=n(354),i=n(596);r(r.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(429)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(429)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(354),i=n(381),o=n(383),s=n(480),a=n(542),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(476)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!s(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):a.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new c(r,e)}})},function(t,e,n){n(373)("asyncIterator")},function(t,e,n){n(373)("observable")},function(t,e,n){var r=n(354),i=n(589),o=n(378),s=n(397),a=n(509);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n=o(t),r=s.f,u=i(n),c={},f=0;u.length>f;)a(c,e=u[f++],r(n,e));return c}})},function(t,e,n){var r=n(354),i=n(605)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(376),i=n(378),o=n(390).f;t.exports=function(t){return function(e){for(var n,s=i(e),a=r(s),u=a.length,c=0,f=[];u>c;)o.call(s,n=a[c++])&&f.push(t?[n,s[n]]:s[n]);return f}}},function(t,e,n){var r=n(354),i=n(605)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(354),i=n(404),o=n(367),s=n(357);n(352)&&r(r.P+n(608),"Object",{__defineGetter__:function(t,e){s.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){t.exports=n(374)||!n(353)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(350)[t]})},function(t,e,n){"use strict";var r=n(354),i=n(404),o=n(367),s=n(357);n(352)&&r(r.P+n(608),"Object",{__defineSetter__:function(t,e){s.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(354),i=n(404),o=n(362),s=n(405),a=n(397).f;n(352)&&r(r.P+n(608),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=a(n,r))return e.get}while(n=s(n))}})},function(t,e,n){"use strict";var r=n(354),i=n(404),o=n(362),s=n(405),a=n(397).f;n(352)&&r(r.P+n(608),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=a(n,r))return e.set}while(n=s(n))}})},function(t,e,n){var r=n(354);r(r.P+r.R,"Map",{toJSON:n(613)("Map")})},function(t,e,n){var r=n(421),i=n(614);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(552);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(354);r(r.P+r.R,"Set",{toJSON:n(613)("Set")})},function(t,e,n){var r=n(354);r(r.S,"System",{global:n(350)})},function(t,e,n){var r=n(354),i=n(380);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(354);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,n){var r=n(354);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,n){var r=n(354);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,s=n>>16,a=r>>16,u=(s*o>>>0)+(i*o>>>16);return s*a+(u>>16)+((i*a>>>0)+(65535&u)>>16)}})},function(t,e,n){var r=n(354);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,s=n>>>16,a=r>>>16,u=(s*o>>>0)+(i*o>>>16);return s*a+(u>>>16)+((i*a>>>0)+(65535&u)>>>16)}})},function(t,e,n){var r=n(623),i=n(358),o=r.key,s=r.set;r.exp({defineMetadata:function(t,e,n,r){s(t,e,i(n),o(r))}})},function(t,e,n){var r=n(557),i=n(354),o=n(369)("metadata"),s=o.store||(o.store=new(n(561))),a=function(t,e,n){var i=s.get(t);if(!i){if(!n)return;s.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o};t.exports={store:s,map:a,has:function(t,e,n){var r=a(e,n,!1);return void 0!==r&&r.has(t)},get:function(t,e,n){var r=a(e,n,!1);return void 0===r?void 0:r.get(t)},set:function(t,e,n,r){a(n,r,!0).set(t,e)},keys:function(t,e){var n=a(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,e,n){var r=n(623),i=n(358),o=r.key,s=r.map,a=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=s(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=a.get(e);return u.delete(n),!!u.size||a.delete(e)}})},function(t,e,n){var r=n(623),i=n(358),o=n(405),s=r.has,a=r.get,u=r.key,c=function(t,e,n){if(s(t,e,n))return a(t,e,n);var r=o(e);return null!==r?c(t,r,n):void 0};r.exp({getMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(560),i=n(614),o=n(623),s=n(358),a=n(405),u=o.keys,c=o.key,f=function(t,e){var n=u(t,e),o=a(t);if(null===o)return n;var s=f(o,e);return s.length?n.length?i(new r(n.concat(s))):s:n};o.exp({getMetadataKeys:function(t){return f(s(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(623),i=n(358),o=r.get,s=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(623),i=n(358),o=r.keys,s=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,e,n){var r=n(623),i=n(358),o=n(405),s=r.has,a=r.key,u=function(t,e,n){if(s(t,e,n))return!0;var r=o(e);return null!==r&&u(t,r,n)};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(623),i=n(358),o=r.has,s=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(623),i=n(358),o=n(367),s=r.key,a=r.set;r.exp({metadata:function(t,e){return function(n,r){a(t,e,(void 0!==r?i:o)(n),s(r))}}})},function(t,e,n){var r=n(354),i=n(555)(),o=n(350).process,s="process"==n(380)(o);r(r.G,{asap:function(t){var e=s&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(354),i=n(350),o=n(355),s=n(555)(),a=n(371)("observable"),u=n(367),c=n(358),f=n(551),l=n(556),h=n(356),p=n(552),d=p.RETURN,y=function(t){return null==t?void 0:u(t)},v=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},m=function(t){g(t)||(t._o=void 0,v(t))},b=function(t,e){c(t),this._c=void 0,this._o=t,t=new _(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(e){return void t.error(e)}g(this)&&v(this)};b.prototype=l({},{unsubscribe:function(){m(this)}});var _=function(t){this._s=t};_.prototype=l({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=y(n.next);if(r)return r.call(n,t)}catch(t){try{m(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=y(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{v(e)}finally{throw t}}return v(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=y(n.complete);t=r?r.call(n,t):void 0}catch(t){try{v(e)}finally{throw t}}return v(e),t}}});var w=function(t){f(this,w,"Observable","_f")._f=u(t)};l(w.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(n,r){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})})}}),l(w,{from:function(t){var e="function"==typeof this?this:w,n=y(c(t)[a]);if(n){var r=c(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return s(function(){if(!n){try{if(p(t,!1,function(t){if(e.next(t),n)return d})===d)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return s(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),h(w.prototype,a,function(){return this}),r(r.G,{Observable:w}),n(538)("Observable")},function(t,e,n){var r=n(350),i=n(354),o=n(424),s=n(635),a=r.navigator,u=!!a&&/MSIE .\./.test(a.userAgent),c=function(t){return u?function(e,n){return t(o(s,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),n)}:t};i(i.G+i.B+i.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){"use strict";var r=n(636),i=n(424),o=n(367);t.exports=function(){for(var t=o(this),e=arguments.length,n=Array(e),s=0,a=r._,u=!1;e>s;)(n[s]=arguments[s++])===a&&(u=!0);return function(){var r,o=arguments.length,s=0,c=0;if(!u&&!o)return i(t,n,this);if(r=n.slice(),u)for(;e>s;s++)r[s]===a&&(r[s]=arguments[c++]);for(;o>c;)r.push(arguments[c++]);return i(t,r,this)}}},function(t,e,n){t.exports=n(350)},function(t,e,n){var r=n(354),i=n(554);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(539),i=n(364),o=n(350),s=n(356),a=n(475),u=n(371),c=u("iterator"),f=u("toStringTag"),l=a.Array,h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],p=0;p<5;p++){var d,y=h[p],v=o[y],g=v&&v.prototype;if(g)for(d in g[c]||s(g,c,l),g[f]||s(g,f,y),a[y]=l,r)g[d]||i(g,d,r[d],!0)}},function(t,e){(function(e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof t,f=e.regeneratorRuntime;if(f)c&&(t.exports=f);else{(f=e.regeneratorRuntime=c?t.exports:{}).wrap=_;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",y={},v={};v[s]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(I([])));m&&m!==r&&i.call(m,s)&&(v=m);var b=T.prototype=E.prototype=Object.create(v);x.prototype=b.constructor=T,T.constructor=x,T[u]=x.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,T):(t.__proto__=T,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(b),t},f.awrap=function(t){return{__await:t}},S(k.prototype),k.prototype[a]=function(){return this},f.AsyncIterator=k,f.async=function(t,e,n,r){var i=new k(_(t,e,n,r));return f.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(b),b[u]="Generator",b[s]=function(){return this},b.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=I,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),y}}}function _(t,e,n,r){var i=e&&e.prototype instanceof E?e:E,o=Object.create(i.prototype),s=new C(r||[]);return o._invoke=function(t,e,n){var r=l;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=A(s,n);if(a){if(a===y)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=w(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function E(){}function x(){}function T(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){function n(e,r,o,s){var a=w(t[e],t,r);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(t){n("next",t,o,s)},function(t){n("throw",t,o,s)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},s)}s(a.arg)}var r;"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n)),this._invoke=function(t,e){function i(){return new Promise(function(r,i){n(t,e,r,i)})}return r=r?r.then(i,i):i()}}function A(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,A(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=w(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,y;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,y):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:R}}function R(){return{value:n,done:!0}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}())},function(t,e,n){n(641),t.exports=n(355).RegExp.escape},function(t,e,n){var r=n(354),i=n(642)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}}]));
|
|
34
|
+
!function(s,a){r(231).amd?(i=[],void 0===(o="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=a():(s.dcodeIO=s.dcodeIO||{}).Long=a()}(this,function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,a;return e?(a=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=s(t,(0|t)<0?-1:0,!0),a&&(n[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=s(t,t<0?-1:0,!1),a&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?v:d;if(e){if(t<0)return v;if(t>=h)return b}else{if(t<=-l)return w;if(t+1>=l)return _}return t<0?o(-t,e).neg():s(t%c|0,t/c|0,e)}function s(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=s;var a=Math.pow;function u(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,r).neg();for(var i=o(a(r,8)),s=d,f=0;f<t.length;f+=8){var c=Math.min(8,t.length-f),h=parseInt(t.substring(f,f+c),r);if(c<8){var l=o(a(r,c));s=s.mul(l).add(o(h))}else s=(s=s.mul(i)).add(o(h))}return s.unsigned=e,s}function f(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):s(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=f;var c=4294967296,h=c*c,l=h/2,p=i(1<<24),d=i(0);t.ZERO=d;var v=i(0,!0);t.UZERO=v;var y=i(1);t.ONE=y;var g=i(1,!0);t.UONE=g;var m=i(-1);t.NEG_ONE=m;var _=s(-1,2147483647,!1);t.MAX_VALUE=_;var b=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=b;var w=s(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(a(t,6),this.unsigned),s=this,u="";;){var f=s.div(i),c=(s.sub(f.mul(i)).toInt()>>>0).toString(t);if((s=f).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?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},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=f(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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(y)},E.neg=E.negate,E.add=function(t){e(t)||(t=f(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,h=0,l=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,l+=(p+=i+c)>>>16,h+=(l+=n+u)>>>16,h+=r+a,s((p&=65535)<<16|(d&=65535),(h&=65535)<<16|(l&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=f(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=f(t)),t.isZero())return d;if(this.eq(w))return t.isOdd()?w:d;if(t.eq(w))return this.isOdd()?w:d;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(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,a=65535&this.low,u=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,v=0,y=0,g=0,m=0;return g+=(m+=a*l)>>>16,y+=(g+=i*l)>>>16,g&=65535,y+=(g+=a*h)>>>16,v+=(y+=n*l)>>>16,y&=65535,v+=(y+=i*h)>>>16,y&=65535,v+=(y+=a*c)>>>16,v+=r*l+n*h+i*c+a*u,s((g&=65535)<<16|(m&=65535),(v&=65535)<<16|(y&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=f(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?v:d;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return g;i=v}else{if(this.eq(w))return t.eq(y)||t.eq(m)?w:t.eq(w)?y:(r=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?y:m:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));else if(t.eq(w))return this.unsigned?v:d;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();i=d}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),u=s<=48?1:a(2,s-48),c=o(r),h=c.mul(t);h.isNegative()||h.gt(n);)h=(c=o(r-=u,this.unsigned)).mul(t);c.isZero()&&(c=y),i=i.add(c),n=n.sub(h)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=f(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return s(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=f(t)),s(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=f(t)),s(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=f(t)),s(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):s(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):s(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var r=this.high;return t<32?s(this.low>>>t|r<<32-t,r>>>t,this.unsigned):s(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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(102)(t))},function(t,e,r){var n=r(234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv;var i=r(249);e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv;var o=r(236);e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){(function(t){var n=r(235),i=r(222),o=r(187),s=r(236),a=r(237),u=r(238),f=r(239);function c(e,r,o){if(!(this instanceof c))return new c(e,r,o);i.call(this),this._cache=new h,this._cipher=new n.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function h(){if(!(this instanceof h))return new h;this.cache=new t("")}o(c,i),c.prototype._update=function(e){var r,n;this._cache.add(e);for(var i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if("10101010101010101010101010101010"!==t.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(e){this.cache=t.concat([this.cache,e])},h.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},h.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++n<e;)r.writeUInt8(e,n);return t.concat([this.cache,r])};var l={ECB:r(242),CBC:r(243),CFB:r(244),CFB8:r(245),CFB1:r(246),OFB:r(247),CTR:r(248),GCM:r(248)};function p(e,r,n){var i=s[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==i.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==i.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===i.type?new u(l[i.mode],r,n):"auth"===i.type?new f(l[i.mode],r,n):new c(l[i.mode],r,n)}e.createCipheriv=p,e.createCipher=function(t,e){var r=s[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=a(e,!1,r.key,r.iv);return p(t,n.key,n.iv)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var r=Math.pow(2,32);function n(t){var e;return t>r||t<0?(e=Math.abs(t)%r,t<0?r-e:e):t}function i(t){for(;0<t.length;t++)t[0]=0;return!1}function o(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}o.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=(r=u^u<<1^u<<2^u<<3^u<<4)>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=t[s=t[o=t[i]]],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 s=new o;function a(t){for(var e=t.length/4,r=new Array(e),n=-1;++n<e;)r[n]=t.readUInt32BE(4*n);return r}function u(t){this._key=a(t),this._doReset()}u.blockSize=16,u.prototype.blockSize=u.blockSize,u.keySize=32,u.prototype.keySize=u.keySize,u.prototype._doReset=function(){var t,e,r,n,i,o;for(e=(r=this._key).length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n<i;n++)this._keySchedule[n]=n<e?r[n]:(o=this._keySchedule[n-1],n%e==0?(o=o<<8|o>>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=s.RCON[n/e|0]<<24):e>6&&n%e==4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),this._keySchedule[n-e]^o);for(this._invKeySchedule=[],t=0;t<i;t++)n=i-t,o=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?o:s.INV_SUB_MIX[0][s.SBOX[o>>>24]]^s.INV_SUB_MIX[1][s.SBOX[o>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[o>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&o]];return!0},u.prototype.encryptBlock=function(e){e=a(new t(e));var r=this._doCryptBlock(e,this._keySchedule,s.SUB_MIX,s.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},u.prototype.decryptBlock=function(e){var r=[(e=a(new t(e)))[3],e[1]];e[1]=r[0],e[3]=r[1];var n=this._doCryptBlock(e,this._invKeySchedule,s.INV_SUB_MIX,s.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},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},u.prototype._doCryptBlock=function(t,e,r,i){var o,s,a,u,f,c,h,l,p;s=t[0]^e[0],a=t[1]^e[1],u=t[2]^e[2],f=t[3]^e[3],o=4;for(var d=1;d<this._nRounds;d++)c=r[0][s>>>24]^r[1][a>>>16&255]^r[2][u>>>8&255]^r[3][255&f]^e[o++],h=r[0][a>>>24]^r[1][u>>>16&255]^r[2][f>>>8&255]^r[3][255&s]^e[o++],l=r[0][u>>>24]^r[1][f>>>16&255]^r[2][s>>>8&255]^r[3][255&a]^e[o++],p=r[0][f>>>24]^r[1][s>>>16&255]^r[2][a>>>8&255]^r[3][255&u]^e[o++],s=c,a=h,u=l,f=p;return c=(i[s>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^e[o++],h=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&s])^e[o++],l=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[s>>>8&255]<<8|i[255&a])^e[o++],p=(i[f>>>24]<<24|i[s>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^e[o++],[n(c),n(h),n(l),n(p)]},e.AES=u}).call(e,r(177).Buffer)},function(t,e){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-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},e["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},e["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},e["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},e["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},e["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",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"},e["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},e["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},e["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},function(t,e,r){(function(e){var n=r(188);t.exports=function(t,r,i,o){e.isBuffer(t)||(t=new e(t,"binary"));r&&!e.isBuffer(r)&&(r=new e(r,"binary"));o=o||0;var s,a,u=0,f=0,c=new e(i/=8),h=new e(o),l=0,p=[];for(;;){if(l++>0&&p.push(s),p.push(t),r&&p.push(r),s=n(e.concat(p)),p=[],a=0,i>0)for(;0!==i&&a!==s.length;)c[u++]=s[a],i--,a++;if(o>0&&a!==s.length)for(;0!==o&&a!==s.length;)h[f++]=s[a],o--,a++;if(0===i&&0===o)break}for(a=0;a<s.length;a++)s[a]=0;return{key:c,iv:h}}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(235),i=r(222);function o(t,r,s,a){if(!(this instanceof o))return new o(t,r,s);i.call(this),this._cipher=new n.AES(r),this._prev=new e(s.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,s.copy(this._prev),this._mode=t}r(187)(o,i),t.exports=o,o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(235),i=r(222),o=r(187),s=r(240),a=r(241);function u(t,r,o,a){if(!(this instanceof u))return new u(t,r,o);i.call(this),this._finID=e.concat([o,new e([0,0,0,1])]),o=e.concat([o,new e([0,0,0,2])]),this._cipher=new n.AES(r),this._prev=new e(o.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,this._alen=0,this._len=0,o.copy(this._prev),this._mode=t;var f=new e(4);f.fill(0),this._ghash=new s(this._cipher.encryptBlock(f)),this._authTag=null,this._called=!1}o(u,i),t.exports=u,u.prototype._update=function(t){if(!this._called&&this._alen){var r=16-this._alen%16;r<16&&((r=new e(r)).fill(0),this._ghash.update(r))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=a(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(function(t,e){var r=0;t.length!==e.length&&r++;var n=Math.min(t.length,e.length),i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=t;this._cipher.scrub()},u.prototype.getAuthTag=function(){if(!this._decrypt&&e.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},u.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},u.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}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var r=new e(16);function n(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(t){t=t.map(s);var r=new e(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r}r.fill(0),t.exports=n,n.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},n.prototype._multiply=function(){for(var t,e,r=function(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}(this.h),n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n=a(n,r)),e=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=i(n)},n.prototype.update=function(t){var r;for(this.cache=e.concat([this.cache,t]);this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},n.prototype.final=function(t,n){return this.cache.length&&this.ghash(e.concat([this.cache,r],16)),this.ghash(i([0,t,0,n])),this.state};var o=Math.pow(2,32);function s(t){var e;return t>o||t<0?(e=Math.abs(t)%o,t<0?o-e:e):t}function a(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){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(177).Buffer)},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(241);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(t){var n=r(241);function i(e,r,i){var o=r.length,s=n(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,i?r:s]),s}e.encrypt=function(e,r,n){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,i(e,r,n)]);break}o=e._cache.length,s=t.concat([s,i(e,r.slice(0,o),n)]),r=r.slice(o)}return s}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(e,r,n){var i=e._cipher.encryptBlock(e._prev)[0]^r;return e._prev=t.concat([e._prev.slice(1),new t([n?r:i])]),i}e.encrypt=function(e,n,i){for(var o=n.length,s=new t(o),a=-1;++a<o;)s[a]=r(e,n[a],i);return s}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(t,e,r){for(var i,o,s=-1,a=0;++s<8;)i=e&1<<7-s?128:0,a+=(128&(o=t._cipher.encryptBlock(t._prev)[0]^i))>>s%8,t._prev=n(t._prev,r?i:o);return a}function n(e,r){var n=e.length,i=-1,o=new t(e.length);for(e=t.concat([e,new t([r])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}e.encrypt=function(e,n,i){for(var o=n.length,s=new t(o),a=-1;++a<o;)s[a]=r(e,n[a],i);return s}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(241);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(241);function i(t){var e=t._cipher.encryptBlock(t._prev);return function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}(t._prev),e}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(235),i=r(222),o=r(187),s=r(236),a=r(238),u=r(239),f=r(237);function c(e,r,o){if(!(this instanceof c))return new c(e,r,o);i.call(this),this._cache=new h,this._last=void 0,this._cipher=new n.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function h(){if(!(this instanceof h))return new h;this.cache=new t("")}o(c,i),c.prototype._update=function(e){var r,n;this._cache.add(e);for(var i=[];r=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,r),i.push(n);return t.concat(i)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15],r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(e){this.cache=t.concat([this.cache,e])},h.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},h.prototype.flush=function(){if(this.cache.length)return this.cache};var l={ECB:r(242),CBC:r(243),CFB:r(244),CFB8:r(245),CFB1:r(246),OFB:r(247),CTR:r(248),GCM:r(248)};function p(e,r,n){var i=s[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==i.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==i.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===i.type?new a(l[i.mode],r,n,!0):"auth"===i.type?new u(l[i.mode],r,n,!0):new c(l[i.mode],r,n)}e.createDecipher=function(t,e){var r=s[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(e,!1,r.key,r.iv);return p(t,n.key,n.iv)},e.createDecipheriv=p}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";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}}();var i=r(251),o=r(255),s=o.getCurveByName("secp256k1");i=r(251);var a=r(225),u=r(185),f=r(171),c=r(181),h=s.G,l=s.n,p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.Q=e}return n(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=o.Point.decodeFrom(s,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=u.sha512(t);return u.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix");return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix");if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=u.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return this.pubdata=a.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix"),r=this.toBuffer(),n=u.sha512(r),i=u.ripemd160(n),o=u.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+a.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=u.sha256(t),n=u.ripemd160(r);n=e.concat([new e([56]),n]);var i=u.sha256(n);return i=u.sha256(i),n=e.concat([n,i.slice(0,4)]),a.encode(n)}},{key:"child",value:function(r){c(e.isBuffer(r),"Buffer required: offset"),c.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=u.sha256(r);var n=i.fromBuffer(r);if(n.compareTo(l)>=0)throw new Error("Child offset went out of bounds, try again");var o=h.multiply(n),a=this.Q.add(o);if(s.isInfinity(a))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(a)}},{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"000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?new t(null):new t(o.Point.decodeFrom(s,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]:f.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]:f.get("address_prefix"),i=r.slice(0,n.length);c.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length);var o=(r=new e(a.decode(r),"binary")).slice(-4);r=r.slice(0,-4);var s=u.ripemd160(r);return s=s.slice(0,4),c.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=p}).call(e,r(177).Buffer)},function(t,e,r){var n=r(252);r(254),t.exports=n},function(t,e,r){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}var i=n.prototype;i.__bigi=r(253).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===i.__bigi)},n.prototype.am=function(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},n.prototype.DB=26,n.prototype.DM=67108863;var o=n.prototype.DV=1<<26;n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var s,a,u="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array;for(s="0".charCodeAt(0),a=0;a<=9;++a)f[s++]=a;for(s="a".charCodeAt(0),a=10;a<36;++a)f[s++]=a;for(s="A".charCodeAt(0),a=10;a<36;++a)f[s++]=a;function c(t){return u.charAt(t)}function h(t,e){var r=f[t.charCodeAt(e)];return null==r?-1:r}function l(t){var e=new n;return e.fromInt(t),e}function p(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 d(t){this.m=t}function v(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 y(t,e){return t&e}function g(t,e){return t|e}function m(t,e){return t^e}function _(t,e){return t&~e}function b(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 w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function E(){}function T(t){return t}function S(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}d.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},d.prototype.revert=function(t){return t},d.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},d.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},v.prototype.convert=function(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},v.prototype.revert=function(t){var e=new n;return t.copyTo(e),this.reduce(e),e},v.prototype.reduce=function(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(t[r=e+this.m.t]+=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)},v.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},v.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+o:this.t=0},i.fromString=function(t,e){var r;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 this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==r?255&t[i]:h(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},i.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.dlShiftTo=function(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},i.drShiftTo=function(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},i.lShiftTo=function(t,e){var r,n=t%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},i.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&o)<<i,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&o)<<i),e.t=this.t-r,e.clamp()}},i.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},i.multiplyTo=function(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)},i.squareTo=function(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()},i.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=new n);var s=new n,a=this.s,u=t.s,f=this.DB-p(i[i.t-1]);f>0?(i.lShiftTo(f,s),o.lShiftTo(f,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,h=s[c-1];if(0!=h){var l=h*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),d=this.FV/l,v=(1<<this.F1)/l,y=1<<this.F2,g=r.t,m=g-c,_=null==e?new n:e;for(s.dlShiftTo(m,_),r.compareTo(_)>=0&&(r[r.t++]=1,r.subTo(_,r)),n.ONE.dlShiftTo(c,_),_.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--m>=0;){var b=r[--g]==h?this.DM:Math.floor(r[g]*d+(r[g-1]+y)*v);if((r[g]+=s.am(0,b,r,m,0,c))<b)for(s.dlShiftTo(m,_),r.subTo(_,r);r[g]<--b;)r.subTo(_,r)}null!=e&&(r.drShiftTo(c,e),a!=u&&n.ZERO.subTo(e,e)),r.t=c,r.clamp(),f>0&&r.rShiftTo(f,r),a<0&&n.ZERO.subTo(r,r)}}},i.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=p(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)},i.toString=function(t){var e;if(this.s<0)return"-"+this.negate().toString(t);if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=c(r));s>=0;)a<e?(r=(this[s]&(1<<a)-1)<<e-a,r|=this[--s]>>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=c(r));return i?o:"0"},i.negate=function(){var t=new n;return n.ZERO.subTo(this,t),t},i.abs=function(){return this.s<0?this.negate():this},i.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(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},i.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new d(e):new v(e),this.exp(t,r)},E.prototype.convert=T,E.prototype.revert=T,E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},E.prototype.sqrTo=function(t,e){t.squareTo(e)},S.prototype.convert=function(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},S.prototype.revert=function(t){return t},S.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},S.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},S.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var x=[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],k=(1<<26)/x[x.length-1];i.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.toRadix=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=l(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},i.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,s=0,a=0,u=0;u<t.length;++u){var f=h(t,u);f<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+f,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},i.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},i.bitwiseTo=function(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n<o;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=o;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},i.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},i.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},i.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(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]}},i.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},i.multiplyUpperTo=function(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)},i.modInt=function(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},i.millerRabin=function(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>x.length&&(t=x.length);for(var o=new n(null),s=[],a=0;a<t;++a){for(;f=x[Math.floor(Math.random()*x.length)],-1!=s.indexOf(f););s.push(f),o.fromInt(f);var u=o.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var f=1;f++<r&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},i.clone=function(){var t=new n;return this.copyTo(t),t},i.intValue=function(){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]},i.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0===i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},i.equals=function(t){return 0==this.compareTo(t)},i.min=function(t){return this.compareTo(t)<0?this:t},i.max=function(t){return this.compareTo(t)>0?this:t},i.and=function(t){var e=new n;return this.bitwiseTo(t,y,e),e},i.or=function(t){var e=new n;return this.bitwiseTo(t,g,e),e},i.xor=function(t){var e=new n;return this.bitwiseTo(t,m,e),e},i.andNot=function(t){var e=new n;return this.bitwiseTo(t,_,e),e},i.not=function(){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},i.shiftLeft=function(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},i.shiftRight=function(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},i.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+b(this[t]);return this.s<0?this.t*this.DB:-1},i.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=w(this[r]^e);return t},i.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},i.setBit=function(t){return this.changeBit(t,g)},i.clearBit=function(t){return this.changeBit(t,_)},i.flipBit=function(t){return this.changeBit(t,m)},i.add=function(t){var e=new n;return this.addTo(t,e),e},i.subtract=function(t){var e=new n;return this.subTo(t,e),e},i.multiply=function(t){var e=new n;return this.multiplyTo(t,e),e},i.divide=function(t){var e=new n;return this.divRemTo(t,e,null),e},i.remainder=function(t){var e=new n;return this.divRemTo(t,null,e),e},i.divideAndRemainder=function(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)},i.modPow=function(t,e){var r,i,o=t.bitLength(),s=l(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new d(e):e.isEven()?new S(e):new v(e);var a=new Array,u=3,f=r-1,c=(1<<r)-1;if(a[1]=i.convert(this),r>1){var h=new n;for(i.sqrTo(a[1],h);u<=c;)a[u]=new n,i.mulTo(h,a[u-2],a[u]),u+=2}var y,g,m=t.t-1,_=!0,b=new n;for(o=p(t[m])-1;m>=0;){for(o>=f?y=t[m]>>o-f&c:(y=(t[m]&(1<<o+1)-1)<<f-o,m>0&&(y|=t[m-1]>>this.DB+o-f)),u=r;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--m),_)a[y].copyTo(s),_=!1;else{for(;u>1;)i.sqrTo(s,b),i.sqrTo(b,s),u-=2;u>0?i.sqrTo(s,b):(g=s,s=b,b=g),i.mulTo(b,a[y],s)}for(;m>=0&&0==(t[m]&1<<o);)i.sqrTo(s,b),g=s,s=b,b=g,--o<0&&(o=this.DB-1,--m)}return i.revert(s)},i.modInverse=function(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=l(1),s=l(0),a=l(0),u=l(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},i.pow=function(t){return this.exp(t,new E)},i.gcd=function(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},i.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=x[x.length-1]){for(e=0;e<x.length;++e)if(r[0]==x[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<x.length;){for(var n=x[e],i=e+1;i<x.length&&n<k;)n*=x[i++];for(n=r.modInt(n);e<i;)if(n%x[e++]==0)return!1}return r.millerRabin(t)},i.square=function(){var t=new n;return this.squareTo(t),t},n.ZERO=l(0),n.ONE=l(1),n.valueOf=l,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){var e=r(181),n=r(252);n.fromByteArrayUnsigned=function(t){return 128&t[0]?new n([0].concat(t)):new n(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(177).Buffer)},function(t,e,r){var n=r(256),i=r(257),o=r(258);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){(function(e){var n=r(181),i=r(251),o=i.valueOf(3);function s(t,e,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(s.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(s.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(s.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),s.fromAffine=function(t,e,r){return new s(t,e,r,i.ONE)},s.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},s.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new s(this.curve,this.x,t,this.z)},s.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,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),a=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===a.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=a.square(),f=u.multiply(a),c=e.multiply(u),h=i.square().multiply(this.z),l=h.subtract(c.shiftLeft(1)).multiply(t.z).subtract(f).multiply(a).mod(this.curve.p),p=c.multiply(o).multiply(i).subtract(r.multiply(f)).subtract(h.multiply(i)).multiply(t.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(t.z).mod(this.curve.p);return new s(this.curve,l,p,d)},s.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),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,a=t.square().multiply(o);0!==i.signum()&&(a=a.add(this.z.square().multiply(i)));var u=(a=a.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=a.multiply(o).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(a.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new s(this.curve,u,f,c)},s.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(o),n=this.negate(),i=this,s=r.bitLength()-2;s>0;--s){var a=r.testBit(s),u=e.testBit(s);i=i.twice(),a!==u&&(i=i.add(a?this:n))}return i},s.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},s.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new e("00","hex");var r,n=this.affineX,i=this.affineY,o=this.curve.pLength;return t?(r=new e(1+o)).writeUInt8(i.isEven()?2:3,0):((r=new e(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},s.decodeFrom=function(t,e){var r,o=e.readUInt8(0),a=4!==o,u=Math.floor((t.p.bitLength()+7)/8),f=i.fromBuffer(e.slice(1,1+u));if(a){n.equal(e.length,u+1,"Invalid sequence length"),n(2===o||3===o,"Invalid sequence tag");var c=3===o;r=t.pointFromX(c,f)}else{n.equal(e.length,1+u+u,"Invalid sequence length");var h=i.fromBuffer(e.slice(1+u));r=s.fromAffine(t,f,h)}return r.compressed=a,r},s.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=s}).call(e,r(177).Buffer)},function(t,e,r){var n=r(181),i=r(251),o=r(256);function s(t,e,r,n,s,a,u){this.p=t,this.a=e,this.b=r,this.G=o.fromAffine(this,n,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}s.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),o.fromAffine(this,e,n)},s.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},s.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)},s.prototype.validate=function(t){n(!this.isInfinity(t),"Point is at infinity"),n(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return n(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=s},function(t,e,r){var n=r(251),i=r(259),o=r(257);t.exports=function(t){var e=i[t];if(!e)return null;var r=new n(e.p,16),s=new n(e.a,16),a=new n(e.b,16),u=new n(e.n,16),f=new n(e.h,16),c=new n(e.Gx,16),h=new n(e.Gy,16);return new o(r,s,a,c,h,u,f)}},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";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}}();var i=r(255),o=i.Point,s=i.getCurveByName("secp256k1"),a=r(251),u=r(225),f=r(181),c=r(185),h=r(250),l=(s.G,s.n),p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.d=e}return n(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=c.sha256(t);r=(r=c.sha256(r)).slice(0,4);var n=e.concat([t,r]);return u.encode(n)}},{key:"toString",value:function(){return this.toWif()}},{key:"toPublicKeyPoint",value:function(){return s.G.multiply(this.d)}},{key:"toPublic",value:function(){return this.public_key?this.public_key:this.public_key=h.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){var e=(t=d(t)).toUncompressed().toBuffer(),r=o.fromAffine(s,a.fromBuffer(e.slice(1,33)),a.fromBuffer(e.slice(33,65))),n=this.toBuffer(),i=r.multiply(a.fromBuffer(n)).affineX.toBuffer({size:32});return c.sha512(i)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=c.sha256(r);var n=a.fromBuffer(r);if(n.compareTo(l)>=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(a.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(c.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(u.decode(r)),i=n.readUInt8(0);f.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.slice(-4),a=c.sha256(o);if(a=(a=c.sha256(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=p;var d=function(t){return null==t?t:t.Q?t:h.fromStringOrThrow(t)}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";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}}();var i=r(262),o=r(185),s=r(255).getCurveByName("secp256k1"),a=r(181),u=r(251),f=r(250),c=r(260),h=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.s=r,this.i=n,a.equal(null!=this.r,!0,"Missing parameter"),a.equal(null!=this.s,!0,"Missing parameter"),a.equal(null!=this.i,!0,"Missing parameter")}return n(t,[{key:"toBuffer",value:function(){var t;return(t=new e(65)).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(o.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e,r,n=void 0;return r=u.fromBuffer(t),n=this.i,n-=27,n&=3,e=i.recoverPubKey(s,r,this,n),f.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=o.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return a.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),i.verify(s,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;return a.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),a.equal(r-27,r-27&7,"Invalid signature parameter"),new t(u.fromBuffer(e.slice(1,33)),u.fromBuffer(e.slice(33)),r)}},{key:"signBuffer",value:function(e,r){var n=o.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");var o,f,c,h,p,d,v;for(n=l(n),a(n,"private_key required"),h=null,v=0,f=u.fromBuffer(r);;){if(d=(o=(c=i.sign(s,r,n.d,v++)).toDER())[5+(p=o[3])],32===p&&32===d){h=i.calcPubKeyRecoveryParam(s,f,c,n.toPublicKey().Q),h+=4,h+=27;break}v%10==0&&console.log("WARN: "+v+" 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)}},{key:"verifyData",value:function(t,r,n){var u=new e(t),c=new e(u,"hex"),h=o.sha256(c);a.equal(h.length,32,"A SHA 256 should be 32 bytes long, instead got "+h.length);var l=f.fromString(n);return i.verify(s,h,r,l.Q)}}]),t}(),l=function(t){return t?t.d?t:c.fromWif(t):t};t.exports=h}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(181),i=r(185),o=r(263),s=r(251),a=r(264);function u(t,r,a,u,f){o("Buffer",r),o(s,a),f&&(r=i.sha256(e.concat([r,new e(f)]))),n.equal(r.length,32,"Hash must be 256 bit");var c=a.toBuffer(32),h=new e(32),l=new e(32);l.fill(1),h.fill(0),h=i.HmacSHA256(e.concat([l,new e([0]),c,r]),h),l=i.HmacSHA256(l,h),h=i.HmacSHA256(e.concat([l,new e([1]),c,r]),h),l=i.HmacSHA256(l,h),l=i.HmacSHA256(l,h);for(var p=s.fromBuffer(l);p.signum()<=0||p.compareTo(t.n)>=0||!u(p);)h=i.HmacSHA256(e.concat([l,new e([0])]),h),l=i.HmacSHA256(l,h),l=i.HmacSHA256(l,h),p=s.fromBuffer(l);return p}function f(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);return!t.isInfinity(h)&&h.affineX.mod(i).equals(s)}function c(t,e,r,i){n.strictEqual(3&i,i,"Recovery param is more than two bits");var o=t.n,s=t.G,a=r.r,u=r.s;n(a.signum()>0&&a.compareTo(o)<0,"Invalid r value"),n(u.signum()>0&&u.compareTo(o)<0,"Invalid s value");var f=1&i,c=i>>1?a.add(o):a,h=t.pointFromX(f,c),l=h.multiply(o);n(t.isInfinity(l),"nR is not a valid curve point");var p=e.negate().mod(o),d=a.modInverse(o),v=h.multiplyTwo(u,s,p).multiply(d);return t.validate(v),v}t.exports={calcPubKeyRecoveryParam:function(t,e,r,n){for(var i=0;i<4;i++)if(c(t,e,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:u,recoverPubKey:c,sign:function(t,e,r,n){var i,o,f=s.fromBuffer(e),c=t.n,h=t.G,l=(u(t,e,r,function(e){var n=h.multiply(e);return!t.isInfinity(n)&&0!==(i=n.affineX.mod(c)).signum()&&0!==(o=e.modInverse(c).multiply(f.add(r.multiply(i))).mod(c)).signum()},n),c.shiftRight(1));return o.compareTo(l)>0&&(o=c.subtract(o)),new a(i,o)},verify:function(t,e,r,n){return f(t,s.fromBuffer(e),r,n)},verifyRaw:f}}).call(e,r(177).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(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(181),i=r(263),o=r(251);function s(t,e){i(o,t),i(o,e),this.r=t,this.s=e}s.parseCompact=function(t){n.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;return n.equal(e,7&e,"Invalid signature parameter"),{compressed:!!(4&e),i:e&=3,signature:new s(o.fromBuffer(t.slice(1,33)),o.fromBuffer(t.slice(33)))}},s.fromDER=function(t){n.equal(t.readUInt8(0),48,"Not a DER sequence"),n.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),n.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);n(e>0,"R length is zero");var r=4+e;n.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var i=t.readUInt8(r+1);n(i>0,"S length is zero");var a=t.slice(4,r),u=t.slice(r+2);r+=2+i,e>1&&0===a.readUInt8(0)&&n(128&a.readUInt8(1),"R value excessively padded"),i>1&&0===u.readUInt8(0)&&n(128&u.readUInt8(1),"S value excessively padded"),n.equal(r,t.length,"Invalid DER encoding");var f=o.fromDERInteger(a),c=o.fromDERInteger(u);return n(f.signum()>=0,"R value is negative"),n(c.signum()>=0,"S value is negative"),new s(f,c)},s.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=-129&e;return n(r>0&&r<4,"Invalid hashType"),{signature:s.fromDER(t.slice(0,-1)),hashType:e}},s.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},s.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),(n=n.concat(t)).push(2,r.length),(n=n.concat(r)).unshift(48,n.length),new e(n)},s.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=s}).call(e,r(177).Buffer)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=function(t){if("string"!=typeof t)throw new Error("string required for brain_key");return(t=t.trim()).split(/[\t\n\v\f\r ]+/).join(" ")}},function(t,e,r){(function(e){"use strict";var n=r(260),i=r(185),o=r(228),s=0,a=0,u=o.randomBuffer(101);t.exports={addEntropy:function(){a++;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 f,c=e[Symbol.iterator]();!(n=(f=c.next()).done);n=!0){var h=f.value,l=s++%101;(u[l]+=h)>9007199254740991&&(u[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<250;)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(u).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++)t+=(r=navigator.mimeTypes[n]).description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",a,"events")}catch(e){t+=i.sha256((new Date).toString())}return t+=new e(t).toString("binary")+" "+(new Date).toString()}}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(268)),i=o(r(271));function o(t){return t&&t.__esModule?t:{default:t}}e.default={http:n.default,ws:i.default}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});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}}();e.jsonRpc=d;var i=u(r(269)),o=u(r(168)),s=u(r(270)),a=u(r(171));function u(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 h(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 l=(0,o.default)("steem:http"),p=function(t){function e(t){f(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return r.name="RPCError",r.code=t.code,r.data=t.data,r}return h(e,Error),e}();function d(t,e){var r=e.method,n=e.id,o=e.params,s={id:n,jsonrpc:"2.0",method:r,params:o};return(0,i.default)(t,{body:JSON.stringify(s),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 p(t.error);return t.result})}var v=function(t){function e(){return f(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return h(e,s.default),n(e,[{key:"send",value:function(t,e,r){l("Steem::send",t,e);var n=e.id||this.id++,i=[t,e.method,e.params];d(a.default.get("websocket"),{method:"call",id:n,params:i}).then(function(t){r(null,t)},function(t){r(t)})}}]),e}();e.default=v},function(t,e){(function(r){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==r&&r||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i.iterable&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function h(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function l(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function p(t){var e=new FileReader,r=l(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i.arrayBuffer&&i.blob&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||s(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,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):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var t=h(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(){if(this._bodyArrayBuffer){var t=h(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t=h(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=l(e),n=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=n?n[1]:"utf-8";return e.readAsText(t,i),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(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("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},i.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var y=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function g(t,e){if(!(this instanceof g))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=function(t){var e=t.toUpperCase();return y.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function m(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 _(t,e){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},v.call(g.prototype),v.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var b=[301,302,303,307,308];_.redirect=function(t,e){if(-1===b.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(t,r){return new Promise(function(o,s){var f=new g(t,r);if(f.signal&&f.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var h=new XMLHttpRequest;function l(){h.abort()}if(h.onload=function(){var t={statusText:h.statusText,headers:function(t){var e=new c;return t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{e.append(n,i)}catch(t){console.warn("Response "+t.message)}}}),e}(h.getAllResponseHeaders()||"")};0===f.url.indexOf("file://")&&(h.status<200||h.status>599)?t.status=200:t.status=h.status,t.url="responseURL"in h?h.responseURL:t.headers.get("X-Request-URL");var e="response"in h?h.response:h.responseText;setTimeout(function(){o(new _(e,t))},0)},h.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},h.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request timed out"))},0)},h.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},h.open(f.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(f.url),!0),"include"===f.credentials?h.withCredentials=!0:"omit"===f.credentials&&(h.withCredentials=!1),"responseType"in h&&(i.blob?h.responseType="blob":i.arrayBuffer&&(h.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof c||n.Headers&&r.headers instanceof n.Headers)){var p=[];Object.getOwnPropertyNames(r.headers).forEach(function(t){p.push(a(t)),h.setRequestHeader(t,u(r.headers[t]))}),f.headers.forEach(function(t,e){-1===p.indexOf(e)&&h.setRequestHeader(e,t)})}else f.headers.forEach(function(t,e){h.setRequestHeader(e,t)});f.signal&&(f.signal.addEventListener("abort",l),h.onreadystatechange=function(){4===h.readyState&&f.signal.removeEventListener("abort",l)}),h.send(void 0===f._bodyInit?null:f._bodyInit)})}w.polyfill=!0,n.fetch||(n.fetch=w,n.Headers=c,n.Request=g,n.Response=_),e.Headers=c,e.Request=g,e.Response=_,e.fetch=w,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}).call(e,function(){return this}())},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});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=s(r(3)),o=s(r(2));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.options=t,r.id=0,r}return function(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)}(e,o.default),n(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}();e.default=a,i.default.promisifyAll(a.prototype)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});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=f(r(3)),o=f(r(167)),s=f(r(168)),a=f(r(171)),u=f(r(270));function f(t){return t&&t.__esModule?t:{default:t}}var c=void 0;if(o.default)c=r(272);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");c=window.WebSocket}var h=(0,s.default)("steem:ws"),l=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(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 function(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)}(e,u.default),n(e,[{key:"start",value:function(){var t=this;return this.startPromise?this.startPromise:(this.startPromise=new i.default(function(e,r){t.ws=new c(a.default.get("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(){h("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 h("Steem::send",t,e),this.start().then(function(){var o={};new i.default(function(t,e){o.resolve=function(e){t(e),r(null,e)},o.reject=function(t){e(t),r(t)}});var s={deferral:o,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(s.message.id,s),n.ws.send(JSON.stringify(s.message)),o})}},{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){i.value.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){i.value.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(h("-- Steem.onMessage --\x3e",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}();e.default=l},200,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(304),i=Object.prototype;try{var o=n.extend("should",i);n._prevShould=o}catch(t){}t.exports=n},function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var i=n(r(305)),o=n(r(306)),s=n(r(307)),a=r(308),u=r(309);function f(t){return"symbol"==typeof t?t:String(t)}var c=s.functionName,h={typeAdaptors:a.defaultTypeAdaptorStorage,getFormatter:function(t){return new s.Formatter(t||h)}};function l(t,e){return h.getFormatter(e).format(t)}function p(t){var e=h.getFormatter();return s.formatPlainObjectKey.call(e,t)}function d(t){if(u.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message},configurable:!0,enumerable:!1}),Error.captureStackTrace)Error.captureStackTrace(this,this.stackStartFunction);else{var e=new Error;if(e.stack){var r=e.stack;if(this.stackStartFunction){var n=c(this.stackStartFunction),i=r.indexOf("\n"+n);if(i>=0){var o=r.indexOf("\n",i+1);r=r.substring(o+1)}}this.stack=r}}}var v=" ";function y(t){return v+t}function g(t){u.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message}})}function m(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}function _(){m.apply(this,arguments)}d.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=l(this.actual),e="expected"in this?" "+l(this.expected):"",r="details"in this&&this.details?" ("+this.details+")":"",n=this.previous?"\n"+function(t){return t.split("\n").map(y).join("\n")}(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+r+n}}}),g.prototype={generateMessage:d.prototype.generateMessage},m.prototype={constructor:m,assert:function(t){if(t)return this;var e=this.params;throw"obj"in e&&!("actual"in e)?e.actual=e.obj:"obj"in e||"actual"in e||(e.actual=this.obj),e.stackStartFunction=e.stackStartFunction||this.assert,e.negate=this.negate,e.assertion=this,this.light?new g(e):new d(e)},fail:function(){return this.assert(!1)}},_.prototype.then=function(t,e){return this.obj.then(t,e)},m.add=function(t,e){Object.defineProperty(m.prototype,t,{enumerable:!0,configurable:!0,value:function(){var r=new m(this.obj,this,t);r.anyOne=this.anyOne,r.onlyThis=this.onlyThis,r.light=!0;try{e.apply(r,arguments)}catch(t){if(t instanceof d||t instanceof g){if(this.negate)return this.obj=r.obj,this.negate=!1,this;r!==t.assertion&&(r.params.previous=t),r.negate=!1,r.light=!1,r.fail()}throw t}return this.negate&&(r.negate=!0,r.params.details="false negative fail",r.light=!1,r.fail()),this.params.operator||(this.params=r.params),this.obj=r.obj,this.negate=!1,this}}),Object.defineProperty(_.prototype,t,{enumerable:!0,configurable:!0,value:function(){var e=arguments;return this.obj=this.obj.then(function(r){return r[t].apply(r,e)}),this}})},m.addChain=function(t,e){e=e||function(){},Object.defineProperty(m.prototype,t,{get:function(){return e.call(this),this},enumerable:!0}),Object.defineProperty(_.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.obj=this.obj.then(function(e){return e[t]}),this}})},m.alias=function(t,e){var r=Object.getOwnPropertyDescriptor(m.prototype,t);if(!r)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(m.prototype,e,r);var n=Object.getOwnPropertyDescriptor(_.prototype,t);n&&Object.defineProperty(_.prototype,e,n)},m.addChain("not",function(){this.negate=!this.negate}),m.addChain("any",function(){this.anyOne=!0}),m.addChain("only",function(){this.onlyThis=!0});var b=Array.prototype.slice,w=T;function E(t,e,r,n,i){var o=new m(t);o.params={operator:n,expected:e,message:r,stackStartFunction:i||E},o.fail()}function T(t,e){t||E(t,!0,e,"==",w.ok)}function S(t,e){return!(!t||!e)&&("[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e||!0===e.call({},t))}function x(t,e,r,n){var i;"string"==typeof r&&(n=r,r=null);try{e()}catch(t){i=t}if(n=(r&&r.name?" ("+r.name+")":".")+(n?" "+n:"."),t&&!i&&E(i,r,"Missing expected exception"+n),!t&&S(i,r)&&E(i,r,"Got unwanted exception"+n),t&&i&&r&&!S(i,r)||!t&&i)throw i}w.fail=E,w.ok=T,w.equal=function(t,e,r){t!=e&&E(t,e,r,"==",w.equal)},w.notEqual=function(t,e,r){t==e&&E(t,e,r,"!=",w.notEqual)},w.deepEqual=function(t,e,r){0!==o(t,e).length&&E(t,e,r,"deepEqual",w.deepEqual)},w.notDeepEqual=function(t,e,r){o(t,e).result&&E(t,e,r,"notDeepEqual",w.notDeepEqual)},w.strictEqual=function(t,e,r){t!==e&&E(t,e,r,"===",w.strictEqual)},w.notStrictEqual=function(t,e,r){t===e&&E(t,e,r,"!==",w.notStrictEqual)},w.throws=function(){x.apply(this,[!0].concat(b.call(arguments)))},w.doesNotThrow=function(){x.apply(this,[!1].concat(b.call(arguments)))},w.ifError=function(t){if(t)throw t};var k=Array.prototype.slice;function A(t){return new m(t)}A.AssertionError=d,A.Assertion=m,A.modules={format:s,type:i,equal:o},A.format=l,A.config=h,A.extend=function(t,e){t=t||"should",e=e||Object.prototype;var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(){},get:function(){return A(function(t){return t instanceof Number||t instanceof String||t instanceof Boolean}(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}},A.noConflict=function(t){return(t=t||A._prevShould)&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),A},A.use=function(t){return t(A,A.Assertion),this},A.use(function(t){var e=t.format;u.merge(t,w),t.exist=t.exists=function(r,n){if(null==r)throw new d({message:n||"expected "+e(r)+" to exist",stackStartFunction:t.exist})},t.not={},t.not.exist=t.not.exists=function(r,n){if(null!=r)throw new d({message:n||"expected "+e(r)+" to not exist",stackStartFunction:t.not.exist})}}).use(function(t,e){["an","of","a","and","be","been","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})}).use(function(t,e){e.add("true",function(t){this.is.exactly(!0,t)}),e.alias("true","True"),e.add("false",function(t){this.is.exactly(!1,t)}),e.alias("false","False"),e.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)})}).use(function(t,e){e.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!=this.obj)}),e.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number().and.not.a.NaN().and.assert(!isFinite(this.obj))}),e.add("within",function(t,e,r){this.params={operator:"to be within "+t+".."+e,message:r},this.assert(this.obj>=t&&this.obj<=e)}),e.add("approximately",function(t,e,r){this.params={operator:"to be approximately "+t+" ±"+e,message:r},this.assert(Math.abs(this.obj-t)<=e)}),e.add("above",function(t,e){this.params={operator:"to be above "+t,message:e},this.assert(this.obj>t)}),e.add("below",function(t,e){this.params={operator:"to be below "+t,message:e},this.assert(this.obj<t)}),e.alias("above","greaterThan"),e.alias("below","lessThan"),e.add("aboveOrEqual",function(t,e){this.params={operator:"to be above or equal"+t,message:e},this.assert(this.obj>=t)}),e.add("belowOrEqual",function(t,e){this.params={operator:"to be below or equal"+t,message:e},this.assert(this.obj<=t)}),e.alias("aboveOrEqual","greaterThanOrEqual"),e.alias("belowOrEqual","lessThanOrEqual")}).use(function(t,e){function r(r,n,i){e.add(r,function(e){1!==arguments.length?e=Array.prototype.slice.call(arguments):t(e).be.Array(),this.params={operator:n,expected:e};var r=this.obj,o=!1;a.forEach(e,function(e){try{return t(e)[i](r),o=!0,!1}catch(e){if(e instanceof t.AssertionError)return;throw e}}),this.assert(o)})}e.add("eql",function(e,r){this.params={operator:"to equal",expected:e,message:r};var n=this.obj,s=o(this.obj,e,t.config);this.params.details=s.map(function(t){return function(t,e,r){return((t.path.length>0?"at "+t.path.map(p).join(" -> "):"")+(t.a===e?"":", A has "+l(t.a))+(t.b===r?"":" and B has "+l(t.b))+(t.showReason?" because "+t.reason:"")).trim()}(t,n,e)}).join(", "),this.params.showDiff=0===o(i(n),i(e)).length,this.assert(0===s.length)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=0===o(i(this.obj),i(t)).length,this.assert(t===this.obj)}),e.alias("equal","exactly"),e.alias("eql","deepEqual"),r("equalOneOf","to be equals one of","equal"),r("oneOf","to be one of","eql")}).use(function(t,e){e.add("Number",function(){this.params={operator:"to be a number"},this.have.type("number")}),e.add("arguments",function(){this.params={operator:"to be arguments"},this.have.class("Arguments")}),e.alias("arguments","Arguments"),e.add("type",function(e,r){this.params={operator:"to have type "+e,message:r},t(typeof this.obj).be.exactly(e)}),e.add("instanceof",function(t,e){this.params={operator:"to be an instance of "+c(t),message:e},this.assert(Object(this.obj)instanceof t)}),e.alias("instanceof","instanceOf"),e.add("Function",function(){this.params={operator:"to be a function"},this.have.type("function")}),e.add("Object",function(){this.params={operator:"to be an object"},this.is.not.null().and.have.type("object")}),e.add("String",function(){this.params={operator:"to be a string"},this.have.type("string")}),e.add("Array",function(){this.params={operator:"to be an array"},this.have.class("Array")}),e.add("Boolean",function(){this.params={operator:"to be a boolean"},this.have.type("boolean")}),e.add("Error",function(){this.params={operator:"to be an error"},this.have.instanceOf(Error)}),e.add("Date",function(){this.params={operator:"to be a date"},this.have.instanceOf(Date)}),e.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)}),e.alias("null","Null"),e.add("class",function(t){this.params={operator:"to have [[Class]] "+t},this.assert(Object.prototype.toString.call(this.obj)==="[object "+t+"]")}),e.alias("class","Class"),e.add("undefined",function(){this.params={operator:"to be undefined"},this.assert(void 0===this.obj)}),e.alias("undefined","Undefined"),e.add("iterable",function(){this.params={operator:"to be iterable"},t(this.obj).have.property(Symbol.iterator).which.is.a.Function()}),e.add("iterator",function(){this.params={operator:"to be iterator"},t(this.obj).have.property("next").which.is.a.Function()}),e.add("generator",function(){this.params={operator:"to be generator"},t(this.obj).be.iterable.and.iterator.and.it.is.equal(this.obj[Symbol.iterator]())})}).use(function(t,e){e.add("startWith",function(e,r){this.params={operator:"to start with "+t.format(e),message:r},this.assert(0===this.obj.indexOf(e))}),e.add("endWith",function(e,r){this.params={operator:"to end with "+t.format(e),message:r},this.assert(this.obj.indexOf(e,this.obj.length-e.length)>=0)})}).use(function(t,e){var r=t.format;e.add("propertyWithDescriptor",function(e,n){this.params={actual:this.obj,operator:"to have own property with descriptor "+r(n)};var i=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(i),e)).have.properties(n)}),e.add("enumerable",function(t,e){t=f(t),this.params={operator:"to have enumerable property "+p(t)+(arguments.length>1?" equal to "+r(e):"")};var n={enumerable:!0};arguments.length>1&&(n.value=e),this.have.propertyWithDescriptor(t,n)}),e.add("enumerables",function(){var e=function(){var t={};if(arguments.length>1)t.names=k.call(arguments);else{var e=arguments[0];"string"==typeof e?t.names=[e]:Array.isArray(e)?t.names=e:(t.names=Object.keys(e),t.values=e)}return t}.apply(null,arguments);this.params={operator:"to have enumerables "+e.names.map(p)};var r=this.obj;e.names.forEach(function(e){t(r).have.enumerable(e)})}),e.add("property",function(t,e){if(t=f(t),arguments.length>1){var r={};r[t]=e,this.have.properties(r)}else this.have.properties(t);this.obj=this.obj[t]}),e.add("properties",function(t){var e={};arguments.length>1?t=k.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var n=Object(this.obj),i=[];t.forEach(function(t){t in n||i.push(p(t))});var s=i;0===s.length?s=t.map(p):this.anyOne&&(s=t.filter(function(t){return i.indexOf(p(t))<0}).map(p));var a=(1===s.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+s.join(", ");this.params={obj:this.obj,operator:a},this.assert(0===i.length||this.anyOne&&i.length!=t.length);var u=Object.keys(e);if(u.length){var f=[];s=[],u.forEach(function(t){var i=e[t];0!==o(n[t],i).length?f.push(p(t)+" of "+r(i)+" (got "+r(n[t])+")"):s.push(p(t)+" of "+r(i))}),(0!==f.length&&!this.anyOne||this.anyOne&&0===s.length)&&(s=f),a=(1===s.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+s.join(", "),this.params={obj:this.obj,operator:a},this.assert(0===f.length||this.anyOne&&f.length!=u.length)}}),e.add("length",function(t,e){this.have.property("length",t,e)}),e.alias("length","lengthOf"),e.add("ownProperty",function(t,e){t=f(t),this.params={actual:this.obj,operator:"to have own property "+p(t),message:e},this.assert(u.hasOwnProperty(this.obj,t)),this.obj=this.obj[t]}),e.alias("ownProperty","hasOwnProperty"),e.add("empty",function(){this.params={operator:"to be empty"},this.assert(a.isEmpty(this.obj))},!0),e.add("keys",function(t){t=k.call(arguments);var e=Object(this.obj),r=t.filter(function(t){return!a.has(e,t)}),n="to have "+(this.onlyThis?"only ":"")+(1===t.length?"key ":"keys ");this.params={operator:n+t.join(", ")},r.length>0&&(this.params.operator+="\n\tmissing keys: "+r.join(", ")),this.assert(0===r.length),this.onlyThis&&e.should.have.size(t.length)}),e.add("key",function(t){this.have.keys(t),this.obj=a.get(this.obj,t)}),e.add("value",function(t,e){this.have.key(t).which.is.eql(e)}),e.add("size",function(t){this.params={operator:"to have size "+t},a.size(this.obj).should.be.exactly(t)}),e.add("propertyByPath",function(e){var r=(e=k.call(arguments)).map(p);e=e.map(f);for(var n,i=t(Object(this.obj)),o=[];e.length;)n=e.shift(),this.params={operator:"to have property by path "+r.join(", ")+" - failed on "+p(n)},i=i.have.property(n),o.push(n);this.params={obj:this.obj,operator:"to have property by path "+r.join(", ")},this.obj=i.obj})}).use(function(t,e){var r=t.format;e.add("throw",function(e,n){var i=this.obj,o={},s="",a=!1;if(u.isGeneratorFunction(i))return t(i()).throw(e,n);if(u.isIterator(i))return t(i.next.bind(i)).throw(e,n);this.is.a.Function();var f=!0;try{i()}catch(t){a=!0,o=t}if(a)if(e){if("string"==typeof e)f=e==o.message;else if(e instanceof RegExp)f=e.test(o.message);else if("function"==typeof e)f=o instanceof e;else if(null!=e)try{t(o).match(e)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,f=!1}if(f){if("function"==typeof e&&n)try{t(o).match(n)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,f=!1}}else"string"==typeof e||e instanceof RegExp?s=" with a message matching "+r(e)+", but got '"+o.message+"'":"function"==typeof e&&(s=" of type "+c(e)+", but got "+c(o.constructor))}else s=" (got "+r(o)+")";this.params={operator:"to throw exception"+s},this.assert(a),this.assert(f)}),e.alias("throw","throwError")}).use(function(t,e){var r=t.format;e.add("match",function(e,n){if(this.params={operator:"to match "+r(e),message:n},0!==o(this.obj,e).length)if(e instanceof RegExp)if("string"==typeof this.obj)this.assert(e.exec(this.obj));else if(null!=this.obj&&"object"==typeof this.obj){var i=[],s=[];a.forEach(this.obj,function(t,n){e.exec(t)?s.push(p(n)):i.push(p(n)+" ("+r(t)+")")},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),s.length&&(this.params.operator+="\n matched properties: "+s.join(", ")),this.assert(0===i.length)}else this.assert(!1);else if("function"==typeof e){var u;"boolean"==typeof(u=e(this.obj))&&this.assert(u)}else null!=e&&null!=this.obj&&"object"==typeof e&&"object"==typeof this.obj?(i=[],s=[],a.forEach(e,function(e,n){try{t(this.obj).have.property(n).which.match(e),s.push(p(n))}catch(e){if(!(e instanceof t.AssertionError))throw e;i.push(p(n)+" ("+r(this.obj[n])+")")}},this),i.length&&(this.params.operator+="\n not matched properties: "+i.join(", ")),s.length&&(this.params.operator+="\n matched properties: "+s.join(", ")),this.assert(0===i.length)):this.assert(!1)}),e.add("matchEach",function(e,n){this.params={operator:"to match each "+r(e),message:n},a.forEach(this.obj,function(r){t(r).match(e)},this)}),e.add("matchAny",function(e,n){this.params={operator:"to match any "+r(e),message:n},this.assert(a.some(this.obj,function(r){try{return t(r).match(e),!0}catch(e){if(e instanceof t.AssertionError)return!1;throw e}}))}),e.alias("matchAny","matchSome"),e.alias("matchEach","matchEvery")}).use(function(t,e){var r=t.format;e.add("containEql",function(e){this.params={operator:"to contain "+r(e)},this.is.not.null().and.not.undefined();var n=this.obj;"string"==typeof n?this.assert(n.indexOf(String(e))>=0):a.isIterable(n)?this.assert(a.some(n,function(t){return 0===o(t,e).length})):a.forEach(e,function(e,r){t(n).have.value(r,e)},this)}),e.add("containDeepOrdered",function(e){this.params={operator:"to contain "+r(e)};var n=this.obj;if("string"==typeof n)this.is.equal(String(e));else if(a.isIterable(n)&&a.isIterable(e)){for(var i=a.iterator(n),o=a.iterator(e),s=i.next(),u=o.next();!s.done&&!u.done;){try{t(s.value[1]).containDeepOrdered(u.value[1]),u=o.next()}catch(e){if(!(e instanceof t.AssertionError))throw e}s=i.next()}this.assert(u.done)}else null!=n&&null!=e&&"object"==typeof n&&"object"==typeof e?(a.forEach(e,function(e,r){t(n[r]).containDeepOrdered(e)}),a.isEmpty(e)&&this.eql(e)):this.eql(e)}),e.add("containDeep",function(e){this.params={operator:"to contain "+r(e)};var n=this.obj;if("string"==typeof n)this.is.equal(String(e));else if(a.isIterable(n)&&a.isIterable(e)){var i={};a.forEach(e,function(e){this.assert(a.some(n,function(r,n){if(n in i)return!1;try{return t(r).containDeep(e),i[n]=!0,!0}catch(e){if(e instanceof t.AssertionError)return!1;throw e}}))},this)}else null!=n&&null!=e&&"object"==typeof n&&"object"==typeof e?(a.forEach(e,function(e,r){t(n[r]).containDeep(e)}),a.isEmpty(e)&&this.eql(e)):this.eql(e)})}).use(function(t,e){e.add("Promise",function(){this.params={operator:"to be promise"};var e=this.obj;t(e).have.property("then").which.is.a.Function()}),e.prototype.fulfilled=function(){this.params={operator:"to be fulfilled"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(t){return e.negate&&e.fail(),t},function(r){return e.negate||(e.params.operator+=", but it was rejected with "+t.format(r),e.fail()),r})},e.prototype.rejected=function(){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var e=this;return this.obj.then(function(r){return e.negate||(e.params.operator+=", but it was fulfilled",0!=arguments.length&&(e.params.operator+=" with "+t.format(r)),e.fail()),r},function(t){return e.negate&&e.fail(),t})},e.prototype.fulfilledWith=function(e){this.params={operator:"to be fulfilled with "+t.format(e)},t(this.obj).be.a.Promise();var r=this;return this.obj.then(function(n){return r.negate&&r.fail(),t(n).eql(e),n},function(e){return r.negate||(r.params.operator+=", but it was rejected with "+t.format(e),r.fail()),e})},e.prototype.rejectedWith=function(e,r){this.params={operator:"to be rejected"},t(this.obj).be.a.Promise();var n=this;return this.obj.then(function(t){return n.negate||n.fail(),t},function(i){n.negate&&n.fail();var o=!0,s="";if("string"==typeof e)o=e===i.message;else if(e instanceof RegExp)o=e.test(i.message);else if("function"==typeof e)o=i instanceof e;else if(null!==e&&"object"==typeof e)try{t(i).match(e)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,o=!1}if(o){if("function"==typeof e&&r)try{t(i).match(r)}catch(e){if(!(e instanceof t.AssertionError))throw e;s=": "+e.message,o=!1}}else"string"==typeof e||e instanceof RegExp?s=" with a message matching "+t.format(e)+", but got '"+i.message+"'":"function"==typeof e&&(s=" of type "+c(e)+", but got "+c(i.constructor));return n.params.operator+=s,n.assert(o),i})},Object.defineProperty(e.prototype,"finally",{get:function(){t(this.obj).be.a.Promise();var e=this;return new _(this.obj.then(function(r){var n=t(r);return n.negate=e.negate,n.anyOne=e.anyOne,n}))}}),e.alias("finally","eventually")}),t.exports=A},function(t,e,r){(function(e){"use strict";var r={NUMBER:"number",UNDEFINED:"undefined",STRING:"string",BOOLEAN:"boolean",OBJECT:"object",FUNCTION:"function",NULL:"null",ARRAY:"array",REGEXP:"regexp",DATE:"date",ERROR:"error",ARGUMENTS:"arguments",SYMBOL:"symbol",ARRAY_BUFFER:"array-buffer",TYPED_ARRAY:"typed-array",DATA_VIEW:"data-view",MAP:"map",SET:"set",WEAK_SET:"weak-set",WEAK_MAP:"weak-map",PROMISE:"promise",BUFFER:"buffer",HTML_ELEMENT:"html-element",HTML_ELEMENT_TEXT:"html-element-text",DOCUMENT:"document",WINDOW:"window",FILE:"file",FILE_LIST:"file-list",BLOB:"blob",HOST:"host",XHR:"xhr",SIMD:"simd"};function n(t,e,r){if(!t)throw new Error("Type class must be initialized at least with `type` information");this.type=t,this.cls=e,this.sub=r}n.prototype={toString:function(t){t=t||";";var e=[this.type];return this.cls&&e.push(this.cls),this.sub&&e.push(this.sub),e.join(t)},toTryTypes:function(){var t=[];return this.sub&&t.push(new n(this.type,this.cls,this.sub)),this.cls&&t.push(new n(this.type,this.cls)),t.push(new n(this.type)),t}};var i=Object.prototype.toString;function o(){this.checks=[]}o.prototype={add:function(t){return this.checks.push(t),this},addBeforeFirstMatch:function(t,e){var r=this.getFirstMatch(t);r?this.checks.splice(r.index,0,e):this.add(e)},addTypeOf:function(t,e){return this.add(function(r,i){if(i===t)return new n(e)})},addClass:function(t,e,i){return this.add(function(o,s,a){if(a===t)return new n(r.OBJECT,e,i)})},getFirstMatch:function(t){for(var e=typeof t,r=i.call(t),n=0,o=this.checks.length;n<o;n++){var s=this.checks[n].call(this,t,e,r);if(void 0!==s)return{result:s,func:this.checks[n],index:n}}},getType:function(t){var e=this.getFirstMatch(t);return e&&e.result}};var s=new o;function a(t){return s.getType(t)}s.addTypeOf(r.NUMBER,r.NUMBER).addTypeOf(r.UNDEFINED,r.UNDEFINED).addTypeOf(r.STRING,r.STRING).addTypeOf(r.BOOLEAN,r.BOOLEAN).addTypeOf(r.FUNCTION,r.FUNCTION).addTypeOf(r.SYMBOL,r.SYMBOL).add(function(t){if(null===t)return new n(r.NULL)}).addClass("[object String]",r.STRING).addClass("[object Boolean]",r.BOOLEAN).addClass("[object Number]",r.NUMBER).addClass("[object Array]",r.ARRAY).addClass("[object RegExp]",r.REGEXP).addClass("[object Error]",r.ERROR).addClass("[object Date]",r.DATE).addClass("[object Arguments]",r.ARGUMENTS).addClass("[object ArrayBuffer]",r.ARRAY_BUFFER).addClass("[object Int8Array]",r.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",r.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",r.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",r.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",r.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",r.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",r.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",r.TYPED_ARRAY,"float32").addClass("[object Float64Array]",r.TYPED_ARRAY,"float64").addClass("[object Bool16x8]",r.SIMD,"bool16x8").addClass("[object Bool32x4]",r.SIMD,"bool32x4").addClass("[object Bool8x16]",r.SIMD,"bool8x16").addClass("[object Float32x4]",r.SIMD,"float32x4").addClass("[object Int16x8]",r.SIMD,"int16x8").addClass("[object Int32x4]",r.SIMD,"int32x4").addClass("[object Int8x16]",r.SIMD,"int8x16").addClass("[object Uint16x8]",r.SIMD,"uint16x8").addClass("[object Uint32x4]",r.SIMD,"uint32x4").addClass("[object Uint8x16]",r.SIMD,"uint8x16").addClass("[object DataView]",r.DATA_VIEW).addClass("[object Map]",r.MAP).addClass("[object WeakMap]",r.WEAK_MAP).addClass("[object Set]",r.SET).addClass("[object WeakSet]",r.WEAK_SET).addClass("[object Promise]",r.PROMISE).addClass("[object Blob]",r.BLOB).addClass("[object File]",r.FILE).addClass("[object FileList]",r.FILE_LIST).addClass("[object XMLHttpRequest]",r.XHR).add(function(t){if(typeof Promise===r.FUNCTION&&t instanceof Promise||typeof t.then===r.FUNCTION)return new n(r.OBJECT,r.PROMISE)}).add(function(t){if(void 0!==e&&t instanceof e)return new n(r.OBJECT,r.BUFFER)}).add(function(t){if("undefined"!=typeof Node&&t instanceof Node)return new n(r.OBJECT,r.HTML_ELEMENT,t.nodeName)}).add(function(t){if(t.Boolean===Boolean&&t.Number===Number&&t.String===String&&t.Date===Date)return new n(r.OBJECT,r.HOST)}).add(function(){return new n(r.OBJECT)}),a.checker=s,a.TypeChecker=o,a.Type=n,Object.keys(r).forEach(function(t){a[t]=r[t]}),t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){"use strict";var n=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(r(305));function i(t){for(var e=arguments,r=1,n=e.length;r<n;r++)t=t.replace(/%s/,e[r]);return t}var o=Object.prototype.hasOwnProperty;function s(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}var a="A is not equal to B",u={checkProtoEql:!0,checkSubType:!0,plusZeroAndMinusZeroEqual:!0,collectAllFails:!1};function f(t,e,r,n){e[t]="boolean"!=typeof r[t]?n[t]:r[t]}function c(t,e,r,n){f("checkProtoEql",this,t=t||{},u),f("plusZeroAndMinusZeroEqual",this,t,u),f("checkSubType",this,t,u),f("collectAllFails",this,t,u),this.a=e,this.b=r,this._meet=t._meet||[],this.fails=t.fails||[],this.path=n||[]}function h(t){this.name="ShortcutError",this.message="fail fast",this.fail=t}function l(t,e,r){return new c(r,t,e).check()}h.prototype=Object.create(Error.prototype),c.checkStrictEquality=function(t,e){this.collectFail(t!==e,a)},c.add=function(t,e,r,n){var i=Array.prototype.slice.call(arguments);n=i.pop(),c.prototype["_check_"+i.join("_")]=n},c.prototype={check:function(){try{this.check0()}catch(t){if(t instanceof h)return[t.fail];throw t}return this.fails},check0:function(){var t=this.a,e=this.b;if(t===e)return this.collectFail(0===t&&1/t!=1/e&&!this.plusZeroAndMinusZeroEqual,"+0 is not equal to -0");var r=n(t),o=n(e);if(r.type!==o.type||r.cls!==o.cls||r.sub!==o.sub)return this.collectFail(!0,i("A has type %s and B has type %s",s(r),s(o)));var a=r.type,u=r.type;r.cls&&(a+="_"+r.cls,u+="_"+r.cls),r.sub&&(u+="_"+r.sub),(this["_check_"+u]||this["_check_"+a]||this["_check_"+r.type]||this.defaultCheck).call(this,this.a,this.b)},collectFail:function(t,e,r){if(t){var n=new function(t,e,r,n){this.a=t,this.b=e,this.reason=r,this.path=n}(this.a,this.b,e,this.path);if(n.showReason=!!r,this.fails.push(n),!this.collectAllFails)throw new h(n)}},checkPlainObjectsEquality:function(t,e){for(var r,n=this._meet,s=this._meet.length;s--;){var a=n[s];if(a[0]===t&&a[1]===e)return}for(r in n.push([t,e]),e)o.call(e,r)&&(o.call(t,r)?this.checkPropertyEquality(r):this.collectFail(!0,i("%s has no key %s","A",r)));for(r in t)o.call(t,r)&&this.collectFail(!o.call(e,r),i("%s has no key %s","B",r));n.pop(),this.checkProtoEql&&this.collectFail(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e),"A and B have different prototypes",!0)},checkPropertyEquality:function(t){new c(this,this.a[t],this.b[t],this.path.concat([t])).check0()},defaultCheck:c.checkStrictEquality},c.add(n.NUMBER,function(t,e){this.collectFail(t!=t&&e==e||e!=e&&t==t||t!==e&&t==t&&e==e,a)}),[n.SYMBOL,n.BOOLEAN,n.STRING].forEach(function(t){c.add(t,c.checkStrictEquality)}),c.add(n.FUNCTION,function(t,e){this.collectFail(t.toString()!==e.toString(),"function A is not equal to B by source code value (via .toString call)"),this.checkPlainObjectsEquality(t,e)}),c.add(n.OBJECT,n.REGEXP,function(t,e){for(var r=["source","global","multiline","lastIndex","ignoreCase","sticky","unicode"];r.length;)this.checkPropertyEquality(r.shift());this.checkPlainObjectsEquality(t,e)}),c.add(n.OBJECT,n.DATE,function(t,e){this.collectFail(+t!=+e,a),this.checkPlainObjectsEquality(t,e)}),[n.NUMBER,n.BOOLEAN,n.STRING].forEach(function(t){c.add(n.OBJECT,t,function(t,e){this.collectFail(t.valueOf()!==e.valueOf(),"A wrapped value is not equal to B wrapped value"),this.checkPlainObjectsEquality(t,e)})}),c.add(n.OBJECT,function(t,e){this.checkPlainObjectsEquality(t,e)}),[n.ARRAY,n.ARGUMENTS,n.TYPED_ARRAY].forEach(function(t){c.add(n.OBJECT,t,function(t,e){this.checkPropertyEquality("length"),this.checkPlainObjectsEquality(t,e)})}),c.add(n.OBJECT,n.ARRAY_BUFFER,function(t,e){this.checkPropertyEquality("byteLength"),this.checkPlainObjectsEquality(t,e)}),c.add(n.OBJECT,n.ERROR,function(t,e){this.checkPropertyEquality("name"),this.checkPropertyEquality("message"),this.checkPlainObjectsEquality(t,e)}),c.add(n.OBJECT,n.BUFFER,function(t){this.checkPropertyEquality("length");for(var e=t.length;e--;)this.checkPropertyEquality(e)}),[n.MAP,n.SET,n.WEAK_MAP,n.WEAK_SET].forEach(function(t){c.add(n.OBJECT,t,function(t,e){this._meet.push([t,e]);for(var r=t.entries(),n=r.next();!n.done;n=r.next()){for(var o=e.entries(),s=!1,a=o.next();!a.done;a=o.next()){0===l(n.value[0],a.value[0],{collectAllFails:!1,_meet:this._meet}).length&&(s=!0,l(n.value[1],a.value[1],this))}s||this.collectFail(!0,i("Set/Map missing key %s",n.value[0]))}this._meet.pop(),this.checkPlainObjectsEquality(t,e)})}),l.EQ=c,t.exports=l},function(t,e,r){"use strict";var n=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(r(305)),i=r(308);function o(t){return!!t.match(/\d+/)}function s(t,e){var r=o(t),n=o(e);return r&&n?1*t-1*e:r&&!n?-1:!r&&n?1:t.localeCompare(e)}function a(t){var e;t=t||{},this.seen=[],e="function"==typeof t.keysFunc?t.keysFunc:!1===t.keys?Object.getOwnPropertyNames:Object.keys,this.getKeys=function(t){return function(e){var r=t(e);return r.sort(s),r}}(e),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}a.prototype={constructor:a,format:function(t){var e=n(t);if(this.alreadySeen(t))return"[Circular]";for(var r=e.toTryTypes(),i=this.defaultFormat;r.length;){var o=r.shift(),s=a.formatterFunctionName(o);if(this[s]){i=this[s];break}}return i.call(this,t).trim()},defaultFormat:function(t){return String(t)},alreadySeen:function(t){return this.seen.indexOf(t)>=0}},a.addType=function(t,e){a.prototype[a.formatterFunctionName(t)]=e},a.formatterFunctionName=function(t){return"_format_"+t.toString("_")};var u="\n";function f(t,e){return function(t,e,r){var n=!1;if(e<0&&(n=!0,e=-e),(t=String(t)).length<e){var i=new Array(e-t.length+1).join(r);return n?t+i:i+t}return t}(t,e,"0")}var c=/^\s*function\s*(\S*)\s*\(/;function h(t){if(t.name)return t.name;var e=t.toString().match(c);return null===e?"":e[1]}function l(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var r=h(e.value);if(""!==r)return r}t=Object.getPrototypeOf(t)}}var p=" ";function d(t){return function(t,e){return t.split(u).map(function(t){return e+t}).join(u)}(t,p)}function v(t,e){var r=(e=e||{}).filterKey||function(){return!0},n=e.formatKey||this.format,o=e.formatValue||this.format,s=void 0!==e.keyValueSep?e.keyValueSep:": ";this.seen.push(t);var a=0,u=[];i.forEach(t,function(t,e){if(r(e)){var i=n.call(this,e),f=o.call(this,t,e),c=i?i+s+f:f;a+=c.length,u.push(c)}},this),this.seen.pop(),(e.additionalKeys||[]).forEach(function(t){var e=t[0]+s+this.format(t[1]);a+=e.length,u.push(e)},this);var f,c,h=e.prefix||l(t)||"";h.length>0&&(h+=" "),Array.isArray(e.brackets)?(f=e.brackets[0],c=e.brackets[1]):(f="{",c="}");var p=e.value||"";return 0===u.length?p||h+f+c:a<=this.maxLineLength?h+f+" "+(p?p+" ":"")+u.join(this.propSep+" ")+" "+c:h+f+"\n"+(p?" "+p+"\n":"")+u.map(d).join(this.propSep+"\n")+"\n"+c}function y(t){return"string"==typeof t&&t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)}function g(t,e){var r=function(t,e){var r;try{r=Object.getOwnPropertyDescriptor(t,e)||{value:t[e]}}catch(t){r={value:t}}return r}(t,e);return r.get&&r.set?"[Getter/Setter]":r.get?"[Getter]":r.set?"[Setter]":this.format(r.value)}function m(t,e){return(e=e||{}).keyValueSep=": ",e.formatKey=e.formatKey||y,e.formatValue=e.formatValue||function(e,r){return g.call(this,t,r)},v.call(this,t,e)}function _(t){return m.call(this,t,{additionalKeys:[["[[PrimitiveValue]]",t.valueOf()]]})}function b(t,e,r){return function(n){for(var i=this.byteArrayMaxLength||50,o=n[t],s=[],a=0,u=0;u<i&&u<o;u++){var c=f((n[u]||0).toString(16),r);a+=c.length,s.push(c)}var h=n.constructor.name||e||"";return h&&(h+=" "),0===s.length?h+"[]":a<=this.maxLineLength?h+"[ "+s.join(this.propSep+" ")+" ]":h+"[\n"+s.map(d).join(this.propSep+"\n")+"\n]"}}function w(t){return v.call(this,t,{keyValueSep:" => "})}function E(t){return v.call(this,t,{keyValueSep:"",formatKey:function(){return""}})}function T(t,e){return function(r){for(var n=r.constructor.extractLane,i=0,o=[],s=0;s<e;s++){var a=this.format(n(r,s));i+=a.length,o.push(a)}return i<=this.maxLineLength?t+" [ "+o.join(this.propSep+" ")+" ]":t+" [\n"+o.map(d).join(this.propSep+"\n")+"\n]"}}function S(t,e){return new a(e).format(t)}S.Formatter=a,S.addSpaces=d,S.pad0=f,S.functionName=h,S.constructorName=l,S.formatPlainObjectKey=y,S.formatPlainObject=m,S.typeAdaptorForEachFormat=v,a.addType(new n.Type(n.UNDEFINED),function(){return"undefined"}),a.addType(new n.Type(n.NULL),function(){return"null"}),a.addType(new n.Type(n.BOOLEAN),function(t){return t?"true":"false"}),a.addType(new n.Type(n.SYMBOL),function(t){return t.toString()}),a.addType(new n.Type(n.NUMBER),function(t){return 0===t&&1/t<0?"-0":String(t)}),a.addType(new n.Type(n.STRING),function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),a.addType(new n.Type(n.FUNCTION),function(t){return m.call(this,t,{prefix:"Function",additionalKeys:[["name",h(t)]]})}),a.addType(new n.Type(n.OBJECT),m),a.addType(new n.Type(n.OBJECT,n.NUMBER),_),a.addType(new n.Type(n.OBJECT,n.BOOLEAN),_),a.addType(new n.Type(n.OBJECT,n.STRING),function(t){var e=t.valueOf();return m.call(this,t,{filterKey:function(t){return!(t.match(/\d+/)&&parseInt(t,10)<e.length)},additionalKeys:[["[[PrimitiveValue]]",e]]})}),a.addType(new n.Type(n.OBJECT,n.REGEXP),function(t){return m.call(this,t,{value:String(t)})}),a.addType(new n.Type(n.OBJECT,n.ARRAY),function(t){return m.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return y.call(this,t)},brackets:["[","]"]})}),a.addType(new n.Type(n.OBJECT,n.ARGUMENTS),function(t){return m.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return y.call(this,t)},brackets:["[","]"],prefix:"Arguments"})}),a.addType(new n.Type(n.OBJECT,n.DATE),function(t){return m.call(this,t,{value:function(t,e){var r=e?"UTC":"",n=t["get"+r+"FullYear"]()+"-"+f(t["get"+r+"Month"]()+1,2)+"-"+f(t["get"+r+"Date"](),2),i=f(t["get"+r+"Hours"](),2)+":"+f(t["get"+r+"Minutes"](),2)+":"+f(t["get"+r+"Seconds"](),2)+"."+f(t["get"+r+"Milliseconds"](),3),o=t.getTimezoneOffset(),s=Math.abs(o),a=Math.floor(s/60),u=s-60*a,c=(o<0?"+":"-")+f(a,2)+f(u,2);return n+" "+i+(e?"":" "+c)}(t,this.isUTCdate)})}),a.addType(new n.Type(n.OBJECT,n.ERROR),function(t){return m.call(this,t,{prefix:t.name,additionalKeys:[["message",t.message]]})}),a.addType(new n.Type(n.OBJECT,n.SET),E),a.addType(new n.Type(n.OBJECT,n.MAP),w),a.addType(new n.Type(n.OBJECT,n.WEAK_MAP),w),a.addType(new n.Type(n.OBJECT,n.WEAK_SET),E),a.addType(new n.Type(n.OBJECT,n.BUFFER),b("length","Buffer",2)),a.addType(new n.Type(n.OBJECT,n.ARRAY_BUFFER),b("byteLength","ArrayBuffer",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"int8"),b("length","Int8Array",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint8"),b("length","Uint8Array",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint8clamped"),b("length","Uint8ClampedArray",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"int16"),b("length","Int16Array",4)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint16"),b("length","Uint16Array",4)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"int32"),b("length","Int32Array",8)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint32"),b("length","Uint32Array",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"bool16x8"),T("Bool16x8",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"bool32x4"),T("Bool32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"bool8x16"),T("Bool8x16",16)),a.addType(new n.Type(n.OBJECT,n.SIMD,"float32x4"),T("Float32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"int16x8"),T("Int16x8",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"int32x4"),T("Int32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"int8x16"),T("Int8x16",16)),a.addType(new n.Type(n.OBJECT,n.SIMD,"uint16x8"),T("Uint16x8",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"uint32x4"),T("Uint32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"uint8x16"),T("Uint8x16",16)),a.addType(new n.Type(n.OBJECT,n.PROMISE),function(){return"[Promise]"}),a.addType(new n.Type(n.OBJECT,n.XHR),function(){return"[XMLHttpRequest]"}),a.addType(new n.Type(n.OBJECT,n.HTML_ELEMENT),function(t){return t.outerHTML}),a.addType(new n.Type(n.OBJECT,n.HTML_ELEMENT,"#text"),function(t){return t.nodeValue}),a.addType(new n.Type(n.OBJECT,n.HTML_ELEMENT,"#document"),function(t){return t.documentElement.outerHTML}),a.addType(new n.Type(n.OBJECT,n.HOST),function(){return"[Host]"}),t.exports=S},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(309),i=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(r(305));function o(t){this._obj=t}function s(){this._typeAdaptors=[],this._iterableTypes={}}o.prototype={__shouldIterator__:!0,next:function(){if(this._done)throw new Error("Iterator already reached the end");this._keys||(this._keys=Object.keys(this._obj),this._index=0);var t=this._keys[this._index];return this._done=this._index===this._keys.length,this._index+=1,{value:this._done?void 0:[t,this._obj[t]],done:this._done}}},"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(o.prototype[Symbol.iterator]=function(){return this}),s.prototype={add:function(t,e,r,n){return this.addType(new i.Type(t,e,r),n)},addType:function(t,e){this._typeAdaptors[t.toString()]=e},getAdaptor:function(t,e){for(var r=t.toTryTypes();r.length;){var n=r.shift(),i=this._typeAdaptors[n];if(i&&i[e])return i[e]}},requireAdaptor:function(t,e){var r=this.getAdaptor(t,e);if(!r)throw new Error("There is no type adaptor `"+e+"` for "+t.toString());return r},addIterableType:function(t){this._iterableTypes[t.toString()]=!0},isIterableType:function(t){return!!this._iterableTypes[t.toString()]}};var a=new s,u={forEach:function(t,e,r){for(var i in t)if(n.hasOwnProperty(t,i)&&n.propertyIsEnumerable(t,i)&&!1===e.call(r,t[i],i,t))return},has:function(t,e){return n.hasOwnProperty(t,e)},get:function(t,e){return t[e]},iterator:function(t){return new o(t)}};a.addType(new i.Type(i.OBJECT),u),a.addType(new i.Type(i.FUNCTION),u);var f={has:function(t,e){return t.has(e)},get:function(t,e){return t.get(e)},forEach:function(t,e,r){h(t.entries(),function(n){return e.call(r,n[1],n[0],t)})},size:function(t){return t.size},isEmpty:function(t){return 0===t.size},iterator:function(t){return t.entries()}},c=n.merge({},f);function h(t,e,r){if(n.isGeneratorFunction(t))return h(t(),e,r);if(n.isIterator(t))for(var o=t.next();!o.done;){if(!1===e.call(r,o.value,"value",t))return;o=t.next()}else{var s=i(t);a.requireAdaptor(s,"forEach")(t,e,r)}}c.get=function(t,e){if(t.has(e))return e},a.addType(new i.Type(i.OBJECT,i.MAP),f),a.addType(new i.Type(i.OBJECT,i.SET),c),a.addType(new i.Type(i.OBJECT,i.WEAK_SET),c),a.addType(new i.Type(i.OBJECT,i.WEAK_MAP),f),a.addType(new i.Type(i.STRING),{isEmpty:function(t){return""===t},size:function(t){return t.length}}),a.addIterableType(new i.Type(i.OBJECT,i.ARRAY)),a.addIterableType(new i.Type(i.OBJECT,i.ARGUMENTS)),e.defaultTypeAdaptorStorage=a,e.forEach=h,e.size=function(t){var e=i(t),r=a.getAdaptor(e,"size");if(r)return r(t);var n=0;return h(t,function(){n+=1}),n},e.isEmpty=function(t){var e=i(t),r=a.getAdaptor(e,"isEmpty");if(r)return r(t);var n=!0;return h(t,function(){return n=!1,!1}),n},e.has=function(t,e){var r=i(t);return a.requireAdaptor(r,"has")(t,e)},e.get=function(t,e){var r=i(t);return a.requireAdaptor(r,"get")(t,e)},e.reduce=function(t,e,r){var n=r;return h(t,function(r,i){n=e(n,r,i,t)}),n},e.some=function(t,e,r){var n=!1;return h(t,function(i,o){if(e.call(r,i,o,t))return n=!0,!1},r),n},e.every=function(t,e,r){var n=!0;return h(t,function(i,o){if(!e.call(r,i,o,t))return n=!1,!1},r),n},e.isIterable=function(t){return a.isIterableType(i(t))},e.iterator=function(t){return a.requireAdaptor(i(t),"iterator")(t)}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.hasOwnProperty=function(t,e){return r.call(t,e)},e.propertyIsEnumerable=function(t,e){return n.call(t,e)},e.merge=function(t,e){if(t&&e)for(var r in e)t[r]=e[r];return t},e.isIterator=function(t){return!!t&&(!!t.__shouldIterator__||"function"==typeof t.next&&"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&"function"==typeof t[Symbol.iterator]&&t[Symbol.iterator]()===t)},e.isGeneratorFunction=function(t){return"function"==typeof t&&/^function\s*\*\s*/.test(t.toString())}},function(t,e,r){(function(t){"use strict";if(r(311),r(602),r(603),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function n(t,r,n){t[r]||Object[e](t,r,{writable:!0,configurable:!0,value:n})}n(String.prototype,"padLeft","".padStart),n(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&n(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,r){r(312),r(361),r(362),r(363),r(364),r(366),r(369),r(370),r(371),r(372),r(373),r(374),r(375),r(376),r(377),r(379),r(381),r(383),r(385),r(388),r(389),r(390),r(394),r(396),r(398),r(401),r(402),r(403),r(404),r(406),r(407),r(408),r(409),r(410),r(411),r(412),r(414),r(415),r(416),r(418),r(419),r(420),r(422),r(423),r(424),r(425),r(426),r(427),r(428),r(429),r(430),r(431),r(432),r(433),r(434),r(435),r(440),r(441),r(445),r(446),r(447),r(448),r(450),r(451),r(452),r(453),r(454),r(455),r(456),r(457),r(458),r(459),r(460),r(461),r(462),r(463),r(464),r(465),r(466),r(468),r(469),r(475),r(476),r(478),r(479),r(480),r(484),r(485),r(486),r(487),r(488),r(490),r(491),r(492),r(493),r(496),r(498),r(499),r(500),r(502),r(504),r(506),r(507),r(508),r(510),r(511),r(512),r(513),r(520),r(523),r(524),r(526),r(527),r(530),r(531),r(533),r(534),r(535),r(536),r(537),r(538),r(539),r(540),r(541),r(542),r(543),r(544),r(545),r(546),r(547),r(548),r(549),r(550),r(551),r(553),r(554),r(555),r(556),r(557),r(558),r(560),r(561),r(562),r(563),r(564),r(565),r(566),r(567),r(569),r(570),r(572),r(573),r(574),r(575),r(578),r(579),r(580),r(581),r(582),r(583),r(584),r(585),r(587),r(588),r(589),r(590),r(591),r(592),r(593),r(594),r(595),r(596),r(597),r(600),r(601),t.exports=r(318)},function(t,e,r){"use strict";var n=r(313),i=r(314),o=r(315),s=r(317),a=r(327),u=r(331).KEY,f=r(316),c=r(332),h=r(333),l=r(328),p=r(334),d=r(335),v=r(336),y=r(338),g=r(351),m=r(354),_=r(321),b=r(341),w=r(325),E=r(326),T=r(355),S=r(358),x=r(360),k=r(320),A=r(339),j=x.f,O=k.f,B=S.f,I=n.Symbol,C=n.JSON,R=C&&C.stringify,P=p("_hidden"),F=p("toPrimitive"),M={}.propertyIsEnumerable,L=c("symbol-registry"),U=c("symbols"),N=c("op-symbols"),D=Object.prototype,q="function"==typeof I,z=n.QObject,V=!z||!z.prototype||!z.prototype.findChild,H=o&&f(function(){return 7!=T(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=j(D,e);n&&delete D[e],O(t,e,r),n&&t!==D&&O(D,e,n)}:O,W=function(t){var e=U[t]=T(I.prototype);return e._k=t,e},Y=q&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},G=function(t,e,r){return t===D&&G(N,e,r),_(t),e=w(e,!0),_(r),i(U,e)?(r.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),r=T(r,{enumerable:E(0,!1)})):(i(t,P)||O(t,P,E(1,{})),t[P][e]=!0),H(t,e,r)):O(t,e,r)},J=function(t,e){_(t);for(var r,n=g(e=b(e)),i=0,o=n.length;o>i;)G(t,r=n[i++],e[r]);return t},X=function(t){var e=M.call(this,t=w(t,!0));return!(this===D&&i(U,t)&&!i(N,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,P)&&this[P][t])||e)},Z=function(t,e){if(t=b(t),e=w(e,!0),t!==D||!i(U,e)||i(N,e)){var r=j(t,e);return!r||!i(U,e)||i(t,P)&&t[P][e]||(r.enumerable=!0),r}},K=function(t){for(var e,r=B(b(t)),n=[],o=0;r.length>o;)i(U,e=r[o++])||e==P||e==u||n.push(e);return n},$=function(t){for(var e,r=t===D,n=B(r?N:b(t)),o=[],s=0;n.length>s;)!i(U,e=n[s++])||r&&!i(D,e)||o.push(U[e]);return o};q||(a((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(r){this===D&&e.call(N,r),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),H(this,t,E(1,r))};return o&&V&&H(D,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",function(){return this._k}),x.f=Z,k.f=G,r(359).f=S.f=K,r(353).f=X,r(352).f=$,o&&!r(337)&&a(D,"propertyIsEnumerable",X,!0),d.f=function(t){return W(p(t))}),s(s.G+s.W+s.F*!q,{Symbol:I});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(Q=A(p.store),tt=0;Q.length>tt;)v(Q[tt++]);s(s.S+s.F*!q,"Symbol",{for:function(t){return i(L,t+="")?L[t]:L[t]=I(t)},keyFor:function(t){if(Y(t))return y(L,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),s(s.S+s.F*!q,"Object",{create:function(t,e){return void 0===e?T(t):J(T(t),e)},defineProperty:G,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:K,getOwnPropertySymbols:$}),C&&s(s.S+s.F*(!q||f(function(){var t=I();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!Y(t)){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);return"function"==typeof(e=n[1])&&(r=e),!r&&m(e)||(e=function(t,e){if(r&&(e=r.call(this,t,e)),!Y(e))return e}),n[1]=e,R.apply(C,n)}}}),I.prototype[F]||r(319)(I.prototype,F,I.prototype.valueOf),h(I,"Symbol"),h(Math,"Math",!0),h(n.JSON,"JSON",!0)},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){t.exports=!r(316)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(313),i=r(318),o=r(319),s=r(327),a=r(329),u=function(t,e,r){var f,c,h,l,p=t&u.F,d=t&u.G,v=t&u.S,y=t&u.P,g=t&u.B,m=d?n:v?n[e]||(n[e]={}):(n[e]||{}).prototype,_=d?i:i[e]||(i[e]={}),b=_.prototype||(_.prototype={});for(f in d&&(r=e),r)h=((c=!p&&m&&void 0!==m[f])?m:r)[f],l=g&&c?a(h,n):y&&"function"==typeof h?a(Function.call,h):h,m&&s(m,f,h,t&u.U),_[f]!=h&&o(_,f,l),y&&b[f]!=h&&(b[f]=h)};n.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(320),i=r(326);t.exports=r(315)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(321),i=r(323),o=r(325),s=Object.defineProperty;e.f=r(315)?Object.defineProperty:function(t,e,r){if(n(t),e=o(e,!0),n(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(322);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){t.exports=!r(315)&&!r(316)(function(){return 7!=Object.defineProperty(r(324)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(322),i=r(313).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,r){var n=r(322);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(313),i=r(319),o=r(314),s=r(328)("src"),a=Function.toString,u=(""+a).split("toString");r(318).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,r,a){var f="function"==typeof r;f&&(o(r,"name")||i(r,"name",e)),t[e]!==r&&(f&&(o(r,s)||i(r,s,t[e]?""+t[e]:u.join(String(e)))),t===n?t[e]=r:a?t[e]?t[e]=r:i(t,e,r):(delete t[e],i(t,e,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){var n=r(330);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(328)("meta"),i=r(322),o=r(314),s=r(320).f,a=0,u=Object.isExtensible||function(){return!0},f=!r(316)(function(){return u(Object.preventExtensions({}))}),c=function(t){s(t,n,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,n)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[n].i},getWeak:function(t,e){if(!o(t,n)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[n].w},onFreeze:function(t){return f&&h.NEED&&u(t)&&!o(t,n)&&c(t),t}}},function(t,e,r){var n=r(313),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,r){var n=r(320).f,i=r(314),o=r(334)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e,r){var n=r(332)("wks"),i=r(328),o=r(313).Symbol,s="function"==typeof o;(t.exports=function(t){return n[t]||(n[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=n},function(t,e,r){e.f=r(334)},function(t,e,r){var n=r(313),i=r(318),o=r(337),s=r(335),a=r(320).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e){t.exports=!1},function(t,e,r){var n=r(339),i=r(341);t.exports=function(t,e){for(var r,o=i(t),s=n(o),a=s.length,u=0;a>u;)if(o[r=s[u++]]===e)return r}},function(t,e,r){var n=r(340),i=r(350);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e,r){var n=r(314),i=r(341),o=r(345)(!1),s=r(349)("IE_PROTO");t.exports=function(t,e){var r,a=i(t),u=0,f=[];for(r in a)r!=s&&n(a,r)&&f.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(f,r)||f.push(r));return f}},function(t,e,r){var n=r(342),i=r(344);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=r(343);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(341),i=r(346),o=r(348);t.exports=function(t){return function(e,r,s){var a,u=n(e),f=i(u.length),c=o(s,f);if(t&&r!=r){for(;f>c;)if((a=u[c++])!=a)return!0}else for(;f>c;c++)if((t||c in u)&&u[c]===r)return t||c||0;return!t&&-1}}},function(t,e,r){var n=r(347),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(347),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=n(t))<0?i(t+e,0):o(t,e)}},function(t,e,r){var n=r(332)("keys"),i=r(328);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(339),i=r(352),o=r(353);t.exports=function(t){var e=n(t),r=i.f;if(r)for(var s,a=r(t),u=o.f,f=0;a.length>f;)u.call(t,s=a[f++])&&e.push(s);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(343);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(321),i=r(356),o=r(350),s=r(349)("IE_PROTO"),a=function(){},u=function(){var t,e=r(324)("iframe"),n=o.length;for(e.style.display="none",r(357).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[o[n]];return u()};t.exports=Object.create||function(t,e){var r;return null!==t?(a.prototype=n(t),r=new a,a.prototype=null,r[s]=t):r=u(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(320),i=r(321),o=r(339);t.exports=r(315)?Object.defineProperties:function(t,e){i(t);for(var r,s=o(e),a=s.length,u=0;a>u;)n.f(t,r=s[u++],e[r]);return t}},function(t,e,r){t.exports=r(313).document&&document.documentElement},function(t,e,r){var n=r(341),i=r(359).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(n(t))}},function(t,e,r){var n=r(340),i=r(350).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},function(t,e,r){var n=r(353),i=r(326),o=r(341),s=r(325),a=r(314),u=r(323),f=Object.getOwnPropertyDescriptor;e.f=r(315)?f:function(t,e){if(t=o(t),e=s(e,!0),u)try{return f(t,e)}catch(t){}if(a(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(317);n(n.S,"Object",{create:r(355)})},function(t,e,r){var n=r(317);n(n.S+n.F*!r(315),"Object",{defineProperty:r(320).f})},function(t,e,r){var n=r(317);n(n.S+n.F*!r(315),"Object",{defineProperties:r(356)})},function(t,e,r){var n=r(341),i=r(360).f;r(365)("getOwnPropertyDescriptor",function(){return function(t,e){return i(n(t),e)}})},function(t,e,r){var n=r(317),i=r(318),o=r(316);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],s={};s[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(t,e,r){var n=r(367),i=r(368);r(365)("getPrototypeOf",function(){return function(t){return i(n(t))}})},function(t,e,r){var n=r(344);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(314),i=r(367),o=r(349)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,r){var n=r(367),i=r(339);r(365)("keys",function(){return function(t){return i(n(t))}})},function(t,e,r){r(365)("getOwnPropertyNames",function(){return r(358).f})},function(t,e,r){var n=r(322),i=r(331).onFreeze;r(365)("freeze",function(t){return function(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(322),i=r(331).onFreeze;r(365)("seal",function(t){return function(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(322),i=r(331).onFreeze;r(365)("preventExtensions",function(t){return function(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(322);r(365)("isFrozen",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(322);r(365)("isSealed",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(322);r(365)("isExtensible",function(t){return function(e){return!!n(e)&&(!t||t(e))}})},function(t,e,r){var n=r(317);n(n.S+n.F,"Object",{assign:r(378)})},function(t,e,r){"use strict";var n=r(339),i=r(352),o=r(353),s=r(367),a=r(342),u=Object.assign;t.exports=!u||r(316)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=u({},t)[r]||Object.keys(u({},e)).join("")!=n})?function(t,e){for(var r=s(t),u=arguments.length,f=1,c=i.f,h=o.f;u>f;)for(var l,p=a(arguments[f++]),d=c?n(p).concat(c(p)):n(p),v=d.length,y=0;v>y;)h.call(p,l=d[y++])&&(r[l]=p[l]);return r}:u},function(t,e,r){var n=r(317);n(n.S,"Object",{is:r(380)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,r){var n=r(317);n(n.S,"Object",{setPrototypeOf:r(382).set})},function(t,e,r){var n=r(322),i=r(321),o=function(t,e){if(i(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=r(329)(Function.call,r(360).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,r){return o(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:o}},function(t,e,r){"use strict";var n=r(384),i={};i[r(334)("toStringTag")]="z",i+""!="[object z]"&&r(327)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(t,e,r){var n=r(343),i=r(334)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,r){var n=r(317);n(n.P,"Function",{bind:r(386)})},function(t,e,r){"use strict";var n=r(330),i=r(322),o=r(387),s=[].slice,a={};t.exports=Function.bind||function(t){var e=n(this),r=s.call(arguments,1),u=function(){var n=r.concat(s.call(arguments));return this instanceof u?function(t,e,r){if(!(e in a)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";a[e]=Function("F,a","return new F("+n.join(",")+")")}return a[e](t,r)}(e,n.length,n):o(e,n,t)};return i(e.prototype)&&(u.prototype=e.prototype),u}},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(320).f,i=r(326),o=r(314),s=Function.prototype,a=/^\s*function ([^ (]*)/,u=Object.isExtensible||function(){return!0};"name"in s||r(315)&&n(s,"name",{configurable:!0,get:function(){try{var t=(""+this).match(a)[1];return o(this,"name")||!u(this)||n(this,"name",i(5,t)),t}catch(t){return""}}})},function(t,e,r){"use strict";var n=r(322),i=r(368),o=r(334)("hasInstance"),s=Function.prototype;o in s||r(320).f(s,o,{value:function(t){if("function"!=typeof this||!n(t))return!1;if(!n(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,r){var n=r(317),i=r(391);n(n.G+n.F*(parseInt!=i),{parseInt:i})},function(t,e,r){var n=r(313).parseInt,i=r(392).trim,o=r(393),s=/^[\-+]?0[xX]/;t.exports=8!==n(o+"08")||22!==n(o+"0x16")?function(t,e){var r=i(String(t),3);return n(r,e>>>0||(s.test(r)?16:10))}:n},function(t,e,r){var n=r(317),i=r(344),o=r(316),s=r(393),a="["+s+"]",u=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),c=function(t,e,r){var i={},a=o(function(){return!!s[t]()||"
"!="
"[t]()}),u=i[t]=a?e(h):s[t];r&&(i[r]=u),n(n.P+n.F*a,"String",i)},h=c.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(f,"")),t};t.exports=c},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,r){var n=r(317),i=r(395);n(n.G+n.F*(parseFloat!=i),{parseFloat:i})},function(t,e,r){var n=r(313).parseFloat,i=r(392).trim;t.exports=1/n(r(393)+"-0")!=-1/0?function(t){var e=i(String(t),3),r=n(e);return 0===r&&"-"==e.charAt(0)?-0:r}:n},function(t,e,r){"use strict";var n=r(313),i=r(314),o=r(343),s=r(397),a=r(325),u=r(316),f=r(359).f,c=r(360).f,h=r(320).f,l=r(392).trim,p=n.Number,d=p,v=p.prototype,y="Number"==o(r(355)(v)),g="trim"in String.prototype,m=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var r,n,i,o=(e=g?e.trim():l(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(r=e.charCodeAt(2))||120===r)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+e}for(var s,u=e.slice(2),f=0,c=u.length;f<c;f++)if((s=u.charCodeAt(f))<48||s>i)return NaN;return parseInt(u,n)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof p&&(y?u(function(){v.valueOf.call(r)}):"Number"!=o(r))?s(new d(m(e)),r,p):m(e)};for(var _,b=r(315)?f(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)i(d,_=b[w])&&!i(p,_)&&h(p,_,c(d,_));p.prototype=v,v.constructor=p,r(327)(n,"Number",p)}},function(t,e,r){var n=r(322),i=r(382).set;t.exports=function(t,e,r){var o,s=e.constructor;return s!==r&&"function"==typeof s&&(o=s.prototype)!==r.prototype&&n(o)&&i&&i(t,o),t}},function(t,e,r){"use strict";var n=r(317),i=r(347),o=r(399),s=r(400),a=1..toFixed,u=Math.floor,f=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",h=function(t,e){for(var r=-1,n=e;++r<6;)n+=t*f[r],f[r]=n%1e7,n=u(n/1e7)},l=function(t){for(var e=6,r=0;--e>=0;)r+=f[e],f[e]=u(r/t),r=r%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==f[t]){var r=String(f[t]);e=""===e?r:e+s.call("0",7-r.length)+r}return e},d=function(t,e,r){return 0===e?r:e%2==1?d(t,e-1,r*t):d(t*t,e/2,r)};n(n.P+n.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(316)(function(){a.call({})})),"Number",{toFixed:function(t){var e,r,n,a,u=o(this,c),f=i(t),v="",y="0";if(f<0||f>20)throw RangeError(c);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(u*d(2,69,1))-69)<0?u*d(2,-e,1):u/d(2,e,1),r*=4503599627370496,(e=52-e)>0){for(h(0,r),n=f;n>=7;)h(1e7,0),n-=7;for(h(d(10,n,1),0),n=e-1;n>=23;)l(1<<23),n-=23;l(1<<n),h(1,1),l(2),y=p()}else h(0,r),h(1<<-e,0),y=p()+s.call("0",f);return y=f>0?v+((a=y.length)<=f?"0."+s.call("0",f-a)+y:y.slice(0,a-f)+"."+y.slice(a-f)):v+y}})},function(t,e,r){var n=r(343);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=n(t))throw TypeError(e);return+t}},function(t,e,r){"use strict";var n=r(347),i=r(344);t.exports=function(t){var e=String(i(this)),r="",o=n(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(r+=e);return r}},function(t,e,r){"use strict";var n=r(317),i=r(316),o=r(399),s=1..toPrecision;n(n.P+n.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},function(t,e,r){var n=r(317);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,r){var n=r(317),i=r(313).isFinite;n(n.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,r){var n=r(317);n(n.S,"Number",{isInteger:r(405)})},function(t,e,r){var n=r(322),i=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&i(t)===t}},function(t,e,r){var n=r(317);n(n.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,r){var n=r(317),i=r(405),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,r){var n=r(317);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(317);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(317),i=r(395);n(n.S+n.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,r){var n=r(317),i=r(391);n(n.S+n.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,r){var n=r(317),i=r(413),o=Math.sqrt,s=Math.acosh;n(n.S+n.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,r){var n=r(317),i=Math.asinh;n(n.S+n.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,r){var n=r(317),i=Math.atanh;n(n.S+n.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,r){var n=r(317),i=r(417);n(n.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,r){var n=r(317);n(n.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,r){var n=r(317),i=Math.exp;n(n.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,r){var n=r(317),i=r(421);n(n.S+n.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,e,r){var n=r(317),i=r(417),o=Math.pow,s=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),f=o(2,-126);n(n.S,"Math",{fround:function(t){var e,r,n=Math.abs(t),o=i(t);return n<f?o*function(t){return t+1/s-1/s}(n/f/a)*f*a:(r=(e=(1+a/s)*n)-(e-n))>u||r!=r?o*(1/0):o*r}})},function(t,e,r){var n=r(317),i=Math.abs;n(n.S,"Math",{hypot:function(t,e){for(var r,n,o=0,s=0,a=arguments.length,u=0;s<a;)u<(r=i(arguments[s++]))?(o=o*(n=u/r)*n+1,u=r):o+=r>0?(n=r/u)*n:r;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,r){var n=r(317),i=Math.imul;n(n.S+n.F*r(316)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var r=+t,n=+e,i=65535&r,o=65535&n;return 0|i*o+((65535&r>>>16)*o+i*(65535&n>>>16)<<16>>>0)}})},function(t,e,r){var n=r(317);n(n.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,r){var n=r(317);n(n.S,"Math",{log1p:r(413)})},function(t,e,r){var n=r(317);n(n.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,r){var n=r(317);n(n.S,"Math",{sign:r(417)})},function(t,e,r){var n=r(317),i=r(421),o=Math.exp;n(n.S+n.F*r(316)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,r){var n=r(317),i=r(421),o=Math.exp;n(n.S,"Math",{tanh:function(t){var e=i(t=+t),r=i(-t);return e==1/0?1:r==1/0?-1:(e-r)/(o(t)+o(-t))}})},function(t,e,r){var n=r(317);n(n.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,r){var n=r(317),i=r(348),o=String.fromCharCode,s=String.fromCodePoint;n(n.S+n.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,s=0;n>s;){if(e=+arguments[s++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");r.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return r.join("")}})},function(t,e,r){var n=r(317),i=r(341),o=r(346);n(n.S,"String",{raw:function(t){for(var e=i(t.raw),r=o(e.length),n=arguments.length,s=[],a=0;r>a;)s.push(String(e[a++])),a<n&&s.push(String(arguments[a]));return s.join("")}})},function(t,e,r){"use strict";r(392)("trim",function(t){return function(){return t(this,3)}})},function(t,e,r){"use strict";var n=r(436)(!0);r(437)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){var n=r(347),i=r(344);t.exports=function(t){return function(e,r){var o,s,a=String(i(e)),u=n(r),f=a.length;return u<0||u>=f?t?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===f||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536}}},function(t,e,r){"use strict";var n=r(337),i=r(317),o=r(327),s=r(319),a=r(314),u=r(438),f=r(439),c=r(333),h=r(368),l=r(334)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,r,v,y,g,m){f(r,e,v);var _,b,w,E=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},T=e+" Iterator",S="values"==y,x=!1,k=t.prototype,A=k[l]||k["@@iterator"]||y&&k[y],j=A||E(y),O=y?S?E("entries"):j:void 0,B="Array"==e&&k.entries||A;if(B&&(w=h(B.call(new t)))!==Object.prototype&&(c(w,T,!0),n||a(w,l)||s(w,l,d)),S&&A&&"values"!==A.name&&(x=!0,j=function(){return A.call(this)}),n&&!m||!p&&!x&&k[l]||s(k,l,j),u[e]=j,u[T]=d,y)if(_={values:S?j:E("values"),keys:g?j:E("keys"),entries:O},m)for(b in _)b in k||o(k,b,_[b]);else i(i.P+i.F*(p||x),e,_);return _}},function(t,e){t.exports={}},function(t,e,r){"use strict";var n=r(355),i=r(326),o=r(333),s={};r(319)(s,r(334)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(s,{next:i(1,r)}),o(t,e+" Iterator")}},function(t,e,r){"use strict";var n=r(317),i=r(436)(!1);n(n.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(317),i=r(346),o=r(442),s="".endsWith;n(n.P+n.F*r(444)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),r=arguments.length>1?arguments[1]:void 0,n=i(e.length),a=void 0===r?n:Math.min(i(r),n),u=String(t);return s?s.call(e,u,a):e.slice(a-u.length,a)===u}})},function(t,e,r){var n=r(443),i=r(344);t.exports=function(t,e,r){if(n(e))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(t))}},function(t,e,r){var n=r(322),i=r(343),o=r(334)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,r){var n=r(334)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,r){"use strict";var n=r(317),i=r(442);n(n.P+n.F*r(444)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(317);n(n.P,"String",{repeat:r(400)})},function(t,e,r){"use strict";var n=r(317),i=r(346),o=r(442),s="".startsWith;n(n.P+n.F*r(444)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),r=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return s?s.call(e,n,r):e.slice(r,r+n.length)===n}})},function(t,e,r){"use strict";r(449)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,r){var n=r(317),i=r(316),o=r(344),s=/"/g,a=function(t,e,r,n){var i=String(o(t)),a="<"+e;return""!==r&&(a+=" "+r+'="'+String(n).replace(s,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var r={};r[t]=e(a),n(n.P+n.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",r)}},function(t,e,r){"use strict";r(449)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,r){"use strict";r(449)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,r){"use strict";r(449)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,r){"use strict";r(449)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,r){"use strict";r(449)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,r){"use strict";r(449)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,r){"use strict";r(449)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,r){"use strict";r(449)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,r){"use strict";r(449)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,r){"use strict";r(449)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,r){"use strict";r(449)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,r){"use strict";r(449)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,r){var n=r(317);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,r){"use strict";var n=r(317),i=r(367),o=r(325);n(n.P+n.F*r(316)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),r=o(e);return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},function(t,e,r){"use strict";var n=r(317),i=r(316),o=Date.prototype.getTime,s=function(t){return t>9?t:"0"+t};n(n.P+n.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),r=t.getUTCMilliseconds(),n=e<0?"-":e>9999?"+":"";return n+("00000"+Math.abs(e)).slice(n?-6:-4)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(r>99?r:"0"+s(r))+"Z"}})},function(t,e,r){var n=Date.prototype,i=n.toString,o=n.getTime;new Date(NaN)+""!="Invalid Date"&&r(327)(n,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,r){var n=r(334)("toPrimitive"),i=Date.prototype;n in i||r(319)(i,n,r(467))},function(t,e,r){"use strict";var n=r(321),i=r(325);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(n(this),"number"!=t)}},function(t,e,r){var n=r(317);n(n.S,"Array",{isArray:r(354)})},function(t,e,r){"use strict";var n=r(329),i=r(317),o=r(367),s=r(470),a=r(471),u=r(346),f=r(472),c=r(473);i(i.S+i.F*!r(474)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,i,h,l=o(t),p="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,g=0,m=c(l);if(y&&(v=n(v,d>2?arguments[2]:void 0,2)),null==m||p==Array&&a(m))for(r=new p(e=u(l.length));e>g;g++)f(r,g,y?v(l[g],g):l[g]);else for(h=m.call(l),r=new p;!(i=h.next()).done;g++)f(r,g,y?s(h,v,[i.value,g],!0):i.value);return r.length=g,r}})},function(t,e,r){var n=r(321);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,r){var n=r(438),i=r(334)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){"use strict";var n=r(320),i=r(326);t.exports=function(t,e,r){e in t?n.f(t,e,i(0,r)):t[e]=r}},function(t,e,r){var n=r(384),i=r(334)("iterator"),o=r(438);t.exports=r(318).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n=r(334)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){return{done:r=!0}},o[n]=function(){return s},t(o)}catch(t){}return r}},function(t,e,r){"use strict";var n=r(317),i=r(472);n(n.S+n.F*r(316)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,r=new("function"==typeof this?this:Array)(e);e>t;)i(r,t,arguments[t++]);return r.length=e,r}})},function(t,e,r){"use strict";var n=r(317),i=r(341),o=[].join;n(n.P+n.F*(r(342)!=Object||!r(477)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,r){var n=r(316);t.exports=function(t,e){return!!t&&n(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,r){"use strict";var n=r(317),i=r(357),o=r(343),s=r(348),a=r(346),u=[].slice;n(n.P+n.F*r(316)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var r=a(this.length),n=o(this);if(e=void 0===e?r:e,"Array"==n)return u.call(this,t,e);for(var i=s(t,r),f=s(e,r),c=a(f-i),h=Array(c),l=0;l<c;l++)h[l]="String"==n?this.charAt(i+l):this[i+l];return h}})},function(t,e,r){"use strict";var n=r(317),i=r(330),o=r(367),s=r(316),a=[].sort,u=[1,2,3];n(n.P+n.F*(s(function(){u.sort(void 0)})||!s(function(){u.sort(null)})||!r(477)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),i(t))}})},function(t,e,r){"use strict";var n=r(317),i=r(481)(0),o=r(477)([].forEach,!0);n(n.P+n.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,r){var n=r(329),i=r(342),o=r(367),s=r(346),a=r(482);t.exports=function(t,e){var r=1==t,u=2==t,f=3==t,c=4==t,h=6==t,l=5==t||h,p=e||a;return function(e,a,d){for(var v,y,g=o(e),m=i(g),_=n(a,d,3),b=s(m.length),w=0,E=r?p(e,b):u?p(e,0):void 0;b>w;w++)if((l||w in m)&&(y=_(v=m[w],w,g),t))if(r)E[w]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(c)return!1;return h?-1:f||c?c:E}}},function(t,e,r){var n=r(483);t.exports=function(t,e){return new(n(t))(e)}},function(t,e,r){var n=r(322),i=r(354),o=r(334)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),n(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,r){"use strict";var n=r(317),i=r(481)(1);n(n.P+n.F*!r(477)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(317),i=r(481)(2);n(n.P+n.F*!r(477)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(317),i=r(481)(3);n(n.P+n.F*!r(477)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(317),i=r(481)(4);n(n.P+n.F*!r(477)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(317),i=r(489);n(n.P+n.F*!r(477)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,r){var n=r(330),i=r(367),o=r(342),s=r(346);t.exports=function(t,e,r,a,u){n(e);var f=i(t),c=o(f),h=s(f.length),l=u?h-1:0,p=u?-1:1;if(r<2)for(;;){if(l in c){a=c[l],l+=p;break}if(l+=p,u?l<0:h<=l)throw TypeError("Reduce of empty array with no initial value")}for(;u?l>=0:h>l;l+=p)l in c&&(a=e(a,c[l],l,f));return a}},function(t,e,r){"use strict";var n=r(317),i=r(489);n(n.P+n.F*!r(477)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,r){"use strict";var n=r(317),i=r(345)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(s||!r(477)(o)),"Array",{indexOf:function(t){return s?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(317),i=r(341),o=r(347),s=r(346),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(u||!r(477)(a)),"Array",{lastIndexOf:function(t){if(u)return a.apply(this,arguments)||0;var e=i(this),r=s(e.length),n=r-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}})},function(t,e,r){var n=r(317);n(n.P,"Array",{copyWithin:r(494)}),r(495)("copyWithin")},function(t,e,r){"use strict";var n=r(367),i=r(348),o=r(346);t.exports=[].copyWithin||function(t,e){var r=n(this),s=o(r.length),a=i(t,s),u=i(e,s),f=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===f?s:i(f,s))-u,s-a),h=1;for(u<a&&a<u+c&&(h=-1,u+=c-1,a+=c-1);c-- >0;)u in r?r[a]=r[u]:delete r[a],a+=h,u+=h;return r}},function(t,e,r){var n=r(334)("unscopables"),i=Array.prototype;null==i[n]&&r(319)(i,n,{}),t.exports=function(t){i[n][t]=!0}},function(t,e,r){var n=r(317);n(n.P,"Array",{fill:r(497)}),r(495)("fill")},function(t,e,r){"use strict";var n=r(367),i=r(348),o=r(346);t.exports=function(t){for(var e=n(this),r=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,r),u=s>2?arguments[2]:void 0,f=void 0===u?r:i(u,r);f>a;)e[a++]=t;return e}},function(t,e,r){"use strict";var n=r(317),i=r(481)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),n(n.P+n.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(495)("find")},function(t,e,r){"use strict";var n=r(317),i=r(481)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),n(n.P+n.F*s,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(495)(o)},function(t,e,r){r(501)("Array")},function(t,e,r){"use strict";var n=r(313),i=r(320),o=r(315),s=r(334)("species");t.exports=function(t){var e=n[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,r){"use strict";var n=r(495),i=r(503),o=r(438),s=r(341);t.exports=r(437)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){var n=r(313),i=r(397),o=r(320).f,s=r(359).f,a=r(443),u=r(505),f=n.RegExp,c=f,h=f.prototype,l=/a/g,p=/a/g,d=new f(l)!==l;if(r(315)&&(!d||r(316)(function(){return p[r(334)("match")]=!1,f(l)!=l||f(p)==p||"/a/i"!=f(l,"i")}))){f=function(t,e){var r=this instanceof f,n=a(t),o=void 0===e;return!r&&n&&t.constructor===f&&o?t:i(d?new c(n&&!o?t.source:t,e):c((n=t instanceof f)?t.source:t,n&&o?u.call(t):e),r?this:h,f)};for(var v=function(t){t in f||o(f,t,{configurable:!0,get:function(){return c[t]},set:function(e){c[t]=e}})},y=s(c),g=0;y.length>g;)v(y[g++]);h.constructor=f,f.prototype=h,r(327)(n,"RegExp",f)}r(501)("RegExp")},function(t,e,r){"use strict";var n=r(321);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){"use strict";r(507);var n=r(321),i=r(505),o=r(315),s=/./.toString,a=function(t){r(327)(RegExp.prototype,"toString",t,!0)};r(316)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?a(function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=s.name&&a(function(){return s.call(this)})},function(t,e,r){r(315)&&"g"!=/./g.flags&&r(320).f(RegExp.prototype,"flags",{configurable:!0,get:r(505)})},function(t,e,r){r(509)("match",1,function(t,e,r){return[function(r){"use strict";var n=t(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},r]})},function(t,e,r){"use strict";var n=r(319),i=r(327),o=r(316),s=r(344),a=r(334);t.exports=function(t,e,r){var u=a(t),f=r(s,u,""[t]),c=f[0],h=f[1];o(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,c),n(RegExp.prototype,u,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,r){r(509)("replace",2,function(t,e,r){return[function(n,i){"use strict";var o=t(this),s=null==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,r){r(509)("search",1,function(t,e,r){return[function(r){"use strict";var n=t(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},r]})},function(t,e,r){r(509)("split",2,function(t,e,n){"use strict";var i=r(443),o=n,s=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var a=void 0===/()??/.exec("")[1];n=function(t,e){var r=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(r,t,e);var n,u,f,c,h,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,v=void 0===e?4294967295:e>>>0,y=new RegExp(t.source,p+"g");for(a||(n=new RegExp("^"+y.source+"$(?!\\s)",p));(u=y.exec(r))&&!((f=u.index+u[0].length)>d&&(l.push(r.slice(d,u.index)),!a&&u.length>1&&u[0].replace(n,function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(u[h]=void 0)}),u.length>1&&u.index<r.length&&s.apply(l,u.slice(1)),c=u[0].length,d=f,l.length>=v));)y.lastIndex===u.index&&y.lastIndex++;return d===r.length?!c&&y.test("")||l.push(""):l.push(r.slice(d)),l.length>v?l.slice(0,v):l}}else"0".split(void 0,0).length&&(n=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(r,i){var o=t(this),s=null==r?void 0:r[e];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,r){"use strict";var n,i,o,s=r(337),a=r(313),u=r(329),f=r(384),c=r(317),h=r(322),l=r(330),p=r(514),d=r(515),v=r(516),y=r(517).set,g=r(518)(),m=a.TypeError,_=a.process,b=a.Promise,w="process"==f(_=a.process),E=function(){},T=!!function(){try{var t=b.resolve(1),e=(t.constructor={})[r(334)("species")]=function(t){t(E,E)};return(w||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e}catch(t){}}(),S=function(t,e){return t===e||t===b&&e===o},x=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},k=function(t){return S(b,t)?new A(t):new i(t)},A=i=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw m("Bad Promise constructor");e=t,r=n}),this.resolve=l(e),this.reject=l(r)},j=function(t){try{t()}catch(t){return{error:t}}},O=function(t,e){if(!t._n){t._n=!0;var r=t._c;g(function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s=i?e.ok:e.fail,a=e.resolve,u=e.reject,f=e.domain;try{s?(i||(2==t._h&&C(t),t._h=1),!0===s?r=n:(f&&f.enter(),r=s(n),f&&f.exit()),r===e.promise?u(m("Promise-chain cycle")):(o=x(r))?o.call(r,a,u):a(r)):u(n)}catch(t){u(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&B(t)})}},B=function(t){y.call(a,function(){var e,r,n,i=t._v;if(I(t)&&(e=j(function(){w?_.emit("unhandledRejection",i,t):(r=a.onunhandledrejection)?r({promise:t,reason:i}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=w||I(t)?2:1),t._a=void 0,e)throw e.error})},I=function(t){if(1==t._h)return!1;for(var e,r=t._a||t._c,n=0;r.length>n;)if((e=r[n++]).fail||!I(e.promise))return!1;return!0},C=function(t){y.call(a,function(){var e;w?_.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},R=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),O(e,!0))},P=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw m("Promise can't be resolved itself");(e=x(t))?g(function(){var n={_w:r,_d:!1};try{e.call(t,u(P,n,1),u(R,n,1))}catch(t){R.call(n,t)}}):(r._v=t,r._s=1,O(r,!1))}catch(t){R.call({_w:r,_d:!1},t)}}};T||(b=function(t){p(this,b,"Promise","_h"),l(t),n.call(this);try{t(u(P,this,1),u(R,this,1))}catch(t){R.call(this,t)}},(n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(519)(b.prototype,{then:function(t,e){var r=k(v(this,b));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=w?_.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&O(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),A=function(){var t=new n;this.promise=t,this.resolve=u(P,t,1),this.reject=u(R,t,1)}),c(c.G+c.W+c.F*!T,{Promise:b}),r(333)(b,"Promise"),r(501)("Promise"),o=r(318).Promise,c(c.S+c.F*!T,"Promise",{reject:function(t){var e=k(this);return(0,e.reject)(t),e.promise}}),c(c.S+c.F*(s||!T),"Promise",{resolve:function(t){if(t instanceof b&&S(t.constructor,this))return t;var e=k(this);return(0,e.resolve)(t),e.promise}}),c(c.S+c.F*!(T&&r(474)(function(t){b.all(t).catch(E)})),"Promise",{all:function(t){var e=this,r=k(e),n=r.resolve,i=r.reject,o=j(function(){var r=[],o=0,s=1;d(t,!1,function(t){var a=o++,u=!1;r.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,r[a]=t,--s||n(r))},i)}),--s||n(r)});return o&&i(o.error),r.promise},race:function(t){var e=this,r=k(e),n=r.reject,i=j(function(){d(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i&&n(i.error),r.promise}})},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){var n=r(329),i=r(470),o=r(471),s=r(321),a=r(346),u=r(473),f={},c={};(e=t.exports=function(t,e,r,h,l){var p,d,v,y,g=l?function(){return t}:u(t),m=n(r,h,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>_;_++)if((y=e?m(s(d=t[_])[0],d[1]):m(t[_]))===f||y===c)return y}else for(v=g.call(t);!(d=v.next()).done;)if((y=i(v,m,d.value,e))===f||y===c)return y}).BREAK=f,e.RETURN=c},function(t,e,r){var n=r(321),i=r(330),o=r(334)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[o])?e:i(r)}},function(t,e,r){var n,i,o,s=r(329),a=r(387),u=r(357),f=r(324),c=r(313),h=c.process,l=c.setImmediate,p=c.clearImmediate,d=c.MessageChannel,v=0,y={},g=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},m=function(t){g.call(t.data)};l&&p||(l=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return y[++v]=function(){a("function"==typeof t?t:Function(t),e)},n(v),v},p=function(t){delete y[t]},"process"==r(343)(h)?n=function(t){h.nextTick(s(g,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=m,n=s(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(t){c.postMessage(t+"","*")},c.addEventListener("message",m,!1)):n="onreadystatechange"in f("script")?function(t){u.appendChild(f("script")).onreadystatechange=function(){u.removeChild(this),g.call(t)}}:function(t){setTimeout(s(g,t,1),0)}),t.exports={set:l,clear:p}},function(t,e,r){var n=r(313),i=r(517).set,o=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,u="process"==r(343)(s);t.exports=function(){var t,e,r,f=function(){var n,i;for(u&&(n=s.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(u)r=function(){s.nextTick(f)};else if(o){var c=!0,h=document.createTextNode("");new o(f).observe(h,{characterData:!0}),r=function(){h.data=c=!c}}else if(a&&a.resolve){var l=a.resolve();r=function(){l.then(f)}}else r=function(){i.call(n,f)};return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e,r){var n=r(327);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},function(t,e,r){"use strict";var n=r(521);t.exports=r(522)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=n.getEntry(this,t);return e&&e.v},set:function(t,e){return n.def(this,0===t?0:t,e)}},n,!0)},function(t,e,r){"use strict";var n=r(320).f,i=r(355),o=r(519),s=r(329),a=r(514),u=r(344),f=r(515),c=r(437),h=r(503),l=r(501),p=r(315),d=r(331).fastKey,v=p?"_s":"size",y=function(t,e){var r,n=d(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r};t.exports={getConstructor:function(t,e,r,c){var h=t(function(t,n){a(t,h,e,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=n&&f(n,r,t[c],t)});return o(h.prototype,{clear:function(){for(var t=this._i,e=this._f;e;e=e.n)e.r=!0,e.p&&(e.p=e.p.n=void 0),delete t[e.i];this._f=this._l=void 0,this[v]=0},delete:function(t){var e=y(this,t);if(e){var r=e.n,n=e.p;delete this._i[e.i],e.r=!0,n&&(n.n=r),r&&(r.p=n),this._f==e&&(this._f=r),this._l==e&&(this._l=n),this[v]--}return!!e},forEach:function(t){a(this,h,"forEach");for(var e,r=s(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),p&&n(h.prototype,"size",{get:function(){return u(this[v])}}),h},def:function(t,e,r){var n,i,o=y(t,e);return o?o.v=r:(t._l=o={i:i=d(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,e,r){c(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?h(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,h(1))},r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){"use strict";var n=r(313),i=r(317),o=r(327),s=r(519),a=r(331),u=r(515),f=r(514),c=r(322),h=r(316),l=r(474),p=r(333),d=r(397);t.exports=function(t,e,r,v,y,g){var m=n[t],_=m,b=y?"set":"add",w=_&&_.prototype,E={},T=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(g&&!c(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!c(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!c(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,r){return e.call(this,0===t?0:t,r),this})};if("function"==typeof _&&(g||w.forEach&&!h(function(){(new _).entries().next()}))){var S=new _,x=S[b](g?{}:-0,1)!=S,k=h(function(){S.has(1)}),A=l(function(t){new _(t)}),j=!g&&h(function(){for(var t=new _,e=5;e--;)t[b](e,e);return!t.has(-0)});A||((_=e(function(e,r){f(e,_,t);var n=d(new m,e,_);return null!=r&&u(r,y,n[b],n),n})).prototype=w,w.constructor=_),(k||j)&&(T("delete"),T("has"),y&&T("get")),(j||x)&&T(b),g&&w.clear&&delete w.clear}else _=v.getConstructor(e,t,y,b),s(_.prototype,r),a.NEED=!0;return p(_,t),E[t]=_,i(i.G+i.W+i.F*(_!=m),E),g||v.setStrong(_,t,y),_}},function(t,e,r){"use strict";var n=r(521);t.exports=r(522)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(this,t=0===t?0:t,t)}},n)},function(t,e,r){"use strict";var n,i=r(481)(0),o=r(327),s=r(331),a=r(378),u=r(525),f=r(322),c=s.getWeak,h=Object.isExtensible,l=u.ufstore,p={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(t){if(f(t)){var e=c(t);return!0===e?l(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(this,t,e)}},y=t.exports=r(522)("WeakMap",d,v,u,!0,!0);7!=(new y).set((Object.freeze||Object)(p),7).get(p)&&(a((n=u.getConstructor(d)).prototype,v),s.NEED=!0,i(["delete","has","get","set"],function(t){var e=y.prototype,r=e[t];o(e,t,function(e,i){if(f(e)&&!h(e)){this._f||(this._f=new n);var o=this._f[t](e,i);return"set"==t?this:o}return r.call(this,e,i)})}))},function(t,e,r){"use strict";var n=r(519),i=r(331).getWeak,o=r(321),s=r(322),a=r(514),u=r(515),f=r(481),c=r(314),h=f(5),l=f(6),p=0,d=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},y=function(t,e){return h(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var r=y(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=l(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,r,o){var f=t(function(t,n){a(t,f,e,"_i"),t._i=p++,t._l=void 0,null!=n&&u(n,r,t[o],t)});return n(f.prototype,{delete:function(t){if(!s(t))return!1;var e=i(t);return!0===e?d(this).delete(t):e&&c(e,this._i)&&delete e[this._i]},has:function(t){if(!s(t))return!1;var e=i(t);return!0===e?d(this).has(t):e&&c(e,this._i)}}),f},def:function(t,e,r){var n=i(o(e),!0);return!0===n?d(t).set(e,r):n[t._i]=r,t},ufstore:d}},function(t,e,r){"use strict";var n=r(525);r(522)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(this,t,!0)}},n,!1,!0)},function(t,e,r){"use strict";var n=r(317),i=r(528),o=r(529),s=r(321),a=r(348),u=r(346),f=r(322),c=r(313).ArrayBuffer,h=r(516),l=o.ArrayBuffer,p=o.DataView,d=i.ABV&&c.isView,v=l.prototype.slice,y=i.VIEW;n(n.G+n.W+n.F*(c!==l),{ArrayBuffer:l}),n(n.S+n.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||f(t)&&y in t}}),n(n.P+n.U+n.F*r(316)(function(){return!new l(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(s(this),t);for(var r=s(this).byteLength,n=a(t,r),i=a(void 0===e?r:e,r),o=new(h(this,l))(u(i-n)),f=new p(this),c=new p(o),d=0;n<i;)c.setUint8(d++,f.getUint8(n++));return o}}),r(501)("ArrayBuffer")},function(t,e,r){for(var n,i=r(313),o=r(319),s=r(328),a=s("typed_array"),u=s("view"),f=!(!i.ArrayBuffer||!i.DataView),c=f,h=0,l="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(n=i[l[h++]])?(o(n.prototype,a,!0),o(n.prototype,u,!0)):c=!1;t.exports={ABV:f,CONSTR:c,TYPED:a,VIEW:u}},function(t,e,r){"use strict";var n=r(313),i=r(315),o=r(337),s=r(528),a=r(319),u=r(519),f=r(316),c=r(514),h=r(347),l=r(346),p=r(359).f,d=r(320).f,v=r(497),y=r(333),g=n.ArrayBuffer,m=n.DataView,_=n.Math,b=n.RangeError,w=n.Infinity,E=g,T=_.abs,S=_.pow,x=_.floor,k=_.log,A=_.LN2,j=i?"_b":"buffer",O=i?"_l":"byteLength",B=i?"_o":"byteOffset",I=function(t,e,r){var n,i,o,s=Array(r),a=8*r-e-1,u=(1<<a)-1,f=u>>1,c=23===e?S(2,-24)-S(2,-77):0,h=0,l=t<0||0===t&&1/t<0?1:0;for((t=T(t))!=t||t===w?(i=t!=t?1:0,n=u):(n=x(k(t)/A),t*(o=S(2,-n))<1&&(n--,o*=2),(t+=n+f>=1?c/o:c*S(2,1-f))*o>=2&&(n++,o/=2),n+f>=u?(i=0,n=u):n+f>=1?(i=(t*o-1)*S(2,e),n+=f):(i=t*S(2,f-1)*S(2,e),n=0));e>=8;s[h++]=255&i,i/=256,e-=8);for(n=n<<e|i,a+=e;a>0;s[h++]=255&n,n/=256,a-=8);return s[--h]|=128*l,s},C=function(t,e,r){var n,i=8*r-e-1,o=(1<<i)-1,s=o>>1,a=i-7,u=r-1,f=t[u--],c=127&f;for(f>>=7;a>0;c=256*c+t[u],u--,a-=8);for(n=c&(1<<-a)-1,c>>=-a,a+=e;a>0;n=256*n+t[u],u--,a-=8);if(0===c)c=1-s;else{if(c===o)return n?NaN:f?-w:w;n+=S(2,e),c-=s}return(f?-1:1)*n*S(2,c-e)},R=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},P=function(t){return[255&t]},F=function(t){return[255&t,t>>8&255]},M=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},L=function(t){return I(t,52,8)},U=function(t){return I(t,23,4)},N=function(t,e,r){d(t.prototype,e,{get:function(){return this[r]}})},D=function(t,e,r,n){var i=+r,o=h(i);if(i!=o||o<0||o+e>t[O])throw b("Wrong index!");var s=t[j]._b,a=o+t[B],u=s.slice(a,a+e);return n?u:u.reverse()},q=function(t,e,r,n,i,o){var s=+r,a=h(s);if(s!=a||a<0||a+e>t[O])throw b("Wrong index!");for(var u=t[j]._b,f=a+t[B],c=n(+i),l=0;l<e;l++)u[f+l]=c[o?l:e-l-1]},z=function(t,e){c(t,g,"ArrayBuffer");var r=+e,n=l(r);if(r!=n)throw b("Wrong length!");return n};if(s.ABV){if(!f(function(){new g})||!f(function(){new g(.5)})){for(var V,H=(g=function(t){return new E(z(this,t))}).prototype=E.prototype,W=p(E),Y=0;W.length>Y;)(V=W[Y++])in g||a(g,V,E[V]);o||(H.constructor=g)}var G=new m(new g(2)),J=m.prototype.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||u(m.prototype,{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},!0)}else g=function(t){var e=z(this,t);this._b=v.call(Array(e),0),this[O]=e},m=function(t,e,r){c(this,m,"DataView"),c(t,g,"DataView");var n=t[O],i=h(e);if(i<0||i>n)throw b("Wrong offset!");if(i+(r=void 0===r?n-i:l(r))>n)throw b("Wrong length!");this[j]=t,this[B]=i,this[O]=r},i&&(N(g,"byteLength","_l"),N(m,"buffer","_b"),N(m,"byteLength","_l"),N(m,"byteOffset","_o")),u(m.prototype,{getInt8:function(t){return D(this,1,t)[0]<<24>>24},getUint8:function(t){return D(this,1,t)[0]},getInt16:function(t){var e=D(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=D(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(D(this,4,t,arguments[1]))},getUint32:function(t){return R(D(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return C(D(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return C(D(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){q(this,1,t,P,e)},setUint8:function(t,e){q(this,1,t,P,e)},setInt16:function(t,e){q(this,2,t,F,e,arguments[2])},setUint16:function(t,e){q(this,2,t,F,e,arguments[2])},setInt32:function(t,e){q(this,4,t,M,e,arguments[2])},setUint32:function(t,e){q(this,4,t,M,e,arguments[2])},setFloat32:function(t,e){q(this,4,t,U,e,arguments[2])},setFloat64:function(t,e){q(this,8,t,L,e,arguments[2])}});y(g,"ArrayBuffer"),y(m,"DataView"),a(m.prototype,s.VIEW,!0),e.ArrayBuffer=g,e.DataView=m},function(t,e,r){var n=r(317);n(n.G+n.W+n.F*!r(528).ABV,{DataView:r(529).DataView})},function(t,e,r){r(532)("Int8",1,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){"use strict";if(r(315)){var n=r(337),i=r(313),o=r(316),s=r(317),a=r(528),u=r(529),f=r(329),c=r(514),h=r(326),l=r(319),p=r(519),d=r(347),v=r(346),y=r(348),g=r(325),m=r(314),_=r(380),b=r(384),w=r(322),E=r(367),T=r(471),S=r(355),x=r(368),k=r(359).f,A=r(473),j=r(328),O=r(334),B=r(481),I=r(345),C=r(516),R=r(502),P=r(438),F=r(474),M=r(501),L=r(497),U=r(494),N=r(320),D=r(360),q=N.f,z=D.f,V=i.RangeError,H=i.TypeError,W=i.Uint8Array,Y=Array.prototype,G=u.ArrayBuffer,J=u.DataView,X=B(0),Z=B(2),K=B(3),$=B(4),Q=B(5),tt=B(6),et=I(!0),rt=I(!1),nt=R.values,it=R.keys,ot=R.entries,st=Y.lastIndexOf,at=Y.reduce,ut=Y.reduceRight,ft=Y.join,ct=Y.sort,ht=Y.slice,lt=Y.toString,pt=Y.toLocaleString,dt=O("iterator"),vt=O("toStringTag"),yt=j("typed_constructor"),gt=j("def_constructor"),mt=a.CONSTR,_t=a.TYPED,bt=a.VIEW,wt=B(1,function(t,e){return At(C(t,t[gt]),e)}),Et=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Tt=!!W&&!!W.prototype.set&&o(function(){new W(1).set({})}),St=function(t,e){if(void 0===t)throw H("Wrong length!");var r=+t,n=v(t);if(e&&!_(r,n))throw V("Wrong length!");return n},xt=function(t,e){var r=d(t);if(r<0||r%e)throw V("Wrong offset!");return r},kt=function(t){if(w(t)&&_t in t)return t;throw H(t+" is not a typed array!")},At=function(t,e){if(!(w(t)&&yt in t))throw H("It is not a typed array constructor!");return new t(e)},jt=function(t,e){return Ot(C(t,t[gt]),e)},Ot=function(t,e){for(var r=0,n=e.length,i=At(t,n);n>r;)i[r]=e[r++];return i},Bt=function(t,e,r){q(t,e,{get:function(){return this._d[r]}})},It=function(t){var e,r,n,i,o,s,a=E(t),u=arguments.length,c=u>1?arguments[1]:void 0,h=void 0!==c,l=A(a);if(null!=l&&!T(l)){for(s=l.call(a),n=[],e=0;!(o=s.next()).done;e++)n.push(o.value);a=n}for(h&&u>2&&(c=f(c,arguments[2],2)),e=0,r=v(a.length),i=At(this,r);r>e;e++)i[e]=h?c(a[e],e):a[e];return i},Ct=function(){for(var t=0,e=arguments.length,r=At(this,e);e>t;)r[t]=arguments[t++];return r},Rt=!!W&&o(function(){pt.call(new W(1))}),Pt=function(){return pt.apply(Rt?ht.call(kt(this)):kt(this),arguments)},Ft={copyWithin:function(t,e){return U.call(kt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(kt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(kt(this),arguments)},filter:function(t){return jt(this,Z(kt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(kt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(kt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){X(kt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return rt(kt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(kt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ft.apply(kt(this),arguments)},lastIndexOf:function(t){return st.apply(kt(this),arguments)},map:function(t){return wt(kt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(kt(this),arguments)},reduceRight:function(t){return ut.apply(kt(this),arguments)},reverse:function(){for(var t,e=kt(this).length,r=Math.floor(e/2),n=0;n<r;)t=this[n],this[n++]=this[--e],this[e]=t;return this},some:function(t){return K(kt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ct.call(kt(this),t)},subarray:function(t,e){var r=kt(this),n=r.length,i=y(t,n);return new(C(r,r[gt]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,v((void 0===e?n:y(e,n))-i))}},Mt=function(t,e){return jt(this,ht.call(kt(this),t,e))},Lt=function(t){kt(this);var e=xt(arguments[1],1),r=this.length,n=E(t),i=v(n.length),o=0;if(i+e>r)throw V("Wrong length!");for(;o<i;)this[e+o]=n[o++]},Ut={entries:function(){return ot.call(kt(this))},keys:function(){return it.call(kt(this))},values:function(){return nt.call(kt(this))}},Nt=function(t,e){return w(t)&&t[_t]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Dt=function(t,e){return Nt(t,e=g(e,!0))?h(2,t[e]):z(t,e)},qt=function(t,e,r){return!(Nt(t,e=g(e,!0))&&w(r)&&m(r,"value"))||m(r,"get")||m(r,"set")||r.configurable||m(r,"writable")&&!r.writable||m(r,"enumerable")&&!r.enumerable?q(t,e,r):(t[e]=r.value,t)};mt||(D.f=Dt,N.f=qt),s(s.S+s.F*!mt,"Object",{getOwnPropertyDescriptor:Dt,defineProperty:qt}),o(function(){lt.call({})})&&(lt=pt=function(){return ft.call(this)});var zt=p({},Ft);p(zt,Ut),l(zt,dt,Ut.values),p(zt,{slice:Mt,set:Lt,constructor:function(){},toString:lt,toLocaleString:Pt}),Bt(zt,"buffer","b"),Bt(zt,"byteOffset","o"),Bt(zt,"byteLength","l"),Bt(zt,"length","e"),q(zt,vt,{get:function(){return this[_t]}}),t.exports=function(t,e,r,u){var f=t+((u=!!u)?"Clamped":"")+"Array",h="Uint8Array"!=f,p="get"+t,d="set"+t,y=i[f],g=y||{},m=y&&x(y),_=!y||!a.ABV,E={},T=y&&y.prototype,A=function(t,r){q(t,r,{get:function(){return function(t,r){var n=t._d;return n.v[p](r*e+n.o,Et)}(this,r)},set:function(t){return function(t,r,n){var i=t._d;u&&(n=(n=Math.round(n))<0?0:n>255?255:255&n),i.v[d](r*e+i.o,n,Et)}(this,r,t)},enumerable:!0})};_?(y=r(function(t,r,n,i){c(t,y,f,"_d");var o,s,a,u,h=0,p=0;if(w(r)){if(!(r instanceof G||"ArrayBuffer"==(u=b(r))||"SharedArrayBuffer"==u))return _t in r?Ot(y,r):It.call(y,r);o=r,p=xt(n,e);var d=r.byteLength;if(void 0===i){if(d%e)throw V("Wrong length!");if((s=d-p)<0)throw V("Wrong length!")}else if((s=v(i)*e)+p>d)throw V("Wrong length!");a=s/e}else a=St(r,!0),o=new G(s=a*e);for(l(t,"_d",{b:o,o:p,l:s,e:a,v:new J(o)});h<a;)A(t,h++)}),T=y.prototype=S(zt),l(T,"constructor",y)):F(function(t){new y(null),new y(t)},!0)||(y=r(function(t,r,n,i){var o;return c(t,y,f),w(r)?r instanceof G||"ArrayBuffer"==(o=b(r))||"SharedArrayBuffer"==o?void 0!==i?new g(r,xt(n,e),i):void 0!==n?new g(r,xt(n,e)):new g(r):_t in r?Ot(y,r):It.call(y,r):new g(St(r,h))}),X(m!==Function.prototype?k(g).concat(k(m)):k(g),function(t){t in y||l(y,t,g[t])}),y.prototype=T,n||(T.constructor=y));var j=T[dt],O=!!j&&("values"==j.name||null==j.name),B=Ut.values;l(y,yt,!0),l(T,_t,f),l(T,bt,!0),l(T,gt,y),(u?new y(1)[vt]==f:vt in T)||q(T,vt,{get:function(){return f}}),E[f]=y,s(s.G+s.W+s.F*(y!=g),E),s(s.S,f,{BYTES_PER_ELEMENT:e,from:It,of:Ct}),"BYTES_PER_ELEMENT"in T||l(T,"BYTES_PER_ELEMENT",e),s(s.P,f,Ft),M(f),s(s.P+s.F*Tt,f,{set:Lt}),s(s.P+s.F*!O,f,Ut),s(s.P+s.F*(T.toString!=lt),f,{toString:lt}),s(s.P+s.F*o(function(){new y(1).slice()}),f,{slice:Mt}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!o(function(){T.toLocaleString.call([1,2])})),f,{toLocaleString:Pt}),P[f]=O?j:B,n||O||l(T,dt,B)}}else t.exports=function(){}},function(t,e,r){r(532)("Uint8",1,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(532)("Uint8",1,function(t){return function(e,r,n){return t(this,e,r,n)}},!0)},function(t,e,r){r(532)("Int16",2,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(532)("Uint16",2,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(532)("Int32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(532)("Uint32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(532)("Float32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(532)("Float64",8,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){var n=r(317),i=r(330),o=r(321),s=(r(313).Reflect||{}).apply,a=Function.apply;n(n.S+n.F*!r(316)(function(){s(function(){})}),"Reflect",{apply:function(t,e,r){var n=i(t),u=o(r);return s?s(n,e,u):a.call(n,e,u)}})},function(t,e,r){var n=r(317),i=r(355),o=r(330),s=r(321),a=r(322),u=r(316),f=r(386),c=(r(313).Reflect||{}).construct,h=u(function(){function t(){}return!(c(function(){},[],t)instanceof t)}),l=!u(function(){c(function(){})});n(n.S+n.F*(h||l),"Reflect",{construct:function(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(l&&!h)return c(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(f.apply(t,n))}var u=r.prototype,p=i(a(u)?u:Object.prototype),d=Function.apply.call(t,p,e);return a(d)?d:p}})},function(t,e,r){var n=r(320),i=r(317),o=r(321),s=r(325);i(i.S+i.F*r(316)(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,r){o(t),e=s(e,!0),o(r);try{return n.f(t,e,r),!0}catch(t){return!1}}})},function(t,e,r){var n=r(317),i=r(360).f,o=r(321);n(n.S,"Reflect",{deleteProperty:function(t,e){var r=i(o(t),e);return!(r&&!r.configurable)&&delete t[e]}})},function(t,e,r){"use strict";var n=r(317),i=r(321),o=function(t){this._t=i(t),this._i=0;var e,r=this._k=[];for(e in t)r.push(e)};r(439)(o,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),n(n.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,r){var n=r(360),i=r(368),o=r(314),s=r(317),a=r(322),u=r(321);s(s.S,"Reflect",{get:function t(e,r){var s,f,c=arguments.length<3?e:arguments[2];return u(e)===c?e[r]:(s=n.f(e,r))?o(s,"value")?s.value:void 0!==s.get?s.get.call(c):void 0:a(f=i(e))?t(f,r,c):void 0}})},function(t,e,r){var n=r(360),i=r(317),o=r(321);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return n.f(o(t),e)}})},function(t,e,r){var n=r(317),i=r(368),o=r(321);n(n.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,r){var n=r(317);n(n.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,r){var n=r(317),i=r(321),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,r){var n=r(317);n(n.S,"Reflect",{ownKeys:r(552)})},function(t,e,r){var n=r(359),i=r(352),o=r(321),s=r(313).Reflect;t.exports=s&&s.ownKeys||function(t){var e=n.f(o(t)),r=i.f;return r?e.concat(r(t)):e}},function(t,e,r){var n=r(317),i=r(321),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,r){var n=r(320),i=r(360),o=r(368),s=r(314),a=r(317),u=r(326),f=r(321),c=r(322);a(a.S,"Reflect",{set:function t(e,r,a){var h,l,p=arguments.length<4?e:arguments[3],d=i.f(f(e),r);if(!d){if(c(l=o(e)))return t(l,r,a,p);d=u(0)}return s(d,"value")?!(!1===d.writable||!c(p)||((h=i.f(p,r)||u(0)).value=a,n.f(p,r,h),0)):void 0!==d.set&&(d.set.call(p,a),!0)}})},function(t,e,r){var n=r(317),i=r(382);i&&n(n.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,r){"use strict";var n=r(317),i=r(345)(!0);n(n.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(495)("includes")},function(t,e,r){"use strict";var n=r(317),i=r(436)(!0);n(n.P,"String",{at:function(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(317),i=r(559);n(n.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,r){var n=r(346),i=r(400),o=r(344);t.exports=function(t,e,r,s){var a=String(o(t)),u=a.length,f=void 0===r?" ":String(r),c=n(e);if(c<=u||""==f)return a;var h=c-u,l=i.call(f,Math.ceil(h/f.length));return l.length>h&&(l=l.slice(0,h)),s?l+a:a+l}},function(t,e,r){"use strict";var n=r(317),i=r(559);n(n.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,r){"use strict";r(392)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,r){"use strict";r(392)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,r){"use strict";var n=r(317),i=r(344),o=r(346),s=r(443),a=r(505),u=RegExp.prototype,f=function(t,e){this._r=t,this._s=e};r(439)(f,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),n(n.P,"String",{matchAll:function(t){if(i(this),!s(t))throw TypeError(t+" is not a regexp!");var e=String(this),r="flags"in u?String(t.flags):a.call(t),n=new RegExp(t.source,~r.indexOf("g")?r:"g"+r);return n.lastIndex=o(t.lastIndex),new f(n,e)}})},function(t,e,r){r(336)("asyncIterator")},function(t,e,r){r(336)("observable")},function(t,e,r){var n=r(317),i=r(552),o=r(341),s=r(360),a=r(472);n(n.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r=o(t),n=s.f,u=i(r),f={},c=0;u.length>c;)a(f,e=u[c++],n(r,e));return f}})},function(t,e,r){var n=r(317),i=r(568)(!1);n(n.S,"Object",{values:function(t){return i(t)}})},function(t,e,r){var n=r(339),i=r(341),o=r(353).f;t.exports=function(t){return function(e){for(var r,s=i(e),a=n(s),u=a.length,f=0,c=[];u>f;)o.call(s,r=a[f++])&&c.push(t?[r,s[r]]:s[r]);return c}}},function(t,e,r){var n=r(317),i=r(568)(!0);n(n.S,"Object",{entries:function(t){return i(t)}})},function(t,e,r){"use strict";var n=r(317),i=r(367),o=r(330),s=r(320);r(315)&&n(n.P+r(571),"Object",{__defineGetter__:function(t,e){s.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,r){t.exports=r(337)||!r(316)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(313)[t]})},function(t,e,r){"use strict";var n=r(317),i=r(367),o=r(330),s=r(320);r(315)&&n(n.P+r(571),"Object",{__defineSetter__:function(t,e){s.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,r){"use strict";var n=r(317),i=r(367),o=r(325),s=r(368),a=r(360).f;r(315)&&n(n.P+r(571),"Object",{__lookupGetter__:function(t){var e,r=i(this),n=o(t,!0);do{if(e=a(r,n))return e.get}while(r=s(r))}})},function(t,e,r){"use strict";var n=r(317),i=r(367),o=r(325),s=r(368),a=r(360).f;r(315)&&n(n.P+r(571),"Object",{__lookupSetter__:function(t){var e,r=i(this),n=o(t,!0);do{if(e=a(r,n))return e.set}while(r=s(r))}})},function(t,e,r){var n=r(317);n(n.P+n.R,"Map",{toJSON:r(576)("Map")})},function(t,e,r){var n=r(384),i=r(577);t.exports=function(t){return function(){if(n(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,r){var n=r(515);t.exports=function(t,e){var r=[];return n(t,!1,r.push,r,e),r}},function(t,e,r){var n=r(317);n(n.P+n.R,"Set",{toJSON:r(576)("Set")})},function(t,e,r){var n=r(317);n(n.S,"System",{global:r(313)})},function(t,e,r){var n=r(317),i=r(343);n(n.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,r){var n=r(317);n(n.S,"Math",{iaddh:function(t,e,r,n){var i=t>>>0,o=r>>>0;return(e>>>0)+(n>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,r){var n=r(317);n(n.S,"Math",{isubh:function(t,e,r,n){var i=t>>>0,o=r>>>0;return(e>>>0)-(n>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,r){var n=r(317);n(n.S,"Math",{imulh:function(t,e){var r=+t,n=+e,i=65535&r,o=65535&n,s=r>>16,a=n>>16,u=(s*o>>>0)+(i*o>>>16);return s*a+(u>>16)+((i*a>>>0)+(65535&u)>>16)}})},function(t,e,r){var n=r(317);n(n.S,"Math",{umulh:function(t,e){var r=+t,n=+e,i=65535&r,o=65535&n,s=r>>>16,a=n>>>16,u=(s*o>>>0)+(i*o>>>16);return s*a+(u>>>16)+((i*a>>>0)+(65535&u)>>>16)}})},function(t,e,r){var n=r(586),i=r(321),o=n.key,s=n.set;n.exp({defineMetadata:function(t,e,r,n){s(t,e,i(r),o(n))}})},function(t,e,r){var n=r(520),i=r(317),o=r(332)("metadata"),s=o.store||(o.store=new(r(524))),a=function(t,e,r){var i=s.get(t);if(!i){if(!r)return;s.set(t,i=new n)}var o=i.get(e);if(!o){if(!r)return;i.set(e,o=new n)}return o};t.exports={store:s,map:a,has:function(t,e,r){var n=a(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=a(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){a(r,n,!0).set(t,e)},keys:function(t,e){var r=a(t,e,!1),n=[];return r&&r.forEach(function(t,e){n.push(e)}),n},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,e,r){var n=r(586),i=r(321),o=n.key,s=n.map,a=n.store;n.exp({deleteMetadata:function(t,e){var r=arguments.length<3?void 0:o(arguments[2]),n=s(i(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var u=a.get(e);return u.delete(r),!!u.size||a.delete(e)}})},function(t,e,r){var n=r(586),i=r(321),o=r(368),s=n.has,a=n.get,u=n.key,f=function(t,e,r){if(s(t,e,r))return a(t,e,r);var n=o(e);return null!==n?f(t,n,r):void 0};n.exp({getMetadata:function(t,e){return f(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,r){var n=r(523),i=r(577),o=r(586),s=r(321),a=r(368),u=o.keys,f=o.key,c=function(t,e){var r=u(t,e),o=a(t);if(null===o)return r;var s=c(o,e);return s.length?r.length?i(new n(r.concat(s))):s:r};o.exp({getMetadataKeys:function(t){return c(s(t),arguments.length<2?void 0:f(arguments[1]))}})},function(t,e,r){var n=r(586),i=r(321),o=n.get,s=n.key;n.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,r){var n=r(586),i=r(321),o=n.keys,s=n.key;n.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,e,r){var n=r(586),i=r(321),o=r(368),s=n.has,a=n.key,u=function(t,e,r){if(s(t,e,r))return!0;var n=o(e);return null!==n&&u(t,n,r)};n.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,r){var n=r(586),i=r(321),o=n.has,s=n.key;n.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,r){var n=r(586),i=r(321),o=r(330),s=n.key,a=n.set;n.exp({metadata:function(t,e){return function(r,n){a(t,e,(void 0!==n?i:o)(r),s(n))}}})},function(t,e,r){var n=r(317),i=r(518)(),o=r(313).process,s="process"==r(343)(o);n(n.G,{asap:function(t){var e=s&&o.domain;i(e?e.bind(t):t)}})},function(t,e,r){"use strict";var n=r(317),i=r(313),o=r(318),s=r(518)(),a=r(334)("observable"),u=r(330),f=r(321),c=r(514),h=r(519),l=r(319),p=r(515),d=p.RETURN,v=function(t){return null==t?void 0:u(t)},y=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},m=function(t){g(t)||(t._o=void 0,y(t))},_=function(t,e){f(t),this._c=void 0,this._o=t,t=new b(this);try{var r=e(t),n=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){n.unsubscribe()}:u(r),this._c=r)}catch(e){return void t.error(e)}g(this)&&y(this)};_.prototype=h({},{unsubscribe:function(){m(this)}});var b=function(t){this._s=t};b.prototype=h({},{next:function(t){var e=this._s;if(!g(e)){var r=e._o;try{var n=v(r.next);if(n)return n.call(r,t)}catch(t){try{m(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var r=e._o;e._o=void 0;try{var n=v(r.error);if(!n)throw t;t=n.call(r,t)}catch(t){try{y(e)}finally{throw t}}return y(e),t},complete:function(t){var e=this._s;if(!g(e)){var r=e._o;e._o=void 0;try{var n=v(r.complete);t=n?n.call(r,t):void 0}catch(t){try{y(e)}finally{throw t}}return y(e),t}}});var w=function(t){c(this,w,"Observable","_f")._f=u(t)};h(w.prototype,{subscribe:function(t){return new _(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(r,n){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:r})})}}),h(w,{from:function(t){var e="function"==typeof this?this:w,r=v(f(t)[a]);if(r){var n=f(r.call(t));return n.constructor===e?n:new e(function(t){return n.subscribe(t)})}return new e(function(e){var r=!1;return s(function(){if(!r){try{if(p(t,!1,function(t){if(e.next(t),r)return d})===d)return}catch(t){if(r)throw t;return void e.error(t)}e.complete()}}),function(){r=!0}})},of:function(){for(var t=0,e=arguments.length,r=Array(e);t<e;)r[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return s(function(){if(!e){for(var n=0;n<r.length;++n)if(t.next(r[n]),e)return;t.complete()}}),function(){e=!0}})}}),l(w.prototype,a,function(){return this}),n(n.G,{Observable:w}),r(501)("Observable")},function(t,e,r){var n=r(313),i=r(317),o=r(387),s=r(598),a=n.navigator,u=!!a&&/MSIE .\./.test(a.userAgent),f=function(t){return u?function(e,r){return t(o(s,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),r)}:t};i(i.G+i.B+i.F*u,{setTimeout:f(n.setTimeout),setInterval:f(n.setInterval)})},function(t,e,r){"use strict";var n=r(599),i=r(387),o=r(330);t.exports=function(){for(var t=o(this),e=arguments.length,r=Array(e),s=0,a=n._,u=!1;e>s;)(r[s]=arguments[s++])===a&&(u=!0);return function(){var n,o=arguments.length,s=0,f=0;if(!u&&!o)return i(t,r,this);if(n=r.slice(),u)for(;e>s;s++)n[s]===a&&(n[s]=arguments[f++]);for(;o>f;)n.push(arguments[f++]);return i(t,n,this)}}},function(t,e,r){t.exports=r(313)},function(t,e,r){var n=r(317),i=r(517);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,r){for(var n=r(502),i=r(327),o=r(313),s=r(319),a=r(438),u=r(334),f=u("iterator"),c=u("toStringTag"),h=a.Array,l=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],p=0;p<5;p++){var d,v=l[p],y=o[v],g=y&&y.prototype;if(g)for(d in g[f]||s(g,f,h),g[c]||s(g,c,v),a[v]=h,n)g[d]||i(g,d,n[d],!0)}},function(t,e){(function(e){!function(e){"use strict";var r,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",f="object"==typeof t,c=e.regeneratorRuntime;if(c)f&&(t.exports=c);else{(c=e.regeneratorRuntime=f?t.exports:{}).wrap=b;var h="suspendedStart",l="suspendedYield",p="executing",d="completed",v={},y={};y[s]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(I([])));m&&m!==n&&i.call(m,s)&&(y=m);var _=S.prototype=E.prototype=Object.create(y);T.prototype=_.constructor=S,S.constructor=T,S[u]=T.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===T||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(_),t},c.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[a]=function(){return this},c.AsyncIterator=k,c.async=function(t,e,r,n){var i=new k(b(t,e,r,n));return c.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(_),_[u]="Generator",_[s]=function(){return this},_.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=I,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return a.type="throw",a.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),f=i.call(s,"finallyLoc");if(u&&f){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function b(t,e,r,n){var i=e&&e.prototype instanceof E?e:E,o=Object.create(i.prototype),s=new B(n||[]);return o._invoke=function(t,e,r){var n=h;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===v)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=w(t,e,r);if("normal"===u.type){if(n=r.done?d:l,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function w(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function E(){}function T(){}function S(){}function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){function r(e,n,o,s){var a=w(t[e],t,n);if("throw"!==a.type){var u=a.arg,f=u.value;return f&&"object"==typeof f&&i.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,o,s)},function(t){r("throw",t,o,s)}):Promise.resolve(f).then(function(t){u.value=t,o(u)},s)}s(a.arg)}var n;"object"==typeof e.process&&e.process.domain&&(r=e.process.domain.bind(r)),this._invoke=function(t,e){function i(){return new Promise(function(n,i){r(t,e,n,i)})}return n=n?n.then(i,i):i()}}function A(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,A(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=w(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:r,done:!0}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}())},function(t,e,r){r(604),t.exports=r(318).RegExp.escape},function(t,e,r){var n=r(317),i=r(605)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e){t.exports=function(t,e){var r=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,r)}}}]));
|