@angular/router
Version:
Angular - the routing library
116 lines (114 loc) • 88.2 kB
JavaScript
/**
* @license Angular v11.0.9
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/router",["exports","@angular/common","@angular/core","rxjs","rxjs/operators"],e):e(((t=t||self).ng=t.ng||{},t.ng.router={}),t.ng.common,t.ng.core,t.rxjs,t.rxjs.operators)}(this,(function(t,e,r,n,i){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function a(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function u(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function c(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var l,p=function(t){function e(e,r,n,i){void 0===n&&(n="imperative"),void 0===i&&(i=null);var o=t.call(this,e,r)||this;return o.navigationTrigger=n,o.restoredState=i,o}return a(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(l=function l(t,e){this.id=t,this.url=e}),h=function(t){function e(e,r,n){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i}return a(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(l),f=function(t){function e(e,r,n){var i=t.call(this,e,r)||this;return i.reason=n,i}return a(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(l),g=function(t){function e(e,r,n){var i=t.call(this,e,r)||this;return i.error=n,i}return a(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(l),d=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),v=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),m=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r)||this;return a.urlAfterRedirects=n,a.state=i,a.shouldActivate=o,a}return a(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(l),y=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),S=function(t){function e(e,r,n,i){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o.state=i,o}return a(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(l),b=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),C=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),w=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),R=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),O=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),U=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),P=function(){function t(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}return t.prototype.toString=function(){return"Scroll(anchor: '"+this.anchor+"', position: '"+(this.position?this.position[0]+", "+this.position[1]:null)+"')"},t}(),x=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return Object.prototype.hasOwnProperty.call(this.params,t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!1,configurable:!0}),t}();function _(t){return new x(t)}function j(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function A(t,e,r){var n=r.path.split("/");if(n.length>t.length)return null;if("full"===r.pathMatch&&(e.hasChildren()||n.length<t.length))return null;for(var i={},o=0;o<n.length;o++){var a=n[o],u=t[o];if(a.startsWith(":"))i[a.substring(1)]=u;else if(a!==u.path)return null}return{consumed:t.slice(0,n.length),posParams:i}}function T(t,e){var r,n=Object.keys(t),i=Object.keys(e);if(!n||!i||n.length!=i.length)return!1;for(var o=0;o<n.length;o++)if(!k(t[r=n[o]],e[r]))return!1;return!0}function k(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;var r=c(t).sort(),n=c(e).sort();return r.every((function(t,e){return n[e]===t}))}return t===e}function E(t){return Array.prototype.concat.apply([],t)}function I(t){return t.length>0?t[t.length-1]:null}function L(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function M(t){return r.ɵisObservable(t)?t:r.ɵisPromise(t)?n.from(Promise.resolve(t)):n.of(t)}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function N(t,e,r){return r?function n(t,e){return T(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!H(e.segments,r.segments))return!1;if(e.numberOfChildren!==r.numberOfChildren)return!1;for(var n in r.children){if(!e.children[n])return!1;if(!t(e.children[n],r.children[n]))return!1}return!0}(t.root,e.root):function i(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(r){return k(t[r],e[r])}))}(t.queryParams,e.queryParams)&&function t(e,r){return function e(r,n,i){if(r.segments.length>i.length)return!!H(a=r.segments.slice(0,i.length),i)&&!n.hasChildren();if(r.segments.length===i.length){if(!H(r.segments,i))return!1;for(var o in n.children){if(!r.children[o])return!1;if(!t(r.children[o],n.children[o]))return!1}return!0}var a=i.slice(0,r.segments.length),u=i.slice(r.segments.length);return!!H(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var q=function(){function t(t,e,r){this.root=t,this.queryParams=e,this.fragment=r}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=_(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return W.serialize(this)},t}(),z=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,L(e,(function(t,e){return t.parent=r}))}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return B(this)},t}(),D=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=_(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return K(this)},t}();function H(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}var F=function F(){},G=function(){function t(){}return t.prototype.parse=function(t){var e=new rt(t);return new q(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return B(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",i=[];return L(e.children,(function(e,r){"primary"!==r&&i.push(r+":"+t(e,!1))})),i.length>0?n+"("+i.join("//")+")":n}var o=function a(t,e){var r=[];return L(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),L(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return 1===Object.keys(e.children).length&&null!=e.children.primary?B(e)+"/"+o[0]:B(e)+"/("+o.join("//")+")"}(t.root,!0)+function e(t){var e=Object.keys(t).map((function(e){var r=t[e];return Array.isArray(r)?r.map((function(t){return Z(e)+"="+Z(t)})).join("&"):Z(e)+"="+Z(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),W=new G;function B(t){return t.segments.map((function(t){return K(t)})).join("/")}function V(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Z(t){return V(t).replace(/%3B/gi,";")}function Q(t){return V(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Y(t){return decodeURIComponent(t)}function $(t){return Y(t.replace(/\+/g,"%20"))}function K(t){return""+Q(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+Q(e)+"="+Q(t[e])})).join("")}(t.parameters)}var J=/^[^\/()?;=#]+/;function X(t){var e=t.match(J);return e?e[0]:""}var tt=/^[^=?&#]+/,et=/^[^?&#]+/,rt=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new z([],{}):new z([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r.primary=new z(t,e)),r},t.prototype.parseSegment=function(){var t=X(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new D(Y(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=X(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=X(this.remaining);n&&this.capture(r=n)}t[Y(e)]=Y(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(tt);return e?e[0]:""}(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=function o(t){var e=t.match(et);return e?e[0]:""}(this.remaining);i&&this.capture(n=i)}var a=$(e),u=$(n);if(t.hasOwnProperty(a)){var s=t[a];Array.isArray(s)||(t[a]=s=[s]),s.push(u)}else t[a]=u}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var r=X(this.remaining),n=this.remaining[r.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;r.indexOf(":")>-1?(i=r.substr(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i="primary");var o=this.parseChildren();e[i]=1===Object.keys(o).length?o.primary:new z([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),nt=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!1,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=it(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=it(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ot(t,this._root);return e.length<2?[]:e[e.length-2].children.map((function(t){return t.value})).filter((function(e){return e!==t}))},t.prototype.pathFromRoot=function(t){return ot(t,this._root).map((function(t){return t.value}))},t}();function it(t,e){var r,n;if(t===e.value)return e;try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=it(t,o.value);if(a)return a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return null}function ot(t,e){var r,n;if(t===e.value)return[e];try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=ot(t,o.value);if(a.length)return a.unshift(e),a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return[]}var at=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ut(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var st=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,gt(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(nt);function ct(t,e){var r=function i(t,e){var r=new ht([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ft("",new at(r,[]))}(t,e),o=new n.BehaviorSubject([new D("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new lt(o,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new st(new at(l,[]),r)}var lt=function(){function t(t,e,r,n,i,o,a,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this._futureSnapshot=u}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(i.map((function(t){return _(t)})))),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(i.map((function(t){return _(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function pt(t,e){void 0===e&&(e="emptyOnly");var r=t.pathFromRoot,n=0;if("always"!==e)for(n=r.length-1;n>=1;){var i=r[n],o=r[n-1];if(i.routeConfig&&""===i.routeConfig.path)n--;else{if(o.component)break;n--}}return function a(t){return t.reduce((function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}(r.slice(n))}var ht=function(){function t(t,e,r,n,i,o,a,u,s,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this.routeConfig=u,this._urlSegment=s,this._lastPathIndex=c,this._resolve=l}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=_(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=_(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map((function(t){return t.toString()})).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),ft=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,gt(n,r),n}return a(e,t),e.prototype.toString=function(){return dt(this._root)},e}(nt);function gt(t,e){e.value._routerState=t,e.children.forEach((function(e){return gt(t,e)}))}function dt(t){var e=t.children.length>0?" { "+t.children.map(dt).join(", ")+" } ":"";return""+t.value+e}function vt(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,T(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),T(e.params,r.params)||t.params.next(r.params),function n(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!T(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),T(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function mt(t,e){return T(t.params,e.params)&&function r(t,e){return H(t,e)&&t.every((function(t,r){return T(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||mt(t.parent,e.parent))}function yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function St(t){return"object"==typeof t&&null!=t&&t.outlets}function bt(t,e,r,n,i){var o={};return n&&L(n,(function(t,e){o[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new q(r.root===t?e:function t(e,r,n){var i={};return L(e.children,(function(e,o){i[o]=e===r?n:t(e,r,n)})),new z(e.segments,i)}(r.root,t,e),o,i)}var Ct=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&yt(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find(St);if(n&&n!==I(r))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),wt=function wt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Rt(t,e,r){if(t||(t=new z([],{})),0===t.segments.length&&t.hasChildren())return Ot(t,e,r);var n=function i(t,e,r){for(var n=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i<t.segments.length;){if(n>=r.length)return o;var a=t.segments[i],u=r[n];if(St(u))break;var s=""+u,c=n<r.length-1?r[n+1]:null;if(i>0&&void 0===s)break;if(s&&c&&"object"==typeof c&&void 0===c.outlets){if(!_t(s,c,a))return o;n+=2}else{if(!_t(s,{},a))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}(t,e,r),o=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){var a=new z(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new z(t.segments.slice(n.pathIndex),t.children),Ot(a,0,o)}return n.match&&0===o.length?new z(t.segments,{}):n.match&&!t.hasChildren()?Ut(t,e,r):n.match?Ot(t,0,o):Ut(t,e,r)}function Ot(t,e,r){if(0===r.length)return new z(t.segments,{});var n=function i(t){var e;return St(t[0])?t[0].outlets:((e={}).primary=t,e)}(r),o={};return L(n,(function(r,n){"string"==typeof r&&(r=[r]),null!==r&&(o[n]=Rt(t.children[n],e,r))})),L(t.children,(function(t,e){void 0===n[e]&&(o[e]=t)})),new z(t.segments,o)}function Ut(t,e,r){for(var n=t.segments.slice(0,e),i=0;i<r.length;){var o=r[i];if(St(o)){var a=Pt(o.outlets);return new z(n,a)}if(0===i&&yt(r[0]))n.push(new D(t.segments[e].path,r[0])),i++;else{var u=St(o)?o.outlets.primary:""+o,s=i<r.length-1?r[i+1]:null;u&&s&&yt(s)?(n.push(new D(u,xt(s))),i+=2):(n.push(new D(u,{})),i++)}}return new z(n,{})}function Pt(t){var e={};return L(t,(function(t,r){"string"==typeof t&&(t=[t]),null!==t&&(e[r]=Ut(new z([],{}),0,t))})),e}function xt(t){var e={};return L(t,(function(t,r){return e[r]=""+t})),e}function _t(t,e,r){return t==r.path&&T(e,r.parameters)}var jt=function(){function t(t,e,r,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=n}return t.prototype.activate=function(t){var e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),vt(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,i[e],r),delete i[e]})),L(i,(function(t,e){n.deactivateRouteAndItsChildren(t,r)}))},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(n===i)if(n.component){var o=r.getContext(n.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,r);else i&&this.deactivateRouteAndItsChildren(e,r)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var r=e.getContext(t.value.outlet);if(r&&r.outlet){var n=r.outlet.detach(),i=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:i})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r,n,i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,a=ut(t);try{for(var s=u(Object.keys(a)),c=s.next();!c.done;c=s.next())this.deactivateRouteAndItsChildren(a[c.value],o)}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())},t.prototype.activateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){n.activateRoutes(t,i[t.value.outlet],r),n.forwardEvent(new U(t.value.snapshot))})),t.children.length&&this.forwardEvent(new R(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(vt(n),n===i)if(n.component){var o=r.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,r);else if(n.component)if(o=r.getOrCreateContext(n.outlet),this.routeReuseStrategy.shouldAttach(n.snapshot)){var a=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),At(a.route)}else{var u=function s(t){for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig;if(r&&r.component)return null}return null}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(n.snapshot),c=u?u.module.componentFactoryResolver:null;o.attachRef=null,o.route=n,o.resolver=c,o.outlet&&o.outlet.activateWith(n,c),this.activateChildRoutes(t,null,o.children)}else this.activateChildRoutes(t,null,r)},t}();function At(t){vt(t.value),t.children.forEach(At)}var Tt=function Tt(t,e){this.routes=t,this.module=e};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function kt(t){return"function"==typeof t}function Et(t){return t instanceof q}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var It,Lt=Symbol("INITIAL_VALUE");function Mt(){return i.switchMap((function(t){return n.combineLatest(t.map((function(t){return t.pipe(i.take(1),i.startWith(Lt))}))).pipe(i.scan((function(t,e){var r=!1;return e.reduce((function(t,n,i){if(t!==Lt)return t;if(n===Lt&&(r=!0),!r){if(!1===n)return n;if(i===e.length-1||Et(n))return n}return t}),t)}),Lt),i.filter((function(t){return t!==Lt})),i.map((function(t){return Et(t)?t:!0===t})),i.take(1))}))}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function Nt(t,e){void 0===e&&(e="");for(var r=0;r<t.length;r++){var n=t[r];qt(n,zt(e,n))}}function qt(t,e){t.children&&Nt(t.children,e)}function zt(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:t+"/"+e.path:"":t}function Dt(t){var e=t.children&&t.children.map(Dt),r=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!r.component&&(e||r.loadChildren)&&r.outlet&&"primary"!==r.outlet&&(r.component=It),r}function Ht(t){return t.outlet||"primary"}function Ft(t,e){var r=t.filter((function(t){return Ht(t)===e}));return r.push.apply(r,c(t.filter((function(t){return Ht(t)!==e})))),r}(It=function It(){}).decorators=[{type:r.Component,args:[{template:"<router-outlet></router-outlet>"}]}];var Gt={matched:!1,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};function Wt(t,e,r){var n;if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||r.length>0)?Object.assign({},Gt):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};var i=(e.matcher||A)(r,t,e);if(!i)return Object.assign({},Gt);var o={};L(i.posParams,(function(t,e){o[e]=t.path}));var a=i.consumed.length>0?Object.assign(Object.assign({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:a,positionalParamSegments:null!==(n=i.posParams)&&void 0!==n?n:{}}}function Bt(t,e,r,n,i){if(void 0===i&&(i="corrected"),r.length>0&&function o(t,e,r){return r.some((function(r){return Vt(t,e,r)&&"primary"!==Ht(r)}))}(t,r,n)){var a=new z(e,function s(t,e,r,n){var i,o,a={};a.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;try{for(var s=u(r),c=s.next();!c.done;c=s.next()){var l=c.value;if(""===l.path&&"primary"!==Ht(l)){var p=new z([],{});p._sourceSegment=t,p._segmentIndexShift=e.length,a[Ht(l)]=p}}}catch(t){i={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}(t,e,n,new z(r,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===r.length&&function c(t,e,r){return r.some((function(r){return Vt(t,e,r)}))}(t,r,n)){var l=new z(t.segments,function p(t,e,r,n,i,o){var a,s,c={};try{for(var l=u(n),p=l.next();!p.done;p=l.next()){var h=p.value;if(Vt(t,r,h)&&!i[Ht(h)]){var f=new z([],{});f._sourceSegment=t,f._segmentIndexShift="legacy"===o?t.segments.length:e.length,c[Ht(h)]=f}}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}return Object.assign(Object.assign({},i),c)}(t,e,r,n,t.children,i));return l._sourceSegment=t,l._segmentIndexShift=e.length,{segmentGroup:l,slicedSegments:r}}var h=new z(t.segments,t.children);return h._sourceSegment=t,h._segmentIndexShift=e.length,{segmentGroup:h,slicedSegments:r}}function Vt(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path}function Zt(t,e,r,n){return!!(Ht(t)===n||"primary"!==n&&Vt(e,r,t))&&("**"===t.path||Wt(e,t,r).matched)}function Qt(t,e,r){return 0===e.length&&!t.children[r]}var Yt=function Yt(t){this.segmentGroup=t||null},$t=function $t(t){this.urlTree=t};function Kt(t){return new n.Observable((function(e){return e.error(new Yt(t))}))}function Jt(t){return new n.Observable((function(e){return e.error(new $t(t))}))}function Xt(t){return new n.Observable((function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))}))}var te=function(){function t(t,e,n,i,o){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=o,this.allowRedirects=!0,this.ngModule=t.get(r.NgModuleRef)}return t.prototype.apply=function(){var t=this,e=Bt(this.urlTree.root,[],[],this.config).segmentGroup,r=new z(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,r,"primary").pipe(i.map((function(e){return t.createUrlTree(ee(e),t.urlTree.queryParams,t.urlTree.fragment)}))).pipe(i.catchError((function(e){if(e instanceof $t)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof Yt)throw t.noMatchError(e);throw e})))},t.prototype.match=function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(i.map((function(r){return e.createUrlTree(ee(r),t.queryParams,t.fragment)}))).pipe(i.catchError((function(t){if(t instanceof Yt)throw e.noMatchError(t);throw t})))},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,r){var n,i=t.segments.length>0?new z([],((n={}).primary=t,n)):t;return new q(i,e,r)},t.prototype.expandSegmentGroup=function(t,e,r,n){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(t,e,r).pipe(i.map((function(t){return new z([],t)}))):this.expandSegment(t,r,e,r.segments,n,!0)},t.prototype.expandChildren=function(t,e,r){var o,a,s=this,c=[];try{for(var l=u(Object.keys(r.children)),p=l.next();!p.done;p=l.next()){var h=p.value;"primary"===h?c.unshift(h):c.push(h)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return n.from(c).pipe(i.concatMap((function(n){var o=r.children[n],a=Ft(e,n);return s.expandSegmentGroup(t,a,o,n).pipe(i.map((function(t){return{segment:t,outlet:n}})))})),i.scan((function(t,e){return t[e.outlet]=e.segment,t}),{}),i.last())},t.prototype.expandSegment=function(t,e,r,o,a,u){var s=this;return n.from(r).pipe(i.concatMap((function(c){return s.expandSegmentAgainstRoute(t,e,r,c,o,a,u).pipe(i.catchError((function(t){if(t instanceof Yt)return n.of(null);throw t})))})),i.first((function(t){return!!t})),i.catchError((function(t,r){if(t instanceof n.EmptyError||"EmptyError"===t.name){if(Qt(e,o,a))return n.of(new z([],{}));throw new Yt(e)}throw t})))},t.prototype.expandSegmentAgainstRoute=function(t,e,r,n,i,o,a){return Zt(n,e,i,o)?void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,i,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,r,n,i,o):Kt(e):Kt(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,r,n,i,o){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,r,n,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,n,i,o)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,r,n){var o=this,a=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?Jt(a):this.lineralizeSegments(r,a).pipe(i.mergeMap((function(r){var i=new z(r,{});return o.expandSegment(t,i,e,r,n,!1)})))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,r,n,o,a){var u=this,s=Wt(e,n,o),c=s.consumedSegments,l=s.lastChild,p=s.positionalParamSegments;if(!s.matched)return Kt(e);var h=this.applyRedirectCommands(c,n.redirectTo,p);return n.redirectTo.startsWith("/")?Jt(h):this.lineralizeSegments(n,h).pipe(i.mergeMap((function(n){return u.expandSegment(t,e,r,n.concat(o.slice(l)),a,!1)})))},t.prototype.matchSegmentAgainstRoute=function(t,e,r,o,a){var u=this;if("**"===r.path)return r.loadChildren?this.configLoader.load(t.injector,r).pipe(i.map((function(t){return r._loadedConfig=t,new z(o,{})}))):n.of(new z(o,{}));var s=Wt(e,r,o),c=s.consumedSegments,l=s.lastChild;if(!s.matched)return Kt(e);var p=o.slice(l);return this.getChildConfig(t,r,o).pipe(i.mergeMap((function(t){var o=t.module,s=t.routes,l=Bt(e,c,p,s),h=l.segmentGroup,f=l.slicedSegments,g=new z(h.segments,h.children);if(0===f.length&&g.hasChildren())return u.expandChildren(o,s,g).pipe(i.map((function(t){return new z(c,t)})));if(0===s.length&&0===f.length)return n.of(new z(c,{}));var d=Ht(r)===a;return u.expandSegment(o,g,s,f,d?"primary":a,!0).pipe(i.map((function(t){return new z(c.concat(t.segments),t.children)})))})))},t.prototype.getChildConfig=function(t,e,r){var o=this;return e.children?n.of(new Tt(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?n.of(e._loadedConfig):this.runCanLoadGuards(t.injector,e,r).pipe(i.mergeMap((function(r){return r?o.configLoader.load(t.injector,e).pipe(i.map((function(t){return e._loadedConfig=t,t}))):function a(t){return new n.Observable((function(e){return e.error(j("Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false"))}))}(e)}))):n.of(new Tt([],t))},t.prototype.runCanLoadGuards=function(t,e,r){var o=this,a=e.canLoad;if(!a||0===a.length)return n.of(!0);var u=a.map((function(n){var i,o=t.get(n);if(function a(t){return t&&kt(t.canLoad)}(o))i=o.canLoad(e,r);else{if(!kt(o))throw new Error("Invalid CanLoad guard");i=o(e,r)}return M(i)}));return n.of(u).pipe(Mt(),i.tap((function(t){if(Et(t)){var e=j('Redirecting to "'+o.urlSerializer.serialize(t)+'"');throw e.url=t,e}})),i.map((function(t){return!0===t})))},t.prototype.lineralizeSegments=function(t,e){for(var r=[],i=e.root;;){if(r=r.concat(i.segments),0===i.numberOfChildren)return n.of(r);if(i.numberOfChildren>1||!i.children.primary)return Xt(t.redirectTo);i=i.children.primary}},t.prototype.applyRedirectCommands=function(t,e,r){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,r)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,r,n){var i=this.createSegmentGroup(t,e.root,r,n);return new q(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var r={};return L(t,(function(t,n){if("string"==typeof t&&t.startsWith(":")){var i=t.substring(1);r[n]=e[i]}else r[n]=t})),r},t.prototype.createSegmentGroup=function(t,e,r,n){var i=this,o=this.createSegments(t,e.segments,r,n),a={};return L(e.children,(function(e,o){a[o]=i.createSegmentGroup(t,e,r,n)})),new z(o,a)},t.prototype.createSegments=function(t,e,r,n){var i=this;return e.map((function(e){return e.path.startsWith(":")?i.findPosParam(t,e,n):i.findOrReturn(e,r)}))},t.prototype.findPosParam=function(t,e,r){var n=r[e.path.substring(1)];if(!n)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return n},t.prototype.findOrReturn=function(t,e){var r,n,i=0;try{for(var o=u(e),a=o.next();!a.done;a=o.next()){var s=a.value;if(s.path===t.path)return e.splice(i),s;i++}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return t},t}();function ee(t){var e,r,n={};try{for(var i=u(Object.keys(t.children)),o=i.next();!o.done;o=i.next()){var a=o.value,s=ee(t.children[a]);(s.segments.length>0||s.hasChildren())&&(n[a]=s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return function c(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new z(t.segments.concat(e.segments),e.children)}return t}(new z(t.segments,n))}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var re=function re(t){this.path=t,this.route=this.path[this.path.length-1]},ne=function ne(t,e){this.component=t,this.route=e};function ie(t,e,r){var n=function i(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig}return null}(e);return(n?n.module.injector:r).get(t)}function oe(t,e,r,n,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var o=ut(e);return t.children.forEach((function(t){!function e(t,r,n,i,o){void 0===o&&(o={canDeactivateChecks:[],canActivateChecks:[]});var a=t.value,u=r?r.value:null,s=n?n.getContext(t.value.outlet):null;if(u&&a.routeConfig===u.routeConfig){var c=function l(t,e,r){if("function"==typeof r)return r(t,e);switch(r){case"pathParamsChange":return!H(t.url,e.url);case"pathParamsOrQueryParamsChange":return!H(t.url,e.url)||!T(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mt(t,e)||!T(t.queryParams,e.queryParams);case"paramsChange":default:return!mt(t,e)}}(u,a,a.routeConfig.runGuardsAndResolvers);c?o.canActivateChecks.push(new re(i)):(a.data=u.data,a._resolvedData=u._resolvedData),oe(t,r,a.component?s?s.children:null:n,i,o),c&&s&&s.outlet&&s.outlet.isActivated&&o.canDeactivateChecks.push(new ne(s.outlet.component,u))}else u&&ae(r,s,o),o.canActivateChecks.push(new re(i)),oe(t,null,a.component?s?s.children:null:n,i,o)}(t,o[t.value.outlet],r,n.concat([t.value]),i),delete o[t.value.outlet]})),L(o,(function(t,e){return ae(t,r.getContext(e),i)})),i}function ae(t,e,r){var n=ut(t),i=t.value;L(n,(function(t,n){ae(t,i.component?e?e.children.getContext(n):null:e,r)})),r.canDeactivateChecks.push(new ne(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var ue=function Yt(){};function se(t){return new n.Observable((function(e){return e.error(t)}))}var ce=function(){function t(t,e,r,n,i,o){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=o}return t.prototype.recognize=function(){var t=Bt(this.urlTree.root,[],[],this.config.filter((function(t){return void 0===t.redirectTo})),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary");if(null===e)return null;var r=new ht([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new at(r,e),i=new ft(this.url,n);return this.inheritParamsAndData(i._root),i},t.prototype.inheritParamsAndData=function(t){var e=this,r=t.value,n=pt(r,this.paramsInheritanceStrategy);r.params=Object.freeze(n.params),r.data=Object.freeze(n.data),t.children.forEach((function(t){return e.inheritParamsAndData(t)}))},t.prototype.processSegmentGroup=function(t,e,r){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,r)},t.prototype.processChildren=function(t,e){var r,n,i=[];try{for(var o=u(Object.keys(e.children)),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.children[s],p=Ft(t,s),h=this.processSegmentGroup(p,l,s);if(null===h)return null;i.push.apply(i,c(h))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}var f=function g(t){var e,r,n=[],i=function(t){var e;if(!function r(t){var e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}(t))return n.push(t),"continue";var i=n.find((function(e){return t.value.routeConfig===e.value.routeConfig}));void 0!==i?(e=i.children).push.apply(e,c(t.children)):n.push(t)};try{for(var o=u(t),a=o.next();!a.done;a=o.next())i(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}(i);return function d(t){t.sort((function(t,e){return"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)}))}(f),f},t.prototype.processSegment=function(t,e,r,n){var i,o;try{for(var a=u(t),s=a.next();!s.done;s=a.next()){var c=this.processSegmentAgainstRoute(s.value,e,r,n);if(null!==c)return c}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return Qt(e,r,n)?[]:null},t.prototype.processSegmentAgainstRoute=function(t,e,r,n){if(t.redirectTo||!Zt(t,e,r,n))return null;var i,o=[],a=[];if("**"===t.path){var u=r.length>0?I(r).parameters:{};i=new ht(r,u,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,he(t),Ht(t),t.component,t,le(e),pe(e)+r.length,fe(t))}else{var s=Wt(e,t,r);if(!s.matched)return null;o=s.consumedSegments,a=r.slice(s.lastChild),i=new ht(o,s.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,he(t),Ht(t),t.component,t,le(e),pe(e)+o.length,fe(t))}var c=function l(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),p=Bt(e,o,a,c.filter((function(t){return void 0===t.redirectTo})),this.relativeLinkResolution),h=p.segmentGroup,f=p.slicedSegments;if(0===f.length&&h.hasChildren()){var g=this.processChildren(c,h);return null===g?null:[new at(i,g)]}if(0===c.length&&0===f.length)return[new at(i,[])];var d=Ht(t)===n,v=this.processSegment(c,h,f,d?"primary":n);return null===v?null:[new at(i,v)]},t}();function le(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function pe(t){for(var e=t,r=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)r+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return r-1}function he(t){return t.data||{}}function fe(t){return t.resolve||{}}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function ge(t){return i.switchMap((function(e){var r=t(e);return r?n.from(r).pipe(i.map((function(){return e}))):n.of(e)}))}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var de=function de(){},ve=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(ve),ye=new r.InjectionToken("ROUTES"),Se=function(){function t(t,e,r,n){this.loader=t,this.compiler=e,this.onLoadStartListener=r,this.onLoadEndListener=n}return t.prototype.load=function(t,e){var r=this;return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(i.map((function(n){r.onLoadEndListener&&r.onLoadEndListener(e);var i=n.create(t);return new Tt(E(i.injector.get(ye)).map(Dt),i)})))},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?n.from(this.loader.load(t)):M(t()).pipe(i.mergeMap((function(t){return t instanceof r.NgModuleFactory?n.of(t):n.from(e.compiler.compileModuleAsync(t))})))},t}(),be=function be(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ce,this.attachRef=null},Ce=function(){function t(){this.contexts=new Map}return t.prototype.onChildOutletCreated=function(t,e){var r=this.getOrCreateContext(t);r.outlet=e,this.contexts.set(t,r)},t.prototype.onChildOutletDestroyed=function(t){var e=this.getContext(t);e&&(e.outlet=null)},t.prototype.onOutletDeactivated=function(){var t=this.contexts;return this.contexts=new Map,t},t.prototype.onOutletReAttached=function(t){this.contexts=t},t.prototype.getOrCreateContext=function(t){var e=this.getContext(t);return e||(e=new be,this.contexts.set(t,e)),e},t.prototype.getContext=function(t){return this.contexts.get(t)||null},t}(),we=function we(){},Re=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function 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:n