UNPKG

quasar-framework

Version:

Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase

6 lines 7.08 kB
/*! * Quasar Framework v0.17.20 * (c) 2016-present Razvan Stoenescu * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";function t(t){return"function"==typeof t}"undefined"!=typeof window&&function(t){try{return void new e("test")}catch(t){}var e=function(e,n){n=n||{};var r=document.createEvent("MouseEvent");return r.initMouseEvent(e,n.bubbles||!1,n.cancelable||!1,n.view||t,n.detail||0,n.screenX||0,n.screenY||0,n.clientX||0,n.clientY||0,n.ctrlKey||!1,n.altKey||!1,n.shiftKey||!1,n.metaKey||!1,n.button||0,n.relatedTarget||null),r};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),n=e.length>>>0,r=arguments[1],o=0;o<n;o++)if(t.call(r,e[o],o,e))return o;return-1}});var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,r=void 0,o=void 0,i=function(t,e){h[n]=t,h[n+1]=e,2===(n+=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<n;t+=2){(0,h[t])(h[t+1]),h[t]=void 0,h[t+1]=void 0}n=0}var v,d,y,_,b=void 0;function w(t,e){var n=this,r=new this.constructor(A);void 0===r[g]&&q(r);var o=n._state;if(o){var s=arguments[o-1];i(function(){return I(o,r,s,n._result)})}else Y(n,r,t,e);return r}function m(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(A);return O(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!==(r=t.runOnLoop||t.runOnContext)?function(){r(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 S(t){try{return t.then}catch(t){return M.error=t,M}}function x(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===m?function(t,e){e._state===j?P(t,e._result):e._state===T?K(t,e._result):Y(e,void 0,function(e){return O(t,e)},function(e){return K(t,e)})}(e,n):r===M?(K(e,M.error),M.error=null):void 0===r?P(e,n):t(r)?function(t,e,n){i(function(t){var r=!1,o=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,function(n){r||(r=!0,e!==n?O(t,n):P(t,n))},function(e){r||(r=!0,K(t,e))},t._label);!r&&o&&(r=!0,K(t,o))},t)}(e,n,r):P(e,n)}function O(t,e){var n,r;t===e?K(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?P(t,e):x(t,e,S(e)))}function C(t){t._onerror&&t._onerror(t._result),F(t)}function P(t,e){t._state===E&&(t._result=e,t._state=j,0!==t._subscribers.length&&i(F,t))}function K(t,e){t._state===E&&(t._state=T,t._result=e,i(C,t))}function Y(t,e,n,r){var o=t._subscribers,s=o.length;t._onerror=null,o[s]=e,o[s+j]=n,o[s+T]=r,0===s&&t._state&&i(F,t)}function F(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?I(n,r,o,i):o(i);t._subscribers.length=0}}function I(e,n,r,o){var i=t(r),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}}(r,o))===M?(a=!0,u=s.error,s.error=null):c=!0,n===s)return void K(n,new TypeError("A promises callback cannot return that same promise."))}else s=o,c=!0;n._state!==E||(i&&c?O(n,s):a?K(n,u):e===j?P(n,s):e===T&&K(n,s))}var k=0;function q(t){t[g]=k++,t._state=void 0,t._result=void 0,t._subscribers=[]}var X=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(A),this.promise[g]||q(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?P(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&P(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 n=this._instanceConstructor,r=n.resolve;if(r===m){var o=S(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(n===D){var i=new n(A);x(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===E&&(this._remaining--,t===T?K(r,n):this._result[e]=n),0===this._remaining&&P(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;Y(t,void 0,function(t){return n._settledAt(j,e,t)},function(t){return n._settledAt(T,e,t)})},t}();var D=function(){function t(e){this[g]=k++,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){O(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(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){throw n})})},t}();D.prototype.then=w,D.all=function(t){return new X(this,t).promise},D.race=function(t){var n=this;return e(t)?new n(function(e,r){for(var o=t.length,i=0;i<o;i++)n.resolve(t[i]).then(e,r)}):new n(function(t,e){return e(new TypeError("You must pass an array to race."))})},D.resolve=m,D.reject=function(t){var e=new this(A);return K(e,t),e},D._setScheduler=function(t){o=t},D._setAsap=function(t){i=t},D._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 n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=D}()});