@angular/router 15.1.0-next.0 → 15.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/esm2020/src/components/empty_outlet.mjs +3 -3
  2. package/esm2020/src/deprecated_load_children.mjs +3 -1
  3. package/esm2020/src/directives/router_link.mjs +3 -3
  4. package/esm2020/src/directives/router_link_active.mjs +3 -3
  5. package/esm2020/src/directives/router_outlet.mjs +3 -3
  6. package/esm2020/src/index.mjs +1 -1
  7. package/esm2020/src/models.mjs +1 -1
  8. package/esm2020/src/navigation_transition.mjs +145 -84
  9. package/esm2020/src/page_title_strategy.mjs +6 -6
  10. package/esm2020/src/private_export.mjs +1 -1
  11. package/esm2020/src/provide_router.mjs +6 -3
  12. package/esm2020/src/route_reuse_strategy.mjs +6 -6
  13. package/esm2020/src/router.mjs +34 -93
  14. package/esm2020/src/router_config.mjs +1 -1
  15. package/esm2020/src/router_config_loader.mjs +3 -3
  16. package/esm2020/src/router_module.mjs +9 -7
  17. package/esm2020/src/router_outlet_context.mjs +3 -3
  18. package/esm2020/src/router_preloader.mjs +9 -9
  19. package/esm2020/src/router_scroller.mjs +20 -21
  20. package/esm2020/src/router_state.mjs +1 -1
  21. package/esm2020/src/url_handling_strategy.mjs +6 -6
  22. package/esm2020/src/url_tree.mjs +4 -4
  23. package/esm2020/src/version.mjs +1 -1
  24. package/esm2020/testing/src/router_testing_module.mjs +4 -4
  25. package/fesm2015/router.mjs +392 -387
  26. package/fesm2015/router.mjs.map +1 -1
  27. package/fesm2015/testing.mjs +5 -5
  28. package/fesm2015/upgrade.mjs +1 -1
  29. package/fesm2020/router.mjs +386 -386
  30. package/fesm2020/router.mjs.map +1 -1
  31. package/fesm2020/testing.mjs +5 -5
  32. package/fesm2020/upgrade.mjs +1 -1
  33. package/index.d.ts +75 -49
  34. package/package.json +4 -4
  35. package/testing/index.d.ts +1 -1
  36. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v15.1.0-next.0
2
+ * @license Angular v15.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, Injector, Compiler, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
8
+ import { ɵisObservable, ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, Injector, Compiler, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
9
9
  import { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
10
10
  import * as i3 from '@angular/common';
11
11
  import { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
@@ -461,9 +461,9 @@ function mapChildrenIntoArray(segment, fn) {
461
461
  */
462
462
  class UrlSerializer {
463
463
  }
464
- UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
- UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: UrlSerializer, decorators: [{
464
+ UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
465
+ UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlSerializer, decorators: [{
467
467
  type: Injectable,
468
468
  args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
469
469
  }] });
@@ -2413,9 +2413,9 @@ class ChildrenOutletContexts {
2413
2413
  return this.contexts.get(childName) || null;
2414
2414
  }
2415
2415
  }
2416
- ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2417
- ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2416
+ ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2417
+ ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2419
2419
  type: Injectable,
2420
2420
  args: [{ providedIn: 'root' }]
2421
2421
  }] });
@@ -2635,9 +2635,9 @@ class RouterOutlet {
2635
2635
  this.activateEvents.emit(this.activated.instance);
2636
2636
  }
2637
2637
  }
2638
- RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2639
- RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.0", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterOutlet, decorators: [{
2638
+ RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2639
+ RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.1", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterOutlet, decorators: [{
2641
2641
  type: Directive,
