UNPKG

next

Version:

The React Framework

1 lines • 212 kB
module.exports=(()=>{var __webpack_modules__={9838:t=>{"use strict";t.exports=JSON.parse('{"Jw":{"k":"2","K":"5"}}')},3485:(t,e,r)=>{const{dirname:n}=r(5622);const{promisify:i}=r(1669);const{access:s,accessSync:o,copyFile:a,copyFileSync:c,unlink:u,unlinkSync:l,rename:f,renameSync:h}=r(5747);const p=i(s);const d=i(a);const y=i(u);const m=i(f);const v=r(7424);const _=async t=>{try{await p(t);return true}catch(t){return t.code!=="ENOENT"}};const g=t=>{try{o(t);return true}catch(t){return t.code!=="ENOENT"}};t.exports=(async(t,e,r={})=>{if(!t||!e){throw new TypeError("`source` and `destination` file required")}r={overwrite:true,...r};if(!r.overwrite&&await _(e)){throw new Error(`The destination file exists: ${e}`)}await v(n(e));try{await m(t,e)}catch(r){if(r.code==="EXDEV"){await d(t,e);await y(t)}else{throw r}}});t.exports.sync=((t,e,r={})=>{if(!t||!e){throw new TypeError("`source` and `destination` file required")}r={overwrite:true,...r};if(!r.overwrite&&g(e)){throw new Error(`The destination file exists: ${e}`)}v.sync(n(e));try{h(t,e)}catch(r){if(r.code==="EXDEV"){c(t,e);l(t)}else{throw r}}})},7424:(t,e,r)=>{const n=r(3430);const i=r(2253);const{mkdirpNative:s,mkdirpNativeSync:o}=r(9863);const{mkdirpManual:a,mkdirpManualSync:c}=r(4906);const{useNative:u,useNativeSync:l}=r(7721);const f=(t,e)=>{t=i(t);e=n(e);return u(e)?s(t,e):a(t,e)};const h=(t,e)=>{t=i(t);e=n(e);return l(e)?o(t,e):c(t,e)};f.sync=h;f.native=((t,e)=>s(i(t),n(e)));f.manual=((t,e)=>a(i(t),n(e)));f.nativeSync=((t,e)=>o(i(t),n(e)));f.manualSync=((t,e)=>c(i(t),n(e)));t.exports=f},7496:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r=undefined)=>{if(r===e)return Promise.resolve();return t.statAsync(e).then(t=>t.isDirectory()?r:undefined,r=>r.code==="ENOENT"?i(t,n(e),e):undefined)};const s=(t,e,r=undefined)=>{if(r===e)return undefined;try{return t.statSync(e).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?s(t,n(e),e):undefined}};t.exports={findMade:i,findMadeSync:s}},4906:(t,e,r)=>{const{dirname:n}=r(5622);const i=(t,e,r)=>{e.recursive=false;const s=n(t);if(s===t){return e.mkdirAsync(t,e).catch(t=>{if(t.code!=="EISDIR")throw t})}return e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return i(s,e).then(r=>i(t,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(t=>{if(t.isDirectory())return r;else throw n},()=>{throw n})})};const s=(t,e,r)=>{const i=n(t);e.recursive=false;if(i===t){try{return e.mkdirSync(t,e)}catch(t){if(t.code!=="EISDIR")throw t;else return}}try{e.mkdirSync(t,e);return r||t}catch(n){if(n.code==="ENOENT")return s(t,e,s(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch(t){throw n}}};t.exports={mkdirpManual:i,mkdirpManualSync:s}},9863:(t,e,r)=>{const{dirname:n}=r(5622);const{findMade:i,findMadeSync:s}=r(7496);const{mkdirpManual:o,mkdirpManualSync:a}=r(4906);const c=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirAsync(t,e);return i(e,t).then(r=>e.mkdirAsync(t,e).then(()=>r).catch(r=>{if(r.code==="ENOENT")return o(t,e);else throw r}))};const u=(t,e)=>{e.recursive=true;const r=n(t);if(r===t)return e.mkdirSync(t,e);const i=s(e,t);try{e.mkdirSync(t,e);return i}catch(r){if(r.code==="ENOENT")return a(t,e);else throw r}};t.exports={mkdirpNative:c,mkdirpNativeSync:u}},3430:(t,e,r)=>{const{promisify:n}=r(1669);const i=r(5747);const s=t=>{if(!t)t={mode:511,fs:i};else if(typeof t==="object")t={mode:511,fs:i,...t};else if(typeof t==="number")t={mode:t,fs:i};else if(typeof t==="string")t={mode:parseInt(t,8),fs:i};else throw new TypeError("invalid options argument");t.mkdir=t.mkdir||t.fs.mkdir||i.mkdir;t.mkdirAsync=n(t.mkdir);t.stat=t.stat||t.fs.stat||i.stat;t.statAsync=n(t.stat);t.statSync=t.statSync||t.fs.statSync||i.statSync;t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||i.mkdirSync;return t};t.exports=s},2253:(t,e,r)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:i,parse:s}=r(5622);const o=t=>{if(/\0/.test(t)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=i(t);if(n==="win32"){const e=/[*|"<>?:]/;const{root:r}=s(t);if(e.test(t.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};t.exports=o},7721:(t,e,r)=>{const n=r(5747);const i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const s=i.replace(/^v/,"").split(".");const o=+s[0]>10||+s[0]===10&&+s[1]>=12;const a=!o?()=>false:t=>t.mkdir===n.mkdir;const c=!o?()=>false:t=>t.mkdirSync===n.mkdirSync;t.exports={useNative:a,useNativeSync:c}},464:(t,e,r)=>{"use strict";const n=r(8007);const i=r(9616);const s=t=>t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class AggregateError extends Error{constructor(t){if(!Array.isArray(t)){throw new TypeError(`Expected input to be an Array, got ${typeof t}`)}t=[...t].map(t=>{if(t instanceof Error){return t}if(t!==null&&typeof t==="object"){return Object.assign(new Error(t.message),t)}return new Error(t)});let e=t.map(t=>{return typeof t.stack==="string"?s(i(t.stack)):String(t)}).join("\n");e="\n"+n(e,4);super(e);this.name="AggregateError";Object.defineProperty(this,"_errors",{value:t})}*[Symbol.iterator](){for(const t of this._errors){yield t}}}t.exports=AggregateError},587:t=>{"use strict";t.exports=balanced;function balanced(t,e,r){if(t instanceof RegExp)t=maybeMatch(t,r);if(e instanceof RegExp)e=maybeMatch(e,r);var n=range(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function maybeMatch(t,e){var r=e.match(t);return r?r[0]:null}balanced.range=range;function range(t,e,r){var n,i,s,o,a;var c=r.indexOf(t);var u=r.indexOf(e,c+1);var l=c;if(c>=0&&u>0){n=[];s=r.length;while(l>=0&&!a){if(l==c){n.push(l);c=r.indexOf(t,l+1)}else if(n.length==1){a=[n.pop(),u]}else{i=n.pop();if(i<s){s=i;o=u}u=r.indexOf(e,l+1)}l=c<u&&c>=0?c:u}if(n.length){a=[s,o]}}return a}},5801:t=>{"use strict";t.exports=function(t){var e=t._SomePromiseArray;function any(t){var r=new e(t);var n=r.promise();r.setHowMany(1);r.setUnwrap();r.init();return n}t.any=function(t){return any(t)};t.prototype.any=function(){return any(this)}}},9952:(t,e,r)=>{"use strict";var n;try{throw new Error}catch(t){n=t}var i=r(7254);var s=r(3172);function Async(){this._customScheduler=false;this._isTickUsed=false;this._lateQueue=new s(16);this._normalQueue=new s(16);this._haveDrainedQueues=false;var t=this;this.drainQueues=function(){t._drainQueues()};this._schedule=i}Async.prototype.setScheduler=function(t){var e=this._schedule;this._schedule=t;this._customScheduler=true;return e};Async.prototype.hasCustomScheduler=function(){return this._customScheduler};Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};Async.prototype.fatalError=function(t,e){if(e){process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n");process.exit(2)}else{this.throwLater(t)}};Async.prototype.throwLater=function(t,e){if(arguments.length===1){e=t;t=function(){throw e}}if(typeof setTimeout!=="undefined"){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")}};function AsyncInvokeLater(t,e,r){this._lateQueue.push(t,e,r);this._queueTick()}function AsyncInvoke(t,e,r){this._normalQueue.push(t,e,r);this._queueTick()}function AsyncSettlePromises(t){this._normalQueue._pushOne(t);this._queueTick()}Async.prototype.invokeLater=AsyncInvokeLater;Async.prototype.invoke=AsyncInvoke;Async.prototype.settlePromises=AsyncSettlePromises;function _drainQueue(t){while(t.length()>0){_drainQueueStep(t)}}function _drainQueueStep(t){var e=t.shift();if(typeof e!=="function"){e._settlePromises()}else{var r=t.shift();var n=t.shift();e.call(r,n)}}Async.prototype._drainQueues=function(){_drainQueue(this._normalQueue);this._reset();this._haveDrainedQueues=true;_drainQueue(this._lateQueue)};Async.prototype._queueTick=function(){if(!this._isTickUsed){this._isTickUsed=true;this._schedule(this.drainQueues)}};Async.prototype._reset=function(){this._isTickUsed=false};t.exports=Async;t.exports.firstLineError=n},1273:t=>{"use strict";t.exports=function(t,e,r,n){var i=false;var s=function(t,e){this._reject(e)};var o=function(t,e){e.promiseRejectionQueued=true;e.bindingPromise._then(s,s,null,this,t)};var a=function(t,e){if((this._bitField&50397184)===0){this._resolveCallback(e.target)}};var c=function(t,e){if(!e.promiseRejectionQueued)this._reject(t)};t.prototype.bind=function(s){if(!i){i=true;t.prototype._propagateFrom=n.propagateFromFunction();t.prototype._boundValue=n.boundValueFunction()}var u=r(s);var l=new t(e);l._propagateFrom(this,1);var f=this._target();l._setBoundTo(u);if(u instanceof t){var h={promiseRejectionQueued:false,promise:l,target:f,bindingPromise:u};f._then(e,o,undefined,l,h);u._then(a,c,undefined,l,h);l._setOnCancel(u)}else{l._resolveCallback(f)}return l};t.prototype._setBoundTo=function(t){if(t!==undefined){this._bitField=this._bitField|2097152;this._boundTo=t}else{this._bitField=this._bitField&~2097152}};t.prototype._isBound=function(){return(this._bitField&2097152)===2097152};t.bind=function(e,r){return t.resolve(r).bind(e)}}},5229:(t,e,r)=>{"use strict";var n;if(typeof Promise!=="undefined")n=Promise;function noConflict(){try{if(Promise===i)Promise=n}catch(t){}return i}var i=r(5175)();i.noConflict=noConflict;t.exports=i},8779:(t,e,r)=>{"use strict";var n=Object.create;if(n){var i=n(null);var s=n(null);i[" size"]=s[" size"]=0}t.exports=function(t){var e=r(6587);var n=e.canEvaluate;var o=e.isIdentifier;var a;var c;if(true){var u=function(t){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,t))(ensureMethod)};var l=function(t){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",t))};var f=function(t,e,r){var n=r[t];if(typeof n!=="function"){if(!o(t)){return null}n=e(t);r[t]=n;r[" size"]++;if(r[" size"]>512){var i=Object.keys(r);for(var s=0;s<256;++s)delete r[i[s]];r[" size"]=i.length-256}}return n};a=function(t){return f(t,u,i)};c=function(t){return f(t,l,s)}}function ensureMethod(r,n){var i;if(r!=null)i=r[n];if(typeof i!=="function"){var s="Object "+e.classString(r)+" has no method '"+e.toString(n)+"'";throw new t.TypeError(s)}return i}function caller(t){var e=this.pop();var r=ensureMethod(t,e);return r.apply(t,this)}t.prototype.call=function(t){var e=arguments.length;var r=new Array(Math.max(e-1,0));for(var i=1;i<e;++i){r[i-1]=arguments[i]}if(true){if(n){var s=a(t);if(s!==null){return this._then(s,undefined,undefined,r,undefined)}}}r.push(t);return this._then(caller,undefined,undefined,r,undefined)};function namedGetter(t){return t[this]}function indexedGetter(t){var e=+this;if(e<0)e=Math.max(0,e+t.length);return t[e]}t.prototype.get=function(t){var e=typeof t==="number";var r;if(!e){if(n){var i=c(t);r=i!==null?i:namedGetter}else{r=namedGetter}}else{r=indexedGetter}return this._then(r,undefined,undefined,t,undefined)}}},7386:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i){var s=r(6587);var o=s.tryCatch;var a=s.errorObj;var c=t._async;t.prototype["break"]=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");var t=this;var e=t;while(t._isCancellable()){if(!t._cancelBy(e)){if(e._isFollowing()){e._followee().cancel()}else{e._cancelBranched()}break}var r=t._cancellationParent;if(r==null||!r._isCancellable()){if(t._isFollowing()){t._followee().cancel()}else{t._cancelBranched()}break}else{if(t._isFollowing())t._followee().cancel();t._setWillBeCancelled();e=t;t=r}}};t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--};t.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===undefined||this._branchesRemainingToCancel<=0};t.prototype._cancelBy=function(t){if(t===this){this._branchesRemainingToCancel=0;this._invokeOnCancel();return true}else{this._branchHasCancelled();if(this._enoughBranchesHaveCancelled()){this._invokeOnCancel();return true}}return false};t.prototype._cancelBranched=function(){if(this._enoughBranchesHaveCancelled()){this._cancel()}};t.prototype._cancel=function(){if(!this._isCancellable())return;this._setCancelled();c.invoke(this._cancelPromises,this,undefined)};t.prototype._cancelPromises=function(){if(this._length()>0)this._settlePromises()};t.prototype._unsetOnCancel=function(){this._onCancelField=undefined};t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()};t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()};t.prototype._doInvokeOnCancel=function(t,e){if(s.isArray(t)){for(var r=0;r<t.length;++r){this._doInvokeOnCancel(t[r],e)}}else if(t!==undefined){if(typeof t==="function"){if(!e){var n=o(t).call(this._boundValue());if(n===a){this._attachExtraTrace(n.e);c.throwLater(n.e)}}}else{t._resultCancelled(this)}}};t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel();c.invoke(this._doInvokeOnCancel,this,t)};t.prototype._invokeInternalOnCancel=function(){if(this._isCancellable()){this._doInvokeOnCancel(this._onCancel(),true);this._unsetOnCancel()}};t.prototype._resultCancelled=function(){this.cancel()}}},691:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(6587);var n=r(9048).keys;var i=e.tryCatch;var s=e.errorObj;function catchFilter(r,o,a){return function(c){var u=a._boundValue();t:for(var l=0;l<r.length;++l){var f=r[l];if(f===Error||f!=null&&f.prototype instanceof Error){if(c instanceof f){return i(o).call(u,c)}}else if(typeof f==="function"){var h=i(f).call(u,c);if(h===s){return h}else if(h){return i(o).call(u,c)}}else if(e.isObject(c)){var p=n(f);for(var d=0;d<p.length;++d){var y=p[d];if(f[y]!=c[y]){continue t}}return i(o).call(u,c)}}return t}}return catchFilter}},1030:t=>{"use strict";t.exports=function(t){var e=false;var r=[];t.prototype._promiseCreated=function(){};t.prototype._pushContext=function(){};t.prototype._popContext=function(){return null};t._peekContext=t.prototype._peekContext=function(){};function Context(){this._trace=new Context.CapturedTrace(peekContext())}Context.prototype._pushContext=function(){if(this._trace!==undefined){this._trace._promiseCreated=null;r.push(this._trace)}};Context.prototype._popContext=function(){if(this._trace!==undefined){var t=r.pop();var e=t._promiseCreated;t._promiseCreated=null;return e}return null};function createContext(){if(e)return new Context}function peekContext(){var t=r.length-1;if(t>=0){return r[t]}return undefined}Context.CapturedTrace=null;Context.create=createContext;Context.deactivateLongStackTraces=function(){};Context.activateLongStackTraces=function(){var r=t.prototype._pushContext;var n=t.prototype._popContext;var i=t._peekContext;var s=t.prototype._peekContext;var o=t.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){t.prototype._pushContext=r;t.prototype._popContext=n;t._peekContext=i;t.prototype._peekContext=s;t.prototype._promiseCreated=o;e=false};e=true;t.prototype._pushContext=Context.prototype._pushContext;t.prototype._popContext=Context.prototype._popContext;t._peekContext=t.prototype._peekContext=peekContext;t.prototype._promiseCreated=function(){var t=this._peekContext();if(t&&t._promiseCreated==null)t._promiseCreated=this}};return Context}},4776:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i){var s=t._async;var o=r(9640).Warning;var a=r(6587);var c=r(9048);var u=a.canAttachTrace;var l;var f;var h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;var p=/\((?:timers\.js):\d+:\d+\)/;var d=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;var y=null;var m=null;var v=false;var _;var g=!!(a.env("BLUEBIRD_DEBUG")!=0&&(false||a.env("BLUEBIRD_DEBUG")||a.env("NODE_ENV")==="development"));var w=!!(a.env("BLUEBIRD_WARNINGS")!=0&&(g||a.env("BLUEBIRD_WARNINGS")));var b=!!(a.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(g||a.env("BLUEBIRD_LONG_STACK_TRACES")));var S=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(w||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));var E;(function(){var e=[];function unhandledRejectionCheck(){for(var t=0;t<e.length;++t){e[t]._notifyUnhandledRejection()}unhandledRejectionClear()}function unhandledRejectionClear(){e.length=0}E=function(t){e.push(t);setTimeout(unhandledRejectionCheck,1)};c.defineProperty(t,"_unhandledRejectionCheck",{value:unhandledRejectionCheck});c.defineProperty(t,"_unhandledRejectionClear",{value:unhandledRejectionClear})})();t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&~1048576|524288};t.prototype._ensurePossibleRejectionHandled=function(){if((this._bitField&524288)!==0)return;this._setRejectionIsUnhandled();E(this)};t.prototype._notifyUnhandledRejectionIsHandled=function(){fireRejectionEvent("rejectionHandled",l,undefined,this)};t.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456};t.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0};t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified();fireRejectionEvent("unhandledRejection",f,t,this)}};t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144};t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&~262144};t.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0};t.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576};t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&~1048576;if(this._isUnhandledRejectionNotified()){this._unsetUnhandledRejectionIsNotified();this._notifyUnhandledRejectionIsHandled()}};t.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0};t.prototype._warn=function(t,e,r){return warn(t,e,r||this)};t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();f=a.contextBind(r,e)};t.onUnhandledRejectionHandled=function(e){var r=t._getContext();l=a.contextBind(r,e)};var k=function(){};t.longStackTraces=function(){if(s.haveItemsQueued()&&!N.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}if(!N.longStackTraces&&longStackTracesIsSupported()){var r=t.prototype._captureStackTrace;var n=t.prototype._attachExtraTrace;var i=t.prototype._dereferenceTrace;N.longStackTraces=true;k=function(){if(s.haveItemsQueued()&&!N.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}t.prototype._captureStackTrace=r;t.prototype._attachExtraTrace=n;t.prototype._dereferenceTrace=i;e.deactivateLongStackTraces();N.longStackTraces=false};t.prototype._captureStackTrace=longStackTracesCaptureStackTrace;t.prototype._attachExtraTrace=longStackTracesAttachExtraTrace;t.prototype._dereferenceTrace=longStackTracesDereferenceTrace;e.activateLongStackTraces()}};t.hasLongStackTraces=function(){return N.longStackTraces&&longStackTracesIsSupported()};var x={unhandledrejection:{before:function(){var t=a.global.onunhandledrejection;a.global.onunhandledrejection=null;return t},after:function(t){a.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=a.global.onrejectionhandled;a.global.onrejectionhandled=null;return t},after:function(t){a.global.onrejectionhandled=t}}};var C=function(){var t=function(t,e){if(t){var r;try{r=t.before();return!a.global.dispatchEvent(e)}finally{t.after(r)}}else{return!a.global.dispatchEvent(e)}};try{if(typeof CustomEvent==="function"){var e=new CustomEvent("CustomEvent");a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n={detail:r,cancelable:true};var i=new CustomEvent(e,n);c.defineProperty(i,"promise",{value:r.promise});c.defineProperty(i,"reason",{value:r.reason});return t(x[e],i)}}else if(typeof Event==="function"){var e=new Event("CustomEvent");a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:true});n.detail=r;c.defineProperty(n,"promise",{value:r.promise});c.defineProperty(n,"reason",{value:r.reason});return t(x[e],n)}}else{var e=document.createEvent("CustomEvent");e.initCustomEvent("testingtheevent",false,true,{});a.global.dispatchEvent(e);return function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");n.initCustomEvent(e,false,true,r);return t(x[e],n)}}}catch(t){}return function(){return false}}();var A=function(){if(a.isNode){return function(){return process.emit.apply(process,arguments)}}else{if(!a.global){return function(){return false}}return function(t){var e="on"+t.toLowerCase();var r=a.global[e];if(!r)return false;r.apply(a.global,[].slice.call(arguments,1));return true}}}();function generatePromiseLifecycleEventObject(t,e){return{promise:e}}var T={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:generatePromiseLifecycleEventObject};var P=function(t){var e=false;try{e=A.apply(null,arguments)}catch(t){s.throwLater(t);e=true}var r=false;try{r=C(t,T[t].apply(null,arguments))}catch(t){s.throwLater(t);r=true}return r||e};t.config=function(e){e=Object(e);if("longStackTraces"in e){if(e.longStackTraces){t.longStackTraces()}else if(!e.longStackTraces&&t.hasLongStackTraces()){k()}}if("warnings"in e){var r=e.warnings;N.warnings=!!r;S=N.warnings;if(a.isObject(r)){if("wForgottenReturn"in r){S=!!r.wForgottenReturn}}}if("cancellation"in e&&e.cancellation&&!N.cancellation){if(s.haveItemsQueued()){throw new Error("cannot enable cancellation after promises are in use")}t.prototype._clearCancellationData=cancellationClearCancellationData;t.prototype._propagateFrom=cancellationPropagateFrom;t.prototype._onCancel=cancellationOnCancel;t.prototype._setOnCancel=cancellationSetOnCancel;t.prototype._attachCancellationCallback=cancellationAttachCancellationCallback;t.prototype._execute=cancellationExecute;j=cancellationPropagateFrom;N.cancellation=true}if("monitoring"in e){if(e.monitoring&&!N.monitoring){N.monitoring=true;t.prototype._fireEvent=P}else if(!e.monitoring&&N.monitoring){N.monitoring=false;t.prototype._fireEvent=defaultFireEvent}}if("asyncHooks"in e&&a.nodeSupportsAsyncResource){var o=N.asyncHooks;var c=!!e.asyncHooks;if(o!==c){N.asyncHooks=c;if(c){n()}else{i()}}}return t};function defaultFireEvent(){return false}t.prototype._fireEvent=defaultFireEvent;t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}};t.prototype._onCancel=function(){};t.prototype._setOnCancel=function(t){};t.prototype._attachCancellationCallback=function(t){};t.prototype._captureStackTrace=function(){};t.prototype._attachExtraTrace=function(){};t.prototype._dereferenceTrace=function(){};t.prototype._clearCancellationData=function(){};t.prototype._propagateFrom=function(t,e){};function cancellationExecute(t,e,r){var n=this;try{t(e,r,function(t){if(typeof t!=="function"){throw new TypeError("onCancel must be a function, got: "+a.toString(t))}n._attachCancellationCallback(t)})}catch(t){return t}}function cancellationAttachCancellationCallback(t){if(!this._isCancellable())return this;var e=this._onCancel();if(e!==undefined){if(a.isArray(e)){e.push(t)}else{this._setOnCancel([e,t])}}else{this._setOnCancel(t)}}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(t){this._onCancelField=t}function cancellationClearCancellationData(){this._cancellationParent=undefined;this._onCancelField=undefined}function cancellationPropagateFrom(t,e){if((e&1)!==0){this._cancellationParent=t;var r=t._branchesRemainingToCancel;if(r===undefined){r=0}t._branchesRemainingToCancel=r+1}if((e&2)!==0&&t._isBound()){this._setBoundTo(t._boundTo)}}function bindingPropagateFrom(t,e){if((e&2)!==0&&t._isBound()){this._setBoundTo(t._boundTo)}}var j=bindingPropagateFrom;function boundValueFunction(){var e=this._boundTo;if(e!==undefined){if(e instanceof t){if(e.isFulfilled()){return e.value()}else{return undefined}}}return e}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(t,e){if(u(t)){var r=this._trace;if(r!==undefined){if(e)r=r._parent}if(r!==undefined){r.attachExtraTrace(t)}else if(!t.__stackCleaned__){var n=parseStackAndMessage(t);a.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n"));a.notEnumerableProp(t,"__stackCleaned__",true)}}}function longStackTracesDereferenceTrace(){this._trace=undefined}function checkForgottenReturns(t,e,r,n,i){if(t===undefined&&e!==null&&S){if(i!==undefined&&i._returnedNonUndefined())return;if((n._bitField&65535)===0)return;if(r)r=r+" ";var s="";var o="";if(e._trace){var a=e._trace.stack.split("\n");var c=cleanStack(a);for(var u=c.length-1;u>=0;--u){var l=c[u];if(!p.test(l)){var f=l.match(d);if(f){s="at "+f[1]+":"+f[2]+":"+f[3]+" "}break}}if(c.length>0){var h=c[0];for(var u=0;u<a.length;++u){if(a[u]===h){if(u>0){o="\n"+a[u-1]}break}}}}var y="a promise was created in a "+r+"handler "+s+"but was not returned from it, "+"see http://goo.gl/rRqMUw"+o;n._warn(y,true,e)}}function deprecated(t,e){var r=t+" is deprecated and will be removed in a future version.";if(e)r+=" Use "+e+" instead.";return warn(r)}function warn(e,r,n){if(!N.warnings)return;var i=new o(e);var s;if(r){n._attachExtraTrace(i)}else if(N.longStackTraces&&(s=t._peekContext())){s.attachExtraTrace(i)}else{var a=parseStackAndMessage(i);i.stack=a.message+"\n"+a.stack.join("\n")}if(!P("warning",i)){formatAndLogError(i,"",true)}}function reconstructStack(t,e){for(var r=0;r<e.length-1;++r){e[r].push("From previous event:");e[r]=e[r].join("\n")}if(r<e.length){e[r]=e[r].join("\n")}return t+"\n"+e.join("\n")}function removeDuplicateOrEmptyJumps(t){for(var e=0;e<t.length;++e){if(t[e].length===0||e+1<t.length&&t[e][0]===t[e+1][0]){t.splice(e,1);e--}}}function removeCommonRoots(t){var e=t[0];for(var r=1;r<t.length;++r){var n=t[r];var i=e.length-1;var s=e[i];var o=-1;for(var a=n.length-1;a>=0;--a){if(n[a]===s){o=a;break}}for(var a=o;a>=0;--a){var c=n[a];if(e[i]===c){e.pop();i--}else{break}}e=n}}function cleanStack(t){var e=[];for(var r=0;r<t.length;++r){var n=t[r];var i=" (No stack trace)"===n||y.test(n);var s=i&&O(n);if(i&&!s){if(v&&n.charAt(0)!==" "){n=" "+n}e.push(n)}}return e}function stackFramesAsArray(t){var e=t.stack.replace(/\s+$/g,"").split("\n");for(var r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||y.test(n)){break}}if(r>0&&t.name!="SyntaxError"){e=e.slice(r)}return e}function parseStackAndMessage(t){var e=t.stack;var r=t.toString();e=typeof e==="string"&&e.length>0?stackFramesAsArray(t):[" (No stack trace)"];return{message:r,stack:t.name=="SyntaxError"?e:cleanStack(e)}}function formatAndLogError(t,e,r){if(typeof console!=="undefined"){var n;if(a.isObject(t)){var i=t.stack;n=e+m(i,t)}else{n=e+String(t)}if(typeof _==="function"){_(n,r)}else if(typeof console.log==="function"||typeof console.log==="object"){console.log(n)}}}function fireRejectionEvent(t,e,r,n){var i=false;try{if(typeof e==="function"){i=true;if(t==="rejectionHandled"){e(n)}else{e(r,n)}}}catch(t){s.throwLater(t)}if(t==="unhandledRejection"){if(!P(t,r,n)&&!i){formatAndLogError(r,"Unhandled rejection ")}}else{P(t,n)}}function formatNonError(t){var e;if(typeof t==="function"){e="[function "+(t.name||"anonymous")+"]"}else{e=t&&typeof t.toString==="function"?t.toString():a.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e)){try{var n=JSON.stringify(t);e=n}catch(t){}}if(e.length===0){e="(empty array)"}}return"(<"+snip(e)+">, no stack trace)"}function snip(t){var e=41;if(t.length<e){return t}return t.substr(0,e-3)+"..."}function longStackTracesIsSupported(){return typeof R==="function"}var O=function(){return false};var F=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function parseLineInfo(t){var e=t.match(F);if(e){return{fileName:e[1],line:parseInt(e[2],10)}}}function setBounds(t,e){if(!longStackTracesIsSupported())return;var r=(t.stack||"").split("\n");var n=(e.stack||"").split("\n");var i=-1;var s=-1;var o;var a;for(var c=0;c<r.length;++c){var u=parseLineInfo(r[c]);if(u){o=u.fileName;i=u.line;break}}for(var c=0;c<n.length;++c){var u=parseLineInfo(n[c]);if(u){a=u.fileName;s=u.line;break}}if(i<0||s<0||!o||!a||o!==a||i>=s){return}O=function(t){if(h.test(t))return true;var e=parseLineInfo(t);if(e){if(e.fileName===o&&(i<=e.line&&e.line<=s)){return true}}return false}}function CapturedTrace(t){this._parent=t;this._promisesCreated=0;var e=this._length=1+(t===undefined?0:t._length);R(this,CapturedTrace);if(e>32)this.uncycle()}a.inherits(CapturedTrace,Error);e.CapturedTrace=CapturedTrace;CapturedTrace.prototype.uncycle=function(){var t=this._length;if(t<2)return;var e=[];var r={};for(var n=0,i=this;i!==undefined;++n){e.push(i);i=i._parent}t=this._length=n;for(var n=t-1;n>=0;--n){var s=e[n].stack;if(r[s]===undefined){r[s]=n}}for(var n=0;n<t;++n){var o=e[n].stack;var a=r[o];if(a!==undefined&&a!==n){if(a>0){e[a-1]._parent=undefined;e[a-1]._length=1}e[n]._parent=undefined;e[n]._length=1;var c=n>0?e[n-1]:this;if(a<t-1){c._parent=e[a+1];c._parent.uncycle();c._length=c._parent._length+1}else{c._parent=undefined;c._length=1}var u=c._length+1;for(var l=n-2;l>=0;--l){e[l]._length=u;u++}return}}};CapturedTrace.prototype.attachExtraTrace=function(t){if(t.__stackCleaned__)return;this.uncycle();var e=parseStackAndMessage(t);var r=e.message;var n=[e.stack];var i=this;while(i!==undefined){n.push(cleanStack(i.stack.split("\n")));i=i._parent}removeCommonRoots(n);removeDuplicateOrEmptyJumps(n);a.notEnumerableProp(t,"stack",reconstructStack(r,n));a.notEnumerableProp(t,"__stackCleaned__",true)};var R=function stackDetection(){var t=/^\s*at\s*/;var e=function(t,e){if(typeof t==="string")return t;if(e.name!==undefined&&e.message!==undefined){return e.toString()}return formatNonError(e)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6;y=t;m=e;var r=Error.captureStackTrace;O=function(t){return h.test(t)};return function(t,e){Error.stackTraceLimit+=6;r(t,e);Error.stackTraceLimit-=6}}var n=new Error;if(typeof n.stack==="string"&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0){y=/@/;m=e;v=true;return function captureStackTrace(t){t.stack=(new Error).stack}}var i;try{throw new Error}catch(t){i="stack"in t}if(!("stack"in n)&&i&&typeof Error.stackTraceLimit==="number"){y=t;m=e;return function captureStackTrace(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}}m=function(t,e){if(typeof t==="string")return t;if((typeof e==="object"||typeof e==="function")&&e.name!==undefined&&e.message!==undefined){return e.toString()}return formatNonError(e)};return null}([]);if(typeof console!=="undefined"&&typeof console.warn!=="undefined"){_=function(t){console.warn(t)};if(a.isNode&&process.stderr.isTTY){_=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}}else if(!a.isNode&&typeof(new Error).stack==="string"){_=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}}}var N={warnings:w,longStackTraces:false,cancellation:false,monitoring:false,asyncHooks:false};if(b)t.longStackTraces();return{asyncHooks:function(){return N.asyncHooks},longStackTraces:function(){return N.longStackTraces},warnings:function(){return N.warnings},cancellation:function(){return N.cancellation},monitoring:function(){return N.monitoring},propagateFromFunction:function(){return j},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:C,fireGlobalEvent:A}}},8925:t=>{"use strict";t.exports=function(t){function returner(){return this.value}function thrower(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(e){if(e instanceof t)e.suppressUnhandledRejections();return this._then(returner,undefined,undefined,{value:e},undefined)};t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(thrower,undefined,undefined,{reason:t},undefined)};t.prototype.catchThrow=function(t){if(arguments.length<=1){return this._then(undefined,thrower,undefined,{reason:t},undefined)}else{var e=arguments[1];var r=function(){throw e};return this.caught(t,r)}};t.prototype.catchReturn=function(e){if(arguments.length<=1){if(e instanceof t)e.suppressUnhandledRejections();return this._then(undefined,returner,undefined,{value:e},undefined)}else{var r=arguments[1];if(r instanceof t)r.suppressUnhandledRejections();var n=function(){return r};return this.caught(e,n)}}}},5708:t=>{"use strict";t.exports=function(t,e){var r=t.reduce;var n=t.all;function promiseAllThis(){return n(this)}function PromiseMapSeries(t,n){return r(t,n,e,e)}t.prototype.each=function(t){return r(this,t,e,0)._then(promiseAllThis,undefined,undefined,this,undefined)};t.prototype.mapSeries=function(t){return r(this,t,e,e)};t.each=function(t,n){return r(t,n,e,0)._then(promiseAllThis,undefined,undefined,t,undefined)};t.mapSeries=PromiseMapSeries}},9640:(t,e,r)=>{"use strict";var n=r(9048);var i=n.freeze;var s=r(6587);var o=s.inherits;var a=s.notEnumerableProp;function subError(t,e){function SubError(r){if(!(this instanceof SubError))return new SubError(r);a(this,"message",typeof r==="string"?r:e);a(this,"name",t);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{Error.call(this)}}o(SubError,Error);return SubError}var c,u;var l=subError("Warning","warning");var f=subError("CancellationError","cancellation error");var h=subError("TimeoutError","timeout error");var p=subError("AggregateError","aggregate error");try{c=TypeError;u=RangeError}catch(t){c=subError("TypeError","type error");u=subError("RangeError","range error")}var d=("join pop push shift unshift slice filter forEach some "+"every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");for(var y=0;y<d.length;++y){if(typeof Array.prototype[d[y]]==="function"){p.prototype[d[y]]=Array.prototype[d[y]]}}n.defineProperty(p.prototype,"length",{value:0,configurable:false,writable:true,enumerable:true});p.prototype["isOperational"]=true;var m=0;p.prototype.toString=function(){var t=Array(m*4+1).join(" ");var e="\n"+t+"AggregateError of:"+"\n";m++;t=Array(m*4+1).join(" ");for(var r=0;r<this.length;++r){var n=this[r]===this?"[Circular AggregateError]":this[r]+"";var i=n.split("\n");for(var s=0;s<i.length;++s){i[s]=t+i[s]}n=i.join("\n");e+=n+"\n"}m--;return e};function OperationalError(t){if(!(this instanceof OperationalError))return new OperationalError(t);a(this,"name","OperationalError");a(this,"message",t);this.cause=t;this["isOperational"]=true;if(t instanceof Error){a(this,"message",t.message);a(this,"stack",t.stack)}else if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}o(OperationalError,Error);var v=Error["__BluebirdErrorTypes__"];if(!v){v=i({CancellationError:f,TimeoutError:h,OperationalError:OperationalError,RejectionError:OperationalError,AggregateError:p});n.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:false,enumerable:false,configurable:false})}t.exports={Error:Error,TypeError:c,RangeError:u,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:l}},9048:t=>{var e=function(){"use strict";return this===undefined}();if(e){t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:e,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!!(!r||r.writable||r.set)}}}else{var r={}.hasOwnProperty;var n={}.toString;var i={}.constructor.prototype;var s=function(t){var e=[];for(var n in t){if(r.call(t,n)){e.push(n)}}return e};var o=function(t,e){return{value:t[e]}};var a=function(t,e,r){t[e]=r.value;return t};var c=function(t){return t};var u=function(t){try{return Object(t).constructor.prototype}catch(t){return i}};var l=function(t){try{return n.call(t)==="[object Array]"}catch(t){return false}};t.exports={isArray:l,keys:s,names:s,defineProperty:a,getDescriptor:o,freeze:c,getPrototypeOf:u,isES5:e,propertyIsWritable:function(){return true}}}},3359:t=>{"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)};t.filter=function(t,n,i){return r(t,n,i,e)}}},1371:(t,e,r)=>{"use strict";t.exports=function(t,e,n){var i=r(6587);var s=t.CancellationError;var o=i.errorObj;var a=r(691)(n);function PassThroughHandlerContext(t,e,r){this.promise=t;this.type=e;this.handler=r;this.called=false;this.cancelPromise=null}PassThroughHandlerContext.prototype.isFinallyHandler=function(){return this.type===0};function FinallyHandlerCancelReaction(t){this.finallyHandler=t}FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)};function checkCancel(t,e){if(t.cancelPromise!=null){if(arguments.length>1){t.cancelPromise._reject(e)}else{t.cancelPromise._cancel()}t.cancelPromise=null;return true}return false}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(t){if(checkCancel(this,t))return;o.e=t;return o}function finallyHandler(r){var i=this.promise;var a=this.handler;if(!this.called){this.called=true;var c=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),r);if(c===n){return c}else if(c!==undefined){i._setReturnedNonUndefined();var u=e(c,i);if(u instanceof t){if(this.cancelPromise!=null){if(u._isCancelled()){var l=new s("late cancellation observer");i._attachExtraTrace(l);o.e=l;return o}else if(u.isPending()){u._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}}return u._then(succeed,fail,undefined,this,undefined)}}}if(i.isRejected()){checkCancel(this);o.e=r;return o}else{checkCancel(this);return r}}t.prototype._passThrough=function(t,e,r,n){if(typeof t!=="function")return this.then();return this._then(r,n,undefined,new PassThroughHandlerContext(this,e,t),undefined)};t.prototype.lastly=t.prototype["finally"]=function(t){return this._passThrough(t,0,finallyHandler,finallyHandler)};t.prototype.tap=function(t){return this._passThrough(t,1,finallyHandler)};t.prototype.tapCatch=function(e){var r=arguments.length;if(r===1){return this._passThrough(e,1,undefined,finallyHandler)}else{var n=new Array(r-1),s=0,o;for(o=0;o<r-1;++o){var c=arguments[o];if(i.isObject(c)){n[s++]=c}else{return t.reject(new TypeError("tapCatch statement predicate: "+"expecting an object but got "+i.classString(c)))}}n.length=s;var u=arguments[o];return this._passThrough(a(n,u,this),1,undefined,finallyHandler)}};return PassThroughHandlerContext}},2225:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s,o){var a=r(9640);var c=a.TypeError;var u=r(6587);var l=u.errorObj;var f=u.tryCatch;var h=[];function promiseFromYieldHandler(e,r,n){for(var s=0;s<r.length;++s){n._pushContext();var o=f(r[s])(e);n._popContext();if(o===l){n._pushContext();var a=t.reject(l.e);n._popContext();return a}var c=i(o,n);if(c instanceof t)return c}return null}function PromiseSpawn(e,r,i,s){if(o.cancellation()){var a=new t(n);var c=this._finallyPromise=new t(n);this._promise=a.lastly(function(){return c});a._captureStackTrace();a._setOnCancel(this)}else{var u=this._promise=new t(n);u._captureStackTrace()}this._stack=s;this._generatorFunction=e;this._receiver=r;this._generator=undefined;this._yieldHandlers=typeof i==="function"?[i].concat(h):h;this._yieldedPromise=null;this._cancellationPhase=false}u.inherits(PromiseSpawn,s);PromiseSpawn.prototype._isResolved=function(){return this._promise===null};PromiseSpawn.prototype._cleanup=function(){this._promise=this._generator=null;if(o.cancellation()&&this._finallyPromise!==null){this._finallyPromise._fulfill();this._finallyPromise=null}};PromiseSpawn.prototype._promiseCancelled=function(){if(this._isResolved())return;var e=typeof this._generator["return"]!=="undefined";var r;if(!e){var n=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=n;this._promise._attachExtraTrace(n);this._promise._pushContext();r=f(this._generator["throw"]).call(this._generator,n);this._promise._popContext()}else{this._promise._pushContext();r=f(this._generator["return"]).call(this._generator,undefined);this._promise._popContext()}this._cancellationPhase=true;this._yieldedPromise=null;this._continue(r)};PromiseSpawn.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)};PromiseSpawn.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)};PromiseSpawn.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null;e.cancel()}};PromiseSpawn.prototype.promise=function(){return this._promise};PromiseSpawn.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver);this._receiver=this._generatorFunction=undefined;this._promiseFulfilled(undefined)};PromiseSpawn.prototype._continue=function(e){var r=this._promise;if(e===l){this._cleanup();if(this._cancellationPhase){return r.cancel()}else{return r._rejectCallback(e.e,false)}}var n=e.value;if(e.done===true){this._cleanup();if(this._cancellationPhase){return r.cancel()}else{return r._resolveCallback(n)}}else{var s=i(n,this._promise);if(!(s instanceof t)){s=promiseFromYieldHandler(s,this._yieldHandlers,this._promise);if(s===null){this._promiseRejected(new c("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));return}}s=s._target();var o=s._bitField;if((o&50397184)===0){this._yieldedPromise=s;s._proxy(this,null)}else if((o&33554432)!==0){t._async.invoke(this._promiseFulfilled,this,s._value())}else if((o&16777216)!==0){t._async.invoke(this._promiseRejected,this,s._reason())}else{this._promiseCancelled()}}};t.coroutine=function(t,e){if(typeof t!=="function"){throw new c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n")}var r=Object(e).yieldHandler;var n=PromiseSpawn;var i=(new Error).stack;return function(){var e=t.apply(this,arguments);var s=new n(undefined,undefined,r,i);var o=s.promise();s._generator=e;s._promiseFulfilled(undefined);return o}};t.coroutine.addYieldHandler=function(t){if(typeof t!=="function"){throw new c("expecting a function but got "+u.classString(t))}h.push(t)};t.spawn=function(r){o.deprecated("Promise.spawn()","Promise.coroutine()");if(typeof r!=="function"){return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n")}var n=new PromiseSpawn(r,this);var i=n.promise();n._run(t.spawn);return i}}},9255:(t,e,r)=>{"use strict";t.exports=function(t,e,n,i,s){var o=r(6587);var a=o.canEvaluate;var c=o.tryCatch;var u=o.errorObj;var l;if(true){if(a){var f=function(t){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,t))};var h=function(t){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,t))};var p=function(e){var r=new Array(e);for(var n=0;n<r.length;++n){r[n]="this.p"+(n+1)}var i=r.join(" = ")+" = null;";var o="var promise;\n"+r.map(function(t){return" \n promise = "+t+"; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "}).join("\n");var a=r.join(", ");var l="Holder$"+e;var f="return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n ";f=f.replace(/\[TheName\]/g,l).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,a).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,o);return new Function("tryCatch","errorObj","Promise","async",f)(c,u,t,s)};var d=[];var y=[];var m=[];for(var v=0;v<8;++v){d.push(p(v+1));y.push(f(v+1));m.push(h(v+1))}l=function(t){this._reject(t)}}}t.join=function(){var r=arguments.length-1;var s;if(r>0&&typeof arguments[r]==="function"){s=arguments[r];if(true){if(r<=8&&a){var c=new t(i);c._captureStackTrace();var u=d[r-1];var f=new u(s);var h=y;for(var p=0;p<r;++p){var v=n(arguments[p],c);if(v instanceof t){v=v._target();var _=v._bitField;if((_&50397184)===0){v._then(h[p],l,undefined,c,f);m[p](v,f);f.asyncNeeded=false}else if((_&33554432)!==0){h[p].call(c,v._value(),f)}else if((_&16777216)!==0){c._reject(v._reason())}else{c._cancel()}}else{h[p].call(c,v,f)}}if(!c._isFat