ngx-adal
Version:
Use Azure AD Library - ADAL in Angular 4 & 2. For Angular 4, use latest version 1.x.x. For Angular 2 use 0.3.1 version.
1,290 lines (1,268 loc) • 1.58 MB
JavaScript
"bundle";
System.registerDynamic("ngx-adal/services.js", ["./services/adal.service", "./services/authHttp.service"], true, function ($__require, exports, module) {
/**
* ngx-adal - Use Azure AD Library - ADAL in Angular 4 & 2. For Angular 4, use latest version 1.x.x. For Angular 2 use 0.3.1 version.
* @version v2.0.0
* @link https://github.com/sureshchahal/angular2-adal#readme
* @license MIT
*/
"use strict";
var global = this || self,
GLOBAL = global;
Object.defineProperty(exports, "__esModule", { value: true });
var adal_service_1 = $__require("./services/adal.service");
exports.AdalService = adal_service_1.AdalService;
var authHttp_service_1 = $__require("./services/authHttp.service");
exports.AuthHttp = authHttp_service_1.AuthHttp;
});
System.registerDynamic("ngx-adal/modules/adal.module.js", ["@angular/core", "./../services/adal.service"], true, function ($__require, exports, module) {
/**
* ngx-adal - Use Azure AD Library - ADAL in Angular 4 & 2. For Angular 4, use latest version 1.x.x. For Angular 2 use 0.3.1 version.
* @version v2.0.0
* @link https://github.com/sureshchahal/angular2-adal#readme
* @license MIT
*/
"use strict";
var global = this || self,
GLOBAL = global;
var __decorate = exports && exports.__decorate || function (decorators, target, key, desc) {
var c = arguments.length,
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = $__require("@angular/core");
var adal_service_1 = $__require("./../services/adal.service");
var AdalModule = /** @class */function () {
function AdalModule() {}
AdalModule = __decorate([core_1.NgModule({
imports: [],
exports: [],
declarations: [],
providers: [adal_service_1.AdalService]
})], AdalModule);
return AdalModule;
}();
exports.AdalModule = AdalModule;
});
/**
* @license Angular v5.2.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) : 'function' === 'function' && true ? System.registerDynamic('@angular/common/bundles/common.umd.js', ['@angular/core'], false, function ($__require, $__exports, $__module) {
return factory.call($__exports, $__exports, $__require('@angular/core'));
}) : factory((global.ng = global.ng || {}, global.ng.common = {}), global.ng.core);
})(this, function (exports, _angular_core) {
'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
};
function __extends(d, b) {
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
/**
* @license Angular v5.2.0
* (c) 2010-2018 Google, Inc. https://angular.io/
* License: MIT
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 = /** @class */function () {
function PlatformLocation() {}
return PlatformLocation;
}();
/**
* \@whatItDoes indicates when a location is initialized
* \@experimental
*/
var LOCATION_INITIALIZED = new _angular_core.InjectionToken('Location Initialized');
/**
* A serializable version of the event from onPopState or onHashChange
*
* \@experimental
* @record
*/
/**
* \@experimental
* @record
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 = /** @class */function () {
function LocationStrategy() {}
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 _angular_core.InjectionToken('appBaseHref');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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
* @record
*/
/**
* \@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 = /** @class */function () {
function Location(platformStrategy) {
var _this = this;
/**
* \@internal
*/
this._subject = new _angular_core.EventEmitter();
this._platformStrategy = platformStrategy;
var /** @type {?} */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
});
});
}
/**
* Returns the normalized URL path.
*/
// TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
// removed.
/**
* Returns the normalized URL path.
* @param {?=} includeHash
* @return {?}
*/
Location.prototype.path = /**
* Returns the normalized URL path.
* @param {?=} includeHash
* @return {?}
*/
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.
*/
/**
* Normalizes the given path and compares to the current normalized path.
* @param {?} path
* @param {?=} query
* @return {?}
*/
Location.prototype.isCurrentPathEqualTo = /**
* Normalizes the given path and compares to the current normalized path.
* @param {?} path
* @param {?=} query
* @return {?}
*/
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.
*/
/**
* Given a string representing a URL, returns the normalized URL path without leading or
* trailing slashes.
* @param {?} url
* @return {?}
*/
Location.prototype.normalize = /**
* Given a string representing a URL, returns the normalized URL path without leading or
* trailing slashes.
* @param {?} url
* @return {?}
*/
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.
*/
/**
* 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 = /**
* 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 {?}
*/
function (url) {
if (url && url[0] !== '/') {
url = '/' + url;
}
return this._platformStrategy.prepareExternalUrl(url);
};
// TODO: rename this method to pushState
/**
* Changes the browsers URL to the normalized version of the given URL, and pushes a
* new item onto the platform's history.
*/
/**
* 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 = /**
* 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 {?}
*/
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.
*/
/**
* 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 = /**
* 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 {?}
*/
function (path, query) {
if (query === void 0) {
query = '';
}
this._platformStrategy.replaceState(null, '', path, query);
};
/**
* Navigates forward in the platform's history.
*/
/**
* Navigates forward in the platform's history.
* @return {?}
*/
Location.prototype.forward = /**
* Navigates forward in the platform's history.
* @return {?}
*/
function () {
this._platformStrategy.forward();
};
/**
* Navigates back in the platform's history.
*/
/**
* Navigates back in the platform's history.
* @return {?}
*/
Location.prototype.back = /**
* Navigates back in the platform's history.
* @return {?}
*/
function () {
this._platformStrategy.back();
};
/**
* Subscribe to the platform's `popState` events.
*/
/**
* Subscribe to the platform's `popState` events.
* @param {?} onNext
* @param {?=} onThrow
* @param {?=} onReturn
* @return {?}
*/
Location.prototype.subscribe = /**
* Subscribe to the platform's `popState` events.
* @param {?} onNext
* @param {?=} onThrow
* @param {?=} onReturn
* @return {?}
*/
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 = /**
* Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as
* is.
* @param {?} params
* @return {?}
*/
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 = /**
* Given 2 parts of a url, join them with a slash if needed.
* @param {?} start
* @param {?} end
* @return {?}
*/
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 = /**
* 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 {?}
*/
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);
};
Location.decorators = [{ type: _angular_core.Injectable }];
/** @nocollapse */
Location.ctorParameters = function () {
return [{ type: LocationStrategy }];
};
return Location;
}();
/**
* @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$/, '');
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 = /** @class */function (_super) {
__extends(HashLocationStrategy, _super);
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 = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._platformLocation.onPopState(fn);
this._platformLocation.onHashChange(fn);
};
/**
* @return {?}
*/
HashLocationStrategy.prototype.getBaseHref = /**
* @return {?}
*/
function () {
return this._baseHref;
};
/**
* @param {?=} includeHash
* @return {?}
*/
HashLocationStrategy.prototype.path = /**
* @param {?=} includeHash
* @return {?}
*/
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 = /**
* @param {?} internal
* @return {?}
*/
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 = /**
* @param {?} state
* @param {?} title
* @param {?} path
* @param {?} queryParams
* @return {?}
*/
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 = /**
* @param {?} state
* @param {?} title
* @param {?} path
* @param {?} queryParams
* @return {?}
*/
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 = /**
* @return {?}
*/
function () {
this._platformLocation.forward();
};
/**
* @return {?}
*/
HashLocationStrategy.prototype.back = /**
* @return {?}
*/
function () {
this._platformLocation.back();
};
HashLocationStrategy.decorators = [{ type: _angular_core.Injectable }];
/** @nocollapse */
HashLocationStrategy.ctorParameters = function () {
return [{ type: PlatformLocation }, { type: undefined, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [APP_BASE_HREF] }] }];
};
return HashLocationStrategy;
}(LocationStrategy);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 = /** @class */function (_super) {
__extends(PathLocationStrategy, _super);
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 = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._platformLocation.onPopState(fn);
this._platformLocation.onHashChange(fn);
};
/**
* @return {?}
*/
PathLocationStrategy.prototype.getBaseHref = /**
* @return {?}
*/
function () {
return this._baseHref;
};
/**
* @param {?} internal
* @return {?}
*/
PathLocationStrategy.prototype.prepareExternalUrl = /**
* @param {?} internal
* @return {?}
*/
function (internal) {
return Location.joinWithSlash(this._baseHref, internal);
};
/**
* @param {?=} includeHash
* @return {?}
*/
PathLocationStrategy.prototype.path = /**
* @param {?=} includeHash
* @return {?}
*/
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 = /**
* @param {?} state
* @param {?} title
* @param {?} url
* @param {?} queryParams
* @return {?}
*/
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 = /**
* @param {?} state
* @param {?} title
* @param {?} url
* @param {?} queryParams
* @return {?}
*/
function (state, title, url, queryParams) {
var /** @type {?} */externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));
this._platformLocation.replaceState(state, title, externalUrl);
};
/**
* @return {?}
*/
PathLocationStrategy.prototype.forward = /**
* @return {?}
*/
function () {
this._platformLocation.forward();
};
/**
* @return {?}
*/
PathLocationStrategy.prototype.back = /**
* @return {?}
*/
function () {
this._platformLocation.back();
};
PathLocationStrategy.decorators = [{ type: _angular_core.Injectable }];
/** @nocollapse */
PathLocationStrategy.ctorParameters = function () {
return [{ type: PlatformLocation }, { type: undefined, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [APP_BASE_HREF] }] }];
};
return PathLocationStrategy;
}(LocationStrategy);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
/**
* \@internal
*/
var CURRENCIES = {
'AOA': [, 'Kz'],
'ARS': [, '$'],
'AUD': ['A$', '$'],
'BAM': [, 'KM'],
'BBD': [, '$'],
'BDT': [, '৳'],
'BMD': [, '$'],
'BND': [, '$'],
'BOB': [, 'Bs'],
'BRL': ['R$'],
'BSD': [, '$'],
'BWP': [, 'P'],
'BYN': [, 'р.'],
'BZD': [, '$'],
'CAD': ['CA$', '$'],
'CLP': [, '$'],
'CNY': ['CN¥', '¥'],
'COP': [, '$'],
'CRC': [, '₡'],
'CUC': [, '$'],
'CUP': [, '$'],
'CZK': [, 'Kč'],
'DKK': [, 'kr'],
'DOP': [, '$'],
'EGP': [, 'E£'],
'ESP': [, '₧'],
'EUR': ['€'],
'FJD': [, '$'],
'FKP': [, '£'],
'GBP': ['£'],
'GEL': [, '₾'],
'GIP': [, '£'],
'GNF': [, 'FG'],
'GTQ': [, 'Q'],
'GYD': [, '$'],
'HKD': ['HK$', '$'],
'HNL': [, 'L'],
'HRK': [, 'kn'],
'HUF': [, 'Ft'],
'IDR': [, 'Rp'],
'ILS': ['₪'],
'INR': ['₹'],
'ISK': [, 'kr'],
'JMD': [, '$'],
'JPY': ['¥'],
'KHR': [, '៛'],
'KMF': [, 'CF'],
'KPW': [, '₩'],
'KRW': ['₩'],
'KYD': [, '$'],
'KZT': [, '₸'],
'LAK': [, '₭'],
'LBP': [, 'L£'],
'LKR': [, 'Rs'],
'LRD': [, '$'],
'LTL': [, 'Lt'],
'LVL': [, 'Ls'],
'MGA': [, 'Ar'],
'MMK': [, 'K'],
'MNT': [, '₮'],
'MUR': [, 'Rs'],
'MXN': ['MX$', '$'],
'MYR': [, 'RM'],
'NAD': [, '$'],
'NGN': [, '₦'],
'NIO': [, 'C$'],
'NOK': [, 'kr'],
'NPR': [, 'Rs'],
'NZD': ['NZ$', '$'],
'PHP': [, '₱'],
'PKR': [, 'Rs'],
'PLN': [, 'zł'],
'PYG': [, '₲'],
'RON': [, 'lei'],
'RUB': [, '₽'],
'RUR': [, 'р.'],
'RWF': [, 'RF'],
'SBD': [, '$'],
'SEK': [, 'kr'],
'SGD': [, '$'],
'SHP': [, '£'],
'SRD': [, '$'],
'SSP': [, '£'],
'STD': [, 'Db'],
'SYP': [, '£'],
'THB': [, '฿'],
'TOP': [, 'T$'],
'TRY': [, '₺'],
'TTD': [, '$'],
'TWD': ['NT$', '$'],
'UAH': [, '₴'],
'USD': ['$'],
'UYU': [, '$'],
'VEF': [, 'Bs'],
'VND': ['₫'],
'XAF': ['FCFA'],
'XCD': ['EC$', '$'],
'XOF': ['CFA'],
'XPF': ['CFPF'],
'ZAR': [, 'R'],
'ZMW': [, 'ZK']
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
/**
* @param {?} n
* @return {?}
*/
function converter(n) {
var /** @type {?} */i = Math.floor(Math.abs(n)),
/** @type {?} */v = n.toString().replace(/^[^.]*\.?/, '').length;
if (i === 1 && v === 0) return 1;
return 5;
}
var localeEn = ['en', [['a', 'p'], ['AM', 'PM']], [['AM', 'PM'],,], [['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']],, [['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']],, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0], ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'], ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}',, '{1} \'at\' {0}'], ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'], ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', converter];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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 i18n support is experimental.
*/
var LOCALE_DATA = {};
/**
* Register global data to be used internally by Angular. See the
* {\@linkDocs guide/i18n#i18n-pipes "I18n guide"} to know how to import additional locale data.
*
* \@experimental i18n support is experimental.
* @param {?} data
* @param {?=} localeId
* @param {?=} extraData
* @return {?}
*/
function registerLocaleData(data, localeId, extraData) {
if (typeof localeId !== 'string') {
extraData = localeId;
localeId = data[0 /* LocaleId */];
}
localeId = localeId.toLowerCase().replace(/_/g, '-');
LOCALE_DATA[localeId] = data;
if (extraData) {
LOCALE_DATA[localeId][18 /* ExtraData */] = extraData;
}
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @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
*/
/** @enum {number} */
var NumberFormatStyle = {
Decimal: 0,
Percent: 1,
Currency: 2,
Scientific: 3
};
NumberFormatStyle[NumberFormatStyle.Decimal] = "Decimal";
NumberFormatStyle[NumberFormatStyle.Percent] = "Percent";
NumberFormatStyle[NumberFormatStyle.Currency] = "Currency";
NumberFormatStyle[NumberFormatStyle.Scientific] = "Scientific";
/** @enum {number} */
var Plural = {
Zero: 0,
One: 1,
Two: 2,
Few: 3,
Many: 4,
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";
/** @enum {number} */
var FormStyle = {
Format: 0,
Standalone: 1
};
FormStyle[FormStyle.Format] = "Format";
FormStyle[FormStyle.Standalone] = "Standalone";
/** @enum {number} */
var TranslationWidth = {
Narrow: 0,
Abbreviated: 1,
Wide: 2,
Short: 3
};
TranslationWidth[TranslationWidth.Narrow] = "Narrow";
TranslationWidth[TranslationWidth.Abbreviated] = "Abbreviated";
TranslationWidth[TranslationWidth.Wide] = "Wide";
TranslationWidth[TranslationWidth.Short] = "Short";
/** @enum {number} */
var FormatWidth = {
Short: 0,
Medium: 1,
Long: 2,
Full: 3
};
FormatWidth[FormatWidth.Short] = "Short";
FormatWidth[FormatWidth.Medium] = "Medium";
FormatWidth[FormatWidth.Long] = "Long";
FormatWidth[FormatWidth.Full] = "Full";
/** @enum {number} */
var NumberSymbol = {
Decimal: 0,
Group: 1,
List: 2,
PercentSign: 3,
PlusSign: 4,
MinusSign: 5,
Exponential: 6,
SuperscriptingExponent: 7,
PerMille: 8,
Infinity: 9,
NaN: 10,
TimeSeparator: 11,
CurrencyDecimal: 12,
CurrencyGroup: 13
};
NumberSymbol[NumberSymbol.Decimal] = "Decimal";
NumberSymbol[NumberSymbol.Group] = "Group";
NumberSymbol[NumberSymbol.List] = "List";
NumberSymbol[NumberSymbol.PercentSign] = "PercentSign";
NumberSymbol[NumberSymbol.PlusSign] = "PlusSign";
NumberSymbol[NumberSymbol.MinusSign] = "MinusSign";
NumberSymbol[NumberSymbol.Exponential] = "Exponential";
NumberSymbol[NumberSymbol.SuperscriptingExponent] = "SuperscriptingExponent";
NumberSymbol[NumberSymbol.PerMille] = "PerMille";
NumberSymbol[NumberSymbol.Infinity] = "Infinity";
NumberSymbol[NumberSymbol.NaN] = "NaN";
NumberSymbol[NumberSymbol.TimeSeparator] = "TimeSeparator";
NumberSymbol[NumberSymbol.CurrencyDecimal] = "CurrencyDecimal";
NumberSymbol[NumberSymbol.CurrencyGroup] = "CurrencyGroup";
/** @enum {number} */
var WeekDay = {
Sunday: 0,
Monday: 1,
Tuesday: 2,
Wednesday: 3,
Thursday: 4,
Friday: 5,
Saturday: 6
};
WeekDay[WeekDay.Sunday] = "Sunday";
WeekDay[WeekDay.Monday] = "Monday";
WeekDay[WeekDay.Tuesday] = "Tuesday";
WeekDay[WeekDay.Wednesday] = "Wednesday";
WeekDay[WeekDay.Thursday] = "Thursday";
WeekDay[WeekDay.Friday] = "Friday";
WeekDay[WeekDay.Saturday] = "Saturday";
/**
* The locale id for the chosen locale (e.g `en-GB`).
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @return {?}
*/
function getLocaleId(locale) {
return findLocaleData(locale)[0 /* LocaleId */];
}
/**
* Periods of the day (e.g. `[AM, PM]` for en-US).
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @param {?} formStyle
* @param {?} width
* @return {?}
*/
function getLocaleDayPeriods(locale, formStyle, width) {
var /** @type {?} */data = findLocaleData(locale);
var /** @type {?} */amPmData = /** @type {?} */[data[1 /* DayPeriodsFormat */], data[2 /* DayPeriodsStandalone */]];
var /** @type {?} */amPm = getLastDefinedValue(amPmData, formStyle);
return getLastDefinedValue(amPm, width);
}
/**
* Days of the week for the Gregorian calendar (e.g. `[Sunday, Monday, ... Saturday]` for en-US).
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @param {?} formStyle
* @param {?} width
* @return {?}
*/
function getLocaleDayNames(locale, formStyle, width) {
var /** @type {?} */data = findLocaleData(locale);
var /** @type {?} */daysData = /** @type {?} */[data[3 /* DaysFormat */], data[4 /* DaysStandalone */]];
var /** @type {?} */days = getLastDefinedValue(daysData, formStyle);
return getLastDefinedValue(days, width);
}
/**
* Months of the year for the Gregorian calendar (e.g. `[January, February, ...]` for en-US).
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @param {?} formStyle
* @param {?} width
* @return {?}
*/
function getLocaleMonthNames(locale, formStyle, width) {
var /** @type {?} */data = findLocaleData(locale);
var /** @type {?} */monthsData = /** @type {?} */[data[5 /* MonthsFormat */], data[6 /* MonthsStandalone */]];
var /** @type {?} */months = getLastDefinedValue(monthsData, formStyle);
return getLastDefinedValue(months, width);
}
/**
* Eras for the Gregorian calendar (e.g. AD/BC).
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @param {?} width
* @return {?}
*/
function getLocaleEraNames(locale, width) {
var /** @type {?} */data = findLocaleData(locale);
var /** @type {?} */erasData = /** @type {?} */data[7 /* Eras */];
return getLastDefinedValue(erasData, width);
}
/**
* First day of the week for this locale, based on english days (Sunday = 0, Monday = 1, ...).
* For example in french the value would be 1 because the first day of the week is Monday.
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @return {?}
*/
function getLocaleFirstDayOfWeek(locale) {
var /** @type {?} */data = findLocaleData(locale);
return data[8 /* FirstDayOfWeek */];
}
/**
* Range of days in the week that represent the week-end for this locale, based on english days
* (Sunday = 0, Monday = 1, ...).
* For example in english the value would be [6,0] for Saturday to Sunday.
*
* \@experimental i18n support is experimental.
* @param {?} locale
* @return {?}
*/
function getLocaleWeekEndRange(locale) {
var /** @type {?} */data = findLocaleData(locale);
return data[9 /* WeekendRange */];
}
/**
* Date format that depends on the locale.
*
* There are four basic date formats:
* - `full` should contain long-weekday (EEEE), year (y), long-month (MMMM), day (d).
*
* For example, English uses `EEEE, MMMM d, y`, corresponding to a date like
* "Tuesday, September 14, 1999".
*
* - `long` should contain year, long-month, day.
*
* For example, `MMMM d, y`, corresponding to a date like "September 14, 1999".
*
* - `medium` should contain year, abbreviated-month (MMM), day.
*
* For example, `MMM d, y`, corr