{"version":3,"file":"_router_module-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/directives/router_link.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/directives/router_link_active.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/router_preloader.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/router_scroller.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/router_devtools.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/statemanager/navigation_state_manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/provide_router.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/router/src/router_module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {\n  Attribute,\n  booleanAttribute,\n  computed,\n  Directive,\n  effect,\n  ElementRef,\n  HostAttributeToken,\n  HostListener,\n  inject,\n  Injectable,\n  Input,\n  linkedSignal,\n  OnChanges,\n  OnDestroy,\n  Renderer2,\n  signal,\n  SimpleChanges,\n  untracked,\n  ɵINTERNAL_APPLICATION_ERROR_HANDLER,\n  ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {RuntimeErrorCode} from '../errors';\nimport {NavigationEnd} from '../events';\nimport {QueryParamsHandling} from '../models';\nimport {Router} from '../router';\nimport {ROUTER_CONFIGURATION} from '../router_config';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {StateManager} from '../statemanager/state_manager';\nimport {isUrlTree, UrlSerializer, UrlTree} from '../url_tree';\n\n// Converts non-reactive router state to reactive state via the NavigationEnd\n// event. This isn't the ideal way of doing things, but is necessary to avoid\n// breaking tests which have mocked the Router.\n@Injectable({providedIn: 'root'})\nexport class ReactiveRouterState {\n  private readonly router = inject(Router);\n  private readonly stateManager = inject(StateManager);\n  readonly fragment = signal<string | null>('');\n  readonly queryParams = signal<Params>({});\n  readonly path = signal<string>('');\n  private readonly serializer = inject(UrlSerializer);\n\n  constructor() {\n    this.updateState();\n    this.router.events?.subscribe((e) => {\n      if (e instanceof NavigationEnd) {\n        this.updateState();\n      }\n    });\n  }\n\n  private updateState() {\n    const {fragment, root, queryParams} = this.stateManager.getCurrentUrlTree();\n    this.fragment.set(fragment);\n    this.queryParams.set(queryParams);\n    this.path.set(this.serializer.serialize(new UrlTree(root)));\n  }\n}\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed\n * components in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with\n * dynamic segments. For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current\n * URL. For instance, suppose the current URL is `/user/(box//aux:team)`. The\n * link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from\n * the root of the app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the\n * router looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the\n * route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated\n * URL:\n *\n * ```html\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\"\n * fragment=\"education\"> link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query\n * parameters. The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```html\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\"\n * queryParamsHandling=\"merge\"> link to user component\n * </a>\n * ```\n *\n * `queryParams`, `fragment`, `queryParamsHandling`, `preserveFragment`, and\n * `relativeTo` cannot be used when the `routerLink` input is a `UrlTree`.\n *\n * See {@link UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state`\n * property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```html\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router#currentNavigation} to retrieve a saved Signal\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```ts\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.currentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * ### RouterLink compatible custom elements\n *\n * In order to make a custom element work with routerLink, the corresponding\n * custom element must implement the `href` attribute and must list `href` in\n * the array of the static property/getter `observedAttributes`.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLink]',\n  host: {\n    '[attr.href]': 'reactiveHref()',\n    '[attr.target]': '_target()',\n  },\n})\nexport class RouterLink implements OnChanges, OnDestroy {\n  private hrefAttributeValue = inject(new HostAttributeToken('href'), {optional: true});\n  /** @docs-private */\n  protected readonly reactiveHref = linkedSignal(() => {\n    // Never change href for non-anchor elements\n    if (!this.isAnchorElement) {\n      return this.hrefAttributeValue;\n    }\n    return this.computeHref(this._urlTree());\n  });\n  /**\n   * Represents an `href` attribute value applied to a host element,\n   * when a host element is an `<a>`/`<area>` tag or a compatible custom\n   * element. For other tags, the value is `null`.\n   */\n  get href() {\n    return untracked(this.reactiveHref);\n  }\n  /** @deprecated */\n  set href(value: string | null) {\n    this.reactiveHref.set(value);\n  }\n\n  /**\n   * Represents the `target` attribute on a host element.\n   * This is only used when the host element is\n   * an `<a>`/`<area>` tag or a compatible custom element.\n   */\n  @Input() set target(value: string | undefined) {\n    this._target.set(value);\n  }\n  get target(): string | undefined {\n    return untracked(this._target);\n  }\n\n  /**\n   * @docs-private\n   * @internal\n   */\n  protected _target = signal<string | undefined>(undefined);\n\n  /**\n   * Passed to {@link Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree}\n   */\n  @Input() set queryParams(value: Params | null | undefined) {\n    this._queryParams.set(value);\n  }\n  get queryParams(): Params | null | undefined {\n    return untracked(this._queryParams);\n  }\n  // Rather than trying deep equality checks or serialization, just allow urlTree to recompute\n  // whenever queryParams change (which will be rare).\n  private _queryParams = signal<Params | null | undefined>(undefined, {equal: () => false});\n  /**\n   * Passed to {@link Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree}\n   */\n  @Input() set fragment(value: string | undefined) {\n    this._fragment.set(value);\n  }\n  get fragment(): string | undefined {\n    return untracked(this._fragment);\n  }\n  private _fragment = signal<string | undefined>(undefined);\n  /**\n   * Passed to {@link Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree}\n   */\n  @Input() set queryParamsHandling(value: QueryParamsHandling | null | undefined) {\n    this._queryParamsHandling.set(value);\n  }\n  get queryParamsHandling(): QueryParamsHandling | null | undefined {\n    return untracked(this._queryParamsHandling);\n  }\n  private _queryParamsHandling = signal<QueryParamsHandling | null | undefined>(undefined);\n  /**\n   * Passed to {@link Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl}\n   */\n  @Input() set state(value: {[k: string]: any} | undefined) {\n    this._state.set(value);\n  }\n  get state(): {[k: string]: any} | undefined {\n    return untracked(this._state);\n  }\n  private _state = signal<{[k: string]: any} | undefined>(undefined, {equal: () => false});\n  /**\n   * Passed to {@link Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#info}\n   * @see {@link Router#navigateByUrl}\n   */\n  @Input() set info(value: unknown) {\n    this._info.set(value);\n  }\n  get info(): unknown {\n    return untracked(this._info);\n  }\n  private _info = signal<unknown>(undefined, {equal: () => false});\n  /**\n   * Passed to {@link Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree}\n   */\n  @Input() set relativeTo(value: ActivatedRoute | null | undefined) {\n    this._relativeTo.set(value);\n  }\n  get relativeTo(): ActivatedRoute | null | undefined {\n    return untracked(this._relativeTo);\n  }\n  private _relativeTo = signal<ActivatedRoute | null | undefined>(undefined);\n\n  /**\n   * Passed to {@link Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree}\n   */\n  @Input({transform: booleanAttribute}) set preserveFragment(value: boolean) {\n    this._preserveFragment.set(value);\n  }\n  get preserveFragment(): boolean {\n    return untracked(this._preserveFragment);\n  }\n  private _preserveFragment = signal<boolean>(false);\n\n  /**\n   * Passed to {@link Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl}\n   */\n  @Input({transform: booleanAttribute}) set skipLocationChange(value: boolean) {\n    this._skipLocationChange.set(value);\n  }\n  get skipLocationChange(): boolean {\n    return untracked(this._skipLocationChange);\n  }\n  private _skipLocationChange = signal<boolean>(false);\n\n  /**\n   * Passed to {@link Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl}\n   */\n  @Input({transform: booleanAttribute}) set replaceUrl(value: boolean) {\n    this._replaceUrl.set(value);\n  }\n  get replaceUrl(): boolean {\n    return untracked(this._replaceUrl);\n  }\n  private _replaceUrl = signal<boolean>(false);\n\n  /**\n   * Whether a host element is an `<a>`/`<area>` tag or a compatible custom\n   * element.\n   */\n  private readonly isAnchorElement: boolean;\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n  private readonly applicationErrorHandler = inject(ɵINTERNAL_APPLICATION_ERROR_HANDLER);\n  private readonly options = inject(ROUTER_CONFIGURATION, {optional: true});\n  private readonly reactiveRouterState = inject(ReactiveRouterState);\n\n  constructor(\n    private router: Router,\n    private route: ActivatedRoute,\n    @Attribute('tabindex') private readonly tabIndexAttribute: string | null | undefined,\n    private readonly renderer: Renderer2,\n    private readonly el: ElementRef,\n    private locationStrategy?: LocationStrategy,\n  ) {\n    const tagName = el.nativeElement.tagName?.toLowerCase();\n    this.isAnchorElement =\n      tagName === 'a' ||\n      tagName === 'area' ||\n      !!(\n        // Avoid breaking in an SSR context where customElements might not\n        // be defined.\n        (\n          typeof customElements === 'object' &&\n          // observedAttributes is an optional static property/getter on a\n          // custom element. The spec states that this must be an array of\n          // strings.\n          (\n            customElements.get(tagName) as {observedAttributes?: string[]} | undefined\n          )?.observedAttributes?.includes?.('href')\n        )\n      );\n\n    if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n      effect(() => {\n        if (\n          isUrlTree(this.routerLinkInput()) &&\n          (this._fragment() !== undefined ||\n            this._queryParams() ||\n            this._queryParamsHandling() ||\n            this._preserveFragment() ||\n            this._relativeTo())\n        ) {\n          throw new RuntimeError(\n            RuntimeErrorCode.INVALID_ROUTER_LINK_INPUTS,\n            'Cannot configure queryParams or fragment when using a UrlTree as the routerLink input value.',\n          );\n        }\n      });\n    }\n  }\n\n  /**\n   * Modifies the tab index if there was not a tabindex attribute on the element\n   * during instantiation.\n   */\n  private setTabIndexIfNotOnNativeEl(newTabIndex: string | null) {\n    if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n      return;\n    }\n    this.applyAttributeValue('tabindex', newTabIndex);\n  }\n\n  /** @docs-private */\n  // TODO(atscott): Remove changes parameter in major version as a breaking\n  // change.\n  ngOnChanges(changes?: SimpleChanges): void {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update\n    // when there are changes to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  private routerLinkInput = signal<readonly any[] | UrlTree | null>(null);\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree} or a `UrlTree`.\n   *   - **array**: commands to pass to {@link Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e.\n   * `['/route']`\n   *   - **UrlTree**: a `UrlTree` for this link rather than creating one from\n   * the commands and other inputs that correspond to properties of\n   * `UrlCreationOptions`.\n   *   - **null|undefined**: effectively disables the `routerLink`\n   * @see {@link Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commandsOrUrlTree: readonly any[] | string | UrlTree | null | undefined) {\n    if (commandsOrUrlTree == null) {\n      this.routerLinkInput.set(null);\n      this.setTabIndexIfNotOnNativeEl(null);\n    } else {\n      if (isUrlTree(commandsOrUrlTree)) {\n        this.routerLinkInput.set(commandsOrUrlTree);\n      } else {\n        this.routerLinkInput.set(\n          Array.isArray(commandsOrUrlTree) ? commandsOrUrlTree : [commandsOrUrlTree],\n        );\n      }\n      this.setTabIndexIfNotOnNativeEl('0');\n    }\n  }\n\n  /** @docs-private */\n  @HostListener('click', [\n    '$event.button',\n    '$event.ctrlKey',\n    '$event.shiftKey',\n    '$event.altKey',\n    '$event.metaKey',\n  ])\n  onClick(\n    button: number,\n    ctrlKey: boolean,\n    shiftKey: boolean,\n    altKey: boolean,\n    metaKey: boolean,\n  ): boolean {\n    const urlTree = this._urlTree();\n\n    if (urlTree === null) {\n      return true;\n    }\n\n    if (this.isAnchorElement) {\n      if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n        return true;\n      }\n\n      if (typeof this.target === 'string' && this.target != '_self') {\n        return true;\n      }\n    }\n\n    const extras = {\n      skipLocationChange: this.skipLocationChange,\n      replaceUrl: this.replaceUrl,\n      state: this.state,\n      info: this.info,\n    };\n    // navigateByUrl is mocked frequently in tests... Reduce breakages when\n    // adding `catch`\n    this.router.navigateByUrl(urlTree, extras)?.catch((e) => {\n      this.applicationErrorHandler(e);\n    });\n\n    // Return `false` for `<a>` elements to prevent default action\n    // and cancel the native behavior, since the navigation is handled\n    // by the Router.\n    return !this.isAnchorElement;\n  }\n\n  /** @docs-private */\n  ngOnDestroy(): any {}\n\n  private applyAttributeValue(attrName: string, attrValue: string | null) {\n    const renderer = this.renderer;\n    const nativeElement = this.el.nativeElement;\n    if (attrValue !== null) {\n      renderer.setAttribute(nativeElement, attrName, attrValue);\n    } else {\n      renderer.removeAttribute(nativeElement, attrName);\n    }\n  }\n\n  /** @internal */\n  _urlTree = computed(\n    () => {\n      // Track path changes. It's knowing which segments we actually depend on is somewhat difficult\n      this.reactiveRouterState.path();\n      if (this._preserveFragment()) {\n        this.reactiveRouterState.fragment();\n      }\n      const shouldTrackParams = (handling: QueryParamsHandling | undefined | null) =>\n        handling === 'preserve' || handling === 'merge';\n      if (\n        shouldTrackParams(this._queryParamsHandling()) ||\n        shouldTrackParams(this.options?.defaultQueryParamsHandling)\n      ) {\n        this.reactiveRouterState.queryParams();\n      }\n\n      const routerLinkInput = this.routerLinkInput();\n      if (routerLinkInput === null || !this.router.createUrlTree) {\n        return null;\n      } else if (isUrlTree(routerLinkInput)) {\n        return routerLinkInput;\n      }\n      return this.router.createUrlTree(routerLinkInput, {\n        // If the `relativeTo` input is not defined, we want to use `this.route`\n        // by default.\n        // Otherwise, we should use the value provided by the user in the input.\n        relativeTo: this._relativeTo() !== undefined ? this._relativeTo() : this.route,\n        queryParams: this._queryParams(),\n        fragment: this._fragment(),\n        queryParamsHandling: this._queryParamsHandling(),\n        preserveFragment: this._preserveFragment(),\n      });\n    },\n    {equal: (a, b) => this.computeHref(a) === this.computeHref(b)},\n  );\n\n  get urlTree(): UrlTree | null {\n    return untracked(this._urlTree);\n  }\n\n  private computeHref(urlTree: UrlTree | null): string | null {\n    return urlTree !== null && this.locationStrategy\n      ? (this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(urlTree)) ?? '')\n      : null;\n  }\n}\n\n/**\n * @description\n * An alias for the `RouterLink` directive.\n * Deprecated since v15, use `RouterLink` directive instead.\n *\nexport { RouterLink as RouterLinkWithHref };\nnstead.\n * @publicApi\n */\nexport {RouterLink as RouterLinkWithHref};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n  AfterContentInit,\n  ChangeDetectorRef,\n  ContentChildren,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  inject,\n  Input,\n  OnChanges,\n  OnDestroy,\n  Output,\n  QueryList,\n  Renderer2,\n  SimpleChanges,\n  untracked,\n} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {isActive, IsActiveMatchOptions, exactMatchOptions, subsetMatchOptions} from '../url_tree';\n\nimport {RouterLink} from './router_link';\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```html\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```html\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\n * ```\n *\n * NOTE: RouterLinkActive is a `ContentChildren` query.\n * Content children queries do not retrieve elements or directives that are in other components' templates, since a component's template is always a black box to its ancestors.\n *\n * @ngModule RouterModule\n *\n * @see [Detect active current route with RouterLinkActive](guide/routing/read-route-state#detect-active-current-route-with-routerlinkactive)\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  private _isActive = false;\n\n  get isActive(): boolean {\n    return this._isActive;\n  }\n\n  /**\n   * Options to configure how to determine if the router link is active.\n   *\n   * These options are passed to the `isActive()` function.\n   *\n   * @see {@link isActive}\n   */\n  @Input() routerLinkActiveOptions: {exact: boolean} | Partial<IsActiveMatchOptions> = {\n    exact: false,\n  };\n\n  /**\n   * Aria-current attribute to apply when the router link is active.\n   *\n   * Possible values: `'page'` | `'step'` | `'location'` | `'date'` | `'time'` | `true` | `false`.\n   *\n   * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current}\n   */\n  @Input() ariaCurrentWhenActive?: 'page' | 'step' | 'location' | 'date' | 'time' | true | false;\n\n  /**\n   *\n   * You can use the output `isActiveChange` to get notified each time the link becomes\n   * active or inactive.\n   *\n   * Emits:\n   * true  -> Route is active\n   * false -> Route is inactive\n   *\n   * ```html\n   * <a\n   *  routerLink=\"/user/bob\"\n   *  routerLinkActive=\"active-link\"\n   *  (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n   * ```\n   */\n  @Output() readonly isActiveChange: EventEmitter<boolean> = new EventEmitter();\n\n  private link = inject(RouterLink, {optional: true});\n\n  constructor(\n    private router: Router,\n    private element: ElementRef,\n    private renderer: Renderer2,\n    private readonly cdr: ChangeDetectorRef,\n  ) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @docs-private */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    of(this.links.changes, of(null))\n      .pipe(mergeAll())\n      .subscribe((_) => {\n        this.update();\n        this.subscribeToEachLinkOnChanges();\n      });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges = [...this.links.toArray(), this.link]\n      .filter((link): link is RouterLink => !!link)\n      .map((link) => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges)\n      .pipe(mergeAll())\n      .subscribe((link) => {\n        if (this._isActive !== this.isLinkActive(this.router)(link)) {\n          this.update();\n        }\n      });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[] | string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter((c) => !!c);\n  }\n\n  /** @docs-private */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @docs-private */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.router.navigated) return;\n\n    queueMicrotask(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      this.classes.forEach((c) => {\n        if (hasActiveLinks) {\n          this.renderer.addClass(this.element.nativeElement, c);\n        } else {\n          this.renderer.removeClass(this.element.nativeElement, c);\n        }\n      });\n      if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n        this.renderer.setAttribute(\n          this.element.nativeElement,\n          'aria-current',\n          this.ariaCurrentWhenActive.toString(),\n        );\n      } else {\n        this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n      }\n\n      // Only emit change if the active state changed.\n      if (this._isActive !== hasActiveLinks) {\n        this._isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        // Emit on isActiveChange after classes are updated\n        this.isActiveChange.emit(hasActiveLinks);\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: RouterLink) => boolean {\n    const options: Partial<IsActiveMatchOptions> = isActiveMatchOptions(\n      this.routerLinkActiveOptions,\n    )\n      ? this.routerLinkActiveOptions\n      : // While the types should disallow `undefined` here, it's possible without strict inputs\n        (this.routerLinkActiveOptions.exact ?? false)\n        ? {...exactMatchOptions}\n        : {...subsetMatchOptions};\n\n    return (link: RouterLink) => {\n      const urlTree = link.urlTree;\n      return urlTree ? untracked(isActive(urlTree, router, options)) : false;\n    };\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);\n  }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(\n  options: {exact: boolean} | Partial<IsActiveMatchOptions>,\n): options is Partial<IsActiveMatchOptions> {\n  const o = options as Partial<IsActiveMatchOptions>;\n  return !!(o.paths || o.matrixParams || o.queryParams || o.fragment);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {createEnvironmentInjector, EnvironmentInjector, Injectable, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from './events';\nimport {LoadedRouterConfig, Route, Routes} from './models';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @see [Preloading strategy](guide/routing/customizing-route-behavior#preloading-strategy)\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```ts\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * ```ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n *   provideRouter(\n *     routes,\n *     withPreloading(PreloadAllModules)\n *   )\n * ]\n * };\n * ```\n *\n *\n * @see [Preloading strategy](guide/routing/customizing-route-behavior#preloading-strategy)\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @see [Preloading strategy](guide/routing/customizing-route-behavior#preloading-strategy)\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class RouterPreloader implements OnDestroy {\n  private subscription?: Subscription;\n\n  constructor(\n    private router: Router,\n    private injector: EnvironmentInjector,\n    private preloadingStrategy: PreloadingStrategy,\n    private loader: RouterConfigLoader,\n  ) {}\n\n  setUpPreloading(): void {\n    this.subscription = this.router.events\n      .pipe(\n        filter((e: Event) => e instanceof NavigationEnd),\n        concatMap(() => this.preload()),\n      )\n      .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    return this.processRoutes(this.injector, this.router.config);\n  }\n\n  /** @docs-private */\n  ngOnDestroy(): void {\n    this.subscription?.unsubscribe();\n  }\n\n  private processRoutes(injector: EnvironmentInjector, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      if (route.providers && !route._injector) {\n        route._injector = createEnvironmentInjector(\n          route.providers,\n          injector,\n          typeof ngDevMode === 'undefined' || ngDevMode ? `Route: ${route.path}` : '',\n        );\n      }\n\n      const injectorForCurrentRoute = route._injector ?? injector;\n      if (route._loadedNgModuleFactory && !route._loadedInjector) {\n        route._loadedInjector =\n          route._loadedNgModuleFactory.create(injectorForCurrentRoute).injector;\n      }\n      const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n\n      // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n      // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n      // happens as a consequence of needing to descend into children for route matching immediately\n      // while component loading is deferred until route activation. Because `canLoad` guards can\n      // have side effects, we cannot execute them here so we instead skip preloading altogether\n      // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n      // at all. Code splitting and lazy loading is separate from client-side authorization checks\n      // and should not be used as a security measure to prevent loading of code.\n      if (\n        (route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||\n        (route.loadComponent && !route._loadedComponent)\n      ) {\n        res.push(this.preloadConfig(injectorForCurrentRoute, route));\n      }\n      if (route.children || route._loadedRoutes) {\n        res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)!));\n      }\n    }\n    return from(res).pipe(mergeAll());\n  }\n\n  private preloadConfig(injector: EnvironmentInjector, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      if (injector.destroyed) {\n        return of(null);\n      }\n      let loadedChildren$: Observable<LoadedRouterConfig | null>;\n      if (route.loadChildren && route.canLoad === undefined) {\n        loadedChildren$ = from(this.loader.loadChildren(injector, route));\n      } else {\n        loadedChildren$ = of(null);\n      }\n\n      const recursiveLoadChildren$ = loadedChildren$.pipe(\n        mergeMap((config: LoadedRouterConfig | null) => {\n          if (config === null) {\n            return of(void 0);\n          }\n          route._loadedRoutes = config.routes;\n          route._loadedInjector = config.injector;\n          route._loadedNgModuleFactory = config.factory;\n          // If the loaded config was a module, use that as the module/module injector going\n          // forward. Otherwise, continue using the current module/module injector.\n          return this.processRoutes(config.injector ?? injector, config.routes);\n        }),\n      );\n      if (route.loadComponent && !route._loadedComponent) {\n        const loadComponent$ = this.loader.loadComponent(injector, route);\n        return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n      } else {\n        return recursiveLoadChildren$;\n      }\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {inject, Injectable, InjectionToken, NgZone, OnDestroy, untracked} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {\n  IMPERATIVE_NAVIGATION,\n  NavigationEnd,\n  NavigationSkipped,\n  NavigationSkippedCode,\n  NavigationStart,\n  NavigationTrigger,\n  Scroll,\n} from './events';\nimport {NavigationTransitions} from './navigation_transition';\nimport {UrlSerializer} from './url_tree';\n\nexport const ROUTER_SCROLLER = new InjectionToken<RouterScroller>(\n  typeof ngDevMode !== 'undefined' && ngDevMode ? 'Router Scroller' : '',\n);\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  private routerEventsSubscription?: Unsubscribable;\n  private scrollEventsSubscription?: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: NavigationTrigger | undefined = IMPERATIVE_NAVIGATION;\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  private readonly urlSerializer = inject(UrlSerializer);\n  private readonly zone = inject(NgZone);\n  readonly viewportScroller = inject(ViewportScroller);\n  private readonly transitions = inject(NavigationTransitions);\n\n  /** @docs-private */\n  constructor(\n    private options: {\n      scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\n      anchorScrolling?: 'disabled' | 'enabled';\n    },\n  ) {\n    // Default both options to 'disabled'\n    this.options.scrollPositionRestoration ||= 'disabled';\n    this.options.anchorScrolling ||= 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.transitions.events.subscribe((e) => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n      } else if (\n        e instanceof NavigationSkipped &&\n        e.code === NavigationSkippedCode.IgnoredSameUrlNavigation\n      ) {\n        this.lastSource = undefined;\n        this.restoredId = 0;\n        this.scheduleScrollEvent(e, this.urlSerializer.parse(e.url).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.transitions.events.subscribe((e) => {\n      if (!(e instanceof Scroll) || e.scrollBehavior === 'manual') return;\n      const instantScroll: ScrollOptions = {behavior: 'instant'};\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0], instantScroll);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position, instantScroll);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(\n    routerEvent: NavigationEnd | NavigationSkipped,\n    anchor: string | null,\n  ): void {\n    const scroll = untracked(this.transitions.currentNavigation)?.extras.scroll;\n    this.zone.runOutsideAngular(async () => {\n      // The scroll event needs to be delayed until after change detection. Otherwise, we may\n      // attempt to restore the scroll position before the router outlet has fully rendered the\n      // component by executing its update block of the template function.\n      //\n      // #57109 (we need to wait at least a macrotask before scrolling. AfterNextRender resolves in microtask event loop with Zones)\n      // We could consider _also_ waiting for a render promise though one should have already happened or been scheduled by this point\n      // and should definitely happen before rAF/setTimeout.\n      // #53985 (cannot rely solely on setTimeout because a frame may paint before the timeout)\n      await new Promise((resolve) => {\n        setTimeout(resolve);\n        if (typeof requestAnimationFrame !== 'undefined') {\n          requestAnimationFrame(resolve);\n        }\n      });\n      this.zone.run(() => {\n        this.transitions.events.next(\n          new Scroll(\n            routerEvent,\n            this.lastSource === 'popstate' ? this.store[this.restoredId] : null,\n            anchor,\n            scroll,\n          ),\n        );\n      });\n    });\n  }\n\n  /** @docs-private */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription?.unsubscribe();\n    this.scrollEventsSubscription?.unsubscribe();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '@angular/core';\nimport {Router} from './router';\nimport {Route} from './models';\n\n/**\n * Returns the loaded routes for a given route.\n */\nexport function getLoadedRoutes(route: Route): Route[] | undefined {\n  return route._loadedRoutes;\n}\n\n/**\n * Returns the Router instance from the given injector, or null if not available.\n */\nexport function getRouterInstance(injector: Injector): Router | null {\n  return injector.get(Router, null, {optional: true});\n}\n\n/**\n * Navigates the given router to the specified URL.\n * Throws if the provided router is not an Angular Router.\n */\nexport function navigateByUrl(router: Router, url: string): Promise<boolean> {\n  if (!(router instanceof Router)) {\n    throw new Error('The provided router is not an Angular Router.');\n  }\n  return router.navigateByUrl(url);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {\n  afterNextRender,\n  ɵpromiseWithResolvers as promiseWithResolvers,\n  DestroyRef,\n  EnvironmentInjector,\n  inject,\n  Injectable,\n} from '@angular/core';\n\nimport {\n  PlatformLocation,\n  PlatformNavigation,\n  ɵPRECOMMIT_HANDLER_SUPPORTED as PRECOMMIT_HANDLER_SUPPORTED,\n} from '@angular/common';\nimport {StateManager} from './state_manager';\nimport {\n  NavigationExtras,\n  RestoredState,\n  Navigation as RouterNavigation,\n} from '../navigation_transition';\nimport {\n  BeforeActivateRoutes,\n  BeforeRoutesRecognized,\n  isRedirectingEvent,\n  NavigationCancel,\n  NavigationCancellationCode,\n  NavigationEnd,\n  NavigationError,\n  NavigationSkipped,\n  NavigationStart,\n  NavigationTrigger,\n  PrivateRouterEvents,\n} from '../events';\nimport {Subject, SubscriptionLike} from 'rxjs';\nimport {UrlTree} from '../url_tree';\nimport {ROUTER_SCROLLER} from '../router_scroller';\n\ntype NavigationInfo = {ɵrouterInfo: {intercept: boolean}};\n\n@Injectable({providedIn: 'root'})\n/**\n * A `StateManager` that uses the browser's Navigation API to get the state of a `popstate`\n * event.\n *\n * This class is currently an extension of `HistoryStateManager` and is used when the\n * Navigation API is available. It overrides the behavior of listening to `popstate` events\n * to retrieve the state from `navigation.currentEntry` instead of `history.state` since\n * history and navigation states are separate.\n *\n * This implementation is not complete - it does not integrate at all with navigation API other than\n * providing the right state on popstate. It needs to manage the whole lifecycle of the navigation\n * by intercepting the navigation event.\n */\nexport class NavigationStateManager extends StateManager {\n  private readonly injector = inject(EnvironmentInjector);\n  private readonly navigation = inject(PlatformNavigation);\n  private readonly inMemoryScrollingEnabled = inject(ROUTER_SCROLLER, {optional: true}) !== null;\n  /** The base origin of the application, extracted from PlatformLocation. */\n  private readonly base = new URL(inject(PlatformLocation).href).origin;\n  /** The root URL of the Angular application, considering the base href. */\n  private readonly appRootURL = new URL(this.location.prepareExternalUrl?.('/') ?? '/', this.base)\n    .href;\n  private readonly precommitHandlerSupported = inject(PRECOMMIT_HANDLER_SUPPORTED);\n  /**\n   * The `NavigationHistoryEntry` from the Navigation API that corresponds to the last successfully\n   * activated router state. This is crucial for restoring the browser state if an ongoing navigation\n   * is canceled or fails, allowing a precise rollback to a known good entry.\n   * It's updated on `navigatesuccess`.\n   */\n  private activeHistoryEntry: NavigationHistoryEntry = this.navigation.currentEntry!;\n\n  /**\n   * Holds state related to the currently processing navigation that was intercepted from a\n   * `navigate` event. This includes the router's internal `Navigation` object.\n   */\n  private currentNavigation: {\n    removeAbortListener?: () => void;\n    /** The Angular Router's internal representation of the ongoing navigation. */\n    routerTransition?: RouterNavigation;\n    /** Function to reject the intercepted navigation event. */\n    rejectNavigateEvent?: (reason?: any) => void;\n    /** Function to resolve the intercepted navigation event. */\n    resolveHandler?: (v: void) => void;\n    navigationEvent?: NavigateEvent;\n    commitUrl?: () => Promise<void>;\n  } = {};\n\n  /**\n   * Subject used to notify listeners (typically the `Router`) of URL/state changes\n   * that were initiated outside the Angular Router but detected via the Navigation API's\n   * `navigate` event (e.g., user clicking browser back/forward, or manual URL changes if\n   * interceptable by the Navigation API).\n   */\n  private nonRouterCurrentEntryChangeSubject = new Subject<{\n    path: string;\n    state: RestoredState | null | undefined;\n  }>();\n\n  nonRouterEntryChangeListener?: SubscriptionLike;\n  private get registered() {\n    return (\n      this.nonRouterEntryChangeListener !== undefined && !this.nonRouterEntryChangeListener.closed\n    );\n  }\n\n  constructor() {\n    super();\n\n    // Listen to the 'navigate' event from the Navigation API.\n    // This is the primary entry point for intercepting and handling navigations.\n    const navigateListener = (event: NavigateEvent) => {\n      this.handleNavigate(event);\n    };\n    this.navigation.addEventListener('navigate', navigateListener);\n    inject(DestroyRef).onDestroy(() =>\n      this.navigation.removeEventListener('navigate', navigateListener),\n    );\n  }\n\n  override registerNonRouterCurrentEntryChangeListener(\n    listener: (\n      url: string,\n      state: RestoredState | null | undefined,\n      trigger: NavigationTrigger,\n      extras: NavigationExtras,\n    ) => void,\n  ): SubscriptionLike {\n    this.activeHistoryEntry = this.navigation.currentEntry!;\n    this.nonRouterEntryChangeListener = this.nonRouterCurrentEntryChangeSubject.subscribe(\n      ({path, state}) => {\n        listener(\n          path,\n          state,\n          'popstate',\n          !this.precommitHandlerSupported ? {replaceUrl: true} : {},\n        );\n      },\n    );\n    return this.nonRouterEntryChangeListener;\n  }\n\n  /**\n   * Handles router events emitted by the `NavigationTransitions` service.\n   * This method orchestrates the interaction with the Navigation API based on the\n   * current stage of the router's internal navigation pipeline.\n   *\n   * @param e The router event (e.g., `NavigationStart`, `NavigationEnd`).\n   * @param transition The Angular Router's internal navigation object.\n   */\n  override async handleRouterEvent(\n    e: Event | PrivateRouterEvents,\n    transition: RouterNavigation,\n  ): Promise<void> {\n    this.currentNavigation = {...this.currentNavigation, routerTransition: transition};\n    if (e instanceof NavigationStart) {\n      this.updateStateMemento();\n      // If we have precommit handler support, we can create a navigation\n      // immediately and redirect it later.\n      if (this.precommitHandlerSupported) {\n        this.maybeCreateNavigationForTransition(transition);\n      }\n    } else if (e instanceof NavigationSkipped) {\n      this.finishNavigation();\n      this.commitTransition(transition);\n    } else if (e instanceof BeforeRoutesRecognized) {\n      transition.routesRecognizeHandler.deferredHandle = new Promise<void>(async (resolve) => {\n        if (this.urlUpdateStrategy === 'eager') {\n          try {\n            this.maybeCreateNavigationForTransition(transition);\n            await this.currentNavigation.commitUrl?.();\n          } catch {\n            // If commit fails (e.g., precommitHandler rejects), abort.\n            // The AbortSignal will notify\n            return;\n          }\n        }\n        resolve();\n      });\n    } else if (e instanceof BeforeActivateRoutes) {\n      transition.beforeActivateHandler.deferredHandle = new Promise<void>(async (resolve) => {\n        // If URL update strategy is 'deferred', commit the URL now (before activation).\n        if (this.urlUpdateStrategy === 'deferred') {\n          try {\n            this.maybeCreateNavigationForTransition(transition);\n            await this.currentNavigation.commitUrl?.();\n          } catch {\n            return;\n          }\n        }\n        // Commit the internal router state.\n        this.commitTransition(transition);\n        resolve();\n      });\n    } else if (e instanceof NavigationCancel || e instanceof NavigationError) {\n      // If redirecting and the URL hasn't been committed yet (via precommmitHandler),\n      // the redirect will be handled by `commitUrl` using `controller.redirect` and\n      // we should retain the current NavigateEvent.\n      // Otherwise, a full cancellation and rollback is needed.\n      const redirectingBeforeUrlCommit =\n        e instanceof NavigationCancel &&\n        e.code === NavigationCancellationCode.Redirect &&\n        !!this.currentNavigation.commitUrl;\n      if (redirectingBeforeUrlCommit) {\n        return;\n      }\n      void this.cancel(transition, e);\n    } else if (e instanceof NavigationEnd) {\n      const {resolveHandler, removeAbortListener} = this.currentNavigation;\n      this.currentNavigation = {};\n      // We no longer care about aborts for this navigation once it's successfully ended.\n      // Since we're delaying the resolution of the handler until after next render, it's\n      // technically possible for it to still get aborted in that window, so we remove the listener here.\n      removeAbortListener?.();\n      // Update `activeHistoryEntry` to the new current entry from Navigation API.\n      this.activeHistoryEntry = this.navigation.currentEntry!;\n      // TODO(atscott): Consider initiating scroll here since it will be attempted periodically.\n      // We have to wait for render to resolve because focus reset is only done once in the spec.\n      // Render is not synchronous with NavigationEnd today. The Router's navigation promise resolve\n      // is what _causes_ the render to happen with ZoneJS...\n      // Resolve handler after next render to defer scroll and focus reset.\n      afterNextRender({read: () => resolveHandler?.()}, {injector: this.injector});\n    }\n  }\n\n  private maybeCreateNavigationForTransition(transition: RouterNavigation) {\n    const {navigationEvent, commitUrl} = this.currentNavigation;\n    if (\n      // Presence of commitUrl function indicates the navigateEvent supports redirect\n      commitUrl ||\n      // If we are currently handling a traversal navigation, we do not need a new navigation for it\n      // because we are strictly restoring a previous state. If we are instead handling a navigation\n      // initiated outside the router, we do need to replace it with a router-triggered navigation\n      // to add the router-specific state.\n      (navigationEvent &&\n        navigationEvent.navigationType === 'traverse' &&\n        this.eventAndRouterDestinationsMatch(navigationEvent, transition))\n    ) {\n      return;\n    }\n    // Before we create a navigation for the Router transition, we have to remove any abort listeners\n    // from the previous navigation event. Creating the new navigation will cause the signal\n    // to be aborted, and we don't want that to cause our router transition to be aborted.\n    this.currentNavigation.removeAbortListener?.();\n    const path = this.createBrowserPath(transition);\n    this.navigate(path, transition);\n  }\n\n  /**\n   * Initiates a navigation using the browser's Navigation API (`navigation.navigate`).\n   * This is called when the Angular Router starts an imperative navigation.\n   *\n   * @param internalPath The internal path generated by the router.\n   * @param transition The Angular Router's navigation object.\n   */\n  private navigate(internalPath: string, transition: RouterNavigation) {\n    // Determine the actual browser path, considering skipLocationChange.\n    const path = transition.extras.skipLocationChange\n      ? this.navigation.currentEntry!.url! // If skipping, use the current URL.\n      : this.location.prepareExternalUrl(internalPath); // Otherwise, prepare the external URL.\n\n    // Prepare the state to be stored in the NavigationHistoryEntry.\n    const state = {\n      ...transition.extras.state,\n      // Include router's navigationId for tracking. Required for in-memory scroll restoration\n      navigationId: transition.id,\n    };\n\n    const info: NavigationInfo = {ɵrouterInfo: {intercept: true}};\n    // https://issues.chromium.org/issues/460137775 - Bug in all browsers where URL might actually not be updated\n    // by the time we get here. replaceUrl was set to true in the Router when navigating to sync with the browser\n    // because it assumes the URL is already committed. In this scenario, we need to go back to 'push' behavior\n    // because it was not yet been committed and we should not replace the current entry.\n    if (!this.navigation.transition && this.currentNavigation.navigationEvent) {\n      transition.extras.replaceUrl = false;\n    }\n\n    // Determine if this should be a 'push' or 'replace' history operation.\n    const history =\n      this.location.isCurrentPathEqualTo(path) ||\n      transition.extras.replaceUrl ||\n      transition.extras.skipLocationChange\n        ? 'replace'\n        : 'push';\n\n    // Call the Navigation API and prevent unhandled promise rejections of the\n    // returned promises from `navigation.navigate`.\n    handleResultRejections(\n      this.navigation.navigate(path, {\n        state,\n        history,\n        info,\n      }),\n    );\n  }\n\n  /**\n   * Finalizes the current navigation by committing the URL (if not already done)\n   * and resolving the post-commit handler promise. Clears the `currentNavigation` state.\n   */\n  private finishNavigation() {\n    this.currentNavigation.commitUrl?.();\n    this.currentNavigation?.resolveHandler?.();\n    this.currentNavigation = {};\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private async cancel(transition: RouterNavigation, cause: NavigationCancel | NavigationError) {\n    this.currentNavigation.rejectNavigateEvent?.();\n    const clearedState = {}; // Marker to detect if a new navigation started during async ops.\n    this.currentNavigation = clearedState;\n    // Do not reset state if we're redirecting or navigation is superseded by a new one.\n    if (isRedirectingEvent(cause)) {\n      return;\n    }\n    // Determine if the rollback should be a traversal to a specific previous entry\n    // or a replacement of the current URL.\n    const isTraversalReset =\n      this.canceledNavigationResolution === 'computed' &&\n      this.navigation.currentEntry!.key !== this.activeHistoryEntry.key;\n    this.resetInternalState(transition.finalUrl, isTraversalReset);\n\n    // If the current browser entry ID is already the same as our target active entry,\n    // no browser history manipulation is needed.\n    if (this.navigation.currentEntry!.id === this.activeHistoryEntry.id) {\n      return;\n    }\n\n    // If the cancellation was not due to a guard or resolver (e.g., superseded by another\n    // navigation, or aborted by user), there's a race condition. Another navigation might\n    // have already started. A delay is used to see if `currentNavigation` changes,\n    // indicating a new navigation has taken over.\n    // We have no way of knowing if a navigation was aborted by another incoming navigation\n    // https://github.com/WICG/navigation-api/issues/288\n    if (cause instanceof NavigationCancel && cause.code === NavigationCancellationCode.Aborted) {\n      await Promise.resolve();\n      if (this.currentNavigation !== clearedState) {\n        // A new navigation has started, so don't attempt to roll back this one.\n        return;\n      }\n    }\n\n    if (isTraversalReset) {\n      // Traverse back to the specific `NavigationHistoryEntry` that was active before.\n      handleResultRejections(\n        this.navigation.traverseTo(this.activeHistoryEntry.key, {\n          info: {ɵrouterInfo: {intercept: false}} satisfies NavigationInfo,\n        }),\n      );\n    } else {\n      // Replace the current history entry with the state of the last known good URL/state.\n      const internalPath = this.urlSerializer.serialize(this.getCurrentUrlTree());\n      const pathOrUrl = this.location.prepareExternalUrl(internalPath);\n      handleResultRejections(\n        this.navigation.navigate(pathOrUrl, {\n          state: this.activeHistoryEntry.getState(),\n          history: 'replace',\n          info: {ɵrouterInfo: {intercept: false}} satisfies NavigationInfo,\n        }),\n      );\n    }\n  }\n\n  private resetInternalState(finalUrl: UrlTree | undefined, traversalReset: boolean): void {\n    this.routerState = this.stateMemento.routerState;\n    this.currentUrlTree = this.stateMemento.currentUrlTree;\n    this.rawUrlTree = traversalReset\n      ? this.stateMemento.rawUrlTree\n      : this.urlHandlingStrategy.merge(this.currentUrlTree, finalUrl ?? this.rawUrlTree);\n  }\n\n  /**\n   * Handles the `navigate` event from the browser's Navigation API.\n   * This is the core interception point.\n   *\n   * @param event The `NavigateEvent` from the Navigation API.\n   */\n  private handleNavigate(event: NavigateEvent) {\n    // If the event cannot be intercepted (e.g., cross-origin, or some browser-internal\n    // navigations), let the browser handle it.\n    // We also do not convert reload navigation events to SPA navigations. Intercepting\n    // would prevent the generally expected hard refresh. If an application wants special\n    // handling for reloads, they can implement it in their own `navigate` event listener.\n    if (!event.canIntercept || event.navigationType === 'reload') {\n      return;\n    }\n\n    const routerInfo = (event?.info as NavigationInfo | undefined)?.ɵrouterInfo;\n    if (routerInfo && !routerInfo.intercept) {\n      return;\n    }\n    const isTriggeredByRouterTransition = !!routerInfo;\n    if (!isTriggeredByRouterTransition) {\n      // If there's an ongoing navigation in the Angular Router, abort it. This new navigation\n      // supersedes it. If the navigation was triggered by the Router, it may be the navigation\n      // happening from _inside_ the navigation transition, or a separate Router.navigate call\n      // that would have already handled cleanup of the previous navigation.\n      this.currentNavigation.routerTransition?.abort();\n\n      if (!this.registered) {\n        // If the router isn't set up to listen for these yet. Do not convert it to a router navigation.\n        this.finishNavigation();\n        return;\n      }\n    }\n\n    this.currentNavigation = {...this.currentNavigation};\n    this.currentNavigation.navigationEvent = event;\n    // Setup an abort handler. If the `NavigateEvent` is aborted (e.g., user clicks stop,\n    // or another navigation supersedes this one), we need to abort the Angular Router's\n    // internal navigation transition as well.\n    const abortHandler = () => {\n      this.currentNavigation.routerTransition?.abort();\n    };\n    event.signal.addEventListener('abort', abortHandler);\n    this.currentNavigation.removeAbortListener = () =>\n      event.signal.removeEventListener('abort', abortHandler);\n\n    let scroll = this.inMemoryScrollingEnabled\n      ? 'manual'\n      : (this.currentNavigation.routerTransition?.extras.scroll ?? 'after-transition');\n    const interceptOptions: NavigationInterceptOptions = {\n      scroll,\n    };\n\n    const {\n      promise: handlerPromise,\n      resolve: resolveHandler,\n      reject: rejectHandler,\n    } = promiseWithResolvers<void>();\n\n    const {\n      promise: precommitHandlerPromise,\n      resolve: resolvePrecommitHandler,\n      reject: rejectPrecommitHandler,\n    } = promiseWithResolvers<void>();\n    this.currentNavigation.rejectNavigateEvent = () => {\n      event.signal.removeEventListener('abort', abortHandler);\n      rejectPrecommitHandler();\n      rejectHandler();\n    };\n    this.currentNavigation.resolveHandler = () => {\n      this.currentNavigation.removeAbortListener?.();\n      resolveHandler();\n    };\n    // Prevent unhandled promise rejections from internal promises.\n    handlerPromise.catch(() => {});\n    precommitHandlerPromise.catch(() => {});\n    interceptOptions.handler = () => handlerPromise;\n\n    if (this.deferredCommitSupported(event)) {\n      const redirect = new Promise<\n        (url: string, options: {state: unknown; history?: 'push' | 'replace'}) => void\n      >((resolve) => {\n        // The `precommitHandler` option is not in the standard DOM types yet\n        (interceptOptions as any).precommitHandler = (controller: any) => {\n          if (this.navigation.transition?.navigationType === 'traverse') {\n            // TODO(atscott): Figure out correct behavior for redirecting traversals\n            resolve(() => {});\n          } else {\n            resolve(controller.redirect.bind(controller));\n          }\n          return precommitHandlerPromise;\n        };\n      });\n      // `commitUrl` is a function that will be called by the router's lifecycle\n      // (e.g., in `BeforeRoutesRecognized` or `BeforeActivateRoutes` depending on `urlUpdateStrategy`)\n      // to actually perform the URL change via the Navigation API.\n      this.currentNavigation.commitUrl = async () => {\n        this.currentNavigation.commitUrl = undefined; // Ensure it's only called once.\n        const transition = this.currentNavigation.routerTransition;\n\n        // If not skipping location change, use the `redirect` function (from `precommitHandler`'s\n        // controller) to perform the URL update with the correct state and history action.\n        if (transition && !transition.extras.skipLocationChange) {\n          const internalPath = this.createBrowserPath(transition);\n          const history =\n            this.location.isCurrentPathEqualTo(internalPath) || !!transition.extras.replaceUrl\n              ? 'replace'\n              : 'push';\n          const state = {\n            ...transition.extras.state,\n            navigationId: transition.id,\n          };\n          // this might be a path or an actual URL depending on the baseHref\n          const pathOrUrl = this.location.prepareExternalUrl(internalPath);\n          (await redirect)(pathOrUrl, {state, history});\n        }\n        resolvePrecommitHandler();\n        // Wait for the Navigation API's own `committed` promise if available (part of transition object)\n        // This ensures we respect the browser's timing for when the commit actually happens.\n        return await this.navigation.transition?.committed;\n      };\n    }\n\n    // Intercept the navigation event with the configured options.\n    event.intercept(interceptOptions);\n\n    // If `routerInfo` is null, this `NavigateEvent` was not triggered by one of the Router's\n    // own `this.navigation.navigate()` calls. It's an external navigation (e.g., user click,\n    // browser back/forward that the Navigation API surfaces). We need to inform the Router.\n    if (!isTriggeredByRouterTransition) {\n      this.handleNavigateEventTriggeredOutsideRouterAPIs(event);\n    }\n  }\n\n  /**\n   * Handles `NavigateEvent`s that were not initiated by the Angular Router's own API calls\n   * (e.g., `router.navigate()`). These are typically from user interactions like back/forward\n   * buttons or direct URL manipulation if the Navigation API intercepts them.\n   *\n   * It converts such an event into a format the Angular Router can understand and processes it\n   * via the `nonRouterCurrentEntryChangeSubject`.\n   *\n   * @param event The `NavigateEvent` from the Navigation API.\n   */\n  private handleNavigateEventTriggeredOutsideRouterAPIs(event: NavigateEvent) {\n    // TODO(atscott): Consider if the destination URL doesn't start with `appRootURL`.\n    // Should we ignore it or not intercept in the first place?\n\n    // Extract the application-relative path from the full destination URL.\n    const path = event.destination.url.substring(this.appRootURL.length - 1);\n    const state = event.destination.getState() as RestoredState | null | undefined;\n    this.nonRouterCurrentEntryChangeSubject.next({path, state});\n  }\n\n  private eventAndRouterDestinationsMatch(\n    navigateEvent: NavigateEvent,\n    transition: RouterNavigation,\n  ): boolean {\n    const internalPath = this.createBrowserPath(transition);\n    const eventDestination = new URL(navigateEvent.destination.url);\n    // this might be a path or an actual URL depending on the baseHref\n    const routerDestination = this.location.prepareExternalUrl(internalPath);\n    return new URL(routerDestination, eventDestination.origin).href === eventDestination.href;\n  }\n\n  private deferredCommitSupported(event: NavigateEvent): boolean {\n    return (\n      this.precommitHandlerSupported &&\n      // Cannot defer commit if not cancelable by the Navigation API's rules.\n      event.cancelable\n    );\n  }\n}\n\n/**\n * Attaches a no-op `.catch(() => {})` to the `committed` and `finished` promises of a\n * `NavigationResult`. This is to prevent unhandled promise rejection errors in the console\n * if the consumer of the navigation method (e.g., `router.navigate()`) doesn't explicitly\n * handle rejections on both promises. Navigations can be legitimately aborted (e.g., by a\n * subsequent navigation), and this shouldn't necessarily manifest as an unhandled error\n * if the application code doesn't specifically need to react to the `committed` promise\n * rejecting in such cases. The `finished` promise is more commonly used to determine\n * overall success/failure.\n */\nfunction handleResultRejections(result: NavigationResult): NavigationResult {\n  result.finished?.catch(() => {});\n  result.committed?.catch(() => {});\n  return result;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n  HashLocationStrategy,\n  Location,\n  LOCATION_INITIALIZED,\n  LocationStrategy,\n  ViewportScroller,\n  ɵNavigationAdapterForLocation,\n} from '@angular/common';\nimport {\n  APP_BOOTSTRAP_LISTENER,\n  ApplicationRef,\n  ComponentRef,\n  ENVIRONMENT_INITIALIZER,\n  EnvironmentProviders,\n  inject,\n  InjectionToken,\n  Injector,\n  ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION as IS_ENABLED_BLOCKING_INITIAL_NAVIGATION,\n  makeEnvironmentProviders,\n  ɵperformanceMarkFeature as performanceMarkFeature,\n  provideAppInitializer,\n  provideEnvironmentInitializer,\n  Provider,\n  runInInjectionContext,\n  Type,\n  ɵpublishExternalGlobalUtil,\n} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {INPUT_BINDER, RoutedComponentInputBinder} from './directives/router_outlet';\nimport {Event, NavigationError, stringifyEvent} from './events';\nimport {RedirectCommand, Routes} from './models';\nimport {NAVIGATION_ERROR_HANDLER, NavigationTransitions} from './navigation_transition';\nimport {ROUTE_INJECTOR_CLEANUP, routeInjectorCleanup} from './route_injector_cleanup';\nimport {Router} from './router';\nimport {InMemoryScrollingOptions, ROUTER_CONFIGURATION, RouterConfigOptions} from './router_config';\nimport {ROUTES} from './router_config_loader';\nimport {PreloadingStrategy, RouterPreloader} from './router_preloader';\n\nimport {ROUTER_SCROLLER, RouterScroller} from './router_scroller';\n\nimport {getLoadedRoutes, getRouterInstance, navigateByUrl} from './router_devtools';\nimport {ActivatedRoute} from './router_state';\nimport {NavigationStateManager} from './statemanager/navigation_state_manager';\nimport {StateManager} from './statemanager/state_manager';\nimport {afterNextNavigation} from './utils/navigations';\nimport {\n  CREATE_VIEW_TRANSITION,\n  createViewTransition,\n  VIEW_TRANSITION_OPTIONS,\n  ViewTransitionsFeatureOptions,\n} from './utils/view_transition';\n\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n *   providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes,\n *         withDebugTracing(),\n *         withRouterConfig({paramsInheritanceStrategy: 'always'}))\n *     ]\n *   }\n * );\n * ```\n * @see [Router](guide/routing)\n *\n * @see {@link RouterFeatures}\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nexport function provideRouter(routes: Routes, ...features: RouterFeatures[]): EnvironmentProviders {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    // Publish this util when the router is provided so that the devtools can use it.\n    ɵpublishExternalGlobalUtil('ɵgetLoadedRoutes', getLoadedRoutes);\n    ɵpublishExternalGlobalUtil('ɵgetRouterInstance', getRouterInstance);\n    ɵpublishExternalGlobalUtil('ɵnavigateByUrl', navigateByUrl);\n  }\n\n  return makeEnvironmentProviders([\n    {provide: ROUTES, multi: true, useValue: routes},\n    typeof ngDevMode === 'undefined' || ngDevMode\n      ? {provide: ROUTER_IS_PROVIDED, useValue: true}\n      : [],\n    {provide: ActivatedRoute, useFactory: rootRoute},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener},\n    features.map((feature) => feature.ɵproviders),\n  ]);\n}\n\nexport function rootRoute(): ActivatedRoute {\n  return inject(Router).routerState.root;\n}\n\n/**\n * Helper type to represent a Router feature.\n *\n * @publicApi\n */\nexport interface RouterFeature<FeatureKind extends RouterFeatureKind> {\n  ɵkind: FeatureKind;\n  ɵproviders: Array<Provider | EnvironmentProviders>;\n}\n\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature<FeatureKind extends RouterFeatureKind>(\n  kind: FeatureKind,\n  providers: Array<Provider | EnvironmentProviders>,\n): RouterFeature<FeatureKind> {\n  return {ɵkind: kind, ɵproviders: providers};\n}\n\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nexport const ROUTER_IS_PROVIDED = new InjectionToken<boolean>(\n  typeof ngDevMode !== 'undefined' && ngDevMode ? 'Router is provided' : '',\n  {\n    factory: () => false,\n  },\n);\n\nconst routerIsProvidedDevModeCheck = {\n  provide: ENVIRONMENT_INITIALIZER,\n  multi: true,\n  useFactory() {\n    return () => {\n      if (!inject(ROUTER_IS_PROVIDED)) {\n        console.warn(\n          '`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' +\n            'This is likely a mistake.',\n        );\n      }\n    };\n  },\n};\n\n/**\n * Registers a DI provider for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```ts\n * @NgModule({\n *   providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see {@link ROUTES}\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): Provider[] {\n  return [\n    {provide: ROUTES, multi: true, useValue: routes},\n    typeof ngDevMode === 'undefined' || ngDevMode ? routerIsProvidedDevModeCheck : [],\n  ];\n}\n\n/**\n * A type alias for providers returned by `withInMemoryScrolling` for use with `provideRouter`.\n *\n * @see {@link withInMemoryScrolling}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type InMemoryScrollingFeature = RouterFeature<RouterFeatureKind.InMemoryScrollingFeature>;\n\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withInMemoryScrolling())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link ViewportScroller}\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n *     `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withInMemoryScrolling(\n  options: InMemoryScrollingOptions = {},\n): InMemoryScrollingFeature {\n  const providers = [\n    {\n      provide: ROUTER_SCROLLER,\n      useFactory: () => new RouterScroller(options),\n    },\n  ];\n  return routerFeature(RouterFeatureKind.InMemoryScrollingFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withExperimentalPlatformNavigation` for use with `provideRouter`.\n *\n * @see {@link withExperimentalPlatformNavigation}\n * @see {@link provideRouter}\n *\n * @experimental 21.1\n */\nexport type ExperimentalPlatformNavigationFeature =\n  RouterFeature<RouterFeatureKind.ExperimentalPlatformNavigationFeature>;\n\n/**\n * Enables interop with the browser's `Navigation` API for router navigations.\n *\n * @description\n * \n * CRITICAL: This feature is _highly_ experimental and should not be used in production. Browser support\n * is limited and in active development. Use only for experimentation and feedback purposes.\n * \n * This function provides a `Location` strategy that uses the browser's `Navigation` API.\n * By using the platform's Navigation APIs, the Router is able to provide native\n * browser navigation capabilities. Some advantages include:\n * \n * - The ability to intercept navigations triggered outside the Router. This allows plain anchor\n * elements _without_ `RouterLink` directives to be intercepted by the Router and converted to SPA navigations.\n * - Native scroll and focus restoration support by the browser, without the need for custom implementations.\n * - Communication of ongoing navigations to the browser, enabling built-in features like \n * accessibility announcements, loading indicators, stop buttons, and performance measurement APIs.\n\n * NOTE: Deferred entry updates are not part of the interop 2025 Navigation API commitments so the \"ongoing navigation\"\n * communication support is limited.\n *\n * @usageNotes\n *\n * ```typescript\n * const appRoutes: Routes = [\n *   { path: 'page', component: PageComponent },\n * ];\n *\n * bootstrapApplication(AppComponent, {\n *   providers: [\n *     provideRouter(appRoutes, withExperimentalPlatformNavigation())\n *   ]\n * });\n * ```\n * \n * @see [Navigation API on WICG](https://github.com/WICG/navigation-api?tab=readme-ov-file#problem-statement)\n * @see [Navigation API on Chrome from developers](https://developer.chrome.com/docs/web-platform/navigation-api/)\n * @see [Navigation API on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API)\n *\n * @experimental 21.1 \n * @returns A `RouterFeature` that enables the platform navigation.\n */\nexport function withExperimentalPlatformNavigation(): ExperimentalPlatformNavigationFeature {\n  const devModeLocationCheck =\n    typeof ngDevMode === 'undefined' || ngDevMode\n      ? [\n          provideEnvironmentInitializer(() => {\n            const locationInstance = inject(Location);\n            if (!(locationInstance instanceof ɵNavigationAdapterForLocation)) {\n              const locationConstructorName = (locationInstance as any).constructor.name;\n              let message =\n                `'withExperimentalPlatformNavigation' provides a 'Location' implementation that ensures navigation APIs are consistently used.` +\n                ` An instance of ${locationConstructorName} was found instead.`;\n              if (locationConstructorName === 'SpyLocation') {\n                message += ` One of 'RouterTestingModule' or 'provideLocationMocks' was likely used. 'withExperimentalPlatformNavigation' does not work with these because they override the Location implementation.`;\n              }\n              throw new Error(message);\n            }\n          }),\n        ]\n      : [];\n  const providers = [\n    {provide: StateManager, useExisting: NavigationStateManager},\n    {provide: Location, useClass: ɵNavigationAdapterForLocation},\n    devModeLocationCheck,\n  ];\n  return routerFeature(RouterFeatureKind.ExperimentalPlatformNavigationFeature, providers);\n}\n\nexport function getBootstrapListener() {\n  const injector = inject(Injector);\n  return (bootstrappedComponentRef: ComponentRef<unknown>) => {\n    const ref = injector.get(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    const router = injector.get(Router);\n    const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n\n    if (injector.get(INITIAL_NAVIGATION) === InitialNavigation.EnabledNonBlocking) {\n      router.initialNavigation();\n    }\n\n    injector.get(ROUTER_PRELOADER, null, {optional: true})?.setUpPreloading();\n    injector.get(ROUTER_SCROLLER, null, {optional: true})?.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    if (!bootstrapDone.closed) {\n      bootstrapDone.next();\n      bootstrapDone.complete();\n      bootstrapDone.unsubscribe();\n    }\n  };\n}\n\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken<Subject<void>>(\n  typeof ngDevMode === 'undefined' || ngDevMode ? 'bootstrap done indicator' : '',\n  {\n    factory: () => {\n      return new Subject<void>();\n    },\n  },\n);\n\n/**\n * This and the INITIAL_NAVIGATION token are used internally only. The public API side of this is\n * configured through the `ExtraOptions`.\n *\n * When set to `EnabledBlocking`, the initial navigation starts before the root\n * component is created. The bootstrap is blocked until the initial navigation is complete. This\n * value should be set in case you use [server-side rendering](guide/ssr), but do not enable\n * [hydration](guide/hydration) for your application.\n *\n * When set to `EnabledNonBlocking`, the initial navigation starts after the root component has been\n * created. The bootstrap is not blocked on the completion of the initial navigation.\n *\n * When set to `Disabled`, the initial navigation is not performed. The location listener is set up\n * before the root component gets created. Use if there is a reason to have more control over when\n * the router starts its initial navigation due to some complex initialization logic.\n *\n * @see {@link ExtraOptions}\n */\nconst enum InitialNavigation {\n  EnabledBlocking,\n  EnabledNonBlocking,\n  Disabled,\n}\n\nconst INITIAL_NAVIGATION = new InjectionToken<InitialNavigation>(\n  typeof ngDevMode === 'undefined' || ngDevMode ? 'initial navigation' : '',\n  {factory: () => InitialNavigation.EnabledNonBlocking},\n);\n\n/**\n * A type alias for providers returned by `withEnabledBlockingInitialNavigation` for use with\n * `provideRouter`.\n *\n * @see {@link withEnabledBlockingInitialNavigation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type EnabledBlockingInitialNavigationFeature =\n  RouterFeature<RouterFeatureKind.EnabledBlockingInitialNavigationFeature>;\n\n/**\n * A type alias for providers returned by `withEnabledBlockingInitialNavigation` or\n * `withDisabledInitialNavigation` functions for use with `provideRouter`.\n *\n * @see {@link withEnabledBlockingInitialNavigation}\n * @see {@link withDisabledInitialNavigation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type InitialNavigationFeature =\n  | EnabledBlockingInitialNavigationFeature\n  | DisabledInitialNavigationFeature;\n\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This should be set in case\n * you use [server-side rendering](guide/ssr), but do not enable [hydration](guide/hydration) for\n * your application.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withEnabledBlockingInitialNavigation(): EnabledBlockingInitialNavigationFeature {\n  const providers = [\n    {provide: IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, useValue: true},\n    {provide: INITIAL_NAVIGATION, useValue: InitialNavigation.EnabledBlocking},\n    provideAppInitializer(() => {\n      const injector = inject(Injector);\n      const locationInitialized: Promise<any> = injector.get(\n        LOCATION_INITIALIZED,\n        Promise.resolve(),\n      );\n\n      return locationInitialized.then(() => {\n        return new Promise((resolve) => {\n          const router = injector.get(Router);\n          const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n          afterNextNavigation(router, () => {\n            // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n            // without a redirect.\n            resolve(true);\n          });\n\n          injector.get(NavigationTransitions).afterPreactivation = () => {\n            // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n            // assume activation will complete successfully (even though this is not\n            // guaranteed).\n            resolve(true);\n            return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n          };\n          router.initialNavigation();\n        });\n      });\n    }),\n  ];\n  return routerFeature(RouterFeatureKind.EnabledBlockingInitialNavigationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withDisabledInitialNavigation` for use with\n * `provideRouter`.\n *\n * @see {@link withDisabledInitialNavigation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type DisabledInitialNavigationFeature =\n  RouterFeature<RouterFeatureKind.DisabledInitialNavigationFeature>;\n\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withDisabledInitialNavigation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withDisabledInitialNavigation(): DisabledInitialNavigationFeature {\n  const providers = [\n    provideAppInitializer(() => {\n      inject(Router).setUpLocationChangeListener();\n    }),\n    {provide: INITIAL_NAVIGATION, useValue: InitialNavigation.Disabled},\n  ];\n  return routerFeature(RouterFeatureKind.DisabledInitialNavigationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withDebugTracing` for use with `provideRouter`.\n *\n * @see {@link withDebugTracing}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type DebugTracingFeature = RouterFeature<RouterFeatureKind.DebugTracingFeature>;\n\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withDebugTracing())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withDebugTracing(): DebugTracingFeature {\n  let providers: Provider[] = [];\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    providers = [\n      {\n        provide: ENVIRONMENT_INITIALIZER,\n        multi: true,\n        useFactory: () => {\n          const router = inject(Router);\n          return () =>\n            router.events.subscribe((e: Event) => {\n              // tslint:disable:no-console\n              console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n              console.log(stringifyEvent(e));\n              console.log(e);\n              console.groupEnd?.();\n              // tslint:enable:no-console\n            });\n        },\n      },\n    ];\n  } else {\n    providers = [];\n  }\n  return routerFeature(RouterFeatureKind.DebugTracingFeature, providers);\n}\n\nconst ROUTER_PRELOADER = new InjectionToken<RouterPreloader>(\n  typeof ngDevMode === 'undefined' || ngDevMode ? 'router preloader' : '',\n);\n\n/**\n * A type alias that represents a feature which enables preloading in Router.\n * The type is used to describe the return value of the `withPreloading` function.\n *\n * @see {@link withPreloading}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type PreloadingFeature = RouterFeature<RouterFeatureKind.PreloadingFeature>;\n\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withPreloading(PreloadAllModules))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n *     should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @see [Preloading strategy](guide/routing/customizing-route-behavior#preloading-strategy)\n *\n * @publicApi\n */\nexport function withPreloading(preloadingStrategy: Type<PreloadingStrategy>): PreloadingFeature {\n  const providers = [\n    {provide: ROUTER_PRELOADER, useExisting: RouterPreloader},\n    {provide: PreloadingStrategy, useExisting: preloadingStrategy},\n  ];\n  return routerFeature(RouterFeatureKind.PreloadingFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withRouterConfig` for use with `provideRouter`.\n *\n * @see {@link withRouterConfig}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type RouterConfigurationFeature =\n  RouterFeature<RouterFeatureKind.RouterConfigurationFeature>;\n\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withRouterConfig({\n *          onSameUrlNavigation: 'reload'\n *       }))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n *     additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @see [Router configuration options](guide/routing/customizing-route-behavior#router-configuration-options)\n *\n * @publicApi\n */\nexport function withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature {\n  const providers = [{provide: ROUTER_CONFIGURATION, useValue: options}];\n  return routerFeature(RouterFeatureKind.RouterConfigurationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withHashLocation` for use with `provideRouter`.\n *\n * @see {@link withHashLocation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.RouterHashLocationFeature>;\n\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withHashLocation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link /api/common/HashLocationStrategy HashLocationStrategy}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withHashLocation(): RouterHashLocationFeature {\n  const providers = [{provide: LocationStrategy, useClass: HashLocationStrategy}];\n  return routerFeature(RouterFeatureKind.RouterHashLocationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withNavigationErrorHandler` for use with `provideRouter`.\n *\n * @see {@link withNavigationErrorHandler}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type NavigationErrorHandlerFeature =\n  RouterFeature<RouterFeatureKind.NavigationErrorHandlerFeature>;\n\n/**\n * Provides a function which is called when a navigation error occurs.\n *\n * This function is run inside application's [injection context](guide/di/dependency-injection-context)\n * so you can use the [`inject`](api/core/inject) function.\n *\n * This function can return a `RedirectCommand` to convert the error to a redirect, similar to returning\n * a `UrlTree` or `RedirectCommand` from a guard. This will also prevent the `Router` from emitting\n * `NavigationError`; it will instead emit `NavigationCancel` with code NavigationCancellationCode.Redirect.\n * Return values other than `RedirectCommand` are ignored and do not change any behavior with respect to\n * how the `Router` handles the error.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link NavigationError}\n * @see {@link /api/core/inject inject}\n * @see {@link runInInjectionContext}\n * @see [Centralize error handling in withNavigationErrorHandler](guide/routing/data-resolvers#centralize-error-handling-in-withnavigationerrorhandler)\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withNavigationErrorHandler(\n  handler: (error: NavigationError) => unknown | RedirectCommand,\n): NavigationErrorHandlerFeature {\n  const providers = [\n    {\n      provide: NAVIGATION_ERROR_HANDLER,\n      useValue: handler,\n    },\n  ];\n  return routerFeature(RouterFeatureKind.NavigationErrorHandlerFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withExperimentalAutoCleanupInjectors` for use with `provideRouter`.\n *\n * @see {@link withExperimentalAutoCleanupInjectors}\n * @see {@link provideRouter}\n *\n * @experimental 21.1\n */\nexport type ExperimentalAutoCleanupInjectorsFeature =\n  RouterFeature<RouterFeatureKind.ExperimentalAutoCleanupInjectorsFeature>;\n\n/**\n * Enables automatic destruction of unused route injectors.\n *\n * @description\n *\n * When enabled, the router will automatically destroy `EnvironmentInjector`s associated with `Route`s\n * that are no longer active or stored by the `RouteReuseStrategy`.\n *\n * This feature is opt-in and requires `RouteReuseStrategy.shouldDestroyInjector` to return `true`\n * for the routes that should be destroyed. If the `RouteReuseStrategy` uses stored handles, it\n * should also implement `retrieveStoredHandle` to ensure we don't destroy injectors for handles that will be reattached.\n *\n * @experimental 21.1\n */\nexport function withExperimentalAutoCleanupInjectors(): ExperimentalAutoCleanupInjectorsFeature {\n  return routerFeature(RouterFeatureKind.ExperimentalAutoCleanupInjectorsFeature, [\n    {provide: ROUTE_INJECTOR_CLEANUP, useValue: routeInjectorCleanup},\n  ]);\n}\n\n/**\n * A type alias for providers returned by `withComponentInputBinding` for use with `provideRouter`.\n *\n * @see {@link withComponentInputBinding}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type ComponentInputBindingFeature =\n  RouterFeature<RouterFeatureKind.ComponentInputBindingFeature>;\n\n/**\n * A type alias for providers returned by `withViewTransitions` for use with `provideRouter`.\n *\n * @see {@link withViewTransitions}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type ViewTransitionsFeature = RouterFeature<RouterFeatureKind.ViewTransitionsFeature>;\n\n/**\n * Enables binding information from the `Router` state directly to the inputs of the component in\n * `Route` configurations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withComponentInputBinding())\n *     ]\n *   }\n * );\n * ```\n *\n * The router bindings information from any of the following sources:\n *\n *  - query parameters\n *  - path and matrix parameters\n *  - static route data\n *  - data from resolvers\n *\n * Duplicate keys are resolved in the same order from above, from least to greatest,\n * meaning that resolvers have the highest precedence and override any of the other information\n * from the route.\n *\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. This prevents previous information from being\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n * Default values can be provided with a resolver on the route to ensure the value is always present\n * or an input and use an input transform in the component.\n *\n * @see {@link /guide/components/inputs#input-transforms Input Transforms}\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withComponentInputBinding(): ComponentInputBindingFeature {\n  const providers = [\n    RoutedComponentInputBinder,\n    {provide: INPUT_BINDER, useExisting: RoutedComponentInputBinder},\n  ];\n\n  return routerFeature(RouterFeatureKind.ComponentInputBindingFeature, providers);\n}\n\n/**\n * Enables view transitions in the Router by running the route activation and deactivation inside of\n * `document.startViewTransition`.\n *\n * Note: The View Transitions API is not available in all browsers. If the browser does not support\n * view transitions, the Router will not attempt to start a view transition and continue processing\n * the navigation as usual.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withViewTransitions())\n *     ]\n *   }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n * @see [View Transitions on MDN](https://developer.chrome.com/docs/web-platform/view-transitions/)\n * @see [View Transitions API on MDN](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)\n * @see [Route transition animations](guide/routing/route-transition-animations)\n * @developerPreview 19.0\n */\nexport function withViewTransitions(\n  options?: ViewTransitionsFeatureOptions,\n): ViewTransitionsFeature {\n  performanceMarkFeature('NgRouterViewTransitions');\n  const providers = [\n    {provide: CREATE_VIEW_TRANSITION, useValue: createViewTransition},\n    {\n      provide: VIEW_TRANSITION_OPTIONS,\n      useValue: {skipNextTransition: !!options?.skipInitialTransition, ...options},\n    },\n  ];\n  return routerFeature(RouterFeatureKind.ViewTransitionsFeature, providers);\n}\n\n/**\n * A type alias that represents all Router features available for use with `provideRouter`.\n * Features can be enabled by adding special functions to the `provideRouter` call.\n * See documentation for each symbol to find corresponding function name. See also `provideRouter`\n * documentation on how to use those functions.\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type RouterFeatures =\n  | PreloadingFeature\n  | DebugTracingFeature\n  | InitialNavigationFeature\n  | InMemoryScrollingFeature\n  | RouterConfigurationFeature\n  | NavigationErrorHandlerFeature\n  | ComponentInputBindingFeature\n  | ViewTransitionsFeature\n  | ExperimentalAutoCleanupInjectorsFeature\n  | RouterHashLocationFeature\n  | ExperimentalPlatformNavigationFeature;\n\n/**\n * The list of features as an enum to uniquely type each feature.\n */\nexport const enum RouterFeatureKind {\n  PreloadingFeature,\n  DebugTracingFeature,\n  EnabledBlockingInitialNavigationFeature,\n  DisabledInitialNavigationFeature,\n  InMemoryScrollingFeature,\n  RouterConfigurationFeature,\n  RouterHashLocationFeature,\n  NavigationErrorHandlerFeature,\n  ComponentInputBindingFeature,\n  ViewTransitionsFeature,\n  ExperimentalAutoCleanupInjectorsFeature,\n  ExperimentalPlatformNavigationFeature,\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n  HashLocationStrategy,\n  Location,\n  LocationStrategy,\n  PathLocationStrategy,\n  ViewportScroller,\n} from '@angular/common';\nimport {\n  APP_BOOTSTRAP_LISTENER,\n  ComponentRef,\n  inject,\n  InjectionToken,\n  ModuleWithProviders,\n  NgModule,\n  Provider,\n  ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {RouterLink} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RuntimeErrorCode} from './errors';\nimport {Routes} from './models';\nimport {NAVIGATION_ERROR_HANDLER} from './navigation_transition';\nimport {\n  getBootstrapListener,\n  rootRoute,\n  ROUTER_IS_PROVIDED,\n  withComponentInputBinding,\n  withDebugTracing,\n  withDisabledInitialNavigation,\n  withEnabledBlockingInitialNavigation,\n  withPreloading,\n  withViewTransitions,\n} from './provide_router';\nimport {Router} from './router';\nimport {ExtraOptions, ROUTER_CONFIGURATION} from './router_config';\nimport {RouterConfigLoader, ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ROUTER_SCROLLER, RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {DefaultUrlSerializer, UrlSerializer} from './url_tree';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>(\n  typeof ngDevMode === 'undefined' || ngDevMode ? 'router duplicate forRoot guard' : '',\n);\n\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  Router,\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute},\n  RouterConfigLoader,\n  // Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n  // be removed when `provideRoutes` is removed.\n  typeof ngDevMode === 'undefined' || ngDevMode\n    ? {provide: ROUTER_IS_PROVIDED, useValue: true}\n    : [],\n];\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  imports: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n})\nexport class RouterModule {\n  constructor() {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      inject(ROUTER_FORROOT_GUARD, {optional: true});\n    }\n  }\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```ts\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        typeof ngDevMode === 'undefined' || ngDevMode\n          ? config?.enableTracing\n            ? withDebugTracing().ɵproviders\n            : []\n          : [],\n        {provide: ROUTES, multi: true, useValue: routes},\n        typeof ngDevMode === 'undefined' || ngDevMode\n          ? {\n              provide: ROUTER_FORROOT_GUARD,\n              useFactory: provideForRootGuard,\n            }\n          : [],\n        config?.errorHandler\n          ? {\n              provide: NAVIGATION_ERROR_HANDLER,\n              useValue: config.errorHandler,\n            }\n          : [],\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(),\n        provideRouterScroller(),\n        config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [],\n        config?.initialNavigation ? provideInitialNavigation(config) : [],\n        config?.bindToComponentInputs ? withComponentInputBinding().ɵproviders : [],\n        config?.enableViewTransitions ? withViewTransitions().ɵproviders : [],\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```ts\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [{provide: ROUTES, multi: true, useValue: routes}],\n    };\n  }\n}\n\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nexport function provideRouterScroller(): Provider {\n  return {\n    provide: ROUTER_SCROLLER,\n    useFactory: () => {\n      const viewportScroller = inject(ViewportScroller);\n      const config: ExtraOptions = inject(ROUTER_CONFIGURATION);\n      if (config.scrollOffset) {\n        viewportScroller.setOffset(config.scrollOffset);\n      }\n      return new RouterScroller(config);\n    },\n  };\n}\n\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy(): Provider {\n  return {provide: LocationStrategy, useClass: HashLocationStrategy};\n}\n\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy(): Provider {\n  return {provide: LocationStrategy, useClass: PathLocationStrategy};\n}\n\nexport function provideForRootGuard(): any {\n  const router = inject(Router, {optional: true, skipSelf: true});\n\n  if (router) {\n    throw new RuntimeError(\n      RuntimeErrorCode.FOR_ROOT_CALLED_TWICE,\n      `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +\n        ` Lazy loaded modules should use RouterModule.forChild() instead.`,\n    );\n  }\n  return 'guarded';\n}\n\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config: Pick<ExtraOptions, 'initialNavigation'>): Provider[] {\n  return [\n    config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [],\n    config.initialNavigation === 'enabledBlocking'\n      ? withEnabledBlockingInitialNavigation().ɵproviders\n      : [],\n  ];\n}\n\n// TODO(atscott): This should not be in the public API\n/**\n * A DI token for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER = new InjectionToken<(compRef: ComponentRef<any>) => void>(\n  typeof ngDevMode === 'undefined' || ngDevMode ? 'Router Initializer' : '',\n);\n\nfunction provideRouterInitializer(): Provider[] {\n  return [\n    // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n    // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n"],"names":["ReactiveRouterState","router","inject","Router","stateManager","StateManager","fragment","signal","queryParams","path","serializer","UrlSerializer","constructor","updateState","events","subscribe","e","NavigationEnd","root","getCurrentUrlTree","set","serialize","UrlTree","deps","target","i0","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","minVersion","version","ngImport","type","decorators","providedIn","RouterLink","route","tabIndexAttribute","renderer","el","locationStrategy","hrefAttributeValue","HostAttributeToken","optional","reactiveHref","linkedSignal","isAnchorElement","computeHref","_urlTree","href","untracked","value","_target","undefined","_queryParams","ngDevMode","debugName","equal","_fragment","queryParamsHandling","_queryParamsHandling","state","_state","info","_info","relativeTo","_relativeTo","preserveFragment","_preserveFragment","skipLocationChange","_skipLocationChange","replaceUrl","_replaceUrl","onChanges","Subject","applicationErrorHandler","ɵINTERNAL_APPLICATION_ERROR_HANDLER","options","ROUTER_CONFIGURATION","reactiveRouterState","tagName","nativeElement","toLowerCase","customElements","get","observedAttributes","includes","effect","isUrlTree","routerLinkInput","RuntimeError","setTabIndexIfNotOnNativeEl","newTabIndex","applyAttributeValue","ngOnChanges","changes","next","routerLink","commandsOrUrlTree","Array","isArray","onClick","button","ctrlKey","shiftKey","altKey","metaKey","urlTree","extras","navigateByUrl","catch","ngOnDestroy","attrName","attrValue","setAttribute","removeAttribute","computed","shouldTrackParams","handling","defaultQueryParamsHandling","createUrlTree","a","b","prepareExternalUrl","serializeUrl","ɵfac","ɵɵngDeclareFactory","attribute","token","Renderer2","ElementRef","i3","LocationStrategy","Directive","ɵdir","ɵɵngDeclareDirective","isStandalone","selector","inputs","booleanAttribute","host","listeners","properties","usesOnChanges","args","Attribute","Input","transform","HostListener","RouterLinkActive","element","cdr","links","classes","routerEventsSubscription","linkInputChangesSubscription","_isActive","isActive","routerLinkActiveOptions","exact","ariaCurrentWhenActive","isActiveChange","EventEmitter","link","s","update","ngAfterContentInit","of","pipe","mergeAll","_","subscribeToEachLinkOnChanges","unsubscribe","allLinkChanges","toArray","filter","map","from","isLinkActive","routerLinkActive","data","split","c","navigated","queueMicrotask","hasActiveLinks","forEach","addClass","removeClass","toString","markForCheck","emit","isActiveMatchOptions","exactMatchOptions","subsetMatchOptions","isActiveCheckFn","some","i1","ChangeDetectorRef","descendants","exportAs","ContentChildren","Output","o","paths","matrixParams","PreloadingStrategy","PreloadAllModules","preload","fn","catchError","NoPreloading","RouterPreloader","injector","preloadingStrategy","loader","subscription","setUpPreloading","concatMap","processRoutes","config","routes","res","providers","_injector","createEnvironmentInjector","injectorForCurrentRoute","_loadedNgModuleFactory","_loadedInjector","create","injectorForChildren","loadChildren","_loadedRoutes","canLoad","loadComponent","_loadedComponent","push","preloadConfig","children","destroyed","loadedChildren$","recursiveLoadChildren$","mergeMap","factory","loadComponent$","EnvironmentInjector","i2","ROUTER_SCROLLER","InjectionToken","RouterScroller","scrollEventsSubscription","lastId","lastSource","IMPERATIVE_NAVIGATION","restoredId","store","urlSerializer","zone","NgZone","viewportScroller","ViewportScroller","transitions","NavigationTransitions","scrollPositionRestoration","anchorScrolling","init","setHistoryScrollRestoration","createScrollEvents","consumeScrollEvents","NavigationStart","getScrollPosition","navigationTrigger","restoredState","navigationId","id","scheduleScrollEvent","parse","urlAfterRedirects","NavigationSkipped","code","NavigationSkippedCode","IgnoredSameUrlNavigation","url","Scroll","scrollBehavior","instantScroll","behavior","position","scrollToPosition","anchor","scrollToAnchor","routerEvent","scroll","currentNavigation","runOutsideAngular","Promise","resolve","setTimeout","requestAnimationFrame","run","getLoadedRoutes","getRouterInstance","Error","NavigationStateManager","navigation","PlatformNavigation","inMemoryScrollingEnabled","base","URL","PlatformLocation","origin","appRootURL","location","precommitHandlerSupported","PRECOMMIT_HANDLER_SUPPORTED","activeHistoryEntry","currentEntry","nonRouterCurrentEntryChangeSubject","nonRouterEntryChangeListener","registered","closed","navigateListener","event","handleNavigate","addEventListener","DestroyRef","onDestroy","removeEventListener","registerNonRouterCurrentEntryChangeListener","listener","handleRouterEvent","transition","routerTransition","updateStateMemento","maybeCreateNavigationForTransition","finishNavigation","commitTransition","BeforeRoutesRecognized","routesRecognizeHandler","deferredHandle","urlUpdateStrategy","commitUrl","BeforeActivateRoutes","beforeActivateHandler","NavigationCancel","NavigationError","redirectingBeforeUrlCommit","NavigationCancellationCode","Redirect","cancel","resolveHandler","removeAbortListener","afterNextRender","read","navigationEvent","navigationType","eventAndRouterDestinationsMatch","createBrowserPath","navigate","internalPath","ɵrouterInfo","intercept","history","isCurrentPathEqualTo","handleResultRejections","cause","rejectNavigateEvent","clearedState","isRedirectingEvent","isTraversalReset","canceledNavigationResolution","key","resetInternalState","finalUrl","Aborted","traverseTo","pathOrUrl","getState","traversalReset","routerState","stateMemento","currentUrlTree","rawUrlTree","urlHandlingStrategy","merge","canIntercept","routerInfo","isTriggeredByRouterTransition","abort","abortHandler","interceptOptions","promise","handlerPromise","reject","rejectHandler","promiseWithResolvers","precommitHandlerPromise","resolvePrecommitHandler","rejectPrecommitHandler","handler","deferredCommitSupported","redirect","precommitHandler","controller","bind","committed","handleNavigateEventTriggeredOutsideRouterAPIs","destination","substring","length","navigateEvent","eventDestination","routerDestination","cancelable","result","finished","provideRouter","features","ɵpublishExternalGlobalUtil","makeEnvironmentProviders","provide","ROUTES","multi","useValue","ROUTER_IS_PROVIDED","ActivatedRoute","useFactory","rootRoute","APP_BOOTSTRAP_LISTENER","getBootstrapListener","feature","ɵproviders","routerFeature","kind","ɵkind","routerIsProvidedDevModeCheck","ENVIRONMENT_INITIALIZER","console","warn","provideRoutes","withInMemoryScrolling","withExperimentalPlatformNavigation","devModeLocationCheck","provideEnvironmentInitializer","locationInstance","Location","ɵNavigationAdapterForLocation","locationConstructorName","name","message","useExisting","useClass","Injector","bootstrappedComponentRef","ref","ApplicationRef","components","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","initialNavigation","ROUTER_PRELOADER","resetRootComponentType","componentTypes","complete","withEnabledBlockingInitialNavigation","IS_ENABLED_BLOCKING_INITIAL_NAVIGATION","provideAppInitializer","locationInitialized","LOCATION_INITIALIZED","then","afterNextNavigation","afterPreactivation","withDisabledInitialNavigation","setUpLocationChangeListener","withDebugTracing","group","log","stringifyEvent","groupEnd","withPreloading","withRouterConfig","withHashLocation","HashLocationStrategy","withNavigationErrorHandler","NAVIGATION_ERROR_HANDLER","withExperimentalAutoCleanupInjectors","ROUTE_INJECTOR_CLEANUP","routeInjectorCleanup","withComponentInputBinding","RoutedComponentInputBinder","INPUT_BINDER","withViewTransitions","performanceMarkFeature","CREATE_VIEW_TRANSITION","createViewTransition","VIEW_TRANSITION_OPTIONS","skipNextTransition","skipInitialTransition","ROUTER_DIRECTIVES","RouterOutlet","EmptyOutletComponent","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","DefaultUrlSerializer","ChildrenOutletContexts","RouterConfigLoader","RouterModule","forRoot","ngModule","enableTracing","provideForRootGuard","errorHandler","useHash","provideHashLocationStrategy","providePathLocationStrategy","provideRouterScroller","provideInitialNavigation","bindToComponentInputs","enableViewTransitions","provideRouterInitializer","forChild","NgModule","ɵmod","ɵɵngDeclareNgModule","imports","exports","scrollOffset","setOffset","PathLocationStrategy","skipSelf","ROUTER_INITIALIZER"],"mappings":";;;;;;;;;;;;;;MA+CaA,mBAAmB,CAAA;AACbC,EAAAA,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC;AACvBC,EAAAA,YAAY,GAAGF,MAAM,CAACG,YAAY,CAAC;EAC3CC,QAAQ,GAAGC,MAAM,CAAgB,EAAE;;WAAC;EACpCC,WAAW,GAAGD,MAAM,CAAS,EAAE;;WAAC;EAChCE,IAAI,GAAGF,MAAM,CAAS,EAAE;;WAAC;AACjBG,EAAAA,UAAU,GAAGR,MAAM,CAACS,aAAa,CAAC;AAEnDC,EAAAA,WAAAA,GAAA;IACE,IAAI,CAACC,WAAW,EAAE;IAClB,IAAI,CAACZ,MAAM,CAACa,MAAM,EAAEC,SAAS,CAAEC,CAAC,IAA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