@angular/core 18.0.0-next.4 → 18.0.0-next.6

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 (94) hide show
  1. package/esm2022/primitives/event-dispatch/contract_binary.mjs +10 -0
  2. package/esm2022/primitives/event-dispatch/index.mjs +13 -0
  3. package/esm2022/primitives/event-dispatch/src/a11y_click.mjs +54 -0
  4. package/esm2022/primitives/event-dispatch/src/accessibility.mjs +35 -0
  5. package/esm2022/primitives/event-dispatch/src/attribute.mjs +72 -0
  6. package/esm2022/primitives/event-dispatch/src/base_dispatcher.mjs +196 -0
  7. package/esm2022/primitives/event-dispatch/src/cache.mjs +95 -0
  8. package/esm2022/primitives/event-dispatch/src/char.mjs +35 -0
  9. package/esm2022/primitives/event-dispatch/src/custom_events.mjs +63 -0
  10. package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +254 -0
  11. package/esm2022/primitives/event-dispatch/src/dom.mjs +48 -0
  12. package/esm2022/primitives/event-dispatch/src/earlyeventcontract.mjs +36 -0
  13. package/esm2022/primitives/event-dispatch/src/event.mjs +638 -0
  14. package/esm2022/primitives/event-dispatch/src/event_contract_container.mjs +63 -0
  15. package/esm2022/primitives/event-dispatch/src/event_contract_defines.mjs +48 -0
  16. package/esm2022/primitives/event-dispatch/src/event_contract_multi_container.mjs +192 -0
  17. package/esm2022/primitives/event-dispatch/src/event_handler.mjs +9 -0
  18. package/esm2022/primitives/event-dispatch/src/event_info.mjs +199 -0
  19. package/esm2022/primitives/event-dispatch/src/event_type.mjs +244 -0
  20. package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +675 -0
  21. package/esm2022/primitives/event-dispatch/src/key_code.mjs +21 -0
  22. package/esm2022/primitives/event-dispatch/src/legacy_dispatcher.mjs +9 -0
  23. package/esm2022/primitives/event-dispatch/src/property.mjs +35 -0
  24. package/esm2022/primitives/event-dispatch/src/register_events.mjs +32 -0
  25. package/esm2022/primitives/event-dispatch/src/replay.mjs +389 -0
  26. package/esm2022/primitives/event-dispatch/src/restriction.mjs +15 -0
  27. package/esm2022/primitives/signals/index.mjs +3 -3
  28. package/esm2022/primitives/signals/src/computed.mjs +5 -3
  29. package/esm2022/primitives/signals/src/graph.mjs +14 -9
  30. package/esm2022/primitives/signals/src/signal.mjs +2 -2
  31. package/esm2022/primitives/signals/src/watch.mjs +2 -2
  32. package/esm2022/src/application/application_ref.mjs +4 -2
  33. package/esm2022/src/change_detection/scheduling/flags.mjs +10 -0
  34. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +18 -33
  35. package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +1 -1
  36. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +111 -9
  37. package/esm2022/src/core.mjs +3 -1
  38. package/esm2022/src/core_private_export.mjs +2 -3
  39. package/esm2022/src/debug/debug_node.mjs +1 -1
  40. package/esm2022/src/defer/instructions.mjs +31 -8
  41. package/esm2022/src/di/host_tag_name_token.mjs +65 -0
  42. package/esm2022/src/di/index.mjs +2 -1
  43. package/esm2022/src/errors.mjs +1 -1
  44. package/esm2022/src/hydration/annotate.mjs +15 -1
  45. package/esm2022/src/hydration/event_replay.mjs +181 -0
  46. package/esm2022/src/hydration/tokens.mjs +6 -1
  47. package/esm2022/src/metadata/directives.mjs +1 -62
  48. package/esm2022/src/pending_tasks.mjs +54 -11
  49. package/esm2022/src/platform/platform_ref.mjs +3 -3
  50. package/esm2022/src/render3/component_ref.mjs +1 -1
  51. package/esm2022/src/render3/context_discovery.mjs +15 -1
  52. package/esm2022/src/render3/instructions/control_flow.mjs +55 -8
  53. package/esm2022/src/render3/list_reconciliation.mjs +41 -1
  54. package/esm2022/src/testability/testability.mjs +2 -30
  55. package/esm2022/src/util/callback_scheduler.mjs +14 -3
  56. package/esm2022/src/version.mjs +1 -1
  57. package/esm2022/src/zone/ng_zone.mjs +22 -6
  58. package/esm2022/testing/src/async.mjs +2 -10
  59. package/esm2022/testing/src/component_fixture.mjs +7 -12
  60. package/esm2022/testing/src/defer.mjs +1 -2
  61. package/esm2022/testing/src/logger.mjs +3 -3
  62. package/esm2022/testing/src/test_bed_common.mjs +1 -6
  63. package/esm2022/testing/src/testing.mjs +1 -2
  64. package/event-dispatch-contract.min.js +1 -0
  65. package/fesm2022/core.mjs +608 -174
  66. package/fesm2022/core.mjs.map +1 -1
  67. package/fesm2022/primitives/event-dispatch.mjs +3044 -0
  68. package/fesm2022/primitives/event-dispatch.mjs.map +1 -0
  69. package/fesm2022/primitives/signals.mjs +17 -10
  70. package/fesm2022/primitives/signals.mjs.map +1 -1
  71. package/fesm2022/rxjs-interop.mjs +1 -1
  72. package/fesm2022/testing.mjs +35 -54
  73. package/fesm2022/testing.mjs.map +1 -1
  74. package/index.d.ts +199 -115
  75. package/package.json +10 -1
  76. package/primitives/event-dispatch/index.d.ts +627 -0
  77. package/primitives/signals/index.d.ts +1 -1
  78. package/rxjs-interop/index.d.ts +1 -1
  79. package/schematics/migrations/{transfer-state → http-providers}/bundle.js +254 -68
  80. package/schematics/migrations/http-providers/bundle.js.map +7 -0
  81. package/schematics/migrations/invalid-two-way-bindings/bundle.js +690 -413
  82. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
  83. package/schematics/migrations.json +6 -16
  84. package/schematics/ng-generate/control-flow-migration/bundle.js +693 -417
  85. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  86. package/schematics/ng-generate/standalone-migration/bundle.js +1072 -735
  87. package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
  88. package/testing/index.d.ts +2 -15
  89. package/esm2022/testing/src/private_export.mjs +0 -9
  90. package/schematics/migrations/block-template-entities/bundle.js +0 -22853
  91. package/schematics/migrations/block-template-entities/bundle.js.map +0 -7
  92. package/schematics/migrations/compiler-options/bundle.js +0 -582
  93. package/schematics/migrations/compiler-options/bundle.js.map +0 -7
  94. package/schematics/migrations/transfer-state/bundle.js.map +0 -7
package/fesm2022/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7,6 +7,7 @@
7
7
  import { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1, createWatch as createWatch$1 } from '@angular/core/primitives/signals';
8
8
  import { Subject, Subscription, BehaviorSubject } from 'rxjs';
9
9
  import { map, first } from 'rxjs/operators';
10
+ import { Dispatcher, registerDispatcher } from '@angular/core/primitives/event-dispatch';
10
11
 
11
12
  /**
12
13
  * Base URL for the error details page.
@@ -6454,6 +6455,60 @@ class HostAttributeToken {
6454
6455
  }
6455
6456
  }
6456
6457
 
6458
+ /**
6459
+ * A token that can be used to inject the tag name of the host node.
6460
+ *
6461
+ * @usageNotes
6462
+ * ### Injecting a tag name that is known to exist
6463
+ * ```typescript
6464
+ * @Directive()
6465
+ * class MyDir {
6466
+ * tagName: string = inject(HOST_TAG_NAME);
6467
+ * }
6468
+ * ```
6469
+ *
6470
+ * ### Optionally injecting a tag name
6471
+ * ```typescript
6472
+ * @Directive()
6473
+ * class MyDir {
6474
+ * tagName: string | null = inject(HOST_TAG_NAME, {optional: true});
6475
+ * }
6476
+ * ```
6477
+ * @publicApi
6478
+ */
6479
+ const HOST_TAG_NAME = new InjectionToken(ngDevMode ? 'HOST_TAG_NAME' : '');
6480
+ // HOST_TAG_NAME should be resolved at the current node, similar to e.g. ElementRef,
6481
+ // so we manually specify __NG_ELEMENT_ID__ here, instead of using a factory.
6482
+ // tslint:disable-next-line:no-toplevel-property-access
6483
+ HOST_TAG_NAME.__NG_ELEMENT_ID__ = (flags) => {
6484
+ const tNode = getCurrentTNode();
6485
+ if (tNode === null) {
6486
+ throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&
6487
+ 'HOST_TAG_NAME can only be injected in directives and components ' +
6488
+ 'during construction time (in a class constructor or as a class field initializer)');
6489
+ }
6490
+ if (tNode.type & 2 /* TNodeType.Element */) {
6491
+ return tNode.value;
6492
+ }
6493
+ if (flags & InjectFlags.Optional) {
6494
+ return null;
6495
+ }
6496
+ throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&
6497
+ `HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. ` +
6498
+ `This is invalid, and so the dependency should be marked as optional.`);
6499
+ };
6500
+ function getDevModeNodeName(tNode) {
6501
+ if (tNode.type & 8 /* TNodeType.ElementContainer */) {
6502
+ return 'an <ng-container>';
6503
+ }
6504
+ else if (tNode.type & 4 /* TNodeType.Container */) {
6505
+ return 'an <ng-template>';
6506
+ }
6507
+ else {
6508
+ return 'a node';
6509
+ }
6510
+ }
6511
+
6457
6512
  /**
6458
6513
  * @module
6459
6514
  * @description
@@ -7295,6 +7350,20 @@ function getComponentViewByInstance(componentInstance) {
7295
7350
  * This property will be monkey-patched on elements, components and directives.
7296
7351
  */
