{"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  Input,\n  input,\n  linkedSignal,\n  OnChanges,\n  OnDestroy,\n  Renderer2,\n  ɵRuntimeError as RuntimeError,\n  Service,\n  signal,\n  SimpleChanges,\n  untracked,\n  ɵINTERNAL_APPLICATION_ERROR_HANDLER,\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@Service()\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   * Passed to {@link Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#browserUrl}\n   * @see {@link Router#navigateByUrl}\n   */\n  browserUrl = input<UrlTree | string | undefined>(undefined);\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 browserUrl = this.browserUrl();\n    const extras = {\n      skipLocationChange: this.skipLocationChange,\n      replaceUrl: this.replaceUrl,\n      state: this.state,\n      info: this.info,\n      // TODO: Remove conditional spread once all consumers handle `browserUrl`.\n      // Having this property always set broke some tests in G3.\n      ...(browserUrl !== undefined && {browserUrl}),\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 {\n  createEnvironmentInjector,\n  EnvironmentInjector,\n  Injectable,\n  OnDestroy,\n  Service,\n} 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@Service()\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@Service()\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 {\n  ApplicationRef,\n  inject,\n  Injectable,\n  InjectionToken,\n  NgZone,\n  OnDestroy,\n  untracked,\n  ɵIS_HYDRATION_DOM_REUSE_ENABLED as IS_HYDRATION_DOM_REUSE_ENABLED,\n} 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 isHydrating = inject(IS_HYDRATION_DOM_REUSE_ENABLED, {optional: true}) ?? false;\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    if (this.isHydrating) {\n      inject(ApplicationRef)\n        .whenStable()\n        .then(() => {\n          this.isHydrating = false;\n        });\n    }\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    if (this.isHydrating) return;\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  DestroyRef,\n  EnvironmentInjector,\n  inject,\n  ɵpromiseWithResolvers as promiseWithResolvers,\n  Service,\n} from '@angular/core';\n\nimport {\n  PlatformLocation,\n  PlatformNavigation,\n  ɵPRECOMMIT_HANDLER_SUPPORTED as PRECOMMIT_HANDLER_SUPPORTED,\n} from '@angular/common';\nimport {Subject, SubscriptionLike} from 'rxjs';\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 {\n  NavigationExtras,\n  RestoredState,\n  Navigation as RouterNavigation,\n} from '../navigation_transition';\nimport {ROUTER_SCROLLER} from '../router_scroller';\nimport {UrlTree} from '../url_tree';\nimport {StateManager} from './state_manager';\n\ntype NavigationInfo = {ɵrouterInfo: {intercept: boolean}};\n\n@Service()\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      ...this.generateNgRouterState(transition),\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            ...this.generateNgRouterState(transition),\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 generateNgRouterState(transition: RouterNavigation) {\n    return {\n      ...this.routerUrlState(transition),\n      // Include router's navigationId for tracking. Required for in-memory scroll restoration\n      navigationId: transition.id,\n    };\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  ɵpublishNonCoreGlobalUtil,\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 {\n  ComponentInputBindingOptions,\n  InMemoryScrollingOptions,\n  ROUTER_CONFIGURATION,\n  RouterConfigOptions,\n} 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    ɵpublishNonCoreGlobalUtil('ɵgetLoadedRoutes', getLoadedRoutes);\n    ɵpublishNonCoreGlobalUtil('ɵgetRouterInstance', getRouterInstance);\n    ɵpublishNonCoreGlobalUtil('ɵnavigateByUrl', navigateByUrl);\n  }\n\n  return makeEnvironmentProviders([\n    {provide: ROUTES, multi: true, useValue: routes},\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 * 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 `retrieveStoredRouteHandles` to ensure injectors for handles that will be\n * reattached are not destroyed.\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. Can also accept an `ComponentInputBindingOptions` object to set which\n * sources are allowed to bind.\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 * Advanced example of how you can disable binding from certain sources:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withComponentInputBinding({queryParams: false}))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link /guide/components/inputs#input-transforms Input Transforms}\n * @see {@link ComponentInputBindingOptions}\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withComponentInputBinding(\n  options: ComponentInputBindingOptions = {},\n): ComponentInputBindingFeature {\n  const providers = [\n    {provide: INPUT_BINDER, useFactory: () => new RoutedComponentInputBinder(options)},\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  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];\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\n          ? withComponentInputBinding(\n              typeof config.bindToComponentInputs === 'object' ? config.bindToComponentInputs : {},\n            ).ɵproviders\n          : [],\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","Service","decorators","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","browserUrl","input","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","minVersion","version","ngImport","type","attribute","token","Renderer2","ElementRef","i3","LocationStrategy","Directive","ɵdir","ɵɵngDeclareDirective","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","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","Injectable","ɵprov","ɵɵngDeclareInjectable","providedIn","ROUTER_SCROLLER","InjectionToken","RouterScroller","scrollEventsSubscription","lastId","lastSource","IMPERATIVE_NAVIGATION","restoredId","store","isHydrating","IS_HYDRATION_DOM_REUSE_ENABLED","urlSerializer","zone","NgZone","viewportScroller","ViewportScroller","transitions","NavigationTransitions","scrollPositionRestoration","anchorScrolling","ApplicationRef","whenStable","then","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","generateNgRouterState","ɵ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","routerUrlState","cancelable","result","finished","provideRouter","features","ɵpublishNonCoreGlobalUtil","makeEnvironmentProviders","provide","ROUTES","multi","useValue","ActivatedRoute","useFactory","rootRoute","APP_BOOTSTRAP_LISTENER","getBootstrapListener","feature","ɵproviders","routerFeature","kind","ɵkind","withInMemoryScrolling","withExperimentalPlatformNavigation","devModeLocationCheck","provideEnvironmentInitializer","locationInstance","Location","ɵNavigationAdapterForLocation","locationConstructorName","name","message","useExisting","useClass","Injector","bootstrappedComponentRef","ref","components","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","initialNavigation","ROUTER_PRELOADER","resetRootComponentType","componentTypes","complete","withEnabledBlockingInitialNavigation","IS_ENABLED_BLOCKING_INITIAL_NAVIGATION","provideAppInitializer","locationInitialized","LOCATION_INITIALIZED","afterNextNavigation","afterPreactivation","withDisabledInitialNavigation","setUpLocationChangeListener","withDebugTracing","ENVIRONMENT_INITIALIZER","console","group","log","stringifyEvent","groupEnd","withPreloading","withRouterConfig","withHashLocation","HashLocationStrategy","withNavigationErrorHandler","NAVIGATION_ERROR_HANDLER","withExperimentalAutoCleanupInjectors","ROUTE_INJECTOR_CLEANUP","routeInjectorCleanup","withComponentInputBinding","INPUT_BINDER","RoutedComponentInputBinder","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":";;;;;;;;;;;;;;MAgDaA,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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