viz-js-lib 0.9.31 → 0.10.3
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/README.md +18 -0
- package/dist/statistics.html +1 -1
- package/dist/viz-tests.min.js +310 -14
- package/dist/viz-tests.min.js.gz +0 -0
- package/dist/viz.min.js +44 -15
- package/dist/viz.min.js.gz +0 -0
- package/lib/auth/ecc/src/aes.js +32 -0
- package/lib/browser.js +11 -9
- package/lib/index.js +2 -0
- package/lib/utils.js +302 -0
- package/package.json +4 -2
- package/webpack/makeConfig.js +2 -9
- package/dist/viz-tests.min.js.map +0 -1
- package/dist/viz.min.js.map +0 -1
- package/lib/auth/signature.js +0 -4
package/dist/viz-tests.min.js
CHANGED
|
@@ -1,14 +1,310 @@
|
|
|
1
|
-
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),r=t[e[0]];return function(t,e,o){r.apply(this,[t,e,o].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}function r(t){return function(){var e=t.apply(this,arguments);return new i.default(function(t,n){function r(o,a){try{var s=e[o](a),u=s.value}catch(t){return void n(t)}return s.done?void t(u):i.default.resolve(u).then(function(t){r("next",t)},function(t){r("throw",t)})}return r("next")})}}var o=n(3),i=e(o),a=n(184),s=e(a),u=n(299),c=e(u),l=n(337),f=e(l),h=n(1),p=e(h),d=n(165),y=e(d),v=n(344),g=e(v);n(345),describe("viz.api:",function(){var e=this;this.timeout(3e4),describe("new VIZ",function(){it("doesn't open a connection until required",function(){(0,s.default)(!p.default.ws,"There was a connection on the singleton?"),(0,s.default)(!(new h.VIZ).ws,"There was a connection on a new instance?")}),it("opens a connection on demand",function(e){var n=new h.VIZ;(0,s.default)(!(new h.VIZ).ws,"There was a connection on a new instance?"),n.start(),t.nextTick(function(){(0,s.default)(n.ws,"There was no connection?"),e()})})}),describe("setWebSocket",function(){it("works",function(){p.default.setWebSocket("ws://localhost"),y.default.get("websocket").should.be.eql("ws://localhost")})}),beforeEach(r(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.default.apiIdsP;case 2:case"end":return t.stop()}},t,e)}))),describe("getFollowers",function(){describe("getting viz's followers",function(){it("works",r(regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=1,t.next=3,p.default.getFollowersAsync("viz",0,"blog",n);case 3:r=t.sent,(0,s.default)(r,"getFollowersAsync resoved to null?"),r.should.have.lengthOf(n);case 6:case"end":return t.stop()}},t,e)}))),it("the startFollower parameter has an impact on the result",r(regeneratorRuntime.mark(function t(){var n,r,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=1,t.next=3,p.default.getFollowersAsync("viz",0,"blog",n);case 3:return r=t.sent,r.should.have.lengthOf(n),t.next=7,p.default.getFollowersAsync("viz",r[r.length-1].follower,"blog",n);case 7:o=t.sent,o.should.have.lengthOf(n),r.should.not.be.eql(o);case 10:case"end":return t.stop()}},t,e)}))),it("clears listeners",r(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:p.default.listeners("message").should.have.lengthOf(0);case 1:case"end":return t.stop()}},t,e)})))})}),describe("getContent",function(){describe("getting a random post",function(){it("works",r(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.default.getContentAsync("pal","2scmtp-test");case 2:n=t.sent,n.should.have.properties(g.default);case 4:case"end":return t.stop()}},t,e)}))),it("clears listeners",r(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:p.default.listeners("message").should.have.lengthOf(0);case 1:case"end":return t.stop()}},t,e)})))})}),describe("streamBlockNumber",function(){it("streams viz transactions",function(t){var e=0,n=p.default.streamBlockNumber(function(r,o){f.default.exist(o),o.should.be.instanceOf(Number),e++,2===e&&(n(),t())})})}),describe("streamBlock",function(){it("streams viz blocks",function(t){var e=0,n=p.default.streamBlock(function(r,o){try{f.default.exist(o),o.should.have.properties(["previous","transactions","timestamp"])}catch(e){return n(),void t(e)}e++,2===e&&(n(),t())})})}),describe("streamTransactions",function(){it("streams viz transactions",function(t){var e=0,n=p.default.streamTransactions(function(r,o){try{f.default.exist(o),o.should.have.properties(["ref_block_num","operations","extensions"])}catch(e){return n(),void t(e)}e++,2===e&&(n(),t())})})}),describe("streamOperations",function(){it("streams viz operations",function(t){var e=0,n=p.default.streamOperations(function(r,o){try{f.default.exist(o)}catch(e){return n(),void t(e)}e++,2===e&&(n(),t())})})}),describe("when there are network failures (the ws closes)",function(){var t=h.VIZ.prototype.start;(0,c.default)(h.VIZ.prototype,"start",function(){return t.apply(this,arguments)});var n=h.VIZ.prototype.stop;(0,c.default)(h.VIZ.prototype,"stop",function(){return n.apply(this,arguments)}),it("tries to reconnect automatically",r(regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=new h.VIZ,(0,s.default)(!n.ws,"There was a websocket connection before a call?"),r=1,t.next=5,n.getFollowersAsync("viz",0,"blog",r);case 5:return(0,s.default)(n.ws,"There was no websocket connection after a call?"),t.next=8,i.default.delay(1e3);case 8:return(0,s.default)(!n.stop.calledOnce,"VIZ::stop was already called before disconnect?"),n.ws.emit("close"),(0,s.default)(!n.ws),(0,s.default)(!n.startP),(0,s.default)(n.stop.calledOnce,"VIZ::stop wasn't called when the connection closed?"),t.next=15,n.getFollowersAsync("viz",0,"blog",r);case 15:(0,s.default)(n.ws,"There was no websocket connection after a call?"),(0,s.default)(n.isOpen,"There was no websocket connection after a call?");case 17:case"end":return t.stop()}},t,e)})))})})}).call(e,n(5))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 s=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}}(),u=n(2),c=r(u),l=n(3),f=r(l),h=n(42),p=r(h),d=n(151),y=r(d),v=n(161),g=(r(v),n(162)),m=r(g),_=n(165),b=r(_),w=n(167),x=r(w),E=n(168),j=n(169),T=r(j),O=(0,m.default)("viz:emitters"),A=(0,m.default)("viz:protocol"),k=(0,m.default)("viz:setup"),S=(0,m.default)("viz:ws"),C={id:0},P=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return(0,y.default)(t,C),n.options=(0,p.default)(t),n.id=0,n.inFlight=0,n.currentP=f.default.fulfilled(),n.isOpen=!1,n.releases=[],n.requests={},n}return a(e,t),s(e,[{key:"_setTransport",value:function(t){if(t&&t.match("^((http|https)?://)"))this.transport=new T.default.http;else{if(!t||!t.match("^((ws|wss)?://)"))throw Error("unknown transport! ["+t+"]");this.transport=new T.default.ws}}},{key:"setWebSocket",value:function(t){console.warn("viz.api.setWebSocket(url) is now deprecated instead use viz.config.set('websocket',url)"),k("Setting WS",t),b.default.set("websocket",t),this._setTransport(t),this.stop()}},{key:"start",value:function(){var t=b.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 O("Adding listener for",e,"from",t.constructor.name),t.addEventListener?t.addEventListener(e,n):t.on(e,n),function(){O("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,o=e.resolve,i=e.reject,a=e.start_time;S("-- VIZ.onMessage -->",t.id);var s=t.error;if(s){var u=new Error((s.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return u.payload=t,void i(u)}A("Resolved",n,r,"->",t),this.emit("track-performance",r.method,Date.now()-a),delete this.requests[t.id],o(t.result)}},{key:"send",value:function(t,e,n){this.transport||this.start();var r=n;if(this.__logger){var o=Math.random(),i=this;this.log("xmit:"+o+":",e),r=function(t,e){t?i.log("error","rsp:"+o+":\n\n",t,e):i.log("rsp:"+o+":",e),n&&n.apply(i,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 o="",i=!0,a=function a(){i&&e.getDynamicGlobalPropertiesAsync().then(function(e){var i="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(i!==o)if(o)for(var s=o;s<i;s++)s!==o&&n(null,s),o=s;else o=i,n(null,i);f.default.delay(r).then(function(){a()})},function(t){n(t)})};return a(),function(){i=!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="",o="",i=this.streamBlockNumber(e,function(e,a){return e?(i(),void n(e)):(r=a,void(r!==o&&(o=r,t.getBlock(r,n))))});return i}},{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){return t?(n(),void e(t)):void(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){return t?(n(),void e(t)):void r.operations.forEach(function(t){e(null,t)})});return n}}]),e}(c.default);x.default.forEach(function(t){var e=t.method_name||(0,E.camelCase)(t.method),n=t.params||[];P.prototype[e+"With"]=function(e,r){var o=n.map(function(t){return e[t]});return this.send(t.api,{method:t.method,params:o},r)},P.prototype[e]=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=n.reduce(function(t,e,n){return t[e]=r[n],t},{}),a=r[n.length];return this[e+"With"](i,a)}}),f.default.promisifyAll(P.prototype);var R=new P;e=t.exports=R,e.VIZ=P,e.VIZ.DEFAULTS=C},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function o(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function a(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(!o(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,o,s,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(n=this._events[t],a(n))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:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(i(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),o=c.length,u=0;u<o;u++)c[u].apply(this,s);return!0},n.prototype.addListener=function(t,e){var o;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&&(o=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[t].length>o&&(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){function n(){this.removeListener(t,n),o||(o=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var o=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,o,a,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.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(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){o=s;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(n=this._events[t],r(n))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){var e;return e=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";function r(){try{Promise===i&&(Promise=o)}catch(t){}return i}var o;"undefined"!=typeof Promise&&(o=Promise);var i=n(4)();i.noConflict=r,t.exports=i},function(t,e,n){(function(e){"use strict";t.exports=function(){function r(){}function o(t,e){if(null==t||t.constructor!==i)throw new _("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new _("expecting a function but got "+d.classString(e))}function i(t){t!==w&&o(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 a(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new i(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new _("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new i.PromiseInspection(this._target())},h=function(t){return i.reject(new _(t))},p={},d=n(6);c=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(i,"_getDomain",c);var y=n(7),v=n(8),g=new v;y.defineProperty(i,"_async",{value:g});var m=n(13),_=i.TypeError=m.TypeError;i.RangeError=m.RangeError;var b=i.CancellationError=m.CancellationError;i.TimeoutError=m.TimeoutError,i.OperationalError=m.OperationalError,i.RejectionError=m.OperationalError,i.AggregateError=m.AggregateError;var w=function(){},x={},E={},j=n(14)(i,w),T=n(15)(i,w,j,h,r),O=n(16)(i),A=O.create,k=n(17)(i,O),S=(k.CapturedTrace,n(18)(i,j,E)),C=n(19)(E),P=n(20),R=d.errorObj,F=d.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),o=0;for(n=0;n<e-1;++n){var i=arguments[n];if(!d.isObject(i))return h("Catch statement predicate: expecting an object but got "+d.classString(i));r[o++]=i}return r.length=o,t=arguments[n],this.then(void 0,C(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},i.prototype.then=function(t,e){if(k.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(n+=", "+d.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?h("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,x,void 0)},i.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},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new T(this).promise()},i.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},i.getNewLibraryCopy=t.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(w);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=F(t)(P(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new T(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new _("expecting a function but got "+d.classString(t));return g.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(w),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!==(50397184&l)){var h,p,y=u._settlePromiseCtx;0!==(33554432&l)?(p=u._rejectionHandler0,h=t):0!==(16777216&l)?(p=u._fulfillmentHandler0,h=e,u._unsetRejectionIsUnhandled()):(y=u._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),u._attachExtraTrace(p),h=e),g.invoke(y,u,{handler:null===f?h:"function"==typeof h&&d.domainBind(f,h),promise:s,receiver:r,value:p})}else u._addCallbacks(t,e,s,r,f);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==p)return void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,o=t._receiverAt(0);void 0===o&&(o=p),this._addCallbacks(e,n,r,o,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=p),this._addCallbacks(n,r,o,i,null)},i.prototype._addCallbacks=function(t,e,n,r,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===o?t:d.domainBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:d.domainBind(o,e));else{var a=4*i-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===o?t:d.domainBind(o,t)),"function"==typeof e&&(this[a+1]=null===o?e:d.domainBind(o,e))}return this._setLength(i+1),i},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;s<a;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var u=new b("late cancellation observer");r._attachExtraTrace(u),this._reject(u)}}},i.prototype._rejectCallback=function(t,e,n){var r=d.ensureErrorObject(t),o=r===t;if(!o&&!n&&k.warnings()){var i="a promise was rejected with a non-error: "+d.classString(t);this._warn(i,!0)}this._attachExtraTrace(r,!!e&&o),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==w){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)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var o=r._bitField;if(0===(65536&o)){r._pushContext();var i;e===x?n&&"number"==typeof n.length?i=F(t).apply(this._boundValue(),n):(i=R,i.e=new _("cannot .spread() a non-array: "+d.classString(n))):i=F(t).call(e,n);var a=r._popContext();o=r._bitField,0===(65536&o)&&(i===E?r._reject(n):i===R?r._rejectCallback(i.e,!1):(k.checkForgottenReturns(i,a,"",r,this),r._resolveCallback(i)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,n,o){var a=t instanceof i,s=this._bitField,u=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),n instanceof S&&n.isFinallyHandler()?(n.cancelPromise=t,F(e).call(n,o)===R&&t._reject(R.e)):e===f?t._fulfill(f.call(n)):n instanceof r?n._promiseCancelled(t):a||t instanceof T?t._cancel():n.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,n,o,t)):e.call(n,o,t):n instanceof r?n._isResolved()||(0!==(33554432&s)?n._promiseFulfilled(o,t):n._promiseRejected(o,t)):a&&(u&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,o,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():g.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?g.fatalError(t,d.isNode):void((65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;n<t;n++){var r=this._fulfillmentHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;n<t;n++){var r=this._rejectionHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,e)}},i.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()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){k.deprecated("Promise.defer","new Promise");var t=new i(w);return{promise:t,resolve:a,reject:s}},d.notEnumerableProp(i,"_makeSelfResolutionError",l),n(21)(i,w,j,h,k),n(22)(i,w,j,k),n(23)(i,T,h,k),n(24)(i),n(25)(i),n(26)(i,T,j,w,g,c),i.Promise=i,i.version="3.5.1",n(27)(i,T,h,j,w,k),n(28)(i),n(29)(i,h,j,A,w,k),n(30)(i,w,k),n(31)(i,h,w,j,r,k),n(32)(i),n(33)(i,w),n(34)(i,T,j,h),n(35)(i,w,j,h),n(36)(i,T,h,j,w,k),n(37)(i,T,k),n(38)(i,T,h),n(39)(i,w),n(40)(i,w),n(41)(i),d.toFastProperties(i),d.toFastProperties(i.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new i(w)),k.setBounds(v.firstLineError,d.lastLineError),i}}).call(e,n(5))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){y&&p&&(y=!1,p.length?d=p.concat(d):v=-1,d.length&&s())}function s(){if(!y){var t=o(a);y=!0;for(var e=d.length;e;){for(p=d,d=[];++v<e;)p&&p[v].run();v=-1,e=d.length}p=null,y=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var p,d=[],y=!1,v=-1;h.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];d.push(new u(t,e)),1!==d.length||y||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,n){(function(e,r){"use strict";function o(){try{var t=C;return C=null,t.apply(this,arguments)}catch(t){return S.e=t,S}}function i(t){return C=t,o}function a(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function u(t){return a(t)?new Error(g(t)):t}function c(t,e){var n,r=t.length,o=new Array(r+1);for(n=0;n<r;++n)o[n]=t[n];return o[n]=e,o}function l(t,e,n){if(!A.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 f(t,e,n){if(a(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return A.defineProperty(t,e,r),t}function h(t){throw t}function p(t){try{if("function"==typeof t){var e=A.names(t.prototype),n=A.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=I.test(t+"")&&A.names(t).length>0;if(n||r||o)return!0}return!1}catch(t){return!1}}function d(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function y(t){return M.test(t)}function v(t,e,n){for(var r=new Array(t),o=0;o<t;++o)r[o]=e+o+n;return r}function g(t){try{return t+""}catch(t){return"[no string representation]"}}function m(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function _(t){try{f(t,"isOperational",!0)}catch(t){}}function b(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function w(t){return m(t)&&A.propertyIsWritable(t,"stack")}function x(t){return{}.toString.call(t)}function E(t,e,n){for(var r=A.names(t),o=0;o<r.length;++o){var i=r[o];if(n(i))try{A.defineProperty(e,i,A.getDescriptor(t,i))}catch(t){}}}function j(t){return q?r.env[t]:void 0}function T(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function O(t,e){return t.bind(e)}var A=n(7),k="undefined"==typeof navigator,S={e:{}},C,P="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof e?e:void 0!==this?this:null,R=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},F=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(A.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],o=Object.create(null);null!=t&&!e(t);){var i;try{i=n(t)}catch(t){return r}for(var a=0;a<i.length;++a){var s=i[a];if(!o[s]){o[s]=!0;var u=Object.getOwnPropertyDescriptor(t,s);null!=u&&null==u.get&&null==u.set&&r.push(s)}}t=A.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var o=[];t:for(var i in n)if(r.call(n,i))o.push(i);else{for(var a=0;a<t.length;++a)if(r.call(t[a],i))continue t;o.push(i)}return o}}(),I=/this\s*\.\s*\S+\s*=/,M=/^[a-z$_][a-z$_0-9]*$/i,N=function(){return"stack"in new Error?function(t){return w(t)?t:new Error(g(t))}:function(t){if(w(t))return t;try{throw new Error(g(t));
|
|
2
|
-
}catch(t){return t}}}(),D=function(t){return A.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="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};D=function(t){return A.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var B="undefined"!=typeof r&&"[object process]"===x(r).toLowerCase(),q="undefined"!=typeof r&&"undefined"!=typeof r.env,U={isClass:p,isIdentifier:y,inheritedDataKeys:F,getDataPropertyOrDefault:l,thrower:h,isArray:A.isArray,asArray:D,notEnumerableProp:f,isPrimitive:a,isObject:s,isError:m,canEvaluate:k,errorObj:S,tryCatch:i,inherits:R,withAppended:c,maybeWrapAsError:u,toFastProperties:d,filledRange:v,toString:g,canAttachTrace:w,ensureErrorObject:N,originatesFromRejection:b,markAsOriginatingFromRejection:_,classString:x,copyDescriptors:E,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:B,hasEnvVariables:q,env:j,global:P,getNativePromise:T,domainBind:O};U.isRecentNode=U.isNode&&function(){var t=r.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),U.isNode&&U.toFastProperties(r);try{throw new Error}catch(t){U.lastLineError=t}t.exports=U}).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,o={}.toString,i={}.constructor.prototype,a=function(t){var e=[];for(var n in t)r.call(t,n)&&e.push(n);return e},s=function(t,e){return{value:t[e]}},u=function(t,e,n){return t[e]=n.value,t},c=function(t){return t},l=function(t){try{return Object(t).constructor.prototype}catch(t){return i}},f=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};t.exports={isArray:f,keys:a,names:a,defineProperty:u,getDescriptor:s,freeze:c,getPrototypeOf:l,isES5:n,propertyIsWritable:function(){return!0}}}},function(t,e,n){(function(e){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new c(16),this._normalQueue=new c(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=u}function o(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function i(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function a(t){this._normalQueue._pushOne(t),this._queueTick()}var s;try{throw new Error}catch(t){s=t}var u=n(9),c=n(12),l=n(6);r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){l.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},r.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")}},l.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=o,r.prototype.invoke=i,r.prototype.settlePromises=a),r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},t.exports=r,t.exports.firstLineError=s}).call(e,n(5))},function(t,e,n){(function(e,r,o){"use strict";var i,a=n(6),s=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},u=a.getNativePromise();if(a.isNode&&"undefined"==typeof MutationObserver){var c=e.setImmediate,l=r.nextTick;i=a.isRecentNode?function(t){c.call(e,t)}:function(t){l.call(r,t)}}else if("function"==typeof u&&"function"==typeof u.resolve){var f=u.resolve();i=function(t){f.then(t)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof o?function(t){o(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:s:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),o=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});o.observe(r,e);var i=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),i()}}();t.exports=i}).call(e,function(){return this}(),n(5),n(10).setImmediate)},function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var o="undefined"!=typeof t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,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="undefined"!=typeof self&&self.setImmediate||"undefined"!=typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||"undefined"!=typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(e,function(){return this}())},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(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 r={callback:t,args:e};return y[d]=r,p(d),d++}function o(t){delete y[t]}function i(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)}}function a(t){if(v)setTimeout(a,0,t);else{var e=y[t];if(e){v=!0;try{i(e)}finally{o(t),v=!1}}}}function s(){p=function(t){e.nextTick(function(){a(t)})}}function u(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}function c(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),p=function(n){t.postMessage(e+n,"*")}}function l(){var t=new MessageChannel;t.port1.onmessage=function(t){var e=t.data;a(e)},p=function(e){t.port2.postMessage(e)}}function f(){var t=g.documentElement;p=function(e){var n=g.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}function h(){p=function(t){setTimeout(a,0,t)}}if(!t.setImmediate){var p,d=1,y={},v=!1,g=t.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(t);m=m&&m.setTimeout?m:t,"[object process]"==={}.toString.call(t.process)?s():u()?c():t.MessageChannel?l():g&&"onreadystatechange"in g.createElement("script")?f():h(),m.setImmediate=r,m.clearImmediate=o}}("undefined"==typeof self?"undefined"==typeof t?this:t:self)}).call(e,function(){return this}(),n(5))},function(t,e){"use strict";function n(t,e,n,r,o){for(var i=0;i<o;++i)n[i+r]=t[i+e],t[i+e]=void 0}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);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},r.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 o=this._front+r-3;this._checkCapacity(r);var i=this._capacity-1;this[o+0&i]=t,this[o+1&i]=e,this[o+2&i]=n,this._length=r},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;var r=this._front,o=this._length,i=r+o&e-1;n(this,0,this,e,i)},t.exports=r},function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(f(this,"message","string"==typeof r?r:e),f(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return l(n,Error),n}function o(t){return this instanceof o?(f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(t)}var i,a,s=n(7),u=s.freeze,c=n(6),l=c.inherits,f=c.notEnumerableProp,h=r("Warning","warning"),p=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),y=r("AggregateError","aggregate error");try{i=TypeError,a=RangeError}catch(t){i=r("TypeError","type error"),a=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<v.length;++g)"function"==typeof Array.prototype[v[g]]&&(y.prototype[v[g]]=Array.prototype[v[g]]);s.defineProperty(y.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),y.prototype.isOperational=!0;var m=0;y.prototype.toString=function(){var t=Array(4*m+1).join(" "),e="\n"+t+"AggregateError of:\n";m++,t=Array(4*m+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",o=r.split("\n"),i=0;i<o.length;++i)o[i]=t+o[i];r=o.join("\n"),e+=r+"\n"}return m--,e},l(o,Error);var _=Error.__BluebirdErrorTypes__;_||(_=u({CancellationError:p,TimeoutError:d,OperationalError:o,RejectionError:o,AggregateError:y}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:_,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:i,RangeError:a,CancellationError:_.CancellationError,OperationalError:_.OperationalError,TimeoutError:_.TimeoutError,AggregateError:_.AggregateError,Warning:h}},function(t,e,n){"use strict";t.exports=function(t,e){function r(n,r){if(l(n)){if(n instanceof t)return n;var o=i(n);if(o===c){r&&r._pushContext();var u=t.reject(o.e);return r&&r._popContext(),u}if("function"==typeof o){if(a(n)){var u=new t(e);return n._then(u._fulfill,u._reject,void 0,u,null),u}return s(n,o,r)}}return n}function o(t){return t.then}function i(t){try{return o(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function s(n,r,o){function i(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,f,!0),s=null)}var s=new t(e),l=s;o&&o._pushContext(),s._captureStackTrace(),o&&o._popContext();var f=!0,h=u.tryCatch(r).call(n,i,a);return f=!1,s&&h===c&&(s._rejectCallback(h.e,!0,!0),s=null),l}var u=n(6),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return r}},function(t,e,n){"use strict";t.exports=function(t,e,r,o,i){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(n){var r=this._promise=new t(e);n instanceof t&&r._propagateFrom(n,3),r._setOnCancel(this),this._values=n,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=n(6);u.isArray;return u.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,i){var s=r(this._values,this._promise);if(s instanceof t){s=s._target();var c=s._bitField;if(this._values=s,0===(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,i);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=u.asArray(s),null===s){var l=o("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}return 0===s.length?void(i===-5?this._resolveEmptyArray():this._resolve(a(i))):void this._iterate(s)},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var o=this._promise,i=!1,a=null,s=0;s<n;++s){var u=r(e[s],o);u instanceof t?(u=u._target(),a=u._bitField):a=null,i?null!==a&&u.suppressUnhandledRejections():null!==a?0===(50397184&a)?(u._proxy(this,s),this._values[s]=u):i=0!==(33554432&a)?this._promiseFulfilled(u._value(),s):0!==(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(u,s)}i||o._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.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()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},function(t,e){"use strict";t.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){if(o)return new e}function r(){var t=i.length-1;if(t>=0)return i[t]}var o=!1,i=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=i.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,o=!1},o=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},function(t,e,n){(function(e){"use strict";t.exports=function(t,r){function o(t,e){return{promise:e}}function i(){return!1}function a(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: "+B.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?B.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(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)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function d(){this._trace=new R(this._peekContext())}function y(t,e){if(q(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=j(t);B.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),B.notEnumerableProp(t,"__stackCleaned__",!0)}}}function v(t,e,n,r,o){if(void 0===t&&null!==e&&$){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var i="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=x(s),c=u.length-1;c>=0;--c){var l=u[c];if(!V.test(l)){var f=l.match(H);f&&(i="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var h=u[0],c=0;c<s.length;++c)if(s[c]===h){c>0&&(a="\n"+s[c-1]);break}}var p="a promise was created in a "+n+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(p,!0,e)}}function g(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(e,n,r){if(at.warnings){var o,i=new L(e);if(n)r._attachExtraTrace(i);else if(at.longStackTraces&&(o=t._peekContext()))o.attachExtraTrace(i);else{var a=j(i);i.stack=a.message+"\n"+a.stack.join("\n")}et("warning",i)||T(i,"",!0)}}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")}function b(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],o=e.length-1,i=e[o],a=-1,s=r.length-1;s>=0;--s)if(r[s]===i){a=s;break}for(var s=a;s>=0;--s){var u=r[s];if(e[o]!==u)break;e.pop(),o--}e=r}}function x(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],o=" (No stack trace)"===r||W.test(r),i=o&&rt(r);o&&!i&&(G&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function E(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||W.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:x(e)}}function T(t,e,n){if("undefined"!=typeof console){var r;if(B.isObject(t)){var o=t.stack;r=e+z(o,t)}else r=e+String(t);"function"==typeof M?M(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function O(t,e,n,r){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){D.throwLater(t)}"unhandledRejection"===t?et(t,n,r)||o||T(n,"Unhandled rejection "):et(t,r)}function A(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():B.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+k(e)+">, no stack trace)"}function k(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function S(){return"function"==typeof it}function C(t){var e=t.match(ot);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function P(t,e){if(S()){for(var n,r,o=t.stack.split("\n"),i=e.stack.split("\n"),a=-1,s=-1,u=0;u<o.length;++u){var c=C(o[u]);if(c){n=c.fileName,a=c.line;break}}for(var u=0;u<i.length;++u){var c=C(i[u]);if(c){r=c.fileName,s=c.line;break}}a<0||s<0||!n||!r||n!==r||a>=s||(rt=function(t){if(U.test(t))return!0;var e=C(t);return!!(e&&e.fileName===n&&a<=e.line&&e.line<=s)})}}function R(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,R),e>32&&this.uncycle()}var F,I,M,N=t._getDomain,D=t._async,L=n(13).Warning,B=n(6),q=B.canAttachTrace,U=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=/\((?:timers\.js):\d+:\d+\)/,H=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,W=null,z=null,G=!1,Y=!(0==B.env("BLUEBIRD_DEBUG")||!B.env("BLUEBIRD_DEBUG")&&"development"!==B.env("NODE_ENV")),X=!(0==B.env("BLUEBIRD_WARNINGS")||!Y&&!B.env("BLUEBIRD_WARNINGS")),J=!(0==B.env("BLUEBIRD_LONG_STACK_TRACES")||!Y&&!B.env("BLUEBIRD_LONG_STACK_TRACES")),$=0!=B.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(X||!!B.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},t.prototype._notifyUnhandledRejectionIsHandled=function(){O("rejectionHandled",F,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(),O("unhandledRejection",I,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,n){return m(t,e,n||this)},t.onPossiblyUnhandledRejection=function(t){var e=N();I="function"==typeof t?null===e?t:B.domainBind(e,t):void 0},t.onUnhandledRejectionHandled=function(t){var e=N();F="function"==typeof t?null===e?t:B.domainBind(e,t):void 0};var K=function(){};t.longStackTraces=function(){if(D.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&S()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace;at.longStackTraces=!0,K=function(){if(D.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,r.deactivateLongStackTraces(),D.enableTrampoline(),at.longStackTraces=!1},t.prototype._captureStackTrace=d,t.prototype._attachExtraTrace=y,r.activateLongStackTraces(),D.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return at.longStackTraces&&S()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return B.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!B.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return B.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!B.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),B.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!B.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),Q=function(){return B.isNode?function(){return e.emit.apply(e,arguments)}:B.global?function(t){var e="on"+t.toLowerCase(),n=B.global[e];return!!n&&(n.apply(B.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={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},et=function(t){var e=!1;try{e=Q.apply(null,arguments)}catch(t){D.throwLater(t),e=!0}var n=!1;try{n=Z(t,tt[t].apply(null,arguments))}catch(t){D.throwLater(t),n=!0}return n||e};t.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&K()),"warnings"in e){var n=e.warnings;at.warnings=!!n,$=at.warnings,B.isObject(n)&&"wForgottenReturn"in n&&($=!!n.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!at.cancellation){if(D.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=l,t.prototype._propagateFrom=f,t.prototype._onCancel=u,t.prototype._setOnCancel=c,t.prototype._attachCancellationCallback=s,t.prototype._execute=a,nt=f,at.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!at.monitoring?(at.monitoring=!0,t.prototype._fireEvent=et):!e.monitoring&&at.monitoring&&(at.monitoring=!1,t.prototype._fireEvent=i)),t},t.prototype._fireEvent=i,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._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var nt=h,rt=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;B.inherits(R,Error),r.CapturedTrace=R,R.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,o=this;void 0!==o;++r)e.push(o),o=o._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var i=e[r].stack;void 0===n[i]&&(n[i]=r)}for(var r=0;r<t;++r){var a=e[r].stack,s=n[a];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 u=r>0?e[r-1]:this;s<t-1?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=r-2;l>=0;--l)e[l]._length=c,c++;return}}}},R.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],o=this;void 0!==o;)r.push(x(o.stack.split("\n"))),o=o._parent;w(r),b(r),B.notEnumerableProp(t,"stack",_(n,r)),B.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():A(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,W=t,z=e;var n=Error.captureStackTrace;return rt=function(t){return U.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return W=/@/,z=e,G=!0,function(t){t.stack=(new Error).stack};var o;try{throw new Error}catch(t){o="stack"in t}return"stack"in r||!o||"number"!=typeof Error.stackTraceLimit?(z=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?A(e):e.toString()},null):(W=t,z=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(M=function(t){console.warn(t)},B.isNode&&e.stderr.isTTY?M=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:B.isNode||"string"!=typeof(new Error).stack||(M=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:X,longStackTraces:!1,cancellation:!1,monitoring:!1};return J&&t.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return nt},boundValueFunction:function(){return p},checkForgottenReturns:v,setBounds:P,warn:m,deprecated:g,CapturedTrace:R,fireDomEvent:Z,fireGlobalEvent:Q}}}).call(e,n(5))},function(t,e,n){"use strict";t.exports=function(t,e,r){function o(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function a(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function s(){return c.call(this,this.promise._target()._settledValue())}function u(t){if(!a(this,t))return h.e=t,h}function c(n){var o=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(o._boundValue()):c.call(o._boundValue(),n);if(l===r)return l;if(void 0!==l){o._setReturnedNonUndefined();var p=e(l,o);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new f("late cancellation observer");return o._attachExtraTrace(d),h.e=d,h}p.isPending()&&p._attachCancellationCallback(new i(this))}return p._then(s,u,void 0,this,void 0)}}}return o.isRejected()?(a(this),h.e=n,h):(a(this),n)}var l=n(6),f=t.CancellationError,h=l.errorObj,p=n(19)(r);return o.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){a(this.finallyHandler)},t.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new o(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,c,c)},t.prototype.tap=function(t){return this._passThrough(t,1,c)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,c);var r,o=new Array(n-1),i=0;for(r=0;r<n-1;++r){var a=arguments[r];if(!l.isObject(a))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+l.classString(a)));o[i++]=a}o.length=i;var s=arguments[r];return this._passThrough(p(o,s,this),1,void 0,c)},o}},function(t,e,n){"use strict";t.exports=function(t){function e(e,n,s){return function(u){var c=s._boundValue();t:for(var l=0;l<e.length;++l){var f=e[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return i(n).call(c,u)}else if("function"==typeof f){var h=i(f).call(c,u);if(h===a)return h;if(h)return i(n).call(c,u)}else if(r.isObject(u)){for(var p=o(f),d=0;d<p.length;++d){var y=p[d];if(f[y]!=u[y])continue t}return i(n).call(c,u)}}return t}}var r=n(6),o=n(7).keys,i=r.tryCatch,a=r.errorObj;return e}},function(t,e,n){"use strict";function r(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function o(t){var e;if(r(t)){e=new c(t),
|
|
3
|
-
e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=l.keys(t),o=0;o<n.length;++o){var i=n[o];f.test(i)||(e[i]=t[i])}return e}return a.markAsOriginatingFromRejection(t),t}function i(t,e){return function(n,r){if(null!==t){if(n){var i=o(s(n));t._attachExtraTrace(i),t._reject(i)}else if(e){for(var a=arguments.length,u=new Array(Math.max(a-1,0)),c=1;c<a;++c)u[c-1]=arguments[c];t._fulfill(u)}else t._fulfill(r);t=null}}}var a=n(6),s=a.maybeWrapAsError,u=n(13),c=u.OperationalError,l=n(7),f=/^(?:name|message|stack|cause)$/;t.exports=i},function(t,e,n){"use strict";t.exports=function(t,e,r,o,i){var a=n(6),s=a.tryCatch;t.method=function(n){if("function"!=typeof n)throw new t.TypeError("expecting a function but got "+a.classString(n));return function(){var r=new t(e);r._captureStackTrace(),r._pushContext();var o=s(n).apply(this,arguments),a=r._popContext();return i.checkForgottenReturns(o,a,"Promise.method",r),r._resolveFromSyncValue(o),r}},t.attempt=t.try=function(n){if("function"!=typeof n)return o("expecting a function but got "+a.classString(n));var r=new t(e);r._captureStackTrace(),r._pushContext();var u;if(arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(n).apply(l,c):s(n).call(l,c)}else u=s(n)();var f=r._popContext();return i.checkForgottenReturns(u,f,"Promise.try",r),r._resolveFromSyncValue(u),r},t.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},function(t,e){"use strict";t.exports=function(t,e,n,r){var o=!1,i=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(i,i,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(i){o||(o=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var c=n(i),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,h),c._then(s,u,void 0,l,h),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o){var i=n(6),a=i.tryCatch,s=i.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!o.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(i.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=a(t).call(this._boundValue());r===s&&(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],r=function(){throw e};return this.caught(t,r)},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();var o=function(){return r};return this.caught(n,o)}}},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()},o=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=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 a.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.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,o,i,a){var s,u=n(6),c=u.canEvaluate,l=u.tryCatch,f=u.errorObj;if(c){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))},p=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},d=function(e){for(var n=new Array(e),r=0;r<n.length;++r)n[r]="this.p"+(r+1);var o=n.join(" = ")+" = null;",a="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"),s=n.join(", "),u="Holder$"+e,c="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 c=c.replace(/\[TheName\]/g,u).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,o).replace(/\[CancellationCode\]/g,a),new Function("tryCatch","errorObj","Promise","async",c)(l,f,t,i)},y=[],v=[],g=[],m=0;m<8;++m)y.push(d(m+1)),v.push(h(m+1)),g.push(p(m+1));s=function(t){this._reject(t)}}t.join=function(){var n,i=arguments.length-1;if(i>0&&"function"==typeof arguments[i]&&(n=arguments[i],i<=8&&c)){var l=new t(o);l._captureStackTrace();for(var f=y[i-1],h=new f(n),p=v,d=0;d<i;++d){var m=r(arguments[d],l);if(m instanceof t){m=m._target();var _=m._bitField;0===(50397184&_)?(m._then(p[d],s,void 0,l,h),g[d](m,h),h.asyncNeeded=!1):0!==(33554432&_)?p[d].call(l,m._value(),h):0!==(16777216&_)?l._reject(m._reason()):l._cancel()}else p[d].call(l,m,h)}if(!l._isFateSealed()){if(h.asyncNeeded){var b=a();null!==b&&(h.fn=u.domainBind(b,h.fn))}l._setAsyncGuaranteed(),l._setOnCancel(h)}return l}for(var w=arguments.length,x=new Array(w),E=0;E<w;++E)x[E]=arguments[E];n&&x.pop();var l=new e(x).promise();return void 0!==n?l.spread(n):l}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o,i,a){function s(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var o=c();this._callback=null===o?e:l.domainBind(o,e),this._preservedValues=r===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],p.invoke(this._asyncInit,this,void 0)}function u(e,n,o,i){if("function"!=typeof n)return r("expecting a function but got "+l.classString(n));var a=0;if(void 0!==o){if("object"!=typeof o||null===o)return t.reject(new TypeError("options argument must be an object but it is "+l.classString(o)));if("number"!=typeof o.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(o.concurrency)));a=o.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(e,n,a,i).promise()}var c=t._getDomain,l=n(6),f=l.tryCatch,h=l.errorObj,p=t._async;l.inherits(s,e),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var r=this._values,i=this.length(),s=this._preservedValues,u=this._limit;if(n<0){if(n=n*-1-1,r[n]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var c=this._promise,l=this._callback,p=c._boundValue();c._pushContext();var d=f(l).call(p,e,n,i),y=c._popContext();if(a.checkForgottenReturns(d,y,null!==s?"Promise.filter":"Promise.map",c),d===h)return this._reject(d.e),!0;var v=o(d,this._promise);if(v instanceof t){v=v._target();var g=v._bitField;if(0===(50397184&g))return u>=1&&this._inFlight++,r[n]=v,v._proxy(this,(n+1)*-1),!1;if(0===(33554432&g))return 0!==(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}r[n]=d}var m=++this._totalResolved;return m>=i&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.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)}},s.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),o=0,i=0;i<n;++i)t[i]&&(r[o++]=e[i]);r.length=o,this._resolve(r)},s.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return u(this,t,e,null)},t.map=function(t,e,n,r){return u(t,e,n,r)}}},function(t,e,n){"use strict";var r=Object.create;if(r){var o=r(null),i=r(null);o[" size"]=i[" size"]=0}t.exports=function(t){function e(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var o="Object "+l.classString(e)+" has no method '"+l.toString(n)+"'";throw new t.TypeError(o)}return r}function r(t){var n=this.pop(),r=e(t,n);return r.apply(t,this)}function a(t){return t[this]}function s(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var u,c,l=n(6),f=l.canEvaluate,h=l.isIdentifier,p=function(t){return new Function("ensureMethod"," \n\t return function(obj) { \n\t 'use strict' \n\t var len = this.length; \n\t ensureMethod(obj, 'methodName'); \n\t switch(len) { \n\t case 1: return obj.methodName(this[0]); \n\t case 2: return obj.methodName(this[0], this[1]); \n\t case 3: return obj.methodName(this[0], this[1], this[2]); \n\t case 0: return obj.methodName(); \n\t default: \n\t return obj.methodName.apply(obj, this); \n\t } \n\t }; \n\t ".replace(/methodName/g,t))(e)},d=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},y=function(t,e,n){var r=n[t];if("function"!=typeof r){if(!h(t))return null;if(r=e(t),n[t]=r,n[" size"]++,n[" size"]>512){for(var o=Object.keys(n),i=0;i<256;++i)delete n[o[i]];n[" size"]=o.length-256}}return r};u=function(t){return y(t,p,o)},c=function(t){return y(t,d,i)},t.prototype.call=function(t){for(var e=arguments.length,n=new Array(Math.max(e-1,0)),o=1;o<e;++o)n[o-1]=arguments[o];if(f){var i=u(t);if(null!==i)return this._then(i,void 0,void 0,n,void 0)}return n.push(t),this._then(r,void 0,void 0,n,void 0)},t.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=s;else if(f){var r=c(t);e=null!==r?r:a}else e=a;return this._then(e,void 0,void 0,t,void 0)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o,i,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(e,n){function o(){if(a>=c)return l._fulfill();var i=u(e[a++]);if(i instanceof t&&i._isDisposable()){try{i=r(i._getDisposer().tryDispose(n),e.promise)}catch(t){return s(t)}if(i instanceof t)return i._then(o,s,null,null,null)}o()}var a=0,c=e.length,l=new t(i);return o(),l}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function f(t,e,n){this.constructor$(t,e,n)}function h(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function p(t){this.length=t,this.promise=null,this[t-1]=null}var d=n(6),y=n(13).TypeError,v=n(6).inherits,g=d.errorObj,m=d.tryCatch,_={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():_},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==_?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(f,l),f.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},p.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 o=arguments[n-1];if("function"!=typeof o)return e("expecting a function but got "+d.classString(o));var i,s=!0;2===n&&Array.isArray(arguments[0])?(i=arguments[0],n=i.length,s=!1):(i=arguments,n--);for(var u=new p(n),f=0;f<n;++f){var y=i[f];if(l.isDisposer(y)){var v=y;y=y.promise(),y._setDisposable(v)}else{var _=r(y);_ instanceof t&&(y=_._then(h,null,null,{resources:u,index:f},void 0))}u[f]=y}for(var b=new Array(u.length),f=0;f<b.length;++f)b[f]=t.resolve(u[f]).reflect();var w=t.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return g.e=n.error(),g;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}x._pushContext(),o=m(o);var r=s?o.apply(void 0,t):o(t),i=x._popContext();return a.checkForgottenReturns(r,i,"Promise.using",x),r}),x=w.lastly(function(){var e=new t.PromiseInspection(w);return c(u,e)});return u.promise=x,x._setOnCancel(u),x},t.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,o());throw new y}}},function(t,e,n){"use strict";t.exports=function(t,e,r){function o(t){this.handle=t}function i(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=n(6),u=t.TimeoutError;o.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=t.delay=function(n,i){var a,s;return void 0!==i?(a=t.resolve(i)._then(c,null,null,n,void 0),r.cancellation()&&i instanceof t&&a._setOnCancel(i)):(a=new t(e),s=setTimeout(function(){a._fulfill()},+n),r.cancellation()&&a._setOnCancel(new o(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};t.prototype.delay=function(t){return l(t,this)};var f=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(t,e){t=+t;var n,s,u=new o(setTimeout(function(){n.isPending()&&f(n,e,s)},t));return r.cancellation()?(s=this.then(),n=s._then(i,a,void 0,u,void 0),n._setOnCancel(u)):n=this._then(i,a,void 0,u,void 0),n}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o,i,a){function s(e,n,r){for(var i=0;i<n.length;++i){r._pushContext();var a=p(n[i])(e);if(r._popContext(),a===h){r._pushContext();var s=t.reject(h.e);return r._popContext(),s}var u=o(a,r);if(u instanceof t)return u}return null}function u(e,n,o,i){if(a.cancellation()){var s=new t(r),u=this._finallyPromise=new t(r);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{var c=this._promise=new t(r);c._captureStackTrace()}this._stack=i,this._generatorFunction=e,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}var c=n(13),l=c.TypeError,f=n(6),h=f.errorObj,p=f.tryCatch,d=[];f.inherits(u,i),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var e,n="undefined"!=typeof this._generator.return;if(n)this._promise._pushContext(),e=p(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=p(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=p(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=p(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(e){var n=this._promise;if(e===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(e.e,!1);var r=e.value;if(e.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var i=o(r,this._promise);if(!(i instanceof t)&&(i=s(i,this._yieldHandlers,this._promise),null===i))return void this._promiseRejected(new l("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")));i=i._target();var a=i._bitField;0===(50397184&a)?(this._yieldedPromise=i,i._proxy(this,null)):0!==(33554432&a)?t._async.invoke(this._promiseFulfilled,this,i._value()):0!==(16777216&a)?t._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()},t.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=u,o=(new Error).stack;return function(){var e=t.apply(this,arguments),i=new r(void 0,void 0,n,o),a=i.promise();return i._generator=e,i._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));d.push(t)},t.spawn=function(n){if(a.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 u(n,this),o=r.promise();return r._run(t.spawn),o}}},function(t,e,n){"use strict";t.exports=function(t){function e(t,e){var n=this;if(!i.isArray(t))return r.call(n,t,e);var o=s(e).apply(n._boundValue(),[null].concat(t));o===u&&a.throwLater(o.e)}function r(t,e){var n=this,r=n._boundValue(),o=void 0===t?s(e).call(r,null):s(e).call(r,null,t);o===u&&a.throwLater(o.e)}function o(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var o=s(e).call(n._boundValue(),t);o===u&&a.throwLater(o.e)}var i=n(6),a=t._async,s=i.tryCatch,u=i.errorObj;t.prototype.asCallback=t.prototype.nodeify=function(t,n){if("function"==typeof t){var i=r;void 0!==n&&Object(n).spread&&(i=e),this._then(i,o,void 0,this,t)}return this}}},function(t,e,n){"use strict";t.exports=function(t,e){function r(t){return!x.test(t)}function o(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function i(t,e,n){var r=p.getDataPropertyOrDefault(t,e+n,b);return!!r&&o(r)}function a(t,e,n){for(var r=0;r<t.length;r+=2){var o=t[r];if(n.test(o))for(var i=o.replace(n,""),a=0;a<t.length;a+=2)if(t[a]===i)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function s(t,e,n,r){for(var s=p.inheritedDataKeys(t),u=[],c=0;c<s.length;++c){var l=s[c],f=t[l],h=r===E||E(l,f,t);"function"!=typeof f||o(f)||i(t,l,e)||!r(l,f,t,h)||u.push(l,f)}return a(u,e,n),u}function u(n,r,o,i,a,s){function u(){var o=r;r===h&&(o=this);var i=new t(e);i._captureStackTrace();var a="string"==typeof l&&this!==c?this[l]:n,u=d(i,s);try{a.apply(o,y(arguments,u))}catch(t){i._rejectCallback(v(t),!0,!0)}return i._isFateSealed()||i._setAsyncGuaranteed(),i}var c=function(){return this}(),l=n;return"string"==typeof l&&(n=i),p.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,n,r,o){for(var i=new RegExp(j(e)+"$"),a=s(t,e,i,n),u=0,c=a.length;u<c;u+=2){var l=a[u],f=a[u+1],d=l+e;if(r===S)t[d]=S(l,h,l,f,e,o);else{var y=r(f,function(){return S(l,h,l,f,e,o)});p.notEnumerableProp(y,"__isPromisified__",!0),t[d]=y}}return p.toFastProperties(t),t}function l(t,e,n){return S(t,e,void 0,t,null,n)}var f,h={},p=n(6),d=n(20),y=p.withAppended,v=p.maybeWrapAsError,g=p.canEvaluate,m=n(13).TypeError,_="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],x=new RegExp("^(?:"+w.join("|")+")$"),E=function(t){return p.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},j=function(t){return t.replace(/([$])/,"\\$")},T=function(t){for(var e=[t],n=Math.max(0,t-1-3),r=t-1;r>=n;--r)e.push(r);for(var r=t+1;r<=3;++r)e.push(r);return e},O=function(t){return p.filledRange(t,"_arg","")},A=function(t){return p.filledRange(Math.max(t,3),"_arg","")},k=function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0};f=function(n,r,o,i,a,s){function u(t){var e,n=O(t).join(", "),o=t>0?", ":"";return e=g?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===r?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",e.replace("{{args}}",n).replace(", ",o)}function c(){for(var t="",e=0;e<f.length;++e)t+="case "+f[e]+":"+u(f[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]",g?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}var l=Math.max(0,k(i)-1),f=T(l),g="string"==typeof n||r===h,m="string"==typeof n?"this != null ? this['"+n+"'] : 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, "+s+"); \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]",c()).replace("[GetFunctionCode]",m);return _=_.replace("Parameters",A(l)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",_)(t,i,r,y,v,d,p.tryCatch,p.errorObj,p.notEnumerableProp,e);
|
|
4
|
-
};var S=g?f:u;t.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+p.classString(t));if(o(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,i=!!e.multiArgs,a=l(t,n,i);return p.copyDescriptors(t,a,r),a},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=_);var o=e.filter;"function"!=typeof o&&(o=E);var i=e.promisifier;if("function"!=typeof i&&(i=S),!p.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=p.inheritedDataKeys(t),s=0;s<a.length;++s){var u=t[a[s]];"constructor"!==a[s]&&p.isClass(u)&&(c(u.prototype,r,o,i,n),c(u,r,o,i,n))}return c(t,r,o,i,n)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o){function i(t){var e,n=!1;if(void 0!==s&&t instanceof s)e=f(t),n=!0;else{var r=l.keys(t),o=r.length;e=new Array(2*o);for(var i=0;i<o;++i){var a=r[i];e[i]=t[a],e[i+o]=a}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function a(e){var n,a=r(e);return c(a)?(n=a instanceof t?a._then(t.props,void 0,void 0,void 0,void 0):new i(a).promise(),a instanceof t&&n._propagateFrom(a,2),n):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,u=n(6),c=u.isObject,l=n(7);"function"==typeof Map&&(s=Map);var f=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var o=new Array(2*r.size);return r.forEach(t,o),o}}(),h=function(t){for(var e=new s,n=t.length/2|0,r=0;r<n;++r){var o=t[n+r],i=t[r];e.set(o,i)}return e};u.inherits(i,e),i.prototype._init=function(){},i.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var o=this.length(),i=0,a=this.length();i<a;++i)r[this._values[i+o]]=this._values[i]}return this._resolve(r),!0}return!1},i.prototype.shouldCopyValues=function(){return!1},i.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return a(this)},t.props=function(t){return a(t)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o){function i(n,i){var u=r(n);if(u instanceof t)return s(u);if(n=a.asArray(n),null===n)return o("expecting an array or an iterable object but got "+a.classString(n));var c=new t(e);void 0!==i&&c._propagateFrom(i,3);for(var l=c._fulfill,f=c._reject,h=0,p=n.length;h<p;++h){var d=n[h];(void 0!==d||h in n)&&t.cast(d)._then(l,f,void 0,c,null)}return c}var a=n(6),s=function(t){return t.then(function(e){return i(e,t)})};t.race=function(t){return i(t,void 0)},t.prototype.race=function(){return i(this,void 0)}}},function(t,e,n){"use strict";t.exports=function(t,e,r,o,i,a){function s(e,n,r,o){this.constructor$(e);var a=h();this._fn=null===a?n:p.domainBind(a,n),void 0!==r&&(r=t.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,o===i?this._eachValues=Array(this._length):0===o?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,n,o){if("function"!=typeof e)return r("expecting a function but got "+p.classString(e));var i=new s(t,e,n,o);return i.promise()}function l(e){this.accum=e,this.array._gotAccum(e);var n=o(this.value,this.array._promise);return n instanceof t?(this.array._currentCancellable=n,n._then(f,void 0,void 0,this,void 0)):f.call(this,n)}function f(e){var n=this.array,r=n._promise,o=d(n._fn);r._pushContext();var i;i=void 0!==n._eachValues?o.call(r._boundValue(),e,this.index,this.length):o.call(r._boundValue(),this.accum,e,this.index,this.length),i instanceof t&&(n._currentCancellable=i);var s=r._popContext();return a.checkForgottenReturns(i,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),i}var h=t._getDomain,p=n(6),d=p.tryCatch;p.inherits(s,e),s.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==i&&this._eachValues.push(t)},s.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},s.prototype._resultCancelled=function(e){return e===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel()))},s.prototype._iterate=function(e){this._values=e;var n,r,o=e.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=t.resolve(e[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;r<o;++r){var i={accum:null,value:e[r],index:r,length:o,array:this};n=n._then(l,void 0,void 0,i,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(u,u,void 0,n,this)},t.prototype.reduce=function(t,e){return c(this,t,e,null)},t.reduce=function(t,e,n,r){return c(t,e,n,r)}}},function(t,e,n){"use strict";t.exports=function(t,e,r){function o(t){this.constructor$(t)}var i=t.PromiseInspection,a=n(6);a.inherits(o,e),o.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=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.prototype.settle=function(){return t.settle(this)}}},function(t,e,n){"use strict";t.exports=function(t,e,r){function o(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function i(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 o(t),i=n.promise();return n.setHowMany(e),n.init(),i}var a=n(6),s=n(13).RangeError,u=n(13).AggregateError,c=a.isArray,l={};a.inherits(o,e),o.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},o.prototype.init=function(){this._initialized=!0,this._init()},o.prototype.setUnwrap=function(){this._unwrap=!0},o.prototype.howMany=function(){return this._howMany},o.prototype.setHowMany=function(t){this._howMany=t},o.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)},o.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},o.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},o.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},o.prototype._fulfilled=function(){return this._totalResolved},o.prototype._rejected=function(){return this._values.length-this.length()},o.prototype._addRejected=function(t){this._values.push(t)},o.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},o.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},o.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},o.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return i(t,e)},t.prototype.some=function(t){return i(this,t)},t._SomePromiseArray=o}},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,o){return n(t,r,o,e)}}},function(t,e){"use strict";t.exports=function(t,e){function n(){return i(this)}function r(t,n){return o(t,n,e,e)}var o=t.reduce,i=t.all;t.prototype.each=function(t){return o(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return o(this,t,e,e)},t.each=function(t,r){return o(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},function(t,e){"use strict";t.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},function(t,e,n){function r(t){return o(t,i|a)}var o=n(43),i=1,a=4;t.exports=r},function(t,e,n){function r(t,e,n,S,C,P){var R,M=e&T,N=e&O,L=e&A;if(n&&(R=C?n(t,S,C,P):n(t)),void 0!==R)return R;if(!x(t))return t;var B=_(t);if(B){if(R=v(t),!M)return l(t,R)}else{var q=y(t),U=q==F||q==I;if(b(t))return c(t,M);if(q==D||q==k||U&&!C){if(R=N||U?{}:m(t),!M)return N?h(t,u(R,t)):f(t,s(R,t))}else{if(!tt[q])return C?t:{};R=g(t,q,M)}}P||(P=new o);var V=P.get(t);if(V)return V;if(P.set(t,R),E(t))return t.forEach(function(o){R.add(r(o,e,n,o,t,P))}),R;if(w(t))return t.forEach(function(o,i){R.set(i,r(o,e,n,i,t,P))}),R;var H=L?N?d:p:N?keysIn:j,W=B?void 0:H(t);return i(W||t,function(o,i){W&&(i=o,o=t[i]),a(R,i,r(o,e,n,i,t,P))}),R}var o=n(44),i=n(88),a=n(89),s=n(92),u=n(115),c=n(119),l=n(120),f=n(121),h=n(125),p=n(129),d=n(131),y=n(132),v=n(137),g=n(138),m=n(145),_=n(100),b=n(101),w=n(147),x=n(68),E=n(149),j=n(94),T=1,O=2,A=4,k="[object Arguments]",S="[object Array]",C="[object Boolean]",P="[object Date]",R="[object Error]",F="[object Function]",I="[object GeneratorFunction]",M="[object Map]",N="[object Number]",D="[object Object]",L="[object RegExp]",B="[object Set]",q="[object String]",U="[object Symbol]",V="[object WeakMap]",H="[object ArrayBuffer]",W="[object DataView]",z="[object Float32Array]",G="[object Float64Array]",Y="[object Int8Array]",X="[object Int16Array]",J="[object Int32Array]",$="[object Uint8Array]",K="[object Uint8ClampedArray]",Z="[object Uint16Array]",Q="[object Uint32Array]",tt={};tt[k]=tt[S]=tt[H]=tt[W]=tt[C]=tt[P]=tt[z]=tt[G]=tt[Y]=tt[X]=tt[J]=tt[M]=tt[N]=tt[D]=tt[L]=tt[B]=tt[q]=tt[U]=tt[$]=tt[K]=tt[Z]=tt[Q]=!0,tt[R]=tt[F]=tt[V]=!1,t.exports=r},function(t,e,n){function r(t){var e=this.__data__=new o(t);this.size=e.size}var o=n(45),i=n(53),a=n(54),s=n(55),u=n(56),c=n(57);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){function r(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])}}var o=n(46),i=n(47),a=n(50),s=n(51),u=n(52);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=s,r.prototype.set=u,t.exports=r},function(t,e){function n(){this.__data__=[],this.size=0}t.exports=n},function(t,e,n){function r(t){var e=this.__data__,n=o(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():a.call(e,n,1),--this.size,!0}var o=n(48),i=Array.prototype,a=i.splice;t.exports=r},function(t,e,n){function r(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}var o=n(49);t.exports=r},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){function r(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}var o=n(48);t.exports=r},function(t,e,n){function r(t){return o(this.__data__,t)>-1}var o=n(48);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var o=n(48);t.exports=r},function(t,e,n){function r(){this.__data__=new o,this.size=0}var o=n(45);t.exports=r},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length<s-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(r)}return n.set(t,e),this.size=n.size,this}var o=n(45),i=n(58),a=n(73),s=200;t.exports=r},function(t,e,n){var r=n(59),o=n(64),i=r(o,"Map");t.exports=i},function(t,e,n){function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(60),i=n(72);t.exports=r},function(t,e,n){function r(t){if(!a(t)||i(t))return!1;var e=o(t)?d:c;return e.test(s(t))}var o=n(61),i=n(69),a=n(68),s=n(71),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,h=l.toString,p=f.hasOwnProperty,d=RegExp("^"+h.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){function r(t){if(!i(t))return!1;var e=o(t);return e==s||e==u||e==a||e==c}var o=n(62),i=n(68),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=r},function(t,e,n){function r(t){return null==t?void 0===t?u:s:c&&c in Object(t)?i(t):a(t)}var o=n(63),i=n(66),a=n(67),s="[object Null]",u="[object Undefined]",c=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){var r=n(64),o=r.Symbol;t.exports=o},function(t,e,n){var r=n(65),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},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){function r(t){var e=a.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[u]=n:delete t[u]),o}var o=n(63),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,u=o?o.toStringTag:void 0;t.exports=r},function(t,e){function n(t){return o.call(t)}var r=Object.prototype,o=r.toString;t.exports=n},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t){return!!i&&i in t}var o=n(70),i=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,e,n){var r=n(64),o=r["__core-js_shared__"];t.exports=o},function(t,e){function n(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var r=Function.prototype,o=r.toString;t.exports=n},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e,n){function r(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])}}var o=n(74),i=n(82),a=n(85),s=n(86),u=n(87);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=s,r.prototype.set=u,t.exports=r},function(t,e,n){function r(){this.size=0,this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(75),i=n(45),a=n(58);t.exports=r},function(t,e,n){function r(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])}}var o=n(76),i=n(78),a=n(79),s=n(80),u=n(81);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=s,r.prototype.set=u,t.exports=r},function(t,e,n){function r(){this.__data__=o?o(null):{},this.size=0}var o=n(77);t.exports=r},function(t,e,n){var r=n(59),o=r(Object,"create");t.exports=o},function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},function(t,e,n){function r(t){var e=this.__data__;if(o){var n=e[t];return n===i?void 0:n}return s.call(e,t)?e[t]:void 0}var o=n(77),i="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){var e=this.__data__;return o?void 0!==e[t]:a.call(e,t)}var o=n(77),i=Object.prototype,a=i.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?i:e,this}var o=n(77),i="__lodash_hash_undefined__";t.exports=r},function(t,e,n){function r(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}var o=n(83);t.exports=r},function(t,e,n){function r(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}var o=n(84);t.exports=r},function(t,e){function n(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=n},function(t,e,n){function r(t){return o(this,t).get(t)}var o=n(83);t.exports=r},function(t,e,n){function r(t){return o(this,t).has(t)}var o=n(83);t.exports=r},function(t,e,n){function r(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var o=n(83);t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}t.exports=n},function(t,e,n){function r(t,e,n){var r=t[e];s.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||o(t,e,n)}var o=n(90),i=n(49),a=Object.prototype,s=a.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e,n){"__proto__"==e&&o?o(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var o=n(91);t.exports=r},function(t,e,n){var r=n(59),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){function r(t,e){return t&&o(e,i(e),t)}var o=n(93),i=n(94);t.exports=r},function(t,e,n){function r(t,e,n,r){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=r?r(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):o(n,c,l)}return n}var o=n(89),i=n(90);t.exports=r},function(t,e,n){function r(t){return a(t)?o(t):i(t)}var o=n(95),i=n(110),a=n(114);t.exports=r},function(t,e,n){function r(t,e){var n=a(t),r=!n&&i(t),l=!n&&!r&&s(t),h=!n&&!r&&!l&&c(t),p=n||r||l||h,d=p?o(t.length,String):[],y=d.length;for(var v in t)!e&&!f.call(t,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,y))||d.push(v);return d}var o=n(96),i=n(97),a=n(100),s=n(101),u=n(104),c=n(105),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}t.exports=n},function(t,e,n){var r=n(98),o=n(99),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){function r(t){return i(t)&&o(t)==a}var o=n(62),i=n(99),a="[object Arguments]";t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){(function(t){var r=n(64),o=n(103),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||o;t.exports=l}).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){function n(){return!1}t.exports=n},function(t,e){function n(t,e){var n=typeof t;return e=null==e?r:e,!!e&&("number"==n||"symbol"!=n&&o.test(t))&&t>-1&&t%1==0&&t<e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){var r=n(106),o=n(108),i=n(109),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},function(t,e,n){function r(t){return a(t)&&i(t.length)&&!!P[o(t)]}var o=n(62),i=n(107),a=n(99),s="[object Arguments]",u="[object Array]",c="[object Boolean]",l="[object Date]",f="[object Error]",h="[object Function]",p="[object Map]",d="[object Number]",y="[object Object]",v="[object RegExp]",g="[object Set]",m="[object String]",_="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",E="[object Float64Array]",j="[object Int8Array]",T="[object Int16Array]",O="[object Int32Array]",A="[object Uint8Array]",k="[object Uint8ClampedArray]",S="[object Uint16Array]",C="[object Uint32Array]",P={};P[x]=P[E]=P[j]=P[T]=P[O]=P[A]=P[k]=P[S]=P[C]=!0,P[s]=P[u]=P[b]=P[c]=P[w]=P[l]=P[f]=P[h]=P[p]=P[d]=P[y]=P[v]=P[g]=P[m]=P[_]=!1,t.exports=r},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){(function(t){var r=n(65),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t?t:s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u}).call(e,n(102)(t))},function(t,e,n){function r(t){if(!o(t))return i(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}var o=n(111),i=n(112),a=Object.prototype,s=a.hasOwnProperty;t.exports=r},function(t,e){function n(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||r;return t===n}var r=Object.prototype;t.exports=n},function(t,e,n){var r=n(113),o=r(Object.keys,Object);t.exports=o},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e,n){function r(t){return null!=t&&i(t.length)&&!o(t)}var o=n(61),i=n(107);t.exports=r},function(t,e,n){function r(t,e){return t&&o(e,i(e),t)}var o=n(93),i=n(116);t.exports=r},function(t,e,n){function r(t){return a(t)?o(t,!0):i(t)}var o=n(95),i=n(117),a=n(114);t.exports=r},function(t,e,n){function r(t){if(!o(t))return a(t);var e=i(t),n=[];for(var r in t)("constructor"!=r||!e&&u.call(t,r))&&n.push(r);return n}var o=n(68),i=n(111),a=n(118),s=Object.prototype,u=s.hasOwnProperty;t.exports=r},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){function r(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}var o=n(64),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?o.Buffer:void 0,c=u?u.allocUnsafe:void 0;t.exports=r}).call(e,n(102)(t))},function(t,e){function n(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}t.exports=n},function(t,e,n){function r(t,e){return o(t,i(t),e)}var o=n(93),i=n(122);t.exports=r},function(t,e,n){var r=n(123),o=n(124),i=Object.prototype,a=i.propertyIsEnumerable,s=Object.getOwnPropertySymbols,u=s?function(t){return null==t?[]:(t=Object(t),r(s(t),function(e){return a.call(t,e)}))}:o;t.exports=u},function(t,e){function n(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}t.exports=n},function(t,e){function n(){return[]}t.exports=n},function(t,e,n){function r(t,e){return o(t,i(t),e)}var o=n(93),i=n(126);t.exports=r},function(t,e,n){var r=n(127),o=n(128),i=n(122),a=n(124),s=Object.getOwnPropertySymbols,u=s?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:a;t.exports=u},function(t,e){function n(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}t.exports=n},function(t,e,n){var r=n(113),o=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e,n){function r(t){return o(t,a,i)}var o=n(130),i=n(122),a=n(94);t.exports=r},function(t,e,n){function r(t,e,n){var r=e(t);return i(t)?r:o(r,n(t))}var o=n(127),i=n(100);t.exports=r},function(t,e,n){function r(t){return o(t,a,i)}var o=n(130),i=n(126),a=n(116);t.exports=r},function(t,e,n){var r=n(133),o=n(58),i=n(134),a=n(135),s=n(136),u=n(62),c=n(71),l="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",d="[object WeakMap]",y="[object DataView]",v=c(r),g=c(o),m=c(i),_=c(a),b=c(s),w=u;(r&&w(new r(new ArrayBuffer(1)))!=y||o&&w(new o)!=l||i&&w(i.resolve())!=h||a&&w(new a)!=p||s&&w(new s)!=d)&&(w=function(t){var e=u(t),n=e==f?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return y;case g:return l;case m:return h;case _:return p;case b:return d}return e}),t.exports=w},function(t,e,n){var r=n(59),o=n(64),i=r(o,"DataView");t.exports=i},function(t,e,n){var r=n(59),o=n(64),i=r(o,"Promise");t.exports=i},function(t,e,n){var r=n(59),o=n(64),i=r(o,"Set");t.exports=i},function(t,e,n){var r=n(59),o=n(64),i=r(o,"WeakMap");t.exports=i},function(t,e){function n(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&o.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var r=Object.prototype,o=r.hasOwnProperty;t.exports=n},function(t,e,n){function r(t,e,n){var r=t.constructor;switch(e){case g:return o(t);case c:case l:return new r(+t);case m:return i(t,n);case _:case b:case w:case x:case E:case j:case T:case O:case A:return u(t,n);case f:return new r;case h:case y:return new r(t);case p:return a(t);case d:return new r;case v:return s(t)}}var o=n(139),i=n(141),a=n(142),s=n(143),u=n(144),c="[object Boolean]",l="[object Date]",f="[object Map]",h="[object Number]",p="[object RegExp]",d="[object Set]",y="[object String]",v="[object Symbol]",g="[object ArrayBuffer]",m="[object DataView]",_="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",E="[object Int32Array]",j="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",A="[object Uint32Array]";t.exports=r},function(t,e,n){function r(t){var e=new t.constructor(t.byteLength);return new o(e).set(new o(t)),e}var o=n(140);t.exports=r},function(t,e,n){var r=n(64),o=r.Uint8Array;t.exports=o},function(t,e,n){function r(t,e){var n=e?o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var o=n(139);t.exports=r},function(t,e){function n(t){var e=new t.constructor(t.source,r.exec(t));return e.lastIndex=t.lastIndex,e}var r=/\w*$/;t.exports=n},function(t,e,n){function r(t){return a?Object(a.call(t)):{}}var o=n(63),i=o?o.prototype:void 0,a=i?i.valueOf:void 0;t.exports=r},function(t,e,n){function r(t,e){var n=e?o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var o=n(139);t.exports=r},function(t,e,n){function r(t){return"function"!=typeof t.constructor||a(t)?{}:o(i(t))}var o=n(146),i=n(128),a=n(111);t.exports=r},function(t,e,n){var r=n(68),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){var r=n(148),o=n(108),i=n(109),a=i&&i.isMap,s=a?o(a):r;t.exports=s},function(t,e,n){function r(t){return i(t)&&o(t)==a}var o=n(132),i=n(99),a="[object Map]";t.exports=r},function(t,e,n){var r=n(150),o=n(108),i=n(109),a=i&&i.isSet,s=a?o(a):r;t.exports=s},function(t,e,n){function r(t){return i(t)&&o(t)==a}var o=n(132),i=n(99),a="[object Set]";t.exports=r},function(t,e,n){var r=n(152),o=n(49),i=n(160),a=n(116),s=Object.prototype,u=s.hasOwnProperty,c=r(function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&i(e[0],e[1],c)&&(r=1);++n<r;)for(var l=e[n],f=a(l),h=-1,p=f.length;++h<p;){var d=f[h],y=t[d];(void 0===y||o(y,s[d])&&!u.call(t,d))&&(t[d]=l[d])}return t});t.exports=c},function(t,e,n){function r(t,e){return a(i(t,e,o),t+"")}var o=n(153),i=n(154),a=n(156);t.exports=r},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){function r(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var r=arguments,a=-1,s=i(r.length-e,0),u=Array(s);++a<s;)u[a]=r[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=r[a];return c[e]=n(u),o(t,this,c)}}var o=n(155),i=Math.max;t.exports=r},function(t,e){function n(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)}t.exports=n},function(t,e,n){var r=n(157),o=n(159),i=o(r);t.exports=i},function(t,e,n){var r=n(158),o=n(91),i=n(153),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},function(t,e){function n(t){return function(){return t}}t.exports=n},function(t,e){function n(t){var e=0,n=0;return function(){var a=i(),s=o-(a-n);if(n=a,s>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var r=800,o=16,i=Date.now;t.exports=n},function(t,e,n){function r(t,e,n){if(!s(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&a(e,n.length):"string"==r&&e in n)&&o(n[e],t)}var o=n(49),i=n(114),a=n(104),s=n(68);t.exports=r},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 o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function i(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof r&&"env"in r&&(t=r.env.DEBUG),t}function c(){try{return window.localStorage}catch(t){}}e=t.exports=n(163),e.log=a,e.formatArgs=i,e.save=s,e.load=u,e.useColors=o,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,n(5))},function(t,e,n){function r(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]}function o(t){function n(){if(n.enabled){var t=n,r=+new Date,o=r-(c||r);t.diff=o,t.prev=c,t.curr=r,c=r;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=e.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var s=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;s++;var o=e.formatters[r];if("function"==typeof o){var a=i[s];n=o.call(t,a),i.splice(s,1),s--}return n}),e.formatArgs.call(t,i);var u=n.log||e.log||console.log.bind(console);u.apply(t,i)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=r(t),"function"==typeof e.init&&e.init(n),n}function i(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&(t=n[o].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function a(){e.enable("")}function s(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}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o.debug=o.default=o,e.coerce=u,e.disable=a,e.enable=i,e.enabled=s,e.humanize=n(164),e.names=[],e.skips=[],e.formatters={};var c},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":
|
|
5
|
-
case"yr":case"y":return n*l;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=c?Math.round(t/c)+"d":t>=u?Math.round(t/u)+"h":t>=s?Math.round(t/s)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function o(t){return i(t,c,"day")||i(t,u,"hour")||i(t,s,"minute")||i(t,a,"second")||t+" ms"}function i(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var a=1e3,s=60*a,u=60*s,c=24*u,l=365.25*c;t.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return n(t);if("number"===i&&isNaN(t)===!1)return e.long?o(t):r(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(166);t.exports=function(){var t=r,e=function(e){return t[e]},n=function(e,n){t[e]=n};return{get:e,set:n}}()},function(t,e){t.exports={websocket:"",address_prefix:"VIZ",chain_id:"2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd",broadcast_transaction_with_callback:!1}},function(t,e){"use strict";t.exports=[{api:"witness_api",method:"get_miner_queue"},{api:"witness_api",method:"get_witness_schedule"},{api:"witness_api",method:"get_witnesses",params:["witnessIds"]},{api:"witness_api",method:"get_witness_by_account",params:["accountName"]},{api:"witness_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"witness_api",method:"get_witnesses_by_counted_vote",params:["from","limit"]},{api:"witness_api",method:"get_witness_count"},{api:"witness_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"witness_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_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_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_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"]}]},function(t,e){"use strict";function n(t){return t.replace(o,function(t,e){return e.toUpperCase()})}function r(t){var e=void 0,n=void 0,r=void 0,o=void 0;if(o="Account name should ",!t)return o+"not be empty.";var i=t.length;if(i<2)return o+"be longer.";if(i>25)return o+"be shorter.";/\./.test(t)&&(o="Each account segment should ");var a=t.split(".");for(e=0,r=a.length;e<r;e++){if(n=a[e],!/^[a-z]/.test(n))return o+"start with a letter.";if(!/^[a-z0-9-]*$/.test(n))return o+"have only letters, digits, or dashes.";if(/--/.test(n))return o+"have only one dash in a row.";if(!/[a-z0-9]$/.test(n))return o+"end with a letter or digit.";if(!(n.length>=2))return o+"be longer"}return null}Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=n,e.validateAccountName=r;var o=/_([a-z])/g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(170),i=r(o),a=n(173),s=r(a);e.default={http:i.default,ws:s.default}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n=e.method,r=e.id,o=e.params,i={id:r,jsonrpc:"2.0",method:n,params:o};return(0,l.default)(t,{body:JSON.stringify(i),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 m(t.error);return t.result})}Object.defineProperty(e,"__esModule",{value:!0});var u=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=s;var c=n(171),l=r(c),f=n(162),h=r(f),p=n(172),d=r(p),y=n(165),v=r(y),g=(0,h.default)("steem:http"),m=function(t){function e(t){o(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return n.name="RPCError",n.code=t.code,n.data=t.data,n}return a(e,t),e}(Error),_=function(t){function e(){return o(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"send",value:function(t,e,n){g("Steem::send",t,e);var r=e.id||this.id++,o=[t,e.method,e.params],i=v.default.get("websocket");s(i,{method:"call",id:r,params:o}).then(function(t){n(null,t)},function(t){n(t)})}}]),e}(d.default);e.default=_},function(t,e){var n=function(t){function e(){this.fetch=!1}return e.prototype=t,new e}("undefined"!=typeof self?self:this);!function(t){(function(e){function n(t){return t&&DataView.prototype.isPrototypeOf(t)}function r(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function i(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return b.iterable&&(e[Symbol.iterator]=function(){return e}),e}function a(t){this.map={},t instanceof a?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function s(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function u(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function c(t){var e=new FileReader,n=u(e);return e.readAsArrayBuffer(t),n}function l(t){var e=new FileReader,n=u(e);return e.readAsText(t),n}function f(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("")}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:b.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:b.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:b.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():b.arrayBuffer&&b.blob&&n(t)?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):b.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||x(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):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):b.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},b.blob&&(this.blob=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?s(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t=s(this);if(t)return t;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(f(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},b.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(t){var e=t.toUpperCase();return E.indexOf(e)>-1?e:t}function y(t,e){e=e||{};var n=e.body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new a(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 a(e.headers)),this.method=d(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function v(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function g(t){var e=new a,n=t.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e}function m(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new a(e.headers),this.url=e.url||"",this._initBody(t)}function _(t,n){return new Promise(function(r,o){function i(){s.abort()}var a=new y(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;r(new m(e,t))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&b.blob&&(s.responseType="blob"),a.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),a.signal&&(a.signal.addEventListener("abort",i),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",i)}),s.send("undefined"==typeof a._bodyInit?null:a._bodyInit)})}var b={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(b.arrayBuffer)var w=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],x=ArrayBuffer.isView||function(t){return t&&w.indexOf(Object.prototype.toString.call(t))>-1};a.prototype.append=function(t,e){t=r(t),e=o(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},a.prototype.delete=function(t){delete this.map[r(t)]},a.prototype.get=function(t){return t=r(t),this.has(t)?this.map[t]:null},a.prototype.has=function(t){return this.map.hasOwnProperty(r(t))},a.prototype.set=function(t,e){this.map[r(t)]=o(e)},a.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},a.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),i(t)},a.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),i(t)},a.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),i(t)},b.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},p.call(y.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t};var j=[301,302,303,307,308];m.redirect=function(t,e){if(j.indexOf(e)===-1)throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=t.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}return _.polyfill=!0,t.fetch||(t.fetch=_,t.Headers=a,t.Request=y,t.Response=m),e.Headers=a,e.Request=y,e.Response=m,e.fetch=_,e})({})}(n),delete n.fetch.polyfill,t.exports=e=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,e.default=n.fetch},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=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}}(),u=n(3),c=r(u),l=n(2),f=r(l),h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.options=t,n.id=0,n}return a(e,t),s(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}(f.default);e.default=h,c.default.promisifyAll(h.prototype)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=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}}(),u=n(3),c=r(u),l=n(161),f=r(l),h=n(162),p=r(h),d=n(165),y=r(d),v=n(172),g=r(v),m=void 0;if(f.default)m=n(174);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");m=window.WebSocket}var _=(0,p.default)("steem:ws"),b=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e);var n=i(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 a(e,t),s(e,[{key:"start",value:function(){var t=this;return this.startPromise?this.startPromise:(this.startPromise=new c.default(function(e,n){t.ws=new m(y.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(){_("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 _("Steem::send",t,e),this.start().then(function(){var o={};new c.default(function(t,e){o.resolve=function(e){t(e),n(null,e)},o.reject=function(t){e(t),n(t)}});var i={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(i.message.id,i),r.ws.send(JSON.stringify(i.message)),o})}},{key:"onError",value:function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=this._requests[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;a.deferral.reject(t)}}catch(t){n=!0,r=t}finally{try{!e&&i.return&&i.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 o,i=this._requests[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;a.deferral.reject(t)}}catch(t){n=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(n)throw r}}this._requests.clear()}},{key:"onMessage",value:function(t){var e=JSON.parse(t.data);if(_("-- Steem.onMessage -->",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 o=new Error((r.message||"Failed to complete operation")+" (see err.payload for the full error payload)");o.payload=e,n.deferral.reject(o)}else this.emit("track-performance",n.message.method,Date.now()-n.startedAt),n.deferral.resolve(e.result)}}]),e}(g.default);e.default=b},function(t,e){},,function(t,e,n){(function(t){"use strict";function r(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=a.prototype):(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(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 s(this,t,e,n)}function s(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?p(t,e,n,r):"string"==typeof e?f(t,e,n):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,n,r){return u(e),e<=0?i(t,e):void 0!==n?"string"==typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function l(t,e){if(u(e),t=i(t,e<0?0:0|y(e)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(e,n);t=i(t,r);var o=t.write(e,n);return o!==r&&(t=t.slice(0,o)),t}function h(t,e){var n=e.length<0?0:0|y(e.length);t=i(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(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");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),a.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=a.prototype):t=h(t,e),t}function d(t,e){if(a.isBuffer(e)){var n=0|y(e.length);return t=i(t,n),0===t.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||$(e.length)?i(t,0):h(t,e);if("Buffer"===e.type&&Q(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function v(t){return+t!=t&&(t=0),a.alloc(+t)}function g(t,e){if(a.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 z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(r)return z(t).length;e=(""+e).toLowerCase(),r=!0}}function m(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,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return F(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return R(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){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=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:w(t,e,n,r,o);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):w(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,n,r,o){function i(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(o){var l=-1;for(c=n;c<s;c++)if(i(t,c)===i(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var f=!0,h=0;h<u;h++)if(i(t,c+h)!==i(e,h)){f=!1;break}if(f)return c}return-1}function x(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function E(t,e,n,r){return J(z(e,t.length-n),t,n,r)}function j(t,e,n,r){return J(G(e),t,n,r)}function T(t,e,n,r){return j(t,e,n,r)}function O(t,e,n,r){return J(X(e),t,n,r)}function A(t,e,n,r){return J(Y(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i=t[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,c,l,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=t[o+1],128===(192&u)&&(f=(31&i)<<6|63&u,f>127&&(a=f));break;case 3:u=t[o+1],c=t[o+2],128===(192&u)&&128===(192&c)&&(f=(15&i)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=t[o+1],c=t[o+2],l=t[o+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&i)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return C(r)}function C(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=tt));return n}function P(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function R(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function F(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=W(t[i]);return o}function I(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function M(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 N(t,e,n,r,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function D(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function B(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function q(t,e,n,r,o){return o||B(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,o){return o||B(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,n,r,52,8),n+8}function V(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";
|
|
6
|
-
return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function W(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Y(t,e){for(var n,r,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function X(t){return K.toByteArray(V(t))}function J(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function $(t){return t!==t}var K=n(177),Z=n(178),Q=n(179);e.Buffer=a,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),e.kMaxLength=o(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,n){return s(null,t,e,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,n){return c(null,t,e,n)},a.allocUnsafe=function(t){return l(null,t)},a.allocUnsafeSlow=function(t){return l(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},a.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}},a.concat=function(t,e){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var i=t[n];if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},a.byteLength=g,a.prototype._isBuffer=!0,a.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)_(this,e,e+1);return this},a.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)_(this,e,e+3),_(this,e+1,e+2);return this},a.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)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):m.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.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+">"},a.prototype.compare=function(t,e,n,r,o){if(!a.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===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===t)return 0;for(var i=o-r,s=n-e,u=Math.min(i,s),c=this.slice(r,o),l=t.slice(e,n),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1},a.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},a.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},a.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 o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return x(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":return j(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=a.prototype;else{var o=e-t;r=new a(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},a.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},a.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},a.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},a.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),Z.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),Z.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),Z.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),Z.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var o=Math.pow(2,8*n)-1;N(this,t,e,n,o,0)}var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},a.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var o=Math.pow(2,8*n)-1;N(this,t,e,n,o,0)}var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},a.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);N(this,t,e,n,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<n&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},a.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);N(this,t,e,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+n},a.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,n){return q(this,t,e,!0,n)},a.prototype.writeFloatBE=function(t,e,n){return q(this,t,e,!1,n)},a.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},a.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},a.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 o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},a.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 o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.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;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var i;if("number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=a.isBuffer(t)?t:z(new a(t,r).toString()),u=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,function(){return this}())},function(t,e){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function r(t){var e=n(t),r=e[0],o=e[1];return 3*(r+o)/4-o}function o(t,e,n){return 3*(e+n)/4-n}function i(t){for(var e,r=n(t),i=r[0],a=r[1],s=new f(o(t,i,a)),u=0,c=a>0?i-4:i,h=0;h<c;h+=4)e=l[t.charCodeAt(h)]<<18|l[t.charCodeAt(h+1)]<<12|l[t.charCodeAt(h+2)]<<6|l[t.charCodeAt(h+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;return 2===a&&(e=l[t.charCodeAt(h)]<<2|l[t.charCodeAt(h+1)]>>4,s[u++]=255&e),1===a&&(e=l[t.charCodeAt(h)]<<10|l[t.charCodeAt(h+1)]<<4|l[t.charCodeAt(h+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e),s}function a(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function s(t,e,n){for(var r,o=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(a(r));return o.join("")}function u(t){for(var e,n=t.length,r=n%3,o=[],i=16383,a=0,u=n-r;a<u;a+=i)o.push(s(t,a,a+i>u?u:a+i));return 1===r?(e=t[n-1],o.push(c[e>>2]+c[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(c[e>>10]+c[e>>4&63]+c[e<<2&63]+"=")),o.join("")}e.byteLength=r,e.toByteArray=i,e.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=h.length;p<d;++p)c[p]=h[p],l[h.charCodeAt(p)]=p;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=t[e+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+t[e+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-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?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;t[n+p]=255&a,p+=d,a/=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";function r(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function i(t){return Object.prototype.toString.call(t)}function a(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function s(t){if(b.isFunction(t)){if(E)return t.name;var e=t.toString(),n=e.match(T);return n&&n[1]}}function u(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function c(t){if(E||!b.isFunction(t))return b.inspect(t);var e=s(t),n=e?": "+e:"";return"[Function"+n+"]"}function l(t){return u(c(t.actual),128)+" "+t.operator+" "+u(c(t.expected),128)}function f(t,e,n,r,o){throw new j.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:o})}function h(t,e){t||f(t,!0,e,"==",j.ok)}function p(t,e,n,s){if(t===e)return!0;if(o(t)&&o(e))return 0===r(t,e);if(b.isDate(t)&&b.isDate(e))return t.getTime()===e.getTime();if(b.isRegExp(t)&&b.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(a(t)&&a(e)&&i(t)===i(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===r(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;s=s||{actual:[],expected:[]};var u=s.actual.indexOf(t);return u!==-1&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),y(t,e,n,s))}return n?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function y(t,e,n,r){if(null===t||void 0===t||null===e||void 0===e)return!1;if(b.isPrimitive(t)||b.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=d(t),i=d(e);if(o&&!i||!o&&i)return!1;if(o)return t=x.call(t),e=x.call(e),p(t,e,n);var a,s,u=O(t),c=O(e);if(u.length!==c.length)return!1;for(u.sort(),c.sort(),s=u.length-1;s>=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(a=u[s],!p(t[a],e[a],n,r))return!1;return!0}function v(t,e,n){p(t,e,!0)&&f(t,e,n,"notDeepStrictEqual",v)}function g(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function m(t){var e;try{t()}catch(t){e=t}return e}function _(t,e,n,r){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=m(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!o&&f(o,n,"Missing expected exception"+r);var i="string"==typeof r,a=!t&&b.isError(o),s=!t&&o&&!n;if((a&&i&&g(o,n)||s)&&f(o,n,"Got unwanted exception"+r),t&&o&&n&&!g(o,n)||!t&&o)throw o}var b=n(185),w=Object.prototype.hasOwnProperty,x=Array.prototype.slice,E=function(){return"foo"===function(){}.name}(),j=t.exports=h,T=/\s*function\s+([^\(\s]*)\s*/;j.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=l(this),this.generatedMessage=!0);var e=t.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,o=s(e),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},b.inherits(j.AssertionError,Error),j.fail=f,j.ok=h,j.equal=function(t,e,n){t!=e&&f(t,e,n,"==",j.equal)},j.notEqual=function(t,e,n){t==e&&f(t,e,n,"!=",j.notEqual)},j.deepEqual=function(t,e,n){p(t,e,!1)||f(t,e,n,"deepEqual",j.deepEqual)},j.deepStrictEqual=function(t,e,n){p(t,e,!0)||f(t,e,n,"deepStrictEqual",j.deepStrictEqual)},j.notDeepEqual=function(t,e,n){p(t,e,!1)&&f(t,e,n,"notDeepEqual",j.notDeepEqual)},j.notDeepStrictEqual=v,j.strictEqual=function(t,e,n){t!==e&&f(t,e,n,"===",j.strictEqual)},j.notStrictEqual=function(t,e,n){t===e&&f(t,e,n,"!==",j.notStrictEqual)},j.throws=function(t,e,n){_(!0,t,e,n)},j.doesNotThrow=function(t,e,n){_(!1,t,e,n)},j.ifError=function(t){if(t)throw t};var O=Object.keys||function(t){var e=[];for(var n in t)w.call(t,n)&&e.push(n);return e}}).call(e,function(){return this}())},[671,186,187],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}},,,,,,,,,,,,,,,,187,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t,e,n,r,o,a){"string"==typeof n&&(n=t[n]),t[e]=i.stub(n,r,o&&(a?o.bind(t):o))}function o(t,e){t[e]&&t[e].restore&&t[e].restore()}var i=n(300);e=t.exports=function(t,e,n,i,a){"function"!=typeof n&&n||(a=i,i=n,n=e,e=t,t=n),before(function(){r(this,t,e,n,i,a)}),after(function(){o(this,t)})},e.each=function(t,e,n,i,a){"function"!=typeof n&&n||(a=i,i=n,n=e,e=t,t=n),beforeEach(function(){o(this,t),r(this,t,e,n,i,a)}),afterEach(function(){o(this,t)})}},function(t,e,n){var r,o;(function(t){(function(){"use strict";function i(t,e,n){a=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")}var a,s="undefined"!=typeof t&&t.exports&&!0,u="object"==typeof n(301)&&n(301);return u?(r=i,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))):s?(i(n(302),t.exports,t),a=t.exports):a={},a})()}).call(e,n(102)(t))},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){function r(t){return n(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./sinon":300,"./sinon.js":300,"./sinon/assert":303,"./sinon/assert.js":303,"./sinon/behavior":305,"./sinon/behavior.js":305,"./sinon/call":306,"./sinon/call.js":306,"./sinon/collection":307,"./sinon/collection.js":307,"./sinon/extend":308,"./sinon/extend.js":308,"./sinon/format":309,"./sinon/format.js":309,"./sinon/log_error":314,"./sinon/log_error.js":314,"./sinon/match":315,"./sinon/match.js":315,"./sinon/mock":316,"./sinon/mock.js":316,"./sinon/sandbox":317,"./sinon/sandbox.js":317,"./sinon/spy":318,"./sinon/spy.js":318,"./sinon/stub":319,"./sinon/stub.js":319,"./sinon/test":320,"./sinon/test.js":320,"./sinon/test_case":321,"./sinon/test_case.js":321,"./sinon/times_in_words":322,"./sinon/times_in_words.js":322,"./sinon/typeOf":323,"./sinon/typeOf.js":323,"./sinon/util/core":324,"./sinon/util/core.js":324,"./sinon/util/event":326,"./sinon/util/event.js":326,"./sinon/util/fake_server":327,"./sinon/util/fake_server.js":327,"./sinon/util/fake_server_with_clock":328,"./sinon/util/fake_server_with_clock.js":328,"./sinon/util/fake_timers":329,"./sinon/util/fake_timers.js":329,"./sinon/util/fake_xdomain_request":331,"./sinon/util/fake_xdomain_request.js":331,"./sinon/util/fake_xml_http_request":332,"./sinon/util/fake_xml_http_request.js":332,"./sinon/util/timers_ie":333,"./sinon/util/timers_ie.js":333,"./sinon/util/xdr_ie":334,"./sinon/util/xdr_ie.js":334,"./sinon/util/xhr_ie":335,"./sinon/util/xhr_ie.js":335,"./sinon/walk":336,"./sinon/walk.js":336};r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=302},function(t,e,n){var r,o;(function(t,i){!function(t,a){"use strict";function s(t){function e(){for(var t,n=0,r=arguments.length;n<r;++n)t=arguments[n],t||s.fail("fake is not a spy"),t.proxy&&t.proxy.isSinonProxy?e(t.proxy):("function"!=typeof t&&s.fail(t+" is not a function"),"function"!=typeof t.getCall&&s.fail(t+" is not stubbed"))}function n(t,e){switch(t){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==e.length&&s.fail(t+" takes 1 argument but was called with "+(e.length+1)+" arguments")}}function r(t,e){t=t||a;var n=t.fail||s.fail;n.call(t,e)}function o(t,o,i){2===arguments.length&&(i=o,o=t),s[t]=function(a){e(a);var u=c.call(arguments,1);n(t,u);var l=!1;l="function"==typeof o?!o(a):"function"==typeof a[o]?!a[o].apply(a,u):!a[o],l?r(this,(a.printf||a.proxy.printf).apply(a,[i].concat(u))):s.pass(t)}}function i(t,e){return!t||/^fail/.test(e)?e:t+e.slice(0,1).toUpperCase()+e.slice(1)}var s;return s={failException:"AssertError",fail:function(t){var e=new Error(t);throw e.name=this.failException||s.failException,e},pass:function(){},callOrder:function(){e.apply(null,arguments);var n="",o="";if(t.calledInOrder(arguments))s.pass("callOrder");else{try{n=[].join.call(arguments,", ");for(var i=c.call(arguments),a=i.length;a;)i[--a].called||i.splice(a,1);o=t.orderByFirstCall(i).join(", ")}catch(t){}r(this,"expected "+n+" to be called in order but were called as "+o)}},callCount:function(n,o){if(e(n),n.callCount!==o){var i="expected %n to be called "+t.timesInWords(o)+" but was called %c%C";r(this,n.printf(i))}else s.pass("callCount")},expose:function(t,e){if(!t)throw new TypeError("target is null or undefined");var n=e||{},r="undefined"==typeof n.prefix&&"assert"||n.prefix,o="undefined"==typeof n.includeFail||!!n.includeFail;for(var a in this)"expose"===a||!o&&/^(fail)/.test(a)||(t[i(r,a)]=this[a]);return t},match:function(e,n){var o=t.match(n);if(o.test(e))s.pass("match");else{var i=["expected value to match"," expected = "+t.format(n)," actual = "+t.format(e)];r(this,i.join("\n"))}}},o("called","expected %n to have been called at least once but was never called"),o("notCalled",function(t){return!t.called},"expected %n to not have been called but was called %c%C"),o("calledOnce","expected %n to be called once but was called %c%C"),o("calledTwice","expected %n to be called twice but was called %c%C"),o("calledThrice","expected %n to be called thrice but was called %c%C"),o("calledOn","expected %n to be called with %1 as this but was called with %t"),o("alwaysCalledOn","expected %n to always be called with %1 as this but was called with %t"),o("calledWithNew","expected %n to be called with new"),o("alwaysCalledWithNew","expected %n to always be called with new"),o("calledWith","expected %n to be called with arguments %*%C"),o("calledWithMatch","expected %n to be called with match %*%C"),o("alwaysCalledWith","expected %n to always be called with arguments %*%C"),o("alwaysCalledWithMatch","expected %n to always be called with match %*%C"),o("calledWithExactly","expected %n to be called with exact arguments %*%C"),o("alwaysCalledWithExactly","expected %n to always be called with exact arguments %*%C"),o("neverCalledWith","expected %n to never be called with arguments %*%C"),o("neverCalledWithMatch","expected %n to never be called with match %*%C"),o("threw","%n did not throw exception%C"),o("alwaysThrew","%n did not always throw exception%C"),t.assert=s,s}function u(t,e,n){var r=t("./util/core");t("./match"),t("./format"),n.exports=s(r)}var c=Array.prototype.slice,l="undefined"!=typeof i&&i.exports&&!0,f="object"==typeof n(301)&&n(301);return f?(r=u,o="function"==typeof r?r.call(e,n,e,i):r,!(void 0!==o&&(i.exports=o)),void 0):l?void u(n(304),i.exports,i):void(t&&s(t))}("object"==typeof sinon&&sinon,"undefined"!=typeof t?t:self)}).call(e,function(){return this}(),n(102)(t))},function(t,e,n){function r(t){return n(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./assert":303,"./assert.js":303,"./behavior":305,"./behavior.js":305,"./call":306,"./call.js":306,"./collection":307,"./collection.js":307,"./extend":308,"./extend.js":308,"./format":309,"./format.js":309,"./log_error":314,"./log_error.js":314,"./match":315,"./match.js":315,"./mock":316,"./mock.js":316,"./sandbox":317,"./sandbox.js":317,"./spy":318,"./spy.js":318,"./stub":319,"./stub.js":319,"./test":320,"./test.js":320,"./test_case":321,"./test_case.js":321,"./times_in_words":322,"./times_in_words.js":322,"./typeOf":323,"./typeOf.js":323,"./util/core":324,"./util/core.js":324,"./util/event":326,"./util/event.js":326,"./util/fake_server":327,"./util/fake_server.js":327,"./util/fake_server_with_clock":328,"./util/fake_server_with_clock.js":328,"./util/fake_timers":329,"./util/fake_timers.js":329,"./util/fake_xdomain_request":331,"./util/fake_xdomain_request.js":331,"./util/fake_xml_http_request":332,"./util/fake_xml_http_request.js":332,"./util/timers_ie":333,"./util/timers_ie.js":333,"./util/xdr_ie":334,"./util/xdr_ie.js":334,"./util/xhr_ie":335,"./util/xhr_ie.js":335,"./walk":336,"./walk.js":336};r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=304},function(t,e,n){var r,o;(function(t,i,a){!function(s){"use strict";function u(t,e){return"string"==typeof t?(this.exception=new Error(e||""),this.exception.name=t):t?this.exception=t:this.exception=new Error("Error"),this}function c(t,e){var n=t.callArgAt;if(n>=0)return e[n];var r;n===d&&(r=e),n===y&&(r=h.call(e).reverse());for(var o=t.callArgProp,i=0,a=r.length;i<a;++i){if(!o&&"function"==typeof r[i])return r[i];if(o&&r[i]&&"function"==typeof r[i][o])return r[i][o]}return null}function l(t){function e(e,n,r){if(e.callArgAt<0){var o;return o=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&&(o+=" Received ["+p.call(r,", ")+"]"),o}return"argument at index "+e.callArgAt+" is not a function: "+n}function n(t,n){if("number"==typeof t.callArgAt){var r=c(t,n);if("function"!=typeof r)throw new TypeError(e(t,r,n));t.callbackAsync?v(function(){r.apply(t.callbackContext,t.callbackArguments)}):r.apply(t.callbackContext,t.callbackArguments)}}function r(t){return function(){var e=this[t].apply(this,arguments);return this.callbackAsync=!0,e}}var o={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,e){if(n(this,e),this.exception)throw this.exception;return"number"==typeof this.returnArgAt?e[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=h.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=h.call(arguments,2),this.callbackContext=e,this.callArgProp=void 0,this.callbackAsync=!1,this},yields:function(){return this.callArgAt=d,this.callbackArguments=h.call(arguments,0),this.callbackContext=void 0,this.callArgProp=void 0,this.callbackAsync=!1,this},yieldsRight:function(){return this.callArgAt=y,this.callbackArguments=h.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=d,this.callbackArguments=h.call(arguments,1),this.callbackContext=t,this.callArgProp=void 0,this.callbackAsync=!1,this},yieldsTo:function(t){return this.callArgAt=d,this.callbackArguments=h.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=d,this.callbackArguments=h.call(arguments,2),this.callbackContext=e,this.callArgProp=t,this.callbackAsync=!1,this},throws:u,throwsException:u,returns:function(t){return this.returnValue=t,this.returnValueDefined=!0,this.exception=void 0,
|
|
7
|
-
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}};for(var i in o)o.hasOwnProperty(i)&&i.match(/^(callsArg|yields)/)&&!i.match(/Async/)&&(o[i+"Async"]=r(i));return t.behavior=o,o}function f(t,e,n){var r=t("./util/core");t("./extend"),n.exports=l(r)}var h=Array.prototype.slice,p=Array.prototype.join,d=-1,y=-2,v=function(){return"object"==typeof t&&"function"==typeof t.nextTick?t.nextTick:"function"==typeof i?i:function(t){setTimeout(t,0)}}(),g="undefined"!=typeof a&&a.exports&&!0,m="object"==typeof n(301)&&n(301);return m?(r=f,o="function"==typeof r?r.call(e,n,e,a):r,!(void 0!==o&&(a.exports=o)),void 0):g?void f(n(304),a.exports,a):void(s&&l(s))}("object"==typeof sinon&&sinon)}).call(e,n(5),n(10).setImmediate,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(e,n,r){var o=t.functionName(e)+n;throw r.length&&(o+=" Received ["+u.call(r).join(", ")+"]"),new Error(o)}function n(e,n,o,i,a,s,u){if("number"!=typeof s)throw new TypeError("Call id is not a number");var c=t.create(r);return c.proxy=e,c.thisValue=n,c.args=o,c.returnValue=i,c.exception=a,c.callId=s,c.stack=u,c}var r={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],o=arguments[n];if(!t.match||!t.match(o).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"undefined"!=typeof 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(u.call(arguments,1)))},callArgOnWith:function(t,e){var n=u.call(arguments,2);this.args[t].apply(e,n)},yield:function(){this.yieldOn.apply(this,[null].concat(u.call(arguments,0)))},yieldOn:function(t){for(var n=this.args,r=0,o=n.length;r<o;++r)if("function"==typeof n[r])return void n[r].apply(t,u.call(arguments,1));e(this.proxy," cannot yield since no callback was passed.",n)},yieldTo:function(t){this.yieldToOn.apply(this,[t,null].concat(u.call(arguments,1)))},yieldToOn:function(t,n){for(var r=this.args,o=0,i=r.length;o<i;++o)if(r[o]&&"function"==typeof r[o][t])return void r[o][t].apply(n,u.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,o=this.args.length;r<o;++r)n.push(t.format(this.args[r]));return e=e+n.join(", ")+")","undefined"!=typeof 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}};return r.invokeCallback=r.yield,n.toString=r.toString,t.spyCall=n,n}function s(t,e,n){var r=t("./util/core");t("./match"),t("./format"),n.exports=a(r)}var u=Array.prototype.slice,c="undefined"!=typeof t&&t.exports&&!0,l="object"==typeof n(301)&&n(301);return l?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):c?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){return t.fakes||(t.fakes=[]),t.fakes}function s(t,e){for(var n=a(t),r=0,o=n.length;r<o;r+=1)"function"==typeof n[r][e]&&n[r][e]()}function u(t){for(var e=a(t),n=0;n<e.length;)e.splice(n,1)}function c(t){var e={verify:function(){s(this,"verify")},restore:function(){s(this,"restore"),u(this)},reset:function(){s(this,"reset")},verifyAndRestore:function(){var t;try{this.verify()}catch(e){t=e}if(this.restore(),t)throw t},add:function(t){return f.call(a(this),t),t},spy:function(){return this.add(t.spy.apply(t,arguments))},stub:function(e,n,r){if(n){var o=e[n];if("function"!=typeof o){if(!h.call(e,n))throw new TypeError("Cannot stub non-existent own property "+n);return e[n]=r,this.add({restore:function(){e[n]=o}})}}if(!n&&e&&"object"==typeof e){var i=t.stub.apply(t,arguments);for(var a in i)"function"==typeof i[a]&&this.add(i[a]);return i}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}function l(t,e,n){var r=t("./util/core");t("./mock"),t("./spy"),t("./stub"),n.exports=c(r)}var f=[].push,h=Object.prototype.hasOwnProperty,p="undefined"!=typeof t&&t.exports&&!0,d="object"==typeof n(301)&&n(301);return d?(r=l,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):p?void l(n(304),t.exports,t):void(i&&c(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(t){var e,r,o,i=Array.prototype.slice.call(arguments,1);for(r=0;r<i.length;r++){e=i[r];for(o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);n&&e.hasOwnProperty("toString")&&e.toString!==t.toString&&(t.toString=e.toString)}return t}var n=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=e,t.extend}function s(t,e,n){var r=t("./util/core");n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i,a){"use strict";function s(e){function r(t){return""+t}function o(){function t(){return e.ascii.apply(e,arguments)}var e=a.configure({quoteStrings:!1,limitChildrenCount:250});return t}function i(){function t(t){var n="object"==typeof t&&t.toString===Object.prototype.toString;return n?e.inspect(t):t}try{var e=n(310)}catch(t){}return e?t:r}var s,u="undefined"!=typeof t&&t.exports&&!0;if(u)try{a=n(312)}catch(t){}return s=a?o():u?i():r,e.format=s,e.format}function u(t,e,n){var r=t("./util/core");n.exports=s(r)}var c="undefined"!=typeof t&&t.exports&&!0,l="object"==typeof n(301)&&n(301);return l?(r=u,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):c?void u(n(304),t.exports,t):void(i&&s(i))}("object"==typeof sinon&&sinon,"object"==typeof formatio&&formatio)}).call(e,n(102)(t))},[671,311,203],186,function(t,e,n){var r,o,i;(function(a){(n(301)&&function(a){o=[n(313)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}||"object"==typeof t&&function(e){t.exports=e(n(313))}||function(t){this.formatio=t(this.samsam)})(function(t){"use strict";function e(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 n(t,n){var r,o,i=e(n&&n.constructor),a=t.excludeConstructors||s.excludeConstructors||[];for(r=0,o=a.length;r<o;++r){if("string"==typeof a[r]&&a[r]===i)return"";if(a[r].test&&a[r].test(i))return""}return i}function r(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 o(e,n,i,a){if("string"==typeof n){var s=e.quoteStrings,c="boolean"!=typeof s||s;return i||c?'"'+n+'"':n}if("function"==typeof n&&!(n instanceof RegExp))return o.func(n);if(i=i||[],r(n,i))return"[Circular]";if("[object Array]"===Object.prototype.toString.call(n))return o.array.call(e,n,i);if(!n)return String(1/n===-(1/0)?"-0":n);if(t.isElement(n))return o.element(n);if("function"==typeof n.toString&&n.toString!==Object.prototype.toString)return n.toString();var l,f;for(l=0,f=u.length;l<f;l++)if(n===u[l].object)return u[l].value;return o.object.call(e,n,i,a)}function i(t){for(var e in t)this[e]=t[e]}var s={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},u=(Object.prototype.hasOwnProperty,[]);return"undefined"!=typeof a&&u.push({object:a,value:"[object global]"}),"undefined"!=typeof document&&u.push({object:document,value:"[object HTMLDocument]"}),"undefined"!=typeof window&&u.push({object:window,value:"[object Window]"}),o.func=function(t){return"function "+e(t)+"() {}"},o.array=function(t,e){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(o(this,t[n],e));return r<t.length&&i.push("[... "+(t.length-r)+" more elements]"),"["+i.join(", ")+"]"},o.object=function(e,i,a){i=i||[],i.push(e),a=a||0;var s,u,c,l,f,h,p=[],d=t.keys(e).sort(),y=3;for(h=this.limitChildrenCount>0?Math.min(this.limitChildrenCount,d.length):d.length,l=0;l<h;++l)s=d[l],c=e[s],u=r(c,i)?"[Circular]":o(this,c,i,a+2),u=(/\s/.test(s)?'"'+s+'"':s)+": "+u,y+=u.length,p.push(u);var v=n(this,e),g=v?"["+v+"] ":"",m="";for(l=0,f=a;l<f;++l)m+=" ";return h<d.length&&p.push("[... "+(d.length-h)+" more elements]"),y+a>80?g+"{\n "+m+p.join(",\n "+m)+"\n"+m+"}":g+"{ "+p.join(", ")+" }"},o.element=function(t){var e,n,r,o,i,a=t.tagName.toLowerCase(),s=t.attributes,u=[];for(r=0,o=s.length;r<o;++r)e=s.item(r),n=e.nodeName.toLowerCase().replace("html:",""),i=e.nodeValue,"contenteditable"===n&&"inherit"===i||i&&u.push(n+'="'+i+'"');var c="<"+a+(u.length>0?" ":""),l=t.innerHTML;l.length>20&&(l=l.substr(0,20)+"[...]");var f=c+u.join(" ")+">"+l+"</"+a+">";return f.replace(/ contentEditable="inherit"/,"")},i.prototype={functionName:e,configure:function(t){return new i(t)},constructorName:function(t){return n(this,t)},ascii:function(t,e,n){return o(this,t,e,n)}},i.prototype})}).call(e,function(){return this}())},function(t,e,n){var r,o;(n(301)&&function(i){r=i,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))}||"object"==typeof t&&function(e){t.exports=e()}||function(t){this.samsam=t()})(function(){function t(t){var e=t;return"number"==typeof t&&t!==e}function e(t){return f.toString.call(t).split(/[ \]]/)[1]}function n(t){if("Arguments"===e(t))return!0;if("object"!=typeof t||"number"!=typeof t.length||"Array"===e(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 r(t){if(!t||1!==t.nodeType||!h)return!1;try{t.appendChild(h),t.removeChild(h)}catch(t){return!1}return!0}function o(t){var e,n=[];for(e in t)f.hasOwnProperty.call(t,e)&&n.push(e);return n}function i(t){return"function"==typeof t.getTime&&t.getTime()==t.valueOf()}function a(t){return 0===t&&1/t===-(1/0)}function s(e,n){if(e===n||t(e)&&t(n))return 0!==e||a(e)===a(n)}function u(a,u){function c(t){return!("object"!=typeof t||null===t||t instanceof Boolean||t instanceof Date||t instanceof Number||t instanceof RegExp||t instanceof String)}function l(t,e){var n;for(n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var h=[],p=[],d=[],y=[],v={};return function a(u,g,m,_){var b=typeof u,w=typeof g;if(u===g||t(u)||t(g)||null==u||null==g||"object"!==b||"object"!==w)return s(u,g);if(r(u)||r(g))return!1;var x=i(u),E=i(g);if((x||E)&&(!x||!E||u.getTime()!==g.getTime()))return!1;if(u instanceof RegExp&&g instanceof RegExp&&u.toString()!==g.toString())return!1;var j=e(u),T=e(g),O=o(u),A=o(g);if(n(u)||n(g)){if(u.length!==g.length)return!1}else if(b!==w||j!==T||O.length!==A.length)return!1;var k,S,C,P,R,F,I,M,N,D,L;for(S=0,C=O.length;S<C;S++){if(k=O[S],!f.hasOwnProperty.call(g,k))return!1;if(P=u[k],R=g[k],F=c(P),I=c(R),M=F?l(h,P):-1,N=I?l(p,R):-1,D=M!==-1?d[M]:m+"["+JSON.stringify(k)+"]",L=N!==-1?y[N]:_+"["+JSON.stringify(k)+"]",v[D+L])return!0;if(M===-1&&F&&(h.push(P),d.push(D)),N===-1&&I&&(p.push(R),y.push(L)),F&&I&&(v[D+L]=!0),!a(P,R,D,L))return!1}return!0}(a,u,"$1","$2")}function c(t,e){if(0===e.length)return!0;var n,r,o,i;for(n=0,r=t.length;n<r;++n)if(l(t[n],e[0])){for(o=0,i=e.length;o<i;++o)if(!l(t[n+o],e[o]))return!1;return!0}return!1}var l,f=Object.prototype,h="undefined"!=typeof document&&document.createElement("div");return l=function t(n,r){if(r&&"function"==typeof r.test)return r.test(n);if("function"==typeof r)return r(n)===!0;if("string"==typeof r){r=r.toLowerCase();var o="string"==typeof n||!!n;return o&&String(n).toLowerCase().indexOf(r)>=0}if("number"==typeof r)return r===n;if("boolean"==typeof r)return r===n;if("undefined"==typeof r)return"undefined"==typeof n;if(null===r)return null===n;if("Array"===e(n)&&"Array"===e(r))return c(n,r);if(r&&"object"==typeof r){if(r===n)return!0;var i;for(i in r){var a=n[i];if("undefined"==typeof a&&"function"==typeof n.getAttribute&&(a=n.getAttribute(i)),null===r[i]||"undefined"==typeof r[i]){if(a!==r[i])return!1}else if("undefined"==typeof a||!t(a,r[i]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")},{isArguments:n,isElement:r,isDate:i,isNegZero:a,identical:s,deepEqual:u,match:l,keys:o}})},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(){}function n(e,r){function o(){throw r.message=i+r.message,r}var i=e+" threw exception: ";t.log(i+"["+r.name+"] "+r.message),r.stack&&t.log(r.stack),n.useImmediateExceptions?o():n.setTimeout(o,0)}n.useImmediateExceptions=!1,n.setTimeout=function(t,e){u(t,e)};var r={};return r.log=t.log=e,r.logError=t.logError=n,r}function s(t,e,n){var r=t("./util/core");n.exports=a(r)}var u=setTimeout,c="undefined"!=typeof t&&t.exports&&!0,l="object"==typeof n(301)&&n(301);return l?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):c?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(e,n,r){var o=t.typeOf(e);if(o!==n)throw new TypeError("Expected type of "+r+" to be "+n+", but was "+o)}function n(t){return a.isPrototypeOf(t)}function r(e,o){if(null===o||void 0===o)return!1;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i],s=o[i];if(n(a)){if(!a.test(s))return!1}else if("object"===t.typeOf(a)){if(!r(a,s))return!1}else if(!t.deepEqual(a,s))return!1}return!0}function o(e,n){var o=t.create(a),i=t.typeOf(e);switch(i){case"object":if("function"==typeof e.test)return o.test=function(t){return e.test(t)===!0},o.message="match("+t.functionName(e.test)+")",o;var s=[];for(var u in e)e.hasOwnProperty(u)&&s.push(u+": "+e[u]);o.test=function(t){return r(e,t)},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&&t.indexOf(e)!==-1},o.message='match("'+e+'")';break;case"regexp":o.test=function(t){return"string"==typeof t&&e.test(t)};break;case"function":o.test=e,n?o.message=n:o.message="match("+t.functionName(e)+")";break;default:o.test=function(n){return t.deepEqual(e,n)}}return o.message||(o.message="match("+e+")"),o}function i(n,r){return function(i,a){e(i,"string","property");var s=1===arguments.length,u=r+'("'+i+'"';return s||(u+=", "+a),u+=")",o(function(e){return!(void 0===e||null===e||!n(e,i))&&(s||t.deepEqual(a,e[i]))},u)}}var a={toString:function(){return this.message}};return a.or=function(e){if(!arguments.length)throw new TypeError("Matcher expected");n(e)||(e=o(e));var r=this,i=t.create(a);return i.test=function(t){return r.test(t)||e.test(t)},i.message=r.message+".or("+e.message+")",i},a.and=function(e){if(!arguments.length)throw new TypeError("Matcher expected");n(e)||(e=o(e));var r=this,i=t.create(a);return i.test=function(t){return r.test(t)&&e.test(t)},i.message=r.message+".and("+e.message+")",i},o.isMatcher=n,o.any=o(function(){return!0},"any"),o.defined=o(function(t){return null!==t&&void 0!==t},"defined"),o.truthy=o(function(t){return!!t},"truthy"),o.falsy=o(function(t){return!t},"falsy"),o.same=function(t){return o(function(e){return t===e},"same("+t+")")},o.typeOf=function(n){return e(n,"string","type"),o(function(e){return t.typeOf(e)===n},'typeOf("'+n+'")')},o.instanceOf=function(n){return e(n,"function","type"),o(function(t){return t instanceof n},"instanceOf("+t.functionName(n)+")")},o.has=i(function(t,e){return"object"==typeof t?e in t:void 0!==t[e]},"has"),o.hasOwn=i(function(t,e){return t.hasOwnProperty(e)},"hasOwn"),o.bool=o.typeOf("boolean"),o.number=o.typeOf("number"),o.string=o.typeOf("string"),o.object=o.typeOf("object"),o.func=o.typeOf("function"),o.array=o.typeOf("array"),o.regexp=o.typeOf("regexp"),o.date=o.typeOf("date"),t.match=o,o}function s(t,e,n){var r=t("./util/core");t("./typeOf"),n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(n){return n?e.create(n):t.expectation.create("Anonymous mock")}function n(t,e){if(t)for(var n=0,r=t.length;n<r;n+=1)e(t[n])}function r(e,n,r){if(r&&e.length!==n.length)return!1;for(var o=0,i=e.length;o<i;o++)if(!t.deepEqual(e[o],n[o]))return!1;return!0}function o(t){return 0===t?"never called":"called "+f(t)}function i(t){var e=t.minCalls,n=t.maxCalls;if("number"==typeof e&&"number"==typeof n){var r=f(e);return e!==n&&(r="at least "+r+" and at most "+f(n)),r}return"number"==typeof e?"at least "+f(e):"at most "+f(n)}function a(t){var e="number"==typeof t.minCalls;return!e||t.callCount>=t.minCalls}function s(t){return"number"==typeof t.maxCalls&&t.callCount===t.maxCalls}function u(t,e){var n=l&&l.isMatcher(t);return n&&t.test(e)||!0}var c=[].push,l=t.match;t.extend(e,{create:function(n){if(!n)throw new TypeError("object is null");var r=t.extend({},e);return r.object=n,delete r.create,r},expects:function(e){if(!e)throw new TypeError("method is falsy");if(this.expectations||(this.expectations={},this.proxies=[]),!this.expectations[e]){this.expectations[e]=[];var n=this;t.wrapMethod(this.object,e,function(){return n.invokeMethod(e,this,arguments)}),c.call(this.proxies,e)}var r=t.expectation.create(e);return c.call(this.expectations[e],r),r},restore:function(){var t=this.object;n(this.proxies,function(e){"function"==typeof t[e].restore&&t[e].restore()})},verify:function(){var e=this.expectations||{},r=[],o=[];return n(this.proxies,function(t){n(e[t],function(t){t.met()?c.call(o,t.toString()):c.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(e,n,o){var i,a,s=this.expectations&&this.expectations[e]?this.expectations[e]:[],u=[],l=o||[];for(i=0;i<s.length;i+=1){var f=s[i].expectedArguments||[];r(f,l,s[i].expectsExactArgCount)&&u.push(s[i])}for(i=0;i<u.length;i+=1)if(!u[i].met()&&u[i].allowsCall(n,o))return u[i].apply(n,o);var h=[],p=0;for(i=0;i<u.length;i+=1)u[i].allowsCall(n,o)?a=a||u[i]:p+=1;if(a&&0===p)return a.apply(n,o);for(i=0;i<s.length;i+=1)c.call(h," "+s[i].toString());h.unshift("Unexpected call: "+t.spyCall.toString.call({proxy:e,args:o})),t.expectation.fail(h.join("\n"))}});var f=t.timesInWords,h=Array.prototype.slice;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&&a(this)},verifyCallAllowed:function(e,n){if(s(this)&&(this.failed=!0,t.expectation.fail(this.method+" already called "+f(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,o=this.expectedArguments.length;r<o;r+=1)u(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()&&s(this))return!1;if("expectedThis"in this&&this.expectedThis!==e)return!1;if(!("expectedArguments"in this))return!0;if(n=n||[],n.length<this.expectedArguments.length)return!1;if(this.expectsExactArgCount&&n.length!==this.expectedArguments.length)return!1;for(var r=0,o=this.expectedArguments.length;r<o;r+=1){if(!u(this.expectedArguments[r],n[r]))return!1;if(!t.deepEqual(this.expectedArguments[r],n[r]))return!1}return!0},withArgs:function(){return this.expectedArguments=h.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 e=(this.expectedArguments||[]).slice();this.expectsExactArgCount||c.call(e,"[...]");var n=t.spyCall.toString.call({proxy:this.method||"anonymous mock expectation",args:e}),r=n.replace(", [...","[, ...")+" "+i(this);return this.met()?"Expectation met: "+r:"Expected "+r+" ("+o(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=e,e}function s(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=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(t,e,n,o){o&&(!e.injectInto||n in e.injectInto?r.call(t.args,o):(e.injectInto[n]=o,t.injectedKeys.push(n)))}function n(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}var r=[].push;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(r){if(!r)return t.create(t.sandbox);var o=n(r);o.args=o.args||[],o.injectedKeys=[],o.injectInto=r.injectInto;var i,a,s=o.inject({});if(r.properties)for(var u=0,c=r.properties.length;u<c;u++)i=r.properties[u],a=s[i]||"sandbox"===i&&o,e(o,r,i,a);else e(o,r,"sandbox",a);return o},match:t.match}),t.sandbox.useFakeXMLHttpRequest=t.sandbox.useFakeServer,t.sandbox}function s(t,e,n){var r=t("./util/core");t("./extend"),t("./util/fake_server_with_clock"),t("./util/fake_timers"),t("./collection"),n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("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){!function(sinonGlobal){"use strict";function makeApi(sinon){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={},o=sinon.getPropertyDescriptor(t,e),i=0;i<n.length;i++)r[n[i]]=spy.create(o[n[i]]);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,o=t.length;r<o;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)}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}function delegateToCalls(t,e,n,r){spyApi[t]=function(){if(!this.called)return!!r&&r.apply(this,arguments);for(var o,i=0,a=0,s=this.callCount;a<s;a+=1)if(o=this.getCall(a),o[n||t].apply(o,arguments)&&(i+=1,e))return!0;return i===this.callCount}}var push=Array.prototype.push,slice=Array.prototype.slice,callId=0,vars="a,b,c,d,e,f,g,h,i,j,k,l",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,o,i=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,o=i?i.invoke(t,e,n):(this.func||t).apply(e,n);var a=this.getCall(this.callCount-1);a.calledWithNew()&&"object"!=typeof o&&(o=e)}catch(t){r=t}finally{delete this.invoking}if(push.call(this.exceptions,r),push.call(this.returnValues,o),push.call(this.stacks,(new Error).stack),createCallProperties.call(this),void 0!==r)throw r;return o},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 o=0;o<this.args.length;o++)r.matches(this.args[o])&&(incrementCallCount.call(r),push.call(r.thisValues,this.thisValues[o]),push.call(r.args,this.args[o]),push.call(r.returnValues,this.returnValues[o]),push.call(r.exceptions,this.exceptions[o]),push.call(r.callIds,this.callIds[o]));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,o){return e=spyApi.formatters[o],"function"==typeof e?e.call(null,n,r):isNaN(parseInt(o,10))?"%"+o:sinon.format(r[o-1])})}};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(){
|
|
8
|
-
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 o=" "+t.getCall(n).toString();/\n/.test(e[n-1])&&(o="\n"+o),push.call(e,o)}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,o=e.length;r<o;++r)push.call(n,sinon.format(e[r]));return n.join(", ")}},sinon.extend(spy,spyApi),spy.spyCall=sinon.spyCall,sinon.spy=spy,spy}function loadDependencies(t,e,n){var r=t("./util/core");t("./call"),t("./extend"),t("./times_in_words"),t("./format"),n.exports=makeApi(r)}var isNode="undefined"!=typeof module&&module.exports&&!0,isAMD="object"==typeof __webpack_require__(301)&&__webpack_require__(301);return isAMD?(__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 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)),void 0):isNode?void loadDependencies(__webpack_require__(304),module.exports,module):void(sinonGlobal&&makeApi(sinonGlobal))}("object"==typeof sinon&&sinon)}).call(exports,__webpack_require__(102)(module))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(n,r,o){if(o&&"function"!=typeof o&&"object"!=typeof o)throw new TypeError("Custom stub should be a function or a property descriptor");var i;if(o){if("function"==typeof o)i=t.spy&&t.spy.create?t.spy.create(o):o;else if(i=o,t.spy&&t.spy.create)for(var a=t.objectKeys(i),s=0;s<a.length;s++)i[a[s]]=t.spy.create(i[a[s]])}else{var u=0;"object"==typeof n&&"function"==typeof n[r]&&(u=n[r].length),i=e.create(u)}return n||"undefined"!=typeof r?"undefined"==typeof r&&"object"==typeof n?(t.walk(n||{},function(r,o,i){i!==Object.prototype&&"constructor"!==o&&"function"==typeof t.getPropertyDescriptor(i,o).value&&e(n,o)}),n):t.wrapMethod(n,r,i):t.stub.create()}function n(t){return t.parent&&o(t.parent)}function r(e){return e.defaultBehavior||n(e)||t.behavior.create(e)}function o(t){var e=t.behaviors[t.callCount-1];return e&&e.isPresent()?e:r(t)}function i(e){return function(){return this.defaultBehavior=this.defaultBehavior||t.behavior.create(this),this.defaultBehavior[e].apply(this.defaultBehavior,arguments),this}}var a=0,s={create:function(n){var r=function(){return o(r).invoke(this,arguments)};r.id="stub#"+a++;var i=r;return r=t.spy.create(r,n),r.func=i,t.extend(r,e),r.instantiateFake=t.stub.create,r.displayName="stub",r.toString=t.functionToString,r.defaultBehavior=null,r.behaviors=[],r},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)}};for(var u in t.behavior)t.behavior.hasOwnProperty(u)&&!s.hasOwnProperty(u)&&"create"!==u&&"withArgs"!==u&&"invoke"!==u&&(s[u]=i(u));return t.extend(e,s),t.stub=e,e}function s(t,e,n){var r=t("./util/core");t("./behavior"),t("./spy"),t("./extend"),n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(e){function r(){var r=t.getConfig(t.config);r.injectInto=r.injectIntoThis&&this||r.injectInto;var o,i,a=t.sandbox.create(r),s=n.call(arguments),u=s.length&&s[s.length-1];"function"==typeof u&&(s[s.length-1]=function(t){t?a.restore():a.verifyAndRestore(),u(t)});try{i=e.apply(this,s.concat(a.args))}catch(t){o=t}if("undefined"!=typeof o)throw a.restore(),o;return"function"!=typeof u&&a.verifyAndRestore(),i}var o=typeof e;if("function"!==o)throw new TypeError("sinon.test needs to wrap a test function, got "+o);return e.length?function(t){return r.apply(this,arguments)}:r}var n=Array.prototype.slice;return e.config={injectIntoThis:!0,injectInto:null,properties:["spy","stub","mock","clock","server","requests"],useFakeTimers:!0,useFakeServer:!0},t.test=e,e}function s(t,e,n){var r=t("./util/core");t("./sandbox"),n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))):u?s(n(304),t.exports,t):i&&a(i)}("object"==typeof sinon&&sinon||null)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t,e,n){return function(){e&&e.apply(this,arguments);var r,o;try{o=t.apply(this,arguments)}catch(t){r=t}if(n&&n.apply(this,arguments),r)throw r;return o}}function s(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,o,i,s=new RegExp("^"+n),u={},c=e.setUp,l=e.tearDown;for(r in e)e.hasOwnProperty(r)&&!/^(setUp|tearDown)$/.test(r)&&(o=e[r],"function"==typeof o&&s.test(r)?(i=o,(c||l)&&(i=a(o,c,l)),u[r]=t.test(i)):u[r]=e[r]);return u}return t.testCase=e,e}function u(t,e,n){var r=t("./util/core");t("./test"),n.exports=s(r)}var c="undefined"!=typeof t&&t.exports&&!0,l="object"==typeof n(301)&&n(301);return l?(r=u,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):c?void u(n(304),t.exports,t):void(i&&s(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(t){switch(t){case 1:return"once";case 2:return"twice";case 3:return"thrice";default:return(t||0)+" times"}}return t.timesInWords=e,t.timesInWords}function s(t,e,n){var r=t("./util/core");n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(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()}return t.typeOf=e,t.typeOf}function s(t,e,n){var r=t("./util/core");n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){var e=!1;try{t.appendChild(d),e=d.parentNode===t}catch(t){return!1}finally{try{t.removeChild(d)}catch(t){}}return e}function s(t){return d&&t&&1===t.nodeType&&a(t)}function u(t){return"function"==typeof t||!!(t&&t.constructor&&t.call&&t.apply)}function c(t){return"number"==typeof t&&isNaN(t)}function l(t,e){for(var n in e)y.call(t,n)||(t[n]=e[n])}function f(t){return"function"==typeof t&&"function"==typeof t.restore&&t.restore.sinon}function h(t){return t.wrapMethod=function(e,n,r){function o(t){var e;if(u(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}function i(){s=e[n],o(s),e[n]=r,r.displayName=n}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");var a,s,c,f=e.hasOwnProperty&&e.hasOwnProperty===y?e.hasOwnProperty(n):y.call(e,n);if(v){var h="function"==typeof r?{value:r}:r,p=t.getPropertyDescriptor(e,n);if(p?p.restore&&p.restore.sinon&&(a=new TypeError("Attempted to wrap "+n+" which is already wrapped")):a=new TypeError("Attempted to wrap "+typeof s+" property "+n+" as function"),a)throw p&&p.stackTrace&&(a.stack+="\n--------------\n"+p.stackTrace),a;var d=t.objectKeys(h);for(c=0;c<d.length;c++)s=p[d[c]],o(s);for(l(h,p),c=0;c<d.length;c++)l(h[d[c]],p[d[c]]);Object.defineProperty(e,n,h),"function"==typeof r&&e[n]!==r&&(delete e[n],i())}else i();return r.displayName=n,r.stackTrace=new Error("Stack Trace for original").stack,r.restore=function(){if(f)v&&Object.defineProperty(e,n,p);else try{delete e[n]}catch(t){}if(v){var o=t.getPropertyDescriptor(e,n);o.value===r&&(e[n]=s)}else e[n]===r&&(e[n]=s)},r.restore.sinon=!0,v||l(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(s(n)||s(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 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 i,a=0,u=0;if("[object Array]"===o&&n.length!==r.length)return!1;for(i in n)if(y.call(n,i)){if(a+=1,!(i in r))return!1;if(!e(n[i],r[i]))return!1}for(i in r)y.call(r,i)&&(u+=1);return a===u},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--;){t=this.getCall(n).thisValue;for(e in t)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)y.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 o in r)r.hasOwnProperty(o)&&(n[o]=e.hasOwnProperty(o)?e[o]:r[o]);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),o=n&&n.callId||-1,i=r&&r.callId||-1;return o<i?-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)f(t[e])&&t[e].restore();else f(t)&&t.restore()},t}function p(t,e){h(e)}var d="undefined"!=typeof document&&document.createElement("div"),y=Object.prototype.hasOwnProperty,v="keys"in Object,g="undefined"!=typeof t&&t.exports&&!0,m="object"==typeof n(301)&&n(301);return m?(r=p,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):g?void p(n(325),t.exports,t):void(i&&h(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){function r(t){return n(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./core":324,"./core.js":324,"./event":326,"./event.js":326,"./fake_server":327,"./fake_server.js":327,"./fake_server_with_clock":328,"./fake_server_with_clock.js":328,"./fake_timers":329,"./fake_timers.js":329,"./fake_xdomain_request":331,"./fake_xdomain_request.js":331,"./fake_xml_http_request":332,"./fake_xml_http_request.js":332,"./timers_ie":333,"./timers_ie.js":333,"./xdr_ie":334,"./xdr_ie.js":334,"./xhr_ie":335,"./xhr_ie.js":335};r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=325},function(t,e,n){var r,o;"undefined"==typeof sinon&&(this.sinon={}),function(){"use strict";function i(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]||[],s.call(this.eventListeners[t],e)},removeEventListener:function(t,e){for(var n=this.eventListeners&&this.eventListeners[t]||[],r=0,o=n.length;r<o;++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}}}function a(t){var e=t("./core");i(e)}var s=[].push,u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);c?(r=a,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))):u?a(n(325)):i(sinon)}()},function(t,e,n){var r,o;(function(t){!function(){"use strict";function i(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}function a(t,e,n){var r=t.method,o=!r||r.toLowerCase()===e.toLowerCase(),i=t.url,a=!i||i===n||"function"==typeof i.test&&i.test(n);return o&&a}function s(t,e){var n=e.url;if(/^https?:\/\//.test(n)&&!h.test(n)||(n=n.replace(h,"")),a(t,this.getHTTPMethod(e),n)){if("function"==typeof t.response){var r=t.url,o=[e].concat(r&&"function"==typeof r.exec?r.exec(n).slice(1):[]);return t.response.apply(t,o)}return!0}return!1}function u(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};t=t||{};for(e in t)n.hasOwnProperty(e)&&t.hasOwnProperty(e)&&(this[e]=t[e])},addRequest:function(t){var e=this;l.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=[]),l.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){return 1===arguments.length&&"function"!=typeof t?void(this.response=i(t)):(this.responses||(this.responses=[]),1===arguments.length&&(n=t,e=t=null),2===arguments.length&&(n=e,e=t,t=null),void l.call(this.responses,{method:t,url:e,response:"function"==typeof n?n:i(n)}))},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,o=r-1;o>=0;o--)if(s.call(this,this.responses[o],e)){n=this.responses[o].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)}}}function c(t,e,n){var r=t("./core");t("./fake_xdomain_request"),t("./fake_xml_http_request"),t("../format"),u(r),n.exports=r}var l=[].push,f="undefined"!=typeof window?window.location:{},h=new RegExp("^"+f.protocol+"//"+f.host),p="undefined"!=typeof t&&t.exports&&!0,d="object"==typeof n(301)&&n(301);d?(r=c,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))):p?c(n(325),t.exports,t):u(sinon)}()}).call(e,n(102)(t))},function(t,e,n){var r,o;!function(){"use strict";function i(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,o=this;this.clock.setTimeout=function(t,e){return o.longestTimeout=Math.max(e,o.longestTimeout||0),n.apply(this,arguments)},this.clock.setInterval=function(t,e){return o.longestTimeout=Math.max(e,o.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)}}function a(t){var e=t("./core");t("./fake_server"),t("./fake_timers"),i(e)}var s="undefined"!=typeof t&&t.exports&&!0,u="object"==typeof n(301)&&n(301);u?(r=a,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))):s?a(n(325)):i(sinon)}()},function(t,e,n){var r,o;(function(t,i,a){!function(){"use strict";function s(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:"undefined"!=typeof t?t:void 0,clearImmediate:"undefined"!=typeof i?i:void 0,setInterval:setInterval,clearInterval:clearInterval,Date:Date}}function u(t,e,n,r){var o=t("./core");s(o,r),n.exports=o}var c="undefined"!=typeof a&&a.exports&&!0,l="object"==typeof n(301)&&n(301);l?(r=u,o="function"==typeof r?r.call(e,n,e,a):r,!(void 0!==o&&(a.exports=o))):c?u(n(325),a.exports,a,n(330)):s(sinon)}()}).call(e,n(10).setImmediate,n(10).clearImmediate,n(102)(t))},function(module,exports){(function(global){!function(global){"use strict";function parseTime(t){if(!t)return 0;var e,n=t.split(":"),r=n.length,o=r,i=0;if(r>3||!/^(\d\d:){0,2}\d\d?$/.test(t))throw new Error("tick only understands numbers and 'h:m:s'");for(;o--;){if(e=parseInt(n[o],10),e>=60)throw new Error("Invalid time "+t);i+=e*Math.pow(60,r-o-1)}return 1e3*i}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(){function t(e,n,r,o,i,a,s){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,o);case 5:return new NativeDate(e,n,r,o,i);case 6:return new NativeDate(e,n,r,o,i,a);default:return new NativeDate(e,n,r,o,i,a,s)}}return mirrorDateProperties(t,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,o,i=t.timers,a=null;for(r in i)i.hasOwnProperty(r)&&(o=inRange(e,n,i[r]),!o||a&&1!==compareTimers(a,i[r])||(a=i[r]));return a}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":"undefined"!=typeof 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,o;for(r=0,o=t.methods.length;r<o;r++)if(n=t.methods[r],e[n].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 o=mirrorDateProperties(n[e],t[e]);t[e]=o}else{t[e]=function(){return n[e].apply(n,arguments)};for(r in n[e])n[e].hasOwnProperty(r)&&(t[e][r]=n[e][r])}t[e].clock=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=e.now,o=e.now+t,i=e.now,a=firstTimerInRange(e,r,o);e.duringTick=!0;for(var s;a&&r<=o;){if(e.timers[a.id]){r=e.now=a.callAt;try{n=e.now,callTimer(e,a),n!==e.now&&(r+=e.now-n,o+=e.now-n,i+=e.now-n)}catch(t){s=s||t}}a=firstTimerInRange(e,i,o),i=r}if(e.duringTick=!1,e.now=o,s)throw s;return e.now},e.reset=function(){e.timers={}},e.setSystemTime=function(t){var n=getEpoch(t),r=n-e.now;e.now=n;for(var o in e.timers)if(e.timers.hasOwnProperty(o)){var i=e.timers[o];i.createdAt+=r,i.callAt+=r}},e}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,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};exports.timers=timers,exports.createClock=createClock,exports.install=function(t,e,n){var r,o;"number"==typeof t&&(n=e,e=t,t=null),t||(t=global);var i=createClock(e);for(i.uninstall=function(){uninstall(i,t)},i.methods=n||[],0===i.methods.length&&(i.methods=keys(timers)),r=0,o=i.methods.length;r<o;r++)hijackMethod(t,i.methods[r],i);return i}}(global||this)}).call(exports,function(){return this}())},function(t,e,n){var r,o;(function(t,i){function a(){"use strict";return"undefined"!=typeof window?window:t}"undefined"==typeof sinon&&("undefined"==typeof this?a().sinon={}:this.sinon={}),function(t){"use strict";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)}function r(t){if(t.readyState!==n.OPENED)throw new Error("INVALID_STATE_ERR");if(t.sendFlag)throw new Error("INVALID_STATE_ERR")}function o(t){if(t.readyState===n.UNSENT)throw new Error("Request not sent");if(t.readyState===n.DONE)throw new Error("Request done")}function i(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}}e.xdr=u,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:break;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){r(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){o(this),i(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){u.supportsXDR&&(t.XDomainRequest=u.GlobalXDomainRequest),delete e.FakeXDomainRequest.restore,n!==!0&&delete e.FakeXDomainRequest.onCreate},u.supportsXDR&&(t.XDomainRequest=e.FakeXDomainRequest),e.FakeXDomainRequest},e.FakeXDomainRequest=n}function s(t,e,n){var r=t("./core");t("../extend"),t("./event"),t("../log_error"),a(r),n.exports=r}var u={XDomainRequest:t.XDomainRequest};u.GlobalXDomainRequest=t.XDomainRequest,u.supportsXDR="undefined"!=typeof u.GlobalXDomainRequest,u.workingXDR=!!u.supportsXDR&&u.GlobalXDomainRequest;var c="undefined"!=typeof i&&i.exports&&!0,l="object"==typeof n(301)&&n(301);l?(r=s,o="function"==typeof r?r.call(e,n,e,i):r,!(void 0!==o&&(i.exports=o))):c?s(n(325),i.exports,i):a(sinon)}("undefined"!=typeof t?t:self)}).call(e,function(){return this}(),n(102)(t))},function(t,e,n){var r,o;(function(t,i){!function(t,a){"use strict";function s(t){var e="undefined"!=typeof t.XMLHttpRequest;if(e)return t.XMLHttpRequest;var n="undefined"!=typeof t.ActiveXObject;return!!n&&function(){return new t.ActiveXObject("MSXML2.XMLHTTP.3.0")}}function u(){this.eventListeners={abort:[],error:[],load:[],loadend:[],progress:[]}}function c(){function t(t){e.addEventListener(t,function(n){var r=e["on"+t];r&&"function"==typeof r&&r.call(this,n)})}this.readyState=c.UNSENT,this.requestHeaders={},this.requestBody=null,this.status=0,this.statusText="",this.upload=new u,this.responseType="",this.response="",S.supportsCORS&&(this.withCredentials=!1);for(var e=this,n=["loadstart","load","abort","error","loadend"],r=n.length-1;r>=0;r--)t(n[r]);"function"==typeof c.onCreate&&c.onCreate(this)}function l(t){if(t.readyState!==c.OPENED)throw new Error("INVALID_STATE_ERR");if(t.sendFlag)throw new Error("INVALID_STATE_ERR")}function f(t,e){e=e.toLowerCase();for(var n in t)if(n.toLowerCase()===e)return n;return null}function h(t,e){if(t)for(var n=0,r=t.length;n<r;n+=1)e(t[n])}function p(t,e){for(var n=0;n<t.length;n++)if(e(t[n])===!0)return!0;return!1}function d(t){if(t.readyState!==c.OPENED)throw new Error("INVALID_STATE_ERR - "+t.readyState)}function y(t){if(t.readyState===c.DONE)throw new Error("Request done")}function v(t){if(t.async&&t.readyState!==c.HEADERS_RECEIVED)throw new Error("No headers received")}function g(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}}function m(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),r=0;r<t.length;r++){var o=t.charCodeAt(r);if(o>=256)throw new TypeError("arraybuffer or blob responseTypes require binary string, invalid character "+t[r]+" found.");n[r]=o}return e}function _(t){return!t||/(text\/xml)|(application\/xml)|(\+xml)/.test(t)}function b(t,e,n){if(""===t||"text"===t)return n;if(A&&"arraybuffer"===t)return m(n);if("json"===t)try{return JSON.parse(n)}catch(t){return null}else{if(k&&"blob"===t){var r={};return e&&(r.type=e),new Blob([m(n)],r)}if("document"===t)return _(e)?c.parseXML(n):null}throw new Error("Invalid responseType "+t)}function w(t){""===t.responseType||"text"===t.responseType?t.response=t.responseText="":t.response=t.responseText=null,t.responseXML=null}function x(t){t.xhr=S,t.extend(c.prototype,t.EventTarget,{async:!0,open:function(t,e,n,r,o){if(this.method=t,this.url=e,this.async="boolean"!=typeof n||n,this.username=r,this.password=o,w(this),this.requestHeaders={},this.sendFlag=!1,c.useFilters===!0){var i=arguments,a=p(c.filters,function(t){return t.apply(this,i)});if(a)return c.defake(this,arguments)}this.readyStateChange(c.OPENED)},readyStateChange:function(e){this.readyState=e;var n,r,o=new t.Event("readystatechange",!1,!1,this);if("function"==typeof this.onreadystatechange)try{this.onreadystatechange(o)}catch(e){t.logError("Fake XHR onreadystatechange handler",e)}this.readyState===c.DONE&&(r={loaded:this.progress||0,total:this.progress||0},n=0===this.status?this.aborted?"abort":"error":"load",j&&(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))),
|
|
9
|
-
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(o)},setRequestHeader:function(t,e){if(l(this),C[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){d(this),this.responseHeaders={};for(var e in t)t.hasOwnProperty(e)&&(this.responseHeaders[e]=t[e]);this.async?this.readyStateChange(c.HEADERS_RECEIVED):this.readyState=c.HEADERS_RECEIVED},send:function(e){if(l(this),!/^(get|head)$/i.test(this.method)){var n=f(this.requestHeaders,"Content-Type");if(this.requestHeaders[n]){var r=this.requestHeaders[n].split(";");this.requestHeaders[n]=r[0]+";charset=utf-8"}else!O||e instanceof FormData||(this.requestHeaders["Content-Type"]="text/plain;charset=utf-8");this.requestBody=e}this.errorFlag=!1,this.sendFlag=this.async,w(this),this.readyStateChange(c.OPENED),"function"==typeof this.onSend&&this.onSend(this),this.dispatchEvent(new t.Event("loadstart",!1,!1,this))},abort:function(){this.aborted=!0,w(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyState>c.UNSENT&&this.sendFlag&&(this.readyStateChange(c.DONE),this.sendFlag=!1),this.readyState=c.UNSENT},error:function(){w(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyStateChange(c.DONE)},getResponseHeader:function(t){return this.readyState<c.HEADERS_RECEIVED?null:/^Set-Cookie2?$/i.test(t)?null:(t=f(this.responseHeaders,t),this.responseHeaders[t]||null)},getAllResponseHeaders:function(){if(this.readyState<c.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){y(this),v(this),g(t);var e=this.getResponseHeader("Content-Type"),n=""===this.responseType||"text"===this.responseType;if(w(this),this.async){var r=this.chunkSize||10,o=0;do this.readyStateChange(c.LOADING),n&&(this.responseText=this.response+=t.substring(o,o+r)),o+=r;while(o<t.length)}this.response=b(this.responseType,e,t),n&&(this.responseText=this.response),"document"===this.responseType?this.responseXML=this.response:""===this.responseType&&_(e)&&(this.responseXML=c.parseXML(this.responseText)),this.progress=t.length,this.readyStateChange(c.DONE)},respond:function(t,e,n){this.status="number"==typeof t?t:200,this.statusText=c.statusCodes[this.status],this.setResponseHeaders(e||{}),this.setResponseBody(n||"")},uploadProgress:function(e){j&&this.upload.dispatchEvent(new t.ProgressEvent("progress",e))},downloadProgress:function(e){j&&this.dispatchEvent(new t.ProgressEvent("progress",e))},uploadError:function(e){T&&this.upload.dispatchEvent(new t.CustomEvent("error",{detail:e}))}}),t.extend(c,{UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4}),t.useFakeXMLHttpRequest=function(){return c.restore=function(t){S.supportsXHR&&(a.XMLHttpRequest=S.GlobalXMLHttpRequest),S.supportsActiveX&&(a.ActiveXObject=S.GlobalActiveXObject),delete c.restore,t!==!0&&delete c.onCreate},S.supportsXHR&&(a.XMLHttpRequest=c),S.supportsActiveX&&(a.ActiveXObject=function(t){return"Microsoft.XMLHTTP"===t||/^Msxml2\.XMLHTTP/i.test(t)?new c:new S.GlobalActiveXObject(t)}),c},t.FakeXMLHttpRequest=c}function E(t,e,n){var r=t("./core");t("../extend"),t("./event"),t("../log_error"),x(r),n.exports=r}var j="undefined"!=typeof ProgressEvent,T="undefined"!=typeof CustomEvent,O="undefined"!=typeof FormData,A="undefined"!=typeof ArrayBuffer,k=function(){try{return!!new Blob}catch(t){return!1}}(),S={XMLHttpRequest:a.XMLHttpRequest};S.GlobalXMLHttpRequest=a.XMLHttpRequest,S.GlobalActiveXObject=a.ActiveXObject,S.supportsActiveX="undefined"!=typeof S.GlobalActiveXObject,S.supportsXHR="undefined"!=typeof S.GlobalXMLHttpRequest,S.workingXHR=s(a),S.supportsCORS=S.supportsXHR&&"withCredentials"in new S.GlobalXMLHttpRequest;var C={"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};u.prototype.addEventListener=function(t,e){this.eventListeners[t].push(e)},u.prototype.removeEventListener=function(t,e){for(var n=this.eventListeners[t]||[],r=0,o=n.length;r<o;++r)if(n[r]===e)return n.splice(r,1)},u.prototype.dispatchEvent=function(t){for(var e,n=this.eventListeners[t.type]||[],r=0;null!=(e=n[r]);r++)e(t)};var P=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])}};c.filters=[],c.addFilter=function(t){this.filters.push(t)};var R=/MSIE 6/;c.defake=function(t,e){var n=new S.workingXHR;h(["open","setRequestHeader","send","abort","getResponseHeader","getAllResponseHeaders","addEventListener","overrideMimeType","removeEventListener"],function(e){t[e]=function(){return P(n,e,arguments)}});var r=function(e){h(e,function(e){try{t[e]=n[e]}catch(t){if(!R.test(navigator.userAgent))throw t}})},o=function(){t.readyState=n.readyState,n.readyState>=c.HEADERS_RECEIVED&&r(["status","statusText"]),n.readyState>=c.LOADING&&r(["responseText","response"]),n.readyState===c.DONE&&r(["responseXML"]),t.onreadystatechange&&t.onreadystatechange.call(t,{target:t})};if(n.addEventListener){for(var i in t.eventListeners)t.eventListeners.hasOwnProperty(i)&&h(t.eventListeners[i],function(t){n.addEventListener(i,t)});n.addEventListener("readystatechange",o)}else n.onreadystatechange=o;P(n,"open",e)},c.useFilters=!1,c.parseXML=function(t){if(""!==t)try{if("undefined"!=typeof DOMParser){var e=new DOMParser;return e.parseFromString(t,"text/xml")}var n=new window.ActiveXObject("Microsoft.XMLDOM");return n.async="false",n.loadXML(t),n}catch(t){}return null},c.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 F="undefined"!=typeof i&&i.exports&&!0,I="object"==typeof n(301)&&n(301);return I?(r=E,o="function"==typeof r?r.call(e,n,e,i):r,!(void 0!==o&&(i.exports=o)),void 0):F?void E(n(325),i.exports,i):void(t&&x(t))}("object"==typeof sinon&&sinon,"undefined"!=typeof t?t:self)}).call(e,function(){return this}(),n(102)(t))},function(t,e){function n(){}function r(){}function o(){}function i(){}function a(){}function s(){}function u(){}"undefined"!=typeof window&&(n=sinon.timers.setTimeout,r=sinon.timers.clearTimeout,o=sinon.timers.setImmediate,i=sinon.timers.clearImmediate,a=sinon.timers.setInterval,s=sinon.timers.clearInterval,u=sinon.timers.Date)},function(t,e){function n(){}"undefined"!=typeof window&&(n=sinon.xdr.XDomainRequest||void 0)},function(t,e){function n(){}"undefined"!=typeof window&&(n=sinon.xhr.XMLHttpRequest||void 0)},function(t,e,n){var r,o;(function(t){!function(i){"use strict";function a(t){function e(t,n,r,o,i){var a,s;if("function"==typeof Object.getOwnPropertyNames)Object.getOwnPropertyNames(t).forEach(function(e){if(i[e]!==!0){i[e]=!0;var a="function"==typeof Object.getOwnPropertyDescriptor(t,e).get?o:t;n.call(r,a[e],e,a)}}),a=Object.getPrototypeOf(t),a&&e(a,n,r,o,i);else for(s in t)n.call(r,t[s],s,t)}function n(t,n,r){return e(t,n,r,t,{})}return t.walk=n,t.walk}function s(t,e,n){var r=t("./util/core");n.exports=a(r)}var u="undefined"!=typeof t&&t.exports&&!0,c="object"==typeof n(301)&&n(301);return c?(r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o)),void 0):u?void s(n(304),t.exports,t):void(i&&a(i))}("object"==typeof sinon&&sinon)}).call(e,n(102)(t))},function(t,e,n){var r=n(338),o=Object.prototype,i="should";try{var a=r.extend(i,o);r._prevShould=a}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}function o(t){return t instanceof Number||t instanceof String||t instanceof Boolean}function i(t){return"symbol"==typeof t?t:String(t)}function a(t,e){return O.getFormatter(e).format(t)}function s(t){var e=O.getFormatter();return x.formatPlainObjectKey.call(e,t)}function u(t){if(j.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=T(this.stackStartFunction),o=n.indexOf("\n"+r);if(o>=0){var i=n.indexOf("\n",o+1);n=n.substring(i+1)}}this.stack=n}}}function c(t){return A+t}function l(t){return t.split("\n").map(c).join("\n")}function f(t){j.merge(this,t),t.message||Object.defineProperty(this,"message",{get:function(){return this._message||(this._message=this.generateMessage(),this.generatedMessage=!0),this._message}})}function h(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}function p(){h.apply(this,arguments)}function d(t,e,n,r,o){var i=new h(t);i.params={operator:r,expected:e,message:n,stackStartFunction:o||d},i.fail()}function y(t,e){t||d(t,!0,e,"==",S.ok)}function v(t,e){return!(!t||!e)&&("[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e||e.call({},t)===!0)}function g(t,e,n,r){var o;"string"==typeof n&&(r=n,n=null);try{e()}catch(t){o=t}if(r=(n&&n.name?" ("+n.name+")":".")+(r?" "+r:"."),t&&!o&&d(o,n,"Missing expected exception"+r),!t&&v(o,n)&&d(o,n,"Got unwanted exception"+r),t&&o&&n&&!v(o,n)||!t&&o)throw o}function m(t,e,n){return((t.path.length>0?"at "+t.path.map(s).join(" -> "):"")+(t.a===e?"":", A has "+a(t.a))+(t.b===n?"":" and B has "+a(t.b))+(t.showReason?" because "+t.reason:"")).trim()}function _(t){return new h(t)}var b=r(n(339)),w=r(n(340)),x=r(n(341)),E=n(342),j=n(343),T=x.functionName,O={typeAdaptors:E.defaultTypeAdaptorStorage,getFormatter:function(t){return new x.Formatter(t||O)}},A=" ";u.prototype=Object.create(Error.prototype,{name:{value:"AssertionError"},generateMessage:{value:function(){if(!this.operator&&this.previous)return this.previous.message;var t=a(this.actual),e="expected"in this?" "+a(this.expected):"",n="details"in this&&this.details?" ("+this.details+")":"",r=this.previous?"\n"+l(this.previous.message):"";return"expected "+t+(this.negate?" not ":" ")+this.operator+e+n+r}}}),f.prototype={generateMessage:u.prototype.generateMessage},h.prototype={constructor:h,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 f(e):new u(e)},fail:function(){return this.assert(!1)}},p.prototype.then=function(t,e){return this.obj.then(t,e)},h.add=function(t,e){Object.defineProperty(h.prototype,t,{enumerable:!0,configurable:!0,value:function(){var n=new h(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 u||t instanceof f){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(p.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}})},h.addChain=function(t,e){e=e||function(){},Object.defineProperty(h.prototype,t,{get:function(){return e.call(this),this},enumerable:!0}),Object.defineProperty(p.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.obj=this.obj.then(function(e){return e[t]}),this}})},h.alias=function(t,e){var n=Object.getOwnPropertyDescriptor(h.prototype,t);if(!n)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(h.prototype,e,n);var r=Object.getOwnPropertyDescriptor(p.prototype,t);r&&Object.defineProperty(p.prototype,e,r)},h.addChain("not",function(){this.negate=!this.negate}),h.addChain("any",function(){this.anyOne=!0}),h.addChain("only",function(){this.onlyThis=!0});var k=Array.prototype.slice,S=y;S.fail=d,S.ok=y,S.equal=function(t,e,n){t!=e&&d(t,e,n,"==",S.equal)},S.notEqual=function(t,e,n){t==e&&d(t,e,n,"!=",S.notEqual)},S.deepEqual=function(t,e,n){0!==w(t,e).length&&d(t,e,n,"deepEqual",S.deepEqual)},S.notDeepEqual=function(t,e,n){w(t,e).result&&d(t,e,n,"notDeepEqual",S.notDeepEqual)},S.strictEqual=function(t,e,n){t!==e&&d(t,e,n,"===",S.strictEqual)},S.notStrictEqual=function(t,e,n){t===e&&d(t,e,n,"!==",S.notStrictEqual)},S.throws=function(){g.apply(this,[!0].concat(k.call(arguments)))},S.doesNotThrow=function(){g.apply(this,[!1].concat(k.call(arguments)))},S.ifError=function(t){if(t)throw t};var C=function(t){var e=t.format;j.merge(t,S),t.exist=t.exists=function(n,r){if(null==n)throw new u({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 u({message:r||"expected "+e(n)+" to not exist",stackStartFunction:t.not.exist})}},P=function(t,e){["an","of","a","and","be","been","has","have","with","is","which","the","it"].forEach(function(t){e.addChain(t)})},R=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)})},F=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")},I=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 "+T(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]())})},M=function(t,e){function n(n,r,o){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,i=!1;E.forEach(e,function(e){try{return t(e)[o](n),i=!0,!1}catch(e){if(e instanceof t.AssertionError)return;throw e}}),this.assert(i)})}e.add("eql",function(e,n){this.params={operator:"to equal",expected:e,message:n};var r=this.obj,o=w(this.obj,e,t.config);this.params.details=o.map(function(t){return m(t,r,e)}).join(", "),this.params.showDiff=0===w(b(r),b(e)).length,this.assert(0===o.length)}),e.add("equal",function(t,e){this.params={operator:"to be",expected:t,message:e},this.params.showDiff=0===w(b(this.obj),b(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")},N=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(o){r.negate&&r.fail();var i=!0,a="";if("string"==typeof e)i=e===o.message;else if(e instanceof RegExp)i=e.test(o.message);else if("function"==typeof e)i=o instanceof e;else if(null!==e&&"object"==typeof e)try{t(o).match(e)}catch(e){if(!(e instanceof t.AssertionError))throw e;a=": "+e.message,i=!1}if(i){if("function"==typeof e&&n)try{t(o).match(n)}catch(e){if(!(e instanceof t.AssertionError))throw e;a=": "+e.message,i=!1}}else"string"==typeof e||e instanceof RegExp?a=" with a message matching "+t.format(e)+", but got '"+o.message+"'":"function"==typeof e&&(a=" of type "+T(e)+", but got "+T(o.constructor));return r.params.operator+=a,r.assert(i),o})},Object.defineProperty(e.prototype,"finally",{get:function(){t(this.obj).be.a.Promise();var e=this;return new p(this.obj.then(function(n){var r=t(n);return r.negate=e.negate,r.anyOne=e.anyOne,r}))}}),e.alias("finally","eventually")},D=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)})},L=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):E.isIterable(r)?this.assert(E.some(r,function(t){return 0===w(t,e).length})):E.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(E.isIterable(r)&&E.isIterable(e)){for(var o=E.iterator(r),i=E.iterator(e),a=o.next(),s=i.next();!a.done&&!s.done;){try{t(a.value[1]).containDeepOrdered(s.value[1]),s=i.next()}catch(e){if(!(e instanceof t.AssertionError))throw e}a=o.next()}this.assert(s.done)}else null!=r&&null!=e&&"object"==typeof r&&"object"==typeof e?(E.forEach(e,function(e,n){t(r[n]).containDeepOrdered(e)}),E.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(E.isIterable(r)&&E.isIterable(e)){var o={};E.forEach(e,function(e){this.assert(E.some(r,function(n,r){if(r in o)return!1;try{return t(n).containDeep(e),o[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?(E.forEach(e,function(e,n){t(r[n]).containDeep(e)}),E.isEmpty(e)&&this.eql(e)):this.eql(e)})},B=Array.prototype.slice,q=function(t,e){function n(){var t={};if(arguments.length>1)t.names=B.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}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 o=this.obj;this.have.ownProperty(e),t(Object.getOwnPropertyDescriptor(Object(o),e)).have.properties(n)}),e.add("enumerable",function(t,e){t=i(t),this.params={operator:"to have enumerable property "+s(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=n.apply(null,arguments);this.params={operator:"to have enumerables "+e.names.map(s)};var r=this.obj;e.names.forEach(function(e){t(r).have.enumerable(e)})}),e.add("property",function(t,e){if(t=i(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=B.call(arguments):Array.isArray(t)||("string"==typeof t||"symbol"==typeof t?t=[t]:(e=t,t=Object.keys(t)));var n=Object(this.obj),o=[];t.forEach(function(t){t in n||o.push(s(t))});var i=o;0===i.length?i=t.map(s):this.anyOne&&(i=t.filter(function(t){return o.indexOf(s(t))<0}).map(s));var a=(1===i.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+i.join(", ");this.params={obj:this.obj,operator:a},this.assert(0===o.length||this.anyOne&&o.length!=t.length);var u=Object.keys(e);if(u.length){var c=[];i=[],u.forEach(function(t){var o=e[t];0!==w(n[t],o).length?c.push(s(t)+" of "+r(o)+" (got "+r(n[t])+")"):i.push(s(t)+" of "+r(o))}),(0!==c.length&&!this.anyOne||this.anyOne&&0===i.length)&&(i=c),a=(1===i.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+i.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=i(t),this.params={actual:this.obj,operator:"to have own property "+s(t),message:e},this.assert(j.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(E.isEmpty(this.obj))},!0),e.add("keys",function(t){t=B.call(arguments);var e=Object(this.obj),n=t.filter(function(t){return!E.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=E.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},E.size(this.obj).should.be.exactly(t)}),e.add("propertyByPath",function(e){e=B.call(arguments);var n=e.map(s);e=e.map(i);for(var r,o=t(Object(this.obj)),a=[];e.length;)r=e.shift(),this.params={operator:"to have property by path "+n.join(", ")+" - failed on "+s(r)},o=o.have.property(r),a.push(r);this.params={obj:this.obj,operator:"to have property by path "+n.join(", ")},this.obj=o.obj})},U=function(t,e){var n=t.format;e.add("throw",function(e,r){var o=this.obj,i={},a="",s=!1;if(j.isGeneratorFunction(o))return t(o()).throw(e,r);if(j.isIterator(o))return t(o.next.bind(o)).throw(e,r);this.is.a.Function();var u=!0;try{o()}catch(t){s=!0,i=t}if(s)if(e){if("string"==typeof e)u=e==i.message;else if(e instanceof RegExp)u=e.test(i.message);else if("function"==typeof e)u=i instanceof e;else if(null!=e)try{t(i).match(e)}catch(e){if(!(e instanceof t.AssertionError))throw e;a=": "+e.message,u=!1}if(u){if("function"==typeof e&&r)try{t(i).match(r)}catch(e){if(!(e instanceof t.AssertionError))throw e;a=": "+e.message,u=!1}}else"string"==typeof e||e instanceof RegExp?a=" with a message matching "+n(e)+", but got '"+i.message+"'":"function"==typeof e&&(a=" of type "+T(e)+", but got "+T(i.constructor))}else a=" (got "+n(i)+")";this.params={operator:"to throw exception"+a},this.assert(s),this.assert(u)}),e.alias("throw","throwError")},V=function(t,e){var n=t.format;e.add("match",function(e,r){if(this.params={operator:"to match "+n(e),message:r},0!==w(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 o=[],i=[];E.forEach(this.obj,function(t,r){e.exec(t)?i.push(s(r)):o.push(s(r)+" ("+n(t)+")")},this),o.length&&(this.params.operator+="\n not matched properties: "+o.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0===o.length)}else this.assert(!1);else if("function"==typeof e){var a;a=e(this.obj),"boolean"==typeof a&&this.assert(a)}else null!=e&&null!=this.obj&&"object"==typeof e&&"object"==typeof this.obj?(o=[],i=[],E.forEach(e,function(e,r){try{t(this.obj).have.property(r).which.match(e),i.push(s(r))}catch(e){if(!(e instanceof t.AssertionError))throw e;o.push(s(r)+" ("+n(this.obj[r])+")")}},this),o.length&&(this.params.operator+="\n not matched properties: "+o.join(", ")),i.length&&(this.params.operator+="\n matched properties: "+i.join(", ")),this.assert(0===o.length)):this.assert(!1)}),e.add("matchEach",function(e,r){this.params={operator:"to match each "+n(e),message:r},E.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(E.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")};_.AssertionError=u,_.Assertion=h,_.modules={format:x,type:b,equal:w},_.format=a,_.config=O,_.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 _(o(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:n,proto:e}},_.noConflict=function(t){return t=t||_._prevShould,t&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),_},_.use=function(t){return t(_,_.Assertion),this},_.use(C).use(P).use(R).use(F).use(M).use(I).use(D).use(q).use(U).use(V).use(L).use(N),t.exports=_},function(t,e,n){(function(e){"use strict";function n(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}function r(){this.checks=[]}function o(t){return s.getType(t)}var i={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"};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 a=Object.prototype.toString;r.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(r,o){if(o===t)return new n(e)})},addClass:function(t,e,r){return this.add(function(o,a,s){if(s===t)return new n(i.OBJECT,e,r)})},getFirstMatch:function(t){for(var e=typeof t,n=a.call(t),r=0,o=this.checks.length;r<o;r++){var i=this.checks[r].call(this,t,e,n);if("undefined"!=typeof i)return{result:i,func:this.checks[r],index:r}}},getType:function(t){var e=this.getFirstMatch(t);return e&&e.result}};var s=new r;s.addTypeOf(i.NUMBER,i.NUMBER).addTypeOf(i.UNDEFINED,i.UNDEFINED).addTypeOf(i.STRING,i.STRING).addTypeOf(i.BOOLEAN,i.BOOLEAN).addTypeOf(i.FUNCTION,i.FUNCTION).addTypeOf(i.SYMBOL,i.SYMBOL).add(function(t){if(null===t)return new n(i.NULL)}).addClass("[object String]",i.STRING).addClass("[object Boolean]",i.BOOLEAN).addClass("[object Number]",i.NUMBER).addClass("[object Array]",i.ARRAY).addClass("[object RegExp]",i.REGEXP).addClass("[object Error]",i.ERROR).addClass("[object Date]",i.DATE).addClass("[object Arguments]",i.ARGUMENTS).addClass("[object ArrayBuffer]",i.ARRAY_BUFFER).addClass("[object Int8Array]",i.TYPED_ARRAY,"int8").addClass("[object Uint8Array]",i.TYPED_ARRAY,"uint8").addClass("[object Uint8ClampedArray]",i.TYPED_ARRAY,"uint8clamped").addClass("[object Int16Array]",i.TYPED_ARRAY,"int16").addClass("[object Uint16Array]",i.TYPED_ARRAY,"uint16").addClass("[object Int32Array]",i.TYPED_ARRAY,"int32").addClass("[object Uint32Array]",i.TYPED_ARRAY,"uint32").addClass("[object Float32Array]",i.TYPED_ARRAY,"float32").addClass("[object Float64Array]",i.TYPED_ARRAY,"float64").addClass("[object Bool16x8]",i.SIMD,"bool16x8").addClass("[object Bool32x4]",i.SIMD,"bool32x4").addClass("[object Bool8x16]",i.SIMD,"bool8x16").addClass("[object Float32x4]",i.SIMD,"float32x4").addClass("[object Int16x8]",i.SIMD,"int16x8").addClass("[object Int32x4]",i.SIMD,"int32x4").addClass("[object Int8x16]",i.SIMD,"int8x16").addClass("[object Uint16x8]",i.SIMD,"uint16x8").addClass("[object Uint32x4]",i.SIMD,"uint32x4").addClass("[object Uint8x16]",i.SIMD,"uint8x16").addClass("[object DataView]",i.DATA_VIEW).addClass("[object Map]",i.MAP).addClass("[object WeakMap]",i.WEAK_MAP).addClass("[object Set]",i.SET).addClass("[object WeakSet]",i.WEAK_SET).addClass("[object Promise]",i.PROMISE).addClass("[object Blob]",i.BLOB).addClass("[object File]",i.FILE).addClass("[object FileList]",i.FILE_LIST).addClass("[object XMLHttpRequest]",i.XHR).add(function(t){
|
|
10
|
-
if(typeof Promise===i.FUNCTION&&t instanceof Promise||typeof t.then===i.FUNCTION)return new n(i.OBJECT,i.PROMISE)}).add(function(t){if("undefined"!=typeof e&&t instanceof e)return new n(i.OBJECT,i.BUFFER)}).add(function(t){if("undefined"!=typeof Node&&t instanceof Node)return new n(i.OBJECT,i.HTML_ELEMENT,t.nodeName)}).add(function(t){if(t.Boolean===Boolean&&t.Number===Number&&t.String===String&&t.Date===Date)return new n(i.OBJECT,i.HOST)}).add(function(){return new n(i.OBJECT)}),o.checker=s,o.TypeChecker=r,o.Type=n,Object.keys(i).forEach(function(t){o[t]=i[t]}),t.exports=o}).call(e,n(176).Buffer)},function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}function o(t){for(var e=arguments,n=1,r=e.length;n<r;n++)t=t.replace(/%s/,e[n]);return t}function i(t,e,n,r){this.a=t,this.b=e,this.reason=n,this.path=r}function a(t){return t.type+(t.cls?"("+t.cls+(t.sub?" "+t.sub:"")+")":"")}function s(t,e,n,r){e[t]="boolean"!=typeof n[t]?r[t]:n[t]}function u(t,e,n,r){t=t||{},s("checkProtoEql",this,t,w),s("plusZeroAndMinusZeroEqual",this,t,w),s("checkSubType",this,t,w),s("collectAllFails",this,t,w),this.a=e,this.b=n,this._meet=t._meet||[],this.fails=t.fails||[],this.path=r||[]}function c(t){this.name="ShortcutError",this.message="fail fast",this.fail=t}function l(t,e,n){return new u(n,t,e).check()}var f=r(n(339)),h=Object.prototype.hasOwnProperty,p="+0 is not equal to -0",d="A has type %s and B has type %s",y="A is not equal to B",v="A and B have different prototypes",g="A wrapped value is not equal to B wrapped value",m="function A is not equal to B by source code value (via .toString call)",_="%s has no key %s",b="Set/Map missing key %s",w={checkProtoEql:!0,checkSubType:!0,plusZeroAndMinusZeroEqual:!0,collectAllFails:!1},x="_check_";c.prototype=Object.create(Error.prototype),u.checkStrictEquality=function(t,e){this.collectFail(t!==e,y)},u.add=function(t,e,n,r){var o=Array.prototype.slice.call(arguments);r=o.pop(),u.prototype[x+o.join("_")]=r},u.prototype={check:function(){try{this.check0()}catch(t){if(t instanceof c)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,p);var n=f(t),r=f(e);if(n.type!==r.type||n.cls!==r.cls||n.sub!==r.sub)return this.collectFail(!0,o(d,a(n),a(r)));var i=n.type,s=n.type;n.cls&&(i+="_"+n.cls,s+="_"+n.cls),n.sub&&(s+="_"+n.sub);var u=this[x+s]||this[x+i]||this[x+n.type]||this.defaultCheck;u.call(this,this.a,this.b)},collectFail:function(t,e,n){if(t){var r=new i(this.a,this.b,e,this.path);if(r.showReason=!!n,this.fails.push(r),!this.collectAllFails)throw new c(r)}},checkPlainObjectsEquality:function(t,e){for(var n=this._meet,r=this._meet.length;r--;){var i=n[r];if(i[0]===t&&i[1]===e)return}n.push([t,e]);var a;for(a in e)h.call(e,a)&&(h.call(t,a)?this.checkPropertyEquality(a):this.collectFail(!0,o(_,"A",a)));for(a in t)h.call(t,a)&&this.collectFail(!h.call(e,a),o(_,"B",a));n.pop(),this.checkProtoEql&&this.collectFail(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e),v,!0)},checkPropertyEquality:function(t){var e=new u(this,this.a[t],this.b[t],this.path.concat([t]));e.check0()},defaultCheck:u.checkStrictEquality},u.add(f.NUMBER,function(t,e){this.collectFail(t!==t&&e===e||e!==e&&t===t||t!==e&&t===t&&e===e,y)}),[f.SYMBOL,f.BOOLEAN,f.STRING].forEach(function(t){u.add(t,u.checkStrictEquality)}),u.add(f.FUNCTION,function(t,e){this.collectFail(t.toString()!==e.toString(),m),this.checkPlainObjectsEquality(t,e)}),u.add(f.OBJECT,f.REGEXP,function(t,e){for(var n=["source","global","multiline","lastIndex","ignoreCase","sticky","unicode"];n.length;)this.checkPropertyEquality(n.shift());this.checkPlainObjectsEquality(t,e)}),u.add(f.OBJECT,f.DATE,function(t,e){this.collectFail(+t!==+e,y),this.checkPlainObjectsEquality(t,e)}),[f.NUMBER,f.BOOLEAN,f.STRING].forEach(function(t){u.add(f.OBJECT,t,function(t,e){this.collectFail(t.valueOf()!==e.valueOf(),g),this.checkPlainObjectsEquality(t,e)})}),u.add(f.OBJECT,function(t,e){this.checkPlainObjectsEquality(t,e)}),[f.ARRAY,f.ARGUMENTS,f.TYPED_ARRAY].forEach(function(t){u.add(f.OBJECT,t,function(t,e){this.checkPropertyEquality("length"),this.checkPlainObjectsEquality(t,e)})}),u.add(f.OBJECT,f.ARRAY_BUFFER,function(t,e){this.checkPropertyEquality("byteLength"),this.checkPlainObjectsEquality(t,e)}),u.add(f.OBJECT,f.ERROR,function(t,e){this.checkPropertyEquality("name"),this.checkPropertyEquality("message"),this.checkPlainObjectsEquality(t,e)}),u.add(f.OBJECT,f.BUFFER,function(t){this.checkPropertyEquality("length");for(var e=t.length;e--;)this.checkPropertyEquality(e)}),[f.MAP,f.SET,f.WEAK_MAP,f.WEAK_SET].forEach(function(t){u.add(f.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 i=e.entries(),a=!1,s=i.next();!s.done;s=i.next()){var u=l(r.value[0],s.value[0],{collectAllFails:!1,_meet:this._meet});0===u.length&&(a=!0,l(r.value[1],s.value[1],this))}a||this.collectFail(!0,o(b,r.value[0]))}this._meet.pop(),this.checkPlainObjectsEquality(t,e)})}),l.EQ=u,t.exports=l},function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}function o(t){return!!t.match(/\d+/)}function i(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){return function(e){var n=t(e);return n.sort(i),n}}function s(t){t=t||{},this.seen=[];var e;e="function"==typeof t.keysFunc?t.keysFunc:t.keys===!1?Object.getOwnPropertyNames:Object.keys,this.getKeys=a(e),this.maxLineLength="number"==typeof t.maxLineLength?t.maxLineLength:60,this.propSep=t.propSep||",",this.isUTCdate=!!t.isUTCdate}function u(t,e){return t.split(M).map(function(t){return e+t}).join(M)}function c(t,e,n){t=String(t);var r=!1;if(e<0&&(r=!0,e=-e),t.length<e){var o=new Array(e-t.length+1).join(n);return r?t+o:o+t}return t}function l(t,e){return c(t,e,"0")}function f(t){if(t.name)return t.name;var e=t.toString().match(N);if(null===e)return"";var n=e[1];return n}function h(t){for(;t;){var e=Object.getOwnPropertyDescriptor(t,"constructor");if(void 0!==e&&"function"==typeof e.value){var n=f(e.value);if(""!==n)return n}t=Object.getPrototypeOf(t)}}function p(t){return u(t,D)}function d(t,e){e=e||{};var n=e.filterKey||function(){return!0},r=e.formatKey||this.format,o=e.formatValue||this.format,i="undefined"!=typeof e.keyValueSep?e.keyValueSep:": ";this.seen.push(t);var a=0,s=[];I.forEach(t,function(t,e){if(n(e)){var u=r.call(this,e),c=o.call(this,t,e),l=u?u+i+c:c;a+=l.length,s.push(l)}},this),this.seen.pop(),(e.additionalKeys||[]).forEach(function(t){var e=t[0]+i+this.format(t[1]);a+=e.length,s.push(e)},this);var u=e.prefix||h(t)||"";u.length>0&&(u+=" ");var c,l;Array.isArray(e.brackets)?(c=e.brackets[0],l=e.brackets[1]):(c="{",l="}");var f=e.value||"";return 0===s.length?f||u+c+l:a<=this.maxLineLength?u+c+" "+(f?f+" ":"")+s.join(this.propSep+" ")+" "+l:u+c+"\n"+(f?" "+f+"\n":"")+s.map(p).join(this.propSep+"\n")+"\n"+l}function y(t){return"string"==typeof t&&t.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)?t:this.format(t)}function v(t,e){var n;try{n=Object.getOwnPropertyDescriptor(t,e)||{value:t[e]}}catch(t){n={value:t}}return n}function g(t,e){var n=v(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||{},e.keyValueSep=": ",e.formatKey=e.formatKey||y,e.formatValue=e.formatValue||function(e,n){return g.call(this,t,n)},d.call(this,t,e)}function _(t){return m.call(this,t,{additionalKeys:[["[[PrimitiveValue]]",t.valueOf()]]})}function b(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]]})}function w(t){return m.call(this,t,{value:String(t)})}function x(t){return m.call(this,t,{prefix:"Function",additionalKeys:[["name",f(t)]]})}function E(t){return m.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return y.call(this,t)},brackets:["[","]"]})}function j(t){return m.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return y.call(this,t)},brackets:["[","]"],prefix:"Arguments"})}function T(t,e){var n=e?"UTC":"",r=t["get"+n+"FullYear"]()+"-"+l(t["get"+n+"Month"]()+1,2)+"-"+l(t["get"+n+"Date"](),2),o=l(t["get"+n+"Hours"](),2)+":"+l(t["get"+n+"Minutes"](),2)+":"+l(t["get"+n+"Seconds"](),2)+"."+l(t["get"+n+"Milliseconds"](),3),i=t.getTimezoneOffset(),a=Math.abs(i),s=Math.floor(a/60),u=a-60*s,c=(i<0?"+":"-")+l(s,2)+l(u,2);return r+" "+o+(e?"":" "+c)}function O(t){return m.call(this,t,{value:T(t,this.isUTCdate)})}function A(t){return m.call(this,t,{prefix:t.name,additionalKeys:[["message",t.message]]})}function k(t,e,n){return function(r){for(var o=this.byteArrayMaxLength||50,i=r[t],a=[],s=0,u=0;u<o&&u<i;u++){var c=r[u]||0,f=l(c.toString(16),n);s+=f.length,a.push(f)}var h=r.constructor.name||e||"";return h&&(h+=" "),0===a.length?h+"[]":s<=this.maxLineLength?h+"[ "+a.join(this.propSep+" ")+" ]":h+"[\n"+a.map(p).join(this.propSep+"\n")+"\n]"}}function S(t){return d.call(this,t,{keyValueSep:" => "})}function C(t){return d.call(this,t,{keyValueSep:"",formatKey:function(){return""}})}function P(t,e){return function(n){for(var r=n.constructor,o=r.extractLane,i=0,a=[],s=0;s<e;s++){var u=this.format(o(n,s));i+=u.length,a.push(u)}return i<=this.maxLineLength?t+" [ "+a.join(this.propSep+" ")+" ]":t+" [\n"+a.map(p).join(this.propSep+"\n")+"\n]"}}function R(t,e){return new s(e).format(t)}var F=r(n(339)),I=n(342);s.prototype={constructor:s,format:function(t){var e=F(t);if(this.alreadySeen(t))return"[Circular]";for(var n=e.toTryTypes(),r=this.defaultFormat;n.length;){var o=n.shift(),i=s.formatterFunctionName(o);if(this[i]){r=this[i];break}}return r.call(this,t).trim()},defaultFormat:function(t){return String(t)},alreadySeen:function(t){return this.seen.indexOf(t)>=0}},s.addType=function(t,e){s.prototype[s.formatterFunctionName(t)]=e},s.formatterFunctionName=function(t){return"_format_"+t.toString("_")};var M="\n",N=/^\s*function\s*(\S*)\s*\(/,D=" ";R.Formatter=s,R.addSpaces=p,R.pad0=l,R.functionName=f,R.constructorName=h,R.formatPlainObjectKey=y,R.formatPlainObject=m,R.typeAdaptorForEachFormat=d,s.addType(new F.Type(F.UNDEFINED),function(){return"undefined"}),s.addType(new F.Type(F.NULL),function(){return"null"}),s.addType(new F.Type(F.BOOLEAN),function(t){return t?"true":"false"}),s.addType(new F.Type(F.SYMBOL),function(t){return t.toString()}),s.addType(new F.Type(F.NUMBER),function(t){return 0===t&&1/t<0?"-0":String(t)}),s.addType(new F.Type(F.STRING),function(t){return"'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"}),s.addType(new F.Type(F.FUNCTION),x),s.addType(new F.Type(F.OBJECT),m),s.addType(new F.Type(F.OBJECT,F.NUMBER),_),s.addType(new F.Type(F.OBJECT,F.BOOLEAN),_),s.addType(new F.Type(F.OBJECT,F.STRING),b),s.addType(new F.Type(F.OBJECT,F.REGEXP),w),s.addType(new F.Type(F.OBJECT,F.ARRAY),E),s.addType(new F.Type(F.OBJECT,F.ARGUMENTS),j),s.addType(new F.Type(F.OBJECT,F.DATE),O),s.addType(new F.Type(F.OBJECT,F.ERROR),A),s.addType(new F.Type(F.OBJECT,F.SET),C),s.addType(new F.Type(F.OBJECT,F.MAP),S),s.addType(new F.Type(F.OBJECT,F.WEAK_MAP),S),s.addType(new F.Type(F.OBJECT,F.WEAK_SET),C),s.addType(new F.Type(F.OBJECT,F.BUFFER),k("length","Buffer",2)),s.addType(new F.Type(F.OBJECT,F.ARRAY_BUFFER),k("byteLength","ArrayBuffer",2)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"int8"),k("length","Int8Array",2)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"uint8"),k("length","Uint8Array",2)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"uint8clamped"),k("length","Uint8ClampedArray",2)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"int16"),k("length","Int16Array",4)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"uint16"),k("length","Uint16Array",4)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"int32"),k("length","Int32Array",8)),s.addType(new F.Type(F.OBJECT,F.TYPED_ARRAY,"uint32"),k("length","Uint32Array",8)),s.addType(new F.Type(F.OBJECT,F.SIMD,"bool16x8"),P("Bool16x8",8)),s.addType(new F.Type(F.OBJECT,F.SIMD,"bool32x4"),P("Bool32x4",4)),s.addType(new F.Type(F.OBJECT,F.SIMD,"bool8x16"),P("Bool8x16",16)),s.addType(new F.Type(F.OBJECT,F.SIMD,"float32x4"),P("Float32x4",4)),s.addType(new F.Type(F.OBJECT,F.SIMD,"int16x8"),P("Int16x8",8)),s.addType(new F.Type(F.OBJECT,F.SIMD,"int32x4"),P("Int32x4",4)),s.addType(new F.Type(F.OBJECT,F.SIMD,"int8x16"),P("Int8x16",16)),s.addType(new F.Type(F.OBJECT,F.SIMD,"uint16x8"),P("Uint16x8",8)),s.addType(new F.Type(F.OBJECT,F.SIMD,"uint32x4"),P("Uint32x4",4)),s.addType(new F.Type(F.OBJECT,F.SIMD,"uint8x16"),P("Uint8x16",16)),s.addType(new F.Type(F.OBJECT,F.PROMISE),function(){return"[Promise]"}),s.addType(new F.Type(F.OBJECT,F.XHR),function(){return"[XMLHttpRequest]"}),s.addType(new F.Type(F.OBJECT,F.HTML_ELEMENT),function(t){return t.outerHTML}),s.addType(new F.Type(F.OBJECT,F.HTML_ELEMENT,"#text"),function(t){return t.nodeValue}),s.addType(new F.Type(F.OBJECT,F.HTML_ELEMENT,"#document"),function(t){return t.documentElement.outerHTML}),s.addType(new F.Type(F.OBJECT,F.HOST),function(){return"[Host]"}),t.exports=R},function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}function o(t){this._obj=t}function i(){this._typeAdaptors=[],this._iterableTypes={}}function a(t,e,n){if(v.isGeneratorFunction(t))return a(t(),e,n);if(v.isIterator(t))for(var r=t.next();!r.done;){if(e.call(n,r.value,"value",t)===!1)return;r=t.next()}else{var o=g(t),i=m.requireAdaptor(o,"forEach");i(t,e,n)}}function s(t){var e=g(t),n=m.getAdaptor(e,"size");if(n)return n(t);var r=0;return a(t,function(){r+=1}),r}function u(t){var e=g(t),n=m.getAdaptor(e,"isEmpty");if(n)return n(t);var r=!0;return a(t,function(){return r=!1,!1}),r}function c(t,e){var n=g(t),r=m.requireAdaptor(n,"has");return r(t,e)}function l(t,e){var n=g(t),r=m.requireAdaptor(n,"get");return r(t,e)}function f(t,e,n){var r=n;return a(t,function(n,o){r=e(r,n,o,t)}),r}function h(t,e,n){var r=!1;return a(t,function(o,i){if(e.call(n,o,i,t))return r=!0,!1},n),r}function p(t,e,n){var r=!0;return a(t,function(o,i){if(!e.call(n,o,i,t))return r=!1,!1},n),r}function d(t){return m.isIterableType(g(t))}function y(t){return m.requireAdaptor(g(t),"iterator")(t)}Object.defineProperty(e,"__esModule",{value:!0});var v=n(343),g=r(n(339));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}),i.prototype={add:function(t,e,n,r){return this.addType(new g.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(),o=this._typeAdaptors[r];if(o&&o[e])return o[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 m=new i,_={forEach:function(t,e,n){for(var r in t)if(v.hasOwnProperty(t,r)&&v.propertyIsEnumerable(t,r)&&e.call(n,t[r],r,t)===!1)return},has:function(t,e){return v.hasOwnProperty(t,e)},get:function(t,e){return t[e]},iterator:function(t){return new o(t)}};m.addType(new g.Type(g.OBJECT),_),m.addType(new g.Type(g.FUNCTION),_);var b={has:function(t,e){return t.has(e)},get:function(t,e){return t.get(e)},forEach:function(t,e,n){var r=t.entries();a(r,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()}},w=v.merge({},b);w.get=function(t,e){if(t.has(e))return e},w.iterator=function(t){return t.values()},m.addType(new g.Type(g.OBJECT,g.MAP),b),m.addType(new g.Type(g.OBJECT,g.SET),w),m.addType(new g.Type(g.OBJECT,g.WEAK_SET),w),m.addType(new g.Type(g.OBJECT,g.WEAK_MAP),b),m.addType(new g.Type(g.STRING),{isEmpty:function(t){return""===t},size:function(t){return t.length}}),m.addIterableType(new g.Type(g.OBJECT,g.ARRAY)),m.addIterableType(new g.Type(g.OBJECT,g.ARGUMENTS)),m.addIterableType(new g.Type(g.OBJECT,g.SET)),e.defaultTypeAdaptorStorage=m,e.forEach=a,e.size=s,e.isEmpty=u,e.has=c,e.get=l,e.reduce=f,e.some=h,e.every=p,e.isIterable=d,e.iterator=y},function(t,e){"use strict";function n(t,e){return s.call(t,e)}function r(t,e){return u.call(t,e)}function o(t,e){if(t&&e)for(var n in e)t[n]=e[n];return t}function i(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)}function a(t){return"function"==typeof t&&/^function\s*\*\s*/.test(t.toString())}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;e.hasOwnProperty=n,e.propertyIsEnumerable=r,e.merge=o,e.isIterator=i,e.isGeneratorFunction=a},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";function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(346),n(667),n(668),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(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]&&e(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(347),n(395),n(396),n(397),n(398),n(400),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(413),n(415),n(417),n(419),n(422),n(423),n(424),n(428),n(430),n(432),n(435),n(436),n(437),n(438),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(448),n(449),n(450),n(452),n(453),n(454),n(456),n(458),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(475),n(476),n(480),n(481),n(482),n(483),n(485),n(486),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(501),n(502),n(504),n(505),n(511),n(512),n(514),n(515),n(516),n(520),n(521),n(522),n(523),n(524),n(526),n(527),n(528),n(529),n(532),n(534),n(535),n(536),n(538),n(540),n(542),n(543),n(544),n(546),n(547),n(548),n(549),n(560),n(564),n(565),n(567),n(568),n(572),n(573),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(589),n(590),n(591),n(592),n(593),n(595),n(596),n(597),n(598),n(599),n(601),n(602),n(603),n(605),n(606),n(607),n(608),n(609),n(610),n(611),n(612),n(614),n(615),n(617),n(618),n(619),n(620),n(623),n(624),n(626),n(627),n(628),n(629),n(631),n(632),n(633),n(634),n(635),n(636),n(637),n(638),n(639),n(640),n(642),n(643),n(644),n(645),n(646),n(647),n(648),n(649),n(650),n(651),n(652),n(654),n(655),n(656),n(657),n(658),n(659),n(660),n(661),n(662),n(663),n(664),n(665),n(666),t.exports=n(353)},function(t,e,n){"use strict";var r=n(348),o=n(349),i=n(350),a=n(352),s=n(362),u=n(366).KEY,c=n(351),l=n(367),f=n(369),h=n(363),p=n(370),d=n(371),y=n(372),v=n(373),g=n(388),m=n(356),_=n(357),b=n(376),w=n(360),x=n(361),E=n(389),j=n(392),T=n(394),O=n(355),A=n(374),k=T.f,S=O.f,C=j.f,P=r.Symbol,R=r.JSON,F=R&&R.stringify,I="prototype",M=p("_hidden"),N=p("toPrimitive"),D={}.propertyIsEnumerable,L=l("symbol-registry"),B=l("symbols"),q=l("op-symbols"),U=Object[I],V="function"==typeof P,H=r.QObject,W=!H||!H[I]||!H[I].findChild,z=i&&c(function(){return 7!=E(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=k(U,e);r&&delete U[e],S(t,e,n),r&&t!==U&&S(U,e,r)}:S,G=function(t){var e=B[t]=E(P[I]);return e._k=t,e},Y=V&&"symbol"==typeof P.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof P},X=function(t,e,n){return t===U&&X(q,e,n),m(t),e=w(e,!0),m(n),o(B,e)?(n.enumerable?(o(t,M)&&t[M][e]&&(t[M][e]=!1),n=E(n,{enumerable:x(0,!1)})):(o(t,M)||S(t,M,x(1,{})),t[M][e]=!0),z(t,e,n)):S(t,e,n)},J=function(t,e){m(t);for(var n,r=v(e=b(e)),o=0,i=r.length;i>o;)X(t,n=r[o++],e[n]);return t},$=function(t,e){return void 0===e?E(t):J(E(t),e)},K=function(t){var e=D.call(this,t=w(t,!0));return!(this===U&&o(B,t)&&!o(q,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,M)&&this[M][t])||e)},Z=function(t,e){if(t=b(t),e=w(e,!0),t!==U||!o(B,e)||o(q,e)){var n=k(t,e);return!n||!o(B,e)||o(t,M)&&t[M][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=C(b(t)),r=[],i=0;n.length>i;)o(B,e=n[i++])||e==M||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===U,r=C(n?q:b(t)),i=[],a=0;r.length>a;)!o(B,e=r[a++])||n&&!o(U,e)||i.push(B[e]);return i};V||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===U&&e.call(q,n),o(this,M)&&o(this[M],t)&&(this[M][t]=!1),z(this,t,x(1,n))};return i&&W&&z(U,t,{configurable:!0,set:e}),G(t)},s(P[I],"toString",function(){return this._k}),T.f=Z,O.f=X,n(393).f=j.f=Q,n(387).f=K,n(386).f=tt,i&&!n(368)&&s(U,"propertyIsEnumerable",K,!0),d.f=function(t){return G(p(t))}),a(a.G+a.W+a.F*!V,{Symbol:P});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var rt=A(p.store),ot=0;rt.length>ot;)y(rt[ot++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return o(L,t+="")?L[t]:L[t]=P(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in L)if(L[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!V,"Object",{create:$,defineProperty:X,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),R&&a(a.S+a.F*(!V||c(function(){var t=P();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(_(e)||void 0!==t)&&!Y(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Y(e))return e}),r[1]=e,F.apply(R,r)}}),P[I][N]||n(354)(P[I],N,P[I].valueOf),f(P,"Symbol"),f(Math,"Math",!0),f(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(351)(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(348),o=n(353),i=n(354),a=n(362),s=n(364),u="prototype",c=function(t,e,n){var l,f,h,p,d=t&c.F,y=t&c.G,v=t&c.S,g=t&c.P,m=t&c.B,_=y?r:v?r[e]||(r[e]={}):(r[e]||{})[u],b=y?o:o[e]||(o[e]={}),w=b[u]||(b[u]={});y&&(n=e);for(l in n)f=!d&&_&&void 0!==_[l],h=(f?_:n)[l],p=m&&f?s(h,r):g&&"function"==typeof h?s(Function.call,h):h,_&&a(_,l,h,t&c.U),b[l]!=h&&i(b,l,p),g&&w[l]!=h&&(w[l]=h)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(355),o=n(361);t.exports=n(350)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(356),o=n(358),i=n(360),a=Object.defineProperty;e.f=n(350)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(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(357);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(350)&&!n(351)(function(){return 7!=Object.defineProperty(n(359)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(357),o=n(348).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(357);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;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(348),o=n(354),i=n(349),a=n(363)("src"),s="toString",u=Function[s],c=(""+u).split(s);n(353).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.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(365);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,o){return t.call(e,n,r,o)}}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(363)("meta"),o=n(357),i=n(349),a=n(355).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(351)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},h=function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},p=function(t){return c&&d.NEED&&u(t)&&!i(t,r)&&l(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:h,onFreeze:p}},function(t,e,n){var r=n(353),o=n(348),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(368)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){var r=n(355).f,o=n(349),i=n(370)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(367)("wks"),o=n(363),i=n(348).Symbol,a="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=r},function(t,e,n){e.f=n(370)},function(t,e,n){var r=n(348),o=n(353),i=n(368),a=n(371),s=n(355).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(374),o=n(386),i=n(387);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),u=i.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(375),o=n(385);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(349),o=n(376),i=n(380)(!1),a=n(384)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(377),o=n(379);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(378);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(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(376),o=n(381),i=n(383);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=o(u.length),l=i(a,c);if(t&&n!=n){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(382),o=Math.min;t.exports=function(t){return t>0?o(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(382),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(367)("keys"),o=n(363);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(378);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(356),o=n(390),i=n(385),a=n(384)("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,e=n(359)("iframe"),r=i.length,o="<",a=">";for(e.style.display="none",n(391).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),c=t.F;r--;)delete c[u][i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=r(t),n=new s,s[u]=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(355),o=n(356),i=n(374);t.exports=n(350)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(348).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(376),o=n(393).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):o(r(t))}},function(t,e,n){var r=n(375),o=n(385).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(387),o=n(361),i=n(376),a=n(360),s=n(349),u=n(358),c=Object.getOwnPropertyDescriptor;e.f=n(350)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(352);r(r.S,"Object",{create:n(389)})},function(t,e,n){var r=n(352);r(r.S+r.F*!n(350),"Object",{defineProperty:n(355).f})},function(t,e,n){var r=n(352);r(r.S+r.F*!n(350),"Object",{defineProperties:n(390)})},function(t,e,n){var r=n(376),o=n(394).f;n(399)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},function(t,e,n){var r=n(352),o=n(353),i=n(351);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(401),o=n(402);n(399)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(379);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(349),o=n(401),i=n(384)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(401),o=n(374);n(399)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){n(399)("getOwnPropertyNames",function(){return n(392).f})},function(t,e,n){var r=n(357),o=n(366).onFreeze;n(399)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(357),o=n(366).onFreeze;
|
|
11
|
-
n(399)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(357),o=n(366).onFreeze;n(399)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(357);n(399)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(357);n(399)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(357);n(399)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(352);r(r.S+r.F,"Object",{assign:n(412)})},function(t,e,n){"use strict";var r=n(374),o=n(386),i=n(387),a=n(401),s=n(377),u=Object.assign;t.exports=!u||n(351)(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=a(t),u=arguments.length,c=1,l=o.f,f=i.f;u>c;)for(var h,p=s(arguments[c++]),d=l?r(p).concat(l(p)):r(p),y=d.length,v=0;y>v;)f.call(p,h=d[v++])&&(n[h]=p[h]);return n}:u},function(t,e,n){var r=n(352);r(r.S,"Object",{is:n(414)})},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(352);r(r.S,"Object",{setPrototypeOf:n(416).set})},function(t,e,n){var r=n(357),o=n(356),i=function(t,e){if(o(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(364)(Function.call,n(394).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){"use strict";var r=n(418),o={};o[n(370)("toStringTag")]="z",o+""!="[object z]"&&n(362)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(378),o=n(370)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(352);r(r.P,"Function",{bind:n(420)})},function(t,e,n){"use strict";var r=n(365),o=n(357),i=n(421),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},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(355).f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n(350)&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(357),o=n(402),i=n(370)("hasInstance"),a=Function.prototype;i in a||n(355).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(352),o=n(425);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var r=n(348).parseInt,o=n(426).trim,i=n(427),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(352),o=n(379),i=n(351),a=n(427),s="["+a+"]",u="
",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),f=function(t,e,n){var o={},s=i(function(){return!!a[t]()||u[t]()!=u}),c=o[t]=s?e(h):a[t];n&&(o[n]=c),r(r.P+r.F*s,"String",o)},h=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(l,"")),t};t.exports=f},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(352),o=n(429);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){var r=n(348).parseFloat,o=n(426).trim;t.exports=1/r(n(427)+"-0")!==-(1/0)?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(348),o=n(349),i=n(378),a=n(431),s=n(360),u=n(351),c=n(393).f,l=n(394).f,f=n(355).f,h=n(426).trim,p="Number",d=r[p],y=d,v=d.prototype,g=i(n(389)(v))==p,m="trim"in String.prototype,_=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():h(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;c<l;c++)if(a=u.charCodeAt(c),a<48||a>o)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(g?u(function(){v.valueOf.call(n)}):i(n)!=p)?a(new y(_(e)),n,d):_(e)};for(var b,w=n(350)?c(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(y,b=w[x])&&!o(d,b)&&f(d,b,l(y,b));d.prototype=v,v.constructor=d,n(362)(r,p,d)}},function(t,e,n){var r=n(357),o=n(416).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(352),o=n(382),i=n(433),a=n(434),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f="0",h=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call(f,7-n.length)+n}return e},y=function(t,e,n){return 0===e?n:e%2===1?y(t,e-1,n*t):y(t*t,e/2,n)},v=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(351)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=i(this,l),c=o(t),g="",m=f;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(g="-",u=-u),u>1e-21)if(e=v(u*y(2,69,1))-69,n=e<0?u*y(2,-e,1):u/y(2,e,1),n*=4503599627370496,e=52-e,e>0){for(h(0,n),r=c;r>=7;)h(1e7,0),r-=7;for(h(y(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<<r),h(1,1),p(2),m=d()}else h(0,n),h(1<<-e,0),m=d()+a.call(f,c);return c>0?(s=m.length,m=g+(s<=c?"0."+a.call(f,c-s)+m:m.slice(0,s-c)+"."+m.slice(s-c))):m=g+m,m}})},function(t,e,n){var r=n(378);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(382),o=n(379);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(352),o=n(351),i=n(433),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(352);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(352),o=n(348).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var r=n(352);r(r.S,"Number",{isInteger:n(439)})},function(t,e,n){var r=n(357),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){var r=n(352);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(352),o=n(439),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){var r=n(352);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(352);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(352),o=n(429);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var r=n(352),o=n(425);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var r=n(352),o=n(447),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(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){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=n(352),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(352),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-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(352),o=n(451);r(r.S,"Math",{cbrt:function(t){return o(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(352);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(352),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var r=n(352),o=n(455);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-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(352);r(r.S,"Math",{fround:n(457)})},function(t,e,n){var r=n(451),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),u=o(2,-126),c=function(t){return t+1/i-1/i};t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),l=r(t);return o<u?l*c(o/u/a)*u*a:(e=(1+a/i)*o,n=e-(e-o),n>s||n!=n?l*(1/0):l*n)}},function(t,e,n){var r=n(352),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,s=arguments.length,u=0;a<s;)n=o(arguments[a++]),u<n?(r=u/n,i=i*r*r+1,u=n):n>0?(r=n/u,i+=r*r):i+=n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(t,e,n){var r=n(352),o=Math.imul;r(r.S+r.F*n(351)(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},function(t,e,n){var r=n(352);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(352);r(r.S,"Math",{log1p:n(447)})},function(t,e,n){var r=n(352);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(352);r(r.S,"Math",{sign:n(451)})},function(t,e,n){var r=n(352),o=n(455),i=Math.exp;r(r.S+r.F*n(351)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(352),o=n(455),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var r=n(352);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(352),o=n(383),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(352),o=n(376),i=n(381);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){"use strict";n(426)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(471)(!0);n(472)(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(382),o=n(379);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(368),o=n(352),i=n(362),a=n(354),s=n(473),u=n(474),c=n(369),l=n(402),f=n(370)("iterator"),h=!([].keys&&"next"in[].keys()),p="@@iterator",d="keys",y="values",v=function(){return this};t.exports=function(t,e,n,g,m,_,b){u(n,e,g);var w,x,E,j=function(t){if(!h&&t in k)return k[t];switch(t){case d:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",O=m==y,A=!1,k=t.prototype,S=k[f]||k[p]||m&&k[m],C=S||j(m),P=m?O?j("entries"):C:void 0,R="Array"==e?k.entries||S:S;if(R&&(E=l(R.call(new t)),E!==Object.prototype&&E.next&&(c(E,T,!0),r||"function"==typeof E[f]||a(E,f,v))),O&&S&&S.name!==y&&(A=!0,C=function(){return S.call(this)}),r&&!b||!h&&!A&&k[f]||a(k,f,C),s[e]=C,s[T]=v,m)if(w={values:O?C:j(y),keys:_?C:j(d),entries:P},b)for(x in w)x in k||i(k,x,w[x]);else o(o.P+o.F*(h||A),e,w);return w}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(389),o=n(361),i=n(369),a={};n(354)(a,n(370)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(352),o=n(471)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(352),o=n(381),i=n(477),a="endsWith",s=""[a];r(r.P+r.F*n(479)(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),u=void 0===n?r:Math.min(o(n),r),c=String(t);return s?s.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){var r=n(478),o=n(379);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(357),o=n(378),i=n(370)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(370)("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(352),o=n(477),i="includes";r(r.P+r.F*n(479)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(352);r(r.P,"String",{repeat:n(434)})},function(t,e,n){"use strict";var r=n(352),o=n(381),i=n(477),a="startsWith",s=""[a];r(r.P+r.F*n(479)(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(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(484)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){var r=n(352),o=n(351),i=n(379),a=/"/g,s=function(t,e,n,r){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n(484)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(484)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(484)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(484)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(484)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(484)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(484)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(484)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(484)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(484)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(484)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(484)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(352);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(352),o=n(401),i=n(360);r(r.P+r.F*n(351)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(352),o=n(500);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(351),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?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)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],s=r.getTime;new Date(NaN)+""!=o&&n(362)(r,i,function(){var t=s.call(this);return t===t?a.call(this):o})},function(t,e,n){var r=n(370)("toPrimitive"),o=Date.prototype;r in o||n(354)(o,r,n(503))},function(t,e,n){"use strict";var r=n(356),o=n(360),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},function(t,e,n){var r=n(352);r(r.S,"Array",{isArray:n(388)})},function(t,e,n){"use strict";var r=n(364),o=n(352),i=n(401),a=n(506),s=n(507),u=n(381),c=n(508),l=n(509);o(o.S+o.F*!n(510)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,h=i(t),p="function"==typeof this?this:Array,d=arguments.length,y=d>1?arguments[1]:void 0,v=void 0!==y,g=0,m=l(h);if(v&&(y=r(y,d>2?arguments[2]:void 0,2)),void 0==m||p==Array&&s(m))for(e=u(h.length),n=new p(e);e>g;g++)c(n,g,v?y(h[g],g):h[g]);else for(f=m.call(h),n=new p;!(o=f.next()).done;g++)c(n,g,v?a(f,y,[o.value,g],!0):o.value);return n.length=g,n}})},function(t,e,n){var r=n(356);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(473),o=n(370)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(355),o=n(361);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var r=n(418),o=n(370)("iterator"),i=n(473);t.exports=n(353).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(370)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(352),o=n(508);r(r.S+r.F*n(351)(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;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(352),o=n(376),i=[].join;r(r.P+r.F*(n(377)!=Object||!n(513)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(351);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(352),o=n(391),i=n(378),a=n(383),s=n(381),u=[].slice;r(r.P+r.F*n(351)(function(){o&&u.call(o)}),"Array",{slice:function(t,e){var n=s(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var o=a(t,n),c=a(e,n),l=s(c-o),f=new Array(l),h=0;h<l;h++)f[h]="String"==r?this.charAt(o+h):this[o+h];return f}})},function(t,e,n){"use strict";var r=n(352),o=n(365),i=n(401),a=n(351),s=[].sort,u=[1,2,3];r(r.P+r.F*(a(function(){u.sort(void 0)})||!a(function(){u.sort(null)})||!n(513)(s)),"Array",{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},function(t,e,n){"use strict";var r=n(352),o=n(517)(0),i=n(513)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){var r=n(364),o=n(377),i=n(401),a=n(381),s=n(518);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,h=5==t||f,p=e||s;return function(e,s,d){for(var y,v,g=i(e),m=o(g),_=r(s,d,3),b=a(m.length),w=0,x=n?p(e,b):u?p(e,0):void 0;b>w;w++)if((h||w in m)&&(y=m[w],v=_(y,w,g),t))if(n)x[w]=v;else if(v)switch(t){case 3:return!0;case 5:return y;case 6:return w;case 2:x.push(y)}else if(l)return!1;return f?-1:c||l?l:x}}},function(t,e,n){var r=n(519);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(357),o=n(388),i=n(370)("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(352),o=n(517)(1);r(r.P+r.F*!n(513)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(352),o=n(517)(2);r(r.P+r.F*!n(513)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(352),o=n(517)(3);r(r.P+r.F*!n(513)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(352),o=n(517)(4);r(r.P+r.F*!n(513)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(352),o=n(525);r(r.P+r.F*!n(513)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){var r=n(365),o=n(401),i=n(377),a=n(381);t.exports=function(t,e,n,s,u){r(e);var c=o(t),l=i(c),f=a(c.length),h=u?f-1:0,p=u?-1:1;if(n<2)for(;;){if(h in l){s=l[h],h+=p;break}if(h+=p,u?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?h>=0:f>h;h+=p)h in l&&(s=e(s,l[h],h,c));return s}},function(t,e,n){"use strict";var r=n(352),o=n(525);r(r.P+r.F*!n(513)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(352),o=n(380)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(513)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(352),o=n(376),i=n(382),a=n(381),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(513)(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(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(352);r(r.P,"Array",{copyWithin:n(530)}),n(531)("copyWithin")},function(t,e,n){"use strict";var r=n(401),o=n(383),i=n(381);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),s=o(t,a),u=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-u,a-s),f=1;for(u<s&&s<u+l&&(f=-1,u+=l-1,s+=l-1);l-- >0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(t,e,n){var r=n(370)("unscopables"),o=Array.prototype;void 0==o[r]&&n(354)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){var r=n(352);r(r.P,"Array",{fill:n(533)}),n(531)("fill")},function(t,e,n){"use strict";var r=n(401),o=n(383),i=n(381);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(352),o=n(517)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(531)(i)},function(t,e,n){"use strict";var r=n(352),o=n(517)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(531)(i)},function(t,e,n){n(537)("Array")},function(t,e,n){"use strict";var r=n(348),o=n(355),i=n(350),a=n(370)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(531),o=n(539),i=n(473),a=n(376);t.exports=n(472)(Array,"Array",function(t,e){this._t=a(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,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.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(348),o=n(431),i=n(355).f,a=n(393).f,s=n(478),u=n(541),c=r.RegExp,l=c,f=c.prototype,h=/a/g,p=/a/g,d=new c(h)!==h;if(n(350)&&(!d||n(351)(function(){return p[n(370)("match")]=!1,c(h)!=h||c(p)==p||"/a/i"!=c(h,"i")}))){c=function(t,e){var n=this instanceof c,r=s(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(d?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?u.call(t):e),n?this:f,c)};for(var y=(function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}),v=a(l),g=0;v.length>g;)y(v[g++]);f.constructor=c,c.prototype=f,n(362)(r,"RegExp",c)}n(537)("RegExp")},function(t,e,n){"use strict";var r=n(356);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(543);var r=n(356),o=n(541),i=n(350),a="toString",s=/./[a],u=function(t){n(362)(RegExp.prototype,a,t,!0)};n(351)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(t,e,n){n(350)&&"g"!=/./g.flags&&n(355).f(RegExp.prototype,"flags",{configurable:!0,get:n(541)})},function(t,e,n){n(545)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";var r=n(354),o=n(362),i=n(351),a=n(379),s=n(370);t.exports=function(t,e,n){var u=s(t),c=n(a,u,""[t]),l=c[0],f=c[1];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),r(RegExp.prototype,u,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){n(545)("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e,n){n(545)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(545)("split",2,function(t,e,r){"use strict";var o=n(478),i=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,s,f,h,p,d=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,y+"g");for(l||(r=new RegExp("^"+m.source+"$(?!\\s)",y));(s=m.exec(n))&&(f=s.index+s[0][u],!(f>v&&(d.push(n.slice(v,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(p=1;p<arguments[u]-2;p++)void 0===arguments[p]&&(s[p]=void 0)}),s[u]>1&&s.index<n[u]&&a.apply(d,s.slice(1)),h=s[0][u],v=f,d[u]>=g)));)m[c]===s.index&&m[c]++;return v===n[u]?!h&&m.test("")||d.push(""):d.push(n.slice(v)),d[u]>g?d.slice(0,g):d}}else"0"[s](void 0,0)[u]&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,n){"use strict";var r,o,i,a,s=n(368),u=n(348),c=n(364),l=n(418),f=n(352),h=n(357),p=n(365),d=n(550),y=n(551),v=n(552),g=n(553).set,m=n(554)(),_=n(555),b=n(556),w=n(557),x=n(558),E="Promise",j=u.TypeError,T=u.process,O=T&&T.versions,A=O&&O.v8||"",k=u[E],S="process"==l(T),C=function(){},P=o=_.f,R=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n(370)("species")]=function(t){t(C,C)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(C)instanceof e&&0!==A.indexOf("6.6")&&w.indexOf("Chrome/66")===-1}catch(t){}}(),F=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2==t._h&&D(t),t._h=1),s===!0?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?c(j("Promise-chain cycle")):(i=F(n))?i.call(n,u,c):u(n)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){g.call(u,function(){var e,n,r,o=t._v,i=N(t);if(i&&(e=b(function(){S?T.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=S||N(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},N=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(t){g.call(u,function(){var e;S?T.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw j("Promise can't be resolved itself");(e=F(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,c(B,r,1),c(L,r,1))}catch(t){L.call(r,t)}}):(n._v=t,n._s=1,I(n,!1))}catch(t){L.call({_w:n,_d:!1},t)}}};R||(k=function(t){d(this,k,E,"_h"),p(t),r.call(this);try{t(c(B,this,1),c(L,this,1))}catch(t){L.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},r.prototype=n(559)(k.prototype,{then:function(t,e){var n=P(v(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=S?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=c(B,t,1),this.reject=c(L,t,1)},_.f=P=function(t){return t===k||t===a?new i(t):o(t)}),f(f.G+f.W+f.F*!R,{Promise:k}),n(369)(k,E),n(537)(E),a=n(353)[E],f(f.S+f.F*!R,E,{reject:function(t){var e=P(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(s||!R),E,{resolve:function(t){return x(s&&this===a?k:this,t)}}),f(f.S+f.F*!(R&&n(510)(function(t){k.all(t).catch(C);
|
|
12
|
-
})),E,{all:function(t){var e=this,n=P(e),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;y(t,!1,function(t){var s=i++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=P(e),r=n.reject,o=b(function(){y(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),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(364),o=n(506),i=n(507),a=n(356),s=n(381),u=n(509),c={},l={},e=t.exports=function(t,e,n,f,h){var p,d,y,v,g=h?function(){return t}:u(t),m=r(n,f,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(p=s(t.length);p>_;_++)if(v=e?m(a(d=t[_])[0],d[1]):m(t[_]),v===c||v===l)return v}else for(y=g.call(t);!(d=y.next()).done;)if(v=o(y,m,d.value,e),v===c||v===l)return v};e.BREAK=c,e.RETURN=l},function(t,e,n){var r=n(356),o=n(365),i=n(370)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(364),s=n(421),u=n(391),c=n(359),l=n(348),f=l.process,h=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,y=l.Dispatch,v=0,g={},m="onreadystatechange",_=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){_.call(t.data)};h&&p||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},p=function(t){delete g[t]},"process"==n(378)(f)?r=function(t){f.nextTick(a(_,t,1))}:y&&y.now?r=function(t){y.now(a(_,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r=m in c("script")?function(t){u.appendChild(c("script"))[m]=function(){u.removeChild(this),_.call(t)}}:function(t){setTimeout(a(_,t,1),0)}),t.exports={set:h,clear:p}},function(t,e,n){var r=n(348),o=n(553).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(378)(a);t.exports=function(){var t,e,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,h=document.createTextNode("");new i(c).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=o(e),this.reject=o(n)}var o=n(365);t.exports.f=function(t){return new r(t)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(348),o=r.navigator;t.exports=o&&o.userAgent||""},function(t,e,n){var r=n(356),o=n(357),i=n(555);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},function(t,e,n){var r=n(362);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(561),o=n(562),i="Map";t.exports=n(563)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,i),t);return e&&e.v},set:function(t,e){return r.def(o(this,i),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(355).f,o=n(389),i=n(559),a=n(364),s=n(550),u=n(551),c=n(472),l=n(539),f=n(537),h=n(350),p=n(366).fastKey,d=n(562),y=h?"_s":"size",v=function(t,e){var n,r=p(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,c){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=r&&u(r,n,t[c],t)});return i(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var n=d(this,e),r=v(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[y]--}return!!r},forEach:function(t){d(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(d(this,e),t)}}),h&&r(l.prototype,"size",{get:function(){return d(this,e)[y]}}),l},def:function(t,e,n){var r,o,i=v(t,e);return i?i.v=n:(t._l=i={i:o=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[y]++,"F"!==o&&(t._i[o]=i)),t},getEntry:v,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=d(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){var r=n(357);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(348),o=n(352),i=n(362),a=n(559),s=n(366),u=n(551),c=n(550),l=n(357),f=n(351),h=n(510),p=n(369),d=n(431);t.exports=function(t,e,n,y,v,g){var m=r[t],_=m,b=v?"set":"add",w=_&&_.prototype,x={},E=function(t){var e=w[t];i(w,t,"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(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 _&&(g||w.forEach&&!f(function(){(new _).entries().next()}))){var j=new _,T=j[b](g?{}:-0,1)!=j,O=f(function(){j.has(1)}),A=h(function(t){new _(t)}),k=!g&&f(function(){for(var t=new _,e=5;e--;)t[b](e,e);return!t.has(-0)});A||(_=e(function(e,n){c(e,_,t);var r=d(new m,e,_);return void 0!=n&&u(n,v,r[b],r),r}),_.prototype=w,w.constructor=_),(O||k)&&(E("delete"),E("has"),v&&E("get")),(k||T)&&E(b),g&&w.clear&&delete w.clear}else _=y.getConstructor(e,t,v,b),a(_.prototype,n),s.NEED=!0;return p(_,t),x[t]=_,o(o.G+o.W+o.F*(_!=m),x),g||y.setStrong(_,t,v),_}},function(t,e,n){"use strict";var r=n(561),o=n(562),i="Set";t.exports=n(563)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(517)(0),i=n(362),a=n(366),s=n(412),u=n(566),c=n(357),l=n(351),f=n(562),h="WeakMap",p=a.getWeak,d=Object.isExtensible,y=u.ufstore,v={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(c(t)){var e=p(t);return e===!0?y(f(this,h)).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(f(this,h),t,e)}},_=t.exports=n(563)(h,g,m,u,!0,!0);l(function(){return 7!=(new _).set((Object.freeze||Object)(v),7).get(v)})&&(r=u.getConstructor(g,h),s(r.prototype,m),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=_.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!d(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(559),o=n(366).getWeak,i=n(356),a=n(357),s=n(550),u=n(551),c=n(517),l=n(349),f=n(562),h=c(5),p=c(6),d=0,y=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},g=function(t,e){return h(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=d++,t._l=void 0,void 0!=r&&u(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return n===!0?y(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return n===!0?y(f(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return r===!0?y(t).set(e,n):r[t._i]=n,t},ufstore:y}},function(t,e,n){"use strict";var r=n(566),o=n(562),i="WeakSet";n(563)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(352),o=n(569),i=n(570),a=n(356),s=n(383),u=n(381),c=n(357),l=n(348).ArrayBuffer,f=n(552),h=i.ArrayBuffer,p=i.DataView,d=o.ABV&&l.isView,y=h.prototype.slice,v=o.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(l!==h),{ArrayBuffer:h}),r(r.S+r.F*!o.CONSTR,g,{isView:function(t){return d&&d(t)||c(t)&&v in t}}),r(r.P+r.U+r.F*n(351)(function(){return!new h(2).slice(1,void 0).byteLength}),g,{slice:function(t,e){if(void 0!==y&&void 0===e)return y.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),o=s(void 0===e?n:e,n),i=new(f(this,h))(u(o-r)),c=new p(this),l=new p(i),d=0;r<o;)l.setUint8(d++,c.getUint8(r++));return i}}),n(537)(g)},function(t,e,n){for(var r,o=n(348),i=n(354),a=n(363),s=a("typed_array"),u=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,f=0,h=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<h;)(r=o[p[f++]])?(i(r.prototype,s,!0),i(r.prototype,u,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(t,e,n){"use strict";function r(t,e,n){var r,o,i,a=new Array(n),s=8*n-e-1,u=(1<<s)-1,c=u>>1,l=23===e?U(2,-24)-U(2,-77):0,f=0,h=t<0||0===t&&1/t<0?1:0;for(t=q(t),t!=t||t===L?(o=t!=t?1:0,r=u):(r=V(H(t)/W),t*(i=U(2,-r))<1&&(r--,i*=2),t+=r+c>=1?l/i:l*U(2,1-c),t*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(t*i-1)*U(2,e),r+=c):(o=t*U(2,c-1)*U(2,e),r=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(r=r<<e|o,s+=e;s>0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*h,a}function o(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,s=o-7,u=n-1,c=t[u--],l=127&c;for(c>>=7;s>0;l=256*l+t[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-L:L;r+=U(2,e),l-=a}return(c?-1:1)*r*U(2,l-e)}function i(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function u(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function c(t){return r(t,52,8)}function l(t){return r(t,23,4)}function f(t,e,n){O(t[P],e,{get:function(){return this[n]}})}function h(t,e,n,r){var o=+n,i=j(o);if(i+e>t[J])throw D(F);var a=t[X]._b,s=i+t[$],u=a.slice(s,s+e);return r?u:u.reverse()}function p(t,e,n,r,o,i){var a=+n,s=j(a);if(s+e>t[J])throw D(F);for(var u=t[X]._b,c=s+t[$],l=r(+o),f=0;f<e;f++)u[c+f]=l[i?f:e-f-1]}var d=n(348),y=n(350),v=n(368),g=n(569),m=n(354),_=n(559),b=n(351),w=n(550),x=n(382),E=n(381),j=n(571),T=n(393).f,O=n(355).f,A=n(533),k=n(369),S="ArrayBuffer",C="DataView",P="prototype",R="Wrong length!",F="Wrong index!",I=d[S],M=d[C],N=d.Math,D=d.RangeError,L=d.Infinity,B=I,q=N.abs,U=N.pow,V=N.floor,H=N.log,W=N.LN2,z="buffer",G="byteLength",Y="byteOffset",X=y?"_b":z,J=y?"_l":G,$=y?"_o":Y;if(g.ABV){if(!b(function(){I(1)})||!b(function(){new I(-1)})||b(function(){return new I,new I(1.5),new I(NaN),I.name!=S})){I=function(t){return w(this,I),new B(j(t))};for(var K,Z=I[P]=B[P],Q=T(B),tt=0;Q.length>tt;)(K=Q[tt++])in I||m(I,K,B[K]);v||(Z.constructor=I)}var et=new M(new I(2)),nt=M[P].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||_(M[P],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else I=function(t){w(this,I,S);var e=j(t);this._b=A.call(new Array(e),0),this[J]=e},M=function(t,e,n){w(this,M,C),w(t,I,C);var r=t[J],o=x(e);if(o<0||o>r)throw D("Wrong offset!");if(n=void 0===n?r-o:E(n),o+n>r)throw D(R);this[X]=t,this[$]=o,this[J]=n},y&&(f(I,G,"_l"),f(M,z,"_b"),f(M,G,"_l"),f(M,Y,"_o")),_(M[P],{getInt8:function(t){return h(this,1,t)[0]<<24>>24},getUint8:function(t){return h(this,1,t)[0]},getInt16:function(t){var e=h(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=h(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return i(h(this,4,t,arguments[1]))},getUint32:function(t){return i(h(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return o(h(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return o(h(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){p(this,1,t,a,e)},setUint8:function(t,e){p(this,1,t,a,e)},setInt16:function(t,e){p(this,2,t,s,e,arguments[2])},setUint16:function(t,e){p(this,2,t,s,e,arguments[2])},setInt32:function(t,e){p(this,4,t,u,e,arguments[2])},setUint32:function(t,e){p(this,4,t,u,e,arguments[2])},setFloat32:function(t,e){p(this,4,t,l,e,arguments[2])},setFloat64:function(t,e){p(this,8,t,c,e,arguments[2])}});k(I,S),k(M,C),m(M[P],g.VIEW,!0),e[S]=I,e[C]=M},function(t,e,n){var r=n(382),o=n(381);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(352);r(r.G+r.W+r.F*!n(569).ABV,{DataView:n(570).DataView})},function(t,e,n){n(574)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(350)){var r=n(368),o=n(348),i=n(351),a=n(352),s=n(569),u=n(570),c=n(364),l=n(550),f=n(361),h=n(354),p=n(559),d=n(382),y=n(381),v=n(571),g=n(383),m=n(360),_=n(349),b=n(418),w=n(357),x=n(401),E=n(507),j=n(389),T=n(402),O=n(393).f,A=n(509),k=n(363),S=n(370),C=n(517),P=n(380),R=n(552),F=n(538),I=n(473),M=n(510),N=n(537),D=n(533),L=n(530),B=n(355),q=n(394),U=B.f,V=q.f,H=o.RangeError,W=o.TypeError,z=o.Uint8Array,G="ArrayBuffer",Y="Shared"+G,X="BYTES_PER_ELEMENT",J="prototype",$=Array[J],K=u.ArrayBuffer,Z=u.DataView,Q=C(0),tt=C(2),et=C(3),nt=C(4),rt=C(5),ot=C(6),it=P(!0),at=P(!1),st=F.values,ut=F.keys,ct=F.entries,lt=$.lastIndexOf,ft=$.reduce,ht=$.reduceRight,pt=$.join,dt=$.sort,yt=$.slice,vt=$.toString,gt=$.toLocaleString,mt=S("iterator"),_t=S("toStringTag"),bt=k("typed_constructor"),wt=k("def_constructor"),xt=s.CONSTR,Et=s.TYPED,jt=s.VIEW,Tt="Wrong length!",Ot=C(1,function(t,e){return Pt(R(t,t[wt]),e)}),At=i(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),kt=!!z&&!!z[J].set&&i(function(){new z(1).set({})}),St=function(t,e){var n=d(t);if(n<0||n%e)throw H("Wrong offset!");return n},Ct=function(t){if(w(t)&&Et in t)return t;throw W(t+" is not a typed array!")},Pt=function(t,e){if(!(w(t)&&bt in t))throw W("It is not a typed array constructor!");return new t(e)},Rt=function(t,e){return Ft(R(t,t[wt]),e)},Ft=function(t,e){for(var n=0,r=e.length,o=Pt(t,r);r>n;)o[n]=e[n++];return o},It=function(t,e,n){U(t,e,{get:function(){return this._d[n]}})},Mt=function(t){var e,n,r,o,i,a,s=x(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,h=A(s);if(void 0!=h&&!E(h)){for(a=h.call(s),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);s=r}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,n=y(s.length),o=Pt(this,n);n>e;e++)o[e]=f?l(s[e],e):s[e];return o},Nt=function(){for(var t=0,e=arguments.length,n=Pt(this,e);e>t;)n[t]=arguments[t++];return n},Dt=!!z&&i(function(){gt.call(new z(1))}),Lt=function(){return gt.apply(Dt?yt.call(Ct(this)):Ct(this),arguments)},Bt={copyWithin:function(t,e){return L.call(Ct(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return D.apply(Ct(this),arguments)},filter:function(t){return Rt(this,tt(Ct(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Ct(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Ct(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Ct(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Ct(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Ct(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return pt.apply(Ct(this),arguments)},lastIndexOf:function(t){return lt.apply(Ct(this),arguments)},map:function(t){return Ot(Ct(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ft.apply(Ct(this),arguments)},reduceRight:function(t){return ht.apply(Ct(this),arguments)},reverse:function(){for(var t,e=this,n=Ct(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Ct(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Ct(this),t)},subarray:function(t,e){var n=Ct(this),r=n.length,o=g(t,r);return new(R(n,n[wt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,y((void 0===e?r:g(e,r))-o))}},qt=function(t,e){return Rt(this,yt.call(Ct(this),t,e))},Ut=function(t){Ct(this);var e=St(arguments[1],1),n=this.length,r=x(t),o=y(r.length),i=0;if(o+e>n)throw H(Tt);for(;i<o;)this[e+i]=r[i++]},Vt={entries:function(){return ct.call(Ct(this))},keys:function(){return ut.call(Ct(this))},values:function(){return st.call(Ct(this))}},Ht=function(t,e){return w(t)&&t[Et]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Wt=function(t,e){return Ht(t,e=m(e,!0))?f(2,t[e]):V(t,e)},zt=function(t,e,n){return!(Ht(t,e=m(e,!0))&&w(n)&&_(n,"value"))||_(n,"get")||_(n,"set")||n.configurable||_(n,"writable")&&!n.writable||_(n,"enumerable")&&!n.enumerable?U(t,e,n):(t[e]=n.value,t)};xt||(q.f=Wt,B.f=zt),a(a.S+a.F*!xt,"Object",{getOwnPropertyDescriptor:Wt,defineProperty:zt}),i(function(){vt.call({})})&&(vt=gt=function(){return pt.call(this)});var Gt=p({},Bt);p(Gt,Vt),h(Gt,mt,Vt.values),p(Gt,{slice:qt,set:Ut,constructor:function(){},toString:vt,toLocaleString:Lt}),It(Gt,"buffer","b"),It(Gt,"byteOffset","o"),It(Gt,"byteLength","l"),It(Gt,"length","e"),U(Gt,_t,{get:function(){return this[Et]}}),t.exports=function(t,e,n,u){u=!!u;var c=t+(u?"Clamped":"")+"Array",f="get"+t,p="set"+t,d=o[c],g=d||{},m=d&&T(d),_=!d||!s.ABV,x={},E=d&&d[J],A=function(t,n){var r=t._d;return r.v[f](n*e+r.o,At)},k=function(t,n,r){var o=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[p](n*e+o.o,r,At)},S=function(t,e){U(t,e,{get:function(){return A(this,e)},set:function(t){return k(this,e,t)},enumerable:!0})};_?(d=n(function(t,n,r,o){l(t,d,c,"_d");var i,a,s,u,f=0,p=0;if(w(n)){if(!(n instanceof K||(u=b(n))==G||u==Y))return Et in n?Ft(d,n):Mt.call(d,n);i=n,p=St(r,e);var g=n.byteLength;if(void 0===o){if(g%e)throw H(Tt);if(a=g-p,a<0)throw H(Tt)}else if(a=y(o)*e,a+p>g)throw H(Tt);s=a/e}else s=v(n),a=s*e,i=new K(a);for(h(t,"_d",{b:i,o:p,l:a,e:s,v:new Z(i)});f<s;)S(t,f++)}),E=d[J]=j(Gt),h(E,"constructor",d)):i(function(){d(1)})&&i(function(){new d(-1)})&&M(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=n(function(t,n,r,o){l(t,d,c);var i;return w(n)?n instanceof K||(i=b(n))==G||i==Y?void 0!==o?new g(n,St(r,e),o):void 0!==r?new g(n,St(r,e)):new g(n):Et in n?Ft(d,n):Mt.call(d,n):new g(v(n))}),Q(m!==Function.prototype?O(g).concat(O(m)):O(g),function(t){t in d||h(d,t,g[t])}),d[J]=E,r||(E.constructor=d));var C=E[mt],P=!!C&&("values"==C.name||void 0==C.name),R=Vt.values;h(d,bt,!0),h(E,Et,c),h(E,jt,!0),h(E,wt,d),(u?new d(1)[_t]==c:_t in E)||U(E,_t,{get:function(){return c}}),x[c]=d,a(a.G+a.W+a.F*(d!=g),x),a(a.S,c,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){g.of.call(d,1)}),c,{from:Mt,of:Nt}),X in E||h(E,X,e),a(a.P,c,Bt),N(c),a(a.P+a.F*kt,c,{set:Ut}),a(a.P+a.F*!P,c,Vt),r||E.toString==vt||(E.toString=vt),a(a.P+a.F*i(function(){new d(1).slice()}),c,{slice:qt}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!i(function(){E.toLocaleString.call([1,2])})),c,{toLocaleString:Lt}),I[c]=P?C:R,r||P||h(E,mt,R)}}else t.exports=function(){}},function(t,e,n){n(574)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(574)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(574)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(574)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(574)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(574)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(574)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(574)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(352),o=n(365),i=n(356),a=(n(348).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(351)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),u=i(n);return a?a(r,e,u):s.call(r,e,u)}})},function(t,e,n){var r=n(352),o=n(389),i=n(365),a=n(356),s=n(357),u=n(351),c=n(420),l=(n(348).Reflect||{}).construct,f=u(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),h=!u(function(){l(function(){})});r(r.S+r.F*(f||h),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(h&&!f)return l(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=o(s(u)?u:Object.prototype),d=Function.apply.call(t,p,e);return s(d)?d:p}})},function(t,e,n){var r=n(355),o=n(352),i=n(356),a=n(360);o(o.S+o.F*n(351)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(352),o=n(394).f,i=n(356);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(352),o=n(356),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(474)(i,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){function r(t,e){var n,s,l=arguments.length<3?t:arguments[2];return c(t)===l?t[e]:(n=o.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=i(t))?r(s,e,l):void 0}var o=n(394),i=n(402),a=n(349),s=n(352),u=n(357),c=n(356);s(s.S,"Reflect",{get:r})},function(t,e,n){var r=n(394),o=n(352),i=n(356);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){var r=n(352),o=n(402),i=n(356);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){var r=n(352);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(352),o=n(356),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){var r=n(352);r(r.S,"Reflect",{ownKeys:n(594)})},function(t,e,n){var r=n(393),o=n(386),i=n(356),a=n(348).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(352),o=n(356),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){function r(t,e,n){var u,h,p=arguments.length<4?t:arguments[3],d=i.f(l(t),e);if(!d){if(f(h=a(t)))return r(h,e,n,p);d=c(0)}if(s(d,"value")){if(d.writable===!1||!f(p))return!1;if(u=i.f(p,e)){if(u.get||u.set||u.writable===!1)return!1;u.value=n,o.f(p,e,u)}else o.f(p,e,c(0,n));return!0}return void 0!==d.set&&(d.set.call(p,n),!0)}var o=n(355),i=n(394),a=n(402),s=n(349),u=n(352),c=n(361),l=n(356),f=n(357);u(u.S,"Reflect",{set:r})},function(t,e,n){var r=n(352),o=n(416);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(352),o=n(380)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(531)("includes")},function(t,e,n){"use strict";var r=n(352),o=n(600),i=n(401),a=n(381),s=n(365),u=n(518);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return s(t),e=a(r.length),n=u(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(531)("flatMap")},function(t,e,n){"use strict";function r(t,e,n,c,l,f,h,p){for(var d,y,v=l,g=0,m=!!h&&s(h,p,3);g<c;){if(g in n){if(d=m?m(n[g],g,e):n[g],y=!1,i(d)&&(y=d[u],y=void 0!==y?!!y:o(d)),y&&f>0)v=r(t,e,d,a(d.length),v,f-1)-1;else{if(v>=9007199254740991)throw TypeError();t[v]=d}v++}g++}return v}var o=n(388),i=n(357),a=n(381),s=n(364),u=n(370)("isConcatSpreadable");t.exports=r},function(t,e,n){"use strict";var r=n(352),o=n(600),i=n(401),a=n(381),s=n(382),u=n(518);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=i(this),n=a(e.length),r=u(e,0);return o(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(531)("flatten")},function(t,e,n){"use strict";var r=n(352),o=n(471)(!0);r(r.P,"String",{at:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(352),o=n(604),i=n(557);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(381),o=n(434),i=n(379);t.exports=function(t,e,n,a){var s=String(i(t)),u=s.length,c=void 0===n?" ":String(n),l=r(e);if(l<=u||""==c)return s;var f=l-u,h=o.call(c,Math.ceil(f/c.length));return h.length>f&&(h=h.slice(0,f)),a?h+s:s+h}},function(t,e,n){"use strict";var r=n(352),o=n(604),i=n(557);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(426)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(426)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(352),o=n(379),i=n(381),a=n(478),s=n(541),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(474)(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(o(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(t.lastIndex),new c(r,e)}})},function(t,e,n){n(372)("asyncIterator")},function(t,e,n){n(372)("observable")},function(t,e,n){var r=n(352),o=n(594),i=n(376),a=n(394),s=n(508);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),u=a.f,c=o(r),l={},f=0;c.length>f;)n=u(r,e=c[f++]),void 0!==n&&s(l,e,n);return l}})},function(t,e,n){var r=n(352),o=n(613)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){var r=n(374),o=n(376),i=n(387).f;t.exports=function(t){return function(e){for(var n,a=o(e),s=r(a),u=s.length,c=0,l=[];u>c;)i.call(a,n=s[c++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(352),o=n(613)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";var r=n(352),o=n(401),i=n(365),a=n(355);n(350)&&r(r.P+n(616),"Object",{__defineGetter__:function(t,e){a.f(o(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";t.exports=n(368)||!n(351)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(348)[t]})},function(t,e,n){"use strict";var r=n(352),o=n(401),i=n(365),a=n(355);n(350)&&r(r.P+n(616),"Object",{__defineSetter__:function(t,e){a.f(o(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(352),o=n(401),i=n(360),a=n(402),s=n(394).f;n(350)&&r(r.P+n(616),"Object",{__lookupGetter__:function(t){var e,n=o(this),r=i(t,!0);do if(e=s(n,r))return e.get;while(n=a(n))}})},function(t,e,n){"use strict";var r=n(352),o=n(401),i=n(360),a=n(402),s=n(394).f;n(350)&&r(r.P+n(616),"Object",{__lookupSetter__:function(t){var e,n=o(this),r=i(t,!0);do if(e=s(n,r))return e.set;while(n=a(n))}})},function(t,e,n){var r=n(352);r(r.P+r.R,"Map",{toJSON:n(621)("Map")})},function(t,e,n){var r=n(418),o=n(622);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},function(t,e,n){var r=n(551);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(352);r(r.P+r.R,"Set",{toJSON:n(621)("Set")})},function(t,e,n){n(625)("Map")},function(t,e,n){"use strict";var r=n(352);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){n(625)("Set")},function(t,e,n){n(625)("WeakMap")},function(t,e,n){n(625)("WeakSet")},function(t,e,n){n(630)("Map")},function(t,e,n){"use strict";var r=n(352),o=n(365),i=n(364),a=n(551);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,u=arguments[1];return o(this),e=void 0!==u,e&&o(u),void 0==t?new this:(n=[],e?(r=0,s=i(u,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){n(630)("Set")},function(t,e,n){n(630)("WeakMap")},function(t,e,n){n(630)("WeakSet")},function(t,e,n){var r=n(352);r(r.G,{global:n(348)})},function(t,e,n){var r=n(352);r(r.S,"System",{global:n(348)})},function(t,e,n){var r=n(352),o=n(378);r(r.S,"Error",{isError:function(t){return"Error"===o(t)}})},function(t,e,n){var r=n(352);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(352);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(352),o=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*o}})},function(t,e,n){var r=n(352),o=n(641),i=n(457);r(r.S,"Math",{fscale:function(t,e,n,r,a){return i(o(t,e,n,r,a))}})},function(t,e){t.exports=Math.scale||function(t,e,n,r,o){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||o!=o?NaN:t===1/0||t===-(1/0)?t:(t-e)*(o-r)/(n-e)+r}},function(t,e,n){var r=n(352);r(r.S,"Math",{iaddh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i+(r>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(352);r(r.S,"Math",{isubh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i-(r>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(352);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,s=r>>16,u=o>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>16)+((i*u>>>0)+(c&n)>>16)}})},function(t,e,n){var r=n(352);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(352),o=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*o}})},function(t,e,n){var r=n(352);r(r.S,"Math",{scale:n(641)})},function(t,e,n){var r=n(352);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,s=r>>>16,u=o>>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>>16)+((i*u>>>0)+(c&n)>>>16)}})},function(t,e,n){var r=n(352);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(352),o=n(353),i=n(348),a=n(552),s=n(558);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(352),o=n(555),i=n(556);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(653),o=n(356),i=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,o(n),i(r))}})},function(t,e,n){var r=n(560),o=n(352),i=n(367)("metadata"),a=i.store||(i.store=new(n(565))),s=function(t,e,n){var o=a.get(t);if(!o){if(!n)return;a.set(t,o=new r)}var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}return i},u=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},c=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){s(n,r,!0).set(t,e)},f=function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},h=function(t){
|
|
13
|
-
return void 0===t||"symbol"==typeof t?t:String(t)},p=function(t){o(o.S,"Reflect",t)};t.exports={store:a,map:s,has:u,get:c,set:l,keys:f,key:h,exp:p}},function(t,e,n){var r=n(653),o=n(356),i=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=s.get(e);return u.delete(n),!!u.size||s.delete(e)}})},function(t,e,n){var r=n(653),o=n(356),i=n(402),a=r.has,s=r.get,u=r.key,c=function(t,e,n){var r=a(t,e,n);if(r)return s(t,e,n);var o=i(e);return null!==o?c(t,o,n):void 0};r.exp({getMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(564),o=n(622),i=n(653),a=n(356),s=n(402),u=i.keys,c=i.key,l=function(t,e){var n=u(t,e),i=s(t);if(null===i)return n;var a=l(i,e);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(653),o=n(356),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(653),o=n(356),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(653),o=n(356),i=n(402),a=r.has,s=r.key,u=function(t,e,n){var r=a(t,e,n);if(r)return!0;var o=i(e);return null!==o&&u(t,o,n)};r.exp({hasMetadata:function(t,e){return u(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(653),o=n(356),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(653),o=n(356),i=n(365),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?o:i)(n),a(r))}}})},function(t,e,n){var r=n(352),o=n(554)(),i=n(348).process,a="process"==n(378)(i);r(r.G,{asap:function(t){var e=a&&i.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(352),o=n(348),i=n(353),a=n(554)(),s=n(370)("observable"),u=n(365),c=n(356),l=n(550),f=n(559),h=n(354),p=n(551),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))},_=function(t,e){c(t),this._c=void 0,this._o=t,t=new b(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)};_.prototype=f({},{unsubscribe:function(){m(this)}});var b=function(t){this._s=t};b.prototype=f({},{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){l(this,w,"Observable","_f")._f=u(t)};f(w.prototype,{subscribe:function(t){return new _(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(n,r){u(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:n})})}}),f(w,{from:function(t){var e="function"==typeof this?this:w,n=y(c(t)[s]);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 a(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=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return a(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,s,function(){return this}),r(r.G,{Observable:w}),n(537)("Observable")},function(t,e,n){var r=n(348),o=n(352),i=n(557),a=[].slice,s=/MSIE .\./.test(i),u=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){var r=n(352),o=n(553);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){for(var r=n(538),o=n(374),i=n(362),a=n(348),s=n(354),u=n(473),c=n(370),l=c("iterator"),f=c("toStringTag"),h=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(p),y=0;y<d.length;y++){var v,g=d[y],m=p[g],_=a[g],b=_&&_.prototype;if(b&&(b[l]||s(b,l,h),b[f]||s(b,f,g),u[g]=h,m))for(v in r)b[v]||i(b,v,r[v],!0)}},function(t,e){(function(e){!function(e){"use strict";function n(t,e,n,r){var i=e&&e.prototype instanceof o?e:o,a=Object.create(i.prototype),s=new p(r||[]);return a._invoke=c(t,n,s),a}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function o(){}function i(){}function a(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function u(t){function n(e,o,i,a){var s=r(t[e],t,o);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&m.call(c,"__await")?Promise.resolve(c.__await).then(function(t){n("next",t,i,a)},function(t){n("throw",t,i,a)}):Promise.resolve(c).then(function(t){u.value=t,i(u)},a)}a(s.arg)}function o(t,e){function r(){return new Promise(function(r,o){n(t,e,r,o)})}return i=i?i.then(r,r):r()}"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n));var i;this._invoke=o}function c(t,e,n){var o=T;return function(i,a){if(o===A)throw new Error("Generator is already running");if(o===k){if("throw"===i)throw a;return y()}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===S)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===T)throw o=k,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=A;var c=r(t,e,n);if("normal"===c.type){if(o=n.done?k:O,c.arg===S)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=k,n.method="throw",n.arg=c.arg)}}}function l(t,e){var n=t.iterator[e.method];if(n===v){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=v,l(t,e),"throw"===e.method))return S;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var o=r(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,S;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=v),e.delegate=null,S):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,S)}function f(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 h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)}function d(t){if(t){var e=t[b];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(m.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=v,e.done=!0,e};return r.next=r}}return{next:y}}function y(){return{value:v,done:!0}}var v,g=Object.prototype,m=g.hasOwnProperty,_="function"==typeof Symbol?Symbol:{},b=_.iterator||"@@iterator",w=_.asyncIterator||"@@asyncIterator",x=_.toStringTag||"@@toStringTag",E="object"==typeof t,j=e.regeneratorRuntime;if(j)return void(E&&(t.exports=j));j=e.regeneratorRuntime=E?t.exports:{},j.wrap=n;var T="suspendedStart",O="suspendedYield",A="executing",k="completed",S={},C={};C[b]=function(){return this};var P=Object.getPrototypeOf,R=P&&P(P(d([])));R&&R!==g&&m.call(R,b)&&(C=R);var F=a.prototype=o.prototype=Object.create(C);i.prototype=F.constructor=a,a.constructor=i,a[x]=i.displayName="GeneratorFunction",j.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},j.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,x in t||(t[x]="GeneratorFunction")),t.prototype=Object.create(F),t},j.awrap=function(t){return{__await:t}},s(u.prototype),u.prototype[w]=function(){return this},j.AsyncIterator=u,j.async=function(t,e,r,o){var i=new u(n(t,e,r,o));return j.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},s(F),F[x]="Generator",F[b]=function(){return this},F.toString=function(){return"[object Generator]"},j.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}},j.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&m.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=v)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return i.type="throw",i.arg=t,n.next=e,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=m.call(o,"catchLoc"),s=m.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.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&&m.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 i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(i)},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),S},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),h(n),S}},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 o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:d(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=v),S}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}())},function(t,e,n){n(669),t.exports=n(353).RegExp.escape},function(t,e,n){var r=n(352),o=n(670)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return o(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)}}},function(t,e,n,r,o){(function(t,i){function a(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&e._extend(r,n),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,t,r.depth)}function s(t,e){var n=a.styles[e];return n?"["+a.colors[n][0]+"m"+t+"["+a.colors[n][1]+"m":t}function u(t,e){return t}function c(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function l(t,n,r){if(t.customInspect&&n&&k(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return w(o)||(o=l(t,o,r)),o}var i=f(t,n);if(i)return i;var a=Object.keys(n),s=c(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),A(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(k(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(j(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(O(n))return t.stylize(Date.prototype.toString.call(n),"date");if(A(n))return h(n)}var g="",m=!1,_=["{","}"];if(v(n)&&(m=!0,_=["[","]"]),k(n)){var b=n.name?": "+n.name:"";g=" [Function"+b+"]"}if(j(n)&&(g=" "+RegExp.prototype.toString.call(n)),O(n)&&(g=" "+Date.prototype.toUTCString.call(n)),A(n)&&(g=" "+h(n)),0===a.length&&(!m||0==n.length))return _[0]+g+_[1];if(r<0)return j(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var x;return x=m?p(t,n,r,s,a):a.map(function(e){return d(t,n,r,s,e,m)}),t.seen.pop(),y(x,g,_)}function f(t,e){if(E(e))return t.stylize("undefined","undefined");if(w(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return b(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,o){for(var i=[],a=0,s=e.length;a<s;++a)F(e,String(a))?i.push(d(t,e,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(d(t,e,n,r,o,!0))}),i}function d(t,e,n,r,o,i){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),F(r,o)||(a="["+o+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?l(t,u.value,null):l(t,u.value,n-1),s.indexOf("\n")>-1&&(s=i?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),E(a)){if(i&&o.match(/^\d+$/))return s;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function y(t,e,n){var r=0,o=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function v(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function _(t){return null==t}function b(t){return"number"==typeof t}function w(t){return"string"==typeof t}function x(t){return"symbol"==typeof t}function E(t){return void 0===t}function j(t){return T(t)&&"[object RegExp]"===C(t)}function T(t){return"object"==typeof t&&null!==t}function O(t){return T(t)&&"[object Date]"===C(t)}function A(t){return T(t)&&("[object Error]"===C(t)||t instanceof Error)}function k(t){return"function"==typeof t}function S(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function C(t){return Object.prototype.toString.call(t)}function P(t){return t<10?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":");return[t.getDate(),D[t.getMonth()],e].join(" ")}function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var I=/%[sdj%]/g;e.format=function(t){if(!w(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,o=r.length,i=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}}),s=r[n];n<o;s=r[++n])i+=m(s)||!T(s)?" "+s:" "+a(s);return i},e.deprecate=function(n,r){function o(){if(!a){if(i.throwDeprecation)throw new Error(r);i.traceDeprecation?console.trace(r):console.error(r),a=!0}return n.apply(this,arguments)}if(E(t.process))return function(){return e.deprecate(n,r).apply(this,arguments)};if(i.noDeprecation===!0)return n;var a=!1;return o};var M,N={};e.debuglog=function(t){if(E(M)&&(M=i.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(M)){var n=i.pid;N[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else N[t]=function(){};return N[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=v,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=_,e.isNumber=b,e.isString=w,e.isSymbol=x,e.isUndefined=E,e.isRegExp=j,e.isObject=T,e.isDate=O,e.isError=A,e.isFunction=k,e.isPrimitive=S,e.isBuffer=n(r);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=n(o),e._extend=function(t,e){if(!e||!T(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))}]));
|
|
14
|
-
|
|
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){(function(t){"use strict";var e=f(r(3)),n=f(r(175)),i=f(r(319)),o=f(r(376)),s=r(1),a=f(s),u=f(r(165)),c=f(r(383));function f(t){return t&&t.__esModule?t:{default:t}}function l(t){return function(){var r=t.apply(this,arguments);return new e.default(function(t,n){return function i(o,s){try{var a=r[o](s),u=a.value}catch(t){return void n(t)}if(!a.done)return e.default.resolve(u).then(function(t){i("next",t)},function(t){i("throw",t)});t(u)}("next")})}}r(384),describe("viz.api:",function(){var r=this;this.timeout(3e4),describe("new VIZ",function(){it("doesn't open a connection until required",function(){(0,n.default)(!a.default.ws,"There was a connection on the singleton?"),(0,n.default)(!(new s.VIZ).ws,"There was a connection on a new instance?")}),it("opens a connection on demand",function(e){var r=new s.VIZ;(0,n.default)(!(new s.VIZ).ws,"There was a connection on a new instance?"),r.start(),t.nextTick(function(){(0,n.default)(r.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,r)}))),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,n.default)(i,"getFollowersAsync resoved to null?"),i.should.have.lengthOf(e);case 6:case"end":return t.stop()}},t,r)}))),it("the startFollower parameter has an impact on the result",l(regeneratorRuntime.mark(function t(){var e,n,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(n=t.sent).should.have.lengthOf(e),t.next=7,a.default.getFollowersAsync("viz",n[n.length-1].follower,"blog",e);case 7:(i=t.sent).should.have.lengthOf(e),n.should.not.be.eql(i);case 10:case"end":return t.stop()}},t,r)}))),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,r)})))})}),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,r)}))),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,r)})))})}),describe("streamBlockNumber",function(){it("streams viz transactions",function(t){var e=0,r=a.default.streamBlockNumber(function(n,i){o.default.exist(i),i.should.be.instanceOf(Number),2===++e&&(r(),t())})})}),describe("streamBlock",function(){it("streams viz blocks",function(t){var e=0,r=a.default.streamBlock(function(n,i){try{o.default.exist(i),i.should.have.properties(["previous","transactions","timestamp"])}catch(n){return r(),void t(n)}2===++e&&(r(),t())})})}),describe("streamTransactions",function(){it("streams viz transactions",function(t){var e=0,r=a.default.streamTransactions(function(n,i){try{o.default.exist(i),i.should.have.properties(["ref_block_num","operations","extensions"])}catch(n){return r(),void t(n)}2===++e&&(r(),t())})})}),describe("streamOperations",function(){it("streams viz operations",function(t){var e=0,r=a.default.streamOperations(function(n,i){try{o.default.exist(i)}catch(n){return r(),void t(n)}2===++e&&(r(),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,n.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,n.default)(i.ws,"There was no websocket connection after a call?"),t.next=8,e.default.delay(1e3);case 8:return(0,n.default)(!i.stop.calledOnce,"VIZ::stop was already called before disconnect?"),i.ws.emit("close"),(0,n.default)(!i.ws),(0,n.default)(!i.startP),(0,n.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,n.default)(i.ws,"There was no websocket connection after a call?"),(0,n.default)(i.isOpen,"There was no websocket connection after a call?");case 17:case"end":return t.stop()}},t,r)})))})})}).call(e,r(5))},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(151)),u=(p(r(161)),p(r(162))),c=p(r(165)),f=p(r(167)),l=r(168),h=p(r(283));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"),b={id:0},m=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,b),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 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,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)}y("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}();f.default.forEach(function(t){var e=t.method_name||(0,l.camelCase)(t.method),r=t.params||[];m.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)},m.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(m.prototype);var _=new m;(e=t.exports=_).VIZ=m,e.VIZ.DEFAULTS=b},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,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(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=(c=r.slice()).length,u=0;u<s;u++)c[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 d("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},i=function(){return new O.PromiseInspection(this._target())},o=function(t){return O.reject(new d(t))};function s(){}var a,u={},c=r(6);a=c.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},c.notEnumerableProp(O,"_getDomain",a);var f=r(7),l=r(8),h=new l;f.defineProperty(O,"_async",{value:h});var p=r(13),d=O.TypeError=p.TypeError;O.RangeError=p.RangeError;var y=O.CancellationError=p.CancellationError;O.TimeoutError=p.TimeoutError,O.OperationalError=p.OperationalError,O.RejectionError=p.OperationalError,O.AggregateError=p.AggregateError;var v=function(){},g={},b={},m=r(14)(O,v),_=r(15)(O,v,m,o,s),w=r(16)(O),E=w.create,x=r(17)(O,w),S=(x.CapturedTrace,r(18)(O,m,b)),T=r(19)(b),A=r(20),k=c.errorObj,j=c.tryCatch;function O(t){t!==v&&function(t,e){if(null==t||t.constructor!==O)throw new d("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new d("expecting a function but got "+c.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 C(t){this.promise._resolveCallback(t)}function R(t){this.promise._rejectCallback(t,!1)}function I(t){var e=new O(v);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return O.prototype.toString=function(){return"[object Promise]"},O.prototype.caught=O.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var s=arguments[r];if(!c.isObject(s))return o("Catch statement predicate: expecting an object but got "+c.classString(s));n[i++]=s}if(n.length=i,"function"!=typeof(t=arguments[r]))throw new d("The last argument to .catch() must be a function, got "+c.toString(t));return this.then(void 0,T(n,t,this))}return this.then(void 0,t)},O.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},O.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+c.classString(t);arguments.length>1&&(r+=", "+c.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},O.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},O.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+c.classString(t)):this.all()._then(t,void 0,void 0,g,void 0)},O.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},O.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new _(this).promise()},O.prototype.error=function(t){return this.caught(c.originatesFromRejection,t)},O.getNewLibraryCopy=t.exports,O.is=function(t){return t instanceof O},O.fromNode=O.fromCallback=function(t){var e=new O(v);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=j(t)(A(e,r));return n===k&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},O.all=function(t){return new _(t).promise()},O.cast=function(t){var e=m(t);return e instanceof O||((e=new O(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},O.resolve=O.fulfilled=O.cast,O.reject=O.rejected=function(t){var e=new O(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},O.setScheduler=function(t){if("function"!=typeof t)throw new d("expecting a function but got "+c.classString(t));return h.setScheduler(t)},O.prototype._then=function(t,e,r,n,i){var o=void 0!==i,s=o?i:new O(v),u=this._target(),f=u._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&f)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var l=a();if(0!=(50397184&f)){var p,d,g=u._settlePromiseCtx;0!=(33554432&f)?(d=u._rejectionHandler0,p=t):0!=(16777216&f)?(d=u._fulfillmentHandler0,p=e,u._unsetRejectionIsUnhandled()):(g=u._settlePromiseLateCancellationObserver,d=new y("late cancellation observer"),u._attachExtraTrace(d),p=e),h.invoke(g,u,{handler:null===l?p:"function"==typeof p&&c.domainBind(l,p),promise:s,receiver:n,value:d})}else u._addCallbacks(t,e,s,n,l);return s},O.prototype._length=function(){return 65535&this._bitField},O.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},O.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},O.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},O.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},O.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},O.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},O.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},O.prototype._isFinal=function(){return(4194304&this._bitField)>0},O.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},O.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},O.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},O.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},O.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==u)return void 0===e&&this._isBound()?this._boundValue():e},O.prototype._promiseAt=function(t){return this[4*t-4+2]},O.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},O.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},O.prototype._boundValue=function(){},O.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=u),this._addCallbacks(e,r,n,i,null)},O.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=u),this._addCallbacks(r,n,i,o,null)},O.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:c.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:c.domainBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=null===i?t:c.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:c.domainBind(i,e))}return this._setLength(o+1),o},O.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},O.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=m(t,this);if(!(r instanceof O))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(i)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new y("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(n())}},O.prototype._rejectCallback=function(t,e,r){var n=c.ensureErrorObject(t),i=n===t;if(!i&&!r&&x.warnings()){var o="a promise was rejected with a non-error: "+c.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},O.prototype._resolveFromExecutor=function(t){if(t!==v){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},O.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0==(65536&i)){var o;n._pushContext(),e===g?r&&"number"==typeof r.length?o=j(t).apply(this._boundValue(),r):(o=k).e=new d("cannot .spread() a non-array: "+c.classString(r)):o=j(t).call(e,r);var s=n._popContext();0==(65536&(i=n._bitField))&&(o===b?n._reject(r):o===k?n._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",n,this),n._resolveCallback(o)))}},O.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},O.prototype._followee=function(){return this._rejectionHandler0},O.prototype._setFollowee=function(t){this._rejectionHandler0=t},O.prototype._settlePromise=function(t,e,r,n){var o=t instanceof O,a=this._bitField,u=0!=(134217728&a);0!=(65536&a)?(o&&t._invokeInternalOnCancel(),r instanceof S&&r.isFinallyHandler()?(r.cancelPromise=t,j(e).call(r,n)===k&&t._reject(k.e)):e===i?t._fulfill(i.call(r)):r instanceof s?r._promiseCancelled(t):o||t instanceof _?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))},O.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof O?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof O&&r._reject(i)},O.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},O.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},O.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},O.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():h.settlePromises(this),this._dereferenceTrace())}},O.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return h.fatalError(t,c.isNode);(65535&e)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},O.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},O.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},O.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},O.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&f.defineProperty(O.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),O.defer=O.pending=function(){return x.deprecated("Promise.defer","new Promise"),{promise:new O(v),resolve:C,reject:R}},c.notEnumerableProp(O,"_makeSelfResolutionError",n),r(21)(O,v,m,o,x),r(22)(O,v,m,x),r(23)(O,_,o,x),r(24)(O),r(25)(O),r(26)(O,_,m,v,h,a),O.Promise=O,O.version="3.5.5",r(27)(O),r(28)(O,o,v,m,s,x),r(29)(O,_,o,m,v,x),r(30)(O),r(31)(O,v),r(32)(O,_,m,o),r(33)(O,v,m,o),r(34)(O,_,o,m,v,x),r(35)(O,_,x),r(36)(O,_,o),r(37)(O,v,x),r(38)(O,o,m,E,v,x),r(39)(O),r(40)(O,v),r(41)(O,v),c.toFastProperties(O),c.toFastProperties(O.prototype),I({a:1}),I({b:2}),I({c:3}),I(1),I(function(){}),I(void 0),I(!1),I(new O(v)),x.setBounds(l.firstLineError,c.lastLineError),O}}).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,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(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 y(){}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];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,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 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 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 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(A(t)):t}function y(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 v(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(h(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(t,e,n),t}function b(t){throw t}var m=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 c=Object.getOwnPropertyDescriptor(t,u);null!=c&&null==c.get&&null==c.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}}(),_=/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=_.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 x=/^[a-z$_][a-z$_0-9]*$/i;function S(t){return x.test(t)}function T(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function A(t){try{return t+""}catch(t){return"[no string representation]"}}function k(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 k(t)&&i.propertyIsWritable(t,"stack")}var R="stack"in new Error?function(t){return C(t)?t:new Error(A(t))}:function(t){if(C(t))return t;try{throw new Error(A(t))}catch(t){return t}};function I(t){return{}.toString.call(t)}function P(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 B=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};B=function(t){return i.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?F(t):null}}var M=void 0!==n&&"[object process]"===I(n).toLowerCase(),L=void 0!==n&&void 0!==n.env;function N(t){return L?n.env[t]:void 0}function D(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function U(t,e){return t.bind(e)}var q={isClass:w,isIdentifier:S,inheritedDataKeys:m,getDataPropertyOrDefault:v,thrower:b,isArray:i.isArray,asArray:B,notEnumerableProp:g,isPrimitive:h,isObject:p,isError:k,canEvaluate:o,errorObj:s,tryCatch:f,inherits:l,withAppended:y,maybeWrapAsError:d,toFastProperties:E,filledRange:T,toString:A,canAttachTrace:C,ensureErrorObject:R,originatesFromRejection:O,markAsOriginatingFromRejection:j,classString:I,copyDescriptors:P,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:M,hasEnvVariables:L,env:N,global:u,getNativePromise:D,domainBind:U};q.isRecentNode=q.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}(),q.isNode&&q.toFastProperties(n);try{throw new Error}catch(t){q.lastLineError=t}t.exports=q}).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),s=r(6);function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function u(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function c(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function f(t){this._normalQueue._pushOne(t),this._queueTick()}function l(t){for(;t.length()>0;)h(t)}function h(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},a.prototype.disableTrampolineIfNecessary=function(){s.hasDevTools&&(this._trampolineEnabled=!1)},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},a.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.hasDevTools?(a.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?u.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},a.prototype.invoke=function(t,e,r){this._trampolineEnabled?c.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},a.prototype.settlePromises=function(t){this._trampolineEnabled?f.call(this,t):this._schedule(function(){t._settlePromises()})}):(a.prototype.invokeLater=u,a.prototype.invoke=c,a.prototype.settlePromises=f),a.prototype._drainQueues=function(){l(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,l(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=a,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,c=n.nextTick;o=s.isRecentNode?function(t){u.call(e,t)}:function(t){c.call(n,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},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){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,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="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,function(){return this}())},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(){f(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)&&f(+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){f(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(){f(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=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),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=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,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{c(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,c=a.notEnumerableProp;function f(t,e){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var l=f("Warning","warning"),h=f("CancellationError","cancellation error"),p=f("TimeoutError","timeout error"),d=f("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=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 b(t){if(!(this instanceof b))return new b(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 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(b,Error);var m=Error.__BluebirdErrorTypes__;m||(m=s({CancellationError:h,TimeoutError:p,OperationalError:b,RejectionError:b,AggregateError:d}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:l}},function(t,e,r){"use strict";t.exports=function(t,e){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 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}}(r)?(c=new t(e),r._then(c._fulfill,c._reject,void 0,c,null),c):function(r,o,s){var a=new t(e),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var c=!0,f=n.tryCatch(o).call(r,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}(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),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 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 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){var i,o,s,a=t._getDomain,u=t._async,c=r(13).Warning,f=r(6),l=r(7),h=f.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,d=/\((?:timers\.js):\d+:\d+\)/,y=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,v=null,g=null,b=!1,m=!(0==f.env("BLUEBIRD_DEBUG")||!f.env("BLUEBIRD_DEBUG")&&"development"!==f.env("NODE_ENV")),_=!(0==f.env("BLUEBIRD_WARNINGS")||!m&&!f.env("BLUEBIRD_WARNINGS")),w=!(0==f.env("BLUEBIRD_LONG_STACK_TRACES")||!m&&!f.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(_||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},t.prototype._notifyUnhandledRejectionIsHandled=function(){H("rejectionHandled",i,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(),H("unhandledRejection",o,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 q(t,e,r||this)},t.onPossiblyUnhandledRejection=function(t){var e=a();o="function"==typeof t?null===e?t:f.domainBind(e,t):void 0},t.onUnhandledRejectionHandled=function(t){var e=a();i="function"==typeof t?null===e?t:f.domainBind(e,t):void 0};var x=function(){};t.longStackTraces=function(){if(u.haveItemsQueued()&&!Q.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Q.longStackTraces&&X()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;Q.longStackTraces=!0,x=function(){if(u.haveItemsQueued()&&!Q.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(),u.enableTrampoline(),Q.longStackTraces=!1},t.prototype._captureStackTrace=N,t.prototype._attachExtraTrace=D,t.prototype._dereferenceTrace=U,n.activateLongStackTraces(),u.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return Q.longStackTraces&&X()};var S=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return f.global.dispatchEvent(t),function(t,e){var r={detail:e,cancelable:!0};l.defineProperty(r,"promise",{value:e.promise}),l.defineProperty(r,"reason",{value:e.reason});var n=new CustomEvent(t.toLowerCase(),r);return!f.global.dispatchEvent(n)}}if("function"==typeof Event){t=new Event("CustomEvent");return f.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,l.defineProperty(r,"promise",{value:e.promise}),l.defineProperty(r,"reason",{value:e.reason}),!f.global.dispatchEvent(r)}}return(t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!f.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),T=f.isNode?function(){return e.emit.apply(e,arguments)}:f.global?function(t){var e="on"+t.toLowerCase(),r=f.global[e];return!!r&&(r.apply(f.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function A(t,e){return{promise:e}}var k={promiseCreated:A,promiseFulfilled:A,promiseRejected:A,promiseResolved:A,promiseCancelled:A,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:A},j=function(t){var e=!1;try{e=T.apply(null,arguments)}catch(t){u.throwLater(t),e=!0}var r=!1;try{r=S(t,k[t].apply(null,arguments))}catch(t){u.throwLater(t),r=!0}return r||e};function O(){return!1}function C(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: "+f.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function R(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?f.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function I(){return this._onCancelField}function P(t){this._onCancelField=t}function B(){this._cancellationParent=void 0,this._onCancelField=void 0}function F(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;Q.warnings=!!r,E=Q.warnings,f.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!Q.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=B,t.prototype._propagateFrom=F,t.prototype._onCancel=I,t.prototype._setOnCancel=P,t.prototype._attachCancellationCallback=R,t.prototype._execute=C,M=F,Q.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!Q.monitoring?(Q.monitoring=!0,t.prototype._fireEvent=j):!e.monitoring&&Q.monitoring&&(Q.monitoring=!1,t.prototype._fireEvent=O)),t},t.prototype._fireEvent=O,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 M=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function L(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function N(){this._trace=new K(this._peekContext())}function D(t,e){if(h(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=W(t);f.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),f.notEnumerableProp(t,"__stackCleaned__",!0)}}}function U(){this._trace=void 0}function q(e,r,n){if(Q.warnings){var i,o=new c(e);if(r)n._attachExtraTrace(o);else if(Q.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=W(o);o.stack=s.message+"\n"+s.stack.join("\n")}j("warning",o)||z(o,"",!0)}}function V(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||v.test(n),o=i&&Y(n);i&&!o&&(b&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function W(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||v.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:V(e)}}function z(t,e,r){if("undefined"!=typeof console){var n;if(f.isObject(t)){var i=t.stack;n=e+g(i,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function H(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){u.throwLater(t)}"unhandledRejection"===t?j(t,r,n)||i||z(r,"Unhandled rejection "):j(t,n)}function G(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():f.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 X(){return"function"==typeof Z}var Y=function(){return!1},J=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function $(t){var e=t.match(J);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function K(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);Z(this,K),e>32&&this.uncycle()}f.inherits(K,Error),n.CapturedTrace=K,K.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,c=n-2;c>=0;--c)e[c]._length=u,u++;return}}}},K.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=W(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(V(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),f.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)),f.notEnumerableProp(t,"__stackCleaned__",!0)}};var Z=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():G(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,v=t,g=e;var r=Error.captureStackTrace;return Y=function(t){return p.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 v=/@/,g=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?(g=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?G(e):e.toString()},null):(v=t,g=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&&(s=function(t){console.warn(t)},f.isNode&&e.stderr.isTTY?s=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:f.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var Q={warnings:_,longStackTraces:!1,cancellation:!1,monitoring:!1};return w&&t.longStackTraces(),{longStackTraces:function(){return Q.longStackTraces},warnings:function(){return Q.warnings},cancellation:function(){return Q.cancellation},monitoring:function(){return Q.monitoring},propagateFromFunction:function(){return M},boundValueFunction:function(){return L},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&E){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=V(a),c=u.length-1;c>=0;--c){var f=u[c];if(!d.test(f)){var l=f.match(y);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 "+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(X()){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(c=$(i[u])){r=c.fileName,s=c.line;break}for(u=0;u<o.length;++u){var c;if(c=$(o[u])){n=c.fileName,a=c.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(Y=function(t){if(p.test(t))return!0;var e=$(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}},warn:q,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),q(r)},CapturedTrace:K,fireDomEvent:S,fireGlobalEvent:T}}}).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 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(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 c(this))}return p._then(l,h,void 0,this,void 0)}}}return i.isRejected()?(f(this),s.e=r,s):(f(this),r)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){f(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 c=arguments[n];return this._passThrough(a(o,c,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 c=a._boundValue();t:for(var f=0;f<r.length;++f){var l=r[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=n(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,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)),c=1;c<s;++c)a[c-1]=arguments[c];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 c=arguments[1],f=arguments[2];n=s.isArray(c)?a(r).apply(f,c):a(r).call(f,c)}else n=a(r)();var l=u._popContext();return o.checkForgottenReturns(n,l,"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 c=r(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,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,s){var a,u=r(6),c=u.canEvaluate,f=u.tryCatch,l=u.errorObj;if(c){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))},p=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},d=function(e){for(var r=new Array(e),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",s="var promise;\n"+r.map(function(t){return" \n\t promise = "+t+"; \n\t if (promise instanceof Promise) { \n\t promise.cancel(); \n\t } \n\t "}).join("\n"),a=r.join(", "),u="Holder$"+e,c="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 c=c.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",c)(f,l,t,o)},y=[],v=[],g=[],b=0;b<8;++b)y.push(d(b+1)),v.push(h(b+1)),g.push(p(b+1));a=function(t){this._reject(t)}}t.join=function(){var r,o=arguments.length-1;if(o>0&&"function"==typeof arguments[o]&&(r=arguments[o],o<=8&&c)){(E=new t(i))._captureStackTrace();for(var f=new(0,y[o-1])(r),l=v,h=0;h<o;++h){var p=n(arguments[h],E);if(p instanceof t){var d=(p=p._target())._bitField;0==(50397184&d)?(p._then(l[h],a,void 0,E,f),g[h](p,f),f.asyncNeeded=!1):0!=(33554432&d)?l[h].call(E,p._value(),f):0!=(16777216&d)?E._reject(p._reason()):E._cancel()}else l[h].call(E,p,f)}if(!E._isFateSealed()){if(f.asyncNeeded){var b=s();null!==b&&(f.fn=u.domainBind(b,f.fn))}E._setAsyncGuaranteed(),E._setOnCancel(f)}return E}for(var m=arguments.length,_=new Array(m),w=0;w<m;++w)_[w]=arguments[w];r&&_.pop();var E=new e(_).promise();return void 0!==r?E.spread(r):E}}},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,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,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 h(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 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)},n=function(t){return l(t,f,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=y;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),c=u.errorObj,f=u.tryCatch,l=[];function h(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(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 r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=f(this._generator.throw).call(this._generator,r),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 r=this._promise;if(e===c)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=f(r[o])(e);if(n._popContext(),s===c){n._pushContext();var a=t.reject(c.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=h,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));l.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 h(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=t._getDomain,u=r(6),c=u.tryCatch,f=u.errorObj,l=t._async;function h(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=a();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],l.invoke(this._asyncInit,this,void 0)}function p(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+u.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 "+u.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return new h(e,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}u.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,u=this._limit;if(r<0){if(n[r=-1*r-1]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var l=this._promise,h=this._callback,p=l._boundValue();l._pushContext();var d=c(h).call(p,e,r,o),y=l._popContext();if(s.checkForgottenReturns(d,y,null!==a?"Promise.filter":"Promise.map",l),d===f)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 u>=1&&this._inFlight++,n[r]=v,v._proxy(this,-1*(r+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._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 p(this,t,e,null)},t.map=function(t,e,r,n){return p(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,c=r(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,r){var n=i.getDataPropertyOrDefault(t,e+r,f);return!!n&&d(n)}function v(t,e,r,n){for(var o=i.inheritedDataKeys(t),s=[],a=0;a<o.length;++a){var u=o[a],f=t[u],l=n===h||h(u,f,t);"function"!=typeof f||d(f)||y(t,u,e)||!n(u,f,t,l)||s.push(u,f)}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 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,r),s}var g=function(t){return t.replace(/([$])/,"\\$")},b=function(t){return i.filledRange(t,"_arg","")};var m=u?function(r,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],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),y="string"==typeof r||u===n;function v(t){var e=b(t).join(", "),r=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(", ",r)}var g="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",m="'use strict'; \n\t var ret = function (Parameters) { \n\t 'use strict'; \n\t var len = arguments.length; \n\t var promise = new Promise(INTERNAL); \n\t promise._captureStackTrace(); \n\t var nodeback = nodebackForPromise(promise, "+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 m=m.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",m)(t,f,u,s,a,o,i.tryCatch,i.errorObj,i.notEnumerableProp,e)}:function(r,u,c,f,l,h){var p=function(){return this}(),d=r;function y(){var i=u;u===n&&(i=this);var c=new t(e);c._captureStackTrace();var f="string"==typeof d&&this!==p?this[d]:r,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&&(r=f),i.notEnumerableProp(y,"__isPromisified__",!0),y};function _(t,e,r,o,s){for(var a=new RegExp(g(e)+"$"),u=v(t,e,a,r),c=0,f=u.length;c<f;c+=2){var l=u[c],h=u[c+1],p=l+e;if(o===m)t[p]=m(l,n,l,h,e,s);else{var d=o(h,function(){return m(l,n,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 r=function(t,e,r){return m(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 c("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=h);var s=e.promisifier;if("function"!=typeof s&&(s=m),!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 f=t[a[u]];"constructor"!==a[u]&&i.isClass(f)&&(_(f.prototype,n,o,s,r),_(f,n,o,s,r))}return _(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 c=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 f(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=c(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 l(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 f(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(f,e),f.prototype._init=function(){},f.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},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,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 c=new t(e);void 0!==a&&c._propagateFrom(a,3);for(var f=c._fulfill,l=c._reject,h=0,p=r.length;h<p;++h){var d=r[h];(void 0!==d||h in r)&&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,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=t._getDomain,u=r(6),c=u.tryCatch;function f(e,r,n,i){this.constructor$(e);var s=a();this._fn=null===s?r:u.domainBind(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 l(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 "+u.classString(e)):new f(t,e,r,i).promise()}function p(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(d,void 0,void 0,this,void 0)):d.call(this,r)}function d(e){var r,n=this.array,i=n._promise,o=c(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}u.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;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<i;++n){var o={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(p,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(l,l,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.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 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 n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(t),i=r.promise();return r.setHowMany(e),r.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,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 c(t){return clearTimeout(this.handle),t}function f(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(c,f,void 0,u,void 0))._setOnCancel(u)):r=this._then(c,f,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,c=r(6).inherits,f=a.errorObj,l=a.tryCatch,h={};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 y(t,e,r){this._data=t,this._promise=e,this._context=r}function v(t,e,r){this.constructor$(t,e,r)}function g(t){return y.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function b(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(),r=this._context;void 0!==r&&r._pushContext();var n=e!==h?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},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)},b.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 c=new b(r),h=0;h<r;++h){var p=i[h];if(y.isDisposer(p)){var v=p;(p=p.promise())._setDisposable(v)}else{var m=n(p);m instanceof t&&(p=m._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 r=t[e];if(r.isRejected())return f.e=r.error(),f;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=l(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(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 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),c=r(120),f=r(121),l=r(125),h=r(129),p=r(131),d=r(132),y=r(137),v=r(138),g=r(145),b=r(100),m=r(101),_=r(147),w=r(68),E=r(149),x=r(94),S=r(116),T=1,A=2,k=4,j="[object Arguments]",O="[object Function]",C="[object GeneratorFunction]",R="[object Object]",I={};I[j]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[R]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[O]=I["[object WeakMap]"]=!1,t.exports=function t(e,r,P,B,F,M){var L,N=r&T,D=r&A,U=r&k;if(P&&(L=F?P(e,B,F,M):P(e)),void 0!==L)return L;if(!w(e))return e;var q=b(e);if(q){if(L=y(e),!N)return c(e,L)}else{var V=d(e),W=V==O||V==C;if(m(e))return u(e,N);if(V==R||V==j||W&&!F){if(L=D||W?{}:g(e),!N)return D?l(e,a(L,e)):f(e,s(L,e))}else{if(!I[V])return F?e:{};L=v(e,V,N)}}M||(M=new n);var z=M.get(e);if(z)return z;M.set(e,L),E(e)?e.forEach(function(n){L.add(t(n,r,P,n,e,M))}):_(e)&&e.forEach(function(n,i){L.set(i,t(n,r,P,i,e,M))});var H=q?void 0:(U?D?p:h:D?S:x)(e);return i(H||e,function(n,i){H&&(n=e[i=n]),o(L,i,t(n,r,P,i,e,M))}),L}},function(t,e,r){var n=r(45),i=r(53),o=r(54),s=r(55),a=r(56),u=r(57);function c(t){var e=this.__data__=new n(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,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,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))&&(n(t)?h: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 c=e[a],f=o?o(r[c],t[c],c,r,t):void 0;void 0===f&&(f=t[c]),s?i(r,c,f):n(r,c,f)}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),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),f=!r&&i(t),l=!r&&!f&&s(t),h=!r&&!f&&!l&&u(t),p=r||f||l||h,d=p?n(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 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){var i=typeof t;return!!(e=null==e?r:e)&&("number"==i||"symbol"!=i&&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{var t=o&&o.require&&o.require("util").types;return t||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),c=r(71),f=c(n),l=c(i),h=c(o),p=c(s),d=c(a),y=u;(n&&"[object DataView]"!=y(new n(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),r="[object Object]"==e?t.constructor:void 0,n=r?c(r):"";if(n)switch(n){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,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=new 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(143),a=r(144),u="[object Boolean]",c="[object Date]",f="[object Map]",l="[object Number]",h="[object RegExp]",p="[object Set]",d="[object String]",y="[object Symbol]",v="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",m="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",x="[object Uint8Array]",S="[object Uint8ClampedArray]",T="[object Uint16Array]",A="[object Uint32Array]";t.exports=function(t,e,r){var k=t.constructor;switch(e){case v:return n(t);case u:case c:return new k(+t);case g:return i(t,r);case b:case m:case _:case w:case E:case x:case S:case T:case A:return a(t,r);case f:return new k;case l:case d:return new k(t);case h:return o(t);case p:return new k;case y:return s(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){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(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(146),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(148),i=r(108),o=r(109),s=o&&o.isMap,a=s?i(s):n;t.exports=a},function(t,e,r){var n=r(132),i=r(99),o="[object Map]";t.exports=function(t){return i(t)&&n(t)==o}},function(t,e,r){var n=r(150),i=r(108),o=r(109),s=o&&o.isSet,a=s?i(s):n;t.exports=a},function(t,e,r){var n=r(132),i=r(99),o="[object Set]";t.exports=function(t){return i(t)&&n(t)==o}},function(t,e,r){var n=r(152),i=r(49),o=r(160),s=r(116),a=Object.prototype,u=a.hasOwnProperty,c=n(function(t,e){t=Object(t);var r=-1,n=e.length,c=n>2?e[2]:void 0;for(c&&o(e[0],e[1],c)&&(n=1);++r<n;)for(var f=e[r],l=s(f),h=-1,p=l.length;++h<p;){var d=l[h],y=t[d];(void 0===y||i(y,a[d])&&!u.call(t,d))&&(t[d]=f[d])}return t});t.exports=c},function(t,e,r){var n=r(153),i=r(154),o=r(156);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 c=Array(e+1);++s<e;)c[s]=o[s];return c[e]=r(u),n(t,this,c)}}},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(157),i=r(159)(n);t.exports=i},function(t,e,r){var n=r(158),i=r(91),o=r(153),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){t.exports=!1},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(163)).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(164),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(166);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:"",address_prefix:"VIZ",chain_id:"2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd",broadcast_transaction_with_callback:!1}},function(t,e){"use strict";t.exports=[{api:"witness_api",method:"get_miner_queue"},{api:"witness_api",method:"get_witness_schedule"},{api:"witness_api",method:"get_witnesses",params:["witnessIds"]},{api:"witness_api",method:"get_witness_by_account",params:["accountName"]},{api:"witness_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"witness_api",method:"get_witnesses_by_counted_vote",params:["from","limit"]},{api:"witness_api",method:"get_witness_count"},{api:"witness_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"witness_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_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_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_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"]}]},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){s=void 0!==s&&s,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?u(t,e,r,n,i,o,s,a):viz.api.getAccount(e,"VE",function(s,c){s?a(!1):u(t,e,r,n,i,o,c.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,s=void 0!==s&&s,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?u(t,e,r,n,i,o,s,a):viz.api.getAccount(e,"V",function(s,c){s?a(!1):u(t,e,r,n,i,o,c.custom_sequence_block_num,a)})},e.voiceEncodedText=function(t,e,r,o,s,a,u,c,f,l){a=void 0!==a&&a,u=void 0!==u&&u,c=void 0!==c&&c,f=void 0!==f&&f,l=void 0===l?function(){}:l;var h=function(t,e,r,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===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;h.nt=0==d?"t":"e",console.log("encode object",h,"with passphrase",r[d],"and comment",o[d]),h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,r[d]),"object"===(void 0===o?"undefined":n(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,r),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?h(t,e,r,o,s,a,u,c,f,l):viz.api.getAccount(e,"V",function(n,i){n?l(!1):h(t,e,r,o,s,a,u,c,i.custom_sequence_block_num,l)})},e.voicePublication=function(t,e,r,n,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,c=void 0!==c&&c,f=void 0===f?function(){}:f;var l=function(t,e,r,n,i,o,s,a,u,c,f){var l={p:c,t:"p",d:{t:r,m:n}};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?l(t,e,r,n,i,o,s,a,u,c,f):viz.api.getAccount(e,"V",function(c,h){c?f(!1):l(t,e,r,n,i,o,s,a,u,h.custom_sequence_block_num,f)})},e.voiceEncodedPublication=function(t,e,r,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,p=void 0!==p&&p,d=void 0===d?function(){}:d;var y=function(t,e,r,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===r?"undefined":n(r))){for(var v in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var g=v;y.nt=0==g?"t":"e",console.log("encode object",y,"with passphrase",r[g],"and comment",o[g]),y.d=JSON.stringify(y),y.d=i.Aes.simpleEncoder(y.d,r[g]),"object"===(void 0===o?"undefined":n(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,r),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?y(t,e,r,o,s,a,u,c,f,l,h,p,d):viz.api.getAccount(e,"V",function(n,i){n?d(!1):y(t,e,r,o,s,a,u,c,f,l,h,i.custom_sequence_block_num,d)})};var i=r(169),o=/_([a-z])/g},function(t,e,r){"use strict";t.exports={Address:r(170),Aes:r(241),PrivateKey:r(276),PublicKey:r(266),Signature:r(277),brainKey:r(281),key_utils:r(282),hash:r(180),ecc_config:r(165)}},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(175),o=r(165),s=r(180),a=r(239),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 c=r.slice(n.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(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 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,r(171).Buffer)},function(t,e,r){(function(t){
|
|
2
|
+
/*!
|
|
3
|
+
* The buffer module from node.js, for the browser.
|
|
4
|
+
*
|
|
5
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/
|
|
8
|
+
"use strict";var n=r(172),i=r(173),o=r(174);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 l(this,t)}return c(this,t,e,r)}function c(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=h(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):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 r=0;r<e;++r)t[r]=0;return t}function h(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 U(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 U(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):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 c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;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(r+u>a&&(r=a-u),o=r;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 b(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 m(t,e,r,n){return V(U(e,t.length-r),t,r,n)}function _(t,e,r,n){return V(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 _(t,e,r,n)}function E(t,e,r,n){return V(q(e),t,r,n)}function x(t,e,r,n){return V(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 T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)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,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));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 c(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 f(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 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 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)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?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 O(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return k(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 C(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(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),c=this.slice(n,i),f=t.slice(e,r),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,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return v(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 b(this,t,e,r);case"utf8":case"utf-8":return m(this,t,e,r);case"ascii":return _(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 x(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 A=4096;function k(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+=D(t[o]);return i}function C(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(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 P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function B(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,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=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||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||R(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||R(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||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||R(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||R(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||R(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||R(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||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||R(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)||I(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)||I(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||I(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||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(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);I(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||I(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||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,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:U(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(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(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(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){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,l=a>0?s-4:s;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e);1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(f(t,s,s+16383>a?a:s+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],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");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function f(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(c(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){
|
|
9
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
+
e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-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+=n;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,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,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=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=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[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}},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";var n=r(176);
|
|
11
|
+
/*!
|
|
12
|
+
* The buffer module from node.js, for the browser.
|
|
13
|
+
*
|
|
14
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
15
|
+
* @license MIT
|
|
16
|
+
*/function i(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 o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=r(177),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function l(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=b,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(s.isFunction(t)){if(c)return t.name;var e=t.toString().match(p);return e&&e[1]}}function y(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(c||!s.isFunction(t))return s.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function g(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function b(t,e){t||g(t,!0,e,"==",h.ok)}function m(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(l(t)&&l(e)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=_(t),o=_(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),m(t,e,r);var a,c,f=x(t),l=x(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(a=f[c],!m(t[a],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function _(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(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 E(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&&g(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&s.isError(i),u=!t&&i&&!r;if((a&&o&&w(i,r)||u)&&g(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(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 y(v(t.actual),128)+" "+t.operator+" "+y(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=g,h.ok=b,h.equal=function(t,e,r){t!=e&&g(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){m(t,e,!1)||g(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){m(t,e,!0)||g(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){m(t,e,!1)&&g(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){m(e,r,!0)&&g(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&g(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){E(!0,t,e,r)},h.doesNotThrow=function(t,e,r){E(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n(function t(e,r){e||g(e,!0,r,"==",t)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var x=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e){
|
|
17
|
+
/*
|
|
18
|
+
object-assign
|
|
19
|
+
(c) Sindre Sorhus
|
|
20
|
+
@license MIT
|
|
21
|
+
*/
|
|
22
|
+
"use strict";var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var o,s,a=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in o=Object(arguments[u]))n.call(o,c)&&(a[c]=o[c]);if(r){s=r(o);for(var f=0;f<s.length;f++)i.call(o,s[f])&&(a[s[f]]=o[s[f]])}}return a}},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])y(u)||!_(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,i){if(b(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:c};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),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(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 c(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return g(i)||(i=f(t,i,n)),i}var o=function(t,e){if(b(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(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(y(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 l(r);if(0===s.length){if(x(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(m(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 l(r)}var c,_="",S=!1,T=["{","}"];(p(r)&&(S=!0,T=["[","]"]),x(r))&&(_=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(_=" "+RegExp.prototype.toString.call(r)),w(r)&&(_=" "+Date.prototype.toUTCString.call(r)),E(r)&&(_=" "+l(r)),0!==s.length||S&&0!=r.length?n<0?m(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=S?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)k(e,String(s))?o.push(h(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}(t,r,n,a,s):s.map(function(e){return h(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]}(c,_,T)):T[0]+_+T[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(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")),k(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=y(r)?f(t,u.value,null):f(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")),b(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 b(t){return void 0===t}function m(t){return _(t)&&"[object RegExp]"===S(t)}function _(t){return"object"==typeof t&&null!==t}function w(t){return _(t)&&"[object Date]"===S(t)}function E(t){return _(t)&&("[object Error]"===S(t)||t instanceof Error)}function x(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(b(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=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=v,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=m,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=r(178);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),A[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=r(179),e._extend=function(t,e){if(!e||!_(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(181)),i=o(r(236));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){"use strict";var n=r(182),i=r(183),o=r(206),s=r(207),a=r(215);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";var n=r(182),i=r(184),o=r(185).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function c(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,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;n=h(n=h(n=h(n=h(n=l(n=l(n=l(n=l(n=f(n=f(n=f(n=f(n=c(n=c(n=c(n=c(n,i=c(i,o=c(o,r=c(r,n,i,o,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),o,r,t[3],3250441966,22),i=c(i,o=c(o,r=c(r,n,i,o,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),o,r,t[7],4249261313,22),i=c(i,o=c(o,r=c(r,n,i,o,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),o,r,t[11],2304563134,22),i=c(i,o=c(o,r=c(r,n,i,o,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),o,r,t[15],1236535329,22),i=f(i,o=f(o,r=f(r,n,i,o,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),o,r,t[0],3921069994,20),i=f(i,o=f(o,r=f(r,n,i,o,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),o,r,t[4],3889429448,20),i=f(i,o=f(o,r=f(r,n,i,o,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),o,r,t[8],1163531501,20),i=f(i,o=f(o,r=f(r,n,i,o,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),o,r,t[12],2368359562,20),i=l(i,o=l(o,r=l(r,n,i,o,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),o,r,t[14],4259657740,23),i=l(i,o=l(o,r=l(r,n,i,o,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),o,r,t[10],3200236656,23),i=l(i,o=l(o,r=l(r,n,i,o,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),o,r,t[6],76029189,23),i=l(i,o=l(o,r=l(r,n,i,o,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),o,r,t[2],3299628645,23),i=h(i,o=h(o,r=h(r,n,i,o,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),o,r,t[5],4237533241,21),i=h(i,o=h(o,r=h(r,n,i,o,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),o,r,t[1],2240044497,21),i=h(i,o=h(o,r=h(r,n,i,o,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),o,r,t[13],1309151649,21),i=h(i,o=h(o,r=h(r,n,i,o,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},function(t,e,r){"use strict";var n=r(185).Buffer,i=r(187).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(182)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));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},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){
|
|
23
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
24
|
+
var n=r(186),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),s.prototype=Object.create(i.prototype),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){
|
|
25
|
+
/*!
|
|
26
|
+
* The buffer module from node.js, for the browser.
|
|
27
|
+
*
|
|
28
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
29
|
+
* @license MIT
|
|
30
|
+
*/
|
|
31
|
+
"use strict";var n=r(172),i=r(173),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=t,e.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,t.prototype),r}function t(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return u(t,e,r)}function u(e,r,n){if("string"==typeof e)return function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|d(e,r),i=a(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r);if(ArrayBuffer.isView(e))return function(t){if(D(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer))return h(e,r,n);if("undefined"!=typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return h(e,r,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return t.from(i,r,n);var o=function(e){if(t.isBuffer(e)){var r=0|p(e.length),n=a(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(void 0!==e.length)return"number"!=typeof e.length||U(e.length)?a(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),a(t<0?0:0|p(t))}function l(t){for(var e=t.length<0?0:0|p(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(e,r,n){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),Object.setPrototypeOf(i,t.prototype),i}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(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":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(o)return i?-1:M(e).length;r=(""+r).toLowerCase(),o=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(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),U(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:g(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):g(e,[r],n,i,o);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 c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;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(r+u>a&&(r=a-u),o=r;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 b(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;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(U(a))return s;t[r+s]=a}return s}function m(t,e,r,n){return N(M(e,t.length-r),t,r,n)}function _(t,e,r,n){return N(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 N(L(e),t,r,n)}function E(t,e,r,n){return N(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 x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)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,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=T));return r}(n)}e.kMaxLength=s,t.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),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."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),t.poolSize=8192,t.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array),t.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},t.allocUnsafe=function(t){return f(t)},t.allocUnsafeSlow=function(t){return f(t)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(D(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),D(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');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(D(s,Uint8Array))o+s.length>i.length?t.from(s).copy(i,o):Uint8Array.prototype.set.call(i,s,o);else{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=d,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)y(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)y(this,e,e+3),y(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)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},t.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?S(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 j(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,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 t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(t.prototype[o]=t.prototype.inspect),t.prototype.compare=function(e,r,n,i,o){if(D(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),c=this.slice(i,o),f=e.slice(r,n),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,r){return-1!==this.indexOf(t,e,r)},t.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return m(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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 T=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 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 j(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+=q[t[o]];return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(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 R(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 P(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 B(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,r=void 0===r?n:~~r,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return Object.setPrototypeOf(i,t.prototype),i},t.prototype.readUintLE=t.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUintBE=t.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(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=t.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(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||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(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||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||C(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||C(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||C(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||C(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||C(t,4,this.length),i.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},t.prototype.writeUintLE=t.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||R(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=t.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||R(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=t.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(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=t.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(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);R(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);R(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||R(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||R(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||R(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||R(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||R(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 P(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o=i-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),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),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);if(1===e.length){var o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));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:t.from(e,i),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;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=t.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function N(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 D(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function U(t){return t!=t}var q=function(){for(var t=new Array(256),e=0;e<16;++e)for(var r=16*e,n=0;n<16;++n)t[r+n]="0123456789abcdef"[e]+"0123456789abcdef"[n];return t}()}).call(e,r(171).Buffer)},function(t,e,r){(e=t.exports=r(188)).Stream=e,e.Readable=e,e.Writable=r(197),e.Duplex=r(196),e.Transform=r(203),e.PassThrough=r(204),e.finished=r(201),e.pipeline=r(205)},function(t,e,r){(function(e,n){"use strict";var i;t.exports=T,T.ReadableState=S;r(2).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(189),a=r(186).Buffer,u=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,f=r(190);c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,p,d=r(191),y=r(193),v=r(194).getHighWaterMark,g=r(195).codes,b=g.ERR_INVALID_ARG_TYPE,m=g.ERR_STREAM_PUSH_AFTER_EOF,_=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(182)(T,s);var E=y.errorOrDestroy,x=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(196),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=v(this,t,"readableHighWaterMark",n),this.buffer=new d,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.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=r(199).StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(196),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function A(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),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,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,s);else if(i||(o=function(t,e){var r;(function(t){return a.isBuffer(t)||t instanceof u})(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new w):k(t,s,e,!0);else if(s.ended)E(t,new m);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?k(t,s,e,!1):I(t,s)):k(t,s,e,!1)}else n||(s.reading=!1,I(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function k(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&C(t)),I(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=y.destroy,T.prototype._undestroy=y.undestroy,T.prototype._destroy=function(t,e){e(t)},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=a.from(t,e),e=""),r=!0),A(this,t,e,!1,r)},T.prototype.unshift=function(t){return A(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){l||(l=r(199).StringDecoder);var e=new l(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var j=1073741824;function O(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>=j?t=j:(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 C(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(R,t))}function R(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function I(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(P,t,e))}function P(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function B(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function F(t){c("readable nexttick read 0"),t.read(0)}function M(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(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.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):C(this),null;if(0===(t=O(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=O(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new _("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:v;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",d),t.removeListener("finish",y),t.removeListener("drain",f),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",h),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var f=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",f);var l=!1;function h(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==q(i.pipes,t))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(e){c("onerror",e),v(),t.removeListener("error",p),0===o(t,"error")&&E(t,e)}function d(){t.removeListener("finish",y),v()}function y(){c("onfinish"),t.removeListener("close",d),v()}function v(){c("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",d),t.once("finish",y),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},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=q(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)},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?C(this):i.reading||n.nextTick(F,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(B,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(B,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(M,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(c("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){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==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<x.length;o++)t.on(x[o],this.emit.bind(this,x[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(200)),h(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===p&&(p=r(202)),p(T,t,e)})}).call(e,function(){return this}(),r(5))},function(t,e,r){t.exports=r(2).EventEmitter},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var u=r(186).Buffer,c=r(192).inspect,f=c&&c.custom||"inspect";function l(t,e,r){u.prototype.copy.call(t,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 function(t,e,r){e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value: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}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return u.alloc(0);for(var e=u.allocUnsafe(t>>>0),r=this.head,n=0;r;)l(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=u.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:f,value:function(t,e){return c(this,i(i({},e),{},{depth:0,customInspect:!1}))}}]),t}()},190,function(t,e,r){(function(e){"use strict";function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)}),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)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(e,r(5))},function(t,e,r){"use strict";var n=r(195).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e){"use strict";const r={};function n(t,e,n){n||(n=Error);class i extends n{constructor(t,r,n){super(function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(t,r,n))}}i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function i(t,e){if(Array.isArray(t)){const r=t.length;return t=t.map(t=>String(t)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:2===r?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}return`of ${e} ${String(t)}`}n("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(t,e,r){let n,o;if("string"==typeof e&&function(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))o=`The ${t} ${n} ${i(e,"type")}`;else{o=`The "${t}" ${function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument"} ${n} ${i(e,"type")}`}return o+=`. Received type ${typeof r}`},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,r){(function(e){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(188),o=r(197);r(182)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||e.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,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)}})}).call(e,r(5))},function(t,e,r){(function(e,n){"use strict";function i(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)}}var o;t.exports=T,T.WritableState=S;var s={deprecate:r(198)},a=r(189),u=r(186).Buffer,c=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f,l=r(193),h=r(194).getHighWaterMark,p=r(195).codes,d=p.ERR_INVALID_ARG_TYPE,y=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,m=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,w=p.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function x(){}function S(t,e,s){o=o||r(196),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,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,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new v;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(R,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),R(t,e))}(t,r,i,e,o);else{var s=O(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||j(t,r),i?n.nextTick(k,t,r,s,o):k(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(196));if(!e&&!f.call(T,this))return new T(t);this._writableState=new S(t,this,e),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)),a.call(this)}function A(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function k(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),R(t,e)}function j(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,A(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(A(t,e,!1,e.objectMode?1:c.length,c,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final(function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),R(t,e)})}function R(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(C,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(182)(T,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.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]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!f.call(this,t)||this===T&&(t&&t._writableState instanceof S)}})):f=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new g)},T.prototype.write=function(t,e,r){var i=this._writableState,o=!1,s=!i.objectMode&&function(t){return u.isBuffer(t)||t instanceof c}(t);return s&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=x),i.ending?function(t,e){var r=new _;E(t,r),n.nextTick(e,r)}(this,r):(s||function(t,e,r,i){var o;return null===r?o=new m:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.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 c=e.length<e.highWaterMark;c||(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 A(t,e,!1,a,n,i,o);return c}(this,i,s,t,e,r)),o},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||j(this,t))},T.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 w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new y("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,R(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=l.destroy,T.prototype._undestroy=l.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(e,function(){return this}(),r(5))},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}())},[716,185],function(t,e,r){(function(e){"use strict";var n;function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(201),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function p(t,e){return{value:t,done:e}}function d(t){var e=t[s];if(null!==e){var r=t[h].read();null!==r&&(t[f]=null,t[s]=null,t[a]=null,e(p(r,!1)))}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise(function(r,n){e.nextTick(function(){t[u]?n(t[u]):r(p(void 0,!0))})});var n,i=this[f];if(i)n=new Promise(function(t,e){return function(r,n){t.then(function(){e[c]?r(p(void 0,!0)):e[l](r,n)},n)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[l])}return this[f]=n,n}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var t=this;return new Promise(function(e,r){t[h].destroy(null,function(t){t?r(t):e(p(void 0,!0))})})}),n),y);t.exports=function(t){var r,n=Object.create(v,(i(r={},h,{value:t,writable:!0}),i(r,s,{value:null,writable:!0}),i(r,a,{value:null,writable:!0}),i(r,u,{value:null,writable:!0}),i(r,c,{value:t._readableState.endEmitted,writable:!0}),i(r,l,{value:function(t,e){var r=n[h].read();r?(n[f]=null,n[s]=null,n[a]=null,t(p(r,!1))):(n[s]=t,n[a]=e)},writable:!0}),r));return n[f]=null,o(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[a];return null!==e&&(n[f]=null,n[s]=null,n[a]=null,e(t)),void(n[u]=t)}var r=n[s];null!==r&&(n[f]=null,n[s]=null,n[a]=null,r(p(void 0,!0))),n[c]=!0}),t.on("readable",function(t){e.nextTick(d,t)}.bind(null,n)),n}}).call(e,r(5))},function(t,e,r){"use strict";var n=r(195).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){a=!1,c=!0,s||o.call(e)},l=e._readableState&&e._readableState.endEmitted,h=function(){s=!1,l=!0,a||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!l?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},y=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",d),e.req?y():e.on("request",y)):a&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",h),e.on("finish",f),!1!==r.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",f),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",p),e.removeListener("close",d)}}},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=c;var n=r(195).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(196);function c(t){if(!(this instanceof c))return new c(t);u.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);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",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush(function(e,r){l(t,e,r)})}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(182)(c,u),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,r){r(new i("_transform()"))},c.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)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,function(t){e(t)})}},function(t,e,r){"use strict";t.exports=i;var n=r(203);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(182)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(195).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t){t()}function c(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var f,l=function(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var h=e.map(function(t,i){var o=i<e.length-1;return function(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",function(){a=!0}),void 0===n&&(n=r(201)),n(t,{readable:e,writable:i},function(t){if(t)return o(t);a=!0,o()});var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}(t,o,i>0,function(t){f||(f=t),t&&h.forEach(u),o||(h.forEach(u),l(f))})});return e.reduce(c)}},function(t,e,r){"use strict";var n=r(186).Buffer,i=r(182),o=r(184),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<<e|t>>>32-e}function y(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function m(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,_=0|this._a,w=0|this._b,E=0|this._c,x=0|this._d,S=0|this._e,T=0;T<80;T+=1){var A,k;T<16?(A=y(r,n,i,o,p,t[a[T]],l[0],c[T]),k=m(_,w,E,x,S,t[u[T]],h[0],f[T])):T<32?(A=v(r,n,i,o,p,t[a[T]],l[1],c[T]),k=b(_,w,E,x,S,t[u[T]],h[1],f[T])):T<48?(A=g(r,n,i,o,p,t[a[T]],l[2],c[T]),k=g(_,w,E,x,S,t[u[T]],h[2],f[T])):T<64?(A=b(r,n,i,o,p,t[a[T]],l[3],c[T]),k=v(_,w,E,x,S,t[u[T]],h[3],f[T])):(A=m(r,n,i,o,p,t[a[T]],l[4],c[T]),k=y(_,w,E,x,S,t[u[T]],h[4],f[T])),r=p,p=o,o=d(i,10),i=n,n=A,_=S,S=x,x=d(E,10),E=w,w=k}var j=this._b+i+x|0;this._b=this._c+o+S|0,this._c=this._d+p+_|0,this._d=this._e+r+w|0,this._e=this._a+n+E|0,this._a=j},p.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=n.alloc?n.alloc(20):new n(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=p},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(208),e.sha1=r(210),e.sha224=r(211),e.sha256=r(212),e.sha384=r(213),e.sha512=r(214)},function(t,e,r){var n=r(182),i=r(209),o=r(185).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=e[u-3]^e[u-8]^e[u-14]^e[u-16];for(var h=0;h<80;++h){var p=~~(h/20),d=c(r)+l(p,n,i,o)+a+e[h]+s[p]|0;a=o,o=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=o+this._d|0,this._e=a+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(185).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),f=0;f<c;f++)r[u+f]=t[a+f];a+=c,(s+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){var n=r(182),i=r(209),o=r(185).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function l(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(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=c(e[u-3]^e[u-8]^e[u-14]^e[u-16]);for(var p=0;p<80;++p){var d=~~(p/20),y=f(r)+h(d,n,i,o)+a+e[p]+s[d]|0;a=o,o=i,i=l(n),n=r,r=y}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(182),i=r(212),o=r(209),s=r(185).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var n=r(182),i=r(209),o=r(185).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(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 p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function d(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=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]=d(e[g-2])+e[g-7]+p(e[g-15])+e[g-16]|0;for(var b=0;b<64;++b){var m=v+h(a)+c(a,u,y)+s[b]+e[b]|0,_=l(r)+f(r,n,i)|0;v=y,y=u,u=a,a=o+m|0,o=i,i=n,n=r,r=m+_|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=u+this._f|0,this._g=y+this._g|0,this._h=v+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(182),i=r(214),o=r(209),s=r(185).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){var n=r(182),i=r(209),o=r(185).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(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 p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function y(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 g(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,m=0|this._hh,_=0|this._al,w=0|this._bl,E=0|this._cl,x=0|this._dl,S=0|this._el,T=0|this._fl,A=0|this._gl,k=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],R=p(O,C),I=d(C,O),P=y(O=e[j-4],C=e[j-4+1]),B=v(C,O),F=e[j-14],M=e[j-14+1],L=e[j-32],N=e[j-32+1],D=I+M|0,U=R+F+g(D,I)|0;U=(U=U+P+g(D=D+B|0,B)|0)+L+g(D=D+N|0,N)|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=f(r,n,i),W=f(_,w,E),z=l(r,_),H=l(_,r),G=h(a,S),X=h(S,a),Y=s[q],J=s[q+1],$=c(a,u,b),K=c(S,T,A),Z=k+X|0,Q=m+G+g(Z,k)|0;Q=(Q=(Q=Q+$+g(Z=Z+K|0,K)|0)+Y+g(Z=Z+J|0,J)|0)+U+g(Z=Z+D|0,D)|0;var tt=H+W|0,et=z+V+g(tt,H)|0;m=b,k=A,b=u,A=T,u=a,T=S,a=o+Q+g(S=x+Z|0,x)|0,o=i,x=E,i=n,E=w,n=r,w=_,r=Q+et+g(_=Z+tt|0,Z)|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+S|0,this._fl=this._fl+T|0,this._gl=this._gl+A|0,this._hl=this._hl+k|0,this._ah=this._ah+r+g(this._al,_)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,E)|0,this._dh=this._dh+o+g(this._dl,x)|0,this._eh=this._eh+a+g(this._el,S)|0,this._fh=this._fh+u+g(this._fl,T)|0,this._gh=this._gh+b+g(this._gl,A)|0,this._hh=this._hh+m+g(this._hl,k)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){var n=r(185).Buffer,i=r(216).Transform,o=r(199).StringDecoder;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(182)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));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,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}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},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},t.exports=s},function(t,e,r){t.exports=i;var n=r(2).EventEmitter;function i(){n.call(this)}r(182)(i,n),i.Readable=r(217),i.Writable=r(232),i.Duplex=r(233),i.Transform=r(234),i.PassThrough=r(235),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 c(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",c),t.on("error",c),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(218)).Stream=e,e.Readable=e,e.Writable=r(228),e.Duplex=r(227),e.Transform=r(230),e.PassThrough=r(231)},function(t,e,r){(function(e,n){"use strict";var i=r(219);t.exports=m;var o,s=r(174);m.ReadableState=b;r(2).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(220),c=r(221).Buffer,f=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(r(222));l.inherits=r(182);var h=r(223),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,y=r(224),v=r(226);l.inherits(m,u);var g=["error","close","destroy","pause","resume"];function b(t,e){o=o||r(227),t=t||{};var n=e instanceof o;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 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=r(229).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function m(t){if(o=o||r(227),!(this instanceof m))return new m(t);this._readableState=new b(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,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 c.isBuffer(t)||t instanceof f})(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)===c.prototype||(e=function(t){return c.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):A(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)),A(t,e)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),m.prototype.destroy=v.destroy,m.prototype._undestroy=v.undestroy,m.prototype._destroy=function(t,e){this.push(null),e(t)},m.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=c.from(t,e),e=""),r=!0),_(this,t,e,!1,r)},m.prototype.unshift=function(t){return _(this,t,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(t){return d||(d=r(229).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 S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(T,t):T(t))}function T(t){p("emit readable"),t.emit("readable"),C(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(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"),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 R(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=c.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 I(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(P,e,t))}function P(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function B(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}m.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?I(this):S(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&I(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=x(r,e))),null===(n=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit("data",n),n},m.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},m.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?f:m;function c(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",g),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",v),t.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",m),r.removeListener("data",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.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))}}(r);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!==B(o.pipes,t))&&!h&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),r.pause())}function v(e){p("onerror",e),m(),t.removeListener("error",v),0===a(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",b),m()}function b(){p("onfinish"),t.removeListener("close",g),m()}function m(){p("unpipe"),r.unpipe(t)}return r.on("data",y),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",v),t.once("close",g),t.once("finish",b),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},m.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=B(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)},m.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},m.prototype.addListener=m.prototype.on,m.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},m.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},m.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&&void 0!==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(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=R}).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))},189,function(t,e,r){var n=r(186),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 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=r(186).Buffer.isBuffer},190,function(t,e,r){"use strict";var n=r(221).Buffer,i=r(225);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})},190,function(t,e,r){"use strict";var n=r(219);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(219),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var o=Object.create(r(222));o.inherits=r(182);var s=r(218),a=r(228);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||n.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(),n.nextTick(e,t)}},function(t,e,r){(function(e,n,i){"use strict";var o=r(219);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=b;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=g;var c=Object.create(r(222));c.inherits=r(182);var f={deprecate:r(198)},l=r(220),h=r(221).Buffer,p=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,y=r(226);function v(){}function g(t,e){a=a||r(227),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(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 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(_,t,r,s,i):_(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 b(t){if(a=a||r(227),!(d.call(b,this)||this instanceof a))return new b(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 m(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,r,n){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,m(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 c=r.chunk,f=r.encoding,l=r.callback;if(m(t,e,!1,e.objectMode?1:c.length,c,f,l),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 x(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(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,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(b,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===b&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.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&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=v),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=h.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 c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,n,i,o);return u}(this,n,s,t,e,r)),i},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},b.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(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||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(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(5),r(10).setImmediate,function(){return this}())},[716,221],function(t,e,r){"use strict";t.exports=o;var n=r(227),i=Object.create(r(222));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(182),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(230),i=Object.create(r(222));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(182),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(228)},function(t,e,r){t.exports=r(227)},function(t,e,r){t.exports=r(217).Transform},function(t,e,r){t.exports=r(217).PassThrough},function(t,e,r){"use strict";var n=r(182),i=r(237),o=r(215),s=r(185).Buffer,a=r(238),u=r(206),c=r(207),f=s.alloc(128);function l(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:c(t)).update(e).digest():e.length<r&&(e=s.concat([e,f],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:c(t),this._hash.update(n)}n(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,r){"use strict";var n=r(182),i=r(185).Buffer,o=r(215),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(183);t.exports=function(t){return(new n).update(t).digest()}},function(t,e,r){var n=r(240);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){"use strict";var n=r(185).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw new TypeError(o+" is ambiguous");e[s]=i}var a=t.length,u=t.charAt(0),c=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function l(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===u;)i++,r++;for(var s=(t.length-r)*c+1>>>0,f=new Uint8Array(s);t[r];){var l=e[t.charCodeAt(r)];if(255===l)return;for(var h=0,p=s-1;(0!==l||h<o)&&-1!==p;p--,h++)l+=a*f[p]>>>0,f[p]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=h,r++}for(var d=s-o;d!==s&&0===f[d];)d++;var y=n.allocUnsafe(i+(s-d));y.fill(0,0,i);for(var v=i;d!==s;)y[v++]=f[d++];return y}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var c=(s-o)*f+1>>>0,l=new Uint8Array(c);o!==s;){for(var h=e[o],p=0,d=c-1;(0!==h||p<i)&&-1!==d;d--,p++)h+=256*l[d]>>>0,l[d]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");i=p,o++}for(var y=c-i;y!==c&&0===l[y];)y++;for(var v=u.repeat(r);y<c;++y)v+=t.charAt(l[y]);return v},decodeUnsafe:l,decode:function(t){var e=l(t);if(e)return e;throw new Error("Non-base"+a+" 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=l.fromNumber(Date.now()),r=++p%65535;return(e=e.shiftLeft(16).or(l.fromNumber(r))).toString()}();return h(t,e,i,r)},e.decrypt=function(t,e,r,n,i){return h(t,e,r,n,i).message},e.simpleDecoder=function(e,r){var n=new t(e,"base64"),i=c.default.sha512(r),s=i.slice(0,32),a=i.slice(32,48),u=o.default.createDecipheriv("aes-256-cbc",s,a),f=t.concat([u.update(n),u.final()]);return new TextDecoder("utf-8",{fatal:!0}).decode(f)},e.simpleEncoder=function(e,r){var n=c.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=f(r(242)),i=f(r(244)),o=f(r(247)),s=f(r(175)),a=f(r(266)),u=f(r(276)),c=f(r(180));function f(t){return t&&t.__esModule?t:{default:t}}var l=i.default.Long;function h(e,r,n,a,u){if(!(e=d(e)))throw new TypeError("private_key is required");if(!(r=y(r)))throw new TypeError("public_key is required");if(!(n=v(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 f=e.get_shared_secret(r),l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeUint64(n),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),b=h.slice(0,32),m=c.default.sha256(h);if(m=m.slice(0,4),m=i.default.fromBinary(m.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),u){if(m!==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,b,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,b,p);return{nonce:n,message:a,checksum:m}}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,r(171).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&&i.versions&&i.versions.node)return function(t,e){var n=r(243).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(171).Buffer)},190,function(t,e,r){var n,i,o;(function(t){
|
|
32
|
+
/**
|
|
33
|
+
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
|
|
34
|
+
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
|
|
35
|
+
* Released under the Apache License, Version 2.0
|
|
36
|
+
* see: https://github.com/dcodeIO/bytebuffer.js for details
|
|
37
|
+
*/
|
|
38
|
+
!function(s,a){r(245).amd?(i=[r(246)],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(246)}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,c=u>>1,f=-7,l=r?i-1:0,h=r?-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+=n;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,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)}function u(t,e,r,n,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=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=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[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}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 c,f=new e(s,n,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,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 c=this.buffer.byteLength;switch(n>c&&this.resize((c*=2)>n?c: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=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,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 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),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=f.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,f.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=f.calculateUTF16asUTF8(o(t))[1],e+=r;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=r,f.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 f.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return f.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(),f.decodeUTF8(function(){return a<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++a,f.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 c=n+t;if(f.decodeUTF8toUTF16(function(){return n<c?this.view[n++]:null}.bind(this),o=s(),this.noAssert),n!==c)throw RangeError("Illegal range: Truncated data, "+n+" == "+c);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=f.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),f.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 c=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(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 c.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 c.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,c=0,f=!1,l=!1,h=!1,p=!1,d=!1;u<s;){switch(i=t.charAt(u++)){case"!":if(!n){if(l||h||p){d=!0;break}l=h=p=!0}a.offset=a.markedOffset=a.limit=c,f=!1;break;case"|":if(!n){if(l||p){d=!0;break}l=p=!0}a.offset=a.limit=c,f=!1;break;case"[":if(!n){if(l||h){d=!0;break}l=h=!0}a.offset=a.markedOffset=c,f=!1;break;case"<":if(!n){if(l){d=!0;break}l=!0}a.offset=c,f=!1;break;case"]":if(!n){if(p||h){d=!0;break}p=h=!0}a.limit=a.markedOffset=c,f=!1;break;case">":if(!n){if(p){d=!0;break}p=!0}a.limit=c,f=!1;break;case"'":if(!n){if(h){d=!0;break}h=!0}a.markedOffset=c,f=!1;break;case" ":f=!1;break;default:if(!n&&f){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[c++]=o,f=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){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},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 f=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{f.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(f.calculateUTF16asUTF8(o(t),!0)[1],r,n),s=0;return f.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){
|
|
39
|
+
/**
|
|
40
|
+
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
41
|
+
* Released under the Apache License, Version 2.0
|
|
42
|
+
* see: https://github.com/dcodeIO/long.js for details
|
|
43
|
+
*/
|
|
44
|
+
!function(s,a){r(245).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?y:d;if(e){if(t<0)return y;if(t>=l)return _}else{if(t<=-h)return w;if(t+1>=h)return m}return t<0?o(-t,e).neg():s(t%f|0,t/f|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,c=0;c<t.length;c+=8){var f=Math.min(8,t.length-c),l=parseInt(t.substring(c,c+f),r);if(f<8){var h=o(a(r,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 b=i(-1);t.NEG_ONE=b;var m=s(-1,2147483647,!1);t.MAX_VALUE=m;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),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 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 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(v)},E.neg=E.negate,E.add=function(t){e(t)||(t=c(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,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+=n+u)>>>16,l+=r+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 r=this.high>>>16,n=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,b=0;return g+=(b+=a*h)>>>16,v+=(g+=i*h)>>>16,g&=65535,v+=(g+=a*l)>>>16,y+=(v+=n*h)>>>16,v&=65535,y+=(v+=i*l)>>>16,v&=65535,y+=(v+=a*f)>>>16,y+=r*h+n*l+i*f+a*u,s((g&=65535)<<16|(b&=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 r,n,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(b)?w:t.eq(w)?v:(r=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?v:b:(n=this.sub(t.mul(r)),i=r.add(n.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(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),f=o(r),l=f.mul(t);l.isNegative()||l.gt(n);)l=(f=o(r-=u,this.unsigned)).mul(t);f.isZero()&&(f=v),i=i.add(f),n=n.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 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(248),i=r(265),o=r(259);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var n=r(249),i=r(260),o=r(185).Buffer,s=r(263),a=r(215),u=r(261),c=r(264);function f(t,e,r){a.call(this),this._cache=new h,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(182)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function p(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new f(a.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},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 t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=p,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(e,!1,r.key,r.iv);return p(t,i.key,i.iv)}},function(t,e,r){var n={ECB:r(250),CBC:r(251),CFB:r(253),CFB8:r(254),CFB1:r(255),OFB:r(256),CTR:r(257),GCM:r(257)},i=r(259);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},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(252);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){(function(e){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(171).Buffer)},function(t,e,r){var n=r(185).Buffer,i=r(252);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},function(t,e,r){var n=r(185).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){var n=r(185).Buffer;function i(t,e,r){for(var n,i,s,a=-1,u=0;++a<8;)n=t._cipher.encryptBlock(t._prev),i=e&1<<7-a?128:0,u+=(128&(s=n[0]^i))>>a%8,t._prev=o(t._prev,r?i:s);return u}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){(function(t){var n=r(252);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(171).Buffer)},function(t,e,r){var n=r(252),i=r(185).Buffer,o=r(258);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(t),c=o+16*a;t._cache.writeUInt32BE(u[0],c+0),t._cache.writeUInt32BE(u[1],c+4),t._cache.writeUInt32BE(u[2],c+8),t._cache.writeUInt32BE(u[3],c+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,f)}},function(t,e){t.exports=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)}}},function(t,e){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(t,e,r){var n=r(261),i=r(185).Buffer,o=r(215),s=r(182),a=r(262),u=r(252),c=r(258);function f(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var f=this._cipher.encryptBlock(u);this._ghash=new a(f),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),t._finID=n.state;var l=i.from(t._finID);return c(l),l}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},function(t,e,r){var n=r(185).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,u,c=r[0],f=r[1],l=r[2],h=r[3],p=t[0]^e[0],d=t[1]^e[1],y=t[2]^e[2],v=t[3]^e[3],g=4,b=1;b<i;b++)o=c[p>>>24]^f[d>>>16&255]^l[y>>>8&255]^h[255&v]^e[g++],s=c[d>>>24]^f[y>>>16&255]^l[v>>>8&255]^h[255&p]^e[g++],a=c[y>>>24]^f[v>>>16&255]^l[p>>>8&255]^h[255&d]^e[g++],u=c[v>>>24]^f[p>>>16&255]^l[d>>>8&255]^h[255&y]^e[g++],p=o,d=s,y=a,v=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[y>>>8&255]<<8|n[255&v])^e[g++],s=(n[d>>>24]<<24|n[y>>>16&255]<<16|n[v>>>8&255]<<8|n[255&p])^e[g++],a=(n[y>>>24]<<24|n[v>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[g++],u=(n[v>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&y])^e[g++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var f=t[s],l=t[f],h=t[l],p=257*t[c]^16843008*c;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*h^65537*l^257*f^16843008*s,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===s?s=a=1:(s=f^t[t[t[h^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var c=[],f=0;f<n;f++){var l=n-f,h=i[l-(f%4?0:4)];c[f]=f<4||l<=4?h:u.INV_SUB_MIX[0][u.SBOX[h>>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,r){var n=r(185).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.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],i=-1;++i<128;){for(0!=(this.state[~~(i/8)]&1<<7-i%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),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=o(n)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},function(t,e,r){var n=r(261),i=r(185).Buffer,o=r(215);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(182)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},function(t,e,r){var n=r(185).Buffer,i=r(183);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var l=0;if(s>0){var h=a.length-s;l=Math.min(s,c.length),c.copy(a,h,0,l),s-=l}if(l<c.length&&o>0){var p=u.length-o,d=Math.min(o,c.length-l);c.copy(u,p,l,l+d),o-=d}}return c.fill(0),{key:a,iv:u}}},function(t,e,r){var n=r(260),i=r(185).Buffer,o=r(249),s=r(263),a=r(215),u=r(261),c=r(264);function f(t,e,r){a.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function h(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new f(a.module,e,r)}r(182)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var 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")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=i.concat([this.cache,t])},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},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return h(t,n.key,n.iv)},e.createDecipheriv=h},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(267),o=r(271),s=o.getCurveByName("secp256k1");i=r(267);var a=r(239),u=r(180),c=r(165),f=r(175),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 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]:c.get("address_prefix");return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=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]:c.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){f(e.isBuffer(r),"Buffer required: offset"),f.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=u.sha256(r);var n=i.fromBuffer(r);if(n.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var o=l.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]:c.get("address_prefix");try{return t.fromStringOrThrow(e,r)}catch(t){return null}}},{key:"fromStringOrThrow",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix"),i=r.slice(0,n.length);f.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),f.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(171).Buffer)},function(t,e,r){var n=r(268);r(270),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(269).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",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 r=c[t.charCodeAt(e)];return null==r?-1:r}function h(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 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 b(t,e){return t^e}function m(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 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)},y.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},y.prototype.revert=function(t){var e=new n;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 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)},y.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},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 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]:l(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,c=this.DB-p(i[i.t-1]);c>0?(i.lShiftTo(c,s),o.lShiftTo(c,r)):(i.copyTo(s),o.copyTo(r));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=r.t,b=g-f,m=null==e?new n:e;for(s.dlShiftTo(b,m),r.compareTo(m)>=0&&(r[r.t++]=1,r.subTo(m,r)),n.ONE.dlShiftTo(f,m),m.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--b>=0;){var _=r[--g]==l?this.DM:Math.floor(r[g]*d+(r[g-1]+v)*y);if((r[g]+=s.am(0,_,r,b,0,f))<_)for(s.dlShiftTo(b,m),r.subTo(m,r);r[g]<--_;)r.subTo(m,r)}null!=e&&(r.drShiftTo(f,e),a!=u&&n.ZERO.subTo(e,e)),r.t=f,r.clamp(),c>0&&r.rShiftTo(c,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=f(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+=f(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 y(e),this.exp(t,r)},E.prototype.convert=x,E.prototype.revert=x,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 T=[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],A=(1<<26)/T[T.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=h(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 c=l(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+c,++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)>T.length&&(t=T.length);for(var o=new n(null),s=[],a=0;a<t;++a){for(;c=T[Math.floor(Math.random()*T.length)],-1!=s.indexOf(c););s.push(c),o.fromInt(c);var u=o.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<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,v,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,b,e),e},i.andNot=function(t){var e=new n;return this.bitwiseTo(t,m,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+_(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,m)},i.flipBit=function(t){return this.changeBit(t,b)},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=h(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 y(e);var a=new Array,u=3,c=r-1,f=(1<<r)-1;if(a[1]=i.convert(this),r>1){var l=new n;for(i.sqrTo(a[1],l);u<=f;)a[u]=new n,i.mulTo(l,a[u-2],a[u]),u+=2}var v,g,b=t.t-1,m=!0,_=new n;for(o=p(t[b])-1;b>=0;){for(o>=c?v=t[b]>>o-c&f:(v=(t[b]&(1<<o+1)-1)<<c-o,b>0&&(v|=t[b-1]>>this.DB+o-c)),u=r;0==(1&v);)v>>=1,--u;if((o-=u)<0&&(o+=this.DB,--b),m)a[v].copyTo(s),m=!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(;b>=0&&0==(t[b]&1<<o);)i.sqrTo(s,_),g=s,s=_,_=g,--o<0&&(o=this.DB-1,--b)}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=h(1),s=h(0),a=h(0),u=h(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]<=T[T.length-1]){for(e=0;e<T.length;++e)if(r[0]==T[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<T.length;){for(var n=T[e],i=e+1;i<T.length&&n<A;)n*=T[i++];for(n=r.modInt(n);e<i;)if(n%T[e++]==0)return!1}return r.millerRabin(t)},i.square=function(){var t=new n;return this.squareTo(t),t},n.ZERO=h(0),n.ONE=h(1),n.valueOf=h,t.exports=n},function(t,e){t.exports={_from:"bigi@^1.4.2",_id:"bigi@1.4.2",_inBundle:!1,_integrity:"sha512-ddkU+dFIuEIW8lE7ZwdIAf2UPoM90eaprg5m3YXAVVTmKlqV/9BX4A2M8BOK2yOq6/VgZFVhK6QAxJebhlbhzw==",_location:"/bigi",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"bigi@^1.4.2",name:"bigi",escapedName:"bigi",rawSpec:"^1.4.2",saveSpec:null,fetchSpec:"^1.4.2"},_requiredBy:["/","/ecurve"],_resolved:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz",_shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",_spec:"bigi@^1.4.2",_where:"/root/viz-js-lib",bugs:{url:"https://github.com/cryptocoinjs/bigi/issues"},bundleDependencies:!1,dependencies:{},deprecated:!1,description:"Big integers.",devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},homepage:"https://github.com/cryptocoinjs/bigi#readme",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],main:"./lib/index.js",name:"bigi",repository:{url:"git+https://github.com/cryptocoinjs/bigi.git",type:"git"},scripts:{"browser-test":"mochify --wd -R spec",coverage:"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info",jshint:"jshint --config jshint.json lib/*.js ; true",test:"_mocha -- test/*.js",unit:"mocha"},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"]},version:"1.4.2"}},function(t,e,r){(function(t){var e=r(175),n=r(268);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(171).Buffer)},function(t,e,r){var n=r(272),i=r(273),o=r(274);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){var n=r(175),i=r(185).Buffer,o=r(267),s=o.valueOf(3);function a(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(a.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(a.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(a.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),a.fromAffine=function(t,e,r){return new a(t,e,r,o.ONE)},a.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())},a.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new a(this.curve,this.x,t,this.z)},a.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),o=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===o.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=o.square(),c=u.multiply(o),f=e.multiply(u),l=i.square().multiply(this.z),h=l.subtract(f.shiftLeft(1)).multiply(t.z).subtract(c).multiply(o).mod(this.curve.p),p=f.multiply(s).multiply(i).subtract(r.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 a(this.curve,h,p,d)},a.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,o=t.square().multiply(s);0!==i.signum()&&(o=o.add(this.z.square().multiply(i)));var u=(o=o.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),c=o.multiply(s).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.pow(3)).mod(this.curve.p),f=r.pow(3).shiftLeft(3).mod(this.curve.p);return new a(this.curve,u,c,f)},a.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(s),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var a=r.testBit(o),u=e.testBit(o);i=i.twice(),a!==u&&(i=i.add(a?this:n))}return i},a.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},a.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return i.alloc(1,0);var e,r=this.affineX,n=this.affineY,o=this.curve.pLength;return t?(e=i.allocUnsafe(1+o)).writeUInt8(n.isEven()?2:3,0):((e=i.allocUnsafe(1+o+o)).writeUInt8(4,0),n.toBuffer(o).copy(e,1+o)),r.toBuffer(o).copy(e,1),e},a.decodeFrom=function(t,e){var r,i=e.readUInt8(0),s=4!==i,u=Math.floor((t.p.bitLength()+7)/8),c=o.fromBuffer(e.slice(1,1+u));if(s){n.equal(e.length,u+1,"Invalid sequence length"),n(2===i||3===i,"Invalid sequence tag");var f=3===i;r=t.pointFromX(f,c)}else{n.equal(e.length,1+u+u,"Invalid sequence length");var l=o.fromBuffer(e.slice(1+u));r=a.fromAffine(t,c,l)}return r.compressed=s,r},a.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=a},function(t,e,r){var n=r(175),i=r(267),o=r(272);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(267),i=r(275),o=r(273);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),c=new n(e.h,16),f=new n(e.Gx,16),l=new n(e.Gy,16);return new o(r,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,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(271),o=i.Point,s=i.getCurveByName("secp256k1"),a=r(267),u=r(239),c=r(175),f=r(180),l=r(266),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 n(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=f.sha256(t);r=(r=f.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=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(),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 f.sha512(i)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=f.sha256(r);var n=a.fromBuffer(r);if(n.compareTo(h)>=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(f.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);c.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.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(r){return t.fromBuffer(new e(r,"hex"))}}]),t}();t.exports=p;var d=function(t){return null==t?t:t.Q?t:l.fromStringOrThrow(t)}}).call(e,r(171).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(278),o=r(180),s=r(271).getCurveByName("secp256k1"),a=r(175),u=r(267),c=r(266),f=r(276),l=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),c.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,c,f,l,p,d,y;for(n=h(n),a(n,"private_key required"),l=null,y=0,c=u.fromBuffer(r);;){if(d=(o=(f=i.sign(s,r,n.d,y++)).toDER())[5+(p=o[3])],32===p&&32===d){l=i.calcPubKeyRecoveryParam(s,c,f,n.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(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),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(n);return i.verify(s,l,r,h.Q)}}]),t}(),h=function(t){return t?t.d?t:f.fromWif(t):t};t.exports=l}).call(e,r(171).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(175),i=r(180),o=r(279),s=r(267),a=r(280);function u(t,r,a,u,c){o("Buffer",r),o(s,a),c&&(r=i.sha256(e.concat([r,new e(c)]))),n.equal(r.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,r]),l),h=i.HmacSHA256(h,l),l=i.HmacSHA256(e.concat([h,new e([1]),f,r]),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,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),c=e.multiply(u).mod(i),f=s.multiply(u).mod(i),l=o.multiplyTwo(c,n,f);return!t.isInfinity(l)&&l.affineX.mod(i).equals(s)}function f(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 c=1&i,f=i>>1?a.add(o):a,l=t.pointFromX(c,f),h=l.multiply(o);n(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,r,n){for(var i=0;i<4;i++)if(f(t,e,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:u,recoverPubKey:f,sign:function(t,e,r,n){var i,o,c=s.fromBuffer(e),f=t.n,l=t.G,h=(u(t,e,r,function(e){var n=l.multiply(e);return!t.isInfinity(n)&&0!==(i=n.affineX.mod(f)).signum()&&0!==(o=e.modInverse(f).multiply(c.add(r.multiply(i))).mod(f)).signum()},n),f.shiftRight(1));return o.compareTo(h)>0&&(o=f.subtract(o)),new a(i,o)},verify:function(t,e,r,n){return c(t,s.fromBuffer(e),r,n)},verifyRaw:c}}).call(e,r(171).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(171).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(175),i=r(279),o=r(267);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 c=o.fromDERInteger(a),f=o.fromDERInteger(u);return n(c.signum()>=0,"R value is negative"),n(f.signum()>=0,"S value is negative"),new s(c,f)},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(171).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(276),i=r(180),o=r(242),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 c,f=e[Symbol.iterator]();!(n=(c=f.next()).done);n=!0){var l=c.value,h=s++%101;(u[h]+=l)>9007199254740991&&(u[h]=0)}}catch(t){i=!0,o=t}finally{try{!n&&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 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(171).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(284)),i=o(r(287));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(285)),o=u(r(162)),s=u(r(286)),a=u(r(165));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 r=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return r.name="RPCError",r.code=t.code,r.data=t.data,r}return l(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 y=function(t){function e(){return c(this,e),f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,s.default),n(e,[{key:"send",value:function(t,e,r){h("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=y},function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(r.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};function o(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r.iterable&&(e[Symbol.iterator]=function(){return e}),e}function u(t){this.map={},t instanceof u?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function l(t){var e=new FileReader,r=f(e);return e.readAsArrayBuffer(t),r}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:r.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r.arrayBuffer&&r.blob&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):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):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=f(e);return e.readAsText(t),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)},r.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(t,e){t=o(t),e=s(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},u.prototype.delete=function(t){delete this.map[o(t)]},u.prototype.get=function(t){return t=o(t),this.has(t)?this.map[t]:null},u.prototype.has=function(t){return this.map.hasOwnProperty(o(t))},u.prototype.set=function(t,e){this.map[o(t)]=s(e)},u.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},u.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),a(t)},u.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),a(t)},u.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),a(t)},r.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,e){var r=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new u(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 u(e.headers)),this.method=function(t){var e=t.toUpperCase();return d.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function v(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 g(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new u(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},p.call(y.prototype),p.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:0,statusText:""});return t.type="error",t};var b=[301,302,303,307,308];g.redirect=function(t,e){if(-1===b.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},e.DOMException=t.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 m(t,n){return new Promise(function(i,o){var s=new y(t,n);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:function(t){var e=new u;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}}),e}(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;i(new g(e,t))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r.blob&&(a.responseType="blob"),s.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)})}m.polyfill=!0,t.fetch||(t.fetch=m,t.Headers=u,t.Request=y,t.Response=g),e.Headers=u,e.Request=y,e.Response=g,e.fetch=m,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},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=c(r(3)),o=c(r(161)),s=c(r(162)),a=c(r(165)),u=c(r(286));function c(t){return t&&t.__esModule?t:{default:t}}var f=void 0;if(o.default)f=r(288);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 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 f(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(){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,r){var n=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),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(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 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=h},190,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";
|
|
45
|
+
/*!
|
|
46
|
+
* Dependencies
|
|
47
|
+
* --------------------------------------------------------------------------*/var n=r(320);function i(t,e,r,i,o,s){"string"==typeof r&&(r=t[r]),t[e]=n.stub(r,i,o&&(s?o.bind(t):o))}function o(t,e){t[e]&&t[e].restore&&t[e].restore()}(t.exports=function(t,e,r,n,s){"function"!=typeof r&&r||(s=n,n=r,r=e,e=t,t=r),before(function(){i(this,t,e,r,n,s)}),after(function(){o(this,t)})}).each=function(t,e,r,n,s){"function"!=typeof r&&r||(s=n,n=r,r=e,e=t,t=r),beforeEach(function(){o(this,t),i(this,t,e,r,n,s)}),afterEach(function(){o(this,t)})}},function(t,e,r){var n,i;(function(t){
|
|
48
|
+
/**
|
|
49
|
+
* Sinon core utilities. For internal use only.
|
|
50
|
+
*
|
|
51
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
52
|
+
* @license BSD
|
|
53
|
+
*
|
|
54
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
55
|
+
*/
|
|
56
|
+
!function(){"use strict";var o,s=void 0!==t&&t.exports&&!0;function a(t,e,r){o=r.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 r(321)&&r(321)?void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i):s?(a(r(322),t.exports,t),o=t.exports):o={}}()}).call(e,r(102)(t))},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,r){var n={"./sinon":320,"./sinon.js":320,"./sinon/assert":323,"./sinon/assert.js":323,"./sinon/behavior":325,"./sinon/behavior.js":325,"./sinon/call":326,"./sinon/call.js":326,"./sinon/collection":327,"./sinon/collection.js":327,"./sinon/extend":328,"./sinon/extend.js":328,"./sinon/format":329,"./sinon/format.js":329,"./sinon/log_error":353,"./sinon/log_error.js":353,"./sinon/match":354,"./sinon/match.js":354,"./sinon/mock":355,"./sinon/mock.js":355,"./sinon/sandbox":356,"./sinon/sandbox.js":356,"./sinon/spy":357,"./sinon/spy.js":357,"./sinon/stub":358,"./sinon/stub.js":358,"./sinon/test":359,"./sinon/test.js":359,"./sinon/test_case":360,"./sinon/test_case.js":360,"./sinon/times_in_words":361,"./sinon/times_in_words.js":361,"./sinon/typeOf":362,"./sinon/typeOf.js":362,"./sinon/util/core":363,"./sinon/util/core.js":363,"./sinon/util/event":365,"./sinon/util/event.js":365,"./sinon/util/fake_server":366,"./sinon/util/fake_server.js":366,"./sinon/util/fake_server_with_clock":367,"./sinon/util/fake_server_with_clock.js":367,"./sinon/util/fake_timers":368,"./sinon/util/fake_timers.js":368,"./sinon/util/fake_xdomain_request":370,"./sinon/util/fake_xdomain_request.js":370,"./sinon/util/fake_xml_http_request":371,"./sinon/util/fake_xml_http_request.js":371,"./sinon/util/timers_ie":372,"./sinon/util/timers_ie.js":372,"./sinon/util/xdr_ie":373,"./sinon/util/xdr_ie.js":373,"./sinon/util/xhr_ie":374,"./sinon/util/xhr_ie.js":374,"./sinon/walk":375,"./sinon/walk.js":375};function i(t){return r(o(t))}function o(t){return n[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=322},function(t,e,r){var n,i;(function(t,o){
|
|
57
|
+
/**
|
|
58
|
+
* Assertions matching the test spy retrieval interface.
|
|
59
|
+
*
|
|
60
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
61
|
+
* @license BSD
|
|
62
|
+
*
|
|
63
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
64
|
+
*/
|
|
65
|
+
!function(t,s){"use strict";var a=Array.prototype.slice;function u(t){var e;function r(){for(var t,n=0,i=arguments.length;n<i;++n)(t=arguments[n])||e.fail("fake is not a spy"),t.proxy&&t.proxy.isSinonProxy?r(t.proxy):("function"!=typeof t&&e.fail(t+" is not a function"),"function"!=typeof t.getCall&&e.fail(t+" is not stubbed"))}function n(t,r){((t=t||s).fail||e.fail).call(t,r)}function i(t,i,o){2===arguments.length&&(o=i,i=t),e[t]=function(s){r(s);var u=a.call(arguments,1);!function(t,r){switch(t){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==r.length&&e.fail(t+" takes 1 argument but was called with "+(r.length+1)+" arguments")}}(t,u);("function"==typeof i?!i(s):"function"==typeof s[i]?!s[i].apply(s,u):!s[i])?n(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 r=new Error(t);throw r.name=this.failException||e.failException,r},pass:function(){},callOrder:function(){r.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){}n(this,"expected "+i+" to be called in order but were called as "+o)}},callCount:function(i,o){if(r(i),i.callCount!==o){var s="expected %n to be called "+t.timesInWords(o)+" but was called %c%C";n(this,i.printf(s))}else e.pass("callCount")},expose:function(t,e){if(!t)throw new TypeError("target is null or undefined");var r=e||{},n=void 0===r.prefix?"assert":r.prefix,i=void 0===r.includeFail||!!r.includeFail;for(var s in this)"expose"===s||!i&&/^(fail)/.test(s)||(t[o(n,s)]=this[s]);return t},match:function(r,i){t.match(i).test(r)?e.pass("match"):n(this,["expected value to match"," expected = "+t.format(i)," actual = "+t.format(r)].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,r){var n=t("./util/core");t("./match"),t("./format"),r.exports=u(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=f)?n.call(e,r,e,o):n)||(o.exports=i):c?f(r(324),o.exports,o):t&&u(t)}("object"==typeof sinon&&sinon,void 0!==t?t:self)}).call(e,function(){return this}(),r(102)(t))},function(t,e,r){var n={"./assert":323,"./assert.js":323,"./behavior":325,"./behavior.js":325,"./call":326,"./call.js":326,"./collection":327,"./collection.js":327,"./extend":328,"./extend.js":328,"./format":329,"./format.js":329,"./log_error":353,"./log_error.js":353,"./match":354,"./match.js":354,"./mock":355,"./mock.js":355,"./sandbox":356,"./sandbox.js":356,"./spy":357,"./spy.js":357,"./stub":358,"./stub.js":358,"./test":359,"./test.js":359,"./test_case":360,"./test_case.js":360,"./times_in_words":361,"./times_in_words.js":361,"./typeOf":362,"./typeOf.js":362,"./util/core":363,"./util/core.js":363,"./util/event":365,"./util/event.js":365,"./util/fake_server":366,"./util/fake_server.js":366,"./util/fake_server_with_clock":367,"./util/fake_server_with_clock.js":367,"./util/fake_timers":368,"./util/fake_timers.js":368,"./util/fake_xdomain_request":370,"./util/fake_xdomain_request.js":370,"./util/fake_xml_http_request":371,"./util/fake_xml_http_request.js":371,"./util/timers_ie":372,"./util/timers_ie.js":372,"./util/xdr_ie":373,"./util/xdr_ie.js":373,"./util/xhr_ie":374,"./util/xhr_ie.js":374,"./walk":375,"./walk.js":375};function i(t){return r(o(t))}function o(t){return n[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=324},function(t,e,r){var n,i;(function(t,o,s){
|
|
66
|
+
/**
|
|
67
|
+
* Stub behavior
|
|
68
|
+
*
|
|
69
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
70
|
+
* @author Tim Fischbach (mail@timfischbach.de)
|
|
71
|
+
* @license BSD
|
|
72
|
+
*
|
|
73
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
74
|
+
*/
|
|
75
|
+
!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,r){if("number"==typeof e.callArgAt){var n=function(t,e){var r,n=t.callArgAt;if(n>=0)return e[n];n===f&&(r=e),n===l&&(r=u.call(e).reverse());for(var i=t.callArgProp,o=0,s=r.length;o<s;++o){if(!i&&"function"==typeof r[o])return r[o];if(i&&r[o]&&"function"==typeof r[o][i])return r[o][i]}return null}(e,r);if("function"!=typeof n)throw new TypeError(function(e,r,n){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.",n.length>0&&(i+=" Received ["+c.call(n,", ")+"]"),i):"argument at index "+e.callArgAt+" is not a function: "+r}(e,n,r));e.callbackAsync?h(function(){n.apply(e.callbackContext,e.callbackArguments)}):n.apply(e.callbackContext,e.callbackArguments)}}var r={create:function(e){var r=t.extend({},t.behavior);return delete r.create,r.stub=e,r},isPresent:function(){return"number"==typeof this.callArgAt||this.exception||"number"==typeof this.returnArgAt||this.returnThis||this.returnValueDefined},invoke:function(t,r){if(e(this,r),this.exception)throw this.exception;return"number"==typeof this.returnArgAt?r[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 n(t){return function(){var e=this[t].apply(this,arguments);return this.callbackAsync=!0,e}}for(var i in r)r.hasOwnProperty(i)&&i.match(/^(callsArg|yields)/)&&!i.match(/Async/)&&(r[i+"Async"]=n(i));return t.behavior=r,r}var y=void 0!==s&&s.exports&&!0;function v(t,e,r){var n=t("./util/core");t("./extend"),r.exports=d(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=v)?n.call(e,r,e,s):n)||(s.exports=i):y?v(r(324),s.exports,s):a&&d(a)}("object"==typeof sinon&&sinon)}).call(e,r(5),r(10).setImmediate,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
76
|
+
/**
|
|
77
|
+
* Spy calls
|
|
78
|
+
*
|
|
79
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
80
|
+
* @author Maximilian Antoni (mail@maxantoni.de)
|
|
81
|
+
* @license BSD
|
|
82
|
+
*
|
|
83
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
84
|
+
* Copyright (c) 2013 Maximilian Antoni
|
|
85
|
+
*/
|
|
86
|
+
!function(o){"use strict";var s=Array.prototype.slice;function a(t){function e(e,r,n){var i=t.functionName(e)+r;throw n.length&&(i+=" Received ["+s.call(n).join(", ")+"]"),new Error(i)}var r={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 r=0;r<e;r+=1)if(!t.deepEqual(arguments[r],this.args[r]))return!1;return!0},calledWithMatch:function(){var e=arguments.length;if(e>this.args.length)return!1;for(var r=0;r<e;r+=1){var n=this.args[r],i=arguments[r];if(!t.match||!t.match(i).test(n))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 r=s.call(arguments,2);this.args[t].apply(e,r)},yield:function(){this.yieldOn.apply(this,[null].concat(s.call(arguments,0)))},yieldOn:function(t){for(var r=this.args,n=0,i=r.length;n<i;++n)if("function"==typeof r[n])return void r[n].apply(t,s.call(arguments,1));e(this.proxy," cannot yield since no callback was passed.",r)},yieldTo:function(t){this.yieldToOn.apply(this,[t,null].concat(s.call(arguments,1)))},yieldToOn:function(t,r){for(var n=this.args,i=0,o=n.length;i<o;++i)if(n[i]&&"function"==typeof n[i][t])return void n[i][t].apply(r,s.call(arguments,2));e(this.proxy," cannot yield to '"+t+"' since no callback was passed.",n)},getStackFrames:function(){return this.stack&&this.stack.split("\n").slice(3)},toString:function(){var e=this.proxy?this.proxy.toString()+"(":"",r=[];if(!this.args)return":(";for(var n=0,i=this.args.length;n<i;++n)r.push(t.format(this.args[n]));return e=e+r.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 n(e,n,i,o,s,a,u){if("number"!=typeof a)throw new TypeError("Call id is not a number");var c=t.create(r);return c.proxy=e,c.thisValue=n,c.args=i,c.returnValue=o,c.exception=s,c.callId=a,c.stack=u,c}return r.invokeCallback=r.yield,n.toString=r.toString,t.spyCall=n,n}var u=void 0!==t&&t.exports&&!0;function c(t,e,r){var n=t("./util/core");t("./match"),t("./format"),r.exports=a(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=c)?n.call(e,r,e,t):n)||(t.exports=i):u?c(r(324),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
87
|
+
/**
|
|
88
|
+
* Collections of stubs, spies and mocks.
|
|
89
|
+
*
|
|
90
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
91
|
+
* @license BSD
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
94
|
+
*/
|
|
95
|
+
!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 r=u(t),n=0,i=r.length;n<i;n+=1)"function"==typeof r[n][e]&&r[n][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,r,n){if(r){var i=e[r];if("function"!=typeof i){if(!a.call(e,r))throw new TypeError("Cannot stub non-existent own property "+r);return e[r]=n,this.add({restore:function(){e[r]=i}})}}if(!r&&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,r){var n=t("./util/core");t("./mock"),t("./spy"),t("./stub"),r.exports=f(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=h)?n.call(e,r,e,t):n)||(t.exports=i):l?h(r(324),t.exports,t):o&&f(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,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 r in t)t.hasOwnProperty(r)&&e.push(t[r]());return"0123456789"!==e.join("")}();return t.extend=function(t){var r,n,i,o=Array.prototype.slice.call(arguments,1);for(n=0;n<o.length;n++){for(i in r=o[n])r.hasOwnProperty(i)&&(t[i]=r[i]);e&&r.hasOwnProperty("toString")&&r.toString!==t.toString&&(t.toString=r.toString)}return t},t.extend}function a(t,e,r){var n=t("./util/core");r.exports=s(n)}var u=void 0!==t&&t.exports&&!0;"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i):u?a(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
96
|
+
/**
|
|
97
|
+
* Format functions
|
|
98
|
+
*
|
|
99
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
100
|
+
* @license BSD
|
|
101
|
+
*
|
|
102
|
+
* Copyright (c) 2010-2014 Christian Johansen
|
|
103
|
+
*/
|
|
104
|
+
!function(o,s){"use strict";function a(e){function n(t){return""+t}var i,o=void 0!==t&&t.exports&&!0;if(o)try{s=r(351)}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=r(330)}catch(t){}return t?function(e){return"object"==typeof e&&e.toString===Object.prototype.toString?t.inspect(e):e}:n}():n,e.format=i,e.format}function u(t,e,r){var n=t("./util/core");r.exports=a(n)}var c=void 0!==t&&t.exports&&!0;"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):c?u(r(324),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon,"object"==typeof formatio&&formatio)}).call(e,r(102)(t))},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(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}}),a=n[r];r<o;a=n[++r])v(a)||!w(a)?s+=" "+a:s+=" "+u(a);return s},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o={},s=/^$/;if(t.env.NODE_DEBUG){var a=t.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i")}function u(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._extend(n,r),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=c),l(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function f(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(y(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)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(S(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(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return h(r)}var c,f="",w=!1,T=["{","}"];(d(r)&&(w=!0,T=["[","]"]),S(r))&&(f=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),x(r)&&(f=" "+h(r)),0!==s.length||w&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=w?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)j(e,String(s))?o.push(p(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}(t,r,n,a,s):s.map(function(e){return p(t,r,n,a,e,w)}),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]}(c,f,T)):T[0]+f+T[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function p(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")),j(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=v(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").slice(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.slice(1,-1),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function v(t){return null===t}function g(t){return"number"==typeof t}function b(t){return"string"==typeof t}function m(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===T(t)}function w(t){return"object"==typeof t&&null!==t}function E(t){return w(t)&&"[object Date]"===T(t)}function x(t){return w(t)&&("[object Error]"===T(t)||t instanceof Error)}function S(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(r=r.toUpperCase(),!o[r])if(s.test(r)){var n=t.pid;o[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else o[r]=function(){};return o[r]},e.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(331),e.isArray=d,e.isBoolean=y,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=b,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=_,e.types.isRegExp=_,e.isObject=w,e.isDate=E,e.types.isDate=E,e.isError=x,e.types.isNativeError=x,e.isFunction=S,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(350);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=r(182),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!=typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise(function(t,n){e=t,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(t,n){t?r(t):e(n)});try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,r).then(function(e){t.nextTick(s.bind(null,null,e))},function(e){t.nextTick(function(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}.bind(null,e,s))})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(e,r(5))},function(t,e,r){"use strict";var n=r(332),i=r(343),o=r(344),s=r(349);function a(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=a(Object.prototype.toString),l=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);if(u)var d=a(BigInt.prototype.valueOf);if(c)var y=a(Symbol.prototype.valueOf);function v(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function g(t){return"[object Map]"===f(t)}function b(t){return"[object Set]"===f(t)}function m(t){return"[object WeakMap]"===f(t)}function _(t){return"[object WeakSet]"===f(t)}function w(t){return"[object ArrayBuffer]"===f(t)}function E(t){return"undefined"!=typeof ArrayBuffer&&(w.working?w(t):t instanceof ArrayBuffer)}function x(t){return"[object DataView]"===f(t)}function S(t){return"undefined"!=typeof DataView&&(x.working?x(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=s,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):s(t)||S(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},g.working="undefined"!=typeof Map&&g(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(g.working?g(t):t instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(b.working?b(t):t instanceof Set)},m.working="undefined"!=typeof WeakMap&&m(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(m.working?m(t):t instanceof WeakMap)},_.working="undefined"!=typeof WeakSet&&_(new WeakSet),e.isWeakSet=function(t){return _(t)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),e.isArrayBuffer=E,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=S;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(t){return"[object SharedArrayBuffer]"===f(t)}function k(t){return void 0!==T&&(void 0===A.working&&(A.working=A(new T)),A.working?A(t):t instanceof T)}function j(t){return v(t,l)}function O(t){return v(t,h)}function C(t){return v(t,p)}function R(t){return u&&v(t,d)}function I(t){return c&&v(t,y)}e.isSharedArrayBuffer=k,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},e.isGeneratorObject=function(t){return"[object Generator]"===f(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},e.isNumberObject=j,e.isStringObject=O,e.isBooleanObject=C,e.isBigIntObject=R,e.isSymbolObject=I,e.isBoxedPrimitive=function(t){return j(t)||O(t)||C(t)||R(t)||I(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(E(t)||k(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})},function(t,e,r){"use strict";var n=r(333)(),i=r(335)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},function(t,e,r){"use strict";var n=r(334);t.exports=function(){return n()&&!!Symbol.toStringTag}},function(t,e){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(t,e,r){"use strict";var n=r(336),i=r(342),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},function(t,e,r){"use strict";var n=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var u=function(){throw new o},c=a?function(){try{return arguments.callee,u}catch(t){try{return a(arguments,"callee").get}catch(t){return u}}}():u,f=r(337)(),l=r(338)(),h=Object.getPrototypeOf||(l?function(t){return t.__proto__}:null),p={},d="undefined"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":f&&h?h([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&h?h(h([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&h?h((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&h?h((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&h?h(""[Symbol.iterator]()):void 0,"%Symbol%":f?Symbol:void 0,"%SyntaxError%":n,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var v=h(h(t));y["%Error.prototype%"]=v}var g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(339),m=r(341),_=b.call(Function.call,Array.prototype.concat),w=b.call(Function.apply,Array.prototype.splice),E=b.call(Function.call,String.prototype.replace),x=b.call(Function.call,String.prototype.slice),S=b.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,k=function(t,e){var r,i=t;if(m(g,i)&&(i="%"+(r=g[i])[0]+"%"),m(y,i)){var a=y[i];if(a===p&&(a=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return y[e]=r,r}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:a}}throw new n("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/,t))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=x(t,0,1),r=x(t,-1);if("%"===e&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new n("invalid intrinsic syntax, expected opening `%`");var i=[];return E(t,T,function(t,e,r,n){i[i.length]=r?E(n,A,"$1"):e||t}),i}(t),i=r.length>0?r[0]:"",s=k("%"+i+"%",e),u=s.name,c=s.value,f=!1,l=s.alias;l&&(i=l[0],w(r,_([0,1],l)));for(var h=1,p=!0;h<r.length;h+=1){var d=r[h],v=x(d,0,1),g=x(d,-1);if(('"'===v||"'"===v||"`"===v||'"'===g||"'"===g||"`"===g)&&v!==g)throw new n("property names with quotes must have matching quotes");if("constructor"!==d&&p||(f=!0),m(y,u="%"+(i+="."+d)+"%"))c=y[u];else if(null!=c){if(!(d in c)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(a&&h+1>=r.length){var b=a(c,d);c=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[d]}else p=m(c,d),c=c[d];p&&!f&&(y[u]=c)}}return c}},function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(334);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(t,e){"use strict";var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}},function(t,e,r){"use strict";var n=r(340);t.exports=Function.prototype.bind||n},function(t,e){"use strict";var r=Array.prototype.slice,n=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==n.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var i,o=r.call(arguments,1),s=Math.max(0,e.length-o.length),a=[],u=0;u<s;u++)a.push("$"+u);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var n=e.apply(this,o.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,o.concat(r.call(arguments)))}),e.prototype){var c=function(){};c.prototype=e.prototype,i.prototype=new c,c.prototype=null}return i}},function(t,e,r){"use strict";var n=r(339);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,r){"use strict";var n=r(339),i=r(336),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=a(n,s,arguments);u&&c&&(u(e,"length").configurable&&c(e,"length",{value:1+f(0,t.length-(arguments.length-1))}));return e};var l=function(){return a(n,o,arguments)};c?c(t.exports,"apply",{value:l}):t.exports.apply=l},function(t,e,r){"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(333)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},function(t,e,r){(function(e){"use strict";var n=r(345),i=r(347),o=r(335),s=r(348),a=o("Object.prototype.toString"),u=r(333)(),c="undefined"==typeof globalThis?e:globalThis,f=i(),l=o("String.prototype.slice"),h={},p=Object.getPrototypeOf;u&&s&&p&&n(f,function(t){if("function"==typeof c[t]){var e=new c[t];if(Symbol.toStringTag in e){var r=p(e),n=s(r,Symbol.toStringTag);if(!n){var i=p(r);n=s(i,Symbol.toStringTag)}h[t]=n.get}}});var d=r(349);t.exports=function(t){return!!d(t)&&(u&&Symbol.toStringTag in t?function(t){var e=!1;return n(h,function(r,n){if(!e)try{var i=r.call(t);i===n&&(e=i)}catch(t){}}),e}(t):l(a(t),8,-1))}}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(346),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,s):function(t,e,r){for(var n in t)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s)}},function(t,e){"use strict";var r,n,i=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o(function(){throw 42},null,r)}catch(t){t!==n&&(o=null)}else o=null;var s=/^\s*class\b/,a=function(t){try{var e=i.call(t);return s.test(e)}catch(t){return!1}},u=function(t){try{return!a(t)&&(i.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,f="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),h=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(h=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,r)}catch(t){if(t!==n)return!1}return!a(t)&&u(t)}:function(t){if(h(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(f)return u(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&u(t)}},function(t,e){(function(e){"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n="undefined"==typeof globalThis?e:globalThis;t.exports=function(){for(var t=[],e=0;e<r.length;e++)"function"==typeof n[r[e]]&&(t[t.length]=r[e]);return t}}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(336)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},function(t,e,r){(function(e){"use strict";var n=r(345),i=r(347),o=r(335),s=o("Object.prototype.toString"),a=r(333)(),u=r(348),c="undefined"==typeof globalThis?e:globalThis,f=i(),l=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},h=o("String.prototype.slice"),p={},d=Object.getPrototypeOf;a&&u&&d&&n(f,function(t){var e=new c[t];if(Symbol.toStringTag in e){var r=d(e),n=u(r,Symbol.toStringTag);if(!n){var i=d(r);n=u(i,Symbol.toStringTag)}p[t]=n.get}});t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!(a&&Symbol.toStringTag in t)){var e=h(s(t),8,-1);return l(f,e)>-1}return!!u&&function(t){var e=!1;return n(p,function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}}),e}(t)}}).call(e,function(){return this}())},178,function(t,e,r){var n,i,o;(function(s){(r(321)&&function(s){i=[r(352)],void 0===(o="function"==typeof(n=s)?n.apply(e,i):n)||(t.exports=o)}||"object"==typeof t&&function(e){t.exports=e(r(352))}||function(t){this.formatio=t(this.samsam)})(function(t){"use strict";var e={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},r=(Object.prototype.hasOwnProperty,[]);function n(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,r){var i,o,s=n(r&&r.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 r,n;for(r=0,n=e.length;r<n;++r)if(e[r]===t)return!0;return!1}function a(e,n,i,s){if("string"==typeof n){var u=e.quoteStrings;return i||("boolean"!=typeof u||u)?'"'+n+'"':n}if("function"==typeof n&&!(n instanceof RegExp))return a.func(n);if(o(n,i=i||[]))return"[Circular]";if("[object Array]"===Object.prototype.toString.call(n))return a.array.call(e,n,i);if(!n)return String(1/n==-1/0?"-0":n);if(t.isElement(n))return a.element(n);if("function"==typeof n.toString&&n.toString!==Object.prototype.toString)return n.toString();var c,f;for(c=0,f=r.length;c<f;c++)if(n===r[c].object)return r[c].value;return a.object.call(e,n,i,s)}function u(t){for(var e in t)this[e]=t[e]}return void 0!==s&&r.push({object:s,value:"[object global]"}),"undefined"!=typeof document&&r.push({object:document,value:"[object HTMLDocument]"}),"undefined"!=typeof window&&r.push({object:window,value:"[object Window]"}),a.func=function(t){return"function "+n(t)+"() {}"},a.array=function(t,e){(e=e||[]).push(t);var r,n,i=[];for(n=this.limitChildrenCount>0?Math.min(this.limitChildrenCount,t.length):t.length,r=0;r<n;++r)i.push(a(this,t[r],e));return n<t.length&&i.push("[... "+(t.length-n)+" more elements]"),"["+i.join(", ")+"]"},a.object=function(e,r,n){(r=r||[]).push(e),n=n||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]],r)?"[Circular]":a(this,c,r,n+2),y+=(u=(/\s/.test(s)?'"'+s+'"':s)+": "+u).length,p.push(u);var v=i(this,e),g=v?"["+v+"] ":"",b="";for(f=0,l=n;f<l;++f)b+=" ";return h<d.length&&p.push("[... "+(d.length-h)+" more elements]"),y+n>80?g+"{\n "+b+p.join(",\n "+b)+"\n"+b+"}":g+"{ "+p.join(", ")+" }"},a.element=function(t){var e,r,n,i,o,s=t.tagName.toLowerCase(),a=t.attributes,u=[];for(n=0,i=a.length;n<i;++n)r=(e=a.item(n)).nodeName.toLowerCase().replace("html:",""),o=e.nodeValue,"contenteditable"===r&&"inherit"===o||o&&u.push(r+'="'+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:n,configure:function(t){return new u(t)},constructorName:function(t){return i(this,t)},ascii:function(t,e,r){return a(this,t,e,r)}},u.prototype})}).call(e,function(){return this}())},function(t,e,r){var n,i;(r(321)&&function(o){void 0===(i="function"==typeof(n=o)?n.call(e,r,e,t):n)||(t.exports=i)}||"object"==typeof t&&function(e){t.exports=e()}||function(t){this.samsam=t()})(function(){var t,e=Object.prototype,r="undefined"!=typeof document&&document.createElement("div");function n(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||!r)return!1;try{t.appendChild(r),t.removeChild(r)}catch(t){return!1}return!0}function a(t){var r,n=[];for(r in t)e.hasOwnProperty.call(t,r)&&n.push(r);return n}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||n(t)&&n(e))return 0!==t||c(t)===c(e)}function l(e,r){if(0===r.length)return!0;var n,i,o,s;for(n=0,i=e.length;n<i;++n)if(t(e[n],r[0])){for(o=0,s=r.length;o<s;++o)if(!t(e[n+o],r[o]))return!1;return!0}return!1}return{isArguments:o,isElement:s,isDate:u,isNegZero:c,identical:f,deepEqual:function(t,r){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 r;for(r=0;r<t.length;r++)if(t[r]===e)return r;return-1}return function t(r,g,b,m){var _=typeof r,w=typeof g;if(r===g||n(r)||n(g)||null==r||null==g||"object"!==_||"object"!==w)return f(r,g);if(s(r)||s(g))return!1;var E=u(r),x=u(g);if((E||x)&&(!E||!x||r.getTime()!==g.getTime()))return!1;if(r instanceof RegExp&&g instanceof RegExp&&r.toString()!==g.toString())return!1;var S,T,A,k,j,O,C,R,I,P,B,F=i(r),M=i(g),L=a(r),N=a(g);if(o(r)||o(g)){if(r.length!==g.length)return!1}else if(_!==w||F!==M||L.length!==N.length)return!1;for(T=0,A=L.length;T<A;T++){if(S=L[T],!e.hasOwnProperty.call(g,S))return!1;if(k=r[S],j=g[S],O=y(k),C=y(j),R=O?v(c,k):-1,I=C?v(l,j):-1,P=-1!==R?h[R]:b+"["+JSON.stringify(S)+"]",B=-1!==I?p[I]:m+"["+JSON.stringify(S)+"]",d[P+B])return!0;if(-1===R&&O&&(c.push(k),h.push(P)),-1===I&&C&&(l.push(j),p.push(B)),O&&C&&(d[P+B]=!0),!t(k,j,P,B))return!1}return!0}(t,r,"$1","$2")},match:t=function t(e,r){if(r&&"function"==typeof r.test)return r.test(e);if("function"==typeof r)return!0===r(e);if("string"==typeof r)return r=r.toLowerCase(),("string"==typeof e||!!e)&&String(e).toLowerCase().indexOf(r)>=0;if("number"==typeof r)return r===e;if("boolean"==typeof r)return r===e;if(void 0===r)return void 0===e;if(null===r)return null===e;if("Array"===i(e)&&"Array"===i(r))return l(e,r);if(r&&"object"==typeof r){if(r===e)return!0;var n;for(n in r){var o=e[n];if(void 0===o&&"function"==typeof e.getAttribute&&(o=e.getAttribute(n)),null===r[n]||void 0===r[n]){if(o!==r[n])return!1}else if(void 0===o||!t(o,r[n]))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,r){var n,i;(function(t){
|
|
105
|
+
/**
|
|
106
|
+
* Logs errors
|
|
107
|
+
*
|
|
108
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
109
|
+
* @license BSD
|
|
110
|
+
*
|
|
111
|
+
* Copyright (c) 2010-2014 Christian Johansen
|
|
112
|
+
*/
|
|
113
|
+
!function(o){"use strict";var s=setTimeout;function a(t){function e(r,n){var i=r+" threw exception: ";function o(){throw n.message=i+n.message,n}t.log(i+"["+n.name+"] "+n.message),n.stack&&t.log(n.stack),e.useImmediateExceptions?o():e.setTimeout(o,0)}e.useImmediateExceptions=!1,e.setTimeout=function(t,e){s(t,e)};var r={};return r.log=t.log=function(){},r.logError=t.logError=e,r}function u(t,e,r){var n=t("./util/core");r.exports=a(n)}var c=void 0!==t&&t.exports&&!0;"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):c?u(r(324),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
114
|
+
/**
|
|
115
|
+
* Match functions
|
|
116
|
+
*
|
|
117
|
+
* @author Maximilian Antoni (mail@maxantoni.de)
|
|
118
|
+
* @license BSD
|
|
119
|
+
*
|
|
120
|
+
* Copyright (c) 2012 Maximilian Antoni
|
|
121
|
+
*/
|
|
122
|
+
!function(o){"use strict";function s(t){function e(e,r,n){var i=t.typeOf(e);if(i!==r)throw new TypeError("Expected type of "+n+" to be "+r+", but was "+i)}var r={toString:function(){return this.message}};function n(t){return r.isPrototypeOf(t)}function i(e,i){var o=t.create(r);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(r){return function e(r,i){if(null===i||void 0===i)return!1;for(var o in r)if(r.hasOwnProperty(o)){var s=r[o],a=i[o];if(n(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,r)},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(r){return t.deepEqual(e,r)}}return o.message||(o.message="match("+e+")"),o}function o(r,n){return function(o,s){e(o,"string","property");var a=1===arguments.length,u=n+'("'+o+'"';return a||(u+=", "+s),i(function(e){return!(void 0===e||null===e||!r(e,o))&&(a||t.deepEqual(s,e[o]))},u+=")")}}return r.or=function(e){if(!arguments.length)throw new TypeError("Matcher expected");n(e)||(e=i(e));var o=this,s=t.create(r);return s.test=function(t){return o.test(t)||e.test(t)},s.message=o.message+".or("+e.message+")",s},r.and=function(e){if(!arguments.length)throw new TypeError("Matcher expected");n(e)||(e=i(e));var o=this,s=t.create(r);return s.test=function(t){return o.test(t)&&e.test(t)},s.message=o.message+".and("+e.message+")",s},i.isMatcher=n,i.any=i(function(){return!0},"any"),i.defined=i(function(t){return null!==t&&void 0!==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(r){return e(r,"string","type"),i(function(e){return t.typeOf(e)===r},'typeOf("'+r+'")')},i.instanceOf=function(r){return e(r,"function","type"),i(function(t){return t instanceof r},"instanceOf("+t.functionName(r)+")")},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,r){var n=t("./util/core");t("./typeOf"),r.exports=s(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):a?u(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
123
|
+
/**
|
|
124
|
+
* Mock functions.
|
|
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,r=t.match;function n(e){return e?n.create(e):t.expectation.create("Anonymous mock")}function i(t,e){if(t)for(var r=0,n=t.length;r<n;r+=1)e(t[r])}function o(e,r,n){if(n&&e.length!==r.length)return!1;for(var i=0,o=e.length;i<o;i++)if(!t.deepEqual(e[i],r[i]))return!1;return!0}t.extend(n,{create:function(e){if(!e)throw new TypeError("object is null");var r=t.extend({},n);return r.object=e,delete r.create,r},expects:function(r){if(!r)throw new TypeError("method is falsy");if(this.expectations||(this.expectations={},this.proxies=[]),!this.expectations[r]){this.expectations[r]=[];var n=this;t.wrapMethod(this.object,r,function(){return n.invokeMethod(r,this,arguments)}),e.call(this.proxies,r)}var i=t.expectation.create(r);return e.call(this.expectations[r],i),i},restore:function(){var t=this.object;i(this.proxies,function(e){"function"==typeof t[e].restore&&t[e].restore()})},verify:function(){var r=this.expectations||{},n=[],o=[];return i(this.proxies,function(t){i(r[t],function(t){t.met()?e.call(o,t.toString()):e.call(n,t.toString())})}),this.restore(),n.length>0?t.expectation.fail(n.concat(o).join("\n")):o.length>0&&t.expectation.pass(n.concat(o).join("\n")),!0},invokeMethod:function(r,n,i){var s,a,u=this.expectations&&this.expectations[r]?this.expectations[r]:[],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(n,i))return c[s].apply(n,i);var l=[],h=0;for(s=0;s<c.length;s+=1)c[s].allowsCall(n,i)?a=a||c[s]:h+=1;if(a&&0===h)return a.apply(n,i);for(s=0;s<u.length;s+=1)e.call(l," "+u[s].toString());l.unshift("Unexpected call: "+t.spyCall.toString.call({proxy:r,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 r&&r.isMatcher(t)&&t.test(e)||!0}return t.expectation={minCalls:1,maxCalls:1,create:function(e){var r=t.extend(t.stub.create(),t.expectation);return delete r.create,r.method=e,r},invoke:function(e,r,n){return this.verifyCallAllowed(r,n),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,r){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){r||t.expectation.fail(this.method+" received no arguments, expected "+t.format(this.expectedArguments)),r.length<this.expectedArguments.length&&t.expectation.fail(this.method+" received too few arguments ("+t.format(r)+"), expected "+t.format(this.expectedArguments)),this.expectsExactArgCount&&r.length!==this.expectedArguments.length&&t.expectation.fail(this.method+" received too many arguments ("+t.format(r)+"), expected "+t.format(this.expectedArguments));for(var n=0,i=this.expectedArguments.length;n<i;n+=1)c(this.expectedArguments[n],r[n])||t.expectation.fail(this.method+" received wrong arguments "+t.format(r)+", didn't match "+this.expectedArguments.toString()),t.deepEqual(this.expectedArguments[n],r[n])||t.expectation.fail(this.method+" received wrong arguments "+t.format(r)+", expected "+t.format(this.expectedArguments))}},allowsCall:function(e,r){if(this.met()&&u(this))return!1;if("expectedThis"in this&&this.expectedThis!==e)return!1;if(!("expectedArguments"in this))return!0;if((r=r||[]).length<this.expectedArguments.length)return!1;if(this.expectsExactArgCount&&r.length!==this.expectedArguments.length)return!1;for(var n=0,i=this.expectedArguments.length;n<i;n+=1){if(!c(this.expectedArguments[n],r[n]))return!1;if(!t.deepEqual(this.expectedArguments[n],r[n]))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 r=(this.expectedArguments||[]).slice();this.expectsExactArgCount||e.call(r,"[...]");var n=t.spyCall.toString.call({proxy:this.method||"anonymous mock expectation",args:r}).replace(", [...","[, ...")+" "+function(t){var e=t.minCalls,r=t.maxCalls;if("number"==typeof e&&"number"==typeof r){var n=s(e);return e!==r&&(n="at least "+n+" and at most "+s(r)),n}return"number"==typeof e?"at least "+s(e):"at most "+s(r)}(this);return this.met()?"Expectation met: "+n:"Expected "+n+" ("+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=n,n}var a=void 0!==t&&t.exports&&!0;function u(t,e,r){var n=t("./util/core");t("./times_in_words"),t("./call"),t("./extend"),t("./match"),t("./spy"),t("./stub"),t("./format"),r.exports=s(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):a?u(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
132
|
+
/**
|
|
133
|
+
* Manages fake collections as well as fake utilities such as Sinon's
|
|
134
|
+
* timers and fake XHR implementation in one convenient object.
|
|
135
|
+
*
|
|
136
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
137
|
+
* @license BSD
|
|
138
|
+
*
|
|
139
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
140
|
+
*/
|
|
141
|
+
!function(o){"use strict";function s(t){var e=[].push;function r(t,r,n,i){i&&(!r.injectInto||n in r.injectInto?e.call(t.args,i):(r.injectInto[n]=i,t.injectedKeys.push(n)))}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 n,i,o=function(e){var r=t.create(t.sandbox);return e.useFakeServer&&("object"==typeof e.useFakeServer&&(r.serverPrototype=e.useFakeServer),r.useFakeServer()),e.useFakeTimers&&("object"==typeof e.useFakeTimers?r.useFakeTimers.apply(r,e.useFakeTimers):r.useFakeTimers()),r}(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++)r(o,e,n=e.properties[a],i=s[n]||"sandbox"===n&&o);else r(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,r){var n=t("./util/core");t("./extend"),t("./util/fake_server_with_clock"),t("./util/fake_timers"),t("./collection"),r.exports=s(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):a?u(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(module){
|
|
142
|
+
/**
|
|
143
|
+
* Spy functions
|
|
144
|
+
*
|
|
145
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
146
|
+
* @license BSD
|
|
147
|
+
*
|
|
148
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
149
|
+
*/
|
|
150
|
+
!function(sinonGlobal){"use strict";function makeApi(sinon){var push=Array.prototype.push,slice=Array.prototype.slice,callId=0;function spy(t,e,r){if(!e&&"function"==typeof t)return spy.create(t);if(!t&&!e)return spy.create(function(){});if(r){for(var n={},i=sinon.getPropertyDescriptor(t,e),o=0;o<r.length;o++)n[r[o]]=spy.create(i[r[o]]);return sinon.wrapMethod(t,e,n)}return sinon.wrapMethod(t,e,spy.create(t[e]))}function matchingFake(t,e,r){if(t)for(var n=0,i=t.length;n<i;n++)if(t[n].matches(e,r))return t[n]}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 r;"function"!=typeof t?t=function(){}:r=sinon.functionName(t),e||(e=t.length);var n=createProxy(t,e);return sinon.extend(n,spy),delete n.create,sinon.extend(n,t),n.reset(),n.prototype=t.prototype,n.displayName=r||"spy",n.toString=sinon.functionToString,n.instantiateFake=sinon.spy.create,n.id="spy#"+uuid++,n},invoke:function(t,e,r){var n,i,o=matchingFake(this.fakes,r);incrementCallCount.call(this),push.call(this.thisValues,e),push.call(this.args,r),push.call(this.callIds,callId++),createCallProperties.call(this);try{this.invoking=!0,i=o?o.invoke(t,e,r):(this.func||t).apply(e,r),this.getCall(this.callCount-1).calledWithNew()&&"object"!=typeof i&&(i=e)}catch(t){n=t}finally{delete this.invoking}if(push.call(this.exceptions,n),push.call(this.returnValues,i),push.call(this.stacks,(new Error).stack),createCallProperties.call(this),void 0!==n)throw n;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 r=this,n=this.instantiateFake();n.matchingAguments=t,n.parent=this,push.call(this.fakes,n),n.withArgs=function(){return r.withArgs.apply(r,arguments)};for(var i=0;i<this.args.length;i++)n.matches(this.args[i])&&(incrementCallCount.call(n),push.call(n.thisValues,this.thisValues[i]),push.call(n.args,this.args[i]),push.call(n.returnValues,this.returnValues[i]),push.call(n.exceptions,this.exceptions[i]),push.call(n.callIds,this.callIds[i]));return createCallProperties.call(n),n},matches:function(t,e){var r=this.matchingAguments;if(r.length<=t.length&&sinon.deepEqual(r,t.slice(0,r.length)))return!e||r.length===t.length},printf:function(t){var e,r=this,n=slice.call(arguments,1);return(t||"").replace(/%(.)/g,function(t,i){return"function"==typeof(e=spyApi.formatters[i])?e.call(null,r,n):isNaN(parseInt(i,10))?"%"+i:sinon.format(n[i-1])})}};function delegateToCalls(t,e,r,n){spyApi[t]=function(){if(!this.called)return!!n&&n.apply(this,arguments);for(var i,o=0,s=0,a=this.callCount;s<a;s+=1)if((i=this.getCall(s))[r||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=[],r=0,n=t.callCount;r<n;++r){var i=" "+t.getCall(r).toString();/\n/.test(e[r-1])&&(i="\n"+i),push.call(e,i)}return e.length>0?"\n"+e.join("\n"):""},t:function(t){for(var e=[],r=0,n=t.callCount;r<n;++r)push.call(e,sinon.format(t.thisValues[r]));return e.join(", ")},"*":function(t,e){for(var r=[],n=0,i=e.length;n<i;++n)push.call(r,sinon.format(e[n]));return r.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__(321)&&__webpack_require__(321);function loadDependencies(t,e,r){var n=t("./util/core");t("./call"),t("./extend"),t("./times_in_words"),t("./format"),r.exports=makeApi(n)}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__(324),module.exports,module):sinonGlobal&&makeApi(sinonGlobal)}("object"==typeof sinon&&sinon)}).call(exports,__webpack_require__(102)(module))},function(t,e,r){var n,i;(function(t){
|
|
151
|
+
/**
|
|
152
|
+
* Stub functions
|
|
153
|
+
*
|
|
154
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
155
|
+
* @license BSD
|
|
156
|
+
*
|
|
157
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
158
|
+
*/
|
|
159
|
+
!function(o){"use strict";function s(t){function e(r,n,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 r&&"function"==typeof r[n]&&(u=r[n].length),o=e.create(u)}return r||void 0!==n?void 0===n&&"object"==typeof r?(t.walk(r||{},function(n,i,o){o!==Object.prototype&&"constructor"!==i&&"function"==typeof t.getPropertyDescriptor(o,i).value&&e(r,i)}),r):t.wrapMethod(r,n,o):t.stub.create()}function r(e){return e.defaultBehavior||function(t){return t.parent&&n(t.parent)}(e)||t.behavior.create(e)}function n(t){var e=t.behaviors[t.callCount-1];return e&&e.isPresent()?e:r(t)}var i=0,o={create:function(r){var o=function(){return n(o).invoke(this,arguments)};o.id="stub#"+i++;var s=o;return(o=t.spy.create(o,r)).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,r){var n=t("./util/core");t("./behavior"),t("./spy"),t("./extend"),r.exports=s(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):a?u(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
160
|
+
/**
|
|
161
|
+
* Test function, sandboxes fakes
|
|
162
|
+
*
|
|
163
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
164
|
+
* @license BSD
|
|
165
|
+
*
|
|
166
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
167
|
+
*/
|
|
168
|
+
!function(o){"use strict";function s(t){var e=Array.prototype.slice;function r(r){var n=typeof r;if("function"!==n)throw new TypeError("sinon.test needs to wrap a test function, got "+n);function i(){var n=t.getConfig(t.config);n.injectInto=n.injectIntoThis&&this||n.injectInto;var i,o,s=t.sandbox.create(n),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=r.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 r.length?function(t){return i.apply(this,arguments)}:i}return r.config={injectIntoThis:!0,injectInto:null,properties:["spy","stub","mock","clock","server","requests"],useFakeTimers:!0,useFakeServer:!0},t.test=r,r}var a=void 0!==t&&t.exports&&!0;function u(t,e,r){var n=t("./util/core");t("./sandbox"),r.exports=s(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):a?u(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon||null)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
169
|
+
/**
|
|
170
|
+
* Test case, sandboxes all test functions
|
|
171
|
+
*
|
|
172
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
173
|
+
* @license BSD
|
|
174
|
+
*
|
|
175
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
176
|
+
*/
|
|
177
|
+
!function(o){"use strict";function s(t,e,r){return function(){var n,i;e&&e.apply(this,arguments);try{i=t.apply(this,arguments)}catch(t){n=t}if(r&&r.apply(this,arguments),n)throw n;return i}}function a(t){function e(e,r){if(!e||"object"!=typeof e)throw new TypeError("sinon.testCase needs an object with test functions");r=r||"test";var n,i,o,a=new RegExp("^"+r),u={},c=e.setUp,f=e.tearDown;for(n in e)e.hasOwnProperty(n)&&!/^(setUp|tearDown)$/.test(n)&&("function"==typeof(i=e[n])&&a.test(n)?(o=i,(c||f)&&(o=s(i,c,f)),u[n]=t.test(o)):u[n]=e[n]);return u}return t.testCase=e,e}var u=void 0!==t&&t.exports&&!0;function c(t,e,r){var n=t("./util/core");t("./test"),r.exports=a(n)}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=c)?n.call(e,r,e,t):n)||(t.exports=i):u?c(r(324),t.exports,t):o&&a(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,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,r){var n=t("./util/core");r.exports=s(n)}var u=void 0!==t&&t.exports&&!0;"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i):u?a(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
178
|
+
/**
|
|
179
|
+
* Format functions
|
|
180
|
+
*
|
|
181
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
182
|
+
* @license BSD
|
|
183
|
+
*
|
|
184
|
+
* Copyright (c) 2010-2014 Christian Johansen
|
|
185
|
+
*/
|
|
186
|
+
!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,r){var n=t("./util/core");r.exports=s(n)}var u=void 0!==t&&t.exports&&!0;"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i):u?a(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n,i;(function(t){
|
|
187
|
+
/**
|
|
188
|
+
* Sinon core utilities. For internal use only.
|
|
189
|
+
*
|
|
190
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
191
|
+
* @license BSD
|
|
192
|
+
*
|
|
193
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
194
|
+
*/
|
|
195
|
+
!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 r in e)a.call(t,r)||(t[r]=e[r])}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,r,n){if(!e)throw new TypeError("Should wrap property of object");if("function"!=typeof n&&"object"!=typeof n)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 "+r+" which is already wrapped");else if(t.calledBefore){var n=t.returns?"stubbed":"spied on";e=new TypeError("Attempted to wrap "+r+" which is already "+n)}}else e=new TypeError("Attempted to wrap "+typeof t+" property "+r+" as function");if(e)throw t&&t.stackTrace&&(e.stack+="\n--------------\n"+t.stackTrace),e}var o,s,u;function c(){i(s=e[r]),e[r]=n,n.displayName=r}var l=e.hasOwnProperty&&e.hasOwnProperty===a?e.hasOwnProperty(r):a.call(e,r);if(h){var p="function"==typeof n?{value:n}:n,d=t.getPropertyDescriptor(e,r);if(d?d.restore&&d.restore.sinon&&(o=new TypeError("Attempted to wrap "+r+" which is already wrapped")):o=new TypeError("Attempted to wrap "+typeof s+" property "+r+" 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,r,p),"function"==typeof n&&e[r]!==n&&(delete e[r],c())}else c();return n.displayName=r,n.stackTrace=new Error("Stack Trace for original").stack,n.restore=function(){if(l)h&&Object.defineProperty(e,r,d);else try{delete e[r]}catch(t){}h?t.getPropertyDescriptor(e,r).value===n&&(e[r]=s):e[r]===n&&(e[r]=s)},n.restore.sinon=!0,h||f(n,s),n},t.create=function(t){var e=function(){};return e.prototype=t,new e},t.deepEqual=function e(r,n){if(t.match&&t.match.isMatcher(r))return r.test(n);if("object"!=typeof r||"object"!=typeof n)return c(r)&&c(n)||r===n;if(u(r)||u(n))return r===n;if(r===n)return!0;if(null===r&&null!==n||null!==r&&null===n)return!1;if(r instanceof RegExp&&n instanceof RegExp)return r.source===n.source&&r.global===n.global&&r.ignoreCase===n.ignoreCase&&r.multiline===n.multiline;var i,o=Object.prototype.toString.call(r);if(o!==Object.prototype.toString.call(n))return!1;if("[object Date]"===o)return r.valueOf()===n.valueOf();var s=0,f=0;if("[object Array]"===o&&r.length!==n.length)return!1;for(i in r)if(a.call(r,i)){if(s+=1,!(i in n))return!1;if(!e(r[i],n[i]))return!1}for(i in n)a.call(n,i)&&(f+=1);return s===f},t.functionName=function(t){var e=t.displayName||t.name;if(!e){var r=t.toString().match(/function ([^\s\(]+)/);e=r&&r[1]}return e},t.functionToString=function(){if(this.getCall&&this.callCount)for(var t,e,r=this.callCount;r--;)for(e in t=this.getCall(r).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,r=[];for(e in t)a.call(t,e)&&r.push(e);return r},t.getPropertyDescriptor=function(t,e){for(var r,n=t;n&&!(r=Object.getOwnPropertyDescriptor(n,e));)n=Object.getPrototypeOf(n);return r},t.getConfig=function(e){var r={};e=e||{};var n=t.defaultConfig;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e.hasOwnProperty(i)?e[i]:n[i]);return r},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,r=t.length;e<r;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 r=t.getCall(0),n=e.getCall(0);return(r&&r.callId||-1)<(n&&n.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 r(321)&&r(321)?void 0===(i="function"==typeof(n=y)?n.call(e,r,e,t):n)||(t.exports=i):d?y(r(364),t.exports):o&&p(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n={"./core":363,"./core.js":363,"./event":365,"./event.js":365,"./fake_server":366,"./fake_server.js":366,"./fake_server_with_clock":367,"./fake_server_with_clock.js":367,"./fake_timers":368,"./fake_timers.js":368,"./fake_xdomain_request":370,"./fake_xdomain_request.js":370,"./fake_xml_http_request":371,"./fake_xml_http_request.js":371,"./timers_ie":372,"./timers_ie.js":372,"./xdr_ie":373,"./xdr_ie.js":373,"./xhr_ie":374,"./xhr_ie.js":374};function i(t){return r(o(t))}function o(t){return n[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=364},function(t,e,r){var n,i;
|
|
196
|
+
/**
|
|
197
|
+
* Minimal Event interface implementation
|
|
198
|
+
*
|
|
199
|
+
* Original implementation by Sven Fuchs: https://gist.github.com/995028
|
|
200
|
+
* Modifications and tests by Christian Johansen.
|
|
201
|
+
*
|
|
202
|
+
* @author Sven Fuchs (svenfuchs@artweb-design.de)
|
|
203
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
204
|
+
* @license BSD
|
|
205
|
+
*
|
|
206
|
+
* Copyright (c) 2011 Sven Fuchs, Christian Johansen
|
|
207
|
+
*/"undefined"==typeof sinon&&(this.sinon={}),function(){"use strict";var o=[].push;function s(t){t.Event=function(t,e,r,n){this.initEvent(t,e,r,n)},t.Event.prototype={initEvent:function(t,e,r,n){this.type=t,this.bubbles=e,this.cancelable=r,this.target=n},stopPropagation:function(){},preventDefault:function(){this.defaultPrevented=!0}},t.ProgressEvent=function(t,e,r){this.initEvent(t,!1,!1,r),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,r){this.initEvent(t,!1,!1,r),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 r=this.eventListeners&&this.eventListeners[t]||[],n=0,i=r.length;n<i;++n)if(r[n]===e)return r.splice(n,1)},dispatchEvent:function(t){for(var e=t.type,r=this.eventListeners&&this.eventListeners[e]||[],n=0;n<r.length;n++)"function"==typeof r[n]?r[n].call(this,t):r[n].handleEvent(t);return!!t.defaultPrevented}}}var a=void 0!==t&&t.exports&&!0;function u(t){s(t("./core"))}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=i):a?u(r(364)):s(sinon)}()},function(t,e,r){var n,i;(function(t){
|
|
208
|
+
/**
|
|
209
|
+
* The Sinon "server" mimics a web server that receives requests from
|
|
210
|
+
* sinon.FakeXMLHttpRequest and provides an API to respond to those requests,
|
|
211
|
+
* both synchronously and asynchronously. To respond synchronuously, canned
|
|
212
|
+
* answers have to be provided upfront.
|
|
213
|
+
*
|
|
214
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
215
|
+
* @license BSD
|
|
216
|
+
*
|
|
217
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
218
|
+
*/
|
|
219
|
+
!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 r=e.url;if(/^https?:\/\//.test(r)&&!u.test(r)||(r=r.replace(u,"")),function(t,e,r){var n=t.method,i=!n||n.toLowerCase()===e.toLowerCase(),o=t.url,s=!o||o===r||"function"==typeof o.test&&o.test(r);return i&&s}(t,this.getHTTPMethod(e),r)){if("function"==typeof t.response){var n=t.url,i=[e].concat(n&&"function"==typeof n.exec?n.exec(r).slice(1):[]);return t.response.apply(t,i)}return!0}return!1}function f(t){t.fakeServer={create:function(e){var r=t.create(this);return r.configure(e),t.xhr.supportsCORS?this.xhr=t.useFakeXMLHttpRequest():this.xhr=t.useFakeXDomainRequest(),r.requests=[],this.xhr.onCreate=function(t){r.addRequest(t)},r},configure:function(t){var e,r={autoRespond:!0,autoRespondAfter:!0,respondImmediately:!0,fakeHTTPMethods:!0};for(e in t=t||{})r.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,r){var n;n="Request:\n"+t.format(r)+"\n\n",n+="Response:\n"+t.format(e)+"\n\n",t.log(n)},respondWith:function(t,e,r){1!==arguments.length||"function"==typeof t?(this.responses||(this.responses=[]),1===arguments.length&&(r=t,e=t=null),2===arguments.length&&(r=e,e=t,t=null),o.call(this.responses,{method:t,url:e,response:"function"==typeof r?r:s(r)})):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),r=0;r<e.length;r++)this.processRequest(e[r])},processRequest:function(e){try{if(e.aborted)return;var r=this.response||[404,{},""];if(this.responses)for(var n=this.responses.length-1;n>=0;n--)if(c.call(this,this.responses[n],e)){r=this.responses[n].response;break}4!==e.readyState&&(this.log(r,e),e.respond(r[0],r[1],r[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,r){var n=t("./core");t("./fake_xdomain_request"),t("./fake_xml_http_request"),t("../format"),f(n),r.exports=n}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=h)?n.call(e,r,e,t):n)||(t.exports=i):l?h(r(364),t.exports,t):f(sinon)}()}).call(e,r(102)(t))},function(t,e,r){var n,i;
|
|
220
|
+
/**
|
|
221
|
+
* Add-on for sinon.fakeServer that automatically handles a fake timer along with
|
|
222
|
+
* the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery
|
|
223
|
+
* 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,
|
|
224
|
+
* it polls the object for completion with setInterval. Dispite the direct
|
|
225
|
+
* motivation, there is nothing jQuery-specific in this file, so it can be used
|
|
226
|
+
* in any environment where the ajax implementation depends on setInterval or
|
|
227
|
+
* setTimeout.
|
|
228
|
+
*
|
|
229
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
230
|
+
* @license BSD
|
|
231
|
+
*
|
|
232
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
233
|
+
*/
|
|
234
|
+
/**
|
|
235
|
+
* Add-on for sinon.fakeServer that automatically handles a fake timer along with
|
|
236
|
+
* the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery
|
|
237
|
+
* 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,
|
|
238
|
+
* it polls the object for completion with setInterval. Dispite the direct
|
|
239
|
+
* motivation, there is nothing jQuery-specific in this file, so it can be used
|
|
240
|
+
* in any environment where the ajax implementation depends on setInterval or
|
|
241
|
+
* setTimeout.
|
|
242
|
+
*
|
|
243
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
244
|
+
* @license BSD
|
|
245
|
+
*
|
|
246
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
247
|
+
*/
|
|
248
|
+
!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 r=this.clock.setTimeout,n=this.clock.setInterval,i=this;this.clock.setTimeout=function(t,e){return i.longestTimeout=Math.max(e,i.longestTimeout||0),r.apply(this,arguments)},this.clock.setInterval=function(t,e){return i.longestTimeout=Math.max(e,i.longestTimeout||0),n.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 r(321)&&r(321)?void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i):s?a(r(364)):o(sinon)}()},function(t,e,r){var n,i;(function(t,o,s){
|
|
249
|
+
/**
|
|
250
|
+
* Fake timer API
|
|
251
|
+
* setTimeout
|
|
252
|
+
* setInterval
|
|
253
|
+
* clearTimeout
|
|
254
|
+
* clearInterval
|
|
255
|
+
* tick
|
|
256
|
+
* reset
|
|
257
|
+
* Date
|
|
258
|
+
*
|
|
259
|
+
* Inspired by jsUnitMockTimeOut from JsUnit
|
|
260
|
+
*
|
|
261
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
262
|
+
* @license BSD
|
|
263
|
+
*
|
|
264
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
265
|
+
*/
|
|
266
|
+
!function(){"use strict";function a(e,r){var n="undefined"!=typeof lolex?lolex:r;e.useFakeTimers=function(){var t,e=Array.prototype.slice.call(arguments);t="string"==typeof e[0]?0:e.shift();var r=n.install(t||0,e);return r.restore=r.uninstall,r},e.clock={create:function(t){return n.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,r,n){var i=t("./core");a(i,n),r.exports=i}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=c)?n.call(e,r,e,s):n)||(s.exports=i):u?c(r(364),s.exports,s,r(369)):a(sinon)}()}).call(e,r(10).setImmediate,r(10).clearImmediate,r(102)(t))},function(module,exports){(function(global){
|
|
267
|
+
/**
|
|
268
|
+
* @author Christian Johansen (christian@cjohansen.no) and contributors
|
|
269
|
+
* @license BSD
|
|
270
|
+
*
|
|
271
|
+
* Copyright (c) 2010-2014 Christian Johansen
|
|
272
|
+
*/
|
|
273
|
+
!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,r=t.split(":"),n=r.length,i=n,o=0;if(n>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(r[i],10))>=60)throw new Error("Invalid time "+t);o+=e*Math.pow(60,n-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,r){return r&&r.callAt>=t&&r.callAt<=e}function mirrorDateProperties(t,e){var r;for(r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);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,r,n,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,r);case 3:return new NativeDate(e,r,n);case 4:return new NativeDate(e,r,n,i);case 5:return new NativeDate(e,r,n,i,o);case 6:return new NativeDate(e,r,n,i,o,s);default:return new NativeDate(e,r,n,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,r){var n,i=t.timers,o=null;for(n in i)i.hasOwnProperty(n)&&(!inRange(e,r,i[n])||o&&1!==compareTimers(o,i[n])||(o=i[n]));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,r){if(e&&(t.timers||(t.timers=[]),"object"==typeof e&&(e=e.id),t.timers.hasOwnProperty(e))){var n=t.timers[e];if(timerType(n)!==r)throw new Error("Cannot clear timer: timer created with set"+r+"() but cleared with clear"+timerType(n)+"()");delete t.timers[e]}}function uninstall(t,e){var r,n,i;for(n=0,i=t.methods.length;n<i;n++)if(e[r=t.methods[n]].hadOwnProperty)e[r]=t["_"+r];else try{delete e[r]}catch(t){}t.methods=[]}function hijackMethod(t,e,r){var n;if(r[e].hadOwnProperty=Object.prototype.hasOwnProperty.call(t,e),r["_"+e]=t[e],"Date"===e){var i=mirrorDateProperties(r[e],t[e]);t[e]=i}else for(n in t[e]=function(){return r[e].apply(r,arguments)},r[e])r[e].hasOwnProperty(n)&&(t[e][n]=r[e][n]);t[e].clock=r}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,r=[];for(e in t)t.hasOwnProperty(e)&&r.push(e);return r};function createClock(t){var e={now:getEpoch(t),timeouts:{},Date:createDate()};return e.Date.clock=e,e.setTimeout=function(t,r){return addTimer(e,{func:t,args:Array.prototype.slice.call(arguments,2),delay:r})},e.clearTimeout=function(t){return clearTimer(e,t,"Timeout")},e.setInterval=function(t,r){return addTimer(e,{func:t,args:Array.prototype.slice.call(arguments,2),delay:r,interval:r})},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 r,n,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{r=e.now,callTimer(e,a),r!==e.now&&(i+=e.now-r,o+=e.now-r,s+=e.now-r)}catch(t){n=n||t}}a=firstTimerInRange(e,s,o),s=i}if(e.duringTick=!1,e.now=o,n)throw n;return e.now},e.reset=function(){e.timers={}},e.setSystemTime=function(t){var r=getEpoch(t),n=r-e.now;for(var i in e.now=r,e.timers)if(e.timers.hasOwnProperty(i)){var o=e.timers[i];o.createdAt+=n,o.callAt+=n}},e}exports.timers=timers,exports.createClock=createClock,exports.install=function(t,e,r){var n,i;"number"==typeof t&&(r=e,e=t,t=null),t||(t=global);var o=createClock(e);for(o.uninstall=function(){uninstall(o,t)},o.methods=r||[],0===o.methods.length&&(o.methods=keys(timers)),n=0,i=o.methods.length;n<i;n++)hijackMethod(t,o.methods[n],o);return o}}(global||this)}).call(exports,function(){return this}())},function(t,e,r){var n,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 r(){this.readyState=r.UNSENT,this.requestBody=null,this.requestHeaders={},this.status=0,this.timeout=null,"function"==typeof r.onCreate&&r.onCreate(this)}e.xdr=s,e.extend(r.prototype,e.EventTarget,{open:function(t,e){this.method=t,this.url=e,this.responseText=null,this.sendFlag=!1,this.readyStateChange(r.OPENED)},readyStateChange:function(t){this.readyState=t;var n="";switch(this.readyState){case r.UNSENT:case r.OPENED:break;case r.LOADING:this.sendFlag&&(n="onprogress");break;case r.DONE:n=this.isTimeout?"ontimeout":this.errorFlag||this.status<200||this.status>299?"onerror":"onload"}if(n&&"function"==typeof this[n])try{this[n]()}catch(t){e.logError("Fake XHR "+n+" handler",t)}},send:function(t){!function(t){if(t.readyState!==r.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(r.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===r.UNSENT)throw new Error("Request not sent");if(t.readyState===r.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,n=0;this.responseText="";do{this.readyStateChange(r.LOADING),this.responseText+=t.substring(n,n+e),n+=e}while(n<t.length);this.readyStateChange(r.DONE)},respond:function(t,e,r){this.status="number"==typeof t?t:200,this.setResponseBody(r||"")},simulatetimeout:function(){this.status=0,this.isTimeout=!0,this.responseText=void 0,this.readyStateChange(r.DONE)}}),e.extend(r,{UNSENT:0,OPENED:1,LOADING:3,DONE:4}),e.useFakeXDomainRequest=function(){return e.FakeXDomainRequest.restore=function(r){s.supportsXDR&&(t.XDomainRequest=s.GlobalXDomainRequest),delete e.FakeXDomainRequest.restore,!0!==r&&delete e.FakeXDomainRequest.onCreate},s.supportsXDR&&(t.XDomainRequest=e.FakeXDomainRequest),e.FakeXDomainRequest},e.FakeXDomainRequest=r}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,r){var n=t("./core");t("../extend"),t("./event"),t("../log_error"),a(n),r.exports=n}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=c)?n.call(e,r,e,o):n)||(o.exports=i):u?c(r(364),o.exports,o):a(sinon)}(void 0!==t?t:self)}).call(e,function(){return this}(),r(102)(t))},function(t,e,r){var n,i;(function(t,o){
|
|
274
|
+
/**
|
|
275
|
+
* Fake XMLHttpRequest object
|
|
276
|
+
*
|
|
277
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
278
|
+
* @license BSD
|
|
279
|
+
*
|
|
280
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
281
|
+
*/
|
|
282
|
+
!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 r(e){t.addEventListener(e,function(r){var n=t["on"+e];n&&"function"==typeof n&&n.call(this,r)})}for(var n=e.length-1;n>=0;n--)r(e[n]);"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 r in e=e.toLowerCase(),t)if(r.toLowerCase()===e)return r;return null}function b(t,e){if(t)for(var r=0,n=t.length;r<n;r+=1)e(t[r])}d.prototype.addEventListener=function(t,e){this.eventListeners[t].push(e)},d.prototype.removeEventListener=function(t,e){for(var r=this.eventListeners[t]||[],n=0,i=r.length;n<i;++n)if(r[n]===e)return r.splice(n,1)},d.prototype.dispatchEvent=function(t){for(var e,r=this.eventListeners[t.type]||[],n=0;null!=(e=r[n]);n++)e(t)};var m=function(t,e,r){switch(r.length){case 0:return t[e]();case 1:return t[e](r[0]);case 2:return t[e](r[0],r[1]);case 3:return t[e](r[0],r[1],r[2]);case 4:return t[e](r[0],r[1],r[2],r[3]);case 5:return t[e](r[0],r[1],r[2],r[3],r[4])}};y.filters=[],y.addFilter=function(t){this.filters.push(t)};var _=/MSIE 6/;function w(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i>=256)throw new TypeError("arraybuffer or blob responseTypes require binary string, invalid character "+t[n]+" found.");r[n]=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 S(t){t.xhr=h,t.extend(y.prototype,t.EventTarget,{async:!0,open:function(t,e,r,n,i){if(this.method=t,this.url=e,this.async="boolean"!=typeof r||r,this.username=n,this.password=i,x(this),this.requestHeaders={},this.sendFlag=!1,!0===y.useFilters){var o=arguments;if(function(t,e){for(var r=0;r<t.length;r++)if(!0===e(t[r]))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 r,n,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&&(n={loaded:this.progress||0,total:this.progress||0},r=0===this.status?this.aborted?"abort":"error":"load",a&&(this.upload.dispatchEvent(new t.ProgressEvent("progress",n,this)),this.upload.dispatchEvent(new t.ProgressEvent(r,n,this)),this.upload.dispatchEvent(new t.ProgressEvent("loadend",n,this))),this.dispatchEvent(new t.ProgressEvent("progress",n,this)),this.dispatchEvent(new t.ProgressEvent(r,n,this)),this.dispatchEvent(new t.ProgressEvent("loadend",n,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 r=g(this.requestHeaders,"Content-Type");if(this.requestHeaders[r]){var n=this.requestHeaders[r].split(";");this.requestHeaders[r]=n[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"),r=""===this.responseType||"text"===this.responseType;if(x(this),this.async){var n=this.chunkSize||10,i=0;do{this.readyStateChange(y.LOADING),r&&(this.responseText=this.response+=t.substring(i,i+n)),i+=n}while(i<t.length)}this.response=function(t,e,r){if(""===t||"text"===t)return r;if(f&&"arraybuffer"===t)return w(r);if("json"===t)try{return JSON.parse(r)}catch(t){return null}else{if(l&&"blob"===t){var n={};return e&&(n.type=e),new Blob([w(r)],n)}if("document"===t)return E(e)?y.parseXML(r):null}throw new Error("Invalid responseType "+t)}(this.responseType,e,t),r&&(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,r){this.status="number"==typeof t?t:200,this.statusText=y.statusCodes[this.status],this.setResponseHeaders(e||{}),this.setResponseBody(r||"")},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 r=new h.workingXHR;b(["open","setRequestHeader","send","abort","getResponseHeader","getAllResponseHeaders","addEventListener","overrideMimeType","removeEventListener"],function(e){t[e]=function(){return m(r,e,arguments)}});var n=function(e){b(e,function(e){try{t[e]=r[e]}catch(t){if(!_.test(navigator.userAgent))throw t}})},i=function(){t.readyState=r.readyState,r.readyState>=y.HEADERS_RECEIVED&&n(["status","statusText"]),r.readyState>=y.LOADING&&n(["responseText","response"]),r.readyState===y.DONE&&n(["responseXML"]),t.onreadystatechange&&t.onreadystatechange.call(t,{target:t})};if(r.addEventListener){for(var o in t.eventListeners)t.eventListeners.hasOwnProperty(o)&&b(t.eventListeners[o],function(t){r.addEventListener(o,t)});r.addEventListener("readystatechange",i)}else r.onreadystatechange=i;m(r,"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 T=void 0!==o&&o.exports&&!0;function A(t,e,r){var n=t("./core");t("../extend"),t("./event"),t("../log_error"),S(n),r.exports=n}"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=A)?n.call(e,r,e,o):n)||(o.exports=i):T?A(r(364),o.exports,o):t&&S(t)}("object"==typeof sinon&&sinon,void 0!==t?t:self)}).call(e,function(){return this}(),r(102)(t))},function(t,e){
|
|
283
|
+
/**
|
|
284
|
+
* Helps IE run the fake timers. By defining global functions, IE allows
|
|
285
|
+
* them to be overwritten at a later point. If these are not defined like
|
|
286
|
+
* this, overwriting them will result in anything from an exception to browser
|
|
287
|
+
* crash.
|
|
288
|
+
*
|
|
289
|
+
* If you don't require fake timers to work in IE, don't include this file.
|
|
290
|
+
*
|
|
291
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
292
|
+
* @license BSD
|
|
293
|
+
*
|
|
294
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
295
|
+
*/
|
|
296
|
+
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){
|
|
297
|
+
/**
|
|
298
|
+
* Helps IE run the fake XMLHttpRequest. By defining global functions, IE allows
|
|
299
|
+
* them to be overwritten at a later point. If these are not defined like
|
|
300
|
+
* this, overwriting them will result in anything from an exception to browser
|
|
301
|
+
* crash.
|
|
302
|
+
*
|
|
303
|
+
* If you don't require fake XHR to work in IE, don't include this file.
|
|
304
|
+
*
|
|
305
|
+
* @author Christian Johansen (christian@cjohansen.no)
|
|
306
|
+
* @license BSD
|
|
307
|
+
*
|
|
308
|
+
* Copyright (c) 2010-2013 Christian Johansen
|
|
309
|
+
*/
|
|
310
|
+
if("undefined"!=typeof window){sinon.xhr.XMLHttpRequest||void 0}},function(t,e,r){var n,i;(function(t){!function(o){"use strict";function s(t){return t.walk=function(t,e,r){return function t(e,r,n,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;r.call(n,s[t],t,s)}}),(s=Object.getPrototypeOf(e))&&t(s,r,n,i,o);else for(a in e)r.call(n,e[a],a,e)}(t,e,r,t,{})},t.walk}function a(t,e,r){var n=t("./util/core");r.exports=s(n)}var u=void 0!==t&&t.exports&&!0;"object"==typeof r(321)&&r(321)?void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i):u?a(r(324),t.exports,t):o&&s(o)}("object"==typeof sinon&&sinon)}).call(e,r(102)(t))},function(t,e,r){var n=r(377),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(378)),o=n(r(379)),s=n(r(380)),a=r(381),u=r(382);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 r=e.stack;if(this.stackStartFunction){var n=f(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 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 b(t){this.obj=t,this.anyOne=!1,this.negate=!1,this.params={actual:t}}function m(){b.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):"",r="details"in this&&this.details?" ("+this.details+")":"",n=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+r+n}}}),g.prototype={generateMessage:d.prototype.generateMessage},b.prototype={constructor:b,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)}},m.prototype.then=function(t,e){return this.obj.then(t,e)},b.add=function(t,e){Object.defineProperty(b.prototype,t,{enumerable:!0,configurable:!0,value:function(){var r=new b(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(m.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}})},b.addChain=function(t,e){e=e||function(){},Object.defineProperty(b.prototype,t,{get:function(){return e.call(this),this},enumerable:!0}),Object.defineProperty(m.prototype,t,{enumerable:!0,configurable:!0,get:function(){return this.obj=this.obj.then(function(e){return e[t]}),this}})},b.alias=function(t,e){var r=Object.getOwnPropertyDescriptor(b.prototype,t);if(!r)throw new Error("Alias "+t+" -> "+e+" could not be created as "+t+" not defined");Object.defineProperty(b.prototype,e,r);var n=Object.getOwnPropertyDescriptor(m.prototype,t);n&&Object.defineProperty(m.prototype,e,n)},b.addChain("not",function(){this.negate=!this.negate}),b.addChain("any",function(){this.anyOne=!0}),b.addChain("only",function(){this.onlyThis=!0});var _=Array.prototype.slice,w=x;function E(t,e,r,n,i){var o=new b(t);o.params={operator:n,expected:e,message:r,stackStartFunction:i||E},o.fail()}function x(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 T(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=x,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(){T.apply(this,[!0].concat(_.call(arguments)))},w.doesNotThrow=function(){T.apply(this,[!1].concat(_.call(arguments)))},w.ifError=function(t){if(t)throw t};var A=Array.prototype.slice;function k(t){return new b(t)}k.AssertionError=d,k.Assertion=b,k.modules={format:s,type:i,equal:o},k.format=h,k.config=l,k.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 k(function(t){return t instanceof Number||t instanceof String||t instanceof Boolean}(this)?this.valueOf():this)},configurable:!0}),{name:t,descriptor:r,proto:e}},k.noConflict=function(t){return(t=t||k._prevShould)&&(delete t.proto[t.name],t.descriptor&&Object.defineProperty(t.proto,t.name,t.descriptor)),k},k.use=function(t){return t(k,k.Assertion),this},k.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 "+h(t.a))+(t.b===r?"":" and B has "+h(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 "+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,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=c(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=A.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=c(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=A.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 c=[];s=[],u.forEach(function(t){var i=e[t];0!==o(n[t],i).length?c.push(p(t)+" of "+r(i)+" (got "+r(n[t])+")"):s.push(p(t)+" of "+r(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=A.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=A.call(arguments)).map(p);e=e.map(c);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 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&&n)try{t(o).match(n)}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 "+r(e)+", but got '"+o.message+"'":"function"==typeof e&&(s=" of type "+f(e)+", but got "+f(o.constructor))}else s=" (got "+r(o)+")";this.params={operator:"to throw exception"+s},this.assert(a),this.assert(c)}),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 "+f(e)+", but got "+f(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 m(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=k},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(171).Buffer)},function(t,e,r){"use strict";var n=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(r(378));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 c(t,e,r,n){e[t]="boolean"!=typeof r[t]?n[t]:r[t]}function f(t,e,r,n){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=r,this._meet=t._meet||[],this.fails=t.fails||[],this.path=n||[]}function l(t){this.name="ShortcutError",this.message="fail fast",this.fail=t}function h(t,e,r){return new f(r,t,e).check()}l.prototype=Object.create(Error.prototype),f.checkStrictEquality=function(t,e){this.collectFail(t!==e,a)},f.add=function(t,e,r,n){var i=Array.prototype.slice.call(arguments);n=i.pop(),f.prototype["_check_"+i.join("_")]=n},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 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 l(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 f(this,this.a[t],this.b[t],this.path.concat([t])).check0()},defaultCheck:f.checkStrictEquality},f.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){f.add(t,f.checkStrictEquality)}),f.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)}),f.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)}),f.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){f.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)})}),f.add(n.OBJECT,function(t,e){this.checkPlainObjectsEquality(t,e)}),[n.ARRAY,n.ARGUMENTS,n.TYPED_ARRAY].forEach(function(t){f.add(n.OBJECT,t,function(t,e){this.checkPropertyEquality("length"),this.checkPlainObjectsEquality(t,e)})}),f.add(n.OBJECT,n.ARRAY_BUFFER,function(t,e){this.checkPropertyEquality("byteLength"),this.checkPlainObjectsEquality(t,e)}),f.add(n.OBJECT,n.ERROR,function(t,e){this.checkPropertyEquality("name"),this.checkPropertyEquality("message"),this.checkPlainObjectsEquality(t,e)}),f.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){f.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===h(n.value[0],a.value[0],{collectAllFails:!1,_meet:this._meet}).length&&(s=!0,h(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)})}),h.EQ=f,t.exports=h},function(t,e,r){"use strict";var n=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(r(378)),i=r(381);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 c(t,e){return function(t,e,r){t=String(t);var n=!1;if(e<0&&(n=!0,e=-e),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 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 r=l(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 y(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),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 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 b(t,e){return(e=e||{}).keyValueSep=": ",e.formatKey=e.formatKey||v,e.formatValue=e.formatValue||function(e,r){return g.call(this,t,r)},y.call(this,t,e)}function m(t){return b.call(this,t,{additionalKeys:[["[[PrimitiveValue]]",t.valueOf()]]})}function _(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 f=c((n[u]||0).toString(16),r);a+=f.length,s.push(f)}var l=n.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(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=c,S.functionName=l,S.constructorName=h,S.formatPlainObjectKey=v,S.formatPlainObject=b,S.typeAdaptorForEachFormat=y,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 b.call(this,t,{prefix:"Function",additionalKeys:[["name",l(t)]]})}),a.addType(new n.Type(n.OBJECT),b),a.addType(new n.Type(n.OBJECT,n.NUMBER),m),a.addType(new n.Type(n.OBJECT,n.BOOLEAN),m),a.addType(new n.Type(n.OBJECT,n.STRING),function(t){var e=t.valueOf();return b.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 b.call(this,t,{value:String(t)})}),a.addType(new n.Type(n.OBJECT,n.ARRAY),function(t){return b.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return v.call(this,t)},brackets:["[","]"]})}),a.addType(new n.Type(n.OBJECT,n.ARGUMENTS),function(t){return b.call(this,t,{formatKey:function(t){if(!t.match(/\d+/))return v.call(this,t)},brackets:["[","]"],prefix:"Arguments"})}),a.addType(new n.Type(n.OBJECT,n.DATE),function(t){return b.call(this,t,{value:function(t,e){var r=e?"UTC":"",n=t["get"+r+"FullYear"]()+"-"+c(t["get"+r+"Month"]()+1,2)+"-"+c(t["get"+r+"Date"](),2),i=c(t["get"+r+"Hours"](),2)+":"+c(t["get"+r+"Minutes"](),2)+":"+c(t["get"+r+"Seconds"](),2)+"."+c(t["get"+r+"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 n+" "+i+(e?"":" "+f)}(t,this.isUTCdate)})}),a.addType(new n.Type(n.OBJECT,n.ERROR),function(t){return b.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),_("length","Buffer",2)),a.addType(new n.Type(n.OBJECT,n.ARRAY_BUFFER),_("byteLength","ArrayBuffer",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"int8"),_("length","Int8Array",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint8"),_("length","Uint8Array",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint8clamped"),_("length","Uint8ClampedArray",2)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"int16"),_("length","Int16Array",4)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint16"),_("length","Uint16Array",4)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"int32"),_("length","Int32Array",8)),a.addType(new n.Type(n.OBJECT,n.TYPED_ARRAY,"uint32"),_("length","Uint32Array",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"bool16x8"),x("Bool16x8",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"bool32x4"),x("Bool32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"bool8x16"),x("Bool8x16",16)),a.addType(new n.Type(n.OBJECT,n.SIMD,"float32x4"),x("Float32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"int16x8"),x("Int16x8",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"int32x4"),x("Int32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"int8x16"),x("Int8x16",16)),a.addType(new n.Type(n.OBJECT,n.SIMD,"uint16x8"),x("Uint16x8",8)),a.addType(new n.Type(n.OBJECT,n.SIMD,"uint32x4"),x("Uint32x4",4)),a.addType(new n.Type(n.OBJECT,n.SIMD,"uint8x16"),x("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(382),i=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(r(378));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 c={has:function(t,e){return t.has(e)},get:function(t,e){return t.get(e)},forEach:function(t,e,r){l(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()}},f=n.merge({},c);function l(t,e,r){if(n.isGeneratorFunction(t))return l(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)}}f.get=function(t,e){if(t.has(e))return e},f.iterator=function(t){return t.values()},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)),a.addIterableType(new i.Type(i.OBJECT,i.SET)),e.defaultTypeAdaptorStorage=a,e.forEach=l,e.size=function(t){var e=i(t),r=a.getAdaptor(e,"size");if(r)return r(t);var n=0;return l(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 l(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 l(t,function(r,i){n=e(n,r,i,t)}),n},e.some=function(t,e,r){var n=!1;return l(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 l(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){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,r){(function(t){"use strict";if(r(385),r(711),r(712),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(386),r(436),r(437),r(438),r(439),r(441),r(443),r(444),r(445),r(446),r(447),r(448),r(449),r(450),r(451),r(453),r(455),r(457),r(459),r(462),r(463),r(464),r(468),r(470),r(472),r(475),r(476),r(477),r(478),r(480),r(481),r(482),r(483),r(484),r(485),r(486),r(488),r(489),r(490),r(492),r(493),r(494),r(496),r(498),r(499),r(500),r(501),r(502),r(503),r(504),r(505),r(506),r(507),r(508),r(509),r(510),r(515),r(516),r(520),r(521),r(522),r(523),r(525),r(526),r(527),r(528),r(529),r(530),r(531),r(532),r(533),r(534),r(535),r(536),r(537),r(538),r(539),r(541),r(542),r(544),r(545),r(551),r(552),r(554),r(555),r(556),r(560),r(561),r(562),r(563),r(564),r(566),r(567),r(568),r(569),r(572),r(574),r(575),r(576),r(578),r(580),r(582),r(584),r(585),r(586),r(590),r(591),r(592),r(594),r(604),r(608),r(609),r(611),r(612),r(616),r(617),r(619),r(620),r(621),r(622),r(623),r(624),r(625),r(626),r(627),r(628),r(629),r(630),r(631),r(632),r(633),r(634),r(635),r(636),r(637),r(639),r(640),r(641),r(642),r(643),r(645),r(646),r(647),r(649),r(650),r(651),r(652),r(653),r(654),r(655),r(656),r(658),r(659),r(661),r(662),r(663),r(664),r(667),r(668),r(670),r(671),r(672),r(673),r(675),r(676),r(677),r(678),r(679),r(680),r(681),r(682),r(683),r(684),r(686),r(687),r(688),r(689),r(690),r(691),r(692),r(693),r(694),r(695),r(696),r(698),r(699),r(700),r(701),r(702),r(703),r(704),r(705),r(706),r(707),r(708),r(709),r(710),t.exports=r(392)},function(t,e,r){"use strict";var n=r(387),i=r(388),o=r(389),s=r(391),a=r(401),u=r(408).KEY,c=r(390),f=r(404),l=r(409),h=r(402),p=r(410),d=r(411),y=r(412),v=r(413),g=r(428),b=r(395),m=r(396),_=r(429),w=r(416),E=r(399),x=r(400),S=r(430),T=r(433),A=r(435),k=r(426),j=r(394),O=r(414),C=A.f,R=j.f,I=T.f,P=n.Symbol,B=n.JSON,F=B&&B.stringify,M=p("_hidden"),L=p("toPrimitive"),N={}.propertyIsEnumerable,D=f("symbol-registry"),U=f("symbols"),q=f("op-symbols"),V=Object.prototype,W="function"==typeof P&&!!k.f,z=n.QObject,H=!z||!z.prototype||!z.prototype.findChild,G=o&&c(function(){return 7!=S(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=C(V,e);n&&delete V[e],R(t,e,r),n&&t!==V&&R(V,e,n)}:R,X=function(t){var e=U[t]=S(P.prototype);return e._k=t,e},Y=W&&"symbol"==typeof P.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof P},J=function(t,e,r){return t===V&&J(q,e,r),b(t),e=E(e,!0),b(r),i(U,e)?(r.enumerable?(i(t,M)&&t[M][e]&&(t[M][e]=!1),r=S(r,{enumerable:x(0,!1)})):(i(t,M)||R(t,M,x(1,{})),t[M][e]=!0),G(t,e,r)):R(t,e,r)},$=function(t,e){b(t);for(var r,n=v(e=w(e)),i=0,o=n.length;o>i;)J(t,r=n[i++],e[r]);return t},K=function(t){var e=N.call(this,t=E(t,!0));return!(this===V&&i(U,t)&&!i(q,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,M)&&this[M][t])||e)},Z=function(t,e){if(t=w(t),e=E(e,!0),t!==V||!i(U,e)||i(q,e)){var r=C(t,e);return!r||!i(U,e)||i(t,M)&&t[M][e]||(r.enumerable=!0),r}},Q=function(t){for(var e,r=I(w(t)),n=[],o=0;r.length>o;)i(U,e=r[o++])||e==M||e==u||n.push(e);return n},tt=function(t){for(var e,r=t===V,n=I(r?q:w(t)),o=[],s=0;n.length>s;)!i(U,e=n[s++])||r&&!i(V,e)||o.push(U[e]);return o};W||(a((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(r){this===V&&e.call(q,r),i(this,M)&&i(this[M],t)&&(this[M][t]=!1),G(this,t,x(1,r))};return o&&H&&G(V,t,{configurable:!0,set:e}),X(t)}).prototype,"toString",function(){return this._k}),A.f=Z,j.f=J,r(434).f=T.f=Q,r(427).f=K,k.f=tt,o&&!r(405)&&a(V,"propertyIsEnumerable",K,!0),d.f=function(t){return X(p(t))}),s(s.G+s.W+s.F*!W,{Symbol:P});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;et.length>rt;)p(et[rt++]);for(var nt=O(p.store),it=0;nt.length>it;)y(nt[it++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return i(D,t+="")?D[t]:D[t]=P(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in D)if(D[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?S(t):$(S(t),e)},defineProperty:J,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=c(function(){k.f(1)});s(s.S+s.F*ot,"Object",{getOwnPropertySymbols:function(t){return k.f(_(t))}}),B&&s(s.S+s.F*(!W||c(function(){var t=P();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(m(e)||void 0!==t)&&!Y(t))return g(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!Y(e))return e}),n[1]=e,F.apply(B,n)}}),P.prototype[L]||r(393)(P.prototype,L,P.prototype.valueOf),l(P,"Symbol"),l(Math,"Math",!0),l(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(390)(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(387),i=r(392),o=r(393),s=r(401),a=r(406),u=function(t,e,r){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,b=d?n:y?n[e]||(n[e]={}):(n[e]||{}).prototype,m=d?i:i[e]||(i[e]={}),_=m.prototype||(m.prototype={});for(c in d&&(r=e),r)l=((f=!p&&b&&void 0!==b[c])?b:r)[c],h=g&&f?a(l,n):v&&"function"==typeof l?a(Function.call,l):l,b&&s(b,c,l,t&u.U),m[c]!=l&&o(m,c,h),v&&_[c]!=l&&(_[c]=l)};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.6.12"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(394),i=r(400);t.exports=r(389)?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(395),i=r(397),o=r(399),s=Object.defineProperty;e.f=r(389)?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(396);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(389)&&!r(390)(function(){return 7!=Object.defineProperty(r(398)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(396),i=r(387).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,r){var n=r(396);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(387),i=r(393),o=r(388),s=r(402)("src"),a=r(403),u=(""+a).split("toString");r(392).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,r,a){var c="function"==typeof r;c&&(o(r,"name")||i(r,"name",e)),t[e]!==r&&(c&&(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){t.exports=r(404)("native-function-to-string",Function.toString)},function(t,e,r){var n=r(392),i=r(387),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(405)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,r){var n=r(407);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(402)("meta"),i=r(396),o=r(388),s=r(394).f,a=0,u=Object.isExtensible||function(){return!0},c=!r(390)(function(){return u(Object.preventExtensions({}))}),f=function(t){s(t,n,{value:{i:"O"+ ++a,w:{}}})},l=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";f(t)}return t[n].i},getWeak:function(t,e){if(!o(t,n)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[n].w},onFreeze:function(t){return c&&l.NEED&&u(t)&&!o(t,n)&&f(t),t}}},function(t,e,r){var n=r(394).f,i=r(388),o=r(410)("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(404)("wks"),i=r(402),o=r(387).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(410)},function(t,e,r){var n=r(387),i=r(392),o=r(405),s=r(411),a=r(394).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,r){var n=r(414),i=r(426),o=r(427);t.exports=function(t){var e=n(t),r=i.f;if(r)for(var s,a=r(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,r){var n=r(415),i=r(425);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e,r){var n=r(388),i=r(416),o=r(420)(!1),s=r(424)("IE_PROTO");t.exports=function(t,e){var r,a=i(t),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(c,r)||c.push(r));return c}},function(t,e,r){var n=r(417),i=r(419);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=r(418);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(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(416),i=r(421),o=r(423);t.exports=function(t){return function(e,r,s){var a,u=n(e),c=i(u.length),f=o(s,c);if(t&&r!=r){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}}},function(t,e,r){var n=r(422),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(422),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(404)("keys"),i=r(402);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){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(418);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(419);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(395),i=r(431),o=r(425),s=r(424)("IE_PROTO"),a=function(){},u=function(){var t,e=r(398)("iframe"),n=o.length;for(e.style.display="none",r(432).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(394),i=r(395),o=r(414);t.exports=r(389)?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){var n=r(387).document;t.exports=n&&n.documentElement},function(t,e,r){var n=r(416),i=r(434).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(415),i=r(425).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},function(t,e,r){var n=r(427),i=r(400),o=r(416),s=r(399),a=r(388),u=r(397),c=Object.getOwnPropertyDescriptor;e.f=r(389)?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(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(391);n(n.S,"Object",{create:r(430)})},function(t,e,r){var n=r(391);n(n.S+n.F*!r(389),"Object",{defineProperty:r(394).f})},function(t,e,r){var n=r(391);n(n.S+n.F*!r(389),"Object",{defineProperties:r(431)})},function(t,e,r){var n=r(416),i=r(435).f;r(440)("getOwnPropertyDescriptor",function(){return function(t,e){return i(n(t),e)}})},function(t,e,r){var n=r(391),i=r(392),o=r(390);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(429),i=r(442);r(440)("getPrototypeOf",function(){return function(t){return i(n(t))}})},function(t,e,r){var n=r(388),i=r(429),o=r(424)("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(429),i=r(414);r(440)("keys",function(){return function(t){return i(n(t))}})},function(t,e,r){r(440)("getOwnPropertyNames",function(){return r(433).f})},function(t,e,r){var n=r(396),i=r(408).onFreeze;r(440)("freeze",function(t){return function(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(396),i=r(408).onFreeze;r(440)("seal",function(t){return function(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(396),i=r(408).onFreeze;r(440)("preventExtensions",function(t){return function(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(396);r(440)("isFrozen",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(396);r(440)("isSealed",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(396);r(440)("isExtensible",function(t){return function(e){return!!n(e)&&(!t||t(e))}})},function(t,e,r){var n=r(391);n(n.S+n.F,"Object",{assign:r(452)})},function(t,e,r){"use strict";var n=r(389),i=r(414),o=r(426),s=r(427),a=r(429),u=r(417),c=Object.assign;t.exports=!c||r(390)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=c({},t)[r]||Object.keys(c({},e)).join("")!=n})?function(t,e){for(var r=a(t),c=arguments.length,f=1,l=o.f,h=s.f;c>f;)for(var p,d=u(arguments[f++]),y=l?i(d).concat(l(d)):i(d),v=y.length,g=0;v>g;)p=y[g++],n&&!h.call(d,p)||(r[p]=d[p]);return r}:c},function(t,e,r){var n=r(391);n(n.S,"Object",{is:r(454)})},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(391);n(n.S,"Object",{setPrototypeOf:r(456).set})},function(t,e,r){var n=r(396),i=r(395),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(406)(Function.call,r(435).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(458),i={};i[r(410)("toStringTag")]="z",i+""!="[object z]"&&r(401)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(t,e,r){var n=r(418),i=r(410)("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(391);n(n.P,"Function",{bind:r(460)})},function(t,e,r){"use strict";var n=r(407),i=r(396),o=r(461),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(394).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||r(389)&&n(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,r){"use strict";var n=r(396),i=r(442),o=r(410)("hasInstance"),s=Function.prototype;o in s||r(394).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(391),i=r(465);n(n.G+n.F*(parseInt!=i),{parseInt:i})},function(t,e,r){var n=r(387).parseInt,i=r(466).trim,o=r(467),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(391),i=r(419),o=r(390),s=r(467),a="["+s+"]",u=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),f=function(t,e,r){var i={},a=o(function(){return!!s[t]()||"
"!="
"[t]()}),u=i[t]=a?e(l):s[t];r&&(i[r]=u),n(n.P+n.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,r){var n=r(391),i=r(469);n(n.G+n.F*(parseFloat!=i),{parseFloat:i})},function(t,e,r){var n=r(387).parseFloat,i=r(466).trim;t.exports=1/n(r(467)+"-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(387),i=r(388),o=r(418),s=r(471),a=r(399),u=r(390),c=r(434).f,f=r(435).f,l=r(394).f,h=r(466).trim,p=n.Number,d=p,y=p.prototype,v="Number"==o(r(430)(y)),g="trim"in String.prototype,b=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var r,n,i,o=(e=g?e.trim():h(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),c=0,f=u.length;c<f;c++)if((s=u.charCodeAt(c))<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&&(v?u(function(){y.valueOf.call(r)}):"Number"!=o(r))?s(new d(b(e)),r,p):b(e)};for(var m,_=r(389)?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,m=_[w])&&!i(p,m)&&l(p,m,f(d,m));p.prototype=y,y.constructor=p,r(401)(n,"Number",p)}},function(t,e,r){var n=r(396),i=r(456).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(391),i=r(422),o=r(473),s=r(474),a=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var r=-1,n=e;++r<6;)n+=t*c[r],c[r]=n%1e7,n=u(n/1e7)},h=function(t){for(var e=6,r=0;--e>=0;)r+=c[e],c[e]=u(r/t),r=r%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var r=String(c[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(390)(function(){a.call({})})),"Number",{toFixed:function(t){var e,r,n,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(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(l(0,r),n=c;n>=7;)l(1e7,0),n-=7;for(l(d(10,n,1),0),n=e-1;n>=23;)h(1<<23),n-=23;h(1<<n),l(1,1),h(2),v=p()}else l(0,r),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,r){var n=r(418);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(422),i=r(419);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(391),i=r(390),o=r(473),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(391);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,r){var n=r(391),i=r(387).isFinite;n(n.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,r){var n=r(391);n(n.S,"Number",{isInteger:r(479)})},function(t,e,r){var n=r(396),i=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&i(t)===t}},function(t,e,r){var n=r(391);n(n.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,r){var n=r(391),i=r(479),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,r){var n=r(391);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(391);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(391),i=r(469);n(n.S+n.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,r){var n=r(391),i=r(465);n(n.S+n.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,r){var n=r(391),i=r(487),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(391),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(391),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(391),i=r(491);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(391);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(391),i=Math.exp;n(n.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,r){var n=r(391),i=r(495);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(391);n(n.S,"Math",{fround:r(497)})},function(t,e,r){var n=r(491),i=Math.pow,o=i(2,-52),s=i(2,-23),a=i(2,127)*(2-s),u=i(2,-126);t.exports=Math.fround||function(t){var e,r,i=Math.abs(t),c=n(t);return i<u?c*function(t){return t+1/o-1/o}(i/u/s)*u*s:(r=(e=(1+s/o)*i)-(e-i))>a||r!=r?c*(1/0):c*r}},function(t,e,r){var n=r(391),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(391),i=Math.imul;n(n.S+n.F*r(390)(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(391);n(n.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,r){var n=r(391);n(n.S,"Math",{log1p:r(487)})},function(t,e,r){var n=r(391);n(n.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,r){var n=r(391);n(n.S,"Math",{sign:r(491)})},function(t,e,r){var n=r(391),i=r(495),o=Math.exp;n(n.S+n.F*r(390)(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(391),i=r(495),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(391);n(n.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,r){var n=r(391),i=r(423),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(391),i=r(416),o=r(421);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(466)("trim",function(t){return function(){return t(this,3)}})},function(t,e,r){"use strict";var n=r(511)(!0);r(512)(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(422),i=r(419);t.exports=function(t){return function(e,r){var o,s,a=String(i(e)),u=n(r),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,r){"use strict";var n=r(405),i=r(391),o=r(401),s=r(393),a=r(513),u=r(514),c=r(409),f=r(442),l=r(410)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,r,d,y,v,g){u(r,e,d);var b,m,_,w=function(t){if(!h&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},E=e+" Iterator",x="values"==y,S=!1,T=t.prototype,A=T[l]||T["@@iterator"]||y&&T[y],k=A||w(y),j=y?x?w("entries"):k:void 0,O="Array"==e&&T.entries||A;if(O&&(_=f(O.call(new t)))!==Object.prototype&&_.next&&(c(_,E,!0),n||"function"==typeof _[l]||s(_,l,p)),x&&A&&"values"!==A.name&&(S=!0,k=function(){return A.call(this)}),n&&!g||!h&&!S&&T[l]||s(T,l,k),a[e]=k,a[E]=p,y)if(b={values:x?k:w("values"),keys:v?k:w("keys"),entries:j},g)for(m in b)m in T||o(T,m,b[m]);else i(i.P+i.F*(h||S),e,b);return b}},function(t,e){t.exports={}},function(t,e,r){"use strict";var n=r(430),i=r(400),o=r(409),s={};r(393)(s,r(410)("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(391),i=r(511)(!1);n(n.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(391),i=r(421),o=r(517),s="".endsWith;n(n.P+n.F*r(519)("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(518),i=r(419);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(396),i=r(418),o=r(410)("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(410)("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(391),i=r(517);n(n.P+n.F*r(519)("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(391);n(n.P,"String",{repeat:r(474)})},function(t,e,r){"use strict";var n=r(391),i=r(421),o=r(517),s="".startsWith;n(n.P+n.F*r(519)("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(524)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,r){var n=r(391),i=r(390),o=r(419),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(524)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,r){"use strict";r(524)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,r){"use strict";r(524)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,r){"use strict";r(524)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,r){"use strict";r(524)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,r){"use strict";r(524)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,r){"use strict";r(524)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,r){"use strict";r(524)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,r){"use strict";r(524)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,r){"use strict";r(524)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,r){"use strict";r(524)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,r){"use strict";r(524)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,r){var n=r(391);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,r){"use strict";var n=r(391),i=r(429),o=r(399);n(n.P+n.F*r(390)(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){var n=r(391),i=r(540);n(n.P+n.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,r){"use strict";var n=r(390),i=Date.prototype.getTime,o=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=n(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!n(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.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"}:o},function(t,e,r){var n=Date.prototype,i=n.toString,o=n.getTime;new Date(NaN)+""!="Invalid Date"&&r(401)(n,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,r){var n=r(410)("toPrimitive"),i=Date.prototype;n in i||r(393)(i,n,r(543))},function(t,e,r){"use strict";var n=r(395),i=r(399);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(391);n(n.S,"Array",{isArray:r(428)})},function(t,e,r){"use strict";var n=r(406),i=r(391),o=r(429),s=r(546),a=r(547),u=r(421),c=r(548),f=r(549);i(i.S+i.F*!r(550)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,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,b=f(h);if(v&&(y=n(y,d>2?arguments[2]:void 0,2)),void 0==b||p==Array&&a(b))for(r=new p(e=u(h.length));e>g;g++)c(r,g,v?y(h[g],g):h[g]);else for(l=b.call(h),r=new p;!(i=l.next()).done;g++)c(r,g,v?s(l,y,[i.value,g],!0):i.value);return r.length=g,r}})},function(t,e,r){var n=r(395);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(513),i=r(410)("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(394),i=r(400);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(458),i=r(410)("iterator"),o=r(513);t.exports=r(392).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n=r(410)("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(391),i=r(548);n(n.S+n.F*r(390)(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(391),i=r(416),o=[].join;n(n.P+n.F*(r(417)!=Object||!r(553)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(390);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(391),i=r(432),o=r(418),s=r(423),a=r(421),u=[].slice;n(n.P+n.F*r(390)(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),c=s(e,r),f=a(c-i),l=new Array(f),h=0;h<f;h++)l[h]="String"==n?this.charAt(i+h):this[i+h];return l}})},function(t,e,r){"use strict";var n=r(391),i=r(407),o=r(429),s=r(390),a=[].sort,u=[1,2,3];n(n.P+n.F*(s(function(){u.sort(void 0)})||!s(function(){u.sort(null)})||!r(553)(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(391),i=r(557)(0),o=r(553)([].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(406),i=r(417),o=r(429),s=r(421),a=r(558);t.exports=function(t,e){var r=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),b=i(g),m=n(a,d,3),_=s(b.length),w=0,E=r?p(e,_):u?p(e,0):void 0;_>w;w++)if((h||w in b)&&(v=m(y=b[w],w,g),t))if(r)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,r){var n=r(559);t.exports=function(t,e){return new(n(t))(e)}},function(t,e,r){var n=r(396),i=r(428),o=r(410)("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(391),i=r(557)(1);n(n.P+n.F*!r(553)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(391),i=r(557)(2);n(n.P+n.F*!r(553)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(391),i=r(557)(3);n(n.P+n.F*!r(553)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(391),i=r(557)(4);n(n.P+n.F*!r(553)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(391),i=r(565);n(n.P+n.F*!r(553)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,r){var n=r(407),i=r(429),o=r(417),s=r(421);t.exports=function(t,e,r,a,u){n(e);var c=i(t),f=o(c),l=s(c.length),h=u?l-1:0,p=u?-1:1;if(r<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,r){"use strict";var n=r(391),i=r(565);n(n.P+n.F*!r(553)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,r){"use strict";var n=r(391),i=r(420)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(s||!r(553)(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(391),i=r(416),o=r(422),s=r(421),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(u||!r(553)(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(391);n(n.P,"Array",{copyWithin:r(570)}),r(571)("copyWithin")},function(t,e,r){"use strict";var n=r(429),i=r(423),o=r(421);t.exports=[].copyWithin||function(t,e){var r=n(this),s=o(r.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 r?r[a]=r[u]:delete r[a],a+=l,u+=l;return r}},function(t,e,r){var n=r(410)("unscopables"),i=Array.prototype;void 0==i[n]&&r(393)(i,n,{}),t.exports=function(t){i[n][t]=!0}},function(t,e,r){var n=r(391);n(n.P,"Array",{fill:r(573)}),r(571)("fill")},function(t,e,r){"use strict";var n=r(429),i=r(423),o=r(421);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,c=void 0===u?r:i(u,r);c>a;)e[a++]=t;return e}},function(t,e,r){"use strict";var n=r(391),i=r(557)(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(571)("find")},function(t,e,r){"use strict";var n=r(391),i=r(557)(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(571)(o)},function(t,e,r){r(577)("Array")},function(t,e,r){"use strict";var n=r(387),i=r(394),o=r(389),s=r(410)("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(571),i=r(579),o=r(513),s=r(416);t.exports=r(512)(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(387),i=r(471),o=r(394).f,s=r(434).f,a=r(518),u=r(581),c=n.RegExp,f=c,l=c.prototype,h=/a/g,p=/a/g,d=new c(h)!==h;if(r(389)&&(!d||r(390)(function(){return p[r(410)("match")]=!1,c(h)!=h||c(p)==p||"/a/i"!=c(h,"i")}))){c=function(t,e){var r=this instanceof c,n=a(t),o=void 0===e;return!r&&n&&t.constructor===c&&o?t:i(d?new f(n&&!o?t.source:t,e):f((n=t instanceof c)?t.source:t,n&&o?u.call(t):e),r?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,r(401)(n,"RegExp",c)}r(577)("RegExp")},function(t,e,r){"use strict";var n=r(395);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";var n=r(583);r(391)({target:"RegExp",proto:!0,forced:n!==/./.exec},{exec:n})},function(t,e,r){"use strict";var n=r(581),i=RegExp.prototype.exec,o=String.prototype.replace,s=i,a=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),u=void 0!==/()??/.exec("")[1];(a||u)&&(s=function(t){var e,r,s,c,f=this;return u&&(r=new RegExp("^"+f.source+"$(?!\\s)",n.call(f))),a&&(e=f.lastIndex),s=i.call(f,t),a&&s&&(f.lastIndex=f.global?s.index+s[0].length:e),u&&s&&s.length>1&&o.call(s[0],r,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s}),t.exports=s},function(t,e,r){"use strict";r(585);var n=r(395),i=r(581),o=r(389),s=/./.toString,a=function(t){r(401)(RegExp.prototype,"toString",t,!0)};r(390)(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(389)&&"g"!=/./g.flags&&r(394).f(RegExp.prototype,"flags",{configurable:!0,get:r(581)})},function(t,e,r){"use strict";var n=r(395),i=r(421),o=r(587),s=r(588);r(589)("match",1,function(t,e,r,a){return[function(r){var n=t(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},function(t){var e=a(r,t,this);if(e.done)return e.value;var u=n(t),c=String(this);if(!u.global)return s(u,c);var f=u.unicode;u.lastIndex=0;for(var l,h=[],p=0;null!==(l=s(u,c));){var d=String(l[0]);h[p]=d,""===d&&(u.lastIndex=o(c,i(u.lastIndex),f)),p++}return 0===p?null:h}]})},function(t,e,r){"use strict";var n=r(511)(!0);t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){"use strict";var n=r(458),i=RegExp.prototype.exec;t.exports=function(t,e){var r=t.exec;if("function"==typeof r){var o=r.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==n(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,r){"use strict";r(582);var n=r(401),i=r(393),o=r(390),s=r(419),a=r(410),u=r(583),c=a("species"),f=!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();t.exports=function(t,e,r){var h=a(t),p=!o(function(){var e={};return e[h]=function(){return 7},7!=""[t](e)}),d=p?!o(function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[c]=function(){return r}),r[h](""),!e}):void 0;if(!p||!d||"replace"===t&&!f||"split"===t&&!l){var y=/./[h],v=r(s,h,""[t],function(t,e,r,n,i){return e.exec===u?p&&!i?{done:!0,value:y.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),g=v[0],b=v[1];n(String.prototype,t,g),i(RegExp.prototype,h,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},function(t,e,r){"use strict";var n=r(395),i=r(429),o=r(421),s=r(422),a=r(587),u=r(588),c=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g,d=function(t){return void 0===t?t:String(t)};r(589)("replace",2,function(t,e,r,y){return[function(n,i){var o=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},function(t,e){var i=y(r,t,this,e);if(i.done)return i.value;var l=n(t),h=String(this),p="function"==typeof e;p||(e=String(e));var g=l.global;if(g){var b=l.unicode;l.lastIndex=0}for(var m=[];;){var _=u(l,h);if(null===_)break;if(m.push(_),!g)break;""===String(_[0])&&(l.lastIndex=a(h,o(l.lastIndex),b))}for(var w="",E=0,x=0;x<m.length;x++){_=m[x];for(var S=String(_[0]),T=c(f(s(_.index),h.length),0),A=[],k=1;k<_.length;k++)A.push(d(_[k]));var j=_.groups;if(p){var O=[S].concat(A,T,h);void 0!==j&&O.push(j);var C=String(e.apply(void 0,O))}else C=v(S,h,T,A,j,e);T>=E&&(w+=h.slice(E,T)+C,E=T+S.length)}return w+h.slice(E)}];function v(t,e,n,o,s,a){var u=n+t.length,c=o.length,f=p;return void 0!==s&&(s=i(s),f=h),r.call(a,f,function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(u);case"<":a=s[i.slice(1,-1)];break;default:var f=+i;if(0===f)return r;if(f>c){var h=l(f/10);return 0===h?r:h<=c?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):r}a=o[f-1]}return void 0===a?"":a})}})},function(t,e,r){"use strict";var n=r(395),i=r(454),o=r(588);r(589)("search",1,function(t,e,r,s){return[function(r){var n=t(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},function(t){var e=s(r,t,this);if(e.done)return e.value;var a=n(t),u=String(this),c=a.lastIndex;i(c,0)||(a.lastIndex=0);var f=o(a,u);return i(a.lastIndex,c)||(a.lastIndex=c),null===f?-1:f.index}]})},function(t,e,r){"use strict";var n=r(518),i=r(395),o=r(593),s=r(587),a=r(421),u=r(588),c=r(583),f=r(390),l=Math.min,h=[].push,p=!f(function(){RegExp(4294967295,"y")});r(589)("split",2,function(t,e,r,f){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!n(t))return r.call(i,t,e);for(var o,s,a,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,p=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,f+"g");(o=c.call(d,i))&&!((s=d.lastIndex)>l&&(u.push(i.slice(l,o.index)),o.length>1&&o.index<i.length&&h.apply(u,o.slice(1)),a=o[0].length,l=s,u.length>=p));)d.lastIndex===o.index&&d.lastIndex++;return l===i.length?!a&&d.test("")||u.push(""):u.push(i.slice(l)),u.length>p?u.slice(0,p):u}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:r.call(this,t,e)}:r,[function(r,n){var i=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,i,n):d.call(String(i),r,n)},function(t,e){var n=f(d,t,this,e,d!==r);if(n.done)return n.value;var c=i(t),h=String(this),y=o(c,RegExp),v=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(p?"y":"g"),b=new y(p?c:"^(?:"+c.source+")",g),m=void 0===e?4294967295:e>>>0;if(0===m)return[];if(0===h.length)return null===u(b,h)?[h]:[];for(var _=0,w=0,E=[];w<h.length;){b.lastIndex=p?w:0;var x,S=u(b,p?h:h.slice(w));if(null===S||(x=l(a(b.lastIndex+(p?0:w)),h.length))===_)w=s(h,w,v);else{if(E.push(h.slice(_,w)),E.length===m)return E;for(var T=1;T<=S.length-1;T++)if(E.push(S[T]),E.length===m)return E;w=_=x}}return E.push(h.slice(_)),E}]})},function(t,e,r){var n=r(395),i=r(407),o=r(410)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||void 0==(r=n(s)[o])?e:i(r)}},function(t,e,r){"use strict";var n,i,o,s,a=r(405),u=r(387),c=r(406),f=r(458),l=r(391),h=r(396),p=r(407),d=r(595),y=r(596),v=r(593),g=r(597).set,b=r(598)(),m=r(599),_=r(600),w=r(601),E=r(602),x=u.TypeError,S=u.process,T=S&&S.versions,A=T&&T.v8||"",k=u.Promise,j="process"==f(S),O=function(){},C=i=m.f,R=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[r(410)("species")]=function(t){t(O,O)};return(j||"function"==typeof PromiseRejectionEvent)&&t.then(O)instanceof e&&0!==A.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},P=function(t,e){if(!t._n){t._n=!0;var r=t._c;b(function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{a?(i||(2==t._h&&M(t),t._h=1),!0===a?r=n:(f&&f.enter(),r=a(n),f&&(f.exit(),s=!0)),r===e.promise?c(x("Promise-chain cycle")):(o=I(r))?o.call(r,u,c):u(r)):c(n)}catch(t){f&&!s&&f.exit(),c(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&B(t)})}},B=function(t){g.call(u,function(){var e,r,n,i=t._v,o=F(t);if(o&&(e=_(function(){j?S.emit("unhandledRejection",i,t):(r=u.onunhandledrejection)?r({promise:t,reason:i}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=j||F(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){g.call(u,function(){var e;j?S.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=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()),P(e,!0))},N=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw x("Promise can't be resolved itself");(e=I(t))?b(function(){var n={_w:r,_d:!1};try{e.call(t,c(N,n,1),c(L,n,1))}catch(t){L.call(n,t)}}):(r._v=t,r._s=1,P(r,!1))}catch(t){L.call({_w:r,_d:!1},t)}}};R||(k=function(t){d(this,k,"Promise","_h"),p(t),n.call(this);try{t(c(N,this,1),c(L,this,1))}catch(t){L.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(603)(k.prototype,{then:function(t,e){var r=C(v(this,k));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=j?S.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&P(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=c(N,t,1),this.reject=c(L,t,1)},m.f=C=function(t){return t===k||t===s?new o(t):i(t)}),l(l.G+l.W+l.F*!R,{Promise:k}),r(409)(k,"Promise"),r(577)("Promise"),s=r(392).Promise,l(l.S+l.F*!R,"Promise",{reject:function(t){var e=C(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(a||!R),"Promise",{resolve:function(t){return E(a&&this===s?k:this,t)}}),l(l.S+l.F*!(R&&r(550)(function(t){k.all(t).catch(O)})),"Promise",{all:function(t){var e=this,r=C(e),n=r.resolve,i=r.reject,o=_(function(){var r=[],o=0,s=1;y(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.e&&i(o.v),r.promise},race:function(t){var e=this,r=C(e),n=r.reject,i=_(function(){y(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),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(406),i=r(546),o=r(547),s=r(395),a=r(421),u=r(549),c={},f={};(e=t.exports=function(t,e,r,l,h){var p,d,y,v,g=h?function(){return t}:u(t),b=n(r,l,e?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>m;m++)if((v=e?b(s(d=t[m])[0],d[1]):b(t[m]))===c||v===f)return v}else for(y=g.call(t);!(d=y.next()).done;)if((v=i(y,b,d.value,e))===c||v===f)return v}).BREAK=c,e.RETURN=f},function(t,e,r){var n,i,o,s=r(406),a=r(461),u=r(432),c=r(398),f=r(387),l=f.process,h=f.setImmediate,p=f.clearImmediate,d=f.MessageChannel,y=f.Dispatch,v=0,g={},b=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},m=function(t){b.call(t.data)};h&&p||(h=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return g[++v]=function(){a("function"==typeof t?t:Function(t),e)},n(v),v},p=function(t){delete g[t]},"process"==r(418)(l)?n=function(t){l.nextTick(s(b,t,1))}:y&&y.now?n=function(t){y.now(s(b,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=m,n=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",m,!1)):n="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:h,clear:p}},function(t,e,r){var n=r(387),i=r(597).set,o=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,u="process"==r(418)(s);t.exports=function(){var t,e,r,c=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(c)};else if(!o||n.navigator&&n.navigator.standalone)if(a&&a.resolve){var f=a.resolve(void 0);r=function(){f.then(c)}}else r=function(){i.call(n,c)};else{var l=!0,h=document.createTextNode("");new o(c).observe(h,{characterData:!0}),r=function(){h.data=l=!l}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e,r){"use strict";var n=r(407);t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,r){var n=r(387).navigator;t.exports=n&&n.userAgent||""},function(t,e,r){var n=r(395),i=r(396),o=r(599);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(401);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(605),i=r(606);t.exports=r(607)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=n.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return n.def(i(this,"Map"),0===t?0:t,e)}},n,!0)},function(t,e,r){"use strict";var n=r(394).f,i=r(430),o=r(603),s=r(406),a=r(595),u=r(596),c=r(512),f=r(579),l=r(577),h=r(389),p=r(408).fastKey,d=r(606),y=h?"_s":"size",v=function(t,e){var r,n=p(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 f=t(function(t,n){a(t,f,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=n&&u(n,r,t[c],t)});return o(f.prototype,{clear:function(){for(var t=d(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var r=d(this,e),n=v(r,t);if(n){var i=n.n,o=n.p;delete r._i[n.i],n.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==n&&(r._f=i),r._l==n&&(r._l=o),r[y]--}return!!n},forEach:function(t){d(this,e);for(var r,n=s(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!v(d(this,e),t)}}),h&&n(f.prototype,"size",{get:function(){return d(this,e)[y]}}),f},def:function(t,e,r){var n,i,o=v(t,e);return o?o.v=r:(t._l=o={i:i=p(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[y]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,r){c(t,e,function(t,r){this._t=d(t,e),this._k=r,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)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))},r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){var n=r(396);t.exports=function(t,e){if(!n(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,r){"use strict";var n=r(387),i=r(391),o=r(401),s=r(603),a=r(408),u=r(596),c=r(595),f=r(396),l=r(390),h=r(550),p=r(409),d=r(471);t.exports=function(t,e,r,y,v,g){var b=n[t],m=b,_=v?"set":"add",w=m&&m.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,r){return e.call(this,0===t?0:t,r),this})};if("function"==typeof m&&(g||w.forEach&&!l(function(){(new m).entries().next()}))){var S=new m,T=S[_](g?{}:-0,1)!=S,A=l(function(){S.has(1)}),k=h(function(t){new m(t)}),j=!g&&l(function(){for(var t=new m,e=5;e--;)t[_](e,e);return!t.has(-0)});k||((m=e(function(e,r){c(e,m,t);var n=d(new b,e,m);return void 0!=r&&u(r,v,n[_],n),n})).prototype=w,w.constructor=m),(A||j)&&(x("delete"),x("has"),v&&x("get")),(j||T)&&x(_),g&&w.clear&&delete w.clear}else m=y.getConstructor(e,t,v,_),s(m.prototype,r),a.NEED=!0;return p(m,t),E[t]=m,i(i.G+i.W+i.F*(m!=b),E),g||y.setStrong(m,t,v),m}},function(t,e,r){"use strict";var n=r(605),i=r(606);t.exports=r(607)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(i(this,"Set"),t=0===t?0:t,t)}},n)},function(t,e,r){"use strict";var n,i=r(387),o=r(557)(0),s=r(401),a=r(408),u=r(452),c=r(610),f=r(396),l=r(606),h=r(606),p=!i.ActiveXObject&&"ActiveXObject"in i,d=a.getWeak,y=Object.isExtensible,v=c.ufstore,g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(t){if(f(t)){var e=d(t);return!0===e?v(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},m=t.exports=r(607)("WeakMap",g,b,c,!0,!0);h&&p&&(u((n=c.getConstructor(g,"WeakMap")).prototype,b),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=m.prototype,r=e[t];s(e,t,function(e,i){if(f(e)&&!y(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(603),i=r(408).getWeak,o=r(395),s=r(396),a=r(595),u=r(596),c=r(557),f=r(388),l=r(606),h=c(5),p=c(6),d=0,y=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},g=function(t,e){return h(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var r=g(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=p(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 c=t(function(t,n){a(t,c,e,"_i"),t._t=e,t._i=d++,t._l=void 0,void 0!=n&&u(n,r,t[o],t)});return n(c.prototype,{delete:function(t){if(!s(t))return!1;var r=i(t);return!0===r?y(l(this,e)).delete(t):r&&f(r,this._i)&&delete r[this._i]},has:function(t){if(!s(t))return!1;var r=i(t);return!0===r?y(l(this,e)).has(t):r&&f(r,this._i)}}),c},def:function(t,e,r){var n=i(o(e),!0);return!0===n?y(t).set(e,r):n[t._i]=r,t},ufstore:y}},function(t,e,r){"use strict";var n=r(610),i=r(606);r(607)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(i(this,"WeakSet"),t,!0)}},n,!1,!0)},function(t,e,r){"use strict";var n=r(391),i=r(613),o=r(614),s=r(395),a=r(423),u=r(421),c=r(396),f=r(387).ArrayBuffer,l=r(593),h=o.ArrayBuffer,p=o.DataView,d=i.ABV&&f.isView,y=h.prototype.slice,v=i.VIEW;n(n.G+n.W+n.F*(f!==h),{ArrayBuffer:h}),n(n.S+n.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||c(t)&&v in t}}),n(n.P+n.U+n.F*r(390)(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 r=s(this).byteLength,n=a(t,r),i=a(void 0===e?r:e,r),o=new(l(this,h))(u(i-n)),c=new p(this),f=new p(o),d=0;n<i;)f.setUint8(d++,c.getUint8(n++));return o}}),r(577)("ArrayBuffer")},function(t,e,r){for(var n,i=r(387),o=r(393),s=r(402),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;)(n=i[h[l++]])?(o(n.prototype,a,!0),o(n.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:a,VIEW:u}},function(t,e,r){"use strict";var n=r(387),i=r(389),o=r(405),s=r(613),a=r(393),u=r(603),c=r(390),f=r(595),l=r(422),h=r(421),p=r(615),d=r(434).f,y=r(394).f,v=r(573),g=r(409),b="prototype",m="Wrong index!",_=n.ArrayBuffer,w=n.DataView,E=n.Math,x=n.RangeError,S=n.Infinity,T=_,A=E.abs,k=E.pow,j=E.floor,O=E.log,C=E.LN2,R=i?"_b":"buffer",I=i?"_l":"byteLength",P=i?"_o":"byteOffset";function B(t,e,r){var n,i,o,s=new Array(r),a=8*r-e-1,u=(1<<a)-1,c=u>>1,f=23===e?k(2,-24)-k(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=A(t))!=t||t===S?(i=t!=t?1:0,n=u):(n=j(O(t)/C),t*(o=k(2,-n))<1&&(n--,o*=2),(t+=n+c>=1?f/o:f*k(2,1-c))*o>=2&&(n++,o/=2),n+c>=u?(i=0,n=u):n+c>=1?(i=(t*o-1)*k(2,e),n+=c):(i=t*k(2,c-1)*k(2,e),n=0));e>=8;s[l++]=255&i,i/=256,e-=8);for(n=n<<e|i,a+=e;a>0;s[l++]=255&n,n/=256,a-=8);return s[--l]|=128*h,s}function F(t,e,r){var n,i=8*r-e-1,o=(1<<i)-1,s=o>>1,a=i-7,u=r-1,c=t[u--],f=127&c;for(c>>=7;a>0;f=256*f+t[u],u--,a-=8);for(n=f&(1<<-a)-1,f>>=-a,a+=e;a>0;n=256*n+t[u],u--,a-=8);if(0===f)f=1-s;else{if(f===o)return n?NaN:c?-S:S;n+=k(2,e),f-=s}return(c?-1:1)*n*k(2,f-e)}function M(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function L(t){return[255&t]}function N(t){return[255&t,t>>8&255]}function D(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function U(t){return B(t,52,8)}function q(t){return B(t,23,4)}function V(t,e,r){y(t[b],e,{get:function(){return this[r]}})}function W(t,e,r,n){var i=p(+r);if(i+e>t[I])throw x(m);var o=t[R]._b,s=i+t[P],a=o.slice(s,s+e);return n?a:a.reverse()}function z(t,e,r,n,i,o){var s=p(+r);if(s+e>t[I])throw x(m);for(var a=t[R]._b,u=s+t[P],c=n(+i),f=0;f<e;f++)a[u+f]=c[o?f:e-f-1]}if(s.ABV){if(!c(function(){_(1)})||!c(function(){new _(-1)})||c(function(){return new _,new _(1.5),new _(NaN),"ArrayBuffer"!=_.name})){for(var H,G=(_=function(t){return f(this,_),new T(p(t))})[b]=T[b],X=d(T),Y=0;X.length>Y;)(H=X[Y++])in _||a(_,H,T[H]);o||(G.constructor=_)}var J=new w(new _(2)),$=w[b].setInt8;J.setInt8(0,2147483648),J.setInt8(1,2147483649),!J.getInt8(0)&&J.getInt8(1)||u(w[b],{setInt8:function(t,e){$.call(this,t,e<<24>>24)},setUint8:function(t,e){$.call(this,t,e<<24>>24)}},!0)}else _=function(t){f(this,_,"ArrayBuffer");var e=p(t);this._b=v.call(new Array(e),0),this[I]=e},w=function(t,e,r){f(this,w,"DataView"),f(t,_,"DataView");var n=t[I],i=l(e);if(i<0||i>n)throw x("Wrong offset!");if(i+(r=void 0===r?n-i:h(r))>n)throw x("Wrong length!");this[R]=t,this[P]=i,this[I]=r},i&&(V(_,"byteLength","_l"),V(w,"buffer","_b"),V(w,"byteLength","_l"),V(w,"byteOffset","_o")),u(w[b],{getInt8:function(t){return W(this,1,t)[0]<<24>>24},getUint8:function(t){return W(this,1,t)[0]},getInt16:function(t){var e=W(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=W(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return M(W(this,4,t,arguments[1]))},getUint32:function(t){return M(W(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return F(W(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return F(W(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){z(this,1,t,L,e)},setUint8:function(t,e){z(this,1,t,L,e)},setInt16:function(t,e){z(this,2,t,N,e,arguments[2])},setUint16:function(t,e){z(this,2,t,N,e,arguments[2])},setInt32:function(t,e){z(this,4,t,D,e,arguments[2])},setUint32:function(t,e){z(this,4,t,D,e,arguments[2])},setFloat32:function(t,e){z(this,4,t,q,e,arguments[2])},setFloat64:function(t,e){z(this,8,t,U,e,arguments[2])}});g(_,"ArrayBuffer"),g(w,"DataView"),a(w[b],s.VIEW,!0),e.ArrayBuffer=_,e.DataView=w},function(t,e,r){var n=r(422),i=r(421);t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=i(e);if(e!==r)throw RangeError("Wrong length!");return r}},function(t,e,r){var n=r(391);n(n.G+n.W+n.F*!r(613).ABV,{DataView:r(614).DataView})},function(t,e,r){r(618)("Int8",1,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){"use strict";if(r(389)){var n=r(405),i=r(387),o=r(390),s=r(391),a=r(613),u=r(614),c=r(406),f=r(595),l=r(400),h=r(393),p=r(603),d=r(422),y=r(421),v=r(615),g=r(423),b=r(399),m=r(388),_=r(458),w=r(396),E=r(429),x=r(547),S=r(430),T=r(442),A=r(434).f,k=r(549),j=r(402),O=r(410),C=r(557),R=r(420),I=r(593),P=r(578),B=r(513),F=r(550),M=r(577),L=r(573),N=r(570),D=r(394),U=r(435),q=D.f,V=U.f,W=i.RangeError,z=i.TypeError,H=i.Uint8Array,G=Array.prototype,X=u.ArrayBuffer,Y=u.DataView,J=C(0),$=C(2),K=C(3),Z=C(4),Q=C(5),tt=C(6),et=R(!0),rt=R(!1),nt=P.values,it=P.keys,ot=P.entries,st=G.lastIndexOf,at=G.reduce,ut=G.reduceRight,ct=G.join,ft=G.sort,lt=G.slice,ht=G.toString,pt=G.toLocaleString,dt=O("iterator"),yt=O("toStringTag"),vt=j("typed_constructor"),gt=j("def_constructor"),bt=a.CONSTR,mt=a.TYPED,_t=a.VIEW,wt=C(1,function(t,e){return At(I(t,t[gt]),e)}),Et=o(function(){return 1===new H(new Uint16Array([1]).buffer)[0]}),xt=!!H&&!!H.prototype.set&&o(function(){new H(1).set({})}),St=function(t,e){var r=d(t);if(r<0||r%e)throw W("Wrong offset!");return r},Tt=function(t){if(w(t)&&mt in t)return t;throw z(t+" is not a typed array!")},At=function(t,e){if(!(w(t)&&vt in t))throw z("It is not a typed array constructor!");return new t(e)},kt=function(t,e){return jt(I(t,t[gt]),e)},jt=function(t,e){for(var r=0,n=e.length,i=At(t,n);n>r;)i[r]=e[r++];return i},Ot=function(t,e,r){q(t,e,{get:function(){return this._d[r]}})},Ct=function(t){var e,r,n,i,o,s,a=E(t),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,h=k(a);if(void 0!=h&&!x(h)){for(s=h.call(a),n=[],e=0;!(o=s.next()).done;e++)n.push(o.value);a=n}for(l&&u>2&&(f=c(f,arguments[2],2)),e=0,r=y(a.length),i=At(this,r);r>e;e++)i[e]=l?f(a[e],e):a[e];return i},Rt=function(){for(var t=0,e=arguments.length,r=At(this,e);e>t;)r[t]=arguments[t++];return r},It=!!H&&o(function(){pt.call(new H(1))}),Pt=function(){return pt.apply(It?lt.call(Tt(this)):Tt(this),arguments)},Bt={copyWithin:function(t,e){return N.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Tt(this),arguments)},filter:function(t){return kt(this,$(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return rt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Tt(this),arguments)},lastIndexOf:function(t){return st.apply(Tt(this),arguments)},map:function(t){return wt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return at.apply(Tt(this),arguments)},reduceRight:function(t){return ut.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(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(Tt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ft.call(Tt(this),t)},subarray:function(t,e){var r=Tt(this),n=r.length,i=g(t,n);return new(I(r,r[gt]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,y((void 0===e?n:g(e,n))-i))}},Ft=function(t,e){return kt(this,lt.call(Tt(this),t,e))},Mt=function(t){Tt(this);var e=St(arguments[1],1),r=this.length,n=E(t),i=y(n.length),o=0;if(i+e>r)throw W("Wrong length!");for(;o<i;)this[e+o]=n[o++]},Lt={entries:function(){return ot.call(Tt(this))},keys:function(){return it.call(Tt(this))},values:function(){return nt.call(Tt(this))}},Nt=function(t,e){return w(t)&&t[mt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Dt=function(t,e){return Nt(t,e=b(e,!0))?l(2,t[e]):V(t,e)},Ut=function(t,e,r){return!(Nt(t,e=b(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)};bt||(U.f=Dt,D.f=Ut),s(s.S+s.F*!bt,"Object",{getOwnPropertyDescriptor:Dt,defineProperty:Ut}),o(function(){ht.call({})})&&(ht=pt=function(){return ct.call(this)});var qt=p({},Bt);p(qt,Lt),h(qt,dt,Lt.values),p(qt,{slice:Ft,set:Mt,constructor:function(){},toString:ht,toLocaleString:Pt}),Ot(qt,"buffer","b"),Ot(qt,"byteOffset","o"),Ot(qt,"byteLength","l"),Ot(qt,"length","e"),q(qt,yt,{get:function(){return this[mt]}}),t.exports=function(t,e,r,u){var c=t+((u=!!u)?"Clamped":"")+"Array",l="get"+t,p="set"+t,d=i[c],g=d||{},b=d&&T(d),m=!d||!a.ABV,E={},x=d&&d.prototype,k=function(t,r){q(t,r,{get:function(){return function(t,r){var n=t._d;return n.v[l](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[p](r*e+i.o,n,Et)}(this,r,t)},enumerable:!0})};m?(d=r(function(t,r,n,i){f(t,d,c,"_d");var o,s,a,u,l=0,p=0;if(w(r)){if(!(r instanceof X||"ArrayBuffer"==(u=_(r))||"SharedArrayBuffer"==u))return mt in r?jt(d,r):Ct.call(d,r);o=r,p=St(n,e);var g=r.byteLength;if(void 0===i){if(g%e)throw W("Wrong length!");if((s=g-p)<0)throw W("Wrong length!")}else if((s=y(i)*e)+p>g)throw W("Wrong length!");a=s/e}else a=v(r),o=new X(s=a*e);for(h(t,"_d",{b:o,o:p,l:s,e:a,v:new Y(o)});l<a;)k(t,l++)}),x=d.prototype=S(qt),h(x,"constructor",d)):o(function(){d(1)})&&o(function(){new d(-1)})&&F(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=r(function(t,r,n,i){var o;return f(t,d,c),w(r)?r instanceof X||"ArrayBuffer"==(o=_(r))||"SharedArrayBuffer"==o?void 0!==i?new g(r,St(n,e),i):void 0!==n?new g(r,St(n,e)):new g(r):mt in r?jt(d,r):Ct.call(d,r):new g(v(r))}),J(b!==Function.prototype?A(g).concat(A(b)):A(g),function(t){t in d||h(d,t,g[t])}),d.prototype=x,n||(x.constructor=d));var j=x[dt],O=!!j&&("values"==j.name||void 0==j.name),C=Lt.values;h(d,vt,!0),h(x,mt,c),h(x,_t,!0),h(x,gt,d),(u?new d(1)[yt]==c:yt in x)||q(x,yt,{get:function(){return c}}),E[c]=d,s(s.G+s.W+s.F*(d!=g),E),s(s.S,c,{BYTES_PER_ELEMENT:e}),s(s.S+s.F*o(function(){g.of.call(d,1)}),c,{from:Ct,of:Rt}),"BYTES_PER_ELEMENT"in x||h(x,"BYTES_PER_ELEMENT",e),s(s.P,c,Bt),M(c),s(s.P+s.F*xt,c,{set:Mt}),s(s.P+s.F*!O,c,Lt),n||x.toString==ht||(x.toString=ht),s(s.P+s.F*o(function(){new d(1).slice()}),c,{slice:Ft}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!o(function(){x.toLocaleString.call([1,2])})),c,{toLocaleString:Pt}),B[c]=O?j:C,n||O||h(x,dt,C)}}else t.exports=function(){}},function(t,e,r){r(618)("Uint8",1,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(618)("Uint8",1,function(t){return function(e,r,n){return t(this,e,r,n)}},!0)},function(t,e,r){r(618)("Int16",2,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(618)("Uint16",2,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(618)("Int32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(618)("Uint32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(618)("Float32",4,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(618)("Float64",8,function(t){return function(e,r,n){return t(this,e,r,n)}})},function(t,e,r){var n=r(391),i=r(407),o=r(395),s=(r(387).Reflect||{}).apply,a=Function.apply;n(n.S+n.F*!r(390)(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(391),i=r(430),o=r(407),s=r(395),a=r(396),u=r(390),c=r(460),f=(r(387).Reflect||{}).construct,l=u(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),h=!u(function(){f(function(){})});n(n.S+n.F*(l||h),"Reflect",{construct:function(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(h&&!l)return f(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(c.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(394),i=r(391),o=r(395),s=r(399);i(i.S+i.F*r(390)(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(391),i=r(435).f,o=r(395);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(391),i=r(395),o=function(t){this._t=i(t),this._i=0;var e,r=this._k=[];for(e in t)r.push(e)};r(514)(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(435),i=r(442),o=r(388),s=r(391),a=r(396),u=r(395);s(s.S,"Reflect",{get:function t(e,r){var s,c,f=arguments.length<3?e:arguments[2];return u(e)===f?e[r]:(s=n.f(e,r))?o(s,"value")?s.value:void 0!==s.get?s.get.call(f):void 0:a(c=i(e))?t(c,r,f):void 0}})},function(t,e,r){var n=r(435),i=r(391),o=r(395);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return n.f(o(t),e)}})},function(t,e,r){var n=r(391),i=r(442),o=r(395);n(n.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,r){var n=r(391);n(n.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,r){var n=r(391),i=r(395),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,r){var n=r(391);n(n.S,"Reflect",{ownKeys:r(638)})},function(t,e,r){var n=r(434),i=r(426),o=r(395),s=r(387).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(391),i=r(395),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(394),i=r(435),o=r(442),s=r(388),a=r(391),u=r(400),c=r(395),f=r(396);a(a.S,"Reflect",{set:function t(e,r,a){var l,h,p=arguments.length<4?e:arguments[3],d=i.f(c(e),r);if(!d){if(f(h=o(e)))return t(h,r,a,p);d=u(0)}if(s(d,"value")){if(!1===d.writable||!f(p))return!1;if(l=i.f(p,r)){if(l.get||l.set||!1===l.writable)return!1;l.value=a,n.f(p,r,l)}else n.f(p,r,u(0,a));return!0}return void 0!==d.set&&(d.set.call(p,a),!0)}})},function(t,e,r){var n=r(391),i=r(456);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(391),i=r(420)(!0);n(n.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(571)("includes")},function(t,e,r){"use strict";var n=r(391),i=r(644),o=r(429),s=r(421),a=r(407),u=r(558);n(n.P,"Array",{flatMap:function(t){var e,r,n=o(this);return a(t),e=s(n.length),r=u(n,0),i(r,n,n,e,0,1,t,arguments[1]),r}}),r(571)("flatMap")},function(t,e,r){"use strict";var n=r(428),i=r(396),o=r(421),s=r(406),a=r(410)("isConcatSpreadable");t.exports=function t(e,r,u,c,f,l,h,p){for(var d,y,v=f,g=0,b=!!h&&s(h,p,3);g<c;){if(g in u){if(d=b?b(u[g],g,r):u[g],y=!1,i(d)&&(y=void 0!==(y=d[a])?!!y:n(d)),y&&l>0)v=t(e,r,d,o(d.length),v,l-1)-1;else{if(v>=9007199254740991)throw TypeError();e[v]=d}v++}g++}return v}},function(t,e,r){"use strict";var n=r(391),i=r(644),o=r(429),s=r(421),a=r(422),u=r(558);n(n.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),r=s(e.length),n=u(e,0);return i(n,e,e,r,0,void 0===t?1:a(t)),n}}),r(571)("flatten")},function(t,e,r){"use strict";var n=r(391),i=r(511)(!0),o=r(390)(function(){return"𠮷"!=="𠮷".at(0)});n(n.P+n.F*o,"String",{at:function(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(391),i=r(648),o=r(601),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);n(n.P+n.F*s,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,r){var n=r(421),i=r(474),o=r(419);t.exports=function(t,e,r,s){var a=String(o(t)),u=a.length,c=void 0===r?" ":String(r),f=n(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,r){"use strict";var n=r(391),i=r(648),o=r(601),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);n(n.P+n.F*s,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,r){"use strict";r(466)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,r){"use strict";r(466)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,r){"use strict";var n=r(391),i=r(419),o=r(421),s=r(518),a=r(581),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};r(514)(c,"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 c(n,e)}})},function(t,e,r){r(412)("asyncIterator")},function(t,e,r){r(412)("observable")},function(t,e,r){var n=r(391),i=r(638),o=r(416),s=r(435),a=r(548);n(n.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r,n=o(t),u=s.f,c=i(n),f={},l=0;c.length>l;)void 0!==(r=u(n,e=c[l++]))&&a(f,e,r);return f}})},function(t,e,r){var n=r(391),i=r(657)(!1);n(n.S,"Object",{values:function(t){return i(t)}})},function(t,e,r){var n=r(389),i=r(414),o=r(416),s=r(427).f;t.exports=function(t){return function(e){for(var r,a=o(e),u=i(a),c=u.length,f=0,l=[];c>f;)r=u[f++],n&&!s.call(a,r)||l.push(t?[r,a[r]]:a[r]);return l}}},function(t,e,r){var n=r(391),i=r(657)(!0);n(n.S,"Object",{entries:function(t){return i(t)}})},function(t,e,r){"use strict";var n=r(391),i=r(429),o=r(407),s=r(394);r(389)&&n(n.P+r(660),"Object",{__defineGetter__:function(t,e){s.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,r){"use strict";t.exports=r(405)||!r(390)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(387)[t]})},function(t,e,r){"use strict";var n=r(391),i=r(429),o=r(407),s=r(394);r(389)&&n(n.P+r(660),"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(391),i=r(429),o=r(399),s=r(442),a=r(435).f;r(389)&&n(n.P+r(660),"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(391),i=r(429),o=r(399),s=r(442),a=r(435).f;r(389)&&n(n.P+r(660),"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(391);n(n.P+n.R,"Map",{toJSON:r(665)("Map")})},function(t,e,r){var n=r(458),i=r(666);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(596);t.exports=function(t,e){var r=[];return n(t,!1,r.push,r,e),r}},function(t,e,r){var n=r(391);n(n.P+n.R,"Set",{toJSON:r(665)("Set")})},function(t,e,r){r(669)("Map")},function(t,e,r){"use strict";var n=r(391);t.exports=function(t){n(n.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,r){r(669)("Set")},function(t,e,r){r(669)("WeakMap")},function(t,e,r){r(669)("WeakSet")},function(t,e,r){r(674)("Map")},function(t,e,r){"use strict";var n=r(391),i=r(407),o=r(406),s=r(596);t.exports=function(t){n(n.S,t,{from:function(t){var e,r,n,a,u=arguments[1];return i(this),(e=void 0!==u)&&i(u),void 0==t?new this:(r=[],e?(n=0,a=o(u,arguments[2],2),s(t,!1,function(t){r.push(a(t,n++))})):s(t,!1,r.push,r),new this(r))}})}},function(t,e,r){r(674)("Set")},function(t,e,r){r(674)("WeakMap")},function(t,e,r){r(674)("WeakSet")},function(t,e,r){var n=r(391);n(n.G,{global:r(387)})},function(t,e,r){var n=r(391);n(n.S,"System",{global:r(387)})},function(t,e,r){var n=r(391),i=r(418);n(n.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,r){var n=r(391);n(n.S,"Math",{clamp:function(t,e,r){return Math.min(r,Math.max(e,t))}})},function(t,e,r){var n=r(391);n(n.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,r){var n=r(391),i=180/Math.PI;n(n.S,"Math",{degrees:function(t){return t*i}})},function(t,e,r){var n=r(391),i=r(685),o=r(497);n(n.S,"Math",{fscale:function(t,e,r,n,s){return o(i(t,e,r,n,s))}})},function(t,e){t.exports=Math.scale||function(t,e,r,n,i){return 0===arguments.length||t!=t||e!=e||r!=r||n!=n||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-n)/(r-e)+n}},function(t,e,r){var n=r(391);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(391);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(391);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(391);n(n.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,r){var n=r(391),i=Math.PI/180;n(n.S,"Math",{radians:function(t){return t*i}})},function(t,e,r){var n=r(391);n(n.S,"Math",{scale:r(685)})},function(t,e,r){var n=r(391);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(391);n(n.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,r){"use strict";var n=r(391),i=r(392),o=r(387),s=r(593),a=r(602);n(n.P+n.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return a(e,t()).then(function(){return r})}:t,r?function(r){return a(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){"use strict";var n=r(391),i=r(599),o=r(600);n(n.S,"Promise",{try:function(t){var e=i.f(this),r=o(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){var n=r(697),i=r(395),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(604),i=r(391),o=r(404)("metadata"),s=o.store||(o.store=new(r(609))),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(697),i=r(395),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(697),i=r(395),o=r(442),s=n.has,a=n.get,u=n.key,c=function(t,e,r){if(s(t,e,r))return a(t,e,r);var n=o(e);return null!==n?c(t,n,r):void 0};n.exp({getMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,r){var n=r(608),i=r(666),o=r(697),s=r(395),a=r(442),u=o.keys,c=o.key,f=function(t,e){var r=u(t,e),o=a(t);if(null===o)return r;var s=f(o,e);return s.length?r.length?i(new n(r.concat(s))):s:r};o.exp({getMetadataKeys:function(t){return f(s(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,r){var n=r(697),i=r(395),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(697),i=r(395),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(697),i=r(395),o=r(442),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(697),i=r(395),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(697),i=r(395),o=r(407),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(391),i=r(598)(),o=r(387).process,s="process"==r(418)(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(391),i=r(387),o=r(392),s=r(598)(),a=r(410)("observable"),u=r(407),c=r(395),f=r(595),l=r(603),h=r(393),p=r(596),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},b=function(t){g(t)||(t._o=void 0,v(t))},m=function(t,e){c(t),this._c=void 0,this._o=t,t=new _(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)&&v(this)};m.prototype=l({},{unsubscribe:function(){b(this)}});var _=function(t){this._s=t};_.prototype=l({},{next:function(t){var e=this._s;if(!g(e)){var r=e._o;try{var n=y(r.next);if(n)return n.call(r,t)}catch(t){try{b(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=y(r.error);if(!n)throw t;t=n.call(r,t)}catch(t){try{v(e)}finally{throw t}}return v(e),t},complete:function(t){var e=this._s;if(!g(e)){var r=e._o;e._o=void 0;try{var n=y(r.complete);t=n?n.call(r,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 m(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})})}}),l(w,{from:function(t){var e="function"==typeof this?this:w,r=y(c(t)[a]);if(r){var n=c(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=new 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}})}}),h(w.prototype,a,function(){return this}),n(n.G,{Observable:w}),r(577)("Observable")},function(t,e,r){var n=r(387),i=r(391),o=r(601),s=[].slice,a=/MSIE .\./.test(o),u=function(t){return function(e,r){var n=arguments.length>2,i=!!n&&s.call(arguments,2);return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,r)}};i(i.G+i.B+i.F*a,{setTimeout:u(n.setTimeout),setInterval:u(n.setInterval)})},function(t,e,r){var n=r(391),i=r(597);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,r){for(var n=r(578),i=r(414),o=r(401),s=r(387),a=r(393),u=r(513),c=r(410),f=c("iterator"),l=c("toStringTag"),h=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(p),y=0;y<d.length;y++){var v,g=d[y],b=p[g],m=s[g],_=m&&m.prototype;if(_&&(_[f]||a(_,f,h),_[l]||a(_,l,g),u[g]=h,b))for(v in n)_[v]||o(_,v,n[v],!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",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,b=g&&g(g(R([])));b&&b!==n&&i.call(b,s)&&(v=b);var m=S.prototype=E.prototype=Object.create(v);x.prototype=m.constructor=S,S.constructor=x,S[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,S):(t.__proto__=S,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(m),t},f.awrap=function(t){return{__await:t}},T(A.prototype),A.prototype[a]=function(){return this},f.AsyncIterator=A,f.async=function(t,e,r,n){var i=new A(_(t,e,r,n));return f.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},T(m),m[u]="Generator",m[s]=function(){return this},m.toString=function(){return"[object Generator]"},f.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}},f.values=R,C.prototype={constructor:C,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"),c=i.call(s,"finallyLoc");if(u&&c){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(!c)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,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 r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),y}},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:R(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}}}function _(t,e,r,n){var i=e&&e.prototype instanceof E?e:E,o=Object.create(i.prototype),s=new C(n||[]);return o._invoke=function(t,e,r){var n=l;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return I()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=k(s,r);if(a){if(a===y)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)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:h,u.arg===y)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 x(){}function S(){}function T(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function A(t){function r(e,n,o,s){var a=w(t[e],t,n);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){r("next",t,o,s)},function(t){r("throw",t,o,s)}):Promise.resolve(c).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 k(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,k(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(n,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=r),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 R(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:I}}function I(){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(713),t.exports=r(392).RegExp.escape},function(t,e,r){var n=r(391),i=r(714)(/[\\^$*+?.()|[\]{}]/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)}}},,function(t,e,r,n){"use strict";var i=r(n).Buffer,o=i.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 s(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&&(i.isEncoding===o||!o(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=f,e=4;break;case"utf8":this.fillLast=u,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function u(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 c(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 l(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 p(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=s,s.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||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},s.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(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)},s.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}}]));
|