UNPKG

quasar-framework

Version:

Simultaneously build desktop/mobile SPA websites & phone/tablet apps with VueJS

6 lines 6.18 kB
/*! * Quasar Framework v0.15.3 * (c) 2016-present Razvan Stoenescu * Released under the MIT License. */ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";!function(e,n){"object"==typeof module&&"object"==typeof module.exports?module.exports=n(e):n(e)}("undefined"!=typeof window?window:global,function(e){var n=Object.defineProperty,t=Object.defineProperties,r=Array.prototype.slice,o=Array.isArray,i=Math.floor,u=Math.abs,c="object"==typeof e.ES6?e.ES6:e.ES6={},f=Math.max,l=function(e){return"function"==typeof e},a=function(e,n){if(!l(e))throw new TypeError(e+" is not a function");var t=r.call(arguments,2);setTimeout(function(){e.apply(n,t)})},s=function e(n){if(!(this instanceof e)||g(this))throw new TypeError(String(this)+" is not a promise");if(!l(n))throw new TypeError("Promise resolver "+String(n)+" is not a function");p(this);try{n(function(e){this._resolve(e)}.bind(this),function(e){this._reject(e)}.bind(this))}catch(e){this._reject(e)}};s.resolve=function(e){return g(e)?e:new s(function(n,t){d(e)?a(function(){try{e.then(n,t)}catch(e){t(e)}}):n(e)})},s.reject=function(e){return new s(function(n,t){t(e)})},s.race=function(e){if(void 0===e||null===e)return new s(function(e,n){a(n,void 0,TypeError("First argument of Promise.race can not be undefined or null"))});var n,r=!1;return n=((n=(n=Number(e.length))!=n?0:n)<0?-1:1)*i(u(n)),n=f(n,0),new s(function(o,i){var u,c=0;for(u=function(e){var n,u;g(e)?b(e)?r||(r=!0,a(function(){o(e._value)})):j(e)?r||(r=!0,a(function(){i(e._reason)})):y(e)&&(n=e._resolve,u=e._reject,t(e,{_resolve:{value:function(e){n(e),r||(r=!0,o(e))}.bind(e)},_reject:{value:function(e){u(e),r||(r=!0,i(e))}.bind(e)}})):d(e)?a(function(){try{e.then(function(e){r||(r=!0,o(e))},function(e){r||(r=!0,i(e))})}catch(e){i(e)}}):r||(r=!0,a(function(){o(e)}))};c<n;++c)u(e[c])})},s.all=function(e){if(void 0===e||null===e)return new s(function(e,n){a(n,void 0,TypeError("First argument of Promise.all can not be undefined or null"))});var n,r,o=0;return n=((n=(n=Number(e.length))!=n?0:n)<0?-1:1)*i(u(n)),n=f(n,0),r=new Array(n),new s(function(i,u){var c,f=0;if(0===n)i(r);else for(c=function(e,c){var f,l;g(e)?b(e)?(r[c]=e._value,++o===n&&a(function(){i(r)})):j(e)?a(function(){u(e._reason)}):y(e)&&(f=e._resolve,l=e._reject,t(e,{_resolve:{value:function(e){f(e),r[c]=e,++o===n&&i(r)}.bind(e)},_reject:{value:function(e){l(e),u(e)}.bind(e)}})):d(e)?a(function(){try{e.then(function(e){r[c]=e,++o===n&&i(r)},function(e){u(e)})}catch(e){u(e)}}):(r[c]=e,++o===n&&a(function(){i(r)}))};f<n;++f)c(e[f],f)})},s.prototype.then=function(e,n){if(!g(this))throw new TypeError(this+" is not a promise");e=l(e)?e:v,n=l(n)?n:_;var t,r,o=new s(function(e,n){});return t=function(n){var t;try{t=e(n),h(t,o)}catch(e){o._reject(e)}},r=function(e){var t;try{t=n(e),h(t,o)}catch(e){o._reject(e)}},y(this)?(this._onFulfilled.push(t),this._onRejected.push(r)):b(this)?a(t,void 0,this._value):j(this)&&a(r,void 0,this._reason),o};var h=function(e,n){var r,o;g(e)?b(e)?n._resolve(e._value):j(e)?n._reject(e._reason):y(e)&&(r=e._resolve,o=e._reject,t(e,{_resolve:{value:function(e){r(e),n._resolve(e)}.bind(e)},_reject:{value:function(e){o(e),n._reject(e)}.bind(e)}})):d(e)?a(function(){try{e.then(function(e){this._resolve(e)}.bind(n),function(e){this._reject(e)}.bind(n))}catch(e){n._reject(e)}}):n._resolve(e)};s.prototype.catch=function(e){if(!l(this.then))throw new TypeError("(var).then is not a function");return this.then(void 0,e)},s.prototype.toString=function(){if(!g(this))throw new TypeError(this+" is not a promise");switch(this._state){case"pending":return"Promise { <pending> }";case"fulfilled":return"Promise { "+this._value+" }";case"rejected":return"Promise { <rejected> "+this._reason+" }"}};var d=function(e){return function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}(e)&&l(e.then)},v=function(e){return s.resolve(e)},_=function(e){return s.reject(e)},p=function(e){t(e,{_isPromise:{value:!0},_onFulfilled:{value:[]},_onRejected:{value:[]},_resolve:{value:function(e){w(this)||(t(this,{_state:{value:"fulfilled"},_value:{value:e}}),this._onFulfilled.length>0&&a(function(e){this._onFulfilled.forEach(function(n){n(e)}),this._onFulfilled.length=0,this._onRejected.length=0},this,e))}.bind(e),configurable:!0},_reject:{value:function(e){w(this)||(t(this,{_state:{value:"rejected"},_reason:{value:e}}),this._onRejected.length>0&&a(function(e){this._onRejected.forEach(function(n){n(e)}),this._onFulfilled.length=0,this._onRejected.length=0},this,e))}.bind(e),configurable:!0},_state:{value:"pending",configurable:!0},_value:{value:void 0,configurable:!0},_reason:{value:void 0,configurable:!0}})},y=function(e){return"pending"===e._state},b=function(e){return"fulfilled"===e._state},j=function(e){return"rejected"===e._state},w=function(e){return"fulfilled"===e._state||"rejected"===e._state},m=function(e){return!0===e._isPromise&&o(e._onFulfilled)&&o(e._onRejected)&&l(e._resolve)&&l(e._reject)&&(n=e._state,-1!==["pending","fulfilled","rejected"].indexOf(String(n)))&&e.hasOwnProperty("_value")&&e.hasOwnProperty("_reason");var n},g=function(e){return e instanceof s&&m(e)};return t(c,{isPromise:{value:g,writable:!0,configurable:!0}}),n(e,"Promise",{value:s,writable:!0,configurable:!0}),c});var e=Object.freeze({});window&&!window.Promise&&(window.Promise=e),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){return this.parentNode?this.parentNode.removeChild(this):this}})}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=Object(this),t=n.length>>>0,r=arguments[1],o=0;o<t;o++)if(e.call(r,n[o],o,n))return o;return-1}})});