"function"!=typeof Promise.any&&(Promise.any=function(n){return new Promise(function(e,o,t,i){t=[],i=n.map(function(n,r){return Promise.resolve(n).then(e,function(n){return t[r]=n,--i||o({errors:t})})}).length})}),"function"!=typeof Promise.allSettled&&(Promise.allSettled=function(t){var e=this;return e.all(t.map(function(t){return e.resolve(t).then(this.$,this._)},{$:function(t){return{status:"fulfilled",value:t}},_:function(t){return{status:"rejected",reason:t}}}))}),"function"!=typeof Promise.prototype.finally&&(Promise.prototype.finally=function(callback){var P;return"function"!=typeof callback?this.then(callback,callback):(P=this.constructor||Promise,this.then(function(value){return P.resolve(callback()).then(function(){return value})},function(err){return P.resolve(callback()).then(function(){throw err})}))});