UNPKG

@researchdatabox/sails-hook-redbox-redcap

Version:

Redbox hook for REDCap API

1,290 lines (1,277 loc) 8.95 MB
webpackJsonp(["main"],{ /***/ "../assets/default/default/images/leaflet/marker-icon-2x.png": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==" /***/ }), /***/ "../assets/default/default/images/leaflet/marker-icon.png": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=" /***/ }), /***/ "../assets/default/default/images/leaflet/marker-shadow.png": /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC" /***/ }), /***/ "./node_modules/@angular/common/@angular/common.es5.js": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export NgLocaleLocalization */ /* unused harmony export NgLocalization */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return parseCookieValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CommonModule; }); /* unused harmony export DeprecatedI18NPipesModule */ /* unused harmony export NgClass */ /* unused harmony export NgFor */ /* unused harmony export NgForOf */ /* unused harmony export NgForOfContext */ /* unused harmony export NgIf */ /* unused harmony export NgIfContext */ /* unused harmony export NgPlural */ /* unused harmony export NgPluralCase */ /* unused harmony export NgStyle */ /* unused harmony export NgSwitch */ /* unused harmony export NgSwitchCase */ /* unused harmony export NgSwitchDefault */ /* unused harmony export NgTemplateOutlet */ /* unused harmony export NgComponentOutlet */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DOCUMENT; }); /* unused harmony export AsyncPipe */ /* unused harmony export DatePipe */ /* unused harmony export I18nPluralPipe */ /* unused harmony export I18nSelectPipe */ /* unused harmony export JsonPipe */ /* unused harmony export LowerCasePipe */ /* unused harmony export CurrencyPipe */ /* unused harmony export DecimalPipe */ /* unused harmony export PercentPipe */ /* unused harmony export SlicePipe */ /* unused harmony export UpperCasePipe */ /* unused harmony export TitleCasePipe */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return PLATFORM_BROWSER_ID; }); /* unused harmony export ɵPLATFORM_SERVER_ID */ /* unused harmony export ɵPLATFORM_WORKER_APP_ID */ /* unused harmony export ɵPLATFORM_WORKER_UI_ID */ /* unused harmony export isPlatformBrowser */ /* unused harmony export isPlatformServer */ /* unused harmony export isPlatformWorkerApp */ /* unused harmony export isPlatformWorkerUi */ /* unused harmony export VERSION */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return PlatformLocation; }); /* unused harmony export LOCATION_INITIALIZED */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return LocationStrategy; }); /* unused harmony export APP_BASE_HREF */ /* unused harmony export HashLocationStrategy */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return PathLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Location; }); /* unused harmony export ɵa */ /* unused harmony export ɵb */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__("./node_modules/tslib/tslib.es6.js"); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__("./node_modules/@angular/core/@angular/core.es5.js"); /** * @license Angular v4.4.7 * (c) 2010-2017 Google, Inc. https://angular.io/ * License: MIT */ /** * @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 */ /** * This class should not be used directly by an application developer. Instead, use * {\@link Location}. * * `PlatformLocation` encapsulates all calls to DOM apis, which allows the Router to be platform * agnostic. * This means that we can have different implementation of `PlatformLocation` for the different * platforms that angular supports. For example, `\@angular/platform-browser` provides an * implementation specific to the browser environment, while `\@angular/platform-webworker` provides * one suitable for use with web workers. * * The `PlatformLocation` class is used directly by all implementations of {\@link LocationStrategy} * when they need to interact with the DOM apis like pushState, popState, etc... * * {\@link LocationStrategy} in turn is used by the {\@link Location} service which is used directly * by the {\@link Router} in order to navigate between routes. Since all interactions between {\@link * Router} / * {\@link Location} / {\@link LocationStrategy} and DOM apis flow through the `PlatformLocation` * class they are all platform independent. * * \@stable * @abstract */ var PlatformLocation = (function () { function PlatformLocation() { } /** * @abstract * @return {?} */ PlatformLocation.prototype.getBaseHrefFromDOM = function () { }; /** * @abstract * @param {?} fn * @return {?} */ PlatformLocation.prototype.onPopState = function (fn) { }; /** * @abstract * @param {?} fn * @return {?} */ PlatformLocation.prototype.onHashChange = function (fn) { }; /** * @abstract * @return {?} */ PlatformLocation.prototype.pathname = function () { }; /** * @abstract * @return {?} */ PlatformLocation.prototype.search = function () { }; /** * @abstract * @return {?} */ PlatformLocation.prototype.hash = function () { }; /** * @abstract * @param {?} state * @param {?} title * @param {?} url * @return {?} */ PlatformLocation.prototype.replaceState = function (state, title, url) { }; /** * @abstract * @param {?} state * @param {?} title * @param {?} url * @return {?} */ PlatformLocation.prototype.pushState = function (state, title, url) { }; /** * @abstract * @return {?} */ PlatformLocation.prototype.forward = function () { }; /** * @abstract * @return {?} */ PlatformLocation.prototype.back = function () { }; return PlatformLocation; }()); /** * \@whatItDoes indicates when a location is initialized * \@experimental */ var LOCATION_INITIALIZED = new __WEBPACK_IMPORTED_MODULE_1__angular_core__["InjectionToken"]('Location Initialized'); /** * @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 */ /** * `LocationStrategy` is responsible for representing and reading route state * from the browser's URL. Angular provides two strategies: * {\@link HashLocationStrategy} and {\@link PathLocationStrategy}. * * This is used under the hood of the {\@link Location} service. * * Applications should use the {\@link Router} or {\@link Location} services to * interact with application route state. * * For instance, {\@link HashLocationStrategy} produces URLs like * `http://example.com#/foo`, and {\@link PathLocationStrategy} produces * `http://example.com/foo` as an equivalent URL. * * See these two classes for more. * * \@stable * @abstract */ var LocationStrategy = (function () { function LocationStrategy() { } /** * @abstract * @param {?=} includeHash * @return {?} */ LocationStrategy.prototype.path = function (includeHash) { }; /** * @abstract * @param {?} internal * @return {?} */ LocationStrategy.prototype.prepareExternalUrl = function (internal) { }; /** * @abstract * @param {?} state * @param {?} title * @param {?} url * @param {?} queryParams * @return {?} */ LocationStrategy.prototype.pushState = function (state, title, url, queryParams) { }; /** * @abstract * @param {?} state * @param {?} title * @param {?} url * @param {?} queryParams * @return {?} */ LocationStrategy.prototype.replaceState = function (state, title, url, queryParams) { }; /** * @abstract * @return {?} */ LocationStrategy.prototype.forward = function () { }; /** * @abstract * @return {?} */ LocationStrategy.prototype.back = function () { }; /** * @abstract * @param {?} fn * @return {?} */ LocationStrategy.prototype.onPopState = function (fn) { }; /** * @abstract * @return {?} */ LocationStrategy.prototype.getBaseHref = function () { }; return LocationStrategy; }()); /** * The `APP_BASE_HREF` token represents the base href to be used with the * {\@link PathLocationStrategy}. * * If you're using {\@link PathLocationStrategy}, you must provide a provider to a string * representing the URL prefix that should be preserved when generating and recognizing * URLs. * * ### Example * * ```typescript * import {Component, NgModule} from '\@angular/core'; * import {APP_BASE_HREF} from '\@angular/common'; * * \@NgModule({ * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}] * }) * class AppModule {} * ``` * * \@stable */ var APP_BASE_HREF = new __WEBPACK_IMPORTED_MODULE_1__angular_core__["InjectionToken"]('appBaseHref'); /** * @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 */ /** * \@whatItDoes `Location` is a service that applications can use to interact with a browser's URL. * \@description * Depending on which {\@link LocationStrategy} is used, `Location` will either persist * to the URL's path or the URL's hash segment. * * Note: it's better to use {\@link Router#navigate} service to trigger route changes. Use * `Location` only if you need to interact with or create normalized URLs outside of * routing. * * `Location` is responsible for normalizing the URL against the application's base href. * A normalized URL is absolute from the URL host, includes the application's base href, and has no * trailing slash: * - `/my/app/user/123` is normalized * - `my/app/user/123` **is not** normalized * - `/my/app/user/123/` **is not** normalized * * ### Example * {\@example common/location/ts/path_location_component.ts region='LocationComponent'} * \@stable */ var Location = (function () { /** * @param {?} platformStrategy */ function Location(platformStrategy) { var _this = this; /** * \@internal */ this._subject = new __WEBPACK_IMPORTED_MODULE_1__angular_core__["EventEmitter"](); this._platformStrategy = platformStrategy; var browserBaseHref = this._platformStrategy.getBaseHref(); this._baseHref = Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref)); this._platformStrategy.onPopState(function (ev) { _this._subject.emit({ 'url': _this.path(true), 'pop': true, 'type': ev.type, }); }); } /** * @param {?=} includeHash * @return {?} */ Location.prototype.path = function (includeHash) { if (includeHash === void 0) { includeHash = false; } return this.normalize(this._platformStrategy.path(includeHash)); }; /** * Normalizes the given path and compares to the current normalized path. * @param {?} path * @param {?=} query * @return {?} */ Location.prototype.isCurrentPathEqualTo = function (path, query) { if (query === void 0) { query = ''; } return this.path() == this.normalize(path + Location.normalizeQueryParams(query)); }; /** * Given a string representing a URL, returns the normalized URL path without leading or * trailing slashes. * @param {?} url * @return {?} */ Location.prototype.normalize = function (url) { return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url))); }; /** * Given a string representing a URL, returns the platform-specific external URL path. * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one * before normalizing. This method will also add a hash if `HashLocationStrategy` is * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use. * @param {?} url * @return {?} */ Location.prototype.prepareExternalUrl = function (url) { if (url && url[0] !== '/') { url = '/' + url; } return this._platformStrategy.prepareExternalUrl(url); }; /** * Changes the browsers URL to the normalized version of the given URL, and pushes a * new item onto the platform's history. * @param {?} path * @param {?=} query * @return {?} */ Location.prototype.go = function (path, query) { if (query === void 0) { query = ''; } this._platformStrategy.pushState(null, '', path, query); }; /** * Changes the browsers URL to the normalized version of the given URL, and replaces * the top item on the platform's history stack. * @param {?} path * @param {?=} query * @return {?} */ Location.prototype.replaceState = function (path, query) { if (query === void 0) { query = ''; } this._platformStrategy.replaceState(null, '', path, query); }; /** * Navigates forward in the platform's history. * @return {?} */ Location.prototype.forward = function () { this._platformStrategy.forward(); }; /** * Navigates back in the platform's history. * @return {?} */ Location.prototype.back = function () { this._platformStrategy.back(); }; /** * Subscribe to the platform's `popState` events. * @param {?} onNext * @param {?=} onThrow * @param {?=} onReturn * @return {?} */ Location.prototype.subscribe = function (onNext, onThrow, onReturn) { return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn }); }; /** * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as * is. * @param {?} params * @return {?} */ Location.normalizeQueryParams = function (params) { return params && params[0] !== '?' ? '?' + params : params; }; /** * Given 2 parts of a url, join them with a slash if needed. * @param {?} start * @param {?} end * @return {?} */ Location.joinWithSlash = function (start, end) { if (start.length == 0) { return end; } if (end.length == 0) { return start; } var /** @type {?} */ slashes = 0; if (start.endsWith('/')) { slashes++; } if (end.startsWith('/')) { slashes++; } if (slashes == 2) { return start + end.substring(1); } if (slashes == 1) { return start + end; } return start + '/' + end; }; /** * If url has a trailing slash, remove it, otherwise return url as is. This * method looks for the first occurence of either #, ?, or the end of the * line as `/` characters after any of these should not be replaced. * @param {?} url * @return {?} */ Location.stripTrailingSlash = function (url) { var /** @type {?} */ match = url.match(/#|\?|$/); var /** @type {?} */ pathEndIdx = match && match.index || url.length; var /** @type {?} */ droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0); return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx); }; return Location; }()); Location.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"] }, ]; /** * @nocollapse */ Location.ctorParameters = function () { return [ { type: LocationStrategy, }, ]; }; /** * @param {?} baseHref * @param {?} url * @return {?} */ function _stripBaseHref(baseHref, url) { return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url; } /** * @param {?} url * @return {?} */ function _stripIndexHtml(url) { return url.replace(/\/index.html$/, ''); } /** * @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 */ /** * \@whatItDoes Use URL hash for storing application location data. * \@description * `HashLocationStrategy` is a {\@link LocationStrategy} used to configure the * {\@link Location} service to represent its state in the * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) * of the browser's URL. * * For instance, if you call `location.go('/foo')`, the browser's URL will become * `example.com#/foo`. * * ### Example * * {\@example common/location/ts/hash_location_component.ts region='LocationComponent'} * * \@stable */ var HashLocationStrategy = (function (_super) { __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](HashLocationStrategy, _super); /** * @param {?} _platformLocation * @param {?=} _baseHref */ function HashLocationStrategy(_platformLocation, _baseHref) { var _this = _super.call(this) || this; _this._platformLocation = _platformLocation; _this._baseHref = ''; if (_baseHref != null) { _this._baseHref = _baseHref; } return _this; } /** * @param {?} fn * @return {?} */ HashLocationStrategy.prototype.onPopState = function (fn) { this._platformLocation.onPopState(fn); this._platformLocation.onHashChange(fn); }; /** * @return {?} */ HashLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; }; /** * @param {?=} includeHash * @return {?} */ HashLocationStrategy.prototype.path = function (includeHash) { if (includeHash === void 0) { includeHash = false; } // the hash value is always prefixed with a `#` // and if it is empty then it will stay empty var /** @type {?} */ path = this._platformLocation.hash; if (path == null) path = '#'; return path.length > 0 ? path.substring(1) : path; }; /** * @param {?} internal * @return {?} */ HashLocationStrategy.prototype.prepareExternalUrl = function (internal) { var /** @type {?} */ url = Location.joinWithSlash(this._baseHref, internal); return url.length > 0 ? ('#' + url) : url; }; /** * @param {?} state * @param {?} title * @param {?} path * @param {?} queryParams * @return {?} */ HashLocationStrategy.prototype.pushState = function (state, title, path, queryParams) { var /** @type {?} */ url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams)); if (url.length == 0) { url = this._platformLocation.pathname; } this._platformLocation.pushState(state, title, url); }; /** * @param {?} state * @param {?} title * @param {?} path * @param {?} queryParams * @return {?} */ HashLocationStrategy.prototype.replaceState = function (state, title, path, queryParams) { var /** @type {?} */ url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams)); if (url.length == 0) { url = this._platformLocation.pathname; } this._platformLocation.replaceState(state, title, url); }; /** * @return {?} */ HashLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); }; /** * @return {?} */ HashLocationStrategy.prototype.back = function () { this._platformLocation.back(); }; return HashLocationStrategy; }(LocationStrategy)); HashLocationStrategy.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"] }, ]; /** * @nocollapse */ HashLocationStrategy.ctorParameters = function () { return [ { type: PlatformLocation, }, { type: undefined, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Optional"] }, { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Inject"], args: [APP_BASE_HREF,] },] }, ]; }; /** * @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 */ /** * \@whatItDoes Use URL for storing application location data. * \@description * `PathLocationStrategy` is a {\@link LocationStrategy} used to configure the * {\@link Location} service to represent its state in the * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the * browser's URL. * * If you're using `PathLocationStrategy`, you must provide a {\@link APP_BASE_HREF} * or add a base element to the document. This URL prefix that will be preserved * when generating and recognizing URLs. * * For instance, if you provide an `APP_BASE_HREF` of `'/my/app'` and call * `location.go('/foo')`, the browser's URL will become * `example.com/my/app/foo`. * * Similarly, if you add `<base href='/my/app'/>` to the document and call * `location.go('/foo')`, the browser's URL will become * `example.com/my/app/foo`. * * ### Example * * {\@example common/location/ts/path_location_component.ts region='LocationComponent'} * * \@stable */ var PathLocationStrategy = (function (_super) { __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](PathLocationStrategy, _super); /** * @param {?} _platformLocation * @param {?=} href */ function PathLocationStrategy(_platformLocation, href) { var _this = _super.call(this) || this; _this._platformLocation = _platformLocation; if (href == null) { href = _this._platformLocation.getBaseHrefFromDOM(); } if (href == null) { throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document."); } _this._baseHref = href; return _this; } /** * @param {?} fn * @return {?} */ PathLocationStrategy.prototype.onPopState = function (fn) { this._platformLocation.onPopState(fn); this._platformLocation.onHashChange(fn); }; /** * @return {?} */ PathLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; }; /** * @param {?} internal * @return {?} */ PathLocationStrategy.prototype.prepareExternalUrl = function (internal) { return Location.joinWithSlash(this._baseHref, internal); }; /** * @param {?=} includeHash * @return {?} */ PathLocationStrategy.prototype.path = function (includeHash) { if (includeHash === void 0) { includeHash = false; } var /** @type {?} */ pathname = this._platformLocation.pathname + Location.normalizeQueryParams(this._platformLocation.search); var /** @type {?} */ hash = this._platformLocation.hash; return hash && includeHash ? "" + pathname + hash : pathname; }; /** * @param {?} state * @param {?} title * @param {?} url * @param {?} queryParams * @return {?} */ PathLocationStrategy.prototype.pushState = function (state, title, url, queryParams) { var /** @type {?} */ externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams)); this._platformLocation.pushState(state, title, externalUrl); }; /** * @param {?} state * @param {?} title * @param {?} url * @param {?} queryParams * @return {?} */ PathLocationStrategy.prototype.replaceState = function (state, title, url, queryParams) { var /** @type {?} */ externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams)); this._platformLocation.replaceState(state, title, externalUrl); }; /** * @return {?} */ PathLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); }; /** * @return {?} */ PathLocationStrategy.prototype.back = function () { this._platformLocation.back(); }; return PathLocationStrategy; }(LocationStrategy)); PathLocationStrategy.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"] }, ]; /** * @nocollapse */ PathLocationStrategy.ctorParameters = function () { return [ { type: PlatformLocation, }, { type: undefined, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Optional"] }, { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Inject"], args: [APP_BASE_HREF,] },] }, ]; }; /** * @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 */ /** * @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 */ /** * \@experimental * @abstract */ var NgLocalization = (function () { function NgLocalization() { } /** * @abstract * @param {?} value * @return {?} */ NgLocalization.prototype.getPluralCategory = function (value) { }; return NgLocalization; }()); /** * Returns the plural category for a given value. * - "=value" when the case exists, * - the plural category otherwise * * \@internal * @param {?} value * @param {?} cases * @param {?} ngLocalization * @return {?} */ function getPluralCategory(value, cases, ngLocalization) { var /** @type {?} */ key = "=" + value; if (cases.indexOf(key) > -1) { return key; } key = ngLocalization.getPluralCategory(value); if (cases.indexOf(key) > -1) { return key; } if (cases.indexOf('other') > -1) { return 'other'; } throw new Error("No plural message found for value \"" + value + "\""); } /** * Returns the plural case based on the locale * * \@experimental */ var NgLocaleLocalization = (function (_super) { __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](NgLocaleLocalization, _super); /** * @param {?} locale */ function NgLocaleLocalization(locale) { var _this = _super.call(this) || this; _this.locale = locale; return _this; } /** * @param {?} value * @return {?} */ NgLocaleLocalization.prototype.getPluralCategory = function (value) { var /** @type {?} */ plural = getPluralCase(this.locale, value); switch (plural) { case Plural.Zero: return 'zero'; case Plural.One: return 'one'; case Plural.Two: return 'two'; case Plural.Few: return 'few'; case Plural.Many: return 'many'; default: return 'other'; } }; return NgLocaleLocalization; }(NgLocalization)); NgLocaleLocalization.decorators = [ { type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"] }, ]; /** * @nocollapse */ NgLocaleLocalization.ctorParameters = function () { return [ { type: undefined, decorators: [{ type: __WEBPACK_IMPORTED_MODULE_1__angular_core__["Inject"], args: [__WEBPACK_IMPORTED_MODULE_1__angular_core__["LOCALE_ID"],] },] }, ]; }; var Plural = {}; Plural.Zero = 0; Plural.One = 1; Plural.Two = 2; Plural.Few = 3; Plural.Many = 4; Plural.Other = 5; Plural[Plural.Zero] = "Zero"; Plural[Plural.One] = "One"; Plural[Plural.Two] = "Two"; Plural[Plural.Few] = "Few"; Plural[Plural.Many] = "Many"; Plural[Plural.Other] = "Other"; /** * Returns the plural case based on the locale * * \@experimental * @param {?} locale * @param {?} nLike * @return {?} */ function getPluralCase(locale, nLike) { // TODO(vicb): lazy compute if (typeof nLike === 'string') { nLike = parseInt(/** @type {?} */ (nLike), 10); } var /** @type {?} */ n = (nLike); var /** @type {?} */ nDecimal = n.toString().replace(/^[^.]*\.?/, ''); var /** @type {?} */ i = Math.floor(Math.abs(n)); var /** @type {?} */ v = nDecimal.length; var /** @type {?} */ f = parseInt(nDecimal, 10); var /** @type {?} */ t = parseInt(n.toString().replace(/^[^.]*\.?|0+$/g, ''), 10) || 0; var /** @type {?} */ lang = locale.split('-')[0].toLowerCase(); switch (lang) { case 'af': case 'asa': case 'az': case 'bem': case 'bez': case 'bg': case 'brx': case 'ce': case 'cgg': case 'chr': case 'ckb': case 'ee': case 'el': case 'eo': case 'es': case 'eu': case 'fo': case 'fur': case 'gsw': case 'ha': case 'haw': case 'hu': case 'jgo': case 'jmc': case 'ka': case 'kk': case 'kkj': case 'kl': case 'ks': case 'ksb': case 'ky': case 'lb': case 'lg': case 'mas': case 'mgo': case 'ml': case 'mn': case 'nb': case 'nd': case 'ne': case 'nn': case 'nnh': case 'nyn': case 'om': case 'or': case 'os': case 'ps': case 'rm': case 'rof': case 'rwk': case 'saq': case 'seh': case 'sn': case 'so': case 'sq': case 'ta': case 'te': case 'teo': case 'tk': case 'tr': case 'ug': case 'uz': case 'vo': case 'vun': case 'wae': case 'xog': if (n === 1) return Plural.One; return Plural.Other; case 'ak': case 'ln': case 'mg': case 'pa': case 'ti': if (n === Math.floor(n) && n >= 0 && n <= 1) return Plural.One; return Plural.Other; case 'am': case 'as': case 'bn': case 'fa': case 'gu': case 'hi': case 'kn': case 'mr': case 'zu': if (i === 0 || n === 1) return Plural.One; return Plural.Other; case 'ar': if (n === 0) return Plural.Zero; if (n === 1) return Plural.One; if (n === 2) return Plural.Two; if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10) return Plural.Few; if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99) return Plural.Many; return Plural.Other; case 'ast': case 'ca': case 'de': case 'en': case 'et': case 'fi': case 'fy': case 'gl': case 'it': case 'nl': case 'sv': case 'sw': case 'ur': case 'yi': if (i === 1 && v === 0) return Plural.One; return Plural.Other; case 'be': if (n % 10 === 1 && !(n % 100 === 11)) return Plural.One; if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 && !(n % 100 >= 12 && n % 100 <= 14)) return Plural.Few; if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14) return Plural.Many; return Plural.Other; case 'br': if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91)) return Plural.One; if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92)) return Plural.Two; if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) && !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 || n % 100 >= 90 && n % 100 <= 99)) return Plural.Few; if (!(n === 0) && n % 1e6 === 0) return Plural.Many; return Plural.Other; case 'bs': case 'hr': case 'sr': if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11)) return Plural.One; if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 && !(i % 100 >= 12 && i % 100 <= 14) || f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 && !(f % 100 >= 12 && f % 100 <= 14)) return Plural.Few; return Plural.Other; case 'cs': case 'sk': if (i === 1 && v === 0) return Plural.One; if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0) return Plural.Few; if (!(v === 0)) return Plural.Many; return Plural.Other; case 'cy': if (n === 0) return Plural.Zero; if (n === 1) return Plural.One; if (n === 2) return Plural.Two; if (n === 3) return Plural.Few; if (n === 6) return Plural.Many; return Plural.Other; case 'da': if (n === 1 || !(t === 0) && (i === 0 || i === 1)) return Plural.One; return Plural.Other; case 'dsb': case 'hsb': if (v === 0 && i % 100 === 1 || f % 100 === 1) return Plural.One; if (v === 0 && i % 100 === 2 || f % 100 === 2) return Plural.Two; if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4) return Plural.Few; return Plural.Other; case 'ff': case 'fr': case 'hy': case 'kab': if (i === 0 || i === 1) return Plural.One; return Plural.Other; case 'fil': if (v === 0 && (i === 1 || i === 2 || i === 3) || v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) || !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9)) return Plural.One; return Plural.Other; case 'ga': if (n === 1) return Plural.One; if (n === 2) return Plural.Two; if (n === Math.floor(n) && n >= 3 && n <= 6) return Plural.Few; if (n === Math.floor(n) && n >= 7 && n <= 10) return Plural.Many; return Plural.Other; case 'gd': if (n === 1 || n === 11) return Plural.One; if (n === 2 || n === 12) return Plural.Two; if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19)) return Plural.Few; return Plural.Other; case 'gv': if (v === 0 && i % 10 === 1) return Plural.One; if (v === 0 && i % 10 === 2) return Plural.Two; if (v === 0 && (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80)) return Plural.Few; if (!(v === 0)) return Plural.Many; return Plural.Other; case 'he': if (i === 1 && v === 0) return Plural.One; if (i === 2 && v === 0) return Plural.Two; if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0) return Plural.Many; return Plural.Other; case 'is': if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0)) return Plural.One; return Plural.Other; case 'ksh': if (n === 0) return Plural.Zero; if (n === 1) return Plural.One; return Plural.Other; case 'kw': case 'naq': case 'se': case 'smn': if (n === 1) return Plural.One; if (n === 2) return Plural.Two; return Plural.Other; case 'lag': if (n === 0) return Plural.Zero; if ((i === 0 || i === 1) && !(n === 0)) return Plural.One; return Plural.Other; case 'lt': if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19)) return Plural.One; if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 && !(n % 100 >= 11 && n % 100 <= 19)) return Plural.Few; if (!(f === 0)) return Plural.Many; return Plural.Other; case 'lv': case 'prg': if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 || v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19) return Plural.Zero; if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) || !(v === 2) && f % 10 === 1) return Plural.One; return Plural.Other; case 'mk': if (v === 0 && i % 10 === 1 || f % 10 === 1) return Plural.One; return Plural.Other; case 'mt': if (n === 1) return Plural.One; if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10) return Plural.Few; if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19) return Plural.Many; return Plural.Other; case 'pl': if (i === 1 && v === 0) return Plural.One; if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 && !(i % 100 >= 12 && i % 100 <= 14)) return Plural.Few; if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 || v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 || v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14) return Plural.Many; return Plural.Other; case 'pt': if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2)) return Plural.One; return Plural.Other; case 'ro': if (i === 1 && v === 0) return Plural.One; if (!(v === 0) || n === 0 || !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19) return Plural.Few; return Plural.Other; case 'ru': case 'uk': if (v === 0 && i % 10 === 1 && !(i % 100 === 11)) return Plural.One; if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 && !(i % 100 >= 12 && i % 100 <= 14)) return Plural.Few; if (v === 0 && i % 10 === 0 || v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 || v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14) return Plural.Many; return Plural.Other; case 'shi': if (i === 0 || n === 1) return Plural.One; if (n === Math.floor(n) && n >= 2 && n <= 10) return Plural.Few; return Plural.Other; case 'si': if (n === 0 || n === 1 || i === 0 && f === 1) return Plural.One; return Plural.Other; case 'sl': if (v === 0 && i % 100 === 1) return Plural.One; if (v === 0 && i % 100 === 2) return Plural.Two; if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0)) return Plural.Few; return Plural.Other; case 'tzm': if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99) return Plural.One; return Plural.Other; // When there is no specification, the default is always "other" // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules // > other (required—general plural form — also used if the language only has a single form) default: return Plural.Other; } } /** * @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 * @param {?} cookieStr * @param {?} name * @return {?} */ function parseCookieValue(cookieStr, name) { name = encodeURIComponent(name); for (var _i = 0, _a = cookieStr.split(';'); _i < _a.length; _i++) { var cookie = _a[_i]; var /** @type {?} */ eqIndex = cookie.indexOf('='); var _b = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)], cookieName = _b[0], cookieValue = _b[1]; if (cookieName.trim() === name) { return decodeURIComponent(cookieValue); } } return null; } /** * @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 */ /** * \@ngModule CommonModule * * \@whatItDoes Adds and removes CSS classes on an HTML element. * * \@howToUse * ``` * <some-element [ngClass]="'first second'">...</some-element> * * <some-element [ngClass]="['first', 'second']">...</some-element> * * <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element> * * <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element> * * <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element> * ``` * * \@description * * The CSS classes are updated as follows, depending on the type of the expression evaluation: * - `string` - the CSS classes listed in the string (space delimited) are added, * - `Array` - the CSS classes declared as Array elements are added, * - `Object` - keys are CSS classes that get added when the expression given in the value * evaluates to a truthy value, otherwise they are removed. * * \@stable */ var NgClass = (function () { /** * @param {?} _iterableDiffers * @param {?}