UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

6 lines 7.29 kB
/*! * Quasar Framework v1.2.5 * (c) 2015-present Razvan Stoenescu * Released under the MIT License. */ !function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(t){return"function"==typeof t}"undefined"!=typeof window&&function(t){[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})});try{return void new e("test")}catch(t){}var e=function(e,r){r=r||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(e,r.bubbles||!1,r.cancelable||!1,r.view||t,r.detail||0,r.screenX||0,r.screenY||0,r.clientX||0,r.clientY||0,r.ctrlKey||!1,r.altKey||!1,r.shiftKey||!1,r.metaKey||!1,r.button||0,r.relatedTarget||null),n};e.prototype=Event.prototype,t.MouseEvent=e}(window),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e=Object(this),r=e.length>>>0,n=arguments[1],o=0;o<r;o++)if(t.call(n,e[o],o,e))return o;return-1}});var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,n=void 0,o=void 0,i=function(t,e){h[r]=t,h[r+1]=e,2===(r+=2)&&(o?o(p):b())};var s="undefined"!=typeof window?window:void 0,u=s||{},c=u.MutationObserver||u.WebKitMutationObserver,a="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function l(){var t=setTimeout;return function(){return t(p,1)}}var h=new Array(1e3);function p(){for(var t=0;t<r;t+=2){(0,h[t])(h[t+1]),h[t]=void 0,h[t+1]=void 0}r=0}var v,d,y,_,b=void 0;function w(t,e){var r=this,n=new this.constructor(A);void 0===n[g]&&N(n);var o=r._state;if(o){var s=arguments[o-1];i(function(){return F(o,n,s,r._result)})}else Y(r,n,t,e);return n}function m(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(A);return C(e,t),e}a?b=function(){return process.nextTick(p)}:c?(d=0,y=new c(p),_=document.createTextNode(""),y.observe(_,{characterData:!0}),b=function(){_.data=d=++d%2}):f?((v=new MessageChannel).port1.onmessage=p,b=function(){return v.port2.postMessage(0)}):b=void 0===s&&"function"==typeof require?function(){try{var t=Function("return this")().require("vertx");return void 0!==(n=t.runOnLoop||t.runOnContext)?function(){n(p)}:l()}catch(t){return l()}}():l();var g=Math.random().toString(36).substring(2);function A(){}var E=void 0,j=1,T=2,M={error:null};function O(t){try{return t.then}catch(t){return M.error=t,M}}function S(e,r,n){r.constructor===e.constructor&&n===w&&r.constructor.resolve===m?function(t,e){e._state===j?x(t,e._result):e._state===T?K(t,e._result):Y(e,void 0,function(e){return C(t,e)},function(e){return K(t,e)})}(e,r):n===M?(K(e,M.error),M.error=null):void 0===n?x(e,r):t(n)?function(t,e,r){i(function(t){var n=!1,o=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?C(t,r):x(t,r))},function(e){n||(n=!0,K(t,e))},t._label);!n&&o&&(n=!0,K(t,o))},t)}(e,r,n):x(e,r)}function C(t,e){var r,n;t===e?K(t,new TypeError("You cannot resolve a promise with itself")):(n=typeof(r=e),null===r||"object"!==n&&"function"!==n?x(t,e):S(t,e,O(e)))}function P(t){t._onerror&&t._onerror(t._result),D(t)}function x(t,e){t._state===E&&(t._result=e,t._state=j,0!==t._subscribers.length&&i(D,t))}function K(t,e){t._state===E&&(t._state=T,t._result=e,i(P,t))}function Y(t,e,r,n){var o=t._subscribers,s=o.length;t._onerror=null,o[s]=e,o[s+j]=r,o[s+T]=n,0===s&&t._state&&i(D,t)}function D(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)n=e[s],o=e[s+r],n?F(r,n,o,i):o(i);t._subscribers.length=0}}function F(e,r,n,o){var i=t(n),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if((s=function(t,e){try{return t(e)}catch(t){return M.error=t,M}}(n,o))===M?(a=!0,u=s.error,s.error=null):c=!0,r===s)return void K(r,new TypeError("A promises callback cannot return that same promise."))}else s=o,c=!0;r._state!==E||(i&&c?C(r,s):a?K(r,u):e===j?x(r,s):e===T&&K(r,s))}var I=0;function N(t){t[g]=I++,t._state=void 0,t._result=void 0,t._subscribers=[]}var k=function(){function t(t,r){this._instanceConstructor=t,this.promise=new t(A),this.promise[g]||N(this.promise),e(r)?(this.length=r.length,this._remaining=r.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(r),0===this._remaining&&x(this.promise,this._result))):K(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===E&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===m){var o=O(t);if(o===w&&t._state!==E)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(r===q){var i=new r(A);S(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},t.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===E&&(this._remaining--,t===T?K(n,r):this._result[e]=r),0===this._remaining&&x(n,this._result)},t.prototype._willSettleAt=function(t,e){var r=this;Y(t,void 0,function(t){return r._settledAt(j,e,t)},function(t){return r._settledAt(T,e,t)})},t}();var q=function(){function t(e){this[g]=I++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(t,e){try{e(function(e){C(t,e)},function(e){K(t,e)})}catch(e){K(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this.constructor;return this.then(function(r){return e.resolve(t()).then(function(){return r})},function(r){return e.resolve(t()).then(function(){throw r})})},t}();q.prototype.then=w,q.all=function(t){return new k(this,t).promise},q.race=function(t){var r=this;return e(t)?new r(function(e,n){for(var o=t.length,i=0;i<o;i++)r.resolve(t[i]).then(e,n)}):new r(function(t,e){return e(new TypeError("You must pass an array to race."))})},q.resolve=m,q.reject=function(t){var e=new this(A);return K(e,t),e},q._setScheduler=function(t){o=t},q._setAsap=function(t){i=t},q._asap=i,function(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=q}()});