webpackJsonp([1],[function(e,t,n){e.exports=n(251)},,,,,function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(274),i=r(o),a=n(272),s=r(a),u=n(89),c=r(u);t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,c["default"])(t)));e.prototype=(0,s["default"])(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i["default"]?(0,i["default"])(e,t):e.__proto__=t)}},function(e,t){var n=e.exports={version:"2.2.1"};"number"==typeof __e&&(__e=n)},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(89),i=r(o);t["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,i["default"])(t))&&"function"!=typeof t?e:t}},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(145),i=r(o);t["default"]=function(){function e(e,t){for(var n=0;n=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function s(){var e;try{e=t.storage.debug}catch(n){}return e}function u(){try{return window.localStorage}catch(e){}}t=e.exports=n(328),t.log=i,t.formatArgs=o,t.save=a,t.load=s,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(s())},,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(62),i=r(o);t["default"]=i["default"]||function(e){for(var t=1;t0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),r=e.shift();t.call(n,r)}else t._settlePromises()}},o.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},o.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},o.prototype._reset=function(){this._isTickUsed=!1},n.exports=o,n.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o=!1,i=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(i,i,null,this,e)},s=function(e,t){0===(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(i){o||(o=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var c=n(i),l=new e(t);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof e){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(t,a,void 0,l,p),c._then(s,u,void 0,l,p),l._setOnCancel(c)}else l._resolveCallback(f);return l},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";function r(){try{Promise===i&&(Promise=o)}catch(e){}return i}var o;"undefined"!=typeof Promise&&(o=Promise);var i=e("./promise")();i.noConflict=r,t.exports=i},{"./promise":22}],5:[function(e,t,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 n(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var o="Object "+s.classString(e)+" has no method '"+s.toString(n)+"'";throw new t.TypeError(o)}return r}function r(e){var t=this.pop(),r=n(e,t);return r.apply(e,this)}function o(e){return e[this]}function i(e){var t=+this;return 0>t&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),u=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t,n="number"==typeof e;if(n)t=i;else if(u){var r=a(e);t=null!==r?r:o}else t=o;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){"use strict";t.exports=function(t,n,r,o){var i=e("./util"),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 e=this,t=e;e.isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n.isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},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._doInvokeOnCancel=function(e,t){if(i.isArray(e))for(var n=0;n=0?i[e]:void 0}var o=!1,i=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=i.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=n,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var n=e.prototype._pushContext,i=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,u=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=i,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=u,o=!1},o=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(e,n,r){"use strict";n.exports=function(n,r){function o(e,t){return{promise:t}}function i(){return!1}function a(e,t,n){var r=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+L.toString(e));r._attachCancellationCallback(e)})}catch(o){return o}}function s(e){if(!this.isCancellable())return this;var t=this._onCancel();void 0!==t?L.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function u(){return this._onCancelField}function c(e){this._onCancelField=e}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(e,t){if(0!==(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function p(e,t){0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function d(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function h(){this._trace=new I(this._peekContext())}function v(e,t){if(U(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=C(e);L.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),L.notEnumerableProp(e,"__stackCleaned__",!0)}}}function g(e,t,n,r,o){if(void 0===e&&null!==t&&K){if(void 0!==o&&o._returnedNonUndefined())return;var i=r._bitField;if(0===(65535&i))return;n&&(n+=" ");var a="a promise was created in a "+n+"handler but was not returned from it";r._warn(a,!0,t)}}function y(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),b(n)}function b(e,t,r){if(oe.warnings){var o,i=new N(e);if(t)r._attachExtraTrace(i);else if(oe.longStackTraces&&(o=n._peekContext()))o.attachExtraTrace(i);else{var a=C(i);i.stack=a.message+"\n"+a.stack.join("\n")}$("warning",i)||x(i,"",!0)}}function _(e,t){for(var n=0;n=0;--s)if(r[s]===i){a=s;break}for(var s=a;s>=0;--s){var u=r[s];if(t[o]!==u)break;t.pop(),o--}t=r}}function E(e){for(var t=[],n=0;n0&&(t=t.slice(n)),t}function C(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?A(e):[" (No stack trace)"],{message:n,stack:E(t)}}function x(e,t,n){if("undefined"!=typeof console){var r;if(L.isObject(e)){var o=e.stack;r=t+z(o,e)}else r=t+String(e);"function"==typeof P?P(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function S(e,t,n,r){var o=!1;try{"function"==typeof t&&(o=!0,"rejectionHandled"===e?t(r):t(n,r))}catch(i){B.throwLater(i)}"unhandledRejection"===e?$(e,n,r)||o||x(n,"Unhandled rejection "):$(e,r)}function O(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():L.toString(e);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(t))try{var r=JSON.stringify(e);t=r}catch(o){}0===t.length&&(t="(empty array)")}return"(<"+T(t)+">, no stack trace)"}function T(e){var t=41;return e.lengtha||0>s||!n||!r||n!==r||a>=s||(te=function(e){if(Q.test(e))return!0;var t=k(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}}function I(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);re(this,I),t>32&&this.uncycle()}var M,R,P,F=n._getDomain,B=n._async,N=e("./errors").Warning,L=e("./util"),U=L.canAttachTrace,Q=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,H=null,z=null,G=!1,q=!(0==L.env("BLUEBIRD_DEBUG")),V=!(0==L.env("BLUEBIRD_WARNINGS")||!q&&!L.env("BLUEBIRD_WARNINGS")),W=!(0==L.env("BLUEBIRD_LONG_STACK_TRACES")||!q&&!L.env("BLUEBIRD_LONG_STACK_TRACES")),K=0!=L.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(V||!!L.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},n.prototype._notifyUnhandledRejectionIsHandled=function(){S("rejectionHandled",M,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),S("unhandledRejection",R,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return b(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=F();R="function"==typeof e?null===t?e:t.bind(e):void 0},n.onUnhandledRejectionHandled=function(e){var t=F();M="function"==typeof e?null===t?e:t.bind(e):void 0};var J=function(){};n.longStackTraces=function(){if(B.haveItemsQueued()&&!oe.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!oe.longStackTraces&&D()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;oe.longStackTraces=!0,J=function(){if(B.haveItemsQueued()&&!oe.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,r.deactivateLongStackTraces(),B.enableTrampoline(),oe.longStackTraces=!1},n.prototype._captureStackTrace=h,n.prototype._attachExtraTrace=v,r.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return oe.longStackTraces&&D()};var Y=function(){try{var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),L.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!L.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),Z=function(){return L.isNode?function(){return t.emit.apply(t,arguments)}:L.global?function(e){var t="on"+e.toLowerCase(),n=L.global[t];return n?(n.apply(L.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),X={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:o},$=function(e){var t=!1;try{t=Z.apply(null,arguments)}catch(n){B.throwLater(n),t=!0}var r=!1;try{r=Y(e,X[e].apply(null,arguments))}catch(n){B.throwLater(n),r=!0}return r||t};n.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&J()),"warnings"in e){var t=e.warnings;oe.warnings=!!t,K=oe.warnings,L.isObject(t)&&"wForgottenReturn"in t&&(K=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!oe.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=u,n.prototype._setOnCancel=c,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,ee=f,oe.cancellation=!0}"monitoring"in e&&(e.monitoring&&!oe.monitoring?(oe.monitoring=!0,n.prototype._fireEvent=$):!e.monitoring&&oe.monitoring&&(oe.monitoring=!1,n.prototype._fireEvent=i))},n.prototype._fireEvent=i,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(r){return r}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var ee=p,te=function(){return!1},ne=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;L.inherits(I,Error),r.CapturedTrace=I,I.prototype.uncycle=function(){var e=this._length;if(!(2>e)){for(var t=[],n={},r=0,o=this;void 0!==o;++r)t.push(o),o=o._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var i=t[r].stack;void 0===n[i]&&(n[i]=r)}for(var r=0;e>r;++r){var a=t[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var u=r>0?t[r-1]:this;e-1>s?(u._parent=t[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)t[l]._length=c,c++;return}}}},I.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=C(e),n=t.message,r=[t.stack],o=this;void 0!==o;)r.push(E(o.stack.split("\n"))),o=o._parent;w(r),m(r),L.notEnumerableProp(e,"stack",_(n,r)),L.notEnumerableProp(e,"__stackCleaned__",!0)}};var re=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():O(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=e,z=t;var n=Error.captureStackTrace;return te=function(e){return Q.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,z=t,G=!0,function(e){e.stack=(new Error).stack};var o;try{throw new Error}catch(i){o="stack"in i}return"stack"in r||!o||"number"!=typeof Error.stackTraceLimit?(z=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?O(t):t.toString()},null):(H=e,z=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(P=function(e){console.warn(e)},L.isNode&&t.stderr.isTTY?P=function(e,t){var n=t?"":"";console.warn(n+e+"\n")}:L.isNode||"string"!=typeof(new Error).stack||(P=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var oe={warnings:V,longStackTraces:!1,cancellation:!1,monitoring:!1};return W&&n.longStackTraces(),{longStackTraces:function(){return oe.longStackTraces},warnings:function(){return oe.warnings},cancellation:function(){return oe.cancellation},monitoring:function(){return oe.monitoring},propagateFromFunction:function(){return ee},boundValueFunction:function(){return d},checkForgottenReturns:g,setBounds:j,warn:b,deprecated:y,CapturedTrace:I,fireDomEvent:Y,fireGlobalEvent:Z}}},{"./errors":12,"./util":36}],10:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype["return"]=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype["throw"]=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1],r=function(){throw t};return this.caught(e,r)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();var o=function(){return r};return this.caught(n,o)}}},{}],11:[function(e,t,n){"use strict";t.exports=function(e,t){function n(){return i(this)}function r(e,n){return o(e,n,t,t)}var o=e.reduce,i=e.all;e.prototype.each=function(e){return this.mapSeries(e)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return o(this,e,t,t)},e.each=function(e,t){return r(e,t)._then(n,void 0,void 0,e,void 0)},e.mapSeries=r}},{}],12:[function(e,t,n){"use strict";function r(e,t){function n(r){return this instanceof n?(f(this,"message","string"==typeof r?r:t),f(this,"name",e),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return l(n,Error),n}function o(e){return this instanceof o?(f(this,"name","OperationalError"),f(this,"message",e),this.cause=e,this.isOperational=!0,void(e instanceof Error?(f(this,"message",e.message),f(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(e)}var i,a,s=e("./es5"),u=s.freeze,c=e("./util"),l=c.inherits,f=c.notEnumerableProp,p=r("Warning","warning"),d=r("CancellationError","cancellation error"),h=r("TimeoutError","timeout error"),v=r("AggregateError","aggregate error");try{i=TypeError,a=RangeError}catch(g){i=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),b=0;b1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0):!1}function a(){return u.call(this,this.promise._target()._settledValue())}function s(e){return i(this,e)?void 0:(f.e=e,f)}function u(e){var r=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(r._boundValue()):u.call(r._boundValue(),e);if(void 0!==c){r._setReturnedNonUndefined();var p=n(c,r);if(p instanceof t){if(null!=this.cancelPromise){if(p.isCancelled()){var d=new l("late cancellation observer");return r._attachExtraTrace(d),f.e=d,f}p.isPending()&&p._attachCancellationCallback(new o(this))}return p._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(i(this),f.e=e,f):(i(this),e)}var c=e("./util"),l=t.CancellationError,f=c.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){i(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,o){return"function"!=typeof e?this.then():this._then(n,o,void 0,new r(this,t,e),void 0)},t.prototype.lastly=t.prototype["finally"]=function(e){return this._passThrough(e,0,u,u)},t.prototype.tap=function(e){return this._passThrough(e,1,u)},r}},{"./util":36}],16:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){function s(e,n,r){for(var i=0;i0&&"function"==typeof arguments[t]){e=arguments[t];var r}var o=[].slice.call(arguments);e&&o.pop();var r=new n(o).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){function s(e,t,n,r){this.constructor$(e),this._promise._captureStackTrace();var o=c();this._callback=null===o?t:o.bind(t),this._preservedValues=r===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=n>=1?[]:d,this._init$(void 0,-2)}function u(e,t,n,o){if("function"!=typeof t)return r("expecting a function but got "+l.classString(t));var i="object"==typeof n&&null!==n?n.concurrency:0;return i="number"==typeof i&&isFinite(i)&&i>=1?i:0,new s(e,t,i,o).promise()}var c=t._getDomain,l=e("./util"),f=l.tryCatch,p=l.errorObj,d=[];l.inherits(s,n),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var r=this._values,i=this.length(),s=this._preservedValues,u=this._limit;if(0>n){if(n=-1*n-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,d=c._boundValue(); c._pushContext();var h=f(l).call(d,e,n,i),v=c._popContext();if(a.checkForgottenReturns(h,v,null!==s?"Promise.filter":"Promise.map",c),h===p)return this._reject(h.e),!0;var g=o(h,this._promise);if(g instanceof t){g=g._target();var y=g._bitField;if(0===(50397184&y))return u>=1&&this._inFlight++,r[n]=g,g._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(g._reason()),!0):(this._cancel(),!0);h=g._value()}r[n]=h}var b=++this._totalResolved;return b>=i?(null!==s?this._filter(r,s):this._resolve(r),!0):!1},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlighti;++i)e[i]&&(r[o++]=t[i]);r.length=o,this._resolve(r)},s.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return u(this,e,t,null)},t.map=function(e,t,n,r){return u(e,t,n,r)}}},{"./util":36}],19:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var r=new t(n);r._captureStackTrace(),r._pushContext();var o=s(e).apply(this,arguments),a=r._popContext();return i.checkForgottenReturns(o,a,"Promise.method",r),r._resolveFromSyncValue(o),r}},t.attempt=t["try"]=function(e){if("function"!=typeof e)return o("expecting a function but got "+a.classString(e));var r=new t(n);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(e).apply(l,c):s(e).call(l,c)}else u=s(e)();var f=r._popContext();return i.checkForgottenReturns(u,f,"Promise.try",r),r._resolveFromSyncValue(u),r},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){"use strict";function r(e){return e instanceof Error&&l.getPrototypeOf(e)===Error.prototype}function o(e){var t;if(r(e)){t=new c(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var n=l.keys(e),o=0;o1){var n,r=new Array(t-1),o=0;for(n=0;t-1>n;++n){var i=arguments[n];if(!d.isObject(i))return f("expecting an object but got "+d.classString(i));r[o++]=i}return r.length=o,e=arguments[n],this.then(void 0,D(r,e,this))}return this.then(void 0,e)},o.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},o.prototype.then=function(e,t){if(O.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+d.classString(e);arguments.length>1&&(n+=", "+d.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},o.prototype.done=function(e,t){var n=this._then(e,t,void 0,void 0,void 0);n._setIsFinal()},o.prototype.spread=function(e){return"function"!=typeof e?f("expecting a function but got "+d.classString(e)):this.all()._then(e,void 0,void 0,w,void 0)},o.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new C(this).promise()},o.prototype.error=function(e){return this.caught(d.originatesFromRejection,e)},o.is=function(e){return e instanceof o},o.fromNode=o.fromCallback=function(e){var t=new o(m);t._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=I(e)(k(t,n));return r===j&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},o.all=function(e){return new C(e).promise()},o.cast=function(e){var t=A(e);return t instanceof o||(t=new o(m),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(e){var t=new o(m);return t._captureStackTrace(),t._rejectCallback(e,!0),t},o.setScheduler=function(e){if("function"!=typeof e)throw new b("expecting a function but got "+d.classString(e));var t=g._schedule;return g._schedule=e,t},o.prototype._then=function(e,t,n,r,i){var a=void 0!==i,s=a?i:new o(m),c=this._target(),l=c._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=u();if(0!==(50397184&l)){var p,d,h=c._settlePromiseCtx;0!==(33554432&l)?(d=c._rejectionHandler0,p=e):0!==(16777216&l)?(d=c._fulfillmentHandler0,p=t,c._unsetRejectionIsUnhandled()):(h=c._settlePromiseLateCancellationObserver,d=new _("late cancellation observer"),c._attachExtraTrace(d),p=t),g.invoke(h,c,{handler:null===f?p:"function"==typeof p&&f.bind(p),promise:s,receiver:r,value:d})}else c._addCallbacks(e,t,s,r,f);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(e){this._bitField=-65536&this._bitField|65535&e},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._setAsyncGuaranteed=function(){this._bitField=134217728|this._bitField},o.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==p)return void 0===t&&this._isBound()?this._boundValue():t},o.prototype._promiseAt=function(e){return this[4*e-4+2]},o.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},o.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),n=e._rejectionHandler0,r=e._promise0,o=e._receiverAt(0);void 0===o&&(o=p),this._addCallbacks(t,n,r,o,null)},o.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),o=e._promiseAt(t),i=e._receiverAt(t);void 0===i&&(i=p),this._addCallbacks(n,r,o,i,null)},o.prototype._addCallbacks=function(e,t,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 e&&(this._fulfillmentHandler0=null===o?e:o.bind(e)),"function"==typeof t&&(this._rejectionHandler0=null===o?t:o.bind(t));else{var a=4*i-4;this[a+2]=n,this[a+3]=r,"function"==typeof e&&(this[a+0]=null===o?e:o.bind(e)),"function"==typeof t&&(this[a+1]=null===o?t:o.bind(t))}return this._setLength(i+1),i},o.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},o.prototype._resolveCallback=function(e,t){if(0===(117506048&this._bitField)){if(e===this)return this._rejectCallback(c(),!1);var n=A(e,this);if(!(n instanceof o))return this._fulfill(e);t&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var i=r._bitField;if(0===(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&i))this._fulfill(r._value());else if(0!==(16777216&i))this._reject(r._reason());else{var u=new _("late cancellation observer");r._attachExtraTrace(u),this._reject(u)}}},o.prototype._rejectCallback=function(e,t,n){var r=d.ensureErrorObject(e),o=r===e;if(!o&&!n&&O.warnings()){var i="a promise was rejected with a non-error: "+d.classString(e);this._warn(i,!0)}this._attachExtraTrace(r,t?o:!1),this._reject(e)},o.prototype._resolveFromExecutor=function(e){var t=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(e,function(e){t._resolveCallback(e)},function(e){t._rejectCallback(e,n)});n=!1,this._popContext(),void 0!==r&&t._rejectCallback(r,!0)},o.prototype._settlePromiseFromHandler=function(e,t,n,r){var o=r._bitField;if(0===(65536&o)){r._pushContext();var i;t===w?n&&"number"==typeof n.length?i=I(e).apply(this._boundValue(),n):(i=j,i.e=new b("cannot .spread() a non-array: "+d.classString(n))):i=I(e).call(t,n);var a=r._popContext();o=r._bitField,0===(65536&o)&&(i===E?r._reject(n):i===j?r._rejectCallback(i.e,!1):(O.checkForgottenReturns(i,a,"",r,this),r._resolveCallback(i)))}},o.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(e){this._rejectionHandler0=e},o.prototype._settlePromise=function(e,t,r,i){var a=e instanceof o,s=this._bitField,u=0!==(134217728&s);0!==(65536&s)?(a&&e._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=e,I(t).call(r,i)===j&&e._reject(j.e)):t===l?e._fulfill(l.call(r)):r instanceof n?r._promiseCancelled(e):a||e instanceof C?e._cancel():r.cancel()):"function"==typeof t?a?(u&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,i,e)):t.call(r,i,e):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(i,e):r._promiseRejected(i,e)):a&&(u&&e._setAsyncGuaranteed(),0!==(33554432&s)?e._fulfill(i):e._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,n=e.promise,r=e.receiver,i=e.value;"function"==typeof t?n instanceof o?this._settlePromiseFromHandler(t,r,i,n):t.call(r,i,n):n instanceof o&&n._reject(i)},o.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},o.prototype._settlePromise0=function(e,t,n){var r=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,e,o,t)},o.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},o.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!==(134217728&t)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=e,this._isFinal()?g.fatalError(e,d.isNode):void((65535&t)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(e,t){for(var n=1;e>n;n++){var r=this._fulfillmentHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,t)}},o.prototype._rejectPromises=function(e,t){for(var n=1;e>n;n++){var r=this._rejectionHandlerAt(n),o=this._promiseAt(n),i=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,r,i,t)}},o.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!==(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var e=this._bitField;return 0!==(33554432&e)?this._rejectionHandler0:0!==(16777216&e)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){O.deprecated("Promise.defer","new Promise");var e=new o(m);return{promise:e,resolve:i,reject:a}},d.notEnumerableProp(o,"_makeSelfResolutionError",c),e("./method")(o,m,A,f,O),e("./bind")(o,m,A,O),e("./cancel")(o,C,f,O),e("./direct_resolve")(o),e("./synchronous_inspection")(o),e("./join")(o,C,A,m,O),o.Promise=o,e("./map.js")(o,C,f,A,m,O),e("./using.js")(o,f,A,S,m,O),e("./timers.js")(o,m,O),e("./generators.js")(o,f,m,A,n,O),e("./nodeify.js")(o),e("./call_get.js")(o),e("./props.js")(o,C,A,f),e("./race.js")(o,m,A,f),e("./reduce.js")(o,C,f,A,m,O),e("./settle.js")(o,C,O),e("./some.js")(o,C,f),e("./promisify.js")(o,m),e("./any.js")(o),e("./each.js")(o,m),e("./filter.js")(o,m),d.toFastProperties(o),d.toFastProperties(o.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new o(m)),O.setBounds(v.firstLineError,d.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i){function a(e){switch(e){case-2:return[];case-3:return{}}}function s(e){var r=this._promise=new t(n);e instanceof t&&r._propagateFrom(e,3),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=e("./util");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 c(e,n){var i=r(this._values,this._promise);if(i instanceof t){i=i._target();var s=i._bitField;if(this._values=i,0===(50397184&s))return this._promise._setAsyncGuaranteed(),i._then(c,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(i._reason()):this._cancel();i=i._value()}if(i=u.asArray(i),null===i){var l=o("expecting an array or an iterable object but got "+u.classString(i)).reason();return void this._promise._rejectCallback(l,!1)}return 0===i.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(i)},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;n>s;++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(e){this._values=null,this._promise._fulfill(e)},s.prototype._cancel=function(){!this._isResolved()&&this._promise.isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},s.prototype._promiseFulfilled=function(e,t){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!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;nu;u+=2){var l=a[u],f=a[u+1],h=l+t;if(r===x)e[h]=x(l,p,l,f,t,o);else{var v=r(f,function(){return x(l,p,l,f,t,o)});d.notEnumerableProp(v,"__isPromisified__",!0),e[h]=v}}return d.toFastProperties(e),e}function l(e,t,n){return x(e,t,void 0,e,null,n)}var f,p={},d=e("./util"),h=e("./nodeback"),v=d.withAppended,g=d.maybeWrapAsError,y=d.canEvaluate,b=e("./errors").TypeError,_="Async",m={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],E=new RegExp("^(?:"+w.join("|")+")$"),A=function(e){return d.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e},C=function(e){return e.replace(/([$])/,"\\$")},x=y?f:u;t.promisify=function(e,t){if("function"!=typeof e)throw new b("expecting a function but got "+d.classString(e));if(o(e))return e;t=Object(t);var n=void 0===t.context?p:t.context,i=!!t.multiArgs,a=l(e,n,i);return d.copyDescriptors(e,a,r),a},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new b("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");t=Object(t);var n=!!t.multiArgs,r=t.suffix;"string"!=typeof r&&(r=_);var o=t.filter;"function"!=typeof o&&(o=A);var i=t.promisifier;if("function"!=typeof i&&(i=x),!d.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=d.inheritedDataKeys(e),s=0;si;++i){var a=r[i];t[i]=e[a],t[i+o]=a}}this.constructor$(t),this._isMap=n,this._init$(void 0,-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=e("./util"),c=u.isObject,l=e("./es5");"function"==typeof Map&&(s=Map);var f=function(){function e(e,r){this[t]=e,this[t+n]=r,t++}var t=0,n=0;return function(r){n=r.size,t=0;var o=new Array(2*r.size);return r.forEach(e,o),o}}(),p=function(e){for(var t=new s,n=e.length/2|0,r=0;n>r;++r){var o=e[n+r],i=e[r];t.set(o,i)}return t};u.inherits(i,n),i.prototype._init=function(){},i.prototype._promiseFulfilled=function(e,t){this._values[t]=e;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=p(this._values);else{r={};for(var o=this.length(),i=0,a=this.length();a>i;++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(e){return e>>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){"use strict";function r(e,t,n,r,o){for(var i=0;o>i;++i)n[i+r]=e[i+t],e[i+t]=void 0}function o(e){this._capacity=e,this._length=0,this._front=0}o.prototype._willBeOverCapacity=function(e){return this._capacityp;++p){var h=e[p];(void 0!==h||p in e)&&t.cast(h)._then(l,f,void 0,c,null)}return c}var a=e("./util"),s=function(e){return e.then(function(t){return i(t,e)})};t.race=function(e){return i(e,void 0)},t.prototype.race=function(){return i(this,void 0)}}},{"./util":36}],28:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){function s(e,n,r,o){this.constructor$(e);var a=p();this._fn=null===a?n:a.bind(n),void 0!==r&&(r=t.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,this._eachValues=o===i?[]:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function c(e,t,n,o){if("function"!=typeof t)return r("expecting a function but got "+d.classString(t));var i=new s(e,t,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=h(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 p=t._getDomain,d=e("./util"),h=d.tryCatch;d.inherits(s,n),s.prototype._gotAccum=function(e){void 0!==this._eachValues&&e!==i&&this._eachValues.push(e)},s.prototype._eachComplete=function(e){return this._eachValues.push(e),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(e){this._promise._resolveCallback(e),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(;o>r;++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(e,t){return c(this,e,t,null)},t.reduce=function(e,t,n,r){return c(e,t,n,r)}}},{"./util":36}],29:[function(e,o,i){"use strict";var a,s=e("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};if(s.isNode&&"undefined"==typeof MutationObserver){var c=n.setImmediate,l=t.nextTick;a=s.isRecentNode?function(e){c.call(n,e)}:function(e){l.call(t,e)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&window.navigator.standalone?"undefined"!=typeof r?function(e){r(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:u:function(){var e=document.createElement("div"),t={attributes:!0},n=!1,r=document.createElement("div"),o=new MutationObserver(function(){e.classList.toggle("foo"),n=!1});o.observe(r,t);var i=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(e,t),i()}}();o.exports=a},{"./util":36}],30:[function(e,t,n){"use strict";t.exports=function(t,n,r){function o(e){this.constructor$(e)}var i=t.PromiseInspection,a=e("./util");a.inherits(o,n),o.prototype._promiseResolved=function(e,t){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},o.prototype._promiseFulfilled=function(e,t){var n=new i;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},o.prototype._promiseRejected=function(e,t){var n=new i;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){"use strict";t.exports=function(t,n,r){function o(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function i(e,t){if((0|t)!==t||0>t)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new o(e),i=n.promise();return n.setHowMany(t),n.init(),i}var a=e("./util"),s=e("./errors").RangeError,u=e("./errors").AggregateError,c=a.isArray,l={};a.inherits(o,n),o.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=c(this._values);!this._isResolved()&&e&&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(e){this._howMany=e},o.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},o.prototype._promiseRejected=function(e){return this._addRejected(e),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 e=new u,t=this.length();t0?this._reject(e):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(e){this._values.push(e)},o.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},o.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},o.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},o.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return i(e,t)},t.prototype.some=function(e){return i(this,e)},t._SomePromiseArray=o}},{"./errors":12,"./util":36}],32:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.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=t.prototype.error=t.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=t.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},i=t.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};t.prototype.isCancelled=e.prototype._isCancelled=function(){return 65536===(65536&this._bitField)},e.prototype.isCancelled=function(){return this._target()._isCancelled()},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return i.call(this._target())},e.prototype.isFulfilled=function(){return o.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){"use strict";t.exports=function(t,n){function r(e,r){if(l(e)){if(e instanceof t)return e;var o=i(e);if(o===c){r&&r._pushContext();var u=t.reject(o.e);return r&&r._popContext(),u}if("function"==typeof o){if(a(e)){var u=new t(n);return e._then(u._fulfill,u._reject,void 0,u,null),u}return s(e,o,r)}}return e}function o(e){return e.then}function i(e){try{return o(e)}catch(t){return c.e=t,c}}function a(e){return f.call(e,"_promise0")}function s(e,r,o){function i(e){s&&(s._resolveCallback(e),s=null)}function a(e){s&&(s._rejectCallback(e,f,!0),s=null)}var s=new t(n),l=s;o&&o._pushContext(),s._captureStackTrace(),o&&o._popContext();var f=!0,p=u.tryCatch(r).call(e,i,a);return f=!1,s&&p===c&&(s._rejectCallback(p.e,!0,!0),s=null),l}var u=e("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return r}},{"./util":36}],34:[function(e,t,n){"use strict";t.exports=function(t,n,r){function o(e){this.handle=e}function i(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),u=t.TimeoutError;o.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,i){var a,s;return void 0!==i?(a=t.resolve(i)._then(c,null,null,e,void 0),r.cancellation()&&i instanceof t&&a._setOnCancel(i)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),r.cancellation()&&a._setOnCancel(new o(s))),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return l(e,this)};var f=function(e,t,n){var r;r="string"!=typeof t?t instanceof Error?t:new u("operation timed out"):new u(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,u=new o(setTimeout(function(){n.isPending()&&f(n,t,s)},e));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}}},{"./util":36}],35:[function(e,t,n){"use strict";t.exports=function(t,n,r,o,i,a){function s(e){setTimeout(function(){throw e},0)}function u(e){var t=r(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}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(f){return s(f)}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(e,t,n){this._data=e,this._promise=t,this._context=n}function f(e,t,n){this.constructor$(e,t,n)}function p(e){return l.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function d(e){this.length=e,this.promise=null,this[e-1]=null}var h=e("./util"),v=e("./errors").TypeError,g=e("./util").inherits,y=h.errorObj,b=h.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():null},l.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=null!==t?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},g(f,l),f.prototype.doDispose=function(e,t){var n=this.data();return n.call(e,e,t)},d.prototype._resultCancelled=function(){for(var e=this.length,n=0;e>n;++n){var r=this[n];r instanceof t&&r.cancel()}},t.using=function(){var e=arguments.length;if(2>e)return n("you must pass at least 2 arguments to Promise.using");var o=arguments[e-1];if("function"!=typeof o)return n("expecting a function but got "+h.classString(o));var i,s=!0;2===e&&Array.isArray(arguments[0])?(i=arguments[0],e=i.length,s=!1):(i=arguments,e--);for(var u=new d(e),f=0;e>f;++f){var v=i[f];if(l.isDisposer(v)){var g=v;v=v.promise(),v._setDisposable(g)}else{var _=r(v);_ instanceof t&&(v=_._then(p,null,null,{resources:u,index:f},void 0))}u[f]=v}for(var m=new Array(u.length),f=0;f0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new f(e,this,o());throw new v}}},{"./errors":12,"./util":36}],36:[function(e,r,o){"use strict";function i(){try{var e=D;return D=null,e.apply(this,arguments)}catch(t){return T.e=t,T}}function a(e){return D=e,i}function s(e){return null==e||e===!0||e===!1||"string"==typeof e||"number"==typeof e}function u(e){return"function"==typeof e||"object"==typeof e&&null!==e}function c(e){return s(e)?new Error(b(e)):e}function l(e,t){var n,r=e.length,o=new Array(r+1);for(n=0;r>n;++n)o[n]=e[n];return o[n]=t,o}function f(e,t,n){if(!S.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var r=Object.getOwnPropertyDescriptor(e,t);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function p(e,t,n){if(s(e))return e;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return S.defineProperty(e,t,r),e}function d(e){throw e}function h(e){try{if("function"==typeof e){var t=S.names(e.prototype),n=S.isES5&&t.length>1,r=t.length>0&&!(1===t.length&&"constructor"===t[0]),o=M.test(e+"")&&S.names(e).length>0;if(n||r||o)return!0}return!1}catch(i){return!1}}function v(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}function g(e){return R.test(e)}function y(e,t,n){for(var r=new Array(e),o=0;e>o;++o)r[o]=t+o+n;return r}function b(e){try{return e+""}catch(t){return"[no string representation]"}}function _(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function m(e){try{p(e,"isOperational",!0)}catch(t){}}function w(e){return null==e?!1:e instanceof Error.__BluebirdErrorTypes__.OperationalError||e.isOperational===!0}function E(e){return _(e)&&S.propertyIsWritable(e,"stack")}function A(e){return{}.toString.call(e)}function C(e,t,n){for(var r=S.names(e),o=0;o10||e[0]>0}(),L.isNode&&L.toFastProperties(t);try{throw new Error}catch(U){L.lastLineError=U}r.exports=L},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(t,n(250),function(){return this}(),n(144).setImmediate)},function(e,t){function n(e,t){for(var n=-1,r=e.length,o=Array(r);++n-1&&e%1==0&&t>e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t,n){var r=n(46),o=r(Object,"create");e.exports=o},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&r>=e}var r=9007199254740991;e.exports=n},function(e,t,n){"use strict";function r(e,t){}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.publishSource,r=void 0===n?!0:n,o=t.clientOffset,i=void 0===o?null:o,a=t.getSourceClientOffset;p["default"](h["default"](e),"Expected sourceIds to be an array.");var s=this.getMonitor(),u=this.getRegistry();p["default"](!s.isDragging(),"Cannot call beginDrag while dragging.");for(var c=0;c=0;c--)if(s.canDragSource(e[c])){l=e[c];break}if(null!==l){var f=null;i&&(p["default"]("function"==typeof a,"When clientOffset is provided, getSourceClientOffset must be a function."),f=a(l));var d=u.getSource(l),v=d.beginDrag(s,l);p["default"](g["default"](v),"Item must be an object."),u.pinSource(l);var b=u.getSourceType(l);return{type:y,itemType:b,item:v,sourceId:l,clientOffset:i,sourceClientOffset:f,isSourcePublic:r}}}function i(e){var t=this.getMonitor();if(t.isDragging())return{type:b}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.clientOffset,r=void 0===n?null:n;p["default"](h["default"](e),"Expected targetIds to be an array."),e=e.slice(0);var o=this.getMonitor(),i=this.getRegistry();p["default"](o.isDragging(),"Cannot call hover while not dragging."),p["default"](!o.didDrop(),"Cannot call hover after drop.");for(var a=o.getItemType(),s=0;s=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(146),i=r(o),a=n(275),s=r(a),u="function"==typeof s["default"]&&"symbol"==typeof i["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof s["default"]&&e.constructor===s["default"]?"symbol":typeof e};t["default"]="function"==typeof s["default"]&&"symbol"===u(i["default"])?function(e){return"undefined"==typeof e?"undefined":u(e)}:function(e){return e&&"function"==typeof s["default"]&&e.constructor===s["default"]?"symbol":"undefined"==typeof e?"undefined":u(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(294);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(31),o=n(310),i=n(93),a=n(99)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=n(148)("iframe"),r=i.length,o=">";for(t.style.display="none",n(299).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("