@angular/router 11.2.0-rc.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.2.0-rc.0
2
+ * @license Angular v11.2.0
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -113,21 +113,21 @@ function de(t){return i.switchMap((function(e){var r=t(e);return r?n.from(r).pip
113
113
  * Use of this source code is governed by an MIT-style license that can be
114
114
  * found in the LICENSE file at https://angular.io/license
115
115
  */
116
- function Oe(t){throw t}function Ue(t,e,r){return e.parse("/")}function Pe(t,e){return n.of(null)}var xe=function(){function t(t,e,i,o,a,u,s,c){var l=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=i,this.location=o,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new n.Subject,this.errorHandler=Oe,this.malformedUriErrorHandler=Ue,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Pe,afterPreactivation:Pe},this.urlHandlingStrategy=new Re,this.routeReuseStrategy=new me,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=a.get(r.NgModuleRef),this.console=a.get(r.ɵConsole);var p=a.get(r.NgZone);this.isNgZoneEnabled=p instanceof r.NgZone&&r.NgZone.isInAngularZone(),this.resetConfig(c),this.currentUrlTree=function h(){return new q(new z([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Se(u,s,(function(t){return l.triggerEvent(new b(t))}),(function(t){return l.triggerEvent(new C(t))})),this.routerState=ct(this.currentUrlTree,this.rootComponentType),this.transitions=new n.BehaviorSubject({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var e=this,r=this.events;return t.pipe(i.filter((function(t){return 0!==t.id})),i.map((function(t){return Object.assign(Object.assign({},t),{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})})),i.switchMap((function(t){var o,a,s,c=!1,l=!1;return n.of(t).pipe(i.tap((function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?Object.assign(Object.assign({},e.lastSuccessfulNavigation),{previousNavigation:null}):null}})),i.switchMap((function(t){var o=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||o)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return n.of(t).pipe(i.switchMap((function(t){var i=e.transitions.getValue();return r.next(new p(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==e.transitions.getValue()?n.EMPTY:Promise.resolve(t)})),function a(t,e,r,n){return i.switchMap((function(o){return function a(t,e,r,n,i){return new te(t,e,r,n,i).apply()}(t,e,r,o.extractedUrl,n).pipe(i.map((function(t){return Object.assign(Object.assign({},o),{urlAfterRedirects:t})})))}))}(e.ngModule.injector,e.configLoader,e.urlSerializer,e.config),i.tap((function(t){e.currentNavigation=Object.assign(Object.assign({},e.currentNavigation),{finalUrl:t.urlAfterRedirects})})),function u(t,e,r,o,a){return i.mergeMap((function(u){return function s(t,e,r,i,o,a){void 0===o&&(o="emptyOnly"),void 0===a&&(a="legacy");try{var u=new ce(t,e,r,i,o,a).recognize();return null===u?se(new ue):n.of(u)}catch(t){return se(t)}}(t,e,u.urlAfterRedirects,r(u.urlAfterRedirects),o,a).pipe(i.map((function(t){return Object.assign(Object.assign({},u),{targetSnapshot:t})})))}))}
116
+ function Oe(t){throw t}function Ue(t,e,r){return e.parse("/")}function Pe(t,e){return n.of(null)}var xe=function(){function t(t,e,i,o,a,u,s,c){var l=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=i,this.location=o,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new n.Subject,this.errorHandler=Oe,this.malformedUriErrorHandler=Ue,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Pe,afterPreactivation:Pe},this.urlHandlingStrategy=new Re,this.routeReuseStrategy=new me,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=a.get(r.NgModuleRef),this.console=a.get(r.ɵConsole);var p=a.get(r.NgZone);this.isNgZoneEnabled=p instanceof r.NgZone&&r.NgZone.isInAngularZone(),this.resetConfig(c),this.currentUrlTree=function h(){return new q(new z([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Se(u,s,(function(t){return l.triggerEvent(new b(t))}),(function(t){return l.triggerEvent(new C(t))})),this.routerState=ct(this.currentUrlTree,this.rootComponentType),this.transitions=new n.BehaviorSubject({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var e=this,r=this.events;return t.pipe(i.filter((function(t){return 0!==t.id})),i.map((function(t){return Object.assign(Object.assign({},t),{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})})),i.switchMap((function(t){var o,a,s,c=!1,l=!1;return n.of(t).pipe(i.tap((function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?Object.assign(Object.assign({},e.lastSuccessfulNavigation),{previousNavigation:null}):null}})),i.switchMap((function(t){var o=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||o)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return n.of(t).pipe(i.switchMap((function(t){var i=e.transitions.getValue();return r.next(new p(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==e.transitions.getValue()?n.EMPTY:Promise.resolve(t)})),function a(t,e,r,n){return i.switchMap((function(o){return function a(t,e,r,n,i){return new te(t,e,r,n,i).apply()}(t,e,r,o.extractedUrl,n).pipe(i.map((function(t){return Object.assign(Object.assign({},o),{urlAfterRedirects:t})})))}))}(e.ngModule.injector,e.configLoader,e.urlSerializer,e.config),i.tap((function(t){e.currentNavigation=Object.assign(Object.assign({},e.currentNavigation),{finalUrl:t.urlAfterRedirects})})),function u(t,e,r,o,a){return i.mergeMap((function(u){return function s(t,e,r,i,o,a){void 0===o&&(o="emptyOnly"),void 0===a&&(a="legacy");try{var u=new ce(t,e,r,i,o,a).recognize();return null===u?se(new ue):n.of(u)}catch(t){return se(t)}}(t,e,u.urlAfterRedirects,r(u.urlAfterRedirects),o,a).pipe(i.map((function(t){return Object.assign(Object.assign({},u),{targetSnapshot:t})})))}))}
117
117
  /**
118
118
  * @license
119
119
  * Copyright Google LLC All Rights Reserved.
120
120
  *
121
121
  * Use of this source code is governed by an MIT-style license that can be
122
122
  * found in the LICENSE file at https://angular.io/license
123
- */(e.rootComponentType,e.config,(function(t){return e.serializeUrl(t)}),e.paramsInheritanceStrategy,e.relativeLinkResolution),i.tap((function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var n=new g(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);r.next(n)})));if(o&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var s=t.extractedUrl,c=t.source,l=t.restoredState,h=t.extras,f=new p(t.id,e.serializeUrl(s),c,l);r.next(f);var d=ct(s,e.rootComponentType).snapshot;return n.of(Object.assign(Object.assign({},t),{targetSnapshot:d,urlAfterRedirects:s,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),n.EMPTY})),de((function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})})),i.tap((function(t){var r=new v(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.map((function(t){return Object.assign(Object.assign({},t),{guards:(r=t.targetSnapshot,n=t.currentSnapshot,i=e.rootContexts,o=r._root,oe(o,n?n._root:null,i,[o.value]))});var r,n,i,o})),function h(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.currentSnapshot,u=r.guards,s=u.canActivateChecks,c=u.canDeactivateChecks;return 0===c.length&&0===s.length?n.of(Object.assign(Object.assign({},r),{guardsResult:!0})):function l(t,e,r,o){return n.from(t).pipe(i.mergeMap((function(t){return function a(t,e,r,o,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return n.of(!0);var c=s.map((function(n){var a,s=ie(n,e,u);if(function c(t){return t&&kt(t.canDeactivate)}(s))a=M(s.canDeactivate(t,e,r,o));else{if(!kt(s))throw new Error("Invalid CanDeactivate guard");a=M(s(t,e,r,o))}return a.pipe(i.first())}));return n.of(c).pipe(Mt())}(t.component,t.route,r,e,o)})),i.first((function(t){return!0!==t}),!0))}(c,o,a,t).pipe(i.mergeMap((function(r){return r&&function a(t){return"boolean"==typeof t}(r)?function u(t,e,r,o){return n.from(e).pipe(i.concatMap((function(e){return n.concat(function a(t,e){return null!==t&&e&&e(new w(t)),n.of(!0)}(e.route.parent,o),function u(t,e){return null!==t&&e&&e(new O(t)),n.of(!0)}(e.route,o),function s(t,e,r){var o=e[e.length-1],a=e.slice(0,e.length-1).reverse().map((function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)})).filter((function(t){return null!==t})).map((function(e){return n.defer((function(){var a=e.guards.map((function(n){var a,u=ie(n,e.node,r);if(function s(t){return t&&kt(t.canActivateChild)}(u))a=M(u.canActivateChild(o,t));else{if(!kt(u))throw new Error("Invalid CanActivateChild guard");a=M(u(o,t))}return a.pipe(i.first())}));return n.of(a).pipe(Mt())}))}));return n.of(a).pipe(Mt())}(t,e.path,r),function c(t,e,r){var o=e.routeConfig?e.routeConfig.canActivate:null;if(!o||0===o.length)return n.of(!0);var a=o.map((function(o){return n.defer((function(){var n,a=ie(o,e,r);if(function u(t){return t&&kt(t.canActivate)}(a))n=M(a.canActivate(e,t));else{if(!kt(a))throw new Error("Invalid CanActivate guard");n=M(a(e,t))}return n.pipe(i.first())}))}));return n.of(a).pipe(Mt())}(t,e.route,r))})),i.first((function(t){return!0!==t}),!0))}(o,s,t,e):n.of(r)})),i.map((function(t){return Object.assign(Object.assign({},r),{guardsResult:t})})))}))}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),i.tap((function(t){if(Et(t.guardsResult)){var r=j('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}var n=new m(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(n)})),i.filter((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"");return r.next(n),t.resolve(!1),!1}return!0})),de((function(t){if(t.guards.canActivateChecks.length)return n.of(t).pipe(i.tap((function(t){var r=new y(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.switchMap((function(t){var o=!1;return n.of(t).pipe(function a(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.guards.canActivateChecks;if(!a.length)return n.of(r);var u=0;return n.from(a).pipe(i.concatMap((function(r){return function a(t,e,r,o){return function a(t,e,r,o){var a=Object.keys(t);if(0===a.length)return n.of({});var u={};return n.from(a).pipe(i.mergeMap((function(n){return function a(t,e,r,n){var i=ie(t,e,n);return M(i.resolve?i.resolve(e,r):i(e,r))}(t[n],e,r,o).pipe(i.tap((function(t){u[n]=t})))})),i.takeLast(1),i.mergeMap((function(){return Object.keys(u).length===a.length?n.of(u):n.EMPTY})))}(t._resolve,t,e,o).pipe(i.map((function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),pt(t,r).resolve),null})))}(r.route,o,t,e)})),i.tap((function(){return u++})),i.takeLast(1),i.mergeMap((function(t){return u===a.length?n.of(r):n.EMPTY})))}))}(e.paramsInheritanceStrategy,e.ngModule.injector),i.tap({next:function(){return o=!0},complete:function(){if(!o){var n=new f(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");r.next(n),t.resolve(!1)}}}))})),i.tap((function(t){var r=new S(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})))})),de((function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})})),i.map((function(t){var r=function i(t,e,r){var i=function t(e,r,i){if(i&&e.shouldReuseRoute(r.value,i.value.snapshot)){(l=i.value)._futureSnapshot=r.value;var o=function a(e,r,n){return r.children.map((function(r){var i,o;try{for(var a=u(n.children),s=a.next();!s.done;s=a.next()){var c=s.value;if(e.shouldReuseRoute(r.value,c.value.snapshot))return t(e,r,c)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return t(e,r)}))}(e,r,i);return new at(l,o)}var s=e.retrieve(r.value);if(s){var c=s.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(r,c),c}var l=function p(t){return new lt(new n.BehaviorSubject(t.url),new n.BehaviorSubject(t.params),new n.BehaviorSubject(t.queryParams),new n.BehaviorSubject(t.fragment),new n.BehaviorSubject(t.data),t.outlet,t.component,t)}(r.value);return o=r.children.map((function(r){return t(e,r)})),new at(l,o)}(t,e._root,r?r._root:void 0);return new st(i,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:r})})),i.tap((function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)})),(o=e.rootContexts,a=e.routeReuseStrategy,s=function(t){return e.triggerEvent(t)},i.map((function(t){return new jt(a,t.targetRouterState,t.currentRouterState,s).activate(o),t}))),i.tap({next:function(){c=!0},complete:function(){c=!0}}),i.finalize((function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null})),i.catchError((function(i){if(l=!0,function o(t){return t&&t.ngNavigationCancelingError}(i)){var a=Et(i.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new f(t.id,e.serializeUrl(t.extractedUrl),i.message);r.next(u),a?setTimeout((function(){var r=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(r,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})}),0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new d(t.id,e.serializeUrl(t.extractedUrl),i);r.next(s);try{t.resolve(e.errorHandler(i))}catch(e){t.reject(e)}}return n.EMPTY})))})))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t},t.prototype.setTransition=function(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe((function(e){var r=t.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,r)&&setTimeout((function(){var e=r.source,n=r.state,i=r.urlTree,o={replaceUrl:!0};if(n){var a=Object.assign({},n);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}t.scheduleNavigation(i,e,n,o)}),0),t.lastLocationChangeInfo=r})))},t.prototype.extractLocationChangeInfoFromEvent=function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}},t.prototype.shouldScheduleNavigation=function(t,e){if(!t)return!0;var r=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&r&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!1,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){Nt(t),this.config=t.map(Dt),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var r=e.queryParams,n=e.relativeTo||this.routerState.root,i=e.preserveFragment?this.currentUrlTree.fragment:e.fragment,o=null;switch(e.queryParamsHandling){case"merge":o=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":o=this.currentUrlTree.queryParams;break;default:o=r||null}return null!==o&&(o=this.removeEmptyProps(o)),function a(t,e,r,n,i){if(0===r.length)return bt(e.root,e.root,e,n,i);var o=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Ct(!0,0,t);var e=0,r=!1,n=t.reduce((function(t,n,i){if("object"==typeof n&&null!=n){if(n.outlets){var o={};return L(n.outlets,(function(t,e){o[e]="string"==typeof t?t.split("/"):t})),c(t,[{outlets:o}])}if(n.segmentPath)return c(t,[n.segmentPath])}return"string"!=typeof n?c(t,[n]):0===i?(n.split("/").forEach((function(n,i){0==i&&"."===n||(0==i&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))})),t):c(t,[n])}),[]);return new Ct(r,e,n)}(r);if(o.toRoot())return bt(e.root,new z([],{}),e,n,i);var u=function s(t,e,r){if(t.isAbsolute)return new wt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex){var n=r.snapshot._urlSegment;return new wt(n,n===e.root,0)}var i=yt(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,i=e,o=r;o>i;){if(o-=i,!(n=n.parent))throw new Error("Invalid number of '../'");i=n.segments.length}return new wt(n,!1,i-o)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(o,e,t),l=u.processChildren?Ot(u.segmentGroup,u.index,o.commands):Rt(u.segmentGroup,u.index,o.commands);return bt(u.segmentGroup,l,e,n,i)}(n,this.currentUrlTree,t,o,i)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1});var r=Et(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
123
+ */(e.rootComponentType,e.config,(function(t){return e.serializeUrl(t)}),e.paramsInheritanceStrategy,e.relativeLinkResolution),i.tap((function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var n=new g(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);r.next(n)})));if(o&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var s=t.extractedUrl,c=t.source,l=t.restoredState,h=t.extras,f=new p(t.id,e.serializeUrl(s),c,l);r.next(f);var d=ct(s,e.rootComponentType).snapshot;return n.of(Object.assign(Object.assign({},t),{targetSnapshot:d,urlAfterRedirects:s,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),n.EMPTY})),de((function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})})),i.tap((function(t){var r=new v(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.map((function(t){return Object.assign(Object.assign({},t),{guards:(r=t.targetSnapshot,n=t.currentSnapshot,i=e.rootContexts,o=r._root,oe(o,n?n._root:null,i,[o.value]))});var r,n,i,o})),function h(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.currentSnapshot,u=r.guards,s=u.canActivateChecks,c=u.canDeactivateChecks;return 0===c.length&&0===s.length?n.of(Object.assign(Object.assign({},r),{guardsResult:!0})):function l(t,e,r,o){return n.from(t).pipe(i.mergeMap((function(t){return function a(t,e,r,o,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return n.of(!0);var c=s.map((function(n){var a,s=ie(n,e,u);if(function c(t){return t&&kt(t.canDeactivate)}(s))a=M(s.canDeactivate(t,e,r,o));else{if(!kt(s))throw new Error("Invalid CanDeactivate guard");a=M(s(t,e,r,o))}return a.pipe(i.first())}));return n.of(c).pipe(Mt())}(t.component,t.route,r,e,o)})),i.first((function(t){return!0!==t}),!0))}(c,o,a,t).pipe(i.mergeMap((function(r){return r&&function a(t){return"boolean"==typeof t}(r)?function u(t,e,r,o){return n.from(e).pipe(i.concatMap((function(e){return n.concat(function a(t,e){return null!==t&&e&&e(new w(t)),n.of(!0)}(e.route.parent,o),function u(t,e){return null!==t&&e&&e(new O(t)),n.of(!0)}(e.route,o),function s(t,e,r){var o=e[e.length-1],a=e.slice(0,e.length-1).reverse().map((function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)})).filter((function(t){return null!==t})).map((function(e){return n.defer((function(){var a=e.guards.map((function(n){var a,u=ie(n,e.node,r);if(function s(t){return t&&kt(t.canActivateChild)}(u))a=M(u.canActivateChild(o,t));else{if(!kt(u))throw new Error("Invalid CanActivateChild guard");a=M(u(o,t))}return a.pipe(i.first())}));return n.of(a).pipe(Mt())}))}));return n.of(a).pipe(Mt())}(t,e.path,r),function c(t,e,r){var o=e.routeConfig?e.routeConfig.canActivate:null;if(!o||0===o.length)return n.of(!0);var a=o.map((function(o){return n.defer((function(){var n,a=ie(o,e,r);if(function u(t){return t&&kt(t.canActivate)}(a))n=M(a.canActivate(e,t));else{if(!kt(a))throw new Error("Invalid CanActivate guard");n=M(a(e,t))}return n.pipe(i.first())}))}));return n.of(a).pipe(Mt())}(t,e.route,r))})),i.first((function(t){return!0!==t}),!0))}(o,s,t,e):n.of(r)})),i.map((function(t){return Object.assign(Object.assign({},r),{guardsResult:t})})))}))}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),i.tap((function(t){if(Et(t.guardsResult)){var r=j('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}var n=new m(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(n)})),i.filter((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"");return r.next(n),t.resolve(!1),!1}return!0})),de((function(t){if(t.guards.canActivateChecks.length)return n.of(t).pipe(i.tap((function(t){var r=new y(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.switchMap((function(t){var o=!1;return n.of(t).pipe(function a(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.guards.canActivateChecks;if(!a.length)return n.of(r);var u=0;return n.from(a).pipe(i.concatMap((function(r){return function a(t,e,r,o){return function a(t,e,r,o){var a=Object.keys(t);if(0===a.length)return n.of({});var u={};return n.from(a).pipe(i.mergeMap((function(n){return function a(t,e,r,n){var i=ie(t,e,n);return M(i.resolve?i.resolve(e,r):i(e,r))}(t[n],e,r,o).pipe(i.tap((function(t){u[n]=t})))})),i.takeLast(1),i.mergeMap((function(){return Object.keys(u).length===a.length?n.of(u):n.EMPTY})))}(t._resolve,t,e,o).pipe(i.map((function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),pt(t,r).resolve),null})))}(r.route,o,t,e)})),i.tap((function(){return u++})),i.takeLast(1),i.mergeMap((function(t){return u===a.length?n.of(r):n.EMPTY})))}))}(e.paramsInheritanceStrategy,e.ngModule.injector),i.tap({next:function(){return o=!0},complete:function(){if(!o){var n=new f(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");r.next(n),t.resolve(!1)}}}))})),i.tap((function(t){var r=new S(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})))})),de((function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})})),i.map((function(t){var r=function i(t,e,r){var i=function t(e,r,i){if(i&&e.shouldReuseRoute(r.value,i.value.snapshot)){(l=i.value)._futureSnapshot=r.value;var o=function a(e,r,n){return r.children.map((function(r){var i,o;try{for(var a=u(n.children),s=a.next();!s.done;s=a.next()){var c=s.value;if(e.shouldReuseRoute(r.value,c.value.snapshot))return t(e,r,c)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return t(e,r)}))}(e,r,i);return new at(l,o)}var s=e.retrieve(r.value);if(s){var c=s.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(r,c),c}var l=function p(t){return new lt(new n.BehaviorSubject(t.url),new n.BehaviorSubject(t.params),new n.BehaviorSubject(t.queryParams),new n.BehaviorSubject(t.fragment),new n.BehaviorSubject(t.data),t.outlet,t.component,t)}(r.value);return o=r.children.map((function(r){return t(e,r)})),new at(l,o)}(t,e._root,r?r._root:void 0);return new st(i,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:r})})),i.tap((function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)})),(o=e.rootContexts,a=e.routeReuseStrategy,s=function(t){return e.triggerEvent(t)},i.map((function(t){return new jt(a,t.targetRouterState,t.currentRouterState,s).activate(o),t}))),i.tap({next:function(){c=!0},complete:function(){c=!0}}),i.finalize((function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null})),i.catchError((function(i){if(l=!0,function o(t){return t&&t.ngNavigationCancelingError}(i)){var a=Et(i.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new f(t.id,e.serializeUrl(t.extractedUrl),i.message);r.next(u),a?setTimeout((function(){var r=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(r,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})}),0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new d(t.id,e.serializeUrl(t.extractedUrl),i);r.next(s);try{t.resolve(e.errorHandler(i))}catch(e){t.reject(e)}}return n.EMPTY})))})))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t},t.prototype.setTransition=function(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe((function(e){var r=t.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,r)&&setTimeout((function(){var e=r.source,n=r.state,i=r.urlTree,o={replaceUrl:!0};if(n){var a=Object.assign({},n);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}t.scheduleNavigation(i,e,n,o)}),0),t.lastLocationChangeInfo=r})))},t.prototype.extractLocationChangeInfoFromEvent=function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}},t.prototype.shouldScheduleNavigation=function(t,e){if(!t)return!0;var r=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&r&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!1,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){Nt(t),this.config=t.map(Dt),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var r=e.queryParams,n=e.relativeTo||this.routerState.root,i=e.preserveFragment?this.currentUrlTree.fragment:e.fragment,o=null;switch(e.queryParamsHandling){case"merge":o=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":o=this.currentUrlTree.queryParams;break;default:o=r||null}return null!==o&&(o=this.removeEmptyProps(o)),function a(t,e,r,n,i){if(0===r.length)return bt(e.root,e.root,e,n,i);var o=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Ct(!0,0,t);var e=0,r=!1,n=t.reduce((function(t,n,i){if("object"==typeof n&&null!=n){if(n.outlets){var o={};return L(n.outlets,(function(t,e){o[e]="string"==typeof t?t.split("/"):t})),c(t,[{outlets:o}])}if(n.segmentPath)return c(t,[n.segmentPath])}return"string"!=typeof n?c(t,[n]):0===i?(n.split("/").forEach((function(n,i){0==i&&"."===n||(0==i&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))})),t):c(t,[n])}),[]);return new Ct(r,e,n)}(r);if(o.toRoot())return bt(e.root,new z([],{}),e,n,i);var u=function s(t,e,r){if(t.isAbsolute)return new wt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex){var n=r.snapshot._urlSegment;return new wt(n,n===e.root,0)}var i=yt(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,i=e,o=r;o>i;){if(o-=i,!(n=n.parent))throw new Error("Invalid number of '../'");i=n.segments.length}return new wt(n,!1,i-o)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(o,e,t),l=u.processChildren?Ot(u.segmentGroup,u.index,o.commands):Rt(u.segmentGroup,u.index,o.commands);return bt(u.segmentGroup,l,e,n,i)}(n,this.currentUrlTree,t,o,i)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1});var r=Et(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
124
124
  /**
125
125
  * @license
126
126
  * Copyright Google LLC All Rights Reserved.
127
127
  *
128
128
  * Use of this source code is governed by an MIT-style license that can be
129
129
  * found in the LICENSE file at https://angular.io/license
130
- */(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){var e;try{e=this.urlSerializer.parse(t)}catch(r){e=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return e},t.prototype.isActive=function(t,e){if(Et(t))return N(this.currentUrlTree,t,e);var r=this.parseUrl(t);return N(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&(e[r]=n),e}),{})},t.prototype.processNavigations=function(){var t=this;this.navigations.subscribe((function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new h(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)}),(function(e){t.console.warn("Unhandled Navigation Error: ")}))},t.prototype.scheduleNavigation=function(t,e,r,n,i){var o,a,u,s=this.getTransition(),c="imperative"!==e&&"imperative"===(null==s?void 0:s.source),l=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(c&&l)return Promise.resolve(!0);i?(o=i.resolve,a=i.reject,u=i.promise):u=new Promise((function(t,e){o=t,a=e}));var p=++this.navigationId;return this.setTransition({id:p,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:o,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch((function(t){return Promise.reject(t)}))},t.prototype.setBrowserUrl=function(t,e,r,n){var i=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(i)||e?this.location.replaceState(i,"",Object.assign(Object.assign({},n),{navigationId:r})):this.location.go(i,"",Object.assign(Object.assign({},n),{navigationId:r}))},t.prototype.resetStateAndUrl=function(t,e,r){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},t}();xe.decorators=[{type:r.Injectable}],xe.ctorParameters=function(){return[{type:r.Type},{type:F},{type:Ce},{type:e.Location},{type:r.Injector},{type:r.NgModuleFactoryLoader},{type:r.Compiler},{type:void 0}]};var _e=function(){function t(t,e,r,i,o){this.router=t,this.route=e,this.commands=[],this.onChanges=new n.Subject,null==r&&i.setAttribute(o.nativeElement,"tabindex","0")}return t.prototype.ngOnChanges=function(t){this.onChanges.next(this)},Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();_e.decorators=[{type:r.Directive,args:[{selector:":not(a):not(area)[routerLink]"}]}],_e.ctorParameters=function(){return[{type:xe},{type:lt},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]},{type:r.Renderer2},{type:r.ElementRef}]},_e.propDecorators={queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click"]}]};var je=function(){function t(t,e,r){var i=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.onChanges=new n.Subject,this.subscription=t.events.subscribe((function(t){t instanceof h&&i.updateTargetUrlAndHref()}))}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n,i){if(0!==t||e||r||n||i)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,o),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();function Ae(t){return""===t||!!t}je.decorators=[{type:r.Directive,args:[{selector:"a[routerLink],area[routerLink]"}]}],je.ctorParameters=function(){return[{type:xe},{type:lt},{type:e.LocationStrategy}]},je.propDecorators={target:[{type:r.HostBinding,args:["attr.target"]},{type:r.Input}],queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],href:[{type:r.HostBinding}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.shiftKey","$event.altKey","$event.metaKey"]]}]};var Te=function(){function t(t,e,r,n,i,o){var a=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.link=i,this.linkWithHref=o,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe((function(t){t instanceof h&&a.update()}))}return t.prototype.ngAfterContentInit=function(){var t=this;n.of(this.links.changes,this.linksWithHrefs.changes,n.of(null)).pipe(i.mergeAll()).subscribe((function(e){t.update(),t.subscribeToEachLinkOnChanges()}))},t.prototype.subscribeToEachLinkOnChanges=function(){var t,e=this;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();var r=c(this.links.toArray(),this.linksWithHrefs.toArray(),[this.link,this.linkWithHref]).filter((function(t){return!!t})).map((function(t){return t.onChanges}));this.linkInputChangesSubscription=n.from(r).pipe(i.mergeAll()).subscribe((function(t){e.isActive!==e.isLinkActive(e.router)(t)&&e.update()}))},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter((function(t){return!!t}))},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then((function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.cdr.markForCheck(),t.classes.forEach((function(r){e?t.renderer.addClass(t.element.nativeElement,r):t.renderer.removeClass(t.element.nativeElement,r)})))}))},t.prototype.isLinkActive=function(t){var e=this;return function(r){return t.isActive(r.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){var t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)},t}();Te.decorators=[{type:r.Directive,args:[{selector:"[routerLinkActive]",exportAs:"routerLinkActive"}]}],Te.ctorParameters=function(){return[{type:xe},{type:r.ElementRef},{type:r.Renderer2},{type:r.ChangeDetectorRef},{type:_e,decorators:[{type:r.Optional}]},{type:je,decorators:[{type:r.Optional}]}]},Te.propDecorators={links:[{type:r.ContentChildren,args:[_e,{descendants:!0}]}],linksWithHrefs:[{type:r.ContentChildren,args:[je,{descendants:!0}]}],routerLinkActiveOptions:[{type:r.Input}],routerLinkActive:[{type:r.Input}]};
130
+ */(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){var e;try{e=this.urlSerializer.parse(t)}catch(r){e=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return e},t.prototype.isActive=function(t,e){if(Et(t))return N(this.currentUrlTree,t,e);var r=this.parseUrl(t);return N(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&(e[r]=n),e}),{})},t.prototype.processNavigations=function(){var t=this;this.navigations.subscribe((function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new h(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)}),(function(e){t.console.warn("Unhandled Navigation Error: ")}))},t.prototype.scheduleNavigation=function(t,e,r,n,i){if(this.disposed)return Promise.resolve(!1);var o,a,u,s=this.getTransition(),c="imperative"!==e&&"imperative"===(null==s?void 0:s.source),l=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(c&&l)return Promise.resolve(!0);i?(o=i.resolve,a=i.reject,u=i.promise):u=new Promise((function(t,e){o=t,a=e}));var p=++this.navigationId;return this.setTransition({id:p,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:o,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch((function(t){return Promise.reject(t)}))},t.prototype.setBrowserUrl=function(t,e,r,n){var i=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(i)||e?this.location.replaceState(i,"",Object.assign(Object.assign({},n),{navigationId:r})):this.location.go(i,"",Object.assign(Object.assign({},n),{navigationId:r}))},t.prototype.resetStateAndUrl=function(t,e,r){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},t}();xe.decorators=[{type:r.Injectable}],xe.ctorParameters=function(){return[{type:r.Type},{type:F},{type:Ce},{type:e.Location},{type:r.Injector},{type:r.NgModuleFactoryLoader},{type:r.Compiler},{type:void 0}]};var _e=function(){function t(t,e,r,i,o){this.router=t,this.route=e,this.commands=[],this.onChanges=new n.Subject,null==r&&i.setAttribute(o.nativeElement,"tabindex","0")}return t.prototype.ngOnChanges=function(t){this.onChanges.next(this)},Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();_e.decorators=[{type:r.Directive,args:[{selector:":not(a):not(area)[routerLink]"}]}],_e.ctorParameters=function(){return[{type:xe},{type:lt},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]},{type:r.Renderer2},{type:r.ElementRef}]},_e.propDecorators={queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click"]}]};var je=function(){function t(t,e,r){var i=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.onChanges=new n.Subject,this.subscription=t.events.subscribe((function(t){t instanceof h&&i.updateTargetUrlAndHref()}))}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n,i){if(0!==t||e||r||n||i)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,o),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();function Ae(t){return""===t||!!t}je.decorators=[{type:r.Directive,args:[{selector:"a[routerLink],area[routerLink]"}]}],je.ctorParameters=function(){return[{type:xe},{type:lt},{type:e.LocationStrategy}]},je.propDecorators={target:[{type:r.HostBinding,args:["attr.target"]},{type:r.Input}],queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],href:[{type:r.HostBinding}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.shiftKey","$event.altKey","$event.metaKey"]]}]};var Te=function(){function t(t,e,r,n,i,o){var a=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.link=i,this.linkWithHref=o,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe((function(t){t instanceof h&&a.update()}))}return t.prototype.ngAfterContentInit=function(){var t=this;n.of(this.links.changes,this.linksWithHrefs.changes,n.of(null)).pipe(i.mergeAll()).subscribe((function(e){t.update(),t.subscribeToEachLinkOnChanges()}))},t.prototype.subscribeToEachLinkOnChanges=function(){var t,e=this;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();var r=c(this.links.toArray(),this.linksWithHrefs.toArray(),[this.link,this.linkWithHref]).filter((function(t){return!!t})).map((function(t){return t.onChanges}));this.linkInputChangesSubscription=n.from(r).pipe(i.mergeAll()).subscribe((function(t){e.isActive!==e.isLinkActive(e.router)(t)&&e.update()}))},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter((function(t){return!!t}))},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then((function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.cdr.markForCheck(),t.classes.forEach((function(r){e?t.renderer.addClass(t.element.nativeElement,r):t.renderer.removeClass(t.element.nativeElement,r)})))}))},t.prototype.isLinkActive=function(t){var e=this;return function(r){return t.isActive(r.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){var t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)},t}();Te.decorators=[{type:r.Directive,args:[{selector:"[routerLinkActive]",exportAs:"routerLinkActive"}]}],Te.ctorParameters=function(){return[{type:xe},{type:r.ElementRef},{type:r.Renderer2},{type:r.ChangeDetectorRef},{type:_e,decorators:[{type:r.Optional}]},{type:je,decorators:[{type:r.Optional}]}]},Te.propDecorators={links:[{type:r.ContentChildren,args:[_e,{descendants:!0}]}],linksWithHrefs:[{type:r.ContentChildren,args:[je,{descendants:!0}]}],routerLinkActiveOptions:[{type:r.Input}],routerLinkActive:[{type:r.Input}]};
131
131
  /**
132
132
  * @license
133
133
  * Copyright Google LLC All Rights Reserved.
@@ -158,7 +158,7 @@ var ze=[ke,_e,je,Te,It],De=new r.InjectionToken("ROUTER_CONFIGURATION"),He=new r
158
158
  *
159
159
  * Use of this source code is governed by an MIT-style license that can be
160
160
  * found in the LICENSE file at https://angular.io/license
161
- */var nr=new r.Version("11.2.0-rc.0");
161
+ */var nr=new r.Version("11.2.0");
162
162
  /**
163
163
  * @license
164
164
  * Copyright Google LLC All Rights Reserved.