You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
127 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1877)}({111:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},112:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},113:function(t,e,n){n(363);for(var r=n(34),o=n(60),i=n(77),a=n(38)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],l=r[u],f=l&&l.prototype;f&&!f[a]&&o(f,a,u),i[u]=i.Array}},116:function(t,e,n){var r=n(35);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")}},117:function(t,e,n){var r=n(52),o=n(271),i=n(121),a=n(119)("IE_PROTO"),s=function(){},c=function(){var t,e=n(136)("iframe"),r=i.length;for(e.style.display="none",n(272).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},118:function(t,e,n){var r=n(111),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},119:function(t,e,n){var r=n(120)("keys"),o=n(96);t.exports=function(t){return r[t]||(r[t]=o(t))}},120:function(t,e,n){var r=n(34),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},121:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},122:function(t,e,n){var r=n(46).f,o=n(61),i=n(38)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},124:function(t,e){e.f={}.propertyIsEnumerable},135:function(t,e){t.exports=!0},136:function(t,e,n){var r=n(35),o=n(34).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},137:function(t,e,n){var r=n(96)("meta"),o=n(35),i=n(61),a=n(46).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(58)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&c(t)&&!i(t,r)&&l(t),t}}},14:function(t,e,n){t.exports={default:n(219),__esModule:!0}},149:function(t,e,n){"use strict";e.__esModule=!0;var r=i(n(393)),o=i(n(20));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return function(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var s,c=(0,o.default)(t);!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},15:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},161:function(t,e,n){t.exports=!n(44)&&!n(58)(function(){return 7!=Object.defineProperty(n(136)("div"),"a",{get:function(){return 7}}).a})},162:function(t,e,n){var r=n(61),o=n(59),i=n(213)(!1),a=n(119)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},163:function(t,e,n){var r=n(95);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},164:function(t,e,n){var r=n(95),o=n(38)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},166:function(t,e,n){e.f=n(38)},167:function(t,e,n){var r=n(34),o=n(18),i=n(135),a=n(166),s=n(46).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)})}},18:function(t,e){var n=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},185:function(t,e,n){"use strict";var r=n(135),o=n(26),i=n(212),a=n(60),s=n(61),c=n(77),u=n(354),l=n(122),f=n(215),p=n(38)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,_,v,y,m){u(n,e,_);var g,b,w,x=function(t){if(!h&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},j=e+" Iterator",k="values"==v,E=!1,C=t.prototype,O=C[p]||C["@@iterator"]||v&&C[v],S=O||x(v),T=v?k?x("entries"):S:void 0,F="Array"==e&&C.entries||O;if(F&&(w=f(F.call(new t)))!==Object.prototype&&w.next&&(l(w,j,!0),r||s(w,p)||a(w,p,d)),k&&O&&"values"!==O.name&&(E=!0,S=function(){return O.call(this)}),r&&!m||!h&&!E&&C[p]||a(C,p,S),c[e]=S,c[j]=d,v)if(g={values:k?S:x("values"),keys:y?S:x("keys"),entries:T},m)for(b in g)b in C||i(C,b,g[b]);else o(o.P+o.F*(h||E),e,g);return g}},186:function(t,e,n){var r=n(164),o=n(38)("iterator"),i=n(77);t.exports=n(18).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},187:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,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(218),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(this,n(15))},1877:function(t,e,n){"use strict";var r=new(n(1878).IndexedDBStoreWorker)(postMessage);onmessage=r.onMessage},1878:function(t,e,n){"use strict";t.exports.IndexedDBStoreWorker=n(1879)},1879:function(t,e,n){"use strict";var r=c(n(51)),o=c(n(4)),i=c(n(5)),a=c(n(9)),s=c(n(396));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e){(0,o.default)(this,t),this.backend=null,this.postMessage=e,this.onMessage=this.onMessage.bind(this)}return(0,i.default)(t,[{key:"onMessage",value:function(t){var e,n,o=this,i=t.data,c=void 0;switch(i.command){case"_setupWorker":this.backend=new s.default(indexedDB,i.args[0]),c=a.default.resolve();break;case"connect":c=this.backend.connect();break;case"isNewlyCreated":c=this.backend.isNewlyCreated();break;case"clearDatabase":c=this.backend.clearDatabase().then(function(t){return{}});break;case"getSavedSync":c=this.backend.getSavedSync(!1);break;case"setSyncData":c=(e=this.backend).setSyncData.apply(e,(0,r.default)(i.args));break;case"syncToDatabase":c=(n=this.backend).syncToDatabase.apply(n,(0,r.default)(i.args)).then(function(){return{}});break;case"getUserPresenceEvents":c=this.backend.getUserPresenceEvents();break;case"getNextBatchToken":c=this.backend.getNextBatchToken();break;case"getOutOfBandMembers":c=this.backend.getOutOfBandMembers(i.args[0]);break;case"clearOutOfBandMembers":c=this.backend.clearOutOfBandMembers(i.args[0]);break;case"setOutOfBandMembers":c=this.backend.setOutOfBandMembers(i.args[0],i.args[1]);break;case"getClientOptions":c=this.backend.getClientOptions();break;case"storeClientOptions":c=this.backend.storeClientOptions(i.args[0])}void 0!==c?c.done(function(t){o.postMessage.call(null,{command:"cmd_success",seq:i.seq,result:t})},function(t){console.error("Error running command: "+i.command),console.error(t),o.postMessage.call(null,{command:"cmd_fail",seq:i.seq,error:{message:t.message,name:t.name}})}):this.postMessage({command:"cmd_fail",seq:i.seq,error:"Unrecognised command"})}}]),t}();t.exports=u},189:function(t,e){e.f=Object.getOwnPropertySymbols},19:function(t,e,n){t.exports=n(216)},190:function(t,e){},20:function(t,e,n){t.exports={default:n(391),__esModule:!0}},211:function(t,e,n){t.exports={default:n(352),__esModule:!0}},212:function(t,e,n){t.exports=n(60)},213:function(t,e,n){var r=n(59),o=n(118),i=n(214);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},214:function(t,e,n){var r=n(111),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},215:function(t,e,n){var r=n(61),o=n(87),i=n(119)("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}},216:function(t,e,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(217),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},217:function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=b;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",_={},v={};v[a]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(P([])));m&&m!==r&&o.call(m,a)&&(v=m);var g=k.prototype=x.prototype=Object.create(v);j.prototype=g.constructor=k,k.constructor=j,k[c]=j.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===j||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},E(C.prototype),C.prototype[s]=function(){return this},l.AsyncIterator=C,l.async=function(t,e,n,r){var o=new C(b(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},E(g),g[c]="Generator",g[a]=function(){return this},g.toString=function(){return"[object Generator]"},l.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}},l.values=P,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.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&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,_):this.complete(a)},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),_},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),T(n),_}},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;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),_}}}function b(t,e,n,r){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),a=new F(r||[]);return i._invoke=function(t,e,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=w(t,e,n);if("normal"===c.type){if(r=n.done?d:p,c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function x(){}function j(){}function k(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function C(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,a){var s=w(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},a)}a(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function O(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,O(t,e),"throw"===e.method))return _;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return _}var o=w(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,_;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=n),e.delegate=null,_):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,_)}function S(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:R}}function R(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},218:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o=1,i={},a=!1,s=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){l(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&l(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),r=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){l(t.data)},r=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;r=function(e){var n=s.createElement("script");n.onreadystatechange=function(){l(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(l,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var a={callback:t,args:e};return i[o]=a,r(o),o++},c.clearImmediate=u}function u(t){delete i[t]}function l(t){if(a)setTimeout(l,0,t);else{var e=i[t];if(e){a=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{u(t),a=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(15),n(54))},219:function(t,e,n){n(220),t.exports=n(18).Object.keys},220:function(t,e,n){var r=n(87),o=n(78);n(68)("keys",function(){return function(t){return o(r(t))}})},223:function(t,e,n){t.exports={default:n(359),__esModule:!0}},224:function(t,e,n){var r=n(124),o=n(76),i=n(59),a=n(116),s=n(61),c=n(161),u=Object.getOwnPropertyDescriptor;e.f=n(44)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},225:function(t,e,n){var r=n(162),o=n(121).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},26:function(t,e,n){var r=n(34),o=n(18),i=n(66),a=n(60),s=function(t,e,n){var c,u,l,f=t&s.F,p=t&s.G,h=t&s.S,d=t&s.P,_=t&s.B,v=t&s.W,y=p?o:o[e]||(o[e]={}),m=y.prototype,g=p?r:h?r[e]:(r[e]||{}).prototype;for(c in p&&(n=e),n)(u=!f&&g&&void 0!==g[c])&&c in y||(l=u?g[c]:n[c],y[c]=p&&"function"!=typeof g[c]?n[c]:_&&u?i(l,r):v&&g[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):d&&"function"==typeof l?i(Function.call,l):l,d&&((y.virtual||(y.virtual={}))[c]=l,t&s.R&&m&&!m[c]&&a(m,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},271:function(t,e,n){var r=n(46),o=n(52),i=n(78);t.exports=n(44)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},272:function(t,e,n){var r=n(34).document;t.exports=r&&r.documentElement},273:function(t,e,n){var r=n(52);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}}},274:function(t,e,n){var r=n(77),o=n(38)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},275:function(t,e,n){var r=n(38)("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}},276:function(t,e,n){var r=n(59),o=n(225).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},277:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},278:function(t,e,n){var r=n(95);t.exports=Array.isArray||function(t){return"Array"==r(t)}},285:function(t,e,n){"use strict";var r=c(n(67)),o=c(n(14)),i=c(n(4)),a=c(n(5)),s=c(n(29));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e){(0,i.default)(this,t),(e=e||{}).maxTimelineEntries=e.maxTimelineEntries||50,this.opts=e,this.accountData={},this.inviteRooms={},this.joinRooms={},this.nextBatch=null,this.groups={invite:{},join:{},leave:{}}}return(0,a.default)(t,[{key:"accumulate",value:function(t){this._accumulateRooms(t),this._accumulateGroups(t),this._accumulateAccountData(t),this.nextBatch=t.next_batch}},{key:"_accumulateAccountData",value:function(t){var e=this;t.account_data&&t.account_data.events&&t.account_data.events.forEach(function(t){e.accountData[t.type]=t})}},{key:"_accumulateRooms",value:function(t){var e=this;t.rooms&&(t.rooms.invite&&(0,o.default)(t.rooms.invite).forEach(function(n){e._accumulateRoom(n,"invite",t.rooms.invite[n])}),t.rooms.join&&(0,o.default)(t.rooms.join).forEach(function(n){e._accumulateRoom(n,"join",t.rooms.join[n])}),t.rooms.leave&&(0,o.default)(t.rooms.leave).forEach(function(n){e._accumulateRoom(n,"leave",t.rooms.leave[n])}))}},{key:"_accumulateRoom",value:function(t,e,n){switch(e){case"invite":this._accumulateInviteState(t,n);break;case"join":this.inviteRooms[t]&&delete this.inviteRooms[t],this._accumulateJoinState(t,n);break;case"leave":this.inviteRooms[t]?delete this.inviteRooms[t]:delete this.joinRooms[t];break;default:console.error("Unknown cateogory: ",e)}}},{key:"_accumulateInviteState",value:function(t,e){if(e.invite_state&&e.invite_state.events)if(this.inviteRooms[t]){var n=this.inviteRooms[t];e.invite_state.events.forEach(function(t){for(var e=!1,r=0;r<n.invite_state.events.length;r++){var o=n.invite_state.events[r];o.type===t.type&&o.state_key==t.state_key&&(n.invite_state.events[r]=t,e=!0)}e||n.invite_state.events.push(t)})}else this.inviteRooms[t]={invite_state:e.invite_state}}},{key:"_accumulateJoinState",value:function(t,e){this.joinRooms[t]||(this.joinRooms[t]={_currentState:(0,r.default)(null),_timeline:[],_accountData:(0,r.default)(null),_unreadNotifications:{},_summary:{},_readReceipts:{}});var n=this.joinRooms[t];if(e.account_data&&e.account_data.events&&e.account_data.events.forEach(function(t){n._accountData[t.type]=t}),e.unread_notifications&&(n._unreadNotifications=e.unread_notifications),e.summary){var i=n._summary,a=e.summary;i["m.heroes"]=a["m.heroes"]||i["m.heroes"],i["m.joined_member_count"]=a["m.joined_member_count"]||i["m.joined_member_count"],i["m.invited_member_count"]=a["m.invited_member_count"]||i["m.invited_member_count"]}if(e.ephemeral&&e.ephemeral.events&&e.ephemeral.events.forEach(function(t){"m.receipt"===t.type&&t.content&&(0,o.default)(t.content).forEach(function(e){t.content[e]["m.read"]&&(0,o.default)(t.content[e]["m.read"]).forEach(function(r){n._readReceipts[r]={data:t.content[e]["m.read"][r],eventId:e}})})}),e.timeline&&e.timeline.limited&&(n._timeline=[]),e.state&&e.state.events&&e.state.events.forEach(function(t){l(n._currentState,t)}),e.timeline&&e.timeline.events&&e.timeline.events.forEach(function(t,r){l(n._currentState,t),n._timeline.push({event:t,token:0===r?e.timeline.prev_batch:null})}),n._timeline.length>this.opts.maxTimelineEntries)for(var s=n._timeline.length-this.opts.maxTimelineEntries;s<n._timeline.length;s++)if(n._timeline[s].token){n._timeline=n._timeline.slice(s,n._timeline.length);break}}},{key:"_accumulateGroups",value:function(t){var e=this;t.groups&&(t.groups.invite&&(0,o.default)(t.groups.invite).forEach(function(n){e._accumulateGroup(n,"invite",t.groups.invite[n])}),t.groups.join&&(0,o.default)(t.groups.join).forEach(function(n){e._accumulateGroup(n,"join",t.groups.join[n])}),t.groups.leave&&(0,o.default)(t.groups.leave).forEach(function(n){e._accumulateGroup(n,"leave",t.groups.leave[n])}))}},{key:"_accumulateGroup",value:function(t,e,n){for(var r=["invite","join","leave"],o=0;o<r.length;o++){var i=r[o];delete this.groups[i][t]}this.groups[e][t]=n}},{key:"getJSON",value:function(){var t=this,e={join:{},invite:{},leave:{}};(0,o.default)(this.inviteRooms).forEach(function(n){e.invite[n]=t.inviteRooms[n]}),(0,o.default)(this.joinRooms).forEach(function(n){var i=t.joinRooms[n],a={ephemeral:{events:[]},account_data:{events:[]},state:{events:[]},timeline:{events:[],prev_batch:null},unread_notifications:i._unreadNotifications,summary:i._summary};(0,o.default)(i._accountData).forEach(function(t){a.account_data.events.push(i._accountData[t])});var c={type:"m.receipt",room_id:n,content:{}};(0,o.default)(i._readReceipts).forEach(function(t){var e=i._readReceipts[t];c.content[e.eventId]||(c.content[e.eventId]={"m.read":{}}),c.content[e.eventId]["m.read"][t]=e.data}),(0,o.default)(c.content).length>0&&a.ephemeral.events.push(c),i._timeline.forEach(function(t){if(!a.timeline.prev_batch){if(!t.token)return;a.timeline.prev_batch=t.token}a.timeline.events.push(t.event)});for(var u=(0,r.default)(null),f=a.timeline.events.length-1;f>=0;f--){var p=a.timeline.events[f];if(null!==p.state_key&&void 0!==p.state_key){var h=s.default.deepCopy(p);h.unsigned&&(h.unsigned.prev_content&&(h.content=h.unsigned.prev_content),h.unsigned.prev_sender&&(h.sender=h.unsigned.prev_sender)),l(u,h)}}(0,o.default)(i._currentState).forEach(function(t){(0,o.default)(i._currentState[t]).forEach(function(e){var n=i._currentState[t][e];u[t]&&u[t][e]&&(n=u[t][e]),a.state.events.push(n)})}),e.join[n]=a});var n=[];return(0,o.default)(this.accountData).forEach(function(e){n.push(t.accountData[e])}),{nextBatch:this.nextBatch,roomsData:e,groupsData:this.groups,accountData:n}}},{key:"getNextBatchToken",value:function(){return this.nextBatch}}]),t}();function l(t,e){null!==e.state_key&&void 0!==e.state_key&&e.type&&(t[e.type]||(t[e.type]=(0,r.default)(null)),t[e.type][e.state_key]=e)}t.exports=u},29:function(t,e,n){"use strict";var r=a(n(67)),o=a(n(64)),i=a(n(31));function a(t){return t&&t.__esModule?t:{default:t}}t.exports.encodeParams=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.substring(1)},t.exports.encodeUri=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t=t.replace(n,encodeURIComponent(e[n])));return t},t.exports.map=function(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)n[r]=e(t[r]);return n},t.exports.filter=function(t,e){for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n},t.exports.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},t.exports.values=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},t.exports.forEach=function(t,e){for(var n=0;n<t.length;n++)e(t[n],n)},t.exports.findElement=function(t,e,n){var r=void 0;if(n){for(r=t.length-1;r>=0;r--)if(e(t[r],r,t))return t[r]}else for(r=0;r<t.length;r++)if(e(t[r],r,t))return t[r]},t.exports.removeElement=function(t,e,n){var r=void 0,o=void 0;if(n){for(r=t.length-1;r>=0;r--)if(e(t[r],r,t))return o=t[r],t.splice(r,1),o}else for(r=0;r<t.length;r++)if(e(t[r],r,t))return o=t[r],t.splice(r,1),o;return!1},t.exports.isFunction=function(t){return"[object Function]"==Object.prototype.toString.call(t)},t.exports.isArray=function(t){return Array.isArray?Array.isArray(t):Boolean(t&&t.constructor===Array)},t.exports.checkObjectHasKeys=function(t,e){for(var n=0;n<e.length;n++)if(!t.hasOwnProperty(e[n]))throw new Error("Missing required key: "+e[n])},t.exports.checkObjectHasNoAdditionalKeys=function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&-1===e.indexOf(n))throw new Error("Unknown key: "+n)},t.exports.deepCopy=function(t){return JSON.parse((0,i.default)(t))};var s=t.exports.deepCompare=function(t,e){if(t===e)return!0;if((void 0===t?"undefined":(0,o.default)(t))!==(void 0===e?"undefined":(0,o.default)(e)))return!1;if("number"==typeof t&&isNaN(t)&&isNaN(e))return!0;if(null===t||null===e)return t===e;if(!(t instanceof Object))return!1;if(t.constructor!==e.constructor||t.prototype!==e.prototype)return!1;if(t instanceof RegExp||t instanceof Date)return t.toString()===e.toString();if(t instanceof Array){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!s(t[n],e[n]))return!1}else{var r=void 0;for(r in e)if(e.hasOwnProperty(r)!==t.hasOwnProperty(r))return!1;for(r in e){if(e.hasOwnProperty(r)!==t.hasOwnProperty(r))return!1;if(!s(t[r],e[r]))return!1}}return!0};t.exports.extend=function(){for(var t=arguments[0]||{},e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t},t.exports.runPolyfills=function(){Array.prototype.filter||(Array.prototype.filter=function(t){if(void 0===this||null===this)throw new TypeError;var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var r=[],o=arguments.length>=2?arguments[1]:void 0,i=0;i<n;i++)if(i in e){var a=e[i];t.call(o,a,i,e)&&r.push(a)}return r}),Array.prototype.map||(Array.prototype.map=function(t,e){var n=void 0,r=void 0;if(null===this||void 0===this)throw new TypeError(" this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");arguments.length>1&&(n=e);var a=new Array(i);for(r=0;r<i;){var s,c;r in o&&(s=o[r],c=t.call(n,s,r,o),a[r]=c),r++}return a}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){var n=void 0,r=void 0;if(null===this||void 0===this)throw new TypeError(" this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),r=0;r<i;){var a;r in o&&(a=o[r],t.call(n,a,r,o)),r++}})},t.exports.inherits=function(t,e){"function"!=typeof r.default&&(Object.create=function(){function t(){}var e=Object.prototype.hasOwnProperty;return function(n){if("object"!=(void 0===n?"undefined":(0,o.default)(n)))throw new TypeError("Object prototype may only be an Object or null");t.prototype=n;var r=new t;if(t.prototype=null,arguments.length>1){var i=Object(arguments[1]);for(var a in i)e.call(i,a)&&(r[a]=i[a])}return r}}()),t.super_=e,t.prototype=(0,r.default)(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},t.exports.isNumber=function(t){return"number"==typeof t&&isFinite(t)},t.exports.removeHiddenChars=function(t){return t.normalize("NFD").replace(c,"")};var c=/[\u200B-\u200D\u0300-\u036f\uFEFF\s]/g},31:function(t,e,n){t.exports={default:n(390),__esModule:!0}},34: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)},35:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},352:function(t,e,n){n(86),n(355),t.exports=n(18).Array.from},353:function(t,e,n){var r=n(111),o=n(112);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},354:function(t,e,n){"use strict";var r=n(117),o=n(76),i=n(122),a={};n(60)(a,n(38)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},355:function(t,e,n){"use strict";var r=n(66),o=n(26),i=n(87),a=n(273),s=n(274),c=n(118),u=n(356),l=n(186);o(o.S+o.F*!n(275)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,_=d>1?arguments[1]:void 0,v=void 0!==_,y=0,m=l(p);if(v&&(_=r(_,d>2?arguments[2]:void 0,2)),void 0==m||h==Array&&s(m))for(n=new h(e=c(p.length));e>y;y++)u(n,y,v?_(p[y],y):p[y]);else for(f=m.call(p),n=new h;!(o=f.next()).done;y++)u(n,y,v?a(f,_,[o.value,y],!0):o.value);return n.length=y,n}})},356:function(t,e,n){"use strict";var r=n(46),o=n(76);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},357:function(t,e,n){n(358);var r=n(18).Object;t.exports=function(t,e){return r.create(t,e)}},358:function(t,e,n){var r=n(26);r(r.S,"Object",{create:n(117)})},359:function(t,e,n){n(360);var r=n(18).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},360:function(t,e,n){var r=n(26);r(r.S+r.F*!n(44),"Object",{defineProperty:n(46).f})},361:function(t,e,n){t.exports={default:n(362),__esModule:!0}},362:function(t,e,n){n(86),n(113),t.exports=n(166).f("iterator")},363:function(t,e,n){"use strict";var r=n(364),o=n(277),i=n(77),a=n(59);t.exports=n(185)(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)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},364:function(t,e){t.exports=function(){}},365:function(t,e,n){t.exports={default:n(366),__esModule:!0}},366:function(t,e,n){n(367),n(190),n(369),n(370),t.exports=n(18).Symbol},367:function(t,e,n){"use strict";var r=n(34),o=n(61),i=n(44),a=n(26),s=n(212),c=n(137).KEY,u=n(58),l=n(120),f=n(122),p=n(96),h=n(38),d=n(166),_=n(167),v=n(368),y=n(278),m=n(52),g=n(59),b=n(116),w=n(76),x=n(117),j=n(276),k=n(224),E=n(46),C=n(78),O=k.f,S=E.f,T=j.f,F=r.Symbol,P=r.JSON,R=P&&P.stringify,A=h("_hidden"),D=h("toPrimitive"),L={}.propertyIsEnumerable,I=l("symbol-registry"),M=l("symbols"),N=l("op-symbols"),B=Object.prototype,V="function"==typeof F,U=r.QObject,H=!U||!U.prototype||!U.prototype.findChild,G=i&&u(function(){return 7!=x(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=O(B,e);r&&delete B[e],S(t,e,n),r&&t!==B&&S(B,e,r)}:S,q=function(t){var e=M[t]=x(F.prototype);return e._k=t,e},$=V&&"symbol"==typeof F.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof F},Q=function(t,e,n){return t===B&&Q(N,e,n),m(t),e=b(e,!0),m(n),o(M,e)?(n.enumerable?(o(t,A)&&t[A][e]&&(t[A][e]=!1),n=x(n,{enumerable:w(0,!1)})):(o(t,A)||S(t,A,w(1,{})),t[A][e]=!0),G(t,e,n)):S(t,e,n)},W=function(t,e){m(t);for(var n,r=v(e=g(e)),o=0,i=r.length;i>o;)Q(t,n=r[o++],e[n]);return t},z=function(t){var e=L.call(this,t=b(t,!0));return!(this===B&&o(M,t)&&!o(N,t))&&(!(e||!o(this,t)||!o(M,t)||o(this,A)&&this[A][t])||e)},K=function(t,e){if(t=g(t),e=b(e,!0),t!==B||!o(M,e)||o(N,e)){var n=O(t,e);return!n||!o(M,e)||o(t,A)&&t[A][e]||(n.enumerable=!0),n}},X=function(t){for(var e,n=T(g(t)),r=[],i=0;n.length>i;)o(M,e=n[i++])||e==A||e==c||r.push(e);return r},J=function(t){for(var e,n=t===B,r=T(n?N:g(t)),i=[],a=0;r.length>a;)!o(M,e=r[a++])||n&&!o(B,e)||i.push(M[e]);return i};V||(s((F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(N,n),o(this,A)&&o(this[A],t)&&(this[A][t]=!1),G(this,t,w(1,n))};return i&&H&&G(B,t,{configurable:!0,set:e}),q(t)}).prototype,"toString",function(){return this._k}),k.f=K,E.f=Q,n(225).f=j.f=X,n(124).f=z,n(189).f=J,i&&!n(135)&&s(B,"propertyIsEnumerable",z,!0),d.f=function(t){return q(h(t))}),a(a.G+a.W+a.F*!V,{Symbol:F});for(var Y="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Z=0;Y.length>Z;)h(Y[Z++]);for(var tt=C(h.store),et=0;tt.length>et;)_(tt[et++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=F(t)},keyFor:function(t){if(!$(t))throw TypeError(t+" is not a symbol!");for(var e in I)if(I[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!V,"Object",{create:function(t,e){return void 0===e?x(t):W(x(t),e)},defineProperty:Q,defineProperties:W,getOwnPropertyDescriptor:K,getOwnPropertyNames:X,getOwnPropertySymbols:J}),P&&a(a.S+a.F*(!V||u(function(){var t=F();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!$(t)){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return"function"==typeof(e=r[1])&&(n=e),!n&&y(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!$(e))return e}),r[1]=e,R.apply(P,r)}}}),F.prototype[D]||n(60)(F.prototype,D,F.prototype.valueOf),f(F,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},368:function(t,e,n){var r=n(78),o=n(189),i=n(124);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},369:function(t,e,n){n(167)("asyncIterator")},370:function(t,e,n){n(167)("observable")},38:function(t,e,n){var r=n(120)("wks"),o=n(96),i=n(34).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},390:function(t,e,n){var r=n(18),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},391:function(t,e,n){n(113),n(86),t.exports=n(392)},392:function(t,e,n){var r=n(52),o=n(186);t.exports=n(18).getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},393:function(t,e,n){t.exports={default:n(394),__esModule:!0}},394:function(t,e,n){n(113),n(86),t.exports=n(395)},395:function(t,e,n){var r=n(164),o=n(38)("iterator"),i=n(77);t.exports=n(18).isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},396:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(20)),o=l(n(19)),i=n(9),a=l(i),s=l(n(149)),c=l(n(285)),u=l(n(29));function l(t){return t&&t.__esModule?t:{default:t}}function f(t,e,n){var r=t.openCursor(e);return new a.default(function(t,e){var o=[];r.onerror=function(t){e(new Error("Query failed: "+t.target.errorCode))},r.onsuccess=function(e){var r=e.target.result;r?(o.push(n(r)),r.continue()):t(o)}})}function p(t){return new a.default(function(e,n){t.oncomplete=function(t){e(t)},t.onerror=function(t){n(t.target.error)}})}function h(t){return new a.default(function(e,n){t.onsuccess=function(t){e(t)},t.onerror=function(t){n(t.target.error)}})}function d(t){return new a.default(function(e,n){t.onsuccess=function(){return e(t)},t.onerror=function(t){return n(t)}})}function _(t){return h(t).then(function(t){return t.target.result})}var v=function(t,e){this.indexedDB=t,this._dbName="matrix-js-sdk:"+(e||"default"),this.db=null,this._disconnected=!0,this._syncAccumulator=new c.default,this._isNewlyCreated=!1};v.prototype={connect:function(){var t=this;if(!this._disconnected)return console.log("LocalIndexedDBStoreBackend.connect: already connected or connecting"),a.default.resolve();this._disconnected=!1,console.log("LocalIndexedDBStoreBackend.connect: connecting...");var e=this.indexedDB.open(this._dbName,3);return e.onupgradeneeded=function(e){var n=e.target.result,r=e.oldVersion;console.log("LocalIndexedDBStoreBackend.connect: upgrading from "+r),r<1&&(t._isNewlyCreated=!0,function(t){t.createObjectStore("users",{keyPath:["userId"]}),t.createObjectStore("accountData",{keyPath:["type"]}),t.createObjectStore("sync",{keyPath:["clobber"]})}(n)),r<2&&function(t){t.createObjectStore("oob_membership_events",{keyPath:["room_id","state_key"]}).createIndex("room","room_id")}(n),r<3&&function(t){t.createObjectStore("client_options",{keyPath:["clobber"]})}(n)},e.onblocked=function(){console.log("can't yet open LocalIndexedDBStoreBackend because it is open elsewhere")},console.log("LocalIndexedDBStoreBackend.connect: awaiting connection..."),h(e).then(function(e){return console.log("LocalIndexedDBStoreBackend.connect: connected"),t.db=e.target.result,t.db.onversionchange=function(){t.db.close()},t._init()})},isNewlyCreated:function(){return a.default.resolve(this._isNewlyCreated)},_init:function(){var t=this;return a.default.all([this._loadAccountData(),this._loadSyncData()]).then(function(e){var n=(0,s.default)(e,2),r=n[0],o=n[1];console.log("LocalIndexedDBStoreBackend: loaded initial data"),t._syncAccumulator.accumulate({next_batch:o.nextBatch,rooms:o.roomsData,groups:o.groupsData,account_data:{events:r}})})},getOutOfBandMembers:function(t){var e=this;return new a.default(function(n,r){var o=e.db.transaction(["oob_membership_events"],"readonly").objectStore("oob_membership_events").index("room"),i=IDBKeyRange.only(t),a=o.openCursor(i),s=[],c=!1;a.onsuccess=function(t){var e=t.target.result;if(!e)return s.length||c?n(s):n(null);var r=e.value;r.oob_written?c=!0:s.push(r),e.continue()},a.onerror=function(t){r(t)}}).then(function(e){return console.log("LL: got "+(e&&e.length)+" membershipEvents from storage for room "+t+" ..."),e})},setOutOfBandMembers:function(){var t=(0,i.coroutine)(o.default.mark(function t(e,n){var r,a,s;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("LL: backend about to store "+n.length+" members for "+e),r=this.db.transaction(["oob_membership_events"],"readwrite"),a=r.objectStore("oob_membership_events"),n.forEach(function(t){a.put(t)}),s={room_id:e,oob_written:!0,state_key:0},a.put(s),t.next=8,(0,i.resolve)(p(r));case 8:console.log("LL: backend done storing for "+e+"!");case 9:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),clearOutOfBandMembers:function(){var t=(0,i.coroutine)(o.default.mark(function t(e){var n,r,c,u,l,f,p,h,v,y,m,g,b;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.db.transaction(["oob_membership_events"],"readonly"),r=n.objectStore("oob_membership_events"),c=r.index("room"),u=IDBKeyRange.only(e),l=_(c.openKeyCursor(u,"next")).then(function(t){return t&&t.primaryKey[1]}),f=_(c.openKeyCursor(u,"prev")).then(function(t){return t&&t.primaryKey[1]}),t.next=8,(0,i.resolve)(a.default.all([l,f]));case 8:return p=t.sent,h=(0,s.default)(p,2),v=h[0],y=h[1],m=this.db.transaction(["oob_membership_events"],"readwrite"),g=m.objectStore("oob_membership_events"),b=IDBKeyRange.bound([e,v],[e,y]),console.log("LL: Deleting all users + marker in storage for room "+e+", with key range:",[e,v],[e,y]),t.next=18,(0,i.resolve)(d(g.delete(b)));case 18:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),clearDatabase:function(){var t=this;return new a.default(function(e,n){console.log("Removing indexeddb instance: "+t._dbName);var r=t.indexedDB.deleteDatabase(t._dbName);r.onblocked=function(){console.log("can't yet delete indexeddb "+t._dbName+" because it is open elsewhere")},r.onerror=function(t){console.warn("unable to delete js-sdk store indexeddb: "+t.target.error),e()},r.onsuccess=function(){console.log("Removed indexeddb instance: "+t._dbName),e()}})},getSavedSync:function(t){void 0===t&&(t=!0);var e=this._syncAccumulator.getJSON();return e.nextBatch?t?a.default.resolve(u.default.deepCopy(e)):a.default.resolve(e):a.default.resolve(null)},getNextBatchToken:function(){return a.default.resolve(this._syncAccumulator.getNextBatchToken())},setSyncData:function(t){var e=this;return a.default.resolve().then(function(){e._syncAccumulator.accumulate(t)})},syncToDatabase:function(t){var e=this._syncAccumulator.getJSON();return a.default.all([this._persistUserPresenceEvents(t),this._persistAccountData(e.accountData),this._persistSyncData(e.nextBatch,e.roomsData,e.groupsData)])},_persistSyncData:function(t,e,n){var r=this;return console.log("Persisting sync data up to ",t),a.default.try(function(){var o=r.db.transaction(["sync"],"readwrite");return o.objectStore("sync").put({clobber:"-",nextBatch:t,roomsData:e,groupsData:n}),p(o)})},_persistAccountData:function(t){var e=this;return a.default.try(function(){for(var n=e.db.transaction(["accountData"],"readwrite"),r=n.objectStore("accountData"),o=0;o<t.length;o++)r.put(t[o]);return p(n)})},_persistUserPresenceEvents:function(t){var e=this;return a.default.try(function(){var n=e.db.transaction(["users"],"readwrite"),o=n.objectStore("users"),i=!0,a=!1,s=void 0;try{for(var c,u=(0,r.default)(t);!(i=(c=u.next()).done);i=!0){var l=c.value;o.put({userId:l[0],event:l[1]})}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}return p(n)})},getUserPresenceEvents:function(){var t=this;return a.default.try(function(){return f(t.db.transaction(["users"],"readonly").objectStore("users"),void 0,function(t){return[t.value.userId,t.value.event]})})},_loadAccountData:function(){var t=this;return console.log("LocalIndexedDBStoreBackend: loading account data..."),a.default.try(function(){return f(t.db.transaction(["accountData"],"readonly").objectStore("accountData"),void 0,function(t){return t.value}).then(function(t){return console.log("LocalIndexedDBStoreBackend: loaded account data"),t})})},_loadSyncData:function(){var t=this;return console.log("LocalIndexedDBStoreBackend: loading sync data..."),a.default.try(function(){return f(t.db.transaction(["sync"],"readonly").objectStore("sync"),void 0,function(t){return t.value}).then(function(t){return console.log("LocalIndexedDBStoreBackend: loaded sync data"),t.length>1&&console.warn("loadSyncData: More than 1 sync row found."),t.length>0?t[0]:{}})})},getClientOptions:function(){var t=this;return a.default.resolve().then(function(){return f(t.db.transaction(["client_options"],"readonly").objectStore("client_options"),void 0,function(t){if(t.value&&t.value&&t.value.options)return t.value.options}).then(function(t){return t[0]})})},storeClientOptions:function(){var t=(0,i.coroutine)(o.default.mark(function t(e){var n;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.db.transaction(["client_options"],"readwrite"),n.objectStore("client_options").put({clobber:"-",options:e}),t.next=5,(0,i.resolve)(p(n));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},e.default=v},4:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},44:function(t,e,n){t.exports=!n(58)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},46:function(t,e,n){var r=n(52),o=n(161),i=n(116),a=Object.defineProperty;e.f=n(44)?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}},5:function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(223));e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,r.default)(t,o.key,o)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},51:function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(211));e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,r.default)(t)}},52:function(t,e,n){var r=n(35);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},54:function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&h())}function h(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function _(){}o.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];u.push(new d(t,e)),1!==u.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=_,o.addListener=_,o.once=_,o.off=_,o.removeListener=_,o.removeAllListeners=_,o.emit=_,o.prependListener=_,o.prependOnceListener=_,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},58:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},59:function(t,e,n){var r=n(163),o=n(112);t.exports=function(t){return r(o(t))}},60:function(t,e,n){var r=n(46),o=n(76);t.exports=n(44)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},61:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},64:function(t,e,n){"use strict";e.__esModule=!0;var r=a(n(361)),o=a(n(365)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof o.default&&"symbol"===i(r.default)?function(t){return void 0===t?"undefined":i(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":i(t)}},66:function(t,e,n){var r=n(94);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)}}},67:function(t,e,n){t.exports={default:n(357),__esModule:!0}},68:function(t,e,n){var r=n(26),o=n(18),i=n(58);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)}},76:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},77:function(t,e){t.exports={}},78:function(t,e,n){var r=n(162),o=n(121);t.exports=Object.keys||function(t){return r(t,o)}},86:function(t,e,n){"use strict";var r=n(353)(!0);n(185)(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})})},87:function(t,e,n){var r=n(112);t.exports=function(t){return Object(r(t))}},9:function(t,e,n){(function(e,n,r){t.exports=function(){var t,o,i;return function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof _dereq_&&_dereq_,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){"use strict";e.exports=function(t){var e=t._SomePromiseArray;function n(t){var n=new e(t),r=n.promise();return n.setHowMany(1),n.setUnwrap(),n.init(),r}t.any=function(t){return n(t)},t.prototype.any=function(){return n(this)}}},{}],2:[function(t,n,r){"use strict";var o;try{throw new Error}catch(t){o=t}var i=t("./schedule"),a=t("./queue"),s=t("./util");function c(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new a(16),this._normalQueue=new a(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function u(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function l(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function f(t){this._normalQueue._pushOne(t),this._queueTick()}function p(t){for(;t.length()>0;)h(t)}function h(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}c.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},c.prototype.hasCustomScheduler=function(){return this._customScheduler},c.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},c.prototype.disableTrampolineIfNecessary=function(){s.hasDevTools&&(this._trampolineEnabled=!1)},c.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},c.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},c.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?(c.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?u.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},c.prototype.invoke=function(t,e,n){this._trampolineEnabled?l.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},c.prototype.settlePromises=function(t){this._trampolineEnabled?f.call(this,t):this._schedule(function(){t._settlePromises()})}):(c.prototype.invokeLater=u,c.prototype.invoke=l,c.prototype.settlePromises=f),c.prototype._drainQueues=function(){p(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,p(this._lateQueue)},c.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},c.prototype._reset=function(){this._isTickUsed=!1},n.exports=c,n.exports.firstLineError=o},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.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)},c=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 u=n(i),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(u),u instanceof t){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:u};f._then(e,a,void 0,l,p),u._then(s,c,void 0,l,p),l._setOnCancel(u)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";var r;"undefined"!=typeof Promise&&(r=Promise);var o=t("./promise")();o.noConflict=function(){try{Promise===o&&(Promise=r)}catch(t){}return o},e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var o=r(null),i=r(null);o[" size"]=i[" size"]=0}e.exports=function(e){var n=t("./util"),r=n.canEvaluate;function o(t){var r=this.pop(),o=function(t,r){var o;if(null!=t&&(o=t[r]),"function"!=typeof o){var i="Object "+n.classString(t)+" has no method '"+n.toString(r)+"'";throw new e.TypeError(i)}return o}(t,r);return o.apply(t,this)}function i(t){return t[this]}function a(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}n.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(o,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=a;else if(r){var o=(void 0)(t);e=null!==o?o:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i=t("./util"),a=i.tryCatch,s=i.errorObj,c=e._async;e.prototype.break=e.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}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.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),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){var n=t("./util"),r=t("./es5").keys,o=n.tryCatch,i=n.errorObj;return function(t,a,s){return function(c){var u=s._boundValue();t:for(var l=0;l<t.length;++l){var f=t[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(c instanceof f)return o(a).call(u,c)}else if("function"==typeof f){var p=o(f).call(u,c);if(p===i)return p;if(p)return o(a).call(u,c)}else if(n.isObject(c)){for(var h=r(f),d=0;d<h.length;++d){var _=h[d];if(f[_]!=c[_])continue t}return o(a).call(u,c)}}return e}}}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){var e=!1,n=[];function r(){this._trace=new r.CapturedTrace(o())}function o(){var t=n.length-1;if(t>=0)return n[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},r.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},r.prototype._popContext=function(){if(void 0!==this._trace){var t=n.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},r.CapturedTrace=null,r.create=function(){if(e)return new r},r.deactivateLongStackTraces=function(){},r.activateLongStackTraces=function(){var n=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;r.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,e=!1},e=!0,t.prototype._pushContext=r.prototype._pushContext,t.prototype._popContext=r.prototype._popContext,t._peekContext=t.prototype._peekContext=o,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},r}},{}],9:[function(t,n,r){"use strict";n.exports=function(n,r){var o,i,a,s=n._getDomain,c=n._async,u=t("./errors").Warning,l=t("./util"),f=t("./es5"),p=l.canAttachTrace,h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,d=/\((?:timers\.js):\d+:\d+\)/,_=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,v=null,y=null,m=!1,g=!(0==l.env("BLUEBIRD_DEBUG")),b=!(0==l.env("BLUEBIRD_WARNINGS")||!g&&!l.env("BLUEBIRD_WARNINGS")),w=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!g&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),x=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(b||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){$("rejectionHandled",o,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 t=this._settledValue();this._setUnhandledRejectionIsNotified(),$("unhandledRejection",i,t,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(t,e,n){return U(t,e,n||this)},n.onPossiblyUnhandledRejection=function(t){var e=s();i="function"==typeof t?null===e?t:l.domainBind(e,t):void 0},n.onUnhandledRejectionHandled=function(t){var e=s();o="function"==typeof t?null===e?t:l.domainBind(e,t):void 0};var j=function(){};n.longStackTraces=function(){if(c.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Z.longStackTraces&&W()){var t=n.prototype._captureStackTrace,e=n.prototype._attachExtraTrace,o=n.prototype._dereferenceTrace;Z.longStackTraces=!0,j=function(){if(c.haveItemsQueued()&&!Z.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=t,n.prototype._attachExtraTrace=e,n.prototype._dereferenceTrace=o,r.deactivateLongStackTraces(),c.enableTrampoline(),Z.longStackTraces=!1},n.prototype._captureStackTrace=N,n.prototype._attachExtraTrace=B,n.prototype._dereferenceTrace=V,r.activateLongStackTraces(),c.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return Z.longStackTraces&&W()};var k=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return l.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};f.defineProperty(n,"promise",{value:e.promise}),f.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!l.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return l.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,f.defineProperty(n,"promise",{value:e.promise}),f.defineProperty(n,"reason",{value:e.reason}),!l.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!l.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),E=l.isNode?function(){return e.emit.apply(e,arguments)}:l.global?function(t){var e="on"+t.toLowerCase(),n=l.global[e];return!!n&&(n.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function C(t,e){return{promise:e}}var O={promiseCreated:C,promiseFulfilled:C,promiseRejected:C,promiseResolved:C,promiseCancelled:C,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:C},S=function(t){var e=!1;try{e=E.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var n=!1;try{n=k(t,O[t].apply(null,arguments))}catch(t){c.throwLater(t),n=!0}return n||e};function T(){return!1}function F(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: "+l.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?l.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function R(){return this._onCancelField}function A(t){this._onCancelField=t}function D(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}n.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?n.longStackTraces():!t.longStackTraces&&n.hasLongStackTraces()&&j()),"warnings"in t){var e=t.warnings;Z.warnings=!!e,x=Z.warnings,l.isObject(e)&&"wForgottenReturn"in e&&(x=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!Z.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=D,n.prototype._propagateFrom=L,n.prototype._onCancel=R,n.prototype._setOnCancel=A,n.prototype._attachCancellationCallback=P,n.prototype._execute=F,I=L,Z.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!Z.monitoring?(Z.monitoring=!0,n.prototype._fireEvent=S):!t.monitoring&&Z.monitoring&&(Z.monitoring=!1,n.prototype._fireEvent=T)),n},n.prototype._fireEvent=T,n.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(t){},n.prototype._attachCancellationCallback=function(t){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._dereferenceTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(t,e){};var I=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function M(){var t=this._boundTo;return void 0!==t&&t instanceof n?t.isFulfilled()?t.value():void 0:t}function N(){this._trace=new J(this._peekContext())}function B(t,e){if(p(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=G(t);l.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),l.notEnumerableProp(t,"__stackCleaned__",!0)}}}function V(){this._trace=void 0}function U(t,e,r){if(Z.warnings){var o,i=new u(t);if(e)r._attachExtraTrace(i);else if(Z.longStackTraces&&(o=n._peekContext()))o.attachExtraTrace(i);else{var a=G(i);i.stack=a.message+"\n"+a.stack.join("\n")}S("warning",i)||q(i,"",!0)}}function H(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],o=" (No stack trace)"===r||v.test(r),i=o&&z(r);o&&!i&&(m&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function G(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||v.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:H(e)}}function q(t,e,n){if("undefined"!=typeof console){var r;if(l.isObject(t)){var o=t.stack;r=e+y(o,t)}else r=e+String(t);"function"==typeof a?a(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function $(t,e,n,r){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){c.throwLater(t)}"unhandledRejection"===t?S(t,n,r)||o||q(n,"Unhandled rejection "):S(t,r)}function Q(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():l.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){return t.length<41?t:t.substr(0,38)+"..."}(e)+">, no stack trace)"}function W(){return"function"==typeof Y}var z=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function X(t){var e=t.match(K);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function J(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);Y(this,J),e>32&&this.uncycle()}l.inherits(J,Error),r.CapturedTrace=J,J.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;for(var r=(t=this._length=r)-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 c=r>0?e[r-1]:this;s<t-1?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var u=c._length+1,l=r-2;l>=0;--l)e[l]._length=u,u++;return}}}},J.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=G(t),n=e.message,r=[e.stack],o=this;void 0!==o;)r.push(H(o.stack.split("\n"))),o=o._parent;!function(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 c=r[s];if(e[o]!==c)break;e.pop(),o--}e=r}}(r),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(r),l.notEnumerableProp(t,"stack",function(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}(n,r)),l.notEnumerableProp(t,"__stackCleaned__",!0)}};var Y=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():Q(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,v=t,y=e;var n=Error.captureStackTrace;return z=function(t){return h.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r,o=new Error;if("string"==typeof o.stack&&o.stack.split("\n")[0].indexOf("stackDetection@")>=0)return v=/@/,y=e,m=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){r="stack"in t}return"stack"in o||!r||"number"!=typeof Error.stackTraceLimit?(y=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?Q(e):e.toString()},null):(v=t,y=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&&(a=function(t){console.warn(t)},l.isNode&&e.stderr.isTTY?a=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:l.isNode||"string"!=typeof(new Error).stack||(a=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var Z={warnings:b,longStackTraces:!1,cancellation:!1,monitoring:!1};return w&&n.longStackTraces(),{longStackTraces:function(){return Z.longStackTraces},warnings:function(){return Z.warnings},cancellation:function(){return Z.cancellation},monitoring:function(){return Z.monitoring},propagateFromFunction:function(){return I},boundValueFunction:function(){return M},checkForgottenReturns:function(t,e,n,r,o){if(void 0===t&&null!==e&&x){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"),c=H(s),u=c.length-1;u>=0;--u){var l=c[u];if(!d.test(l)){var f=l.match(_);f&&(i="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(c.length>0)for(var p=c[0],u=0;u<s.length;++u)if(s[u]===p){u>0&&(a="\n"+s[u-1]);break}}var h="a promise was created in a "+n+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}},setBounds:function(t,e){if(W()){for(var n,r,o=t.stack.split("\n"),i=e.stack.split("\n"),a=-1,s=-1,c=0;c<o.length;++c){var u=X(o[c]);if(u){n=u.fileName,a=u.line;break}}for(var c=0;c<i.length;++c){var u=X(i[c]);if(u){r=u.fileName,s=u.line;break}}a<0||s<0||!n||!r||n!==r||a>=s||(z=function(t){if(h.test(t))return!0;var e=X(t);return!!(e&&e.fileName===n&&a<=e.line&&e.line<=s)})}},warn:U,deprecated:function(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),U(n)},CapturedTrace:J,fireDomEvent:k,fireGlobalEvent:E}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];return r instanceof t&&r.suppressUnhandledRejections(),this.caught(n,function(){return r})}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.reduce,r=t.all;function o(){return r(this)}t.prototype.each=function(t){return n(this,t,e,0)._then(o,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return n(this,t,e,e)},t.each=function(t,r){return n(t,r,e,0)._then(o,void 0,void 0,t,void 0)},t.mapSeries=function(t,r){return n(t,r,e,e)}}},{}],12:[function(t,e,n){"use strict";var r,o,i=t("./es5"),a=i.freeze,s=t("./util"),c=s.inherits,u=s.notEnumerableProp;function l(t,e){function n(r){if(!(this instanceof n))return new n(r);u(this,"message","string"==typeof r?r:e),u(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(n,Error),n}var f=l("Warning","warning"),p=l("CancellationError","cancellation error"),h=l("TimeoutError","timeout error"),d=l("AggregateError","aggregate error");try{r=TypeError,o=RangeError}catch(t){r=l("TypeError","type error"),o=l("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<_.length;++v)"function"==typeof Array.prototype[_[v]]&&(d.prototype[_[v]]=Array.prototype[_[v]]);i.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function m(t){if(!(this instanceof m))return new m(t);u(this,"name","OperationalError"),u(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(u(this,"message",t.message),u(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+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 y--,e},c(m,Error);var g=Error.__BluebirdErrorTypes__;g||(g=a({CancellationError:p,TimeoutError:h,OperationalError:m,RejectionError:m,AggregateError:d}),i.defineProperty(Error,"__BluebirdErrorTypes__",{value:g,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:r,RangeError:o,CancellationError:g.CancellationError,OperationalError:g.OperationalError,TimeoutError:g.TimeoutError,AggregateError:g.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.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 n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var o={}.hasOwnProperty,i={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var n in t)o.call(t,n)&&e.push(n);return e};e.exports={isArray:function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}},keys:s,names:s,defineProperty:function(t,e,n){return t[e]=n.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return a}},isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.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)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n,r){var o=t("./util"),i=e.CancellationError,a=o.errorObj,s=t("./catch_filter")(r);function c(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function u(t){this.finallyHandler=t}function l(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function f(){return h.call(this,this.promise._target()._settledValue())}function p(t){if(!l(this,t))return a.e=t,a}function h(t){var o=this.promise,s=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?s.call(o._boundValue()):s.call(o._boundValue(),t);if(c===r)return c;if(void 0!==c){o._setReturnedNonUndefined();var h=n(c,o);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new i("late cancellation observer");return o._attachExtraTrace(d),a.e=d,a}h.isPending()&&h._attachCancellationCallback(new u(this))}return h._then(f,p,void 0,this,void 0)}}}return o.isRejected()?(l(this),a.e=t,a):(l(this),t)}return c.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){l(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new c(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,h,h)},e.prototype.tap=function(t){return this._passThrough(t,1,h)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,h);var r,i=new Array(n-1),a=0;for(r=0;r<n-1;++r){var c=arguments[r];if(!o.isObject(c))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+o.classString(c)));i[a++]=c}i.length=a;var u=arguments[r];return this._passThrough(s(i,u,this),1,void 0,h)},c}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=t("./errors"),c=s.TypeError,u=t("./util"),l=u.errorObj,f=u.tryCatch,p=[];function h(t,n,o,i){if(a.cancellation()){var s=new e(r),c=this._finallyPromise=new e(r);this._promise=s.lastly(function(){return c}),s._captureStackTrace(),s._setOnCancel(this)}else{var u=this._promise=new e(r);u._captureStackTrace()}this._stack=i,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(p):p,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(h,i),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n=void 0!==this._generator.return;if(n)this._promise._pushContext(),t=f(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=f(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},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 e){var t=this._yieldedPromise;this._yieldedPromise=null,t.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(t){var n=this._promise;if(t===l)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var i=o(r,this._promise);if(i instanceof e||null!==(i=function(t,n,r){for(var i=0;i<n.length;++i){r._pushContext();var a=f(n[i])(t);if(r._popContext(),a===l){r._pushContext();var s=e.reject(l.e);return r._popContext(),s}var c=o(a,r);if(c instanceof e)return c}return null}(i,this._yieldHandlers,this._promise))){var a=(i=i._target())._bitField;0==(50397184&a)?(this._yieldedPromise=i,i._proxy(this,null)):0!=(33554432&a)?e._async.invoke(this._promiseFulfilled,this,i._value()):0!=(16777216&a)?e._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()}else this._promiseRejected(new c("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},e.coroutine=function(t,e){if("function"!=typeof t)throw new c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=h,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}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new c("expecting a function but got "+u.classString(t));p.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new h(t,this),o=r.promise();return r._run(e.spawn),o}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj,e.join=function(){var t,e=arguments.length-1;e>0&&"function"==typeof arguments[e]&&(t=arguments[e]);var r=[].slice.call(arguments);t&&r.pop();var o=new n(r).promise();return void 0!==t?o.spread(t):o}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=e._getDomain,c=t("./util"),u=c.tryCatch,l=c.errorObj,f=e._async;function p(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var o=s();this._callback=null===o?e:c.domainBind(o,e),this._preservedValues=r===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function h(t,n,o,i){if("function"!=typeof n)return r("expecting a function but got "+c.classString(n));var a=0;if(void 0!==o){if("object"!=typeof o||null===o)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(o)));if("number"!=typeof o.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(o.concurrency)));a=o.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new p(t,n,a,i).promise()}c.inherits(p,n),p.prototype._asyncInit=function(){this._init$(void 0,-2)},p.prototype._init=function(){},p.prototype._promiseFulfilled=function(t,n){var r=this._values,i=this.length(),s=this._preservedValues,c=this._limit;if(n<0){if(r[n=-1*n-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==s&&(s[n]=t);var f=this._promise,p=this._callback,h=f._boundValue();f._pushContext();var d=u(p).call(h,t,n,i),_=f._popContext();if(a.checkForgottenReturns(d,_,null!==s?"Promise.filter":"Promise.map",f),d===l)return this._reject(d.e),!0;var v=o(d,this._promise);if(v instanceof e){var y=(v=v._target())._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(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)},p.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)}},p.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)},p.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return h(this,t,e,null)},e.map=function(t,e,n,r){return h(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var o=s(t).apply(this,arguments),a=r._popContext();return i.checkForgottenReturns(o,a,"Promise.method",r),r._resolveFromSyncValue(o),r}},e.attempt=e.try=function(t){if("function"!=typeof t)return o("expecting a function but got "+a.classString(t));var r,c=new e(n);if(c._captureStackTrace(),c._pushContext(),arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];r=a.isArray(u)?s(t).apply(l,u):s(t).call(l,u)}else r=s(t)();var f=c._popContext();return i.checkForgottenReturns(r,f,"Promise.try",c),c._resolveFromSyncValue(r),c},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";var r=t("./util"),o=r.maybeWrapAsError,i=t("./errors"),a=i.OperationalError,s=t("./es5"),c=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new a(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var n=s.keys(t),o=0;o<n.length;++o){var i=n[o];c.test(i)||(e[i]=t[i])}return e}return r.markAsOriginatingFromRejection(t),t}e.exports=function(t,e){return function(n,r){if(null!==t){if(n){var i=u(o(n));t._attachExtraTrace(i),t._reject(i)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(r);t=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){var n=t("./util"),r=e._async,o=n.tryCatch,i=n.errorObj;function a(t,e){if(!n.isArray(t))return s.call(this,t,e);var a=o(e).apply(this._boundValue(),[null].concat(t));a===i&&r.throwLater(a.e)}function s(t,e){var n=this._boundValue(),a=void 0===t?o(e).call(n,null):o(e).call(n,null,t);a===i&&r.throwLater(a.e)}function c(t,e){if(!t){var n=new Error(t+"");n.cause=t,t=n}var a=o(e).call(this._boundValue(),t);a===i&&r.throwLater(a.e)}e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var n=s;void 0!==e&&Object(e).spread&&(n=a),this._then(n,c,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,n,r){"use strict";n.exports=function(){var r=function(){return new d("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},o=function(){return new T.PromiseInspection(this._target())},i=function(t){return T.reject(new d(t))};function a(){}var s,c={},u=t("./util");s=u.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},u.notEnumerableProp(T,"_getDomain",s);var l=t("./es5"),f=t("./async"),p=new f;l.defineProperty(T,"_async",{value:p});var h=t("./errors"),d=T.TypeError=h.TypeError;T.RangeError=h.RangeError;var _=T.CancellationError=h.CancellationError;T.TimeoutError=h.TimeoutError,T.OperationalError=h.OperationalError,T.RejectionError=h.OperationalError,T.AggregateError=h.AggregateError;var v=function(){},y={},m={},g=t("./thenables")(T,v),b=t("./promise_array")(T,v,g,i,a),w=t("./context")(T),x=w.create,j=t("./debuggability")(T,w),k=(j.CapturedTrace,t("./finally")(T,g,m)),E=t("./catch_filter")(m),C=t("./nodeback"),O=u.errorObj,S=u.tryCatch;function T(t){t!==v&&function(t,e){if(null==t||t.constructor!==T)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 "+u.classString(e))}(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function F(t){this.promise._resolveCallback(t)}function P(t){this.promise._rejectCallback(t,!1)}function R(t){var e=new T(v);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return T.prototype.toString=function(){return"[object Promise]"},T.prototype.caught=T.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 a=arguments[n];if(!u.isObject(a))return i("Catch statement predicate: expecting an object but got "+u.classString(a));r[o++]=a}return r.length=o,t=arguments[n],this.then(void 0,E(r,t,this))}return this.then(void 0,t)},T.prototype.reflect=function(){return this._then(o,o,void 0,this,void 0)},T.prototype.then=function(t,e){if(j.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(n+=", "+u.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},T.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},T.prototype.spread=function(t){return"function"!=typeof t?i("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,y,void 0)},T.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},T.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new b(this).promise()},T.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},T.getNewLibraryCopy=n.exports,T.is=function(t){return t instanceof T},T.fromNode=T.fromCallback=function(t){var e=new T(v);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=S(t)(C(e,n));return r===O&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},T.all=function(t){return new b(t).promise()},T.cast=function(t){var e=g(t);return e instanceof T||((e=new T(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},T.resolve=T.fulfilled=T.cast,T.reject=T.rejected=function(t){var e=new T(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},T.setScheduler=function(t){if("function"!=typeof t)throw new d("expecting a function but got "+u.classString(t));return p.setScheduler(t)},T.prototype._then=function(t,e,n,r,o){var i=void 0!==o,a=i?o:new T(v),c=this._target(),l=c._bitField;i||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var f=s();if(0!=(50397184&l)){var h,d,y=c._settlePromiseCtx;0!=(33554432&l)?(d=c._rejectionHandler0,h=t):0!=(16777216&l)?(d=c._fulfillmentHandler0,h=e,c._unsetRejectionIsUnhandled()):(y=c._settlePromiseLateCancellationObserver,d=new _("late cancellation observer"),c._attachExtraTrace(d),h=e),p.invoke(y,c,{handler:null===f?h:"function"==typeof h&&u.domainBind(f,h),promise:a,receiver:r,value:d})}else c._addCallbacks(t,e,a,r,f);return a},T.prototype._length=function(){return 65535&this._bitField},T.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},T.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},T.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},T.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},T.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},T.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},T.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},T.prototype._isFinal=function(){return(4194304&this._bitField)>0},T.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},T.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},T.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},T.prototype._setAsyncGuaranteed=function(){p.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},T.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==c)return void 0===e&&this._isBound()?this._boundValue():e},T.prototype._promiseAt=function(t){return this[4*t-4+2]},T.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},T.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},T.prototype._boundValue=function(){},T.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,n=t._rejectionHandler0,r=t._promise0,o=t._receiverAt(0);void 0===o&&(o=c),this._addCallbacks(e,n,r,o,null)},T.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=c),this._addCallbacks(n,r,o,i,null)},T.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:u.domainBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:u.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:u.domainBind(o,t)),"function"==typeof e&&(this[a+1]=null===o?e:u.domainBind(o,e))}return this._setLength(i+1),i},T.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},T.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(r(),!1);var n=g(t,this);if(!(n instanceof T))return this._fulfill(t);e&&this._propagateFrom(n,2);var o=n._target();if(o!==this){var i=o._bitField;if(0==(50397184&i)){var a=this._length();a>0&&o._migrateCallback0(this);for(var s=1;s<a;++s)o._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(o)}else if(0!=(33554432&i))this._fulfill(o._value());else if(0!=(16777216&i))this._reject(o._reason());else{var c=new _("late cancellation observer");o._attachExtraTrace(c),this._reject(c)}}else this._reject(r())}},T.prototype._rejectCallback=function(t,e,n){var r=u.ensureErrorObject(t),o=r===t;if(!o&&!n&&j.warnings()){var i="a promise was rejected with a non-error: "+u.classString(t);this._warn(i,!0)}this._attachExtraTrace(r,!!e&&o),this._reject(t)},T.prototype._resolveFromExecutor=function(t){if(t!==v){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)}},T.prototype._settlePromiseFromHandler=function(t,e,n,r){var o=r._bitField;if(0==(65536&o)){var i;r._pushContext(),e===y?n&&"number"==typeof n.length?i=S(t).apply(this._boundValue(),n):(i=O).e=new d("cannot .spread() a non-array: "+u.classString(n)):i=S(t).call(e,n);var a=r._popContext();0==(65536&(o=r._bitField))&&(i===m?r._reject(n):i===O?r._rejectCallback(i.e,!1):(j.checkForgottenReturns(i,a,"",r,this),r._resolveCallback(i)))}},T.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},T.prototype._followee=function(){return this._rejectionHandler0},T.prototype._setFollowee=function(t){this._rejectionHandler0=t},T.prototype._settlePromise=function(t,e,n,r){var i=t instanceof T,s=this._bitField,c=0!=(134217728&s);0!=(65536&s)?(i&&t._invokeInternalOnCancel(),n instanceof k&&n.isFinallyHandler()?(n.cancelPromise=t,S(e).call(n,r)===O&&t._reject(O.e)):e===o?t._fulfill(o.call(n)):n instanceof a?n._promiseCancelled(t):i||t instanceof b?t._cancel():n.cancel()):"function"==typeof e?i?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,n,r,t)):e.call(n,r,t):n instanceof a?n._isResolved()||(0!=(33554432&s)?n._promiseFulfilled(r,t):n._promiseRejected(r,t)):i&&(c&&t._setAsyncGuaranteed(),0!=(33554432&s)?t._fulfill(r):t._reject(r))},T.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof T?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof T&&n._reject(o)},T.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},T.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)},T.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},T.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():p.settlePromises(this),this._dereferenceTrace())}},T.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return p.fatalError(t,u.isNode);(65535&e)>0?p.settlePromises(this):this._ensurePossibleRejectionHandled()}},T.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)}},T.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)}},T.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()},T.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},T.defer=T.pending=function(){j.deprecated("Promise.defer","new Promise");var t=new T(v);return{promise:t,resolve:F,reject:P}},u.notEnumerableProp(T,"_makeSelfResolutionError",r),t("./method")(T,v,g,i,j),t("./bind")(T,v,g,j),t("./cancel")(T,b,i,j),t("./direct_resolve")(T),t("./synchronous_inspection")(T),t("./join")(T,b,g,v,p,s),T.Promise=T,T.version="3.5.2",t("./map.js")(T,b,i,g,v,j),t("./call_get.js")(T),t("./using.js")(T,i,g,x,v,j),t("./timers.js")(T,v,j),t("./generators.js")(T,i,v,g,a,j),t("./nodeify.js")(T),t("./promisify.js")(T,v),t("./props.js")(T,b,g,i),t("./race.js")(T,v,g,i),t("./reduce.js")(T,b,i,g,v,j),t("./settle.js")(T,b,j),t("./some.js")(T,b,i),t("./filter.js")(T,v),t("./each.js")(T,v),t("./any.js")(T),u.toFastProperties(T),u.toFastProperties(T.prototype),R({a:1}),R({b:2}),R({c:3}),R(1),R(function(){}),R(void 0),R(!1),R(new T(v)),j.setBounds(f.firstLineError,u.lastLineError),T}},{"./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(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var a=t("./util");function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(s,i),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(n,i){var s=r(this._values,this._promise);if(s instanceof e){var c=(s=s._target())._bitField;if(this._values=s,0==(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,i);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===i?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(i));else{var u=o("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(u,!1)}},s.prototype._iterate=function(t){var n=this.getActualLength(t.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 c=r(t[s],o);c instanceof e?(c=c._target(),a=c._bitField):a=null,i?null!==a&&c.suppressUnhandledRejections():null!==a?0==(50397184&a)?(c._proxy(this,s),this._values[s]=c):i=0!=(33554432&a)?this._promiseFulfilled(c._value(),s):0!=(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):i=this._promiseFulfilled(c,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 t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){var r={},o=t("./util"),i=t("./nodeback"),a=o.withAppended,s=o.maybeWrapAsError,c=o.canEvaluate,u=t("./errors").TypeError,l={__isPromisified__:!0},f=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),p=function(t){return o.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function h(t){return!f.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function _(t,e,n){var r=o.getDataPropertyOrDefault(t,e+n,l);return!!r&&d(r)}function v(t,e,n,r){for(var i=o.inheritedDataKeys(t),a=[],s=0;s<i.length;++s){var c=i[s],l=t[c],f=r===p||p(c,l,t);"function"!=typeof l||d(l)||_(t,c,e)||!r(c,l,t,f)||a.push(c,l)}return function(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 u("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(a,e,n),a}var y=function(t){return t.replace(/([$])/,"\\$")},m=c?void 0:function(t,c,u,l,f,p){var h=function(){return this}(),d=t;function _(){var o=c;c===r&&(o=this);var u=new e(n);u._captureStackTrace();var l="string"==typeof d&&this!==h?this[d]:t,f=i(u,p);try{l.apply(o,a(arguments,f))}catch(t){u._rejectCallback(s(t),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return"string"==typeof d&&(t=l),o.notEnumerableProp(_,"__isPromisified__",!0),_};function g(t,e,n,i,a){for(var s=new RegExp(y(e)+"$"),c=v(t,e,s,n),u=0,l=c.length;u<l;u+=2){var f=c[u],p=c[u+1],h=f+e;if(i===m)t[h]=m(f,r,f,p,e,a);else{var d=i(p,function(){return m(f,r,f,p,e,a)});o.notEnumerableProp(d,"__isPromisified__",!0),t[h]=d}}return o.toFastProperties(t),t}e.promisify=function(t,e){if("function"!=typeof t)throw new u("expecting a function but got "+o.classString(t));if(d(t))return t;var n=void 0===(e=Object(e)).context?r:e.context,i=!!e.multiArgs,a=function(t,e,n){return m(t,e,void 0,t,null,n)}(t,n,i);return o.copyDescriptors(t,a,h),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new u("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(e=Object(e)).multiArgs,r=e.suffix;"string"!=typeof r&&(r="Async");var i=e.filter;"function"!=typeof i&&(i=p);var a=e.promisifier;if("function"!=typeof a&&(a=m),!o.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=o.inheritedDataKeys(t),c=0;c<s.length;++c){var l=t[s[c]];"constructor"!==s[c]&&o.isClass(l)&&(g(l.prototype,r,i,a,n),g(l,r,i,a,n))}return g(t,r,i,a,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i,a=t("./util"),s=a.isObject,c=t("./es5");"function"==typeof Map&&(i=Map);var u=function(){var t=0,e=0;function n(n,r){this[t]=n,this[t+e]=r,t++}return function(r){e=r.size,t=0;var o=new Array(2*r.size);return r.forEach(n,o),o}}();function l(t){var e,n=!1;if(void 0!==i&&t instanceof i)e=u(t),n=!0;else{var r=c.keys(t),o=r.length;e=new Array(2*o);for(var a=0;a<o;++a){var s=r[a];e[a]=t[s],e[a+o]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function f(t){var n,i=r(t);return s(i)?(n=i instanceof e?i._then(e.props,void 0,void 0,void 0,void 0):new l(i).promise(),i instanceof e&&n._propagateFrom(i,2),n):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(l,n),l.prototype._init=function(){},l.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=function(t){for(var e=new i,n=t.length/2|0,r=0;r<n;++r){var o=t[n+r],a=t[r];e.set(o,a)}return e}(this._values);else{r={};for(var o=this.length(),a=0,s=this.length();a<s;++a)r[this._values[a+o]]=this._values[a]}return this._resolve(r),!0}return!1},l.prototype.shouldCopyValues=function(){return!1},l.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return f(this)},e.props=function(t){return f(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"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);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 n=this._front,r=this._length,o=n+r&e-1;!function(t,e,n,r,o){for(var i=0;i<o;++i)n[i+r]=t[i+e],t[i+e]=void 0}(this,0,this,e,o)},e.exports=r},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i=t("./util"),a=function(t){return t.then(function(e){return s(e,t)})};function s(t,s){var c=r(t);if(c instanceof e)return a(c);if(null===(t=i.asArray(t)))return o("expecting an array or an iterable object but got "+i.classString(t));var u=new e(n);void 0!==s&&u._propagateFrom(s,3);for(var l=u._fulfill,f=u._reject,p=0,h=t.length;p<h;++p){var d=t[p];(void 0!==d||p in t)&&e.cast(d)._then(l,f,void 0,u,null)}return u}e.race=function(t){return s(t,void 0)},e.prototype.race=function(){return s(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=e._getDomain,c=t("./util"),u=c.tryCatch;function l(t,n,r,o){this.constructor$(t);var a=s();this._fn=null===a?n:c.domainBind(a,n),void 0!==r&&(r=e.resolve(r))._attachCancellationCallback(this),this._initialValue=r,this._currentCancellable=null,this._eachValues=o===i?Array(this._length):0===o?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function f(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function p(t,e,n,o){if("function"!=typeof e)return r("expecting a function but got "+c.classString(e));var i=new l(t,e,n,o);return i.promise()}function h(t){this.accum=t,this.array._gotAccum(t);var n=o(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(d,void 0,void 0,this,void 0)):d.call(this,n)}function d(t){var n,r=this.array,o=r._promise,i=u(r._fn);o._pushContext(),(n=void 0!==r._eachValues?i.call(o._boundValue(),t,this.index,this.length):i.call(o._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(r._currentCancellable=n);var s=o._popContext();return a.checkForgottenReturns(n,s,void 0!==r._eachValues?"Promise.each":"Promise.reduce",o),n}c.inherits(l,n),l.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==i&&this._eachValues.push(t)},l.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},l.prototype._init=function(){},l.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},l.prototype.shouldCopyValues=function(){return!1},l.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},l.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},l.prototype._iterate=function(t){var n,r;this._values=t;var o=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;r<o;++r){var i={accum:null,value:t[r],index:r,length:o,array:this};n=n._then(h,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(f,f,void 0,n,this)},e.prototype.reduce=function(t,e){return p(this,t,e,null)},e.reduce=function(t,e,n,r){return p(t,e,n,r)}}},{"./util":36}],29:[function(t,o,i){"use strict";var a,s=t("./util"),c=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var u=n.setImmediate,l=e.nextTick;a=s.isRecentNode?function(t){u.call(n,t)}:function(t){l.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var f=c.resolve();a=function(t){f.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?void 0!==r?function(t){r(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")}: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});return o.observe(r,e),function(o){var i=new MutationObserver(function(){i.disconnect(),o()});i.observe(t,e),n||(n=!0,r.classList.toggle("foo"))}}();o.exports=a},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){var o=e.PromiseInspection,i=t("./util");function a(t){this.constructor$(t)}i.inherits(a,n),a.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},a.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new a(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){var o=t("./util"),i=t("./errors").RangeError,a=t("./errors").AggregateError,s=o.isArray,c={};function u(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(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 u(t),o=n.promise();return n.setHowMany(e),n.init(),o}o.inherits(u,n),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(t){this._howMany=t},u.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)},u.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e<this._values.length;++e)this._values[e]!==c&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(t){this._values.push(t)},u.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new i(e)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return l(t,e)},e.prototype.some=function(t){return l(this,t)},e._SomePromiseArray=u}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.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}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){var r=t("./util"),o=r.errorObj,i=r.isObject,a={}.hasOwnProperty;return function(t,s){if(i(t)){if(t instanceof e)return t;var c=function(t){try{return function(t){return t.then}(t)}catch(t){return o.e=t,o}}(t);if(c===o){s&&s._pushContext();var u=e.reject(c.e);return s&&s._popContext(),u}if("function"==typeof c){if(function(t){try{return a.call(t,"_promise0")}catch(t){return!1}}(t)){var u=new e(n);return t._then(u._fulfill,u._reject,void 0,u,null),u}return function(t,i,a){var s=new e(n),c=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,l=r.tryCatch(i).call(t,function(t){s&&(s._resolveCallback(t),s=null)},function(t){s&&(s._rejectCallback(t,u,!0),s=null)});return u=!1,s&&l===o&&(s._rejectCallback(l.e,!0,!0),s=null),c}(t,c,s)}}return t}}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){var o=t("./util"),i=e.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,o){var i,c;return void 0!==o?(i=e.resolve(o)._then(s,null,null,t,void 0),r.cancellation()&&o instanceof e&&i._setOnCancel(o)):(i=new e(n),c=setTimeout(function(){i._fulfill()},+t),r.cancellation()&&i._setOnCancel(new a(c)),i._captureStackTrace()),i._setAsyncGuaranteed(),i};function u(t){return clearTimeout(this.handle),t}function l(t){throw clearTimeout(this.handle),t}e.prototype.delay=function(t){return c(t,this)},e.prototype.timeout=function(t,e){var n,s;t=+t;var c=new a(setTimeout(function(){n.isPending()&&function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new i("operation timed out"):new i(e),o.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()}(n,e,s)},t));return r.cancellation()?(s=this.then(),(n=s._then(u,l,void 0,c,void 0))._setOnCancel(c)):n=this._then(u,l,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,a){var s=t("./util"),c=t("./errors").TypeError,u=t("./util").inherits,l=s.errorObj,f=s.tryCatch,p={};function h(t){setTimeout(function(){throw t},0)}function d(t,n){var o=0,a=t.length,s=new e(i);return function i(){if(o>=a)return s._fulfill();var c=function(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(t[o++]);if(c instanceof e&&c._isDisposable()){try{c=r(c._getDisposer().tryDispose(n),t.promise)}catch(t){return h(t)}if(c instanceof e)return c._then(i,h,null,null,null)}i()}(),s}function _(t,e,n){this._data=t,this._promise=e,this._context=n}function v(t,e,n){this.constructor$(t,e,n)}function y(t){return _.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():p},_.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==p?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},_.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},u(v,_),v.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},m.prototype._resultCancelled=function(){for(var t=this.length,n=0;n<t;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return n("you must pass at least 2 arguments to Promise.using");var o,i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+s.classString(i));var c=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,c=!1):(o=arguments,t--);for(var u=new m(t),p=0;p<t;++p){var h=o[p];if(_.isDisposer(h)){var v=h;(h=h.promise())._setDisposable(v)}else{var g=r(h);g instanceof e&&(h=g._then(y,null,null,{resources:u,index:p},void 0))}u[p]=h}for(var b=new Array(u.length),p=0;p<b.length;++p)b[p]=e.resolve(u[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return l.e=n.error(),l;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}x._pushContext(),i=f(i);var r=c?i.apply(void 0,t):i(t),o=x._popContext();return a.checkForgottenReturns(r,o,"Promise.using",x),r}),x=w.lastly(function(){var t=new e.PromiseInspection(w);return d(u,t)});return u.promise=x,x._setOnCancel(u),x},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,o());throw new c}}},{"./errors":12,"./util":36}],36:[function(t,r,o){"use strict";var i=t("./es5"),a="undefined"==typeof navigator,s={e:{}},c,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null;function l(){try{var t=c;return c=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function f(t){return c=t,l}var p=function(t,e){var n={}.hasOwnProperty;function r(){for(var r in this.constructor=t,this.constructor$=e,e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}return r.prototype=e.prototype,t.prototype=new r,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function d(t){return"function"==typeof t||"object"==typeof t&&null!==t}function _(t){return h(t)?new Error(O(t)):t}function v(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 y(t,e,n){if(!i.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function m(t,e,n){if(h(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(t,e,r),t}function g(t){throw t}var b=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(i.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],o=Object.create(null);null!=t&&!e(t);){var a;try{a=n(t)}catch(t){return r}for(var s=0;s<a.length;++s){var c=a[s];if(!o[c]){o[c]=!0;var u=Object.getOwnPropertyDescriptor(t,c);null!=u&&null==u.get&&null==u.set&&r.push(c)}}t=i.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}}(),w=/this\s*\.\s*\S+\s*=/;function x(t){try{if("function"==typeof t){var e=i.names(t.prototype),n=i.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=w.test(t+"")&&i.names(t).length>0;if(n||r||o)return!0}return!1}catch(t){return!1}}function j(t){function e(){}e.prototype=t;var n=new e;function r(){return typeof n.foo}return r(),r(),t}var k=/^[a-z$_][a-z$_0-9]*$/i;function E(t){return k.test(t)}function C(t,e,n){for(var r=new Array(t),o=0;o<t;++o)r[o]=e+o+n;return r}function O(t){try{return t+""}catch(t){return"[no string representation]"}}function S(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function T(t){try{m(t,"isOperational",!0)}catch(t){}}function F(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function P(t){return S(t)&&i.propertyIsWritable(t,"stack")}var R="stack"in new Error?function(t){return P(t)?t:new Error(O(t))}:function(t){if(P(t))return t;try{throw new Error(O(t))}catch(t){return t}};function A(t){return{}.toString.call(t)}function D(t,e,n){for(var r=i.names(t),o=0;o<r.length;++o){var a=r[o];if(n(a))try{i.defineProperty(e,a,i.getDescriptor(t,a))}catch(t){}}}var L=function(t){return i.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var I="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};L=function(t){return i.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?I(t):null}}var M=void 0!==e&&"[object process]"===A(e).toLowerCase(),N=void 0!==e&&!0;function B(t){return N?Object({NODE_ENV:"production"})[t]:void 0}function V(){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 H={isClass:x,isIdentifier:E,inheritedDataKeys:b,getDataPropertyOrDefault:y,thrower:g,isArray:i.isArray,asArray:L,notEnumerableProp:m,isPrimitive:h,isObject:d,isError:S,canEvaluate:a,errorObj:s,tryCatch:f,inherits:p,withAppended:v,maybeWrapAsError:_,toFastProperties:j,filledRange:C,toString:O,canAttachTrace:P,ensureErrorObject:R,originatesFromRejection:F,markAsOriginatingFromRejection:T,classString:A,copyDescriptors:D,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:M,hasEnvVariables:N,env:B,global:u,getNativePromise:V,domainBind:U};H.isRecentNode=H.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),H.isNode&&H.toFastProperties(e);try{throw new Error}catch(t){H.lastLineError=t}r.exports=H},{"./es5":13}]},{},[4])(4)}(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,n(54),n(15),n(187).setImmediate)},94:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},95:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},96:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}}});
//# sourceMappingURL=indexeddb-worker.js.map