Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: @angular/router @ 7.2.7 .. 7.2.8

bundles/router-testing.umd.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

bundles/router-testing.umd.min.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

bundles/router-testing.umd.min.js.map

@@ -1 +1 @@
-{"version":3,"sources":["packages/router/router-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","testing","common","core","this","__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","SpyNgModuleFactoryLoader","compiler","_stubbedModules","prototype","get","set","modules","e_1","_a","res","_b","__values","o","m","Symbol","iterator","call","next","value","done","keys","_c","t","compileModuleAsync","e_1_1","error","return","enumerable","configurable","load","path","Promise","reject","Error","Injectable","__metadata","metadataKey","metadataValue","metadata","Compiler","setupTestingRouter","urlSerializer","contexts","location","loader","injector","routes","opts","urlHandlingStrategy","router$$1","Router","ɵflatten","isUrlHandlingStrategy","malformedUriErrorHandler","paramsInheritanceStrategy","RouterTestingModule","RouterTestingModule_1","withRoutes","config","ngModule","providers","provideRoutes","provide","ROUTER_CONFIGURATION","useValue","NgModule","RouterModule","ɵROUTER_PROVIDERS","Location","useClass","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","useFactory","deps","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","useExisting","NoPreloading"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,2BAA4BA,QAAQ,iBAAkBA,QAAQ,oBAChK,mBAAXC,QAAyBA,OAAOC,IA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AAKO,6BAInDN,IACAC,EAAUD,oBAAsBA,GAE7BC,EA4BX,IAAIM,EAAqC,WACrC,SAASA,KAYT,IAAIC,EAmBJ,OA7BAA,EAAwBD,EACxBA,EAAoBE,WAAa,SAAUX,EAAQY,GAC/C,OACIC,SAAUH,EACVI,WACIjF,EAAOkF,cAAcf,IACnBgB,QAASnF,EAAOoF,qBAAsBC,SAAUN,UAKxCF,EAAwBxE,GAC1CF,EAAKmF,UACD7F,SAAUO,EAAOuF,cACjBN,WACIjF,EAAOwF,mBAAqBL,QAASjF,EAAOuF,SAAUC,SAAUzF,EAAQ0F,cACtER,QAASjF,EAAO0F,iBAAkBF,SAAUzF,EAAQ4F,uBACpDV,QAAShF,EAAK2F,sBAAuBJ,SAAUrE,IAC7C8D,QAASnF,EAAOuE,OAChBwB,WAAYlC,EACZmC,MACIhG,EAAOiG,cAAejG,EAAOkG,uBAAwBhG,EAAOuF,SAAUtF,EAAK2F,sBAAuB3F,EAAKyD,SAAUzD,EAAKgG,SACtHnG,EAAOoG,OAAQpG,EAAOoF,sBAAuBpF,EAAOqG,oBAAqB,IAAIlG,EAAKmG,aAGxFnB,QAASnF,EAAOuG,mBAAoBC,YAAaxG,EAAOyG,cAAgBzG,EAAOkF,sBAG1FN,GA/BiC;;;;;;;;;;;;;;;;;;;;;OAgExCnF,EAAQ4B,yBAA2BA,EACnC5B,EAAQoE,mBAAqBA,EAC7BpE,EAAQmF,oBAAsBA,EAE9B7D,OAAOK,eAAe3B,EAAS,cAAgB8C,OAAO","sourcesContent":["/**\n * @license Angular v7.2.7\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :\n typeof define === 'function' && define.amd ? define('@angular/router/testing', ['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.testing = {}), global.ng.common, global.ng.common.testing, global.ng.core, global.ng.router));\n}(this, function (exports, common, testing, core, router) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n var SpyNgModuleFactoryLoader = /** @class */ (function () {\n function SpyNgModuleFactoryLoader(compiler) {\n this.compiler = compiler;\n /**\n * @docsNotRequired\n */\n this._stubbedModules = {};\n }\n Object.defineProperty(SpyNgModuleFactoryLoader.prototype, \"stubbedModules\", {\n /**\n * @docsNotRequired\n */\n get: function () { return this._stubbedModules; },\n /**\n * @docsNotRequired\n */\n set: function (modules) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(Object.keys(modules)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this._stubbedModules = res;\n },\n enumerable: true,\n configurable: true\n });\n SpyNgModuleFactoryLoader.prototype.load = function (path) {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n }\n else {\n return Promise.reject(new Error(\"Cannot find module \" + path));\n }\n };\n SpyNgModuleFactoryLoader = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [core.Compiler])\n ], SpyNgModuleFactoryLoader);\n return SpyNgModuleFactoryLoader;\n }());\n function isUrlHandlingStrategy(opts) {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n }\n /**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\n function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {\n var router$$1 = new router.Router(null, urlSerializer, contexts, location, injector, loader, compiler, router.ɵflatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router$$1.urlHandlingStrategy = opts;\n }\n else {\n // Handle ExtraOptions\n if (opts.malformedUriErrorHandler) {\n router$$1.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.paramsInheritanceStrategy) {\n router$$1.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n if (urlHandlingStrategy) {\n router$$1.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router$$1;\n }\n /**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n var RouterTestingModule = /** @class */ (function () {\n function RouterTestingModule() {\n }\n RouterTestingModule_1 = RouterTestingModule;\n RouterTestingModule.withRoutes = function (routes, config) {\n return {\n ngModule: RouterTestingModule_1,\n providers: [\n router.provideRoutes(routes),\n { provide: router.ROUTER_CONFIGURATION, useValue: config ? config : {} },\n ]\n };\n };\n var RouterTestingModule_1;\n RouterTestingModule = RouterTestingModule_1 = __decorate([\n core.NgModule({\n exports: [router.RouterModule],\n providers: [\n router.ɵROUTER_PROVIDERS, { provide: common.Location, useClass: testing.SpyLocation },\n { provide: common.LocationStrategy, useClass: testing.MockLocationStrategy },\n { provide: core.NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, {\n provide: router.Router,\n useFactory: setupTestingRouter,\n deps: [\n router.UrlSerializer, router.ChildrenOutletContexts, common.Location, core.NgModuleFactoryLoader, core.Compiler, core.Injector,\n router.ROUTES, router.ROUTER_CONFIGURATION, [router.UrlHandlingStrategy, new core.Optional()]\n ]\n },\n { provide: router.PreloadingStrategy, useExisting: router.NoPreloading }, router.provideRoutes([])\n ]\n })\n ], RouterTestingModule);\n return RouterTestingModule;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.SpyNgModuleFactoryLoader = SpyNgModuleFactoryLoader;\n exports.setupTestingRouter = setupTestingRouter;\n exports.RouterTestingModule = RouterTestingModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=router-testing.umd.js.map\n"]}
\ No newline at end of file
+{"version":3,"sources":["packages/router/router-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","testing","common","core","this","__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","SpyNgModuleFactoryLoader","compiler","_stubbedModules","prototype","get","set","modules","e_1","_a","res","_b","__values","o","m","Symbol","iterator","call","next","value","done","keys","_c","t","compileModuleAsync","e_1_1","error","return","enumerable","configurable","load","path","Promise","reject","Error","Injectable","__metadata","metadataKey","metadataValue","metadata","Compiler","setupTestingRouter","urlSerializer","contexts","location","loader","injector","routes","opts","urlHandlingStrategy","router$$1","Router","ɵflatten","isUrlHandlingStrategy","malformedUriErrorHandler","paramsInheritanceStrategy","RouterTestingModule","RouterTestingModule_1","withRoutes","config","ngModule","providers","provideRoutes","provide","ROUTER_CONFIGURATION","useValue","NgModule","RouterModule","ɵROUTER_PROVIDERS","Location","useClass","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","useFactory","deps","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","useExisting","NoPreloading"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,2BAA4BA,QAAQ,iBAAkBA,QAAQ,oBAChK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,2BAA4B,UAAW,kBAAmB,0BAA2B,gBAAiB,mBAAoBJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,OAAUR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,WAAcT,EAAOQ,GAAGC,OAAOC,YAAeV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGG,OAAOD,QAASV,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,QAHrN,CAIEI,KAAM,SAAUX,EAASS,EAAQD,EAASE,EAAMH,GAAU,aAiBxD,SAASK,EAAWC,EAAYC,EAAQC,EAAKC,GACzC,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ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G,EAAKmG,aAGxFnB,QAASnF,EAAOuG,mBAAoBC,YAAaxG,EAAOyG,cAAgBzG,EAAOkF,sBAG1FN,GA/BiC;;;;;;;;;;;;;;;;;;;;;OAgExCnF,EAAQ4B,yBAA2BA,EACnC5B,EAAQoE,mBAAqBA,EAC7BpE,EAAQmF,oBAAsBA,EAE9B7D,OAAOK,eAAe3B,EAAS,cAAgB8C,OAAO","sourcesContent":["/**\n * @license Angular v7.2.8\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :\n typeof define === 'function' && define.amd ? define('@angular/router/testing', ['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.testing = {}), global.ng.common, global.ng.common.testing, global.ng.core, global.ng.router));\n}(this, function (exports, common, testing, core, router) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n var SpyNgModuleFactoryLoader = /** @class */ (function () {\n function SpyNgModuleFactoryLoader(compiler) {\n this.compiler = compiler;\n /**\n * @docsNotRequired\n */\n this._stubbedModules = {};\n }\n Object.defineProperty(SpyNgModuleFactoryLoader.prototype, \"stubbedModules\", {\n /**\n * @docsNotRequired\n */\n get: function () { return this._stubbedModules; },\n /**\n * @docsNotRequired\n */\n set: function (modules) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(Object.keys(modules)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this._stubbedModules = res;\n },\n enumerable: true,\n configurable: true\n });\n SpyNgModuleFactoryLoader.prototype.load = function (path) {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n }\n else {\n return Promise.reject(new Error(\"Cannot find module \" + path));\n }\n };\n SpyNgModuleFactoryLoader = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [core.Compiler])\n ], SpyNgModuleFactoryLoader);\n return SpyNgModuleFactoryLoader;\n }());\n function isUrlHandlingStrategy(opts) {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n }\n /**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\n function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {\n var router$$1 = new router.Router(null, urlSerializer, contexts, location, injector, loader, compiler, router.ɵflatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router$$1.urlHandlingStrategy = opts;\n }\n else {\n // Handle ExtraOptions\n if (opts.malformedUriErrorHandler) {\n router$$1.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.paramsInheritanceStrategy) {\n router$$1.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n if (urlHandlingStrategy) {\n router$$1.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router$$1;\n }\n /**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n var RouterTestingModule = /** @class */ (function () {\n function RouterTestingModule() {\n }\n RouterTestingModule_1 = RouterTestingModule;\n RouterTestingModule.withRoutes = function (routes, config) {\n return {\n ngModule: RouterTestingModule_1,\n providers: [\n router.provideRoutes(routes),\n { provide: router.ROUTER_CONFIGURATION, useValue: config ? config : {} },\n ]\n };\n };\n var RouterTestingModule_1;\n RouterTestingModule = RouterTestingModule_1 = __decorate([\n core.NgModule({\n exports: [router.RouterModule],\n providers: [\n router.ɵROUTER_PROVIDERS, { provide: common.Location, useClass: testing.SpyLocation },\n { provide: common.LocationStrategy, useClass: testing.MockLocationStrategy },\n { provide: core.NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, {\n provide: router.Router,\n useFactory: setupTestingRouter,\n deps: [\n router.UrlSerializer, router.ChildrenOutletContexts, common.Location, core.NgModuleFactoryLoader, core.Compiler, core.Injector,\n router.ROUTES, router.ROUTER_CONFIGURATION, [router.UrlHandlingStrategy, new core.Optional()]\n ]\n },\n { provide: router.PreloadingStrategy, useExisting: router.NoPreloading }, router.provideRoutes([])\n ]\n })\n ], RouterTestingModule);\n return RouterTestingModule;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.SpyNgModuleFactoryLoader = SpyNgModuleFactoryLoader;\n exports.setupTestingRouter = setupTestingRouter;\n exports.RouterTestingModule = RouterTestingModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=router-testing.umd.js.map\n"]}
\ No newline at end of file

bundles/router.umd.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@@ -5805,7 +5805,7 @@
/**
* @publicApi
*/
- var VERSION = new core.Version('7.2.7');
+ var VERSION = new core.Version('7.2.8');
/**
* @license

bundles/router.umd.js.map

@@ -1 +1 @@
-{"version":3,"file":"router.umd.js","sources":["../../../../../../../../../../external/ngdeps/node_modules/tslib/tslib.es6.js","../../../../../packages/router/src/events.ts","../../../../../packages/router/src/components/empty_outlet.ts","../../../../../packages/router/src/shared.ts","../../../../../packages/router/src/config.ts","../../../../../packages/router/src/utils/collection.ts","../../../../../packages/router/src/url_tree.ts","../../../../../packages/router/src/utils/tree.ts","../../../../../packages/router/src/router_state.ts","../../../../../packages/router/src/create_router_state.ts","../../../../../packages/router/src/create_url_tree.ts","../../../../../packages/router/src/operators/activate_routes.ts","../../../../../packages/router/src/utils/type_guards.ts","../../../../../packages/router/src/apply_redirects.ts","../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../packages/router/src/utils/preactivation.ts","../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../packages/router/src/operators/check_guards.ts","../../../../../packages/router/src/recognize.ts","../../../../../packages/router/src/operators/recognize.ts","../../../../../packages/router/src/operators/resolve_data.ts","../../../../../packages/router/src/operators/switch_tap.ts","../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../packages/router/src/router_config_loader.ts","../../../../../packages/router/src/url_handling_strategy.ts","../../../../../packages/router/src/router.ts","../../../../../packages/router/src/directives/router_link.ts","../../../../../packages/router/src/directives/router_link_active.ts","../../../../../packages/router/src/router_outlet_context.ts","../../../../../packages/router/src/directives/router_outlet.ts","../../../../../packages/router/src/router_preloader.ts","../../../../../packages/router/src/router_scroller.ts","../../../../../packages/router/src/router_module.ts","../../../../../packages/router/src/version.ts","../../../../../packages/router/src/private_export.ts","../../../../../packages/router/src/index.ts","../../../../../packages/router/public_api.ts","../../../../../packages/router/index.ts","../../../../../packages/router/router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * @description\n *\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** @docsNotRequired */\n public id: number,\n /** @docsNotRequired */\n public url: string) {}\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n /**\n * This reflects the state object that was previously supplied to the pushState call. This is\n * not null only when the navigation is triggered by a popstate event.\n *\n * The router assigns a navigationId to every router transition/navigation. Even when the user\n * clicks on the back button in the browser, a new navigation id will be created. So from\n * the perspective of the router, the router never \"goes back\". By using the `restoredState`\n * and its navigationId, you can implement behavior that differentiates between creating new\n * states\n * and popstate events. In the latter case you can restore some remembered state (e.g., scroll\n * position).\n *\n * See {@link NavigationExtras} for more information.\n */\n restoredState?: {[k: string]: any, navigationId: number}|null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any, navigationId: number}|null = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public reason: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\nexport class Scroll {\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd,\n\n /** @docsNotRequired */\n readonly position: [number, number]|null,\n\n /** @docsNotRequired */\n readonly anchor: string|null) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a router event, allowing you to track the lifecycle of the router.\n *\n * The sequence of router events is:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class EmptyOutletComponent {\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of parameters.\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any\n};\n\n/**\n * Matrix and Query parameters.\n *\n * `ParamMap` makes it easier to work with parameters as they could have either a single value or\n * multiple value. Because this should be known by the user, calling `get` or `getAll` returns the\n * correct type (either `string` or `string[]`).\n *\n * The API is inspired by the URLSearchParams interface.\n * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n *\n * @publicApi\n */\nexport interface ParamMap {\n has(name: string): boolean;\n /**\n * Return a single value for the given parameter name:\n * - the value when the parameter has a single value,\n * - the first value if the parameter has multiple values,\n * - `null` when there is no such parameter.\n */\n get(name: string): string|null;\n /**\n * Return an array of values for the given parameter name.\n *\n * If there is no such parameter, an empty array is returned.\n */\n getAll(name: string): string[];\n\n /** Name of the parameters */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) { this.params = params || {}; }\n\n has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n get(name: string): string|null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n const error = Error('NavigationCancelingError: ' + message);\n (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n const parts = route.path !.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Represents router configuration.\n *\n * `Routes` is an array of route configurations. Each one has the following properties:\n *\n * - `path` is a string that uses the route matcher DSL.\n * - `pathMatch` is a string that specifies the matching strategy. Options are `prefix` (default)\n * and `full`. See [Matching Strategy](#matching-strategy) below for more information.\n * - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.\n * - `component` is a component type.\n * - `redirectTo` is the url fragment which will replace the current matched segment.\n * - `outlet` is the name of the outlet the component should be placed into.\n * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See\n * `CanActivate` for more info.\n * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See\n * `CanActivateChild` for more info.\n * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See\n * `CanDeactivate` for more info.\n * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See\n * `CanLoad` for more info.\n * - `data` is additional data provided to the component via `ActivatedRoute`.\n * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more\n * info.\n * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only\n * when the matrix parameters of the route change. Options include:\n * - `paramsChange` (default) - Run guards and resolvers when path or matrix params change. This\n * mode ignores query param changes.\n * - `paramsOrQueryParamsChange` - Guards and resolvers will run when any parameters change. This\n * includes path, matrix, and query params.\n * - `pathParamsChange` - Run guards and resolvers path or any path params change. This mode is\n * useful if you want to ignore changes to all optional parameters such as query *and* matrix\n * params.\n * - `pathParamsOrQueryParamsChange` - Same as `pathParamsChange`, but also rerun when any query\n * param changes\n * - `always` - Run guards and resolvers on every navigation.\n * - (from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean - Use a predicate\n * function when none of the pre-configured modes fit the needs of the application. An example\n * might be when you need to ignore updates to a param such as `sortDirection`, but need to\n * reload guards and resolvers when changing the `searchRoot` param.\n * - `children` is an array of child route definitions.\n * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more\n * info.\n *\n * @usageNotes\n * ### Simple Configuration\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/bob`, the router will create the team component with the user\n * component in it.\n *\n * ### Multiple Outlets\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * When navigating to `/team/11(aux:chat/jim)`, the router will create the team component next to\n * the chat component. The chat component will be placed into the aux outlet.\n *\n * ### Wild Cards\n *\n * ```\n * [{\n * path: '**',\n * component: Sink\n * }]\n * ```\n *\n * Regardless of where you navigate to, the router will instantiate the sink component.\n *\n * ### Redirects\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to '/team/11/legacy/user/jim', the router will change the url to\n * '/team/11/user/jim', and then will instantiate the team component with the user component\n * in it.\n *\n * If the `redirectTo` value starts with a '/', then it is an absolute redirect. E.g., if in the\n * example above we change the `redirectTo` to `/user/:name`, the result url will be '/user/jim'.\n *\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any url segments. Let's look at the following configuration:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11`, the router will instantiate the AllUsers component.\n *\n * Empty-path routes can have children.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/jim`, the router will instantiate the wrapper component with\n * the user component in it.\n *\n * An empty path route inherits its parent's params and data. This is because it cannot have its\n * own params, and, as a result, it often uses its parent's params and data as its own.\n *\n * ### Matching Strategy\n *\n * By default the router will look at what is left in the url, and check if it starts with\n * the specified path (e.g., `/team/11/user` starts with `team/:id`).\n *\n * We can change the matching strategy to make sure that the path covers the whole unconsumed url,\n * which is akin to `unconsumedUrl === path` or `$` regular expressions.\n *\n * This is particularly important when redirecting empty-path routes.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * Since an empty path is a prefix of any url, even when navigating to '/main', the router will\n * still apply the redirect.\n *\n * If `pathMatch: full` is provided, the router will apply the redirect if and only if navigating to\n * '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * It is useful at times to have the ability to share parameters between sibling components.\n *\n * Say we have two components--ChildCmp and AuxCmp--that we want to put next to each other and both\n * of them require some id parameter.\n *\n * One way to do that would be to have a bogus parent component, so both the siblings can get the id\n * parameter from it. This is not ideal. Instead, you can use a componentless route.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * So when navigating to `parent/10/(a//aux:b)`, the route will instantiate the main child and aux\n * child components next to each other. In this example, the application component\n * has to have the primary and aux outlets defined.\n *\n * The router will also merge the `params`, `data`, and `resolve` of the componentless parent into\n * the `params`, `data`, and `resolve` of the children. This is done because there is no component\n * that can inject the activated route of the componentless parent.\n *\n * This is especially useful when child components are defined as follows:\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * With this configuration in place, navigating to '/parent/10' will create the main child and aux\n * components.\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up our application load time by splitting it into multiple bundles, and\n * loading them on demand. The router is designed to make lazy loading simple and easy. Instead of\n * providing the children property, you can provide the `loadChildren` property, as follows:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * loadChildren: 'team'\n * }]\n * ```\n *\n * The router will use registered NgModuleFactoryLoader to fetch an NgModule associated with 'team'.\n * Then it will extract the set of routes defined in that NgModule, and will transparently add\n * those routes to the main configuration.\n *\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * @description Represents the results of the URL matching.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * @description\n *\n * A function matching URLs\n *\n * A custom URL matcher can be provided when a combination of `path` and `pathMatch` isn't\n * expressive enough.\n *\n * For instance, the following matcher matches html files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n UrlMatchResult;\n\n/**\n * @description\n *\n * Represents the static data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type Data = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * Represents the resolved data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type ResolveData = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildren = string | LoadChildrenCallback;\n\n/**\n * @description\n *\n * The type of `queryParamsHandling`.\n *\n * See `RouterLink` for more details.\n *\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * @description\n *\n * The type of `runGuardsAndResolvers`.\n *\n * See `Routes` for more details.\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport interface Route {\n path?: string;\n pathMatch?: string;\n matcher?: UrlMatcher;\n component?: Type<any>;\n redirectTo?: string;\n outlet?: string;\n canActivate?: any[];\n canActivateChild?: any[];\n canDeactivate?: any[];\n canLoad?: any[];\n data?: Data;\n resolve?: ResolveData;\n children?: Routes;\n loadChildren?: LoadChildren;\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n /**\n * Filled for routes with `loadChildren` once the module has been loaded\n * @internal\n */\n _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n if (!route) {\n throw new Error(`\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && route.component) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n }\n if (route.path && route.matcher) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp =\n `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new Error(\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\n `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n let key: string;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\n\nexport function waitForMap<A, B>(\n obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n if (Object.keys(obj).length === 0) {\n return of ({});\n }\n\n const waitHead: Observable<B>[] = [];\n const waitTail: Observable<B>[] = [];\n const res: {[k: string]: B} = {};\n\n forEach(obj, (a: A, k: string) => {\n const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n } else {\n waitTail.push(mapped);\n }\n });\n\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n }\n return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n return true;\n\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n }\n return true;\n\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup,\n /** The query params of the URL */\n public queryParams: Params,\n /** The fragment of the URL */\n public fragment: string|null) {}\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _sourceSegment !: UrlSegmentGroup;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _segmentIndexShift !: number;\n /** The parent node in the url tree */\n parent: UrlSegmentGroup|null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup}) {\n forEach(children, (v: any, k: any) => v.parent = this);\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n /** Number of child segments */\n get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n /** @docsNotRequired */\n toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _parameterMap !: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string}) {}\n\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n let res: T[] = [];\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children: string[] = [];\n\n forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n\n });\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.keys(params).map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n });\n\n return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) { this.remaining = url; }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string|null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: any} {\n const params: {[key: string]: any} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: any}): void {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(`Cannot parse url '${this.url}'`);\n }\n\n let outletName: string = undefined !;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new Error(`Expected \"${str}\".`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) { this._root = root; }\n\n get root(): T { return this._root.value; }\n\n /**\n * @internal\n */\n parent(t: T): T|null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T|null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(public value: T, public children: TreeNode<T>[]) {}\n\n toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n\n return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(\n emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n // TODO(issue/24571): remove '!'.\n snapshot !: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterState;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: Observable<ParamMap>;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: Observable<ParamMap>;\n\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route */\n public url: Observable<UrlSegment[]>,\n /** An observable of the matrix parameters scoped to this route */\n public params: Observable<Params>,\n /** An observable of the query parameters shared by all the routes */\n public queryParams: Observable<Params>,\n /** An observable of the URL fragment shared by all the routes */\n public fragment: Observable<string>,\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>,\n /** The outlet name of the route. It's a constant */\n public outlet: string,\n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n this._futureSnapshot = futureSnapshot;\n }\n\n /** The configuration used to match this route */\n get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n /** The root of the router state */\n get root(): ActivatedRoute { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): Observable<ParamMap> {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n\n get queryParamMap(): Observable<ParamMap> {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params,\n data: Data,\n resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n route: ActivatedRouteSnapshot,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n const pathFromRoot = route.pathFromRoot;\n\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n\n // parent is componentless => current route should inherit its params and data\n } else if (!parent.component) {\n inheritingStartingFrom--;\n\n } else {\n break;\n }\n }\n }\n\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n return pathFromRoot.reduce((res, curr) => {\n const params = {...res.params, ...curr.params};\n const data = {...res.data, ...curr.data};\n const resolve = {...res.resolve, ...curr._resolvedData};\n return {params, data, resolve};\n }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route|null;\n /** @internal **/\n _urlSegment: UrlSegmentGroup;\n /** @internal */\n _lastPathIndex: number;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _resolvedData !: Data;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterStateSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: ParamMap;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /** The matrix parameters scoped to this route */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n lastPathIndex: number, resolve: ResolveData) {\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): ParamMap {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n (<any>route.queryParams).next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n (<any>route.fragment).next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n (<any>route.params).next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n (<any>route.url).next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n (<any>route.data).next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n (<any>route.data).next(route._futureSnapshot.data);\n }\n}\n\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n prevState: RouterState): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n } else {\n const detachedRouteHandle =\n <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n\n } else {\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (let i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n fragment: string): UrlTree {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n\n const startingPosition = findStartingPosition(nav, urlTree, route);\n\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(\n startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n queryParams: Params, fragment: string): UrlTree {\n let qp: any = {};\n if (queryParams) {\n forEach(queryParams, (value: any, name: any) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n\n const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n forEach(cmd.outlets, (commands: any, name: string) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(\n route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent !;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const curr = getPath(commands[currentCommandIndex]);\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n const children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n\n const curr = getPath(commands[i]);\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n forEach(params, (v: any, k: string) => res[k] = `${v}`);\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n map(t => {\n new ActivateRoutes(\n routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n\n if (context) {\n const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n const contexts = route.value.component ? context.children : parentContexts;\n\n forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored =\n (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n } else {\n const config = parentLoadedConfig(future.snapshot);\n const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n if (route && route.component) return null;\n }\n\n return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n public segmentGroup: UrlSegmentGroup|null;\n\n constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return new Observable<LoadedRouterConfig>(\n (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n private allowRedirects: boolean = true;\n private ngModule: NgModuleRef<any>;\n\n constructor(\n moduleInjector: Injector, private configLoader: RouterConfigLoader,\n private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n\n apply(): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n return urlTrees$.pipe(catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private match(tree: UrlTree): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) =>\n this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private noMatchError(e: NoMatch): any {\n return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n\n private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n UrlTree {\n const root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n }\n\n private expandSegmentGroup(\n ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n outlet: string): Observable<UrlSegmentGroup> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n }\n\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n\n // Recursively expand segment groups for all the child outlets\n private expandChildren(\n ngModule: NgModuleRef<any>, routes: Route[],\n segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n return waitForMap(\n segmentGroup.children,\n (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n }\n\n private expandSegment(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n segments: UrlSegment[], outlet: string,\n allowRedirects: boolean): Observable<UrlSegmentGroup> {\n return of (...routes).pipe(\n map((r: any) => {\n const expanded$ = this.expandSegmentAgainstRoute(\n ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e: any) => {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return of (null) as any;\n }\n throw e;\n }));\n }),\n concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of (new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n private expandSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, paths, outlet);\n }\n\n return noMatch(segmentGroup);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule, routes, route, outlet);\n }\n\n return this.expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, segments, outlet);\n }\n\n private expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n outlet: string): Observable<UrlSegmentGroup> {\n const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n }\n\n private expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n const {matched, consumedSegments, lastChild, positionalParamSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n const newTree = this.applyRedirectCommands(\n consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n return this.expandSegment(\n ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n false);\n }));\n }\n\n private matchSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n\n return of (new UrlSegmentGroup(segments, {}));\n }\n\n const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n if (!matched) return noMatch(rawSegmentGroup);\n\n const rawSlicedSegments = segments.slice(lastChild);\n const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n const childModule = routerConfig.module;\n const childConfig = routerConfig.routes;\n\n const {segmentGroup, slicedSegments} =\n split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$.pipe(\n map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of (new UrlSegmentGroup(consumedSegments, {}));\n }\n\n const expanded$ = this.expandSegment(\n childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(\n map((cs: UrlSegmentGroup) =>\n new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }\n\n private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of (new LoadedRouterConfig(route.children, ngModule));\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of (route._loadedConfig);\n }\n\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap((shouldLoad: boolean) => {\n if (shouldLoad) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n\n return of (new LoadedRouterConfig([], ngModule));\n }\n\n private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of (res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo !);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n private applyRedirectCommands(\n segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n return this.applyRedirectCreatreUrlTree(\n redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n\n private applyRedirectCreatreUrlTree(\n redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment);\n }\n\n private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n forEach(redirectToParams, (v: any, k: string) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n private createSegmentGroup(\n redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n private createSegments(\n redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n return redirectToSegments.map(\n s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n\n private findPosParam(\n redirectTo: string, redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment}): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n\n private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction runCanLoadGuard(\n moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n const canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0) return of (true);\n\n const obs = from(canLoad).pipe(map((injectionToken: any) => {\n const guard = moduleInjector.get(injectionToken);\n let guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n } else if (isFunction<CanLoadFn>(guard)) {\n guardVal = guard(route, segments);\n } else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n\n return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n matched: boolean,\n consumedSegments: UrlSegment[],\n lastChild: number,\n positionalParamSegments: {[k: string]: UrlSegment}\n} {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n\n if (!res) {\n return {\n matched: false,\n consumedSegments: <any[]>[],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n\n return {\n matched: true,\n consumedSegments: res.consumed !,\n lastChild: res.consumed.length !,\n positionalParamSegments: res.posParams !,\n };\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[]) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptySegments(\n config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n segmentGroup, slicedSegments, config, segmentGroup.children));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n }\n\n return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(switchMap(\n t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[],\n canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot, curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n {node: ActivatedRouteSnapshot, guards: any[]}|null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n const config = getClosestLoadedConfig(snapshot);\n const injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n if (!snapshot) return null;\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n }\n\n return null;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n forEach(\n prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun =\n shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun) {\n const component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n return switchMap(obs => {\n return combineLatest(\n ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n .pipe(\n scan(\n (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n let isPending = false;\n return list.reduce((innerAcc, val, i: number) => {\n if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE) isPending = true;\n\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false) return val;\n\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n\n return innerAcc;\n }, acc);\n },\n INITIAL_VALUE),\n filter(item => item !== INITIAL_VALUE),\n map(item => isUrlTree(item) ? item : item === true), //\n take(1)) as Observable<boolean|UrlTree>;\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of ({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n .pipe(\n mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(\n targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n of (canDeactivate);\n }),\n map(guardsResult => ({...t, guardsResult})));\n }));\n };\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n moduleInjector: Injector) {\n return from(checks).pipe(\n mergeMap(\n check =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n forwardEvent?: (evt: Event) => void) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(result => {\n return result !== true;\n }, true as boolean | UrlTree));\n }),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of (true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of (true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of (true);\n\n const canActivateObservables = canActivate.map((c: any) => {\n return defer(() => {\n const guard = getToken(c, futureARS, moduleInjector);\n let observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n } else if (isFunction<CanActivateFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map((c: any) => {\n const guard = getToken(c, d.node, moduleInjector);\n let observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n } else if (isFunction<CanActivateChildFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of (guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of (true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const guard = getToken(c, currARS, moduleInjector);\n let observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n } else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n return new Recognizer(\n rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n relativeLinkResolution)\n .recognize();\n}\n\nclass Recognizer {\n constructor(\n private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private relativeLinkResolution: 'legacy'|'corrected') {}\n\n recognize(): Observable<RouterStateSnapshot> {\n try {\n const rootSegmentGroup =\n split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n const root = new ActivatedRouteSnapshot(\n [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n this.urlTree.root, -1, {});\n\n const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of (routeState);\n\n } catch (e) {\n return new Observable<RouterStateSnapshot>(\n (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n }\n }\n\n inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n const route = routeNode.value;\n\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n\n processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n TreeNode<ActivatedRouteSnapshot>[] {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n }\n\n processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n TreeNode<ActivatedRouteSnapshot>[] {\n const children = mapChildrenIntoArray(\n segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n }\n\n processSegment(\n config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n for (const r of config) {\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n } catch (e) {\n if (!(e instanceof NoMatch)) throw e;\n }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n\n throw new NoMatch();\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n processSegmentAgainstRoute(\n route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n if (route.redirectTo) throw new NoMatch();\n\n if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n let snapshot: ActivatedRouteSnapshot;\n let consumedSegments: UrlSegment[] = [];\n let rawSlicedSegments: UrlSegment[] = [];\n\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments) !.parameters : {};\n snapshot = new ActivatedRouteSnapshot(\n segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n } else {\n const result: MatchResult = match(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n\n snapshot = new ActivatedRouteSnapshot(\n consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n\n const childConfig: Route[] = getChildConfig(route);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const children = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n }\n\n const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n if (route.children) {\n return route.children;\n }\n\n if (route.loadChildren) {\n return route._loadedConfig !.routes;\n }\n\n return [];\n}\n\ninterface MatchResult {\n consumedSegments: UrlSegment[];\n lastChild: number;\n parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch();\n }\n\n return {consumedSegments: [], lastChild: 0, parameters: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) throw new NoMatch();\n\n const posParams: {[n: string]: string} = {};\n forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n const parameters = res.consumed.length > 0 ?\n {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n posParams;\n\n return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n let s = segmentGroup;\n let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptyPaths(\n segmentGroup, consumedSegments, config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n segmentGroup, consumedSegments, slicedSegments, config,\n segmentGroup.children, relativeLinkResolution));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n routes: Route[], children: {[name: string]: UrlSegmentGroup},\n relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n } else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n 'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(\n t => recognizeFn(\n rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n if (!canActivateChecks.length) {\n return of (t);\n }\n\n return from(canActivateChecks)\n .pipe(\n concatMap(\n check => runResolve(\n check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n reduce((_: any, __: any) => _), map(_ => t));\n }));\n };\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n const resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = {\n ...futureARS.data,\n ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n return null;\n }));\n}\n\nfunction resolveNode(\n resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of ({});\n }\n if (keys.length === 1) {\n const key = keys[0];\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => { return {[key]: value}; }));\n }\n const data: {[k: string]: any} = {};\n const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n MonoTypeOperatorFunction<T> {\n return function(source) {\n return source.pipe(switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return from([v]);\n }));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>,\n componentRef: ComponentRef<any>,\n route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\n// TODO(i): switch to fromPromise once it's expored in rxjs\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * @docsNotRequired\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n constructor(\n private loader: NgModuleFactoryLoader, private compiler: Compiler,\n private onLoadStartListener?: (r: Route) => void,\n private onLoadEndListener?: (r: Route) => void) {}\n\n load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n\n const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n\n const module = factory.create(parentInjector);\n\n return new LoadedRouterConfig(\n flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n }\n\n private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n } else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n if (t instanceof NgModuleFactory) {\n return of (t);\n } else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean { return true; }\n extract(url: UrlTree): UrlTree { return url; }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Represents the extra options used during navigation.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n /**\n * Enables relative navigation from the current ActivatedRoute.\n *\n * Configuration:\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * Navigate to list route from child route:\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * this.router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n */\n relativeTo?: ActivatedRoute|null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params|null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * this.router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * Preserves the query parameters for the next navigation.\n *\n * deprecated, use `queryParamsHandling` instead\n *\n * ```\n * // Preserve query params from /results?page=1 to /view?page=1\n * this.router.navigate(['/view'], { preserveQueryParams: true });\n * ```\n *\n * @deprecated since v4\n */\n preserveQueryParams?: boolean;\n\n /**\n * config strategy to handle the query parameters for the next navigation.\n *\n * ```\n * // from /results?page=1 to /view?page=1&page=2\n * this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: \"merge\" });\n * ```\n */\n queryParamsHandling?: QueryParamsHandling|null;\n /**\n * Preserves the fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * this.router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n /**\n * Navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n /**\n * Navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n /**\n * State passed to any navigation. This value will be accessible through the `extras` object\n * returned from `router.getCurrentNavigation()` while a navigation is executing. Once a\n * navigation completes, this value will be written to `history.state` when the `location.go`\n * or `location.replaceState` method is called before activating of this route. Note that\n * `history.state` will not pass an object equality test because the `navigationId` will be\n * added to the state before being written.\n *\n * While `history.state` can accept any type of value, because the router adds the `navigationId`\n * on each navigation, the `state` must always be an object.\n */\n state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Error handler that is invoked when a navigation errors.\n *\n * If the handler returns a value, the navigation promise will be resolved with this value.\n * If the handler throws an exception, the navigation promise will be rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n [k: string]: any; navigationId: number;\n};\n\n/**\n * @description\n *\n * Information about any given navigation. This information can be gotten from the router at\n * any time using the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n /**\n * The ID of the current navigation.\n */\n id: number;\n /**\n * Target URL passed into the {@link Router#navigateByUrl} call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: string | UrlTree;\n /**\n * The initial target URL after being parsed with {@link UrlSerializer.extract()}.\n */\n extractedUrl: UrlTree;\n /**\n * Extracted URL after redirects have been applied. This URL may not be available immediately,\n * therefore this property can be `undefined`. It is guaranteed to be set after the\n * {@link RoutesRecognized} event fires.\n */\n finalUrl?: UrlTree;\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * The NavigationExtras used in this navigation. See {@link NavigationExtras} for more info.\n */\n extras: NavigationExtras;\n /**\n * Previously successful Navigation object. Only a single previous Navigation is available,\n * therefore this previous Navigation will always have a `null` value for `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n id: number,\n currentUrlTree: UrlTree,\n currentRawUrl: UrlTree,\n extractedUrl: UrlTree,\n urlAfterRedirects: UrlTree,\n rawUrl: UrlTree,\n extras: NavigationExtras,\n resolve: any,\n reject: any,\n promise: Promise<boolean>,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n currentSnapshot: RouterStateSnapshot,\n targetSnapshot: RouterStateSnapshot | null,\n currentRouterState: RouterState,\n targetRouterState: RouterState | null,\n guards: Checks,\n guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}): Observable<void> {\n return of (null) as any;\n}\n\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n private currentUrlTree: UrlTree;\n private rawUrlTree: UrlTree;\n private browserUrlTree: UrlTree;\n private readonly transitions: BehaviorSubject<NavigationTransition>;\n private navigations: Observable<NavigationTransition>;\n private lastSuccessfulNavigation: Navigation|null = null;\n private currentNavigation: Navigation|null = null;\n\n // TODO(issue/24571): remove '!'.\n private locationSubscription !: Subscription;\n private navigationId: number = 0;\n private configLoader: RouterConfigLoader;\n private ngModule: NgModuleRef<any>;\n private console: Console;\n private isNgZoneEnabled: boolean = false;\n\n public readonly events: Observable<Event> = new Subject<Event>();\n public readonly routerState: RouterState;\n\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n errorHandler: ErrorHandler = defaultErrorHandler;\n\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n malformedUriErrorHandler:\n (error: URIError, urlSerializer: UrlSerializer,\n url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n /**\n * Indicates if at least one navigation happened.\n */\n navigated: boolean = false;\n private lastSuccessfulId: number = -1;\n\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n /**\n * See {@link RouterModule} for more information.\n */\n relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n constructor(\n private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n\n this.processNavigations();\n }\n\n private setupNavigations(transitions: Observable<NavigationTransition>):\n Observable<NavigationTransition> {\n const eventsSubject = (this.events as Subject<Event>);\n return transitions.pipe(\n filter(t => t.id !== 0),\n\n // Extract URL\n map(t => ({\n ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n } as NavigationTransition)),\n\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n {...this.lastSuccessfulNavigation, previousNavigation: null} :\n null\n };\n }),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(t => {\n let completed = false;\n let errored = false;\n return of (t).pipe(\n switchMap(t => {\n const urlTransition =\n !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n const processCurrentUrl =\n (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n if (processCurrentUrl) {\n return of (t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions.getValue();\n eventsSubject.next(new NavigationStart(\n t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }),\n\n // This delay is required to match old behavior that forced navigation to\n // always be async\n switchMap(t => Promise.resolve(t)),\n\n // ApplyRedirects\n applyRedirects(\n this.ngModule.injector, this.configLoader, this.urlSerializer,\n this.config),\n\n // Update the currentNavigation\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation !,\n finalUrl: t.urlAfterRedirects\n };\n }),\n\n // Recognize\n recognize(\n this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n // Update URL if in `eager` update mode\n tap(t => {\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n // Fire RoutesRecognized\n tap(t => {\n const routesRecognized = new RoutesRecognized(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n eventsSubject.next(routesRecognized);\n }), );\n } else {\n const processPreviousUrl = urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id, this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n const targetSnapshot =\n createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n return of ({\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n });\n } else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }),\n\n // Before Preactivation\n switchTap(t => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.beforePreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !);\n this.triggerEvent(guardsStart);\n }),\n\n map(t => ({\n ...t,\n guards:\n getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n })),\n\n checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n tap(t => {\n if (isUrlTree(t.guardsResult)) {\n const error: Error&{url?: UrlTree} = navigationCancelingError(\n `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n error.url = t.guardsResult;\n throw error;\n }\n }),\n\n tap(t => {\n const guardsEnd = new GuardsCheckEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !, !!t.guardsResult);\n this.triggerEvent(guardsEnd);\n }),\n\n filter(t => {\n if (!t.guardsResult) {\n this.resetUrlToCurrentUrlTree();\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of (t).pipe(\n tap(t => {\n const resolveStart = new ResolveStart(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveStart);\n }),\n resolveData(\n this.paramsInheritanceStrategy,\n this.ngModule.injector), //\n tap(t => {\n const resolveEnd = new ResolveEnd(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveEnd);\n }), );\n }\n return undefined;\n }),\n\n // --- AFTER PREACTIVATION ---\n switchTap((t: NavigationTransition) => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.afterPreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n return ({...t, targetRouterState});\n }),\n\n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n tap((t: NavigationTransition) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n if (this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(\n this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n activateRoutes(\n this.rootContexts, this.routeReuseStrategy,\n (evt: Event) => this.triggerEvent(evt)),\n\n tap({next() { completed = true; }, complete() { completed = true; }}),\n finalize(() => {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n this.resetUrlToCurrentUrlTree();\n const navCancel = new NavigationCancel(\n t.id, this.serializeUrl(t.extractedUrl),\n `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n this.currentNavigation = null;\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n const redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n this.navigated = true;\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n\n if (redirecting) {\n this.navigateByUrl(e.url);\n }\n\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n } else {\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(this.errorHandler(e));\n } catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }), );\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n })) as any as Observable<NavigationTransition>;\n }\n\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n resetRootComponentType(rootComponentType: Type<any>): void {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n\n private getTransition(): NavigationTransition { return this.transitions.value; }\n\n private setTransition(t: Partial<NavigationTransition>): void {\n this.transitions.next({...this.getTransition(), ...t});\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n }\n }\n\n /**\n * Sets up the location change listener.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = <any>this.location.subscribe((change: any) => {\n let rawUrlTree = this.parseUrl(change['url']);\n const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n const state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(\n () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n });\n }\n }\n\n /** The current url */\n get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n /** The current Navigation object if one exists */\n getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n /** @internal */\n triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n\n /** @docsNotRequired */\n ngOnDestroy(): void { this.dispose(); }\n\n /** Disposes of the router */\n dispose(): void {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null !;\n }\n }\n\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n const {relativeTo, queryParams, fragment,\n preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n const a = relativeTo || this.routerState.root;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params|null = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n } else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n }\n\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\n `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n let urlTree: UrlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n\n /** Returns whether the url is activated */\n isActive(url: string|UrlTree, exact: boolean): boolean {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.keys(params).reduce((result: Params, key: string) => {\n const value: any = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private processNavigations(): void {\n this.navigations.subscribe(\n t => {\n this.navigated = true;\n this.lastSuccessfulId = t.id;\n (this.events as Subject<Event>)\n .next(new NavigationEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.currentNavigation = null;\n t.resolve(true);\n },\n e => { this.console.warn(`Unhandled Navigation Error: `); });\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n extras: NavigationExtras): Promise<boolean> {\n const lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n let resolve: any = null;\n let reject: any = null;\n\n const promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const id = ++this.navigationId;\n this.setTransition({\n id,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => { return Promise.reject(e); });\n }\n\n private setBrowserUrl(\n url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n const path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', {...state, navigationId: id});\n } else {\n this.location.go(path, '', {...state, navigationId: id});\n }\n }\n\n private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n (this as{routerState: RouterState}).routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n OnDestroy, AfterContentInit {\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLink, {descendants: true})\n links !: QueryList<RouterLink>;\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLinkWithHref, {descendants: true})\n linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n public readonly isActive: boolean = false;\n\n @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n constructor(\n private router: Router, private element: ElementRef, private renderer: Renderer2,\n private cdr: ChangeDetectorRef) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(_ => this.update());\n this.linksWithHrefs.changes.subscribe(_ => this.update());\n this.update();\n }\n\n @Input()\n set routerLinkActive(data: string[]|string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n\n ngOnChanges(changes: SimpleChanges): void { this.update(); }\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private update(): void {\n if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n (this as any).isActive = hasActiveLinks;\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n });\n }\n\n private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n return (link: RouterLink | RouterLinkWithHref) =>\n router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutlet|null = null;\n route: ActivatedRoute|null = null;\n resolver: ComponentFactoryResolver|null = null;\n children = new ChildrenOutletContexts();\n attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n private activated: ComponentRef<any>|null = null;\n private _activatedRoute: ActivatedRoute|null = null;\n private name: string;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n constructor(\n private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n private changeDetector: ChangeDetectorRef) {\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n\n ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n ngOnInit(): void {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n }\n\n get isActivated(): boolean { return !!this.activated; }\n\n get component(): Object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated) throw new Error('Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const snapshot = activatedRoute._futureSnapshot;\n const component = <any>snapshot.routeConfig !.component;\n resolver = resolver || this.resolver;\n const factory = resolver.resolveComponentFactory(component);\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(\n private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of (null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n private loader: RouterConfigLoader;\n // TODO(issue/24571): remove '!'.\n private subscription !: Subscription;\n\n constructor(\n private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n\n setUpPreloading(): void {\n this.subscription =\n this.router.events\n .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n const ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n }\n\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n const childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n\n // recurse into children\n } else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n return from(res).pipe(mergeAll(), map((_) => void 0));\n }\n\n private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const loaded$ = this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n route._loadedConfig = config;\n return this.processRoutes(config.module, config.routes);\n }));\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n private routerEventsSubscription !: Unsubscribable;\n // TODO(issue/24571): remove '!'.\n private scrollEventsSubscription !: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n constructor(\n private router: Router,\n /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n anchorScrolling?: 'disabled'|'enabled'\n } = {}) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.router.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.router.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n this.router.triggerEvent(new Scroll(\n routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n }\n\n ngOnDestroy() {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RouterEvent} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\nconst ROUTER_DIRECTIVES =\n [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n@NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n // Note: We are injecting the Router so it gets created eagerly...\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\n}\n\nexport function createRouterScroller(\n router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @description\n *\n * Represents an option to configure when the initial navigation is performed.\n *\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @publicApi\n */\nexport type InitialNavigation =\n true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @description\n *\n * Represents options to configure the router.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See `PreloadAllModules`.\n */\n preloadingStrategy?: any;\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation?: 'reload'|'ignore';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'--does nothing (default).\n * * 'top'--set the scroll position to 0,0..\n * * 'enabled'--set the scroll position to the stored position. This option will be the default in\n * the future.\n *\n * When enabled, the router stores and restores scroll positions during navigation.\n * When navigating forward, the scroll position will be set to [0, 0], or to the anchor\n * if one is provided.\n *\n * You can implement custom scroll restoration behavior as follows.\n * ```typescript\n * class AppModule {\n * constructor(router: Router, viewportScroller: ViewportScroller, store: Store<AppState>) {\n * router.events.pipe(filter(e => e instanceof Scroll), switchMap(e => {\n * return store.pipe(first(), timeout(200), map(() => e));\n * }).subscribe(e => {\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else if (e.anchor) {\n * viewportScroller.scrollToAnchor(e.anchor);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n * ```\n *\n * You can also implement component-specific scrolling like this:\n *\n * ```typescript\n * class ListComponent {\n * list: any[];\n * constructor(router: Router, viewportScroller: ViewportScroller, fetcher: ListFetcher) {\n * const scrollEvents = router.events.filter(e => e instanceof Scroll);\n * listFetcher.fetch().pipe(withLatestFrom(scrollEvents)).subscribe(([list, e]) => {\n * this.list = list;\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n */\n scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n /**\n * Configures if the router should scroll to the element when the url has a fragment.\n *\n * * 'disabled'--does nothing (default).\n * * 'enabled'--scrolls to the element. This option will be the default in the future.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled'|'enabled';\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with two numbers, the router will always use the numbers.\n * When given a function, the router will invoke the function every time it restores scroll\n * position.\n */\n scrollOffset?: [number, number]|(() => [number, number]);\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n /**\n * A custom malformed uri error handler function. This handler is invoked when encodedURI contains\n * invalid character sequences. The default implementation is to redirect to the root url dropping\n * any path or param info. This function passes three parameters:\n *\n * - `'URIError'` - Error thrown when parsing a bad URL\n * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n * - `'url'` - The malformed URL that caused the URIError\n * */\n malformedUriErrorHandler?:\n (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy?: 'deferred'|'eager';\n\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * Example:\n *\n * ```\n * const routes = [\n * {\n * path: '',\n * component: ContainerComponent,\n * children: [\n * { path: 'a', component: AComponent },\n * { path: 'b', component: BComponent },\n * ]\n * }\n * ];\n * ```\n *\n * From the `ContainerComponent`, this will not work:\n *\n * `<a [routerLink]=\"['./a']\">Link to A</a>`\n *\n * However, this will work:\n *\n * `<a [routerLink]=\"['../a']\">Link to A</a>`\n *\n * In other words, you're required to use `../` rather than `./`. This is currently the default\n * behavior. Setting this option to `corrected` enables the fix.\n */\n relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router = new Router(\n null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.enableTracing) {\n const dom = getDOM();\n router.events.subscribe((e: RouterEvent) => {\n dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n\n return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n private initNavigation: boolean = false;\n private resultOfPreactivationDone = new Subject<void>();\n\n constructor(private injector: Injector) {}\n\n appInitializer(): Promise<any> {\n const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let resolve: Function = null !;\n const res = new Promise(r => resolve = r);\n const router = this.injector.get(Router);\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null) as any;\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n\n bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n const preloader = this.injector.get(RouterPreloader);\n const routerScroller = this.injector.get(RouterScroller);\n const router = this.injector.get(Router);\n const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null !);\n this.resultOfPreactivationDone.complete();\n }\n\n private isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n\n private isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('7.2.7');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, LoadChildren, LoadChildrenCallback, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatchResult, UrlMatcher} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationExtras, Router} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_n} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_l,TreeNode as ɵangular_packages_router_router_m} from './src/utils/tree';"],"names":["tslib_1.__extends","Component","of","map","concatAll","lastValue","isObservable","isPromise","from","tslib_1.__values","BehaviorSubject","Observable","NgModuleRef","catchError","first","EmptyError","mergeMap","every","applyRedirects","switchMap","applyRedirectsFn","combineLatest","take","startWith","scan","filter","concatMap","defer","split","NoMatch","match","getOutlet","recognize","recognizeFn","reduce","last","InjectionToken","NgModuleFactory","Subject","Console","NgZone","tslib_1.__assign","tap","EMPTY","finalize","isDevMode","tslib_1.__decorate","Input","HostListener","Directive","tslib_1.__param","Attribute","Renderer2","ElementRef","HostBinding","LocationStrategy","ContentChildren","QueryList","ChangeDetectorRef","EventEmitter","Output","ViewContainerRef","ComponentFactoryResolver","mergeAll","Injectable","NgModuleFactoryLoader","Compiler","Injector","Location","ApplicationRef","Optional","SystemJsNgModuleLoader","NgProbeToken","SkipSelf","PlatformLocation","Inject","APP_BASE_HREF","ViewportScroller","NgModule","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","getDOM","LOCATION_INITIALIZED","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","Version"],"mappings":";;;;;;;;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,C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QAAa,kBAAkB,GAC3B,IAAI/B,mBAAc,CAAuC,oBAAoB,CAAC,CAAC;AAEnF,aAAgB,wBAAwB;QACtC,OAAO;YACL,iBAAiB;YACjB;gBACE,OAAO,EAAEgD,oBAAe;gBACxB,KAAK,EAAE,IAAI;gBACX,UAAU,EAAE,iBAAiB;gBAC7B,IAAI,EAAE,CAAC,iBAAiB,CAAC;aAC1B;YACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;YAC1F,EAAC,OAAO,EAAEC,2BAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;SAChF,CAAC;IACJ,CAAC;;ICnnBD;;;;;;;AAQA,IAQA;;;AAGA,QAAa,OAAO,GAAG,IAAIC,YAAO,CAAC,mBAAmB,CAAC;;ICnBvD;;;;;;OAMG;;ICNH;;;;;;OAMG;;ICNH;;;;;;;AAQA,IAOA,0EAA0E;;ICf1E;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file
+{"version":3,"file":"router.umd.js","sources":["../../../../../../../../../../external/ngdeps/node_modules/tslib/tslib.es6.js","../../../../../packages/router/src/events.ts","../../../../../packages/router/src/components/empty_outlet.ts","../../../../../packages/router/src/shared.ts","../../../../../packages/router/src/config.ts","../../../../../packages/router/src/utils/collection.ts","../../../../../packages/router/src/url_tree.ts","../../../../../packages/router/src/utils/tree.ts","../../../../../packages/router/src/router_state.ts","../../../../../packages/router/src/create_router_state.ts","../../../../../packages/router/src/create_url_tree.ts","../../../../../packages/router/src/operators/activate_routes.ts","../../../../../packages/router/src/utils/type_guards.ts","../../../../../packages/router/src/apply_redirects.ts","../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../packages/router/src/utils/preactivation.ts","../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../packages/router/src/operators/check_guards.ts","../../../../../packages/router/src/recognize.ts","../../../../../packages/router/src/operators/recognize.ts","../../../../../packages/router/src/operators/resolve_data.ts","../../../../../packages/router/src/operators/switch_tap.ts","../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../packages/router/src/router_config_loader.ts","../../../../../packages/router/src/url_handling_strategy.ts","../../../../../packages/router/src/router.ts","../../../../../packages/router/src/directives/router_link.ts","../../../../../packages/router/src/directives/router_link_active.ts","../../../../../packages/router/src/router_outlet_context.ts","../../../../../packages/router/src/directives/router_outlet.ts","../../../../../packages/router/src/router_preloader.ts","../../../../../packages/router/src/router_scroller.ts","../../../../../packages/router/src/router_module.ts","../../../../../packages/router/src/version.ts","../../../../../packages/router/src/private_export.ts","../../../../../packages/router/src/index.ts","../../../../../packages/router/public_api.ts","../../../../../packages/router/index.ts","../../../../../packages/router/router.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * @description\n *\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** @docsNotRequired */\n public id: number,\n /** @docsNotRequired */\n public url: string) {}\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n /**\n * This reflects the state object that was previously supplied to the pushState call. This is\n * not null only when the navigation is triggered by a popstate event.\n *\n * The router assigns a navigationId to every router transition/navigation. Even when the user\n * clicks on the back button in the browser, a new navigation id will be created. So from\n * the perspective of the router, the router never \"goes back\". By using the `restoredState`\n * and its navigationId, you can implement behavior that differentiates between creating new\n * states\n * and popstate events. In the latter case you can restore some remembered state (e.g., scroll\n * position).\n *\n * See {@link NavigationExtras} for more information.\n */\n restoredState?: {[k: string]: any, navigationId: number}|null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any, navigationId: number}|null = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public reason: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\nexport class Scroll {\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd,\n\n /** @docsNotRequired */\n readonly position: [number, number]|null,\n\n /** @docsNotRequired */\n readonly anchor: string|null) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a router event, allowing you to track the lifecycle of the router.\n *\n * The sequence of router events is:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class EmptyOutletComponent {\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of parameters.\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any\n};\n\n/**\n * Matrix and Query parameters.\n *\n * `ParamMap` makes it easier to work with parameters as they could have either a single value or\n * multiple value. Because this should be known by the user, calling `get` or `getAll` returns the\n * correct type (either `string` or `string[]`).\n *\n * The API is inspired by the URLSearchParams interface.\n * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n *\n * @publicApi\n */\nexport interface ParamMap {\n has(name: string): boolean;\n /**\n * Return a single value for the given parameter name:\n * - the value when the parameter has a single value,\n * - the first value if the parameter has multiple values,\n * - `null` when there is no such parameter.\n */\n get(name: string): string|null;\n /**\n * Return an array of values for the given parameter name.\n *\n * If there is no such parameter, an empty array is returned.\n */\n getAll(name: string): string[];\n\n /** Name of the parameters */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) { this.params = params || {}; }\n\n has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n get(name: string): string|null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n const error = Error('NavigationCancelingError: ' + message);\n (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n const parts = route.path !.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Represents router configuration.\n *\n * `Routes` is an array of route configurations. Each one has the following properties:\n *\n * - `path` is a string that uses the route matcher DSL.\n * - `pathMatch` is a string that specifies the matching strategy. Options are `prefix` (default)\n * and `full`. See [Matching Strategy](#matching-strategy) below for more information.\n * - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.\n * - `component` is a component type.\n * - `redirectTo` is the url fragment which will replace the current matched segment.\n * - `outlet` is the name of the outlet the component should be placed into.\n * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See\n * `CanActivate` for more info.\n * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See\n * `CanActivateChild` for more info.\n * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See\n * `CanDeactivate` for more info.\n * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See\n * `CanLoad` for more info.\n * - `data` is additional data provided to the component via `ActivatedRoute`.\n * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more\n * info.\n * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only\n * when the matrix parameters of the route change. Options include:\n * - `paramsChange` (default) - Run guards and resolvers when path or matrix params change. This\n * mode ignores query param changes.\n * - `paramsOrQueryParamsChange` - Guards and resolvers will run when any parameters change. This\n * includes path, matrix, and query params.\n * - `pathParamsChange` - Run guards and resolvers path or any path params change. This mode is\n * useful if you want to ignore changes to all optional parameters such as query *and* matrix\n * params.\n * - `pathParamsOrQueryParamsChange` - Same as `pathParamsChange`, but also rerun when any query\n * param changes\n * - `always` - Run guards and resolvers on every navigation.\n * - (from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean - Use a predicate\n * function when none of the pre-configured modes fit the needs of the application. An example\n * might be when you need to ignore updates to a param such as `sortDirection`, but need to\n * reload guards and resolvers when changing the `searchRoot` param.\n * - `children` is an array of child route definitions.\n * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more\n * info.\n *\n * @usageNotes\n * ### Simple Configuration\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/bob`, the router will create the team component with the user\n * component in it.\n *\n * ### Multiple Outlets\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * When navigating to `/team/11(aux:chat/jim)`, the router will create the team component next to\n * the chat component. The chat component will be placed into the aux outlet.\n *\n * ### Wild Cards\n *\n * ```\n * [{\n * path: '**',\n * component: Sink\n * }]\n * ```\n *\n * Regardless of where you navigate to, the router will instantiate the sink component.\n *\n * ### Redirects\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to '/team/11/legacy/user/jim', the router will change the url to\n * '/team/11/user/jim', and then will instantiate the team component with the user component\n * in it.\n *\n * If the `redirectTo` value starts with a '/', then it is an absolute redirect. E.g., if in the\n * example above we change the `redirectTo` to `/user/:name`, the result url will be '/user/jim'.\n *\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any url segments. Let's look at the following configuration:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11`, the router will instantiate the AllUsers component.\n *\n * Empty-path routes can have children.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/jim`, the router will instantiate the wrapper component with\n * the user component in it.\n *\n * An empty path route inherits its parent's params and data. This is because it cannot have its\n * own params, and, as a result, it often uses its parent's params and data as its own.\n *\n * ### Matching Strategy\n *\n * By default the router will look at what is left in the url, and check if it starts with\n * the specified path (e.g., `/team/11/user` starts with `team/:id`).\n *\n * We can change the matching strategy to make sure that the path covers the whole unconsumed url,\n * which is akin to `unconsumedUrl === path` or `$` regular expressions.\n *\n * This is particularly important when redirecting empty-path routes.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * Since an empty path is a prefix of any url, even when navigating to '/main', the router will\n * still apply the redirect.\n *\n * If `pathMatch: full` is provided, the router will apply the redirect if and only if navigating to\n * '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * It is useful at times to have the ability to share parameters between sibling components.\n *\n * Say we have two components--ChildCmp and AuxCmp--that we want to put next to each other and both\n * of them require some id parameter.\n *\n * One way to do that would be to have a bogus parent component, so both the siblings can get the id\n * parameter from it. This is not ideal. Instead, you can use a componentless route.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * So when navigating to `parent/10/(a//aux:b)`, the route will instantiate the main child and aux\n * child components next to each other. In this example, the application component\n * has to have the primary and aux outlets defined.\n *\n * The router will also merge the `params`, `data`, and `resolve` of the componentless parent into\n * the `params`, `data`, and `resolve` of the children. This is done because there is no component\n * that can inject the activated route of the componentless parent.\n *\n * This is especially useful when child components are defined as follows:\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * With this configuration in place, navigating to '/parent/10' will create the main child and aux\n * components.\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up our application load time by splitting it into multiple bundles, and\n * loading them on demand. The router is designed to make lazy loading simple and easy. Instead of\n * providing the children property, you can provide the `loadChildren` property, as follows:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * loadChildren: 'team'\n * }]\n * ```\n *\n * The router will use registered NgModuleFactoryLoader to fetch an NgModule associated with 'team'.\n * Then it will extract the set of routes defined in that NgModule, and will transparently add\n * those routes to the main configuration.\n *\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * @description Represents the results of the URL matching.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * @description\n *\n * A function matching URLs\n *\n * A custom URL matcher can be provided when a combination of `path` and `pathMatch` isn't\n * expressive enough.\n *\n * For instance, the following matcher matches html files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n UrlMatchResult;\n\n/**\n * @description\n *\n * Represents the static data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type Data = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * Represents the resolved data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type ResolveData = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildren = string | LoadChildrenCallback;\n\n/**\n * @description\n *\n * The type of `queryParamsHandling`.\n *\n * See `RouterLink` for more details.\n *\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * @description\n *\n * The type of `runGuardsAndResolvers`.\n *\n * See `Routes` for more details.\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport interface Route {\n path?: string;\n pathMatch?: string;\n matcher?: UrlMatcher;\n component?: Type<any>;\n redirectTo?: string;\n outlet?: string;\n canActivate?: any[];\n canActivateChild?: any[];\n canDeactivate?: any[];\n canLoad?: any[];\n data?: Data;\n resolve?: ResolveData;\n children?: Routes;\n loadChildren?: LoadChildren;\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n /**\n * Filled for routes with `loadChildren` once the module has been loaded\n * @internal\n */\n _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n if (!route) {\n throw new Error(`\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && route.component) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n }\n if (route.path && route.matcher) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp =\n `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new Error(\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\n `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n let key: string;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\n\nexport function waitForMap<A, B>(\n obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n if (Object.keys(obj).length === 0) {\n return of ({});\n }\n\n const waitHead: Observable<B>[] = [];\n const waitTail: Observable<B>[] = [];\n const res: {[k: string]: B} = {};\n\n forEach(obj, (a: A, k: string) => {\n const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n } else {\n waitTail.push(mapped);\n }\n });\n\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n }\n return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n return true;\n\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n }\n return true;\n\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup,\n /** The query params of the URL */\n public queryParams: Params,\n /** The fragment of the URL */\n public fragment: string|null) {}\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _sourceSegment !: UrlSegmentGroup;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _segmentIndexShift !: number;\n /** The parent node in the url tree */\n parent: UrlSegmentGroup|null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup}) {\n forEach(children, (v: any, k: any) => v.parent = this);\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n /** Number of child segments */\n get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n /** @docsNotRequired */\n toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _parameterMap !: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string}) {}\n\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n let res: T[] = [];\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children: string[] = [];\n\n forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n\n });\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.keys(params).map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n });\n\n return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) { this.remaining = url; }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string|null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: any} {\n const params: {[key: string]: any} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: any}): void {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(`Cannot parse url '${this.url}'`);\n }\n\n let outletName: string = undefined !;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new Error(`Expected \"${str}\".`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) { this._root = root; }\n\n get root(): T { return this._root.value; }\n\n /**\n * @internal\n */\n parent(t: T): T|null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T|null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(public value: T, public children: TreeNode<T>[]) {}\n\n toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n\n return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(\n emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n // TODO(issue/24571): remove '!'.\n snapshot !: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterState;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: Observable<ParamMap>;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: Observable<ParamMap>;\n\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route */\n public url: Observable<UrlSegment[]>,\n /** An observable of the matrix parameters scoped to this route */\n public params: Observable<Params>,\n /** An observable of the query parameters shared by all the routes */\n public queryParams: Observable<Params>,\n /** An observable of the URL fragment shared by all the routes */\n public fragment: Observable<string>,\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>,\n /** The outlet name of the route. It's a constant */\n public outlet: string,\n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n this._futureSnapshot = futureSnapshot;\n }\n\n /** The configuration used to match this route */\n get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n /** The root of the router state */\n get root(): ActivatedRoute { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): Observable<ParamMap> {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n\n get queryParamMap(): Observable<ParamMap> {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params,\n data: Data,\n resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n route: ActivatedRouteSnapshot,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n const pathFromRoot = route.pathFromRoot;\n\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n\n // parent is componentless => current route should inherit its params and data\n } else if (!parent.component) {\n inheritingStartingFrom--;\n\n } else {\n break;\n }\n }\n }\n\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n return pathFromRoot.reduce((res, curr) => {\n const params = {...res.params, ...curr.params};\n const data = {...res.data, ...curr.data};\n const resolve = {...res.resolve, ...curr._resolvedData};\n return {params, data, resolve};\n }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route|null;\n /** @internal **/\n _urlSegment: UrlSegmentGroup;\n /** @internal */\n _lastPathIndex: number;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _resolvedData !: Data;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterStateSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: ParamMap;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /** The matrix parameters scoped to this route */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n lastPathIndex: number, resolve: ResolveData) {\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): ParamMap {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n (<any>route.queryParams).next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n (<any>route.fragment).next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n (<any>route.params).next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n (<any>route.url).next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n (<any>route.data).next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n (<any>route.data).next(route._futureSnapshot.data);\n }\n}\n\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n prevState: RouterState): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n } else {\n const detachedRouteHandle =\n <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n\n } else {\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (let i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n fragment: string): UrlTree {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n\n const startingPosition = findStartingPosition(nav, urlTree, route);\n\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(\n startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n queryParams: Params, fragment: string): UrlTree {\n let qp: any = {};\n if (queryParams) {\n forEach(queryParams, (value: any, name: any) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n\n const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n forEach(cmd.outlets, (commands: any, name: string) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(\n route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent !;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const curr = getPath(commands[currentCommandIndex]);\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n const children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n\n const curr = getPath(commands[i]);\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n forEach(params, (v: any, k: string) => res[k] = `${v}`);\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n map(t => {\n new ActivateRoutes(\n routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n\n if (context) {\n const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n const contexts = route.value.component ? context.children : parentContexts;\n\n forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored =\n (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n } else {\n const config = parentLoadedConfig(future.snapshot);\n const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n if (route && route.component) return null;\n }\n\n return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n public segmentGroup: UrlSegmentGroup|null;\n\n constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return new Observable<LoadedRouterConfig>(\n (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n private allowRedirects: boolean = true;\n private ngModule: NgModuleRef<any>;\n\n constructor(\n moduleInjector: Injector, private configLoader: RouterConfigLoader,\n private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n\n apply(): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n return urlTrees$.pipe(catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private match(tree: UrlTree): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) =>\n this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private noMatchError(e: NoMatch): any {\n return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n\n private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n UrlTree {\n const root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n }\n\n private expandSegmentGroup(\n ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n outlet: string): Observable<UrlSegmentGroup> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n }\n\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n\n // Recursively expand segment groups for all the child outlets\n private expandChildren(\n ngModule: NgModuleRef<any>, routes: Route[],\n segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n return waitForMap(\n segmentGroup.children,\n (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n }\n\n private expandSegment(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n segments: UrlSegment[], outlet: string,\n allowRedirects: boolean): Observable<UrlSegmentGroup> {\n return of (...routes).pipe(\n map((r: any) => {\n const expanded$ = this.expandSegmentAgainstRoute(\n ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e: any) => {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return of (null) as any;\n }\n throw e;\n }));\n }),\n concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of (new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n private expandSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, paths, outlet);\n }\n\n return noMatch(segmentGroup);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule, routes, route, outlet);\n }\n\n return this.expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, segments, outlet);\n }\n\n private expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n outlet: string): Observable<UrlSegmentGroup> {\n const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n }\n\n private expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n const {matched, consumedSegments, lastChild, positionalParamSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n const newTree = this.applyRedirectCommands(\n consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n return this.expandSegment(\n ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n false);\n }));\n }\n\n private matchSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n\n return of (new UrlSegmentGroup(segments, {}));\n }\n\n const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n if (!matched) return noMatch(rawSegmentGroup);\n\n const rawSlicedSegments = segments.slice(lastChild);\n const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n const childModule = routerConfig.module;\n const childConfig = routerConfig.routes;\n\n const {segmentGroup, slicedSegments} =\n split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$.pipe(\n map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of (new UrlSegmentGroup(consumedSegments, {}));\n }\n\n const expanded$ = this.expandSegment(\n childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(\n map((cs: UrlSegmentGroup) =>\n new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }\n\n private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of (new LoadedRouterConfig(route.children, ngModule));\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of (route._loadedConfig);\n }\n\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap((shouldLoad: boolean) => {\n if (shouldLoad) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n\n return of (new LoadedRouterConfig([], ngModule));\n }\n\n private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of (res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo !);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n private applyRedirectCommands(\n segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n return this.applyRedirectCreatreUrlTree(\n redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n\n private applyRedirectCreatreUrlTree(\n redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment);\n }\n\n private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n forEach(redirectToParams, (v: any, k: string) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n private createSegmentGroup(\n redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n private createSegments(\n redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n return redirectToSegments.map(\n s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n\n private findPosParam(\n redirectTo: string, redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment}): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n\n private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction runCanLoadGuard(\n moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n const canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0) return of (true);\n\n const obs = from(canLoad).pipe(map((injectionToken: any) => {\n const guard = moduleInjector.get(injectionToken);\n let guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n } else if (isFunction<CanLoadFn>(guard)) {\n guardVal = guard(route, segments);\n } else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n\n return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n matched: boolean,\n consumedSegments: UrlSegment[],\n lastChild: number,\n positionalParamSegments: {[k: string]: UrlSegment}\n} {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n\n if (!res) {\n return {\n matched: false,\n consumedSegments: <any[]>[],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n\n return {\n matched: true,\n consumedSegments: res.consumed !,\n lastChild: res.consumed.length !,\n positionalParamSegments: res.posParams !,\n };\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[]) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptySegments(\n config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n segmentGroup, slicedSegments, config, segmentGroup.children));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n }\n\n return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(switchMap(\n t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[],\n canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot, curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n {node: ActivatedRouteSnapshot, guards: any[]}|null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n const config = getClosestLoadedConfig(snapshot);\n const injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n if (!snapshot) return null;\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n }\n\n return null;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n forEach(\n prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun =\n shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun) {\n const component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n return switchMap(obs => {\n return combineLatest(\n ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n .pipe(\n scan(\n (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n let isPending = false;\n return list.reduce((innerAcc, val, i: number) => {\n if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE) isPending = true;\n\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false) return val;\n\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n\n return innerAcc;\n }, acc);\n },\n INITIAL_VALUE),\n filter(item => item !== INITIAL_VALUE),\n map(item => isUrlTree(item) ? item : item === true), //\n take(1)) as Observable<boolean|UrlTree>;\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of ({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n .pipe(\n mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(\n targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n of (canDeactivate);\n }),\n map(guardsResult => ({...t, guardsResult})));\n }));\n };\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n moduleInjector: Injector) {\n return from(checks).pipe(\n mergeMap(\n check =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n forwardEvent?: (evt: Event) => void) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(result => {\n return result !== true;\n }, true as boolean | UrlTree));\n }),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of (true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of (true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of (true);\n\n const canActivateObservables = canActivate.map((c: any) => {\n return defer(() => {\n const guard = getToken(c, futureARS, moduleInjector);\n let observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n } else if (isFunction<CanActivateFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map((c: any) => {\n const guard = getToken(c, d.node, moduleInjector);\n let observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n } else if (isFunction<CanActivateChildFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of (guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of (true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const guard = getToken(c, currARS, moduleInjector);\n let observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n } else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n return new Recognizer(\n rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n relativeLinkResolution)\n .recognize();\n}\n\nclass Recognizer {\n constructor(\n private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private relativeLinkResolution: 'legacy'|'corrected') {}\n\n recognize(): Observable<RouterStateSnapshot> {\n try {\n const rootSegmentGroup =\n split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n const root = new ActivatedRouteSnapshot(\n [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n this.urlTree.root, -1, {});\n\n const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of (routeState);\n\n } catch (e) {\n return new Observable<RouterStateSnapshot>(\n (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n }\n }\n\n inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n const route = routeNode.value;\n\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n\n processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n TreeNode<ActivatedRouteSnapshot>[] {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n }\n\n processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n TreeNode<ActivatedRouteSnapshot>[] {\n const children = mapChildrenIntoArray(\n segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n }\n\n processSegment(\n config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n for (const r of config) {\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n } catch (e) {\n if (!(e instanceof NoMatch)) throw e;\n }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n\n throw new NoMatch();\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n processSegmentAgainstRoute(\n route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n if (route.redirectTo) throw new NoMatch();\n\n if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n let snapshot: ActivatedRouteSnapshot;\n let consumedSegments: UrlSegment[] = [];\n let rawSlicedSegments: UrlSegment[] = [];\n\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments) !.parameters : {};\n snapshot = new ActivatedRouteSnapshot(\n segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n } else {\n const result: MatchResult = match(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n\n snapshot = new ActivatedRouteSnapshot(\n consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n\n const childConfig: Route[] = getChildConfig(route);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const children = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n }\n\n const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n if (route.children) {\n return route.children;\n }\n\n if (route.loadChildren) {\n return route._loadedConfig !.routes;\n }\n\n return [];\n}\n\ninterface MatchResult {\n consumedSegments: UrlSegment[];\n lastChild: number;\n parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch();\n }\n\n return {consumedSegments: [], lastChild: 0, parameters: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) throw new NoMatch();\n\n const posParams: {[n: string]: string} = {};\n forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n const parameters = res.consumed.length > 0 ?\n {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n posParams;\n\n return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n let s = segmentGroup;\n let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptyPaths(\n segmentGroup, consumedSegments, config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n segmentGroup, consumedSegments, slicedSegments, config,\n segmentGroup.children, relativeLinkResolution));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n routes: Route[], children: {[name: string]: UrlSegmentGroup},\n relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n } else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n 'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(\n t => recognizeFn(\n rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n if (!canActivateChecks.length) {\n return of (t);\n }\n\n return from(canActivateChecks)\n .pipe(\n concatMap(\n check => runResolve(\n check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n reduce((_: any, __: any) => _), map(_ => t));\n }));\n };\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n const resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = {\n ...futureARS.data,\n ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n return null;\n }));\n}\n\nfunction resolveNode(\n resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of ({});\n }\n if (keys.length === 1) {\n const key = keys[0];\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => { return {[key]: value}; }));\n }\n const data: {[k: string]: any} = {};\n const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n MonoTypeOperatorFunction<T> {\n return function(source) {\n return source.pipe(switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return from([v]);\n }));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>,\n componentRef: ComponentRef<any>,\n route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * @docsNotRequired\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n constructor(\n private loader: NgModuleFactoryLoader, private compiler: Compiler,\n private onLoadStartListener?: (r: Route) => void,\n private onLoadEndListener?: (r: Route) => void) {}\n\n load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n\n const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n\n const module = factory.create(parentInjector);\n\n return new LoadedRouterConfig(\n flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n }\n\n private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n } else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n if (t instanceof NgModuleFactory) {\n return of (t);\n } else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean { return true; }\n extract(url: UrlTree): UrlTree { return url; }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Represents the extra options used during navigation.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n /**\n * Enables relative navigation from the current ActivatedRoute.\n *\n * Configuration:\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * Navigate to list route from child route:\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * this.router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n */\n relativeTo?: ActivatedRoute|null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params|null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * this.router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * Preserves the query parameters for the next navigation.\n *\n * deprecated, use `queryParamsHandling` instead\n *\n * ```\n * // Preserve query params from /results?page=1 to /view?page=1\n * this.router.navigate(['/view'], { preserveQueryParams: true });\n * ```\n *\n * @deprecated since v4\n */\n preserveQueryParams?: boolean;\n\n /**\n * config strategy to handle the query parameters for the next navigation.\n *\n * ```\n * // from /results?page=1 to /view?page=1&page=2\n * this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: \"merge\" });\n * ```\n */\n queryParamsHandling?: QueryParamsHandling|null;\n /**\n * Preserves the fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * this.router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n /**\n * Navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n /**\n * Navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n /**\n * State passed to any navigation. This value will be accessible through the `extras` object\n * returned from `router.getCurrentNavigation()` while a navigation is executing. Once a\n * navigation completes, this value will be written to `history.state` when the `location.go`\n * or `location.replaceState` method is called before activating of this route. Note that\n * `history.state` will not pass an object equality test because the `navigationId` will be\n * added to the state before being written.\n *\n * While `history.state` can accept any type of value, because the router adds the `navigationId`\n * on each navigation, the `state` must always be an object.\n */\n state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Error handler that is invoked when a navigation errors.\n *\n * If the handler returns a value, the navigation promise will be resolved with this value.\n * If the handler throws an exception, the navigation promise will be rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n [k: string]: any; navigationId: number;\n};\n\n/**\n * @description\n *\n * Information about any given navigation. This information can be gotten from the router at\n * any time using the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n /**\n * The ID of the current navigation.\n */\n id: number;\n /**\n * Target URL passed into the {@link Router#navigateByUrl} call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: string | UrlTree;\n /**\n * The initial target URL after being parsed with {@link UrlSerializer.extract()}.\n */\n extractedUrl: UrlTree;\n /**\n * Extracted URL after redirects have been applied. This URL may not be available immediately,\n * therefore this property can be `undefined`. It is guaranteed to be set after the\n * {@link RoutesRecognized} event fires.\n */\n finalUrl?: UrlTree;\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * The NavigationExtras used in this navigation. See {@link NavigationExtras} for more info.\n */\n extras: NavigationExtras;\n /**\n * Previously successful Navigation object. Only a single previous Navigation is available,\n * therefore this previous Navigation will always have a `null` value for `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n id: number,\n currentUrlTree: UrlTree,\n currentRawUrl: UrlTree,\n extractedUrl: UrlTree,\n urlAfterRedirects: UrlTree,\n rawUrl: UrlTree,\n extras: NavigationExtras,\n resolve: any,\n reject: any,\n promise: Promise<boolean>,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n currentSnapshot: RouterStateSnapshot,\n targetSnapshot: RouterStateSnapshot | null,\n currentRouterState: RouterState,\n targetRouterState: RouterState | null,\n guards: Checks,\n guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}): Observable<void> {\n return of (null) as any;\n}\n\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n private currentUrlTree: UrlTree;\n private rawUrlTree: UrlTree;\n private browserUrlTree: UrlTree;\n private readonly transitions: BehaviorSubject<NavigationTransition>;\n private navigations: Observable<NavigationTransition>;\n private lastSuccessfulNavigation: Navigation|null = null;\n private currentNavigation: Navigation|null = null;\n\n // TODO(issue/24571): remove '!'.\n private locationSubscription !: Subscription;\n private navigationId: number = 0;\n private configLoader: RouterConfigLoader;\n private ngModule: NgModuleRef<any>;\n private console: Console;\n private isNgZoneEnabled: boolean = false;\n\n public readonly events: Observable<Event> = new Subject<Event>();\n public readonly routerState: RouterState;\n\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n errorHandler: ErrorHandler = defaultErrorHandler;\n\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n malformedUriErrorHandler:\n (error: URIError, urlSerializer: UrlSerializer,\n url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n /**\n * Indicates if at least one navigation happened.\n */\n navigated: boolean = false;\n private lastSuccessfulId: number = -1;\n\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n /**\n * See {@link RouterModule} for more information.\n */\n relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n constructor(\n private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n\n this.processNavigations();\n }\n\n private setupNavigations(transitions: Observable<NavigationTransition>):\n Observable<NavigationTransition> {\n const eventsSubject = (this.events as Subject<Event>);\n return transitions.pipe(\n filter(t => t.id !== 0),\n\n // Extract URL\n map(t => ({\n ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n } as NavigationTransition)),\n\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n {...this.lastSuccessfulNavigation, previousNavigation: null} :\n null\n };\n }),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(t => {\n let completed = false;\n let errored = false;\n return of (t).pipe(\n switchMap(t => {\n const urlTransition =\n !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n const processCurrentUrl =\n (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n if (processCurrentUrl) {\n return of (t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions.getValue();\n eventsSubject.next(new NavigationStart(\n t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }),\n\n // This delay is required to match old behavior that forced navigation to\n // always be async\n switchMap(t => Promise.resolve(t)),\n\n // ApplyRedirects\n applyRedirects(\n this.ngModule.injector, this.configLoader, this.urlSerializer,\n this.config),\n\n // Update the currentNavigation\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation !,\n finalUrl: t.urlAfterRedirects\n };\n }),\n\n // Recognize\n recognize(\n this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n // Update URL if in `eager` update mode\n tap(t => {\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n // Fire RoutesRecognized\n tap(t => {\n const routesRecognized = new RoutesRecognized(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n eventsSubject.next(routesRecognized);\n }), );\n } else {\n const processPreviousUrl = urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id, this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n const targetSnapshot =\n createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n return of ({\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n });\n } else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }),\n\n // Before Preactivation\n switchTap(t => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.beforePreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !);\n this.triggerEvent(guardsStart);\n }),\n\n map(t => ({\n ...t,\n guards:\n getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n })),\n\n checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n tap(t => {\n if (isUrlTree(t.guardsResult)) {\n const error: Error&{url?: UrlTree} = navigationCancelingError(\n `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n error.url = t.guardsResult;\n throw error;\n }\n }),\n\n tap(t => {\n const guardsEnd = new GuardsCheckEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !, !!t.guardsResult);\n this.triggerEvent(guardsEnd);\n }),\n\n filter(t => {\n if (!t.guardsResult) {\n this.resetUrlToCurrentUrlTree();\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of (t).pipe(\n tap(t => {\n const resolveStart = new ResolveStart(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveStart);\n }),\n resolveData(\n this.paramsInheritanceStrategy,\n this.ngModule.injector), //\n tap(t => {\n const resolveEnd = new ResolveEnd(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveEnd);\n }), );\n }\n return undefined;\n }),\n\n // --- AFTER PREACTIVATION ---\n switchTap((t: NavigationTransition) => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.afterPreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n return ({...t, targetRouterState});\n }),\n\n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n tap((t: NavigationTransition) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n if (this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(\n this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n activateRoutes(\n this.rootContexts, this.routeReuseStrategy,\n (evt: Event) => this.triggerEvent(evt)),\n\n tap({next() { completed = true; }, complete() { completed = true; }}),\n finalize(() => {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n this.resetUrlToCurrentUrlTree();\n const navCancel = new NavigationCancel(\n t.id, this.serializeUrl(t.extractedUrl),\n `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n this.currentNavigation = null;\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n const redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n this.navigated = true;\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n\n if (redirecting) {\n this.navigateByUrl(e.url);\n }\n\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n } else {\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(this.errorHandler(e));\n } catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }), );\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n })) as any as Observable<NavigationTransition>;\n }\n\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n resetRootComponentType(rootComponentType: Type<any>): void {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n\n private getTransition(): NavigationTransition { return this.transitions.value; }\n\n private setTransition(t: Partial<NavigationTransition>): void {\n this.transitions.next({...this.getTransition(), ...t});\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n }\n }\n\n /**\n * Sets up the location change listener.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = <any>this.location.subscribe((change: any) => {\n let rawUrlTree = this.parseUrl(change['url']);\n const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n const state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(\n () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n });\n }\n }\n\n /** The current url */\n get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n /** The current Navigation object if one exists */\n getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n /** @internal */\n triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n\n /** @docsNotRequired */\n ngOnDestroy(): void { this.dispose(); }\n\n /** Disposes of the router */\n dispose(): void {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null !;\n }\n }\n\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n const {relativeTo, queryParams, fragment,\n preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n const a = relativeTo || this.routerState.root;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params|null = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n } else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n }\n\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\n `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n let urlTree: UrlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n\n /** Returns whether the url is activated */\n isActive(url: string|UrlTree, exact: boolean): boolean {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.keys(params).reduce((result: Params, key: string) => {\n const value: any = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private processNavigations(): void {\n this.navigations.subscribe(\n t => {\n this.navigated = true;\n this.lastSuccessfulId = t.id;\n (this.events as Subject<Event>)\n .next(new NavigationEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.currentNavigation = null;\n t.resolve(true);\n },\n e => { this.console.warn(`Unhandled Navigation Error: `); });\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n extras: NavigationExtras): Promise<boolean> {\n const lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n let resolve: any = null;\n let reject: any = null;\n\n const promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const id = ++this.navigationId;\n this.setTransition({\n id,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => { return Promise.reject(e); });\n }\n\n private setBrowserUrl(\n url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n const path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', {...state, navigationId: id});\n } else {\n this.location.go(path, '', {...state, navigationId: id});\n }\n }\n\n private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n (this as{routerState: RouterState}).routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n OnDestroy, AfterContentInit {\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLink, {descendants: true})\n links !: QueryList<RouterLink>;\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLinkWithHref, {descendants: true})\n linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n public readonly isActive: boolean = false;\n\n @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n constructor(\n private router: Router, private element: ElementRef, private renderer: Renderer2,\n private cdr: ChangeDetectorRef) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(_ => this.update());\n this.linksWithHrefs.changes.subscribe(_ => this.update());\n this.update();\n }\n\n @Input()\n set routerLinkActive(data: string[]|string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n\n ngOnChanges(changes: SimpleChanges): void { this.update(); }\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private update(): void {\n if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n (this as any).isActive = hasActiveLinks;\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n });\n }\n\n private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n return (link: RouterLink | RouterLinkWithHref) =>\n router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutlet|null = null;\n route: ActivatedRoute|null = null;\n resolver: ComponentFactoryResolver|null = null;\n children = new ChildrenOutletContexts();\n attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n private activated: ComponentRef<any>|null = null;\n private _activatedRoute: ActivatedRoute|null = null;\n private name: string;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n constructor(\n private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n private changeDetector: ChangeDetectorRef) {\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n\n ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n ngOnInit(): void {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n }\n\n get isActivated(): boolean { return !!this.activated; }\n\n get component(): Object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated) throw new Error('Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const snapshot = activatedRoute._futureSnapshot;\n const component = <any>snapshot.routeConfig !.component;\n resolver = resolver || this.resolver;\n const factory = resolver.resolveComponentFactory(component);\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(\n private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of (null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n private loader: RouterConfigLoader;\n // TODO(issue/24571): remove '!'.\n private subscription !: Subscription;\n\n constructor(\n private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n\n setUpPreloading(): void {\n this.subscription =\n this.router.events\n .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n const ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n }\n\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n const childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n\n // recurse into children\n } else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n return from(res).pipe(mergeAll(), map((_) => void 0));\n }\n\n private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const loaded$ = this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n route._loadedConfig = config;\n return this.processRoutes(config.module, config.routes);\n }));\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n private routerEventsSubscription !: Unsubscribable;\n // TODO(issue/24571): remove '!'.\n private scrollEventsSubscription !: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n constructor(\n private router: Router,\n /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n anchorScrolling?: 'disabled'|'enabled'\n } = {}) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.router.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.router.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n this.router.triggerEvent(new Scroll(\n routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n }\n\n ngOnDestroy() {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RouterEvent} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\nconst ROUTER_DIRECTIVES =\n [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n@NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n // Note: We are injecting the Router so it gets created eagerly...\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\n}\n\nexport function createRouterScroller(\n router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @description\n *\n * Represents an option to configure when the initial navigation is performed.\n *\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @publicApi\n */\nexport type InitialNavigation =\n true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @description\n *\n * Represents options to configure the router.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See `PreloadAllModules`.\n */\n preloadingStrategy?: any;\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation?: 'reload'|'ignore';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'--does nothing (default).\n * * 'top'--set the scroll position to 0,0..\n * * 'enabled'--set the scroll position to the stored position. This option will be the default in\n * the future.\n *\n * When enabled, the router stores and restores scroll positions during navigation.\n * When navigating forward, the scroll position will be set to [0, 0], or to the anchor\n * if one is provided.\n *\n * You can implement custom scroll restoration behavior as follows.\n * ```typescript\n * class AppModule {\n * constructor(router: Router, viewportScroller: ViewportScroller, store: Store<AppState>) {\n * router.events.pipe(filter(e => e instanceof Scroll), switchMap(e => {\n * return store.pipe(first(), timeout(200), map(() => e));\n * }).subscribe(e => {\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else if (e.anchor) {\n * viewportScroller.scrollToAnchor(e.anchor);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n * ```\n *\n * You can also implement component-specific scrolling like this:\n *\n * ```typescript\n * class ListComponent {\n * list: any[];\n * constructor(router: Router, viewportScroller: ViewportScroller, fetcher: ListFetcher) {\n * const scrollEvents = router.events.filter(e => e instanceof Scroll);\n * listFetcher.fetch().pipe(withLatestFrom(scrollEvents)).subscribe(([list, e]) => {\n * this.list = list;\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n */\n scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n /**\n * Configures if the router should scroll to the element when the url has a fragment.\n *\n * * 'disabled'--does nothing (default).\n * * 'enabled'--scrolls to the element. This option will be the default in the future.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled'|'enabled';\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with two numbers, the router will always use the numbers.\n * When given a function, the router will invoke the function every time it restores scroll\n * position.\n */\n scrollOffset?: [number, number]|(() => [number, number]);\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n /**\n * A custom malformed uri error handler function. This handler is invoked when encodedURI contains\n * invalid character sequences. The default implementation is to redirect to the root url dropping\n * any path or param info. This function passes three parameters:\n *\n * - `'URIError'` - Error thrown when parsing a bad URL\n * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n * - `'url'` - The malformed URL that caused the URIError\n * */\n malformedUriErrorHandler?:\n (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy?: 'deferred'|'eager';\n\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * Example:\n *\n * ```\n * const routes = [\n * {\n * path: '',\n * component: ContainerComponent,\n * children: [\n * { path: 'a', component: AComponent },\n * { path: 'b', component: BComponent },\n * ]\n * }\n * ];\n * ```\n *\n * From the `ContainerComponent`, this will not work:\n *\n * `<a [routerLink]=\"['./a']\">Link to A</a>`\n *\n * However, this will work:\n *\n * `<a [routerLink]=\"['../a']\">Link to A</a>`\n *\n * In other words, you're required to use `../` rather than `./`. This is currently the default\n * behavior. Setting this option to `corrected` enables the fix.\n */\n relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router = new Router(\n null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.enableTracing) {\n const dom = getDOM();\n router.events.subscribe((e: RouterEvent) => {\n dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n\n return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n private initNavigation: boolean = false;\n private resultOfPreactivationDone = new Subject<void>();\n\n constructor(private injector: Injector) {}\n\n appInitializer(): Promise<any> {\n const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let resolve: Function = null !;\n const res = new Promise(r => resolve = r);\n const router = this.injector.get(Router);\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null) as any;\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n\n bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n const preloader = this.injector.get(RouterPreloader);\n const routerScroller = this.injector.get(RouterScroller);\n const router = this.injector.get(Router);\n const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null !);\n this.resultOfPreactivationDone.complete();\n }\n\n private isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n\n private isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('7.2.8');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, LoadChildren, LoadChildrenCallback, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatchResult, UrlMatcher} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationExtras, Router} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_n} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_l,TreeNode as ɵangular_packages_router_router_m} from './src/utils/tree';"],"names":["tslib_1.__extends","Component","of","map","concatAll","lastValue","isObservable","isPromise","from","tslib_1.__values","BehaviorSubject","Observable","NgModuleRef","catchError","first","EmptyError","mergeMap","every","applyRedirects","switchMap","applyRedirectsFn","combineLatest","take","startWith","scan","filter","concatMap","defer","split","NoMatch","match","getOutlet","recognize","recognizeFn","reduce","last","InjectionToken","NgModuleFactory","Subject","Console","NgZone","tslib_1.__assign","tap","EMPTY","finalize","isDevMode","tslib_1.__decorate","Input","HostListener","Directive","tslib_1.__param","Attribute","Renderer2","ElementRef","HostBinding","LocationStrategy","ContentChildren","QueryList","ChangeDetectorRef","EventEmitter","Output","ViewContainerRef","ComponentFactoryResolver","mergeAll","Injectable","NgModuleFactoryLoader","Compiler","Injector","Location","ApplicationRef","Optional","SystemJsNgModuleLoader","NgProbeToken","SkipSelf","PlatformLocation","Inject","APP_BASE_HREF","ViewportScroller","NgModule","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","getDOM","LOCATION_INITIALIZED","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","Version"],"mappings":";;;;;;;;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SA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mBG,aAAQ;WAJ3B,iBAAiB,CA4E7B;QAAD,wBAAC;KA5ED,IA4EC;aAEe,iBAAiB,CAAC,CAAoB;QACpD,OAAO,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;AAED,aAAgB,oBAAoB,CAAC,CAAoB;QACvD,OAAO,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IAED;;;;;AAKA,QAAa,kBAAkB,GAC3B,IAAI/B,mBAAc,CAAuC,oBAAoB,CAAC,CAAC;AAEnF,aAAgB,wBAAwB;QACtC,OAAO;YACL,iBAAiB;YACjB;gBACE,OAAO,EAAEgD,oBAAe;gBACxB,KAAK,EAAE,IAAI;gBACX,UAAU,EAAE,iBAAiB;gBAC7B,IAAI,EAAE,CAAC,iBAAiB,CAAC;aAC1B;YACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;YAC1F,EAAC,OAAO,EAAEC,2BAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;SAChF,CAAC;IACJ,CAAC;;ICnnBD;;;;;;;AAQA,IAQA;;;AAGA,QAAa,OAAO,GAAG,IAAIC,YAAO,CAAC,mBAAmB,CAAC;;ICnBvD;;;;;;OAMG;;ICNH;;;;;;OAMG;;ICNH;;;;;;;AAQA,IAOA,0EAA0E;;ICf1E;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ No newline at end of file

bundles/router.umd.min.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@@ -175,7 +175,7 @@
*
* 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 ir=new r.Version("7.2.7");
+ */var ir=new r.Version("7.2.8");
/**
* @license
* Copyright Google Inc. All Rights Reserved.

bundles/router.umd.min.js.map

@@ -1 +1 @@
-{"version":3,"sources":["packages/router/router.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","common","core","rxjs","operators","platformBrowser","this","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__values","o","m","Symbol","iterator","next","value","done","__read","e","ar","push","error","__spread","concat","RouterEvent","NavigationStart","_super","id","url","navigationTrigger","restoredState","_this","toString","NavigationEnd","urlAfterRedirects","NavigationCancel","reason","NavigationError","RoutesRecognized","state","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","route","path","RouteConfigLoadEnd","ChildActivationStart","snapshot","routeConfig","ChildActivationEnd","ActivationStart","ActivationEnd","Scroll","routerEvent","position","anchor","EmptyOutletComponent","Component","template","PRIMARY_OUTLET","ParamsAsMap","params","has","name","get","v","isArray","getAll","keys","enumerable","configurable","convertToParamMap","NAVIGATION_CANCELING_ERROR","navigationCancelingError","message","Error","defaultUrlMatcher","segments","segmentGroup","parts","split","pathMatch","hasChildren","posParams","index","part","segment","startsWith","substring","consumed","slice","LoadedRouterConfig","routes","validateConfig","config","parentPath","validateNode","getFullPath","fullPath","component","children","loadChildren","outlet","redirectTo","matcher","charAt","currentRoute","standardizeConfig","map","shallowEqual","a","k1","k2","flatten","arr","last","forEach","callback","prop","wrapIntoObservable","ɵisObservable","ɵisPromise","from","Promise","resolve","of","containsTree","container","containee","exact","equalQueryParams","queryParams","equalSegmentGroups","equalPath","numberOfChildren","root","containsQueryParams","every","containsSegmentGroup","containsSegmentGroupHelper","containeePaths","current","UrlTree","fragment","_queryParamMap","DEFAULT_SERIALIZER","serialize","UrlSegmentGroup","parent","k","serializePaths","UrlSegment","parameters","_parameterMap","serializePath","as","bs","mapChildrenIntoArray","fn","res","child","childOutlet","UrlSerializer","DefaultUrlSerializer","parse","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","primary","children_1","join","serializeQueryParams","strParams","encodeUriQuery","encodeUriFragment","encodeURI","encodeUriString","encodeURIComponent","replace","encodeUriSegment","decode","decodeURIComponent","decodeQuery","serializeMatrixParams","SEGMENT_RE","matchSegments","str","match","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","capture","parseParens","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","undefined","indexOf","substr","Tree","_root","pathFromRoot","findNode","firstChild","siblings","findPath","filter","cc","node","e_1","_a","_b","_c","node_1","e_1_1","return","e_2","unshift","e_2_1","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","urlTree","rootComponent","createEmptyStateSnapshot","activated","ActivatedRouteSnapshot","RouterStateSnapshot","emptyUrl","BehaviorSubject","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","data","futureSnapshot","_futureSnapshot","_routerState","_paramMap","pipe","inheritedParamsDataResolve","paramsInheritanceStrategy","inheritingStartingFrom","parent_1","flattenInherited","reduce","curr","_resolvedData","urlSegment","lastPathIndex","_urlSegment","_lastPathIndex","_resolve","serializeNode","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalSegments","isMatrixParams","command","outlets","segmentPath","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","oldSegment","newSegment","Navigation","isAbsolute","numberOfDoubleDots","commands","cmdWithOutlet","find","toRoot","Position","processChildren","getPath","updateSegmentGroup","startIndex","updateSegmentGroupChildren","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","compare","slicedCommands","g","createNewSegmentGroup","outlets_2","getOutlets","paths","createNewSegmentChildren","stringify","ActivateRoutes","routeReuseStrategy","futureState","currState","forwardEvent","activate","parentContexts","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","contexts","futureChild","childOutletName","deactivateRoutes","childName","deactivateRouteAndItsChildren","parentContext","future","context","getContext","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","componentRef","detach","onOutletDeactivated","store","contexts_1","deactivate","activateRoutes","getOrCreateContext","shouldAttach","stored","retrieve","onOutletReAttached","attachRef","attach","advanceActivatedRouteNodeAndItsChildren","parentLoadedConfig","_loadedConfig","cmpFactoryResolver","componentFactoryResolver","resolver","activateWith","isFunction","isUrlTree","NoMatch","AbsoluteRedirect","Observable","obs","absoluteRedirect","newTree","namedOutletsRedirect","ApplyRedirects","moduleInjector","configLoader","urlSerializer","allowRedirects","ngModule","NgModuleRef","expandSegmentGroup","rootSegmentGroup","createUrlTree","catchError","noMatchError","rootCandidate","expandChildren","expandSegment","waitForMap","obj","waitHead","waitTail","mapped","concatAll","expandSegmentAgainstRoute","first","_","EmptyError","noLeftoversInUrl","getOutlet","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","lineralizeSegments","mergeMap","newSegments","group","consumedSegments","lastChild","positionalParamSegments","matched","rawSegmentGroup","load","injector","cfg","rawSlicedSegments","getChildConfig","routerConfig","childModule","childConfig","slicedSegments","containsEmptyPathRedirectsWithNamedOutlets","some","isEmptyPathRedirect","mergeTrivialChildren","createChildrenForEmptySegments","primarySegmentGroup","e_3","routes_2","routes_2_1","e_3_1","containsEmptyPathRedirects","addEmptySegmentsToChildrenIfNeeded","routes_1","routes_1_1","cs","runCanLoadGuard","canLoad","injectionToken","guardVal","guard","isCanLoad","result","shouldLoad","canLoadFails","applyRedirectCreatreUrlTree","newRoot","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","pos","idx","actualSegments_1","actualSegments_1_1","splice","CanActivate","CanDeactivate","getToken","token","getClosestLoadedConfig","checks","canDeactivateChecks","isActivated","INITIAL_VALUE","prioritizedGuardValue","switchMap","combineLatest","take","startWith","scan","acc","list","isPending","innerAcc","val","item","NoMatch$1","Recognizer","rootComponentType","relativeLinkResolution","recognize","split$1","processSegmentGroup","freeze","rootNode","routeState","inheritParamsAndData","routeNode","processSegment","checkOutletNameUniqueness","nodes","names","routeWithSameOutletName","sortActivatedRouteSnapshots","sort","localeCompare","config_1","config_1_1","processSegmentAgainstRoute","rawSegment","getData","getSourceSegmentGroup","getPathIndexShift","getResolve","match$1","_sourceSegment","_segmentIndexShift","containsEmptyPathMatchesWithNamedOutlets","emptyPathMatch","getOutlet$1","s_1","createChildrenForEmptyPaths","primarySegment","containsEmptyPathMatches","s_2","addEmptyPathsToChildrenIfNeeded","getResolver","futureARS","futureRSS","switchTap","source","nextResult","RouteReuseStrategy","DefaultRouteReuseStrategy","detachedTree","shouldReuseRoute","ROUTES","InjectionToken","RouterConfigLoader","loader","compiler","onLoadStartListener","onLoadEndListener","parentInjector","loadModuleFactory","NgModuleFactory","compileModuleAsync","UrlHandlingStrategy","DefaultUrlHandlingStrategy","shouldProcessUrl","extract","merge","newUrlPart","wholeUrl","defaultErrorHandler","defaultMalformedUriErrorHandler","defaultRouterHook","runExtras","Router","rootContexts","location","lastSuccessfulNavigation","currentNavigation","navigationId","isNgZoneEnabled","events","Subject","errorHandler","malformedUriErrorHandler","navigated","lastSuccessfulId","hooks","beforePreactivation","afterPreactivation","urlHandlingStrategy","onSameUrlNavigation","urlUpdateStrategy","console","ɵConsole","ngZone","NgZone","resetConfig","currentUrlTree","createEmptyUrlTree","rawUrlTree","browserUrlTree","triggerEvent","routerState","transitions","currentRawUrl","extractedUrl","rawUrl","extras","reject","promise","targetSnapshot","currentRouterState","targetRouterState","guards","canActivateChecks","guardsResult","navigations","setupNavigations","processNavigations","eventsSubject","tap","initialUrl","trigger","previousNavigation","completed","errored","urlTransition","transition","getValue","serializeUrl","EMPTY","applyRedirects$1","applyRedirects","finalUrl","recognize$1","serializer","skipLocationChange","setBrowserUrl","replaceUrl","routesRecognized","navStart","appliedUrlTree","guardsStart","getAllRouteGuards","getChildRouteGuards","futurePath","prevChildren","getRouteGuards","shouldRun","shouldRunGuardsAndResolvers","mode","runGuardsAndResolvers","checkGuards","runCanDeactivateChecks","currRSS","check","runCanDeactivate","currARS","canDeactivate","canDeactivateObservables","observable","isCanDeactivate","isBoolean","runCanActivateChecks","concatMap","fireChildActivationStart","fireActivationStart","runCanActivateChild","canActivateChildGuardsMapped","reverse","getCanActivateChild","canActivateChild","defer","guardsMapped","isCanActivateChild","runCanActivate","canActivate","canActivateObservables","isCanActivate","evt","guardsEnd","resetUrlToCurrentUrlTree","navCancel","resolveStart","resolveData","runResolve","resolveNode","key_1","resolvedData","resolveEnd","createRouterState","prevState","createNode","createOrReuseChildren","detachedRouteHandle","setFutureSnapshotsOfActivatedRoutes","createActivatedRoute","complete","finalize","isNavigationCancelingError","redirecting","resetStateAndUrl","navigateByUrl","navError","ee","resetRootComponentType","getTransition","setTransition","initialNavigation","setUpLocationChangeListener","locationSubscription","subscribe","change","parseUrl","setTimeout","scheduleNavigation","getCurrentNavigation","event","ngOnDestroy","dispose","unsubscribe","navigationExtras","relativeTo","preserveQueryParams","queryParamsHandling","preserveFragment","isDevMode","warn","f","q","removeEmptyProps","nav","computeNavigation","cmd","cmdIdx","outlets_1","urlPart","partIndex","startingPosition","findStartingPosition","modifier","createPositionApplyingDoubleDots","ci","dd","isInAngularZone","mergedTree","navigate","validateCommands","isActive","lastNavigation","rej","catch","isCurrentPathEqualTo","replaceState","go","storedState","storedUrl","RouterLink","tabIndex","renderer","el","setAttribute","nativeElement","set","preserve","onClick","attrBoolValue","Input","String","Boolean","HostListener","Function","Directive","selector","Attribute","Renderer2","ElementRef","RouterLinkWithHref","locationStrategy","subscription","updateTargetUrlAndHref","ngOnChanges","changes","button","ctrlKey","metaKey","shiftKey","href","prepareExternalUrl","HostBinding","Number","LocationStrategy","RouterLinkActive","element","cdr","classes","routerLinkActiveOptions","update","ngAfterContentInit","links","linksWithHrefs","then","hasActiveLinks","addClass","removeClass","isLinkActive","link","ContentChildren","descendants","QueryList","exportAs","ChangeDetectorRef","OutletContext","ChildrenOutletContexts","Map","onChildOutletCreated","onChildOutletDestroyed","RouterOutlet","changeDetector","_activatedRoute","activateEvents","EventEmitter","deactivateEvents","ngOnInit","instance","cmp","ref","activatedRoute","insert","hostView","destroy","emit","resolveComponentFactory","childContexts","OutletInjector","createComponent","markForCheck","Output","ViewContainerRef","ComponentFactoryResolver","notFoundValue","PreloadingStrategy","PreloadAllModules","preload","NoPreloading","RouterPreloader","moduleLoader","preloadingStrategy","setUpPreloading","processRoutes","preloadConfig","mergeAll","Injectable","NgModuleFactoryLoader","Compiler","Injector","RouterScroller","viewportScroller","options","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","init","setHistoryScrollRestoration","routerEventsSubscription","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","getScrollPosition","scheduleScrollEvent","scrollToPosition","scrollToAnchor","ROUTER_DIRECTIVES","ROUTER_CONFIGURATION","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","Location","provide","useClass","useFactory","setupRouter","deps","ApplicationRef","Optional","rootRoute","SystemJsNgModuleLoader","useValue","enableTracing","routerNgProbeToken","NgProbeToken","RouterModule","RouterModule_1","forRoot","providers","provideRoutes","provideForRootGuard","SkipSelf","provideLocationStrategy","PlatformLocation","Inject","APP_BASE_HREF","createRouterScroller","ViewportScroller","useExisting","multi","provideRouterInitializer","forChild","NgModule","declarations","entryComponents","scrollOffset","setOffset","platformLocationStrategy","baseHref","useHash","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","opts","dom_1","ɵgetDOM","logGroup","log","logGroupEnd","RouterInitializer","initNavigation","resultOfPreactivationDone","appInitializer","LOCATION_INITIALIZED","isLegacyDisabled","isLegacyEnabled","bootstrapListener","bootstrappedComponentRef","preloader","routerScroller","components","componentTypes","getAppInitializer","bind","getBootstrapListener","ROUTER_INITIALIZER","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","VERSION","Version","ɵangular_packages_router_router_a","ɵangular_packages_router_router_h","ɵangular_packages_router_router_c","ɵangular_packages_router_router_i","ɵangular_packages_router_router_j","ɵangular_packages_router_router_e","ɵangular_packages_router_router_d","ɵangular_packages_router_router_k","ɵangular_packages_router_router_g","ɵangular_packages_router_router_b","ɵangular_packages_router_router_f","ɵangular_packages_router_router_n","ɵangular_packages_router_router_l","ɵangular_packages_router_router_m","ɵEmptyOutletComponent","ɵROUTER_PROVIDERS","ɵflatten"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,QAASA,QAAQ,kBAAmBA,QAAQ,8BACxK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,mBAAoB,UAAW,kBAAmB,gBAAiB,OAAQ,iBAAkB,6BAA8BJ,GACrJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,OAAUR,EAAOQ,GAAGC,WAAcT,EAAOQ,GAAGE,OAAQV,EAAOQ,GAAGG,KAAMX,EAAOY,KAAMZ,EAAOY,KAAKC,UAAWb,EAAOQ,GAAGM,iBAH5K,CAIEC,KAAM,SAAUb,EAASQ,EAAQC,EAAMC,EAAMC,EAAWC,GAAmB,aAkBzE,IAAIE,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,iBAChBC,wBAA2BC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACv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0B,EAAQ80B,cAAgBA,GACxB90B,EAAQ82B,aAAeA,GACvB92B,EAAQ42B,kBAAoBA,GAC5B52B,EAAQ22B,mBAAqBA,GAC7B32B,EAAQ+2B,gBAAkBA,GAC1B/2B,EAAQ4S,eAAiBA,GACzB5S,EAAQqS,uBAAyBA,GACjCrS,EAAQ8R,YAAcA,GACtB9R,EAAQsS,oBAAsBA,GAC9BtS,EAAQ6G,eAAiBA,EACzB7G,EAAQyH,kBAAoBA,EAC5BzH,EAAQolB,oBAAsBA,GAC9BplB,EAAQqN,qBAAuBA,GAC/BrN,EAAQyM,WAAaA,EACrBzM,EAAQqM,gBAAkBA,EAC1BrM,EAAQoN,cAAgBA,GACxBpN,EAAQgM,QAAUA,EAClBhM,EAAQm9B,QAAUA,GAClBn9B,EAAQm+B,sBAAwBz3B,EAChC1G,EAAQo+B,kBAAoBrF,GAC5B/4B,EAAQq+B,SAAWl0B,EAEnBlJ,OAAO+B,eAAehD,EAAS,cAAgB8D,OAAO","sourcesContent":["/**\n * @license Angular v7.2.7\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/platform-browser')) :\n typeof define === 'function' && define.amd ? define('@angular/router', ['exports', '@angular/common', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/platform-browser'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = {}), global.ng.common, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.platformBrowser));\n}(this, function (exports, common, core, rxjs, operators, platformBrowser) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise */\r\n\r\n var extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n\r\n function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n }\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n }\r\n\r\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n\r\n function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n }\r\n\r\n function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var RouterEvent = /** @class */ (function () {\n function RouterEvent(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url) {\n this.id = id;\n this.url = url;\n }\n return RouterEvent;\n }());\n /**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\n var NavigationStart = /** @class */ (function (_super) {\n __extends(NavigationStart, _super);\n function NavigationStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n navigationTrigger, \n /** @docsNotRequired */\n restoredState) {\n if (navigationTrigger === void 0) { navigationTrigger = 'imperative'; }\n if (restoredState === void 0) { restoredState = null; }\n var _this = _super.call(this, id, url) || this;\n _this.navigationTrigger = navigationTrigger;\n _this.restoredState = restoredState;\n return _this;\n }\n /** @docsNotRequired */\n NavigationStart.prototype.toString = function () { return \"NavigationStart(id: \" + this.id + \", url: '\" + this.url + \"')\"; };\n return NavigationStart;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\n var NavigationEnd = /** @class */ (function (_super) {\n __extends(NavigationEnd, _super);\n function NavigationEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n return _this;\n }\n /** @docsNotRequired */\n NavigationEnd.prototype.toString = function () {\n return \"NavigationEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"')\";\n };\n return NavigationEnd;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\n var NavigationCancel = /** @class */ (function (_super) {\n __extends(NavigationCancel, _super);\n function NavigationCancel(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n reason) {\n var _this = _super.call(this, id, url) || this;\n _this.reason = reason;\n return _this;\n }\n /** @docsNotRequired */\n NavigationCancel.prototype.toString = function () { return \"NavigationCancel(id: \" + this.id + \", url: '\" + this.url + \"')\"; };\n return NavigationCancel;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\n var NavigationError = /** @class */ (function (_super) {\n __extends(NavigationError, _super);\n function NavigationError(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n error) {\n var _this = _super.call(this, id, url) || this;\n _this.error = error;\n return _this;\n }\n /** @docsNotRequired */\n NavigationError.prototype.toString = function () {\n return \"NavigationError(id: \" + this.id + \", url: '\" + this.url + \"', error: \" + this.error + \")\";\n };\n return NavigationError;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\n var RoutesRecognized = /** @class */ (function (_super) {\n __extends(RoutesRecognized, _super);\n function RoutesRecognized(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n /** @docsNotRequired */\n RoutesRecognized.prototype.toString = function () {\n return \"RoutesRecognized(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return RoutesRecognized;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\n var GuardsCheckStart = /** @class */ (function (_super) {\n __extends(GuardsCheckStart, _super);\n function GuardsCheckStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n GuardsCheckStart.prototype.toString = function () {\n return \"GuardsCheckStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return GuardsCheckStart;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\n var GuardsCheckEnd = /** @class */ (function (_super) {\n __extends(GuardsCheckEnd, _super);\n function GuardsCheckEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state, \n /** @docsNotRequired */\n shouldActivate) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n _this.shouldActivate = shouldActivate;\n return _this;\n }\n GuardsCheckEnd.prototype.toString = function () {\n return \"GuardsCheckEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \", shouldActivate: \" + this.shouldActivate + \")\";\n };\n return GuardsCheckEnd;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\n var ResolveStart = /** @class */ (function (_super) {\n __extends(ResolveStart, _super);\n function ResolveStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveStart.prototype.toString = function () {\n return \"ResolveStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveStart;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\n var ResolveEnd = /** @class */ (function (_super) {\n __extends(ResolveEnd, _super);\n function ResolveEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveEnd.prototype.toString = function () {\n return \"ResolveEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveEnd;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\n var RouteConfigLoadStart = /** @class */ (function () {\n function RouteConfigLoadStart(\n /** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadStart.prototype.toString = function () { return \"RouteConfigLoadStart(path: \" + this.route.path + \")\"; };\n return RouteConfigLoadStart;\n }());\n /**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\n var RouteConfigLoadEnd = /** @class */ (function () {\n function RouteConfigLoadEnd(\n /** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadEnd.prototype.toString = function () { return \"RouteConfigLoadEnd(path: \" + this.route.path + \")\"; };\n return RouteConfigLoadEnd;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\n var ChildActivationStart = /** @class */ (function () {\n function ChildActivationStart(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationStart(path: '\" + path + \"')\";\n };\n return ChildActivationStart;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\n var ChildActivationEnd = /** @class */ (function () {\n function ChildActivationEnd(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationEnd(path: '\" + path + \"')\";\n };\n return ChildActivationEnd;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\n var ActivationStart = /** @class */ (function () {\n function ActivationStart(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationStart(path: '\" + path + \"')\";\n };\n return ActivationStart;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\n var ActivationEnd = /** @class */ (function () {\n function ActivationEnd(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationEnd(path: '\" + path + \"')\";\n };\n return ActivationEnd;\n }());\n /**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\n var Scroll = /** @class */ (function () {\n function Scroll(\n /** @docsNotRequired */\n routerEvent, \n /** @docsNotRequired */\n position, \n /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n }\n Scroll.prototype.toString = function () {\n var pos = this.position ? this.position[0] + \", \" + this.position[1] : null;\n return \"Scroll(anchor: '\" + this.anchor + \"', position: '\" + pos + \"')\";\n };\n return Scroll;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n var EmptyOutletComponent = /** @class */ (function () {\n function EmptyOutletComponent() {\n }\n EmptyOutletComponent = __decorate([\n core.Component({ template: \"<router-outlet></router-outlet>\" })\n ], EmptyOutletComponent);\n return EmptyOutletComponent;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\n var PRIMARY_OUTLET = 'primary';\n var ParamsAsMap = /** @class */ (function () {\n function ParamsAsMap(params) {\n this.params = params || {};\n }\n ParamsAsMap.prototype.has = function (name) { return this.params.hasOwnProperty(name); };\n ParamsAsMap.prototype.get = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n };\n ParamsAsMap.prototype.getAll = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n };\n Object.defineProperty(ParamsAsMap.prototype, \"keys\", {\n get: function () { return Object.keys(this.params); },\n enumerable: true,\n configurable: true\n });\n return ParamsAsMap;\n }());\n /**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\n function convertToParamMap(params) {\n return new ParamsAsMap(params);\n }\n var NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n function navigationCancelingError(message) {\n var error = Error('NavigationCancelingError: ' + message);\n error[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n }\n function isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n }\n // Matches the route configuration (`route`) against the actual URL (`segments`).\n function defaultUrlMatcher(segments, segmentGroup, route) {\n var parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n var posParams = {};\n // Check each config part against the actual URL\n for (var index = 0; index < parts.length; index++) {\n var part = parts[index];\n var segment = segments[index];\n var isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n }\n else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return { consumed: segments.slice(0, parts.length), posParams: posParams };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var LoadedRouterConfig = /** @class */ (function () {\n function LoadedRouterConfig(routes, module) {\n this.routes = routes;\n this.module = module;\n }\n return LoadedRouterConfig;\n }());\n function validateConfig(config, parentPath) {\n if (parentPath === void 0) { parentPath = ''; }\n // forEach doesn't iterate undefined values\n for (var i = 0; i < config.length; i++) {\n var route = config[i];\n var fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n }\n function validateNode(route, fullPath) {\n if (!route) {\n throw new Error(\"\\n Invalid configuration of route '\" + fullPath + \"': Encountered undefined route.\\n The reason might be an extra comma.\\n\\n Example:\\n const routes: Routes = [\\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\\n { path: 'dashboard', component: DashboardComponent },, << two commas\\n { path: 'detail/:id', component: HeroDetailComponent }\\n ];\\n \");\n }\n if (Array.isArray(route)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': Array cannot be specified\");\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': a componentless route without children or loadChildren cannot have a named outlet set\");\n }\n if (route.redirectTo && route.children) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and children cannot be used together\");\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and loadChildren cannot be used together\");\n }\n if (route.children && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': children and loadChildren cannot be used together\");\n }\n if (route.redirectTo && route.component) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and component cannot be used together\");\n }\n if (route.path && route.matcher) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': path and matcher cannot be used together\");\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"'. One of the following must be provided: component, redirectTo, children or loadChildren\");\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': routes must have either a path or a matcher specified\");\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': path cannot start with a slash\");\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n var exp = \"The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.\";\n throw new Error(\"Invalid configuration of route '{path: \\\"\" + fullPath + \"\\\", redirectTo: \\\"\" + route.redirectTo + \"\\\"}': please provide 'pathMatch'. \" + exp);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': pathMatch can only be set to 'prefix' or 'full'\");\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n }\n function getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n }\n else if (parentPath && !currentRoute.path) {\n return parentPath + \"/\";\n }\n else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n }\n else {\n return parentPath + \"/\" + currentRoute.path;\n }\n }\n /**\n * Makes a copy of the config and adds any default required properties.\n */\n function standardizeConfig(r) {\n var children = r.children && r.children.map(standardizeConfig);\n var c = children ? __assign({}, r, { children: children }) : __assign({}, r);\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function shallowEqualArrays(a, b) {\n if (a.length !== b.length)\n return false;\n for (var i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i]))\n return false;\n }\n return true;\n }\n function shallowEqual(a, b) {\n var k1 = Object.keys(a);\n var k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n var key;\n for (var i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Flattens single-level nested arrays.\n */\n function flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n /**\n * Return the last element of an array.\n */\n function last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n }\n function forEach(map, callback) {\n for (var prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n }\n function waitForMap(obj, fn) {\n if (Object.keys(obj).length === 0) {\n return rxjs.of({});\n }\n var waitHead = [];\n var waitTail = [];\n var res = {};\n forEach(obj, function (a, k) {\n var mapped = fn(k, a).pipe(operators.map(function (r) { return res[k] = r; }));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n }\n else {\n waitTail.push(mapped);\n }\n });\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return rxjs.of.apply(null, waitHead.concat(waitTail)).pipe(operators.concatAll(), operators.last(), operators.map(function () { return res; }));\n }\n function wrapIntoObservable(value) {\n if (core.ɵisObservable(value)) {\n return value;\n }\n if (core.ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return rxjs.from(Promise.resolve(value));\n }\n return rxjs.of(value);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n }\n function containsTree(container, containee, exact) {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n }\n function equalQueryParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n }\n function equalSegmentGroups(container, containee) {\n if (!equalPath(container.segments, containee.segments))\n return false;\n if (container.numberOfChildren !== containee.numberOfChildren)\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n }\n function containsQueryParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(function (key) { return containee[key] === container[key]; });\n }\n function containsSegmentGroup(container, containee) {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n }\n function containsSegmentGroupHelper(container, containee, containeePaths) {\n if (container.segments.length > containeePaths.length) {\n var current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths))\n return false;\n if (containee.hasChildren())\n return false;\n return true;\n }\n else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths))\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n }\n else {\n var current = containeePaths.slice(0, container.segments.length);\n var next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current))\n return false;\n if (!container.children[PRIMARY_OUTLET])\n return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n }\n /**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var UrlTree = /** @class */ (function () {\n /** @internal */\n function UrlTree(\n /** The root segment group of the URL tree */\n root, \n /** The query params of the URL */\n queryParams, \n /** The fragment of the URL */\n fragment) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n }\n Object.defineProperty(UrlTree.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlTree.prototype.toString = function () { return DEFAULT_SERIALIZER.serialize(this); };\n return UrlTree;\n }());\n /**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\n var UrlSegmentGroup = /** @class */ (function () {\n function UrlSegmentGroup(\n /** The URL segments of this group. See `UrlSegment` for more information */\n segments, \n /** The list of children of this group */\n children) {\n var _this = this;\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n forEach(children, function (v, k) { return v.parent = _this; });\n }\n /** Whether the segment has child segments */\n UrlSegmentGroup.prototype.hasChildren = function () { return this.numberOfChildren > 0; };\n Object.defineProperty(UrlSegmentGroup.prototype, \"numberOfChildren\", {\n /** Number of child segments */\n get: function () { return Object.keys(this.children).length; },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegmentGroup.prototype.toString = function () { return serializePaths(this); };\n return UrlSegmentGroup;\n }());\n /**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var UrlSegment = /** @class */ (function () {\n function UrlSegment(\n /** The path part of a URL segment */\n path, \n /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n Object.defineProperty(UrlSegment.prototype, \"parameterMap\", {\n get: function () {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegment.prototype.toString = function () { return serializePath(this); };\n return UrlSegment;\n }());\n function equalSegments(as, bs) {\n return equalPath(as, bs) && as.every(function (a, i) { return shallowEqual(a.parameters, bs[i].parameters); });\n }\n function equalPath(as, bs) {\n if (as.length !== bs.length)\n return false;\n return as.every(function (a, i) { return a.path === bs[i].path; });\n }\n function mapChildrenIntoArray(segment, fn) {\n var res = [];\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n }\n /**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\n var UrlSerializer = /** @class */ (function () {\n function UrlSerializer() {\n }\n return UrlSerializer;\n }());\n /**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\n var DefaultUrlSerializer = /** @class */ (function () {\n function DefaultUrlSerializer() {\n }\n /** Parses a url into a `UrlTree` */\n DefaultUrlSerializer.prototype.parse = function (url) {\n var p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n };\n /** Converts a `UrlTree` into a url */\n DefaultUrlSerializer.prototype.serialize = function (tree) {\n var segment = \"/\" + serializeSegment(tree.root, true);\n var query = serializeQueryParams(tree.queryParams);\n var fragment = typeof tree.fragment === \"string\" ? \"#\" + encodeUriFragment(tree.fragment) : '';\n return \"\" + segment + query + fragment;\n };\n return DefaultUrlSerializer;\n }());\n var DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n function serializePaths(segment) {\n return segment.segments.map(function (p) { return serializePath(p); }).join('/');\n }\n function serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n var primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n var children_1 = [];\n forEach(segment.children, function (v, k) {\n if (k !== PRIMARY_OUTLET) {\n children_1.push(k + \":\" + serializeSegment(v, false));\n }\n });\n return children_1.length > 0 ? primary + \"(\" + children_1.join('//') + \")\" : primary;\n }\n else {\n var children = mapChildrenIntoArray(segment, function (v, k) {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [k + \":\" + serializeSegment(v, false)];\n });\n return serializePaths(segment) + \"/(\" + children.join('//') + \")\";\n }\n }\n /**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\n function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n }\n /**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\n function encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n }\n /**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\n function encodeUriFragment(s) {\n return encodeURI(s);\n }\n /**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\n function encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n }\n function decode(s) {\n return decodeURIComponent(s);\n }\n // Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n // decodeURIComponent function will not decode \"+\" as a space.\n function decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n }\n function serializePath(path) {\n return \"\" + encodeUriSegment(path.path) + serializeMatrixParams(path.parameters);\n }\n function serializeMatrixParams(params) {\n return Object.keys(params)\n .map(function (key) { return \";\" + encodeUriSegment(key) + \"=\" + encodeUriSegment(params[key]); })\n .join('');\n }\n function serializeQueryParams(params) {\n var strParams = Object.keys(params).map(function (name) {\n var value = params[name];\n return Array.isArray(value) ?\n value.map(function (v) { return encodeUriQuery(name) + \"=\" + encodeUriQuery(v); }).join('&') :\n encodeUriQuery(name) + \"=\" + encodeUriQuery(value);\n });\n return strParams.length ? \"?\" + strParams.join(\"&\") : '';\n }\n var SEGMENT_RE = /^[^\\/()?;=#]+/;\n function matchSegments(str) {\n var match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n }\n var QUERY_PARAM_RE = /^[^=?&#]+/;\n // Return the name of the query param at the start of the string or an empty string\n function matchQueryParams(str) {\n var match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n }\n var QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n // Return the value of the query param at the start of the string or an empty string\n function matchUrlQueryParamValue(str) {\n var match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n }\n var UrlParser = /** @class */ (function () {\n function UrlParser(url) {\n this.url = url;\n this.remaining = url;\n }\n UrlParser.prototype.parseRootSegment = function () {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n };\n UrlParser.prototype.parseQueryParams = function () {\n var params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n };\n UrlParser.prototype.parseFragment = function () {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n };\n UrlParser.prototype.parseChildren = function () {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n var segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n var children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n var res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n };\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n UrlParser.prototype.parseSegment = function () {\n var path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(\"Empty path url segment cannot have parameters: '\" + this.remaining + \"'.\");\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n };\n UrlParser.prototype.parseMatrixParams = function () {\n var params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n };\n UrlParser.prototype.parseParam = function (params) {\n var key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n };\n // Parse a single query parameter `name[=value]`\n UrlParser.prototype.parseQueryParam = function (params) {\n var key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n var decodedKey = decodeQuery(key);\n var decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n var currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n }\n else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n };\n // parse `(a/b//outlet_name:c/d)`\n UrlParser.prototype.parseParens = function (allowPrimary) {\n var segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n var path = matchSegments(this.remaining);\n var next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(\"Cannot parse url '\" + this.url + \"'\");\n }\n var outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n }\n else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n var children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n };\n UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };\n // Consumes the prefix when it is present and returns whether it has been consumed\n UrlParser.prototype.consumeOptional = function (str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n };\n UrlParser.prototype.capture = function (str) {\n if (!this.consumeOptional(str)) {\n throw new Error(\"Expected \\\"\" + str + \"\\\".\");\n }\n };\n return UrlParser;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var Tree = /** @class */ (function () {\n function Tree(root) {\n this._root = root;\n }\n Object.defineProperty(Tree.prototype, \"root\", {\n get: function () { return this._root.value; },\n enumerable: true,\n configurable: true\n });\n /**\n * @internal\n */\n Tree.prototype.parent = function (t) {\n var p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n };\n /**\n * @internal\n */\n Tree.prototype.children = function (t) {\n var n = findNode(t, this._root);\n return n ? n.children.map(function (t) { return t.value; }) : [];\n };\n /**\n * @internal\n */\n Tree.prototype.firstChild = function (t) {\n var n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n };\n /**\n * @internal\n */\n Tree.prototype.siblings = function (t) {\n var p = findPath(t, this._root);\n if (p.length < 2)\n return [];\n var c = p[p.length - 2].children.map(function (c) { return c.value; });\n return c.filter(function (cc) { return cc !== t; });\n };\n /**\n * @internal\n */\n Tree.prototype.pathFromRoot = function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };\n return Tree;\n }());\n // DFS for the node matching the value\n function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n }\n // Return the path to the node with the given value using DFS\n function findPath(value, node) {\n var e_2, _a;\n if (value === node.value)\n return [node];\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return [];\n }\n var TreeNode = /** @class */ (function () {\n function TreeNode(value, children) {\n this.value = value;\n this.children = children;\n }\n TreeNode.prototype.toString = function () { return \"TreeNode(\" + this.value + \")\"; };\n return TreeNode;\n }());\n // Return the list of T indexed by outlet name\n function nodeChildrenAsMap(node) {\n var map = {};\n if (node) {\n node.children.forEach(function (child) { return map[child.value.outlet] = child; });\n }\n return map;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\n var RouterState = /** @class */ (function (_super) {\n __extends(RouterState, _super);\n /** @internal */\n function RouterState(root, \n /** The current snapshot of the router state */\n snapshot) {\n var _this = _super.call(this, root) || this;\n _this.snapshot = snapshot;\n setRouterState(_this, root);\n return _this;\n }\n RouterState.prototype.toString = function () { return this.snapshot.toString(); };\n return RouterState;\n }(Tree));\n function createEmptyState(urlTree, rootComponent) {\n var snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n var emptyUrl = new rxjs.BehaviorSubject([new UrlSegment('', {})]);\n var emptyParams = new rxjs.BehaviorSubject({});\n var emptyData = new rxjs.BehaviorSubject({});\n var emptyQueryParams = new rxjs.BehaviorSubject({});\n var fragment = new rxjs.BehaviorSubject('');\n var activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n }\n function createEmptyStateSnapshot(urlTree, rootComponent) {\n var emptyParams = {};\n var emptyData = {};\n var emptyQueryParams = {};\n var fragment = '';\n var activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n }\n /**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var ActivatedRoute = /** @class */ (function () {\n /** @internal */\n function ActivatedRoute(\n /** An observable of the URL segments matched by this route */\n url, \n /** An observable of the matrix parameters scoped to this route */\n params, \n /** An observable of the query parameters shared by all the routes */\n queryParams, \n /** An observable of the URL fragment shared by all the routes */\n fragment, \n /** An observable of the static and resolved data of this route. */\n data, \n /** The outlet name of the route. It's a constant */\n outlet, \n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n component, futureSnapshot) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this._futureSnapshot = futureSnapshot;\n }\n Object.defineProperty(ActivatedRoute.prototype, \"routeConfig\", {\n /** The configuration used to match this route */\n get: function () { return this._futureSnapshot.routeConfig; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"root\", {\n /** The root of the router state */\n get: function () { return this._routerState.root; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: function () { return this._routerState.parent(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: function () { return this._routerState.firstChild(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: function () { return this._routerState.children(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: function () { return this._routerState.pathFromRoot(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(operators.map(function (p) { return convertToParamMap(p); }));\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(operators.map(function (p) { return convertToParamMap(p); }));\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRoute.prototype.toString = function () {\n return this.snapshot ? this.snapshot.toString() : \"Future(\" + this._futureSnapshot + \")\";\n };\n return ActivatedRoute;\n }());\n /**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\n function inheritedParamsDataResolve(route, paramsInheritanceStrategy) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n var pathFromRoot = route.pathFromRoot;\n var inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n while (inheritingStartingFrom >= 1) {\n var current = pathFromRoot[inheritingStartingFrom];\n var parent_1 = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n // parent is componentless => current route should inherit its params and data\n }\n else if (!parent_1.component) {\n inheritingStartingFrom--;\n }\n else {\n break;\n }\n }\n }\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n }\n /** @internal */\n function flattenInherited(pathFromRoot) {\n return pathFromRoot.reduce(function (res, curr) {\n var params = __assign({}, res.params, curr.params);\n var data = __assign({}, res.data, curr.data);\n var resolve = __assign({}, res.resolve, curr._resolvedData);\n return { params: params, data: data, resolve: resolve };\n }, { params: {}, data: {}, resolve: {} });\n }\n /**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var ActivatedRouteSnapshot = /** @class */ (function () {\n /** @internal */\n function ActivatedRouteSnapshot(\n /** The URL segments matched by this route */\n url, \n /** The matrix parameters scoped to this route */\n params, \n /** The query parameters shared by all the routes */\n queryParams, \n /** The URL fragment shared by all the routes */\n fragment, \n /** The static and resolved data of this route */\n data, \n /** The outlet name of the route */\n outlet, \n /** The component of the route */\n component, routeConfig, urlSegment, lastPathIndex, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"root\", {\n /** The root of the router state */\n get: function () { return this._routerState.root; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: function () { return this._routerState.parent(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: function () { return this._routerState.firstChild(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: function () { return this._routerState.children(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: function () { return this._routerState.pathFromRoot(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRouteSnapshot.prototype.toString = function () {\n var url = this.url.map(function (segment) { return segment.toString(); }).join('/');\n var matched = this.routeConfig ? this.routeConfig.path : '';\n return \"Route(url:'\" + url + \"', path:'\" + matched + \"')\";\n };\n return ActivatedRouteSnapshot;\n }());\n /**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var RouterStateSnapshot = /** @class */ (function (_super) {\n __extends(RouterStateSnapshot, _super);\n /** @internal */\n function RouterStateSnapshot(\n /** The url from which this snapshot was created */\n url, root) {\n var _this = _super.call(this, root) || this;\n _this.url = url;\n setRouterState(_this, root);\n return _this;\n }\n RouterStateSnapshot.prototype.toString = function () { return serializeNode(this._root); };\n return RouterStateSnapshot;\n }(Tree));\n function setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(function (c) { return setRouterState(state, c); });\n }\n function serializeNode(node) {\n var c = node.children.length > 0 ? \" { \" + node.children.map(serializeNode).join(', ') + \" } \" : '';\n return \"\" + node.value + c;\n }\n /**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\n function advanceActivatedRoute(route) {\n if (route.snapshot) {\n var currentSnapshot = route.snapshot;\n var nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParams.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragment.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.params.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.url.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.data.next(nextSnapshot.data);\n }\n }\n else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.data.next(route._futureSnapshot.data);\n }\n }\n function equalParamsAndUrlSegments(a, b) {\n var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n var parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function createRouterState(routeReuseStrategy, curr, prevState) {\n var root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n }\n function createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n var value = prevState.value;\n value._futureSnapshot = curr.value;\n var children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n }\n else {\n var detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n var tree = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n }\n else {\n var value = createActivatedRoute(curr.value);\n var children = curr.children.map(function (c) { return createNode(routeReuseStrategy, c); });\n return new TreeNode(value, children);\n }\n }\n }\n function setFutureSnapshotsOfActivatedRoutes(curr, result) {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (var i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n }\n function createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(function (child) {\n var e_1, _a;\n try {\n for (var _b = __values(prevState.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var p = _c.value;\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return createNode(routeReuseStrategy, child);\n });\n }\n function createActivatedRoute(c) {\n return new ActivatedRoute(new rxjs.BehaviorSubject(c.url), new rxjs.BehaviorSubject(c.params), new rxjs.BehaviorSubject(c.queryParams), new rxjs.BehaviorSubject(c.fragment), new rxjs.BehaviorSubject(c.data), c.outlet, c.component, c);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n var nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n var startingPosition = findStartingPosition(nav, urlTree, route);\n var segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n }\n function isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n }\n function tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {\n var qp = {};\n if (queryParams) {\n forEach(queryParams, function (value, name) {\n qp[name] = Array.isArray(value) ? value.map(function (v) { return \"\" + v; }) : \"\" + value;\n });\n }\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n }\n function replaceSegment(current, oldSegment, newSegment) {\n var children = {};\n forEach(current.children, function (c, outletName) {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n }\n else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n }\n var Navigation = /** @class */ (function () {\n function Navigation(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c != null && c.outlets; });\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n Navigation.prototype.toRoot = function () {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n };\n return Navigation;\n }());\n /** Transforms commands to a normalized `Navigation` */\n function computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n var numberOfDoubleDots = 0;\n var isAbsolute = false;\n var res = commands.reduce(function (res, cmd, cmdIdx) {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n var outlets_1 = {};\n forEach(cmd.outlets, function (commands, name) {\n outlets_1[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return __spread(res, [{ outlets: outlets_1 }]);\n }\n if (cmd.segmentPath) {\n return __spread(res, [cmd.segmentPath]);\n }\n }\n if (!(typeof cmd === 'string')) {\n return __spread(res, [cmd]);\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach(function (urlPart, partIndex) {\n if (partIndex == 0 && urlPart === '.') ;\n else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n }\n else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return __spread(res, [cmd]);\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n }\n var Position = /** @class */ (function () {\n function Position(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n return Position;\n }());\n function findStartingPosition(nav, tree, route) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n var modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n var index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n }\n function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n var g = group;\n var ci = index;\n var dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n }\n function getPath(command) {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return \"\" + command;\n }\n function getOutlets(commands) {\n var _a, _b;\n if (!(typeof commands[0] === 'object'))\n return _a = {}, _a[PRIMARY_OUTLET] = commands, _a;\n if (commands[0].outlets === undefined)\n return _b = {}, _b[PRIMARY_OUTLET] = commands, _b;\n return commands[0].outlets;\n }\n function updateSegmentGroup(segmentGroup, startIndex, commands) {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n var m = prefixedWith(segmentGroup, startIndex, commands);\n var slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n var g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n }\n else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n }\n else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n }\n function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else {\n var outlets_2 = getOutlets(commands);\n var children_1 = {};\n forEach(outlets_2, function (commands, outlet) {\n if (commands !== null) {\n children_1[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n forEach(segmentGroup.children, function (child, childOutlet) {\n if (outlets_2[childOutlet] === undefined) {\n children_1[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children_1);\n }\n }\n function prefixedWith(segmentGroup, startIndex, commands) {\n var currentCommandIndex = 0;\n var currentPathIndex = startIndex;\n var noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length)\n return noMatch;\n var path = segmentGroup.segments[currentPathIndex];\n var curr = getPath(commands[currentCommandIndex]);\n var next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined)\n break;\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path))\n return noMatch;\n currentCommandIndex += 2;\n }\n else {\n if (!compare(curr, {}, path))\n return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n }\n function createNewSegmentGroup(segmentGroup, startIndex, commands) {\n var paths = segmentGroup.segments.slice(0, startIndex);\n var i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n var children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n var p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n var curr = getPath(commands[i]);\n var next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n }\n else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n }\n function createNewSegmentChildren(outlets) {\n var children = {};\n forEach(outlets, function (commands, outlet) {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n }\n function stringify(params) {\n var res = {};\n forEach(params, function (v, k) { return res[k] = \"\" + v; });\n return res;\n }\n function compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var activateRoutes = function (rootContexts, routeReuseStrategy, forwardEvent) {\n return operators.map(function (t) {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n };\n var ActivateRoutes = /** @class */ (function () {\n function ActivateRoutes(routeReuseStrategy, futureState, currState, forwardEvent) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n }\n ActivateRoutes.prototype.activate = function (parentContexts) {\n var futureRoot = this.futureState._root;\n var currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n };\n // De-activate the child route that are not re-used for the future state\n ActivateRoutes.prototype.deactivateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(function (futureChild) {\n var childOutletName = futureChild.value.outlet;\n _this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n forEach(children, function (v, childName) {\n _this.deactivateRouteAndItsChildren(v, contexts);\n });\n };\n ActivateRoutes.prototype.deactivateRoutes = function (futureNode, currNode, parentContext) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n var context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n }\n else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndItsChildren = function (route, parentContexts) {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n }\n else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n };\n ActivateRoutes.prototype.detachAndStoreRouteSubtree = function (route, parentContexts) {\n var context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n var componentRef = context.outlet.detach();\n var contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, { componentRef: componentRef, route: route, contexts: contexts });\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndOutlet = function (route, parentContexts) {\n var _this = this;\n var context = parentContexts.getContext(route.value.outlet);\n if (context) {\n var children = nodeChildrenAsMap(route);\n var contexts_1 = route.value.component ? context.children : parentContexts;\n forEach(children, function (v, k) { return _this.deactivateRouteAndItsChildren(v, contexts_1); });\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n };\n ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(function (c) {\n _this.activateRoutes(c, children[c.value.outlet], contexts);\n _this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n };\n ActivateRoutes.prototype.activateRoutes = function (futureNode, currNode, parentContexts) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n var context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n }\n else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n var context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n var stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n }\n else {\n var config = parentLoadedConfig(future.snapshot);\n var cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n };\n return ActivateRoutes;\n }());\n function advanceActivatedRouteNodeAndItsChildren(node) {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n }\n function parentLoadedConfig(snapshot) {\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n if (route && route.component)\n return null;\n }\n return null;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\n function isFunction(v) {\n return typeof v === 'function';\n }\n function isBoolean(v) {\n return typeof v === 'boolean';\n }\n function isUrlTree(v) {\n return v instanceof UrlTree;\n }\n function isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n }\n function isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n }\n function isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n }\n function isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NoMatch = /** @class */ (function () {\n function NoMatch(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n return NoMatch;\n }());\n var AbsoluteRedirect = /** @class */ (function () {\n function AbsoluteRedirect(urlTree) {\n this.urlTree = urlTree;\n }\n return AbsoluteRedirect;\n }());\n function noMatch(segmentGroup) {\n return new rxjs.Observable(function (obs) { return obs.error(new NoMatch(segmentGroup)); });\n }\n function absoluteRedirect(newTree) {\n return new rxjs.Observable(function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });\n }\n function namedOutletsRedirect(redirectTo) {\n return new rxjs.Observable(function (obs) { return obs.error(new Error(\"Only absolute redirects can have named outlets. redirectTo: '\" + redirectTo + \"'\")); });\n }\n function canLoadFails(route) {\n return new rxjs.Observable(function (obs) { return obs.error(navigationCancelingError(\"Cannot load children because the guard of the route \\\"path: '\" + route.path + \"'\\\" returned false\")); });\n }\n /**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\n function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n }\n var ApplyRedirects = /** @class */ (function () {\n function ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\n this.ngModule = moduleInjector.get(core.NgModuleRef);\n }\n ApplyRedirects.prototype.apply = function () {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n var urlTrees$ = expanded$.pipe(operators.map(function (rootSegmentGroup) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));\n return urlTrees$.pipe(operators.catchError(function (e) {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n _this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return _this.match(e.urlTree);\n }\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.match = function (tree) {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n var mapped$ = expanded$.pipe(operators.map(function (rootSegmentGroup) {\n return _this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment);\n }));\n return mapped$.pipe(operators.catchError(function (e) {\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noMatchError = function (e) {\n return new Error(\"Cannot match any routes. URL Segment: '\" + e.segmentGroup + \"'\");\n };\n ApplyRedirects.prototype.createUrlTree = function (rootCandidate, queryParams, fragment) {\n var _a;\n var root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], (_a = {}, _a[PRIMARY_OUTLET] = rootCandidate, _a)) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n };\n ApplyRedirects.prototype.expandSegmentGroup = function (ngModule, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(operators.map(function (children) { return new UrlSegmentGroup([], children); }));\n }\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n };\n // Recursively expand segment groups for all the child outlets\n ApplyRedirects.prototype.expandChildren = function (ngModule, routes, segmentGroup) {\n var _this = this;\n return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });\n };\n ApplyRedirects.prototype.expandSegment = function (ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {\n var _this = this;\n return rxjs.of.apply(void 0, __spread(routes)).pipe(operators.map(function (r) {\n var expanded$ = _this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(operators.catchError(function (e) {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return rxjs.of(null);\n }\n throw e;\n }));\n }), operators.concatAll(), operators.first(function (s) { return !!s; }), operators.catchError(function (e, _) {\n if (e instanceof rxjs.EmptyError || e.name === 'EmptyError') {\n if (_this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return rxjs.of(new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n ApplyRedirects.prototype.expandSegmentAgainstRoute = function (ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n };\n ApplyRedirects.prototype.expandSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);\n };\n ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {\n var _this = this;\n var newTree = this.applyRedirectCommands([], route.redirectTo, {});\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(operators.mergeMap(function (newSegments) {\n var group = new UrlSegmentGroup(newSegments, {});\n return _this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n };\n ApplyRedirects.prototype.expandRegularSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n var _this = this;\n var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;\n if (!matched)\n return noMatch(segmentGroup);\n var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(operators.mergeMap(function (newSegments) {\n return _this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);\n }));\n };\n ApplyRedirects.prototype.matchSegmentAgainstRoute = function (ngModule, rawSegmentGroup, route, segments) {\n var _this = this;\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(operators.map(function (cfg) {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return rxjs.of(new UrlSegmentGroup(segments, {}));\n }\n var _a = match(rawSegmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild;\n if (!matched)\n return noMatch(rawSegmentGroup);\n var rawSlicedSegments = segments.slice(lastChild);\n var childConfig$ = this.getChildConfig(ngModule, route, segments);\n return childConfig$.pipe(operators.mergeMap(function (routerConfig) {\n var childModule = routerConfig.module;\n var childConfig = routerConfig.routes;\n var _a = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var expanded$_1 = _this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$_1.pipe(operators.map(function (children) { return new UrlSegmentGroup(consumedSegments, children); }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return rxjs.of(new UrlSegmentGroup(consumedSegments, {}));\n }\n var expanded$ = _this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(operators.map(function (cs) {\n return new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children);\n }));\n }));\n };\n ApplyRedirects.prototype.getChildConfig = function (ngModule, route, segments) {\n var _this = this;\n if (route.children) {\n // The children belong to the same module\n return rxjs.of(new LoadedRouterConfig(route.children, ngModule));\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return rxjs.of(route._loadedConfig);\n }\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(operators.mergeMap(function (shouldLoad) {\n if (shouldLoad) {\n return _this.configLoader.load(ngModule.injector, route)\n .pipe(operators.map(function (cfg) {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return rxjs.of(new LoadedRouterConfig([], ngModule));\n };\n ApplyRedirects.prototype.lineralizeSegments = function (route, urlTree) {\n var res = [];\n var c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return rxjs.of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n };\n ApplyRedirects.prototype.applyRedirectCommands = function (segments, redirectTo, posParams) {\n return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n };\n ApplyRedirects.prototype.applyRedirectCreatreUrlTree = function (redirectTo, urlTree, segments, posParams) {\n var newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n };\n ApplyRedirects.prototype.createQueryParams = function (redirectToParams, actualParams) {\n var res = {};\n forEach(redirectToParams, function (v, k) {\n var copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n var sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n }\n else {\n res[k] = v;\n }\n });\n return res;\n };\n ApplyRedirects.prototype.createSegmentGroup = function (redirectTo, group, segments, posParams) {\n var _this = this;\n var updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n var children = {};\n forEach(group.children, function (child, name) {\n children[name] = _this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n };\n ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {\n var _this = this;\n return redirectToSegments.map(function (s) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :\n _this.findOrReturn(s, actualSegments); });\n };\n ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {\n var pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\"Cannot redirect to '\" + redirectTo + \"'. Cannot find '\" + redirectToUrlSegment.path + \"'.\");\n return pos;\n };\n ApplyRedirects.prototype.findOrReturn = function (redirectToUrlSegment, actualSegments) {\n var e_1, _a;\n var idx = 0;\n try {\n for (var actualSegments_1 = __values(actualSegments), actualSegments_1_1 = actualSegments_1.next(); !actualSegments_1_1.done; actualSegments_1_1 = actualSegments_1.next()) {\n var s = actualSegments_1_1.value;\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (actualSegments_1_1 && !actualSegments_1_1.done && (_a = actualSegments_1.return)) _a.call(actualSegments_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return redirectToUrlSegment;\n };\n return ApplyRedirects;\n }());\n function runCanLoadGuard(moduleInjector, route, segments) {\n var canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0)\n return rxjs.of(true);\n var obs = rxjs.from(canLoad).pipe(operators.map(function (injectionToken) {\n var guard = moduleInjector.get(injectionToken);\n var guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n }\n else if (isFunction(guard)) {\n guardVal = guard(route, segments);\n }\n else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n return obs.pipe(operators.concatAll(), operators.every(function (result) { return result === true; }));\n }\n function match(segmentGroup, route, segments) {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n return { matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res) {\n return {\n matched: false,\n consumedSegments: [],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n return {\n matched: true,\n consumedSegments: res.consumed,\n lastChild: res.consumed.length,\n positionalParamSegments: res.posParams,\n };\n }\n function split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptySegments(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: slicedSegments };\n }\n return { segmentGroup: segmentGroup, slicedSegments: slicedSegments };\n }\n function mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n var c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n }\n function addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n var e_2, _a;\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign({}, children, res);\n }\n function createChildrenForEmptySegments(routes, primarySegmentGroup) {\n var e_3, _a;\n var res = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n }\n function containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET; });\n }\n function containsEmptyPathRedirects(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r); });\n }\n function isEmptyPathRedirect(segmentGroup, segments, r) {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo !== undefined;\n }\n function getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {\n return function (source) {\n return source.pipe(operators.switchMap(function (t) { return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(operators.map(function (urlAfterRedirects) { return (__assign({}, t, { urlAfterRedirects: urlAfterRedirects })); })); }));\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var CanActivate = /** @class */ (function () {\n function CanActivate(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n return CanActivate;\n }());\n var CanDeactivate = /** @class */ (function () {\n function CanDeactivate(component, route) {\n this.component = component;\n this.route = route;\n }\n return CanDeactivate;\n }());\n function getAllRouteGuards(future, curr, parentContexts) {\n var futureRoot = future._root;\n var currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n }\n function getCanActivateChild(p) {\n var canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0)\n return null;\n return { node: p, guards: canActivateChild };\n }\n function getToken(token, snapshot, moduleInjector) {\n var config = getClosestLoadedConfig(snapshot);\n var injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n }\n function getClosestLoadedConfig(snapshot) {\n if (!snapshot)\n return null;\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n }\n return null;\n }\n function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks) {\n if (checks === void 0) { checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }; }\n var prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(function (c) {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n forEach(prevChildren, function (v, k) {\n return deactivateRouteAndItsChildren(v, contexts.getContext(k), checks);\n });\n return checks;\n }\n function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks) {\n if (checks === void 0) { checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }; }\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n var shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n }\n else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun) {\n var component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n }\n else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n }\n function shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n }\n function deactivateRouteAndItsChildren(route, context, checks) {\n var children = nodeChildrenAsMap(route);\n var r = route.value;\n forEach(children, function (node, childName) {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n }\n else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n }\n else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n }\n else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var INITIAL_VALUE = Symbol('INITIAL_VALUE');\n function prioritizedGuardValue() {\n return operators.switchMap(function (obs) {\n return rxjs.combineLatest.apply(void 0, __spread(obs.map(function (o) { return o.pipe(operators.take(1), operators.startWith(INITIAL_VALUE)); }))).pipe(operators.scan(function (acc, list) {\n var isPending = false;\n return list.reduce(function (innerAcc, val, i) {\n if (innerAcc !== INITIAL_VALUE)\n return innerAcc;\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE)\n isPending = true;\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false)\n return val;\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n return innerAcc;\n }, acc);\n }, INITIAL_VALUE), operators.filter(function (item) { return item !== INITIAL_VALUE; }), operators.map(function (item) { return isUrlTree(item) ? item : item === true; }), //\n operators.take(1));\n });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function checkGuards(moduleInjector, forwardEvent) {\n return function (source) {\n return source.pipe(operators.mergeMap(function (t) {\n var targetSnapshot = t.targetSnapshot, currentSnapshot = t.currentSnapshot, _a = t.guards, canActivateChecks = _a.canActivateChecks, canDeactivateChecks = _a.canDeactivateChecks;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return rxjs.of(__assign({}, t, { guardsResult: true }));\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)\n .pipe(operators.mergeMap(function (canDeactivate) {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :\n rxjs.of(canDeactivate);\n }), operators.map(function (guardsResult) { return (__assign({}, t, { guardsResult: guardsResult })); }));\n }));\n };\n }\n function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {\n return rxjs.from(checks).pipe(operators.mergeMap(function (check) {\n return runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector);\n }), operators.first(function (result) { return result !== true; }, true));\n }\n function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {\n return rxjs.from(checks).pipe(operators.concatMap(function (check) {\n return rxjs.from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(operators.concatAll(), operators.first(function (result) {\n return result !== true;\n }, true));\n }), operators.first(function (result) { return result !== true; }, true));\n }\n /**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\n function fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return rxjs.of(true);\n }\n /**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\n function fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return rxjs.of(true);\n }\n function runCanActivate(futureRSS, futureARS, moduleInjector) {\n var canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0)\n return rxjs.of(true);\n var canActivateObservables = canActivate.map(function (c) {\n return rxjs.defer(function () {\n var guard = getToken(c, futureARS, moduleInjector);\n var observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n }\n else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(operators.first());\n });\n });\n return rxjs.of(canActivateObservables).pipe(prioritizedGuardValue());\n }\n function runCanActivateChild(futureRSS, path, moduleInjector) {\n var futureARS = path[path.length - 1];\n var canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(function (p) { return getCanActivateChild(p); })\n .filter(function (_) { return _ !== null; });\n var canActivateChildGuardsMapped = canActivateChildGuards.map(function (d) {\n return rxjs.defer(function () {\n var guardsMapped = d.guards.map(function (c) {\n var guard = getToken(c, d.node, moduleInjector);\n var observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n }\n else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(operators.first());\n });\n return rxjs.of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return rxjs.of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n }\n function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {\n var canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0)\n return rxjs.of(true);\n var canDeactivateObservables = canDeactivate.map(function (c) {\n var guard = getToken(c, currARS, moduleInjector);\n var observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n }\n else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(operators.first());\n });\n return rxjs.of(canDeactivateObservables).pipe(prioritizedGuardValue());\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NoMatch$1 = /** @class */ (function () {\n function NoMatch() {\n }\n return NoMatch;\n }());\n function recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n if (relativeLinkResolution === void 0) { relativeLinkResolution = 'legacy'; }\n return new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)\n .recognize();\n }\n var Recognizer = /** @class */ (function () {\n function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.relativeLinkResolution = relativeLinkResolution;\n }\n Recognizer.prototype.recognize = function () {\n try {\n var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n var rootNode = new TreeNode(root, children);\n var routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return rxjs.of(routeState);\n }\n catch (e) {\n return new rxjs.Observable(function (obs) { return obs.error(e); });\n }\n };\n Recognizer.prototype.inheritParamsAndData = function (routeNode) {\n var _this = this;\n var route = routeNode.value;\n var i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n routeNode.children.forEach(function (n) { return _this.inheritParamsAndData(n); });\n };\n Recognizer.prototype.processSegmentGroup = function (config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n };\n Recognizer.prototype.processChildren = function (config, segmentGroup) {\n var _this = this;\n var children = mapChildrenIntoArray(segmentGroup, function (child, childOutlet) { return _this.processSegmentGroup(config, child, childOutlet); });\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n };\n Recognizer.prototype.processSegment = function (config, segmentGroup, segments, outlet) {\n var e_1, _a;\n try {\n for (var config_1 = __values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {\n var r = config_1_1.value;\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n }\n catch (e) {\n if (!(e instanceof NoMatch$1))\n throw e;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n throw new NoMatch$1();\n };\n Recognizer.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n Recognizer.prototype.processSegmentAgainstRoute = function (route, rawSegment, segments, outlet) {\n if (route.redirectTo)\n throw new NoMatch$1();\n if ((route.outlet || PRIMARY_OUTLET) !== outlet)\n throw new NoMatch$1();\n var snapshot;\n var consumedSegments = [];\n var rawSlicedSegments = [];\n if (route.path === '**') {\n var params = segments.length > 0 ? last(segments).parameters : {};\n snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n }\n else {\n var result = match$1(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n var childConfig = getChildConfig(route);\n var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var children_1 = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode(snapshot, children_1)];\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode(snapshot, [])];\n }\n var children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode(snapshot, children)];\n };\n return Recognizer;\n }());\n function sortActivatedRouteSnapshots(nodes) {\n nodes.sort(function (a, b) {\n if (a.value.outlet === PRIMARY_OUTLET)\n return -1;\n if (b.value.outlet === PRIMARY_OUTLET)\n return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n }\n function getChildConfig(route) {\n if (route.children) {\n return route.children;\n }\n if (route.loadChildren) {\n return route._loadedConfig.routes;\n }\n return [];\n }\n function match$1(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch$1();\n }\n return { consumedSegments: [], lastChild: 0, parameters: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res)\n throw new NoMatch$1();\n var posParams = {};\n forEach(res.posParams, function (v, k) { posParams[k] = v.path; });\n var parameters = res.consumed.length > 0 ? __assign({}, posParams, res.consumed[res.consumed.length - 1].parameters) :\n posParams;\n return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };\n }\n function checkOutletNameUniqueness(nodes) {\n var names = {};\n nodes.forEach(function (n) {\n var routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n var p = routeWithSameOutletName.url.map(function (s) { return s.toString(); }).join('/');\n var c = n.value.url.map(function (s) { return s.toString(); }).join('/');\n throw new Error(\"Two segments cannot have the same outlet name: '\" + p + \"' and '\" + c + \"'.\");\n }\n names[n.value.outlet] = n.value;\n });\n }\n function getSourceSegmentGroup(segmentGroup) {\n var s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n }\n function getPathIndexShift(segmentGroup) {\n var s = segmentGroup;\n var res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n }\n function split$1(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s_1 = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s_1._sourceSegment = segmentGroup;\n s_1._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_1, slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n var s_2 = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));\n s_2._sourceSegment = segmentGroup;\n s_2._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_2, slicedSegments: slicedSegments };\n }\n var s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments: slicedSegments };\n }\n function addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {\n var e_2, _a;\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet$1(r)]) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n }\n else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign({}, children, res);\n }\n function createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n var e_3, _a;\n var res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet$1(r) !== PRIMARY_OUTLET) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n }\n function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet$1(r) !== PRIMARY_OUTLET; });\n }\n function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r); });\n }\n function emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo === undefined;\n }\n function getOutlet$1(route) {\n return route.outlet || PRIMARY_OUTLET;\n }\n function getData(route) {\n return route.data || {};\n }\n function getResolve(route) {\n return route.resolve || {};\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {\n return function (source) {\n return source.pipe(operators.mergeMap(function (t) { return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(operators.map(function (targetSnapshot) { return (__assign({}, t, { targetSnapshot: targetSnapshot })); })); }));\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function resolveData(paramsInheritanceStrategy, moduleInjector) {\n return function (source) {\n return source.pipe(operators.mergeMap(function (t) {\n var targetSnapshot = t.targetSnapshot, canActivateChecks = t.guards.canActivateChecks;\n if (!canActivateChecks.length) {\n return rxjs.of(t);\n }\n return rxjs.from(canActivateChecks)\n .pipe(operators.concatMap(function (check) { return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector); }), operators.reduce(function (_, __) { return _; }), operators.map(function (_) { return t; }));\n }));\n };\n }\n function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {\n var resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(operators.map(function (resolvedData) {\n futureARS._resolvedData = resolvedData;\n futureARS.data = __assign({}, futureARS.data, inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve);\n return null;\n }));\n }\n function resolveNode(resolve, futureARS, futureRSS, moduleInjector) {\n var keys = Object.keys(resolve);\n if (keys.length === 0) {\n return rxjs.of({});\n }\n if (keys.length === 1) {\n var key_1 = keys[0];\n return getResolver(resolve[key_1], futureARS, futureRSS, moduleInjector)\n .pipe(operators.map(function (value) {\n var _a;\n return _a = {}, _a[key_1] = value, _a;\n }));\n }\n var data = {};\n var runningResolvers$ = rxjs.from(keys).pipe(operators.mergeMap(function (key) {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(operators.map(function (value) {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(operators.last(), operators.map(function () { return data; }));\n }\n function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {\n var resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\n function switchTap(next) {\n return function (source) {\n return source.pipe(operators.switchMap(function (v) {\n var nextResult = next(v);\n if (nextResult) {\n return rxjs.from(nextResult).pipe(operators.map(function () { return v; }));\n }\n return rxjs.from([v]);\n }));\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\n var RouteReuseStrategy = /** @class */ (function () {\n function RouteReuseStrategy() {\n }\n return RouteReuseStrategy;\n }());\n /**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\n var DefaultRouteReuseStrategy = /** @class */ (function () {\n function DefaultRouteReuseStrategy() {\n }\n DefaultRouteReuseStrategy.prototype.shouldDetach = function (route) { return false; };\n DefaultRouteReuseStrategy.prototype.store = function (route, detachedTree) { };\n DefaultRouteReuseStrategy.prototype.shouldAttach = function (route) { return false; };\n DefaultRouteReuseStrategy.prototype.retrieve = function (route) { return null; };\n DefaultRouteReuseStrategy.prototype.shouldReuseRoute = function (future, curr) {\n return future.routeConfig === curr.routeConfig;\n };\n return DefaultRouteReuseStrategy;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @docsNotRequired\n * @publicApi\n */\n var ROUTES = new core.InjectionToken('ROUTES');\n var RouterConfigLoader = /** @class */ (function () {\n function RouterConfigLoader(loader, compiler, onLoadStartListener, onLoadEndListener) {\n this.loader = loader;\n this.compiler = compiler;\n this.onLoadStartListener = onLoadStartListener;\n this.onLoadEndListener = onLoadEndListener;\n }\n RouterConfigLoader.prototype.load = function (parentInjector, route) {\n var _this = this;\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n var moduleFactory$ = this.loadModuleFactory(route.loadChildren);\n return moduleFactory$.pipe(operators.map(function (factory) {\n if (_this.onLoadEndListener) {\n _this.onLoadEndListener(route);\n }\n var module = factory.create(parentInjector);\n return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n };\n RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {\n var _this = this;\n if (typeof loadChildren === 'string') {\n return rxjs.from(this.loader.load(loadChildren));\n }\n else {\n return wrapIntoObservable(loadChildren()).pipe(operators.mergeMap(function (t) {\n if (t instanceof core.NgModuleFactory) {\n return rxjs.of(t);\n }\n else {\n return rxjs.from(_this.compiler.compileModuleAsync(t));\n }\n }));\n }\n };\n return RouterConfigLoader;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\n var UrlHandlingStrategy = /** @class */ (function () {\n function UrlHandlingStrategy() {\n }\n return UrlHandlingStrategy;\n }());\n /**\n * @publicApi\n */\n var DefaultUrlHandlingStrategy = /** @class */ (function () {\n function DefaultUrlHandlingStrategy() {\n }\n DefaultUrlHandlingStrategy.prototype.shouldProcessUrl = function (url) { return true; };\n DefaultUrlHandlingStrategy.prototype.extract = function (url) { return url; };\n DefaultUrlHandlingStrategy.prototype.merge = function (newUrlPart, wholeUrl) { return newUrlPart; };\n return DefaultUrlHandlingStrategy;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function defaultErrorHandler(error) {\n throw error;\n }\n function defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\n }\n /**\n * @internal\n */\n function defaultRouterHook(snapshot, runExtras) {\n return rxjs.of(null);\n }\n /**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var Router = /** @class */ (function () {\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n function Router(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {\n var _this = this;\n this.rootComponentType = rootComponentType;\n this.urlSerializer = urlSerializer;\n this.rootContexts = rootContexts;\n this.location = location;\n this.config = config;\n this.lastSuccessfulNavigation = null;\n this.currentNavigation = null;\n this.navigationId = 0;\n this.isNgZoneEnabled = false;\n this.events = new rxjs.Subject();\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n this.errorHandler = defaultErrorHandler;\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;\n /**\n * Indicates if at least one navigation happened.\n */\n this.navigated = false;\n this.lastSuccessfulId = -1;\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n this.hooks = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();\n this.routeReuseStrategy = new DefaultRouteReuseStrategy();\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n this.onSameUrlNavigation = 'ignore';\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n this.paramsInheritanceStrategy = 'emptyOnly';\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n this.urlUpdateStrategy = 'deferred';\n /**\n * See {@link RouterModule} for more information.\n */\n this.relativeLinkResolution = 'legacy';\n var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };\n var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.ngModule = injector.get(core.NgModuleRef);\n this.console = injector.get(core.ɵConsole);\n var ngZone = injector.get(core.NgZone);\n this.isNgZoneEnabled = ngZone instanceof core.NgZone;\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n this.transitions = new rxjs.BehaviorSubject({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: { canActivateChecks: [], canDeactivateChecks: [] },\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n this.processNavigations();\n }\n Router.prototype.setupNavigations = function (transitions) {\n var _this = this;\n var eventsSubject = this.events;\n return transitions.pipe(operators.filter(function (t) { return t.id !== 0; }), \n // Extract URL\n operators.map(function (t) { return (__assign({}, t, { extractedUrl: _this.urlHandlingStrategy.extract(t.rawUrl) })); }), \n // Store the Navigation object\n operators.tap(function (t) {\n _this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: _this.lastSuccessfulNavigation ? __assign({}, _this.lastSuccessfulNavigation, { previousNavigation: null }) :\n null\n };\n }), \n // Using switchMap so we cancel executing navigations when a new one comes in\n operators.switchMap(function (t) {\n var completed = false;\n var errored = false;\n return rxjs.of(t).pipe(operators.switchMap(function (t) {\n var urlTransition = !_this.navigated || t.extractedUrl.toString() !== _this.browserUrlTree.toString();\n var processCurrentUrl = (_this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n _this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n if (processCurrentUrl) {\n return rxjs.of(t).pipe(\n // Fire NavigationStart event\n operators.switchMap(function (t) {\n var transition = _this.transitions.getValue();\n eventsSubject.next(new NavigationStart(t.id, _this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== _this.transitions.getValue()) {\n return rxjs.EMPTY;\n }\n return [t];\n }), \n // This delay is required to match old behavior that forced navigation to\n // always be async\n operators.switchMap(function (t) { return Promise.resolve(t); }), \n // ApplyRedirects\n applyRedirects$1(_this.ngModule.injector, _this.configLoader, _this.urlSerializer, _this.config), \n // Update the currentNavigation\n operators.tap(function (t) {\n _this.currentNavigation = __assign({}, _this.currentNavigation, { finalUrl: t.urlAfterRedirects });\n }), \n // Recognize\n recognize$1(_this.rootComponentType, _this.config, function (url) { return _this.serializeUrl(url); }, _this.paramsInheritanceStrategy, _this.relativeLinkResolution), \n // Update URL if in `eager` update mode\n operators.tap(function (t) {\n if (_this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n _this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n _this.browserUrlTree = t.urlAfterRedirects;\n }\n }), \n // Fire RoutesRecognized\n operators.tap(function (t) {\n var routesRecognized = new RoutesRecognized(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n eventsSubject.next(routesRecognized);\n }));\n }\n else {\n var processPreviousUrl = urlTransition && _this.rawUrlTree &&\n _this.urlHandlingStrategy.shouldProcessUrl(_this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n var id = t.id, extractedUrl = t.extractedUrl, source = t.source, restoredState = t.restoredState, extras = t.extras;\n var navStart = new NavigationStart(id, _this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n var targetSnapshot = createEmptyState(extractedUrl, _this.rootComponentType).snapshot;\n return rxjs.of(__assign({}, t, { targetSnapshot: targetSnapshot, urlAfterRedirects: extractedUrl, extras: __assign({}, extras, { skipLocationChange: false, replaceUrl: false }) }));\n }\n else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n _this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return rxjs.EMPTY;\n }\n }\n }), \n // Before Preactivation\n switchTap(function (t) {\n var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;\n return _this.hooks.beforePreactivation(targetSnapshot, {\n navigationId: navigationId,\n appliedUrlTree: appliedUrlTree,\n rawUrlTree: rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }), \n // --- GUARDS ---\n operators.tap(function (t) {\n var guardsStart = new GuardsCheckStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(guardsStart);\n }), operators.map(function (t) { return (__assign({}, t, { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, _this.rootContexts) })); }), checkGuards(_this.ngModule.injector, function (evt) { return _this.triggerEvent(evt); }), operators.tap(function (t) {\n if (isUrlTree(t.guardsResult)) {\n var error = navigationCancelingError(\"Redirecting to \\\"\" + _this.serializeUrl(t.guardsResult) + \"\\\"\");\n error.url = t.guardsResult;\n throw error;\n }\n }), operators.tap(function (t) {\n var guardsEnd = new GuardsCheckEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n _this.triggerEvent(guardsEnd);\n }), operators.filter(function (t) {\n if (!t.guardsResult) {\n _this.resetUrlToCurrentUrlTree();\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }), \n // --- RESOLVE ---\n switchTap(function (t) {\n if (t.guards.canActivateChecks.length) {\n return rxjs.of(t).pipe(operators.tap(function (t) {\n var resolveStart = new ResolveStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(resolveStart);\n }), resolveData(_this.paramsInheritanceStrategy, _this.ngModule.injector), //\n operators.tap(function (t) {\n var resolveEnd = new ResolveEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(resolveEnd);\n }));\n }\n return undefined;\n }), \n // --- AFTER PREACTIVATION ---\n switchTap(function (t) {\n var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;\n return _this.hooks.afterPreactivation(targetSnapshot, {\n navigationId: navigationId,\n appliedUrlTree: appliedUrlTree,\n rawUrlTree: rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }), operators.map(function (t) {\n var targetRouterState = createRouterState(_this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n return (__assign({}, t, { targetRouterState: targetRouterState }));\n }), \n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n operators.tap(function (t) {\n _this.currentUrlTree = t.urlAfterRedirects;\n _this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, t.rawUrl);\n _this.routerState = t.targetRouterState;\n if (_this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n _this.setBrowserUrl(_this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n _this.browserUrlTree = t.urlAfterRedirects;\n }\n }), activateRoutes(_this.rootContexts, _this.routeReuseStrategy, function (evt) { return _this.triggerEvent(evt); }), operators.tap({ next: function () { completed = true; }, complete: function () { completed = true; } }), operators.finalize(function () {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n _this.resetUrlToCurrentUrlTree();\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), \"Navigation ID \" + t.id + \" is not equal to the current navigation id \" + _this.navigationId);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n _this.currentNavigation = null;\n }), operators.catchError(function (e) {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n var redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n _this.navigated = true;\n _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n if (redirecting) {\n _this.navigateByUrl(e.url);\n }\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n }\n else {\n _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n var navError = new NavigationError(t.id, _this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(_this.errorHandler(e));\n }\n catch (ee) {\n t.reject(ee);\n }\n }\n return rxjs.EMPTY;\n }));\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n }));\n };\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n Router.prototype.resetRootComponentType = function (rootComponentType) {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n };\n Router.prototype.getTransition = function () { return this.transitions.value; };\n Router.prototype.setTransition = function (t) {\n this.transitions.next(__assign({}, this.getTransition(), t));\n };\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n Router.prototype.initialNavigation = function () {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), { replaceUrl: true });\n }\n };\n /**\n * Sets up the location change listener.\n */\n Router.prototype.setUpLocationChangeListener = function () {\n var _this = this;\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = this.location.subscribe(function (change) {\n var rawUrlTree = _this.parseUrl(change['url']);\n var source = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n var state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(function () { _this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true }); }, 0);\n });\n }\n };\n Object.defineProperty(Router.prototype, \"url\", {\n /** The current url */\n get: function () { return this.serializeUrl(this.currentUrlTree); },\n enumerable: true,\n configurable: true\n });\n /** The current Navigation object if one exists */\n Router.prototype.getCurrentNavigation = function () { return this.currentNavigation; };\n /** @internal */\n Router.prototype.triggerEvent = function (event) { this.events.next(event); };\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n Router.prototype.resetConfig = function (config) {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n };\n /** @docsNotRequired */\n Router.prototype.ngOnDestroy = function () { this.dispose(); };\n /** Disposes of the router */\n Router.prototype.dispose = function () {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null;\n }\n };\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n Router.prototype.createUrlTree = function (commands, navigationExtras) {\n if (navigationExtras === void 0) { navigationExtras = {}; }\n var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;\n if (core.isDevMode() && preserveQueryParams && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n var a = relativeTo || this.routerState.root;\n var f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n var q = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = __assign({}, this.currentUrlTree.queryParams, queryParams);\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n }\n else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q, f);\n };\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n Router.prototype.navigateByUrl = function (url, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n if (core.isDevMode() && this.isNgZoneEnabled && !core.NgZone.isInAngularZone()) {\n this.console.warn(\"Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?\");\n }\n var urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n };\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n Router.prototype.navigate = function (commands, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n };\n /** Serializes a `UrlTree` into a string */\n Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); };\n /** Parses a string into a `UrlTree` */\n Router.prototype.parseUrl = function (url) {\n var urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n };\n /** Returns whether the url is activated */\n Router.prototype.isActive = function (url, exact) {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n var urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n };\n Router.prototype.removeEmptyProps = function (params) {\n return Object.keys(params).reduce(function (result, key) {\n var value = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n };\n Router.prototype.processNavigations = function () {\n var _this = this;\n this.navigations.subscribe(function (t) {\n _this.navigated = true;\n _this.lastSuccessfulId = t.id;\n _this.events\n .next(new NavigationEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(_this.currentUrlTree)));\n _this.lastSuccessfulNavigation = _this.currentNavigation;\n _this.currentNavigation = null;\n t.resolve(true);\n }, function (e) { _this.console.warn(\"Unhandled Navigation Error: \"); });\n };\n Router.prototype.scheduleNavigation = function (rawUrl, source, restoredState, extras) {\n var lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n var resolve = null;\n var reject = null;\n var promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n var id = ++this.navigationId;\n this.setTransition({\n id: id,\n source: source,\n restoredState: restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl: rawUrl, extras: extras, resolve: resolve, reject: reject, promise: promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch(function (e) { return Promise.reject(e); });\n };\n Router.prototype.setBrowserUrl = function (url, replaceUrl, id, state) {\n var path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', __assign({}, state, { navigationId: id }));\n }\n else {\n this.location.go(path, '', __assign({}, state, { navigationId: id }));\n }\n };\n Router.prototype.resetStateAndUrl = function (storedState, storedUrl, rawUrl) {\n this.routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n };\n Router.prototype.resetUrlToCurrentUrlTree = function () {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId });\n };\n return Router;\n }());\n function validateCommands(commands) {\n for (var i = 0; i < commands.length; i++) {\n var cmd = commands[i];\n if (cmd == null) {\n throw new Error(\"The requested path contains \" + cmd + \" segment at index \" + i);\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterLink = /** @class */ (function () {\n function RouterLink(router, route, tabIndex, renderer, el) {\n this.router = router;\n this.route = route;\n this.commands = [];\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n Object.defineProperty(RouterLink.prototype, \"routerLink\", {\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLink.prototype, \"preserveQueryParams\", {\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n set: function (value) {\n if (core.isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLink.prototype.onClick = function () {\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n };\n Object.defineProperty(RouterLink.prototype, \"urlTree\", {\n get: function () {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"queryParams\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"fragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"preserveFragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"skipLocationChange\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"replaceUrl\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"state\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLink.prototype, \"routerLink\", null);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLink.prototype, \"preserveQueryParams\", null);\n __decorate([\n core.HostListener('click'),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLink.prototype, \"onClick\", null);\n RouterLink = __decorate([\n core.Directive({ selector: ':not(a):not(area)[routerLink]' }),\n __param(2, core.Attribute('tabindex')),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute, String, core.Renderer2, core.ElementRef])\n ], RouterLink);\n return RouterLink;\n }());\n /**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterLinkWithHref = /** @class */ (function () {\n function RouterLinkWithHref(router, route, locationStrategy) {\n var _this = this;\n this.router = router;\n this.route = route;\n this.locationStrategy = locationStrategy;\n this.commands = [];\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.updateTargetUrlAndHref();\n }\n });\n }\n Object.defineProperty(RouterLinkWithHref.prototype, \"routerLink\", {\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLinkWithHref.prototype, \"preserveQueryParams\", {\n set: function (value) {\n if (core.isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkWithHref.prototype.ngOnChanges = function (changes) { this.updateTargetUrlAndHref(); };\n RouterLinkWithHref.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterLinkWithHref.prototype.onClick = function (button, ctrlKey, metaKey, shiftKey) {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n };\n RouterLinkWithHref.prototype.updateTargetUrlAndHref = function () {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n };\n Object.defineProperty(RouterLinkWithHref.prototype, \"urlTree\", {\n get: function () {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n core.HostBinding('attr.target'), core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"target\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"queryParams\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"fragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"preserveFragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"skipLocationChange\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"replaceUrl\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"state\", void 0);\n __decorate([\n core.HostBinding(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"href\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkWithHref.prototype, \"routerLink\", null);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLinkWithHref.prototype, \"preserveQueryParams\", null);\n __decorate([\n core.HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Number, Boolean, Boolean, Boolean]),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLinkWithHref.prototype, \"onClick\", null);\n RouterLinkWithHref = __decorate([\n core.Directive({ selector: 'a[routerLink],area[routerLink]' }),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute,\n common.LocationStrategy])\n ], RouterLinkWithHref);\n return RouterLinkWithHref;\n }());\n function attrBoolValue(s) {\n return s === '' || !!s;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterLinkActive = /** @class */ (function () {\n function RouterLinkActive(router, element, renderer, cdr) {\n var _this = this;\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.classes = [];\n this.isActive = false;\n this.routerLinkActiveOptions = { exact: false };\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.update();\n }\n });\n }\n RouterLinkActive.prototype.ngAfterContentInit = function () {\n var _this = this;\n this.links.changes.subscribe(function (_) { return _this.update(); });\n this.linksWithHrefs.changes.subscribe(function (_) { return _this.update(); });\n this.update();\n };\n Object.defineProperty(RouterLinkActive.prototype, \"routerLinkActive\", {\n set: function (data) {\n var classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(function (c) { return !!c; });\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkActive.prototype.ngOnChanges = function (changes) { this.update(); };\n RouterLinkActive.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterLinkActive.prototype.update = function () {\n var _this = this;\n if (!this.links || !this.linksWithHrefs || !this.router.navigated)\n return;\n Promise.resolve().then(function () {\n var hasActiveLinks = _this.hasActiveLinks();\n if (_this.isActive !== hasActiveLinks) {\n _this.isActive = hasActiveLinks;\n _this.classes.forEach(function (c) {\n if (hasActiveLinks) {\n _this.renderer.addClass(_this.element.nativeElement, c);\n }\n else {\n _this.renderer.removeClass(_this.element.nativeElement, c);\n }\n });\n }\n });\n };\n RouterLinkActive.prototype.isLinkActive = function (router) {\n var _this = this;\n return function (link) {\n return router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact);\n };\n };\n RouterLinkActive.prototype.hasActiveLinks = function () {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n };\n __decorate([\n core.ContentChildren(RouterLink, { descendants: true }),\n __metadata(\"design:type\", core.QueryList)\n ], RouterLinkActive.prototype, \"links\", void 0);\n __decorate([\n core.ContentChildren(RouterLinkWithHref, { descendants: true }),\n __metadata(\"design:type\", core.QueryList)\n ], RouterLinkActive.prototype, \"linksWithHrefs\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkActive.prototype, \"routerLinkActiveOptions\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkActive.prototype, \"routerLinkActive\", null);\n RouterLinkActive = __decorate([\n core.Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n }),\n __metadata(\"design:paramtypes\", [Router, core.ElementRef, core.Renderer2,\n core.ChangeDetectorRef])\n ], RouterLinkActive);\n return RouterLinkActive;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\n var OutletContext = /** @class */ (function () {\n function OutletContext() {\n this.outlet = null;\n this.route = null;\n this.resolver = null;\n this.children = new ChildrenOutletContexts();\n this.attachRef = null;\n }\n return OutletContext;\n }());\n /**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\n var ChildrenOutletContexts = /** @class */ (function () {\n function ChildrenOutletContexts() {\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n ChildrenOutletContexts.prototype.onChildOutletCreated = function (childName, outlet) {\n var context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n };\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n ChildrenOutletContexts.prototype.onChildOutletDestroyed = function (childName) {\n var context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n };\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n ChildrenOutletContexts.prototype.onOutletDeactivated = function () {\n var contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n };\n ChildrenOutletContexts.prototype.onOutletReAttached = function (contexts) { this.contexts = contexts; };\n ChildrenOutletContexts.prototype.getOrCreateContext = function (childName) {\n var context = this.getContext(childName);\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n return context;\n };\n ChildrenOutletContexts.prototype.getContext = function (childName) { return this.contexts.get(childName) || null; };\n return ChildrenOutletContexts;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterOutlet = /** @class */ (function () {\n function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {\n this.parentContexts = parentContexts;\n this.location = location;\n this.resolver = resolver;\n this.changeDetector = changeDetector;\n this.activated = null;\n this._activatedRoute = null;\n this.activateEvents = new core.EventEmitter();\n this.deactivateEvents = new core.EventEmitter();\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n RouterOutlet.prototype.ngOnDestroy = function () { this.parentContexts.onChildOutletDestroyed(this.name); };\n RouterOutlet.prototype.ngOnInit = function () {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n var context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n }\n else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n };\n Object.defineProperty(RouterOutlet.prototype, \"isActivated\", {\n get: function () { return !!this.activated; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"component\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this.activated.instance;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRoute\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this._activatedRoute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRouteData\", {\n get: function () {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n RouterOutlet.prototype.detach = function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n this.location.detach();\n var cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n };\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n RouterOutlet.prototype.attach = function (ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n };\n RouterOutlet.prototype.deactivate = function () {\n if (this.activated) {\n var c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n };\n RouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n var snapshot = activatedRoute._futureSnapshot;\n var component = snapshot.routeConfig.component;\n resolver = resolver || this.resolver;\n var factory = resolver.resolveComponentFactory(component);\n var childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n var injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n };\n __decorate([\n core.Output('activate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"activateEvents\", void 0);\n __decorate([\n core.Output('deactivate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"deactivateEvents\", void 0);\n RouterOutlet = __decorate([\n core.Directive({ selector: 'router-outlet', exportAs: 'outlet' }),\n __param(3, core.Attribute('name')),\n __metadata(\"design:paramtypes\", [ChildrenOutletContexts, core.ViewContainerRef,\n core.ComponentFactoryResolver, String, core.ChangeDetectorRef])\n ], RouterOutlet);\n return RouterOutlet;\n }());\n var OutletInjector = /** @class */ (function () {\n function OutletInjector(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n OutletInjector.prototype.get = function (token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n };\n return OutletInjector;\n }());\n\n /**\n *@license\n *Copyright Google Inc. All Rights Reserved.\n *\n *Use of this source code is governed by an MIT-style license that can be\n *found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\n var PreloadingStrategy = /** @class */ (function () {\n function PreloadingStrategy() {\n }\n return PreloadingStrategy;\n }());\n /**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\n var PreloadAllModules = /** @class */ (function () {\n function PreloadAllModules() {\n }\n PreloadAllModules.prototype.preload = function (route, fn) {\n return fn().pipe(operators.catchError(function () { return rxjs.of(null); }));\n };\n return PreloadAllModules;\n }());\n /**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\n var NoPreloading = /** @class */ (function () {\n function NoPreloading() {\n }\n NoPreloading.prototype.preload = function (route, fn) { return rxjs.of(null); };\n return NoPreloading;\n }());\n /**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n var RouterPreloader = /** @class */ (function () {\n function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n var onStartLoad = function (r) { return router.triggerEvent(new RouteConfigLoadStart(r)); };\n var onEndLoad = function (r) { return router.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n RouterPreloader.prototype.setUpPreloading = function () {\n var _this = this;\n this.subscription =\n this.router.events\n .pipe(operators.filter(function (e) { return e instanceof NavigationEnd; }), operators.concatMap(function () { return _this.preload(); }))\n .subscribe(function () { });\n };\n RouterPreloader.prototype.preload = function () {\n var ngModule = this.injector.get(core.NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n };\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n RouterPreloader.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterPreloader.prototype.processRoutes = function (ngModule, routes) {\n var e_1, _a;\n var res = [];\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var route = routes_1_1.value;\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n var childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n // no config loaded, fetch the config\n }\n else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n // recurse into children\n }\n else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rxjs.from(res).pipe(operators.mergeAll(), operators.map(function (_) { return void 0; }));\n };\n RouterPreloader.prototype.preloadConfig = function (ngModule, route) {\n var _this = this;\n return this.preloadingStrategy.preload(route, function () {\n var loaded$ = _this.loader.load(ngModule.injector, route);\n return loaded$.pipe(operators.mergeMap(function (config) {\n route._loadedConfig = config;\n return _this.processRoutes(config.module, config.routes);\n }));\n });\n };\n RouterPreloader = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [Router, core.NgModuleFactoryLoader, core.Compiler,\n core.Injector, PreloadingStrategy])\n ], RouterPreloader);\n return RouterPreloader;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var RouterScroller = /** @class */ (function () {\n function RouterScroller(router, \n /** @docsNotRequired */ viewportScroller, options) {\n if (options === void 0) { options = {}; }\n this.router = router;\n this.viewportScroller = viewportScroller;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n RouterScroller.prototype.init = function () {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n };\n RouterScroller.prototype.createScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n _this.store[_this.lastId] = _this.viewportScroller.getScrollPosition();\n _this.lastSource = e.navigationTrigger;\n _this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n }\n else if (e instanceof NavigationEnd) {\n _this.lastId = e.id;\n _this.scheduleScrollEvent(e, _this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n };\n RouterScroller.prototype.consumeScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (!(e instanceof Scroll))\n return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (_this.options.scrollPositionRestoration === 'top') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n else if (_this.options.scrollPositionRestoration === 'enabled') {\n _this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n }\n else {\n if (e.anchor && _this.options.anchorScrolling === 'enabled') {\n _this.viewportScroller.scrollToAnchor(e.anchor);\n }\n else if (_this.options.scrollPositionRestoration !== 'disabled') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n };\n RouterScroller.prototype.scheduleScrollEvent = function (routerEvent, anchor) {\n this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n };\n RouterScroller.prototype.ngOnDestroy = function () {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n };\n return RouterScroller;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\n var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n /**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\n var ROUTER_CONFIGURATION = new core.InjectionToken('ROUTER_CONFIGURATION');\n /**\n * @docsNotRequired\n */\n var ROUTER_FORROOT_GUARD = new core.InjectionToken('ROUTER_FORROOT_GUARD');\n var ROUTER_PROVIDERS = [\n common.Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n core.ApplicationRef, UrlSerializer, ChildrenOutletContexts, common.Location, core.Injector,\n core.NgModuleFactoryLoader, core.Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new core.Optional()], [RouteReuseStrategy, new core.Optional()]\n ]\n },\n ChildrenOutletContexts,\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n { provide: core.NgModuleFactoryLoader, useClass: core.SystemJsNgModuleLoader },\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n { provide: ROUTER_CONFIGURATION, useValue: { enableTracing: false } },\n ];\n function routerNgProbeToken() {\n return new core.NgProbeToken('Router', Router);\n }\n /**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n var RouterModule = /** @class */ (function () {\n // Note: We are injecting the Router so it gets created eagerly...\n function RouterModule(guard, router) {\n }\n RouterModule_1 = RouterModule;\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n RouterModule.forRoot = function (routes, config) {\n return {\n ngModule: RouterModule_1,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new core.Optional(), new core.SkipSelf()]]\n },\n { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n {\n provide: common.LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n common.PlatformLocation, [new core.Inject(common.APP_BASE_HREF), new core.Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, common.ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n { provide: core.NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n provideRouterInitializer(),\n ],\n };\n };\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n RouterModule.forChild = function (routes) {\n return { ngModule: RouterModule_1, providers: [provideRoutes(routes)] };\n };\n var RouterModule_1;\n RouterModule = RouterModule_1 = __decorate([\n core.NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n }),\n __param(0, core.Optional()), __param(0, core.Inject(ROUTER_FORROOT_GUARD)), __param(1, core.Optional()),\n __metadata(\"design:paramtypes\", [Object, Router])\n ], RouterModule);\n return RouterModule;\n }());\n function createRouterScroller(router, viewportScroller, config) {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n }\n function provideLocationStrategy(platformLocationStrategy, baseHref, options) {\n if (options === void 0) { options = {}; }\n return options.useHash ? new common.HashLocationStrategy(platformLocationStrategy, baseHref) :\n new common.PathLocationStrategy(platformLocationStrategy, baseHref);\n }\n function provideForRootGuard(router) {\n if (router) {\n throw new Error(\"RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.\");\n }\n return 'guarded';\n }\n /**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\n function provideRoutes(routes) {\n return [\n { provide: core.ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes },\n { provide: ROUTES, multi: true, useValue: routes },\n ];\n }\n function setupRouter(ref, urlSerializer, contexts, location, injector, loader, compiler, config, opts, urlHandlingStrategy, routeReuseStrategy) {\n if (opts === void 0) { opts = {}; }\n var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.enableTracing) {\n var dom_1 = platformBrowser.ɵgetDOM();\n router.events.subscribe(function (e) {\n dom_1.logGroup(\"Router Event: \" + e.constructor.name);\n dom_1.log(e.toString());\n dom_1.log(e);\n dom_1.logGroupEnd();\n });\n }\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n return router;\n }\n function rootRoute(router) {\n return router.routerState.root;\n }\n /**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n var RouterInitializer = /** @class */ (function () {\n function RouterInitializer(injector) {\n this.injector = injector;\n this.initNavigation = false;\n this.resultOfPreactivationDone = new rxjs.Subject();\n }\n RouterInitializer.prototype.appInitializer = function () {\n var _this = this;\n var p = this.injector.get(common.LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(function () {\n var resolve = null;\n var res = new Promise(function (r) { return resolve = r; });\n var router = _this.injector.get(Router);\n var opts = _this.injector.get(ROUTER_CONFIGURATION);\n if (_this.isLegacyDisabled(opts) || _this.isLegacyEnabled(opts)) {\n resolve(true);\n }\n else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n }\n else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = function () {\n // only the initial navigation should be delayed\n if (!_this.initNavigation) {\n _this.initNavigation = true;\n resolve(true);\n return _this.resultOfPreactivationDone;\n // subsequent navigations should not be delayed\n }\n else {\n return rxjs.of(null);\n }\n };\n router.initialNavigation();\n }\n else {\n throw new Error(\"Invalid initialNavigation options: '\" + opts.initialNavigation + \"'\");\n }\n return res;\n });\n };\n RouterInitializer.prototype.bootstrapListener = function (bootstrappedComponentRef) {\n var opts = this.injector.get(ROUTER_CONFIGURATION);\n var preloader = this.injector.get(RouterPreloader);\n var routerScroller = this.injector.get(RouterScroller);\n var router = this.injector.get(Router);\n var ref = this.injector.get(core.ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n }\n else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null);\n this.resultOfPreactivationDone.complete();\n };\n RouterInitializer.prototype.isLegacyEnabled = function (opts) {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n };\n RouterInitializer.prototype.isLegacyDisabled = function (opts) {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n };\n RouterInitializer = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [core.Injector])\n ], RouterInitializer);\n return RouterInitializer;\n }());\n function getAppInitializer(r) {\n return r.appInitializer.bind(r);\n }\n function getBootstrapListener(r) {\n return r.bootstrapListener.bind(r);\n }\n /**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\n var ROUTER_INITIALIZER = new core.InjectionToken('Router Initializer');\n function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: core.APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] },\n { provide: core.APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n ];\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @publicApi\n */\n var VERSION = new core.Version('7.2.7');\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.ɵangular_packages_router_router_a = ROUTER_FORROOT_GUARD;\n exports.ɵangular_packages_router_router_h = RouterInitializer;\n exports.ɵangular_packages_router_router_c = createRouterScroller;\n exports.ɵangular_packages_router_router_i = getAppInitializer;\n exports.ɵangular_packages_router_router_j = getBootstrapListener;\n exports.ɵangular_packages_router_router_e = provideForRootGuard;\n exports.ɵangular_packages_router_router_d = provideLocationStrategy;\n exports.ɵangular_packages_router_router_k = provideRouterInitializer;\n exports.ɵangular_packages_router_router_g = rootRoute;\n exports.ɵangular_packages_router_router_b = routerNgProbeToken;\n exports.ɵangular_packages_router_router_f = setupRouter;\n exports.ɵangular_packages_router_router_n = RouterScroller;\n exports.ɵangular_packages_router_router_l = Tree;\n exports.ɵangular_packages_router_router_m = TreeNode;\n exports.RouterLink = RouterLink;\n exports.RouterLinkWithHref = RouterLinkWithHref;\n exports.RouterLinkActive = RouterLinkActive;\n exports.RouterOutlet = RouterOutlet;\n exports.ActivationEnd = ActivationEnd;\n exports.ActivationStart = ActivationStart;\n exports.ChildActivationEnd = ChildActivationEnd;\n exports.ChildActivationStart = ChildActivationStart;\n exports.GuardsCheckEnd = GuardsCheckEnd;\n exports.GuardsCheckStart = GuardsCheckStart;\n exports.NavigationCancel = NavigationCancel;\n exports.NavigationEnd = NavigationEnd;\n exports.NavigationError = NavigationError;\n exports.NavigationStart = NavigationStart;\n exports.ResolveEnd = ResolveEnd;\n exports.ResolveStart = ResolveStart;\n exports.RouteConfigLoadEnd = RouteConfigLoadEnd;\n exports.RouteConfigLoadStart = RouteConfigLoadStart;\n exports.RouterEvent = RouterEvent;\n exports.RoutesRecognized = RoutesRecognized;\n exports.Scroll = Scroll;\n exports.RouteReuseStrategy = RouteReuseStrategy;\n exports.Router = Router;\n exports.ROUTES = ROUTES;\n exports.ROUTER_CONFIGURATION = ROUTER_CONFIGURATION;\n exports.ROUTER_INITIALIZER = ROUTER_INITIALIZER;\n exports.RouterModule = RouterModule;\n exports.provideRoutes = provideRoutes;\n exports.ChildrenOutletContexts = ChildrenOutletContexts;\n exports.OutletContext = OutletContext;\n exports.NoPreloading = NoPreloading;\n exports.PreloadAllModules = PreloadAllModules;\n exports.PreloadingStrategy = PreloadingStrategy;\n exports.RouterPreloader = RouterPreloader;\n exports.ActivatedRoute = ActivatedRoute;\n exports.ActivatedRouteSnapshot = ActivatedRouteSnapshot;\n exports.RouterState = RouterState;\n exports.RouterStateSnapshot = RouterStateSnapshot;\n exports.PRIMARY_OUTLET = PRIMARY_OUTLET;\n exports.convertToParamMap = convertToParamMap;\n exports.UrlHandlingStrategy = UrlHandlingStrategy;\n exports.DefaultUrlSerializer = DefaultUrlSerializer;\n exports.UrlSegment = UrlSegment;\n exports.UrlSegmentGroup = UrlSegmentGroup;\n exports.UrlSerializer = UrlSerializer;\n exports.UrlTree = UrlTree;\n exports.VERSION = VERSION;\n exports.ɵEmptyOutletComponent = EmptyOutletComponent;\n exports.ɵROUTER_PROVIDERS = ROUTER_PROVIDERS;\n exports.ɵflatten = flatten;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=router.umd.js.map\n"]}
\ No newline at end of file
+{"version":3,"sources":["packages/router/router.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","common","core","rxjs","operators","platformBrowser","this","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__values","o","m","Symbol","iterator","next","value","done","__read","e","ar","push","error","__spread","concat","RouterEvent","NavigationStart","_super","id","url","navigationTrigger","restoredState","_this","toString","NavigationEnd","urlAfterRedirects","NavigationCancel","reason","NavigationError","RoutesRecognized","state","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","route","path","RouteConfigLoadEnd","ChildActivationStart","snapshot","routeConfig","ChildActivationEnd","ActivationStart","ActivationEnd","Scroll","routerEvent","position","anchor","EmptyOutletComponent","Component","template","PRIMARY_OUTLET","ParamsAsMap","params","has","name","get","v","isArray","getAll","keys","enumerable","configurable","convertToParamMap","NAVIGATION_CANCELING_ERROR","navigationCancelingError","message","Error","defaultUrlMatcher","segments","segmentGroup","parts","split","pathMatch","hasChildren","posParams","index","part","segment","startsWith","substring","consumed","slice","LoadedRouterConfig","routes","validateConfig","config","parentPath","validateNode","getFullPath","fullPath","component","children","loadChildren","outlet","redirectTo","matcher","charAt","currentRoute","standardizeConfig","map","shallowEqual","a","k1","k2","flatten","arr","last","forEach","callback","prop","wrapIntoObservable","ɵisObservable","ɵisPromise","from","Promise","resolve","of","containsTree","container","containee","exact","equalQueryParams","queryParams","equalSegmentGroups","equalPath","numberOfChildren","root","containsQueryParams","every","containsSegmentGroup","containsSegmentGroupHelper","containeePaths","current","UrlTree","fragment","_queryParamMap","DEFAULT_SERIALIZER","serialize","UrlSegmentGroup","parent","k","serializePaths","UrlSegment","parameters","_parameterMap","serializePath","as","bs","mapChildrenIntoArray","fn","res","child","childOutlet","UrlSerializer","DefaultUrlSerializer","parse","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","primary","children_1","join","serializeQueryParams","strParams","encodeUriQuery","encodeUriFragment","encodeURI","encodeUriString","encodeURIComponent","replace","encodeUriSegment","decode","decodeURIComponent","decodeQuery","serializeMatrixParams","SEGMENT_RE","matchSegments","str","match","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","capture","parseParens","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","undefined","indexOf","substr","Tree","_root","pathFromRoot","findNode","firstChild","siblings","findPath","filter","cc","node","e_1","_a","_b","_c","node_1","e_1_1","return","e_2","unshift","e_2_1","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","urlTree","rootComponent","createEmptyStateSnapshot","activated","ActivatedRouteSnapshot","RouterStateSnapshot","emptyUrl","BehaviorSubject","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","data","futureSnapshot","_futureSnapshot","_routerState","_paramMap","pipe","inheritedParamsDataResolve","paramsInheritanceStrategy","inheritingStartingFrom","parent_1","flattenInherited","reduce","curr","_resolvedData","urlSegment","lastPathIndex","_urlSegment","_lastPathIndex","_resolve","serializeNode","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalSegments","isMatrixParams","command","outlets","segmentPath","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","oldSegment","newSegment","Navigation","isAbsolute","numberOfDoubleDots","commands","cmdWithOutlet","find","toRoot","Position","processChildren","getPath","updateSegmentGroup","startIndex","updateSegmentGroupChildren","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","compare","slicedCommands","g","createNewSegmentGroup","outlets_2","getOutlets","paths","createNewSegmentChildren","stringify","ActivateRoutes","routeReuseStrategy","futureState","currState","forwardEvent","activate","parentContexts","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","contexts","futureChild","childOutletName","deactivateRoutes","childName","deactivateRouteAndItsChildren","parentContext","future","context","getContext","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","componentRef","detach","onOutletDeactivated","store","contexts_1","deactivate","activateRoutes","getOrCreateContext","shouldAttach","stored","retrieve","onOutletReAttached","attachRef","attach","advanceActivatedRouteNodeAndItsChildren","parentLoadedConfig","_loadedConfig","cmpFactoryResolver","componentFactoryResolver","resolver","activateWith","isFunction","isUrlTree","NoMatch","AbsoluteRedirect","Observable","obs","absoluteRedirect","newTree","namedOutletsRedirect","ApplyRedirects","moduleInjector","configLoader","urlSerializer","allowRedirects","ngModule","NgModuleRef","expandSegmentGroup","rootSegmentGroup","createUrlTree","catchError","noMatchError","rootCandidate","expandChildren","expandSegment","waitForMap","obj","waitHead","waitTail","mapped","concatAll","expandSegmentAgainstRoute","first","_","EmptyError","noLeftoversInUrl","getOutlet","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","lineralizeSegments","mergeMap","newSegments","group","consumedSegments","lastChild","positionalParamSegments","matched","rawSegmentGroup","load","injector","cfg","rawSlicedSegments","getChildConfig","routerConfig","childModule","childConfig","slicedSegments","containsEmptyPathRedirectsWithNamedOutlets","some","isEmptyPathRedirect","mergeTrivialChildren","createChildrenForEmptySegments","primarySegmentGroup","e_3","routes_2","routes_2_1","e_3_1","containsEmptyPathRedirects","addEmptySegmentsToChildrenIfNeeded","routes_1","routes_1_1","cs","runCanLoadGuard","canLoad","injectionToken","guardVal","guard","isCanLoad","result","shouldLoad","canLoadFails","applyRedirectCreatreUrlTree","newRoot","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","pos","idx","actualSegments_1","actualSegments_1_1","splice","CanActivate","CanDeactivate","getToken","token","getClosestLoadedConfig","checks","canDeactivateChecks","isActivated","INITIAL_VALUE","prioritizedGuardValue","switchMap","combineLatest","take","startWith","scan","acc","list","isPending","innerAcc","val","item","NoMatch$1","Recognizer","rootComponentType","relativeLinkResolution","recognize","split$1","processSegmentGroup","freeze","rootNode","routeState","inheritParamsAndData","routeNode","processSegment","checkOutletNameUniqueness","nodes","names","routeWithSameOutletName","sortActivatedRouteSnapshots","sort","localeCompare","config_1","config_1_1","processSegmentAgainstRoute","rawSegment","getData","getSourceSegmentGroup","getPathIndexShift","getResolve","match$1","_sourceSegment","_segmentIndexShift","containsEmptyPathMatchesWithNamedOutlets","emptyPathMatch","getOutlet$1","s_1","createChildrenForEmptyPaths","primarySegment","containsEmptyPathMatches","s_2","addEmptyPathsToChildrenIfNeeded","getResolver","futureARS","futureRSS","switchTap","source","nextResult","RouteReuseStrategy","DefaultRouteReuseStrategy","detachedTree","shouldReuseRoute","ROUTES","InjectionToken","RouterConfigLoader","loader","compiler","onLoadStartListener","onLoadEndListener","parentInjector","loadModuleFactory","NgModuleFactory","compileModuleAsync","UrlHandlingStrategy","DefaultUrlHandlingStrategy","shouldProcessUrl","extract","merge","newUrlPart","wholeUrl","defaultErrorHandler","defaultMalformedUriErrorHandler","defaultRouterHook","runExtras","Router","rootContexts","location","lastSuccessfulNavigation","currentNavigation","navigationId","isNgZoneEnabled","events","Subject","errorHandler","malformedUriErrorHandler","navigated","lastSuccessfulId","hooks","beforePreactivation","afterPreactivation","urlHandlingStrategy","onSameUrlNavigation","urlUpdateStrategy","console","ɵConsole","ngZone","NgZone","resetConfig","currentUrlTree","createEmptyUrlTree","rawUrlTree","browserUrlTree","triggerEvent","routerState","transitions","currentRawUrl","extractedUrl","rawUrl","extras","reject","promise","targetSnapshot","currentRouterState","targetRouterState","guards","canActivateChecks","guardsResult","navigations","setupNavigations","processNavigations","eventsSubject","tap","initialUrl","trigger","previousNavigation","completed","errored","urlTransition","transition","getValue","serializeUrl","EMPTY","applyRedirects$1","applyRedirects","finalUrl","recognize$1","serializer","skipLocationChange","setBrowserUrl","replaceUrl","routesRecognized","navStart","appliedUrlTree","guardsStart","getAllRouteGuards","getChildRouteGuards","futurePath","prevChildren","getRouteGuards","shouldRun","shouldRunGuardsAndResolvers","mode","runGuardsAndResolvers","checkGuards","runCanDeactivateChecks","currRSS","check","runCanDeactivate","currARS","canDeactivate","canDeactivateObservables","observable","isCanDeactivate","isBoolean","runCanActivateChecks","concatMap","fireChildActivationStart","fireActivationStart","runCanActivateChild","canActivateChildGuardsMapped","reverse","getCanActivateChild","canActivateChild","defer","guardsMapped","isCanActivateChild","runCanActivate","canActivate","canActivateObservables","isCanActivate","evt","guardsEnd","resetUrlToCurrentUrlTree","navCancel","resolveStart","resolveData","runResolve","resolveNode","key_1","resolvedData","resolveEnd","createRouterState","prevState","createNode","createOrReuseChildren","detachedRouteHandle","setFutureSnapshotsOfActivatedRoutes","createActivatedRoute","complete","finalize","isNavigationCancelingError","redirecting","resetStateAndUrl","navigateByUrl","navError","ee","resetRootComponentType","getTransition","setTransition","initialNavigation","setUpLocationChangeListener","locationSubscription","subscribe","change","parseUrl","setTimeout","scheduleNavigation","getCurrentNavigation","event","ngOnDestroy","dispose","unsubscribe","navigationExtras","relativeTo","preserveQueryParams","queryParamsHandling","preserveFragment","isDevMode","warn","f","q","removeEmptyProps","nav","computeNavigation","cmd","cmdIdx","outlets_1","urlPart","partIndex","startingPosition","findStartingPosition","modifier","createPositionApplyingDoubleDots","ci","dd","isInAngularZone","mergedTree","navigate","validateCommands","isActive","lastNavigation","rej","catch","isCurrentPathEqualTo","replaceState","go","storedState","storedUrl","RouterLink","tabIndex","renderer","el","setAttribute","nativeElement","set","preserve","onClick","attrBoolValue","Input","String","Boolean","HostListener","Function","Directive","selector","Attribute","Renderer2","ElementRef","RouterLinkWithHref","locationStrategy","subscription","updateTargetUrlAndHref","ngOnChanges","changes","button","ctrlKey","metaKey","shiftKey","href","prepareExternalUrl","HostBinding","Number","LocationStrategy","RouterLinkActive","element","cdr","classes","routerLinkActiveOptions","update","ngAfterContentInit","links","linksWithHrefs","then","hasActiveLinks","addClass","removeClass","isLinkActive","link","ContentChildren","descendants","QueryList","exportAs","ChangeDetectorRef","OutletContext","ChildrenOutletContexts","Map","onChildOutletCreated","onChildOutletDestroyed","RouterOutlet","changeDetector","_activatedRoute","activateEvents","EventEmitter","deactivateEvents","ngOnInit","instance","cmp","ref","activatedRoute","insert","hostView","destroy","emit","resolveComponentFactory","childContexts","OutletInjector","createComponent","markForCheck","Output","ViewContainerRef","ComponentFactoryResolver","notFoundValue","PreloadingStrategy","PreloadAllModules","preload","NoPreloading","RouterPreloader","moduleLoader","preloadingStrategy","setUpPreloading","processRoutes","preloadConfig","mergeAll","Injectable","NgModuleFactoryLoader","Compiler","Injector","RouterScroller","viewportScroller","options","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","init","setHistoryScrollRestoration","routerEventsSubscription","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","getScrollPosition","scheduleScrollEvent","scrollToPosition","scrollToAnchor","ROUTER_DIRECTIVES","ROUTER_CONFIGURATION","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","Location","provide","useClass","useFactory","setupRouter","deps","ApplicationRef","Optional","rootRoute","SystemJsNgModuleLoader","useValue","enableTracing","routerNgProbeToken","NgProbeToken","RouterModule","RouterModule_1","forRoot","providers","provideRoutes","provideForRootGuard","SkipSelf","provideLocationStrategy","PlatformLocation","Inject","APP_BASE_HREF","createRouterScroller","ViewportScroller","useExisting","multi","provideRouterInitializer","forChild","NgModule","declarations","entryComponents","scrollOffset","setOffset","platformLocationStrategy","baseHref","useHash","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","opts","dom_1","ɵgetDOM","logGroup","log","logGroupEnd","RouterInitializer","initNavigation","resultOfPreactivationDone","appInitializer","LOCATION_INITIALIZED","isLegacyDisabled","isLegacyEnabled","bootstrapListener","bootstrappedComponentRef","preloader","routerScroller","components","componentTypes","getAppInitializer","bind","getBootstrapListener","ROUTER_INITIALIZER","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","VERSION","Version","ɵangular_packages_router_router_a","ɵangular_packages_router_router_h","ɵangular_packages_router_router_c","ɵangular_packages_router_router_i","ɵangular_packages_router_router_j","ɵangular_packages_router_router_e","ɵangular_packages_router_router_d","ɵangular_packages_router_router_k","ɵangular_packages_router_router_g","ɵangular_packages_router_router_b","ɵangular_packages_router_router_f","ɵangular_packages_router_router_n","ɵangular_packages_router_router_l","ɵangular_packages_router_router_m","ɵEmptyOutletComponent","ɵROUTER_PROVIDERS","ɵflatten"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,QAASA,QAAQ,kBAAmBA,QAAQ,8BACxK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,mBAAoB,UAAW,kBAAmB,gBAAiB,OAAQ,iBAAkB,6BAA8BJ,GACrJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,OAAUR,EAAOQ,GAAGC,WAAcT,EAAOQ,GAAGE,OAAQV,EAAOQ,GAAGG,KAAMX,EAAOY,KAAMZ,EAAOY,KAAKC,UAAWb,EAAOQ,GAAGM,iBAH5K,CAIEC,KAAM,SAAUb,EAASQ,EAAQC,EAAMC,EAAMC,EAAWC,GAAmB,aAkBzE,IAAIE,EAAgB,SAASC,EAAG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qBA,GAC7Bh9B,EAAQ85B,aAAeA,GACvB95B,EAAQk6B,cAAgBA,GACxBl6B,EAAQ+0B,uBAAyBA,GACjC/0B,EAAQ80B,cAAgBA,GACxB90B,EAAQ82B,aAAeA,GACvB92B,EAAQ42B,kBAAoBA,GAC5B52B,EAAQ22B,mBAAqBA,GAC7B32B,EAAQ+2B,gBAAkBA,GAC1B/2B,EAAQ4S,eAAiBA,GACzB5S,EAAQqS,uBAAyBA,GACjCrS,EAAQ8R,YAAcA,GACtB9R,EAAQsS,oBAAsBA,GAC9BtS,EAAQ6G,eAAiBA,EACzB7G,EAAQyH,kBAAoBA,EAC5BzH,EAAQolB,oBAAsBA,GAC9BplB,EAAQqN,qBAAuBA,GAC/BrN,EAAQyM,WAAaA,EACrBzM,EAAQqM,gBAAkBA,EAC1BrM,EAAQoN,cAAgBA,GACxBpN,EAAQgM,QAAUA,EAClBhM,EAAQm9B,QAAUA,GAClBn9B,EAAQm+B,sBAAwBz3B,EAChC1G,EAAQo+B,kBAAoBrF,GAC5B/4B,EAAQq+B,SAAWl0B,EAEnBlJ,OAAO+B,eAAehD,EAAS,cAAgB8D,OAAO","sourcesContent":["/**\n * @license Angular v7.2.8\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/platform-browser')) :\n typeof define === 'function' && define.amd ? define('@angular/router', ['exports', '@angular/common', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/platform-browser'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = {}), global.ng.common, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.platformBrowser));\n}(this, function (exports, common, core, rxjs, operators, platformBrowser) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise */\r\n\r\n var extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n\r\n function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n }\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n }\r\n\r\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n\r\n function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n }\r\n\r\n function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var RouterEvent = /** @class */ (function () {\n function RouterEvent(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url) {\n this.id = id;\n this.url = url;\n }\n return RouterEvent;\n }());\n /**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\n var NavigationStart = /** @class */ (function (_super) {\n __extends(NavigationStart, _super);\n function NavigationStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n navigationTrigger, \n /** @docsNotRequired */\n restoredState) {\n if (navigationTrigger === void 0) { navigationTrigger = 'imperative'; }\n if (restoredState === void 0) { restoredState = null; }\n var _this = _super.call(this, id, url) || this;\n _this.navigationTrigger = navigationTrigger;\n _this.restoredState = restoredState;\n return _this;\n }\n /** @docsNotRequired */\n NavigationStart.prototype.toString = function () { return \"NavigationStart(id: \" + this.id + \", url: '\" + this.url + \"')\"; };\n return NavigationStart;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\n var NavigationEnd = /** @class */ (function (_super) {\n __extends(NavigationEnd, _super);\n function NavigationEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n return _this;\n }\n /** @docsNotRequired */\n NavigationEnd.prototype.toString = function () {\n return \"NavigationEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"')\";\n };\n return NavigationEnd;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\n var NavigationCancel = /** @class */ (function (_super) {\n __extends(NavigationCancel, _super);\n function NavigationCancel(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n reason) {\n var _this = _super.call(this, id, url) || this;\n _this.reason = reason;\n return _this;\n }\n /** @docsNotRequired */\n NavigationCancel.prototype.toString = function () { return \"NavigationCancel(id: \" + this.id + \", url: '\" + this.url + \"')\"; };\n return NavigationCancel;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\n var NavigationError = /** @class */ (function (_super) {\n __extends(NavigationError, _super);\n function NavigationError(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n error) {\n var _this = _super.call(this, id, url) || this;\n _this.error = error;\n return _this;\n }\n /** @docsNotRequired */\n NavigationError.prototype.toString = function () {\n return \"NavigationError(id: \" + this.id + \", url: '\" + this.url + \"', error: \" + this.error + \")\";\n };\n return NavigationError;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\n var RoutesRecognized = /** @class */ (function (_super) {\n __extends(RoutesRecognized, _super);\n function RoutesRecognized(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n /** @docsNotRequired */\n RoutesRecognized.prototype.toString = function () {\n return \"RoutesRecognized(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return RoutesRecognized;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\n var GuardsCheckStart = /** @class */ (function (_super) {\n __extends(GuardsCheckStart, _super);\n function GuardsCheckStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n GuardsCheckStart.prototype.toString = function () {\n return \"GuardsCheckStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return GuardsCheckStart;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\n var GuardsCheckEnd = /** @class */ (function (_super) {\n __extends(GuardsCheckEnd, _super);\n function GuardsCheckEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state, \n /** @docsNotRequired */\n shouldActivate) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n _this.shouldActivate = shouldActivate;\n return _this;\n }\n GuardsCheckEnd.prototype.toString = function () {\n return \"GuardsCheckEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \", shouldActivate: \" + this.shouldActivate + \")\";\n };\n return GuardsCheckEnd;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\n var ResolveStart = /** @class */ (function (_super) {\n __extends(ResolveStart, _super);\n function ResolveStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveStart.prototype.toString = function () {\n return \"ResolveStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveStart;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\n var ResolveEnd = /** @class */ (function (_super) {\n __extends(ResolveEnd, _super);\n function ResolveEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveEnd.prototype.toString = function () {\n return \"ResolveEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveEnd;\n }(RouterEvent));\n /**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\n var RouteConfigLoadStart = /** @class */ (function () {\n function RouteConfigLoadStart(\n /** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadStart.prototype.toString = function () { return \"RouteConfigLoadStart(path: \" + this.route.path + \")\"; };\n return RouteConfigLoadStart;\n }());\n /**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\n var RouteConfigLoadEnd = /** @class */ (function () {\n function RouteConfigLoadEnd(\n /** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadEnd.prototype.toString = function () { return \"RouteConfigLoadEnd(path: \" + this.route.path + \")\"; };\n return RouteConfigLoadEnd;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\n var ChildActivationStart = /** @class */ (function () {\n function ChildActivationStart(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationStart(path: '\" + path + \"')\";\n };\n return ChildActivationStart;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\n var ChildActivationEnd = /** @class */ (function () {\n function ChildActivationEnd(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationEnd(path: '\" + path + \"')\";\n };\n return ChildActivationEnd;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\n var ActivationStart = /** @class */ (function () {\n function ActivationStart(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationStart(path: '\" + path + \"')\";\n };\n return ActivationStart;\n }());\n /**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\n var ActivationEnd = /** @class */ (function () {\n function ActivationEnd(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationEnd(path: '\" + path + \"')\";\n };\n return ActivationEnd;\n }());\n /**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\n var Scroll = /** @class */ (function () {\n function Scroll(\n /** @docsNotRequired */\n routerEvent, \n /** @docsNotRequired */\n position, \n /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n }\n Scroll.prototype.toString = function () {\n var pos = this.position ? this.position[0] + \", \" + this.position[1] : null;\n return \"Scroll(anchor: '\" + this.anchor + \"', position: '\" + pos + \"')\";\n };\n return Scroll;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n var EmptyOutletComponent = /** @class */ (function () {\n function EmptyOutletComponent() {\n }\n EmptyOutletComponent = __decorate([\n core.Component({ template: \"<router-outlet></router-outlet>\" })\n ], EmptyOutletComponent);\n return EmptyOutletComponent;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\n var PRIMARY_OUTLET = 'primary';\n var ParamsAsMap = /** @class */ (function () {\n function ParamsAsMap(params) {\n this.params = params || {};\n }\n ParamsAsMap.prototype.has = function (name) { return this.params.hasOwnProperty(name); };\n ParamsAsMap.prototype.get = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n };\n ParamsAsMap.prototype.getAll = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n };\n Object.defineProperty(ParamsAsMap.prototype, \"keys\", {\n get: function () { return Object.keys(this.params); },\n enumerable: true,\n configurable: true\n });\n return ParamsAsMap;\n }());\n /**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\n function convertToParamMap(params) {\n return new ParamsAsMap(params);\n }\n var NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n function navigationCancelingError(message) {\n var error = Error('NavigationCancelingError: ' + message);\n error[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n }\n function isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n }\n // Matches the route configuration (`route`) against the actual URL (`segments`).\n function defaultUrlMatcher(segments, segmentGroup, route) {\n var parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n var posParams = {};\n // Check each config part against the actual URL\n for (var index = 0; index < parts.length; index++) {\n var part = parts[index];\n var segment = segments[index];\n var isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n }\n else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return { consumed: segments.slice(0, parts.length), posParams: posParams };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var LoadedRouterConfig = /** @class */ (function () {\n function LoadedRouterConfig(routes, module) {\n this.routes = routes;\n this.module = module;\n }\n return LoadedRouterConfig;\n }());\n function validateConfig(config, parentPath) {\n if (parentPath === void 0) { parentPath = ''; }\n // forEach doesn't iterate undefined values\n for (var i = 0; i < config.length; i++) {\n var route = config[i];\n var fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n }\n function validateNode(route, fullPath) {\n if (!route) {\n throw new Error(\"\\n Invalid configuration of route '\" + fullPath + \"': Encountered undefined route.\\n The reason might be an extra comma.\\n\\n Example:\\n const routes: Routes = [\\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\\n { path: 'dashboard', component: DashboardComponent },, << two commas\\n { path: 'detail/:id', component: HeroDetailComponent }\\n ];\\n \");\n }\n if (Array.isArray(route)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': Array cannot be specified\");\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': a componentless route without children or loadChildren cannot have a named outlet set\");\n }\n if (route.redirectTo && route.children) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and children cannot be used together\");\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and loadChildren cannot be used together\");\n }\n if (route.children && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': children and loadChildren cannot be used together\");\n }\n if (route.redirectTo && route.component) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and component cannot be used together\");\n }\n if (route.path && route.matcher) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': path and matcher cannot be used together\");\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"'. One of the following must be provided: component, redirectTo, children or loadChildren\");\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': routes must have either a path or a matcher specified\");\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': path cannot start with a slash\");\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n var exp = \"The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.\";\n throw new Error(\"Invalid configuration of route '{path: \\\"\" + fullPath + \"\\\", redirectTo: \\\"\" + route.redirectTo + \"\\\"}': please provide 'pathMatch'. \" + exp);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': pathMatch can only be set to 'prefix' or 'full'\");\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n }\n function getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n }\n else if (parentPath && !currentRoute.path) {\n return parentPath + \"/\";\n }\n else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n }\n else {\n return parentPath + \"/\" + currentRoute.path;\n }\n }\n /**\n * Makes a copy of the config and adds any default required properties.\n */\n function standardizeConfig(r) {\n var children = r.children && r.children.map(standardizeConfig);\n var c = children ? __assign({}, r, { children: children }) : __assign({}, r);\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function shallowEqualArrays(a, b) {\n if (a.length !== b.length)\n return false;\n for (var i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i]))\n return false;\n }\n return true;\n }\n function shallowEqual(a, b) {\n var k1 = Object.keys(a);\n var k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n var key;\n for (var i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Flattens single-level nested arrays.\n */\n function flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n /**\n * Return the last element of an array.\n */\n function last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n }\n function forEach(map, callback) {\n for (var prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n }\n function waitForMap(obj, fn) {\n if (Object.keys(obj).length === 0) {\n return rxjs.of({});\n }\n var waitHead = [];\n var waitTail = [];\n var res = {};\n forEach(obj, function (a, k) {\n var mapped = fn(k, a).pipe(operators.map(function (r) { return res[k] = r; }));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n }\n else {\n waitTail.push(mapped);\n }\n });\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return rxjs.of.apply(null, waitHead.concat(waitTail)).pipe(operators.concatAll(), operators.last(), operators.map(function () { return res; }));\n }\n function wrapIntoObservable(value) {\n if (core.ɵisObservable(value)) {\n return value;\n }\n if (core.ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return rxjs.from(Promise.resolve(value));\n }\n return rxjs.of(value);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n }\n function containsTree(container, containee, exact) {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n }\n function equalQueryParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n }\n function equalSegmentGroups(container, containee) {\n if (!equalPath(container.segments, containee.segments))\n return false;\n if (container.numberOfChildren !== containee.numberOfChildren)\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n }\n function containsQueryParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(function (key) { return containee[key] === container[key]; });\n }\n function containsSegmentGroup(container, containee) {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n }\n function containsSegmentGroupHelper(container, containee, containeePaths) {\n if (container.segments.length > containeePaths.length) {\n var current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths))\n return false;\n if (containee.hasChildren())\n return false;\n return true;\n }\n else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths))\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n }\n else {\n var current = containeePaths.slice(0, container.segments.length);\n var next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current))\n return false;\n if (!container.children[PRIMARY_OUTLET])\n return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n }\n /**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var UrlTree = /** @class */ (function () {\n /** @internal */\n function UrlTree(\n /** The root segment group of the URL tree */\n root, \n /** The query params of the URL */\n queryParams, \n /** The fragment of the URL */\n fragment) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n }\n Object.defineProperty(UrlTree.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlTree.prototype.toString = function () { return DEFAULT_SERIALIZER.serialize(this); };\n return UrlTree;\n }());\n /**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\n var UrlSegmentGroup = /** @class */ (function () {\n function UrlSegmentGroup(\n /** The URL segments of this group. See `UrlSegment` for more information */\n segments, \n /** The list of children of this group */\n children) {\n var _this = this;\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n forEach(children, function (v, k) { return v.parent = _this; });\n }\n /** Whether the segment has child segments */\n UrlSegmentGroup.prototype.hasChildren = function () { return this.numberOfChildren > 0; };\n Object.defineProperty(UrlSegmentGroup.prototype, \"numberOfChildren\", {\n /** Number of child segments */\n get: function () { return Object.keys(this.children).length; },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegmentGroup.prototype.toString = function () { return serializePaths(this); };\n return UrlSegmentGroup;\n }());\n /**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var UrlSegment = /** @class */ (function () {\n function UrlSegment(\n /** The path part of a URL segment */\n path, \n /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n Object.defineProperty(UrlSegment.prototype, \"parameterMap\", {\n get: function () {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegment.prototype.toString = function () { return serializePath(this); };\n return UrlSegment;\n }());\n function equalSegments(as, bs) {\n return equalPath(as, bs) && as.every(function (a, i) { return shallowEqual(a.parameters, bs[i].parameters); });\n }\n function equalPath(as, bs) {\n if (as.length !== bs.length)\n return false;\n return as.every(function (a, i) { return a.path === bs[i].path; });\n }\n function mapChildrenIntoArray(segment, fn) {\n var res = [];\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n }\n /**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\n var UrlSerializer = /** @class */ (function () {\n function UrlSerializer() {\n }\n return UrlSerializer;\n }());\n /**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\n var DefaultUrlSerializer = /** @class */ (function () {\n function DefaultUrlSerializer() {\n }\n /** Parses a url into a `UrlTree` */\n DefaultUrlSerializer.prototype.parse = function (url) {\n var p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n };\n /** Converts a `UrlTree` into a url */\n DefaultUrlSerializer.prototype.serialize = function (tree) {\n var segment = \"/\" + serializeSegment(tree.root, true);\n var query = serializeQueryParams(tree.queryParams);\n var fragment = typeof tree.fragment === \"string\" ? \"#\" + encodeUriFragment(tree.fragment) : '';\n return \"\" + segment + query + fragment;\n };\n return DefaultUrlSerializer;\n }());\n var DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n function serializePaths(segment) {\n return segment.segments.map(function (p) { return serializePath(p); }).join('/');\n }\n function serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n var primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n var children_1 = [];\n forEach(segment.children, function (v, k) {\n if (k !== PRIMARY_OUTLET) {\n children_1.push(k + \":\" + serializeSegment(v, false));\n }\n });\n return children_1.length > 0 ? primary + \"(\" + children_1.join('//') + \")\" : primary;\n }\n else {\n var children = mapChildrenIntoArray(segment, function (v, k) {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [k + \":\" + serializeSegment(v, false)];\n });\n return serializePaths(segment) + \"/(\" + children.join('//') + \")\";\n }\n }\n /**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\n function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n }\n /**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\n function encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n }\n /**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\n function encodeUriFragment(s) {\n return encodeURI(s);\n }\n /**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\n function encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n }\n function decode(s) {\n return decodeURIComponent(s);\n }\n // Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n // decodeURIComponent function will not decode \"+\" as a space.\n function decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n }\n function serializePath(path) {\n return \"\" + encodeUriSegment(path.path) + serializeMatrixParams(path.parameters);\n }\n function serializeMatrixParams(params) {\n return Object.keys(params)\n .map(function (key) { return \";\" + encodeUriSegment(key) + \"=\" + encodeUriSegment(params[key]); })\n .join('');\n }\n function serializeQueryParams(params) {\n var strParams = Object.keys(params).map(function (name) {\n var value = params[name];\n return Array.isArray(value) ?\n value.map(function (v) { return encodeUriQuery(name) + \"=\" + encodeUriQuery(v); }).join('&') :\n encodeUriQuery(name) + \"=\" + encodeUriQuery(value);\n });\n return strParams.length ? \"?\" + strParams.join(\"&\") : '';\n }\n var SEGMENT_RE = /^[^\\/()?;=#]+/;\n function matchSegments(str) {\n var match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n }\n var QUERY_PARAM_RE = /^[^=?&#]+/;\n // Return the name of the query param at the start of the string or an empty string\n function matchQueryParams(str) {\n var match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n }\n var QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n // Return the value of the query param at the start of the string or an empty string\n function matchUrlQueryParamValue(str) {\n var match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n }\n var UrlParser = /** @class */ (function () {\n function UrlParser(url) {\n this.url = url;\n this.remaining = url;\n }\n UrlParser.prototype.parseRootSegment = function () {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n };\n UrlParser.prototype.parseQueryParams = function () {\n var params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n };\n UrlParser.prototype.parseFragment = function () {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n };\n UrlParser.prototype.parseChildren = function () {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n var segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n var children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n var res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n };\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n UrlParser.prototype.parseSegment = function () {\n var path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(\"Empty path url segment cannot have parameters: '\" + this.remaining + \"'.\");\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n };\n UrlParser.prototype.parseMatrixParams = function () {\n var params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n };\n UrlParser.prototype.parseParam = function (params) {\n var key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n };\n // Parse a single query parameter `name[=value]`\n UrlParser.prototype.parseQueryParam = function (params) {\n var key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n var decodedKey = decodeQuery(key);\n var decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n var currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n }\n else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n };\n // parse `(a/b//outlet_name:c/d)`\n UrlParser.prototype.parseParens = function (allowPrimary) {\n var segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n var path = matchSegments(this.remaining);\n var next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(\"Cannot parse url '\" + this.url + \"'\");\n }\n var outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n }\n else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n var children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n };\n UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };\n // Consumes the prefix when it is present and returns whether it has been consumed\n UrlParser.prototype.consumeOptional = function (str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n };\n UrlParser.prototype.capture = function (str) {\n if (!this.consumeOptional(str)) {\n throw new Error(\"Expected \\\"\" + str + \"\\\".\");\n }\n };\n return UrlParser;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var Tree = /** @class */ (function () {\n function Tree(root) {\n this._root = root;\n }\n Object.defineProperty(Tree.prototype, \"root\", {\n get: function () { return this._root.value; },\n enumerable: true,\n configurable: true\n });\n /**\n * @internal\n */\n Tree.prototype.parent = function (t) {\n var p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n };\n /**\n * @internal\n */\n Tree.prototype.children = function (t) {\n var n = findNode(t, this._root);\n return n ? n.children.map(function (t) { return t.value; }) : [];\n };\n /**\n * @internal\n */\n Tree.prototype.firstChild = function (t) {\n var n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n };\n /**\n * @internal\n */\n Tree.prototype.siblings = function (t) {\n var p = findPath(t, this._root);\n if (p.length < 2)\n return [];\n var c = p[p.length - 2].children.map(function (c) { return c.value; });\n return c.filter(function (cc) { return cc !== t; });\n };\n /**\n * @internal\n */\n Tree.prototype.pathFromRoot = function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };\n return Tree;\n }());\n // DFS for the node matching the value\n function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n }\n // Return the path to the node with the given value using DFS\n function findPath(value, node) {\n var e_2, _a;\n if (value === node.value)\n return [node];\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return [];\n }\n var TreeNode = /** @class */ (function () {\n function TreeNode(value, children) {\n this.value = value;\n this.children = children;\n }\n TreeNode.prototype.toString = function () { return \"TreeNode(\" + this.value + \")\"; };\n return TreeNode;\n }());\n // Return the list of T indexed by outlet name\n function nodeChildrenAsMap(node) {\n var map = {};\n if (node) {\n node.children.forEach(function (child) { return map[child.value.outlet] = child; });\n }\n return map;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\n var RouterState = /** @class */ (function (_super) {\n __extends(RouterState, _super);\n /** @internal */\n function RouterState(root, \n /** The current snapshot of the router state */\n snapshot) {\n var _this = _super.call(this, root) || this;\n _this.snapshot = snapshot;\n setRouterState(_this, root);\n return _this;\n }\n RouterState.prototype.toString = function () { return this.snapshot.toString(); };\n return RouterState;\n }(Tree));\n function createEmptyState(urlTree, rootComponent) {\n var snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n var emptyUrl = new rxjs.BehaviorSubject([new UrlSegment('', {})]);\n var emptyParams = new rxjs.BehaviorSubject({});\n var emptyData = new rxjs.BehaviorSubject({});\n var emptyQueryParams = new rxjs.BehaviorSubject({});\n var fragment = new rxjs.BehaviorSubject('');\n var activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n }\n function createEmptyStateSnapshot(urlTree, rootComponent) {\n var emptyParams = {};\n var emptyData = {};\n var emptyQueryParams = {};\n var fragment = '';\n var activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n }\n /**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var ActivatedRoute = /** @class */ (function () {\n /** @internal */\n function ActivatedRoute(\n /** An observable of the URL segments matched by this route */\n url, \n /** An observable of the matrix parameters scoped to this route */\n params, \n /** An observable of the query parameters shared by all the routes */\n queryParams, \n /** An observable of the URL fragment shared by all the routes */\n fragment, \n /** An observable of the static and resolved data of this route. */\n data, \n /** The outlet name of the route. It's a constant */\n outlet, \n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n component, futureSnapshot) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this._futureSnapshot = futureSnapshot;\n }\n Object.defineProperty(ActivatedRoute.prototype, \"routeConfig\", {\n /** The configuration used to match this route */\n get: function () { return this._futureSnapshot.routeConfig; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"root\", {\n /** The root of the router state */\n get: function () { return this._routerState.root; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: function () { return this._routerState.parent(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: function () { return this._routerState.firstChild(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: function () { return this._routerState.children(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: function () { return this._routerState.pathFromRoot(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(operators.map(function (p) { return convertToParamMap(p); }));\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(operators.map(function (p) { return convertToParamMap(p); }));\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRoute.prototype.toString = function () {\n return this.snapshot ? this.snapshot.toString() : \"Future(\" + this._futureSnapshot + \")\";\n };\n return ActivatedRoute;\n }());\n /**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\n function inheritedParamsDataResolve(route, paramsInheritanceStrategy) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n var pathFromRoot = route.pathFromRoot;\n var inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n while (inheritingStartingFrom >= 1) {\n var current = pathFromRoot[inheritingStartingFrom];\n var parent_1 = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n // parent is componentless => current route should inherit its params and data\n }\n else if (!parent_1.component) {\n inheritingStartingFrom--;\n }\n else {\n break;\n }\n }\n }\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n }\n /** @internal */\n function flattenInherited(pathFromRoot) {\n return pathFromRoot.reduce(function (res, curr) {\n var params = __assign({}, res.params, curr.params);\n var data = __assign({}, res.data, curr.data);\n var resolve = __assign({}, res.resolve, curr._resolvedData);\n return { params: params, data: data, resolve: resolve };\n }, { params: {}, data: {}, resolve: {} });\n }\n /**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var ActivatedRouteSnapshot = /** @class */ (function () {\n /** @internal */\n function ActivatedRouteSnapshot(\n /** The URL segments matched by this route */\n url, \n /** The matrix parameters scoped to this route */\n params, \n /** The query parameters shared by all the routes */\n queryParams, \n /** The URL fragment shared by all the routes */\n fragment, \n /** The static and resolved data of this route */\n data, \n /** The outlet name of the route */\n outlet, \n /** The component of the route */\n component, routeConfig, urlSegment, lastPathIndex, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"root\", {\n /** The root of the router state */\n get: function () { return this._routerState.root; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: function () { return this._routerState.parent(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: function () { return this._routerState.firstChild(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: function () { return this._routerState.children(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: function () { return this._routerState.pathFromRoot(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRouteSnapshot.prototype.toString = function () {\n var url = this.url.map(function (segment) { return segment.toString(); }).join('/');\n var matched = this.routeConfig ? this.routeConfig.path : '';\n return \"Route(url:'\" + url + \"', path:'\" + matched + \"')\";\n };\n return ActivatedRouteSnapshot;\n }());\n /**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var RouterStateSnapshot = /** @class */ (function (_super) {\n __extends(RouterStateSnapshot, _super);\n /** @internal */\n function RouterStateSnapshot(\n /** The url from which this snapshot was created */\n url, root) {\n var _this = _super.call(this, root) || this;\n _this.url = url;\n setRouterState(_this, root);\n return _this;\n }\n RouterStateSnapshot.prototype.toString = function () { return serializeNode(this._root); };\n return RouterStateSnapshot;\n }(Tree));\n function setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(function (c) { return setRouterState(state, c); });\n }\n function serializeNode(node) {\n var c = node.children.length > 0 ? \" { \" + node.children.map(serializeNode).join(', ') + \" } \" : '';\n return \"\" + node.value + c;\n }\n /**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\n function advanceActivatedRoute(route) {\n if (route.snapshot) {\n var currentSnapshot = route.snapshot;\n var nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParams.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragment.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.params.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.url.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.data.next(nextSnapshot.data);\n }\n }\n else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.data.next(route._futureSnapshot.data);\n }\n }\n function equalParamsAndUrlSegments(a, b) {\n var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n var parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function createRouterState(routeReuseStrategy, curr, prevState) {\n var root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n }\n function createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n var value = prevState.value;\n value._futureSnapshot = curr.value;\n var children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n }\n else {\n var detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n var tree = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n }\n else {\n var value = createActivatedRoute(curr.value);\n var children = curr.children.map(function (c) { return createNode(routeReuseStrategy, c); });\n return new TreeNode(value, children);\n }\n }\n }\n function setFutureSnapshotsOfActivatedRoutes(curr, result) {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (var i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n }\n function createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(function (child) {\n var e_1, _a;\n try {\n for (var _b = __values(prevState.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var p = _c.value;\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return createNode(routeReuseStrategy, child);\n });\n }\n function createActivatedRoute(c) {\n return new ActivatedRoute(new rxjs.BehaviorSubject(c.url), new rxjs.BehaviorSubject(c.params), new rxjs.BehaviorSubject(c.queryParams), new rxjs.BehaviorSubject(c.fragment), new rxjs.BehaviorSubject(c.data), c.outlet, c.component, c);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n var nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n var startingPosition = findStartingPosition(nav, urlTree, route);\n var segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n }\n function isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n }\n function tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {\n var qp = {};\n if (queryParams) {\n forEach(queryParams, function (value, name) {\n qp[name] = Array.isArray(value) ? value.map(function (v) { return \"\" + v; }) : \"\" + value;\n });\n }\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n }\n function replaceSegment(current, oldSegment, newSegment) {\n var children = {};\n forEach(current.children, function (c, outletName) {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n }\n else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n }\n var Navigation = /** @class */ (function () {\n function Navigation(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c != null && c.outlets; });\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n Navigation.prototype.toRoot = function () {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n };\n return Navigation;\n }());\n /** Transforms commands to a normalized `Navigation` */\n function computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n var numberOfDoubleDots = 0;\n var isAbsolute = false;\n var res = commands.reduce(function (res, cmd, cmdIdx) {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n var outlets_1 = {};\n forEach(cmd.outlets, function (commands, name) {\n outlets_1[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return __spread(res, [{ outlets: outlets_1 }]);\n }\n if (cmd.segmentPath) {\n return __spread(res, [cmd.segmentPath]);\n }\n }\n if (!(typeof cmd === 'string')) {\n return __spread(res, [cmd]);\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach(function (urlPart, partIndex) {\n if (partIndex == 0 && urlPart === '.') ;\n else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n }\n else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return __spread(res, [cmd]);\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n }\n var Position = /** @class */ (function () {\n function Position(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n return Position;\n }());\n function findStartingPosition(nav, tree, route) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n var modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n var index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n }\n function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n var g = group;\n var ci = index;\n var dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n }\n function getPath(command) {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return \"\" + command;\n }\n function getOutlets(commands) {\n var _a, _b;\n if (!(typeof commands[0] === 'object'))\n return _a = {}, _a[PRIMARY_OUTLET] = commands, _a;\n if (commands[0].outlets === undefined)\n return _b = {}, _b[PRIMARY_OUTLET] = commands, _b;\n return commands[0].outlets;\n }\n function updateSegmentGroup(segmentGroup, startIndex, commands) {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n var m = prefixedWith(segmentGroup, startIndex, commands);\n var slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n var g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n }\n else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n }\n else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n }\n function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else {\n var outlets_2 = getOutlets(commands);\n var children_1 = {};\n forEach(outlets_2, function (commands, outlet) {\n if (commands !== null) {\n children_1[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n forEach(segmentGroup.children, function (child, childOutlet) {\n if (outlets_2[childOutlet] === undefined) {\n children_1[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children_1);\n }\n }\n function prefixedWith(segmentGroup, startIndex, commands) {\n var currentCommandIndex = 0;\n var currentPathIndex = startIndex;\n var noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length)\n return noMatch;\n var path = segmentGroup.segments[currentPathIndex];\n var curr = getPath(commands[currentCommandIndex]);\n var next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined)\n break;\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path))\n return noMatch;\n currentCommandIndex += 2;\n }\n else {\n if (!compare(curr, {}, path))\n return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n }\n function createNewSegmentGroup(segmentGroup, startIndex, commands) {\n var paths = segmentGroup.segments.slice(0, startIndex);\n var i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n var children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n var p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n var curr = getPath(commands[i]);\n var next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n }\n else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n }\n function createNewSegmentChildren(outlets) {\n var children = {};\n forEach(outlets, function (commands, outlet) {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n }\n function stringify(params) {\n var res = {};\n forEach(params, function (v, k) { return res[k] = \"\" + v; });\n return res;\n }\n function compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var activateRoutes = function (rootContexts, routeReuseStrategy, forwardEvent) {\n return operators.map(function (t) {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n };\n var ActivateRoutes = /** @class */ (function () {\n function ActivateRoutes(routeReuseStrategy, futureState, currState, forwardEvent) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n }\n ActivateRoutes.prototype.activate = function (parentContexts) {\n var futureRoot = this.futureState._root;\n var currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n };\n // De-activate the child route that are not re-used for the future state\n ActivateRoutes.prototype.deactivateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(function (futureChild) {\n var childOutletName = futureChild.value.outlet;\n _this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n forEach(children, function (v, childName) {\n _this.deactivateRouteAndItsChildren(v, contexts);\n });\n };\n ActivateRoutes.prototype.deactivateRoutes = function (futureNode, currNode, parentContext) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n var context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n }\n else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndItsChildren = function (route, parentContexts) {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n }\n else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n };\n ActivateRoutes.prototype.detachAndStoreRouteSubtree = function (route, parentContexts) {\n var context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n var componentRef = context.outlet.detach();\n var contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, { componentRef: componentRef, route: route, contexts: contexts });\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndOutlet = function (route, parentContexts) {\n var _this = this;\n var context = parentContexts.getContext(route.value.outlet);\n if (context) {\n var children = nodeChildrenAsMap(route);\n var contexts_1 = route.value.component ? context.children : parentContexts;\n forEach(children, function (v, k) { return _this.deactivateRouteAndItsChildren(v, contexts_1); });\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n };\n ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(function (c) {\n _this.activateRoutes(c, children[c.value.outlet], contexts);\n _this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n };\n ActivateRoutes.prototype.activateRoutes = function (futureNode, currNode, parentContexts) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n var context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n }\n else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n var context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n var stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n }\n else {\n var config = parentLoadedConfig(future.snapshot);\n var cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n };\n return ActivateRoutes;\n }());\n function advanceActivatedRouteNodeAndItsChildren(node) {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n }\n function parentLoadedConfig(snapshot) {\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n if (route && route.component)\n return null;\n }\n return null;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\n function isFunction(v) {\n return typeof v === 'function';\n }\n function isBoolean(v) {\n return typeof v === 'boolean';\n }\n function isUrlTree(v) {\n return v instanceof UrlTree;\n }\n function isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n }\n function isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n }\n function isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n }\n function isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NoMatch = /** @class */ (function () {\n function NoMatch(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n return NoMatch;\n }());\n var AbsoluteRedirect = /** @class */ (function () {\n function AbsoluteRedirect(urlTree) {\n this.urlTree = urlTree;\n }\n return AbsoluteRedirect;\n }());\n function noMatch(segmentGroup) {\n return new rxjs.Observable(function (obs) { return obs.error(new NoMatch(segmentGroup)); });\n }\n function absoluteRedirect(newTree) {\n return new rxjs.Observable(function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });\n }\n function namedOutletsRedirect(redirectTo) {\n return new rxjs.Observable(function (obs) { return obs.error(new Error(\"Only absolute redirects can have named outlets. redirectTo: '\" + redirectTo + \"'\")); });\n }\n function canLoadFails(route) {\n return new rxjs.Observable(function (obs) { return obs.error(navigationCancelingError(\"Cannot load children because the guard of the route \\\"path: '\" + route.path + \"'\\\" returned false\")); });\n }\n /**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\n function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n }\n var ApplyRedirects = /** @class */ (function () {\n function ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\n this.ngModule = moduleInjector.get(core.NgModuleRef);\n }\n ApplyRedirects.prototype.apply = function () {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n var urlTrees$ = expanded$.pipe(operators.map(function (rootSegmentGroup) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));\n return urlTrees$.pipe(operators.catchError(function (e) {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n _this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return _this.match(e.urlTree);\n }\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.match = function (tree) {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n var mapped$ = expanded$.pipe(operators.map(function (rootSegmentGroup) {\n return _this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment);\n }));\n return mapped$.pipe(operators.catchError(function (e) {\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noMatchError = function (e) {\n return new Error(\"Cannot match any routes. URL Segment: '\" + e.segmentGroup + \"'\");\n };\n ApplyRedirects.prototype.createUrlTree = function (rootCandidate, queryParams, fragment) {\n var _a;\n var root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], (_a = {}, _a[PRIMARY_OUTLET] = rootCandidate, _a)) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n };\n ApplyRedirects.prototype.expandSegmentGroup = function (ngModule, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(operators.map(function (children) { return new UrlSegmentGroup([], children); }));\n }\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n };\n // Recursively expand segment groups for all the child outlets\n ApplyRedirects.prototype.expandChildren = function (ngModule, routes, segmentGroup) {\n var _this = this;\n return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });\n };\n ApplyRedirects.prototype.expandSegment = function (ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {\n var _this = this;\n return rxjs.of.apply(void 0, __spread(routes)).pipe(operators.map(function (r) {\n var expanded$ = _this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(operators.catchError(function (e) {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return rxjs.of(null);\n }\n throw e;\n }));\n }), operators.concatAll(), operators.first(function (s) { return !!s; }), operators.catchError(function (e, _) {\n if (e instanceof rxjs.EmptyError || e.name === 'EmptyError') {\n if (_this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return rxjs.of(new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n ApplyRedirects.prototype.expandSegmentAgainstRoute = function (ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n };\n ApplyRedirects.prototype.expandSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);\n };\n ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {\n var _this = this;\n var newTree = this.applyRedirectCommands([], route.redirectTo, {});\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(operators.mergeMap(function (newSegments) {\n var group = new UrlSegmentGroup(newSegments, {});\n return _this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n };\n ApplyRedirects.prototype.expandRegularSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n var _this = this;\n var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;\n if (!matched)\n return noMatch(segmentGroup);\n var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(operators.mergeMap(function (newSegments) {\n return _this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);\n }));\n };\n ApplyRedirects.prototype.matchSegmentAgainstRoute = function (ngModule, rawSegmentGroup, route, segments) {\n var _this = this;\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(operators.map(function (cfg) {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return rxjs.of(new UrlSegmentGroup(segments, {}));\n }\n var _a = match(rawSegmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild;\n if (!matched)\n return noMatch(rawSegmentGroup);\n var rawSlicedSegments = segments.slice(lastChild);\n var childConfig$ = this.getChildConfig(ngModule, route, segments);\n return childConfig$.pipe(operators.mergeMap(function (routerConfig) {\n var childModule = routerConfig.module;\n var childConfig = routerConfig.routes;\n var _a = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var expanded$_1 = _this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$_1.pipe(operators.map(function (children) { return new UrlSegmentGroup(consumedSegments, children); }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return rxjs.of(new UrlSegmentGroup(consumedSegments, {}));\n }\n var expanded$ = _this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(operators.map(function (cs) {\n return new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children);\n }));\n }));\n };\n ApplyRedirects.prototype.getChildConfig = function (ngModule, route, segments) {\n var _this = this;\n if (route.children) {\n // The children belong to the same module\n return rxjs.of(new LoadedRouterConfig(route.children, ngModule));\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return rxjs.of(route._loadedConfig);\n }\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(operators.mergeMap(function (shouldLoad) {\n if (shouldLoad) {\n return _this.configLoader.load(ngModule.injector, route)\n .pipe(operators.map(function (cfg) {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return rxjs.of(new LoadedRouterConfig([], ngModule));\n };\n ApplyRedirects.prototype.lineralizeSegments = function (route, urlTree) {\n var res = [];\n var c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return rxjs.of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n };\n ApplyRedirects.prototype.applyRedirectCommands = function (segments, redirectTo, posParams) {\n return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n };\n ApplyRedirects.prototype.applyRedirectCreatreUrlTree = function (redirectTo, urlTree, segments, posParams) {\n var newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n };\n ApplyRedirects.prototype.createQueryParams = function (redirectToParams, actualParams) {\n var res = {};\n forEach(redirectToParams, function (v, k) {\n var copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n var sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n }\n else {\n res[k] = v;\n }\n });\n return res;\n };\n ApplyRedirects.prototype.createSegmentGroup = function (redirectTo, group, segments, posParams) {\n var _this = this;\n var updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n var children = {};\n forEach(group.children, function (child, name) {\n children[name] = _this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n };\n ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {\n var _this = this;\n return redirectToSegments.map(function (s) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :\n _this.findOrReturn(s, actualSegments); });\n };\n ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {\n var pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\"Cannot redirect to '\" + redirectTo + \"'. Cannot find '\" + redirectToUrlSegment.path + \"'.\");\n return pos;\n };\n ApplyRedirects.prototype.findOrReturn = function (redirectToUrlSegment, actualSegments) {\n var e_1, _a;\n var idx = 0;\n try {\n for (var actualSegments_1 = __values(actualSegments), actualSegments_1_1 = actualSegments_1.next(); !actualSegments_1_1.done; actualSegments_1_1 = actualSegments_1.next()) {\n var s = actualSegments_1_1.value;\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (actualSegments_1_1 && !actualSegments_1_1.done && (_a = actualSegments_1.return)) _a.call(actualSegments_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return redirectToUrlSegment;\n };\n return ApplyRedirects;\n }());\n function runCanLoadGuard(moduleInjector, route, segments) {\n var canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0)\n return rxjs.of(true);\n var obs = rxjs.from(canLoad).pipe(operators.map(function (injectionToken) {\n var guard = moduleInjector.get(injectionToken);\n var guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n }\n else if (isFunction(guard)) {\n guardVal = guard(route, segments);\n }\n else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n return obs.pipe(operators.concatAll(), operators.every(function (result) { return result === true; }));\n }\n function match(segmentGroup, route, segments) {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n return { matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res) {\n return {\n matched: false,\n consumedSegments: [],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n return {\n matched: true,\n consumedSegments: res.consumed,\n lastChild: res.consumed.length,\n positionalParamSegments: res.posParams,\n };\n }\n function split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptySegments(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: slicedSegments };\n }\n return { segmentGroup: segmentGroup, slicedSegments: slicedSegments };\n }\n function mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n var c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n }\n function addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n var e_2, _a;\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign({}, children, res);\n }\n function createChildrenForEmptySegments(routes, primarySegmentGroup) {\n var e_3, _a;\n var res = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n }\n function containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET; });\n }\n function containsEmptyPathRedirects(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r); });\n }\n function isEmptyPathRedirect(segmentGroup, segments, r) {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo !== undefined;\n }\n function getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {\n return function (source) {\n return source.pipe(operators.switchMap(function (t) { return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(operators.map(function (urlAfterRedirects) { return (__assign({}, t, { urlAfterRedirects: urlAfterRedirects })); })); }));\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var CanActivate = /** @class */ (function () {\n function CanActivate(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n return CanActivate;\n }());\n var CanDeactivate = /** @class */ (function () {\n function CanDeactivate(component, route) {\n this.component = component;\n this.route = route;\n }\n return CanDeactivate;\n }());\n function getAllRouteGuards(future, curr, parentContexts) {\n var futureRoot = future._root;\n var currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n }\n function getCanActivateChild(p) {\n var canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0)\n return null;\n return { node: p, guards: canActivateChild };\n }\n function getToken(token, snapshot, moduleInjector) {\n var config = getClosestLoadedConfig(snapshot);\n var injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n }\n function getClosestLoadedConfig(snapshot) {\n if (!snapshot)\n return null;\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n }\n return null;\n }\n function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks) {\n if (checks === void 0) { checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }; }\n var prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(function (c) {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n forEach(prevChildren, function (v, k) {\n return deactivateRouteAndItsChildren(v, contexts.getContext(k), checks);\n });\n return checks;\n }\n function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks) {\n if (checks === void 0) { checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }; }\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n var shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n }\n else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun) {\n var component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n }\n else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n }\n function shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n }\n function deactivateRouteAndItsChildren(route, context, checks) {\n var children = nodeChildrenAsMap(route);\n var r = route.value;\n forEach(children, function (node, childName) {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n }\n else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n }\n else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n }\n else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var INITIAL_VALUE = Symbol('INITIAL_VALUE');\n function prioritizedGuardValue() {\n return operators.switchMap(function (obs) {\n return rxjs.combineLatest.apply(void 0, __spread(obs.map(function (o) { return o.pipe(operators.take(1), operators.startWith(INITIAL_VALUE)); }))).pipe(operators.scan(function (acc, list) {\n var isPending = false;\n return list.reduce(function (innerAcc, val, i) {\n if (innerAcc !== INITIAL_VALUE)\n return innerAcc;\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE)\n isPending = true;\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false)\n return val;\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n return innerAcc;\n }, acc);\n }, INITIAL_VALUE), operators.filter(function (item) { return item !== INITIAL_VALUE; }), operators.map(function (item) { return isUrlTree(item) ? item : item === true; }), //\n operators.take(1));\n });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function checkGuards(moduleInjector, forwardEvent) {\n return function (source) {\n return source.pipe(operators.mergeMap(function (t) {\n var targetSnapshot = t.targetSnapshot, currentSnapshot = t.currentSnapshot, _a = t.guards, canActivateChecks = _a.canActivateChecks, canDeactivateChecks = _a.canDeactivateChecks;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return rxjs.of(__assign({}, t, { guardsResult: true }));\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)\n .pipe(operators.mergeMap(function (canDeactivate) {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :\n rxjs.of(canDeactivate);\n }), operators.map(function (guardsResult) { return (__assign({}, t, { guardsResult: guardsResult })); }));\n }));\n };\n }\n function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {\n return rxjs.from(checks).pipe(operators.mergeMap(function (check) {\n return runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector);\n }), operators.first(function (result) { return result !== true; }, true));\n }\n function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {\n return rxjs.from(checks).pipe(operators.concatMap(function (check) {\n return rxjs.from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(operators.concatAll(), operators.first(function (result) {\n return result !== true;\n }, true));\n }), operators.first(function (result) { return result !== true; }, true));\n }\n /**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\n function fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return rxjs.of(true);\n }\n /**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\n function fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return rxjs.of(true);\n }\n function runCanActivate(futureRSS, futureARS, moduleInjector) {\n var canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0)\n return rxjs.of(true);\n var canActivateObservables = canActivate.map(function (c) {\n return rxjs.defer(function () {\n var guard = getToken(c, futureARS, moduleInjector);\n var observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n }\n else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(operators.first());\n });\n });\n return rxjs.of(canActivateObservables).pipe(prioritizedGuardValue());\n }\n function runCanActivateChild(futureRSS, path, moduleInjector) {\n var futureARS = path[path.length - 1];\n var canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(function (p) { return getCanActivateChild(p); })\n .filter(function (_) { return _ !== null; });\n var canActivateChildGuardsMapped = canActivateChildGuards.map(function (d) {\n return rxjs.defer(function () {\n var guardsMapped = d.guards.map(function (c) {\n var guard = getToken(c, d.node, moduleInjector);\n var observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n }\n else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(operators.first());\n });\n return rxjs.of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return rxjs.of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n }\n function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {\n var canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0)\n return rxjs.of(true);\n var canDeactivateObservables = canDeactivate.map(function (c) {\n var guard = getToken(c, currARS, moduleInjector);\n var observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n }\n else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(operators.first());\n });\n return rxjs.of(canDeactivateObservables).pipe(prioritizedGuardValue());\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NoMatch$1 = /** @class */ (function () {\n function NoMatch() {\n }\n return NoMatch;\n }());\n function recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n if (relativeLinkResolution === void 0) { relativeLinkResolution = 'legacy'; }\n return new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)\n .recognize();\n }\n var Recognizer = /** @class */ (function () {\n function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.relativeLinkResolution = relativeLinkResolution;\n }\n Recognizer.prototype.recognize = function () {\n try {\n var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n var rootNode = new TreeNode(root, children);\n var routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return rxjs.of(routeState);\n }\n catch (e) {\n return new rxjs.Observable(function (obs) { return obs.error(e); });\n }\n };\n Recognizer.prototype.inheritParamsAndData = function (routeNode) {\n var _this = this;\n var route = routeNode.value;\n var i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n routeNode.children.forEach(function (n) { return _this.inheritParamsAndData(n); });\n };\n Recognizer.prototype.processSegmentGroup = function (config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n };\n Recognizer.prototype.processChildren = function (config, segmentGroup) {\n var _this = this;\n var children = mapChildrenIntoArray(segmentGroup, function (child, childOutlet) { return _this.processSegmentGroup(config, child, childOutlet); });\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n };\n Recognizer.prototype.processSegment = function (config, segmentGroup, segments, outlet) {\n var e_1, _a;\n try {\n for (var config_1 = __values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {\n var r = config_1_1.value;\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n }\n catch (e) {\n if (!(e instanceof NoMatch$1))\n throw e;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n throw new NoMatch$1();\n };\n Recognizer.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n Recognizer.prototype.processSegmentAgainstRoute = function (route, rawSegment, segments, outlet) {\n if (route.redirectTo)\n throw new NoMatch$1();\n if ((route.outlet || PRIMARY_OUTLET) !== outlet)\n throw new NoMatch$1();\n var snapshot;\n var consumedSegments = [];\n var rawSlicedSegments = [];\n if (route.path === '**') {\n var params = segments.length > 0 ? last(segments).parameters : {};\n snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n }\n else {\n var result = match$1(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n var childConfig = getChildConfig(route);\n var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var children_1 = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode(snapshot, children_1)];\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode(snapshot, [])];\n }\n var children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode(snapshot, children)];\n };\n return Recognizer;\n }());\n function sortActivatedRouteSnapshots(nodes) {\n nodes.sort(function (a, b) {\n if (a.value.outlet === PRIMARY_OUTLET)\n return -1;\n if (b.value.outlet === PRIMARY_OUTLET)\n return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n }\n function getChildConfig(route) {\n if (route.children) {\n return route.children;\n }\n if (route.loadChildren) {\n return route._loadedConfig.routes;\n }\n return [];\n }\n function match$1(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch$1();\n }\n return { consumedSegments: [], lastChild: 0, parameters: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res)\n throw new NoMatch$1();\n var posParams = {};\n forEach(res.posParams, function (v, k) { posParams[k] = v.path; });\n var parameters = res.consumed.length > 0 ? __assign({}, posParams, res.consumed[res.consumed.length - 1].parameters) :\n posParams;\n return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };\n }\n function checkOutletNameUniqueness(nodes) {\n var names = {};\n nodes.forEach(function (n) {\n var routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n var p = routeWithSameOutletName.url.map(function (s) { return s.toString(); }).join('/');\n var c = n.value.url.map(function (s) { return s.toString(); }).join('/');\n throw new Error(\"Two segments cannot have the same outlet name: '\" + p + \"' and '\" + c + \"'.\");\n }\n names[n.value.outlet] = n.value;\n });\n }\n function getSourceSegmentGroup(segmentGroup) {\n var s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n }\n function getPathIndexShift(segmentGroup) {\n var s = segmentGroup;\n var res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n }\n function split$1(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s_1 = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s_1._sourceSegment = segmentGroup;\n s_1._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_1, slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n var s_2 = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));\n s_2._sourceSegment = segmentGroup;\n s_2._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_2, slicedSegments: slicedSegments };\n }\n var s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments: slicedSegments };\n }\n function addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {\n var e_2, _a;\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet$1(r)]) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n }\n else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign({}, children, res);\n }\n function createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n var e_3, _a;\n var res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet$1(r) !== PRIMARY_OUTLET) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n }\n function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet$1(r) !== PRIMARY_OUTLET; });\n }\n function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r); });\n }\n function emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo === undefined;\n }\n function getOutlet$1(route) {\n return route.outlet || PRIMARY_OUTLET;\n }\n function getData(route) {\n return route.data || {};\n }\n function getResolve(route) {\n return route.resolve || {};\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {\n return function (source) {\n return source.pipe(operators.mergeMap(function (t) { return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(operators.map(function (targetSnapshot) { return (__assign({}, t, { targetSnapshot: targetSnapshot })); })); }));\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function resolveData(paramsInheritanceStrategy, moduleInjector) {\n return function (source) {\n return source.pipe(operators.mergeMap(function (t) {\n var targetSnapshot = t.targetSnapshot, canActivateChecks = t.guards.canActivateChecks;\n if (!canActivateChecks.length) {\n return rxjs.of(t);\n }\n return rxjs.from(canActivateChecks)\n .pipe(operators.concatMap(function (check) { return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector); }), operators.reduce(function (_, __) { return _; }), operators.map(function (_) { return t; }));\n }));\n };\n }\n function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {\n var resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(operators.map(function (resolvedData) {\n futureARS._resolvedData = resolvedData;\n futureARS.data = __assign({}, futureARS.data, inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve);\n return null;\n }));\n }\n function resolveNode(resolve, futureARS, futureRSS, moduleInjector) {\n var keys = Object.keys(resolve);\n if (keys.length === 0) {\n return rxjs.of({});\n }\n if (keys.length === 1) {\n var key_1 = keys[0];\n return getResolver(resolve[key_1], futureARS, futureRSS, moduleInjector)\n .pipe(operators.map(function (value) {\n var _a;\n return _a = {}, _a[key_1] = value, _a;\n }));\n }\n var data = {};\n var runningResolvers$ = rxjs.from(keys).pipe(operators.mergeMap(function (key) {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(operators.map(function (value) {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(operators.last(), operators.map(function () { return data; }));\n }\n function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {\n var resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\n function switchTap(next) {\n return function (source) {\n return source.pipe(operators.switchMap(function (v) {\n var nextResult = next(v);\n if (nextResult) {\n return rxjs.from(nextResult).pipe(operators.map(function () { return v; }));\n }\n return rxjs.from([v]);\n }));\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\n var RouteReuseStrategy = /** @class */ (function () {\n function RouteReuseStrategy() {\n }\n return RouteReuseStrategy;\n }());\n /**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\n var DefaultRouteReuseStrategy = /** @class */ (function () {\n function DefaultRouteReuseStrategy() {\n }\n DefaultRouteReuseStrategy.prototype.shouldDetach = function (route) { return false; };\n DefaultRouteReuseStrategy.prototype.store = function (route, detachedTree) { };\n DefaultRouteReuseStrategy.prototype.shouldAttach = function (route) { return false; };\n DefaultRouteReuseStrategy.prototype.retrieve = function (route) { return null; };\n DefaultRouteReuseStrategy.prototype.shouldReuseRoute = function (future, curr) {\n return future.routeConfig === curr.routeConfig;\n };\n return DefaultRouteReuseStrategy;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @docsNotRequired\n * @publicApi\n */\n var ROUTES = new core.InjectionToken('ROUTES');\n var RouterConfigLoader = /** @class */ (function () {\n function RouterConfigLoader(loader, compiler, onLoadStartListener, onLoadEndListener) {\n this.loader = loader;\n this.compiler = compiler;\n this.onLoadStartListener = onLoadStartListener;\n this.onLoadEndListener = onLoadEndListener;\n }\n RouterConfigLoader.prototype.load = function (parentInjector, route) {\n var _this = this;\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n var moduleFactory$ = this.loadModuleFactory(route.loadChildren);\n return moduleFactory$.pipe(operators.map(function (factory) {\n if (_this.onLoadEndListener) {\n _this.onLoadEndListener(route);\n }\n var module = factory.create(parentInjector);\n return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n };\n RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {\n var _this = this;\n if (typeof loadChildren === 'string') {\n return rxjs.from(this.loader.load(loadChildren));\n }\n else {\n return wrapIntoObservable(loadChildren()).pipe(operators.mergeMap(function (t) {\n if (t instanceof core.NgModuleFactory) {\n return rxjs.of(t);\n }\n else {\n return rxjs.from(_this.compiler.compileModuleAsync(t));\n }\n }));\n }\n };\n return RouterConfigLoader;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\n var UrlHandlingStrategy = /** @class */ (function () {\n function UrlHandlingStrategy() {\n }\n return UrlHandlingStrategy;\n }());\n /**\n * @publicApi\n */\n var DefaultUrlHandlingStrategy = /** @class */ (function () {\n function DefaultUrlHandlingStrategy() {\n }\n DefaultUrlHandlingStrategy.prototype.shouldProcessUrl = function (url) { return true; };\n DefaultUrlHandlingStrategy.prototype.extract = function (url) { return url; };\n DefaultUrlHandlingStrategy.prototype.merge = function (newUrlPart, wholeUrl) { return newUrlPart; };\n return DefaultUrlHandlingStrategy;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function defaultErrorHandler(error) {\n throw error;\n }\n function defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\n }\n /**\n * @internal\n */\n function defaultRouterHook(snapshot, runExtras) {\n return rxjs.of(null);\n }\n /**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var Router = /** @class */ (function () {\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n function Router(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {\n var _this = this;\n this.rootComponentType = rootComponentType;\n this.urlSerializer = urlSerializer;\n this.rootContexts = rootContexts;\n this.location = location;\n this.config = config;\n this.lastSuccessfulNavigation = null;\n this.currentNavigation = null;\n this.navigationId = 0;\n this.isNgZoneEnabled = false;\n this.events = new rxjs.Subject();\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n this.errorHandler = defaultErrorHandler;\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;\n /**\n * Indicates if at least one navigation happened.\n */\n this.navigated = false;\n this.lastSuccessfulId = -1;\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n this.hooks = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();\n this.routeReuseStrategy = new DefaultRouteReuseStrategy();\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n this.onSameUrlNavigation = 'ignore';\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n this.paramsInheritanceStrategy = 'emptyOnly';\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n this.urlUpdateStrategy = 'deferred';\n /**\n * See {@link RouterModule} for more information.\n */\n this.relativeLinkResolution = 'legacy';\n var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };\n var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.ngModule = injector.get(core.NgModuleRef);\n this.console = injector.get(core.ɵConsole);\n var ngZone = injector.get(core.NgZone);\n this.isNgZoneEnabled = ngZone instanceof core.NgZone;\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n this.transitions = new rxjs.BehaviorSubject({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: { canActivateChecks: [], canDeactivateChecks: [] },\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n this.processNavigations();\n }\n Router.prototype.setupNavigations = function (transitions) {\n var _this = this;\n var eventsSubject = this.events;\n return transitions.pipe(operators.filter(function (t) { return t.id !== 0; }), \n // Extract URL\n operators.map(function (t) { return (__assign({}, t, { extractedUrl: _this.urlHandlingStrategy.extract(t.rawUrl) })); }), \n // Store the Navigation object\n operators.tap(function (t) {\n _this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: _this.lastSuccessfulNavigation ? __assign({}, _this.lastSuccessfulNavigation, { previousNavigation: null }) :\n null\n };\n }), \n // Using switchMap so we cancel executing navigations when a new one comes in\n operators.switchMap(function (t) {\n var completed = false;\n var errored = false;\n return rxjs.of(t).pipe(operators.switchMap(function (t) {\n var urlTransition = !_this.navigated || t.extractedUrl.toString() !== _this.browserUrlTree.toString();\n var processCurrentUrl = (_this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n _this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n if (processCurrentUrl) {\n return rxjs.of(t).pipe(\n // Fire NavigationStart event\n operators.switchMap(function (t) {\n var transition = _this.transitions.getValue();\n eventsSubject.next(new NavigationStart(t.id, _this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== _this.transitions.getValue()) {\n return rxjs.EMPTY;\n }\n return [t];\n }), \n // This delay is required to match old behavior that forced navigation to\n // always be async\n operators.switchMap(function (t) { return Promise.resolve(t); }), \n // ApplyRedirects\n applyRedirects$1(_this.ngModule.injector, _this.configLoader, _this.urlSerializer, _this.config), \n // Update the currentNavigation\n operators.tap(function (t) {\n _this.currentNavigation = __assign({}, _this.currentNavigation, { finalUrl: t.urlAfterRedirects });\n }), \n // Recognize\n recognize$1(_this.rootComponentType, _this.config, function (url) { return _this.serializeUrl(url); }, _this.paramsInheritanceStrategy, _this.relativeLinkResolution), \n // Update URL if in `eager` update mode\n operators.tap(function (t) {\n if (_this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n _this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n _this.browserUrlTree = t.urlAfterRedirects;\n }\n }), \n // Fire RoutesRecognized\n operators.tap(function (t) {\n var routesRecognized = new RoutesRecognized(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n eventsSubject.next(routesRecognized);\n }));\n }\n else {\n var processPreviousUrl = urlTransition && _this.rawUrlTree &&\n _this.urlHandlingStrategy.shouldProcessUrl(_this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n var id = t.id, extractedUrl = t.extractedUrl, source = t.source, restoredState = t.restoredState, extras = t.extras;\n var navStart = new NavigationStart(id, _this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n var targetSnapshot = createEmptyState(extractedUrl, _this.rootComponentType).snapshot;\n return rxjs.of(__assign({}, t, { targetSnapshot: targetSnapshot, urlAfterRedirects: extractedUrl, extras: __assign({}, extras, { skipLocationChange: false, replaceUrl: false }) }));\n }\n else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n _this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return rxjs.EMPTY;\n }\n }\n }), \n // Before Preactivation\n switchTap(function (t) {\n var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;\n return _this.hooks.beforePreactivation(targetSnapshot, {\n navigationId: navigationId,\n appliedUrlTree: appliedUrlTree,\n rawUrlTree: rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }), \n // --- GUARDS ---\n operators.tap(function (t) {\n var guardsStart = new GuardsCheckStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(guardsStart);\n }), operators.map(function (t) { return (__assign({}, t, { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, _this.rootContexts) })); }), checkGuards(_this.ngModule.injector, function (evt) { return _this.triggerEvent(evt); }), operators.tap(function (t) {\n if (isUrlTree(t.guardsResult)) {\n var error = navigationCancelingError(\"Redirecting to \\\"\" + _this.serializeUrl(t.guardsResult) + \"\\\"\");\n error.url = t.guardsResult;\n throw error;\n }\n }), operators.tap(function (t) {\n var guardsEnd = new GuardsCheckEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n _this.triggerEvent(guardsEnd);\n }), operators.filter(function (t) {\n if (!t.guardsResult) {\n _this.resetUrlToCurrentUrlTree();\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }), \n // --- RESOLVE ---\n switchTap(function (t) {\n if (t.guards.canActivateChecks.length) {\n return rxjs.of(t).pipe(operators.tap(function (t) {\n var resolveStart = new ResolveStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(resolveStart);\n }), resolveData(_this.paramsInheritanceStrategy, _this.ngModule.injector), //\n operators.tap(function (t) {\n var resolveEnd = new ResolveEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(resolveEnd);\n }));\n }\n return undefined;\n }), \n // --- AFTER PREACTIVATION ---\n switchTap(function (t) {\n var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;\n return _this.hooks.afterPreactivation(targetSnapshot, {\n navigationId: navigationId,\n appliedUrlTree: appliedUrlTree,\n rawUrlTree: rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }), operators.map(function (t) {\n var targetRouterState = createRouterState(_this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n return (__assign({}, t, { targetRouterState: targetRouterState }));\n }), \n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n operators.tap(function (t) {\n _this.currentUrlTree = t.urlAfterRedirects;\n _this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, t.rawUrl);\n _this.routerState = t.targetRouterState;\n if (_this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n _this.setBrowserUrl(_this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n _this.browserUrlTree = t.urlAfterRedirects;\n }\n }), activateRoutes(_this.rootContexts, _this.routeReuseStrategy, function (evt) { return _this.triggerEvent(evt); }), operators.tap({ next: function () { completed = true; }, complete: function () { completed = true; } }), operators.finalize(function () {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n _this.resetUrlToCurrentUrlTree();\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), \"Navigation ID \" + t.id + \" is not equal to the current navigation id \" + _this.navigationId);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n _this.currentNavigation = null;\n }), operators.catchError(function (e) {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n var redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n _this.navigated = true;\n _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n if (redirecting) {\n _this.navigateByUrl(e.url);\n }\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n }\n else {\n _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n var navError = new NavigationError(t.id, _this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(_this.errorHandler(e));\n }\n catch (ee) {\n t.reject(ee);\n }\n }\n return rxjs.EMPTY;\n }));\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n }));\n };\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n Router.prototype.resetRootComponentType = function (rootComponentType) {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n };\n Router.prototype.getTransition = function () { return this.transitions.value; };\n Router.prototype.setTransition = function (t) {\n this.transitions.next(__assign({}, this.getTransition(), t));\n };\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n Router.prototype.initialNavigation = function () {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), { replaceUrl: true });\n }\n };\n /**\n * Sets up the location change listener.\n */\n Router.prototype.setUpLocationChangeListener = function () {\n var _this = this;\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = this.location.subscribe(function (change) {\n var rawUrlTree = _this.parseUrl(change['url']);\n var source = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n var state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(function () { _this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true }); }, 0);\n });\n }\n };\n Object.defineProperty(Router.prototype, \"url\", {\n /** The current url */\n get: function () { return this.serializeUrl(this.currentUrlTree); },\n enumerable: true,\n configurable: true\n });\n /** The current Navigation object if one exists */\n Router.prototype.getCurrentNavigation = function () { return this.currentNavigation; };\n /** @internal */\n Router.prototype.triggerEvent = function (event) { this.events.next(event); };\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n Router.prototype.resetConfig = function (config) {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n };\n /** @docsNotRequired */\n Router.prototype.ngOnDestroy = function () { this.dispose(); };\n /** Disposes of the router */\n Router.prototype.dispose = function () {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null;\n }\n };\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n Router.prototype.createUrlTree = function (commands, navigationExtras) {\n if (navigationExtras === void 0) { navigationExtras = {}; }\n var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;\n if (core.isDevMode() && preserveQueryParams && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n var a = relativeTo || this.routerState.root;\n var f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n var q = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = __assign({}, this.currentUrlTree.queryParams, queryParams);\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n }\n else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q, f);\n };\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n Router.prototype.navigateByUrl = function (url, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n if (core.isDevMode() && this.isNgZoneEnabled && !core.NgZone.isInAngularZone()) {\n this.console.warn(\"Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?\");\n }\n var urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n };\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n Router.prototype.navigate = function (commands, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n };\n /** Serializes a `UrlTree` into a string */\n Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); };\n /** Parses a string into a `UrlTree` */\n Router.prototype.parseUrl = function (url) {\n var urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n };\n /** Returns whether the url is activated */\n Router.prototype.isActive = function (url, exact) {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n var urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n };\n Router.prototype.removeEmptyProps = function (params) {\n return Object.keys(params).reduce(function (result, key) {\n var value = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n };\n Router.prototype.processNavigations = function () {\n var _this = this;\n this.navigations.subscribe(function (t) {\n _this.navigated = true;\n _this.lastSuccessfulId = t.id;\n _this.events\n .next(new NavigationEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(_this.currentUrlTree)));\n _this.lastSuccessfulNavigation = _this.currentNavigation;\n _this.currentNavigation = null;\n t.resolve(true);\n }, function (e) { _this.console.warn(\"Unhandled Navigation Error: \"); });\n };\n Router.prototype.scheduleNavigation = function (rawUrl, source, restoredState, extras) {\n var lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n var resolve = null;\n var reject = null;\n var promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n var id = ++this.navigationId;\n this.setTransition({\n id: id,\n source: source,\n restoredState: restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl: rawUrl, extras: extras, resolve: resolve, reject: reject, promise: promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch(function (e) { return Promise.reject(e); });\n };\n Router.prototype.setBrowserUrl = function (url, replaceUrl, id, state) {\n var path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', __assign({}, state, { navigationId: id }));\n }\n else {\n this.location.go(path, '', __assign({}, state, { navigationId: id }));\n }\n };\n Router.prototype.resetStateAndUrl = function (storedState, storedUrl, rawUrl) {\n this.routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n };\n Router.prototype.resetUrlToCurrentUrlTree = function () {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId });\n };\n return Router;\n }());\n function validateCommands(commands) {\n for (var i = 0; i < commands.length; i++) {\n var cmd = commands[i];\n if (cmd == null) {\n throw new Error(\"The requested path contains \" + cmd + \" segment at index \" + i);\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterLink = /** @class */ (function () {\n function RouterLink(router, route, tabIndex, renderer, el) {\n this.router = router;\n this.route = route;\n this.commands = [];\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n Object.defineProperty(RouterLink.prototype, \"routerLink\", {\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLink.prototype, \"preserveQueryParams\", {\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n set: function (value) {\n if (core.isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLink.prototype.onClick = function () {\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n };\n Object.defineProperty(RouterLink.prototype, \"urlTree\", {\n get: function () {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"queryParams\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"fragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"preserveFragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"skipLocationChange\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"replaceUrl\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"state\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLink.prototype, \"routerLink\", null);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLink.prototype, \"preserveQueryParams\", null);\n __decorate([\n core.HostListener('click'),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLink.prototype, \"onClick\", null);\n RouterLink = __decorate([\n core.Directive({ selector: ':not(a):not(area)[routerLink]' }),\n __param(2, core.Attribute('tabindex')),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute, String, core.Renderer2, core.ElementRef])\n ], RouterLink);\n return RouterLink;\n }());\n /**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterLinkWithHref = /** @class */ (function () {\n function RouterLinkWithHref(router, route, locationStrategy) {\n var _this = this;\n this.router = router;\n this.route = route;\n this.locationStrategy = locationStrategy;\n this.commands = [];\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.updateTargetUrlAndHref();\n }\n });\n }\n Object.defineProperty(RouterLinkWithHref.prototype, \"routerLink\", {\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLinkWithHref.prototype, \"preserveQueryParams\", {\n set: function (value) {\n if (core.isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkWithHref.prototype.ngOnChanges = function (changes) { this.updateTargetUrlAndHref(); };\n RouterLinkWithHref.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterLinkWithHref.prototype.onClick = function (button, ctrlKey, metaKey, shiftKey) {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n };\n RouterLinkWithHref.prototype.updateTargetUrlAndHref = function () {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n };\n Object.defineProperty(RouterLinkWithHref.prototype, \"urlTree\", {\n get: function () {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n core.HostBinding('attr.target'), core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"target\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"queryParams\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"fragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"preserveFragment\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"skipLocationChange\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"replaceUrl\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"state\", void 0);\n __decorate([\n core.HostBinding(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"href\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkWithHref.prototype, \"routerLink\", null);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLinkWithHref.prototype, \"preserveQueryParams\", null);\n __decorate([\n core.HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Number, Boolean, Boolean, Boolean]),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLinkWithHref.prototype, \"onClick\", null);\n RouterLinkWithHref = __decorate([\n core.Directive({ selector: 'a[routerLink],area[routerLink]' }),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute,\n common.LocationStrategy])\n ], RouterLinkWithHref);\n return RouterLinkWithHref;\n }());\n function attrBoolValue(s) {\n return s === '' || !!s;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterLinkActive = /** @class */ (function () {\n function RouterLinkActive(router, element, renderer, cdr) {\n var _this = this;\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.classes = [];\n this.isActive = false;\n this.routerLinkActiveOptions = { exact: false };\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.update();\n }\n });\n }\n RouterLinkActive.prototype.ngAfterContentInit = function () {\n var _this = this;\n this.links.changes.subscribe(function (_) { return _this.update(); });\n this.linksWithHrefs.changes.subscribe(function (_) { return _this.update(); });\n this.update();\n };\n Object.defineProperty(RouterLinkActive.prototype, \"routerLinkActive\", {\n set: function (data) {\n var classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(function (c) { return !!c; });\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkActive.prototype.ngOnChanges = function (changes) { this.update(); };\n RouterLinkActive.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterLinkActive.prototype.update = function () {\n var _this = this;\n if (!this.links || !this.linksWithHrefs || !this.router.navigated)\n return;\n Promise.resolve().then(function () {\n var hasActiveLinks = _this.hasActiveLinks();\n if (_this.isActive !== hasActiveLinks) {\n _this.isActive = hasActiveLinks;\n _this.classes.forEach(function (c) {\n if (hasActiveLinks) {\n _this.renderer.addClass(_this.element.nativeElement, c);\n }\n else {\n _this.renderer.removeClass(_this.element.nativeElement, c);\n }\n });\n }\n });\n };\n RouterLinkActive.prototype.isLinkActive = function (router) {\n var _this = this;\n return function (link) {\n return router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact);\n };\n };\n RouterLinkActive.prototype.hasActiveLinks = function () {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n };\n __decorate([\n core.ContentChildren(RouterLink, { descendants: true }),\n __metadata(\"design:type\", core.QueryList)\n ], RouterLinkActive.prototype, \"links\", void 0);\n __decorate([\n core.ContentChildren(RouterLinkWithHref, { descendants: true }),\n __metadata(\"design:type\", core.QueryList)\n ], RouterLinkActive.prototype, \"linksWithHrefs\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkActive.prototype, \"routerLinkActiveOptions\", void 0);\n __decorate([\n core.Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkActive.prototype, \"routerLinkActive\", null);\n RouterLinkActive = __decorate([\n core.Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n }),\n __metadata(\"design:paramtypes\", [Router, core.ElementRef, core.Renderer2,\n core.ChangeDetectorRef])\n ], RouterLinkActive);\n return RouterLinkActive;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\n var OutletContext = /** @class */ (function () {\n function OutletContext() {\n this.outlet = null;\n this.route = null;\n this.resolver = null;\n this.children = new ChildrenOutletContexts();\n this.attachRef = null;\n }\n return OutletContext;\n }());\n /**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\n var ChildrenOutletContexts = /** @class */ (function () {\n function ChildrenOutletContexts() {\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n ChildrenOutletContexts.prototype.onChildOutletCreated = function (childName, outlet) {\n var context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n };\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n ChildrenOutletContexts.prototype.onChildOutletDestroyed = function (childName) {\n var context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n };\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n ChildrenOutletContexts.prototype.onOutletDeactivated = function () {\n var contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n };\n ChildrenOutletContexts.prototype.onOutletReAttached = function (contexts) { this.contexts = contexts; };\n ChildrenOutletContexts.prototype.getOrCreateContext = function (childName) {\n var context = this.getContext(childName);\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n return context;\n };\n ChildrenOutletContexts.prototype.getContext = function (childName) { return this.contexts.get(childName) || null; };\n return ChildrenOutletContexts;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n var RouterOutlet = /** @class */ (function () {\n function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {\n this.parentContexts = parentContexts;\n this.location = location;\n this.resolver = resolver;\n this.changeDetector = changeDetector;\n this.activated = null;\n this._activatedRoute = null;\n this.activateEvents = new core.EventEmitter();\n this.deactivateEvents = new core.EventEmitter();\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n RouterOutlet.prototype.ngOnDestroy = function () { this.parentContexts.onChildOutletDestroyed(this.name); };\n RouterOutlet.prototype.ngOnInit = function () {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n var context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n }\n else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n };\n Object.defineProperty(RouterOutlet.prototype, \"isActivated\", {\n get: function () { return !!this.activated; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"component\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this.activated.instance;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRoute\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this._activatedRoute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRouteData\", {\n get: function () {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n RouterOutlet.prototype.detach = function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n this.location.detach();\n var cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n };\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n RouterOutlet.prototype.attach = function (ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n };\n RouterOutlet.prototype.deactivate = function () {\n if (this.activated) {\n var c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n };\n RouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n var snapshot = activatedRoute._futureSnapshot;\n var component = snapshot.routeConfig.component;\n resolver = resolver || this.resolver;\n var factory = resolver.resolveComponentFactory(component);\n var childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n var injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n };\n __decorate([\n core.Output('activate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"activateEvents\", void 0);\n __decorate([\n core.Output('deactivate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"deactivateEvents\", void 0);\n RouterOutlet = __decorate([\n core.Directive({ selector: 'router-outlet', exportAs: 'outlet' }),\n __param(3, core.Attribute('name')),\n __metadata(\"design:paramtypes\", [ChildrenOutletContexts, core.ViewContainerRef,\n core.ComponentFactoryResolver, String, core.ChangeDetectorRef])\n ], RouterOutlet);\n return RouterOutlet;\n }());\n var OutletInjector = /** @class */ (function () {\n function OutletInjector(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n OutletInjector.prototype.get = function (token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n };\n return OutletInjector;\n }());\n\n /**\n *@license\n *Copyright Google Inc. All Rights Reserved.\n *\n *Use of this source code is governed by an MIT-style license that can be\n *found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\n var PreloadingStrategy = /** @class */ (function () {\n function PreloadingStrategy() {\n }\n return PreloadingStrategy;\n }());\n /**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\n var PreloadAllModules = /** @class */ (function () {\n function PreloadAllModules() {\n }\n PreloadAllModules.prototype.preload = function (route, fn) {\n return fn().pipe(operators.catchError(function () { return rxjs.of(null); }));\n };\n return PreloadAllModules;\n }());\n /**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\n var NoPreloading = /** @class */ (function () {\n function NoPreloading() {\n }\n NoPreloading.prototype.preload = function (route, fn) { return rxjs.of(null); };\n return NoPreloading;\n }());\n /**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n var RouterPreloader = /** @class */ (function () {\n function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n var onStartLoad = function (r) { return router.triggerEvent(new RouteConfigLoadStart(r)); };\n var onEndLoad = function (r) { return router.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n RouterPreloader.prototype.setUpPreloading = function () {\n var _this = this;\n this.subscription =\n this.router.events\n .pipe(operators.filter(function (e) { return e instanceof NavigationEnd; }), operators.concatMap(function () { return _this.preload(); }))\n .subscribe(function () { });\n };\n RouterPreloader.prototype.preload = function () {\n var ngModule = this.injector.get(core.NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n };\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n RouterPreloader.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterPreloader.prototype.processRoutes = function (ngModule, routes) {\n var e_1, _a;\n var res = [];\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var route = routes_1_1.value;\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n var childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n // no config loaded, fetch the config\n }\n else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n // recurse into children\n }\n else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rxjs.from(res).pipe(operators.mergeAll(), operators.map(function (_) { return void 0; }));\n };\n RouterPreloader.prototype.preloadConfig = function (ngModule, route) {\n var _this = this;\n return this.preloadingStrategy.preload(route, function () {\n var loaded$ = _this.loader.load(ngModule.injector, route);\n return loaded$.pipe(operators.mergeMap(function (config) {\n route._loadedConfig = config;\n return _this.processRoutes(config.module, config.routes);\n }));\n });\n };\n RouterPreloader = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [Router, core.NgModuleFactoryLoader, core.Compiler,\n core.Injector, PreloadingStrategy])\n ], RouterPreloader);\n return RouterPreloader;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var RouterScroller = /** @class */ (function () {\n function RouterScroller(router, \n /** @docsNotRequired */ viewportScroller, options) {\n if (options === void 0) { options = {}; }\n this.router = router;\n this.viewportScroller = viewportScroller;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n RouterScroller.prototype.init = function () {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n };\n RouterScroller.prototype.createScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n _this.store[_this.lastId] = _this.viewportScroller.getScrollPosition();\n _this.lastSource = e.navigationTrigger;\n _this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n }\n else if (e instanceof NavigationEnd) {\n _this.lastId = e.id;\n _this.scheduleScrollEvent(e, _this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n };\n RouterScroller.prototype.consumeScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (!(e instanceof Scroll))\n return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (_this.options.scrollPositionRestoration === 'top') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n else if (_this.options.scrollPositionRestoration === 'enabled') {\n _this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n }\n else {\n if (e.anchor && _this.options.anchorScrolling === 'enabled') {\n _this.viewportScroller.scrollToAnchor(e.anchor);\n }\n else if (_this.options.scrollPositionRestoration !== 'disabled') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n };\n RouterScroller.prototype.scheduleScrollEvent = function (routerEvent, anchor) {\n this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n };\n RouterScroller.prototype.ngOnDestroy = function () {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n };\n return RouterScroller;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\n var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n /**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\n var ROUTER_CONFIGURATION = new core.InjectionToken('ROUTER_CONFIGURATION');\n /**\n * @docsNotRequired\n */\n var ROUTER_FORROOT_GUARD = new core.InjectionToken('ROUTER_FORROOT_GUARD');\n var ROUTER_PROVIDERS = [\n common.Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n core.ApplicationRef, UrlSerializer, ChildrenOutletContexts, common.Location, core.Injector,\n core.NgModuleFactoryLoader, core.Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new core.Optional()], [RouteReuseStrategy, new core.Optional()]\n ]\n },\n ChildrenOutletContexts,\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n { provide: core.NgModuleFactoryLoader, useClass: core.SystemJsNgModuleLoader },\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n { provide: ROUTER_CONFIGURATION, useValue: { enableTracing: false } },\n ];\n function routerNgProbeToken() {\n return new core.NgProbeToken('Router', Router);\n }\n /**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n var RouterModule = /** @class */ (function () {\n // Note: We are injecting the Router so it gets created eagerly...\n function RouterModule(guard, router) {\n }\n RouterModule_1 = RouterModule;\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n RouterModule.forRoot = function (routes, config) {\n return {\n ngModule: RouterModule_1,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new core.Optional(), new core.SkipSelf()]]\n },\n { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n {\n provide: common.LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n common.PlatformLocation, [new core.Inject(common.APP_BASE_HREF), new core.Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, common.ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n { provide: core.NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n provideRouterInitializer(),\n ],\n };\n };\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n RouterModule.forChild = function (routes) {\n return { ngModule: RouterModule_1, providers: [provideRoutes(routes)] };\n };\n var RouterModule_1;\n RouterModule = RouterModule_1 = __decorate([\n core.NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n }),\n __param(0, core.Optional()), __param(0, core.Inject(ROUTER_FORROOT_GUARD)), __param(1, core.Optional()),\n __metadata(\"design:paramtypes\", [Object, Router])\n ], RouterModule);\n return RouterModule;\n }());\n function createRouterScroller(router, viewportScroller, config) {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n }\n function provideLocationStrategy(platformLocationStrategy, baseHref, options) {\n if (options === void 0) { options = {}; }\n return options.useHash ? new common.HashLocationStrategy(platformLocationStrategy, baseHref) :\n new common.PathLocationStrategy(platformLocationStrategy, baseHref);\n }\n function provideForRootGuard(router) {\n if (router) {\n throw new Error(\"RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.\");\n }\n return 'guarded';\n }\n /**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\n function provideRoutes(routes) {\n return [\n { provide: core.ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes },\n { provide: ROUTES, multi: true, useValue: routes },\n ];\n }\n function setupRouter(ref, urlSerializer, contexts, location, injector, loader, compiler, config, opts, urlHandlingStrategy, routeReuseStrategy) {\n if (opts === void 0) { opts = {}; }\n var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.enableTracing) {\n var dom_1 = platformBrowser.ɵgetDOM();\n router.events.subscribe(function (e) {\n dom_1.logGroup(\"Router Event: \" + e.constructor.name);\n dom_1.log(e.toString());\n dom_1.log(e);\n dom_1.logGroupEnd();\n });\n }\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n return router;\n }\n function rootRoute(router) {\n return router.routerState.root;\n }\n /**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n var RouterInitializer = /** @class */ (function () {\n function RouterInitializer(injector) {\n this.injector = injector;\n this.initNavigation = false;\n this.resultOfPreactivationDone = new rxjs.Subject();\n }\n RouterInitializer.prototype.appInitializer = function () {\n var _this = this;\n var p = this.injector.get(common.LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(function () {\n var resolve = null;\n var res = new Promise(function (r) { return resolve = r; });\n var router = _this.injector.get(Router);\n var opts = _this.injector.get(ROUTER_CONFIGURATION);\n if (_this.isLegacyDisabled(opts) || _this.isLegacyEnabled(opts)) {\n resolve(true);\n }\n else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n }\n else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = function () {\n // only the initial navigation should be delayed\n if (!_this.initNavigation) {\n _this.initNavigation = true;\n resolve(true);\n return _this.resultOfPreactivationDone;\n // subsequent navigations should not be delayed\n }\n else {\n return rxjs.of(null);\n }\n };\n router.initialNavigation();\n }\n else {\n throw new Error(\"Invalid initialNavigation options: '\" + opts.initialNavigation + \"'\");\n }\n return res;\n });\n };\n RouterInitializer.prototype.bootstrapListener = function (bootstrappedComponentRef) {\n var opts = this.injector.get(ROUTER_CONFIGURATION);\n var preloader = this.injector.get(RouterPreloader);\n var routerScroller = this.injector.get(RouterScroller);\n var router = this.injector.get(Router);\n var ref = this.injector.get(core.ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n }\n else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null);\n this.resultOfPreactivationDone.complete();\n };\n RouterInitializer.prototype.isLegacyEnabled = function (opts) {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n };\n RouterInitializer.prototype.isLegacyDisabled = function (opts) {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n };\n RouterInitializer = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [core.Injector])\n ], RouterInitializer);\n return RouterInitializer;\n }());\n function getAppInitializer(r) {\n return r.appInitializer.bind(r);\n }\n function getBootstrapListener(r) {\n return r.bootstrapListener.bind(r);\n }\n /**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\n var ROUTER_INITIALIZER = new core.InjectionToken('Router Initializer');\n function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: core.APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] },\n { provide: core.APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n ];\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @publicApi\n */\n var VERSION = new core.Version('7.2.8');\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.ɵangular_packages_router_router_a = ROUTER_FORROOT_GUARD;\n exports.ɵangular_packages_router_router_h = RouterInitializer;\n exports.ɵangular_packages_router_router_c = createRouterScroller;\n exports.ɵangular_packages_router_router_i = getAppInitializer;\n exports.ɵangular_packages_router_router_j = getBootstrapListener;\n exports.ɵangular_packages_router_router_e = provideForRootGuard;\n exports.ɵangular_packages_router_router_d = provideLocationStrategy;\n exports.ɵangular_packages_router_router_k = provideRouterInitializer;\n exports.ɵangular_packages_router_router_g = rootRoute;\n exports.ɵangular_packages_router_router_b = routerNgProbeToken;\n exports.ɵangular_packages_router_router_f = setupRouter;\n exports.ɵangular_packages_router_router_n = RouterScroller;\n exports.ɵangular_packages_router_router_l = Tree;\n exports.ɵangular_packages_router_router_m = TreeNode;\n exports.RouterLink = RouterLink;\n exports.RouterLinkWithHref = RouterLinkWithHref;\n exports.RouterLinkActive = RouterLinkActive;\n exports.RouterOutlet = RouterOutlet;\n exports.ActivationEnd = ActivationEnd;\n exports.ActivationStart = ActivationStart;\n exports.ChildActivationEnd = ChildActivationEnd;\n exports.ChildActivationStart = ChildActivationStart;\n exports.GuardsCheckEnd = GuardsCheckEnd;\n exports.GuardsCheckStart = GuardsCheckStart;\n exports.NavigationCancel = NavigationCancel;\n exports.NavigationEnd = NavigationEnd;\n exports.NavigationError = NavigationError;\n exports.NavigationStart = NavigationStart;\n exports.ResolveEnd = ResolveEnd;\n exports.ResolveStart = ResolveStart;\n exports.RouteConfigLoadEnd = RouteConfigLoadEnd;\n exports.RouteConfigLoadStart = RouteConfigLoadStart;\n exports.RouterEvent = RouterEvent;\n exports.RoutesRecognized = RoutesRecognized;\n exports.Scroll = Scroll;\n exports.RouteReuseStrategy = RouteReuseStrategy;\n exports.Router = Router;\n exports.ROUTES = ROUTES;\n exports.ROUTER_CONFIGURATION = ROUTER_CONFIGURATION;\n exports.ROUTER_INITIALIZER = ROUTER_INITIALIZER;\n exports.RouterModule = RouterModule;\n exports.provideRoutes = provideRoutes;\n exports.ChildrenOutletContexts = ChildrenOutletContexts;\n exports.OutletContext = OutletContext;\n exports.NoPreloading = NoPreloading;\n exports.PreloadAllModules = PreloadAllModules;\n exports.PreloadingStrategy = PreloadingStrategy;\n exports.RouterPreloader = RouterPreloader;\n exports.ActivatedRoute = ActivatedRoute;\n exports.ActivatedRouteSnapshot = ActivatedRouteSnapshot;\n exports.RouterState = RouterState;\n exports.RouterStateSnapshot = RouterStateSnapshot;\n exports.PRIMARY_OUTLET = PRIMARY_OUTLET;\n exports.convertToParamMap = convertToParamMap;\n exports.UrlHandlingStrategy = UrlHandlingStrategy;\n exports.DefaultUrlSerializer = DefaultUrlSerializer;\n exports.UrlSegment = UrlSegment;\n exports.UrlSegmentGroup = UrlSegmentGroup;\n exports.UrlSerializer = UrlSerializer;\n exports.UrlTree = UrlTree;\n exports.VERSION = VERSION;\n exports.ɵEmptyOutletComponent = EmptyOutletComponent;\n exports.ɵROUTER_PROVIDERS = ROUTER_PROVIDERS;\n exports.ɵflatten = flatten;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=router.umd.js.map\n"]}
\ No newline at end of file

bundles/router-upgrade.umd.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

bundles/router-upgrade.umd.min.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

bundles/router-upgrade.umd.min.js.map

@@ -1 +1 @@
-{"version":3,"sources":["packages/router/router-upgrade.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","upgrade","common","core","static","this","_static","anchor","locationSyncBootstrapListener","ngUpgrade","setUpLocationSync","$injector","Error","router$$1","injector","get","Router","location","Location","$on","_","next","__","url","resolveUrl","document","createElement","setAttribute","href","pathname","replace","search","hash","path","normalize","navigateByUrl","RouterUpgradeInitializer","provide","APP_BOOTSTRAP_LISTENER","multi","useFactory","deps","UpgradeModule","Object","defineProperty","value"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,4BACxJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,2BAA4B,UAAW,kBAAmB,gBAAiB,kBAAmB,2BAA4BJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,OAAUR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,WAAcT,EAAOQ,GAAGC,OAAOC,YAAeV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,OAAQT,EAAOQ,GAAGE,QAAQG,QAHrN,CAIEC,KAAM,SAAUZ,EAASS,EAAQC,EAAMH,EAAQM,GAAW;;;;;;;OAgCxD,IAqDIC,EA5CJ,SAASC,EAA8BC,GACnC,OAAO,WAAcC,EAAkBD,IAY3C,SAASC,EAAkBD,GACvB,IAAKA,EAAUE,UACX,MAAM,IAAIC,MAAM,iNAEpB,IAAIC,EAAYJ,EAAUK,SAASC,IAAIf,EAAOgB,QAC1CC,EAAWR,EAAUK,SAASC,IAAIb,EAAOgB,UAC7CT,EAAUE,UAAUI,IAAI,cACnBI,IAAI,uBAAwB,SAAUC,EAAGC,EAAMC,GAChD,IAAIC,EAwBZ,SAASC,EAAWD,GAMhB,OALKhB,IACDA,EAASkB,SAASC,cAAc,MAEpCnB,EAAOoB,aAAa,OAAQJ,GAC5BhB,EAAOoB,aAAa,OAAQpB,EAAOqB,OAG/BC,SAAU,IAAMtB,EAAOsB,SAASC,QAAQ,MAAO,IAC/CC,OAAQxB,EAAOwB,OACfC,KAAMzB,EAAOyB;;;;;;;;;;;;;;OAlCHR,CAAWH,GACjBY,EAAOhB,EAASiB,UAAUX,EAAIM,UAClChB,EAAUsB,cAAcF,EAAOV,EAAIQ,OAASR,EAAIS,QAyDxDvC,EAAQ2C,0BAxFJC,QAASlC,EAAKmC,uBACdC,OAAO,EACPC,WAAYhC,EACZiC,MAAOnC,EAAQoC,gBAsFnBjD,EAAQe,8BAAgCA,EACxCf,EAAQiB,kBAAoBA,EAE5BiC,OAAOC,eAAenD,EAAS,cAAgBoD,OAAO","sourcesContent":["/**\n * @license Angular v7.2.7\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :\n typeof define === 'function' && define.amd ? define('@angular/router/upgrade', ['exports', '@angular/common', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.upgrade = {}), global.ng.common, global.ng.core, global.ng.router, global.ng.upgrade.static));\n}(this, function (exports, common, core, router, _static) { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\n var RouterUpgradeInitializer = {\n provide: core.APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener,\n deps: [_static.UpgradeModule]\n };\n /**\n * @internal\n */\n function locationSyncBootstrapListener(ngUpgrade) {\n return function () { setUpLocationSync(ngUpgrade); };\n }\n /**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\n function setUpLocationSync(ngUpgrade) {\n if (!ngUpgrade.$injector) {\n throw new Error(\"\\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\\n \");\n }\n var router$$1 = ngUpgrade.injector.get(router.Router);\n var location = ngUpgrade.injector.get(common.Location);\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', function (_, next, __) {\n var url = resolveUrl(next);\n var path = location.normalize(url.pathname);\n router$$1.navigateByUrl(path + url.search + url.hash);\n });\n }\n /**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\n var anchor;\n function resolveUrl(url) {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: \"/\" + anchor.pathname.replace(/^\\//, ''),\n search: anchor.search,\n hash: anchor.hash\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterUpgradeInitializer = RouterUpgradeInitializer;\n exports.locationSyncBootstrapListener = locationSyncBootstrapListener;\n exports.setUpLocationSync = setUpLocationSync;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=router-upgrade.umd.js.map\n"]}
\ No newline at end of file
+{"version":3,"sources":["packages/router/router-upgrade.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","router","upgrade","common","core","static","this","_static","anchor","locationSyncBootstrapListener","ngUpgrade","setUpLocationSync","$injector","Error","router$$1","injector","get","Router","location","Location","$on","_","next","__","url","resolveUrl","document","createElement","setAttribute","href","pathname","replace","search","hash","path","normalize","navigateByUrl","RouterUpgradeInitializer","provide","APP_BOOTSTRAP_LISTENER","multi","useFactory","deps","UpgradeModule","Object","defineProperty","value"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,4BACxJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,2BAA4B,UAAW,kBAAmB,gBAAiB,kBAAmB,2BAA4BJ,GACpJA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,OAAUR,EAAOQ,GAAGC,OAAST,EAAOQ,GAAGC,WAAcT,EAAOQ,GAAGC,OAAOC,YAAeV,EAAOQ,GAAGG,OAAQX,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,OAAQT,EAAOQ,GAAGE,QAAQG,QAHrN,CAIEC,KAAM,SAAUZ,EAASS,EAAQC,EAAMH,EAAQM,GAAW;;;;;;;OAgCxD,IAqDIC,EA5CJ,SAASC,EAA8BC,GACnC,OAAO,WAAcC,EAAkBD,IAY3C,SAASC,EAAkBD,GACvB,IAAKA,EAAUE,UACX,MAAM,IAAIC,MAAM,iNAEpB,IAAIC,EAAYJ,EAAUK,SAASC,IAAIf,EAAOgB,QAC1CC,EAAWR,EAAUK,SAASC,IAAIb,EAAOgB,UAC7CT,EAAUE,UAAUI,IAAI,cACnBI,IAAI,uBAAwB,SAAUC,EAAGC,EAAMC,GAChD,IAAIC,EAwBZ,SAASC,EAAWD,GAMhB,OALKhB,IACDA,EAASkB,SAASC,cAAc,MAEpCnB,EAAOoB,aAAa,OAAQJ,GAC5BhB,EAAOoB,aAAa,OAAQpB,EAAOqB,OAG/BC,SAAU,IAAMtB,EAAOsB,SAASC,QAAQ,MAAO,IAC/CC,OAAQxB,EAAOwB,OACfC,KAAMzB,EAAOyB;;;;;;;;;;;;;;OAlCHR,CAAWH,GACjBY,EAAOhB,EAASiB,UAAUX,EAAIM,UAClChB,EAAUsB,cAAcF,EAAOV,EAAIQ,OAASR,EAAIS,QAyDxDvC,EAAQ2C,0BAxFJC,QAASlC,EAAKmC,uBACdC,OAAO,EACPC,WAAYhC,EACZiC,MAAOnC,EAAQoC,gBAsFnBjD,EAAQe,8BAAgCA,EACxCf,EAAQiB,kBAAoBA,EAE5BiC,OAAOC,eAAenD,EAAS,cAAgBoD,OAAO","sourcesContent":["/**\n * @license Angular v7.2.8\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :\n typeof define === 'function' && define.amd ? define('@angular/router/upgrade', ['exports', '@angular/common', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.upgrade = {}), global.ng.common, global.ng.core, global.ng.router, global.ng.upgrade.static));\n}(this, function (exports, common, core, router, _static) { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\n var RouterUpgradeInitializer = {\n provide: core.APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener,\n deps: [_static.UpgradeModule]\n };\n /**\n * @internal\n */\n function locationSyncBootstrapListener(ngUpgrade) {\n return function () { setUpLocationSync(ngUpgrade); };\n }\n /**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\n function setUpLocationSync(ngUpgrade) {\n if (!ngUpgrade.$injector) {\n throw new Error(\"\\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\\n \");\n }\n var router$$1 = ngUpgrade.injector.get(router.Router);\n var location = ngUpgrade.injector.get(common.Location);\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', function (_, next, __) {\n var url = resolveUrl(next);\n var path = location.normalize(url.pathname);\n router$$1.navigateByUrl(path + url.search + url.hash);\n });\n }\n /**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\n var anchor;\n function resolveUrl(url) {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: \"/\" + anchor.pathname.replace(/^\\//, ''),\n search: anchor.search,\n hash: anchor.hash\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterUpgradeInitializer = RouterUpgradeInitializer;\n exports.locationSyncBootstrapListener = locationSyncBootstrapListener;\n exports.setUpLocationSync = setUpLocationSync;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=router-upgrade.umd.js.map\n"]}
\ No newline at end of file

esm2015/src/interfaces.js

@@ -43,7 +43,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canActivate: [CanActivateTeam]
* }
* ])
@@ -61,7 +61,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canActivate: ['canActivateTeam']
* }
* ])
@@ -126,7 +126,7 @@
* children: [
* {
* path: 'team/:id',
- * component: Team
+ * component: TeamComponent
* }
* ]
* }
@@ -149,7 +149,7 @@
* children: [
* {
* path: 'team/:id',
- * component: Team
+ * component: TeamComponent
* }
* ]
* }
@@ -213,7 +213,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canDeactivate: [CanDeactivateTeam]
* }
* ])
@@ -231,7 +231,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canDeactivate: ['canDeactivateTeam']
* }
* ])
@@ -291,7 +291,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* resolve: {
* team: TeamResolver
* }
@@ -311,7 +311,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* resolve: {
* team: 'teamResolver'
* }
@@ -368,7 +368,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* loadChildren: 'team.js',
* canLoad: [CanLoadTeamSection]
* }
@@ -387,7 +387,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* loadChildren: 'team.js',
* canLoad: ['canLoadTeamSection']
* }
@@ -415,4 +415,4 @@
*/
CanLoad.prototype.canLoad = function (route, segments) { };
}
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3JvdXRlci9zcmMvaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFvRkEsaUNBR0M7Ozs7Ozs7SUFGQyxnRUFDeUU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFxRjNFLHNDQUdDOzs7Ozs7O0lBRkMsK0VBQ3lFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBOEUzRSxtQ0FLQzs7Ozs7Ozs7O0lBSkMsd0dBR2E7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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bGVhbj58UHJvbWlzZTxib29sZWFuPnxib29sZWFuO1xufVxuXG5leHBvcnQgdHlwZSBDYW5Mb2FkRm4gPSAocm91dGU6IFJvdXRlLCBzZWdtZW50czogVXJsU2VnbWVudFtdKSA9PlxuICAgIE9ic2VydmFibGU8Ym9vbGVhbj58IFByb21pc2U8Ym9vbGVhbj58IGJvb2xlYW47XG4iXX0=
\ No newline at end of file

esm2015/src/router_config_loader.js

@@ -10,7 +10,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { InjectionToken, NgModuleFactory } from '@angular/core';
-// TODO(i): switch to fromPromise once it's expored in rxjs
import { from, of } from 'rxjs';
import { map, mergeMap } from 'rxjs/operators';
import { LoadedRouterConfig, standardizeConfig } from './config';
@@ -97,4 +96,4 @@
*/
RouterConfigLoader.prototype.onLoadEndListener;
}
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2NvbmZpZ19sb2FkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9yb3V0ZXIvc3JjL3JvdXRlcl9jb25maWdfbG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBUUEsT0FBTyxFQUFXLGNBQWMsRUFBWSxlQUFlLEVBQXdCLE1BQU0sZUFBZSxDQUFDOztBQUV6RyxPQUFPLEVBQWEsSUFBSSxFQUFFLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzQyxPQUFPLEVBQUMsR0FBRyxFQUFFLFFBQVEsRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBZSxrQkFBa0IsRUFBUyxpQkFBaUIsRUFBQyxNQUFNLFVBQVUsQ0FBQztBQUNwRixPQUFPLEVBQUMsT0FBTyxFQUFFLGtCQUFrQixFQUFDLE1BQU0sb0JBQW9CLENBQUM7Ozs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pcGUobWFwKChmYWN0b3J5OiBOZ01vZHVsZUZhY3Rvcnk8YW55PikgPT4ge1xuICAgICAgaWYgKHRoaXMub25Mb2FkRW5kTGlzdGVuZXIpIHtcbiAgICAgICAgdGhpcy5vbkxvYWRFbmRMaXN0ZW5lcihyb3V0ZSk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IG1vZHVsZSA9IGZhY3RvcnkuY3JlYXRlKHBhcmVudEluamVjdG9yKTtcblxuICAgICAgcmV0dXJuIG5ldyBMb2FkZWRSb3V0ZXJDb25maWcoXG4gICAgICAgICAgZmxhdHRlbihtb2R1bGUuaW5qZWN0b3IuZ2V0KFJPVVRFUykpLm1hcChzdGFuZGFyZGl6ZUNvbmZpZyksIG1vZHVsZSk7XG4gICAgfSkpO1xuICB9XG5cbiAgcHJpdmF0ZSBsb2FkTW9kdWxlRmFjdG9yeShsb2FkQ2hpbGRyZW46IExvYWRDaGlsZHJlbik6IE9ic2VydmFibGU8TmdNb2R1bGVGYWN0b3J5PGFueT4+IHtcbiAgICBpZiAodHlwZW9mIGxvYWRDaGlsZHJlbiA9PT0gJ3N0cmluZycpIHtcbiAgICAgIHJldHVybiBmcm9tKHRoaXMubG9hZGVyLmxvYWQobG9hZENoaWxkcmVuKSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiB3cmFwSW50b09ic2VydmFibGUobG9hZENoaWxkcmVuKCkpLnBpcGUobWVyZ2VNYXAoKHQ6IGFueSkgPT4ge1xuICAgICAgICBpZiAodCBpbnN0YW5jZW9mIE5nTW9kdWxlRmFjdG9yeSkge1xuICAgICAgICAgIHJldHVybiBvZiAodCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIGZyb20odGhpcy5jb21waWxlci5jb21waWxlTW9kdWxlQXN5bmModCkpO1xuICAgICAgICB9XG4gICAgICB9KSk7XG4gICAgfVxuICB9XG59XG4iXX0=
\ No newline at end of file

esm2015/src/version.js

@@ -19,5 +19,5 @@
* \@publicApi
* @type {?}
*/
-export const VERSION = new Version('7.2.7');
+export const VERSION = new Version('7.2.8');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3JvdXRlci9zcmMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBY0EsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLGVBQWUsQ0FBQzs7Ozs7QUFLdEMsTUFBTSxPQUFPLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuLyoqXG4gKiBAbW9kdWxlXG4gKiBAZGVzY3JpcHRpb25cbiAqIEVudHJ5IHBvaW50IGZvciBhbGwgcHVibGljIEFQSXMgb2YgdGhlIGNvbW1vbiBwYWNrYWdlLlxuICovXG5cbmltcG9ydCB7VmVyc2lvbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbi8qKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgY29uc3QgVkVSU0lPTiA9IG5ldyBWZXJzaW9uKCcwLjAuMC1QTEFDRUhPTERFUicpO1xuIl19
\ No newline at end of file

esm5/src/interfaces.js

@@ -5,4 +5,4 @@
* 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
*/
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3JvdXRlci9zcmMvaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUciLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbmltcG9ydCB7T2JzZXJ2YWJsZX0gZnJvbSAncnhqcyc7XG5cbmltcG9ydCB7Um91dGV9IGZyb20gJy4vY29uZmlnJztcbmltcG9ydCB7QWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgUm91dGVyU3RhdGVTbmFwc2hvdH0gZnJvbSAnLi9yb3V0ZXJfc3RhdGUnO1xuaW1wb3J0IHtVcmxTZWdtZW50LCBVcmxUcmVlfSBmcm9tICcuL3VybF90cmVlJztcblxuXG4vKipcbiAqIEBkZXNjcmlwdGlvblxuICpcbiAqIEludGVyZmFjZSB0aGF0IGEgY2xhc3MgY2FuIGltcGxlbWVudCB0byBiZSBhIGd1YXJkIGRlY2lkaW5nIGlmIGEgcm91dGUgY2FuIGJlIGFjdGl2YXRlZC5cbiAqIElmIGFsbCBndWFyZHMgcmV0dXJuIGB0cnV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KiAgICAgICAgIGxvYWRDaGlsZHJlbjogJ3RlYW0uanMnLFxuICogICAgICAgICBjYW5Mb2FkOiBbJ2NhbkxvYWRUZWFtU2VjdGlvbiddXG4gKiAgICAgICB9XG4gKiAgICAgXSlcbiAqICAgXSxcbiAqICAgcHJvdmlkZXJzOiBbXG4gKiAgICAge1xuICogICAgICAgcHJvdmlkZTogJ2NhbkxvYWRUZWFtU2VjdGlvbicsXG4gKiAgICAgICB1c2VWYWx1ZTogKHJvdXRlOiBSb3V0ZSwgc2VnbWVudHM6IFVybFNlZ21lbnRbXSkgPT4gdHJ1ZVxuICogICAgIH1cbiAqICAgXVxuICogfSlcbiAqIGNsYXNzIEFwcE1vZHVsZSB7fVxuICogYGBgXG4gKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkxvYWQge1xuICBjYW5Mb2FkKHJvdXRlOiBSb3V0ZSwgc2VnbWVudHM6IFVybFNlZ21lbnRbXSk6IE9ic2VydmFibGU8Ym9vbGVhbj58UHJvbWlzZTxib29sZWFuPnxib29sZWFuO1xufVxuXG5leHBvcnQgdHlwZSBDYW5Mb2FkRm4gPSAocm91dGU6IFJvdXRlLCBzZWdtZW50czogVXJsU2VnbWVudFtdKSA9PlxuICAgIE9ic2VydmFibGU8Ym9vbGVhbj58IFByb21pc2U8Ym9vbGVhbj58IGJvb2xlYW47XG4iXX0=
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3JvdXRlci9zcmMvaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUciLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb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ydWN0b3IocHJpdmF0ZSBwZXJtaXNzaW9uczogUGVybWlzc2lvbnMsIHByaXZhdGUgY3VycmVudFVzZXI6IFVzZXJUb2tlbikge31cbiAqXG4gKiAgIGNhbkFjdGl2YXRlQ2hpbGQoXG4gKiAgICAgcm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QsXG4gKiAgICAgc3RhdGU6IFJvdXRlclN0YXRlU25hcHNob3RcbiAqICAgKTogT2JzZXJ2YWJsZTxib29sZWFufFVybFRyZWU+fFByb21pc2U8Ym9vbGVhbnxVcmxUcmVlPnxib29sZWFufFVybFRyZWUge1xuICogICAgIHJldHVybiB0aGlzLnBlcm1pc3Npb25zLmNhbkFjdGl2YXRlKHRoaXMuY3VycmVudFVzZXIsIHJvdXRlLnBhcmFtcy5pZCk7XG4gKiAgIH1cbiAqIH1cbiAqXG4gKiBATmdNb2R1bGUoe1xuICogICBpbXBvcnRzOiBbXG4gKiAgICAgUm91dGVyTW9kdWxlLmZvclJvb3QoW1xuICogICAgICAge1xuICogICAgICAgICBwYXRoOiAncm9vdCcsXG4gKiAgICAgICAgIGNhbkFjdGl2YXRlQ2hpbGQ6IFtDYW5BY3RpdmF0ZVRlYW1dLFxuICogICAgICAgICBjaGlsZHJlbjogW1xuICogICAgICAgICAgIHtcbiAqICAgICAgICAgICAgICBwYXRoOiAndGVhbS86aWQnLFxuICogICAgICAgICAgICAgIGNvbXBvbmVudDogVGVhbUNvbXBvbmVudFxuICogICAgICAgICAgIH1cbiAqICAgICAgICAgXVxuICogICAgICAgfVxuICogICAgIF0pXG4gKiAgIF0sXG4gKiAgIHByb3ZpZGVyczogW0NhbkFjdGl2YXRlVGVhbSwgVXNlclRva2VuLCBQZXJtaXNzaW9uc11cbiAqIH0pXG4gKiBjbGFzcyBBcHBNb2R1bGUge31cbiAqIGBgYFxuICpcbiAqIFlvdSBjYW4gYWx0ZXJuYXRpdmVseSBwcm92aWRlIGEgZnVuY3Rpb24gd2l0aCB0aGUgYGNhbkF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uICpcbiAqIEBOZ01vZHVsZSh7XG4gKiAgIGltcG9ydHM6IFtcbiAqICAgICBSb3V0ZXJNb2R1bGUuZm9yUm9vdChbXG4gKiAgICAgICB7XG4gKiAgICAgICAgIHBhdGg6ICd0ZWFtLzppZCcsXG4gKiAgICAgICAgIGNvbXBvbmVudDogVGVhbUNvbXBvbmVudCxcbiAqICAgICAgICAgcmVzb2x2ZToge1xuICogICAgICAgICAgIHRlYW06IFRlYW1SZXNvbHZlclxuICogICAgICAgICB9XG4gKiAgICAgICB9XG4gKiAgICAgXSlcbiAqICAgXSxcbiAqICAgcHJvdmlkZXJzOiBbVGVhbVJlc29sdmVyXVxuICogfSlcbiAqIGNsYXNzIEFwcE1vZHVsZSB7fVxuICogYGBgXG4gKlxuICogWW91IGNhbiBhbHRlcm5hdGl2ZWx5IHByb3ZpZGUgYSBmdW5jdGlvbiB3aXRoIHRoZSBgcmVzb2x2ZWAgc2lnbmF0dXJlOlxuICpcbiAqIGBgYFxuICogQE5nTW9kdWxlKHtcbiAqICAgaW1wb3J0czogW1xuICogICAgIFJvdXRlck1vZHVsZS5mb3JSb290KFtcbiAqICAgICAgIHtcbiAqICAgICAgICAgcGF0aDogJ3RlYW0vOmlkJyxcbiAqICAgICAgICAgY29tcG9uZW50OiBUZWFtQ29tcG9uZW50LFxuICogICAgICAgICByZXNvbHZlOiB7XG4gKiAgICAgICAgICAgdGVhbTogJ3RlYW1SZXNvbHZlcidcbiAqICAgICAgICAgfVxuICogICAgICAgfVxuICogICAgIF0pXG4gKiAgIF0sXG4gKiAgIHByb3ZpZGVyczogW1xuICogICAgIHtcbiAqICAgICAgIHByb3ZpZGU6ICd0ZWFtUmVzb2x2ZXInLFxuICogICAgICAgdXNlVmFsdWU6IChyb3V0ZTogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgc3RhdGU6IFJvdXRlclN0YXRlU25hcHNob3QpID0+ICd0ZWFtJ1xuICogICAgIH1cbiAqICAgXVxuICogfSlcbiAqIGNsYX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VnbWVudHM6IFVybFNlZ21lbnRbXSkgPT4gdHJ1ZVxuICogICAgIH1cbiAqICAgXVxuICogfSlcbiAqIGNsYXNzIEFwcE1vZHVsZSB7fVxuICogYGBgXG4gKlxuICogQHB1YmxpY0FwaVxuICovXG5leHBvcnQgaW50ZXJmYWNlIENhbkxvYWQge1xuICBjYW5Mb2FkKHJvdXRlOiBSb3V0ZSwgc2VnbWVudHM6IFVybFNlZ21lbnRbXSk6IE9ic2VydmFibGU8Ym9vbGVhbj58UHJvbWlzZTxib29sZWFuPnxib29sZWFuO1xufVxuXG5leHBvcnQgdHlwZSBDYW5Mb2FkRm4gPSAocm91dGU6IFJvdXRlLCBzZWdtZW50czogVXJsU2VnbWVudFtdKSA9PlxuICAgIE9ic2VydmFibGU8Ym9vbGVhbj58IFByb21pc2U8Ym9vbGVhbj58IGJvb2xlYW47XG4iXX0=
\ No newline at end of file

esm5/src/router_config_loader.js

@@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
import { InjectionToken, NgModuleFactory } from '@angular/core';
-// TODO(i): switch to fromPromise once it's expored in rxjs
import { from, of } from 'rxjs';
import { map, mergeMap } from 'rxjs/operators';
import { LoadedRouterConfig, standardizeConfig } from './config';
@@ -56,4 +55,4 @@
return RouterConfigLoader;
}());
export { RouterConfigLoader };
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2NvbmZpZ19sb2FkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9yb3V0ZXIvc3JjL3JvdXRlcl9jb25maWdfbG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBVyxjQUFjLEVBQVksZUFBZSxFQUF3QixNQUFNLGVBQWUsQ0FBQztBQUN6RywyREFBMkQ7QUFDM0Q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iAodHlwZW9mIGxvYWRDaGlsZHJlbiA9PT0gJ3N0cmluZycpIHtcbiAgICAgIHJldHVybiBmcm9tKHRoaXMubG9hZGVyLmxvYWQobG9hZENoaWxkcmVuKSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiB3cmFwSW50b09ic2VydmFibGUobG9hZENoaWxkcmVuKCkpLnBpcGUobWVyZ2VNYXAoKHQ6IGFueSkgPT4ge1xuICAgICAgICBpZiAodCBpbnN0YW5jZW9mIE5nTW9kdWxlRmFjdG9yeSkge1xuICAgICAgICAgIHJldHVybiBvZiAodCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIGZyb20odGhpcy5jb21waWxlci5jb21waWxlTW9kdWxlQXN5bmModCkpO1xuICAgICAgICB9XG4gICAgICB9KSk7XG4gICAgfVxuICB9XG59XG4iXX0=
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX2NvbmZpZ19sb2FkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9yb3V0ZXIvc3JjL3JvdXRlcl9jb25maWdfbG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBVyxjQUFjLEVBQVksZUFBZSxFQUF3QixNQUFNLGVBQWUsQ0FBQztBQUN6RyxPQUFPLEVBQWEsSUFBSSxFQUFFLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzQyxPQUFPLEVBQUMsR0FBRyxFQUFFLFFBQVEsRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBZSxrQkFBa0IsRUFBUyxpQkFBaUIsRUFBQyxNQUFNLFVBQVUsQ0FBQztBQUNwRixPQUFPLEVBQUMsT0FBTyxFQU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O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiBmcm9tKHRoaXMuY29tcGlsZXIuY29tcGlsZU1vZHVsZUFzeW5jKHQpKTtcbiAgICAgICAgfVxuICAgICAgfSkpO1xuICAgIH1cbiAgfVxufVxuIl19
\ No newline at end of file

esm5/src/version.js

@@ -14,5 +14,5 @@
/**
* @publicApi
*/
-export var VERSION = new Version('7.2.7');
+export var VERSION = new Version('7.2.8');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3JvdXRlci9zcmMvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSDs7OztHQUlHO0FBRUgsT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUV0Qzs7R0FFRztBQUNILE1BQU0sQ0FBQyxJQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG4vKipcbiAqIEBtb2R1bGVcbiAqIEBkZXNjcmlwdGlvblxuICogRW50cnkgcG9pbnQgZm9yIGFsbCBwdWJsaWMgQVBJcyBvZiB0aGUgY29tbW9uIHBhY2thZ2UuXG4gKi9cblxuaW1wb3J0IHtWZXJzaW9ufSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuLyoqXG4gKiBAcHVibGljQXBpXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gbmV3IFZlcnNpb24oJzAuMC4wLVBMQUNFSE9MREVSJyk7XG4iXX0=
\ No newline at end of file

fesm2015/router.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@@ -7277,7 +7277,7 @@
* \@publicApi
* @type {?}
*/
-const VERSION = new Version('7.2.7');
+const VERSION = new Version('7.2.8');
/**
* @fileoverview added by tsickle

fesm2015/router.js.map

@@ -1 +1 @@
-{"version":3,"file":"router.js","sources":["../src/events.ts","../src/components/empty_outlet.ts","../src/shared.ts","../src/config.ts","../src/utils/collection.ts","../src/url_tree.ts","../src/utils/tree.ts","../src/router_state.ts","../src/create_router_state.ts","../src/create_url_tree.ts","../src/operators/activate_routes.ts","../src/utils/type_guards.ts","../src/apply_redirects.ts","../src/operators/apply_redirects.ts","../src/utils/preactivation.ts","../src/operators/prioritized_guard_value.ts","../src/operators/check_guards.ts","../src/recognize.ts","../src/operators/recognize.ts","../src/operators/resolve_data.ts","../src/operators/switch_tap.ts","../src/route_reuse_strategy.ts","../src/router_config_loader.ts","../src/url_handling_strategy.ts","../src/router.ts","../src/directives/router_link.ts","../src/directives/router_link_active.ts","../src/router_outlet_context.ts","../src/directives/router_outlet.ts","../src/router_preloader.ts","../src/router_scroller.ts","../src/router_module.ts","../src/version.ts","../router.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * @description\n *\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** @docsNotRequired */\n public id: number,\n /** @docsNotRequired */\n public url: string) {}\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n /**\n * This reflects the state object that was previously supplied to the pushState call. This is\n * not null only when the navigation is triggered by a popstate event.\n *\n * The router assigns a navigationId to every router transition/navigation. Even when the user\n * clicks on the back button in the browser, a new navigation id will be created. So from\n * the perspective of the router, the router never \"goes back\". By using the `restoredState`\n * and its navigationId, you can implement behavior that differentiates between creating new\n * states\n * and popstate events. In the latter case you can restore some remembered state (e.g., scroll\n * position).\n *\n * See {@link NavigationExtras} for more information.\n */\n restoredState?: {[k: string]: any, navigationId: number}|null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any, navigationId: number}|null = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public reason: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\nexport class Scroll {\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd,\n\n /** @docsNotRequired */\n readonly position: [number, number]|null,\n\n /** @docsNotRequired */\n readonly anchor: string|null) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a router event, allowing you to track the lifecycle of the router.\n *\n * The sequence of router events is:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class EmptyOutletComponent {\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of parameters.\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any\n};\n\n/**\n * Matrix and Query parameters.\n *\n * `ParamMap` makes it easier to work with parameters as they could have either a single value or\n * multiple value. Because this should be known by the user, calling `get` or `getAll` returns the\n * correct type (either `string` or `string[]`).\n *\n * The API is inspired by the URLSearchParams interface.\n * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n *\n * @publicApi\n */\nexport interface ParamMap {\n has(name: string): boolean;\n /**\n * Return a single value for the given parameter name:\n * - the value when the parameter has a single value,\n * - the first value if the parameter has multiple values,\n * - `null` when there is no such parameter.\n */\n get(name: string): string|null;\n /**\n * Return an array of values for the given parameter name.\n *\n * If there is no such parameter, an empty array is returned.\n */\n getAll(name: string): string[];\n\n /** Name of the parameters */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) { this.params = params || {}; }\n\n has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n get(name: string): string|null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n const error = Error('NavigationCancelingError: ' + message);\n (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n const parts = route.path !.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Represents router configuration.\n *\n * `Routes` is an array of route configurations. Each one has the following properties:\n *\n * - `path` is a string that uses the route matcher DSL.\n * - `pathMatch` is a string that specifies the matching strategy. Options are `prefix` (default)\n * and `full`. See [Matching Strategy](#matching-strategy) below for more information.\n * - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.\n * - `component` is a component type.\n * - `redirectTo` is the url fragment which will replace the current matched segment.\n * - `outlet` is the name of the outlet the component should be placed into.\n * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See\n * `CanActivate` for more info.\n * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See\n * `CanActivateChild` for more info.\n * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See\n * `CanDeactivate` for more info.\n * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See\n * `CanLoad` for more info.\n * - `data` is additional data provided to the component via `ActivatedRoute`.\n * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more\n * info.\n * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only\n * when the matrix parameters of the route change. Options include:\n * - `paramsChange` (default) - Run guards and resolvers when path or matrix params change. This\n * mode ignores query param changes.\n * - `paramsOrQueryParamsChange` - Guards and resolvers will run when any parameters change. This\n * includes path, matrix, and query params.\n * - `pathParamsChange` - Run guards and resolvers path or any path params change. This mode is\n * useful if you want to ignore changes to all optional parameters such as query *and* matrix\n * params.\n * - `pathParamsOrQueryParamsChange` - Same as `pathParamsChange`, but also rerun when any query\n * param changes\n * - `always` - Run guards and resolvers on every navigation.\n * - (from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean - Use a predicate\n * function when none of the pre-configured modes fit the needs of the application. An example\n * might be when you need to ignore updates to a param such as `sortDirection`, but need to\n * reload guards and resolvers when changing the `searchRoot` param.\n * - `children` is an array of child route definitions.\n * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more\n * info.\n *\n * @usageNotes\n * ### Simple Configuration\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/bob`, the router will create the team component with the user\n * component in it.\n *\n * ### Multiple Outlets\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * When navigating to `/team/11(aux:chat/jim)`, the router will create the team component next to\n * the chat component. The chat component will be placed into the aux outlet.\n *\n * ### Wild Cards\n *\n * ```\n * [{\n * path: '**',\n * component: Sink\n * }]\n * ```\n *\n * Regardless of where you navigate to, the router will instantiate the sink component.\n *\n * ### Redirects\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to '/team/11/legacy/user/jim', the router will change the url to\n * '/team/11/user/jim', and then will instantiate the team component with the user component\n * in it.\n *\n * If the `redirectTo` value starts with a '/', then it is an absolute redirect. E.g., if in the\n * example above we change the `redirectTo` to `/user/:name`, the result url will be '/user/jim'.\n *\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any url segments. Let's look at the following configuration:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11`, the router will instantiate the AllUsers component.\n *\n * Empty-path routes can have children.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/jim`, the router will instantiate the wrapper component with\n * the user component in it.\n *\n * An empty path route inherits its parent's params and data. This is because it cannot have its\n * own params, and, as a result, it often uses its parent's params and data as its own.\n *\n * ### Matching Strategy\n *\n * By default the router will look at what is left in the url, and check if it starts with\n * the specified path (e.g., `/team/11/user` starts with `team/:id`).\n *\n * We can change the matching strategy to make sure that the path covers the whole unconsumed url,\n * which is akin to `unconsumedUrl === path` or `$` regular expressions.\n *\n * This is particularly important when redirecting empty-path routes.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * Since an empty path is a prefix of any url, even when navigating to '/main', the router will\n * still apply the redirect.\n *\n * If `pathMatch: full` is provided, the router will apply the redirect if and only if navigating to\n * '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * It is useful at times to have the ability to share parameters between sibling components.\n *\n * Say we have two components--ChildCmp and AuxCmp--that we want to put next to each other and both\n * of them require some id parameter.\n *\n * One way to do that would be to have a bogus parent component, so both the siblings can get the id\n * parameter from it. This is not ideal. Instead, you can use a componentless route.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * So when navigating to `parent/10/(a//aux:b)`, the route will instantiate the main child and aux\n * child components next to each other. In this example, the application component\n * has to have the primary and aux outlets defined.\n *\n * The router will also merge the `params`, `data`, and `resolve` of the componentless parent into\n * the `params`, `data`, and `resolve` of the children. This is done because there is no component\n * that can inject the activated route of the componentless parent.\n *\n * This is especially useful when child components are defined as follows:\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * With this configuration in place, navigating to '/parent/10' will create the main child and aux\n * components.\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up our application load time by splitting it into multiple bundles, and\n * loading them on demand. The router is designed to make lazy loading simple and easy. Instead of\n * providing the children property, you can provide the `loadChildren` property, as follows:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * loadChildren: 'team'\n * }]\n * ```\n *\n * The router will use registered NgModuleFactoryLoader to fetch an NgModule associated with 'team'.\n * Then it will extract the set of routes defined in that NgModule, and will transparently add\n * those routes to the main configuration.\n *\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * @description Represents the results of the URL matching.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * @description\n *\n * A function matching URLs\n *\n * A custom URL matcher can be provided when a combination of `path` and `pathMatch` isn't\n * expressive enough.\n *\n * For instance, the following matcher matches html files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n UrlMatchResult;\n\n/**\n * @description\n *\n * Represents the static data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type Data = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * Represents the resolved data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type ResolveData = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildren = string | LoadChildrenCallback;\n\n/**\n * @description\n *\n * The type of `queryParamsHandling`.\n *\n * See `RouterLink` for more details.\n *\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * @description\n *\n * The type of `runGuardsAndResolvers`.\n *\n * See `Routes` for more details.\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport interface Route {\n path?: string;\n pathMatch?: string;\n matcher?: UrlMatcher;\n component?: Type<any>;\n redirectTo?: string;\n outlet?: string;\n canActivate?: any[];\n canActivateChild?: any[];\n canDeactivate?: any[];\n canLoad?: any[];\n data?: Data;\n resolve?: ResolveData;\n children?: Routes;\n loadChildren?: LoadChildren;\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n /**\n * Filled for routes with `loadChildren` once the module has been loaded\n * @internal\n */\n _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n if (!route) {\n throw new Error(`\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && route.component) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n }\n if (route.path && route.matcher) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp =\n `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new Error(\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\n `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n let key: string;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\n\nexport function waitForMap<A, B>(\n obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n if (Object.keys(obj).length === 0) {\n return of ({});\n }\n\n const waitHead: Observable<B>[] = [];\n const waitTail: Observable<B>[] = [];\n const res: {[k: string]: B} = {};\n\n forEach(obj, (a: A, k: string) => {\n const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n } else {\n waitTail.push(mapped);\n }\n });\n\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n }\n return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n return true;\n\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n }\n return true;\n\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup,\n /** The query params of the URL */\n public queryParams: Params,\n /** The fragment of the URL */\n public fragment: string|null) {}\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _sourceSegment !: UrlSegmentGroup;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _segmentIndexShift !: number;\n /** The parent node in the url tree */\n parent: UrlSegmentGroup|null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup}) {\n forEach(children, (v: any, k: any) => v.parent = this);\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n /** Number of child segments */\n get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n /** @docsNotRequired */\n toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _parameterMap !: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string}) {}\n\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n let res: T[] = [];\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children: string[] = [];\n\n forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n\n });\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.keys(params).map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n });\n\n return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) { this.remaining = url; }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string|null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: any} {\n const params: {[key: string]: any} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: any}): void {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(`Cannot parse url '${this.url}'`);\n }\n\n let outletName: string = undefined !;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new Error(`Expected \"${str}\".`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) { this._root = root; }\n\n get root(): T { return this._root.value; }\n\n /**\n * @internal\n */\n parent(t: T): T|null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T|null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(public value: T, public children: TreeNode<T>[]) {}\n\n toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n\n return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(\n emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n // TODO(issue/24571): remove '!'.\n snapshot !: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterState;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: Observable<ParamMap>;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: Observable<ParamMap>;\n\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route */\n public url: Observable<UrlSegment[]>,\n /** An observable of the matrix parameters scoped to this route */\n public params: Observable<Params>,\n /** An observable of the query parameters shared by all the routes */\n public queryParams: Observable<Params>,\n /** An observable of the URL fragment shared by all the routes */\n public fragment: Observable<string>,\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>,\n /** The outlet name of the route. It's a constant */\n public outlet: string,\n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n this._futureSnapshot = futureSnapshot;\n }\n\n /** The configuration used to match this route */\n get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n /** The root of the router state */\n get root(): ActivatedRoute { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): Observable<ParamMap> {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n\n get queryParamMap(): Observable<ParamMap> {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params,\n data: Data,\n resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n route: ActivatedRouteSnapshot,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n const pathFromRoot = route.pathFromRoot;\n\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n\n // parent is componentless => current route should inherit its params and data\n } else if (!parent.component) {\n inheritingStartingFrom--;\n\n } else {\n break;\n }\n }\n }\n\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n return pathFromRoot.reduce((res, curr) => {\n const params = {...res.params, ...curr.params};\n const data = {...res.data, ...curr.data};\n const resolve = {...res.resolve, ...curr._resolvedData};\n return {params, data, resolve};\n }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route|null;\n /** @internal **/\n _urlSegment: UrlSegmentGroup;\n /** @internal */\n _lastPathIndex: number;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _resolvedData !: Data;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterStateSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: ParamMap;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /** The matrix parameters scoped to this route */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n lastPathIndex: number, resolve: ResolveData) {\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): ParamMap {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n (<any>route.queryParams).next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n (<any>route.fragment).next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n (<any>route.params).next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n (<any>route.url).next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n (<any>route.data).next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n (<any>route.data).next(route._futureSnapshot.data);\n }\n}\n\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n prevState: RouterState): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n } else {\n const detachedRouteHandle =\n <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n\n } else {\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (let i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n fragment: string): UrlTree {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n\n const startingPosition = findStartingPosition(nav, urlTree, route);\n\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(\n startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n queryParams: Params, fragment: string): UrlTree {\n let qp: any = {};\n if (queryParams) {\n forEach(queryParams, (value: any, name: any) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n\n const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n forEach(cmd.outlets, (commands: any, name: string) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(\n route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent !;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const curr = getPath(commands[currentCommandIndex]);\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n const children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n\n const curr = getPath(commands[i]);\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n forEach(params, (v: any, k: string) => res[k] = `${v}`);\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n map(t => {\n new ActivateRoutes(\n routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n\n if (context) {\n const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n const contexts = route.value.component ? context.children : parentContexts;\n\n forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored =\n (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n } else {\n const config = parentLoadedConfig(future.snapshot);\n const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n if (route && route.component) return null;\n }\n\n return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n public segmentGroup: UrlSegmentGroup|null;\n\n constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return new Observable<LoadedRouterConfig>(\n (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n private allowRedirects: boolean = true;\n private ngModule: NgModuleRef<any>;\n\n constructor(\n moduleInjector: Injector, private configLoader: RouterConfigLoader,\n private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n\n apply(): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n return urlTrees$.pipe(catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private match(tree: UrlTree): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) =>\n this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private noMatchError(e: NoMatch): any {\n return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n\n private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n UrlTree {\n const root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n }\n\n private expandSegmentGroup(\n ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n outlet: string): Observable<UrlSegmentGroup> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n }\n\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n\n // Recursively expand segment groups for all the child outlets\n private expandChildren(\n ngModule: NgModuleRef<any>, routes: Route[],\n segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n return waitForMap(\n segmentGroup.children,\n (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n }\n\n private expandSegment(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n segments: UrlSegment[], outlet: string,\n allowRedirects: boolean): Observable<UrlSegmentGroup> {\n return of (...routes).pipe(\n map((r: any) => {\n const expanded$ = this.expandSegmentAgainstRoute(\n ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e: any) => {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return of (null) as any;\n }\n throw e;\n }));\n }),\n concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of (new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n private expandSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, paths, outlet);\n }\n\n return noMatch(segmentGroup);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule, routes, route, outlet);\n }\n\n return this.expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, segments, outlet);\n }\n\n private expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n outlet: string): Observable<UrlSegmentGroup> {\n const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n }\n\n private expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n const {matched, consumedSegments, lastChild, positionalParamSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n const newTree = this.applyRedirectCommands(\n consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n return this.expandSegment(\n ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n false);\n }));\n }\n\n private matchSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n\n return of (new UrlSegmentGroup(segments, {}));\n }\n\n const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n if (!matched) return noMatch(rawSegmentGroup);\n\n const rawSlicedSegments = segments.slice(lastChild);\n const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n const childModule = routerConfig.module;\n const childConfig = routerConfig.routes;\n\n const {segmentGroup, slicedSegments} =\n split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$.pipe(\n map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of (new UrlSegmentGroup(consumedSegments, {}));\n }\n\n const expanded$ = this.expandSegment(\n childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(\n map((cs: UrlSegmentGroup) =>\n new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }\n\n private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of (new LoadedRouterConfig(route.children, ngModule));\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of (route._loadedConfig);\n }\n\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap((shouldLoad: boolean) => {\n if (shouldLoad) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n\n return of (new LoadedRouterConfig([], ngModule));\n }\n\n private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of (res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo !);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n private applyRedirectCommands(\n segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n return this.applyRedirectCreatreUrlTree(\n redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n\n private applyRedirectCreatreUrlTree(\n redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment);\n }\n\n private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n forEach(redirectToParams, (v: any, k: string) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n private createSegmentGroup(\n redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n private createSegments(\n redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n return redirectToSegments.map(\n s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n\n private findPosParam(\n redirectTo: string, redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment}): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n\n private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction runCanLoadGuard(\n moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n const canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0) return of (true);\n\n const obs = from(canLoad).pipe(map((injectionToken: any) => {\n const guard = moduleInjector.get(injectionToken);\n let guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n } else if (isFunction<CanLoadFn>(guard)) {\n guardVal = guard(route, segments);\n } else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n\n return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n matched: boolean,\n consumedSegments: UrlSegment[],\n lastChild: number,\n positionalParamSegments: {[k: string]: UrlSegment}\n} {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n\n if (!res) {\n return {\n matched: false,\n consumedSegments: <any[]>[],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n\n return {\n matched: true,\n consumedSegments: res.consumed !,\n lastChild: res.consumed.length !,\n positionalParamSegments: res.posParams !,\n };\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[]) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptySegments(\n config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n segmentGroup, slicedSegments, config, segmentGroup.children));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n }\n\n return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(switchMap(\n t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[],\n canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot, curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n {node: ActivatedRouteSnapshot, guards: any[]}|null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n const config = getClosestLoadedConfig(snapshot);\n const injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n if (!snapshot) return null;\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n }\n\n return null;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n forEach(\n prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun =\n shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun) {\n const component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n return switchMap(obs => {\n return combineLatest(\n ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n .pipe(\n scan(\n (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n let isPending = false;\n return list.reduce((innerAcc, val, i: number) => {\n if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE) isPending = true;\n\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false) return val;\n\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n\n return innerAcc;\n }, acc);\n },\n INITIAL_VALUE),\n filter(item => item !== INITIAL_VALUE),\n map(item => isUrlTree(item) ? item : item === true), //\n take(1)) as Observable<boolean|UrlTree>;\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of ({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n .pipe(\n mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(\n targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n of (canDeactivate);\n }),\n map(guardsResult => ({...t, guardsResult})));\n }));\n };\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n moduleInjector: Injector) {\n return from(checks).pipe(\n mergeMap(\n check =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n forwardEvent?: (evt: Event) => void) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(result => {\n return result !== true;\n }, true as boolean | UrlTree));\n }),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of (true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of (true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of (true);\n\n const canActivateObservables = canActivate.map((c: any) => {\n return defer(() => {\n const guard = getToken(c, futureARS, moduleInjector);\n let observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n } else if (isFunction<CanActivateFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map((c: any) => {\n const guard = getToken(c, d.node, moduleInjector);\n let observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n } else if (isFunction<CanActivateChildFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of (guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of (true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const guard = getToken(c, currARS, moduleInjector);\n let observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n } else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n return new Recognizer(\n rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n relativeLinkResolution)\n .recognize();\n}\n\nclass Recognizer {\n constructor(\n private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private relativeLinkResolution: 'legacy'|'corrected') {}\n\n recognize(): Observable<RouterStateSnapshot> {\n try {\n const rootSegmentGroup =\n split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n const root = new ActivatedRouteSnapshot(\n [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n this.urlTree.root, -1, {});\n\n const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of (routeState);\n\n } catch (e) {\n return new Observable<RouterStateSnapshot>(\n (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n }\n }\n\n inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n const route = routeNode.value;\n\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n\n processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n TreeNode<ActivatedRouteSnapshot>[] {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n }\n\n processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n TreeNode<ActivatedRouteSnapshot>[] {\n const children = mapChildrenIntoArray(\n segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n }\n\n processSegment(\n config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n for (const r of config) {\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n } catch (e) {\n if (!(e instanceof NoMatch)) throw e;\n }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n\n throw new NoMatch();\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n processSegmentAgainstRoute(\n route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n if (route.redirectTo) throw new NoMatch();\n\n if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n let snapshot: ActivatedRouteSnapshot;\n let consumedSegments: UrlSegment[] = [];\n let rawSlicedSegments: UrlSegment[] = [];\n\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments) !.parameters : {};\n snapshot = new ActivatedRouteSnapshot(\n segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n } else {\n const result: MatchResult = match(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n\n snapshot = new ActivatedRouteSnapshot(\n consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n\n const childConfig: Route[] = getChildConfig(route);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const children = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n }\n\n const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n if (route.children) {\n return route.children;\n }\n\n if (route.loadChildren) {\n return route._loadedConfig !.routes;\n }\n\n return [];\n}\n\ninterface MatchResult {\n consumedSegments: UrlSegment[];\n lastChild: number;\n parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch();\n }\n\n return {consumedSegments: [], lastChild: 0, parameters: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) throw new NoMatch();\n\n const posParams: {[n: string]: string} = {};\n forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n const parameters = res.consumed.length > 0 ?\n {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n posParams;\n\n return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n let s = segmentGroup;\n let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptyPaths(\n segmentGroup, consumedSegments, config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n segmentGroup, consumedSegments, slicedSegments, config,\n segmentGroup.children, relativeLinkResolution));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n routes: Route[], children: {[name: string]: UrlSegmentGroup},\n relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n } else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n 'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(\n t => recognizeFn(\n rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n if (!canActivateChecks.length) {\n return of (t);\n }\n\n return from(canActivateChecks)\n .pipe(\n concatMap(\n check => runResolve(\n check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n reduce((_: any, __: any) => _), map(_ => t));\n }));\n };\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n const resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = {\n ...futureARS.data,\n ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n return null;\n }));\n}\n\nfunction resolveNode(\n resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of ({});\n }\n if (keys.length === 1) {\n const key = keys[0];\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => { return {[key]: value}; }));\n }\n const data: {[k: string]: any} = {};\n const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n MonoTypeOperatorFunction<T> {\n return function(source) {\n return source.pipe(switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return from([v]);\n }));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>,\n componentRef: ComponentRef<any>,\n route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\n// TODO(i): switch to fromPromise once it's expored in rxjs\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * @docsNotRequired\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n constructor(\n private loader: NgModuleFactoryLoader, private compiler: Compiler,\n private onLoadStartListener?: (r: Route) => void,\n private onLoadEndListener?: (r: Route) => void) {}\n\n load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n\n const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n\n const module = factory.create(parentInjector);\n\n return new LoadedRouterConfig(\n flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n }\n\n private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n } else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n if (t instanceof NgModuleFactory) {\n return of (t);\n } else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean { return true; }\n extract(url: UrlTree): UrlTree { return url; }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Represents the extra options used during navigation.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n /**\n * Enables relative navigation from the current ActivatedRoute.\n *\n * Configuration:\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * Navigate to list route from child route:\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * this.router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n */\n relativeTo?: ActivatedRoute|null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params|null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * this.router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * Preserves the query parameters for the next navigation.\n *\n * deprecated, use `queryParamsHandling` instead\n *\n * ```\n * // Preserve query params from /results?page=1 to /view?page=1\n * this.router.navigate(['/view'], { preserveQueryParams: true });\n * ```\n *\n * @deprecated since v4\n */\n preserveQueryParams?: boolean;\n\n /**\n * config strategy to handle the query parameters for the next navigation.\n *\n * ```\n * // from /results?page=1 to /view?page=1&page=2\n * this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: \"merge\" });\n * ```\n */\n queryParamsHandling?: QueryParamsHandling|null;\n /**\n * Preserves the fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * this.router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n /**\n * Navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n /**\n * Navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n /**\n * State passed to any navigation. This value will be accessible through the `extras` object\n * returned from `router.getCurrentNavigation()` while a navigation is executing. Once a\n * navigation completes, this value will be written to `history.state` when the `location.go`\n * or `location.replaceState` method is called before activating of this route. Note that\n * `history.state` will not pass an object equality test because the `navigationId` will be\n * added to the state before being written.\n *\n * While `history.state` can accept any type of value, because the router adds the `navigationId`\n * on each navigation, the `state` must always be an object.\n */\n state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Error handler that is invoked when a navigation errors.\n *\n * If the handler returns a value, the navigation promise will be resolved with this value.\n * If the handler throws an exception, the navigation promise will be rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n [k: string]: any; navigationId: number;\n};\n\n/**\n * @description\n *\n * Information about any given navigation. This information can be gotten from the router at\n * any time using the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n /**\n * The ID of the current navigation.\n */\n id: number;\n /**\n * Target URL passed into the {@link Router#navigateByUrl} call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: string | UrlTree;\n /**\n * The initial target URL after being parsed with {@link UrlSerializer.extract()}.\n */\n extractedUrl: UrlTree;\n /**\n * Extracted URL after redirects have been applied. This URL may not be available immediately,\n * therefore this property can be `undefined`. It is guaranteed to be set after the\n * {@link RoutesRecognized} event fires.\n */\n finalUrl?: UrlTree;\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * The NavigationExtras used in this navigation. See {@link NavigationExtras} for more info.\n */\n extras: NavigationExtras;\n /**\n * Previously successful Navigation object. Only a single previous Navigation is available,\n * therefore this previous Navigation will always have a `null` value for `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n id: number,\n currentUrlTree: UrlTree,\n currentRawUrl: UrlTree,\n extractedUrl: UrlTree,\n urlAfterRedirects: UrlTree,\n rawUrl: UrlTree,\n extras: NavigationExtras,\n resolve: any,\n reject: any,\n promise: Promise<boolean>,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n currentSnapshot: RouterStateSnapshot,\n targetSnapshot: RouterStateSnapshot | null,\n currentRouterState: RouterState,\n targetRouterState: RouterState | null,\n guards: Checks,\n guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}): Observable<void> {\n return of (null) as any;\n}\n\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n private currentUrlTree: UrlTree;\n private rawUrlTree: UrlTree;\n private browserUrlTree: UrlTree;\n private readonly transitions: BehaviorSubject<NavigationTransition>;\n private navigations: Observable<NavigationTransition>;\n private lastSuccessfulNavigation: Navigation|null = null;\n private currentNavigation: Navigation|null = null;\n\n // TODO(issue/24571): remove '!'.\n private locationSubscription !: Subscription;\n private navigationId: number = 0;\n private configLoader: RouterConfigLoader;\n private ngModule: NgModuleRef<any>;\n private console: Console;\n private isNgZoneEnabled: boolean = false;\n\n public readonly events: Observable<Event> = new Subject<Event>();\n public readonly routerState: RouterState;\n\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n errorHandler: ErrorHandler = defaultErrorHandler;\n\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n malformedUriErrorHandler:\n (error: URIError, urlSerializer: UrlSerializer,\n url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n /**\n * Indicates if at least one navigation happened.\n */\n navigated: boolean = false;\n private lastSuccessfulId: number = -1;\n\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n /**\n * See {@link RouterModule} for more information.\n */\n relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n constructor(\n private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n\n this.processNavigations();\n }\n\n private setupNavigations(transitions: Observable<NavigationTransition>):\n Observable<NavigationTransition> {\n const eventsSubject = (this.events as Subject<Event>);\n return transitions.pipe(\n filter(t => t.id !== 0),\n\n // Extract URL\n map(t => ({\n ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n } as NavigationTransition)),\n\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n {...this.lastSuccessfulNavigation, previousNavigation: null} :\n null\n };\n }),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(t => {\n let completed = false;\n let errored = false;\n return of (t).pipe(\n switchMap(t => {\n const urlTransition =\n !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n const processCurrentUrl =\n (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n if (processCurrentUrl) {\n return of (t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions.getValue();\n eventsSubject.next(new NavigationStart(\n t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }),\n\n // This delay is required to match old behavior that forced navigation to\n // always be async\n switchMap(t => Promise.resolve(t)),\n\n // ApplyRedirects\n applyRedirects(\n this.ngModule.injector, this.configLoader, this.urlSerializer,\n this.config),\n\n // Update the currentNavigation\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation !,\n finalUrl: t.urlAfterRedirects\n };\n }),\n\n // Recognize\n recognize(\n this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n // Update URL if in `eager` update mode\n tap(t => {\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n // Fire RoutesRecognized\n tap(t => {\n const routesRecognized = new RoutesRecognized(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n eventsSubject.next(routesRecognized);\n }), );\n } else {\n const processPreviousUrl = urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id, this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n const targetSnapshot =\n createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n return of ({\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n });\n } else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }),\n\n // Before Preactivation\n switchTap(t => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.beforePreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !);\n this.triggerEvent(guardsStart);\n }),\n\n map(t => ({\n ...t,\n guards:\n getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n })),\n\n checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n tap(t => {\n if (isUrlTree(t.guardsResult)) {\n const error: Error&{url?: UrlTree} = navigationCancelingError(\n `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n error.url = t.guardsResult;\n throw error;\n }\n }),\n\n tap(t => {\n const guardsEnd = new GuardsCheckEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !, !!t.guardsResult);\n this.triggerEvent(guardsEnd);\n }),\n\n filter(t => {\n if (!t.guardsResult) {\n this.resetUrlToCurrentUrlTree();\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of (t).pipe(\n tap(t => {\n const resolveStart = new ResolveStart(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveStart);\n }),\n resolveData(\n this.paramsInheritanceStrategy,\n this.ngModule.injector), //\n tap(t => {\n const resolveEnd = new ResolveEnd(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveEnd);\n }), );\n }\n return undefined;\n }),\n\n // --- AFTER PREACTIVATION ---\n switchTap((t: NavigationTransition) => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.afterPreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n return ({...t, targetRouterState});\n }),\n\n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n tap((t: NavigationTransition) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n if (this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(\n this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n activateRoutes(\n this.rootContexts, this.routeReuseStrategy,\n (evt: Event) => this.triggerEvent(evt)),\n\n tap({next() { completed = true; }, complete() { completed = true; }}),\n finalize(() => {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n this.resetUrlToCurrentUrlTree();\n const navCancel = new NavigationCancel(\n t.id, this.serializeUrl(t.extractedUrl),\n `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n this.currentNavigation = null;\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n const redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n this.navigated = true;\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n\n if (redirecting) {\n this.navigateByUrl(e.url);\n }\n\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n } else {\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(this.errorHandler(e));\n } catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }), );\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n })) as any as Observable<NavigationTransition>;\n }\n\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n resetRootComponentType(rootComponentType: Type<any>): void {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n\n private getTransition(): NavigationTransition { return this.transitions.value; }\n\n private setTransition(t: Partial<NavigationTransition>): void {\n this.transitions.next({...this.getTransition(), ...t});\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n }\n }\n\n /**\n * Sets up the location change listener.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = <any>this.location.subscribe((change: any) => {\n let rawUrlTree = this.parseUrl(change['url']);\n const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n const state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(\n () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n });\n }\n }\n\n /** The current url */\n get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n /** The current Navigation object if one exists */\n getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n /** @internal */\n triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n\n /** @docsNotRequired */\n ngOnDestroy(): void { this.dispose(); }\n\n /** Disposes of the router */\n dispose(): void {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null !;\n }\n }\n\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n const {relativeTo, queryParams, fragment,\n preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n const a = relativeTo || this.routerState.root;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params|null = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n } else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n }\n\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\n `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n let urlTree: UrlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n\n /** Returns whether the url is activated */\n isActive(url: string|UrlTree, exact: boolean): boolean {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.keys(params).reduce((result: Params, key: string) => {\n const value: any = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private processNavigations(): void {\n this.navigations.subscribe(\n t => {\n this.navigated = true;\n this.lastSuccessfulId = t.id;\n (this.events as Subject<Event>)\n .next(new NavigationEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.currentNavigation = null;\n t.resolve(true);\n },\n e => { this.console.warn(`Unhandled Navigation Error: `); });\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n extras: NavigationExtras): Promise<boolean> {\n const lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n let resolve: any = null;\n let reject: any = null;\n\n const promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const id = ++this.navigationId;\n this.setTransition({\n id,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => { return Promise.reject(e); });\n }\n\n private setBrowserUrl(\n url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n const path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', {...state, navigationId: id});\n } else {\n this.location.go(path, '', {...state, navigationId: id});\n }\n }\n\n private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n (this as{routerState: RouterState}).routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n OnDestroy, AfterContentInit {\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLink, {descendants: true})\n links !: QueryList<RouterLink>;\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLinkWithHref, {descendants: true})\n linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n public readonly isActive: boolean = false;\n\n @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n constructor(\n private router: Router, private element: ElementRef, private renderer: Renderer2,\n private cdr: ChangeDetectorRef) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(_ => this.update());\n this.linksWithHrefs.changes.subscribe(_ => this.update());\n this.update();\n }\n\n @Input()\n set routerLinkActive(data: string[]|string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n\n ngOnChanges(changes: SimpleChanges): void { this.update(); }\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private update(): void {\n if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n (this as any).isActive = hasActiveLinks;\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n });\n }\n\n private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n return (link: RouterLink | RouterLinkWithHref) =>\n router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutlet|null = null;\n route: ActivatedRoute|null = null;\n resolver: ComponentFactoryResolver|null = null;\n children = new ChildrenOutletContexts();\n attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n private activated: ComponentRef<any>|null = null;\n private _activatedRoute: ActivatedRoute|null = null;\n private name: string;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n constructor(\n private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n private changeDetector: ChangeDetectorRef) {\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n\n ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n ngOnInit(): void {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n }\n\n get isActivated(): boolean { return !!this.activated; }\n\n get component(): Object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated) throw new Error('Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const snapshot = activatedRoute._futureSnapshot;\n const component = <any>snapshot.routeConfig !.component;\n resolver = resolver || this.resolver;\n const factory = resolver.resolveComponentFactory(component);\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(\n private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of (null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n private loader: RouterConfigLoader;\n // TODO(issue/24571): remove '!'.\n private subscription !: Subscription;\n\n constructor(\n private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n\n setUpPreloading(): void {\n this.subscription =\n this.router.events\n .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n const ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n }\n\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n const childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n\n // recurse into children\n } else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n return from(res).pipe(mergeAll(), map((_) => void 0));\n }\n\n private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const loaded$ = this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n route._loadedConfig = config;\n return this.processRoutes(config.module, config.routes);\n }));\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n private routerEventsSubscription !: Unsubscribable;\n // TODO(issue/24571): remove '!'.\n private scrollEventsSubscription !: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n constructor(\n private router: Router,\n /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n anchorScrolling?: 'disabled'|'enabled'\n } = {}) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.router.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.router.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n this.router.triggerEvent(new Scroll(\n routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n }\n\n ngOnDestroy() {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RouterEvent} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\nconst ROUTER_DIRECTIVES =\n [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n@NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n // Note: We are injecting the Router so it gets created eagerly...\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\n}\n\nexport function createRouterScroller(\n router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @description\n *\n * Represents an option to configure when the initial navigation is performed.\n *\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @publicApi\n */\nexport type InitialNavigation =\n true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @description\n *\n * Represents options to configure the router.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See `PreloadAllModules`.\n */\n preloadingStrategy?: any;\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation?: 'reload'|'ignore';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'--does nothing (default).\n * * 'top'--set the scroll position to 0,0..\n * * 'enabled'--set the scroll position to the stored position. This option will be the default in\n * the future.\n *\n * When enabled, the router stores and restores scroll positions during navigation.\n * When navigating forward, the scroll position will be set to [0, 0], or to the anchor\n * if one is provided.\n *\n * You can implement custom scroll restoration behavior as follows.\n * ```typescript\n * class AppModule {\n * constructor(router: Router, viewportScroller: ViewportScroller, store: Store<AppState>) {\n * router.events.pipe(filter(e => e instanceof Scroll), switchMap(e => {\n * return store.pipe(first(), timeout(200), map(() => e));\n * }).subscribe(e => {\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else if (e.anchor) {\n * viewportScroller.scrollToAnchor(e.anchor);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n * ```\n *\n * You can also implement component-specific scrolling like this:\n *\n * ```typescript\n * class ListComponent {\n * list: any[];\n * constructor(router: Router, viewportScroller: ViewportScroller, fetcher: ListFetcher) {\n * const scrollEvents = router.events.filter(e => e instanceof Scroll);\n * listFetcher.fetch().pipe(withLatestFrom(scrollEvents)).subscribe(([list, e]) => {\n * this.list = list;\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n */\n scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n /**\n * Configures if the router should scroll to the element when the url has a fragment.\n *\n * * 'disabled'--does nothing (default).\n * * 'enabled'--scrolls to the element. This option will be the default in the future.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled'|'enabled';\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with two numbers, the router will always use the numbers.\n * When given a function, the router will invoke the function every time it restores scroll\n * position.\n */\n scrollOffset?: [number, number]|(() => [number, number]);\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n /**\n * A custom malformed uri error handler function. This handler is invoked when encodedURI contains\n * invalid character sequences. The default implementation is to redirect to the root url dropping\n * any path or param info. This function passes three parameters:\n *\n * - `'URIError'` - Error thrown when parsing a bad URL\n * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n * - `'url'` - The malformed URL that caused the URIError\n * */\n malformedUriErrorHandler?:\n (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy?: 'deferred'|'eager';\n\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * Example:\n *\n * ```\n * const routes = [\n * {\n * path: '',\n * component: ContainerComponent,\n * children: [\n * { path: 'a', component: AComponent },\n * { path: 'b', component: BComponent },\n * ]\n * }\n * ];\n * ```\n *\n * From the `ContainerComponent`, this will not work:\n *\n * `<a [routerLink]=\"['./a']\">Link to A</a>`\n *\n * However, this will work:\n *\n * `<a [routerLink]=\"['../a']\">Link to A</a>`\n *\n * In other words, you're required to use `../` rather than `./`. This is currently the default\n * behavior. Setting this option to `corrected` enables the fix.\n */\n relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router = new Router(\n null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.enableTracing) {\n const dom = getDOM();\n router.events.subscribe((e: RouterEvent) => {\n dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n\n return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n private initNavigation: boolean = false;\n private resultOfPreactivationDone = new Subject<void>();\n\n constructor(private injector: Injector) {}\n\n appInitializer(): Promise<any> {\n const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let resolve: Function = null !;\n const res = new Promise(r => resolve = r);\n const router = this.injector.get(Router);\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null) as any;\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n\n bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n const preloader = this.injector.get(RouterPreloader);\n const routerScroller = this.injector.get(RouterScroller);\n const router = this.injector.get(Router);\n const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null !);\n this.resultOfPreactivationDone.complete();\n }\n\n private isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n\n private isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('7.2.7');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_n} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_l,TreeNode as ɵangular_packages_router_router_m} from './src/utils/tree';"],"names":["last","map","lastValue","isObservable","isPromise","applyRedirects","applyRedirectsFn","NoMatch","split","match","getOutlet","recognize","recognizeFn","Console","getDOM"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW;;;;;IACtB,YAEW,EAAU,EAEV,GAAW;QAFX,OAAE,GAAF,EAAE,CAAQ;QAEV,QAAG,GAAH,GAAG,CAAQ;KAAI;CAC3B;;;;;;;;AASD,MAAa,eAAgB,SAAQ,WAAW;;;;;;;IA0B9C;;IAEI,EAAU;;IAEV,GAAW;;IAEX,oBAA0D,YAAY;;IAEtE,gBAA+D,IAAI;QACrE,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACpC;;;;;IAGD,QAAQ,KAAa,OAAO,uBAAuB,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE;CACrF;;;;;;;;AASD,MAAa,aAAc,SAAQ,WAAW;;;;;;IAC5C;;IAEI,EAAU;;IAEV,GAAW,EAEJ,iBAAyB;QAClC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QADN,sBAAiB,GAAjB,iBAAiB,CAAQ;KAEnC;;;;;IAGD,QAAQ;QACN,OAAO,qBAAqB,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,GAAG,0BAA0B,IAAI,CAAC,iBAAiB,IAAI,CAAC;KAC5G;CACF;;;;;;;;AASD,MAAa,gBAAiB,SAAQ,WAAW;;;;;;IAC/C;;IAEI,EAAU;;IAEV,GAAW,EAEJ,MAAc;QACvB,KAAK,CAAC,EAAE,EAAE,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,"file":"router.js","sources":["../src/events.ts","../src/components/empty_outlet.ts","../src/shared.ts","../src/config.ts","../src/utils/collection.ts","../src/url_tree.ts","../src/utils/tree.ts","../src/router_state.ts","../src/create_router_state.ts","../src/create_url_tree.ts","../src/operators/activate_routes.ts","../src/utils/type_guards.ts","../src/apply_redirects.ts","../src/operators/apply_redirects.ts","../src/utils/preactivation.ts","../src/operators/prioritized_guard_value.ts","../src/operators/check_guards.ts","../src/recognize.ts","../src/operators/recognize.ts","../src/operators/resolve_data.ts","../src/operators/switch_tap.ts","../src/route_reuse_strategy.ts","../src/router_config_loader.ts","../src/url_handling_strategy.ts","../src/router.ts","../src/directives/router_link.ts","../src/directives/router_link_active.ts","../src/router_outlet_context.ts","../src/directives/router_outlet.ts","../src/router_preloader.ts","../src/router_scroller.ts","../src/router_module.ts","../src/version.ts","../router.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * @description\n *\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** @docsNotRequired */\n public id: number,\n /** @docsNotRequired */\n public url: string) {}\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n /**\n * This reflects the state object that was previously supplied to the pushState call. This is\n * not null only when the navigation is triggered by a popstate event.\n *\n * The router assigns a navigationId to every router transition/navigation. Even when the user\n * clicks on the back button in the browser, a new navigation id will be created. So from\n * the perspective of the router, the router never \"goes back\". By using the `restoredState`\n * and its navigationId, you can implement behavior that differentiates between creating new\n * states\n * and popstate events. In the latter case you can restore some remembered state (e.g., scroll\n * position).\n *\n * See {@link NavigationExtras} for more information.\n */\n restoredState?: {[k: string]: any, navigationId: number}|null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any, navigationId: number}|null = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public reason: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\nexport class Scroll {\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd,\n\n /** @docsNotRequired */\n readonly position: [number, number]|null,\n\n /** @docsNotRequired */\n readonly anchor: string|null) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a router event, allowing you to track the lifecycle of the router.\n *\n * The sequence of router events is:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class EmptyOutletComponent {\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of parameters.\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any\n};\n\n/**\n * Matrix and Query parameters.\n *\n * `ParamMap` makes it easier to work with parameters as they could have either a single value or\n * multiple value. Because this should be known by the user, calling `get` or `getAll` returns the\n * correct type (either `string` or `string[]`).\n *\n * The API is inspired by the URLSearchParams interface.\n * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n *\n * @publicApi\n */\nexport interface ParamMap {\n has(name: string): boolean;\n /**\n * Return a single value for the given parameter name:\n * - the value when the parameter has a single value,\n * - the first value if the parameter has multiple values,\n * - `null` when there is no such parameter.\n */\n get(name: string): string|null;\n /**\n * Return an array of values for the given parameter name.\n *\n * If there is no such parameter, an empty array is returned.\n */\n getAll(name: string): string[];\n\n /** Name of the parameters */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) { this.params = params || {}; }\n\n has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n get(name: string): string|null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n const error = Error('NavigationCancelingError: ' + message);\n (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n const parts = route.path !.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Represents router configuration.\n *\n * `Routes` is an array of route configurations. Each one has the following properties:\n *\n * - `path` is a string that uses the route matcher DSL.\n * - `pathMatch` is a string that specifies the matching strategy. Options are `prefix` (default)\n * and `full`. See [Matching Strategy](#matching-strategy) below for more information.\n * - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.\n * - `component` is a component type.\n * - `redirectTo` is the url fragment which will replace the current matched segment.\n * - `outlet` is the name of the outlet the component should be placed into.\n * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See\n * `CanActivate` for more info.\n * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See\n * `CanActivateChild` for more info.\n * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See\n * `CanDeactivate` for more info.\n * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See\n * `CanLoad` for more info.\n * - `data` is additional data provided to the component via `ActivatedRoute`.\n * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more\n * info.\n * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only\n * when the matrix parameters of the route change. Options include:\n * - `paramsChange` (default) - Run guards and resolvers when path or matrix params change. This\n * mode ignores query param changes.\n * - `paramsOrQueryParamsChange` - Guards and resolvers will run when any parameters change. This\n * includes path, matrix, and query params.\n * - `pathParamsChange` - Run guards and resolvers path or any path params change. This mode is\n * useful if you want to ignore changes to all optional parameters such as query *and* matrix\n * params.\n * - `pathParamsOrQueryParamsChange` - Same as `pathParamsChange`, but also rerun when any query\n * param changes\n * - `always` - Run guards and resolvers on every navigation.\n * - (from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean - Use a predicate\n * function when none of the pre-configured modes fit the needs of the application. An example\n * might be when you need to ignore updates to a param such as `sortDirection`, but need to\n * reload guards and resolvers when changing the `searchRoot` param.\n * - `children` is an array of child route definitions.\n * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more\n * info.\n *\n * @usageNotes\n * ### Simple Configuration\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/bob`, the router will create the team component with the user\n * component in it.\n *\n * ### Multiple Outlets\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * When navigating to `/team/11(aux:chat/jim)`, the router will create the team component next to\n * the chat component. The chat component will be placed into the aux outlet.\n *\n * ### Wild Cards\n *\n * ```\n * [{\n * path: '**',\n * component: Sink\n * }]\n * ```\n *\n * Regardless of where you navigate to, the router will instantiate the sink component.\n *\n * ### Redirects\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to '/team/11/legacy/user/jim', the router will change the url to\n * '/team/11/user/jim', and then will instantiate the team component with the user component\n * in it.\n *\n * If the `redirectTo` value starts with a '/', then it is an absolute redirect. E.g., if in the\n * example above we change the `redirectTo` to `/user/:name`, the result url will be '/user/jim'.\n *\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any url segments. Let's look at the following configuration:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11`, the router will instantiate the AllUsers component.\n *\n * Empty-path routes can have children.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/jim`, the router will instantiate the wrapper component with\n * the user component in it.\n *\n * An empty path route inherits its parent's params and data. This is because it cannot have its\n * own params, and, as a result, it often uses its parent's params and data as its own.\n *\n * ### Matching Strategy\n *\n * By default the router will look at what is left in the url, and check if it starts with\n * the specified path (e.g., `/team/11/user` starts with `team/:id`).\n *\n * We can change the matching strategy to make sure that the path covers the whole unconsumed url,\n * which is akin to `unconsumedUrl === path` or `$` regular expressions.\n *\n * This is particularly important when redirecting empty-path routes.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * Since an empty path is a prefix of any url, even when navigating to '/main', the router will\n * still apply the redirect.\n *\n * If `pathMatch: full` is provided, the router will apply the redirect if and only if navigating to\n * '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * It is useful at times to have the ability to share parameters between sibling components.\n *\n * Say we have two components--ChildCmp and AuxCmp--that we want to put next to each other and both\n * of them require some id parameter.\n *\n * One way to do that would be to have a bogus parent component, so both the siblings can get the id\n * parameter from it. This is not ideal. Instead, you can use a componentless route.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * So when navigating to `parent/10/(a//aux:b)`, the route will instantiate the main child and aux\n * child components next to each other. In this example, the application component\n * has to have the primary and aux outlets defined.\n *\n * The router will also merge the `params`, `data`, and `resolve` of the componentless parent into\n * the `params`, `data`, and `resolve` of the children. This is done because there is no component\n * that can inject the activated route of the componentless parent.\n *\n * This is especially useful when child components are defined as follows:\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * With this configuration in place, navigating to '/parent/10' will create the main child and aux\n * components.\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up our application load time by splitting it into multiple bundles, and\n * loading them on demand. The router is designed to make lazy loading simple and easy. Instead of\n * providing the children property, you can provide the `loadChildren` property, as follows:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * loadChildren: 'team'\n * }]\n * ```\n *\n * The router will use registered NgModuleFactoryLoader to fetch an NgModule associated with 'team'.\n * Then it will extract the set of routes defined in that NgModule, and will transparently add\n * those routes to the main configuration.\n *\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * @description Represents the results of the URL matching.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * @description\n *\n * A function matching URLs\n *\n * A custom URL matcher can be provided when a combination of `path` and `pathMatch` isn't\n * expressive enough.\n *\n * For instance, the following matcher matches html files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n UrlMatchResult;\n\n/**\n * @description\n *\n * Represents the static data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type Data = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * Represents the resolved data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type ResolveData = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildren = string | LoadChildrenCallback;\n\n/**\n * @description\n *\n * The type of `queryParamsHandling`.\n *\n * See `RouterLink` for more details.\n *\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * @description\n *\n * The type of `runGuardsAndResolvers`.\n *\n * See `Routes` for more details.\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport interface Route {\n path?: string;\n pathMatch?: string;\n matcher?: UrlMatcher;\n component?: Type<any>;\n redirectTo?: string;\n outlet?: string;\n canActivate?: any[];\n canActivateChild?: any[];\n canDeactivate?: any[];\n canLoad?: any[];\n data?: Data;\n resolve?: ResolveData;\n children?: Routes;\n loadChildren?: LoadChildren;\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n /**\n * Filled for routes with `loadChildren` once the module has been loaded\n * @internal\n */\n _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n if (!route) {\n throw new Error(`\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && route.component) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n }\n if (route.path && route.matcher) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp =\n `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new Error(\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\n `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n let key: string;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\n\nexport function waitForMap<A, B>(\n obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n if (Object.keys(obj).length === 0) {\n return of ({});\n }\n\n const waitHead: Observable<B>[] = [];\n const waitTail: Observable<B>[] = [];\n const res: {[k: string]: B} = {};\n\n forEach(obj, (a: A, k: string) => {\n const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n } else {\n waitTail.push(mapped);\n }\n });\n\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n }\n return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n return true;\n\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n }\n return true;\n\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup,\n /** The query params of the URL */\n public queryParams: Params,\n /** The fragment of the URL */\n public fragment: string|null) {}\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _sourceSegment !: UrlSegmentGroup;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _segmentIndexShift !: number;\n /** The parent node in the url tree */\n parent: UrlSegmentGroup|null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup}) {\n forEach(children, (v: any, k: any) => v.parent = this);\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n /** Number of child segments */\n get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n /** @docsNotRequired */\n toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _parameterMap !: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string}) {}\n\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n let res: T[] = [];\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children: string[] = [];\n\n forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n\n });\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.keys(params).map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n });\n\n return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) { this.remaining = url; }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string|null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: any} {\n const params: {[key: string]: any} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: any}): void {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(`Cannot parse url '${this.url}'`);\n }\n\n let outletName: string = undefined !;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new Error(`Expected \"${str}\".`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) { this._root = root; }\n\n get root(): T { return this._root.value; }\n\n /**\n * @internal\n */\n parent(t: T): T|null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T|null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(public value: T, public children: TreeNode<T>[]) {}\n\n toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n\n return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(\n emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n // TODO(issue/24571): remove '!'.\n snapshot !: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterState;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: Observable<ParamMap>;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: Observable<ParamMap>;\n\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route */\n public url: Observable<UrlSegment[]>,\n /** An observable of the matrix parameters scoped to this route */\n public params: Observable<Params>,\n /** An observable of the query parameters shared by all the routes */\n public queryParams: Observable<Params>,\n /** An observable of the URL fragment shared by all the routes */\n public fragment: Observable<string>,\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>,\n /** The outlet name of the route. It's a constant */\n public outlet: string,\n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n this._futureSnapshot = futureSnapshot;\n }\n\n /** The configuration used to match this route */\n get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n /** The root of the router state */\n get root(): ActivatedRoute { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): Observable<ParamMap> {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n\n get queryParamMap(): Observable<ParamMap> {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params,\n data: Data,\n resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n route: ActivatedRouteSnapshot,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n const pathFromRoot = route.pathFromRoot;\n\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n\n // parent is componentless => current route should inherit its params and data\n } else if (!parent.component) {\n inheritingStartingFrom--;\n\n } else {\n break;\n }\n }\n }\n\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n return pathFromRoot.reduce((res, curr) => {\n const params = {...res.params, ...curr.params};\n const data = {...res.data, ...curr.data};\n const resolve = {...res.resolve, ...curr._resolvedData};\n return {params, data, resolve};\n }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route|null;\n /** @internal **/\n _urlSegment: UrlSegmentGroup;\n /** @internal */\n _lastPathIndex: number;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _resolvedData !: Data;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterStateSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: ParamMap;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /** The matrix parameters scoped to this route */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n lastPathIndex: number, resolve: ResolveData) {\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): ParamMap {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n (<any>route.queryParams).next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n (<any>route.fragment).next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n (<any>route.params).next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n (<any>route.url).next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n (<any>route.data).next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n (<any>route.data).next(route._futureSnapshot.data);\n }\n}\n\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n prevState: RouterState): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n } else {\n const detachedRouteHandle =\n <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n\n } else {\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (let i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n fragment: string): UrlTree {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n\n const startingPosition = findStartingPosition(nav, urlTree, route);\n\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(\n startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n queryParams: Params, fragment: string): UrlTree {\n let qp: any = {};\n if (queryParams) {\n forEach(queryParams, (value: any, name: any) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n\n const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n forEach(cmd.outlets, (commands: any, name: string) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(\n route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent !;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const curr = getPath(commands[currentCommandIndex]);\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n const children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n\n const curr = getPath(commands[i]);\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n forEach(params, (v: any, k: string) => res[k] = `${v}`);\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n map(t => {\n new ActivateRoutes(\n routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n\n if (context) {\n const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n const contexts = route.value.component ? context.children : parentContexts;\n\n forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored =\n (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n } else {\n const config = parentLoadedConfig(future.snapshot);\n const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n if (route && route.component) return null;\n }\n\n return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n public segmentGroup: UrlSegmentGroup|null;\n\n constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return new Observable<LoadedRouterConfig>(\n (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n private allowRedirects: boolean = true;\n private ngModule: NgModuleRef<any>;\n\n constructor(\n moduleInjector: Injector, private configLoader: RouterConfigLoader,\n private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n\n apply(): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n return urlTrees$.pipe(catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private match(tree: UrlTree): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) =>\n this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private noMatchError(e: NoMatch): any {\n return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n\n private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n UrlTree {\n const root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n }\n\n private expandSegmentGroup(\n ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n outlet: string): Observable<UrlSegmentGroup> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n }\n\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n\n // Recursively expand segment groups for all the child outlets\n private expandChildren(\n ngModule: NgModuleRef<any>, routes: Route[],\n segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n return waitForMap(\n segmentGroup.children,\n (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n }\n\n private expandSegment(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n segments: UrlSegment[], outlet: string,\n allowRedirects: boolean): Observable<UrlSegmentGroup> {\n return of (...routes).pipe(\n map((r: any) => {\n const expanded$ = this.expandSegmentAgainstRoute(\n ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e: any) => {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return of (null) as any;\n }\n throw e;\n }));\n }),\n concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of (new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n private expandSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, paths, outlet);\n }\n\n return noMatch(segmentGroup);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule, routes, route, outlet);\n }\n\n return this.expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, segments, outlet);\n }\n\n private expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n outlet: string): Observable<UrlSegmentGroup> {\n const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n }\n\n private expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n const {matched, consumedSegments, lastChild, positionalParamSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n const newTree = this.applyRedirectCommands(\n consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n return this.expandSegment(\n ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n false);\n }));\n }\n\n private matchSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n\n return of (new UrlSegmentGroup(segments, {}));\n }\n\n const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n if (!matched) return noMatch(rawSegmentGroup);\n\n const rawSlicedSegments = segments.slice(lastChild);\n const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n const childModule = routerConfig.module;\n const childConfig = routerConfig.routes;\n\n const {segmentGroup, slicedSegments} =\n split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$.pipe(\n map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of (new UrlSegmentGroup(consumedSegments, {}));\n }\n\n const expanded$ = this.expandSegment(\n childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(\n map((cs: UrlSegmentGroup) =>\n new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }\n\n private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of (new LoadedRouterConfig(route.children, ngModule));\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of (route._loadedConfig);\n }\n\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap((shouldLoad: boolean) => {\n if (shouldLoad) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n\n return of (new LoadedRouterConfig([], ngModule));\n }\n\n private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of (res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo !);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n private applyRedirectCommands(\n segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n return this.applyRedirectCreatreUrlTree(\n redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n\n private applyRedirectCreatreUrlTree(\n redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment);\n }\n\n private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n forEach(redirectToParams, (v: any, k: string) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n private createSegmentGroup(\n redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n private createSegments(\n redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n return redirectToSegments.map(\n s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n\n private findPosParam(\n redirectTo: string, redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment}): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n\n private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction runCanLoadGuard(\n moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n const canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0) return of (true);\n\n const obs = from(canLoad).pipe(map((injectionToken: any) => {\n const guard = moduleInjector.get(injectionToken);\n let guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n } else if (isFunction<CanLoadFn>(guard)) {\n guardVal = guard(route, segments);\n } else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n\n return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n matched: boolean,\n consumedSegments: UrlSegment[],\n lastChild: number,\n positionalParamSegments: {[k: string]: UrlSegment}\n} {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n\n if (!res) {\n return {\n matched: false,\n consumedSegments: <any[]>[],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n\n return {\n matched: true,\n consumedSegments: res.consumed !,\n lastChild: res.consumed.length !,\n positionalParamSegments: res.posParams !,\n };\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[]) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptySegments(\n config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n segmentGroup, slicedSegments, config, segmentGroup.children));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n }\n\n return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(switchMap(\n t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[],\n canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot, curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n {node: ActivatedRouteSnapshot, guards: any[]}|null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n const config = getClosestLoadedConfig(snapshot);\n const injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n if (!snapshot) return null;\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n }\n\n return null;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n forEach(\n prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun =\n shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun) {\n const component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n return switchMap(obs => {\n return combineLatest(\n ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n .pipe(\n scan(\n (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n let isPending = false;\n return list.reduce((innerAcc, val, i: number) => {\n if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE) isPending = true;\n\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false) return val;\n\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n\n return innerAcc;\n }, acc);\n },\n INITIAL_VALUE),\n filter(item => item !== INITIAL_VALUE),\n map(item => isUrlTree(item) ? item : item === true), //\n take(1)) as Observable<boolean|UrlTree>;\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of ({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n .pipe(\n mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(\n targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n of (canDeactivate);\n }),\n map(guardsResult => ({...t, guardsResult})));\n }));\n };\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n moduleInjector: Injector) {\n return from(checks).pipe(\n mergeMap(\n check =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n forwardEvent?: (evt: Event) => void) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(result => {\n return result !== true;\n }, true as boolean | UrlTree));\n }),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of (true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of (true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of (true);\n\n const canActivateObservables = canActivate.map((c: any) => {\n return defer(() => {\n const guard = getToken(c, futureARS, moduleInjector);\n let observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n } else if (isFunction<CanActivateFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map((c: any) => {\n const guard = getToken(c, d.node, moduleInjector);\n let observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n } else if (isFunction<CanActivateChildFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of (guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of (true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const guard = getToken(c, currARS, moduleInjector);\n let observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n } else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n return new Recognizer(\n rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n relativeLinkResolution)\n .recognize();\n}\n\nclass Recognizer {\n constructor(\n private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private relativeLinkResolution: 'legacy'|'corrected') {}\n\n recognize(): Observable<RouterStateSnapshot> {\n try {\n const rootSegmentGroup =\n split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n const root = new ActivatedRouteSnapshot(\n [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n this.urlTree.root, -1, {});\n\n const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of (routeState);\n\n } catch (e) {\n return new Observable<RouterStateSnapshot>(\n (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n }\n }\n\n inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n const route = routeNode.value;\n\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n\n processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n TreeNode<ActivatedRouteSnapshot>[] {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n }\n\n processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n TreeNode<ActivatedRouteSnapshot>[] {\n const children = mapChildrenIntoArray(\n segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n }\n\n processSegment(\n config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n for (const r of config) {\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n } catch (e) {\n if (!(e instanceof NoMatch)) throw e;\n }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n\n throw new NoMatch();\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n processSegmentAgainstRoute(\n route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n if (route.redirectTo) throw new NoMatch();\n\n if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n let snapshot: ActivatedRouteSnapshot;\n let consumedSegments: UrlSegment[] = [];\n let rawSlicedSegments: UrlSegment[] = [];\n\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments) !.parameters : {};\n snapshot = new ActivatedRouteSnapshot(\n segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n } else {\n const result: MatchResult = match(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n\n snapshot = new ActivatedRouteSnapshot(\n consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n\n const childConfig: Route[] = getChildConfig(route);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const children = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n }\n\n const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n if (route.children) {\n return route.children;\n }\n\n if (route.loadChildren) {\n return route._loadedConfig !.routes;\n }\n\n return [];\n}\n\ninterface MatchResult {\n consumedSegments: UrlSegment[];\n lastChild: number;\n parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch();\n }\n\n return {consumedSegments: [], lastChild: 0, parameters: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) throw new NoMatch();\n\n const posParams: {[n: string]: string} = {};\n forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n const parameters = res.consumed.length > 0 ?\n {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n posParams;\n\n return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n let s = segmentGroup;\n let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptyPaths(\n segmentGroup, consumedSegments, config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n segmentGroup, consumedSegments, slicedSegments, config,\n segmentGroup.children, relativeLinkResolution));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n routes: Route[], children: {[name: string]: UrlSegmentGroup},\n relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n } else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n 'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(\n t => recognizeFn(\n rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n if (!canActivateChecks.length) {\n return of (t);\n }\n\n return from(canActivateChecks)\n .pipe(\n concatMap(\n check => runResolve(\n check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n reduce((_: any, __: any) => _), map(_ => t));\n }));\n };\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n const resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = {\n ...futureARS.data,\n ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n return null;\n }));\n}\n\nfunction resolveNode(\n resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of ({});\n }\n if (keys.length === 1) {\n const key = keys[0];\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => { return {[key]: value}; }));\n }\n const data: {[k: string]: any} = {};\n const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n MonoTypeOperatorFunction<T> {\n return function(source) {\n return source.pipe(switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return from([v]);\n }));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>,\n componentRef: ComponentRef<any>,\n route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * @docsNotRequired\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n constructor(\n private loader: NgModuleFactoryLoader, private compiler: Compiler,\n private onLoadStartListener?: (r: Route) => void,\n private onLoadEndListener?: (r: Route) => void) {}\n\n load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n\n const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n\n const module = factory.create(parentInjector);\n\n return new LoadedRouterConfig(\n flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n }\n\n private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n } else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n if (t instanceof NgModuleFactory) {\n return of (t);\n } else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean { return true; }\n extract(url: UrlTree): UrlTree { return url; }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Represents the extra options used during navigation.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n /**\n * Enables relative navigation from the current ActivatedRoute.\n *\n * Configuration:\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * Navigate to list route from child route:\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * this.router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n */\n relativeTo?: ActivatedRoute|null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params|null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * this.router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * Preserves the query parameters for the next navigation.\n *\n * deprecated, use `queryParamsHandling` instead\n *\n * ```\n * // Preserve query params from /results?page=1 to /view?page=1\n * this.router.navigate(['/view'], { preserveQueryParams: true });\n * ```\n *\n * @deprecated since v4\n */\n preserveQueryParams?: boolean;\n\n /**\n * config strategy to handle the query parameters for the next navigation.\n *\n * ```\n * // from /results?page=1 to /view?page=1&page=2\n * this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: \"merge\" });\n * ```\n */\n queryParamsHandling?: QueryParamsHandling|null;\n /**\n * Preserves the fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * this.router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n /**\n * Navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n /**\n * Navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n /**\n * State passed to any navigation. This value will be accessible through the `extras` object\n * returned from `router.getCurrentNavigation()` while a navigation is executing. Once a\n * navigation completes, this value will be written to `history.state` when the `location.go`\n * or `location.replaceState` method is called before activating of this route. Note that\n * `history.state` will not pass an object equality test because the `navigationId` will be\n * added to the state before being written.\n *\n * While `history.state` can accept any type of value, because the router adds the `navigationId`\n * on each navigation, the `state` must always be an object.\n */\n state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Error handler that is invoked when a navigation errors.\n *\n * If the handler returns a value, the navigation promise will be resolved with this value.\n * If the handler throws an exception, the navigation promise will be rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n [k: string]: any; navigationId: number;\n};\n\n/**\n * @description\n *\n * Information about any given navigation. This information can be gotten from the router at\n * any time using the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n /**\n * The ID of the current navigation.\n */\n id: number;\n /**\n * Target URL passed into the {@link Router#navigateByUrl} call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: string | UrlTree;\n /**\n * The initial target URL after being parsed with {@link UrlSerializer.extract()}.\n */\n extractedUrl: UrlTree;\n /**\n * Extracted URL after redirects have been applied. This URL may not be available immediately,\n * therefore this property can be `undefined`. It is guaranteed to be set after the\n * {@link RoutesRecognized} event fires.\n */\n finalUrl?: UrlTree;\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * The NavigationExtras used in this navigation. See {@link NavigationExtras} for more info.\n */\n extras: NavigationExtras;\n /**\n * Previously successful Navigation object. Only a single previous Navigation is available,\n * therefore this previous Navigation will always have a `null` value for `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n id: number,\n currentUrlTree: UrlTree,\n currentRawUrl: UrlTree,\n extractedUrl: UrlTree,\n urlAfterRedirects: UrlTree,\n rawUrl: UrlTree,\n extras: NavigationExtras,\n resolve: any,\n reject: any,\n promise: Promise<boolean>,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n currentSnapshot: RouterStateSnapshot,\n targetSnapshot: RouterStateSnapshot | null,\n currentRouterState: RouterState,\n targetRouterState: RouterState | null,\n guards: Checks,\n guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}): Observable<void> {\n return of (null) as any;\n}\n\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n private currentUrlTree: UrlTree;\n private rawUrlTree: UrlTree;\n private browserUrlTree: UrlTree;\n private readonly transitions: BehaviorSubject<NavigationTransition>;\n private navigations: Observable<NavigationTransition>;\n private lastSuccessfulNavigation: Navigation|null = null;\n private currentNavigation: Navigation|null = null;\n\n // TODO(issue/24571): remove '!'.\n private locationSubscription !: Subscription;\n private navigationId: number = 0;\n private configLoader: RouterConfigLoader;\n private ngModule: NgModuleRef<any>;\n private console: Console;\n private isNgZoneEnabled: boolean = false;\n\n public readonly events: Observable<Event> = new Subject<Event>();\n public readonly routerState: RouterState;\n\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n errorHandler: ErrorHandler = defaultErrorHandler;\n\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n malformedUriErrorHandler:\n (error: URIError, urlSerializer: UrlSerializer,\n url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n /**\n * Indicates if at least one navigation happened.\n */\n navigated: boolean = false;\n private lastSuccessfulId: number = -1;\n\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n /**\n * See {@link RouterModule} for more information.\n */\n relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n constructor(\n private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n\n this.processNavigations();\n }\n\n private setupNavigations(transitions: Observable<NavigationTransition>):\n Observable<NavigationTransition> {\n const eventsSubject = (this.events as Subject<Event>);\n return transitions.pipe(\n filter(t => t.id !== 0),\n\n // Extract URL\n map(t => ({\n ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n } as NavigationTransition)),\n\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n {...this.lastSuccessfulNavigation, previousNavigation: null} :\n null\n };\n }),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(t => {\n let completed = false;\n let errored = false;\n return of (t).pipe(\n switchMap(t => {\n const urlTransition =\n !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n const processCurrentUrl =\n (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n if (processCurrentUrl) {\n return of (t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions.getValue();\n eventsSubject.next(new NavigationStart(\n t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }),\n\n // This delay is required to match old behavior that forced navigation to\n // always be async\n switchMap(t => Promise.resolve(t)),\n\n // ApplyRedirects\n applyRedirects(\n this.ngModule.injector, this.configLoader, this.urlSerializer,\n this.config),\n\n // Update the currentNavigation\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation !,\n finalUrl: t.urlAfterRedirects\n };\n }),\n\n // Recognize\n recognize(\n this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n // Update URL if in `eager` update mode\n tap(t => {\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n // Fire RoutesRecognized\n tap(t => {\n const routesRecognized = new RoutesRecognized(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n eventsSubject.next(routesRecognized);\n }), );\n } else {\n const processPreviousUrl = urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id, this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n const targetSnapshot =\n createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n return of ({\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n });\n } else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }),\n\n // Before Preactivation\n switchTap(t => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.beforePreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !);\n this.triggerEvent(guardsStart);\n }),\n\n map(t => ({\n ...t,\n guards:\n getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n })),\n\n checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n tap(t => {\n if (isUrlTree(t.guardsResult)) {\n const error: Error&{url?: UrlTree} = navigationCancelingError(\n `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n error.url = t.guardsResult;\n throw error;\n }\n }),\n\n tap(t => {\n const guardsEnd = new GuardsCheckEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !, !!t.guardsResult);\n this.triggerEvent(guardsEnd);\n }),\n\n filter(t => {\n if (!t.guardsResult) {\n this.resetUrlToCurrentUrlTree();\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of (t).pipe(\n tap(t => {\n const resolveStart = new ResolveStart(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveStart);\n }),\n resolveData(\n this.paramsInheritanceStrategy,\n this.ngModule.injector), //\n tap(t => {\n const resolveEnd = new ResolveEnd(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveEnd);\n }), );\n }\n return undefined;\n }),\n\n // --- AFTER PREACTIVATION ---\n switchTap((t: NavigationTransition) => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.afterPreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n return ({...t, targetRouterState});\n }),\n\n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n tap((t: NavigationTransition) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n if (this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(\n this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n activateRoutes(\n this.rootContexts, this.routeReuseStrategy,\n (evt: Event) => this.triggerEvent(evt)),\n\n tap({next() { completed = true; }, complete() { completed = true; }}),\n finalize(() => {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n this.resetUrlToCurrentUrlTree();\n const navCancel = new NavigationCancel(\n t.id, this.serializeUrl(t.extractedUrl),\n `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n this.currentNavigation = null;\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n const redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n this.navigated = true;\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n\n if (redirecting) {\n this.navigateByUrl(e.url);\n }\n\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n } else {\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(this.errorHandler(e));\n } catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }), );\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n })) as any as Observable<NavigationTransition>;\n }\n\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n resetRootComponentType(rootComponentType: Type<any>): void {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n\n private getTransition(): NavigationTransition { return this.transitions.value; }\n\n private setTransition(t: Partial<NavigationTransition>): void {\n this.transitions.next({...this.getTransition(), ...t});\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n }\n }\n\n /**\n * Sets up the location change listener.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = <any>this.location.subscribe((change: any) => {\n let rawUrlTree = this.parseUrl(change['url']);\n const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n const state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(\n () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n });\n }\n }\n\n /** The current url */\n get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n /** The current Navigation object if one exists */\n getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n /** @internal */\n triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n\n /** @docsNotRequired */\n ngOnDestroy(): void { this.dispose(); }\n\n /** Disposes of the router */\n dispose(): void {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null !;\n }\n }\n\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n const {relativeTo, queryParams, fragment,\n preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n const a = relativeTo || this.routerState.root;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params|null = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n } else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n }\n\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\n `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n let urlTree: UrlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n\n /** Returns whether the url is activated */\n isActive(url: string|UrlTree, exact: boolean): boolean {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.keys(params).reduce((result: Params, key: string) => {\n const value: any = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private processNavigations(): void {\n this.navigations.subscribe(\n t => {\n this.navigated = true;\n this.lastSuccessfulId = t.id;\n (this.events as Subject<Event>)\n .next(new NavigationEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.currentNavigation = null;\n t.resolve(true);\n },\n e => { this.console.warn(`Unhandled Navigation Error: `); });\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n extras: NavigationExtras): Promise<boolean> {\n const lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n let resolve: any = null;\n let reject: any = null;\n\n const promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const id = ++this.navigationId;\n this.setTransition({\n id,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => { return Promise.reject(e); });\n }\n\n private setBrowserUrl(\n url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n const path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', {...state, navigationId: id});\n } else {\n this.location.go(path, '', {...state, navigationId: id});\n }\n }\n\n private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n (this as{routerState: RouterState}).routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n OnDestroy, AfterContentInit {\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLink, {descendants: true})\n links !: QueryList<RouterLink>;\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLinkWithHref, {descendants: true})\n linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n public readonly isActive: boolean = false;\n\n @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n constructor(\n private router: Router, private element: ElementRef, private renderer: Renderer2,\n private cdr: ChangeDetectorRef) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(_ => this.update());\n this.linksWithHrefs.changes.subscribe(_ => this.update());\n this.update();\n }\n\n @Input()\n set routerLinkActive(data: string[]|string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n\n ngOnChanges(changes: SimpleChanges): void { this.update(); }\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private update(): void {\n if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n (this as any).isActive = hasActiveLinks;\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n });\n }\n\n private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n return (link: RouterLink | RouterLinkWithHref) =>\n router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutlet|null = null;\n route: ActivatedRoute|null = null;\n resolver: ComponentFactoryResolver|null = null;\n children = new ChildrenOutletContexts();\n attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n private activated: ComponentRef<any>|null = null;\n private _activatedRoute: ActivatedRoute|null = null;\n private name: string;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n constructor(\n private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n private changeDetector: ChangeDetectorRef) {\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n\n ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n ngOnInit(): void {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n }\n\n get isActivated(): boolean { return !!this.activated; }\n\n get component(): Object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated) throw new Error('Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const snapshot = activatedRoute._futureSnapshot;\n const component = <any>snapshot.routeConfig !.component;\n resolver = resolver || this.resolver;\n const factory = resolver.resolveComponentFactory(component);\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(\n private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of (null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n private loader: RouterConfigLoader;\n // TODO(issue/24571): remove '!'.\n private subscription !: Subscription;\n\n constructor(\n private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n\n setUpPreloading(): void {\n this.subscription =\n this.router.events\n .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n const ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n }\n\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n const childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n\n // recurse into children\n } else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n return from(res).pipe(mergeAll(), map((_) => void 0));\n }\n\n private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const loaded$ = this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n route._loadedConfig = config;\n return this.processRoutes(config.module, config.routes);\n }));\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n private routerEventsSubscription !: Unsubscribable;\n // TODO(issue/24571): remove '!'.\n private scrollEventsSubscription !: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n constructor(\n private router: Router,\n /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n anchorScrolling?: 'disabled'|'enabled'\n } = {}) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.router.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.router.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n this.router.triggerEvent(new Scroll(\n routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n }\n\n ngOnDestroy() {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RouterEvent} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\nconst ROUTER_DIRECTIVES =\n [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n@NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n // Note: We are injecting the Router so it gets created eagerly...\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\n}\n\nexport function createRouterScroller(\n router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @description\n *\n * Represents an option to configure when the initial navigation is performed.\n *\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @publicApi\n */\nexport type InitialNavigation =\n true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @description\n *\n * Represents options to configure the router.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See `PreloadAllModules`.\n */\n preloadingStrategy?: any;\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation?: 'reload'|'ignore';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'--does nothing (default).\n * * 'top'--set the scroll position to 0,0..\n * * 'enabled'--set the scroll position to the stored position. This option will be the default in\n * the future.\n *\n * When enabled, the router stores and restores scroll positions during navigation.\n * When navigating forward, the scroll position will be set to [0, 0], or to the anchor\n * if one is provided.\n *\n * You can implement custom scroll restoration behavior as follows.\n * ```typescript\n * class AppModule {\n * constructor(router: Router, viewportScroller: ViewportScroller, store: Store<AppState>) {\n * router.events.pipe(filter(e => e instanceof Scroll), switchMap(e => {\n * return store.pipe(first(), timeout(200), map(() => e));\n * }).subscribe(e => {\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else if (e.anchor) {\n * viewportScroller.scrollToAnchor(e.anchor);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n * ```\n *\n * You can also implement component-specific scrolling like this:\n *\n * ```typescript\n * class ListComponent {\n * list: any[];\n * constructor(router: Router, viewportScroller: ViewportScroller, fetcher: ListFetcher) {\n * const scrollEvents = router.events.filter(e => e instanceof Scroll);\n * listFetcher.fetch().pipe(withLatestFrom(scrollEvents)).subscribe(([list, e]) => {\n * this.list = list;\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n */\n scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n /**\n * Configures if the router should scroll to the element when the url has a fragment.\n *\n * * 'disabled'--does nothing (default).\n * * 'enabled'--scrolls to the element. This option will be the default in the future.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled'|'enabled';\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with two numbers, the router will always use the numbers.\n * When given a function, the router will invoke the function every time it restores scroll\n * position.\n */\n scrollOffset?: [number, number]|(() => [number, number]);\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n /**\n * A custom malformed uri error handler function. This handler is invoked when encodedURI contains\n * invalid character sequences. The default implementation is to redirect to the root url dropping\n * any path or param info. This function passes three parameters:\n *\n * - `'URIError'` - Error thrown when parsing a bad URL\n * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n * - `'url'` - The malformed URL that caused the URIError\n * */\n malformedUriErrorHandler?:\n (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy?: 'deferred'|'eager';\n\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * Example:\n *\n * ```\n * const routes = [\n * {\n * path: '',\n * component: ContainerComponent,\n * children: [\n * { path: 'a', component: AComponent },\n * { path: 'b', component: BComponent },\n * ]\n * }\n * ];\n * ```\n *\n * From the `ContainerComponent`, this will not work:\n *\n * `<a [routerLink]=\"['./a']\">Link to A</a>`\n *\n * However, this will work:\n *\n * `<a [routerLink]=\"['../a']\">Link to A</a>`\n *\n * In other words, you're required to use `../` rather than `./`. This is currently the default\n * behavior. Setting this option to `corrected` enables the fix.\n */\n relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router = new Router(\n null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.enableTracing) {\n const dom = getDOM();\n router.events.subscribe((e: RouterEvent) => {\n dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n\n return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n private initNavigation: boolean = false;\n private resultOfPreactivationDone = new Subject<void>();\n\n constructor(private injector: Injector) {}\n\n appInitializer(): Promise<any> {\n const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let resolve: Function = null !;\n const res = new Promise(r => resolve = r);\n const router = this.injector.get(Router);\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null) as any;\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n\n bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n const preloader = this.injector.get(RouterPreloader);\n const routerScroller = this.injector.get(RouterScroller);\n const router = this.injector.get(Router);\n const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null !);\n this.resultOfPreactivationDone.complete();\n }\n\n private isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n\n private isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('7.2.8');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_n} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_l,TreeNode as ɵangular_packages_router_router_m} from './src/utils/tree';"],"names":["last","map","lastValue","isObservable","isPromise","applyRedirects","applyRedirectsFn","NoMatch","split","match","getOutlet","recognize","recognizeFn","Console","getDOM"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,WAAW;;;;;IACtB,YAEW,EAAU,EAEV,GAAW;QAFX,OAAE,GAAF,EAAE,CAAQ;QAEV,QAAG,GAAH,GAAG,CAAQ;KAAI;CAC3B;;;;;;;;AASD,MAAa,eAAgB,SAAQ,WAAW;;;;;;;IA0B9C;;IAEI,EAAU;;IAEV,GAAW;;IAEX,oBAA0D,YAAY;;IAEtE,gBAA+D,IAAI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AgB,oBAAoB,CAAC,CAAoB;IACvD,OAAO,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACpC;;;;;;;AAOD,MAAa,kBAAkB,GAC3B,IAAI,cAAc,CAAuC,oBAAoB,CAAC;;;;AAElF,SAAgB,wBAAwB;IACtC,OAAO;QACL,iBAAiB;QACjB;YACE,OAAO,EAAE,eAAe;YACxB,KAAK,EAAE,IAAI;YACX,UAAU,EAAE,iBAAiB;YAC7B,IAAI,EAAE,CAAC,iBAAiB,CAAC;SAC1B;QACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;QAC1F,EAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;KAChF,CAAC;CACH;;;;;;;;;;AChmBD,MAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;ACnBvD;;GAEG;;;;"}
\ No newline at end of file

fesm2015/testing.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

fesm2015/upgrade.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

fesm5/router.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
@@ -5717,7 +5717,7 @@
/**
* @publicApi
*/
-var VERSION = new Version('7.2.7');
+var VERSION = new Version('7.2.8');
/**
* @license

fesm5/router.js.map

@@ -1 +1 @@
-{"version":3,"file":"router.js","sources":["../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/src/index.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../../../../packages/router/router.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * @description\n *\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** @docsNotRequired */\n public id: number,\n /** @docsNotRequired */\n public url: string) {}\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n /**\n * This reflects the state object that was previously supplied to the pushState call. This is\n * not null only when the navigation is triggered by a popstate event.\n *\n * The router assigns a navigationId to every router transition/navigation. Even when the user\n * clicks on the back button in the browser, a new navigation id will be created. So from\n * the perspective of the router, the router never \"goes back\". By using the `restoredState`\n * and its navigationId, you can implement behavior that differentiates between creating new\n * states\n * and popstate events. In the latter case you can restore some remembered state (e.g., scroll\n * position).\n *\n * See {@link NavigationExtras} for more information.\n */\n restoredState?: {[k: string]: any, navigationId: number}|null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any, navigationId: number}|null = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public reason: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\nexport class Scroll {\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd,\n\n /** @docsNotRequired */\n readonly position: [number, number]|null,\n\n /** @docsNotRequired */\n readonly anchor: string|null) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a router event, allowing you to track the lifecycle of the router.\n *\n * The sequence of router events is:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class EmptyOutletComponent {\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of parameters.\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any\n};\n\n/**\n * Matrix and Query parameters.\n *\n * `ParamMap` makes it easier to work with parameters as they could have either a single value or\n * multiple value. Because this should be known by the user, calling `get` or `getAll` returns the\n * correct type (either `string` or `string[]`).\n *\n * The API is inspired by the URLSearchParams interface.\n * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n *\n * @publicApi\n */\nexport interface ParamMap {\n has(name: string): boolean;\n /**\n * Return a single value for the given parameter name:\n * - the value when the parameter has a single value,\n * - the first value if the parameter has multiple values,\n * - `null` when there is no such parameter.\n */\n get(name: string): string|null;\n /**\n * Return an array of values for the given parameter name.\n *\n * If there is no such parameter, an empty array is returned.\n */\n getAll(name: string): string[];\n\n /** Name of the parameters */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) { this.params = params || {}; }\n\n has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n get(name: string): string|null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n const error = Error('NavigationCancelingError: ' + message);\n (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n const parts = route.path !.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Represents router configuration.\n *\n * `Routes` is an array of route configurations. Each one has the following properties:\n *\n * - `path` is a string that uses the route matcher DSL.\n * - `pathMatch` is a string that specifies the matching strategy. Options are `prefix` (default)\n * and `full`. See [Matching Strategy](#matching-strategy) below for more information.\n * - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.\n * - `component` is a component type.\n * - `redirectTo` is the url fragment which will replace the current matched segment.\n * - `outlet` is the name of the outlet the component should be placed into.\n * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See\n * `CanActivate` for more info.\n * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See\n * `CanActivateChild` for more info.\n * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See\n * `CanDeactivate` for more info.\n * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See\n * `CanLoad` for more info.\n * - `data` is additional data provided to the component via `ActivatedRoute`.\n * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more\n * info.\n * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only\n * when the matrix parameters of the route change. Options include:\n * - `paramsChange` (default) - Run guards and resolvers when path or matrix params change. This\n * mode ignores query param changes.\n * - `paramsOrQueryParamsChange` - Guards and resolvers will run when any parameters change. This\n * includes path, matrix, and query params.\n * - `pathParamsChange` - Run guards and resolvers path or any path params change. This mode is\n * useful if you want to ignore changes to all optional parameters such as query *and* matrix\n * params.\n * - `pathParamsOrQueryParamsChange` - Same as `pathParamsChange`, but also rerun when any query\n * param changes\n * - `always` - Run guards and resolvers on every navigation.\n * - (from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean - Use a predicate\n * function when none of the pre-configured modes fit the needs of the application. An example\n * might be when you need to ignore updates to a param such as `sortDirection`, but need to\n * reload guards and resolvers when changing the `searchRoot` param.\n * - `children` is an array of child route definitions.\n * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more\n * info.\n *\n * @usageNotes\n * ### Simple Configuration\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/bob`, the router will create the team component with the user\n * component in it.\n *\n * ### Multiple Outlets\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * When navigating to `/team/11(aux:chat/jim)`, the router will create the team component next to\n * the chat component. The chat component will be placed into the aux outlet.\n *\n * ### Wild Cards\n *\n * ```\n * [{\n * path: '**',\n * component: Sink\n * }]\n * ```\n *\n * Regardless of where you navigate to, the router will instantiate the sink component.\n *\n * ### Redirects\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to '/team/11/legacy/user/jim', the router will change the url to\n * '/team/11/user/jim', and then will instantiate the team component with the user component\n * in it.\n *\n * If the `redirectTo` value starts with a '/', then it is an absolute redirect. E.g., if in the\n * example above we change the `redirectTo` to `/user/:name`, the result url will be '/user/jim'.\n *\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any url segments. Let's look at the following configuration:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11`, the router will instantiate the AllUsers component.\n *\n * Empty-path routes can have children.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/jim`, the router will instantiate the wrapper component with\n * the user component in it.\n *\n * An empty path route inherits its parent's params and data. This is because it cannot have its\n * own params, and, as a result, it often uses its parent's params and data as its own.\n *\n * ### Matching Strategy\n *\n * By default the router will look at what is left in the url, and check if it starts with\n * the specified path (e.g., `/team/11/user` starts with `team/:id`).\n *\n * We can change the matching strategy to make sure that the path covers the whole unconsumed url,\n * which is akin to `unconsumedUrl === path` or `$` regular expressions.\n *\n * This is particularly important when redirecting empty-path routes.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * Since an empty path is a prefix of any url, even when navigating to '/main', the router will\n * still apply the redirect.\n *\n * If `pathMatch: full` is provided, the router will apply the redirect if and only if navigating to\n * '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * It is useful at times to have the ability to share parameters between sibling components.\n *\n * Say we have two components--ChildCmp and AuxCmp--that we want to put next to each other and both\n * of them require some id parameter.\n *\n * One way to do that would be to have a bogus parent component, so both the siblings can get the id\n * parameter from it. This is not ideal. Instead, you can use a componentless route.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * So when navigating to `parent/10/(a//aux:b)`, the route will instantiate the main child and aux\n * child components next to each other. In this example, the application component\n * has to have the primary and aux outlets defined.\n *\n * The router will also merge the `params`, `data`, and `resolve` of the componentless parent into\n * the `params`, `data`, and `resolve` of the children. This is done because there is no component\n * that can inject the activated route of the componentless parent.\n *\n * This is especially useful when child components are defined as follows:\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * With this configuration in place, navigating to '/parent/10' will create the main child and aux\n * components.\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up our application load time by splitting it into multiple bundles, and\n * loading them on demand. The router is designed to make lazy loading simple and easy. Instead of\n * providing the children property, you can provide the `loadChildren` property, as follows:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * loadChildren: 'team'\n * }]\n * ```\n *\n * The router will use registered NgModuleFactoryLoader to fetch an NgModule associated with 'team'.\n * Then it will extract the set of routes defined in that NgModule, and will transparently add\n * those routes to the main configuration.\n *\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * @description Represents the results of the URL matching.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * @description\n *\n * A function matching URLs\n *\n * A custom URL matcher can be provided when a combination of `path` and `pathMatch` isn't\n * expressive enough.\n *\n * For instance, the following matcher matches html files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n UrlMatchResult;\n\n/**\n * @description\n *\n * Represents the static data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type Data = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * Represents the resolved data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type ResolveData = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildren = string | LoadChildrenCallback;\n\n/**\n * @description\n *\n * The type of `queryParamsHandling`.\n *\n * See `RouterLink` for more details.\n *\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * @description\n *\n * The type of `runGuardsAndResolvers`.\n *\n * See `Routes` for more details.\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport interface Route {\n path?: string;\n pathMatch?: string;\n matcher?: UrlMatcher;\n component?: Type<any>;\n redirectTo?: string;\n outlet?: string;\n canActivate?: any[];\n canActivateChild?: any[];\n canDeactivate?: any[];\n canLoad?: any[];\n data?: Data;\n resolve?: ResolveData;\n children?: Routes;\n loadChildren?: LoadChildren;\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n /**\n * Filled for routes with `loadChildren` once the module has been loaded\n * @internal\n */\n _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n if (!route) {\n throw new Error(`\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && route.component) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n }\n if (route.path && route.matcher) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp =\n `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new Error(\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\n `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n let key: string;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\n\nexport function waitForMap<A, B>(\n obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n if (Object.keys(obj).length === 0) {\n return of ({});\n }\n\n const waitHead: Observable<B>[] = [];\n const waitTail: Observable<B>[] = [];\n const res: {[k: string]: B} = {};\n\n forEach(obj, (a: A, k: string) => {\n const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n } else {\n waitTail.push(mapped);\n }\n });\n\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n }\n return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n return true;\n\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n }\n return true;\n\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup,\n /** The query params of the URL */\n public queryParams: Params,\n /** The fragment of the URL */\n public fragment: string|null) {}\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _sourceSegment !: UrlSegmentGroup;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _segmentIndexShift !: number;\n /** The parent node in the url tree */\n parent: UrlSegmentGroup|null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup}) {\n forEach(children, (v: any, k: any) => v.parent = this);\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n /** Number of child segments */\n get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n /** @docsNotRequired */\n toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _parameterMap !: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string}) {}\n\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n let res: T[] = [];\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children: string[] = [];\n\n forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n\n });\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.keys(params).map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n });\n\n return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) { this.remaining = url; }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string|null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: any} {\n const params: {[key: string]: any} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: any}): void {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(`Cannot parse url '${this.url}'`);\n }\n\n let outletName: string = undefined !;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new Error(`Expected \"${str}\".`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) { this._root = root; }\n\n get root(): T { return this._root.value; }\n\n /**\n * @internal\n */\n parent(t: T): T|null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T|null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(public value: T, public children: TreeNode<T>[]) {}\n\n toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n\n return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(\n emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n // TODO(issue/24571): remove '!'.\n snapshot !: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterState;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: Observable<ParamMap>;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: Observable<ParamMap>;\n\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route */\n public url: Observable<UrlSegment[]>,\n /** An observable of the matrix parameters scoped to this route */\n public params: Observable<Params>,\n /** An observable of the query parameters shared by all the routes */\n public queryParams: Observable<Params>,\n /** An observable of the URL fragment shared by all the routes */\n public fragment: Observable<string>,\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>,\n /** The outlet name of the route. It's a constant */\n public outlet: string,\n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n this._futureSnapshot = futureSnapshot;\n }\n\n /** The configuration used to match this route */\n get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n /** The root of the router state */\n get root(): ActivatedRoute { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): Observable<ParamMap> {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n\n get queryParamMap(): Observable<ParamMap> {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params,\n data: Data,\n resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n route: ActivatedRouteSnapshot,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n const pathFromRoot = route.pathFromRoot;\n\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n\n // parent is componentless => current route should inherit its params and data\n } else if (!parent.component) {\n inheritingStartingFrom--;\n\n } else {\n break;\n }\n }\n }\n\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n return pathFromRoot.reduce((res, curr) => {\n const params = {...res.params, ...curr.params};\n const data = {...res.data, ...curr.data};\n const resolve = {...res.resolve, ...curr._resolvedData};\n return {params, data, resolve};\n }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route|null;\n /** @internal **/\n _urlSegment: UrlSegmentGroup;\n /** @internal */\n _lastPathIndex: number;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _resolvedData !: Data;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterStateSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: ParamMap;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /** The matrix parameters scoped to this route */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n lastPathIndex: number, resolve: ResolveData) {\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): ParamMap {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n (<any>route.queryParams).next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n (<any>route.fragment).next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n (<any>route.params).next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n (<any>route.url).next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n (<any>route.data).next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n (<any>route.data).next(route._futureSnapshot.data);\n }\n}\n\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n prevState: RouterState): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n } else {\n const detachedRouteHandle =\n <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n\n } else {\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (let i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n fragment: string): UrlTree {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n\n const startingPosition = findStartingPosition(nav, urlTree, route);\n\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(\n startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n queryParams: Params, fragment: string): UrlTree {\n let qp: any = {};\n if (queryParams) {\n forEach(queryParams, (value: any, name: any) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n\n const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n forEach(cmd.outlets, (commands: any, name: string) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(\n route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent !;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const curr = getPath(commands[currentCommandIndex]);\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n const children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n\n const curr = getPath(commands[i]);\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n forEach(params, (v: any, k: string) => res[k] = `${v}`);\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n map(t => {\n new ActivateRoutes(\n routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n\n if (context) {\n const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n const contexts = route.value.component ? context.children : parentContexts;\n\n forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored =\n (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n } else {\n const config = parentLoadedConfig(future.snapshot);\n const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n if (route && route.component) return null;\n }\n\n return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n public segmentGroup: UrlSegmentGroup|null;\n\n constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return new Observable<LoadedRouterConfig>(\n (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n private allowRedirects: boolean = true;\n private ngModule: NgModuleRef<any>;\n\n constructor(\n moduleInjector: Injector, private configLoader: RouterConfigLoader,\n private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n\n apply(): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n return urlTrees$.pipe(catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private match(tree: UrlTree): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) =>\n this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private noMatchError(e: NoMatch): any {\n return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n\n private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n UrlTree {\n const root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n }\n\n private expandSegmentGroup(\n ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n outlet: string): Observable<UrlSegmentGroup> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n }\n\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n\n // Recursively expand segment groups for all the child outlets\n private expandChildren(\n ngModule: NgModuleRef<any>, routes: Route[],\n segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n return waitForMap(\n segmentGroup.children,\n (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n }\n\n private expandSegment(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n segments: UrlSegment[], outlet: string,\n allowRedirects: boolean): Observable<UrlSegmentGroup> {\n return of (...routes).pipe(\n map((r: any) => {\n const expanded$ = this.expandSegmentAgainstRoute(\n ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e: any) => {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return of (null) as any;\n }\n throw e;\n }));\n }),\n concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of (new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n private expandSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, paths, outlet);\n }\n\n return noMatch(segmentGroup);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule, routes, route, outlet);\n }\n\n return this.expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, segments, outlet);\n }\n\n private expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n outlet: string): Observable<UrlSegmentGroup> {\n const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n }\n\n private expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n const {matched, consumedSegments, lastChild, positionalParamSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n const newTree = this.applyRedirectCommands(\n consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n return this.expandSegment(\n ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n false);\n }));\n }\n\n private matchSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n\n return of (new UrlSegmentGroup(segments, {}));\n }\n\n const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n if (!matched) return noMatch(rawSegmentGroup);\n\n const rawSlicedSegments = segments.slice(lastChild);\n const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n const childModule = routerConfig.module;\n const childConfig = routerConfig.routes;\n\n const {segmentGroup, slicedSegments} =\n split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$.pipe(\n map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of (new UrlSegmentGroup(consumedSegments, {}));\n }\n\n const expanded$ = this.expandSegment(\n childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(\n map((cs: UrlSegmentGroup) =>\n new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }\n\n private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of (new LoadedRouterConfig(route.children, ngModule));\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of (route._loadedConfig);\n }\n\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap((shouldLoad: boolean) => {\n if (shouldLoad) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n\n return of (new LoadedRouterConfig([], ngModule));\n }\n\n private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of (res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo !);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n private applyRedirectCommands(\n segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n return this.applyRedirectCreatreUrlTree(\n redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n\n private applyRedirectCreatreUrlTree(\n redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment);\n }\n\n private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n forEach(redirectToParams, (v: any, k: string) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n private createSegmentGroup(\n redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n private createSegments(\n redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n return redirectToSegments.map(\n s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n\n private findPosParam(\n redirectTo: string, redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment}): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n\n private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction runCanLoadGuard(\n moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n const canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0) return of (true);\n\n const obs = from(canLoad).pipe(map((injectionToken: any) => {\n const guard = moduleInjector.get(injectionToken);\n let guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n } else if (isFunction<CanLoadFn>(guard)) {\n guardVal = guard(route, segments);\n } else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n\n return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n matched: boolean,\n consumedSegments: UrlSegment[],\n lastChild: number,\n positionalParamSegments: {[k: string]: UrlSegment}\n} {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n\n if (!res) {\n return {\n matched: false,\n consumedSegments: <any[]>[],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n\n return {\n matched: true,\n consumedSegments: res.consumed !,\n lastChild: res.consumed.length !,\n positionalParamSegments: res.posParams !,\n };\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[]) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptySegments(\n config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n segmentGroup, slicedSegments, config, segmentGroup.children));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n }\n\n return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(switchMap(\n t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[],\n canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot, curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n {node: ActivatedRouteSnapshot, guards: any[]}|null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n const config = getClosestLoadedConfig(snapshot);\n const injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n if (!snapshot) return null;\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n }\n\n return null;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n forEach(\n prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun =\n shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun) {\n const component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n return switchMap(obs => {\n return combineLatest(\n ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n .pipe(\n scan(\n (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n let isPending = false;\n return list.reduce((innerAcc, val, i: number) => {\n if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE) isPending = true;\n\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false) return val;\n\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n\n return innerAcc;\n }, acc);\n },\n INITIAL_VALUE),\n filter(item => item !== INITIAL_VALUE),\n map(item => isUrlTree(item) ? item : item === true), //\n take(1)) as Observable<boolean|UrlTree>;\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of ({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n .pipe(\n mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(\n targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n of (canDeactivate);\n }),\n map(guardsResult => ({...t, guardsResult})));\n }));\n };\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n moduleInjector: Injector) {\n return from(checks).pipe(\n mergeMap(\n check =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n forwardEvent?: (evt: Event) => void) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(result => {\n return result !== true;\n }, true as boolean | UrlTree));\n }),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of (true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of (true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of (true);\n\n const canActivateObservables = canActivate.map((c: any) => {\n return defer(() => {\n const guard = getToken(c, futureARS, moduleInjector);\n let observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n } else if (isFunction<CanActivateFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map((c: any) => {\n const guard = getToken(c, d.node, moduleInjector);\n let observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n } else if (isFunction<CanActivateChildFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of (guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of (true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const guard = getToken(c, currARS, moduleInjector);\n let observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n } else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n return new Recognizer(\n rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n relativeLinkResolution)\n .recognize();\n}\n\nclass Recognizer {\n constructor(\n private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private relativeLinkResolution: 'legacy'|'corrected') {}\n\n recognize(): Observable<RouterStateSnapshot> {\n try {\n const rootSegmentGroup =\n split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n const root = new ActivatedRouteSnapshot(\n [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n this.urlTree.root, -1, {});\n\n const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of (routeState);\n\n } catch (e) {\n return new Observable<RouterStateSnapshot>(\n (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n }\n }\n\n inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n const route = routeNode.value;\n\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n\n processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n TreeNode<ActivatedRouteSnapshot>[] {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n }\n\n processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n TreeNode<ActivatedRouteSnapshot>[] {\n const children = mapChildrenIntoArray(\n segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n }\n\n processSegment(\n config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n for (const r of config) {\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n } catch (e) {\n if (!(e instanceof NoMatch)) throw e;\n }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n\n throw new NoMatch();\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n processSegmentAgainstRoute(\n route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n if (route.redirectTo) throw new NoMatch();\n\n if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n let snapshot: ActivatedRouteSnapshot;\n let consumedSegments: UrlSegment[] = [];\n let rawSlicedSegments: UrlSegment[] = [];\n\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments) !.parameters : {};\n snapshot = new ActivatedRouteSnapshot(\n segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n } else {\n const result: MatchResult = match(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n\n snapshot = new ActivatedRouteSnapshot(\n consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n\n const childConfig: Route[] = getChildConfig(route);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const children = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n }\n\n const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n if (route.children) {\n return route.children;\n }\n\n if (route.loadChildren) {\n return route._loadedConfig !.routes;\n }\n\n return [];\n}\n\ninterface MatchResult {\n consumedSegments: UrlSegment[];\n lastChild: number;\n parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch();\n }\n\n return {consumedSegments: [], lastChild: 0, parameters: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) throw new NoMatch();\n\n const posParams: {[n: string]: string} = {};\n forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n const parameters = res.consumed.length > 0 ?\n {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n posParams;\n\n return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n let s = segmentGroup;\n let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptyPaths(\n segmentGroup, consumedSegments, config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n segmentGroup, consumedSegments, slicedSegments, config,\n segmentGroup.children, relativeLinkResolution));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n routes: Route[], children: {[name: string]: UrlSegmentGroup},\n relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n } else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n 'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(\n t => recognizeFn(\n rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n if (!canActivateChecks.length) {\n return of (t);\n }\n\n return from(canActivateChecks)\n .pipe(\n concatMap(\n check => runResolve(\n check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n reduce((_: any, __: any) => _), map(_ => t));\n }));\n };\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n const resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = {\n ...futureARS.data,\n ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n return null;\n }));\n}\n\nfunction resolveNode(\n resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of ({});\n }\n if (keys.length === 1) {\n const key = keys[0];\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => { return {[key]: value}; }));\n }\n const data: {[k: string]: any} = {};\n const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n MonoTypeOperatorFunction<T> {\n return function(source) {\n return source.pipe(switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return from([v]);\n }));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>,\n componentRef: ComponentRef<any>,\n route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\n// TODO(i): switch to fromPromise once it's expored in rxjs\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * @docsNotRequired\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n constructor(\n private loader: NgModuleFactoryLoader, private compiler: Compiler,\n private onLoadStartListener?: (r: Route) => void,\n private onLoadEndListener?: (r: Route) => void) {}\n\n load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n\n const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n\n const module = factory.create(parentInjector);\n\n return new LoadedRouterConfig(\n flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n }\n\n private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n } else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n if (t instanceof NgModuleFactory) {\n return of (t);\n } else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean { return true; }\n extract(url: UrlTree): UrlTree { return url; }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Represents the extra options used during navigation.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n /**\n * Enables relative navigation from the current ActivatedRoute.\n *\n * Configuration:\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * Navigate to list route from child route:\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * this.router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n */\n relativeTo?: ActivatedRoute|null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params|null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * this.router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * Preserves the query parameters for the next navigation.\n *\n * deprecated, use `queryParamsHandling` instead\n *\n * ```\n * // Preserve query params from /results?page=1 to /view?page=1\n * this.router.navigate(['/view'], { preserveQueryParams: true });\n * ```\n *\n * @deprecated since v4\n */\n preserveQueryParams?: boolean;\n\n /**\n * config strategy to handle the query parameters for the next navigation.\n *\n * ```\n * // from /results?page=1 to /view?page=1&page=2\n * this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: \"merge\" });\n * ```\n */\n queryParamsHandling?: QueryParamsHandling|null;\n /**\n * Preserves the fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * this.router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n /**\n * Navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n /**\n * Navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n /**\n * State passed to any navigation. This value will be accessible through the `extras` object\n * returned from `router.getCurrentNavigation()` while a navigation is executing. Once a\n * navigation completes, this value will be written to `history.state` when the `location.go`\n * or `location.replaceState` method is called before activating of this route. Note that\n * `history.state` will not pass an object equality test because the `navigationId` will be\n * added to the state before being written.\n *\n * While `history.state` can accept any type of value, because the router adds the `navigationId`\n * on each navigation, the `state` must always be an object.\n */\n state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Error handler that is invoked when a navigation errors.\n *\n * If the handler returns a value, the navigation promise will be resolved with this value.\n * If the handler throws an exception, the navigation promise will be rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n [k: string]: any; navigationId: number;\n};\n\n/**\n * @description\n *\n * Information about any given navigation. This information can be gotten from the router at\n * any time using the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n /**\n * The ID of the current navigation.\n */\n id: number;\n /**\n * Target URL passed into the {@link Router#navigateByUrl} call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: string | UrlTree;\n /**\n * The initial target URL after being parsed with {@link UrlSerializer.extract()}.\n */\n extractedUrl: UrlTree;\n /**\n * Extracted URL after redirects have been applied. This URL may not be available immediately,\n * therefore this property can be `undefined`. It is guaranteed to be set after the\n * {@link RoutesRecognized} event fires.\n */\n finalUrl?: UrlTree;\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * The NavigationExtras used in this navigation. See {@link NavigationExtras} for more info.\n */\n extras: NavigationExtras;\n /**\n * Previously successful Navigation object. Only a single previous Navigation is available,\n * therefore this previous Navigation will always have a `null` value for `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n id: number,\n currentUrlTree: UrlTree,\n currentRawUrl: UrlTree,\n extractedUrl: UrlTree,\n urlAfterRedirects: UrlTree,\n rawUrl: UrlTree,\n extras: NavigationExtras,\n resolve: any,\n reject: any,\n promise: Promise<boolean>,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n currentSnapshot: RouterStateSnapshot,\n targetSnapshot: RouterStateSnapshot | null,\n currentRouterState: RouterState,\n targetRouterState: RouterState | null,\n guards: Checks,\n guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}): Observable<void> {\n return of (null) as any;\n}\n\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n private currentUrlTree: UrlTree;\n private rawUrlTree: UrlTree;\n private browserUrlTree: UrlTree;\n private readonly transitions: BehaviorSubject<NavigationTransition>;\n private navigations: Observable<NavigationTransition>;\n private lastSuccessfulNavigation: Navigation|null = null;\n private currentNavigation: Navigation|null = null;\n\n // TODO(issue/24571): remove '!'.\n private locationSubscription !: Subscription;\n private navigationId: number = 0;\n private configLoader: RouterConfigLoader;\n private ngModule: NgModuleRef<any>;\n private console: Console;\n private isNgZoneEnabled: boolean = false;\n\n public readonly events: Observable<Event> = new Subject<Event>();\n public readonly routerState: RouterState;\n\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n errorHandler: ErrorHandler = defaultErrorHandler;\n\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n malformedUriErrorHandler:\n (error: URIError, urlSerializer: UrlSerializer,\n url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n /**\n * Indicates if at least one navigation happened.\n */\n navigated: boolean = false;\n private lastSuccessfulId: number = -1;\n\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n /**\n * See {@link RouterModule} for more information.\n */\n relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n constructor(\n private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n\n this.processNavigations();\n }\n\n private setupNavigations(transitions: Observable<NavigationTransition>):\n Observable<NavigationTransition> {\n const eventsSubject = (this.events as Subject<Event>);\n return transitions.pipe(\n filter(t => t.id !== 0),\n\n // Extract URL\n map(t => ({\n ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n } as NavigationTransition)),\n\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n {...this.lastSuccessfulNavigation, previousNavigation: null} :\n null\n };\n }),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(t => {\n let completed = false;\n let errored = false;\n return of (t).pipe(\n switchMap(t => {\n const urlTransition =\n !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n const processCurrentUrl =\n (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n if (processCurrentUrl) {\n return of (t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions.getValue();\n eventsSubject.next(new NavigationStart(\n t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }),\n\n // This delay is required to match old behavior that forced navigation to\n // always be async\n switchMap(t => Promise.resolve(t)),\n\n // ApplyRedirects\n applyRedirects(\n this.ngModule.injector, this.configLoader, this.urlSerializer,\n this.config),\n\n // Update the currentNavigation\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation !,\n finalUrl: t.urlAfterRedirects\n };\n }),\n\n // Recognize\n recognize(\n this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n // Update URL if in `eager` update mode\n tap(t => {\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n // Fire RoutesRecognized\n tap(t => {\n const routesRecognized = new RoutesRecognized(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n eventsSubject.next(routesRecognized);\n }), );\n } else {\n const processPreviousUrl = urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id, this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n const targetSnapshot =\n createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n return of ({\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n });\n } else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }),\n\n // Before Preactivation\n switchTap(t => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.beforePreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !);\n this.triggerEvent(guardsStart);\n }),\n\n map(t => ({\n ...t,\n guards:\n getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n })),\n\n checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n tap(t => {\n if (isUrlTree(t.guardsResult)) {\n const error: Error&{url?: UrlTree} = navigationCancelingError(\n `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n error.url = t.guardsResult;\n throw error;\n }\n }),\n\n tap(t => {\n const guardsEnd = new GuardsCheckEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !, !!t.guardsResult);\n this.triggerEvent(guardsEnd);\n }),\n\n filter(t => {\n if (!t.guardsResult) {\n this.resetUrlToCurrentUrlTree();\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of (t).pipe(\n tap(t => {\n const resolveStart = new ResolveStart(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveStart);\n }),\n resolveData(\n this.paramsInheritanceStrategy,\n this.ngModule.injector), //\n tap(t => {\n const resolveEnd = new ResolveEnd(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveEnd);\n }), );\n }\n return undefined;\n }),\n\n // --- AFTER PREACTIVATION ---\n switchTap((t: NavigationTransition) => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.afterPreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n return ({...t, targetRouterState});\n }),\n\n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n tap((t: NavigationTransition) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n if (this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(\n this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n activateRoutes(\n this.rootContexts, this.routeReuseStrategy,\n (evt: Event) => this.triggerEvent(evt)),\n\n tap({next() { completed = true; }, complete() { completed = true; }}),\n finalize(() => {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n this.resetUrlToCurrentUrlTree();\n const navCancel = new NavigationCancel(\n t.id, this.serializeUrl(t.extractedUrl),\n `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n this.currentNavigation = null;\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n const redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n this.navigated = true;\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n\n if (redirecting) {\n this.navigateByUrl(e.url);\n }\n\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n } else {\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(this.errorHandler(e));\n } catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }), );\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n })) as any as Observable<NavigationTransition>;\n }\n\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n resetRootComponentType(rootComponentType: Type<any>): void {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n\n private getTransition(): NavigationTransition { return this.transitions.value; }\n\n private setTransition(t: Partial<NavigationTransition>): void {\n this.transitions.next({...this.getTransition(), ...t});\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n }\n }\n\n /**\n * Sets up the location change listener.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = <any>this.location.subscribe((change: any) => {\n let rawUrlTree = this.parseUrl(change['url']);\n const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n const state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(\n () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n });\n }\n }\n\n /** The current url */\n get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n /** The current Navigation object if one exists */\n getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n /** @internal */\n triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n\n /** @docsNotRequired */\n ngOnDestroy(): void { this.dispose(); }\n\n /** Disposes of the router */\n dispose(): void {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null !;\n }\n }\n\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n const {relativeTo, queryParams, fragment,\n preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n const a = relativeTo || this.routerState.root;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params|null = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n } else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n }\n\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\n `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n let urlTree: UrlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n\n /** Returns whether the url is activated */\n isActive(url: string|UrlTree, exact: boolean): boolean {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.keys(params).reduce((result: Params, key: string) => {\n const value: any = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private processNavigations(): void {\n this.navigations.subscribe(\n t => {\n this.navigated = true;\n this.lastSuccessfulId = t.id;\n (this.events as Subject<Event>)\n .next(new NavigationEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.currentNavigation = null;\n t.resolve(true);\n },\n e => { this.console.warn(`Unhandled Navigation Error: `); });\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n extras: NavigationExtras): Promise<boolean> {\n const lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n let resolve: any = null;\n let reject: any = null;\n\n const promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const id = ++this.navigationId;\n this.setTransition({\n id,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => { return Promise.reject(e); });\n }\n\n private setBrowserUrl(\n url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n const path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', {...state, navigationId: id});\n } else {\n this.location.go(path, '', {...state, navigationId: id});\n }\n }\n\n private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n (this as{routerState: RouterState}).routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n OnDestroy, AfterContentInit {\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLink, {descendants: true})\n links !: QueryList<RouterLink>;\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLinkWithHref, {descendants: true})\n linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n public readonly isActive: boolean = false;\n\n @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n constructor(\n private router: Router, private element: ElementRef, private renderer: Renderer2,\n private cdr: ChangeDetectorRef) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(_ => this.update());\n this.linksWithHrefs.changes.subscribe(_ => this.update());\n this.update();\n }\n\n @Input()\n set routerLinkActive(data: string[]|string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n\n ngOnChanges(changes: SimpleChanges): void { this.update(); }\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private update(): void {\n if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n (this as any).isActive = hasActiveLinks;\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n });\n }\n\n private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n return (link: RouterLink | RouterLinkWithHref) =>\n router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutlet|null = null;\n route: ActivatedRoute|null = null;\n resolver: ComponentFactoryResolver|null = null;\n children = new ChildrenOutletContexts();\n attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n private activated: ComponentRef<any>|null = null;\n private _activatedRoute: ActivatedRoute|null = null;\n private name: string;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n constructor(\n private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n private changeDetector: ChangeDetectorRef) {\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n\n ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n ngOnInit(): void {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n }\n\n get isActivated(): boolean { return !!this.activated; }\n\n get component(): Object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated) throw new Error('Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const snapshot = activatedRoute._futureSnapshot;\n const component = <any>snapshot.routeConfig !.component;\n resolver = resolver || this.resolver;\n const factory = resolver.resolveComponentFactory(component);\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(\n private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of (null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n private loader: RouterConfigLoader;\n // TODO(issue/24571): remove '!'.\n private subscription !: Subscription;\n\n constructor(\n private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n\n setUpPreloading(): void {\n this.subscription =\n this.router.events\n .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n const ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n }\n\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n const childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n\n // recurse into children\n } else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n return from(res).pipe(mergeAll(), map((_) => void 0));\n }\n\n private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const loaded$ = this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n route._loadedConfig = config;\n return this.processRoutes(config.module, config.routes);\n }));\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n private routerEventsSubscription !: Unsubscribable;\n // TODO(issue/24571): remove '!'.\n private scrollEventsSubscription !: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n constructor(\n private router: Router,\n /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n anchorScrolling?: 'disabled'|'enabled'\n } = {}) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.router.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.router.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n this.router.triggerEvent(new Scroll(\n routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n }\n\n ngOnDestroy() {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RouterEvent} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\nconst ROUTER_DIRECTIVES =\n [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n@NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n // Note: We are injecting the Router so it gets created eagerly...\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\n}\n\nexport function createRouterScroller(\n router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @description\n *\n * Represents an option to configure when the initial navigation is performed.\n *\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @publicApi\n */\nexport type InitialNavigation =\n true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @description\n *\n * Represents options to configure the router.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See `PreloadAllModules`.\n */\n preloadingStrategy?: any;\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation?: 'reload'|'ignore';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'--does nothing (default).\n * * 'top'--set the scroll position to 0,0..\n * * 'enabled'--set the scroll position to the stored position. This option will be the default in\n * the future.\n *\n * When enabled, the router stores and restores scroll positions during navigation.\n * When navigating forward, the scroll position will be set to [0, 0], or to the anchor\n * if one is provided.\n *\n * You can implement custom scroll restoration behavior as follows.\n * ```typescript\n * class AppModule {\n * constructor(router: Router, viewportScroller: ViewportScroller, store: Store<AppState>) {\n * router.events.pipe(filter(e => e instanceof Scroll), switchMap(e => {\n * return store.pipe(first(), timeout(200), map(() => e));\n * }).subscribe(e => {\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else if (e.anchor) {\n * viewportScroller.scrollToAnchor(e.anchor);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n * ```\n *\n * You can also implement component-specific scrolling like this:\n *\n * ```typescript\n * class ListComponent {\n * list: any[];\n * constructor(router: Router, viewportScroller: ViewportScroller, fetcher: ListFetcher) {\n * const scrollEvents = router.events.filter(e => e instanceof Scroll);\n * listFetcher.fetch().pipe(withLatestFrom(scrollEvents)).subscribe(([list, e]) => {\n * this.list = list;\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n */\n scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n /**\n * Configures if the router should scroll to the element when the url has a fragment.\n *\n * * 'disabled'--does nothing (default).\n * * 'enabled'--scrolls to the element. This option will be the default in the future.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled'|'enabled';\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with two numbers, the router will always use the numbers.\n * When given a function, the router will invoke the function every time it restores scroll\n * position.\n */\n scrollOffset?: [number, number]|(() => [number, number]);\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n /**\n * A custom malformed uri error handler function. This handler is invoked when encodedURI contains\n * invalid character sequences. The default implementation is to redirect to the root url dropping\n * any path or param info. This function passes three parameters:\n *\n * - `'URIError'` - Error thrown when parsing a bad URL\n * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n * - `'url'` - The malformed URL that caused the URIError\n * */\n malformedUriErrorHandler?:\n (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy?: 'deferred'|'eager';\n\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * Example:\n *\n * ```\n * const routes = [\n * {\n * path: '',\n * component: ContainerComponent,\n * children: [\n * { path: 'a', component: AComponent },\n * { path: 'b', component: BComponent },\n * ]\n * }\n * ];\n * ```\n *\n * From the `ContainerComponent`, this will not work:\n *\n * `<a [routerLink]=\"['./a']\">Link to A</a>`\n *\n * However, this will work:\n *\n * `<a [routerLink]=\"['../a']\">Link to A</a>`\n *\n * In other words, you're required to use `../` rather than `./`. This is currently the default\n * behavior. Setting this option to `corrected` enables the fix.\n */\n relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router = new Router(\n null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.enableTracing) {\n const dom = getDOM();\n router.events.subscribe((e: RouterEvent) => {\n dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n\n return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n private initNavigation: boolean = false;\n private resultOfPreactivationDone = new Subject<void>();\n\n constructor(private injector: Injector) {}\n\n appInitializer(): Promise<any> {\n const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let resolve: Function = null !;\n const res = new Promise(r => resolve = r);\n const router = this.injector.get(Router);\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null) as any;\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n\n bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n const preloader = this.injector.get(RouterPreloader);\n const routerScroller = this.injector.get(RouterScroller);\n const router = this.injector.get(Router);\n const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null !);\n this.resultOfPreactivationDone.complete();\n }\n\n private isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n\n private isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('7.2.7');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, LoadChildren, LoadChildrenCallback, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatchResult, UrlMatcher} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationExtras, Router} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_n} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_l,TreeNode as ɵangular_packages_router_router_m} from './src/utils/tree';"],"names":["tslib_1.__extends","last","map","lastValue","isObservable","isPromise","tslib_1.__values","applyRedirects","applyRedirectsFn","split","NoMatch","match","getOutlet","recognize","recognizeFn","Console","tslib_1.__assign","tslib_1.__decorate","tslib_1.__param","getDOM"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAwBA;;;;;;;;;;;;;;;;;;;;;;AAsBA;IACE;;IAEW,EAAU;;IAEV,GAAW;QAFX,OAAE,GAAF,EAAE,CAAQ;QAEV,QAAG,GAAH,GAAG,CAAQ;KAAI;IAC5B,kBAAC;CAAA,IAAA;AAED;;;;;;;AAOA;IAAqCA,mCAAW;IA0B9C;;IAEI,EAAU;;IAEV,GAAW;;IAEX,iBAAsE;;IAEtE,aAAmE;QAFnE,kCAAA,EAAA,gCAAsE;QAEtE,8BAAA,EAAA,oBAAmE;QARvE,YASE,kBAAM,EAAE,EAAE,GAAG,CAAC,SAGf;QAFC,KAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;KACpC;;IAGD,kCAAQ,GAAR,cAAqB,OAAO,yBAAuB,IAAI,CAAC,EAAE,gBAAW,IAAI,CAAC,GAAG,OAAI,CAAC,EAAE;IAC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ACjB;YACE,OAAO,EAAE,eAAe;YACxB,KAAK,EAAE,IAAI;YACX,UAAU,EAAE,iBAAiB;YAC7B,IAAI,EAAE,CAAC,iBAAiB,CAAC;SAC1B;QACD,EAAC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAC;QAC1F,EAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAC;KAChF,CAAC;CACH;;ACnnBD;;;;;;;AAQA,AAQA;;;AAGA,IAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;ACnBvD;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;;AAQA,AAOA,0EAA0E;;ACf1E;;;;;;GAMG;;ACNH;;GAEG;;;;"}
\ No newline at end of file
+{"version":3,"file":"router.js","sources":["../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/src/index.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../../../../packages/router/router.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * @description\n *\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\n\n/**\n * @description\n *\n * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter(e => e instanceof RouterEvent)\n * ).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** @docsNotRequired */\n public id: number,\n /** @docsNotRequired */\n public url: string) {}\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n /**\n * This reflects the state object that was previously supplied to the pushState call. This is\n * not null only when the navigation is triggered by a popstate event.\n *\n * The router assigns a navigationId to every router transition/navigation. Even when the user\n * clicks on the back button in the browser, a new navigation id will be created. So from\n * the perspective of the router, the router never \"goes back\". By using the `restoredState`\n * and its navigationId, you can implement behavior that differentiates between creating new\n * states\n * and popstate events. In the latter case you can restore some remembered state (e.g., scroll\n * position).\n *\n * See {@link NavigationExtras} for more information.\n */\n restoredState?: {[k: string]: any, navigationId: number}|null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any, navigationId: number}|null = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public reason: string) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean) {\n super(id, url);\n }\n\n toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot) {\n super(id, url);\n }\n\n toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadStart(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n constructor(\n /** @docsNotRequired */\n public route: Route) {}\n toString(): string { return `RouteConfigLoadEnd(path: ${this.route.path})`; }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ChildActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationStart {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @publicApi\n */\nexport class ActivationEnd {\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot) {}\n toString(): string {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a scrolling event.\n *\n * @publicApi\n */\nexport class Scroll {\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd,\n\n /** @docsNotRequired */\n readonly position: [number, number]|null,\n\n /** @docsNotRequired */\n readonly anchor: string|null) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents a router event, allowing you to track the lifecycle of the router.\n *\n * The sequence of router events is:\n *\n * - `NavigationStart`,\n * - `RouteConfigLoadStart`,\n * - `RouteConfigLoadEnd`,\n * - `RoutesRecognized`,\n * - `GuardsCheckStart`,\n * - `ChildActivationStart`,\n * - `ActivationStart`,\n * - `GuardsCheckEnd`,\n * - `ResolveStart`,\n * - `ResolveEnd`,\n * - `ActivationEnd`\n * - `ChildActivationEnd`\n * - `NavigationEnd`,\n * - `NavigationCancel`,\n * - `NavigationError`\n * - `Scroll`\n *\n * @publicApi\n */\nexport type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart |\n ChildActivationEnd | ActivationStart | ActivationEnd | Scroll;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class EmptyOutletComponent {\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Name of the primary outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of parameters.\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any\n};\n\n/**\n * Matrix and Query parameters.\n *\n * `ParamMap` makes it easier to work with parameters as they could have either a single value or\n * multiple value. Because this should be known by the user, calling `get` or `getAll` returns the\n * correct type (either `string` or `string[]`).\n *\n * The API is inspired by the URLSearchParams interface.\n * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n *\n * @publicApi\n */\nexport interface ParamMap {\n has(name: string): boolean;\n /**\n * Return a single value for the given parameter name:\n * - the value when the parameter has a single value,\n * - the first value if the parameter has multiple values,\n * - `null` when there is no such parameter.\n */\n get(name: string): string|null;\n /**\n * Return an array of values for the given parameter name.\n *\n * If there is no such parameter, an empty array is returned.\n */\n getAll(name: string): string[];\n\n /** Name of the parameters */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) { this.params = params || {}; }\n\n has(name: string): boolean { return this.params.hasOwnProperty(name); }\n\n get(name: string): string|null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] { return Object.keys(this.params); }\n}\n\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n const error = Error('NavigationCancelingError: ' + message);\n (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n const parts = route.path !.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * @description\n *\n * Represents router configuration.\n *\n * `Routes` is an array of route configurations. Each one has the following properties:\n *\n * - `path` is a string that uses the route matcher DSL.\n * - `pathMatch` is a string that specifies the matching strategy. Options are `prefix` (default)\n * and `full`. See [Matching Strategy](#matching-strategy) below for more information.\n * - `matcher` defines a custom strategy for path matching and supersedes `path` and `pathMatch`.\n * - `component` is a component type.\n * - `redirectTo` is the url fragment which will replace the current matched segment.\n * - `outlet` is the name of the outlet the component should be placed into.\n * - `canActivate` is an array of DI tokens used to look up CanActivate handlers. See\n * `CanActivate` for more info.\n * - `canActivateChild` is an array of DI tokens used to look up CanActivateChild handlers. See\n * `CanActivateChild` for more info.\n * - `canDeactivate` is an array of DI tokens used to look up CanDeactivate handlers. See\n * `CanDeactivate` for more info.\n * - `canLoad` is an array of DI tokens used to look up CanLoad handlers. See\n * `CanLoad` for more info.\n * - `data` is additional data provided to the component via `ActivatedRoute`.\n * - `resolve` is a map of DI tokens used to look up data resolvers. See `Resolve` for more\n * info.\n * - `runGuardsAndResolvers` defines when guards and resolvers will be run. By default they run only\n * when the matrix parameters of the route change. Options include:\n * - `paramsChange` (default) - Run guards and resolvers when path or matrix params change. This\n * mode ignores query param changes.\n * - `paramsOrQueryParamsChange` - Guards and resolvers will run when any parameters change. This\n * includes path, matrix, and query params.\n * - `pathParamsChange` - Run guards and resolvers path or any path params change. This mode is\n * useful if you want to ignore changes to all optional parameters such as query *and* matrix\n * params.\n * - `pathParamsOrQueryParamsChange` - Same as `pathParamsChange`, but also rerun when any query\n * param changes\n * - `always` - Run guards and resolvers on every navigation.\n * - (from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean - Use a predicate\n * function when none of the pre-configured modes fit the needs of the application. An example\n * might be when you need to ignore updates to a param such as `sortDirection`, but need to\n * reload guards and resolvers when changing the `searchRoot` param.\n * - `children` is an array of child route definitions.\n * - `loadChildren` is a reference to lazy loaded child routes. See `LoadChildren` for more\n * info.\n *\n * @usageNotes\n * ### Simple Configuration\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/bob`, the router will create the team component with the user\n * component in it.\n *\n * ### Multiple Outlets\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * When navigating to `/team/11(aux:chat/jim)`, the router will create the team component next to\n * the chat component. The chat component will be placed into the aux outlet.\n *\n * ### Wild Cards\n *\n * ```\n * [{\n * path: '**',\n * component: Sink\n * }]\n * ```\n *\n * Regardless of where you navigate to, the router will instantiate the sink component.\n *\n * ### Redirects\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to '/team/11/legacy/user/jim', the router will change the url to\n * '/team/11/user/jim', and then will instantiate the team component with the user component\n * in it.\n *\n * If the `redirectTo` value starts with a '/', then it is an absolute redirect. E.g., if in the\n * example above we change the `redirectTo` to `/user/:name`, the result url will be '/user/jim'.\n *\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any url segments. Let's look at the following configuration:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11`, the router will instantiate the AllUsers component.\n *\n * Empty-path routes can have children.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * When navigating to `/team/11/user/jim`, the router will instantiate the wrapper component with\n * the user component in it.\n *\n * An empty path route inherits its parent's params and data. This is because it cannot have its\n * own params, and, as a result, it often uses its parent's params and data as its own.\n *\n * ### Matching Strategy\n *\n * By default the router will look at what is left in the url, and check if it starts with\n * the specified path (e.g., `/team/11/user` starts with `team/:id`).\n *\n * We can change the matching strategy to make sure that the path covers the whole unconsumed url,\n * which is akin to `unconsumedUrl === path` or `$` regular expressions.\n *\n * This is particularly important when redirecting empty-path routes.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * Since an empty path is a prefix of any url, even when navigating to '/main', the router will\n * still apply the redirect.\n *\n * If `pathMatch: full` is provided, the router will apply the redirect if and only if navigating to\n * '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * It is useful at times to have the ability to share parameters between sibling components.\n *\n * Say we have two components--ChildCmp and AuxCmp--that we want to put next to each other and both\n * of them require some id parameter.\n *\n * One way to do that would be to have a bogus parent component, so both the siblings can get the id\n * parameter from it. This is not ideal. Instead, you can use a componentless route.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * So when navigating to `parent/10/(a//aux:b)`, the route will instantiate the main child and aux\n * child components next to each other. In this example, the application component\n * has to have the primary and aux outlets defined.\n *\n * The router will also merge the `params`, `data`, and `resolve` of the componentless parent into\n * the `params`, `data`, and `resolve` of the children. This is done because there is no component\n * that can inject the activated route of the componentless parent.\n *\n * This is especially useful when child components are defined as follows:\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * With this configuration in place, navigating to '/parent/10' will create the main child and aux\n * components.\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up our application load time by splitting it into multiple bundles, and\n * loading them on demand. The router is designed to make lazy loading simple and easy. Instead of\n * providing the children property, you can provide the `loadChildren` property, as follows:\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * loadChildren: 'team'\n * }]\n * ```\n *\n * The router will use registered NgModuleFactoryLoader to fetch an NgModule associated with 'team'.\n * Then it will extract the set of routes defined in that NgModule, and will transparently add\n * those routes to the main configuration.\n *\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * @description Represents the results of the URL matching.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[]; posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * @description\n *\n * A function matching URLs\n *\n * A custom URL matcher can be provided when a combination of `path` and `pathMatch` isn't\n * expressive enough.\n *\n * For instance, the following matcher matches html files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n UrlMatchResult;\n\n/**\n * @description\n *\n * Represents the static data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type Data = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * Represents the resolved data associated with a particular route.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type ResolveData = {\n [name: string]: any\n};\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;\n\n/**\n * @description\n *\n * The type of `loadChildren`.\n *\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport type LoadChildren = string | LoadChildrenCallback;\n\n/**\n * @description\n *\n * The type of `queryParamsHandling`.\n *\n * See `RouterLink` for more details.\n *\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * @description\n *\n * The type of `runGuardsAndResolvers`.\n *\n * See `Routes` for more details.\n * @publicApi\n */\nexport type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' |\n 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' |\n ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * See `Routes` for more details.\n *\n * @publicApi\n */\nexport interface Route {\n path?: string;\n pathMatch?: string;\n matcher?: UrlMatcher;\n component?: Type<any>;\n redirectTo?: string;\n outlet?: string;\n canActivate?: any[];\n canActivateChild?: any[];\n canDeactivate?: any[];\n canLoad?: any[];\n data?: Data;\n resolve?: ResolveData;\n children?: Routes;\n loadChildren?: LoadChildren;\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n /**\n * Filled for routes with `loadChildren` once the module has been loaded\n * @internal\n */\n _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n if (!route) {\n throw new Error(`\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && route.component) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n }\n if (route.path && route.matcher) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp =\n `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new Error(\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\n `Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n let key: string;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n for (const prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\n\nexport function waitForMap<A, B>(\n obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n if (Object.keys(obj).length === 0) {\n return of ({});\n }\n\n const waitHead: Observable<B>[] = [];\n const waitTail: Observable<B>[] = [];\n const res: {[k: string]: B} = {};\n\n forEach(obj, (a: A, k: string) => {\n const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n } else {\n waitTail.push(mapped);\n }\n });\n\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of .apply(null, waitHead.concat(waitTail)).pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of (value);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n }\n return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(key => containee[key] === container[key]);\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n return true;\n\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n }\n return true;\n\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup,\n /** The query params of the URL */\n public queryParams: Params,\n /** The fragment of the URL */\n public fragment: string|null) {}\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return DEFAULT_SERIALIZER.serialize(this); }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _sourceSegment !: UrlSegmentGroup;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _segmentIndexShift !: number;\n /** The parent node in the url tree */\n parent: UrlSegmentGroup|null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup}) {\n forEach(children, (v: any, k: any) => v.parent = this);\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean { return this.numberOfChildren > 0; }\n\n /** Number of child segments */\n get numberOfChildren(): number { return Object.keys(this.children).length; }\n\n /** @docsNotRequired */\n toString(): string { return serializePaths(this); }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _parameterMap !: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string}) {}\n\n get parameterMap() {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string { return serializePath(this); }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n let res: T[] = [];\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment !)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n const children: string[] = [];\n\n forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n\n });\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.keys(params)\n .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.keys(params).map((name) => {\n const value = params[name];\n return Array.isArray(value) ?\n value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n });\n\n return strParams.length ? `?${strParams.join(\"&\")}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) { this.remaining = url; }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string|null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: any} {\n const params: {[key: string]: any} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: any}): void {\n const key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(`Cannot parse url '${this.url}'`);\n }\n\n let outletName: string = undefined !;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean { return this.remaining.startsWith(str); }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new Error(`Expected \"${str}\".`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) { this._root = root; }\n\n get root(): T { return this._root.value; }\n\n /**\n * @internal\n */\n parent(t: T): T|null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T|null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] { return findPath(t, this._root).map(s => s.value); }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(public value: T, public children: TreeNode<T>[]) {}\n\n toString(): string { return `TreeNode(${this.value})`; }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>| null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n\n return map;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, equalSegments} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * @description\n *\n * Represents the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * See `ActivatedRoute` for more information.\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n toString(): string { return this.snapshot.toString(); }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>| null): RouterState {\n const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(\n emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n urlTree: UrlTree, rootComponent: Type<any>| null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n // TODO(issue/24571): remove '!'.\n snapshot !: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterState;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: Observable<ParamMap>;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: Observable<ParamMap>;\n\n /** @internal */\n constructor(\n /** An observable of the URL segments matched by this route */\n public url: Observable<UrlSegment[]>,\n /** An observable of the matrix parameters scoped to this route */\n public params: Observable<Params>,\n /** An observable of the query parameters shared by all the routes */\n public queryParams: Observable<Params>,\n /** An observable of the URL fragment shared by all the routes */\n public fragment: Observable<string>,\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>,\n /** The outlet name of the route. It's a constant */\n public outlet: string,\n /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n this._futureSnapshot = futureSnapshot;\n }\n\n /** The configuration used to match this route */\n get routeConfig(): Route|null { return this._futureSnapshot.routeConfig; }\n\n /** The root of the router state */\n get root(): ActivatedRoute { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRoute|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRoute|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRoute[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRoute[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): Observable<ParamMap> {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._paramMap;\n }\n\n get queryParamMap(): Observable<ParamMap> {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params,\n data: Data,\n resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n route: ActivatedRouteSnapshot,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n const pathFromRoot = route.pathFromRoot;\n\n let inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n\n while (inheritingStartingFrom >= 1) {\n const current = pathFromRoot[inheritingStartingFrom];\n const parent = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n\n // parent is componentless => current route should inherit its params and data\n } else if (!parent.component) {\n inheritingStartingFrom--;\n\n } else {\n break;\n }\n }\n }\n\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n return pathFromRoot.reduce((res, curr) => {\n const params = {...res.params, ...curr.params};\n const data = {...res.data, ...curr.data};\n const resolve = {...res.resolve, ...curr._resolvedData};\n return {params, data, resolve};\n }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route|null;\n /** @internal **/\n _urlSegment: UrlSegmentGroup;\n /** @internal */\n _lastPathIndex: number;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _resolvedData !: Data;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _routerState !: RouterStateSnapshot;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _paramMap !: ParamMap;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _queryParamMap !: ParamMap;\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /** The matrix parameters scoped to this route */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n lastPathIndex: number, resolve: ResolveData) {\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot { return this._routerState.root; }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot|null { return this._routerState.parent(this); }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot|null { return this._routerState.firstChild(this); }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] { return this._routerState.children(this); }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] { return this._routerState.pathFromRoot(this); }\n\n get paramMap(): ParamMap {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n toString(): string { return serializeNode(this._root); }\n}\n\nfunction setRouterState<U, T extends{_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n (<any>route.queryParams).next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n (<any>route.fragment).next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n (<any>route.params).next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n (<any>route.url).next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n (<any>route.data).next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n (<any>route.data).next(route._futureSnapshot.data);\n }\n}\n\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent !));\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n prevState: RouterState): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n } else {\n const detachedRouteHandle =\n <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n\n } else {\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (let i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {PRIMARY_OUTLET, Params} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n fragment: string): UrlTree {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n\n const startingPosition = findStartingPosition(nav, urlTree, route);\n\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(\n startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n queryParams: Params, fragment: string): UrlTree {\n let qp: any = {};\n if (queryParams) {\n forEach(queryParams, (value: any, name: any) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n\n const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n forEach(cmd.outlets, (commands: any, name: string) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(\n route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent !;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n if (!(typeof commands[0] === 'object')) return {[PRIMARY_OUTLET]: commands};\n if (commands[0].outlets === undefined) return {[PRIMARY_OUTLET]: commands};\n return commands[0].outlets;\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const curr = getPath(commands[currentCommandIndex]);\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n const children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n\n const curr = getPath(commands[i]);\n const next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n const children: {[key: string]: UrlSegmentGroup} = {};\n forEach(outlets, (commands: any, outlet: string) => {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n forEach(params, (v: any, k: string) => res[k] = `${v}`);\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, advanceActivatedRoute} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport const activateRoutes =\n (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n map(t => {\n new ActivateRoutes(\n routeReuseStrategy, t.targetRouterState !, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n const context = parentContexts.getContext(route.value.outlet);\n\n if (context) {\n const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n const contexts = route.value.component ? context.children : parentContexts;\n\n forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n contexts: ChildrenOutletContexts): void {\n const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored =\n (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n } else {\n const config = parentLoadedConfig(future.snapshot);\n const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n if (route && route.component) return null;\n }\n\n return null;\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, Observable, Observer, from, of } from 'rxjs';\nimport {catchError, concatAll, every, first, map, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {PRIMARY_OUTLET, Params, defaultUrlMatcher, navigationCancelingError} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction} from './utils/type_guards';\n\nclass NoMatch {\n public segmentGroup: UrlSegmentGroup|null;\n\n constructor(segmentGroup?: UrlSegmentGroup) { this.segmentGroup = segmentGroup || null; }\n}\n\nclass AbsoluteRedirect {\n constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n return new Observable<UrlSegmentGroup>(\n (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return new Observable<LoadedRouterConfig>(\n (obs: Observer<LoadedRouterConfig>) => obs.error(navigationCancelingError(\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n private allowRedirects: boolean = true;\n private ngModule: NgModuleRef<any>;\n\n constructor(\n moduleInjector: Injector, private configLoader: RouterConfigLoader,\n private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n\n apply(): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n const urlTrees$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment !)));\n return urlTrees$.pipe(catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return this.match(e.urlTree);\n }\n\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private match(tree: UrlTree): Observable<UrlTree> {\n const expanded$ =\n this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n const mapped$ = expanded$.pipe(\n map((rootSegmentGroup: UrlSegmentGroup) =>\n this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment !)));\n return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }));\n }\n\n private noMatchError(e: NoMatch): any {\n return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n\n private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n UrlTree {\n const root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n }\n\n private expandSegmentGroup(\n ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n outlet: string): Observable<UrlSegmentGroup> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n }\n\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n\n // Recursively expand segment groups for all the child outlets\n private expandChildren(\n ngModule: NgModuleRef<any>, routes: Route[],\n segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n return waitForMap(\n segmentGroup.children,\n (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n }\n\n private expandSegment(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n segments: UrlSegment[], outlet: string,\n allowRedirects: boolean): Observable<UrlSegmentGroup> {\n return of (...routes).pipe(\n map((r: any) => {\n const expanded$ = this.expandSegmentAgainstRoute(\n ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e: any) => {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n // talk to Jason\n return of (null) as any;\n }\n throw e;\n }));\n }),\n concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of (new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n private expandSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, paths, outlet);\n }\n\n return noMatch(segmentGroup);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule, routes, route, outlet);\n }\n\n return this.expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule, segmentGroup, routes, route, segments, outlet);\n }\n\n private expandWildCardWithParamsAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n outlet: string): Observable<UrlSegmentGroup> {\n const newTree = this.applyRedirectCommands([], route.redirectTo !, {});\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n const group = new UrlSegmentGroup(newSegments, {});\n return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n }\n\n private expandRegularSegmentAgainstRouteUsingRedirect(\n ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n const {matched, consumedSegments, lastChild, positionalParamSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n const newTree = this.applyRedirectCommands(\n consumedSegments, route.redirectTo !, <any>positionalParamSegments);\n if (route.redirectTo !.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n\n return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n return this.expandSegment(\n ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n false);\n }));\n }\n\n private matchSegmentAgainstRoute(\n ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n\n return of (new UrlSegmentGroup(segments, {}));\n }\n\n const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n if (!matched) return noMatch(rawSegmentGroup);\n\n const rawSlicedSegments = segments.slice(lastChild);\n const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n const childModule = routerConfig.module;\n const childConfig = routerConfig.routes;\n\n const {segmentGroup, slicedSegments} =\n split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$.pipe(\n map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of (new UrlSegmentGroup(consumedSegments, {}));\n }\n\n const expanded$ = this.expandSegment(\n childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(\n map((cs: UrlSegmentGroup) =>\n new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n }));\n }\n\n private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of (new LoadedRouterConfig(route.children, ngModule));\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of (route._loadedConfig);\n }\n\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap((shouldLoad: boolean) => {\n if (shouldLoad) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map((cfg: LoadedRouterConfig) => {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n\n return of (new LoadedRouterConfig([], ngModule));\n }\n\n private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of (res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo !);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n private applyRedirectCommands(\n segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n return this.applyRedirectCreatreUrlTree(\n redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n\n private applyRedirectCreatreUrlTree(\n redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment);\n }\n\n private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n forEach(redirectToParams, (v: any, k: string) => {\n const copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n private createSegmentGroup(\n redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n private createSegments(\n redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n return redirectToSegments.map(\n s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n this.findOrReturn(s, actualSegments));\n }\n\n private findPosParam(\n redirectTo: string, redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment}): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n\n private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\n\nfunction runCanLoadGuard(\n moduleInjector: Injector, route: Route, segments: UrlSegment[]): Observable<boolean> {\n const canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0) return of (true);\n\n const obs = from(canLoad).pipe(map((injectionToken: any) => {\n const guard = moduleInjector.get(injectionToken);\n let guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n } else if (isFunction<CanLoadFn>(guard)) {\n guardVal = guard(route, segments);\n } else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n\n return obs.pipe(concatAll(), every(result => result === true));\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n matched: boolean,\n consumedSegments: UrlSegment[],\n lastChild: number,\n positionalParamSegments: {[k: string]: UrlSegment}\n} {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n\n if (!res) {\n return {\n matched: false,\n consumedSegments: <any[]>[],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n\n return {\n matched: true,\n consumedSegments: res.consumed !,\n lastChild: res.consumed.length !,\n positionalParamSegments: res.posParams !,\n };\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[]) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptySegments(\n config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(\n segmentGroup, slicedSegments, config, segmentGroup.children));\n return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n }\n\n return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(switchMap(\n t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, equalParamsAndUrlSegments} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {TreeNode, nodeChildrenAsMap} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[],\n canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot, curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n {node: ActivatedRouteSnapshot, guards: any[]}|null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n const config = getClosestLoadedConfig(snapshot);\n const injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n if (!snapshot) return null;\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n if (route && route._loadedConfig) return route._loadedConfig;\n }\n\n return null;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>| null,\n contexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n forEach(\n prevChildren, (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n deactivateRouteAndItsChildren(v, contexts !.getContext(k), checks));\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null, futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun =\n shouldRunGuardsAndResolvers(curr, future, future.routeConfig !.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun) {\n const component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext | null, checks: Checks): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, OperatorFunction, combineLatest} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n return switchMap(obs => {\n return combineLatest(\n ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n .pipe(\n scan(\n (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n let isPending = false;\n return list.reduce((innerAcc, val, i: number) => {\n if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE) isPending = true;\n\n // Any other return values are only valid if we haven't yet hit a pending call.\n // This guarantees that in the case of a guard at the bottom of the tree that\n // returns a redirect, we will wait for the higher priority guard at the top to\n // finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always cancel\n // navigation\n if (val === false) return val;\n\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n\n return innerAcc;\n }, acc);\n },\n INITIAL_VALUE),\n filter(item => item !== INITIAL_VALUE),\n map(item => isUrlTree(item) ? item : item === true), //\n take(1)) as Observable<boolean|UrlTree>;\n });\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, defer, from, of } from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of ({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks, targetSnapshot !, currentSnapshot, moduleInjector)\n .pipe(\n mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(\n targetSnapshot !, canActivateChecks, moduleInjector, forwardEvent) :\n of (canDeactivate);\n }),\n map(guardsResult => ({...t, guardsResult})));\n }));\n };\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n moduleInjector: Injector) {\n return from(checks).pipe(\n mergeMap(\n check =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n forwardEvent?: (evt: Event) => void) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(result => {\n return result !== true;\n }, true as boolean | UrlTree));\n }),\n first(result => { return result !== true; }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of (true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of (true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of (true);\n\n const canActivateObservables = canActivate.map((c: any) => {\n return defer(() => {\n const guard = getToken(c, futureARS, moduleInjector);\n let observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n } else if (isFunction<CanActivateFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of (canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n moduleInjector: Injector): Observable<boolean|UrlTree> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(p => getCanActivateChild(p))\n .filter(_ => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map((c: any) => {\n const guard = getToken(c, d.node, moduleInjector);\n let observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n } else if (isFunction<CanActivateChildFn>(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n } else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of (guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of (canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of (true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const guard = getToken(c, currARS, moduleInjector);\n let observable;\n if (isCanDeactivate(guard)) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component !, currARS, currRSS, futureRSS));\n } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n } else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of (canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of } from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, ParamsInheritanceStrategy, RouterStateSnapshot, inheritedParamsDataResolve} from './router_state';\nimport {PRIMARY_OUTLET, defaultUrlMatcher} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree, mapChildrenIntoArray} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Routes, urlTree: UrlTree, url: string,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n relativeLinkResolution: 'legacy' | 'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n return new Recognizer(\n rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n relativeLinkResolution)\n .recognize();\n}\n\nclass Recognizer {\n constructor(\n private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private relativeLinkResolution: 'legacy'|'corrected') {}\n\n recognize(): Observable<RouterStateSnapshot> {\n try {\n const rootSegmentGroup =\n split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n const root = new ActivatedRouteSnapshot(\n [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n this.urlTree.root, -1, {});\n\n const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n const routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of (routeState);\n\n } catch (e) {\n return new Observable<RouterStateSnapshot>(\n (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n }\n }\n\n inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n const route = routeNode.value;\n\n const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n\n routeNode.children.forEach(n => this.inheritParamsAndData(n));\n }\n\n processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n TreeNode<ActivatedRouteSnapshot>[] {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n }\n\n processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n TreeNode<ActivatedRouteSnapshot>[] {\n const children = mapChildrenIntoArray(\n segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n }\n\n processSegment(\n config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n for (const r of config) {\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n } catch (e) {\n if (!(e instanceof NoMatch)) throw e;\n }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n\n throw new NoMatch();\n }\n\n private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\n }\n\n processSegmentAgainstRoute(\n route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n if (route.redirectTo) throw new NoMatch();\n\n if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n let snapshot: ActivatedRouteSnapshot;\n let consumedSegments: UrlSegment[] = [];\n let rawSlicedSegments: UrlSegment[] = [];\n\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments) !.parameters : {};\n snapshot = new ActivatedRouteSnapshot(\n segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment !,\n getData(route), outlet, route.component !, route, getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n } else {\n const result: MatchResult = match(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n\n snapshot = new ActivatedRouteSnapshot(\n consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment !, getData(route), outlet, route.component !, route,\n getSourceSegmentGroup(rawSegment),\n getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n\n const childConfig: Route[] = getChildConfig(route);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n const children = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n }\n\n const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n if (route.children) {\n return route.children;\n }\n\n if (route.loadChildren) {\n return route._loadedConfig !.routes;\n }\n\n return [];\n}\n\ninterface MatchResult {\n consumedSegments: UrlSegment[];\n lastChild: number;\n parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch();\n }\n\n return {consumedSegments: [], lastChild: 0, parameters: {}};\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) throw new NoMatch();\n\n const posParams: {[n: string]: string} = {};\n forEach(res.posParams !, (v: UrlSegment, k: string) => { posParams[k] = v.path; });\n const parameters = res.consumed.length > 0 ?\n {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n posParams;\n\n return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n let s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n let s = segmentGroup;\n let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\n\nfunction split(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n config: Route[], relativeLinkResolution: 'legacy' | 'corrected') {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n consumedSegments, createChildrenForEmptyPaths(\n segmentGroup, consumedSegments, config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(\n segmentGroup, consumedSegments, slicedSegments, config,\n segmentGroup.children, relativeLinkResolution));\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n routes: Route[], children: {[name: string]: UrlSegmentGroup},\n relativeLinkResolution: 'legacy' | 'corrected'): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n } else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(\n r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n rootComponentType: Type<any>| null, config: Route[], serializer: (url: UrlTree) => string,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', relativeLinkResolution: 'legacy' |\n 'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(\n t => recognizeFn(\n rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, from, of } from 'rxjs';\nimport {concatMap, last, map, mergeMap, reduce} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot, inheritedParamsDataResolve} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\n\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n return function(source: Observable<NavigationTransition>) {\n return source.pipe(mergeMap(t => {\n const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n if (!canActivateChecks.length) {\n return of (t);\n }\n\n return from(canActivateChecks)\n .pipe(\n concatMap(\n check => runResolve(\n check.route, targetSnapshot !, paramsInheritanceStrategy, moduleInjector)),\n reduce((_: any, __: any) => _), map(_ => t));\n }));\n };\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always', moduleInjector: Injector) {\n const resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = {\n ...futureARS.data,\n ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve};\n return null;\n }));\n}\n\nfunction resolveNode(\n resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of ({});\n }\n if (keys.length === 1) {\n const key = keys[0];\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => { return {[key]: value}; }));\n }\n const data: {[k: string]: any} = {};\n const runningResolvers$ = from(keys).pipe(mergeMap((key: string) => {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map((value: any) => {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(() => data));\n}\n\nfunction getResolver(\n injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n moduleInjector: Injector): Observable<any> {\n const resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction, ObservableInput, from} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n MonoTypeOperatorFunction<T> {\n return function(source) {\n return source.pipe(switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return from([v]);\n }));\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>,\n componentRef: ComponentRef<any>,\n route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nexport class DefaultRouteReuseStrategy implements RouteReuseStrategy {\n shouldDetach(route: ActivatedRouteSnapshot): boolean { return false; }\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n shouldAttach(route: ActivatedRouteSnapshot): boolean { return false; }\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null { return null; }\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {Observable, from, of } from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\nimport {LoadChildren, LoadedRouterConfig, Route, standardizeConfig} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\n\n/**\n * @docsNotRequired\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n constructor(\n private loader: NgModuleFactoryLoader, private compiler: Compiler,\n private onLoadStartListener?: (r: Route) => void,\n private onLoadEndListener?: (r: Route) => void) {}\n\n load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n\n const moduleFactory$ = this.loadModuleFactory(route.loadChildren !);\n\n return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n\n const module = factory.create(parentInjector);\n\n return new LoadedRouterConfig(\n flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n }\n\n private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n } else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n if (t instanceof NgModuleFactory) {\n return of (t);\n } else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean { return true; }\n extract(url: UrlTree): UrlTree { return url; }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree { return newUrlPart; }\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {Compiler, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, isDevMode, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, Subject, Subscription, defer, of } from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes, standardizeConfig, validateConfig} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, RouterState, RouterStateSnapshot, createEmptyState} from './router_state';\nimport {Params, isNavigationCancelingError, navigationCancelingError} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {UrlSerializer, UrlTree, containsTree, createEmptyUrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n\n/**\n * @description\n *\n * Represents the extra options used during navigation.\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n /**\n * Enables relative navigation from the current ActivatedRoute.\n *\n * Configuration:\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * Navigate to list route from child route:\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * this.router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n */\n relativeTo?: ActivatedRoute|null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params|null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * this.router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * Preserves the query parameters for the next navigation.\n *\n * deprecated, use `queryParamsHandling` instead\n *\n * ```\n * // Preserve query params from /results?page=1 to /view?page=1\n * this.router.navigate(['/view'], { preserveQueryParams: true });\n * ```\n *\n * @deprecated since v4\n */\n preserveQueryParams?: boolean;\n\n /**\n * config strategy to handle the query parameters for the next navigation.\n *\n * ```\n * // from /results?page=1 to /view?page=1&page=2\n * this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: \"merge\" });\n * ```\n */\n queryParamsHandling?: QueryParamsHandling|null;\n /**\n * Preserves the fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * this.router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n /**\n * Navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n /**\n * Navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n /**\n * State passed to any navigation. This value will be accessible through the `extras` object\n * returned from `router.getCurrentNavigation()` while a navigation is executing. Once a\n * navigation completes, this value will be written to `history.state` when the `location.go`\n * or `location.replaceState` method is called before activating of this route. Note that\n * `history.state` will not pass an object equality test because the `navigationId` will be\n * added to the state before being written.\n *\n * While `history.state` can accept any type of value, because the router adds the `navigationId`\n * on each navigation, the `state` must always be an object.\n */\n state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Error handler that is invoked when a navigation errors.\n *\n * If the handler returns a value, the navigation promise will be resolved with this value.\n * If the handler throws an exception, the navigation promise will be rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n [k: string]: any; navigationId: number;\n};\n\n/**\n * @description\n *\n * Information about any given navigation. This information can be gotten from the router at\n * any time using the `router.getCurrentNavigation()` method.\n *\n * @publicApi\n */\nexport type Navigation = {\n /**\n * The ID of the current navigation.\n */\n id: number;\n /**\n * Target URL passed into the {@link Router#navigateByUrl} call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: string | UrlTree;\n /**\n * The initial target URL after being parsed with {@link UrlSerializer.extract()}.\n */\n extractedUrl: UrlTree;\n /**\n * Extracted URL after redirects have been applied. This URL may not be available immediately,\n * therefore this property can be `undefined`. It is guaranteed to be set after the\n * {@link RoutesRecognized} event fires.\n */\n finalUrl?: UrlTree;\n /**\n * Identifies the trigger of the navigation.\n *\n * * 'imperative'--triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--triggered by a popstate event\n * * 'hashchange'--triggered by a hashchange event\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * The NavigationExtras used in this navigation. See {@link NavigationExtras} for more info.\n */\n extras: NavigationExtras;\n /**\n * Previously successful Navigation object. Only a single previous Navigation is available,\n * therefore this previous Navigation will always have a `null` value for `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n id: number,\n currentUrlTree: UrlTree,\n currentRawUrl: UrlTree,\n extractedUrl: UrlTree,\n urlAfterRedirects: UrlTree,\n rawUrl: UrlTree,\n extras: NavigationExtras,\n resolve: any,\n reject: any,\n promise: Promise<boolean>,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n currentSnapshot: RouterStateSnapshot,\n targetSnapshot: RouterStateSnapshot | null,\n currentRouterState: RouterState,\n targetRouterState: RouterState | null,\n guards: Checks,\n guardsResult: boolean | UrlTree | null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n appliedUrlTree: UrlTree,\n rawUrlTree: UrlTree,\n skipLocationChange: boolean,\n replaceUrl: boolean,\n navigationId: number\n}): Observable<void> {\n return of (null) as any;\n}\n\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nexport class Router {\n private currentUrlTree: UrlTree;\n private rawUrlTree: UrlTree;\n private browserUrlTree: UrlTree;\n private readonly transitions: BehaviorSubject<NavigationTransition>;\n private navigations: Observable<NavigationTransition>;\n private lastSuccessfulNavigation: Navigation|null = null;\n private currentNavigation: Navigation|null = null;\n\n // TODO(issue/24571): remove '!'.\n private locationSubscription !: Subscription;\n private navigationId: number = 0;\n private configLoader: RouterConfigLoader;\n private ngModule: NgModuleRef<any>;\n private console: Console;\n private isNgZoneEnabled: boolean = false;\n\n public readonly events: Observable<Event> = new Subject<Event>();\n public readonly routerState: RouterState;\n\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n errorHandler: ErrorHandler = defaultErrorHandler;\n\n /**\n * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n malformedUriErrorHandler:\n (error: URIError, urlSerializer: UrlSerializer,\n url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n /**\n * Indicates if at least one navigation happened.\n */\n navigated: boolean = false;\n private lastSuccessfulId: number = -1;\n\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n hooks: {beforePreactivation: RouterHook, afterPreactivation: RouterHook} = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n /**\n * See {@link RouterModule} for more information.\n */\n relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n constructor(\n private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n\n this.processNavigations();\n }\n\n private setupNavigations(transitions: Observable<NavigationTransition>):\n Observable<NavigationTransition> {\n const eventsSubject = (this.events as Subject<Event>);\n return transitions.pipe(\n filter(t => t.id !== 0),\n\n // Extract URL\n map(t => ({\n ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n } as NavigationTransition)),\n\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n {...this.lastSuccessfulNavigation, previousNavigation: null} :\n null\n };\n }),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(t => {\n let completed = false;\n let errored = false;\n return of (t).pipe(\n switchMap(t => {\n const urlTransition =\n !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();\n const processCurrentUrl =\n (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n if (processCurrentUrl) {\n return of (t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions.getValue();\n eventsSubject.next(new NavigationStart(\n t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }),\n\n // This delay is required to match old behavior that forced navigation to\n // always be async\n switchMap(t => Promise.resolve(t)),\n\n // ApplyRedirects\n applyRedirects(\n this.ngModule.injector, this.configLoader, this.urlSerializer,\n this.config),\n\n // Update the currentNavigation\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation !,\n finalUrl: t.urlAfterRedirects\n };\n }),\n\n // Recognize\n recognize(\n this.rootComponentType, this.config, (url) => this.serializeUrl(url),\n this.paramsInheritanceStrategy, this.relativeLinkResolution),\n\n // Update URL if in `eager` update mode\n tap(t => {\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n // Fire RoutesRecognized\n tap(t => {\n const routesRecognized = new RoutesRecognized(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n eventsSubject.next(routesRecognized);\n }), );\n } else {\n const processPreviousUrl = urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was, we\n * handle this \"error condition\" by navigating to the previously successful URL,\n * but leaving the URL intact.*/\n if (processPreviousUrl) {\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id, this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n const targetSnapshot =\n createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n return of ({\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n });\n } else {\n /* When neither the current or previous URL can be processed, do nothing other\n * than update router's internal reference to the current \"settled\" URL. This\n * way the next navigation will be coming from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\n }\n }),\n\n // Before Preactivation\n switchTap(t => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.beforePreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !);\n this.triggerEvent(guardsStart);\n }),\n\n map(t => ({\n ...t,\n guards:\n getAllRouteGuards(t.targetSnapshot !, t.currentSnapshot, this.rootContexts)\n })),\n\n checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n tap(t => {\n if (isUrlTree(t.guardsResult)) {\n const error: Error&{url?: UrlTree} = navigationCancelingError(\n `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n error.url = t.guardsResult;\n throw error;\n }\n }),\n\n tap(t => {\n const guardsEnd = new GuardsCheckEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects),\n t.targetSnapshot !, !!t.guardsResult);\n this.triggerEvent(guardsEnd);\n }),\n\n filter(t => {\n if (!t.guardsResult) {\n this.resetUrlToCurrentUrlTree();\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of (t).pipe(\n tap(t => {\n const resolveStart = new ResolveStart(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveStart);\n }),\n resolveData(\n this.paramsInheritanceStrategy,\n this.ngModule.injector), //\n tap(t => {\n const resolveEnd = new ResolveEnd(\n t.id, this.serializeUrl(t.extractedUrl),\n this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot !);\n this.triggerEvent(resolveEnd);\n }), );\n }\n return undefined;\n }),\n\n // --- AFTER PREACTIVATION ---\n switchTap((t: NavigationTransition) => {\n const {\n targetSnapshot,\n id: navigationId,\n extractedUrl: appliedUrlTree,\n rawUrl: rawUrlTree,\n extras: {skipLocationChange, replaceUrl}\n } = t;\n return this.hooks.afterPreactivation(targetSnapshot !, {\n navigationId,\n appliedUrlTree,\n rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n this.routeReuseStrategy, t.targetSnapshot !, t.currentRouterState);\n return ({...t, targetRouterState});\n }),\n\n /* Once here, we are about to activate syncronously. The assumption is this will\n succeed, and user code may read from the Router service. Therefore before\n activation, we need to update router properties storing the current URL and the\n RouterState, as well as updated the browser URL. All this should happen *before*\n activating. */\n tap((t: NavigationTransition) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n (this as{routerState: RouterState}).routerState = t.targetRouterState !;\n\n if (this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n this.setBrowserUrl(\n this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n this.browserUrlTree = t.urlAfterRedirects;\n }\n }),\n\n activateRoutes(\n this.rootContexts, this.routeReuseStrategy,\n (evt: Event) => this.triggerEvent(evt)),\n\n tap({next() { completed = true; }, complete() { completed = true; }}),\n finalize(() => {\n /* When the navigation stream finishes either through error or success, we set the\n * `completed` or `errored` flag. However, there are some situations where we could\n * get here without either of those being set. For instance, a redirect during\n * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a fresh\n // page load, if a new navigation comes in before a successful navigation\n // completes, there will be nothing in history.state.navigationId. This can cause\n // sync problems with AngularJS sync code which looks for a value here in order\n // to determine whether or not to handle a given popstate event or to leave it\n // to the Angualr router.\n this.resetUrlToCurrentUrlTree();\n const navCancel = new NavigationCancel(\n t.id, this.serializeUrl(t.extractedUrl),\n `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore we\n // can safely set currentNavigation to null here.\n this.currentNavigation = null;\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a cancellation\n * rather than an error. */\n if (isNavigationCancelingError(e)) {\n const redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/` isn't\n // a change from the default currentUrlTree and won't navigate. This is\n // only applicable with initial navigation, so setting `navigated` only when\n // not redirecting resolves this scenario.\n this.navigated = true;\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n const navCancel =\n new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n t.resolve(false);\n\n if (redirecting) {\n this.navigateByUrl(e.url);\n }\n\n /* All other errors should reset to the router's internal URL reference to the\n * pre-error state. */\n } else {\n this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(this.errorHandler(e));\n } catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }), );\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n })) as any as Observable<NavigationTransition>;\n }\n\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n resetRootComponentType(rootComponentType: Type<any>): void {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n }\n\n private getTransition(): NavigationTransition { return this.transitions.value; }\n\n private setTransition(t: Partial<NavigationTransition>): void {\n this.transitions.next({...this.getTransition(), ...t});\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n }\n }\n\n /**\n * Sets up the location change listener.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = <any>this.location.subscribe((change: any) => {\n let rawUrlTree = this.parseUrl(change['url']);\n const source: NavigationTrigger = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n const state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(\n () => { this.scheduleNavigation(rawUrlTree, source, state, {replaceUrl: true}); }, 0);\n });\n }\n }\n\n /** The current url */\n get url(): string { return this.serializeUrl(this.currentUrlTree); }\n\n /** The current Navigation object if one exists */\n getCurrentNavigation(): Navigation|null { return this.currentNavigation; }\n\n /** @internal */\n triggerEvent(event: Event): void { (this.events as Subject<Event>).next(event); }\n\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n }\n\n /** @docsNotRequired */\n ngOnDestroy(): void { this.dispose(); }\n\n /** Disposes of the router */\n dispose(): void {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null !;\n }\n }\n\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it, you\n * // can do the following:\n *\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n const {relativeTo, queryParams, fragment,\n preserveQueryParams, queryParamsHandling, preserveFragment} = navigationExtras;\n if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n const a = relativeTo || this.routerState.root;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params|null = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n } else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q !, f !);\n }\n\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\n `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n }\n\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ### Example\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string { return this.urlSerializer.serialize(url); }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n let urlTree: UrlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }\n\n /** Returns whether the url is activated */\n isActive(url: string|UrlTree, exact: boolean): boolean {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.keys(params).reduce((result: Params, key: string) => {\n const value: any = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private processNavigations(): void {\n this.navigations.subscribe(\n t => {\n this.navigated = true;\n this.lastSuccessfulId = t.id;\n (this.events as Subject<Event>)\n .next(new NavigationEnd(\n t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.currentNavigation = null;\n t.resolve(true);\n },\n e => { this.console.warn(`Unhandled Navigation Error: `); });\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n extras: NavigationExtras): Promise<boolean> {\n const lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n\n let resolve: any = null;\n let reject: any = null;\n\n const promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const id = ++this.navigationId;\n this.setTransition({\n id,\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => { return Promise.reject(e); });\n }\n\n private setBrowserUrl(\n url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n const path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', {...state, navigationId: id});\n } else {\n this.location.go(path, '', {...state, navigationId: id});\n }\n }\n\n private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n (this as{routerState: RouterState}).routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, isDevMode} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink {\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n @HostListener('click')\n onClick(): boolean {\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n // TODO(issue/24571): remove '!'.\n @HostBinding('attr.target') @Input() target !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParams !: {[k: string]: any};\n // TODO(issue/24571): remove '!'.\n @Input() fragment !: string;\n // TODO(issue/24571): remove '!'.\n @Input() queryParamsHandling !: QueryParamsHandling;\n // TODO(issue/24571): remove '!'.\n @Input() preserveFragment !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() skipLocationChange !: boolean;\n // TODO(issue/24571): remove '!'.\n @Input() replaceUrl !: boolean;\n @Input() state?: {[k: string]: any};\n private commands: any[] = [];\n private subscription: Subscription;\n // TODO(issue/24571): remove '!'.\n private preserve !: boolean;\n\n // the url displayed on the anchor element.\n // TODO(issue/24571): remove '!'.\n @HostBinding() href !: string;\n\n constructor(\n private router: Router, private route: ActivatedRoute,\n private locationStrategy: LocationStrategy) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.updateTargetUrlAndHref();\n }\n });\n }\n\n @Input()\n set routerLink(commands: any[]|string) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n } else {\n this.commands = [];\n }\n }\n\n @Input()\n set preserveQueryParams(value: boolean) {\n if (isDevMode() && <any>console && <any>console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n }\n\n ngOnChanges(changes: {}): any { this.updateTargetUrlAndHref(); }\n ngOnDestroy(): any { this.subscription.unsubscribe(); }\n\n @HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'])\n onClick(button: number, ctrlKey: boolean, metaKey: boolean, shiftKey: boolean): boolean {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n\n const extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n\n private updateTargetUrlAndHref(): void {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n }\n\n get urlTree(): UrlTree {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {NavigationEnd, RouterEvent} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges,\n OnDestroy, AfterContentInit {\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLink, {descendants: true})\n links !: QueryList<RouterLink>;\n // TODO(issue/24571): remove '!'.\n @ContentChildren(RouterLinkWithHref, {descendants: true})\n linksWithHrefs !: QueryList<RouterLinkWithHref>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n public readonly isActive: boolean = false;\n\n @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n constructor(\n private router: Router, private element: ElementRef, private renderer: Renderer2,\n private cdr: ChangeDetectorRef) {\n this.subscription = router.events.subscribe((s: RouterEvent) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(_ => this.update());\n this.linksWithHrefs.changes.subscribe(_ => this.update());\n this.update();\n }\n\n @Input()\n set routerLinkActive(data: string[]|string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n\n ngOnChanges(changes: SimpleChanges): void { this.update(); }\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private update(): void {\n if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n Promise.resolve().then(() => {\n const hasActiveLinks = this.hasActiveLinks();\n if (this.isActive !== hasActiveLinks) {\n (this as any).isActive = hasActiveLinks;\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n });\n }\n\n private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n return (link: RouterLink | RouterLinkWithHref) =>\n router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutlet|null = null;\n route: ActivatedRoute|null = null;\n resolver: ComponentFactoryResolver|null = null;\n children = new ChildrenOutletContexts();\n attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) { this.contexts = contexts; }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext|null { return this.contexts.get(childName) || null; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n private activated: ComponentRef<any>|null = null;\n private _activatedRoute: ActivatedRoute|null = null;\n private name: string;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n constructor(\n private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n private changeDetector: ChangeDetectorRef) {\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n\n ngOnDestroy(): void { this.parentContexts.onChildOutletDestroyed(this.name); }\n\n ngOnInit(): void {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n }\n\n get isActivated(): boolean { return !!this.activated; }\n\n get component(): Object {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) throw new Error('Outlet is not activated');\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated) throw new Error('Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const snapshot = activatedRoute._futureSnapshot;\n const component = <any>snapshot.routeConfig !.component;\n resolver = resolver || this.resolver;\n const factory = resolver.resolveComponentFactory(component);\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(\n private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n","/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source code is governed by an MIT-style license that can be\n*found in the LICENSE file at https://angular.io/license\n*/\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {Observable, Subscription, from, of } from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of (null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> { return of (null); }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n private loader: RouterConfigLoader;\n // TODO(issue/24571): remove '!'.\n private subscription !: Subscription;\n\n constructor(\n private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n\n setUpPreloading(): void {\n this.subscription =\n this.router.events\n .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n const ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n }\n\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n ngOnDestroy(): void { this.subscription.unsubscribe(); }\n\n private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n const childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n // no config loaded, fetch the config\n } else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n\n // recurse into children\n } else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n return from(res).pipe(mergeAll(), map((_) => void 0));\n }\n\n private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n const loaded$ = this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n route._loadedConfig = config;\n return this.processRoutes(config.module, config.routes);\n }));\n });\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\nexport class RouterScroller implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n private routerEventsSubscription !: Unsubscribable;\n // TODO(issue/24571): remove '!'.\n private scrollEventsSubscription !: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n constructor(\n private router: Router,\n /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top',\n anchorScrolling?: 'disabled'|'enabled'\n } = {}) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.router.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.router.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n this.router.triggerEvent(new Scroll(\n routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n }\n\n ngOnDestroy() {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {ɵgetDOM as getDOM} from '@angular/platform-browser';\nimport {Subject, of } from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RouterEvent} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n\n\n/**\n * @description\n *\n * Contains a list of directives\n *\n *\n */\nconst ROUTER_DIRECTIVES =\n [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n * @publicApi\n */\n@NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n // Note: We are injecting the Router so it gets created eagerly...\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [\n PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION\n ]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n }\n}\n\nexport function createRouterScroller(\n router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n if (router) {\n throw new Error(\n `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n *\n * Registers routes.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n return [\n {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n {provide: ROUTES, multi: true, useValue: routes},\n ];\n}\n\n/**\n * @description\n *\n * Represents an option to configure when the initial navigation is performed.\n *\n * * 'enabled' - the initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete.\n * * 'disabled' - the initial navigation is not performed. The location listener is set up before\n * the root component gets created.\n * * 'legacy_enabled'- the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked until the initial navigation is complete. @deprecated\n * * 'legacy_disabled'- the initial navigation is not performed. The location listener is set up\n * after @deprecated\n * the root component gets created.\n * * `true` - same as 'legacy_enabled'. @deprecated since v4\n * * `false` - same as 'legacy_disabled'. @deprecated since v4\n *\n * The 'enabled' option should be used for applications unless there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic. In this case, 'disabled' should be used.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @publicApi\n */\nexport type InitialNavigation =\n true | false | 'enabled' | 'disabled' | 'legacy_enabled' | 'legacy_disabled';\n\n/**\n * @description\n *\n * Represents options to configure the router.\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n /**\n * Makes the router log all its internal events to the console.\n */\n enableTracing?: boolean;\n\n /**\n * Enables the location strategy that uses the URL fragment instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * Disables the initial navigation.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * A custom error handler.\n */\n errorHandler?: ErrorHandler;\n\n /**\n * Configures a preloading strategy. See `PreloadAllModules`.\n */\n preloadingStrategy?: any;\n\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n onSameUrlNavigation?: 'reload'|'ignore';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'--does nothing (default).\n * * 'top'--set the scroll position to 0,0..\n * * 'enabled'--set the scroll position to the stored position. This option will be the default in\n * the future.\n *\n * When enabled, the router stores and restores scroll positions during navigation.\n * When navigating forward, the scroll position will be set to [0, 0], or to the anchor\n * if one is provided.\n *\n * You can implement custom scroll restoration behavior as follows.\n * ```typescript\n * class AppModule {\n * constructor(router: Router, viewportScroller: ViewportScroller, store: Store<AppState>) {\n * router.events.pipe(filter(e => e instanceof Scroll), switchMap(e => {\n * return store.pipe(first(), timeout(200), map(() => e));\n * }).subscribe(e => {\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else if (e.anchor) {\n * viewportScroller.scrollToAnchor(e.anchor);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n * ```\n *\n * You can also implement component-specific scrolling like this:\n *\n * ```typescript\n * class ListComponent {\n * list: any[];\n * constructor(router: Router, viewportScroller: ViewportScroller, fetcher: ListFetcher) {\n * const scrollEvents = router.events.filter(e => e instanceof Scroll);\n * listFetcher.fetch().pipe(withLatestFrom(scrollEvents)).subscribe(([list, e]) => {\n * this.list = list;\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * } else {\n * viewportScroller.scrollToPosition([0, 0]);\n * }\n * });\n * }\n * }\n */\n scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n /**\n * Configures if the router should scroll to the element when the url has a fragment.\n *\n * * 'disabled'--does nothing (default).\n * * 'enabled'--scrolls to the element. This option will be the default in the future.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled'|'enabled';\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with two numbers, the router will always use the numbers.\n * When given a function, the router will invoke the function every time it restores scroll\n * position.\n */\n scrollOffset?: [number, number]|(() => [number, number]);\n\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n /**\n * A custom malformed uri error handler function. This handler is invoked when encodedURI contains\n * invalid character sequences. The default implementation is to redirect to the root url dropping\n * any path or param info. This function passes three parameters:\n *\n * - `'URIError'` - Error thrown when parsing a bad URL\n * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n * - `'url'` - The malformed URL that caused the URIError\n * */\n malformedUriErrorHandler?:\n (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n urlUpdateStrategy?: 'deferred'|'eager';\n\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * Example:\n *\n * ```\n * const routes = [\n * {\n * path: '',\n * component: ContainerComponent,\n * children: [\n * { path: 'a', component: AComponent },\n * { path: 'b', component: BComponent },\n * ]\n * }\n * ];\n * ```\n *\n * From the `ContainerComponent`, this will not work:\n *\n * `<a [routerLink]=\"['./a']\">Link to A</a>`\n *\n * However, this will work:\n *\n * `<a [routerLink]=\"['../a']\">Link to A</a>`\n *\n * In other words, you're required to use `../` rather than `./`. This is currently the default\n * behavior. Setting this option to `corrected` enables the fix.\n */\n relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,\n location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,\n config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy) {\n const router = new Router(\n null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.enableTracing) {\n const dom = getDOM();\n router.events.subscribe((e: RouterEvent) => {\n dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n dom.log(e.toString());\n dom.log(e);\n dom.logGroupEnd();\n });\n }\n\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n\n return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n private initNavigation: boolean = false;\n private resultOfPreactivationDone = new Subject<void>();\n\n constructor(private injector: Injector) {}\n\n appInitializer(): Promise<any> {\n const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(() => {\n let resolve: Function = null !;\n const res = new Promise(r => resolve = r);\n const router = this.injector.get(Router);\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n resolve(true);\n\n } else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n\n } else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = () => {\n // only the initial navigation should be delayed\n if (!this.initNavigation) {\n this.initNavigation = true;\n resolve(true);\n return this.resultOfPreactivationDone;\n\n // subsequent navigations should not be delayed\n } else {\n return of (null) as any;\n }\n };\n router.initialNavigation();\n\n } else {\n throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n }\n\n return res;\n });\n }\n\n bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n const opts = this.injector.get(ROUTER_CONFIGURATION);\n const preloader = this.injector.get(RouterPreloader);\n const routerScroller = this.injector.get(RouterScroller);\n const router = this.injector.get(Router);\n const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n } else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null !);\n this.resultOfPreactivationDone.complete();\n }\n\n private isLegacyEnabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n }\n\n private isLegacyDisabled(opts: ExtraOptions): boolean {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n return r.bootstrapListener.bind(r);\n}\n\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('7.2.8');\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, LoadChildren, LoadChildrenCallback, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatchResult, UrlMatcher} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationExtras, Router} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {PRIMARY_OUTLET, ParamMap, Params, convertToParamMap} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_n} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_l,TreeNode as ɵangular_packages_router_router_m} from './src/utils/tree';"],"names":["tslib_1.__extends","last","map","lastValue","isObservable","isPromise","tslib_1.__values","applyRedirects","applyRedirectsFn","split","NoMatch","match","getOutlet","recognize","recognizeFn","Console","tslib_1.__assign","tslib_1.__decorate","tslib_1.__param","getDOM"],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* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

fesm5/upgrade.js

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

package.json

@@ -1,6 +1,6 @@
{
"name": "@angular/router",
- "version": "7.2.7",
+ "version": "7.2.8",
"description": "Angular - the routing library",
"main": "./bundles/router.umd.js",
"module": "./fesm5/router.js",
@@ -28,9 +28,9 @@
"tslib": "^1.9.0"
},
"peerDependencies": {
- "@angular/core": "7.2.7",
- "@angular/common": "7.2.7",
- "@angular/platform-browser": "7.2.7",
+ "@angular/core": "7.2.8",
+ "@angular/common": "7.2.8",
+ "@angular/platform-browser": "7.2.8",
"rxjs": "^6.0.0"
},
"ng-update": {

router.metadata.json

@@ -1 +1 @@
-{"__symbolic":"module","version":4,"metadata":{"ɵangular_packages_router_router_a":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":40},"arguments":["ROUTER_FORROOT_GUARD"]},"ɵangular_packages_router_router_b":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":78,"character":13},"arguments":["Router",{"__symbolic":"reference","name":"Router"}]}},"ɵangular_packages_router_router_c":{"__symbolic":"function"},"ɵangular_packages_router_router_d":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"defaults":[null,null,{}],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy","line":210,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy","line":211,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}}},"ɵangular_packages_router_router_e":{"__symbolic":"function"},"ɵangular_packages_router_router_f":{"__symbolic":"function"},"ɵangular_packages_router_router_g":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"ɵangular_packages_router_router_h":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":520,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":525,"character":32}]}],"appInitializer":[{"__symbolic":"method"}],"bootstrapListener":[{"__symbolic":"method"}],"isLegacyEnabled":[{"__symbolic":"method"}],"isLegacyDisabled":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_i":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"appInitializer"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_j":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"bootstrapListener"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_k":{"__symbolic":"function","parameters":[],"value":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER","line":619,"character":15},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_i"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_j"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER","line":625,"character":14},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]},"Data":{"__symbolic":"interface"},"LoadChildren":{"__symbolic":"interface"},"LoadChildrenCallback":{"__symbolic":"interface"},"ResolveData":{"__symbolic":"interface"},"Route":{"__symbolic":"interface"},"Routes":{"__symbolic":"interface"},"RunGuardsAndResolvers":{"__symbolic":"interface"},"UrlMatchResult":{"__symbolic":"interface"},"UrlMatcher":{"__symbolic":"interface"},"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":113,"character":1},"arguments":[{"selector":":not(a):not(area)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":116,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":120,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":122,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":124,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":126,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":127,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":134,"character":7},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":134,"character":57},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":134,"character":72}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":140,"character":3}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":152,"character":3}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":160,"character":3},"arguments":["click"]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":193,"character":1},"arguments":[{"selector":"a[routerLink],area[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":196,"character":3},"arguments":["attr.target"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":196,"character":31}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":198,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":200,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":204,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":206,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":208,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":209,"character":3}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":217,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":221,"character":32}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":229,"character":3}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":238,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":249,"character":3},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}},"RouterLinkActive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":74,"character":1},"arguments":[{"selector":"[routerLinkActive]","exportAs":"routerLinkActive"}]}],"members":{"links":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":81,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLink"},{"descendants":true}]}]}],"linksWithHrefs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":84,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLinkWithHref"},{"descendants":true}]}]}],"routerLinkActiveOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":94,"character":47},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":94,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":95,"character":19}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"routerLinkActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"isLinkActive":[{"__symbolic":"method"}],"hasActiveLinks":[{"__symbolic":"method"}]}},"RouterOutlet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":38,"character":1},"arguments":[{"selector":"router-outlet","exportAs":"outlet"}]}],"members":{"activateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":3},"arguments":["activate"]}]}],"deactivateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":45,"character":3},"arguments":["deactivate"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":49,"character":51},"arguments":["name"]}],null],"parameters":[{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":48,"character":72},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":49,"character":24},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":50,"character":30}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"detach":[{"__symbolic":"method"}],"attach":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"activateWith":[{"__symbolic":"method"}]}},"ActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Event":{"__symbolic":"interface"},"GuardsCheckEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"},{"__symbolic":"reference","name":"boolean"}]}],"toString":[{"__symbolic":"method"}]}},"GuardsCheckStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationCancel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationError":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"any"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":93,"character":25,"module":"./src/events"},{"__symbolic":"error","message":"Expression form not supported","line":95,"character":21,"module":"./src/events"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouterEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"}]}]}},"RoutesRecognized":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Scroll":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NavigationEnd"},{"__symbolic":"error","message":"Expression form not supported","line":420,"character":25,"module":"./src/events"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"CanActivate":{"__symbolic":"interface"},"CanActivateChild":{"__symbolic":"interface"},"CanDeactivate":{"__symbolic":"interface"},"CanLoad":{"__symbolic":"interface"},"Resolve":{"__symbolic":"interface"},"DetachedRouteHandle":{"__symbolic":"interface"},"RouteReuseStrategy":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}},"Navigation":{"__symbolic":"interface"},"NavigationExtras":{"__symbolic":"interface"},"Router":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":390,"character":70},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":390,"character":90},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":391,"character":14},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":391,"character":47},{"__symbolic":"reference","name":"Routes"}]}],"setupNavigations":[{"__symbolic":"method"}],"resetRootComponentType":[{"__symbolic":"method"}],"getTransition":[{"__symbolic":"method"}],"setTransition":[{"__symbolic":"method"}],"initialNavigation":[{"__symbolic":"method"}],"setUpLocationChangeListener":[{"__symbolic":"method"}],"getCurrentNavigation":[{"__symbolic":"method"}],"triggerEvent":[{"__symbolic":"method"}],"resetConfig":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"createUrlTree":[{"__symbolic":"method"}],"navigateByUrl":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}],"serializeUrl":[{"__symbolic":"method"}],"parseUrl":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"removeEmptyProps":[{"__symbolic":"method"}],"processNavigations":[{"__symbolic":"method"}],"scheduleNavigation":[{"__symbolic":"method"}],"setBrowserUrl":[{"__symbolic":"method"}],"resetStateAndUrl":[{"__symbolic":"method"}],"resetUrlToCurrentUrlTree":[{"__symbolic":"method"}]}},"ROUTES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":19,"character":26},"arguments":["ROUTES"]},"ExtraOptions":{"__symbolic":"interface"},"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":49,"character":40},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":613,"character":8},"arguments":["Router Initializer"]},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":132,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵEmptyOutletComponent"}],"exports":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵEmptyOutletComponent"}],"entryComponents":[{"__symbolic":"reference","name":"ɵEmptyOutletComponent"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":139,"character":27},"arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":69}}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"Router"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ɵROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_e"},"deps":[[{"__symbolic":"reference","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":166,"character":30}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":166,"character":46}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":170,"character":19},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_d"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation","line":173,"character":12},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":173,"character":35},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF","line":173,"character":42}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":173,"character":62}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_c"},"deps":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":179,"character":25},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":186,"character":18},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_b"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"ɵangular_packages_router_router_k"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS","line":242,"character":14},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"ChildrenOutletContexts":{"__symbolic":"class","members":{"onChildOutletCreated":[{"__symbolic":"method"}],"onChildOutletDestroyed":[{"__symbolic":"method"}],"onOutletDeactivated":[{"__symbolic":"method"}],"onOutletReAttached":[{"__symbolic":"method"}],"getOrCreateContext":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}]}},"OutletContext":{"__symbolic":"class","members":{}},"NoPreloading":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadAllModules":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadingStrategy":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"RouterPreloader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":71,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":78,"character":44},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":78,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":79,"character":24},{"__symbolic":"reference","name":"PreloadingStrategy"}]}],"setUpPreloading":[{"__symbolic":"method"}],"preload":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"processRoutes":[{"__symbolic":"method"}],"preloadConfig":[{"__symbolic":"method"}]}},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Route"},{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"}]}],"toString":[{"__symbolic":"method"}]}},"PRIMARY_OUTLET":"primary","ParamMap":{"__symbolic":"interface"},"Params":{"__symbolic":"interface"},"convertToParamMap":{"__symbolic":"function","parameters":["params"],"value":{"__symbolic":"error","message":"Reference to non-exported class","line":62,"character":0,"context":{"className":"ParamsAsMap"},"module":"./src/shared"}},"UrlHandlingStrategy":{"__symbolic":"class","members":{"shouldProcessUrl":[{"__symbolic":"method"}],"extract":[{"__symbolic":"method"}],"merge":[{"__symbolic":"method"}]}},"DefaultUrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"UrlSegment":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":204,"character":25,"module":"./src/url_tree"}]}],"toString":[{"__symbolic":"method"}]}},"UrlSegmentGroup":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"error","message":"Expression form not supported","line":153,"character":23,"module":"./src/url_tree"}]}],"hasChildren":[{"__symbolic":"method"}],"toString":[{"__symbolic":"method"}]}},"UrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"UrlTree":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version","line":19,"character":27},"arguments":["7.2.7"]},"ɵEmptyOutletComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"template":"<router-outlet></router-outlet>"}]}],"members":{}},"ɵROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location","line":57,"character":2},{"provide":{"__symbolic":"reference","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","name":"Router"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_f"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":63,"character":6},{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":63,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":63,"character":71},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":64,"character":6},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":64,"character":29},{"__symbolic":"reference","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":65,"character":32}}],[{"__symbolic":"reference","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":65,"character":70}}]]},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"provide":{"__symbolic":"reference","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_g"},"deps":[{"__symbolic":"reference","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":70,"character":12},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader","line":70,"character":45}},{"__symbolic":"reference","name":"RouterPreloader"},{"__symbolic":"reference","name":"NoPreloading"},{"__symbolic":"reference","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"ɵflatten":{"__symbolic":"function","parameters":["arr"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"prototype"},"member":"concat"},"member":"apply"},"arguments":[[],{"__symbolic":"reference","name":"arr"}]}},"ɵangular_packages_router_router_l":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"}]}],"parent":[{"__symbolic":"method"}],"children":[{"__symbolic":"method"}],"firstChild":[{"__symbolic":"method"}],"siblings":[{"__symbolic":"method"}],"pathFromRoot":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_m":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":86,"character":28,"context":{"typeName":"T"},"module":"./src/utils/tree"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"}]}]}],"toString":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_n":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":28,"character":64},{"__symbolic":"error","message":"Expression form not supported","line":28,"character":99,"module":"./src/router_scroller"}]}],"init":[{"__symbolic":"method"}],"createScrollEvents":[{"__symbolic":"method"}],"consumeScrollEvents":[{"__symbolic":"method"}],"scheduleScrollEvent":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵangular_packages_router_router_a":"./src/router_module","ɵangular_packages_router_router_b":"./src/router_module","ɵangular_packages_router_router_c":"./src/router_module","ɵangular_packages_router_router_d":"./src/router_module","ɵangular_packages_router_router_e":"./src/router_module","ɵangular_packages_router_router_f":"./src/router_module","ɵangular_packages_router_router_g":"./src/router_module","ɵangular_packages_router_router_h":"./src/router_module","ɵangular_packages_router_router_i":"./src/router_module","ɵangular_packages_router_router_j":"./src/router_module","ɵangular_packages_router_router_k":"./src/router_module","Data":"./src/config","LoadChildren":"./src/config","LoadChildrenCallback":"./src/config","ResolveData":"./src/config","Route":"./src/config","Routes":"./src/config","RunGuardsAndResolvers":"./src/config","UrlMatchResult":"./src/config","UrlMatcher":"./src/config","RouterLink":"./src/directives/router_link","RouterLinkWithHref":"./src/directives/router_link","RouterLinkActive":"./src/directives/router_link_active","RouterOutlet":"./src/directives/router_outlet","ActivationEnd":"./src/events","ActivationStart":"./src/events","ChildActivationEnd":"./src/events","ChildActivationStart":"./src/events","Event":"./src/events","GuardsCheckEnd":"./src/events","GuardsCheckStart":"./src/events","NavigationCancel":"./src/events","NavigationEnd":"./src/events","NavigationError":"./src/events","NavigationStart":"./src/events","ResolveEnd":"./src/events","ResolveStart":"./src/events","RouteConfigLoadEnd":"./src/events","RouteConfigLoadStart":"./src/events","RouterEvent":"./src/events","RoutesRecognized":"./src/events","Scroll":"./src/events","CanActivate":"./src/interfaces","CanActivateChild":"./src/interfaces","CanDeactivate":"./src/interfaces","CanLoad":"./src/interfaces","Resolve":"./src/interfaces","DetachedRouteHandle":"./src/route_reuse_strategy","RouteReuseStrategy":"./src/route_reuse_strategy","Navigation":"./src/router","NavigationExtras":"./src/router","Router":"./src/router","ROUTES":"./src/router_config_loader","ExtraOptions":"./src/router_module","ROUTER_CONFIGURATION":"./src/router_module","ROUTER_INITIALIZER":"./src/router_module","RouterModule":"./src/router_module","provideRoutes":"./src/router_module","ChildrenOutletContexts":"./src/router_outlet_context","OutletContext":"./src/router_outlet_context","NoPreloading":"./src/router_preloader","PreloadAllModules":"./src/router_preloader","PreloadingStrategy":"./src/router_preloader","RouterPreloader":"./src/router_preloader","ActivatedRoute":"./src/router_state","ActivatedRouteSnapshot":"./src/router_state","RouterState":"./src/router_state","RouterStateSnapshot":"./src/router_state","PRIMARY_OUTLET":"./src/shared","ParamMap":"./src/shared","Params":"./src/shared","convertToParamMap":"./src/shared","UrlHandlingStrategy":"./src/url_handling_strategy","DefaultUrlSerializer":"./src/url_tree","UrlSegment":"./src/url_tree","UrlSegmentGroup":"./src/url_tree","UrlSerializer":"./src/url_tree","UrlTree":"./src/url_tree","VERSION":"./src/version","ɵEmptyOutletComponent":"./src/components/empty_outlet","ɵROUTER_PROVIDERS":"./src/router_module","ɵflatten":"./src/utils/collection","ɵangular_packages_router_router_l":"./src/utils/tree","ɵangular_packages_router_router_m":"./src/utils/tree","ɵangular_packages_router_router_n":"./src/router_scroller"},"importAs":"@angular/router"}
\ No newline at end of file
+{"__symbolic":"module","version":4,"metadata":{"ɵangular_packages_router_router_a":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":40},"arguments":["ROUTER_FORROOT_GUARD"]},"ɵangular_packages_router_router_b":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":78,"character":13},"arguments":["Router",{"__symbolic":"reference","name":"Router"}]}},"ɵangular_packages_router_router_c":{"__symbolic":"function"},"ɵangular_packages_router_router_d":{"__symbolic":"function","parameters":["platformLocationStrategy","baseHref","options"],"defaults":[null,null,{}],"value":{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"useHash"},"thenExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"HashLocationStrategy","line":210,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]},"elseExpression":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/common","name":"PathLocationStrategy","line":211,"character":31},"arguments":[{"__symbolic":"reference","name":"platformLocationStrategy"},{"__symbolic":"reference","name":"baseHref"}]}}},"ɵangular_packages_router_router_e":{"__symbolic":"function"},"ɵangular_packages_router_router_f":{"__symbolic":"function"},"ɵangular_packages_router_router_g":{"__symbolic":"function","parameters":["router"],"value":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"router"},"member":"routerState"},"member":"root"}},"ɵangular_packages_router_router_h":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":520,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":525,"character":32}]}],"appInitializer":[{"__symbolic":"method"}],"bootstrapListener":[{"__symbolic":"method"}],"isLegacyEnabled":[{"__symbolic":"method"}],"isLegacyDisabled":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_i":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"appInitializer"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_j":{"__symbolic":"function","parameters":["r"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"r"},"member":"bootstrapListener"},"member":"bind"},"arguments":[{"__symbolic":"reference","name":"r"}]}},"ɵangular_packages_router_router_k":{"__symbolic":"function","parameters":[],"value":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_INITIALIZER","line":619,"character":15},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_i"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_j"},"deps":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_h"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"APP_BOOTSTRAP_LISTENER","line":625,"character":14},"multi":true,"useExisting":{"__symbolic":"reference","name":"ROUTER_INITIALIZER"}}]},"Data":{"__symbolic":"interface"},"LoadChildren":{"__symbolic":"interface"},"LoadChildrenCallback":{"__symbolic":"interface"},"ResolveData":{"__symbolic":"interface"},"Route":{"__symbolic":"interface"},"Routes":{"__symbolic":"interface"},"RunGuardsAndResolvers":{"__symbolic":"interface"},"UrlMatchResult":{"__symbolic":"interface"},"UrlMatcher":{"__symbolic":"interface"},"RouterLink":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":113,"character":1},"arguments":[{"selector":":not(a):not(area)[routerLink]"}]}],"members":{"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":116,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":120,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":122,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":124,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":126,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":127,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":134,"character":7},"arguments":["tabindex"]}],null,null],"parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":134,"character":57},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":134,"character":72}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":140,"character":3}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":152,"character":3}}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":160,"character":3},"arguments":["click"]}]}]}},"RouterLinkWithHref":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":193,"character":1},"arguments":[{"selector":"a[routerLink],area[routerLink]"}]}],"members":{"target":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":196,"character":3},"arguments":["attr.target"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":196,"character":31}}]}],"queryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":198,"character":3}}]}],"fragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":200,"character":3}}]}],"queryParamsHandling":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":3}}]}],"preserveFragment":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":204,"character":3}}]}],"skipLocationChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":206,"character":3}}]}],"replaceUrl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":208,"character":3}}]}],"state":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":209,"character":3}}]}],"href":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":217,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":221,"character":32}]}],"routerLink":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":229,"character":3}}]}],"preserveQueryParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":238,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":249,"character":3},"arguments":["click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]]}]}],"updateTargetUrlAndHref":[{"__symbolic":"method"}]}},"RouterLinkActive":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":74,"character":1},"arguments":[{"selector":"[routerLinkActive]","exportAs":"routerLinkActive"}]}],"members":{"links":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":81,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLink"},{"descendants":true}]}]}],"linksWithHrefs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":84,"character":3},"arguments":[{"__symbolic":"reference","name":"RouterLinkWithHref"},{"descendants":true}]}]}],"routerLinkActiveOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":94,"character":47},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":94,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":95,"character":19}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"routerLinkActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"isLinkActive":[{"__symbolic":"method"}],"hasActiveLinks":[{"__symbolic":"method"}]}},"RouterOutlet":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":38,"character":1},"arguments":[{"selector":"router-outlet","exportAs":"outlet"}]}],"members":{"activateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":44,"character":3},"arguments":["activate"]}]}],"deactivateEvents":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":45,"character":3},"arguments":["deactivate"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":49,"character":51},"arguments":["name"]}],null],"parameters":[{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":48,"character":72},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":49,"character":24},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":50,"character":30}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"detach":[{"__symbolic":"method"}],"attach":[{"__symbolic":"method"}],"deactivate":[{"__symbolic":"method"}],"activateWith":[{"__symbolic":"method"}]}},"ActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ChildActivationStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Event":{"__symbolic":"interface"},"GuardsCheckEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"},{"__symbolic":"reference","name":"boolean"}]}],"toString":[{"__symbolic":"method"}]}},"GuardsCheckStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationCancel":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationError":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"any"}]}],"toString":[{"__symbolic":"method"}]}},"NavigationStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":93,"character":25,"module":"./src/events"},{"__symbolic":"error","message":"Expression form not supported","line":95,"character":21,"module":"./src/events"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveEnd":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ResolveStart":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadEnd":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouteConfigLoadStart":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Route"}]}],"toString":[{"__symbolic":"method"}]}},"RouterEvent":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"}]}]}},"RoutesRecognized":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"RouterEvent"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"Scroll":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NavigationEnd"},{"__symbolic":"error","message":"Expression form not supported","line":420,"character":25,"module":"./src/events"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"CanActivate":{"__symbolic":"interface"},"CanActivateChild":{"__symbolic":"interface"},"CanDeactivate":{"__symbolic":"interface"},"CanLoad":{"__symbolic":"interface"},"Resolve":{"__symbolic":"interface"},"DetachedRouteHandle":{"__symbolic":"interface"},"RouteReuseStrategy":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}},"Navigation":{"__symbolic":"interface"},"NavigationExtras":{"__symbolic":"interface"},"Router":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":390,"character":70},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":390,"character":90},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":391,"character":14},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":391,"character":47},{"__symbolic":"reference","name":"Routes"}]}],"setupNavigations":[{"__symbolic":"method"}],"resetRootComponentType":[{"__symbolic":"method"}],"getTransition":[{"__symbolic":"method"}],"setTransition":[{"__symbolic":"method"}],"initialNavigation":[{"__symbolic":"method"}],"setUpLocationChangeListener":[{"__symbolic":"method"}],"getCurrentNavigation":[{"__symbolic":"method"}],"triggerEvent":[{"__symbolic":"method"}],"resetConfig":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"createUrlTree":[{"__symbolic":"method"}],"navigateByUrl":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}],"serializeUrl":[{"__symbolic":"method"}],"parseUrl":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"removeEmptyProps":[{"__symbolic":"method"}],"processNavigations":[{"__symbolic":"method"}],"scheduleNavigation":[{"__symbolic":"method"}],"setBrowserUrl":[{"__symbolic":"method"}],"resetStateAndUrl":[{"__symbolic":"method"}],"resetUrlToCurrentUrlTree":[{"__symbolic":"method"}]}},"ROUTES":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":18,"character":26},"arguments":["ROUTES"]},"ExtraOptions":{"__symbolic":"interface"},"ROUTER_CONFIGURATION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":49,"character":40},"arguments":["ROUTER_CONFIGURATION"]},"ROUTER_INITIALIZER":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":613,"character":8},"arguments":["Router Initializer"]},"RouterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":132,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵEmptyOutletComponent"}],"exports":[{"__symbolic":"reference","name":"RouterOutlet"},{"__symbolic":"reference","name":"RouterLink"},{"__symbolic":"reference","name":"RouterLinkWithHref"},{"__symbolic":"reference","name":"RouterLinkActive"},{"__symbolic":"reference","name":"ɵEmptyOutletComponent"}],"entryComponents":[{"__symbolic":"reference","name":"ɵEmptyOutletComponent"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":139,"character":27},"arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":69}}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"Router"}]}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["routes","config"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"reference","name":"ɵROUTER_PROVIDERS"},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_a"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_e"},"deps":[[{"__symbolic":"reference","name":"Router"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":166,"character":30}},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":166,"character":46}}]]},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"config"},"thenExpression":{"__symbolic":"reference","name":"config"},"elseExpression":{}}},{"provide":{"__symbolic":"reference","module":"@angular/common","name":"LocationStrategy","line":170,"character":19},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_d"},"deps":[{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation","line":173,"character":12},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":173,"character":35},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"APP_BASE_HREF","line":173,"character":42}]},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":173,"character":62}}],{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"ɵangular_packages_router_router_n"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_c"},"deps":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":179,"character":25},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"}]},{"provide":{"__symbolic":"reference","name":"PreloadingStrategy"},"useExisting":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"config"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"}},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"preloadingStrategy"},"elseExpression":{"__symbolic":"reference","name":"NoPreloading"}}},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgProbeToken","line":186,"character":18},"multi":true,"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_b"}},{"__symbolic":"call","expression":{"__symbolic":"reference","name":"ɵangular_packages_router_router_k"}}]}},"forChild":{"__symbolic":"function","parameters":["routes"],"value":{"ngModule":{"__symbolic":"reference","name":"RouterModule"},"providers":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"provideRoutes"},"arguments":[{"__symbolic":"reference","name":"routes"}]}]}}}},"provideRoutes":{"__symbolic":"function","parameters":["routes"],"value":[{"provide":{"__symbolic":"reference","module":"@angular/core","name":"ANALYZE_FOR_ENTRY_COMPONENTS","line":242,"character":14},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}},{"provide":{"__symbolic":"reference","name":"ROUTES"},"multi":true,"useValue":{"__symbolic":"reference","name":"routes"}}]},"ChildrenOutletContexts":{"__symbolic":"class","members":{"onChildOutletCreated":[{"__symbolic":"method"}],"onChildOutletDestroyed":[{"__symbolic":"method"}],"onOutletDeactivated":[{"__symbolic":"method"}],"onOutletReAttached":[{"__symbolic":"method"}],"getOrCreateContext":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}]}},"OutletContext":{"__symbolic":"class","members":{}},"NoPreloading":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadAllModules":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"PreloadingStrategy":{"__symbolic":"class","members":{"preload":[{"__symbolic":"method"}]}},"RouterPreloader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":71,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":78,"character":44},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":78,"character":77},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":79,"character":24},{"__symbolic":"reference","name":"PreloadingStrategy"}]}],"setUpPreloading":[{"__symbolic":"method"}],"preload":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"processRoutes":[{"__symbolic":"method"}],"preloadConfig":[{"__symbolic":"method"}]}},"ActivatedRoute":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"reference","name":"Data"}]},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"ActivatedRouteSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"ActivatedRouteSnapshot":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Data"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"Type","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Route"},{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"ResolveData"}]}],"toString":[{"__symbolic":"method"}]}},"RouterState":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"},{"__symbolic":"reference","name":"RouterStateSnapshot"}]}],"toString":[{"__symbolic":"method"}]}},"RouterStateSnapshot":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵangular_packages_router_router_l"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"}]}],"toString":[{"__symbolic":"method"}]}},"PRIMARY_OUTLET":"primary","ParamMap":{"__symbolic":"interface"},"Params":{"__symbolic":"interface"},"convertToParamMap":{"__symbolic":"function","parameters":["params"],"value":{"__symbolic":"error","message":"Reference to non-exported class","line":62,"character":0,"context":{"className":"ParamsAsMap"},"module":"./src/shared"}},"UrlHandlingStrategy":{"__symbolic":"class","members":{"shouldProcessUrl":[{"__symbolic":"method"}],"extract":[{"__symbolic":"method"}],"merge":[{"__symbolic":"method"}]}},"DefaultUrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"UrlSegment":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"error","message":"Expression form not supported","line":204,"character":25,"module":"./src/url_tree"}]}],"toString":[{"__symbolic":"method"}]}},"UrlSegmentGroup":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"UrlSegment"}]},{"__symbolic":"error","message":"Expression form not supported","line":153,"character":23,"module":"./src/url_tree"}]}],"hasChildren":[{"__symbolic":"method"}],"toString":[{"__symbolic":"method"}]}},"UrlSerializer":{"__symbolic":"class","members":{"parse":[{"__symbolic":"method"}],"serialize":[{"__symbolic":"method"}]}},"UrlTree":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"UrlSegmentGroup"},{"__symbolic":"reference","name":"Params"},{"__symbolic":"reference","name":"string"}]}],"toString":[{"__symbolic":"method"}]}},"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version","line":19,"character":27},"arguments":["7.2.8"]},"ɵEmptyOutletComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"template":"<router-outlet></router-outlet>"}]}],"members":{}},"ɵROUTER_PROVIDERS":[{"__symbolic":"reference","module":"@angular/common","name":"Location","line":57,"character":2},{"provide":{"__symbolic":"reference","name":"UrlSerializer"},"useClass":{"__symbolic":"reference","name":"DefaultUrlSerializer"}},{"provide":{"__symbolic":"reference","name":"Router"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_f"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"ApplicationRef","line":63,"character":6},{"__symbolic":"reference","name":"UrlSerializer"},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":63,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":63,"character":71},{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":64,"character":6},{"__symbolic":"reference","module":"@angular/core","name":"Compiler","line":64,"character":29},{"__symbolic":"reference","name":"ROUTES"},{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},[{"__symbolic":"reference","name":"UrlHandlingStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":65,"character":32}}],[{"__symbolic":"reference","name":"RouteReuseStrategy"},{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":65,"character":70}}]]},{"__symbolic":"reference","name":"ChildrenOutletContexts"},{"provide":{"__symbolic":"reference","name":"ActivatedRoute"},"useFactory":{"__symbolic":"reference","name":"ɵangular_packages_router_router_g"},"deps":[{"__symbolic":"reference","name":"Router"}]},{"provide":{"__symbolic":"reference","module":"@angular/core","name":"NgModuleFactoryLoader","line":70,"character":12},"useClass":{"__symbolic":"reference","module":"@angular/core","name":"SystemJsNgModuleLoader","line":70,"character":45}},{"__symbolic":"reference","name":"RouterPreloader"},{"__symbolic":"reference","name":"NoPreloading"},{"__symbolic":"reference","name":"PreloadAllModules"},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIGURATION"},"useValue":{"enableTracing":false}}],"ɵflatten":{"__symbolic":"function","parameters":["arr"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"prototype"},"member":"concat"},"member":"apply"},"arguments":[[],{"__symbolic":"reference","name":"arr"}]}},"ɵangular_packages_router_router_l":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"}]}],"parent":[{"__symbolic":"method"}],"children":[{"__symbolic":"method"}],"firstChild":[{"__symbolic":"method"}],"siblings":[{"__symbolic":"method"}],"pathFromRoot":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_m":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":86,"character":28,"context":{"typeName":"T"},"module":"./src/utils/tree"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"ɵangular_packages_router_router_m"}]}]}],"toString":[{"__symbolic":"method"}]}},"ɵangular_packages_router_router_n":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Router"},{"__symbolic":"reference","module":"@angular/common","name":"ViewportScroller","line":28,"character":64},{"__symbolic":"error","message":"Expression form not supported","line":28,"character":99,"module":"./src/router_scroller"}]}],"init":[{"__symbolic":"method"}],"createScrollEvents":[{"__symbolic":"method"}],"consumeScrollEvents":[{"__symbolic":"method"}],"scheduleScrollEvent":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵangular_packages_router_router_a":"./src/router_module","ɵangular_packages_router_router_b":"./src/router_module","ɵangular_packages_router_router_c":"./src/router_module","ɵangular_packages_router_router_d":"./src/router_module","ɵangular_packages_router_router_e":"./src/router_module","ɵangular_packages_router_router_f":"./src/router_module","ɵangular_packages_router_router_g":"./src/router_module","ɵangular_packages_router_router_h":"./src/router_module","ɵangular_packages_router_router_i":"./src/router_module","ɵangular_packages_router_router_j":"./src/router_module","ɵangular_packages_router_router_k":"./src/router_module","Data":"./src/config","LoadChildren":"./src/config","LoadChildrenCallback":"./src/config","ResolveData":"./src/config","Route":"./src/config","Routes":"./src/config","RunGuardsAndResolvers":"./src/config","UrlMatchResult":"./src/config","UrlMatcher":"./src/config","RouterLink":"./src/directives/router_link","RouterLinkWithHref":"./src/directives/router_link","RouterLinkActive":"./src/directives/router_link_active","RouterOutlet":"./src/directives/router_outlet","ActivationEnd":"./src/events","ActivationStart":"./src/events","ChildActivationEnd":"./src/events","ChildActivationStart":"./src/events","Event":"./src/events","GuardsCheckEnd":"./src/events","GuardsCheckStart":"./src/events","NavigationCancel":"./src/events","NavigationEnd":"./src/events","NavigationError":"./src/events","NavigationStart":"./src/events","ResolveEnd":"./src/events","ResolveStart":"./src/events","RouteConfigLoadEnd":"./src/events","RouteConfigLoadStart":"./src/events","RouterEvent":"./src/events","RoutesRecognized":"./src/events","Scroll":"./src/events","CanActivate":"./src/interfaces","CanActivateChild":"./src/interfaces","CanDeactivate":"./src/interfaces","CanLoad":"./src/interfaces","Resolve":"./src/interfaces","DetachedRouteHandle":"./src/route_reuse_strategy","RouteReuseStrategy":"./src/route_reuse_strategy","Navigation":"./src/router","NavigationExtras":"./src/router","Router":"./src/router","ROUTES":"./src/router_config_loader","ExtraOptions":"./src/router_module","ROUTER_CONFIGURATION":"./src/router_module","ROUTER_INITIALIZER":"./src/router_module","RouterModule":"./src/router_module","provideRoutes":"./src/router_module","ChildrenOutletContexts":"./src/router_outlet_context","OutletContext":"./src/router_outlet_context","NoPreloading":"./src/router_preloader","PreloadAllModules":"./src/router_preloader","PreloadingStrategy":"./src/router_preloader","RouterPreloader":"./src/router_preloader","ActivatedRoute":"./src/router_state","ActivatedRouteSnapshot":"./src/router_state","RouterState":"./src/router_state","RouterStateSnapshot":"./src/router_state","PRIMARY_OUTLET":"./src/shared","ParamMap":"./src/shared","Params":"./src/shared","convertToParamMap":"./src/shared","UrlHandlingStrategy":"./src/url_handling_strategy","DefaultUrlSerializer":"./src/url_tree","UrlSegment":"./src/url_tree","UrlSegmentGroup":"./src/url_tree","UrlSerializer":"./src/url_tree","UrlTree":"./src/url_tree","VERSION":"./src/version","ɵEmptyOutletComponent":"./src/components/empty_outlet","ɵROUTER_PROVIDERS":"./src/router_module","ɵflatten":"./src/utils/collection","ɵangular_packages_router_router_l":"./src/utils/tree","ɵangular_packages_router_router_m":"./src/utils/tree","ɵangular_packages_router_router_n":"./src/router_scroller"},"importAs":"@angular/router"}
\ No newline at end of file

src/interfaces.d.ts

@@ -43,7 +43,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canActivate: [CanActivateTeam]
* }
* ])
@@ -61,7 +61,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canActivate: ['canActivateTeam']
* }
* ])
@@ -120,7 +120,7 @@
* children: [
* {
* path: 'team/:id',
- * component: Team
+ * component: TeamComponent
* }
* ]
* }
@@ -143,7 +143,7 @@
* children: [
* {
* path: 'team/:id',
- * component: Team
+ * component: TeamComponent
* }
* ]
* }
@@ -201,7 +201,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canDeactivate: [CanDeactivateTeam]
* }
* ])
@@ -219,7 +219,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* canDeactivate: ['canDeactivateTeam']
* }
* ])
@@ -270,7 +270,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* resolve: {
* team: TeamResolver
* }
@@ -290,7 +290,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* resolve: {
* team: 'teamResolver'
* }
@@ -339,7 +339,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* loadChildren: 'team.js',
* canLoad: [CanLoadTeamSection]
* }
@@ -358,7 +358,7 @@
* RouterModule.forRoot([
* {
* path: 'team/:id',
- * component: TeamCmp,
+ * component: TeamComponent,
* loadChildren: 'team.js',
* canLoad: ['canLoadTeamSection']
* }

testing.d.ts

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/

upgrade.d.ts

@@ -1,5 +1,5 @@
/**
- * @license Angular v7.2.7
+ * @license Angular v7.2.8
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/