2642
2642
  args: [{
2643
2643
  selector: 'router-outlet',
@@ -2697,9 +2697,9 @@ function isComponentFactoryResolver(item) {
2697
2697
  */
2698
2698
  class ɵEmptyOutletComponent {
2699
2699
  }
2700
- ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2701
- ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0-next.0", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2700
+ ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2701
+ ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0-next.1", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
2702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
2703
2703
  type: Component,
2704
2704
  args: [{
2705
2705
  template: `<router-outlet></router-outlet>`,
@@ -4318,6 +4318,19 @@ function switchTap(next) {
4318
4318
  });
4319
4319
  }
4320
4320
 
4321
+ /**
4322
+ * @license
4323
+ * Copyright Google LLC All Rights Reserved.
4324
+ *
4325
+ * Use of this source code is governed by an MIT-style license that can be
4326
+ * found in the LICENSE file at https://angular.io/license
4327
+ */
4328
+ // This file exists to support the legacy `loadChildren: string` behavior being patched back into
4329
+ // Angular.
4330
+ function deprecatedLoadChildrenString(injector, loadChildren) {
4331
+ return null;
4332
+ }
4333
+
4321
4334
  /**
4322
4335
  * @license
4323
4336
  * Copyright Google LLC All Rights Reserved.
@@ -4326,16 +4339,185 @@ function switchTap(next) {
4326
4339
  * found in the LICENSE file at https://angular.io/license
4327
4340
  */
4328
4341
  const NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4342
+ /**
4343
+ * The [DI token](guide/glossary/#di-token) for a router configuration.
4344
+ *
4345
+ * `ROUTES` is a low level API for router configuration via dependency injection.
4346
+ *
4347
+ * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
4348
+ * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.
4349
+ *
4350
+ * @publicApi
4351
+ */
4352
+ const ROUTES = new InjectionToken('ROUTES');
4353
+ class RouterConfigLoader {
4354
+ constructor(injector, compiler) {
4355
+ this.injector = injector;
4356
+ this.compiler = compiler;
4357
+ this.componentLoaders = new WeakMap();
4358
+ this.childrenLoaders = new WeakMap();
4359
+ }
4360
+ loadComponent(route) {
4361
+ if (this.componentLoaders.get(route)) {
4362
+ return this.componentLoaders.get(route);
4363
+ }
4364
+ else if (route._loadedComponent) {
4365
+ return of(route._loadedComponent);
4366
+ }
4367
+ if (this.onLoadStartListener) {
4368
+ this.onLoadStartListener(route);
4369
+ }
4370
+ const loadRunner = wrapIntoObservable(route.loadComponent())
4371
+ .pipe(map(maybeUnwrapDefaultExport), tap(component => {
4372
+ if (this.onLoadEndListener) {
4373
+ this.onLoadEndListener(route);
4374
+ }
4375
+ NG_DEV_MODE$5 && assertStandalone(route.path ?? '', component);
4376
+ route._loadedComponent = component;
4377
+ }), finalize(() => {
4378
+ this.componentLoaders.delete(route);
4379
+ }));
4380
+ // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
4381
+ const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());
4382
+ this.componentLoaders.set(route, loader);
4383
+ return loader;
4384
+ }
4385
+ loadChildren(parentInjector, route) {
4386
+ if (this.childrenLoaders.get(route)) {
4387
+ return this.childrenLoaders.get(route);
4388
+ }
4389
+ else if (route._loadedRoutes) {
4390
+ return of({ routes: route._loadedRoutes, injector: route._loadedInjector });
4391
+ }
4392
+ if (this.onLoadStartListener) {
4393
+ this.onLoadStartListener(route);
4394
+ }
4395
+ const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);
4396
+ const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {
4397
+ if (this.onLoadEndListener) {
4398
+ this.onLoadEndListener(route);
4399
+ }
4400
+ // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no
4401
+ // injector associated with lazy loading a `Route` array.
4402
+ let injector;
4403
+ let rawRoutes;
4404
+ let requireStandaloneComponents = false;
4405
+ if (Array.isArray(factoryOrRoutes)) {
4406
+ rawRoutes = factoryOrRoutes;
4407
+ requireStandaloneComponents = true;
4408
+ }
4409
+ else {
4410
+ injector = factoryOrRoutes.create(parentInjector).injector;
4411
+ // When loading a module that doesn't provide `RouterModule.forChild()` preloader
4412
+ // will get stuck in an infinite loop. The child module's Injector will look to
4413
+ // its parent `Injector` when it doesn't find any ROUTES so it will return routes
4414
+ // for it's parent module instead.
4415
+ rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));
4416
+ }
4417
+ const routes = rawRoutes.map(standardizeConfig);
4418
+ NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);
4419
+ return { routes, injector };
4420
+ }), finalize(() => {
4421
+ this.childrenLoaders.delete(route);
4422
+ }));
4423
+ // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
4424
+ const loader = new ConnectableObservable(loadRunner, () => new Subject())
4425
+ .pipe(refCount());
4426
+ this.childrenLoaders.set(route, loader);
4427
+ return loader;
4428
+ }
4429
+ loadModuleFactoryOrRoutes(loadChildren) {
4430
+ const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren);
4431
+ if (deprecatedResult) {
4432
+ return deprecatedResult;
4433
+ }
4434
+ return wrapIntoObservable(loadChildren())
4435
+ .pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {
4436
+ if (t instanceof NgModuleFactory || Array.isArray(t)) {
4437
+ return of(t);
4438
+ }
4439
+ else {
4440
+ return from(this.compiler.compileModuleAsync(t));
4441
+ }
4442
+ }));
4443
+ }
4444
+ }
4445
+ RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4446
+ RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterConfigLoader, decorators: [{
4448
+ type: Injectable,
4449
+ args: [{ providedIn: 'root' }]
4450
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
4451
+ function isWrappedDefaultExport(value) {
4452
+ // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be
4453
+ // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that
4454
+ // `default` will be a renamed property.
4455
+ return value && typeof value === 'object' && 'default' in value;
4456
+ }
4457
+ function maybeUnwrapDefaultExport(input) {
4458
+ // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not
4459
+ // subject to property renaming, so we reference it with bracket access.
4460
+ return isWrappedDefaultExport(input) ? input['default'] : input;
4461
+ }
4462
+
4463
+ /**
4464
+ * @license
4465
+ * Copyright Google LLC All Rights Reserved.
4466
+ *
4467
+ * Use of this source code is governed by an MIT-style license that can be
4468
+ * found in the LICENSE file at https://angular.io/license
4469
+ */
4470
+ const NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4329
4471
  class NavigationTransitions {
4330
- constructor(router) {
4331
- this.router = router;
4472
+ constructor() {
4332
4473
  this.currentNavigation = null;
4474
+ this.lastSuccessfulNavigation = null;
4475
+ this.events = new Subject();
4476
+ this.configLoader = inject(RouterConfigLoader);
4477
+ this.environmentInjector = inject(EnvironmentInjector);
4478
+ this.urlSerializer = inject(UrlSerializer);
4479
+ this.rootContexts = inject(ChildrenOutletContexts);
4480
+ this.navigationId = 0;
4481
+ const onLoadStart = (r) => this.events.next(new RouteConfigLoadStart(r));
4482
+ const onLoadEnd = (r) => this.events.next(new RouteConfigLoadEnd(r));
4483
+ this.configLoader.onLoadEndListener = onLoadEnd;
4484
+ this.configLoader.onLoadStartListener = onLoadStart;
4485
+ }
4486
+ get hasRequestedNavigation() {
4487
+ return this.navigationId !== 0;
4488
+ }
4489
+ complete() {
4490
+ this.transitions?.complete();
4333
4491
  }
4334
- setupNavigations(transitions) {
4335
- const eventsSubject = this.router.events;
4336
- return transitions.pipe(filter(t => t.id !== 0),
4492
+ handleNavigationRequest(request) {
4493
+ const id = ++this.navigationId;
4494
+ this.transitions?.next({ ...this.transitions.value, ...request, id });
4495
+ }
4496
+ setupNavigations(router) {
4497
+ this.transitions = new BehaviorSubject({
4498
+ id: 0,
4499
+ targetPageId: 0,
4500
+ currentUrlTree: router.currentUrlTree,
4501
+ currentRawUrl: router.currentUrlTree,
4502
+ extractedUrl: router.urlHandlingStrategy.extract(router.currentUrlTree),
4503
+ urlAfterRedirects: router.urlHandlingStrategy.extract(router.currentUrlTree),
4504
+ rawUrl: router.currentUrlTree,
4505
+ extras: {},
4506
+ resolve: null,
4507
+ reject: null,
4508
+ promise: Promise.resolve(true),
4509
+ source: 'imperative',
4510
+ restoredState: null,
4511
+ currentSnapshot: router.routerState.snapshot,
4512
+ targetSnapshot: null,
4513
+ currentRouterState: router.routerState,
4514
+ targetRouterState: null,
4515
+ guards: { canActivateChecks: [], canDeactivateChecks: [] },
4516
+ guardsResult: null,
4517
+ });
4518
+ return this.transitions.pipe(filter(t => t.id !== 0),
4337
4519
  // Extract URL
4338
- map(t => ({ ...t, extractedUrl: this.router.urlHandlingStrategy.extract(t.rawUrl) })),
4520
+ map(t => ({ ...t, extractedUrl: router.urlHandlingStrategy.extract(t.rawUrl) })),
4339
4521
  // Using switchMap so we cancel executing navigations when a new one comes in
4340
4522
  switchMap(overallTransitionState => {
4341
4523
  let completed = false;
@@ -4350,41 +4532,42 @@ class NavigationTransitions {
4350
4532
  extractedUrl: t.extractedUrl,
4351
4533
  trigger: t.source,
4352
4534
  extras: t.extras,
4353
- previousNavigation: !this.router.lastSuccessfulNavigation ? null : {
4354
- ...this.router.lastSuccessfulNavigation,
4535
+ previousNavigation: !this.lastSuccessfulNavigation ? null : {
4536
+ ...this.lastSuccessfulNavigation,
4355
4537
  previousNavigation: null,
4356
4538
  },
4357
4539
  };
4358
4540
  }), switchMap(t => {
4359
- const browserUrlTree = this.router.browserUrlTree.toString();
4360
- const urlTransition = !this.router.navigated ||
4541
+ const browserUrlTree = router.browserUrlTree.toString();
4542
+ const urlTransition = !router.navigated ||
4361
4543
  t.extractedUrl.toString() !== browserUrlTree ||
4362
4544
  // Navigations which succeed or ones which fail and are cleaned up
4363
4545
  // correctly should result in `browserUrlTree` and `currentUrlTree`
4364
4546
  // matching. If this is not the case, assume something went wrong and
4365
4547
  // try processing the URL again.
4366
- browserUrlTree !== this.router.currentUrlTree.toString();
4367
- if (!urlTransition && this.router.onSameUrlNavigation !== 'reload') {
4368
- const reason = NG_DEV_MODE$5 ?
4548
+ browserUrlTree !== router.currentUrlTree.toString();
4549
+ const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;
4550
+ if (!urlTransition && onSameUrlNavigation !== 'reload') {
4551
+ const reason = NG_DEV_MODE$4 ?
4369
4552
  `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.` :
4370
4553
  '';
4371
- this.router.triggerEvent(new NavigationSkipped(t.id, this.router.serializeUrl(overallTransitionState.rawUrl), reason, 0 /* NavigationSkippedCode.IgnoredSameUrlNavigation */));
4372
- this.router.rawUrlTree = t.rawUrl;
4554
+ this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.rawUrl), reason, 0 /* NavigationSkippedCode.IgnoredSameUrlNavigation */));
4555
+ router.rawUrlTree = t.rawUrl;
4373
4556
  t.resolve(null);
4374
4557
  return EMPTY;
4375
4558
  }
4376
- if (this.router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {
4559
+ if (router.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {
4377
4560
  // If the source of the navigation is from a browser event, the URL is
4378
4561
  // already updated. We already need to sync the internal state.
4379
4562
  if (isBrowserTriggeredNavigation(t.source)) {
4380
- this.router.browserUrlTree = t.extractedUrl;
4563
+ router.browserUrlTree = t.extractedUrl;
4381
4564
  }
4382
4565
  return of(t).pipe(
4383
4566
  // Fire NavigationStart event
4384
4567
  switchMap(t => {
4385
- const transition = this.router.transitions.getValue();
4386
- eventsSubject.next(new NavigationStart(t.id, this.router.serializeUrl(t.extractedUrl), t.source, t.restoredState));
4387
- if (transition !== this.router.transitions.getValue()) {
4568
+ const transition = this.transitions?.getValue();
4569
+ this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));
4570
+ if (transition !== this.transitions?.getValue()) {
4388
4571
  return EMPTY;
4389
4572
  }
4390
4573
  // This delay is required to match old behavior that forced
@@ -4392,7 +4575,7 @@ class NavigationTransitions {
4392
4575
  return Promise.resolve(t);
4393
4576
  }),
4394
4577
  // ApplyRedirects
4395
- applyRedirects(this.router.ngModule.injector, this.router.configLoader, this.router.urlSerializer, this.router.config),
4578
+ applyRedirects(this.environmentInjector, this.configLoader, this.urlSerializer, router.config),
4396
4579
  // Update the currentNavigation
4397
4580
  // `urlAfterRedirects` is guaranteed to be set after this point
4398
4581
  tap(t => {
@@ -4403,32 +4586,31 @@ class NavigationTransitions {
4403
4586
  overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;
4404
4587
  }),
4405
4588
  // Recognize
4406
- recognize(this.router.ngModule.injector, this.router.rootComponentType, this.router.config, this.router.urlSerializer, this.router.paramsInheritanceStrategy),
4589
+ recognize(this.environmentInjector, router.rootComponentType, router.config, this.urlSerializer, router.paramsInheritanceStrategy),
4407
4590
  // Update URL if in `eager` update mode
4408
4591
  tap(t => {
4409
4592
  overallTransitionState.targetSnapshot = t.targetSnapshot;
4410
- if (this.router.urlUpdateStrategy === 'eager') {
4593
+ if (router.urlUpdateStrategy === 'eager') {
4411
4594
  if (!t.extras.skipLocationChange) {
4412
- const rawUrl = this.router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4413
- this.router.setBrowserUrl(rawUrl, t);
4595
+ const rawUrl = router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4596
+ router.setBrowserUrl(rawUrl, t);
4414
4597
  }
4415
- this.router.browserUrlTree = t.urlAfterRedirects;
4598
+ router.browserUrlTree = t.urlAfterRedirects;
4416
4599
  }
4417
4600
  // Fire RoutesRecognized
4418
- const routesRecognized = new RoutesRecognized(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4419
- eventsSubject.next(routesRecognized);
4601
+ const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4602
+ this.events.next(routesRecognized);
4420
4603
  }));
4421
4604
  }
4422
4605
  else if (urlTransition &&
4423
- this.router.urlHandlingStrategy.shouldProcessUrl(this.router.rawUrlTree)) {
4424
- // When the current URL shouldn't be processed, but the previous one
4425
- // was, we handle this by navigating from the current URL to an empty
4426
- // state so deactivate guards can run.
4606
+ router.urlHandlingStrategy.shouldProcessUrl(router.rawUrlTree)) {
4607
+ /* When the current URL shouldn't be processed, but the previous one
4608
+ * was, we handle this "error condition" by navigating to the
4609
+ * previously successful URL, but leaving the URL intact.*/
4427
4610
  const { id, extractedUrl, source, restoredState, extras } = t;
4428
- const navStart = new NavigationStart(id, this.router.serializeUrl(extractedUrl), source, restoredState);
4429
- eventsSubject.next(navStart);
4430
- const targetSnapshot = createEmptyState(extractedUrl, this.router.rootComponentType)
4431
- .snapshot;
4611
+ const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);
4612
+ this.events.next(navStart);
4613
+ const targetSnapshot = createEmptyState(extractedUrl, router.rootComponentType).snapshot;
4432
4614
  overallTransitionState = {
4433
4615
  ...t,
4434
4616
  targetSnapshot,
@@ -4443,37 +4625,37 @@ class NavigationTransitions {
4443
4625
  * current "settled" URL. This way the next navigation will be coming
4444
4626
  * from the current URL in the browser.
4445
4627
  */
4446
- const reason = NG_DEV_MODE$5 ?
4628
+ const reason = NG_DEV_MODE$4 ?
4447
4629
  `Navigation was ignored because the UrlHandlingStrategy` +
4448
- ` indicated neither the current URL ${this.router.rawUrlTree} nor target URL ${t.rawUrl} should be processed.` :
4630
+ ` indicated neither the current URL ${router.rawUrlTree} nor target URL ${t.rawUrl} should be processed.` :
4449
4631
  '';
4450
- this.router.triggerEvent(new NavigationSkipped(t.id, this.router.serializeUrl(overallTransitionState.extractedUrl), reason, 1 /* NavigationSkippedCode.IgnoredByUrlHandlingStrategy */));
4451
- this.router.rawUrlTree = t.rawUrl;
4632
+ this.events.next(new NavigationSkipped(t.id, router.serializeUrl(overallTransitionState.extractedUrl), reason, 1 /* NavigationSkippedCode.IgnoredByUrlHandlingStrategy */));
4633
+ router.rawUrlTree = t.rawUrl;
4452
4634
  t.resolve(null);
4453
4635
  return EMPTY;
4454
4636
  }
4455
4637
  }),
4456
4638
  // --- GUARDS ---
4457
4639
  tap(t => {
4458
- const guardsStart = new GuardsCheckStart(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4459
- this.router.triggerEvent(guardsStart);
4640
+ const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4641
+ this.events.next(guardsStart);
4460
4642
  }), map(t => {
4461
4643
  overallTransitionState = {
4462
4644
  ...t,
4463
- guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.router.rootContexts)
4645
+ guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)
4464
4646
  };
4465
4647
  return overallTransitionState;
4466
- }), checkGuards(this.router.ngModule.injector, (evt) => this.router.triggerEvent(evt)), tap(t => {
4648
+ }), checkGuards(this.environmentInjector, (evt) => this.events.next(evt)), tap(t => {
4467
4649
  overallTransitionState.guardsResult = t.guardsResult;
4468
4650
  if (isUrlTree(t.guardsResult)) {
4469
- throw redirectingNavigationError(this.router.urlSerializer, t.guardsResult);
4651
+ throw redirectingNavigationError(this.urlSerializer, t.guardsResult);
4470
4652
  }
4471
- const guardsEnd = new GuardsCheckEnd(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);
4472
- this.router.triggerEvent(guardsEnd);
4653
+ const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);
4654
+ this.events.next(guardsEnd);
4473
4655
  }), filter(t => {
4474
4656
  if (!t.guardsResult) {
4475
- this.router.restoreHistory(t);
4476
- this.router.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */);
4657
+ router.restoreHistory(t);
4658
+ this.cancelNavigationTransition(t, '', 3 /* NavigationCancellationCode.GuardRejected */, router);
4477
4659
  return false;
4478
4660
  }
4479
4661
  return true;
@@ -4482,24 +4664,24 @@ class NavigationTransitions {
4482
4664
  switchTap(t => {
4483
4665
  if (t.guards.canActivateChecks.length) {
4484
4666
  return of(t).pipe(tap(t => {
4485
- const resolveStart = new ResolveStart(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4486
- this.router.triggerEvent(resolveStart);
4667
+ const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4668
+ this.events.next(resolveStart);
4487
4669
  }), switchMap(t => {
4488
4670
  let dataResolved = false;
4489
- return of(t).pipe(resolveData(this.router.paramsInheritanceStrategy, this.router.ngModule.injector), tap({
4671
+ return of(t).pipe(resolveData(router.paramsInheritanceStrategy, this.environmentInjector), tap({
4490
4672
  next: () => dataResolved = true,
4491
4673
  complete: () => {
4492
4674
  if (!dataResolved) {
4493
- this.router.restoreHistory(t);
4494
- this.router.cancelNavigationTransition(t, NG_DEV_MODE$5 ?
4675
+ router.restoreHistory(t);
4676
+ this.cancelNavigationTransition(t, NG_DEV_MODE$4 ?
4495
4677
  `At least one route resolver didn't emit any value.` :
4496
- '', 2 /* NavigationCancellationCode.NoDataFromResolver */);
4678
+ '', 2 /* NavigationCancellationCode.NoDataFromResolver */, router);
4497
4679
  }
4498
4680
  }
4499
4681
  }));
4500
4682
  }), tap(t => {
4501
- const resolveEnd = new ResolveEnd(t.id, this.router.serializeUrl(t.extractedUrl), this.router.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
4502
- this.router.triggerEvent(resolveEnd);
4683
+ const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4684
+ this.events.next(resolveEnd);
4503
4685
  }));
4504
4686
  }
4505
4687
  return undefined;
@@ -4510,7 +4692,7 @@ class NavigationTransitions {
4510
4692
  const loaders = [];
4511
4693
  if (route.routeConfig?.loadComponent &&
4512
4694
  !route.routeConfig._loadedComponent) {
4513
- loaders.push(this.router.configLoader.loadComponent(route.routeConfig)
4695
+ loaders.push(this.configLoader.loadComponent(route.routeConfig)
4514
4696
  .pipe(tap(loadedComponent => {
4515
4697
  route.component = loadedComponent;
4516
4698
  }), map(() => void 0)));
@@ -4522,8 +4704,8 @@ class NavigationTransitions {
4522
4704
  };
4523
4705
  return combineLatest(loadComponents(t.targetSnapshot.root))
4524
4706
  .pipe(defaultIfEmpty(), take(1));
4525
- }), switchTap(() => this.router.afterPreactivation()), map((t) => {
4526
- const targetRouterState = createRouterState(this.router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
4707
+ }), switchTap(() => router.afterPreactivation()), map((t) => {
4708
+ const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
4527
4709
  overallTransitionState = { ...t, targetRouterState };
4528
4710
  return (overallTransitionState);
4529
4711
  }),
@@ -4533,21 +4715,27 @@ class NavigationTransitions {
4533
4715
  the current URL and the RouterState, as well as updated the browser URL.
4534
4716
  All this should happen *before* activating. */
4535
4717
  tap((t) => {
4536
- this.router.currentUrlTree = t.urlAfterRedirects;
4537
- this.router.rawUrlTree = this.router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4538
- this.router.routerState =
4718
+ router.currentUrlTree = t.urlAfterRedirects;
4719
+ router.rawUrlTree =
4720
+ router.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);
4721
+ router.routerState =
4539
4722
  t.targetRouterState;
4540
- if (this.router.urlUpdateStrategy === 'deferred') {
4723
+ if (router.urlUpdateStrategy === 'deferred') {
4541
4724
  if (!t.extras.skipLocationChange) {
4542
- this.router.setBrowserUrl(this.router.rawUrlTree, t);
4725
+ router.setBrowserUrl(router.rawUrlTree, t);
4543
4726
  }
4544
- this.router.browserUrlTree = t.urlAfterRedirects;
4727
+ router.browserUrlTree = t.urlAfterRedirects;
4545
4728
  }
4546
- }), activateRoutes(this.router.rootContexts, this.router.routeReuseStrategy, (evt) => this.router.triggerEvent(evt)), tap({
4547
- next() {
4729
+ }), activateRoutes(this.rootContexts, router.routeReuseStrategy, (evt) => this.events.next(evt)), tap({
4730
+ next: (t) => {
4548
4731
  completed = true;
4732
+ this.lastSuccessfulNavigation = this.currentNavigation;
4733
+ router.navigated = true;
4734
+ this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(router.currentUrlTree)));
4735
+ router.titleStrategy?.updateTitle(t.targetRouterState.snapshot);
4736
+ t.resolve(true);
4549
4737
  },
4550
- complete() {
4738
+ complete: () => {
4551
4739
  completed = true;
4552
4740
  }
4553
4741
  }), finalize(() => {
@@ -4558,11 +4746,11 @@ class NavigationTransitions {
4558
4746
  * catch-all to make sure the NavigationCancel event is fired when a
4559
4747
  * navigation gets cancelled but not caught by other means. */
4560
4748
  if (!completed && !errored) {
4561
- const cancelationReason = NG_DEV_MODE$5 ?
4749
+ const cancelationReason = NG_DEV_MODE$4 ?
4562
4750
  `Navigation ID ${overallTransitionState
4563
- .id} is not equal to the current navigation id ${this.router.navigationId}` :
4751
+ .id} is not equal to the current navigation id ${this.navigationId}` :
4564
4752
  '';
4565
- this.router.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);
4753
+ this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */, router);
4566
4754
  }
4567
4755
  // Only clear current navigation if it is still set to the one that
4568
4756
  // finalized.
@@ -4581,28 +4769,28 @@ class NavigationTransitions {
4581
4769
  // navigate. This is only applicable with initial navigation, so
4582
4770
  // setting `navigated` only when not redirecting resolves this
4583
4771
  // scenario.
4584
- this.router.navigated = true;
4585
- this.router.restoreHistory(overallTransitionState, true);
4772
+ router.navigated = true;
4773
+ router.restoreHistory(overallTransitionState, true);
4586
4774
  }
4587
- const navCancel = new NavigationCancel(overallTransitionState.id, this.router.serializeUrl(overallTransitionState.extractedUrl), e.message, e.cancellationCode);
4588
- eventsSubject.next(navCancel);
4775
+ const navCancel = new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode);
4776
+ this.events.next(navCancel);
4589
4777
  // When redirecting, we need to delay resolving the navigation
4590
4778
  // promise and push it to the redirect navigation
4591
4779
  if (!isRedirectingNavigationCancelingError$1(e)) {
4592
4780
  overallTransitionState.resolve(false);
4593
4781
  }
4594
4782
  else {
4595
- const mergedTree = this.router.urlHandlingStrategy.merge(e.url, this.router.rawUrlTree);
4783
+ const mergedTree = router.urlHandlingStrategy.merge(e.url, router.rawUrlTree);
4596
4784
  const extras = {
4597
4785
  skipLocationChange: overallTransitionState.extras.skipLocationChange,
4598
4786
  // The URL is already updated at this point if we have 'eager' URL
4599
4787
  // updates or if the navigation was triggered by the browser (back
4600
4788
  // button, URL bar, etc). We want to replace that item in history
4601
4789
  // if the navigation is rejected.
4602
- replaceUrl: this.router.urlUpdateStrategy === 'eager' ||
4790
+ replaceUrl: router.urlUpdateStrategy === 'eager' ||
4603
4791
  isBrowserTriggeredNavigation(overallTransitionState.source)
4604
4792
  };
4605
- this.router.scheduleNavigation(mergedTree, 'imperative', null, extras, {
4793
+ router.scheduleNavigation(mergedTree, 'imperative', null, extras, {
4606
4794
  resolve: overallTransitionState.resolve,
4607
4795
  reject: overallTransitionState.reject,
4608
4796
  promise: overallTransitionState.promise
@@ -4612,11 +4800,11 @@ class NavigationTransitions {
4612
4800
  * to the pre-error state. */
4613
4801
  }
4614
4802
  else {
4615
- this.router.restoreHistory(overallTransitionState, true);
4616
- const navError = new NavigationError(overallTransitionState.id, this.router.serializeUrl(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);
4617
- eventsSubject.next(navError);
4803
+ router.restoreHistory(overallTransitionState, true);
4804
+ const navError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);
4805
+ this.events.next(navError);
4618
4806
  try {
4619
- overallTransitionState.resolve(this.router.errorHandler(e));
4807
+ overallTransitionState.resolve(router.errorHandler(e));
4620
4808
  }
4621
4809
  catch (ee) {
4622
4810
  overallTransitionState.reject(ee);
@@ -4627,7 +4815,18 @@ class NavigationTransitions {
4627
4815
  // TODO(jasonaden): remove cast once g3 is on updated TypeScript
4628
4816
  }));
4629
4817
  }
4818
+ cancelNavigationTransition(t, reason, code, router) {
4819
+ const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);
4820
+ this.events.next(navCancel);
4821
+ t.resolve(false);
4822
+ }
4630
4823
  }
4824
+ NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4825
+ NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
4826
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NavigationTransitions, decorators: [{
4827
+ type: Injectable,
4828
+ args: [{ providedIn: 'root' }]
4829
+ }], ctorParameters: function () { return []; } });
4631
4830
  function isBrowserTriggeredNavigation(source) {
4632
4831
  return source !== 'imperative';
4633
4832
  }
@@ -4683,9 +4882,9 @@ class TitleStrategy {
4683
4882
  return snapshot.data[RouteTitleKey];
4684
4883
  }
4685
4884
  }
4686
- TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4687
- TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: TitleStrategy, decorators: [{
4885
+ TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4886
+ TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: TitleStrategy, decorators: [{
4689
4888
  type: Injectable,
4690
4889
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4691
4890
  }] });
@@ -4709,9 +4908,9 @@ class DefaultTitleStrategy extends TitleStrategy {
4709
4908
  }
4710
4909
  }
4711
4910
  }
4712
- DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4713
- DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4714
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4911
+ DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4912
+ DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4715
4914
  type: Injectable,
4716
4915
  args: [{ providedIn: 'root' }]
4717
4916
  }], ctorParameters: function () { return [{ type: i1.Title }]; } });
@@ -4732,9 +4931,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0",
4732
4931
  */
4733
4932
  class RouteReuseStrategy {
4734
4933
  }
4735
- RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4736
- RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
4737
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4934
+ RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4935
+ RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
4936
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouteReuseStrategy, decorators: [{
4738
4937
  type: Injectable,
4739
4938
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
4740
4939
  }] });
@@ -4786,9 +4985,9 @@ class BaseRouteReuseStrategy {
4786
4985
  }
4787
4986
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
4788
4987
  }
4789
- DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4790
- DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
4791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
4988
+ DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
4989
+ DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
4990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
4792
4991
  type: Injectable,
4793
4992
  args: [{ providedIn: 'root' }]
4794
4993
  }] });
@@ -4800,157 +4999,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0",
4800
4999
  * Use of this source code is governed by an MIT-style license that can be
4801
5000
  * found in the LICENSE file at https://angular.io/license
4802
5001
  */
4803
- const NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || !!ngDevMode;
5002
+ const NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4804
5003
  /**
4805
5004
  * A [DI token](guide/glossary/#di-token) for the router service.
4806
5005
  *
4807
5006
  * @publicApi
4808
5007
  */
4809
- const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$4 ? 'router config' : '', {
5008
+ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config' : '', {
4810
5009
  providedIn: 'root',
4811
5010
  factory: () => ({}),
4812
5011
  });
4813
5012
 
4814
- /**
4815
- * @license
4816
- * Copyright Google LLC All Rights Reserved.
4817
- *
4818
- * Use of this source code is governed by an MIT-style license that can be
4819
- * found in the LICENSE file at https://angular.io/license
4820
- */
4821
- function deprecatedLoadChildrenString(injector, loadChildren) {
4822
- return null;
4823
- }
4824
-
4825
- /**
4826
- * @license
4827
- * Copyright Google LLC All Rights Reserved.
4828
- *
4829
- * Use of this source code is governed by an MIT-style license that can be
4830
- * found in the LICENSE file at https://angular.io/license
4831
- */
4832
- const NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;
4833
- /**
4834
- * The [DI token](guide/glossary/#di-token) for a router configuration.
4835
- *
4836
- * `ROUTES` is a low level API for router configuration via dependency injection.
4837
- *
4838
- * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,
4839
- * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.
4840
- *
4841
- * @publicApi
4842
- */
4843
- const ROUTES = new InjectionToken('ROUTES');
4844
- class RouterConfigLoader {
4845
- constructor(injector, compiler) {
4846
- this.injector = injector;
4847
- this.compiler = compiler;
4848
- this.componentLoaders = new WeakMap();
4849
- this.childrenLoaders = new WeakMap();
4850
- }
4851
- loadComponent(route) {
4852
- if (this.componentLoaders.get(route)) {
4853
- return this.componentLoaders.get(route);
4854
- }
4855
- else if (route._loadedComponent) {
4856
- return of(route._loadedComponent);
4857
- }
4858
- if (this.onLoadStartListener) {
4859
- this.onLoadStartListener(route);
4860
- }
4861
- const loadRunner = wrapIntoObservable(route.loadComponent())
4862
- .pipe(map(maybeUnwrapDefaultExport), tap(component => {
4863
- if (this.onLoadEndListener) {
4864
- this.onLoadEndListener(route);
4865
- }
4866
- NG_DEV_MODE$3 && assertStandalone(route.path ?? '', component);
4867
- route._loadedComponent = component;
4868
- }), finalize(() => {
4869
- this.componentLoaders.delete(route);
4870
- }));
4871
- // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
4872
- const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());
4873
- this.componentLoaders.set(route, loader);
4874
- return loader;
4875
- }
4876
- loadChildren(parentInjector, route) {
4877
- if (this.childrenLoaders.get(route)) {
4878
- return this.childrenLoaders.get(route);
4879
- }
4880
- else if (route._loadedRoutes) {
4881
- return of({ routes: route._loadedRoutes, injector: route._loadedInjector });
4882
- }
4883
- if (this.onLoadStartListener) {
4884
- this.onLoadStartListener(route);
4885
- }
4886
- const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);
4887
- const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {
4888
- if (this.onLoadEndListener) {
4889
- this.onLoadEndListener(route);
4890
- }
4891
- // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no
4892
- // injector associated with lazy loading a `Route` array.
4893
- let injector;
4894
- let rawRoutes;
4895
- let requireStandaloneComponents = false;
4896
- if (Array.isArray(factoryOrRoutes)) {
4897
- rawRoutes = factoryOrRoutes;
4898
- requireStandaloneComponents = true;
4899
- }
4900
- else {
4901
- injector = factoryOrRoutes.create(parentInjector).injector;
4902
- // When loading a module that doesn't provide `RouterModule.forChild()` preloader
4903
- // will get stuck in an infinite loop. The child module's Injector will look to
4904
- // its parent `Injector` when it doesn't find any ROUTES so it will return routes
4905
- // for it's parent module instead.
4906
- rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));
4907
- }
4908
- const routes = rawRoutes.map(standardizeConfig);
4909
- NG_DEV_MODE$3 && validateConfig(routes, route.path, requireStandaloneComponents);
4910
- return { routes, injector };
4911
- }), finalize(() => {
4912
- this.childrenLoaders.delete(route);
4913
- }));
4914
- // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
4915
- const loader = new ConnectableObservable(loadRunner, () => new Subject())
4916
- .pipe(refCount());
4917
- this.childrenLoaders.set(route, loader);
4918
- return loader;
4919
- }
4920
- loadModuleFactoryOrRoutes(loadChildren) {
4921
- const deprecatedResult = deprecatedLoadChildrenString(this.injector, loadChildren);
4922
- if (deprecatedResult) {
4923
- return deprecatedResult;
4924
- }
4925
- return wrapIntoObservable(loadChildren())
4926
- .pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {
4927
- if (t instanceof NgModuleFactory || Array.isArray(t)) {
4928
- return of(t);
4929
- }
4930
- else {
4931
- return from(this.compiler.compileModuleAsync(t));
4932
- }
4933
- }));
4934
- }
4935
- }
4936
- RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
4937
- RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4938
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
4939
- type: Injectable,
4940
- args: [{ providedIn: 'root' }]
4941
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
4942
- function isWrappedDefaultExport(value) {
4943
- // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be
4944
- // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that
4945
- // `default` will be a renamed property.
4946
- return value && typeof value === 'object' && 'default' in value;
4947
- }
4948
- function maybeUnwrapDefaultExport(input) {
4949
- // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not
4950
- // subject to property renaming, so we reference it with bracket access.
4951
- return isWrappedDefaultExport(input) ? input['default'] : input;
4952
- }
4953
-
4954
5013
  /**
4955
5014
  * @license
4956
5015
  * Copyright Google LLC All Rights Reserved.
@@ -4967,9 +5026,9 @@ function maybeUnwrapDefaultExport(input) {
4967
5026
  */
4968
5027
  class UrlHandlingStrategy {
4969
5028
  }
4970
- UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4971
- UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
4972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
5029
+ UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5030
+ UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
5031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
4973
5032
  type: Injectable,
4974
5033
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
4975
5034
  }] });
@@ -4987,9 +5046,9 @@ class DefaultUrlHandlingStrategy {
4987
5046
  return newUrlPart;
4988
5047
  }
4989
5048
  }
4990
- DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4991
- DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
4992
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
5049
+ DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5050
+ DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
5051
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
4993
5052
  type: Injectable,
4994
5053
  args: [{ providedIn: 'root' }]
4995
5054
  }] });
@@ -5079,23 +5138,13 @@ class Router {
5079
5138
  // TODO: vsavkin make internal after the final is out.
5080
5139
  constructor(
5081
5140
  /** @internal */
5082
- rootComponentType,
5083
- /** @internal */
5084
- urlSerializer,
5085
- /** @internal */
5086
- rootContexts,
5087
- /** @internal */
5088
- location, injector, compiler, config) {
5141
+ rootComponentType, urlSerializer, rootContexts, location, injector, compiler, config) {
5089
5142
  this.rootComponentType = rootComponentType;
5090
5143
  this.urlSerializer = urlSerializer;
5091
5144
  this.rootContexts = rootContexts;
5092
5145
  this.location = location;
5093
5146
  this.config = config;
5094
- /** @internal */
5095
- this.lastSuccessfulNavigation = null;
5096
5147
  this.disposed = false;
5097
- /** @internal */
5098
- this.navigationId = 0;
5099
5148
  /**
5100
5149
  * The id of the currently active page in the router.
5101
5150
  * Updated to the transition's target id on a successful navigation.
@@ -5106,10 +5155,6 @@ class Router {
5106
5155
  */
5107
5156
  this.currentPageId = 0;
5108
5157
  this.isNgZoneEnabled = false;
5109
- /**
5110
- * An event stream for routing events in this NgModule.
5111
- */
5112
- this.events = new Subject();
5113
5158
  /**
5114
5159
  * A handler for navigation errors in this NgModule.
5115
5160
  *
@@ -5163,17 +5208,8 @@ class Router {
5163
5208
  */
5164
5209
  this.titleStrategy = inject(TitleStrategy);
5165
5210
  /**
5166
- * How to handle a navigation request to the current URL. One of:
5211
+ * How to handle a navigation request to the current URL.
5167
5212
  *
5168
- * - `'ignore'` : The router ignores the request.
5169
- * - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
5170
- *
5171
- * Note that this only configures whether the Route reprocesses the URL and triggers related
5172
- * action and events like redirects, guards, and resolvers. By default, the router re-uses a
5173
- * component instance when it re-navigates to the same component type without visiting a different
5174
- * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload
5175
- * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`
5176
- * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.
5177
5213
  *
5178
5214
  * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.
5179
5215
  * @see `withRouterConfig`
@@ -5236,13 +5272,7 @@ class Router {
5236
5272
  * @see `RouterModule`
5237
5273
  */
5238
5274
  this.canceledNavigationResolution = 'replace';
5239
- this.navigationTransitions = new NavigationTransitions(this);
5240
- const onLoadStart = (r) => this.triggerEvent(new RouteConfigLoadStart(r));
5241
- const onLoadEnd = (r) => this.triggerEvent(new RouteConfigLoadEnd(r));
5242
- this.configLoader = injector.get(RouterConfigLoader);
5243
- this.configLoader.onLoadEndListener = onLoadEnd;
5244
- this.configLoader.onLoadStartListener = onLoadStart;
5245
- this.ngModule = injector.get(NgModuleRef);
5275
+ this.navigationTransitions = inject(NavigationTransitions);
5246
5276
  this.console = injector.get(ɵConsole);
5247
5277
  const ngZone = injector.get(NgZone);
5248
5278
  this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();
@@ -5251,28 +5281,17 @@ class Router {
5251
5281
  this.rawUrlTree = this.currentUrlTree;
5252
5282
  this.browserUrlTree = this.currentUrlTree;
5253
5283
  this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);
5254
- this.transitions = new BehaviorSubject({
5255
- id: 0,
5256
- targetPageId: 0,
5257
- currentUrlTree: this.currentUrlTree,
5258
- extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),
5259
- urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),
5260
- rawUrl: this.currentUrlTree,
5261
- extras: {},
5262
- resolve: null,
5263
- reject: null,
5264
- promise: Promise.resolve(true),
5265
- source: 'imperative',
5266
- restoredState: null,
5267
- currentSnapshot: this.routerState.snapshot,
5268
- targetSnapshot: null,
5269
- currentRouterState: this.routerState,
5270
- targetRouterState: null,
5271
- guards: { canActivateChecks: [], canDeactivateChecks: [] },
5272
- guardsResult: null,
5284
+ this.navigationTransitions.setupNavigations(this).subscribe(t => {
5285
+ this.lastSuccessfulId = t.id;
5286
+ this.currentPageId = t.targetPageId;
5287
+ }, e => {
5288
+ this.console.warn(`Unhandled Navigation Error: ${e}`);
5273
5289
  });
5274
- this.navigations = this.navigationTransitions.setupNavigations(this.transitions);
5275
- this.processNavigations();
5290
+ }
5291
+ // TODO(b/260747083): This should not exist and navigationId should be private in
5292
+ // `NavigationTransitions`
5293
+ get navigationId() {
5294
+ return this.navigationTransitions.navigationId;
5276
5295
  }
5277
5296
  /**
5278
5297
  * The ɵrouterPageId of whatever page is currently active in the browser history. This is
@@ -5282,6 +5301,16 @@ class Router {
5282
5301
  get browserPageId() {
5283
5302
  return this.location.getState()?.ɵrouterPageId;
5284
5303
  }
5304
+ /**
5305
+ * An event stream for routing events.
5306
+ */
5307
+ get events() {
5308
+ // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal
5309
+ // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't
5310
+ // allowed/supported but we still have to fix these or file bugs against the teams before making
5311
+ // the change.
5312
+ return this.navigationTransitions.events;
5313
+ }
5285
5314
  /**
5286
5315
  * @internal
5287
5316
  * TODO: this should be removed once the constructor of the router made internal
@@ -5292,15 +5321,12 @@ class Router {
5292
5321
  // this will simplify the lifecycle of the router.
5293
5322
  this.routerState.root.component = this.rootComponentType;
5294
5323
  }
5295
- setTransition(t) {
5296
- this.transitions.next({ ...this.transitions.value, ...t });
5297
- }
5298
5324
  /**
5299
5325
  * Sets up the location change listener and performs the initial navigation.
5300
5326
  */
5301
5327
  initialNavigation() {
5302
5328
  this.setUpLocationChangeListener();
5303
- if (this.navigationId === 0) {
5329
+ if (!this.navigationTransitions.hasRequestedNavigation) {
5304
5330
  this.navigateByUrl(this.location.path(true), { replaceUrl: true });
5305
5331
  }
5306
5332
  }
@@ -5357,10 +5383,6 @@ class Router {
5357
5383
  getCurrentNavigation() {
5358
5384
  return this.navigationTransitions.currentNavigation;
5359
5385
  }
5360
- /** @internal */
5361
- triggerEvent(event) {
5362
- this.events.next(event);
5363
- }
5364
5386
  /**
5365
5387
  * Resets the route configuration used for navigation and generating links.
5366
5388
  *
@@ -5389,7 +5411,7 @@ class Router {
5389
5411
  }
5390
5412
  /** Disposes of the router. */
5391
5413
  dispose() {
5392
- this.transitions.complete();
5414
+ this.navigationTransitions.complete();
5393
5415
  if (this.locationSubscription) {
5394
5416
  this.locationSubscription.unsubscribe();
5395
5417
  this.locationSubscription = undefined;
@@ -5574,20 +5596,6 @@ class Router {
5574
5596
  return result;
5575
5597
  }, {});
5576
5598
  }
5577
- processNavigations() {
5578
- this.navigations.subscribe(t => {
5579
- this.navigated = true;
5580
- this.lastSuccessfulId = t.id;
5581
- this.currentPageId = t.targetPageId;
5582
- this.events
5583
- .next(new NavigationEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));
5584
- this.lastSuccessfulNavigation = this.getCurrentNavigation();
5585
- this.titleStrategy?.updateTitle(this.routerState.snapshot);
5586
- t.resolve(true);
5587
- }, e => {
5588
- this.console.warn(`Unhandled Navigation Error: ${e}`);
5589
- });
5590
- }
5591
5599
  /** @internal */
5592
5600
  scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {
5593
5601
  if (this.disposed) {
@@ -5607,7 +5615,6 @@ class Router {
5607
5615
  reject = rej;
5608
5616
  });
5609
5617
  }
5610
- const id = ++this.navigationId;
5611
5618
  let targetPageId;
5612
5619
  if (this.canceledNavigationResolution === 'computed') {
5613
5620
  const isInitialPage = this.currentPageId === 0;
@@ -5635,12 +5642,12 @@ class Router {
5635
5642
  // This is unused when `canceledNavigationResolution` is not computed.
5636
5643
  targetPageId = 0;
5637
5644
  }
5638
- this.setTransition({
5639
- id,
5645
+ this.navigationTransitions.handleNavigationRequest({
5640
5646
  targetPageId,
5641
5647
  source,
5642
5648
  restoredState,
5643
5649
  currentUrlTree: this.currentUrlTree,
5650
+ currentRawUrl: this.currentUrlTree,
5644
5651
  rawUrl,
5645
5652
  extras,
5646
5653
  resolve,
@@ -5727,12 +5734,6 @@ class Router {
5727
5734
  resetUrlToCurrentUrlTree() {
5728
5735
  this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));
5729
5736
  }
5730
- /** @internal */
5731
- cancelNavigationTransition(transition, reason, code) {
5732
- const navCancel = new NavigationCancel(transition.id, this.serializeUrl(transition.extractedUrl), reason, code);
5733
- this.triggerEvent(navCancel);
5734
- transition.resolve(false);
5735
- }
5736
5737
  generateNgRouterState(navigationId, routerPageId) {
5737
5738
  if (this.canceledNavigationResolution === 'computed') {
5738
5739
  return { navigationId, ɵrouterPageId: routerPageId };
@@ -5740,9 +5741,9 @@ class Router {
5740
5741
  return { navigationId };
5741
5742
  }
5742
5743
  }
5743
- Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5744
- Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: Router, decorators: [{
5744
+ Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
5745
+ Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: Router, providedIn: 'root', useFactory: setupRouter });
5746
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: Router, decorators: [{
5746
5747
  type: Injectable,
5747
5748
  args: [{
5748
5749
  providedIn: 'root',
@@ -6038,9 +6039,9 @@ class RouterLink {
6038
6039
  });
6039
6040
  }
6040
6041
  }
6041
- RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
6042
- RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.0", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
6043
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterLink, decorators: [{
6042
+ RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
6043
+ RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.1", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
6044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLink, decorators: [{
6044
6045
  type: Directive,
6045
6046
  args: [{
6046
6047
  selector: '[routerLink]',
@@ -6265,9 +6266,9 @@ class RouterLinkActive {
6265
6266
  return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
6266
6267
  }
6267
6268
  }
6268
- RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6269
- RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.0", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterLinkActive, decorators: [{
6269
+ RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6270
+ RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.1", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterLinkActive, decorators: [{
6271
6272
  type: Directive,
6272
6273
  args: [{
6273
6274
  selector: '[routerLinkActive]',
@@ -6327,9 +6328,9 @@ class PreloadAllModules {
6327
6328
  return fn().pipe(catchError(() => of(null)));
6328
6329
  }
6329
6330
  }
6330
- PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6331
- PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: PreloadAllModules, decorators: [{
6331
+ PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6332
+ PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: PreloadAllModules, decorators: [{
6333
6334
  type: Injectable,
6334
6335
  args: [{ providedIn: 'root' }]
6335
6336
  }] });
@@ -6347,9 +6348,9 @@ class NoPreloading {
6347
6348
  return of(null);
6348
6349
  }
6349
6350
  }
6350
- NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6351
- NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: NoPreloading, decorators: [{
6351
+ NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6352
+ NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: NoPreloading, decorators: [{
6353
6354
  type: Injectable,
6354
6355
  args: [{ providedIn: 'root' }]
6355
6356
  }] });
@@ -6443,9 +6444,9 @@ class RouterPreloader {
6443
6444
  });
6444
6445
  }
6445
6446
  }
6446
- RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6447
- RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6448
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterPreloader, decorators: [{
6447
+ RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6448
+ RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterPreloader, decorators: [{
6449
6450
  type: Injectable,
6450
6451
  args: [{ providedIn: 'root' }]
6451
6452
  }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
@@ -6459,9 +6460,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0",
6459
6460
  */
6460
6461
  const ROUTER_SCROLLER = new InjectionToken('');
6461
6462
  class RouterScroller {
6462
- constructor(router,
6463
- /** @docsNotRequired */ viewportScroller, zone, options = {}) {
6464
- this.router = router;
6463
+ /** @nodoc */
6464
+ constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {
6465
+ this.urlSerializer = urlSerializer;
6466
+ this.transitions = transitions;
6465
6467
  this.viewportScroller = viewportScroller;
6466
6468
  this.zone = zone;
6467
6469
  this.options = options;
@@ -6484,7 +6486,7 @@ class RouterScroller {
6484
6486
  this.scrollEventsSubscription = this.consumeScrollEvents();
6485
6487
  }
6486
6488
  createScrollEvents() {
6487
- return this.router.events.subscribe(e => {
6489
+ return this.transitions.events.subscribe(e => {
6488
6490
  if (e instanceof NavigationStart) {
6489
6491
  // store the scroll position of the current stable navigations.
6490
6492
  this.store[this.lastId] = this.viewportScroller.getScrollPosition();
@@ -6493,12 +6495,12 @@ class RouterScroller {
6493
6495
  }
6494
6496
  else if (e instanceof NavigationEnd) {
6495
6497
  this.lastId = e.id;
6496
- this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);
6498
+ this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);
6497
6499
  }
6498
6500
  });
6499
6501
  }
6500
6502
  consumeScrollEvents() {
6501
- return this.router.events.subscribe(e => {
6503
+ return this.transitions.events.subscribe(e => {
6502
6504
  if (!(e instanceof Scroll))
6503
6505
  return;
6504
6506
  // a popstate event. The pop state event will always ignore anchor scrolling.
@@ -6528,26 +6530,22 @@ class RouterScroller {
6528
6530
  // component by executing its update block of the template function.
6529
6531
  setTimeout(() => {
6530
6532
  this.zone.run(() => {
6531
- this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));
6533
+ this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));
6532
6534
  });
6533
6535
  }, 0);
6534
6536
  });
6535
6537
  }
6536
6538
  /** @nodoc */
6537
6539
  ngOnDestroy() {
6538
- if (this.routerEventsSubscription) {
6539
- this.routerEventsSubscription.unsubscribe();
6540
- }
6541
- if (this.scrollEventsSubscription) {
6542
- this.scrollEventsSubscription.unsubscribe();
6543
- }
6540
+ this.routerEventsSubscription?.unsubscribe();
6541
+ this.scrollEventsSubscription?.unsubscribe();
6544
6542
  }
6545
6543
  }
6546
- RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6547
- RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterScroller });
6548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterScroller, decorators: [{
6544
+ RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6545
+ RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterScroller });
6546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterScroller, decorators: [{
6549
6547
  type: Injectable
6550
- }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
6548
+ }], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
6551
6549
 
6552
6550
  /**
6553
6551
  * @license
@@ -6684,10 +6682,11 @@ function withInMemoryScrolling(options = {}) {
6684
6682
  const providers = [{
6685
6683
  provide: ROUTER_SCROLLER,
6686
6684
  useFactory: () => {
6687
- const router = inject(Router);
6688
6685
  const viewportScroller = inject(ViewportScroller);
6689
6686
  const zone = inject(NgZone);
6690
- return new RouterScroller(router, viewportScroller, zone, options);
6687
+ const transitions = inject(NavigationTransitions);
6688
+ const urlSerializer = inject(UrlSerializer);
6689
+ return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);
6691
6690
  },
6692
6691
  }];
6693
6692
  return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);
@@ -7087,10 +7086,10 @@ class RouterModule {
7087
7086
  };
7088
7087
  }
7089
7088
  }
7090
- RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7091
- RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7092
- RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7093
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.0", ngImport: i0, type: RouterModule, decorators: [{
7089
+ RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
7090
+ RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7091
+ RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
7092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.1", ngImport: i0, type: RouterModule, decorators: [{
7094
7093
  type: NgModule,
7095
7094
  args: [{
7096
7095
  imports: ROUTER_DIRECTIVES,
@@ -7110,14 +7109,15 @@ function provideRouterScroller() {
7110
7109
  return {
7111
7110
  provide: ROUTER_SCROLLER,
7112
7111
  useFactory: () => {
7113
- const router = inject(Router);
7114
7112
  const viewportScroller = inject(ViewportScroller);
7115
7113
  const zone = inject(NgZone);
7116
7114
  const config = inject(ROUTER_CONFIGURATION);
7115
+ const transitions = inject(NavigationTransitions);
7116
+ const urlSerializer = inject(UrlSerializer);
7117
7117
  if (config.scrollOffset) {
7118
7118
  viewportScroller.setOffset(config.scrollOffset);
7119
7119
  }
7120
- return new RouterScroller(router, viewportScroller, zone, config);
7120
+ return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);
7121
7121
  },
7122
7122
  };
7123
7123
  }
@@ -7175,7 +7175,7 @@ function provideRouterInitializer() {
7175
7175
  /**
7176
7176
  * @publicApi
7177
7177
  */
7178
- const VERSION = new Version('15.1.0-next.0');
7178
+ const VERSION = new Version('15.1.0-next.1');
7179
7179
 
7180
7180
  /**
7181
7181
  * @license