/*! For license information please see es6-promise.debug.js.LICENSE.txt */
var OfficeExtension=OfficeExtension||{};!function(t){var n=t.Promise,e=n&&"resolve"in n&&"reject"in n&&"all"in n&&"race"in n&&function(){var t;return new n((function(n){t=n})),"function"==typeof t}();if(!e){var o,r="pending",i="sealed",c="fulfilled",f="rejected",u=function(){},a="undefined"!=typeof setImmediate?setImmediate:setTimeout,s=[],h=function(t){if("function"!=typeof t)throw new TypeError("Promise constructor takes a function argument");if(this instanceof h==0)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],function(t,n){function e(t){m(n,t)}try{t((function(t){d(n,t)}),e)}catch(t){e(t)}}(t,this)};h.prototype={constructor:h,state_:r,then_:null,data_:void 0,then:function(t,n){var e={owner:this,then:new this.constructor(u),fulfilled:t,rejected:n};return this.state_===c||this.state_===f?y(w,e):this.then_.push(e),e.then},catch:function(t){return this.then(null,t)}},h.all=function(t){if(!l(t))throw new TypeError("You must pass an array to Promise.all().");return new this((function(n,e){var o=[],r=0;function i(t){return r++,function(e){o[t]=e,--r||n(o)}}for(var c,f=0;f<t.length;f++)(c=t[f])&&"function"==typeof c.then?c.then(i(f),e):o[f]=c;r||n(o)}))},h.race=function(t){if(!l(t))throw new TypeError("You must pass an array to Promise.race().");return new this((function(n,e){for(var o,r=0;r<t.length;r++)(o=t[r])&&"function"==typeof o.then?o.then(n,e):n(o)}))},h.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this((function(n){n(t)}))},h.reject=function(t){return new this((function(n,e){e(t)}))},t.Promise=h}function l(t){return"[object Array]"===Object.prototype.toString.call(t)}function p(){for(var t=0;t<s.length;t++)s[t][0](s[t][1]);s=[],o=!1}function y(t,n){s.push([t,n]),o||(o=!0,a(p,0))}function w(t){var n=t.owner,e=n.state_,o=n.data_,r=t[e],i=t.then;if("function"==typeof r){e=c;try{o=r(o)}catch(t){m(i,t)}}_(i,o)||(e===c&&d(i,o),e===f&&m(i,o))}function _(t,n){var e;try{if(t===n)throw new TypeError("A promises callback cannot return that same promise.");if(n&&("function"==typeof n||"object"==typeof n)){var o=n.then;if("function"==typeof o)return o.call(n,(function(o){e||(e=!0,n!==o?d(t,o):v(t,o))}),(function(n){e||(e=!0,m(t,n))})),!0}}catch(n){return e||m(t,n),!0}return!1}function d(t,n){t!==n&&_(t,n)||v(t,n)}function v(t,n){t.state_===r&&(t.state_=i,t.data_=n,y(E,t))}function m(t,n){t.state_===r&&(t.state_=i,t.data_=n,y(b,t))}function j(t){var n=t.then_;t.then_=void 0;for(var e=0;e<n.length;e++)w(n[e])}function E(t){t.state_=c,j(t)}function b(t){t.state_=f,j(t)}}(OfficeExtension);