/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "build/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 925); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_core__ = __webpack_require__(575); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["c"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["d"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["e"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["f"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["g"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["h"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["i"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["j"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["k"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["l"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["m"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["n"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["o"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["p"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["q"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["r"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["s"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["t"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["u"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["v"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["w"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["x"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["y"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["z"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["A"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["B"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["C"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["D"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["E"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["F"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["G"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["H"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["I"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["J"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["K"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["L"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["M"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["N"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["O"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["P"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["Q"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "R", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["R"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "S", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["S"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "T", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["T"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "U", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["U"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "V", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["V"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "W", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["W"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "X", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["X"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["Y"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["Z"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_0"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_1", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_1"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_2", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_2"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_3", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_3"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_4", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_4"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_5", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_5"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_6", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_6"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_7", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_7"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_8", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_8"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_9", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_9"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_10", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_10"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_11", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_11"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_12", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_12"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_13", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_13"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_14", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_14"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_15", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_15"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_16", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_16"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_17", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_17"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_18", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_18"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_19", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_19"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_20", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_20"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_21", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_21"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_22", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_22"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_23", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_23"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_24", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_24"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_25", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_25"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_26", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_26"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "_27", function() { return __WEBPACK_IMPORTED_MODULE_0__src_core__["_27"]; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @module * @description * Entry point for all public APIs of the core package. */ //# sourceMappingURL=index.js.map /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var root_1 = __webpack_require__(25); var toSubscriber_1 = __webpack_require__(923); var observable_1 = __webpack_require__(142); /** * A representation of any set of values over any amount of time. This the most basic building block * of RxJS. * * @class Observable */ var Observable = (function () { /** * @constructor * @param {Function} subscribe the function that is called when the Observable is * initially subscribed to. This function is given a Subscriber, to which new values * can be `next`ed, or an `error` method can be called to raise an error, or * `complete` can be called to notify of a successful completion. */ function Observable(subscribe) { this._isScalar = false; if (subscribe) { this._subscribe = subscribe; } } /** * Creates a new Observable, with this Observable as the source, and the passed * operator defined as the new observable's operator. * @method lift * @param {Operator} operator the operator defining the operation to take on the observable * @return {Observable} a new observable with the Operator applied */ Observable.prototype.lift = function (operator) { var observable = new Observable(); observable.source = this; observable.operator = operator; return observable; }; /** * Registers handlers for handling emitted values, error and completions from the observable, and * executes the observable's subscriber function, which will take action to set up the underlying data stream * @method subscribe * @param {PartialObserver|Function} observerOrNext (optional) either an observer defining all functions to be called, * or the first of three possible handlers, which is the handler for each value emitted from the observable. * @param {Function} error (optional) a handler for a terminal event resulting from an error. If no error handler is provided, * the error will be thrown as unhandled * @param {Function} complete (optional) a handler for a terminal event resulting from successful completion. * @return {ISubscription} a subscription reference to the registered handlers */ Observable.prototype.subscribe = function (observerOrNext, error, complete) { var operator = this.operator; var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete); if (operator) { operator.call(sink, this); } else { sink.add(this._subscribe(sink)); } if (sink.syncErrorThrowable) { sink.syncErrorThrowable = false; if (sink.syncErrorThrown) { throw sink.syncErrorValue; } } return sink; }; /** * @method forEach * @param {Function} next a handler for each value emitted by the observable * @param {PromiseConstructor} [PromiseCtor] a constructor function used to instantiate the Promise * @return {Promise} a promise that either resolves on observable completion or * rejects with the handled error */ Observable.prototype.forEach = function (next, PromiseCtor) { var _this = this; if (!PromiseCtor) { if (root_1.root.Rx && root_1.root.Rx.config && root_1.root.Rx.config.Promise) { PromiseCtor = root_1.root.Rx.config.Promise; } else if (root_1.root.Promise) { PromiseCtor = root_1.root.Promise; } } if (!PromiseCtor) { throw new Error('no Promise impl found'); } return new PromiseCtor(function (resolve, reject) { var subscription = _this.subscribe(function (value) { if (subscription) { // if there is a subscription, then we can surmise // the next handling is asynchronous. Any errors thrown // need to be rejected explicitly and unsubscribe must be // called manually try { next(value); } catch (err) { reject(err); subscription.unsubscribe(); } } else { // if there is NO subscription, then we're getting a nexted // value synchronously during subscription. We can just call it. // If it errors, Observable's `subscribe` will ensure the // unsubscription logic is called, then synchronously rethrow the error. // After that, Promise will trap the error and send it // down the rejection path. next(value); } }, reject, resolve); }); }; Observable.prototype._subscribe = function (subscriber) { return this.source.subscribe(subscriber); }; /** * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable * @method Symbol.observable * @return {Observable} this instance of the observable */ Observable.prototype[observable_1.$$observable] = function () { return this; }; // HACK: Since TypeScript inherits static properties too, we have to // fight against TypeScript here so Subject can have a different static create signature /** * Creates a new cold Observable by calling the Observable constructor * @static true * @owner Observable * @method create * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor * @return {Observable} a new cold observable */ Observable.create = function (subscribe) { return new Observable(subscribe); }; return Observable; }()); exports.Observable = Observable; //# sourceMappingURL=Observable.js.map /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__(646); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return pluginWarn; }); /* unused harmony export cordovaWarn */ /* harmony export (immutable) */ __webpack_exports__["h"] = getPromise; /* unused harmony export wrap */ /* harmony export (immutable) */ __webpack_exports__["b"] = Plugin; /* harmony export (immutable) */ __webpack_exports__["a"] = Cordova; /* harmony export (immutable) */ __webpack_exports__["d"] = CordovaInstance; /* harmony export (immutable) */ __webpack_exports__["c"] = CordovaProperty; /* harmony export (immutable) */ __webpack_exports__["f"] = InstanceProperty; /* harmony export (immutable) */ __webpack_exports__["i"] = CordovaFunctionOverride; /** * @private * @param pluginRef * @returns {null|*} */ var getPlugin = function (pluginRef) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__["a" /* get */])(window, pluginRef); }; /** * @private * @param pluginObj * @param method */ var pluginWarn = function (pluginObj, method) { var pluginName = pluginObj.pluginName, plugin = pluginObj.plugin; if (method) { console.warn('Native: tried calling ' + pluginName + '.' + method + ', but the ' + pluginName + ' plugin is not installed.'); } else { console.warn('Native: tried accessing the ' + pluginName + ' plugin but it\'s not installed.'); } console.warn('Install the ' + pluginName + ' plugin: \'ionic plugin add ' + plugin + '\''); }; /** * @private * @param pluginName * @param method */ var cordovaWarn = function (pluginName, method) { if (method) { console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'); } else { console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'); } }; function setIndex(args, opts, resolve, reject) { if (opts === void 0) { opts = {}; } // ignore resolve and reject in case sync if (opts.sync) { return args; } // If the plugin method expects myMethod(success, err, options) if (opts.callbackOrder === 'reverse') { // Get those arguments in the order [resolve, reject, ...restOfArgs] args.unshift(reject); args.unshift(resolve); } else if (opts.callbackStyle === 'node') { args.push(function (err, result) { if (err) { reject(err); } else { resolve(result); } }); } else if (opts.callbackStyle === 'object' && opts.successName && opts.errorName) { var obj = {}; obj[opts.successName] = resolve; obj[opts.errorName] = reject; args.push(obj); } else if (typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') { var setSuccessIndex = function () { // If we've specified a success/error index if (opts.successIndex > args.length) { args[opts.successIndex] = resolve; } else { args.splice(opts.successIndex, 0, resolve); } }; var setErrorIndex = function () { // We don't want that the reject cb gets spliced into the position of an optional argument that has not been defined and thus causing non expected behaviour. if (opts.errorIndex > args.length) { args[opts.errorIndex] = reject; // insert the reject fn at the correct specific index } else { args.splice(opts.errorIndex, 0, reject); // otherwise just splice it into the array } }; if (opts.successIndex > opts.errorIndex) { setErrorIndex(); setSuccessIndex(); } else { setSuccessIndex(); setErrorIndex(); } } else { // Otherwise, let's tack them on to the end of the argument list // which is 90% of cases args.push(resolve); args.push(reject); } return args; } function callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject) { if (opts === void 0) { opts = {}; } // Try to figure out where the success/error callbacks need to be bound // to our promise resolve/reject handlers. args = setIndex(args, opts, resolve, reject); var pluginInstance = getPlugin(pluginObj.pluginRef); if (!pluginInstance) { // Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation). if (!window.cordova) { cordovaWarn(pluginObj.pluginName, methodName); return { error: 'cordova_not_available' }; } pluginWarn(pluginObj, methodName); return { error: 'plugin_not_installed' }; } // TODO: Illegal invocation needs window context return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__["a" /* get */])(window, pluginObj.pluginRef)[methodName].apply(pluginInstance, args); } /** * @private */ function getPromise(cb) { var tryNativePromise = function () { if (window.Promise) { return new Promise(function (resolve, reject) { cb(resolve, reject); }); } else { console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular 1/2 or on a recent browser.'); } }; if (window.angular) { var injector = window.angular.element(document.querySelector('[ng-app]') || document.body).injector(); if (injector) { var $q = injector.get('$q'); return $q(function (resolve, reject) { cb(resolve, reject); }); } else { console.warn('Angular 1 was detected but $q couldn\'t be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won\'t trigger an automatic digest when promises resolve.'); return tryNativePromise(); } } else { return tryNativePromise(); } } function wrapPromise(pluginObj, methodName, args, opts) { if (opts === void 0) { opts = {}; } var pluginResult, rej; var p = getPromise(function (resolve, reject) { pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject); rej = reject; }); // Angular throws an error on unhandled rejection, but in this case we have already printed // a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason // to error if (pluginResult && pluginResult.error) { p.catch(function () { }); rej(pluginResult.error); } return p; } function wrapOtherPromise(pluginObj, methodName, args, opts) { if (opts === void 0) { opts = {}; } return getPromise(function (resolve, reject) { var pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts); if (pluginResult && pluginResult.error) { reject(pluginResult.error); } pluginResult.then(resolve).catch(reject); }); } function wrapObservable(pluginObj, methodName, args, opts) { if (opts === void 0) { opts = {}; } return new __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["Observable"](function (observer) { var pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer)); if (pluginResult && pluginResult.error) { observer.error(pluginResult.error); } return function () { try { if (opts.clearFunction) { if (opts.clearWithArgs) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__["a" /* get */])(window, pluginObj.pluginRef)[opts.clearFunction].apply(pluginObj, args); } return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__["a" /* get */])(window, pluginObj.pluginRef)[opts.clearFunction].call(pluginObj, pluginResult); } } catch (e) { console.warn('Unable to clear the previous observable watch for', pluginObj.pluginName, methodName); console.error(e); } }; }); } function callInstance(pluginObj, methodName, args, opts, resolve, reject) { if (opts === void 0) { opts = {}; } args = setIndex(args, opts, resolve, reject); return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args); } function wrapInstance(pluginObj, methodName, opts) { if (opts === void 0) { opts = {}; } return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } if (opts.sync) { // Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is return callInstance(pluginObj, methodName, args, opts); } else if (opts.observable) { return new __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["Observable"](function (observer) { var pluginResult = callInstance(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer)); return function () { try { if (opts.clearWithArgs) { return pluginObj._objectInstance[opts.clearFunction].apply(pluginObj._objectInstance, args); } return pluginObj._objectInstance[opts.clearFunction].call(pluginObj, pluginResult); } catch (e) { console.warn('Unable to clear the previous observable watch for', pluginObj.pluginName, methodName); console.error(e); } }; }); } else if (opts.otherPromise) { return getPromise(function (resolve, reject) { var result = callInstance(pluginObj, methodName, args, opts, resolve, reject); result.then(resolve, reject); }); } else { return getPromise(function (resolve, reject) { callInstance(pluginObj, methodName, args, opts, resolve, reject); }); } }; } /** * Wrap the event with an observable * @param event * @returns {Observable} */ function wrapEventObservable(event) { return new __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["Observable"](function (observer) { window.addEventListener(event, observer.next.bind(observer), false); return function () { return window.removeEventListener(event, observer.next.bind(observer), false); }; }); } /** * Certain plugins expect the user to override methods in the plugin. For example, * window.cordova.plugins.backgroundMode.onactivate = function() { ... }. * * Unfortunately, this is brittle and would be better wrapped as an Observable. overrideFunction * does just this. */ function overrideFunction(pluginObj, methodName, args, opts) { if (opts === void 0) { opts = {}; } return new __WEBPACK_IMPORTED_MODULE_1_rxjs_Observable__["Observable"](function (observer) { var pluginInstance = getPlugin(pluginObj.pluginRef); if (!pluginInstance) { // Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation). if (!window.cordova) { cordovaWarn(pluginObj.pluginName, methodName); observer.error({ error: 'cordova_not_available' }); } pluginWarn(pluginObj, methodName); observer.error({ error: 'plugin_not_installed' }); return; } var method = pluginInstance[methodName]; if (!method) { observer.error({ error: 'no_such_method' }); observer.complete(); return; } pluginInstance[methodName] = observer.next.bind(observer); }); } /** * @private * @param pluginObj * @param methodName * @param opts * @returns {function(...[any]): (undefined|*|Observable|*|*)} */ var wrap = function (pluginObj, methodName, opts) { if (opts === void 0) { opts = {}; } return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } if (opts.sync) { // Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is return callCordovaPlugin(pluginObj, methodName, args, opts); } else if (opts.observable) { return wrapObservable(pluginObj, methodName, args, opts); } else if (opts.eventObservable && opts.event) { return wrapEventObservable(opts.event); } else if (opts.otherPromise) { return wrapOtherPromise(pluginObj, methodName, args, opts); } else { return wrapPromise(pluginObj, methodName, args, opts); } }; }; /** * @private * * Class decorator specifying Plugin metadata. Required for all plugins. * * @usage * ```typescript * @Plugin({ * pluginName: 'MyPlugin', * plugin: 'cordova-plugin-myplugin', * pluginRef: 'window.myplugin' * }) * export class MyPlugin { * * // Plugin wrappers, properties, and functions go here ... * * } * ``` */ function Plugin(config) { return function (cls) { // Add these fields to the class for (var k in config) { cls[k] = config[k]; } cls['installed'] = function (printWarning) { return !!getPlugin(config.pluginRef); }; cls['getPlugin'] = function () { return getPlugin(config.pluginRef); }; cls['checkInstall'] = function () { var pluginInstance = getPlugin(config.pluginRef); if (!pluginInstance) { pluginWarn(cls); return false; } return true; }; return cls; }; } /** * @private * * Wrap a stub function in a call to a Cordova plugin, checking if both Cordova * and the required plugin are installed. */ function Cordova(opts) { if (opts === void 0) { opts = {}; } return function (target, methodName, descriptor) { return { value: function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } return wrap(this, methodName, opts).apply(this, args); } }; }; } /** * @private * * Wrap an instance method */ function CordovaInstance(opts) { if (opts === void 0) { opts = {}; } return function (target, methodName) { return { value: function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } return wrapInstance(this, methodName, opts).apply(this, args); } }; }; } /** * @private * * * Before calling the original method, ensure Cordova and the plugin are installed. */ function CordovaProperty(target, key) { var exists = function () { var pluginInstance = getPlugin(target.pluginRef); if (!pluginInstance) { pluginWarn(target, key); return false; } return true; }; Object.defineProperty(target, key, { get: function () { if (exists()) { return getPlugin(target.pluginRef)[key]; } else { return {}; } }, set: function (value) { if (exists()) { getPlugin(target.pluginRef)[key] = value; } } }); } /** * @private * @param target * @param key * @constructor */ function InstanceProperty(target, key) { Object.defineProperty(target, key, { get: function () { return this._objectInstance[key]; }, set: function (value) { this._objectInstance[key] = value; } }); } /** * @private * * Wrap a stub function in a call to a Cordova plugin, checking if both Cordova * and the required plugin are installed. */ function CordovaFunctionOverride(opts) { if (opts === void 0) { opts = {}; } return function (target, methodName, descriptor) { return { value: function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } return overrideFunction(this, methodName, opts); } }; }; } //# sourceMappingURL=plugin.js.map /***/ }), /* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["g"] = clamp; /* harmony export (immutable) */ __webpack_exports__["l"] = assign; /* harmony export (immutable) */ __webpack_exports__["o"] = merge; /* harmony export (immutable) */ __webpack_exports__["n"] = debounce; /* harmony export (immutable) */ __webpack_exports__["f"] = defaults; /* unused harmony export isBoolean */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return isString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isFunction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return isDefined; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return isUndefined; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isPresent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isBlank; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return isObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isArray; }); /* unused harmony export isPrimitive */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isTrueProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isCheckedProperty; }); /* harmony export (immutable) */ __webpack_exports__["q"] = reorderArray; /* harmony export (immutable) */ __webpack_exports__["d"] = removeArrayItem; /* harmony export (immutable) */ __webpack_exports__["e"] = swipeShouldReset; /* unused harmony export assert */ /* unused harmony export runInDev */ /** * Given a min and max, restrict the given number * to the range. * @param min the minimum * @param n the value * @param max the maximum */ function clamp(min, n, max) { return Math.max(min, Math.min(n, max)); } /** * The assign() method is used to copy the values of all enumerable own * properties from one or more source objects to a target object. It will * return the target object. When available, this method will use * `Object.assign()` under-the-hood. * @param target The target object * @param source(s) The source object */ function assign() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } if (typeof Object.assign !== 'function') { // use the old-school shallow extend method return _baseExtend(args[0], [].slice.call(args, 1), false); } // use the built in ES6 Object.assign method return Object.assign.apply(null, args); } /** * Do a deep extend (merge). * @param dst the destination * @param ... the param objects */ function merge(dst) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return _baseExtend(dst, [].slice.call(arguments, 1), true); } function _baseExtend(dst, objs, deep) { for (var i = 0, ii = objs.length; i < ii; ++i) { var obj = objs[i]; if (!obj || !isObject(obj) && !isFunction(obj)) continue; var keys = Object.keys(obj); for (var j = 0, jj = keys.length; j < jj; j++) { var key = keys[j]; var src = obj[key]; if (deep && isObject(src)) { if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {}; _baseExtend(dst[key], [src], true); } else { dst[key] = src; } } } return dst; } function debounce(fn, wait, immediate) { if (immediate === void 0) { immediate = false; } var timeout, args, context, timestamp, result; return function () { context = this; args = arguments; timestamp = Date.now(); var later = function () { var last = Date.now() - timestamp; if (last < wait) { timeout = setTimeout(later, wait - last); } else { timeout = null; if (!immediate) result = fn.apply(context, args); } }; var callNow = immediate && !timeout; if (!timeout) { timeout = setTimeout(later, wait); } if (callNow) result = fn.apply(context, args); return result; }; } /** * Apply default arguments if they don't exist in * the first object. * @param the destination to apply defaults to. */ function defaults(dest) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } for (var i = arguments.length - 1; i >= 1; i--) { var source = arguments[i]; if (source) { for (var key in source) { if (source.hasOwnProperty(key) && !dest.hasOwnProperty(key)) { dest[key] = source[key]; } } } } return dest; } var isBoolean = function (val) { return typeof val === 'boolean'; }; var isString = function (val) { return typeof val === 'string'; }; var isNumber = function (val) { return typeof val === 'number'; }; var isFunction = function (val) { return typeof val === 'function'; }; var isDefined = function (val) { return typeof val !== 'undefined'; }; var isUndefined = function (val) { return typeof val === 'undefined'; }; var isPresent = function (val) { return val !== undefined && val !== null; }; var isBlank = function (val) { return val === undefined || val === null; }; var isObject = function (val) { return typeof val === 'object'; }; var isArray = Array.isArray; var isPrimitive = function (val) { return isString(val) || isBoolean(val) || (isNumber(val) && !isNaN(val)); }; var isTrueProperty = function (val) { if (typeof val === 'string') { val = val.toLowerCase().trim(); return (val === 'true' || val === 'on' || val === ''); } return !!val; }; var isCheckedProperty = function (a, b) { if (a === undefined || a === null || a === '') { return (b === undefined || b === null || b === ''); } else if (a === true || a === 'true') { return (b === true || b === 'true'); } else if (a === false || a === 'false') { return (b === false || b === 'false'); } else if (a === 0 || a === '0') { return (b === 0 || b === '0'); } // not using strict comparison on purpose return (a == b); // tslint:disable-line }; /** * @private */ function reorderArray(array, indexes) { var element = array[indexes.from]; array.splice(indexes.from, 1); array.splice(indexes.to, 0, element); return array; } /** * @private */ function removeArrayItem(array, item) { var index = array.indexOf(item); return !!~index && !!array.splice(index, 1); } /** * @private */ function swipeShouldReset(isResetDirection, isMovingFast, isOnResetZone) { // The logic required to know when the sliding item should close (openAmount=0) // depends on three booleans (isCloseDirection, isMovingFast, isOnCloseZone) // and it ended up being too complicated to be written manually without errors // so the truth table is attached below: (0=false, 1=true) // isCloseDirection | isMovingFast | isOnCloseZone || shouldClose // 0 | 0 | 0 || 0 // 0 | 0 | 1 || 1 // 0 | 1 | 0 || 0 // 0 | 1 | 1 || 0 // 1 | 0 | 0 || 0 // 1 | 0 | 1 || 1 // 1 | 1 | 0 || 1 // 1 | 1 | 1 || 1 // The resulting expression was generated by resolving the K-map (Karnaugh map): var shouldClose = (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast); return shouldClose; } var ASSERT_ENABLED = true; /** * @private */ function _runInDev(fn) { if (ASSERT_ENABLED === true) { return fn(); } } function _assert(actual, reason) { if (!actual && ASSERT_ENABLED === true) { var message = 'IONIC ASSERT: ' + reason; console.error(message); debugger; // tslint:disable-line throw new Error(message); } } //# sourceMappingURL=util.js.map /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var isFunction_1 = __webpack_require__(237); var Subscription_1 = __webpack_require__(19); var Observer_1 = __webpack_require__(649); var rxSubscriber_1 = __webpack_require__(143); /** * Implements the {@link Observer} interface and extends the * {@link Subscription} class. While the {@link Observer} is the public API for * consuming the values of an {@link Observable}, all Observers get converted to * a Subscriber, in order to provide Subscription-like capabilities such as * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for * implementing operators, but it is rarely used as a public API. * * @class Subscriber */ var Subscriber = (function (_super) { __extends(Subscriber, _super); /** * @param {Observer|function(value: T): void} [destinationOrNext] A partially * defined Observer or a `next` callback function. * @param {function(e: ?any): void} [error] The `error` callback of an * Observer. * @param {function(): void} [complete] The `complete` callback of an * Observer. */ function Subscriber(destinationOrNext, error, complete) { _super.call(this); this.syncErrorValue = null; this.syncErrorThrown = false; this.syncErrorThrowable = false; this.isStopped = false; switch (arguments.length) { case 0: this.destination = Observer_1.empty; break; case 1: if (!destinationOrNext) { this.destination = Observer_1.empty; break; } if (typeof destinationOrNext === 'object') { if (destinationOrNext instanceof Subscriber) { this.destination = destinationOrNext; this.destination.add(this); } else { this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext); } break; } default: this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext, error, complete); break; } } Subscriber.prototype[rxSubscriber_1.$$rxSubscriber] = function () { return this; }; /** * A static factory for a Subscriber, given a (potentially partial) definition * of an Observer. * @param {function(x: ?T): void} [next] The `next` callback of an Observer. * @param {function(e: ?any): void} [error] The `error` callback of an * Observer. * @param {function(): void} [complete] The `complete` callback of an * Observer. * @return {Subscriber} A Subscriber wrapping the (partially defined) * Observer represented by the given arguments. */ Subscriber.create = function (next, error, complete) { var subscriber = new Subscriber(next, error, complete); subscriber.syncErrorThrowable = false; return subscriber; }; /** * The {@link Observer} callback to receive notifications of type `next` from * the Observable, with a value. The Observable may call this method 0 or more * times. * @param {T} [value] The `next` value. * @return {void} */ Subscriber.prototype.next = function (value) { if (!this.isStopped) { this._next(value); } }; /** * The {@link Observer} callback to receive notifications of type `error` from * the Observable, with an attached {@link Error}. Notifies the Observer that * the Observable has experienced an error condition. * @param {any} [err] The `error` exception. * @return {void} */ Subscriber.prototype.error = function (err) { if (!this.isStopped) { this.isStopped = true; this._error(err); } }; /** * The {@link Observer} callback to receive a valueless notification of type * `complete` from the Observable. Notifies the Observer that the Observable * has finished sending push-based notifications. * @return {void} */ Subscriber.prototype.complete = function () { if (!this.isStopped) { this.isStopped = true; this._complete(); } }; Subscriber.prototype.unsubscribe = function () { if (this.closed) { return; } this.isStopped = true; _super.prototype.unsubscribe.call(this); }; Subscriber.prototype._next = function (value) { this.destination.next(value); }; Subscriber.prototype._error = function (err) { this.destination.error(err); this.unsubscribe(); }; Subscriber.prototype._complete = function () { this.destination.complete(); this.unsubscribe(); }; return Subscriber; }(Subscription_1.Subscription)); exports.Subscriber = Subscriber; /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var SafeSubscriber = (function (_super) { __extends(SafeSubscriber, _super); function SafeSubscriber(_parent, observerOrNext, error, complete) { _super.call(this); this._parent = _parent; var next; var context = this; if (isFunction_1.isFunction(observerOrNext)) { next = observerOrNext; } else if (observerOrNext) { context = observerOrNext; next = observerOrNext.next; error = observerOrNext.error; complete = observerOrNext.complete; if (isFunction_1.isFunction(context.unsubscribe)) { this.add(context.unsubscribe.bind(context)); } context.unsubscribe = this.unsubscribe.bind(this); } this._context = context; this._next = next; this._error = error; this._complete = complete; } SafeSubscriber.prototype.next = function (value) { if (!this.isStopped && this._next) { var _parent = this._parent; if (!_parent.syncErrorThrowable) { this.__tryOrUnsub(this._next, value); } else if (this.__tryOrSetError(_parent, this._next, value)) { this.unsubscribe(); } } }; SafeSubscriber.prototype.error = function (err) { if (!this.isStopped) { var _parent = this._parent; if (this._error) { if (!_parent.syncErrorThrowable) { this.__tryOrUnsub(this._error, err); this.unsubscribe(); } else { this.__tryOrSetError(_parent, this._error, err); this.unsubscribe(); } } else if (!_parent.syncErrorThrowable) { this.unsubscribe(); throw err; } else { _parent.syncErrorValue = err; _parent.syncErrorThrown = true; this.unsubscribe(); } } }; SafeSubscriber.prototype.complete = function () { if (!this.isStopped) { var _parent = this._parent; if (this._complete) { if (!_parent.syncErrorThrowable) { this.__tryOrUnsub(this._complete); this.unsubscribe(); } else { this.__tryOrSetError(_parent, this._complete); this.unsubscribe(); } } else { this.unsubscribe(); } } }; SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { try { fn.call(this._context, value); } catch (err) { this.unsubscribe(); throw err; } }; SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { try { fn.call(this._context, value); } catch (err) { parent.syncErrorValue = err; parent.syncErrorThrown = true; return true; } return false; }; SafeSubscriber.prototype._unsubscribe = function () { var _parent = this._parent; this._context = null; this._parent = null; _parent.unsubscribe(); }; return SafeSubscriber; }(Subscriber)); //# sourceMappingURL=Subscriber.js.map /***/ }), /* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(3); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Config; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ConfigToken; }); /* harmony export (immutable) */ __webpack_exports__["c"] = setupConfig; /** * @name Config * @demo /docs/v2/demos/src/config/ * @description * The Config lets you configure your entire app or specific platforms. * You can set the tab placement, icon mode, animations, and more here. * * ```ts * import { IonicApp, IonicModule } from 'ionic-angular'; * * @NgModule({ * declarations: [ MyApp ], * imports: [ * IonicModule.forRoot(MyApp, { * backButtonText: 'Go Back', * iconMode: 'ios', * modalEnter: 'modal-slide-in', * modalLeave: 'modal-slide-out', * tabsPlacement: 'bottom', * pageTransition: 'ios' * }, {} * )], * bootstrap: [IonicApp], * entryComponents: [ MyApp ], * providers: [] * }) * ``` * * * Config can be overwritten at multiple levels allowing for more granular configuration. * Below is an example where an app can override any setting we want based on a platform. * * ```ts * import { IonicModule } from 'ionic-angular'; * * @NgModule({ * ... * imports: [ * IonicModule.forRoot(MyApp, { * tabsPlacement: 'bottom', * platforms: { * ios: { * tabsPlacement: 'top', * } * } * }, {} * )], * ... * }) * ``` * * We could also configure these values at a component level. Take `tabsPlacement`, * we can configure this as a property on our `ion-tabs`. * * ```html * * * * ``` * * The last way we could configure is through URL query strings. This is useful for testing * while in the browser. Simply add `?ionic=` to the url. * * ```bash * http://localhost:8100/?ionicTabsPlacement=bottom * ``` * * Any value can be added to config, and looked up at a later in any component. * * ```js * config.set('ios', 'favoriteColor', 'green'); * * // from any page in your app: * config.get('favoriteColor'); // 'green' when iOS * ``` * * * A config value can come from anywhere and be anything, but there are default * values for each mode. The [theming](../../../theming/platform-specific-styles/) * documentation has a chart of the default mode configuration. The following * chart displays each property with a description of what it controls. * * * | Config Property | Type | Details | * |--------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| * | `activator` | `string` | Used for buttons, changes the effect of pressing on a button. Available options: `"ripple"`, `"highlight"`. | * | `actionSheetEnter` | `string` | The name of the transition to use while an action sheet is presented. | * | `actionSheetLeave` | `string` | The name of the transition to use while an action sheet is dismissed. | * | `alertEnter` | `string` | The name of the transition to use while an alert is presented. | * | `alertLeave` | `string` | The name of the transition to use while an alert is dismissed. | * | `backButtonText` | `string` | The text to display by the back button icon in the navbar. | * | `backButtonIcon` | `string` | The icon to use as the back button icon. | * | `iconMode` | `string` | The mode to use for all icons throughout the application. Available options: `"ios"`, `"md"` | * | `loadingEnter` | `string` | The name of the transition to use while a loading indicator is presented. | * | `loadingLeave` | `string` | The name of the transition to use while a loading indicator is dismissed. | * | `menuType` | `string` | Type of menu to display. Available options: `"overlay"`, `"reveal"`, `"push"`. | * | `modalEnter` | `string` | The name of the transition to use while a modal is presented. | * | `modalLeave` | `string` | The name of the transition to use while a modal is dismiss. | * | `mode` | `string` | The mode to use throughout the application. | * | `pageTransition` | `string` | The name of the transition to use while changing pages. | * | `pickerEnter` | `string` | The name of the transition to use while a picker is presented. | * | `pickerLeave` | `string` | The name of the transition to use while a picker is dismissed. | * | `popoverEnter` | `string` | The name of the transition to use while a popover is presented. | * | `popoverLeave` | `string` | The name of the transition to use while a popover is dismissed. | * | `spinner` | `string` | The default spinner to use when a name is not defined. | * | `swipeBackEnabled` | `boolean` | Whether native iOS swipe to go back functionality is enabled. | * | `tabsHighlight` | `boolean` | Whether to show a highlight line under the tab when it is selected. | * | `tabsLayout` | `string` | The layout to use for all tabs. Available options: `"icon-top"`, `"icon-left"`, `"icon-right"`, `"icon-bottom"`, `"icon-hide"`, `"title-hide"`. | * | `tabsPlacement` | `string` | The position of the tabs relative to the content. Available options: `"top"`, `"bottom"` | * | `tabsHideOnSubPages` | `boolean` | Whether to hide the tabs on child pages or not. If `true` it will not show the tabs on child pages. | * | `toastEnter` | `string` | The name of the transition to use while a toast is presented. | * | `toastLeave` | `string` | The name of the transition to use while a toast is dismissed. | * **/ var Config = (function () { function Config() { this._c = {}; this._s = {}; this._modes = {}; this._trns = {}; } /** * @private */ Config.prototype.init = function (config, queryParams, platform) { this._s = config && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["i" /* isObject */])(config) && !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["h" /* isArray */])(config) ? config : {}; this._qp = queryParams; this.platform = platform; }; /** * @name get * @description * Returns a single config value, given a key. * * @param {string} [key] - the key for the config value * @param {any} [fallbackValue] - a fallback value to use when the config * value was not found, or is config value is `null`. Fallback value * defaults to `null`. */ Config.prototype.get = function (key, fallbackValue) { if (fallbackValue === void 0) { fallbackValue = null; } if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(this._c[key])) { if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(key)) { throw 'config key is not defined'; } // if the value was already set this will all be skipped // if there was no user config then it'll check each of // the user config's platforms, which already contains // settings from default platform configs var userPlatformValue = undefined; var userDefaultValue = this._s[key]; var userPlatformModeValue = undefined; var userDefaultModeValue = undefined; var platformValue = undefined; var platformModeValue = undefined; var configObj = null; if (this.platform) { var queryStringValue = this._qp.get('ionic' + key); if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(queryStringValue)) { return this._c[key] = (queryStringValue === 'true' ? true : queryStringValue === 'false' ? false : queryStringValue); } // check the platform settings object for this value // loop though each of the active platforms // array of active platforms, which also knows the hierarchy, // with the last one the most important var activePlatformKeys = this.platform.platforms(); // loop through all of the active platforms we're on for (var i = 0, ilen = activePlatformKeys.length; i < ilen; i++) { // get user defined platform values if (this._s.platforms) { configObj = this._s.platforms[activePlatformKeys[i]]; if (configObj) { if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(configObj[key])) { userPlatformValue = configObj[key]; } configObj = this.getModeConfig(configObj.mode); if (configObj && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(configObj[key])) { userPlatformModeValue = configObj[key]; } } } // get default platform's setting configObj = this.platform.getPlatformConfig(activePlatformKeys[i]); if (configObj && configObj.settings) { if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(configObj.settings[key])) { // found a setting for this platform platformValue = configObj.settings[key]; } configObj = this.getModeConfig(configObj.settings.mode); if (configObj && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(configObj[key])) { // found setting for this platform's mode platformModeValue = configObj[key]; } } } } configObj = this.getModeConfig(this._s.mode); if (configObj && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(configObj[key])) { userDefaultModeValue = configObj[key]; } // cache the value this._c[key] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(userPlatformValue) ? userPlatformValue : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(userDefaultValue) ? userDefaultValue : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(userPlatformModeValue) ? userPlatformModeValue : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(userDefaultModeValue) ? userDefaultModeValue : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(platformValue) ? platformValue : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(platformModeValue) ? platformModeValue : null; } // return key's value // either it came directly from the user config // or it was from the users platform configs // or it was from the default platform configs // in that order var rtnVal = this._c[key]; if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["k" /* isFunction */])(rtnVal)) { rtnVal = rtnVal(this.platform); } return (rtnVal !== null ? rtnVal : fallbackValue); }; /** * @name getBoolean * @description * Same as `get()`, however always returns a boolean value. If the * value from `get()` is `null`, then it'll return the `fallbackValue` * which defaults to `false`. Otherwise, `getBoolean()` will return * if the config value is truthy or not. It also returns `true` if * the config value was the string value `"true"`. * @param {string} [key] - the key for the config value * @param {boolean} [fallbackValue] - a fallback value to use when the config * value was `null`. Fallback value defaults to `false`. */ Config.prototype.getBoolean = function (key, fallbackValue) { if (fallbackValue === void 0) { fallbackValue = false; } var val = this.get(key); if (val === null) { return fallbackValue; } if (typeof val === 'string') { return val === 'true'; } return !!val; }; /** * @name getNumber * @description * Same as `get()`, however always returns a number value. Uses `parseFloat()` * on the value received from `get()`. If the result from the parse is `NaN`, * then it will return the value passed to `fallbackValue`. If no fallback * value was provided then it'll default to returning `NaN` when the result * is not a valid number. * @param {string} [key] - the key for the config value * @param {number} [fallbackValue] - a fallback value to use when the config * value turned out to be `NaN`. Fallback value defaults to `NaN`. */ Config.prototype.getNumber = function (key, fallbackValue) { if (fallbackValue === void 0) { fallbackValue = NaN; } var val = parseFloat(this.get(key)); return isNaN(val) ? fallbackValue : val; }; /** * @name set * @description * Sets a single config value. * * @param {string} [platform] - The platform (either 'ios' or 'android') that the config value should apply to. Leaving this blank will apply the config value to all platforms. * @param {string} [key] - The key used to look up the value at a later point in time. * @param {string} [value] - The config value being stored. */ Config.prototype.set = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } var arg0 = args[0]; var arg1 = args[1]; switch (args.length) { case 2: // set('key', 'value') = set key/value pair // arg1 = value this._s[arg0] = arg1; delete this._c[arg0]; // clear cache break; case 3: // setting('ios', 'key', 'value') = set key/value pair for platform // arg0 = platform // arg1 = key // arg2 = value this._s.platforms = this._s.platforms || {}; this._s.platforms[arg0] = this._s.platforms[arg0] || {}; this._s.platforms[arg0][arg1] = args[2]; delete this._c[arg1]; // clear cache break; } return this; }; /** * @private * @name settings() * @description */ Config.prototype.settings = function (arg0, arg1) { switch (arguments.length) { case 0: return this._s; case 1: // settings({...}) this._s = arg0; this._c = {}; // clear cache break; case 2: // settings('ios', {...}) this._s.platforms = this._s.platforms || {}; this._s.platforms[arg0] = arg1; this._c = {}; // clear cache break; } return this; }; /** * @private */ Config.prototype.setModeConfig = function (modeName, modeConfig) { this._modes[modeName] = modeConfig; }; /** * @private */ Config.prototype.getModeConfig = function (modeName) { return this._modes[modeName] || null; }; /** * @private */ Config.prototype.setTransition = function (trnsName, trnsClass) { this._trns[trnsName] = trnsClass; }; /** * @private */ Config.prototype.getTransition = function (trnsName) { return this._trns[trnsName] || null; }; return Config; }()); /** * @private */ var ConfigToken = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["i" /* OpaqueToken */]('USERCONFIG'); /** * @private */ function setupConfig(userConfig, queryParams, platform) { var config = new Config(); config.init(userConfig, queryParams, platform); return config; } //# sourceMappingURL=config.js.map /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export scheduleMicroTask */ /* unused harmony export global */ /* unused harmony export getTypeNameForDebugging */ /* harmony export (immutable) */ __webpack_exports__["a"] = isPresent; /* harmony export (immutable) */ __webpack_exports__["b"] = isBlank; /* harmony export (immutable) */ __webpack_exports__["c"] = isStrictStringMap; /* unused harmony export isDate */ /* harmony export (immutable) */ __webpack_exports__["i"] = stringify; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return NumberWrapper; }); /* unused harmony export looseIdentical */ /* harmony export (immutable) */ __webpack_exports__["e"] = isJsObject; /* unused harmony export print */ /* unused harmony export warn */ /* unused harmony export setValueOnPath */ /* harmony export (immutable) */ __webpack_exports__["f"] = getSymbolIterator; /* harmony export (immutable) */ __webpack_exports__["d"] = isPrimitive; /* harmony export (immutable) */ __webpack_exports__["g"] = escapeRegExp; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var globalScope; if (typeof window === 'undefined') { if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492 globalScope = self; } else { globalScope = global; } } else { globalScope = window; } function scheduleMicroTask(fn) { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } // Need to declare a new variable for global here since TypeScript // exports the original value of the symbol. var _global = globalScope; function getTypeNameForDebugging(type) { return type['name'] || typeof type; } // TODO: remove calls to assert in production environment // Note: Can't just export this and import in in other files // as `assert` is a reserved keyword in Dart _global.assert = function assert(condition) { // TODO: to be fixed properly via #2830, noop for now }; function isPresent(obj) { return obj != null; } function isBlank(obj) { return obj == null; } var STRING_MAP_PROTO = Object.getPrototypeOf({}); function isStrictStringMap(obj) { return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO; } function isDate(obj) { return obj instanceof Date && !isNaN(obj.valueOf()); } function stringify(token) { if (typeof token === 'string') { return token; } if (token == null) { return '' + token; } if (token.overriddenName) { return token.overriddenName; } if (token.name) { return token.name; } var res = token.toString(); var newLineIndex = res.indexOf('\n'); return newLineIndex === -1 ? res : res.substring(0, newLineIndex); } var NumberWrapper = (function () { function NumberWrapper() { } NumberWrapper.parseIntAutoRadix = function (text) { var result = parseInt(text); if (isNaN(result)) { throw new Error('Invalid integer literal when parsing ' + text); } return result; }; NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); }; return NumberWrapper; }()); // JS has NaN !== NaN function looseIdentical(a, b) { return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b); } function isJsObject(o) { return o !== null && (typeof o === 'function' || typeof o === 'object'); } function print(obj) { console.log(obj); } function warn(obj) { console.warn(obj); } function setValueOnPath(global, path, value) { var parts = path.split('.'); var obj = global; while (parts.length > 1) { var name_1 = parts.shift(); if (obj.hasOwnProperty(name_1) && obj[name_1] != null) { obj = obj[name_1]; } else { obj = obj[name_1] = {}; } } if (obj === undefined || obj === null) { obj = {}; } obj[parts.shift()] = value; } var _symbolIterator = null; function getSymbolIterator() { if (!_symbolIterator) { if (globalScope.Symbol && Symbol.iterator) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic var keys = Object.getOwnPropertyNames(Map.prototype); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } function isPrimitive(obj) { return !isJsObject(obj); } function escapeRegExp(s) { return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); } //# sourceMappingURL=lang.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(57))) /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return nativeRaf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return raf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return cancelRaf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return nativeTimeout; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return clearNativeTimeout; }); /* harmony export (immutable) */ __webpack_exports__["n"] = rafFrames; /* harmony export (immutable) */ __webpack_exports__["r"] = zoneRafFrames; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return CSS; }); /* harmony export (immutable) */ __webpack_exports__["i"] = transitionEnd; /* harmony export (immutable) */ __webpack_exports__["e"] = ready; /* harmony export (immutable) */ __webpack_exports__["v"] = windowLoad; /* harmony export (immutable) */ __webpack_exports__["c"] = pointerCoord; /* harmony export (immutable) */ __webpack_exports__["p"] = hasPointerMoved; /* unused harmony export isActive */ /* harmony export (immutable) */ __webpack_exports__["u"] = hasFocus; /* unused harmony export isTextInput */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return NON_TEXT_INPUT_REGEX; }); /* harmony export (immutable) */ __webpack_exports__["l"] = hasFocusedTextInput; /* harmony export (immutable) */ __webpack_exports__["m"] = focusOutActiveElement; /* harmony export (immutable) */ __webpack_exports__["o"] = copyInputAttributes; /* harmony export (immutable) */ __webpack_exports__["a"] = getDimensions; /* harmony export (immutable) */ __webpack_exports__["b"] = clearDimensions; /* harmony export (immutable) */ __webpack_exports__["d"] = windowDimensions; /* harmony export (immutable) */ __webpack_exports__["f"] = flushDimensionCache; var win = window; // RequestAnimationFrame Polyfill (Android 4.3 and below) /*! @author Paul Irish */ /*! @source https://gist.github.com/paulirish/1579671 */ (function () { var rafLastTime = 0; if (!win.requestAnimationFrame) { win.requestAnimationFrame = function (callback) { var currTime = Date.now(); var timeToCall = Math.max(0, 16 - (currTime - rafLastTime)); var id = win.setTimeout(function () { callback(currTime + timeToCall); }, timeToCall); rafLastTime = currTime + timeToCall; return id; }; } if (!win.cancelAnimationFrame) { win.cancelAnimationFrame = function (id) { clearTimeout(id); }; } })(); // use native raf rather than the zone wrapped one var originalRaf = (win[win['Zone']['__symbol__']('requestAnimationFrame')] || win[win['Zone']['__symbol__']('webkitRequestAnimationFrame')]); // if the originalRaf from the Zone symbol is not available, we need to provide the polyfilled version var nativeRaf = originalRaf !== undefined ? originalRaf['bind'](win) : win.requestAnimationFrame.bind(win); // zone wrapped raf var raf = win.requestAnimationFrame.bind(win); var cancelRaf = win.cancelAnimationFrame.bind(win); var nativeTimeout = win[win['Zone']['__symbol__']('setTimeout')]['bind'](win); var clearNativeTimeout = win[win['Zone']['__symbol__']('clearTimeout')]['bind'](win); /** * Run a function in an animation frame after waiting `framesToWait` frames. * * @param framesToWait number how many frames to wait * @param callback Function the function call to defer * @return Function a function to call to cancel the wait */ function rafFrames(framesToWait, callback) { framesToWait = Math.ceil(framesToWait); var rafId; var timeoutId; if (framesToWait === 0) { callback(); } else if (framesToWait < 2) { rafId = nativeRaf(callback); } else { timeoutId = nativeTimeout(function () { rafId = nativeRaf(callback); }, (framesToWait - 1) * 16.6667); } return function () { clearNativeTimeout(timeoutId); cancelRaf(raf); }; } // TODO: DRY rafFrames and zoneRafFrames function zoneRafFrames(framesToWait, callback) { framesToWait = Math.ceil(framesToWait); if (framesToWait === 0) { callback(); } else if (framesToWait < 2) { raf(callback); } else { setTimeout(function () { raf(callback); }, (framesToWait - 1) * 16.6667); } } var CSS = {}; (function () { // transform var i; var keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform', '-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform', 'msTransform']; for (i = 0; i < keys.length; i++) { if (document.documentElement.style[keys[i]] !== undefined) { CSS.transform = keys[i]; break; } } // transition keys = ['webkitTransition', 'mozTransition', 'msTransition', 'transition']; for (i = 0; i < keys.length; i++) { if (document.documentElement.style[keys[i]] !== undefined) { CSS.transition = keys[i]; break; } } // The only prefix we care about is webkit for transitions. var isWebkit = CSS.transition.indexOf('webkit') > -1; // transition duration CSS.transitionDuration = (isWebkit ? '-webkit-' : '') + 'transition-duration'; // transition timing function CSS.transitionTimingFn = (isWebkit ? '-webkit-' : '') + 'transition-timing-function'; // transition delay CSS.transitionDelay = (isWebkit ? '-webkit-' : '') + 'transition-delay'; // To be sure transitionend works everywhere, include *both* the webkit and non-webkit events CSS.transitionEnd = (isWebkit ? 'webkitTransitionEnd ' : '') + 'transitionend'; // transform origin CSS.transformOrigin = (isWebkit ? '-webkit-' : '') + 'transform-origin'; // animation delay CSS.animationDelay = (isWebkit ? 'webkitAnimationDelay' : 'animationDelay'); })(); function transitionEnd(el, callback) { if (el) { CSS.transitionEnd.split(' ').forEach(function (eventName) { el.addEventListener(eventName, onEvent); }); return unregister; } function unregister() { CSS.transitionEnd.split(' ').forEach(function (eventName) { el.removeEventListener(eventName, onEvent); }); } function onEvent(ev) { if (el === ev.target) { unregister(); callback(ev); } } } function ready(callback) { var promise = null; if (!callback) { // a callback wasn't provided, so let's return a promise instead promise = new Promise(function (resolve) { callback = resolve; }); } if (document.readyState === 'complete' || document.readyState === 'interactive') { callback(); } else { document.addEventListener('DOMContentLoaded', completed, false); win.addEventListener('load', completed, false); } return promise; function completed() { document.removeEventListener('DOMContentLoaded', completed, false); win.removeEventListener('load', completed, false); callback(); } } function windowLoad(callback) { var promise = null; if (!callback) { // a callback wasn't provided, so let's return a promise instead promise = new Promise(function (resolve) { callback = resolve; }); } if (document.readyState === 'complete') { callback(); } else { win.addEventListener('load', completed, false); } return promise; function completed() { win.removeEventListener('load', completed, false); callback(); } } function pointerCoord(ev) { // get coordinates for either a mouse click // or a touch depending on the given event if (ev) { var changedTouches = ev.changedTouches; if (changedTouches && changedTouches.length > 0) { var touch = changedTouches[0]; return { x: touch.clientX, y: touch.clientY }; } var pageX = ev.pageX; if (pageX !== undefined) { return { x: pageX, y: ev.pageY }; } } return { x: 0, y: 0 }; } function hasPointerMoved(threshold, startCoord, endCoord) { if (startCoord && endCoord) { var deltaX = (startCoord.x - endCoord.x); var deltaY = (startCoord.y - endCoord.y); var distance = deltaX * deltaX + deltaY * deltaY; return distance > (threshold * threshold); } return false; } function isActive(ele) { return !!(ele && (document.activeElement === ele)); } function hasFocus(ele) { return isActive(ele) && (ele.parentElement.querySelector(':focus') === ele); } function isTextInput(ele) { return !!ele && (ele.tagName === 'TEXTAREA' || ele.contentEditable === 'true' || (ele.tagName === 'INPUT' && !(NON_TEXT_INPUT_REGEX.test(ele.type)))); } var NON_TEXT_INPUT_REGEX = /^(radio|checkbox|range|file|submit|reset|color|image|button)$/i; function hasFocusedTextInput() { var ele = document.activeElement; if (isTextInput(ele)) { return (ele.parentElement.querySelector(':focus') === ele); } return false; } function focusOutActiveElement() { var activeElement = document.activeElement; activeElement && activeElement.blur && activeElement.blur(); } var skipInputAttrsReg = /^(value|checked|disabled|type|class|style|id|autofocus|autocomplete|autocorrect)$/i; function copyInputAttributes(srcElement, destElement) { // copy attributes from one element to another // however, skip over a few of them as they're already // handled in the angular world var attrs = srcElement.attributes; for (var i = 0; i < attrs.length; i++) { var attr = attrs[i]; if (!skipInputAttrsReg.test(attr.name)) { destElement.setAttribute(attr.name, attr.value); } } } /** * Get the element offsetWidth and offsetHeight. Values are cached * to reduce DOM reads. Cache is cleared on a window resize. */ function getDimensions(ele, id) { var dimensions = dimensionCache[id]; if (!dimensions) { // make sure we got good values before caching if (ele.offsetWidth && ele.offsetHeight) { dimensions = dimensionCache[id] = { width: ele.offsetWidth, height: ele.offsetHeight, left: ele.offsetLeft, top: ele.offsetTop }; } else { // do not cache bad values return { width: 0, height: 0, left: 0, top: 0 }; } } return dimensions; } function clearDimensions(id) { delete dimensionCache[id]; } function windowDimensions() { if (!dimensionCache.win) { // make sure we got good values before caching if (win.innerWidth && win.innerHeight) { dimensionCache.win = { width: win.innerWidth, height: win.innerHeight }; } else { // do not cache bad values return { width: 0, height: 0 }; } } return dimensionCache.win; } function flushDimensionCache() { dimensionCache = {}; } var dimensionCache = {}; //# sourceMappingURL=dom.js.map /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(4); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var OuterSubscriber = (function (_super) { __extends(OuterSubscriber, _super); function OuterSubscriber() { _super.apply(this, arguments); } OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { this.destination.next(innerValue); }; OuterSubscriber.prototype.notifyError = function (error, innerSub) { this.destination.error(error); }; OuterSubscriber.prototype.notifyComplete = function (innerSub) { this.destination.complete(); }; return OuterSubscriber; }(Subscriber_1.Subscriber)); exports.OuterSubscriber = OuterSubscriber; //# sourceMappingURL=OuterSubscriber.js.map /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var root_1 = __webpack_require__(25); var isArray_1 = __webpack_require__(47); var isPromise_1 = __webpack_require__(515); var Observable_1 = __webpack_require__(1); var iterator_1 = __webpack_require__(100); var InnerSubscriber_1 = __webpack_require__(648); var observable_1 = __webpack_require__(142); function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) { var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); if (destination.closed) { return null; } if (result instanceof Observable_1.Observable) { if (result._isScalar) { destination.next(result.value); destination.complete(); return null; } else { return result.subscribe(destination); } } if (isArray_1.isArray(result)) { for (var i = 0, len = result.length; i < len && !destination.closed; i++) { destination.next(result[i]); } if (!destination.closed) { destination.complete(); } } else if (isPromise_1.isPromise(result)) { result.then(function (value) { if (!destination.closed) { destination.next(value); destination.complete(); } }, function (err) { return destination.error(err); }) .then(null, function (err) { // Escaping the Promise trap: globally throw unhandled errors root_1.root.setTimeout(function () { throw err; }); }); return destination; } else if (typeof result[iterator_1.$$iterator] === 'function') { var iterator = result[iterator_1.$$iterator](); do { var item = iterator.next(); if (item.done) { destination.complete(); break; } destination.next(item.value); if (destination.closed) { break; } } while (true); } else if (typeof result[observable_1.$$observable] === 'function') { var obs = result[observable_1.$$observable](); if (typeof obs.subscribe !== 'function') { destination.error(new Error('invalid observable')); } else { return obs.subscribe(new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex)); } } else { destination.error(new TypeError('unknown type returned')); } return null; } exports.subscribeToResult = subscribeToResult; //# sourceMappingURL=subscribeToResult.js.map /***/ }), /* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["a"] = scheduleMicroTask; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return _global; }); /* harmony export (immutable) */ __webpack_exports__["l"] = getTypeNameForDebugging; /* harmony export (immutable) */ __webpack_exports__["b"] = isPresent; /* harmony export (immutable) */ __webpack_exports__["k"] = isBlank; /* unused harmony export isStrictStringMap */ /* unused harmony export isDate */ /* harmony export (immutable) */ __webpack_exports__["c"] = stringify; /* unused harmony export NumberWrapper */ /* harmony export (immutable) */ __webpack_exports__["j"] = looseIdentical; /* harmony export (immutable) */ __webpack_exports__["e"] = isJsObject; /* harmony export (immutable) */ __webpack_exports__["g"] = print; /* harmony export (immutable) */ __webpack_exports__["h"] = warn; /* unused harmony export setValueOnPath */ /* harmony export (immutable) */ __webpack_exports__["f"] = getSymbolIterator; /* harmony export (immutable) */ __webpack_exports__["i"] = isPrimitive; /* unused harmony export escapeRegExp */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var globalScope; if (typeof window === 'undefined') { if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492 globalScope = self; } else { globalScope = global; } } else { globalScope = window; } function scheduleMicroTask(fn) { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } // Need to declare a new variable for global here since TypeScript // exports the original value of the symbol. var _global = globalScope; function getTypeNameForDebugging(type) { return type['name'] || typeof type; } // TODO: remove calls to assert in production environment // Note: Can't just export this and import in in other files // as `assert` is a reserved keyword in Dart _global.assert = function assert(condition) { // TODO: to be fixed properly via #2830, noop for now }; function isPresent(obj) { return obj != null; } function isBlank(obj) { return obj == null; } var STRING_MAP_PROTO = Object.getPrototypeOf({}); function isStrictStringMap(obj) { return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO; } function isDate(obj) { return obj instanceof Date && !isNaN(obj.valueOf()); } function stringify(token) { if (typeof token === 'string') { return token; } if (token == null) { return '' + token; } if (token.overriddenName) { return token.overriddenName; } if (token.name) { return token.name; } var res = token.toString(); var newLineIndex = res.indexOf('\n'); return newLineIndex === -1 ? res : res.substring(0, newLineIndex); } var NumberWrapper = (function () { function NumberWrapper() { } NumberWrapper.parseIntAutoRadix = function (text) { var result = parseInt(text); if (isNaN(result)) { throw new Error('Invalid integer literal when parsing ' + text); } return result; }; NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); }; return NumberWrapper; }()); // JS has NaN !== NaN function looseIdentical(a, b) { return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b); } function isJsObject(o) { return o !== null && (typeof o === 'function' || typeof o === 'object'); } function print(obj) { console.log(obj); } function warn(obj) { console.warn(obj); } function setValueOnPath(global, path, value) { var parts = path.split('.'); var obj = global; while (parts.length > 1) { var name_1 = parts.shift(); if (obj.hasOwnProperty(name_1) && obj[name_1] != null) { obj = obj[name_1]; } else { obj = obj[name_1] = {}; } } if (obj === undefined || obj === null) { obj = {}; } obj[parts.shift()] = value; } var _symbolIterator = null; function getSymbolIterator() { if (!_symbolIterator) { if (globalScope.Symbol && Symbol.iterator) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic var keys = Object.getOwnPropertyNames(Map.prototype); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } function isPrimitive(obj) { return !isJsObject(obj); } function escapeRegExp(s) { return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); } //# sourceMappingURL=lang.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(57))) /***/ }), /* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_dom__ = __webpack_require__(7); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Ion; }); /** * Base class for all Ionic components. Exposes some common functionality * that all Ionic components need, such as accessing underlying native elements and * sending/receiving app-level events. */ var Ion = (function () { function Ion(config, elementRef, renderer, componentName) { this._config = config; this._elementRef = elementRef; this._renderer = renderer; this._componentName = componentName; if (componentName) { this._setComponentName(); this._setMode(config.get('mode')); } } /** @private */ Ion.prototype.setElementClass = function (className, isAdd) { this._renderer.setElementClass(this._elementRef.nativeElement, className, isAdd); }; /** @private */ Ion.prototype.setElementAttribute = function (attributeName, attributeValue) { this._renderer.setElementAttribute(this._elementRef.nativeElement, attributeName, attributeValue); }; /** @private */ Ion.prototype.setElementStyle = function (property, value) { this._renderer.setElementStyle(this._elementRef.nativeElement, property, value); }; /** @private */ Ion.prototype._setColor = function (newColor, componentName) { if (componentName) { // This is needed for the item-radio this._componentName = componentName; } if (this._color) { this.setElementClass(this._componentName + "-" + this._mode + "-" + this._color, false); } if (newColor) { this.setElementClass(this._componentName + "-" + this._mode + "-" + newColor, true); this._color = newColor; } }; /** @private */ Ion.prototype._setMode = function (newMode) { if (this._mode) { this.setElementClass(this._componentName + "-" + this._mode, false); } if (newMode) { this.setElementClass(this._componentName + "-" + newMode, true); // Remove the color class associated with the previous mode, // change the mode, then add the new color class this._setColor(null); this._mode = newMode; this._setColor(this._color); } }; /** @private */ Ion.prototype._setComponentName = function () { this.setElementClass(this._componentName, true); }; /** @private */ Ion.prototype.getElementRef = function () { return this._elementRef; }; /** @private */ Ion.prototype.getNativeElement = function () { return this._elementRef.nativeElement; }; /** @private */ Ion.prototype.getDimensions = function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_dom__["a" /* getDimensions */])(this.getNativeElement(), this._getId()); }; /** @private */ Ion.prototype.width = function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_dom__["a" /* getDimensions */])(this.getNativeElement(), this._getId()).width; }; /** @private */ Ion.prototype.height = function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_dom__["a" /* getDimensions */])(this.getNativeElement(), this._getId()).height; }; /** @private */ Ion.prototype.destroy = function () { __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_dom__["b" /* clearDimensions */])(this._ionId); }; /** internal */ Ion.prototype._getId = function () { if (!this._ionId) { this._ionId = 'i' + ids++; } return this._ionId; }; return Ion; }()); var ids = 0; //# sourceMappingURL=ion.js.map /***/ }), /* 12 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(6); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return TypeModifier; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return Type; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return BuiltinTypeName; }); /* unused harmony export BuiltinType */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return ExternalType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return ArrayType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return MapType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return DYNAMIC_TYPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return BOOL_TYPE; }); /* unused harmony export INT_TYPE */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return NUMBER_TYPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return STRING_TYPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return FUNCTION_TYPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return NULL_TYPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return BinaryOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return Expression; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return BuiltinVar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return ReadVarExpr; }); /* unused harmony export WriteVarExpr */ /* unused harmony export WriteKeyExpr */ /* unused harmony export WritePropExpr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return BuiltinMethod; }); /* unused harmony export InvokeMethodExpr */ /* unused harmony export InvokeFunctionExpr */ /* unused harmony export InstantiateExpr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return LiteralExpr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return ExternalExpr; }); /* unused harmony export ConditionalExpr */ /* unused harmony export NotExpr */ /* unused harmony export CastExpr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return FnParam; }); /* unused harmony export FunctionExpr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return BinaryOperatorExpr; }); /* unused harmony export ReadPropExpr */ /* unused harmony export ReadKeyExpr */ /* unused harmony export LiteralArrayExpr */ /* unused harmony export LiteralMapExpr */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return THIS_EXPR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return SUPER_EXPR; }); /* unused harmony export CATCH_ERROR_VAR */ /* unused harmony export CATCH_STACK_VAR */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NULL_EXPR; }); /* unused harmony export TYPED_NULL_EXPR */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return StmtModifier; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return Statement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return DeclareVarStmt; }); /* unused harmony export DeclareFunctionStmt */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return ExpressionStatement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return ReturnStatement; }); /* unused harmony export AbstractClassPart */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ClassField; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return ClassMethod; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return ClassGetter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return ClassStmt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return IfStmt; }); /* unused harmony export CommentStmt */ /* unused harmony export TryCatchStmt */ /* unused harmony export ThrowStmt */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return ExpressionTransformer; }); /* unused harmony export RecursiveExpressionVisitor */ /* harmony export (immutable) */ __webpack_exports__["J"] = replaceVarInExpression; /* harmony export (immutable) */ __webpack_exports__["x"] = findReadVarNames; /* harmony export (immutable) */ __webpack_exports__["a"] = variable; /* harmony export (immutable) */ __webpack_exports__["g"] = importExpr; /* harmony export (immutable) */ __webpack_exports__["d"] = importType; /* harmony export (immutable) */ __webpack_exports__["h"] = literalArr; /* harmony export (immutable) */ __webpack_exports__["m"] = literalMap; /* harmony export (immutable) */ __webpack_exports__["w"] = not; /* harmony export (immutable) */ __webpack_exports__["C"] = fn; /* harmony export (immutable) */ __webpack_exports__["f"] = literal; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; //// Types var TypeModifier; (function (TypeModifier) { TypeModifier[TypeModifier["Const"] = 0] = "Const"; })(TypeModifier || (TypeModifier = {})); var Type = (function () { function Type(modifiers) { if (modifiers === void 0) { modifiers = null; } this.modifiers = modifiers; if (!modifiers) { this.modifiers = []; } } Type.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; }; return Type; }()); var BuiltinTypeName; (function (BuiltinTypeName) { BuiltinTypeName[BuiltinTypeName["Dynamic"] = 0] = "Dynamic"; BuiltinTypeName[BuiltinTypeName["Bool"] = 1] = "Bool"; BuiltinTypeName[BuiltinTypeName["String"] = 2] = "String"; BuiltinTypeName[BuiltinTypeName["Int"] = 3] = "Int"; BuiltinTypeName[BuiltinTypeName["Number"] = 4] = "Number"; BuiltinTypeName[BuiltinTypeName["Function"] = 5] = "Function"; BuiltinTypeName[BuiltinTypeName["Null"] = 6] = "Null"; })(BuiltinTypeName || (BuiltinTypeName = {})); var BuiltinType = (function (_super) { __extends(BuiltinType, _super); function BuiltinType(name, modifiers) { if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.name = name; } BuiltinType.prototype.visitType = function (visitor, context) { return visitor.visitBuiltintType(this, context); }; return BuiltinType; }(Type)); var ExternalType = (function (_super) { __extends(ExternalType, _super); function ExternalType(value, typeParams, modifiers) { if (typeParams === void 0) { typeParams = null; } if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.value = value; this.typeParams = typeParams; } ExternalType.prototype.visitType = function (visitor, context) { return visitor.visitExternalType(this, context); }; return ExternalType; }(Type)); var ArrayType = (function (_super) { __extends(ArrayType, _super); function ArrayType(of, modifiers) { if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.of = of; } ArrayType.prototype.visitType = function (visitor, context) { return visitor.visitArrayType(this, context); }; return ArrayType; }(Type)); var MapType = (function (_super) { __extends(MapType, _super); function MapType(valueType, modifiers) { if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.valueType = valueType; } MapType.prototype.visitType = function (visitor, context) { return visitor.visitMapType(this, context); }; return MapType; }(Type)); var DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic); var BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool); var INT_TYPE = new BuiltinType(BuiltinTypeName.Int); var NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number); var STRING_TYPE = new BuiltinType(BuiltinTypeName.String); var FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function); var NULL_TYPE = new BuiltinType(BuiltinTypeName.Null); ///// Expressions var BinaryOperator; (function (BinaryOperator) { BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals"; BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals"; BinaryOperator[BinaryOperator["Identical"] = 2] = "Identical"; BinaryOperator[BinaryOperator["NotIdentical"] = 3] = "NotIdentical"; BinaryOperator[BinaryOperator["Minus"] = 4] = "Minus"; BinaryOperator[BinaryOperator["Plus"] = 5] = "Plus"; BinaryOperator[BinaryOperator["Divide"] = 6] = "Divide"; BinaryOperator[BinaryOperator["Multiply"] = 7] = "Multiply"; BinaryOperator[BinaryOperator["Modulo"] = 8] = "Modulo"; BinaryOperator[BinaryOperator["And"] = 9] = "And"; BinaryOperator[BinaryOperator["Or"] = 10] = "Or"; BinaryOperator[BinaryOperator["Lower"] = 11] = "Lower"; BinaryOperator[BinaryOperator["LowerEquals"] = 12] = "LowerEquals"; BinaryOperator[BinaryOperator["Bigger"] = 13] = "Bigger"; BinaryOperator[BinaryOperator["BiggerEquals"] = 14] = "BiggerEquals"; })(BinaryOperator || (BinaryOperator = {})); var Expression = (function () { function Expression(type) { this.type = type; } Expression.prototype.prop = function (name) { return new ReadPropExpr(this, name); }; Expression.prototype.key = function (index, type) { if (type === void 0) { type = null; } return new ReadKeyExpr(this, index, type); }; Expression.prototype.callMethod = function (name, params) { return new InvokeMethodExpr(this, name, params); }; Expression.prototype.callFn = function (params) { return new InvokeFunctionExpr(this, params); }; Expression.prototype.instantiate = function (params, type) { if (type === void 0) { type = null; } return new InstantiateExpr(this, params, type); }; Expression.prototype.conditional = function (trueCase, falseCase) { if (falseCase === void 0) { falseCase = null; } return new ConditionalExpr(this, trueCase, falseCase); }; Expression.prototype.equals = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs); }; Expression.prototype.notEquals = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs); }; Expression.prototype.identical = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs); }; Expression.prototype.notIdentical = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs); }; Expression.prototype.minus = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs); }; Expression.prototype.plus = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs); }; Expression.prototype.divide = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs); }; Expression.prototype.multiply = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs); }; Expression.prototype.modulo = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs); }; Expression.prototype.and = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.And, this, rhs); }; Expression.prototype.or = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs); }; Expression.prototype.lower = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs); }; Expression.prototype.lowerEquals = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs); }; Expression.prototype.bigger = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs); }; Expression.prototype.biggerEquals = function (rhs) { return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs); }; Expression.prototype.isBlank = function () { // Note: We use equals by purpose here to compare to null and undefined in JS. // We use the typed null to allow strictNullChecks to narrow types. return this.equals(TYPED_NULL_EXPR); }; Expression.prototype.cast = function (type) { return new CastExpr(this, type); }; Expression.prototype.toStmt = function () { return new ExpressionStatement(this); }; return Expression; }()); var BuiltinVar; (function (BuiltinVar) { BuiltinVar[BuiltinVar["This"] = 0] = "This"; BuiltinVar[BuiltinVar["Super"] = 1] = "Super"; BuiltinVar[BuiltinVar["CatchError"] = 2] = "CatchError"; BuiltinVar[BuiltinVar["CatchStack"] = 3] = "CatchStack"; })(BuiltinVar || (BuiltinVar = {})); var ReadVarExpr = (function (_super) { __extends(ReadVarExpr, _super); function ReadVarExpr(name, type) { if (type === void 0) { type = null; } _super.call(this, type); if (typeof name === 'string') { this.name = name; this.builtin = null; } else { this.name = null; this.builtin = name; } } ReadVarExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitReadVarExpr(this, context); }; ReadVarExpr.prototype.set = function (value) { return new WriteVarExpr(this.name, value); }; return ReadVarExpr; }(Expression)); var WriteVarExpr = (function (_super) { __extends(WriteVarExpr, _super); function WriteVarExpr(name, value, type) { if (type === void 0) { type = null; } _super.call(this, type || value.type); this.name = name; this.value = value; } WriteVarExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitWriteVarExpr(this, context); }; WriteVarExpr.prototype.toDeclStmt = function (type, modifiers) { if (type === void 0) { type = null; } if (modifiers === void 0) { modifiers = null; } return new DeclareVarStmt(this.name, this.value, type, modifiers); }; return WriteVarExpr; }(Expression)); var WriteKeyExpr = (function (_super) { __extends(WriteKeyExpr, _super); function WriteKeyExpr(receiver, index, value, type) { if (type === void 0) { type = null; } _super.call(this, type || value.type); this.receiver = receiver; this.index = index; this.value = value; } WriteKeyExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitWriteKeyExpr(this, context); }; return WriteKeyExpr; }(Expression)); var WritePropExpr = (function (_super) { __extends(WritePropExpr, _super); function WritePropExpr(receiver, name, value, type) { if (type === void 0) { type = null; } _super.call(this, type || value.type); this.receiver = receiver; this.name = name; this.value = value; } WritePropExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitWritePropExpr(this, context); }; return WritePropExpr; }(Expression)); var BuiltinMethod; (function (BuiltinMethod) { BuiltinMethod[BuiltinMethod["ConcatArray"] = 0] = "ConcatArray"; BuiltinMethod[BuiltinMethod["SubscribeObservable"] = 1] = "SubscribeObservable"; BuiltinMethod[BuiltinMethod["Bind"] = 2] = "Bind"; })(BuiltinMethod || (BuiltinMethod = {})); var InvokeMethodExpr = (function (_super) { __extends(InvokeMethodExpr, _super); function InvokeMethodExpr(receiver, method, args, type) { if (type === void 0) { type = null; } _super.call(this, type); this.receiver = receiver; this.args = args; if (typeof method === 'string') { this.name = method; this.builtin = null; } else { this.name = null; this.builtin = method; } } InvokeMethodExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitInvokeMethodExpr(this, context); }; return InvokeMethodExpr; }(Expression)); var InvokeFunctionExpr = (function (_super) { __extends(InvokeFunctionExpr, _super); function InvokeFunctionExpr(fn, args, type) { if (type === void 0) { type = null; } _super.call(this, type); this.fn = fn; this.args = args; } InvokeFunctionExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitInvokeFunctionExpr(this, context); }; return InvokeFunctionExpr; }(Expression)); var InstantiateExpr = (function (_super) { __extends(InstantiateExpr, _super); function InstantiateExpr(classExpr, args, type) { _super.call(this, type); this.classExpr = classExpr; this.args = args; } InstantiateExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitInstantiateExpr(this, context); }; return InstantiateExpr; }(Expression)); var LiteralExpr = (function (_super) { __extends(LiteralExpr, _super); function LiteralExpr(value, type) { if (type === void 0) { type = null; } _super.call(this, type); this.value = value; } LiteralExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitLiteralExpr(this, context); }; return LiteralExpr; }(Expression)); var ExternalExpr = (function (_super) { __extends(ExternalExpr, _super); function ExternalExpr(value, type, typeParams) { if (type === void 0) { type = null; } if (typeParams === void 0) { typeParams = null; } _super.call(this, type); this.value = value; this.typeParams = typeParams; } ExternalExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitExternalExpr(this, context); }; return ExternalExpr; }(Expression)); var ConditionalExpr = (function (_super) { __extends(ConditionalExpr, _super); function ConditionalExpr(condition, trueCase, falseCase, type) { if (falseCase === void 0) { falseCase = null; } if (type === void 0) { type = null; } _super.call(this, type || trueCase.type); this.condition = condition; this.falseCase = falseCase; this.trueCase = trueCase; } ConditionalExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitConditionalExpr(this, context); }; return ConditionalExpr; }(Expression)); var NotExpr = (function (_super) { __extends(NotExpr, _super); function NotExpr(condition) { _super.call(this, BOOL_TYPE); this.condition = condition; } NotExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitNotExpr(this, context); }; return NotExpr; }(Expression)); var CastExpr = (function (_super) { __extends(CastExpr, _super); function CastExpr(value, type) { _super.call(this, type); this.value = value; } CastExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitCastExpr(this, context); }; return CastExpr; }(Expression)); var FnParam = (function () { function FnParam(name, type) { if (type === void 0) { type = null; } this.name = name; this.type = type; } return FnParam; }()); var FunctionExpr = (function (_super) { __extends(FunctionExpr, _super); function FunctionExpr(params, statements, type) { if (type === void 0) { type = null; } _super.call(this, type); this.params = params; this.statements = statements; } FunctionExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitFunctionExpr(this, context); }; FunctionExpr.prototype.toDeclStmt = function (name, modifiers) { if (modifiers === void 0) { modifiers = null; } return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers); }; return FunctionExpr; }(Expression)); var BinaryOperatorExpr = (function (_super) { __extends(BinaryOperatorExpr, _super); function BinaryOperatorExpr(operator, lhs, rhs, type) { if (type === void 0) { type = null; } _super.call(this, type || lhs.type); this.operator = operator; this.rhs = rhs; this.lhs = lhs; } BinaryOperatorExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitBinaryOperatorExpr(this, context); }; return BinaryOperatorExpr; }(Expression)); var ReadPropExpr = (function (_super) { __extends(ReadPropExpr, _super); function ReadPropExpr(receiver, name, type) { if (type === void 0) { type = null; } _super.call(this, type); this.receiver = receiver; this.name = name; } ReadPropExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitReadPropExpr(this, context); }; ReadPropExpr.prototype.set = function (value) { return new WritePropExpr(this.receiver, this.name, value); }; return ReadPropExpr; }(Expression)); var ReadKeyExpr = (function (_super) { __extends(ReadKeyExpr, _super); function ReadKeyExpr(receiver, index, type) { if (type === void 0) { type = null; } _super.call(this, type); this.receiver = receiver; this.index = index; } ReadKeyExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitReadKeyExpr(this, context); }; ReadKeyExpr.prototype.set = function (value) { return new WriteKeyExpr(this.receiver, this.index, value); }; return ReadKeyExpr; }(Expression)); var LiteralArrayExpr = (function (_super) { __extends(LiteralArrayExpr, _super); function LiteralArrayExpr(entries, type) { if (type === void 0) { type = null; } _super.call(this, type); this.entries = entries; } LiteralArrayExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitLiteralArrayExpr(this, context); }; return LiteralArrayExpr; }(Expression)); var LiteralMapExpr = (function (_super) { __extends(LiteralMapExpr, _super); function LiteralMapExpr(entries, type) { if (type === void 0) { type = null; } _super.call(this, type); this.entries = entries; this.valueType = null; if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["a" /* isPresent */])(type)) { this.valueType = type.valueType; } } LiteralMapExpr.prototype.visitExpression = function (visitor, context) { return visitor.visitLiteralMapExpr(this, context); }; return LiteralMapExpr; }(Expression)); var THIS_EXPR = new ReadVarExpr(BuiltinVar.This); var SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super); var CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError); var CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack); var NULL_EXPR = new LiteralExpr(null, null); var TYPED_NULL_EXPR = new LiteralExpr(null, NULL_TYPE); //// Statements var StmtModifier; (function (StmtModifier) { StmtModifier[StmtModifier["Final"] = 0] = "Final"; StmtModifier[StmtModifier["Private"] = 1] = "Private"; })(StmtModifier || (StmtModifier = {})); var Statement = (function () { function Statement(modifiers) { if (modifiers === void 0) { modifiers = null; } this.modifiers = modifiers; if (!modifiers) { this.modifiers = []; } } Statement.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; }; return Statement; }()); var DeclareVarStmt = (function (_super) { __extends(DeclareVarStmt, _super); function DeclareVarStmt(name, value, type, modifiers) { if (type === void 0) { type = null; } if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.name = name; this.value = value; this.type = type || value.type; } DeclareVarStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitDeclareVarStmt(this, context); }; return DeclareVarStmt; }(Statement)); var DeclareFunctionStmt = (function (_super) { __extends(DeclareFunctionStmt, _super); function DeclareFunctionStmt(name, params, statements, type, modifiers) { if (type === void 0) { type = null; } if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.name = name; this.params = params; this.statements = statements; this.type = type; } DeclareFunctionStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitDeclareFunctionStmt(this, context); }; return DeclareFunctionStmt; }(Statement)); var ExpressionStatement = (function (_super) { __extends(ExpressionStatement, _super); function ExpressionStatement(expr) { _super.call(this); this.expr = expr; } ExpressionStatement.prototype.visitStatement = function (visitor, context) { return visitor.visitExpressionStmt(this, context); }; return ExpressionStatement; }(Statement)); var ReturnStatement = (function (_super) { __extends(ReturnStatement, _super); function ReturnStatement(value) { _super.call(this); this.value = value; } ReturnStatement.prototype.visitStatement = function (visitor, context) { return visitor.visitReturnStmt(this, context); }; return ReturnStatement; }(Statement)); var AbstractClassPart = (function () { function AbstractClassPart(type, modifiers) { if (type === void 0) { type = null; } this.type = type; this.modifiers = modifiers; if (!modifiers) { this.modifiers = []; } } AbstractClassPart.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; }; return AbstractClassPart; }()); var ClassField = (function (_super) { __extends(ClassField, _super); function ClassField(name, type, modifiers) { if (type === void 0) { type = null; } if (modifiers === void 0) { modifiers = null; } _super.call(this, type, modifiers); this.name = name; } return ClassField; }(AbstractClassPart)); var ClassMethod = (function (_super) { __extends(ClassMethod, _super); function ClassMethod(name, params, body, type, modifiers) { if (type === void 0) { type = null; } if (modifiers === void 0) { modifiers = null; } _super.call(this, type, modifiers); this.name = name; this.params = params; this.body = body; } return ClassMethod; }(AbstractClassPart)); var ClassGetter = (function (_super) { __extends(ClassGetter, _super); function ClassGetter(name, body, type, modifiers) { if (type === void 0) { type = null; } if (modifiers === void 0) { modifiers = null; } _super.call(this, type, modifiers); this.name = name; this.body = body; } return ClassGetter; }(AbstractClassPart)); var ClassStmt = (function (_super) { __extends(ClassStmt, _super); function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers) { if (modifiers === void 0) { modifiers = null; } _super.call(this, modifiers); this.name = name; this.parent = parent; this.fields = fields; this.getters = getters; this.constructorMethod = constructorMethod; this.methods = methods; } ClassStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitDeclareClassStmt(this, context); }; return ClassStmt; }(Statement)); var IfStmt = (function (_super) { __extends(IfStmt, _super); function IfStmt(condition, trueCase, falseCase) { if (falseCase === void 0) { falseCase = []; } _super.call(this); this.condition = condition; this.trueCase = trueCase; this.falseCase = falseCase; } IfStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitIfStmt(this, context); }; return IfStmt; }(Statement)); var CommentStmt = (function (_super) { __extends(CommentStmt, _super); function CommentStmt(comment) { _super.call(this); this.comment = comment; } CommentStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitCommentStmt(this, context); }; return CommentStmt; }(Statement)); var TryCatchStmt = (function (_super) { __extends(TryCatchStmt, _super); function TryCatchStmt(bodyStmts, catchStmts) { _super.call(this); this.bodyStmts = bodyStmts; this.catchStmts = catchStmts; } TryCatchStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitTryCatchStmt(this, context); }; return TryCatchStmt; }(Statement)); var ThrowStmt = (function (_super) { __extends(ThrowStmt, _super); function ThrowStmt(error) { _super.call(this); this.error = error; } ThrowStmt.prototype.visitStatement = function (visitor, context) { return visitor.visitThrowStmt(this, context); }; return ThrowStmt; }(Statement)); var ExpressionTransformer = (function () { function ExpressionTransformer() { } ExpressionTransformer.prototype.visitReadVarExpr = function (ast, context) { return ast; }; ExpressionTransformer.prototype.visitWriteVarExpr = function (expr, context) { return new WriteVarExpr(expr.name, expr.value.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitWriteKeyExpr = function (expr, context) { return new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitWritePropExpr = function (expr, context) { return new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitInvokeMethodExpr = function (ast, context) { var method = ast.builtin || ast.name; return new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type); }; ExpressionTransformer.prototype.visitInvokeFunctionExpr = function (ast, context) { return new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type); }; ExpressionTransformer.prototype.visitInstantiateExpr = function (ast, context) { return new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type); }; ExpressionTransformer.prototype.visitLiteralExpr = function (ast, context) { return ast; }; ExpressionTransformer.prototype.visitExternalExpr = function (ast, context) { return ast; }; ExpressionTransformer.prototype.visitConditionalExpr = function (ast, context) { return new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitNotExpr = function (ast, context) { return new NotExpr(ast.condition.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitCastExpr = function (ast, context) { return new CastExpr(ast.value.visitExpression(this, context), context); }; ExpressionTransformer.prototype.visitFunctionExpr = function (ast, context) { // Don't descend into nested functions return ast; }; ExpressionTransformer.prototype.visitBinaryOperatorExpr = function (ast, context) { return new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type); }; ExpressionTransformer.prototype.visitReadPropExpr = function (ast, context) { return new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type); }; ExpressionTransformer.prototype.visitReadKeyExpr = function (ast, context) { return new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type); }; ExpressionTransformer.prototype.visitLiteralArrayExpr = function (ast, context) { return new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context)); }; ExpressionTransformer.prototype.visitLiteralMapExpr = function (ast, context) { var _this = this; var entries = ast.entries.map(function (entry) { return [entry[0], entry[1].visitExpression(_this, context),]; }); return new LiteralMapExpr(entries); }; ExpressionTransformer.prototype.visitAllExpressions = function (exprs, context) { var _this = this; return exprs.map(function (expr) { return expr.visitExpression(_this, context); }); }; ExpressionTransformer.prototype.visitDeclareVarStmt = function (stmt, context) { return new DeclareVarStmt(stmt.name, stmt.value.visitExpression(this, context), stmt.type, stmt.modifiers); }; ExpressionTransformer.prototype.visitDeclareFunctionStmt = function (stmt, context) { // Don't descend into nested functions return stmt; }; ExpressionTransformer.prototype.visitExpressionStmt = function (stmt, context) { return new ExpressionStatement(stmt.expr.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitReturnStmt = function (stmt, context) { return new ReturnStatement(stmt.value.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitDeclareClassStmt = function (stmt, context) { // Don't descend into nested functions return stmt; }; ExpressionTransformer.prototype.visitIfStmt = function (stmt, context) { return new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context)); }; ExpressionTransformer.prototype.visitTryCatchStmt = function (stmt, context) { return new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context)); }; ExpressionTransformer.prototype.visitThrowStmt = function (stmt, context) { return new ThrowStmt(stmt.error.visitExpression(this, context)); }; ExpressionTransformer.prototype.visitCommentStmt = function (stmt, context) { return stmt; }; ExpressionTransformer.prototype.visitAllStatements = function (stmts, context) { var _this = this; return stmts.map(function (stmt) { return stmt.visitStatement(_this, context); }); }; return ExpressionTransformer; }()); var RecursiveExpressionVisitor = (function () { function RecursiveExpressionVisitor() { } RecursiveExpressionVisitor.prototype.visitReadVarExpr = function (ast, context) { return ast; }; RecursiveExpressionVisitor.prototype.visitWriteVarExpr = function (expr, context) { expr.value.visitExpression(this, context); return expr; }; RecursiveExpressionVisitor.prototype.visitWriteKeyExpr = function (expr, context) { expr.receiver.visitExpression(this, context); expr.index.visitExpression(this, context); expr.value.visitExpression(this, context); return expr; }; RecursiveExpressionVisitor.prototype.visitWritePropExpr = function (expr, context) { expr.receiver.visitExpression(this, context); expr.value.visitExpression(this, context); return expr; }; RecursiveExpressionVisitor.prototype.visitInvokeMethodExpr = function (ast, context) { ast.receiver.visitExpression(this, context); this.visitAllExpressions(ast.args, context); return ast; }; RecursiveExpressionVisitor.prototype.visitInvokeFunctionExpr = function (ast, context) { ast.fn.visitExpression(this, context); this.visitAllExpressions(ast.args, context); return ast; }; RecursiveExpressionVisitor.prototype.visitInstantiateExpr = function (ast, context) { ast.classExpr.visitExpression(this, context); this.visitAllExpressions(ast.args, context); return ast; }; RecursiveExpressionVisitor.prototype.visitLiteralExpr = function (ast, context) { return ast; }; RecursiveExpressionVisitor.prototype.visitExternalExpr = function (ast, context) { return ast; }; RecursiveExpressionVisitor.prototype.visitConditionalExpr = function (ast, context) { ast.condition.visitExpression(this, context); ast.trueCase.visitExpression(this, context); ast.falseCase.visitExpression(this, context); return ast; }; RecursiveExpressionVisitor.prototype.visitNotExpr = function (ast, context) { ast.condition.visitExpression(this, context); return ast; }; RecursiveExpressionVisitor.prototype.visitCastExpr = function (ast, context) { ast.value.visitExpression(this, context); return ast; }; RecursiveExpressionVisitor.prototype.visitFunctionExpr = function (ast, context) { return ast; }; RecursiveExpressionVisitor.prototype.visitBinaryOperatorExpr = function (ast, context) { ast.lhs.visitExpression(this, context); ast.rhs.visitExpression(this, context); return ast; }; RecursiveExpressionVisitor.prototype.visitReadPropExpr = function (ast, context) { ast.receiver.visitExpression(this, context); return ast; }; RecursiveExpressionVisitor.prototype.visitReadKeyExpr = function (ast, context) { ast.receiver.visitExpression(this, context); ast.index.visitExpression(this, context); return ast; }; RecursiveExpressionVisitor.prototype.visitLiteralArrayExpr = function (ast, context) { this.visitAllExpressions(ast.entries, context); return ast; }; RecursiveExpressionVisitor.prototype.visitLiteralMapExpr = function (ast, context) { var _this = this; ast.entries.forEach(function (entry) { return entry[1].visitExpression(_this, context); }); return ast; }; RecursiveExpressionVisitor.prototype.visitAllExpressions = function (exprs, context) { var _this = this; exprs.forEach(function (expr) { return expr.visitExpression(_this, context); }); }; RecursiveExpressionVisitor.prototype.visitDeclareVarStmt = function (stmt, context) { stmt.value.visitExpression(this, context); return stmt; }; RecursiveExpressionVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) { // Don't descend into nested functions return stmt; }; RecursiveExpressionVisitor.prototype.visitExpressionStmt = function (stmt, context) { stmt.expr.visitExpression(this, context); return stmt; }; RecursiveExpressionVisitor.prototype.visitReturnStmt = function (stmt, context) { stmt.value.visitExpression(this, context); return stmt; }; RecursiveExpressionVisitor.prototype.visitDeclareClassStmt = function (stmt, context) { // Don't descend into nested functions return stmt; }; RecursiveExpressionVisitor.prototype.visitIfStmt = function (stmt, context) { stmt.condition.visitExpression(this, context); this.visitAllStatements(stmt.trueCase, context); this.visitAllStatements(stmt.falseCase, context); return stmt; }; RecursiveExpressionVisitor.prototype.visitTryCatchStmt = function (stmt, context) { this.visitAllStatements(stmt.bodyStmts, context); this.visitAllStatements(stmt.catchStmts, context); return stmt; }; RecursiveExpressionVisitor.prototype.visitThrowStmt = function (stmt, context) { stmt.error.visitExpression(this, context); return stmt; }; RecursiveExpressionVisitor.prototype.visitCommentStmt = function (stmt, context) { return stmt; }; RecursiveExpressionVisitor.prototype.visitAllStatements = function (stmts, context) { var _this = this; stmts.forEach(function (stmt) { return stmt.visitStatement(_this, context); }); }; return RecursiveExpressionVisitor; }()); function replaceVarInExpression(varName, newValue, expression) { var transformer = new _ReplaceVariableTransformer(varName, newValue); return expression.visitExpression(transformer, null); } var _ReplaceVariableTransformer = (function (_super) { __extends(_ReplaceVariableTransformer, _super); function _ReplaceVariableTransformer(_varName, _newValue) { _super.call(this); this._varName = _varName; this._newValue = _newValue; } _ReplaceVariableTransformer.prototype.visitReadVarExpr = function (ast, context) { return ast.name == this._varName ? this._newValue : ast; }; return _ReplaceVariableTransformer; }(ExpressionTransformer)); function findReadVarNames(stmts) { var finder = new _VariableFinder(); finder.visitAllStatements(stmts, null); return finder.varNames; } var _VariableFinder = (function (_super) { __extends(_VariableFinder, _super); function _VariableFinder() { _super.apply(this, arguments); this.varNames = new Set(); } _VariableFinder.prototype.visitReadVarExpr = function (ast, context) { this.varNames.add(ast.name); return null; }; return _VariableFinder; }(RecursiveExpressionVisitor)); function variable(name, type) { if (type === void 0) { type = null; } return new ReadVarExpr(name, type); } function importExpr(id, typeParams) { if (typeParams === void 0) { typeParams = null; } return new ExternalExpr(id, null, typeParams); } function importType(id, typeParams, typeModifiers) { if (typeParams === void 0) { typeParams = null; } if (typeModifiers === void 0) { typeModifiers = null; } return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["a" /* isPresent */])(id) ? new ExternalType(id, typeParams, typeModifiers) : null; } function literalArr(values, type) { if (type === void 0) { type = null; } return new LiteralArrayExpr(values, type); } function literalMap(values, type) { if (type === void 0) { type = null; } return new LiteralMapExpr(values, type); } function not(expr) { return new NotExpr(expr); } function fn(params, body, type) { if (type === void 0) { type = null; } return new FunctionExpr(params, body, type); } function literal(value, type) { if (type === void 0) { type = null; } return new LiteralExpr(value, type); } //# sourceMappingURL=output_ast.js.map /***/ }), /* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nav_params__ = __webpack_require__(45); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ViewController; }); /* harmony export (immutable) */ __webpack_exports__["a"] = isViewController; /** * @name ViewController * @description * Access various features and information about the current view. * @usage * ```ts * import { Component } from '@angular/core'; * import { ViewController } from 'ionic-angular'; * * @Component({...}) * export class MyPage{ * * constructor(public viewCtrl: ViewController) {} * * } * ``` */ var ViewController = (function () { function ViewController(component, data, rootCssClass) { if (rootCssClass === void 0) { rootCssClass = DEFAULT_CSS_CLASS; } this.component = component; this._isHidden = false; /** * Observable to be subscribed to when the current component will become active * @returns {Observable} Returns an observable */ this.willEnter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * Observable to be subscribed to when the current component has become active * @returns {Observable} Returns an observable */ this.didEnter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * Observable to be subscribed to when the current component will no longer be active * @returns {Observable} Returns an observable */ this.willLeave = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * Observable to be subscribed to when the current component is no long active * @returns {Observable} Returns an observable */ this.didLeave = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * Observable to be subscribed to when the current component has been destroyed * @returns {Observable} Returns an observable */ this.willUnload = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** @private */ this.isOverlay = false; /** @private */ this._emitter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); // passed in data could be NavParams, but all we care about is its data object this.data = (data instanceof __WEBPACK_IMPORTED_MODULE_2__nav_params__["a" /* NavParams */] ? data.data : (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["c" /* isPresent */])(data) ? data : {})); this._cssClass = rootCssClass; } /** * @private */ ViewController.prototype.init = function (componentRef) { this._cmp = componentRef; this.instance = this.instance || componentRef.instance; this._detached = false; }; ViewController.prototype._setNav = function (navCtrl) { this._nav = navCtrl; }; ViewController.prototype._setInstance = function (instance) { this.instance = instance; }; /** * @private */ ViewController.prototype.subscribe = function (generatorOrNext) { return this._emitter.subscribe(generatorOrNext); }; /** * @private */ ViewController.prototype.emit = function (data) { this._emitter.emit(data); }; /** * Called when the current viewController has be successfully dismissed */ ViewController.prototype.onDidDismiss = function (callback) { this._onDidDismiss = callback; }; /** * Called when the current viewController will be dismissed */ ViewController.prototype.onWillDismiss = function (callback) { this._onWillDismiss = callback; }; /** * Dismiss the current viewController * @param {any} [data] Data that you want to return when the viewController is dismissed. * @param {any} [role ] * @param {NavOptions} NavOptions Options for the dismiss navigation. * @returns {any} data Returns the data passed in, if any. */ ViewController.prototype.dismiss = function (data, role, navOptions) { if (navOptions === void 0) { navOptions = {}; } if (!this._nav) { return Promise.resolve(false); } this._dismissData = data; this._dismissRole = role; var options = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["l" /* assign */])({}, this._leavingOpts, navOptions); return this._nav.removeView(this, options).then(function () { return data; }); }; /** * @private */ ViewController.prototype.getNav = function () { return this._nav; }; /** * @private */ ViewController.prototype.getTransitionName = function (direction) { return this._nav && this._nav.config.get('pageTransition'); }; /** * @private */ ViewController.prototype.getNavParams = function () { return new __WEBPACK_IMPORTED_MODULE_2__nav_params__["a" /* NavParams */](this.data); }; /** * @private */ ViewController.prototype.setLeavingOpts = function (opts) { this._leavingOpts = opts; }; /** * Check to see if you can go back in the navigation stack. * @returns {boolean} Returns if it's possible to go back from this Page. */ ViewController.prototype.enableBack = function () { // update if it's possible to go back from this nav item if (!this._nav) { return false; } // the previous view may exist, but if it's about to be destroyed // it shouldn't be able to go back to var previousItem = this._nav.getPrevious(this); return !!(previousItem); }; Object.defineProperty(ViewController.prototype, "name", { /** * @private */ get: function () { return this.component ? this.component.name : ''; }, enumerable: true, configurable: true }); Object.defineProperty(ViewController.prototype, "index", { /** * Get the index of the current component in the current navigation stack. * @returns {number} Returns the index of this page within its `NavController`. */ get: function () { return (this._nav ? this._nav.indexOf(this) : -1); }, enumerable: true, configurable: true }); /** * @returns {boolean} Returns if this Page is the first in the stack of pages within its NavController. */ ViewController.prototype.isFirst = function () { return (this._nav ? this._nav.first() === this : false); }; /** * @returns {boolean} Returns if this Page is the last in the stack of pages within its NavController. */ ViewController.prototype.isLast = function () { return (this._nav ? this._nav.last() === this : false); }; /** * @private * DOM WRITE */ ViewController.prototype._domShow = function (shouldShow, renderer) { // using hidden element attribute to display:none and not render views // _hidden value of '' means the hidden attribute will be added // _hidden value of null means the hidden attribute will be removed // doing checks to make sure we only update the DOM when actually needed if (this._cmp) { // if it should render, then the hidden attribute should not be on the element if (shouldShow === this._isHidden) { this._isHidden = !shouldShow; var value = (shouldShow ? null : ''); // ******** DOM WRITE **************** renderer.setElementAttribute(this.pageRef().nativeElement, 'hidden', value); } } }; /** * @private */ ViewController.prototype.getZIndex = function () { return this._zIndex; }; /** * @private * DOM WRITE */ ViewController.prototype._setZIndex = function (zIndex, renderer) { if (zIndex !== this._zIndex) { this._zIndex = zIndex; var pageRef = this.pageRef(); if (pageRef) { // ******** DOM WRITE **************** renderer.setElementStyle(pageRef.nativeElement, 'z-index', zIndex); } } }; /** * @returns {ElementRef} Returns the Page's ElementRef. */ ViewController.prototype.pageRef = function () { return this._cmp && this._cmp.location; }; ViewController.prototype._setContent = function (directive) { this._cntDir = directive; }; /** * @returns {component} Returns the Page's Content component reference. */ ViewController.prototype.getContent = function () { return this._cntDir; }; ViewController.prototype._setContentRef = function (elementRef) { this._cntRef = elementRef; }; /** * @returns {ElementRef} Returns the Content's ElementRef. */ ViewController.prototype.contentRef = function () { return this._cntRef; }; ViewController.prototype._setIONContent = function (content) { this._setContent(content); this._ionCntDir = content; }; /** * @private */ ViewController.prototype.getIONContent = function () { return this._ionCntDir; }; ViewController.prototype._setIONContentRef = function (elementRef) { this._setContentRef(elementRef); this._ionCntRef = elementRef; }; /** * @private */ ViewController.prototype.getIONContentRef = function () { return this._ionCntRef; }; ViewController.prototype._setHeader = function (directive) { this._hdrDir = directive; }; /** * @private */ ViewController.prototype.getHeader = function () { return this._hdrDir; }; ViewController.prototype._setFooter = function (directive) { this._ftrDir = directive; }; /** * @private */ ViewController.prototype.getFooter = function () { return this._ftrDir; }; ViewController.prototype._setNavbar = function (directive) { this._nb = directive; }; /** * @private */ ViewController.prototype.getNavbar = function () { return this._nb; }; /** * Find out if the current component has a NavBar or not. Be sure * to wrap this in an `ionViewWillEnter` method in order to make sure * the view has rendered fully. * @returns {boolean} Returns a boolean if this Page has a navbar or not. */ ViewController.prototype.hasNavbar = function () { return !!this._nb; }; /** * Change the title of the back-button. Be sure to call this * after `ionViewWillEnter` to make sure the DOM has been rendered. * @param {string} backButtonText Set the back button text. */ ViewController.prototype.setBackButtonText = function (val) { this._nb && this._nb.setBackButtonText(val); }; /** * Set if the back button for the current view is visible or not. Be sure to call this * after `ionViewWillEnter` to make sure the DOM has been rendered. * @param {boolean} Set if this Page's back button should show or not. */ ViewController.prototype.showBackButton = function (shouldShow) { if (this._nb) { this._nb.hideBackButton = !shouldShow; } }; ViewController.prototype._preLoad = function () { this._lifecycle('PreLoad'); }; /** * @private * The view has loaded. This event only happens once per view will be created. * This event is fired before the component and his children have been initialized. */ ViewController.prototype._willLoad = function () { this._lifecycle('WillLoad'); }; /** * @private * The view has loaded. This event only happens once per view being * created. If a view leaves but is cached, then this will not * fire again on a subsequent viewing. This method is a good place * to put your setup code for the view; however, it is not the * recommended method to use when a view becomes active. */ ViewController.prototype._didLoad = function () { this._lifecycle('DidLoad'); }; /** * @private * The view is about to enter and become the active view. */ ViewController.prototype._willEnter = function () { if (this._detached && this._cmp) { // ensure this has been re-attached to the change detector this._cmp.changeDetectorRef.reattach(); this._detached = false; } this.willEnter.emit(null); this._lifecycle('WillEnter'); }; /** * @private * The view has fully entered and is now the active view. This * will fire, whether it was the first load or loaded from the cache. */ ViewController.prototype._didEnter = function () { this._nb && this._nb.didEnter(); this.didEnter.emit(null); this._lifecycle('DidEnter'); }; /** * @private * The view has is about to leave and no longer be the active view. */ ViewController.prototype._willLeave = function (willUnload) { this.willLeave.emit(null); this._lifecycle('WillLeave'); if (willUnload && this._onWillDismiss) { this._onWillDismiss(this._dismissData, this._dismissRole); this._onWillDismiss = null; } }; /** * @private * The view has finished leaving and is no longer the active view. This * will fire, whether it is cached or unloaded. */ ViewController.prototype._didLeave = function () { this.didLeave.emit(null); this._lifecycle('DidLeave'); // when this is not the active page // we no longer need to detect changes if (!this._detached && this._cmp) { this._cmp.changeDetectorRef.detach(); this._detached = true; } }; /** * @private */ ViewController.prototype._willUnload = function () { this.willUnload.emit(null); this._lifecycle('WillUnload'); this._onDidDismiss && this._onDidDismiss(this._dismissData, this._dismissRole); this._onDidDismiss = null; this._dismissData = null; this._dismissRole = null; }; /** * @private * DOM WRITE */ ViewController.prototype._destroy = function (renderer) { if (this._cmp) { if (renderer) { // ensure the element is cleaned up for when the view pool reuses this element // ******** DOM WRITE **************** var cmpEle = this._cmp.location.nativeElement; renderer.setElementAttribute(cmpEle, 'class', null); renderer.setElementAttribute(cmpEle, 'style', null); } // completely destroy this component. boom. this._cmp.destroy(); } this._nav = this._cmp = this.instance = this._cntDir = this._cntRef = this._hdrDir = this._ftrDir = this._nb = this._onDidDismiss = this._onWillDismiss = null; }; /** * @private */ ViewController.prototype._lifecycleTest = function (lifecycle) { var instance = this.instance; var methodName = 'ionViewCan' + lifecycle; if (instance && instance[methodName]) { try { var result = instance[methodName](); if (result === false) { return false; } else if (result instanceof Promise) { return result; } else { return true; } } catch (e) { console.error(this.name + " " + methodName + " error: " + e.message); return false; } } return true; }; ViewController.prototype._lifecycle = function (lifecycle) { var instance = this.instance; var methodName = 'ionView' + lifecycle; if (instance && instance[methodName]) { try { instance[methodName](); } catch (e) { console.error(this.name + " " + methodName + " error: " + e.message); } } }; ViewController.propDecorators = { '_emitter': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["P" /* Output */] },], }; return ViewController; }()); function isViewController(viewCtrl) { return !!(viewCtrl && viewCtrl._didLoad && viewCtrl._willUnload); } var DEFAULT_CSS_CLASS = 'ion-page'; //# sourceMappingURL=view-controller.js.map /***/ }), /* 14 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config_config__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__navigation_nav_util__ = __webpack_require__(77); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__platform_platform__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__menu_menu_controller__ = __webpack_require__(65); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return App; }); /** * @name App * @description * App is a utility class used in Ionic to get information about various aspects of an app */ var App = (function () { function App(_config, _platform, _menuCtrl) { this._config = _config; this._platform = _platform; this._menuCtrl = _menuCtrl; this._disTime = 0; this._scrollTime = 0; this._title = ''; this._titleSrv = new __WEBPACK_IMPORTED_MODULE_1__angular_platform_browser__["a" /* Title */](); this._rootNav = null; /** * @private */ this.viewDidLoad = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * @private */ this.viewWillEnter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * @private */ this.viewDidEnter = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * @private */ this.viewWillLeave = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * @private */ this.viewDidLeave = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * @private */ this.viewWillUnload = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); // listen for hardware back button events // register this back button action with a default priority _platform.registerBackButtonAction(this.goBack.bind(this)); this._disableScrollAssist = _config.getBoolean('disableScrollAssist', false); (void 0) /* runInDev */; } /** * Sets the document title. * @param {string} val Value to set the document title to. */ App.prototype.setTitle = function (val) { if (val !== this._title) { this._title = val; this._titleSrv.setTitle(val); } }; /** * @private */ App.prototype.setElementClass = function (className, isAdd) { this._appRoot.setElementClass(className, isAdd); }; /** * @private * Sets if the app is currently enabled or not, meaning if it's * available to accept new user commands. For example, this is set to `false` * while views transition, a modal slides up, an action-sheet * slides up, etc. After the transition completes it is set back to `true`. * @param {boolean} isEnabled `true` for enabled, `false` for disabled * @param {number} duration When `isEnabled` is set to `false`, this argument * is used to set the maximum number of milliseconds that app will wait until * it will automatically enable the app again. It's basically a fallback incase * something goes wrong during a transition and the app wasn't re-enabled correctly. */ App.prototype.setEnabled = function (isEnabled, duration) { if (duration === void 0) { duration = 700; } this._disTime = (isEnabled ? 0 : Date.now() + duration); if (this._clickBlock) { if (isEnabled) { // disable the click block if it's enabled, or the duration is tiny this._clickBlock.activate(false, CLICK_BLOCK_BUFFER_IN_MILLIS); } else { // show the click block for duration + some number this._clickBlock.activate(true, duration + CLICK_BLOCK_BUFFER_IN_MILLIS); } } }; /** * @private * Toggles whether an application can be scrolled * @param {boolean} disableScroll when set to `false`, the application's * scrolling is enabled. When set to `true`, scrolling is disabled. */ App.prototype._setDisableScroll = function (disableScroll) { if (this._disableScrollAssist) { this._appRoot._disableScroll(disableScroll); } }; /** * @private * Boolean if the app is actively enabled or not. * @return {boolean} */ App.prototype.isEnabled = function () { var disTime = this._disTime; if (disTime === 0) { return true; } return (disTime < Date.now()); }; /** * @private */ App.prototype.setScrolling = function () { this._scrollTime = Date.now() + ACTIVE_SCROLLING_TIME; }; /** * Boolean if the app is actively scrolling or not. * @return {boolean} returns true or false */ App.prototype.isScrolling = function () { var scrollTime = this._scrollTime; if (scrollTime === 0) { return false; } if (scrollTime < Date.now()) { this._scrollTime = 0; return false; } return true; }; /** * @private */ App.prototype.getActiveNav = function () { var portal = this._appRoot._getPortal(MODAL); if (portal.length() > 0) { return findTopNav(portal); } return findTopNav(this._rootNav || null); }; /** * @return {NavController} Returns the root NavController */ App.prototype.getRootNav = function () { return this._rootNav; }; /** * @private */ App.prototype._setRootNav = function (nav) { this._rootNav = nav; }; /** * @private */ App.prototype.present = function (enteringView, opts, appPortal) { var portal = this._appRoot._getPortal(appPortal); enteringView._setNav(portal); opts.keyboardClose = false; opts.direction = __WEBPACK_IMPORTED_MODULE_3__navigation_nav_util__["e" /* DIRECTION_FORWARD */]; if (!opts.animation) { opts.animation = enteringView.getTransitionName(__WEBPACK_IMPORTED_MODULE_3__navigation_nav_util__["e" /* DIRECTION_FORWARD */]); } enteringView.setLeavingOpts({ keyboardClose: false, direction: __WEBPACK_IMPORTED_MODULE_3__navigation_nav_util__["d" /* DIRECTION_BACK */], animation: enteringView.getTransitionName(__WEBPACK_IMPORTED_MODULE_3__navigation_nav_util__["d" /* DIRECTION_BACK */]), ev: opts.ev }); return portal.insertPages(-1, [enteringView], opts); }; /** * @private */ App.prototype.goBack = function () { if (this._menuCtrl && this._menuCtrl.isOpen()) { return this._menuCtrl.close(); } var navPromise = this.navPop(); if (navPromise === null) { // no views to go back to // let's exit the app if (this._config.getBoolean('navExitApp', true)) { (void 0) /* console.debug */; this._platform.exitApp(); } } return navPromise; }; /** * @private */ App.prototype.navPop = function () { if (!this._rootNav || !this.isEnabled()) { return Promise.resolve(); } // If there are any alert/actionsheet open, let's do nothing var portal = this._appRoot._getPortal(DEFAULT); if (portal.length() > 0) { return Promise.resolve(); } // next get the active nav, check itself and climb up all // of its parent navs until it finds a nav that can pop return recursivePop(this.getActiveNav()); }; App.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["c" /* Injectable */] }, ]; /** @nocollapse */ App.ctorParameters = [ { type: __WEBPACK_IMPORTED_MODULE_2__config_config__["a" /* Config */], }, { type: __WEBPACK_IMPORTED_MODULE_4__platform_platform__["a" /* Platform */], }, { type: __WEBPACK_IMPORTED_MODULE_5__menu_menu_controller__["a" /* MenuController */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["h" /* Optional */] },] }, ]; return App; }()); function recursivePop(nav) { if (!nav) { return null; } if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__navigation_nav_util__["h" /* isNav */])(nav)) { var len = nav.length(); if (len > 1 || (nav._isPortal && len > 0)) { // this nav controller has more than one view // pop the current view on this nav and we're done here (void 0) /* console.debug */; return nav.pop(); } } // try again using the parent nav (if there is one) return recursivePop(nav.parent); } function findTopNav(nav) { var activeChildNav; while (nav) { activeChildNav = nav.getActiveChildNav(); if (!activeChildNav) { break; } nav = activeChildNav; } return nav; } var DEFAULT = 0; // AppPortal.DEFAULT var MODAL = 1; // AppPortal.MODAL var ACTIVE_SCROLLING_TIME = 100; var CLICK_BLOCK_BUFFER_IN_MILLIS = 64; //# sourceMappingURL=app.js.map /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(1); var Subscriber_1 = __webpack_require__(4); var Subscription_1 = __webpack_require__(19); var ObjectUnsubscribedError_1 = __webpack_require__(236); var SubjectSubscription_1 = __webpack_require__(652); var rxSubscriber_1 = __webpack_require__(143); /** * @class SubjectSubscriber */ var SubjectSubscriber = (function (_super) { __extends(SubjectSubscriber, _super); function SubjectSubscriber(destination) { _super.call(this, destination); this.destination = destination; } return SubjectSubscriber; }(Subscriber_1.Subscriber)); exports.SubjectSubscriber = SubjectSubscriber; /** * @class Subject */ var Subject = (function (_super) { __extends(Subject, _super); function Subject() { _super.call(this); this.observers = []; this.closed = false; this.isStopped = false; this.hasError = false; this.thrownError = null; } Subject.prototype[rxSubscriber_1.$$rxSubscriber] = function () { return new SubjectSubscriber(this); }; Subject.prototype.lift = function (operator) { var subject = new AnonymousSubject(this, this); subject.operator = operator; return subject; }; Subject.prototype.next = function (value) { if (this.closed) { throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); } if (!this.isStopped) { var observers = this.observers; var len = observers.length; var copy = observers.slice(); for (var i = 0; i < len; i++) { copy[i].next(value); } } }; Subject.prototype.error = function (err) { if (this.closed) { throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); } this.hasError = true; this.thrownError = err; this.isStopped = true; var observers = this.observers; var len = observers.length; var copy = observers.slice(); for (var i = 0; i < len; i++) { copy[i].error(err); } this.observers.length = 0; }; Subject.prototype.complete = function () { if (this.closed) { throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); } this.isStopped = true; var observers = this.observers; var len = observers.length; var copy = observers.slice(); for (var i = 0; i < len; i++) { copy[i].complete(); } this.observers.length = 0; }; Subject.prototype.unsubscribe = function () { this.isStopped = true; this.closed = true; this.observers = null; }; Subject.prototype._subscribe = function (subscriber) { if (this.closed) { throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); } else if (this.hasError) { subscriber.error(this.thrownError); return Subscription_1.Subscription.EMPTY; } else if (this.isStopped) { subscriber.complete(); return Subscription_1.Subscription.EMPTY; } else { this.observers.push(subscriber); return new SubjectSubscription_1.SubjectSubscription(this, subscriber); } }; Subject.prototype.asObservable = function () { var observable = new Observable_1.Observable(); observable.source = this; return observable; }; Subject.create = function (destination, source) { return new AnonymousSubject(destination, source); }; return Subject; }(Observable_1.Observable)); exports.Subject = Subject; /** * @class AnonymousSubject */ var AnonymousSubject = (function (_super) { __extends(AnonymousSubject, _super); function AnonymousSubject(destination, source) { _super.call(this); this.destination = destination; this.source = source; } AnonymousSubject.prototype.next = function (value) { var destination = this.destination; if (destination && destination.next) { destination.next(value); } }; AnonymousSubject.prototype.error = function (err) { var destination = this.destination; if (destination && destination.error) { this.destination.error(err); } }; AnonymousSubject.prototype.complete = function () { var destination = this.destination; if (destination && destination.complete) { this.destination.complete(); } }; AnonymousSubject.prototype._subscribe = function (subscriber) { var source = this.source; if (source) { return this.source.subscribe(subscriber); } else { return Subscription_1.Subscription.EMPTY; } }; return AnonymousSubject; }(Subject)); exports.AnonymousSubject = AnonymousSubject; //# sourceMappingURL=Subject.js.map /***/ }), /* 16 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_app_app__ = __webpack_require__(14); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GESTURE_GO_BACK_SWIPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return GESTURE_MENU_SWIPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return GESTURE_ITEM_SWIPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return GESTURE_REFRESHER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return GESTURE_TOGGLE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return BLOCK_ALL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return GestureController; }); /* unused harmony export GestureDelegate */ /* unused harmony export BlockerDelegate */ /** @private */ var GESTURE_GO_BACK_SWIPE = 'goback-swipe'; /** @private */ var GESTURE_MENU_SWIPE = 'menu-swipe'; /** @private */ var GESTURE_ITEM_SWIPE = 'item-swipe'; /** @private */ var GESTURE_REFRESHER = 'refresher'; /** @private */ var GESTURE_TOGGLE = 'toggle'; /** * @private */ var BLOCK_ALL = { disable: [GESTURE_MENU_SWIPE, GESTURE_GO_BACK_SWIPE], disableScroll: true }; /** * @private */ var GestureController = (function () { function GestureController(_app) { this._app = _app; this.id = 1; this.requestedStart = {}; this.disabledGestures = {}; this.disabledScroll = new Set(); this.capturedID = null; } GestureController.prototype.createGesture = function (opts) { if (!opts.name) { throw new Error('name is undefined'); } return new GestureDelegate(opts.name, this.newID(), this, opts.priority || 0, !!opts.disableScroll); }; GestureController.prototype.createBlocker = function (opts) { if (opts === void 0) { opts = {}; } return new BlockerDelegate(this.newID(), this, opts.disable, !!opts.disableScroll); }; GestureController.prototype.newID = function () { var id = this.id; this.id++; return id; }; GestureController.prototype.start = function (gestureName, id, priority) { if (!this.canStart(gestureName)) { delete this.requestedStart[id]; return false; } this.requestedStart[id] = priority; return true; }; GestureController.prototype.capture = function (gestureName, id, priority) { if (!this.start(gestureName, id, priority)) { return false; } var requestedStart = this.requestedStart; var maxPriority = -10000 /* Minimun */; for (var gestureID in requestedStart) { maxPriority = Math.max(maxPriority, requestedStart[gestureID]); } if (maxPriority === priority) { this.capturedID = id; this.requestedStart = {}; (void 0) /* console.debug */; return true; } delete requestedStart[id]; (void 0) /* console.debug */; return false; }; GestureController.prototype.release = function (id) { delete this.requestedStart[id]; if (this.capturedID && id === this.capturedID) { this.capturedID = null; } }; GestureController.prototype.disableGesture = function (gestureName, id) { var set = this.disabledGestures[gestureName]; if (!set) { set = new Set(); this.disabledGestures[gestureName] = set; } set.add(id); }; GestureController.prototype.enableGesture = function (gestureName, id) { var set = this.disabledGestures[gestureName]; if (set) { set.delete(id); } }; GestureController.prototype.disableScroll = function (id) { var isEnabled = !this.isScrollDisabled(); this.disabledScroll.add(id); if (this._app && isEnabled && this.isScrollDisabled()) { (void 0) /* console.debug */; this._app._setDisableScroll(true); } }; GestureController.prototype.enableScroll = function (id) { var isDisabled = this.isScrollDisabled(); this.disabledScroll.delete(id); if (this._app && isDisabled && !this.isScrollDisabled()) { (void 0) /* console.debug */; this._app._setDisableScroll(false); } }; GestureController.prototype.canStart = function (gestureName) { if (this.capturedID) { (void 0) /* console.debug */; // a gesture already captured return false; } if (this.isDisabled(gestureName)) { (void 0) /* console.debug */; return false; } return true; }; GestureController.prototype.isCaptured = function () { return !!this.capturedID; }; GestureController.prototype.isScrollDisabled = function () { return this.disabledScroll.size > 0; }; GestureController.prototype.isDisabled = function (gestureName) { var disabled = this.disabledGestures[gestureName]; if (disabled && disabled.size > 0) { return true; } return false; }; GestureController.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["c" /* Injectable */] }, ]; /** @nocollapse */ GestureController.ctorParameters = [ { type: __WEBPACK_IMPORTED_MODULE_1__components_app_app__["a" /* App */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["f" /* Inject */], args: [__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["g" /* forwardRef */])(function () { return __WEBPACK_IMPORTED_MODULE_1__components_app_app__["a" /* App */]; }),] },] }, ]; return GestureController; }()); /** * @private */ var GestureDelegate = (function () { function GestureDelegate(name, id, controller, priority, disableScroll) { this.name = name; this.id = id; this.controller = controller; this.priority = priority; this.disableScroll = disableScroll; } GestureDelegate.prototype.canStart = function () { if (!this.controller) { (void 0) /* assert */; return false; } return this.controller.canStart(this.name); }; GestureDelegate.prototype.start = function () { if (!this.controller) { (void 0) /* assert */; return false; } return this.controller.start(this.name, this.id, this.priority); }; GestureDelegate.prototype.capture = function () { if (!this.controller) { (void 0) /* assert */; return false; } var captured = this.controller.capture(this.name, this.id, this.priority); if (captured && this.disableScroll) { this.controller.disableScroll(this.id); } return captured; }; GestureDelegate.prototype.release = function () { if (!this.controller) { (void 0) /* assert */; return; } this.controller.release(this.id); if (this.disableScroll) { this.controller.enableScroll(this.id); } }; GestureDelegate.prototype.destroy = function () { this.release(); this.controller = null; }; return GestureDelegate; }()); /** * @private */ var BlockerDelegate = (function () { function BlockerDelegate(id, controller, disable, disableScroll) { this.id = id; this.controller = controller; this.disable = disable; this.disableScroll = disableScroll; this.blocked = false; } BlockerDelegate.prototype.block = function () { var _this = this; if (!this.controller) { (void 0) /* assert */; return; } if (this.disable) { this.disable.forEach(function (gesture) { _this.controller.disableGesture(gesture, _this.id); }); } if (this.disableScroll) { this.controller.disableScroll(this.id); } this.blocked = true; }; BlockerDelegate.prototype.unblock = function () { var _this = this; if (!this.controller) { (void 0) /* assert */; return; } if (this.disable) { this.disable.forEach(function (gesture) { _this.controller.enableGesture(gesture, _this.id); }); } if (this.disableScroll) { this.controller.enableScroll(this.id); } this.blocked = false; }; BlockerDelegate.prototype.destroy = function () { this.unblock(); this.controller = null; }; return BlockerDelegate; }()); //# sourceMappingURL=gesture-controller.js.map /***/ }), /* 17 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__compile_metadata__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__private_import_core__ = __webpack_require__(18); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Identifiers; }); /* unused harmony export assetUrl */ /* harmony export (immutable) */ __webpack_exports__["a"] = resolveIdentifier; /* harmony export (immutable) */ __webpack_exports__["c"] = identifierToken; /* harmony export (immutable) */ __webpack_exports__["e"] = resolveIdentifierToken; /* harmony export (immutable) */ __webpack_exports__["d"] = resolveEnumIdentifier; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var APP_VIEW_MODULE_URL = assetUrl('core', 'linker/view'); var VIEW_UTILS_MODULE_URL = assetUrl('core', 'linker/view_utils'); var CD_MODULE_URL = assetUrl('core', 'change_detection/change_detection'); var ANIMATION_STYLE_UTIL_ASSET_URL = assetUrl('core', 'animation/animation_style_util'); var Identifiers = (function () { function Identifiers() { } Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = { name: 'ANALYZE_FOR_ENTRY_COMPONENTS', moduleUrl: assetUrl('core', 'metadata/di'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_2" /* ANALYZE_FOR_ENTRY_COMPONENTS */] }; Identifiers.ViewUtils = { name: 'ViewUtils', moduleUrl: assetUrl('core', 'linker/view_utils'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].ViewUtils }; Identifiers.AppView = { name: 'AppView', moduleUrl: APP_VIEW_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["d" /* AppView */] }; Identifiers.DebugAppView = { name: 'DebugAppView', moduleUrl: APP_VIEW_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["e" /* DebugAppView */] }; Identifiers.ViewContainer = { name: 'ViewContainer', moduleUrl: assetUrl('core', 'linker/view_container'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["f" /* ViewContainer */] }; Identifiers.ElementRef = { name: 'ElementRef', moduleUrl: assetUrl('core', 'linker/element_ref'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* ElementRef */] }; Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleUrl: assetUrl('core', 'linker/view_container_ref'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["B" /* ViewContainerRef */] }; Identifiers.ChangeDetectorRef = { name: 'ChangeDetectorRef', moduleUrl: assetUrl('core', 'change_detection/change_detector_ref'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["v" /* ChangeDetectorRef */] }; Identifiers.RenderComponentType = { name: 'RenderComponentType', moduleUrl: assetUrl('core', 'render/api'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_4" /* RenderComponentType */] }; Identifiers.QueryList = { name: 'QueryList', moduleUrl: assetUrl('core', 'linker/query_list'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_5" /* QueryList */] }; Identifiers.TemplateRef = { name: 'TemplateRef', moduleUrl: assetUrl('core', 'linker/template_ref'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* TemplateRef */] }; Identifiers.TemplateRef_ = { name: 'TemplateRef_', moduleUrl: assetUrl('core', 'linker/template_ref'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["g" /* TemplateRef_ */] }; Identifiers.CodegenComponentFactoryResolver = { name: 'CodegenComponentFactoryResolver', moduleUrl: assetUrl('core', 'linker/component_factory_resolver'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["h" /* CodegenComponentFactoryResolver */] }; Identifiers.ComponentFactoryResolver = { name: 'ComponentFactoryResolver', moduleUrl: assetUrl('core', 'linker/component_factory_resolver'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Y" /* ComponentFactoryResolver */] }; Identifiers.ComponentFactory = { name: 'ComponentFactory', runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_6" /* ComponentFactory */], moduleUrl: assetUrl('core', 'linker/component_factory') }; Identifiers.ComponentRef_ = { name: 'ComponentRef_', runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["i" /* ComponentRef_ */], moduleUrl: assetUrl('core', 'linker/component_factory') }; Identifiers.ComponentRef = { name: 'ComponentRef', runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_7" /* ComponentRef */], moduleUrl: assetUrl('core', 'linker/component_factory') }; Identifiers.NgModuleFactory = { name: 'NgModuleFactory', runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_8" /* NgModuleFactory */], moduleUrl: assetUrl('core', 'linker/ng_module_factory') }; Identifiers.NgModuleInjector = { name: 'NgModuleInjector', runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["j" /* NgModuleInjector */], moduleUrl: assetUrl('core', 'linker/ng_module_factory') }; Identifiers.RegisterModuleFactoryFn = { name: 'registerModuleFactory', runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["k" /* registerModuleFactory */], moduleUrl: assetUrl('core', 'linker/ng_module_factory_loader') }; Identifiers.ValueUnwrapper = { name: 'ValueUnwrapper', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["l" /* ValueUnwrapper */] }; Identifiers.Injector = { name: 'Injector', moduleUrl: assetUrl('core', 'di/injector'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["V" /* Injector */] }; Identifiers.ViewEncapsulation = { name: 'ViewEncapsulation', moduleUrl: assetUrl('core', 'metadata/view'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["N" /* ViewEncapsulation */] }; Identifiers.ViewType = { name: 'ViewType', moduleUrl: assetUrl('core', 'linker/view_type'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["m" /* ViewType */] }; Identifiers.ChangeDetectionStrategy = { name: 'ChangeDetectionStrategy', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["S" /* ChangeDetectionStrategy */] }; Identifiers.StaticNodeDebugInfo = { name: 'StaticNodeDebugInfo', moduleUrl: assetUrl('core', 'linker/debug_context'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["n" /* StaticNodeDebugInfo */] }; Identifiers.DebugContext = { name: 'DebugContext', moduleUrl: assetUrl('core', 'linker/debug_context'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["o" /* DebugContext */] }; Identifiers.Renderer = { name: 'Renderer', moduleUrl: assetUrl('core', 'render/api'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* Renderer */] }; Identifiers.SimpleChange = { name: 'SimpleChange', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_9" /* SimpleChange */] }; Identifiers.UNINITIALIZED = { name: 'UNINITIALIZED', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["p" /* UNINITIALIZED */] }; Identifiers.ChangeDetectorStatus = { name: 'ChangeDetectorStatus', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["q" /* ChangeDetectorStatus */] }; Identifiers.checkBinding = { name: 'checkBinding', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].checkBinding }; Identifiers.devModeEqual = { name: 'devModeEqual', moduleUrl: CD_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["r" /* devModeEqual */] }; Identifiers.inlineInterpolate = { name: 'inlineInterpolate', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].inlineInterpolate }; Identifiers.interpolate = { name: 'interpolate', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].interpolate }; Identifiers.castByValue = { name: 'castByValue', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].castByValue }; Identifiers.EMPTY_ARRAY = { name: 'EMPTY_ARRAY', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].EMPTY_ARRAY }; Identifiers.EMPTY_MAP = { name: 'EMPTY_MAP', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].EMPTY_MAP }; Identifiers.createRenderElement = { name: 'createRenderElement', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].createRenderElement }; Identifiers.selectOrCreateRenderHostElement = { name: 'selectOrCreateRenderHostElement', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].selectOrCreateRenderHostElement }; Identifiers.pureProxies = [ null, { name: 'pureProxy1', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy1 }, { name: 'pureProxy2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy2 }, { name: 'pureProxy3', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy3 }, { name: 'pureProxy4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy4 }, { name: 'pureProxy5', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy5 }, { name: 'pureProxy6', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy6 }, { name: 'pureProxy7', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy7 }, { name: 'pureProxy8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy8 }, { name: 'pureProxy9', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy9 }, { name: 'pureProxy10', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].pureProxy10 }, ]; Identifiers.SecurityContext = { name: 'SecurityContext', moduleUrl: assetUrl('core', 'security'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["I" /* SecurityContext */], }; Identifiers.AnimationKeyframe = { name: 'AnimationKeyframe', moduleUrl: assetUrl('core', 'animation/animation_keyframe'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["s" /* AnimationKeyframe */] }; Identifiers.AnimationStyles = { name: 'AnimationStyles', moduleUrl: assetUrl('core', 'animation/animation_styles'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["t" /* AnimationStyles */] }; Identifiers.NoOpAnimationPlayer = { name: 'NoOpAnimationPlayer', moduleUrl: assetUrl('core', 'animation/animation_player'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["u" /* NoOpAnimationPlayer */] }; Identifiers.AnimationGroupPlayer = { name: 'AnimationGroupPlayer', moduleUrl: assetUrl('core', 'animation/animation_group_player'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["v" /* AnimationGroupPlayer */] }; Identifiers.AnimationSequencePlayer = { name: 'AnimationSequencePlayer', moduleUrl: assetUrl('core', 'animation/animation_sequence_player'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["w" /* AnimationSequencePlayer */] }; Identifiers.prepareFinalAnimationStyles = { name: 'prepareFinalAnimationStyles', moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["x" /* prepareFinalAnimationStyles */] }; Identifiers.balanceAnimationKeyframes = { name: 'balanceAnimationKeyframes', moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["y" /* balanceAnimationKeyframes */] }; Identifiers.clearStyles = { name: 'clearStyles', moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["z" /* clearStyles */] }; Identifiers.renderStyles = { name: 'renderStyles', moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["A" /* renderStyles */] }; Identifiers.collectAndResolveStyles = { name: 'collectAndResolveStyles', moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["B" /* collectAndResolveStyles */] }; Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleUrl: assetUrl('core', 'i18n/tokens'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["t" /* LOCALE_ID */] }; Identifiers.TRANSLATIONS_FORMAT = { name: 'TRANSLATIONS_FORMAT', moduleUrl: assetUrl('core', 'i18n/tokens'), runtime: __WEBPACK_IMPORTED_MODULE_0__angular_core__["_10" /* TRANSLATIONS_FORMAT */] }; Identifiers.setBindingDebugInfo = { name: 'setBindingDebugInfo', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].setBindingDebugInfo }; Identifiers.setBindingDebugInfoForChanges = { name: 'setBindingDebugInfoForChanges', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].setBindingDebugInfoForChanges }; Identifiers.AnimationTransition = { name: 'AnimationTransition', moduleUrl: assetUrl('core', 'animation/animation_transition'), runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["C" /* AnimationTransition */] }; // This is just the interface! Identifiers.InlineArray = { name: 'InlineArray', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: null }; Identifiers.inlineArrays = [ { name: 'InlineArray2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].InlineArray2 }, { name: 'InlineArray2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].InlineArray2 }, { name: 'InlineArray4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].InlineArray4 }, { name: 'InlineArray8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].InlineArray8 }, { name: 'InlineArray16', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].InlineArray16 }, ]; Identifiers.EMPTY_INLINE_ARRAY = { name: 'EMPTY_INLINE_ARRAY', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].EMPTY_INLINE_ARRAY }; Identifiers.InlineArrayDynamic = { name: 'InlineArrayDynamic', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].InlineArrayDynamic }; Identifiers.subscribeToRenderElement = { name: 'subscribeToRenderElement', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].subscribeToRenderElement }; Identifiers.createRenderComponentType = { name: 'createRenderComponentType', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].createRenderComponentType }; Identifiers.noop = { name: 'noop', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["c" /* view_utils */].noop }; return Identifiers; }()); function assetUrl(pkg, path, type) { if (path === void 0) { path = null; } if (type === void 0) { type = 'src'; } if (path == null) { return "asset:@angular/lib/" + pkg + "/index"; } else { return "asset:@angular/lib/" + pkg + "/src/" + path; } } function resolveIdentifier(identifier) { return new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["h" /* CompileIdentifierMetadata */]({ name: identifier.name, moduleUrl: identifier.moduleUrl, reference: __WEBPACK_IMPORTED_MODULE_2__private_import_core__["D" /* reflector */].resolveIdentifier(identifier.name, identifier.moduleUrl, identifier.runtime) }); } function identifierToken(identifier) { return new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["i" /* CompileTokenMetadata */]({ identifier: identifier }); } function resolveIdentifierToken(identifier) { return identifierToken(resolveIdentifier(identifier)); } function resolveEnumIdentifier(enumType, name) { var resolvedEnum = __WEBPACK_IMPORTED_MODULE_2__private_import_core__["D" /* reflector */].resolveEnum(enumType.reference, name); return new __WEBPACK_IMPORTED_MODULE_1__compile_metadata__["h" /* CompileIdentifierMetadata */]({ name: enumType.name + "." + name, moduleUrl: enumType.moduleUrl, reference: resolvedEnum }); } //# sourceMappingURL=identifiers.js.map /***/ }), /* 18 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isDefaultChangeDetectionStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return ChangeDetectorStatus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return LifecycleHooks; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return LIFECYCLE_HOOKS_VALUES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return ReflectorReader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return ViewContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return CodegenComponentFactoryResolver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return ComponentRef_; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return AppView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return DebugAppView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return NgModuleInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return registerModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return ViewType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return view_utils; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return DebugContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return StaticNodeDebugInfo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return devModeEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return UNINITIALIZED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return ValueUnwrapper; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return TemplateRef_; }); /* unused harmony export RenderDebugInfo */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return Console; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return reflector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return Reflector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return ReflectionCapabilities; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return NoOpAnimationPlayer; }); /* unused harmony export AnimationPlayer */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return AnimationSequencePlayer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return AnimationGroupPlayer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return AnimationKeyframe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return AnimationStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ANY_STATE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return DEFAULT_STATE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return EMPTY_STATE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FILL_STYLE_FLAG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return prepareFinalAnimationStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return balanceAnimationKeyframes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return clearStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return collectAndResolveStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return renderStyles; }); /* unused harmony export ViewMetadata */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return ComponentStillLoadingError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return AnimationTransition; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var isDefaultChangeDetectionStrategy = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].isDefaultChangeDetectionStrategy; var ChangeDetectorStatus = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ChangeDetectorStatus; var LifecycleHooks = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].LifecycleHooks; var LIFECYCLE_HOOKS_VALUES = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].LIFECYCLE_HOOKS_VALUES; var ReflectorReader = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ReflectorReader; var ViewContainer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ViewContainer; var CodegenComponentFactoryResolver = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].CodegenComponentFactoryResolver; var ComponentRef_ = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ComponentRef_; var AppView = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AppView; var DebugAppView = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].DebugAppView; var NgModuleInjector = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].NgModuleInjector; var registerModuleFactory = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].registerModuleFactory; var ViewType = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ViewType; var view_utils = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].view_utils; var DebugContext = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].DebugContext; var StaticNodeDebugInfo = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].StaticNodeDebugInfo; var devModeEqual = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].devModeEqual; var UNINITIALIZED = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].UNINITIALIZED; var ValueUnwrapper = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ValueUnwrapper; var TemplateRef_ = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].TemplateRef_; var RenderDebugInfo = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].RenderDebugInfo; var Console = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].Console; var reflector = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].reflector; var Reflector = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].Reflector; var ReflectionCapabilities = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ReflectionCapabilities; var NoOpAnimationPlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].NoOpAnimationPlayer; var AnimationPlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AnimationPlayer; var AnimationSequencePlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AnimationSequencePlayer; var AnimationGroupPlayer = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AnimationGroupPlayer; var AnimationKeyframe = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AnimationKeyframe; var AnimationStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AnimationStyles; var ANY_STATE = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ANY_STATE; var DEFAULT_STATE = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].DEFAULT_STATE; var EMPTY_STATE = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].EMPTY_STATE; var FILL_STYLE_FLAG = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].FILL_STYLE_FLAG; var prepareFinalAnimationStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].prepareFinalAnimationStyles; var balanceAnimationKeyframes = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].balanceAnimationKeyframes; var clearStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].clearStyles; var collectAndResolveStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].collectAndResolveStyles; var renderStyles = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].renderStyles; var ViewMetadata = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ViewMetadata; var ComponentStillLoadingError = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].ComponentStillLoadingError; var AnimationTransition = __WEBPACK_IMPORTED_MODULE_0__angular_core__["w" /* __core_private__ */].AnimationTransition; //# sourceMappingURL=private_import_core.js.map /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isArray_1 = __webpack_require__(47); var isObject_1 = __webpack_require__(921); var isFunction_1 = __webpack_require__(237); var tryCatch_1 = __webpack_require__(23); var errorObject_1 = __webpack_require__(20); var UnsubscriptionError_1 = __webpack_require__(513); /** * Represents a disposable resource, such as the execution of an Observable. A * Subscription has one important method, `unsubscribe`, that takes no argument * and just disposes the resource held by the subscription. * * Additionally, subscriptions may be grouped together through the `add()` * method, which will attach a child Subscription to the current Subscription. * When a Subscription is unsubscribed, all its children (and its grandchildren) * will be unsubscribed as well. * * @class Subscription */ var Subscription = (function () { /** * @param {function(): void} [unsubscribe] A function describing how to * perform the disposal of resources when the `unsubscribe` method is called. */ function Subscription(unsubscribe) { /** * A flag to indicate whether this Subscription has already been unsubscribed. * @type {boolean} */ this.closed = false; if (unsubscribe) { this._unsubscribe = unsubscribe; } } /** * Disposes the resources held by the subscription. May, for instance, cancel * an ongoing Observable execution or cancel any other type of work that * started when the Subscription was created. * @return {void} */ Subscription.prototype.unsubscribe = function () { var hasErrors = false; var errors; if (this.closed) { return; } this.closed = true; var _a = this, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; this._subscriptions = null; if (isFunction_1.isFunction(_unsubscribe)) { var trial = tryCatch_1.tryCatch(_unsubscribe).call(this); if (trial === errorObject_1.errorObject) { hasErrors = true; (errors = errors || []).push(errorObject_1.errorObject.e); } } if (isArray_1.isArray(_subscriptions)) { var index = -1; var len = _subscriptions.length; while (++index < len) { var sub = _subscriptions[index]; if (isObject_1.isObject(sub)) { var trial = tryCatch_1.tryCatch(sub.unsubscribe).call(sub); if (trial === errorObject_1.errorObject) { hasErrors = true; errors = errors || []; var err = errorObject_1.errorObject.e; if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { errors = errors.concat(err.errors); } else { errors.push(err); } } } } } if (hasErrors) { throw new UnsubscriptionError_1.UnsubscriptionError(errors); } }; /** * Adds a tear down to be called during the unsubscribe() of this * Subscription. * * If the tear down being added is a subscription that is already * unsubscribed, is the same reference `add` is being called on, or is * `Subscription.EMPTY`, it will not be added. * * If this subscription is already in an `closed` state, the passed * tear down logic will be executed immediately. * * @param {TeardownLogic} teardown The additional logic to execute on * teardown. * @return {Subscription} Returns the Subscription used or created to be * added to the inner subscriptions list. This Subscription can be used with * `remove()` to remove the passed teardown logic from the inner subscriptions * list. */ Subscription.prototype.add = function (teardown) { if (!teardown || (teardown === Subscription.EMPTY)) { return Subscription.EMPTY; } if (teardown === this) { return this; } var sub = teardown; switch (typeof teardown) { case 'function': sub = new Subscription(teardown); case 'object': if (sub.closed || typeof sub.unsubscribe !== 'function') { break; } else if (this.closed) { sub.unsubscribe(); } else { (this._subscriptions || (this._subscriptions = [])).push(sub); } break; default: throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); } return sub; }; /** * Removes a Subscription from the internal list of subscriptions that will * unsubscribe during the unsubscribe process of this Subscription. * @param {Subscription} subscription The subscription to remove. * @return {void} */ Subscription.prototype.remove = function (subscription) { // HACK: This might be redundant because of the logic in `add()` if (subscription == null || (subscription === this) || (subscription === Subscription.EMPTY)) { return; } var subscriptions = this._subscriptions; if (subscriptions) { var subscriptionIndex = subscriptions.indexOf(subscription); if (subscriptionIndex !== -1) { subscriptions.splice(subscriptionIndex, 1); } } }; Subscription.EMPTY = (function (empty) { empty.closed = true; return empty; }(new Subscription())); return Subscription; }()); exports.Subscription = Subscription; //# sourceMappingURL=Subscription.js.map /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // typeof any so that it we don't have to cast when comparing a result to the error object exports.errorObject = { e: {} }; //# sourceMappingURL=errorObject.js.map /***/ }), /* 21 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = getDOM; /* unused harmony export setDOM */ /* harmony export (immutable) */ __webpack_exports__["c"] = setRootDomAdapter; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DomAdapter; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var _DOM = null; function getDOM() { return _DOM; } function setDOM(adapter) { _DOM = adapter; } function setRootDomAdapter(adapter) { if (!_DOM) { _DOM = adapter; } } /* tslint:disable:requireParameterType */ /** * Provides DOM operations in an environment-agnostic way. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ var DomAdapter = (function () { function DomAdapter() { this.resourceLoaderType = null; } Object.defineProperty(DomAdapter.prototype, "attrToPropMap", { /** * Maps attribute names to their corresponding property names for cases * where attribute name doesn't match property name. */ get: function () { return this._attrToPropMap; }, set: function (value) { this._attrToPropMap = value; }, enumerable: true, configurable: true }); ; ; return DomAdapter; }()); //# sourceMappingURL=dom_adapter.js.map /***/ }), /* 22 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dom__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__(3); /* unused harmony export DomDebouncer */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DomController; }); var DomDebouncer = (function () { function DomDebouncer(dom) { this.dom = dom; this.writeTask = null; this.readTask = null; } DomDebouncer.prototype.read = function (fn) { var _this = this; if (this.readTask) { return; } return this.readTask = this.dom.read(function (t) { _this.readTask = null; fn(t); }); }; DomDebouncer.prototype.write = function (fn, ctx) { var _this = this; if (this.writeTask) { return; } return this.writeTask = this.dom.write(function (t) { _this.writeTask = null; fn(t); }); }; DomDebouncer.prototype.cancel = function () { var writeTask = this.writeTask; writeTask && this.dom.cancelW(writeTask); this.writeTask = null; var readTask = this.readTask; readTask && this.dom.cancelR(readTask); this.readTask = null; }; return DomDebouncer; }()); var DomController = (function () { function DomController() { this.r = []; this.w = []; } DomController.prototype.debouncer = function () { return new DomDebouncer(this); }; DomController.prototype.read = function (fn, ctx) { var task = !ctx ? fn : fn.bind(ctx); this.r.push(task); this.queue(); return task; }; DomController.prototype.write = function (fn, ctx) { var task = !ctx ? fn : fn.bind(ctx); this.w.push(task); this.queue(); return task; }; DomController.prototype.cancel = function (task) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__["d" /* removeArrayItem */])(this.r, task) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__["d" /* removeArrayItem */])(this.w, task); }; DomController.prototype.cancelW = function (task) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__["d" /* removeArrayItem */])(this.w, task); }; DomController.prototype.cancelR = function (task) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__["d" /* removeArrayItem */])(this.r, task); }; DomController.prototype.queue = function () { var self = this; if (!self.q) { self.q = true; __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__dom__["g" /* nativeRaf */])(function rafCallback(timeStamp) { self.flush(timeStamp); }); } }; DomController.prototype.flush = function (timeStamp) { var err; try { dispatch(timeStamp, this.r, this.w); } catch (e) { err = e; } this.q = false; if (this.r.length || this.w.length) { this.queue(); } if (err) { throw err; } }; return DomController; }()); function dispatch(timeStamp, r, w) { var task; // ******** DOM READS **************** while (task = r.shift()) { task(timeStamp); } // ******** DOM WRITES **************** while (task = w.shift()) { task(timeStamp); } } //# sourceMappingURL=dom-controller.js.map /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var errorObject_1 = __webpack_require__(20); var tryCatchTarget; function tryCatcher() { try { return tryCatchTarget.apply(this, arguments); } catch (e) { errorObject_1.errorObject.e = e; return errorObject_1.errorObject; } } function tryCatch(fn) { tryCatchTarget = fn; return tryCatcher; } exports.tryCatch = tryCatch; ; //# sourceMappingURL=tryCatch.js.map /***/ }), /* 24 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_dom__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_util__ = __webpack_require__(3); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Animation; }); /** * @private */ var Animation = (function () { function Animation(ele, opts, raf) { this._dur = null; this._es = null; this._rvEs = null; this.hasChildren = false; this.isPlaying = false; this.hasCompleted = false; this.element(ele); this.opts = opts; this._raf = raf || __WEBPACK_IMPORTED_MODULE_0__util_dom__["g" /* nativeRaf */]; } Animation.prototype.element = function (ele) { if (ele) { if (typeof ele === 'string') { ele = document.querySelectorAll(ele); for (var i = 0; i < ele.length; i++) { this._addEle(ele[i]); } } else if (ele.length) { for (var i = 0; i < ele.length; i++) { this._addEle(ele[i]); } } else { this._addEle(ele); } } return this; }; /** * NO DOM */ Animation.prototype._addEle = function (ele) { if (ele.nativeElement) { ele = ele.nativeElement; } if (ele.nodeType === 1) { this._eL = (this._e = this._e || []).push(ele); } }; /** * Add a child animation to this animation. */ Animation.prototype.add = function (childAnimation) { childAnimation.parent = this; this.hasChildren = true; this._cL = (this._c = this._c || []).push(childAnimation); return this; }; /** * Get the duration of this animation. If this animation does * not have a duration, then it'll get the duration from its parent. */ Animation.prototype.getDuration = function (opts) { if (opts && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(opts.duration)) { return opts.duration; } else if (this._dur !== null) { return this._dur; } else if (this.parent) { return this.parent.getDuration(); } return 0; }; /** * Set the duration for this animation. */ Animation.prototype.duration = function (milliseconds) { this._dur = milliseconds; return this; }; /** * Get the easing of this animation. If this animation does * not have an easing, then it'll get the easing from its parent. */ Animation.prototype.getEasing = function () { if (this._rv && this._rvEs) { return this._rvEs; } return this._es !== null ? this._es : (this.parent && this.parent.getEasing()) || null; }; /** * Set the easing for this animation. */ Animation.prototype.easing = function (name) { this._es = name; return this; }; /** * Set the easing for this reversed animation. */ Animation.prototype.easingReverse = function (name) { this._rvEs = name; return this; }; /** * Add the "from" value for a specific property. */ Animation.prototype.from = function (prop, val) { this._addProp('from', prop, val); return this; }; /** * Add the "to" value for a specific property. */ Animation.prototype.to = function (prop, val, clearProperyAfterTransition) { var fx = this._addProp('to', prop, val); if (clearProperyAfterTransition) { // if this effect is a transform then clear the transform effect // otherwise just clear the actual property this.afterClearStyles([fx.trans ? __WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transform : prop]); } return this; }; /** * Shortcut to add both the "from" and "to" for the same property. */ Animation.prototype.fromTo = function (prop, fromVal, toVal, clearProperyAfterTransition) { return this.from(prop, fromVal).to(prop, toVal, clearProperyAfterTransition); }; /** * @private * NO DOM */ Animation.prototype._getProp = function (name) { if (this._fx) { return this._fx.find(function (prop) { return prop.name === name; }); } else { this._fx = []; } return null; }; Animation.prototype._addProp = function (state, prop, val) { var fxProp = this._getProp(prop); if (!fxProp) { // first time we've see this EffectProperty var shouldTrans = (TRANSFORMS[prop] === 1); fxProp = { name: prop, trans: shouldTrans, // add the will-change property for transforms or opacity wc: (shouldTrans ? __WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transform : prop) }; this._fx.push(fxProp); } // add from/to EffectState to the EffectProperty var fxState = { val: val, num: null, unit: '', }; fxProp[state] = fxState; if (typeof val === 'string' && val.indexOf(' ') < 0) { var r = val.match(CSS_VALUE_REGEX); var num = parseFloat(r[1]); if (!isNaN(num)) { fxState.num = num; } fxState.unit = (r[0] !== r[2] ? r[2] : ''); } else if (typeof val === 'number') { fxState.num = val; } return fxProp; }; /** * Add CSS class to this animation's elements * before the animation begins. */ Animation.prototype.beforeAddClass = function (className) { (this._bfAdd = this._bfAdd || []).push(className); return this; }; /** * Remove CSS class from this animation's elements * before the animation begins. */ Animation.prototype.beforeRemoveClass = function (className) { (this._bfRm = this._bfRm || []).push(className); return this; }; /** * Set CSS inline styles to this animation's elements * before the animation begins. */ Animation.prototype.beforeStyles = function (styles) { this._bfSty = styles; return this; }; /** * Clear CSS inline styles from this animation's elements * before the animation begins. */ Animation.prototype.beforeClearStyles = function (propertyNames) { this._bfSty = this._bfSty || {}; for (var i = 0; i < propertyNames.length; i++) { this._bfSty[propertyNames[i]] = ''; } return this; }; /** * Add a function which contains DOM reads, which will run * before the animation begins. */ Animation.prototype.beforeAddRead = function (domReadFn) { (this._rdFn = this._rdFn || []).push(domReadFn); return this; }; /** * Add a function which contains DOM writes, which will run * before the animation begins. */ Animation.prototype.beforeAddWrite = function (domWriteFn) { (this._wrFn = this._wrFn || []).push(domWriteFn); return this; }; /** * Add CSS class to this animation's elements * after the animation finishes. */ Animation.prototype.afterAddClass = function (className) { (this._afAdd = this._afAdd || []).push(className); return this; }; /** * Remove CSS class from this animation's elements * after the animation finishes. */ Animation.prototype.afterRemoveClass = function (className) { (this._afRm = this._afRm || []).push(className); return this; }; /** * Set CSS inline styles to this animation's elements * after the animation finishes. */ Animation.prototype.afterStyles = function (styles) { this._afSty = styles; return this; }; /** * Clear CSS inline styles from this animation's elements * after the animation finishes. */ Animation.prototype.afterClearStyles = function (propertyNames) { this._afSty = this._afSty || {}; for (var i = 0; i < propertyNames.length; i++) { this._afSty[propertyNames[i]] = ''; } return this; }; /** * Play the animation. */ Animation.prototype.play = function (opts) { var _this = this; // If the animation was already invalidated (it did finish), do nothing if (!this._raf) { return; } // this is the top level animation and is in full control // of when the async play() should actually kick off // if there is no duration then it'll set the TO property immediately // if there is a duration, then it'll stage all animations at the // FROM property and transition duration, wait a few frames, then // kick off the animation by setting the TO property for each animation this._isAsync = this._hasDuration(opts); // ensure all past transition end events have been cleared this._clearAsync(); // recursively kicks off the correct progress step for each child animation // ******** DOM WRITE **************** this._playInit(opts); // doubling up RAFs since this animation was probably triggered // from an input event, and just having one RAF would have this code // run within the same frame as the triggering input event, and the // input event probably already did way too much work for one frame this._raf(function () { (void 0) /* assert */; _this._raf(_this._playDomInspect.bind(_this, opts)); }); }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._playInit = function (opts) { // always default that an animation does not tween // a tween requires that an Animation class has an element // and that it has at least one FROM/TO effect // and that the FROM/TO effect can tween numeric values this._twn = false; this.isPlaying = true; this.hasCompleted = false; this._hasDur = (this.getDuration(opts) > ANIMATION_DURATION_MIN); var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._playInit(opts); } if (this._hasDur) { // if there is a duration then we want to start at step 0 // ******** DOM WRITE **************** this._progress(0); // add the will-change properties // ******** DOM WRITE **************** this._willChg(true); } }; /** * @private * DOM WRITE * NO RECURSION * ROOT ANIMATION */ Animation.prototype._playDomInspect = function (opts) { (void 0) /* assert */; // fire off all the "before" function that have DOM READS in them // elements will be in the DOM, however visibily hidden // so we can read their dimensions if need be // ******** DOM READ **************** // ******** DOM WRITE **************** this._beforeAnimation(); // for the root animation only // set the async TRANSITION END event // and run onFinishes when the transition ends var dur = this.getDuration(opts); if (this._isAsync) { this._asyncEnd(dur, true); } // ******** DOM WRITE **************** this._playProgress(opts); if (this._isAsync && this._raf) { // this animation has a duration so we need another RAF // for the CSS TRANSITION properties to kick in this._raf(this._playToStep.bind(this, 1)); } }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._playProgress = function (opts) { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._playProgress(opts); } if (this._hasDur) { // set the CSS TRANSITION duration/easing // ******** DOM WRITE **************** this._setTrans(this.getDuration(opts), false); } else { // this animation does not have a duration, so it should not animate // just go straight to the TO properties and call it done // ******** DOM WRITE **************** this._progress(1); // since there was no animation, immediately run the after // ******** DOM WRITE **************** this._setAfterStyles(); // this animation has no duration, so it has finished // other animations could still be running this._didFinish(true); } }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._playToStep = function (stepValue) { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._playToStep(stepValue); } if (this._hasDur) { // browser had some time to render everything in place // and the transition duration/easing is set // now set the TO properties which will trigger the transition to begin // ******** DOM WRITE **************** this._progress(stepValue); } }; /** * @private * DOM WRITE * NO RECURSION * ROOT ANIMATION */ Animation.prototype._asyncEnd = function (dur, shouldComplete) { (void 0) /* assert */; (void 0) /* assert */; (void 0) /* assert */; var self = this; function onTransitionEnd(ev) { // congrats! a successful transition completed! // ensure transition end events and timeouts have been cleared self._clearAsync(); // ******** DOM WRITE **************** self._playEnd(); // transition finished self._didFinishAll(shouldComplete, true, false); } function onTransitionFallback() { (void 0) /* console.debug */; // oh noz! the transition end event didn't fire in time! // instead the fallback timer when first // if all goes well this fallback should never fire // clear the other async end events from firing self._tm = undefined; self._clearAsync(); // set the after styles // ******** DOM WRITE **************** self._playEnd(shouldComplete ? 1 : 0); // transition finished self._didFinishAll(shouldComplete, true, false); } // set the TRANSITION END event on one of the transition elements self._unrgTrns = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_dom__["i" /* transitionEnd */])(self._transEl(), onTransitionEnd); // set a fallback timeout if the transition end event never fires, or is too slow // transition end fallback: (animation duration + XXms) self._tm = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_dom__["j" /* nativeTimeout */])(onTransitionFallback, (dur + TRANSITION_END_FALLBACK_PADDING_MS)); }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._playEnd = function (stepValue) { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._playEnd(stepValue); } if (this._hasDur) { if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_util__["j" /* isDefined */])(stepValue)) { // too late to have a smooth animation, just finish it // ******** DOM WRITE **************** this._setTrans(0, true); // ensure the ending progress step gets rendered // ******** DOM WRITE **************** this._progress(stepValue); } // set the after styles // ******** DOM WRITE **************** this._setAfterStyles(); // remove the will-change properties // ******** DOM WRITE **************** this._willChg(false); } }; /** * @private * NO DOM * RECURSION */ Animation.prototype._hasDuration = function (opts) { if (this.getDuration(opts) > ANIMATION_DURATION_MIN) { return true; } var children = this._c; for (var i = 0; i < this._cL; i++) { if (children[i]._hasDuration(opts)) { return true; } } return false; }; /** * @private * NO DOM * RECURSION */ Animation.prototype._hasDomReads = function () { if (this._rdFn && this._rdFn.length) { return true; } var children = this._c; for (var i = 0; i < this._cL; i++) { if (children[i]._hasDomReads()) { return true; } } return false; }; /** * Immediately stop at the end of the animation. */ Animation.prototype.stop = function (stepValue) { if (stepValue === void 0) { stepValue = 1; } // ensure all past transition end events have been cleared this._clearAsync(); this._hasDur = true; this._playEnd(stepValue); }; /** * @private * NO DOM * NO RECURSION */ Animation.prototype._clearAsync = function () { this._unrgTrns && this._unrgTrns(); this._tm && clearTimeout(this._tm); this._tm = this._unrgTrns = undefined; }; /** * @private * DOM WRITE * NO RECURSION */ Animation.prototype._progress = function (stepValue) { // bread 'n butter var val; var effects = this._fx; var nuElements = this._eL; if (!effects || !nuElements) { return; } // flip the number if we're going in reverse if (this._rv) { stepValue = ((stepValue * -1) + 1); } var i, j; var finalTransform = ''; var elements = this._e; for (i = 0; i < effects.length; i++) { var fx = effects[i]; if (fx.from && fx.to) { var fromNum = fx.from.num; var toNum = fx.to.num; var tweenEffect = (fromNum !== toNum); (void 0) /* assert */; if (tweenEffect) { this._twn = true; } if (stepValue === 0) { // FROM val = fx.from.val; } else if (stepValue === 1) { // TO val = fx.to.val; } else if (tweenEffect) { // EVERYTHING IN BETWEEN var valNum = (((toNum - fromNum) * stepValue) + fromNum); var unit = fx.to.unit; if (unit === 'px') { valNum = Math.round(valNum); } val = valNum + unit; } if (val !== null) { var prop = fx.name; if (fx.trans) { finalTransform += prop + '(' + val + ') '; } else { for (j = 0; j < nuElements; j++) { // ******** DOM WRITE **************** elements[j].style[prop] = val; } } } } } // place all transforms on the same property if (finalTransform.length) { if (!this._rv && stepValue !== 1 || this._rv && stepValue !== 0) { finalTransform += 'translateZ(0px)'; } var cssTransform = __WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transform; for (i = 0; i < elements.length; i++) { // ******** DOM WRITE **************** elements[i].style[cssTransform] = finalTransform; } } }; /** * @private * DOM WRITE * NO RECURSION */ Animation.prototype._setTrans = function (dur, forcedLinearEasing) { // Transition is not enabled if there are not effects if (!this._fx) { return; } // set the TRANSITION properties inline on the element var elements = this._e; var easing = (forcedLinearEasing ? 'linear' : this.getEasing()); var durString = dur + 'ms'; var cssTransform = __WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transition; var cssTransitionDuration = __WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transitionDuration; var cssTransitionTimingFn = __WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transitionTimingFn; var eleStyle; for (var i = 0; i < this._eL; i++) { eleStyle = elements[i].style; if (dur > 0) { // ******** DOM WRITE **************** eleStyle[cssTransform] = ''; eleStyle[cssTransitionDuration] = durString; // each animation can have a different easing if (easing) { // ******** DOM WRITE **************** eleStyle[cssTransitionTimingFn] = easing; } } else { eleStyle[cssTransform] = 'none'; } } }; /** * @private * DOM READ * DOM WRITE * RECURSION */ Animation.prototype._beforeAnimation = function () { // fire off all the "before" function that have DOM READS in them // elements will be in the DOM, however visibily hidden // so we can read their dimensions if need be // ******** DOM READ **************** this._fireBeforeReadFunc(); // ******** DOM READS ABOVE / DOM WRITES BELOW **************** // fire off all the "before" function that have DOM WRITES in them // ******** DOM WRITE **************** this._fireBeforeWriteFunc(); // stage all of the before css classes and inline styles // ******** DOM WRITE **************** this._setBeforeStyles(); }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._setBeforeStyles = function () { var i, j; var children = this._c; for (i = 0; i < this._cL; i++) { children[i]._setBeforeStyles(); } // before the animations have started // only set before styles if animation is not reversed if (this._rv) { return; } var addClasses = this._bfAdd; var removeClasses = this._bfRm; var ele; var eleClassList; var prop; for (i = 0; i < this._eL; i++) { ele = this._e[i]; eleClassList = ele.classList; // css classes to add before the animation if (addClasses) { for (j = 0; j < addClasses.length; j++) { // ******** DOM WRITE **************** eleClassList.add(addClasses[j]); } } // css classes to remove before the animation if (removeClasses) { for (j = 0; j < removeClasses.length; j++) { // ******** DOM WRITE **************** eleClassList.remove(removeClasses[j]); } } // inline styles to add before the animation if (this._bfSty) { for (prop in this._bfSty) { // ******** DOM WRITE **************** ele.style[prop] = this._bfSty[prop]; } } } }; /** * @private * DOM READ * RECURSION */ Animation.prototype._fireBeforeReadFunc = function () { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM READ **************** children[i]._fireBeforeReadFunc(); } var readFunctions = this._rdFn; if (readFunctions) { for (var i = 0; i < readFunctions.length; i++) { // ******** DOM READ **************** readFunctions[i](); } } }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._fireBeforeWriteFunc = function () { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._fireBeforeWriteFunc(); } var writeFunctions = this._wrFn; if (this._wrFn) { for (var i = 0; i < writeFunctions.length; i++) { // ******** DOM WRITE **************** writeFunctions[i](); } } }; /** * @private * DOM WRITE */ Animation.prototype._setAfterStyles = function () { var i, j; var ele; var eleClassList; var elements = this._e; for (i = 0; i < this._eL; i++) { ele = elements[i]; eleClassList = ele.classList; // remove the transition duration/easing // ******** DOM WRITE **************** ele.style[__WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transitionDuration] = ele.style[__WEBPACK_IMPORTED_MODULE_0__util_dom__["h" /* CSS */].transitionTimingFn] = ''; if (this._rv) { // finished in reverse direction // css classes that were added before the animation should be removed if (this._bfAdd) { for (j = 0; j < this._bfAdd.length; j++) { // ******** DOM WRITE **************** eleClassList.remove(this._bfAdd[j]); } } // css classes that were removed before the animation should be added if (this._bfRm) { for (j = 0; j < this._bfRm.length; j++) { // ******** DOM WRITE **************** eleClassList.add(this._bfRm[j]); } } // inline styles that were added before the animation should be removed if (this._bfSty) { for (var prop in this._bfSty) { // ******** DOM WRITE **************** ele.style[prop] = ''; } } } else { // finished in forward direction // css classes to add after the animation if (this._afAdd) { for (j = 0; j < this._afAdd.length; j++) { // ******** DOM WRITE **************** eleClassList.add(this._afAdd[j]); } } // css classes to remove after the animation if (this._afRm) { for (j = 0; j < this._afRm.length; j++) { // ******** DOM WRITE **************** eleClassList.remove(this._afRm[j]); } } // inline styles to add after the animation if (this._afSty) { for (var prop in this._afSty) { // ******** DOM WRITE **************** ele.style[prop] = this._afSty[prop]; } } } } }; /** * @private * DOM WRITE * NO RECURSION */ Animation.prototype._willChg = function (addWillChange) { var wc; var effects = this._fx; var willChange; if (addWillChange && effects) { wc = []; for (var i = 0; i < effects.length; i++) { var propWC = effects[i].wc; if (propWC === 'webkitTransform') { wc.push('transform', '-webkit-transform'); } else { wc.push(propWC); } } willChange = wc.join(','); } else { willChange = ''; } for (var i = 0; i < this._eL; i++) { // ******** DOM WRITE **************** this._e[i].style.willChange = willChange; } }; /** * Start the animation with a user controlled progress. */ Animation.prototype.progressStart = function () { // ensure all past transition end events have been cleared this._clearAsync(); // ******** DOM READ/WRITE **************** this._beforeAnimation(); // ******** DOM WRITE **************** this._progressStart(); }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._progressStart = function () { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._progressStart(); } // force no duration, linear easing // ******** DOM WRITE **************** this._setTrans(0, true); // ******** DOM WRITE **************** this._willChg(true); }; /** * Set the progress step for this animation. * progressStep() is not debounced, so it should not be called faster than 60FPS. */ Animation.prototype.progressStep = function (stepValue) { // only update if the last update was more than 16ms ago stepValue = Math.min(1, Math.max(0, stepValue)); var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i].progressStep(stepValue); } if (this._rv) { // if the animation is going in reverse then // flip the step value: 0 becomes 1, 1 becomes 0 stepValue = ((stepValue * -1) + 1); } // ******** DOM WRITE **************** this._progress(stepValue); }; /** * End the progress animation. */ Animation.prototype.progressEnd = function (shouldComplete, currentStepValue, dur) { if (dur === void 0) { dur = -1; } (void 0) /* console.debug */; if (this._rv) { // if the animation is going in reverse then // flip the step value: 0 becomes 1, 1 becomes 0 currentStepValue = ((currentStepValue * -1) + 1); } var stepValue = shouldComplete ? 1 : 0; var diff = Math.abs(currentStepValue - stepValue); if (diff < 0.05) { dur = 0; } else if (dur < 0) { dur = this._dur; } this._isAsync = (dur > 30); this._progressEnd(shouldComplete, stepValue, dur, this._isAsync); if (this._isAsync) { // for the root animation only // set the async TRANSITION END event // and run onFinishes when the transition ends // ******** DOM WRITE **************** this._asyncEnd(dur, shouldComplete); // this animation has a duration so we need another RAF // for the CSS TRANSITION properties to kick in this._raf && this._raf(this._playToStep.bind(this, stepValue)); } }; /** * @private * DOM WRITE * RECURSION */ Animation.prototype._progressEnd = function (shouldComplete, stepValue, dur, isAsync) { var children = this._c; for (var i = 0; i < this._cL; i++) { // ******** DOM WRITE **************** children[i]._progressEnd(shouldComplete, stepValue, dur, isAsync); } if (!isAsync) { // stop immediately // set all the animations to their final position // ******** DOM WRITE **************** this._progress(stepValue); this._willChg(false); this._setAfterStyles(); this._didFinish(shouldComplete); } else { // animate it back to it's ending position this.isPlaying = true; this.hasCompleted = false; this._hasDur = true; // ******** DOM WRITE **************** this._willChg(true); this._setTrans(dur, false); } }; /** * Add a callback to fire when the animation has finished. */ Animation.prototype.onFinish = function (callback, onceTimeCallback, clearOnFinishCallacks) { if (onceTimeCallback === void 0) { onceTimeCallback = false; } if (clearOnFinishCallacks === void 0) { clearOnFinishCallacks = false; } if (clearOnFinishCallacks) { this._fFn = this._fOneFn = undefined; } if (onceTimeCallback) { this._fOneFn = this._fOneFn || []; this._fOneFn.push(callback); } else { this._fFn = this._fFn || []; this._fFn.push(callback); } return this; }; /** * @private * NO DOM * RECURSION */ Animation.prototype._didFinishAll = function (hasCompleted, finishAsyncAnimations, finishNoDurationAnimations) { var children = this._c; for (var i = 0; i < this._cL; i++) { children[i]._didFinishAll(hasCompleted, finishAsyncAnimations, finishNoDurationAnimations); } if (finishAsyncAnimations && this._isAsync || finishNoDurationAnimations && !this._isAsync) { this._didFinish(hasCompleted); } }; /** * @private * NO RECURSION */ Animation.prototype._didFinish = function (hasCompleted) { this.isPlaying = false; this.hasCompleted = hasCompleted; if (this._fFn) { // run all finish callbacks for (var i = 0; i < this._fFn.length; i++) { this._fFn[i](this); } } if (this._fOneFn) { // run all "onetime" finish callbacks for (var i = 0; i < this._fOneFn.length; i++) { this._fOneFn[i](this); } this._fOneFn.length = 0; } }; /** * Reverse the animation. */ Animation.prototype.reverse = function (shouldReverse) { if (shouldReverse === void 0) { shouldReverse = true; } var children = this._c; for (var i = 0; i < this._cL; i++) { children[i].reverse(shouldReverse); } this._rv = shouldReverse; return this; }; /** * Recursively destroy this animation and all child animations. */ Animation.prototype.destroy = function () { var children = this._c; for (var i = 0; i < this._cL; i++) { children[i].destroy(); } this._clearAsync(); this.parent = this._e = this._rdFn = this._wrFn = this._raf = null; if (this._c) { this._c.length = this._cL = 0; } if (this._fFn) { this._fFn.length = 0; } if (this._fOneFn) { this._fOneFn.length = 0; } }; /** * @private * NO DOM */ Animation.prototype._transEl = function () { // get the lowest level element that has an Animation var targetEl; for (var i = 0; i < this._cL; i++) { targetEl = this._c[i]._transEl(); if (targetEl) { return targetEl; } } return (this._twn && this._hasDur && this._eL ? this._e[0] : null); }; return Animation; }()); var TRANSFORMS = { 'translateX': 1, 'translateY': 1, 'translateZ': 1, 'scale': 1, 'scaleX': 1, 'scaleY': 1, 'scaleZ': 1, 'rotate': 1, 'rotateX': 1, 'rotateY': 1, 'rotateZ': 1, 'skewX': 1, 'skewY': 1, 'perspective': 1 }; var CSS_VALUE_REGEX = /(^-?\d*\.?\d*)(.*)/; var ANIMATION_DURATION_MIN = 32; var TRANSITION_END_FALLBACK_PADDING_MS = 400; //# sourceMappingURL=animation.js.map /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) { var objectTypes = { 'boolean': false, 'function': true, 'object': true, 'number': false, 'string': false, 'undefined': false }; exports.root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window); var freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { exports.root = freeGlobal; } //# sourceMappingURL=root.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(57))) /***/ }), /* 26 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__facade_collection__ = __webpack_require__(70); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__facade_lang__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__selector__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util__ = __webpack_require__(49); /* unused harmony export CompileMetadataWithIdentifier */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return CompileAnimationEntryMetadata; }); /* unused harmony export CompileAnimationStateMetadata */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CompileAnimationStateDeclarationMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return CompileAnimationStateTransitionMetadata; }); /* unused harmony export CompileAnimationMetadata */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return CompileAnimationKeyframesSequenceMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return CompileAnimationStyleMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return CompileAnimationAnimateMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CompileAnimationWithStepsMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CompileAnimationSequenceMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CompileAnimationGroupMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return CompileIdentifierMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return CompileDiDependencyMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return CompileProviderMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return CompileFactoryMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return CompileTokenMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return CompileTypeMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return CompileQueryMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return CompileStylesheetMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return CompileTemplateMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return CompileDirectiveMetadata; }); /* harmony export (immutable) */ __webpack_exports__["y"] = createHostComponentMeta; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return CompilePipeMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return CompileNgModuleMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return TransitiveCompileNgModuleMetadata; }); /* unused harmony export removeIdentifierDuplicates */ /* harmony export (immutable) */ __webpack_exports__["x"] = isStaticSymbol; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return ProviderMeta; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; function unimplemented() { throw new Error('unimplemented'); } // group 0: "[prop] or (event) or @trigger" // group 1: "prop" from "[prop]" // group 2: "event" from "(event)" // group 3: "@trigger" from "@trigger" var HOST_REG_EXP = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/; var CompileMetadataWithIdentifier = (function () { function CompileMetadataWithIdentifier() { } Object.defineProperty(CompileMetadataWithIdentifier.prototype, "identifier", { get: function () { return unimplemented(); }, enumerable: true, configurable: true }); return CompileMetadataWithIdentifier; }()); var CompileAnimationEntryMetadata = (function () { function CompileAnimationEntryMetadata(name, definitions) { if (name === void 0) { name = null; } if (definitions === void 0) { definitions = null; } this.name = name; this.definitions = definitions; } return CompileAnimationEntryMetadata; }()); var CompileAnimationStateMetadata = (function () { function CompileAnimationStateMetadata() { } return CompileAnimationStateMetadata; }()); var CompileAnimationStateDeclarationMetadata = (function (_super) { __extends(CompileAnimationStateDeclarationMetadata, _super); function CompileAnimationStateDeclarationMetadata(stateNameExpr, styles) { _super.call(this); this.stateNameExpr = stateNameExpr; this.styles = styles; } return CompileAnimationStateDeclarationMetadata; }(CompileAnimationStateMetadata)); var CompileAnimationStateTransitionMetadata = (function (_super) { __extends(CompileAnimationStateTransitionMetadata, _super); function CompileAnimationStateTransitionMetadata(stateChangeExpr, steps) { _super.call(this); this.stateChangeExpr = stateChangeExpr; this.steps = steps; } return CompileAnimationStateTransitionMetadata; }(CompileAnimationStateMetadata)); var CompileAnimationMetadata = (function () { function CompileAnimationMetadata() { } return CompileAnimationMetadata; }()); var CompileAnimationKeyframesSequenceMetadata = (function (_super) { __extends(CompileAnimationKeyframesSequenceMetadata, _super); function CompileAnimationKeyframesSequenceMetadata(steps) { if (steps === void 0) { steps = []; } _super.call(this); this.steps = steps; } return CompileAnimationKeyframesSequenceMetadata; }(CompileAnimationMetadata)); var CompileAnimationStyleMetadata = (function (_super) { __extends(CompileAnimationStyleMetadata, _super); function CompileAnimationStyleMetadata(offset, styles) { if (styles === void 0) { styles = null; } _super.call(this); this.offset = offset; this.styles = styles; } return CompileAnimationStyleMetadata; }(CompileAnimationMetadata)); var CompileAnimationAnimateMetadata = (function (_super) { __extends(CompileAnimationAnimateMetadata, _super); function CompileAnimationAnimateMetadata(timings, styles) { if (timings === void 0) { timings = 0; } if (styles === void 0) { styles = null; } _super.call(this); this.timings = timings; this.styles = styles; } return CompileAnimationAnimateMetadata; }(CompileAnimationMetadata)); var CompileAnimationWithStepsMetadata = (function (_super) { __extends(CompileAnimationWithStepsMetadata, _super); function CompileAnimationWithStepsMetadata(steps) { if (steps === void 0) { steps = null; } _super.call(this); this.steps = steps; } return CompileAnimationWithStepsMetadata; }(CompileAnimationMetadata)); var CompileAnimationSequenceMetadata = (function (_super) { __extends(CompileAnimationSequenceMetadata, _super); function CompileAnimationSequenceMetadata(steps) { if (steps === void 0) { steps = null; } _super.call(this, steps); } return CompileAnimationSequenceMetadata; }(CompileAnimationWithStepsMetadata)); var CompileAnimationGroupMetadata = (function (_super) { __extends(CompileAnimationGroupMetadata, _super); function CompileAnimationGroupMetadata(steps) { if (steps === void 0) { steps = null; } _super.call(this, steps); } return CompileAnimationGroupMetadata; }(CompileAnimationWithStepsMetadata)); var CompileIdentifierMetadata = (function () { function CompileIdentifierMetadata(_a) { var _b = _a === void 0 ? {} : _a, reference = _b.reference, name = _b.name, moduleUrl = _b.moduleUrl, prefix = _b.prefix, value = _b.value; this.reference = reference; this.name = name; this.prefix = prefix; this.moduleUrl = moduleUrl; this.value = value; } Object.defineProperty(CompileIdentifierMetadata.prototype, "identifier", { get: function () { return this; }, enumerable: true, configurable: true }); return CompileIdentifierMetadata; }()); var CompileDiDependencyMetadata = (function () { function CompileDiDependencyMetadata(_a) { var _b = _a === void 0 ? {} : _a, isAttribute = _b.isAttribute, isSelf = _b.isSelf, isHost = _b.isHost, isSkipSelf = _b.isSkipSelf, isOptional = _b.isOptional, isValue = _b.isValue, token = _b.token, value = _b.value; this.isAttribute = !!isAttribute; this.isSelf = !!isSelf; this.isHost = !!isHost; this.isSkipSelf = !!isSkipSelf; this.isOptional = !!isOptional; this.isValue = !!isValue; this.token = token; this.value = value; } return CompileDiDependencyMetadata; }()); var CompileProviderMetadata = (function () { function CompileProviderMetadata(_a) { var token = _a.token, useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi; this.token = token; this.useClass = useClass; this.useValue = useValue; this.useExisting = useExisting; this.useFactory = useFactory; this.deps = deps || null; this.multi = !!multi; } return CompileProviderMetadata; }()); var CompileFactoryMetadata = (function (_super) { __extends(CompileFactoryMetadata, _super); function CompileFactoryMetadata(_a) { var reference = _a.reference, name = _a.name, moduleUrl = _a.moduleUrl, prefix = _a.prefix, diDeps = _a.diDeps, value = _a.value; _super.call(this, { reference: reference, name: name, prefix: prefix, moduleUrl: moduleUrl, value: value }); this.diDeps = _normalizeArray(diDeps); } return CompileFactoryMetadata; }(CompileIdentifierMetadata)); var CompileTokenMetadata = (function () { function CompileTokenMetadata(_a) { var value = _a.value, identifier = _a.identifier, identifierIsInstance = _a.identifierIsInstance; this.value = value; this.identifier = identifier; this.identifierIsInstance = !!identifierIsInstance; } Object.defineProperty(CompileTokenMetadata.prototype, "reference", { get: function () { if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(this.identifier)) { return this.identifier.reference; } else { return this.value; } }, enumerable: true, configurable: true }); Object.defineProperty(CompileTokenMetadata.prototype, "name", { get: function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(this.value) ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util__["a" /* sanitizeIdentifier */])(this.value) : this.identifier.name; }, enumerable: true, configurable: true }); return CompileTokenMetadata; }()); /** * Metadata regarding compilation of a type. */ var CompileTypeMetadata = (function (_super) { __extends(CompileTypeMetadata, _super); function CompileTypeMetadata(_a) { var _b = _a === void 0 ? {} : _a, reference = _b.reference, name = _b.name, moduleUrl = _b.moduleUrl, prefix = _b.prefix, isHost = _b.isHost, value = _b.value, diDeps = _b.diDeps, lifecycleHooks = _b.lifecycleHooks; _super.call(this, { reference: reference, name: name, moduleUrl: moduleUrl, prefix: prefix, value: value }); this.isHost = !!isHost; this.diDeps = _normalizeArray(diDeps); this.lifecycleHooks = _normalizeArray(lifecycleHooks); } return CompileTypeMetadata; }(CompileIdentifierMetadata)); var CompileQueryMetadata = (function () { function CompileQueryMetadata(_a) { var _b = _a === void 0 ? {} : _a, selectors = _b.selectors, descendants = _b.descendants, first = _b.first, propertyName = _b.propertyName, read = _b.read; this.selectors = selectors; this.descendants = !!descendants; this.first = !!first; this.propertyName = propertyName; this.read = read; } return CompileQueryMetadata; }()); /** * Metadata about a stylesheet */ var CompileStylesheetMetadata = (function () { function CompileStylesheetMetadata(_a) { var _b = _a === void 0 ? {} : _a, moduleUrl = _b.moduleUrl, styles = _b.styles, styleUrls = _b.styleUrls; this.moduleUrl = moduleUrl; this.styles = _normalizeArray(styles); this.styleUrls = _normalizeArray(styleUrls); } return CompileStylesheetMetadata; }()); /** * Metadata regarding compilation of a template. */ var CompileTemplateMetadata = (function () { function CompileTemplateMetadata(_a) { var _b = _a === void 0 ? {} : _a, encapsulation = _b.encapsulation, template = _b.template, templateUrl = _b.templateUrl, styles = _b.styles, styleUrls = _b.styleUrls, externalStylesheets = _b.externalStylesheets, animations = _b.animations, ngContentSelectors = _b.ngContentSelectors, interpolation = _b.interpolation; this.encapsulation = encapsulation; this.template = template; this.templateUrl = templateUrl; this.styles = _normalizeArray(styles); this.styleUrls = _normalizeArray(styleUrls); this.externalStylesheets = _normalizeArray(externalStylesheets); this.animations = animations ? __WEBPACK_IMPORTED_MODULE_1__facade_collection__["b" /* ListWrapper */].flatten(animations) : []; this.ngContentSelectors = ngContentSelectors || []; if (interpolation && interpolation.length != 2) { throw new Error("'interpolation' should have a start and an end symbol."); } this.interpolation = interpolation; } CompileTemplateMetadata.prototype.toSummary = function () { return { isSummary: true, animations: this.animations.map(function (anim) { return anim.name; }), ngContentSelectors: this.ngContentSelectors, encapsulation: this.encapsulation }; }; return CompileTemplateMetadata; }()); /** * Metadata regarding compilation of a directive. */ var CompileDirectiveMetadata = (function () { function CompileDirectiveMetadata(_a) { var _b = _a === void 0 ? {} : _a, type = _b.type, isComponent = _b.isComponent, selector = _b.selector, exportAs = _b.exportAs, changeDetection = _b.changeDetection, inputs = _b.inputs, outputs = _b.outputs, hostListeners = _b.hostListeners, hostProperties = _b.hostProperties, hostAttributes = _b.hostAttributes, providers = _b.providers, viewProviders = _b.viewProviders, queries = _b.queries, viewQueries = _b.viewQueries, entryComponents = _b.entryComponents, template = _b.template; this.type = type; this.isComponent = isComponent; this.selector = selector; this.exportAs = exportAs; this.changeDetection = changeDetection; this.inputs = inputs; this.outputs = outputs; this.hostListeners = hostListeners; this.hostProperties = hostProperties; this.hostAttributes = hostAttributes; this.providers = _normalizeArray(providers); this.viewProviders = _normalizeArray(viewProviders); this.queries = _normalizeArray(queries); this.viewQueries = _normalizeArray(viewQueries); this.entryComponents = _normalizeArray(entryComponents); this.template = template; } CompileDirectiveMetadata.create = function (_a) { var _b = _a === void 0 ? {} : _a, type = _b.type, isComponent = _b.isComponent, selector = _b.selector, exportAs = _b.exportAs, changeDetection = _b.changeDetection, inputs = _b.inputs, outputs = _b.outputs, host = _b.host, providers = _b.providers, viewProviders = _b.viewProviders, queries = _b.queries, viewQueries = _b.viewQueries, entryComponents = _b.entryComponents, template = _b.template; var hostListeners = {}; var hostProperties = {}; var hostAttributes = {}; if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(host)) { Object.keys(host).forEach(function (key) { var value = host[key]; var matches = key.match(HOST_REG_EXP); if (matches === null) { hostAttributes[key] = value; } else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(matches[1])) { hostProperties[matches[1]] = value; } else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(matches[2])) { hostListeners[matches[2]] = value; } }); } var inputsMap = {}; if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(inputs)) { inputs.forEach(function (bindConfig) { // canonical syntax: `dirProp: elProp` // if there is no `:`, use dirProp = elProp var parts = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util__["b" /* splitAtColon */])(bindConfig, [bindConfig, bindConfig]); inputsMap[parts[0]] = parts[1]; }); } var outputsMap = {}; if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__facade_lang__["a" /* isPresent */])(outputs)) { outputs.forEach(function (bindConfig) { // canonical syntax: `dirProp: elProp` // if there is no `:`, use dirProp = elProp var parts = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util__["b" /* splitAtColon */])(bindConfig, [bindConfig, bindConfig]); outputsMap[parts[0]] = parts[1]; }); } return new CompileDirectiveMetadata({ type: type, isComponent: !!isComponent, selector: selector, exportAs: exportAs, changeDetection: changeDetection, inputs: inputsMap, outputs: outputsMap, hostListeners: hostListeners, hostProperties: hostProperties, hostAttributes: hostAttributes, providers: providers, viewProviders: viewProviders, queries: queries, viewQueries: viewQueries, entryComponents: entryComponents, template: template, }); }; Object.defineProperty(CompileDirectiveMetadata.prototype, "identifier", { get: function () { return this.type; }, enumerable: true, configurable: true }); CompileDirectiveMetadata.prototype.toSummary = function () { return { isSummary: true, type: this.type, isComponent: this.isComponent, selector: this.selector, exportAs: this.exportAs, inputs: this.inputs, outputs: this.outputs, hostListeners: this.hostListeners, hostProperties: this.hostProperties, hostAttributes: this.hostAttributes, providers: this.providers, viewProviders: this.viewProviders, queries: this.queries, entryComponents: this.entryComponents, changeDetection: this.changeDetection, template: this.template && this.template.toSummary() }; }; return CompileDirectiveMetadata; }()); /** * Construct {@link CompileDirectiveMetadata} from {@link ComponentTypeMetadata} and a selector. */ function createHostComponentMeta(compMeta) { var template = __WEBPACK_IMPORTED_MODULE_3__selector__["a" /* CssSelector */].parse(compMeta.selector)[0].getMatchingElementTemplate(); return CompileDirectiveMetadata.create({ type: new CompileTypeMetadata({ reference: Object, name: compMeta.type.name + "_Host", moduleUrl: compMeta.type.moduleUrl, isHost: true }), template: new CompileTemplateMetadata({ encapsulation: __WEBPACK_IMPORTED_MODULE_0__angular_core__["N" /* ViewEncapsulation */].None, template: template, templateUrl: '', styles: [], styleUrls: [], ngContentSelectors: [], animations: [] }), changeDetection: __WEBPACK_IMPORTED_MODULE_0__angular_core__["S" /* ChangeDetectionStrategy */].Default, inputs: [], outputs: [], host: {}, isComponent: true, selector: '*', providers: [], viewProviders: [], queries: [], viewQueries: [] }); } var CompilePipeMetadata = (function () { function CompilePipeMetadata(_a) { var _b = _a === void 0 ? {} : _a, type = _b.type, name = _b.name, pure = _b.pure; this.type = type; this.name = name; this.pure = !!pure; } Object.defineProperty(CompilePipeMetadata.prototype, "identifier", { get: function () { return this.type; }, enumerable: true, configurable: true }); CompilePipeMetadata.prototype.toSummary = function () { return { isSummary: true, type: this.type, name: this.name, pure: this.pure }; }; return CompilePipeMetadata; }()); /** * Metadata regarding compilation of a module. */ var CompileNgModuleMetadata = (function () { function CompileNgModuleMetadata(_a) { var _b = _a === void 0 ? {} : _a, type = _b.type, providers = _b.providers, declaredDirectives = _b.declaredDirectives, exportedDirectives = _b.exportedDirectives, declaredPipes = _b.declaredPipes, exportedPipes = _b.exportedPipes, entryComponents = _b.entryComponents, bootstrapComponents = _b.bootstrapComponents, importedModules = _b.importedModules, exportedModules = _b.exportedModules, schemas = _b.schemas, transitiveModule = _b.transitiveModule, id = _b.id; this.type = type; this.declaredDirectives = _normalizeArray(declaredDirectives); this.exportedDirectives = _normalizeArray(exportedDirectives); this.declaredPipes = _normalizeArray(declaredPipes); this.exportedPipes = _normalizeArray(exportedPipes); this.providers = _normalizeArray(providers); this.entryComponents = _normalizeArray(entryComponents); this.bootstrapComponents = _normalizeArray(bootstrapComponents); this.importedModules = _normalizeArray(importedModules); this.exportedModules = _normalizeArray(exportedModules); this.schemas = _normalizeArray(schemas); this.id = id; this.transitiveModule = transitiveModule; } Object.defineProperty(CompileNgModuleMetadata.prototype, "identifier", { get: function () { return this.type; }, enumerable: true, configurable: true }); CompileNgModuleMetadata.prototype.toSummary = function () { return { isSummary: true, type: this.type, entryComponents: this.entryComponents, providers: this.providers, importedModules: this.importedModules, exportedModules: this.exportedModules, exportedDirectives: this.exportedDirectives, exportedPipes: this.exportedPipes, directiveLoaders: this.transitiveModule.directiveLoaders }; }; CompileNgModuleMetadata.prototype.toInjectorSummary = function () { return { isSummary: true, type: this.type, entryComponents: this.entryComponents, providers: this.providers, importedModules: this.importedModules, exportedModules: this.exportedModules }; }; CompileNgModuleMetadata.prototype.toDirectiveSummary = function () { return { isSummary: true, type: this.type, exportedDirectives: this.exportedDirectives, exportedPipes: this.exportedPipes, exportedModules: this.exportedModules, directiveLoaders: this.transitiveModule.directiveLoaders }; }; return CompileNgModuleMetadata; }()); var TransitiveCompileNgModuleMetadata = (function () { function TransitiveCompileNgModuleMetadata(modules, providers, entryComponents, directives, pipes, directiveLoaders) { var _this = this; this.modules = modules; this.providers = providers; this.entryComponents = entryComponents; this.directives = directives; this.pipes = pipes; this.directiveLoaders = directiveLoaders; this.directivesSet = new Set(); this.pipesSet = new Set(); directives.forEach(function (dir) { return _this.directivesSet.add(dir.reference); }); pipes.forEach(function (pipe) { return _this.pipesSet.add(pipe.reference); }); } return TransitiveCompileNgModuleMetadata; }()); function removeIdentifierDuplicates(items) { var map = new Map(); items.forEach(function (item) { if (!map.get(item.identifier.reference)) { map.set(item.identifier.reference, item); } }); return Array.from(map.values()); } function _normalizeArray(obj) { return obj || []; } function isStaticSymbol(value) { return typeof value === 'object' && value !== null && value['name'] && value['filePath']; } var ProviderMeta = (function () { function ProviderMeta(token, _a) { var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi; this.token = token; this.useClass = useClass; this.useValue = useValue; this.useExisting = useExisting; this.useFactory = useFactory; this.dependencies = deps; this.multi = !!multi; } return ProviderMeta; }()); //# sourceMappingURL=compile_metadata.js.map /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var AsyncAction_1 = __webpack_require__(98); var AsyncScheduler_1 = __webpack_require__(99); exports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); //# sourceMappingURL=async.js.map /***/ }), /* 28 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_dom__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_util__ = __webpack_require__(3); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Platform; }); /* harmony export (immutable) */ __webpack_exports__["f"] = setupPlatform; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return UserAgentToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return NavigatorPlatformToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return DocumentDirToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return DocLangToken; }); /** * @name Platform * @description * The Platform service can be used to get information about your current device. * You can get all of the platforms associated with the device using the [platforms](#platforms) * method, including whether the app is being viewed from a tablet, if it's * on a mobile device or browser, and the exact platform (iOS, Android, etc). * You can also get the orientation of the device, if it uses right-to-left * language direction, and much much more. With this information you can completely * customize your app to fit any device. * * @usage * ```ts * import { Platform } from 'ionic-angular'; * * @Component({...}) * export MyPage { * constructor(platform: Platform) { * this.platform = platform; * } * } * ``` * @demo /docs/v2/demos/src/platform/ */ var Platform = (function () { function Platform() { var _this = this; this._versions = {}; this._onResizes = []; this._bbActions = []; this._pW = 0; this._pH = 0; this._lW = 0; this._lH = 0; this._isPortrait = null; /** @private */ this._platforms = []; // Events meant to be triggered by the engine // ********************************************** /** * @private */ this.backButton = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * The pause event emits when the native platform puts the application * into the background, typically when the user switches to a different * application. This event would emit when a Cordova app is put into * the background, however, it would not fire on a standard web browser. */ this.pause = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); /** * The resume event emits when the native platform pulls the application * out from the background. This event would emit when a Cordova app comes * out from the background, however, it would not fire on a standard web browser. */ this.resume = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["d" /* EventEmitter */](); this._readyPromise = new Promise(function (res) { _this._readyResolve = res; }); this.backButton.subscribe(function () { // the hardware back button event has been fired (void 0) /* console.debug */; // decide which backbutton action should run _this.runBackButtonAction(); }); } /** * @private */ Platform.prototype.setZone = function (zone) { this.zone = zone; }; // Methods // ********************************************** /** * @returns {boolean} returns true/false based on platform. * @description * Depending on the platform the user is on, `is(platformName)` will * return `true` or `false`. Note that the same app can return `true` * for more than one platform name. For example, an app running from * an iPad would return `true` for the platform names: `mobile`, * `ios`, `ipad`, and `tablet`. Additionally, if the app was running * from Cordova then `cordova` would be true, and if it was running * from a web browser on the iPad then `mobileweb` would be `true`. * * ``` * import { Platform } from 'ionic-angular'; * * @Component({...}) * export MyPage { * constructor(platform: Platform) { * this.platform = platform; * * if (this.platform.is('ios')) { * // This will only print when on iOS * console.log("I'm an iOS device!"); * } * } * } * ``` * * | Platform Name | Description | * |-----------------|------------------------------------| * | android | on a device running Android. | * | cordova | on a device running Cordova. | * | core | on a desktop device. | * | ios | on a device running iOS. | * | ipad | on an iPad device. | * | iphone | on an iPhone device. | * | mobile | on a mobile device. | * | mobileweb | in a browser on a mobile device. | * | phablet | on a phablet device. | * | tablet | on a tablet device. | * | windows | on a device running Windows. | * * @param {string} platformName */ Platform.prototype.is = function (platformName) { return (this._platforms.indexOf(platformName) > -1); }; /** * @returns {array} the array of platforms * @description * Depending on what device you are on, `platforms` can return multiple values. * Each possible value is a hierarchy of platforms. For example, on an iPhone, * it would return `mobile`, `ios`, and `iphone`. * * ``` * import { Platform } from 'ionic-angular'; * * @Component({...}) * export MyPage { * constructor(platform: Platform) { * this.platform = platform; * * // This will print an array of the current platforms * console.log(this.platform.platforms()); * } * } * ``` */ Platform.prototype.platforms = function () { // get the array of active platforms, which also knows the hierarchy, // with the last one the most important return this._platforms; }; /** * Returns an object containing version information about all of the platforms. * * ``` * import { Platform } from 'ionic-angular'; * * @Component({...}) * export MyPage { * constructor(platform: Platform) { * this.platform = platform; * * // This will print an object containing * // all of the platforms and their versions * console.log(platform.versions()); * } * } * ``` * * @returns {object} An object containing all of the platforms and their versions. */ Platform.prototype.versions = function () { // get all the platforms that have a valid parsed version return this._versions; }; /** * @private */ Platform.prototype.version = function () { for (var platformName in this._versions) { if (this._versions[platformName]) { return this._versions[platformName]; } } return {}; }; /** * Returns a promise when the platform is ready and native functionality * can be called. If the app is running from within a web browser, then * the promise will resolve when the DOM is ready. When the app is running * from an application engine such as Cordova, then the promise will * resolve when Cordova triggers the `deviceready` event. * * The resolved value is the `readySource`, which states which platform * ready was used. For example, when Cordova is ready, the resolved ready * source is `cordova`. The default ready source value will be `dom`. The * `readySource` is useful if different logic should run depending on the * platform the app is running from. For example, only Cordova can execute * the status bar plugin, so the web should not run status bar plugin logic. * * ``` * import { Component } from '@angular/core'; * import { Platform } from 'ionic-angular'; * * @Component({...}) * export MyApp { * constructor(platform: Platform) { * platform.ready().then((readySource) => { * console.log('Platform ready from', readySource); * // Platform now ready, execute any required native code * }); * } * } * ``` * @returns {promise} */ Platform.prototype.ready = function () { return this._readyPromise; }; /** * @private * This should be triggered by the engine when the platform is * ready. If there was no custom prepareReady method from the engine, * such as Cordova or Electron, then it uses the default DOM ready. */ Platform.prototype.triggerReady = function (readySource) { var _this = this; this.zone.run(function () { _this._readyResolve(readySource); }); }; /** * @private * This is the default prepareReady if it's not replaced by an engine, * such as Cordova or Electron. If there was no custom prepareReady * method from an engine then it uses the method below, which triggers * the platform ready on the DOM ready event, and the default resolved * value is `dom`. */ Platform.prototype.prepareReady = function () { var _this = this; __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_dom__["e" /* ready */])(function () { _this.triggerReady('dom'); }); }; /** * Set the app's language direction, which will update the `dir` attribute * on the app's root `` element. We recommend the app's `index.html` * file already has the correct `dir` attribute value set, such as * `` or ``. This method is useful if the * direction needs to be dynamically changed per user/session. * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir) * @param {string} dir Examples: `rtl`, `ltr` */ Platform.prototype.setDir = function (dir, updateDocument) { this._dir = (dir || '').toLowerCase(); if (updateDocument !== false) { document.documentElement.setAttribute('dir', dir); } }; /** * Returns app's language direction. * We recommend the app's `index.html` file already has the correct `dir` * attribute value set, such as `` or ``. * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir) * @returns {string} */ Platform.prototype.dir = function () { return this._dir; }; /** * Returns if this app is using right-to-left language direction or not. * We recommend the app's `index.html` file already has the correct `dir` * attribute value set, such as `` or ``. * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir) * @returns {boolean} */ Platform.prototype.isRTL = function () { return (this._dir === 'rtl'); }; /** * Set the app's language and optionally the country code, which will update * the `lang` attribute on the app's root `` element. * We recommend the app's `index.html` file already has the correct `lang` * attribute value set, such as ``. This method is useful if * the language needs to be dynamically changed per user/session. * [W3C: Declaring language in HTML](http://www.w3.org/International/questions/qa-html-language-declarations) * @param {string} language Examples: `en-US`, `en-GB`, `ar`, `de`, `zh`, `es-MX` */ Platform.prototype.setLang = function (language, updateDocument) { this._lang = language; if (updateDocument !== false) { document.documentElement.setAttribute('lang', language); } }; /** * Returns app's language and optional country code. * We recommend the app's `index.html` file already has the correct `lang` * attribute value set, such as ``. * [W3C: Declaring language in HTML](http://www.w3.org/International/questions/qa-html-language-declarations) * @returns {string} */ Platform.prototype.lang = function () { return this._lang; }; // Methods meant to be overridden by the engine // ********************************************** // Provided NOOP methods so they do not error when // called by engines (the browser)that do not provide them /** * @private */ Platform.prototype.exitApp = function () { }; /** * The back button event is triggered when the user presses the native * platform's back button, also referred to as the "hardware" back button. * This event is only used within Cordova apps running on Android and * Windows platforms. This event is not fired on iOS since iOS doesn't come * with a hardware back button in the same sense an Android or Windows device * does. * * Registering a hardware back button action and setting a priority allows * apps to control which action should be called when the hardware back * button is pressed. This method decides which of the registered back button * actions has the highest priority and should be called. * * @param {Function} callback Called when the back button is pressed, * if this registered action has the highest priority. * @param {number} priority Set the priority for this action. Only the highest priority will execute. Defaults to `0`. * @returns {Function} A function that, when called, will unregister * the its back button action. */ Platform.prototype.registerBackButtonAction = function (fn, priority) { var _this = this; if (priority === void 0) { priority = 0; } var action = { fn: fn, priority: priority }; this._bbActions.push(action); // return a function to unregister this back button action return function () { __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_util__["d" /* removeArrayItem */])(_this._bbActions, action); }; }; /** * @private */ Platform.prototype.runBackButtonAction = function () { // decide which one back button action should run var winner = null; this._bbActions.forEach(function (action) { if (!winner || action.priority >= winner.priority) { winner = action; } }); // run the winning action if there is one winner && winner.fn && winner.fn(); }; // Getter/Setter Methods // ********************************************** /** * @private */ Platform.prototype.setUserAgent = function (userAgent) { this._ua = userAgent; }; /** * @private */ Platform.prototype.setQueryParams = function (queryParams) { this._qp = queryParams; }; /** * @private */ Platform.prototype.userAgent = function () { return this._ua || ''; }; /** * @private */ Platform.prototype.setNavigatorPlatform = function (navigatorPlatform) { this._bPlt = navigatorPlatform; }; /** * @private */ Platform.prototype.navigatorPlatform = function () { return this._bPlt || ''; }; /** * Gets the width of the platform's viewport using `window.innerWidth`. * Using this method is preferred since the dimension is a cached value, * which reduces the chance of multiple and expensive DOM reads. */ Platform.prototype.width = function () { this._calcDim(); return this._isPortrait ? this._pW : this._lW; }; /** * Gets the height of the platform's viewport using `window.innerHeight`. * Using this method is preferred since the dimension is a cached value, * which reduces the chance of multiple and expensive DOM reads. */ Platform.prototype.height = function () { this._calcDim(); return this._isPortrait ? this._pH : this._lH; }; /** * Returns `true` if the app is in portait mode. */ Platform.prototype.isPortrait = function () { this._calcDim(); return this._isPortrait; }; /** * Returns `true` if the app is in landscape mode. */ Platform.prototype.isLandscape = function () { return !this.isPortrait(); }; /** * @private */ Platform.prototype._calcDim = function () { if (this._isPortrait === null) { var winDimensions = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_dom__["d" /* windowDimensions */])(); var screenWidth = window.screen.width || winDimensions.width; var screenHeight = window.screen.height || winDimensions.height; if (screenWidth < screenHeight) { this._isPortrait = true; if (this._pW < winDimensions.width) { this._pW = winDimensions.width; } if (this._pH < winDimensions.height) { this._pH = winDimensions.height; } } else { this._isPortrait = false; if (this._lW < winDimensions.width) { this._lW = winDimensions.width; } if (this._lH < winDimensions.height) { this._lH = winDimensions.height; } } } }; /** * @private */ Platform.prototype.windowResize = function () { var _this = this; clearTimeout(this._resizeTm); this._resizeTm = setTimeout(function () { __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_dom__["f" /* flushDimensionCache */])(); _this._isPortrait = null; for (var i = 0; i < _this._onResizes.length; i++) { try { _this._onResizes[i](); } catch (e) { console.error(e); } } }, 200); }; /** * @private */ Platform.prototype.onResize = function (cb) { var self = this; self._onResizes.push(cb); return function () { __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_util__["d" /* removeArrayItem */])(self._onResizes, cb); }; }; // Platform Registry // ********************************************** /** * @private */ Platform.prototype.setPlatformConfigs = function (platformConfigs) { this._registry = platformConfigs || {}; }; /** * @private */ Platform.prototype.getPlatformConfig = function (platformName) { return this._registry[platformName] || {}; }; /** * @private */ Platform.prototype.registry = function () { return this._registry; }; /** * @private */ Platform.prototype.setDefault = function (platformName) { this._default = platformName; }; /** * @private */ Platform.prototype.testQuery = function (queryValue, queryTestValue) { var valueSplit = queryValue.toLowerCase().split(';'); return valueSplit.indexOf(queryTestValue) > -1; }; /** * @private */ Platform.prototype.testNavigatorPlatform = function (navigatorPlatformExpression) { var rgx = new RegExp(navigatorPlatformExpression, 'i'); return rgx.test(this._bPlt); }; /** * @private */ Platform.prototype.matchUserAgentVersion = function (userAgentExpression) { if (this._ua && userAgentExpression) { var val = this._ua.match(userAgentExpression); if (val) { return { major: val[1], minor: val[2] }; } } }; Platform.prototype.testUserAgent = function (expression) { if (this._ua) { return this._ua.indexOf(expression) >= 0; } return false; }; /** * @private */ Platform.prototype.isPlatformMatch = function (queryStringName, userAgentAtLeastHas, userAgentMustNotHave) { if (userAgentMustNotHave === void 0) { userAgentMustNotHave = []; } var queryValue = this._qp.get('ionicplatform'); if (queryValue) { return this.testQuery(queryValue, queryStringName); } userAgentAtLeastHas = userAgentAtLeastHas || [queryStringName]; var userAgent = this._ua.toLowerCase(); for (var i = 0; i < userAgentAtLeastHas.length; i++) { if (userAgent.indexOf(userAgentAtLeastHas[i]) > -1) { for (var j = 0; j < userAgentMustNotHave.length; j++) { if (userAgent.indexOf(userAgentMustNotHave[j]) > -1) { return false; } } return true; } } return false; }; /** @private */ Platform.prototype.init = function () { var rootPlatformNode; var enginePlatformNode; // figure out the most specific platform and active engine var tmpPlatform; for (var platformName in this._registry) { tmpPlatform = this.matchPlatform(platformName); if (tmpPlatform) { // we found a platform match! // check if its more specific than the one we already have if (tmpPlatform.isEngine) { // because it matched then this should be the active engine // you cannot have more than one active engine enginePlatformNode = tmpPlatform; } else if (!rootPlatformNode || tmpPlatform.depth > rootPlatformNode.depth) { // only find the root node for platforms that are not engines // set this node as the root since we either don't already // have one, or this one is more specific that the current one rootPlatformNode = tmpPlatform; } } } if (!rootPlatformNode) { rootPlatformNode = new PlatformNode(this._registry, this._default); } // build a Platform instance filled with the // hierarchy of active platforms and settings if (rootPlatformNode) { // check if we found an engine node (cordova/node-webkit/etc) if (enginePlatformNode) { // add the engine to the first in the platform hierarchy // the original rootPlatformNode now becomes a child // of the engineNode, which is not the new root enginePlatformNode.child = rootPlatformNode; rootPlatformNode.parent = enginePlatformNode; rootPlatformNode = enginePlatformNode; } var platformNode = rootPlatformNode; while (platformNode) { insertSuperset(this._registry, platformNode); platformNode = platformNode.child; } // make sure the root noot is actually the root // incase a node was inserted before the root platformNode = rootPlatformNode.parent; while (platformNode) { rootPlatformNode = platformNode; platformNode = platformNode.parent; } platformNode = rootPlatformNode; while (platformNode) { platformNode.initialize(this); // set the array of active platforms with // the last one in the array the most important this._platforms.push(platformNode.name); // get the platforms version if a version parser was provided this._versions[platformNode.name] = platformNode.version(this); // go to the next platform child platformNode = platformNode.child; } } if (this._platforms.indexOf('mobile') > -1 && this._platforms.indexOf('cordova') === -1) { this._platforms.push('mobileweb'); } }; /** * @private */ Platform.prototype.matchPlatform = function (platformName) { // build a PlatformNode and assign config data to it // use it's getRoot method to build up its hierarchy // depending on which platforms match var platformNode = new PlatformNode(this._registry, platformName); var rootNode = platformNode.getRoot(this); if (rootNode) { rootNode.depth = 0; var childPlatform = rootNode.child; while (childPlatform) { rootNode.depth++; childPlatform = childPlatform.child; } } return rootNode; }; return Platform; }()); function insertSuperset(registry, platformNode) { var supersetPlaformName = platformNode.superset(); if (supersetPlaformName) { // add a platform in between two exist platforms // so we can build the correct hierarchy of active platforms var supersetPlatform = new PlatformNode(registry, supersetPlaformName); supersetPlatform.parent = platformNode.parent; supersetPlatform.child = platformNode; if (supersetPlatform.parent) { supersetPlatform.parent.child = supersetPlatform; } platformNode.parent = supersetPlatform; } } /** * @private */ var PlatformNode = (function () { function PlatformNode(registry, platformName) { this.registry = registry; this.c = registry[platformName]; this.name = platformName; this.isEngine = this.c.isEngine; } PlatformNode.prototype.settings = function () { return this.c.settings || {}; }; PlatformNode.prototype.superset = function () { return this.c.superset; }; PlatformNode.prototype.isMatch = function (p) { return this.c.isMatch && this.c.isMatch(p) || false; }; PlatformNode.prototype.initialize = function (platform) { this.c.initialize && this.c.initialize(platform); }; PlatformNode.prototype.version = function (p) { if (this.c.versionParser) { var v = this.c.versionParser(p); if (v) { var str = v.major + '.' + v.minor; return { str: str, num: parseFloat(str), major: parseInt(v.major, 10), minor: parseInt(v.minor, 10) }; } } }; PlatformNode.prototype.getRoot = function (p) { if (this.isMatch(p)) { var parents = this.getSubsetParents(this.name); if (!parents.length) { return this; } var platformNode = null; var rootPlatformNode = null; for (var i = 0; i < parents.length; i++) { platformNode = new PlatformNode(this.registry, parents[i]); platformNode.child = this; rootPlatformNode = platformNode.getRoot(p); if (rootPlatformNode) { this.parent = platformNode; return rootPlatformNode; } } } return null; }; PlatformNode.prototype.getSubsetParents = function (subsetPlatformName) { var parentPlatformNames = []; var platform = null; for (var platformName in this.registry) { platform = this.registry[platformName]; if (platform.subsets && platform.subsets.indexOf(subsetPlatformName) > -1) { parentPlatformNames.push(platformName); } } return parentPlatformNames; }; return PlatformNode; }()); /** * @private */ function setupPlatform(platformConfigs, queryParams, userAgent, navigatorPlatform, docDirection, docLanguage, zone) { var p = new Platform(); p.setDefault('core'); p.setPlatformConfigs(platformConfigs); p.setUserAgent(userAgent); p.setQueryParams(queryParams); p.setNavigatorPlatform(navigatorPlatform); p.setDir(docDirection, false); p.setLang(docLanguage, false); p.setZone(zone); p.init(); return p; } /** * @private */ var UserAgentToken = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["i" /* OpaqueToken */]('USERAGENT'); /** * @private */ var NavigatorPlatformToken = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["i" /* OpaqueToken */]('NAVPLT'); /** * @private */ var DocumentDirToken = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["i" /* OpaqueToken */]('DOCDIR'); /** * @private */ var DocLangToken = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["i" /* OpaqueToken */]('DOCLANG'); //# sourceMappingURL=platform.js.map /***/ }), /* 29 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export scheduleMicroTask */ /* unused harmony export global */ /* harmony export (immutable) */ __webpack_exports__["f"] = getTypeNameForDebugging; /* harmony export (immutable) */ __webpack_exports__["e"] = isPresent; /* harmony export (immutable) */ __webpack_exports__["b"] = isBlank; /* unused harmony export isStrictStringMap */ /* harmony export (immutable) */ __webpack_exports__["c"] = isDate; /* harmony export (immutable) */ __webpack_exports__["a"] = stringify; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return NumberWrapper; }); /* unused harmony export looseIdentical */ /* harmony export (immutable) */ __webpack_exports__["g"] = isJsObject; /* unused harmony export print */ /* unused harmony export warn */ /* unused harmony export setValueOnPath */ /* harmony export (immutable) */ __webpack_exports__["h"] = getSymbolIterator; /* unused harmony export isPrimitive */ /* unused harmony export escapeRegExp */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var globalScope; if (typeof window === 'undefined') { if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492 globalScope = self; } else { globalScope = global; } } else { globalScope = window; } function scheduleMicroTask(fn) { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } // Need to declare a new variable for global here since TypeScript // exports the original value of the symbol. var _global = globalScope; function getTypeNameForDebugging(type) { return type['name'] || typeof type; } // TODO: remove calls to assert in production environment // Note: Can't just export this and import in in other files // as `assert` is a reserved keyword in Dart _global.assert = function assert(condition) { // TODO: to be fixed properly via #2830, noop for now }; function isPresent(obj) { return obj != null; } function isBlank(obj) { return obj == null; } var STRING_MAP_PROTO = Object.getPrototypeOf({}); function isStrictStringMap(obj) { return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO; } function isDate(obj) { return obj instanceof Date && !isNaN(obj.valueOf()); } function stringify(token) { if (typeof token === 'string') { return token; } if (token == null) { return '' + token; } if (token.overriddenName) { return token.overriddenName; } if (token.name) { return token.name; } var res = token.toString(); var newLineIndex = res.indexOf('\n'); return newLineIndex === -1 ? res : res.substring(0, newLineIndex); } var NumberWrapper = (function () { function NumberWrapper() { } NumberWrapper.parseIntAutoRadix = function (text) { var result = parseInt(text); if (isNaN(result)) { throw new Error('Invalid integer literal when parsing ' + text); } return result; }; NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); }; return NumberWrapper; }()); // JS has NaN !== NaN function looseIdentical(a, b) { return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b); } function isJsObject(o) { return o !== null && (typeof o === 'function' || typeof o === 'object'); } function print(obj) { console.log(obj); } function warn(obj) { console.warn(obj); } function setValueOnPath(global, path, value) { var parts = path.split('.'); var obj = global; while (parts.length > 1) { var name_1 = parts.shift(); if (obj.hasOwnProperty(name_1) && obj[name_1] != null) { obj = obj[name_1]; } else { obj = obj[name_1] = {}; } } if (obj === undefined || obj === null) { obj = {}; } obj[parts.shift()] = value; } var _symbolIterator = null; function getSymbolIterator() { if (!_symbolIterator) { if (globalScope.Symbol && Symbol.iterator) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic var keys = Object.getOwnPropertyNames(Map.prototype); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } function isPrimitive(obj) { return !isJsObject(obj); } function escapeRegExp(s) { return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); } //# sourceMappingURL=lang.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(57))) /***/ }), /* 30 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = unimplemented; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BaseError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return WrappedError; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; function unimplemented() { throw new Error('unimplemented'); } /** * @stable */ var BaseError = (function (_super) { __extends(BaseError, _super); function BaseError(message) { // Errors don't use current this, instead they create a new instance. // We have to do forward all of our api to the nativeInstance. var nativeError = _super.call(this, message); this._nativeError = nativeError; } Object.defineProperty(BaseError.prototype, "message", { get: function () { return this._nativeError.message; }, set: function (message) { this._nativeError.message = message; }, enumerable: true, configurable: true }); Object.defineProperty(BaseError.prototype, "name", { get: function () { return this._nativeError.name; }, enumerable: true, configurable: true }); Object.defineProperty(BaseError.prototype, "stack", { get: function () { return this._nativeError.stack; }, set: function (value) { this._nativeError.stack = value; }, enumerable: true, configurable: true }); BaseError.prototype.toString = function () { return this._nativeError.toString(); }; return BaseError; }(Error)); /** * @stable */ var WrappedError = (function (_super) { __extends(WrappedError, _super); function WrappedError(message, error) { _super.call(this, message + " caused by: " + (error instanceof Error ? error.message : error)); this.originalError = error; } Object.defineProperty(WrappedError.prototype, "stack", { get: function () { return (this.originalError instanceof Error ? this.originalError : this._nativeError) .stack; }, enumerable: true, configurable: true }); return WrappedError; }(BaseError)); //# sourceMappingURL=errors.js.map /***/ }), /* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_forms__ = __webpack_require__(597); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__src_forms__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__src_forms__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__src_forms__["c"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__src_forms__["d"]; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @module * @description * Entry point for all public APIs of the forms package. */ //# sourceMappingURL=index.js.map /***/ }), /* 32 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__button_button__ = __webpack_require__(94); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config_config__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_form__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_icon__ = __webpack_require__(209); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ion__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__label_label__ = __webpack_require__(212); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__item_reorder__ = __webpack_require__(132); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Item; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ItemDivider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ItemContent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ItemGroup; }); var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; /** * @name Item * @description * An item can contain text, images, and anything else. Generally it is placed in a list with other * items. It can easily be swiped, deleted, reordered, edited, and more. An item is only required to * be in a [List](../../list/List) if manipulating the item via gestures is required. It requires an * [ItemSliding](../ItemSliding) wrapper element in order to be swiped. * * * ## Common Usage * There are a few elements that are considered items, but not all of them are styled to look the same. * The basic item can be written as an `` element or it can be added to any element by adding * `ion-item` as an attribute. List headers and item dividers, although styled differently, are also items * and can be written as `` and ``, respectively. * * ### As an Element * A basic item should be written as a `` element when it is not clickable. * * ```html * * Item * * ``` * * A list header should be written as ``. * * ```html * * List Header * * ``` * * An item divider should be written as ``. * * ```html * * Item Divider * * ``` * * ### As an Attribute * The attribute `ion-item` should be added to a ` * * * Anchor Item * * ``` * * Note: do not add `ion-item` as an attribute to an `` or `` element * as they are already items and their styling will be changed to look like a basic item. * * ## Detail Arrows * By default, ` * * * Anchor Item with no Detail Arrow * * ``` * * This feature is not enabled by default for `md` and `wp` modes, but it can be enabled by setting the * Sass variables `$item-md-detail-push-show` and `$item-wp-detail-push-show`, respectively, to `true`. * It can also be disabled for ios by setting `$item-ios-detail-push-show` to `false`. See the * [theming documentation](http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/) for * more information on overriding Sass variables. * * * ## Item Placement * Items rely heavily on content projection to position content. The item grabs content based on the * element or attribute and positions it that way. This logic makes it possible to write a complex * item with simple, understandable markup without having to worry about styling and positioning * the elements. * * The below chart details the attributes item looks for and where it will place the element with * that attribute inside of the item: * * | Attribute | Description | * |----------------|----------------------------------------------------------------------------------------------------- | * | `item-left` | Placed to the left of all other elements, outside of the inner item. | * | `item-right` | Placed to the right of all other elements, inside of the inner item, outside of the input wrapper. | * | `item-content` | Placed to the right of any `ion-label`, inside of the input wrapper. | * * ### Checkboxes, Radios and Toggles * [Checkboxes](../../checkbox/Checkbox) are positioned in the same place as the `item-left` attribute. * [Radios](../../radio/RadioButton) and [Toggles](../../toggle/Toggle) are positioned in the same place * as the `item-right` attribute. All of these components can be positioned differently by adding the * `item-left` or `item-right` attribute. * * ### Content and Inputs * A [Label](../../label/Label) is placed inside of the item to the left of all content and inputs. The * following components are all placed in the same position as the `item-content` attribute: [Select](../../select/Select), * [Input](../../input/Input), [TextArea](../../input/TextArea), [DateTime](../../datetime/DateTime), and * [Range](../../range/Range). * * Any element directly placed inside of an `` that does not have one of the previously mentioned * attributes and isn't one of the above elements will be placed inside of a [Label](../../label/Label). * * ### Text Alignment * By default, Items will align text to the left and add an ellipsis when the text is wider than the item. * See the [Utility Attributes Documentation](../../../../theming/css-utilities/) for attributes that can * be added to `ion-item` to transform the text. * * @usage * * ```html * * * * Header * * * * Item * * * * Item with Detail Arrow * * * * * * Item Divider * * * * * * Anchor Item * * * * Item with no border * * * * Multiline text that should wrap when it is too long * to fit on one line in the item. * * * * ``` * * * @advanced * * ```html * * * * * * List Header * * * * * * Item {% raw %}{{item}}{% endraw %} * * * * * * * * * Item Label * *
* Item Content next to the label *
*
* * * * * Item * * * * * * Item Divider * * * * * * Disabled Button Item * * * * * * * * * Avatar Item * * * * * *

Item

*

Item Paragraph

* * * *
* * * * * Item * * * * * * *
* ``` * * * @demo /docs/v2/demos/src/item/ * @see {@link /docs/v2/components#lists List Component Docs} * @see {@link ../../list/List List API Docs} * @see {@link ../ItemSliding ItemSliding API Docs} */ var Item = (function (_super) { __extends(Item, _super); function Item(form, config, elementRef, renderer, reorder) { _super.call(this, config, elementRef, renderer, 'item'); this._ids = -1; this._inputs = []; this._viewLabel = true; this._name = 'item'; this._shouldHaveReorder = false; /** * @private */ this.labelId = null; this._setName(elementRef); this._shouldHaveReorder = !!reorder; this.id = form.nextId().toString(); // auto add "tappable" attribute to ion-item components that have a click listener if (!renderer.orgListen) { renderer.orgListen = renderer.listen; renderer.listen = function (renderElement, name, callback) { if (name === 'click' && renderElement.setAttribute) { renderElement.setAttribute('tappable', ''); } return renderer.orgListen(renderElement, name, callback); }; } } Object.defineProperty(Item.prototype, "color", { /** * @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`. */ set: function (val) { this._updateColor(val, this._name); }, enumerable: true, configurable: true }); Object.defineProperty(Item.prototype, "mode", { /** * @input {string} The mode to apply to this component. */ set: function (val) { this._setMode(val); }, enumerable: true, configurable: true }); /** * @private */ Item.prototype.registerInput = function (type) { this._inputs.push(type); return this.id + '-' + (++this._ids); }; /** * @private */ Item.prototype.ngAfterContentInit = function () { if (this._viewLabel && this._inputs.length) { var labelText = this.getLabelText().trim(); this._viewLabel = (labelText.length > 0); } if (this._inputs.length > 1) { this.setElementClass('item-multiple-inputs', true); } }; /** * @private */ Item.prototype._updateColor = function (newColor, componentName) { componentName = componentName || 'item'; // item-radio this._setColor(newColor, componentName); }; /** * @private */ Item.prototype._setName = function (elementRef) { var nodeName = elementRef.nativeElement.nodeName.replace('ION-', ''); if (nodeName === 'LIST-HEADER' || nodeName === 'ITEM-DIVIDER') { this._name = nodeName; } }; /** * @private */ Item.prototype.getLabelText = function () { return this._label ? this._label.text : ''; }; Object.defineProperty(Item.prototype, "contentLabel", { /** * @private */ set: function (label) { if (label) { this._label = label; this.labelId = label.id = ('lbl-' + this.id); if (label.type) { this.setElementClass('item-label-' + label.type, true); } this._viewLabel = false; } }, enumerable: true, configurable: true }); Object.defineProperty(Item.prototype, "viewLabel", { /** * @private */ set: function (label) { if (!this._label) { this._label = label; } }, enumerable: true, configurable: true }); Object.defineProperty(Item.prototype, "_buttons", { /** * @private */ set: function (buttons) { buttons.forEach(function (button) { if (!button._size) { button.setElementClass('item-button', true); } }); }, enumerable: true, configurable: true }); Object.defineProperty(Item.prototype, "_icons", { /** * @private */ set: function (icons) { icons.forEach(function (icon) { icon.setElementClass('item-icon', true); }); }, enumerable: true, configurable: true }); Item.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["R" /* Component */], args: [{ selector: 'ion-list-header,ion-item,[ion-item],ion-item-divider', template: '' + '
' + '
' + '' + '' + '' + '' + '' + '
' + '' + '' + '
' + '
', host: { 'class': 'item' }, changeDetection: __WEBPACK_IMPORTED_MODULE_0__angular_core__["S" /* ChangeDetectionStrategy */].OnPush, encapsulation: __WEBPACK_IMPORTED_MODULE_0__angular_core__["N" /* ViewEncapsulation */].None, },] }, ]; /** @nocollapse */ Item.ctorParameters = [ { type: __WEBPACK_IMPORTED_MODULE_3__util_form__["a" /* Form */], }, { type: __WEBPACK_IMPORTED_MODULE_2__config_config__["a" /* Config */], }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* ElementRef */], }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* Renderer */], }, { type: __WEBPACK_IMPORTED_MODULE_7__item_reorder__["a" /* ItemReorder */], decorators: [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["h" /* Optional */] },] }, ]; Item.propDecorators = { 'color': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["y" /* Input */] },], 'mode': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["y" /* Input */] },], 'contentLabel': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["Q" /* ContentChild */], args: [__WEBPACK_IMPORTED_MODULE_6__label_label__["a" /* Label */],] },], 'viewLabel': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["X" /* ViewChild */], args: [__WEBPACK_IMPORTED_MODULE_6__label_label__["a" /* Label */],] },], '_buttons': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["T" /* ContentChildren */], args: [__WEBPACK_IMPORTED_MODULE_1__button_button__["a" /* Button */],] },], '_icons': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["T" /* ContentChildren */], args: [__WEBPACK_IMPORTED_MODULE_4__icon_icon__["a" /* Icon */],] },], }; return Item; }(__WEBPACK_IMPORTED_MODULE_5__ion__["a" /* Ion */])); /** * @private */ var ItemDivider = (function (_super) { __extends(ItemDivider, _super); function ItemDivider(form, config, elementRef, renderer) { _super.call(this, config, elementRef, renderer, 'item-divider'); } Object.defineProperty(ItemDivider.prototype, "color", { /** * @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`. */ set: function (val) { this._setColor(val); }, enumerable: true, configurable: true }); Object.defineProperty(ItemDivider.prototype, "mode", { /** * @input {string} The mode to apply to this component. */ set: function (val) { this._setMode(val); }, enumerable: true, configurable: true }); ItemDivider.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["x" /* Directive */], args: [{ selector: 'ion-item-divider', host: { 'class': 'item-divider' } },] }, ]; /** @nocollapse */ ItemDivider.ctorParameters = [ { type: __WEBPACK_IMPORTED_MODULE_3__util_form__["a" /* Form */], }, { type: __WEBPACK_IMPORTED_MODULE_2__config_config__["a" /* Config */], }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["E" /* ElementRef */], }, { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["F" /* Renderer */], }, ]; ItemDivider.propDecorators = { 'color': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["y" /* Input */] },], 'mode': [{ type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["y" /* Input */] },], }; return ItemDivider; }(__WEBPACK_IMPORTED_MODULE_5__ion__["a" /* Ion */])); /** * @private */ var ItemContent = (function () { function ItemContent() { } ItemContent.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["x" /* Directive */], args: [{ selector: 'ion-item,[ion-item]', host: { 'class': 'item-block' } },] }, ]; /** @nocollapse */ ItemContent.ctorParameters = []; return ItemContent; }()); /** * @private */ var ItemGroup = (function () { function ItemGroup() { } ItemGroup.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["x" /* Directive */], args: [{ selector: 'ion-item-group' },] }, ]; /** @nocollapse */ ItemGroup.ctorParameters = []; return ItemGroup; }()); //# sourceMappingURL=item.js.map /***/ }), /* 33 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(6); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ParseLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ParseSourceFile; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ParseSourceSpan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ParseErrorLevel; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ParseError; }); var ParseLocation = (function () { function ParseLocation(file, offset, line, col) { this.file = file; this.offset = offset; this.line = line; this.col = col; } ParseLocation.prototype.toString = function () { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["a" /* isPresent */])(this.offset) ? this.file.url + "@" + this.line + ":" + this.col : this.file.url; }; return ParseLocation; }()); var ParseSourceFile = (function () { function ParseSourceFile(content, url) { this.content = content; this.url = url; } return ParseSourceFile; }()); var ParseSourceSpan = (function () { function ParseSourceSpan(start, end, details) { if (details === void 0) { details = null; } this.start = start; this.end = end; this.details = details; } ParseSourceSpan.prototype.toString = function () { return this.start.file.content.substring(this.start.offset, this.end.offset); }; return ParseSourceSpan; }()); var ParseErrorLevel; (function (ParseErrorLevel) { ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING"; ParseErrorLevel[ParseErrorLevel["FATAL"] = 1] = "FATAL"; })(ParseErrorLevel || (ParseErrorLevel = {})); var ParseError = (function () { function ParseError(span, msg, level) { if (level === void 0) { level = ParseErrorLevel.FATAL; } this.span = span; this.msg = msg; this.level = level; } ParseError.prototype.toString = function () { var source = this.span.start.file.content; var ctxStart = this.span.start.offset; var contextStr = ''; var details = ''; if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["a" /* isPresent */])(ctxStart)) { if (ctxStart > source.length - 1) { ctxStart = source.length - 1; } var ctxEnd = ctxStart; var ctxLen = 0; var ctxLines = 0; while (ctxLen < 100 && ctxStart > 0) { ctxStart--; ctxLen++; if (source[ctxStart] == '\n') { if (++ctxLines == 3) { break; } } } ctxLen = 0; ctxLines = 0; while (ctxLen < 100 && ctxEnd < source.length - 1) { ctxEnd++; ctxLen++; if (source[ctxEnd] == '\n') { if (++ctxLines == 3) { break; } } } var context = source.substring(ctxStart, this.span.start.offset) + '[ERROR ->]' + source.substring(this.span.start.offset, ctxEnd + 1); contextStr = " (\"" + context + "\")"; } if (this.span.details) { details = ", " + this.span.details; } return "" + this.msg + contextStr + ": " + this.span.start + details; }; return ParseError; }()); //# sourceMappingURL=parse_util.js.map /***/ }), /* 34 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__di_metadata__ = __webpack_require__(114); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["d"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["e"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["f"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__di_metadata__["c"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__di_forward_ref__ = __webpack_require__(174); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__di_forward_ref__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_1__di_forward_ref__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__di_injector__ = __webpack_require__(84); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_2__di_injector__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__di_reflective_injector__ = __webpack_require__(578); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__di_reflective_injector__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__di_reflective_provider__ = __webpack_require__(177); /* unused harmony reexport ResolvedReflectiveFactory */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__di_reflective_key__ = __webpack_require__(176); /* unused harmony reexport ReflectiveKey */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__di_opaque_token__ = __webpack_require__(175); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__di_opaque_token__["a"]; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @module * @description * The `di` module provides dependency injection container services. */ //# sourceMappingURL=di.js.map /***/ }), /* 35 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NG_VALUE_ACCESSOR; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used to provide a {@link ControlValueAccessor} for form controls. * * See {@link DefaultValueAccessor} for how to implement one. * @stable */ var NG_VALUE_ACCESSOR = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["i" /* OpaqueToken */]('NgValueAccessor'); //# sourceMappingURL=control_value_accessor.js.map /***/ }), /* 36 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__(3); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Form; }); /* unused harmony export IonicTapInput */ /* unused harmony export IonicFormInput */ /** * @private */ var Form = (function () { function Form() { this._focused = null; this._ids = -1; this._inputs = []; } Form.prototype.register = function (input) { this._inputs.push(input); }; Form.prototype.deregister = function (input) { __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__["d" /* removeArrayItem */])(this._inputs, input); if (input === this._focused) { this._focused = null; } }; Form.prototype.setAsFocused = function (input) { this._focused = input; }; /** * Focuses the next input element, if it exists. */ Form.prototype.tabFocus = function (currentInput) { var index = this._inputs.indexOf(currentInput); if (index > -1 && (index + 1) < this._inputs.length) { var nextInput = this._inputs[index + 1]; if (nextInput !== this._focused) { (void 0) /* console.debug */; return nextInput.initFocus(); } } index = this._inputs.indexOf(this._focused); if (index > 0) { var previousInput = this._inputs[index - 1]; if (previousInput) { (void 0) /* console.debug */; previousInput.initFocus(); } } }; Form.prototype.nextId = function () { return ++this._ids; }; Form.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_0__angular_core__["c" /* Injectable */] }, ]; /** @nocollapse */ Form.ctorParameters = []; return Form; }()); var IonicTapInput = (function () { function IonicTapInput() { } Object.defineProperty(IonicTapInput.prototype, "checked", { get: function () { }, set: function (val) { }, enumerable: true, configurable: true }); Object.defineProperty(IonicTapInput.prototype, "disabled", { get: function () { }, set: function (val) { }, enumerable: true, configurable: true }); return IonicTapInput; }()); var IonicFormInput = (function () { function IonicFormInput() { } return IonicFormInput; }()); //# sourceMappingURL=form.js.map /***/ }), /* 37 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__facade_lang__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__identifiers__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__output_output_ast__ = __webpack_require__(12); /* harmony export (immutable) */ __webpack_exports__["b"] = createDiTokenExpression; /* harmony export (immutable) */ __webpack_exports__["a"] = createInlineArray; /* harmony export (immutable) */ __webpack_exports__["c"] = createPureProxy; /* harmony export (immutable) */ __webpack_exports__["d"] = createEnumExpression; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createDiTokenExpression(token) { if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__facade_lang__["a" /* isPresent */])(token.value)) { return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["f" /* literal */](token.value); } else if (token.identifierIsInstance) { return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](token.identifier) .instantiate([], __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["d" /* importType */](token.identifier, [], [__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["k" /* TypeModifier */].Const])); } else { return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](token.identifier); } } function createInlineArray(values) { if (values.length === 0) { return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* resolveIdentifier */])(__WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].EMPTY_INLINE_ARRAY)); } var log2 = Math.log(values.length) / Math.log(2); var index = Math.ceil(log2); var identifierSpec = index < __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].inlineArrays.length ? __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].inlineArrays[index] : __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].InlineArrayDynamic; var identifier = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* resolveIdentifier */])(identifierSpec); return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](identifier).instantiate([ __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["f" /* literal */](values.length) ].concat(values)); } function createPureProxy(fn, argCount, pureProxyProp, builder) { builder.fields.push(new __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["c" /* ClassField */](pureProxyProp.name, null)); var pureProxyId = argCount < __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].pureProxies.length ? __WEBPACK_IMPORTED_MODULE_1__identifiers__["b" /* Identifiers */].pureProxies[argCount] : null; if (!pureProxyId) { throw new Error("Unsupported number of argument for pure functions: " + argCount); } builder.ctorStmts.push(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["e" /* THIS_EXPR */].prop(pureProxyProp.name) .set(__WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* resolveIdentifier */])(pureProxyId)).callFn([fn])) .toStmt()); } function createEnumExpression(enumType, enumValue) { var enumName = Object.keys(enumType.runtime).find(function (propName) { return enumType.runtime[propName] === enumValue; }); if (!enumName) { throw new Error("Unknown enum value " + enumValue + " in " + enumType.name); } return __WEBPACK_IMPORTED_MODULE_2__output_output_ast__["g" /* importExpr */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["d" /* resolveEnumIdentifier */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__identifiers__["a" /* resolveIdentifier */])(enumType), enumName)); } //# sourceMappingURL=identifier_util.js.map /***/ }), /* 38 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assertions__ = __webpack_require__(252); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return InterpolationConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_INTERPOLATION_CONFIG; }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var InterpolationConfig = (function () { function InterpolationConfig(start, end) { this.start = start; this.end = end; } InterpolationConfig.fromArray = function (markers) { if (!markers) { return DEFAULT_INTERPOLATION_CONFIG; } __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__assertions__["a" /* assertInterpolationSymbols */])('interpolation', markers); return new InterpolationConfig(markers[0], markers[1]); }; ; return InterpolationConfig; }()); var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}'); //# sourceMappingURL=interpolation_config.js.map /***/ }), /* 39 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return TextAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return BoundTextAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return AttrAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return BoundElementPropertyAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return BoundEventAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return ReferenceAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return VariableAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return ElementAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return EmbeddedTemplateAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return BoundDirectivePropertyAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return DirectiveAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ProviderAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ProviderAstType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return NgContentAst; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return PropertyBindingType; }); /* harmony export (immutable) */ __webpack_exports__["a"] = templateVisitAll; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A segment of text within the template. */ var TextAst = (function () { function TextAst(value, ngContentIndex, sourceSpan) { this.value = value; this.ngContentIndex = ngContentIndex; this.sourceSpan = sourceSpan; } TextAst.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); }; return TextAst; }()); /** * A bound expression within the text of a template. */ var BoundTextAst = (function () { function BoundTextAst(value, ngContentIndex, sourceSpan) { this.value = value; this.ngContentIndex = ngContentIndex; this.sourceSpan = sourceSpan; } BoundTextAst.prototype.visit = function (visitor, context) { return visitor.visitBoundText(this, context); }; return BoundTextAst; }()); /** * A plain attribute on an element. */ var AttrAst = (function () { function AttrAst(name, value, sourceSpan) { this.name = name; this.value = value; this.sourceSpan = sourceSpan; } AttrAst.prototype.visit = function (visitor, context) { return visitor.visitAttr(this, context); }; return AttrAst; }()); /** * A binding for an element property (e.g. `[property]="expression"`) or an animation trigger (e.g. * `[@trigger]="stateExp"`) */ var BoundElementPropertyAst = (function () { function BoundElementPropertyAst(name, type, securityContext, needsRuntimeSecurityContext, value, unit, sourceSpan) { this.name = name; this.type = type; this.securityContext = securityContext; this.needsRuntimeSecurityContext = needsRuntimeSecurityContext; this.value = value; this.unit = unit; this.sourceSpan = sourceSpan; } BoundElementPropertyAst.prototype.visit = function (visitor, context) { return visitor.visitElementProperty(this, context); }; Object.defineProperty(BoundElementPropertyAst.prototype, "isAnimation", { get: function () { return this.type === PropertyBindingType.Animation; }, enumerable: true, configurable: true }); return BoundElementPropertyAst; }()); /** * A binding for an element event (e.g. `(event)="handler()"`) or an animation trigger event (e.g. * `(@trigger.phase)="callback($event)"`). */ var BoundEventAst = (function () { function BoundEventAst(name, target, phase, handler, sourceSpan) { this.name = name; this.target = target; this.phase = phase; this.handler = handler; this.sourceSpan = sourceSpan; } BoundEventAst.calcFullName = function (name, target, phase) { if (target) { return target + ":" + name; } else if (phase) { return "@" + name + "." + phase; } else { return name; } }; BoundEventAst.prototype.visit = function (visitor, context) { return visitor.visitEvent(this, context); }; Object.defineProperty(BoundEventAst.prototype, "fullName", { get: function () { return BoundEventAst.calcFullName(this.name, this.target, this.phase); }, enumerable: true, configurable: true }); Object.defineProperty(BoundEventAst.prototype, "isAnimation", { get: function () { return !!this.phase; }, enumerable: true, configurable: true }); return BoundEventAst; }()); /** * A reference declaration on an element (e.g. `let someName="expression"`). */ var ReferenceAst = (function () { function ReferenceAst(name, value, sourceSpan) { this.name = name; this.value = value; this.sourceSpan = sourceSpan; } ReferenceAst.prototype.visit = function (visitor, context) { return visitor.visitReference(this, context); }; return ReferenceAst; }()); /** * A variable declaration on a