!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t():"function"==typeofdefine&&define.amd?define(t):t()}(0,function(){"use strict";functione(e){vart=this.constructor;returnthis.then(function(n){returnt.resolve(e()).then(function(){returnn})},function(n){returnt.resolve(e()).then(function(){returnt.reject(n)})})}functiont(e){returnnewthis(function(t,n){functionr(e,n){if(n&&("object"==typeofn||"function"==typeofn)){varf=n.then;if("function"==typeoff)returnvoidf.call(n,function(t){r(e,t)},function(n){o[e]={status:"rejected",reason:n},0==--i&&t(o)})}o[e]={status:"fulfilled",value:n},0==--i&&t(o)}if(!e||"undefined"==typeofe.length)returnn(newTypeError(typeofe+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));varo=Array.prototype.slice.call(e);if(0===o.length)returnt([]);for(vari=o.length,f=0;o.length>f;f++)r(f,o[f])})}functionn(e,t){this.name="AggregateError",this.errors=e,this.message=t||""}functionr(e){vart=this;returnnewt(function(r,o){if(!e||"undefined"==typeofe.length)returno(newTypeError("Promise.any accepts an array"));vari=Array.prototype.slice.call(e);if(0===i.length)returno();for(varf=[],u=0;i.length>u;u++)try{t.resolve(i[u]).then(r)["catch"](function(e){f.push(e),f.length===i.length&&o(newn(f,"All promises were rejected"))})}catch(c){o(c)}})}functiono(e){return!(!e||"undefined"==typeofe.length)}functioni(){}functionf(e){if(!(thisinstanceoff))thrownewTypeError("Promises must be constructed via new");if("function"!=typeofe)thrownewTypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],s(e,this)}functionu(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,f._immediateFn(function(){varn=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){varr;try{r=n(e._value)}catch(o){returnvoida(t.promise,o)}c(t.promise,r)}else(1===e._state?c:a)(t.promise,e._value)})):e._deferreds.push(t)}functionc(e,t){try{if(t===e)thrownewTypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeoft||"function"==typeoft)){varn=t.then;if(tinstanceoff)returne._state=3,e._value=t,voidl(e);if("function"==typeofn)returnvoids(function(e,t){returnfunction(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,l(e)}catch(r){a(e,r)}}functiona(e,t){e._state=2,e._value=t,l(e)}functionl(e){2===e._state&&0===e._deferreds.length&&f._immediateFn(function(){e._handled||f._unhandledRejectionFn(e._value)});for(vart=0,n=e._deferreds.length;n>t;t++)u(e,e._deferreds[t]);e._deferreds=null}functions(e,t){varn=!1;try{e(function(e){n||(n=!0,c(t,e))},function(e){n||(n=!0,a(t,e))})}catch(r){if(n)return;n=!0,a(t,r)}}n.prototype=Error.prototype;vard=setTimeout;f.prototype["catch"]=function(e){returnthis.then(null,e)},f.prototype.then=function(e,t){varn=newthis.constructor(i);returnu(this,newfunction(e,t,n){this.onFulfilled="function"==typeofe?e:null,this.onRejected="function"==typeoft?t:null,this.promise=n}(e,t,n)),n},f.prototype["finally"]=e,f.all=function(e){returnnewf(function(t,n){functionr(e,o){try{if(o&&("object"==typeofo||"function"==typeofo)){varu=o.then;if("function"==typeofu)returnvoidu.call(o,function(t){r(e,t)},n)}i[e]=o,0==--f&&t(i)}catch(c){n(c)}}if(!o(e))returnn(newTypeError("Promise.all accepts an array"));vari=Array.prototype.slice.call(e);if(0===i.length)returnt([]);for(varf=i.length,u=0;i.length>u;u++)r(u,i[u])})},f.any=r,f.allSettled=t,f.resolve=function(e){returne&&"object"==typeofe&&e.constructor===f?e:newf(function(t){t(e)})},f.reject=function(e){returnnewf(function(t,n){n(e)})},f.race=function(e){returnnewf(function(t,n){if(!o(e))returnn(newTypeError("Promise.race accepts an array"));for(varr=0,i=e.length;i>r;r++)f.resolve(e[r]).then(t,n)})},f._immediateFn="function"==typeofsetImmediate&&function(e){setImmediate(e)}||function(e){d(e,0)},f._unhandledRejectionFn=function(e){void0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};varp=function(){if("undefined"!=typeofself)returnself;if("undefined"!=typeofwindow)returnwindow;if("undefined"!=typeofglobal)returnglobal;throwError("unable to locate global object")}();"function"!=typeofp.Promise?p.Promise=f:(p.Promise.prototype["finally"]||(p.Promise.prototype["finally"]=e),p.Promise.allSettled||(p.Promise.allSettled=t),p.Promise.any||(p.Promise.any=r))});