7297
7352
  const MONKEY_PATCH_KEY_NAME = '__ngContext__';
7353
+ function attachLViewId(target, data) {
7354
+ target[MONKEY_PATCH_KEY_NAME] = data[ID];
7355
+ }
7356
+ /**
7357
+ * Returns the monkey-patch value data present on the target (which could be
7358
+ * a component, directive or a DOM node).
7359
+ */
7360
+ function readLView(target) {
7361
+ const data = readPatchedData(target);
7362
+ if (isLView(data)) {
7363
+ return data;
7364
+ }
7365
+ return data ? data.lView : null;
7366
+ }
7298
7367
  /**
7299
7368
  * Assigns the given data to the given target (which could be a component,
7300
7369
  * directive or DOM node instance) using monkey-patching.
@@ -8605,6 +8674,11 @@ const PRESERVE_HOST_CONTENT = new InjectionToken((typeof ngDevMode === 'undefine
8605
8674
  * is enabled.
8606
8675
  */
8607
8676
  const IS_I18N_HYDRATION_ENABLED = new InjectionToken((typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_I18N_HYDRATION_ENABLED' : ''));
8677
+ /**
8678
+ * Internal token that indicates whether event replay support for SSR
8679
+ * is enabled.
8680
+ */
8681
+ const IS_EVENT_REPLAY_ENABLED = new InjectionToken((typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_EVENT_REPLAY_ENABLED' : ''));
8608
8682
 
8609
8683
  /**
8610
8684
  * @fileoverview
@@ -15215,7 +15289,7 @@ function performanceMarkFeature(feature) {
15215
15289
  *
15216
15290
  * @returns a function to cancel the scheduled callback
15217
15291
  */
15218
- function scheduleCallback(callback) {
15292
+ function scheduleCallbackWithRafRace(callback, useNativeTimers = true) {
15219
15293
  // Note: the `scheduleCallback` is used in the `NgZone` class, but we cannot use the
15220
15294
  // `inject` function. The `NgZone` instance may be created manually, and thus the injection
15221
15295
  // context will be unavailable. This might be enough to check whether `requestAnimationFrame` is
@@ -15223,7 +15297,7 @@ function scheduleCallback(callback) {
15223
15297
  const hasRequestAnimationFrame = typeof _global['requestAnimationFrame'] === 'function';
15224
15298
  let nativeRequestAnimationFrame = hasRequestAnimationFrame ? _global['requestAnimationFrame'] : null;
15225
15299
  let nativeSetTimeout = _global['setTimeout'];
15226
- if (typeof Zone !== 'undefined') {
15300
+ if (typeof Zone !== 'undefined' && useNativeTimers) {
15227
15301
  if (hasRequestAnimationFrame) {
15228
15302
  nativeRequestAnimationFrame =
15229
15303
  _global[Zone.__symbol__('requestAnimationFrame')] ?? nativeRequestAnimationFrame;
@@ -15249,6 +15323,17 @@ function scheduleCallback(callback) {
15249
15323
  executeCallback = false;
15250
15324
  };
15251
15325
  }
15326
+ function scheduleCallbackWithMicrotask(callback) {
15327
+ let executeCallback = true;
15328
+ queueMicrotask(() => {
15329
+ if (executeCallback) {
15330
+ callback();
15331
+ }
15332
+ });
15333
+ return () => {
15334
+ executeCallback = false;
15335
+ };
15336
+ }
15252
15337
 
15253
15338
  function noop(...args) {
15254
15339
  // Do nothing.
@@ -15404,7 +15489,7 @@ class NgZone {
15404
15489
  !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;
15405
15490
  self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;
15406
15491
  self.callbackScheduled = false;
15407
- self.scheduleCallback = scheduleCallback;
15492
+ self.scheduleCallback = scheduleCallbackWithRafRace;
15408
15493
  forkInnerZoneWithAngularBehavior(self);
15409
15494
  }
15410
15495
  /**
@@ -15575,6 +15660,7 @@ function forkInnerZoneWithAngularBehavior(zone) {
15575
15660
  name: 'angular',
15576
15661
  properties: { 'isAngularZone': true },
15577
15662
  onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {
15663
+ // Prevent triggering change detection when the flag is detected.
15578
15664
  if (shouldBeIgnoredByZone(applyArgs)) {
15579
15665
  return delegate.invokeTask(target, task, applyThis, applyArgs);
15580
15666
  }
@@ -15596,7 +15682,17 @@ function forkInnerZoneWithAngularBehavior(zone) {
15596
15682
  return delegate.invoke(target, callback, applyThis, applyArgs, source);
15597
15683
  }
15598
15684
  finally {
15599
- if (zone.shouldCoalesceRunChangeDetection) {
15685
+ if (zone.shouldCoalesceRunChangeDetection &&
15686
+ // Do not delay change detection when the task is the scheduler's tick.
15687
+ // We need to synchronously trigger the stability logic so that the
15688
+ // zone-based scheduler can prevent a duplicate ApplicationRef.tick
15689
+ // by first checking if the scheduler tick is running. This does seem a bit roundabout,
15690
+ // but we _do_ still want to trigger all the correct events when we exit the zone.run
15691
+ // (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which
15692
+ // relies on these events happening after change detection runs).
15693
+ // Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate
15694
+ // but is added here as well to prevent reads of applyArgs when not necessary
15695
+ !zone.callbackScheduled && !isSchedulerTick(applyArgs)) {
15600
15696
  delayChangeDetectionForEventsDelegate();
15601
15697
  }
15602
15698
  onLeave(zone);
@@ -15673,6 +15769,12 @@ class NoopNgZone {
15673
15769
  }
15674
15770
  }
15675
15771
  function shouldBeIgnoredByZone(applyArgs) {
15772
+ return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');
15773
+ }
15774
+ function isSchedulerTick(applyArgs) {
15775
+ return hasApplyArgsData(applyArgs, '__scheduler_tick__');
15776
+ }
15777
+ function hasApplyArgsData(applyArgs, key) {
15676
15778
  if (!Array.isArray(applyArgs)) {
15677
15779
  return false;
15678
15780
  }
@@ -15681,8 +15783,7 @@ function shouldBeIgnoredByZone(applyArgs) {
15681
15783
  if (applyArgs.length !== 1) {
15682
15784
  return false;
15683
15785
  }
15684
- // Prevent triggering change detection when the __ignore_ng_zone__ flag is detected.
15685
- return applyArgs[0].data?.['__ignore_ng_zone__'] === true;
15786
+ return applyArgs[0]?.data?.[key] === true;
15686
15787
  }
15687
15788
  function getNgZone(ngZoneToUse = 'zone.js', options) {
15688
15789
  if (ngZoneToUse === 'noop') {
@@ -16736,7 +16837,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
16736
16837
  function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
16737
16838
  if (rootSelectorOrNode) {
16738
16839
  // The placeholder will be replaced with the actual version at build time.
16739
- setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.0.0-next.4']);
16840
+ setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.0.0-next.6']);
16740
16841
  }
16741
16842
  else {
16742
16843
  // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
@@ -18950,14 +19051,7 @@ function setClassMetadata(type, decorators, ctorParameters, propDecorators) {
18950
19051
  const ITS_JUST_ANGULAR = true;
18951
19052
 
18952
19053
  /**
18953
- * *Internal* service that keeps track of pending tasks happening in the system.
18954
- *
18955
- * This information is needed to make sure that the serialization on the server
18956
- * is delayed until all tasks in the queue (such as an initial navigation or a
18957
- * pending HTTP request) are completed.
18958
- *
18959
- * Pending tasks continue to contribute to the stableness of `ApplicationRef`
18960
- * throughout the lifetime of the application.
19054
+ * Internal implementation of the pending tasks service.
18961
19055
  */
18962
19056
  class PendingTasks {
18963
19057
  constructor() {
@@ -18993,7 +19087,56 @@ class PendingTasks {
18993
19087
  }
18994
19088
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PendingTasks, [{
18995
19089
  type: Injectable,
18996
- args: [{ providedIn: 'root' }]
19090
+ args: [{
19091
+ providedIn: 'root',
19092
+ }]
19093
+ }], null, null); })();
19094
+ /**
19095
+ * Experimental service that keeps track of pending tasks contributing to the stableness of Angular
19096
+ * application. While several existing Angular services (ex.: `HttpClient`) will internally manage
19097
+ * tasks influencing stability, this API gives control over stability to library and application
19098
+ * developers for specific cases not covered by Angular internals.
19099
+ *
19100
+ * The concept of stability comes into play in several important scenarios:
19101
+ * - SSR process needs to wait for the application stability before serializing and sending rendered
19102
+ * HTML;
19103
+ * - tests might want to delay assertions until the application becomes stable;
19104
+ *
19105
+ * @usageNotes
19106
+ * ```typescript
19107
+ * const pendingTasks = inject(ExperimentalPendingTasks);
19108
+ * const taskCleanup = pendingTasks.add();
19109
+ * // do work that should block application's stability and then:
19110
+ * taskCleanup();
19111
+ * ```
19112
+ *
19113
+ * This API is experimental. Neither the shape, nor the underlying behavior is stable and can change
19114
+ * in patch versions. We will iterate on the exact API based on the feedback and our understanding
19115
+ * of the problem and solution space.
19116
+ *
19117
+ * @publicApi
19118
+ * @experimental
19119
+ */
19120
+ class ExperimentalPendingTasks {
19121
+ constructor() {
19122
+ this.internalPendingTasks = inject(PendingTasks);
19123
+ }
19124
+ /**
19125
+ * Adds a new task that should block application's stability.
19126
+ * @returns A cleanup function that removes a task when called.
19127
+ */
19128
+ add() {
19129
+ const taskId = this.internalPendingTasks.add();
19130
+ return () => this.internalPendingTasks.remove(taskId);
19131
+ }
19132
+ static { this.ɵfac = function ExperimentalPendingTasks_Factory(t) { return new (t || ExperimentalPendingTasks)(); }; }
19133
+ static { this.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ExperimentalPendingTasks, factory: ExperimentalPendingTasks.ɵfac, providedIn: 'root' }); }
19134
+ }
19135
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ExperimentalPendingTasks, [{
19136
+ type: Injectable,
19137
+ args: [{
19138
+ providedIn: 'root',
19139
+ }]
18997
19140
  }], null, null); })();
18998
19141
 
18999
19142
  function isIterable(obj) {
@@ -20397,8 +20540,10 @@ function renderDeferBlockState(newState, tNode, lContainer, skipTimerScheduling
20397
20540
  const currentState = lDetails[DEFER_BLOCK_STATE];
20398
20541
  if (isValidStateChange(currentState, newState) &&
20399
20542
  isValidStateChange(lDetails[NEXT_DEFER_BLOCK_STATE] ?? -1, newState)) {
20543
+ const injector = hostLView[INJECTOR];
20400
20544
  const tDetails = getTDeferBlockDetails(hostTView, tNode);
20401
- const needsScheduling = !skipTimerScheduling &&
20545
+ // Skips scheduling on the server since it can delay the server response.
20546
+ const needsScheduling = !skipTimerScheduling && isPlatformBrowser(injector) &&
20402
20547
  (getLoadingBlockAfter(tDetails) !== null ||
20403
20548
  getMinimumDurationForState(tDetails, DeferBlockState.Loading) !== null ||
20404
20549
  getMinimumDurationForState(tDetails, DeferBlockState.Placeholder));
@@ -20420,7 +20565,20 @@ function renderDeferBlockState(newState, tNode, lContainer, skipTimerScheduling
20420
20565
  */
20421
20566
  function isRouterOutletInjector(currentInjector) {
20422
20567
  return (currentInjector instanceof ChainedInjector) &&
20423
- (currentInjector.injector.__ngOutletInjector);
20568
+ (typeof currentInjector.injector.__ngOutletInjector === 'function');
20569
+ }
20570
+ /**
20571
+ * Creates an instance of the `OutletInjector` using a private factory
20572
+ * function available on the `OutletInjector` class.
20573
+ *
20574
+ * @param parentOutletInjector Parent OutletInjector, which should be used
20575
+ * to produce a new instance.
20576
+ * @param parentInjector An Injector, which should be used as a parent one
20577
+ * for a newly created `OutletInjector` instance.
20578
+ */
20579
+ function createRouterOutletInjector(parentOutletInjector, parentInjector) {
20580
+ const outletInjector = parentOutletInjector.injector;
20581
+ return outletInjector.__ngOutletInjector(parentInjector);
20424
20582
  }
20425
20583
  /**
20426
20584
  * Applies changes to the DOM to reflect a given state.
@@ -20453,11 +20611,18 @@ function applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView)
20453
20611
  // we can't inject it. Once the `OutletInjector` is replaced
20454
20612
  // with the `EnvironmentInjector` in Router's code, this special
20455
20613
  // handling can be removed.
20456
- const parentEnvInjector = isRouterOutletInjector(parentInjector) ?
20457
- parentInjector :
20458
- parentInjector.get(EnvironmentInjector);
20614
+ const isParentOutletInjector = isRouterOutletInjector(parentInjector);
20615
+ const parentEnvInjector = isParentOutletInjector ? parentInjector : parentInjector.get(EnvironmentInjector);
20459
20616
  injector = parentEnvInjector.get(CachedInjectorService)
20460
20617
  .getOrCreateInjector(tDetails, parentEnvInjector, providers, ngDevMode ? 'DeferBlock Injector' : '');
20618
+ // Note: this is a continuation of the special case for Router's `OutletInjector`.
20619
+ // Since the `OutletInjector` handles `ActivatedRoute` and `ChildrenOutletContexts`
20620
+ // dynamically (i.e. their values are not really stored statically in an injector),
20621
+ // we need to "wrap" a defer injector into another `OutletInjector`, so we retain
20622
+ // the dynamic resolution of the mentioned tokens.
20623
+ if (isParentOutletInjector) {
20624
+ injector = createRouterOutletInjector(parentInjector, injector);
20625
+ }
20461
20626
  }
20462
20627
  }
20463
20628
  const dehydratedView = findMatchingDehydratedView(lContainer, activeBlockTNode.tView.ssrId);
@@ -20561,7 +20726,7 @@ function triggerResourceLoading(tDetails, lView, tNode) {
20561
20726
  // If the loading status is different from initial one, it means that
20562
20727
  // the loading of dependencies is in progress and there is nothing to do
20563
20728
  // in this function. All details can be obtained from the `tDetails` object.
20564
- return;
20729
+ return tDetails.loadingPromise ?? Promise.resolve();
20565
20730
  }
20566
20731
  const lDetails = getLDeferBlockDetails(lView, tNode);
20567
20732
  const primaryBlockTNode = getPrimaryBlockTNode(tView, tDetails);
@@ -20589,7 +20754,7 @@ function triggerResourceLoading(tDetails, lView, tNode) {
20589
20754
  tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;
20590
20755
  pendingTasks.remove(taskId);
20591
20756
  });
20592
- return;
20757
+ return tDetails.loadingPromise;
20593
20758
  }
20594
20759
  // Start downloading of defer block dependencies.
20595
20760
  tDetails.loadingPromise = Promise.allSettled(dependenciesFn()).then(results => {
@@ -20649,6 +20814,7 @@ function triggerResourceLoading(tDetails, lView, tNode) {
20649
20814
  }
20650
20815
  }
20651
20816
  });
20817
+ return tDetails.loadingPromise;
20652
20818
  }
20653
20819
  /** Utility function to render placeholder content (if present) */
20654
20820
  function renderPlaceholder(lView, tNode) {
@@ -23155,6 +23321,15 @@ function valuesMatching(liveIdx, liveValue, newIdx, newValue, trackBy) {
23155
23321
  }
23156
23322
  return 0;
23157
23323
  }
23324
+ function recordDuplicateKeys(keyToIdx, key, idx) {
23325
+ const idxSoFar = keyToIdx.get(key);
23326
+ if (idxSoFar !== undefined) {
23327
+ idxSoFar.add(idx);
23328
+ }
23329
+ else {
23330
+ keyToIdx.set(key, new Set([idx]));
23331
+ }
23332
+ }
23158
23333
  /**
23159
23334
  * The live collection reconciliation algorithm that perform various in-place operations, so it
23160
23335
  * reflects the content of the new (incoming) collection.
@@ -23183,12 +23358,16 @@ function reconcile(liveCollection, newCollection, trackByFn) {
23183
23358
  let liveKeysInTheFuture = undefined;
23184
23359
  let liveStartIdx = 0;
23185
23360
  let liveEndIdx = liveCollection.length - 1;
23361
+ const duplicateKeys = ngDevMode ? new Map() : undefined;
23186
23362
  if (Array.isArray(newCollection)) {
23187
23363
  let newEndIdx = newCollection.length - 1;
23188
23364
  while (liveStartIdx <= liveEndIdx && liveStartIdx <= newEndIdx) {
23189
23365
  // compare from the beginning
23190
23366
  const liveStartValue = liveCollection.at(liveStartIdx);
23191
23367
  const newStartValue = newCollection[liveStartIdx];
23368
+ if (ngDevMode) {
23369
+ recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newStartValue), liveStartIdx);
23370
+ }
23192
23371
  const isStartMatching = valuesMatching(liveStartIdx, liveStartValue, liveStartIdx, newStartValue, trackByFn);
23193
23372
  if (isStartMatching !== 0) {
23194
23373
  if (isStartMatching < 0) {
@@ -23201,6 +23380,9 @@ function reconcile(liveCollection, newCollection, trackByFn) {
23201
23380
  // TODO(perf): do _all_ the matching from the end
23202
23381
  const liveEndValue = liveCollection.at(liveEndIdx);
23203
23382
  const newEndValue = newCollection[newEndIdx];
23383
+ if (ngDevMode) {
23384
+ recordDuplicateKeys(duplicateKeys, trackByFn(newEndIdx, newEndValue), newEndIdx);
23385
+ }
23204
23386
  const isEndMatching = valuesMatching(liveEndIdx, liveEndValue, newEndIdx, newEndValue, trackByFn);
23205
23387
  if (isEndMatching !== 0) {
23206
23388
  if (isEndMatching < 0) {
@@ -23272,6 +23454,9 @@ function reconcile(liveCollection, newCollection, trackByFn) {
23272
23454
  while (!newIterationResult.done && liveStartIdx <= liveEndIdx) {
23273
23455
  const liveValue = liveCollection.at(liveStartIdx);
23274
23456
  const newValue = newIterationResult.value;
23457
+ if (ngDevMode) {
23458
+ recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newValue), liveStartIdx);
23459
+ }
23275
23460
  const isStartMatching = valuesMatching(liveStartIdx, liveValue, liveStartIdx, newValue, trackByFn);
23276
23461
  if (isStartMatching !== 0) {
23277
23462
  // found a match - move on, but update value
@@ -23323,6 +23508,25 @@ function reconcile(liveCollection, newCollection, trackByFn) {
23323
23508
  detachedItems?.forEach(item => {
23324
23509
  liveCollection.destroy(item);
23325
23510
  });
23511
+ // report duplicate keys (dev mode only)
23512
+ if (ngDevMode) {
23513
+ let duplicatedKeysMsg = [];
23514
+ for (const [key, idxSet] of duplicateKeys) {
23515
+ if (idxSet.size > 1) {
23516
+ const idx = [...idxSet].sort((a, b) => a - b);
23517
+ for (let i = 1; i < idx.length; i++) {
23518
+ duplicatedKeysMsg.push(`key "${stringifyForError(key)}" at index "${idx[i - 1]}" and "${idx[i]}"`);
23519
+ }
23520
+ }
23521
+ }
23522
+ if (duplicatedKeysMsg.length > 0) {
23523
+ const message = formatRuntimeError(955 /* RuntimeErrorCode.LOOP_TRACK_DUPLICATE_KEYS */, 'The provided track expression resulted in duplicated keys for a given collection. ' +
23524
+ 'Adjust the tracking expression such that it uniquely identifies all the items in the collection. ' +
23525
+ 'Duplicated keys were: \n' + duplicatedKeysMsg.join(', \n') + '.');
23526
+ // tslint:disable-next-line:no-console
23527
+ console.warn(message);
23528
+ }
23529
+ }
23326
23530
  }
23327
23531
  function attachPreviouslyDetached(prevCollection, detachedItems, index, key) {
23328
23532
  if (detachedItems !== undefined && detachedItems.has(key)) {
@@ -23425,12 +23629,12 @@ class UniqueValueMultiKeyMap {
23425
23629
  * built-in "if" and "switch". On the high level this instruction is responsible for adding and
23426
23630
  * removing views selected by a conditional expression.
23427
23631
  *
23428
- * @param matchingTemplateIndex index of a template TNode representing a conditional view to be
23632
+ * @param matchingTemplateIndex Index of a template TNode representing a conditional view to be
23429
23633
  * inserted; -1 represents a special case when there is no view to insert.
23634
+ * @param contextValue Value that should be exposed as the context of the conditional.
23430
23635
  * @codeGenApi
23431
23636
  */
23432
- function ɵɵconditional(containerIndex, matchingTemplateIndex, value) {
23433
- // TODO: we could remove the containerIndex argument to this instruction now (!)
23637
+ function ɵɵconditional(matchingTemplateIndex, contextValue) {
23434
23638
  performanceMarkFeature('NgControlFlow');
23435
23639
  const hostLView = getLView();
23436
23640
  const bindingIndex = nextBindingIndex();
@@ -23454,7 +23658,7 @@ function ɵɵconditional(containerIndex, matchingTemplateIndex, value) {
23454
23658
  const nextContainer = getLContainer(hostLView, nextLContainerIndex);
23455
23659
  const templateTNode = getExistingTNode(hostLView[TVIEW], nextLContainerIndex);
23456
23660
  const dehydratedView = findMatchingDehydratedView(nextContainer, templateTNode.tView.ssrId);
23457
- const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, value, { dehydratedView });
23661
+ const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, contextValue, { dehydratedView });
23458
23662
  addLViewToLContainer(nextContainer, embeddedLView, viewInContainerIdx, shouldAddViewToDom(templateTNode, dehydratedView));
23459
23663
  }
23460
23664
  }
@@ -23467,7 +23671,7 @@ function ɵɵconditional(containerIndex, matchingTemplateIndex, value) {
23467
23671
  // changed - re-bind in context.
23468
23672
  const lView = getLViewFromLContainer(prevContainer, viewInContainerIdx);
23469
23673
  if (lView !== undefined) {
23470
- lView[CONTEXT] = value;
23674
+ lView[CONTEXT] = contextValue;
23471
23675
  }
23472
23676
  }
23473
23677
  }
@@ -23559,12 +23763,43 @@ function ɵɵrepeaterCreate(index, templateFn, decls, vars, tagName, attrsIndex,
23559
23763
  declareTemplate(lView, tView, index + 2, emptyTemplateFn, emptyDecls, emptyVars, emptyTagName, getConstant(tView.consts, emptyAttrsIndex));
23560
23764
  }
23561
23765
  }
23766
+ function isViewExpensiveToRecreate(lView) {
23767
+ // assumption: anything more than a text node with a binding is considered "expensive"
23768
+ return lView.length - HEADER_OFFSET > 2;
23769
+ }
23770
+ class OperationsCounter {
23771
+ constructor() {
23772
+ this.created = 0;
23773
+ this.destroyed = 0;
23774
+ }
23775
+ reset() {
23776
+ this.created = 0;
23777
+ this.destroyed = 0;
23778
+ }
23779
+ recordCreate() {
23780
+ this.created++;
23781
+ }
23782
+ recordDestroy() {
23783
+ this.destroyed++;
23784
+ }
23785
+ /**
23786
+ * A method indicating if the entire collection was re-created as part of the reconciliation pass.
23787
+ * Used to warn developers about the usage of a tracking function that might result in excessive
23788
+ * amount of view creation / destroy operations.
23789
+ *
23790
+ * @returns boolean value indicating if a live collection was re-created
23791
+ */
23792
+ wasReCreated(collectionLen) {
23793
+ return collectionLen > 0 && this.created === this.destroyed && this.created === collectionLen;
23794
+ }
23795
+ }
23562
23796
  class LiveCollectionLContainerImpl extends LiveCollection {
23563
23797
  constructor(lContainer, hostLView, templateTNode) {
23564
23798
  super();
23565
23799
  this.lContainer = lContainer;
23566
23800
  this.hostLView = hostLView;
23567
23801
  this.templateTNode = templateTNode;
23802
+ this.operationsCounter = ngDevMode ? new OperationsCounter() : undefined;
23568
23803
  /**
23569
23804
  Property indicating if indexes in the repeater context need to be updated following the live
23570
23805
  collection changes. Index updates are necessary if and only if views are inserted / removed in
@@ -23590,16 +23825,19 @@ class LiveCollectionLContainerImpl extends LiveCollection {
23590
23825
  create(index, value) {
23591
23826
  const dehydratedView = findMatchingDehydratedView(this.lContainer, this.templateTNode.tView.ssrId);
23592
23827
  const embeddedLView = createAndRenderEmbeddedLView(this.hostLView, this.templateTNode, new RepeaterContext(this.lContainer, value, index), { dehydratedView });
23828
+ this.operationsCounter?.recordCreate();
23593
23829
  return embeddedLView;
23594
23830
  }
23595
23831
  destroy(lView) {
23596
23832
  destroyLView(lView[TVIEW], lView);
23833
+ this.operationsCounter?.recordDestroy();
23597
23834
  }
23598
23835
  updateValue(index, value) {
23599
23836
  this.getLView(index)[CONTEXT].$implicit = value;
23600
23837
  }
23601
23838
  reset() {
23602
23839
  this.needsIndexUpdate = false;
23840
+ this.operationsCounter?.reset();
23603
23841
  }
23604
23842
  updateIndexes() {
23605
23843
  if (this.needsIndexUpdate) {
@@ -23626,9 +23864,9 @@ function ɵɵrepeater(collection) {
23626
23864
  const hostLView = getLView();
23627
23865
  const hostTView = hostLView[TVIEW];
23628
23866
  const metadata = hostLView[metadataSlotIdx];
23867
+ const containerIndex = metadataSlotIdx + 1;
23868
+ const lContainer = getLContainer(hostLView, containerIndex);
23629
23869
  if (metadata.liveCollection === undefined) {
23630
- const containerIndex = metadataSlotIdx + 1;
23631
- const lContainer = getLContainer(hostLView, containerIndex);
23632
23870
  const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);
23633
23871
  metadata.liveCollection =
23634
23872
  new LiveCollectionLContainerImpl(lContainer, hostLView, itemTemplateTNode);
@@ -23638,6 +23876,18 @@ function ɵɵrepeater(collection) {
23638
23876
  }
23639
23877
  const liveCollection = metadata.liveCollection;
23640
23878
  reconcile(liveCollection, collection, metadata.trackByFn);
23879
+ // Warn developers about situations where the entire collection was re-created as part of the
23880
+ // reconciliation pass. Note that this warning might be "overreacting" and report cases where
23881
+ // the collection re-creation is the intended behavior. Still, the assumption is that most of
23882
+ // the time it is undesired.
23883
+ if (ngDevMode && metadata.trackByFn === ɵɵrepeaterTrackByIdentity &&
23884
+ liveCollection.operationsCounter?.wasReCreated(liveCollection.length) &&
23885
+ isViewExpensiveToRecreate(getExistingLViewFromLContainer(lContainer, 0))) {
23886
+ const message = formatRuntimeError(956 /* RuntimeErrorCode.LOOP_TRACK_RECREATE */, `The configured tracking expression (track by identity) caused re-creation of the entire collection of size ${liveCollection.length}. ` +
23887
+ 'This is an expensive operation requiring destruction and subsequent creation of DOM nodes, directives, components etc. ' +
23888
+ 'Please review the "track expression" and make sure that it uniquely identifies items in a collection.');
23889
+ console.warn(message);
23890
+ }
23641
23891
  // moves in the container might caused context's index to get out of order, re-adjust if needed
23642
23892
  liveCollection.updateIndexes();
23643
23893
  // handle empty blocks
@@ -30265,67 +30515,6 @@ const Output = makePropDecorator('Output', (alias) => ({ alias }));
30265
30515
  */
30266
30516
  const HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ hostPropertyName }));
30267
30517
  /**
30268
- * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
30269
- * Angular invokes the supplied handler method when the host element emits the specified event,
30270
- * and updates the bound element with the result.
30271
- *
30272
- * If the handler method returns false, applies `preventDefault` on the bound element.
30273
- *
30274
- * @usageNotes
30275
- *
30276
- * The following example declares a directive
30277
- * that attaches a click listener to a button and counts clicks.
30278
- *
30279
- * ```ts
30280
- * @Directive({selector: 'button[counting]'})
30281
- * class CountClicks {
30282
- * numberOfClicks = 0;
30283
- *
30284
- * @HostListener('click', ['$event.target'])
30285
- * onClick(btn) {
30286
- * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
30287
- * }
30288
- * }
30289
- *
30290
- * @Component({
30291
- * selector: 'app',
30292
- * template: '<button counting>Increment</button>',
30293
- * })
30294
- * class App {}
30295
- *
30296
- * ```
30297
- *
30298
- * The following example registers another DOM event handler that listens for `Enter` key-press
30299
- * events on the global `window`.
30300
- * ``` ts
30301
- * import { HostListener, Component } from "@angular/core";
30302
- *
30303
- * @Component({
30304
- * selector: 'app',
30305
- * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key
30306
- * to increment the counter.
30307
- * <button (click)="resetCounter()">Reset Counter</button>`
30308
- * })
30309
- * class AppComponent {
30310
- * counter = 0;
30311
- * @HostListener('window:keydown.enter', ['$event'])
30312
- * handleKeyDown(event: KeyboardEvent) {
30313
- * this.counter++;
30314
- * }
30315
- * resetCounter() {
30316
- * this.counter = 0;
30317
- * }
30318
- * }
30319
- * ```
30320
- * The list of valid key names for `keydown` and `keyup` events
30321
- * can be found here:
30322
- * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
30323
- *
30324
- * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
30325
- *
30326
- * The global target names that can be used to prefix an event name are
30327
- * `document:`, `window:` and `body:`.
30328
- *
30329
30518
  * @Annotation
30330
30519
  * @publicApi
30331
30520
  */
@@ -30370,7 +30559,7 @@ class Version {
30370
30559
  /**
30371
30560
  * @publicApi
30372
30561
  */
30373
- const VERSION = new Version('18.0.0-next.4');
30562
+ const VERSION = new Version('18.0.0-next.6');
30374
30563
 
30375
30564
  class Console {
30376
30565
  log(message) {
@@ -31292,7 +31481,6 @@ class Testability {
31292
31481
  constructor(_ngZone, registry, testabilityGetter) {
31293
31482
  this._ngZone = _ngZone;
31294
31483
  this.registry = registry;
31295
- this._pendingCount = 0;
31296
31484
  this._isZoneStable = true;
31297
31485
  this._callbacks = [];
31298
31486
  this.taskTrackingZone = null;
@@ -31326,31 +31514,11 @@ class Testability {
31326
31514
  });
31327
31515
  });
31328
31516
  }
31329
- /**
31330
- * Increases the number of pending request
31331
- * @deprecated pending requests are now tracked with zones.
31332
- */
31333
- increasePendingRequestCount() {
31334
- this._pendingCount += 1;
31335
- return this._pendingCount;
31336
- }
31337
- /**
31338
- * Decreases the number of pending request
31339
- * @deprecated pending requests are now tracked with zones
31340
- */
31341
- decreasePendingRequestCount() {
31342
- this._pendingCount -= 1;
31343
- if (this._pendingCount < 0) {
31344
- throw new Error('pending async requests below zero');
31345
- }
31346
- this._runCallbacksIfReady();
31347
- return this._pendingCount;
31348
- }
31349
31517
  /**
31350
31518
  * Whether an associated application is stable
31351
31519
  */
31352
31520
  isStable() {
31353
- return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
31521
+ return this._isZoneStable && !this._ngZone.hasPendingMacrotasks;
31354
31522
  }
31355
31523
  _runCallbacksIfReady() {
31356
31524
  if (this.isStable()) {
@@ -31420,13 +31588,6 @@ class Testability {
31420
31588
  this.addCallback(doneCb, timeout, updateCb);
31421
31589
  this._runCallbacksIfReady();
31422
31590
  }
31423
- /**
31424
- * Get the number of pending requests
31425
- * @deprecated pending requests are now tracked with zones
31426
- */
31427
- getPendingRequestCount() {
31428
- return this._pendingCount;
31429
- }
31430
31591
  /**
31431
31592
  * Registers an application with a testability hook so that it can be tracked.
31432
31593
  * @param token token of application, root element
@@ -31898,6 +32059,7 @@ class ApplicationRef {
31898
32059
  constructor() {
31899
32060
  /** @internal */
31900
32061
  this._bootstrapListeners = [];
32062
+ /** @internal */
31901
32063
  this._runningTick = false;
31902
32064
  this._destroyed = false;
31903
32065
  this._destroyListeners = [];
@@ -31910,6 +32072,7 @@ class ApplicationRef {
31910
32072
  // Eventually the hostView of the fixture should just attach to ApplicationRef.
31911
32073
  this.externalTestViews = new Set();
31912
32074
  this.beforeRender = new Subject();
32075
+ /** @internal */
31913
32076
  this.afterTick = new Subject();
31914
32077
  /**
31915
32078
  * Get a list of component types registered to this application.
@@ -32050,9 +32213,9 @@ class ApplicationRef {
32050
32213
  this.internalErrorHandler(e);
32051
32214
  }
32052
32215
  finally {
32053
- this.afterTick.next();
32054
32216
  this._runningTick = false;
32055
32217
  setActiveConsumer$1(prevConsumer);
32218
+ this.afterTick.next();
32056
32219
  }
32057
32220
  }
32058
32221
  detectChangesInAttachedViews(refreshViews) {
@@ -32367,6 +32530,26 @@ function _lastDefined(args) {
32367
32530
  return undefined;
32368
32531
  }
32369
32532
 
32533
+ /** Flag to enable/disable the zoneless scheduler as default provider with zone scheduling. */
32534
+ const alwaysProvideZonelessScheduler = true;
32535
+
32536
+ const CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT = 100;
32537
+ let consecutiveMicrotaskNotifications = 0;
32538
+ let stackFromLastFewNotifications = [];
32539
+ function trackMicrotaskNotificationForDebugging() {
32540
+ consecutiveMicrotaskNotifications++;
32541
+ if (CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT - consecutiveMicrotaskNotifications < 5) {
32542
+ const stack = new Error().stack;
32543
+ if (stack) {
32544
+ stackFromLastFewNotifications.push(stack);
32545
+ }
32546
+ }
32547
+ if (consecutiveMicrotaskNotifications === CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT) {
32548
+ throw new RuntimeError(103 /* RuntimeErrorCode.INFINITE_CHANGE_DETECTION */, 'Angular could not stabilize because there were endless change notifications within the browser event loop. ' +
32549
+ 'The stack from the last several notifications: \n' +
32550
+ stackFromLastFewNotifications.join('\n'));
32551
+ }
32552
+ }
32370
32553
  class ChangeDetectionSchedulerImpl {
32371
32554
  constructor() {
32372
32555
  this.appRef = inject(ApplicationRef);
@@ -32378,7 +32561,17 @@ class ChangeDetectionSchedulerImpl {
32378
32561
  this.cancelScheduledCallback = null;
32379
32562
  this.zonelessEnabled = inject(ZONELESS_ENABLED);
32380
32563
  this.disableScheduling = inject(ZONELESS_SCHEDULER_DISABLED, { optional: true }) ?? false;
32381
- this.zoneIsDefined = typeof Zone !== 'undefined';
32564
+ this.zoneIsDefined = typeof Zone !== 'undefined' && !!Zone.root.run;
32565
+ this.schedulerTickApplyArgs = [{ data: { '__scheduler_tick__': true } }];
32566
+ this.afterTickSubscription = this.appRef.afterTick.subscribe(() => {
32567
+ // If the scheduler isn't running a tick but the application ticked, that means
32568
+ // someone called ApplicationRef.tick manually. In this case, we should cancel
32569
+ // any change detections that had been scheduled so we don't run an extra one.
32570
+ if (!this.runningTick) {
32571
+ this.cleanup();
32572
+ }
32573
+ });
32574
+ this.useMicrotaskScheduler = false;
32382
32575
  // TODO(atscott): These conditions will need to change when zoneless is the default
32383
32576
  // Instead, they should flip to checking if ZoneJS scheduling is provided
32384
32577
  this.disableScheduling ||= !this.zonelessEnabled &&
@@ -32394,17 +32587,36 @@ class ChangeDetectionSchedulerImpl {
32394
32587
  if (!this.shouldScheduleTick()) {
32395
32588
  return;
32396
32589
  }
32590
+ if ((typeof ngDevMode === 'undefined' || ngDevMode)) {
32591
+ if (this.useMicrotaskScheduler) {
32592
+ trackMicrotaskNotificationForDebugging();
32593
+ }
32594
+ else {
32595
+ consecutiveMicrotaskNotifications = 0;
32596
+ stackFromLastFewNotifications.length = 0;
32597
+ }
32598
+ }
32599
+ const scheduleCallback = this.useMicrotaskScheduler ? scheduleCallbackWithMicrotask : scheduleCallbackWithRafRace;
32397
32600
  this.pendingRenderTaskId = this.taskService.add();
32398
- this.cancelScheduledCallback = scheduleCallback(() => {
32399
- this.tick(this.shouldRefreshViews);
32400
- });
32601
+ if (this.zoneIsDefined) {
32602
+ Zone.root.run(() => {
32603
+ this.cancelScheduledCallback = scheduleCallback(() => {
32604
+ this.tick(this.shouldRefreshViews);
32605
+ }, false /** useNativeTimers */);
32606
+ });
32607
+ }
32608
+ else {
32609
+ this.cancelScheduledCallback = scheduleCallback(() => {
32610
+ this.tick(this.shouldRefreshViews);
32611
+ }, false /** useNativeTimers */);
32612
+ }
32401
32613
  }
32402
32614
  shouldScheduleTick() {
32403
32615
  if (this.disableScheduling) {
32404
32616
  return false;
32405
32617
  }
32406
32618
  // already scheduled or running
32407
- if (this.pendingRenderTaskId !== null || this.runningTick) {
32619
+ if (this.pendingRenderTaskId !== null || this.runningTick || this.appRef._runningTick) {
32408
32620
  return false;
32409
32621
  }
32410
32622
  // If we're inside the zone don't bother with scheduler. Zone will stabilize
@@ -32430,17 +32642,33 @@ class ChangeDetectionSchedulerImpl {
32430
32642
  if (this.runningTick || this.appRef.destroyed) {
32431
32643
  return;
32432
32644
  }
32645
+ const task = this.taskService.add();
32433
32646
  try {
32434
32647
  this.ngZone.run(() => {
32435
32648
  this.runningTick = true;
32436
32649
  this.appRef._tick(shouldRefreshViews);
32437
- });
32650
+ }, undefined, this.schedulerTickApplyArgs);
32651
+ }
32652
+ catch (e) {
32653
+ this.taskService.remove(task);
32654
+ throw e;
32438
32655
  }
32439
32656
  finally {
32440
32657
  this.cleanup();
32441
32658
  }
32659
+ // If we're notified of a change within 1 microtask of running change
32660
+ // detection, run another round in the same event loop. This allows code
32661
+ // which uses Promise.resolve (see NgModel) to avoid
32662
+ // ExpressionChanged...Error to still be reflected in a single browser
32663
+ // paint, even if that spans multiple rounds of change detection.
32664
+ this.useMicrotaskScheduler = true;
32665
+ scheduleCallbackWithMicrotask(() => {
32666
+ this.useMicrotaskScheduler = false;
32667
+ this.taskService.remove(task);
32668
+ });
32442
32669
  }
32443
32670
  ngOnDestroy() {
32671
+ this.afterTickSubscription.unsubscribe();
32444
32672
  this.cleanup();
32445
32673
  }
32446
32674
  cleanup() {
@@ -32468,7 +32696,46 @@ class ChangeDetectionSchedulerImpl {
32468
32696
  type: Injectable,
32469
32697
  args: [{ providedIn: 'root' }]
32470
32698
  }], () => [], null); })();
32471
- function provideZonelessChangeDetection() {
32699
+ /**
32700
+ * Provides change detection without ZoneJS for the application bootstrapped using
32701
+ * `bootstrapApplication`.
32702
+ *
32703
+ * This function allows you to configure the application to not use the state/state changes of
32704
+ * ZoneJS to schedule change detection in the application. This will work when ZoneJS is not present
32705
+ * on the page at all or if it exists because something else is using it (either another Angular
32706
+ * application which uses ZoneJS for scheduling or some other library that relies on ZoneJS).
32707
+ *
32708
+ * This can also be added to the `TestBed` providers to configure the test environment to more
32709
+ * closely match production behavior. This will help give higher confidence that components are
32710
+ * compatible with zoneless change detection.
32711
+ *
32712
+ * ZoneJS uses browser events to trigger change detection. When using this provider, Angular will
32713
+ * instead use Angular APIs to schedule change detection. These APIs include:
32714
+ *
32715
+ * - `ChangeDetectorRef.markForCheck`
32716
+ * - `ComponentRef.setInput`
32717
+ * - updating a signal that is read in a template
32718
+ * - when bound host or template listeners are triggered
32719
+ * - attaching a view that was marked dirty by one of the above
32720
+ * - removing a view
32721
+ * - registering a render hook (templates are only refreshed if render hooks do one of the above)
32722
+ *
32723
+ * @usageNotes
32724
+ * ```typescript
32725
+ * bootstrapApplication(MyApp, {providers: [
32726
+ * provideExperimentalZonelessChangeDetection(),
32727
+ * ]});
32728
+ * ```
32729
+ *
32730
+ * This API is experimental. Neither the shape, nor the underlying behavior is stable and can change
32731
+ * in patch versions. There are known feature gaps and API ergonomic considerations. We will iterate
32732
+ * on the exact API based on the feedback and our understanding of the problem and solution space.
32733
+ *
32734
+ * @publicApi
32735
+ * @experimental
32736
+ * @see {@link bootstrapApplication}
32737
+ */
32738
+ function provideExperimentalZonelessChangeDetection() {
32472
32739
  performanceMarkFeature('NgZoneless');
32473
32740
  return makeEnvironmentProviders([
32474
32741
  { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },
@@ -32489,13 +32756,14 @@ class NgZoneChangeDetectionScheduler {
32489
32756
  }
32490
32757
  this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
32491
32758
  next: () => {
32759
+ // `onMicroTaskEmpty` can happen _during_ the zoneless scheduler change detection because
32760
+ // zone.run(() => {}) will result in `checkStable` at the end of the `zone.run` closure
32761
+ // and emit `onMicrotaskEmpty` synchronously if run coalsecing is false.
32762
+ if (this.changeDetectionScheduler?.runningTick) {
32763
+ return;
32764
+ }
32492
32765
  this.zone.run(() => {
32493
- if (this.changeDetectionScheduler) {
32494
- this.changeDetectionScheduler.tick(true /* shouldRefreshViews */);
32495
- }
32496
- else {
32497
- this.applicationRef.tick();
32498
- }
32766
+ this.applicationRef.tick();
32499
32767
  });
32500
32768
  }
32501
32769
  });
@@ -32515,24 +32783,7 @@ class NgZoneChangeDetectionScheduler {
32515
32783
  * with the bootstrapModule API.
32516
32784
  */
32517
32785
  const PROVIDED_NG_ZONE = new InjectionToken((typeof ngDevMode === 'undefined' || ngDevMode) ? 'provideZoneChangeDetection token' : '');
32518
- /**
32519
- * Configures change detection scheduling when using ZoneJS.
32520
- */
32521
- var SchedulingMode;
32522
- (function (SchedulingMode) {
32523
- /**
32524
- * Change detection will run when the `NgZone.onMicrotaskEmpty` observable emits.
32525
- * Change detection will also be scheduled to run whenever Angular is notified
32526
- * of a change. This includes calling `ChangeDetectorRef.markForCheck`,
32527
- * setting a `signal` value, and attaching a view.
32528
- */
32529
- SchedulingMode[SchedulingMode["Hybrid"] = 0] = "Hybrid";
32530
- /**
32531
- * Change detection will only run when the `NgZone.onMicrotaskEmpty` observable emits.
32532
- */
32533
- SchedulingMode[SchedulingMode["NgZoneOnly"] = 1] = "NgZoneOnly";
32534
- })(SchedulingMode || (SchedulingMode = {}));
32535
- function internalProvideZoneChangeDetection({ ngZoneFactory, schedulingMode }) {
32786
+ function internalProvideZoneChangeDetection({ ngZoneFactory, ignoreChangesOutsideZone }) {
32536
32787
  return [
32537
32788
  { provide: NgZone, useFactory: ngZoneFactory },
32538
32789
  {
@@ -32559,12 +32810,12 @@ function internalProvideZoneChangeDetection({ ngZoneFactory, schedulingMode }) {
32559
32810
  }
32560
32811
  },
32561
32812
  { provide: INTERNAL_APPLICATION_ERROR_HANDLER, useFactory: ngZoneApplicationErrorHandlerFactory },
32562
- // Always disable scheduler whenever explicitly disabled, even if Hybrid was specified elsewhere
32563
- schedulingMode === SchedulingMode.NgZoneOnly ?
32564
- { provide: ZONELESS_SCHEDULER_DISABLED, useValue: true } :
32565
- [],
32566
- // Only provide scheduler when explicitly enabled
32567
- schedulingMode === SchedulingMode.Hybrid ?
32813
+ // Always disable scheduler whenever explicitly disabled, even if another place called
32814
+ // `provideZoneChangeDetection` without the 'ignore' option.
32815
+ ignoreChangesOutsideZone === true ? { provide: ZONELESS_SCHEDULER_DISABLED, useValue: true } : [],
32816
+ // TODO(atscott): This should move to the same places that zone change detection is provided by
32817
+ // default instead of being in the zone scheduling providers.
32818
+ alwaysProvideZonelessScheduler || ignoreChangesOutsideZone === false ?
32568
32819
  { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl } :
32569
32820
  [],
32570
32821
  ];
@@ -32595,7 +32846,7 @@ function ngZoneApplicationErrorHandlerFactory() {
32595
32846
  * @see {@link NgZoneOptions}
32596
32847
  */
32597
32848
  function provideZoneChangeDetection(options) {
32598
- const schedulingMode = options?.schedulingMode;
32849
+ const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;
32599
32850
  const zoneProviders = internalProvideZoneChangeDetection({
32600
32851
  ngZoneFactory: () => {
32601
32852
  const ngZoneOptions = getNgZoneOptions(options);
@@ -32604,7 +32855,7 @@ function provideZoneChangeDetection(options) {
32604
32855
  }
32605
32856
  return new NgZone(ngZoneOptions);
32606
32857
  },
32607
- schedulingMode
32858
+ ignoreChangesOutsideZone
32608
32859
  });
32609
32860
  return makeEnvironmentProviders([
32610
32861
  (typeof ngDevMode === 'undefined' || ngDevMode) ? { provide: PROVIDED_NG_ZONE, useValue: true } :
@@ -32883,8 +33134,8 @@ class PlatformRef {
32883
33134
  // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be
32884
33135
  // created outside of the Angular zone.
32885
33136
  return ngZone.run(() => {
32886
- const schedulingMode = options?.schedulingMode;
32887
- const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, internalProvideZoneChangeDetection({ ngZoneFactory: () => ngZone, schedulingMode }));
33137
+ const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;
33138
+ const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, internalProvideZoneChangeDetection({ ngZoneFactory: () => ngZone, ignoreChangesOutsideZone }));
32888
33139
  if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
32889
33140
  moduleRef.injector.get(PROVIDED_NG_ZONE, null) !== null) {
32890
33141
  throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, '`bootstrapModule` does not support `provideZoneChangeDetection`. Use `BootstrapOptions` instead.');
@@ -35030,9 +35281,9 @@ const REACTIVE_NODE = {
35030
35281
  */
35031
35282
  function producerAccessed(node) {
35032
35283
  if (inNotificationPhase) {
35033
- throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ?
35034
- `Assertion error: signal read during notification phase` :
35035
- '');
35284
+ throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode
35285
+ ? `Assertion error: signal read during notification phase`
35286
+ : '');
35036
35287
  }
35037
35288
  if (activeConsumer === null) {
35038
35289
  // Accessed outside of a reactive context, so nothing to record.
@@ -35062,8 +35313,9 @@ function producerAccessed(node) {
35062
35313
  activeConsumer.producerNode[idx] = node;
35063
35314
  // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a
35064
35315
  // placeholder value.
35065
- activeConsumer.producerIndexOfThis[idx] =
35066
- consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0;
35316
+ activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer)
35317
+ ? producerAddLiveConsumer(node, activeConsumer, idx)
35318
+ : 0;
35067
35319
  }
35068
35320
  activeConsumer.producerLastReadVersion[idx] = node.version;
35069
35321
  }
@@ -35153,7 +35405,9 @@ function consumerBeforeComputation(node) {
35153
35405
  */
35154
35406
  function consumerAfterComputation(node, prevConsumer) {
35155
35407
  setActiveConsumer(prevConsumer);
35156
- if (!node || node.producerNode === undefined || node.producerIndexOfThis === undefined ||
35408
+ if (!node ||
35409
+ node.producerNode === undefined ||
35410
+ node.producerIndexOfThis === undefined ||
35157
35411
  node.producerLastReadVersion === undefined) {
35158
35412
  return;
35159
35413
  }
@@ -35211,8 +35465,10 @@ function consumerDestroy(node) {
35211
35465
  }
35212
35466
  }
35213
35467
  // Truncate all the arrays to drop all connection from this node to the graph.
35214
- node.producerNode.length = node.producerLastReadVersion.length = node.producerIndexOfThis.length =
35215
- 0;
35468
+ node.producerNode.length =
35469
+ node.producerLastReadVersion.length =
35470
+ node.producerIndexOfThis.length =
35471
+ 0;
35216
35472
  if (node.liveConsumerNode) {
35217
35473
  node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0;
35218
35474
  }
@@ -35352,7 +35608,9 @@ const COMPUTED_NODE = /* @__PURE__ */ (() => {
35352
35608
  finally {
35353
35609
  consumerAfterComputation(node, prevConsumer);
35354
35610
  }
35355
- if (oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED &&
35611
+ if (oldValue !== UNSET &&
35612
+ oldValue !== ERRORED &&
35613
+ newValue !== ERRORED &&
35356
35614
  node.equal(oldValue, newValue)) {
35357
35615
  // No change to `valueVersion` - old and new values are
35358
35616
  // semantically equivalent.
@@ -35789,6 +36047,170 @@ function getDeferBlocks(lView, deferBlocks) {
35789
36047
  }
35790
36048
  }
35791
36049
 
36050
+ const EVENT_REPLAY_ENABLED_DEFAULT = false;
36051
+ const CONTRACT_PROPERTY = 'ngContracts';
36052
+ /**
36053
+ * Returns a set of providers required to setup support for event replay.
36054
+ * Requires hydration to be enabled separately.
36055
+ */
36056
+ function withEventReplay() {
36057
+ return [
36058
+ {
36059
+ provide: IS_EVENT_REPLAY_ENABLED,
36060
+ useValue: true,
36061
+ },
36062
+ {
36063
+ provide: APP_BOOTSTRAP_LISTENER,
36064
+ useFactory: () => {
36065
+ if (isPlatformBrowser()) {
36066
+ const injector = inject(Injector);
36067
+ const appRef = inject(ApplicationRef);
36068
+ return () => {
36069
+ // Kick off event replay logic once hydration for the initial part
36070
+ // of the application is completed. This timing is similar to the unclaimed
36071
+ // dehydrated views cleanup timing.
36072
+ whenStable(appRef).then(() => {
36073
+ const appId = injector.get(APP_ID);
36074
+ // This is set in packages/platform-server/src/utils.ts
36075
+ // Note: globalThis[CONTRACT_PROPERTY] may be undefined in case Event Replay feature
36076
+ // is enabled, but there are no events configured in an application.
36077
+ const eventContract = globalThis[CONTRACT_PROPERTY]?.[appId];
36078
+ if (eventContract) {
36079
+ const dispatcher = new Dispatcher();
36080
+ setEventReplayer(dispatcher);
36081
+ // Event replay is kicked off as a side-effect of executing this function.
36082
+ registerDispatcher(eventContract, dispatcher);
36083
+ }
36084
+ });
36085
+ };
36086
+ }
36087
+ return () => { }; // noop for the server code
36088
+ },
36089
+ multi: true,
36090
+ }
36091
+ ];
36092
+ }
36093
+ /**
36094
+ * Extracts information about all DOM events (added in a template) registered on elements in a give
36095
+ * LView. Maps collected events to a corresponding DOM element (an element is used as a key).
36096
+ */
36097
+ function collectDomEventsInfo(tView, lView, eventTypesToReplay) {
36098
+ const events = new Map();
36099
+ const lCleanup = lView[CLEANUP];
36100
+ const tCleanup = tView.cleanup;
36101
+ if (!tCleanup || !lCleanup) {
36102
+ return events;
36103
+ }
36104
+ for (let i = 0; i < tCleanup.length;) {
36105
+ const firstParam = tCleanup[i++];
36106
+ const secondParam = tCleanup[i++];
36107
+ if (typeof firstParam !== 'string') {
36108
+ continue;
36109
+ }
36110
+ const name = firstParam;
36111
+ eventTypesToReplay.add(name);
36112
+ const listenerElement = unwrapRNode(lView[secondParam]);
36113
+ i++; // move the cursor to the next position (location of the listener idx)
36114
+ const useCaptureOrIndx = tCleanup[i++];
36115
+ // if useCaptureOrIndx is boolean then report it as is.
36116
+ // if useCaptureOrIndx is positive number then it in unsubscribe method
36117
+ // if useCaptureOrIndx is negative number then it is a Subscription
36118
+ const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;
36119
+ if (!isDomEvent) {
36120
+ continue;
36121
+ }
36122
+ if (!events.has(listenerElement)) {
36123
+ events.set(listenerElement, [name]);
36124
+ }
36125
+ else {
36126
+ events.get(listenerElement).push(name);
36127
+ }
36128
+ }
36129
+ return events;
36130
+ }
36131
+ function setJSActionAttribute(tNode, rNode, nativeElementToEvents) {
36132
+ if (tNode.type & 2 /* TNodeType.Element */) {
36133
+ const nativeElement = unwrapRNode(rNode);
36134
+ const events = nativeElementToEvents.get(nativeElement) ?? [];
36135
+ const parts = events.map(event => `${event}:`);
36136
+ if (parts.length > 0) {
36137
+ nativeElement.setAttribute('jsaction', parts.join(';'));
36138
+ }
36139
+ }
36140
+ }
36141
+ /**
36142
+ * Registers a function that should be invoked to replay events.
36143
+ */
36144
+ function setEventReplayer(dispatcher) {
36145
+ dispatcher.setEventReplayer(queue => {
36146
+ for (const event of queue) {
36147
+ handleEvent(event);
36148
+ }
36149
+ });
36150
+ }
36151
+ /**
36152
+ * Finds an LView that a given DOM element belongs to.
36153
+ */
36154
+ function getLViewByElement(target) {
36155
+ let lView = readLView(target);
36156
+ if (lView) {
36157
+ return lView;
36158
+ }
36159
+ else {
36160
+ // If this node doesn't have LView info attached, then we need to
36161
+ // traverse upwards up the DOM to find the nearest element that
36162
+ // has already been monkey patched with data.
36163
+ let parent = target;
36164
+ while (parent = parent.parentNode) {
36165
+ lView = readLView(parent);
36166
+ if (lView) {
36167
+ // To prevent additional lookups, monkey-patch LView id onto this DOM node.
36168
+ // TODO: consider patching all parent nodes that didn't have LView id, so that
36169
+ // we can avoid lookups for more nodes.
36170
+ attachLViewId(target, lView);
36171
+ return lView;
36172
+ }
36173
+ }
36174
+ }
36175
+ return null;
36176
+ }
36177
+ function handleEvent(event) {
36178
+ const nativeElement = event.getAction().element;
36179
+ // Dispatch event via Angular's logic
36180
+ if (nativeElement) {
36181
+ const lView = getLViewByElement(nativeElement);
36182
+ if (lView !== null) {
36183
+ const tView = lView[TVIEW];
36184
+ const eventName = event.getEventType();
36185
+ const origEvent = event.getEvent();
36186
+ const listeners = getEventListeners(tView, lView, nativeElement, eventName);
36187
+ for (const listener of listeners) {
36188
+ listener(origEvent);
36189
+ }
36190
+ }
36191
+ }
36192
+ }
36193
+ function getEventListeners(tView, lView, nativeElement, eventName) {
36194
+ const listeners = [];
36195
+ const lCleanup = lView[CLEANUP];
36196
+ const tCleanup = tView.cleanup;
36197
+ if (tCleanup && lCleanup) {
36198
+ for (let i = 0; i < tCleanup.length;) {
36199
+ const storedEventName = tCleanup[i++];
36200
+ const nativeElementIndex = tCleanup[i++];
36201
+ if (typeof storedEventName === 'string') {
36202
+ const listenerElement = unwrapRNode(lView[nativeElementIndex]);
36203
+ const listener = lCleanup[tCleanup[i++]];
36204
+ i++; // increment to the next position;
36205
+ if (listenerElement === nativeElement && eventName === storedEventName) {
36206
+ listeners.push(listener);
36207
+ }
36208
+ }
36209
+ }
36210
+ }
36211
+ return listeners;
36212
+ }
36213
+
35792
36214
  /**
35793
36215
  * A collection that tracks all serialized views (`ngh` DOM annotations)
35794
36216
  * to avoid duplication. An attempt to add a duplicate view results in the
@@ -35897,6 +36319,7 @@ function annotateLContainerForHydration(lContainer, context) {
35897
36319
  *
35898
36320
  * @param appRef An instance of an ApplicationRef.
35899
36321
  * @param doc A reference to the current Document instance.
36322
+ * @return event types that need to be replayed
35900
36323
  */
35901
36324
  function annotateForHydration(appRef, doc) {
35902
36325
  const injector = appRef.injector;
@@ -35904,6 +36327,8 @@ function annotateForHydration(appRef, doc) {
35904
36327
  const serializedViewCollection = new SerializedViewCollection();
35905
36328
  const corruptedTextNodes = new Map();
35906
36329
  const viewRefs = appRef._views;
36330
+ const shouldReplayEvents = injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);
36331
+ const eventTypesToReplay = new Set();
35907
36332
  for (const viewRef of viewRefs) {
35908
36333
  const lNode = getLNodeForHydration(viewRef);
35909
36334
  // An `lView` might be `null` if a `ViewRef` represents
@@ -35914,6 +36339,8 @@ function annotateForHydration(appRef, doc) {
35914
36339
  corruptedTextNodes,
35915
36340
  isI18nHydrationEnabled: isI18nHydrationEnabledVal,
35916
36341
  i18nChildren: new Map(),
36342
+ eventTypesToReplay,
36343
+ shouldReplayEvents,
35917
36344
  };
35918
36345
  if (isLContainer(lNode)) {
35919
36346
  annotateLContainerForHydration(lNode, context);
@@ -35932,6 +36359,7 @@ function annotateForHydration(appRef, doc) {
35932
36359
  const serializedViews = serializedViewCollection.getAll();
35933
36360
  const transferState = injector.get(TransferState);
35934
36361
  transferState.set(NGH_DATA_KEY, serializedViews);
36362
+ return eventTypesToReplay.size > 0 ? eventTypesToReplay : undefined;
35935
36363
  }
35936
36364
  /**
35937
36365
  * Serializes the lContainer data into a list of SerializedView objects,
@@ -36041,10 +36469,16 @@ function serializeLView(lView, context) {
36041
36469
  const ngh = {};
36042
36470
  const tView = lView[TVIEW];
36043
36471
  const i18nChildren = getOrComputeI18nChildren(tView, context);
36472
+ const nativeElementsToEventTypes = context.shouldReplayEvents ?
36473
+ collectDomEventsInfo(tView, lView, context.eventTypesToReplay) :
36474
+ null;
36044
36475
  // Iterate over DOM element references in an LView.
36045
36476
  for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
36046
36477
  const tNode = tView.data[i];
36047
36478
  const noOffsetIndex = i - HEADER_OFFSET;
36479
+ if (nativeElementsToEventTypes) {
36480
+ setJSActionAttribute(tNode, lView[i], nativeElementsToEventTypes);
36481
+ }
36048
36482
  // Attempt to serialize any i18n data for the given slot. We do this first, as i18n
36049
36483
  // has its own process for serialization.
36050
36484
  const i18nData = trySerializeI18nBlock(lView, i, context);
@@ -37065,5 +37499,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
37065
37499
  * Generated bundle index. Do not edit.
37066
37500
  */
37067
37501
 
37068
- export { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostAttributeToken, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, OutputEmitterRef, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterNextRender, afterRender, asNativeElements, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, input, isDevMode, isSignal, isStandalone, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderEventManager as ɵAfterRenderEventManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, EffectScheduler as ɵEffectScheduler, IMAGE_CONFIG as ɵIMAGE_CONFIG, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, PendingTasks as ɵPendingTasks, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, SchedulingMode as ɵSchedulingMode, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZONELESS_ENABLED as ɵZONELESS_ENABLED, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChangesInViewIfRequired as ɵdetectChangesInViewIfRequired, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getOutputDestroyRef as ɵgetOutputDestroyRef, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalAfterNextRender as ɵinternalAfterNextRender, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, provideZonelessChangeDetection as ɵprovideZonelessChangeDetection, queueStateUpdate as ɵqueueStateUpdate, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, ɵsetClassDebugInfo, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, whenStable as ɵwhenStable, withDomHydration as ɵwithDomHydration, withI18nSupport as ɵwithI18nSupport, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateIframeAttribute, ɵɵviewQuery, ɵɵviewQuerySignal };
37502
+ export { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, ExperimentalPendingTasks, HOST_TAG_NAME, Host, HostAttributeToken, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, OutputEmitterRef, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterNextRender, afterRender, asNativeElements, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, input, isDevMode, isSignal, isStandalone, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideExperimentalZonelessChangeDetection, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderEventManager as ɵAfterRenderEventManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, EffectScheduler as ɵEffectScheduler, IMAGE_CONFIG as ɵIMAGE_CONFIG, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, PendingTasks as ɵPendingTasks, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZONELESS_ENABLED as ɵZONELESS_ENABLED, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChangesInViewIfRequired as ɵdetectChangesInViewIfRequired, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getOutputDestroyRef as ɵgetOutputDestroyRef, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalAfterNextRender as ɵinternalAfterNextRender, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, queueStateUpdate as ɵqueueStateUpdate, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, ɵsetClassDebugInfo, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, whenStable as ɵwhenStable, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateIframeAttribute, ɵɵviewQuery, ɵɵviewQuerySignal };
37069
37503
  //# sourceMappingURL=core.mjs.map