@angular/core 14.0.0-next.1 → 14.0.0-next.10

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 (79) hide show
  1. package/core.d.ts +172 -126
  2. package/esm2020/src/application_init.mjs +4 -3
  3. package/esm2020/src/application_module.mjs +5 -104
  4. package/esm2020/src/application_ref.mjs +6 -24
  5. package/esm2020/src/application_tokens.mjs +14 -2
  6. package/esm2020/src/change_detection/change_detection.mjs +2 -3
  7. package/esm2020/src/compiler/compiler_facade_interface.mjs +1 -1
  8. package/esm2020/src/core.mjs +2 -2
  9. package/esm2020/src/core_private_export.mjs +2 -1
  10. package/esm2020/src/core_render3_private_export.mjs +4 -3
  11. package/esm2020/src/debug/debug_node.mjs +137 -53
  12. package/esm2020/src/di/injector_compatibility.mjs +2 -2
  13. package/esm2020/src/di/reflective_provider.mjs +4 -4
  14. package/esm2020/src/i18n/tokens.mjs +39 -3
  15. package/esm2020/src/linker/compiler.mjs +4 -3
  16. package/esm2020/src/linker/ng_module_factory_loader.mjs +2 -2
  17. package/esm2020/src/linker/ng_module_registration.mjs +55 -0
  18. package/esm2020/src/linker/template_ref.mjs +3 -3
  19. package/esm2020/src/linker/view_container_ref.mjs +35 -8
  20. package/esm2020/src/reflection/platform_reflection_capabilities.mjs +1 -1
  21. package/esm2020/src/reflection/reflection_capabilities.mjs +1 -37
  22. package/esm2020/src/render3/component.mjs +3 -3
  23. package/esm2020/src/render3/component_ref.mjs +22 -26
  24. package/esm2020/src/render3/context_discovery.mjs +34 -30
  25. package/esm2020/src/render3/definition.mjs +3 -1
  26. package/esm2020/src/render3/di.mjs +177 -97
  27. package/esm2020/src/render3/hooks.mjs +3 -3
  28. package/esm2020/src/render3/i18n/i18n_parse.mjs +3 -3
  29. package/esm2020/src/render3/index.mjs +2 -2
  30. package/esm2020/src/render3/instructions/element.mjs +7 -1
  31. package/esm2020/src/render3/instructions/element_container.mjs +7 -1
  32. package/esm2020/src/render3/instructions/lview_debug.mjs +7 -4
  33. package/esm2020/src/render3/instructions/shared.mjs +16 -7
  34. package/esm2020/src/render3/interfaces/context.mjs +35 -2
  35. package/esm2020/src/render3/interfaces/definition.mjs +1 -1
  36. package/esm2020/src/render3/interfaces/injector.mjs +1 -1
  37. package/esm2020/src/render3/interfaces/lview_tracking.mjs +33 -0
  38. package/esm2020/src/render3/interfaces/renderer_dom.mjs +1 -1
  39. package/esm2020/src/render3/interfaces/view.mjs +4 -2
  40. package/esm2020/src/render3/jit/directive.mjs +5 -2
  41. package/esm2020/src/render3/jit/environment.mjs +4 -1
  42. package/esm2020/src/render3/jit/module.mjs +7 -1
  43. package/esm2020/src/render3/jit/module_patch.mjs +11 -0
  44. package/esm2020/src/render3/jit/pipe.mjs +5 -2
  45. package/esm2020/src/render3/ng_module_ref.mjs +1 -29
  46. package/esm2020/src/render3/node_manipulation.mjs +12 -3
  47. package/esm2020/src/render3/state.mjs +16 -2
  48. package/esm2020/src/render3/styling/styling_parser.mjs +2 -2
  49. package/esm2020/src/render3/util/discovery_utils.mjs +33 -22
  50. package/esm2020/src/util/coercion.mjs +12 -0
  51. package/esm2020/src/version.mjs +1 -1
  52. package/esm2020/testing/src/fake_async.mjs +3 -2
  53. package/esm2020/testing/src/logger.mjs +3 -3
  54. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  55. package/esm2020/testing/src/r3_test_bed.mjs +8 -2
  56. package/fesm2015/core.mjs +729 -571
  57. package/fesm2015/core.mjs.map +1 -1
  58. package/fesm2015/testing.mjs +10 -3
  59. package/fesm2015/testing.mjs.map +1 -1
  60. package/fesm2020/core.mjs +729 -564
  61. package/fesm2020/core.mjs.map +1 -1
  62. package/fesm2020/testing.mjs +10 -3
  63. package/fesm2020/testing.mjs.map +1 -1
  64. package/package.json +2 -2
  65. package/schematics/migrations/entry-components/util.js +2 -2
  66. package/schematics/migrations/typed-forms/index.d.ts +1 -5
  67. package/schematics/migrations/typed-forms/index.js +12 -34
  68. package/schematics/migrations/typed-forms/util.d.ts +8 -10
  69. package/schematics/migrations/typed-forms/util.js +99 -47
  70. package/schematics/utils/import_manager.js +11 -22
  71. package/schematics/utils/typescript/imports.js +5 -9
  72. package/schematics/utils/typescript/parse_tsconfig.js +6 -2
  73. package/schematics/utils/typescript/symbol.js +4 -3
  74. package/testing/testing.d.ts +3 -2
  75. package/esm2020/src/di/util.mjs +0 -51
  76. package/esm2020/src/linker/ng_module_factory_registration.mjs +0 -59
  77. package/esm2020/src/reflection/reflection.mjs +0 -16
  78. package/esm2020/src/reflection/reflector.mjs +0 -56
  79. package/esm2020/src/reflection/types.mjs +0 -9
package/fesm2015/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.1
2
+ * @license Angular v14.0.0-next.10
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -905,6 +905,7 @@ function ɵɵdefineComponent(componentDefinition) {
905
905
  onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
906
906
  directiveDefs: null,
907
907
  pipeDefs: null,
908
+ standalone: componentDefinition.standalone === true,
908
909
  selectors: componentDefinition.selectors || EMPTY_ARRAY,
909
910
  viewQuery: componentDefinition.viewQuery || null,
910
911
  features: componentDefinition.features || null,
@@ -1116,6 +1117,7 @@ function ɵɵdefinePipe(pipeDef) {
1116
1117
  name: pipeDef.name,
1117
1118
  factory: null,
1118
1119
  pure: pipeDef.pure !== false,
1120
+ standalone: pipeDef.standalone === true,
1119
1121
  onDestroy: pipeDef.type.prototype.ngOnDestroy || null
1120
1122
  };
1121
1123
  }
@@ -1210,6 +1212,8 @@ const DECLARATION_COMPONENT_VIEW = 16;
1210
1212
  const DECLARATION_LCONTAINER = 17;
1211
1213
  const PREORDER_HOOK_FLAGS = 18;
1212
1214
  const QUERIES = 19;
1215
+ const ID = 20;
1216
+ const EMBEDDED_VIEW_INJECTOR = 21;
1213
1217
  /**
1214
1218
  * Size of LView's header. Necessary to adjust for it when setting slots.
1215
1219
  *
@@ -1217,7 +1221,7 @@ const QUERIES = 19;
1217
1221
  * instruction index into `LView` index. All other indexes should be in the `LView` index space and
1218
1222
  * there should be no need to refer to `HEADER_OFFSET` anywhere else.
1219
1223
  */
1220
- const HEADER_OFFSET = 20;
1224
+ const HEADER_OFFSET = 22;
1221
1225
  /**
1222
1226
  * Converts `TViewType` into human readable text.
1223
1227
  * Make sure this matches with `TViewType`
@@ -1921,6 +1925,7 @@ function getLView() {
1921
1925
  function getTView() {
1922
1926
  return instructionState.lFrame.tView;
1923
1927
  }
1928
+ // TODO(crisbeto): revert the @noinline once Closure issue is resolved.
1924
1929
  /**
1925
1930
  * Restores `contextViewData` to the given OpaqueViewState instance.
1926
1931
  *
@@ -1932,11 +1937,22 @@ function getTView() {
1932
1937
  * @returns Context of the restored OpaqueViewState instance.
1933
1938
  *
1934
1939
  * @codeGenApi
1940
+ * @noinline Disable inlining due to issue with Closure in listeners inside embedded views.
1935
1941
  */
1936
1942
  function ɵɵrestoreView(viewToRestore) {
1937
1943
  instructionState.lFrame.contextLView = viewToRestore;
1938
1944
  return viewToRestore[CONTEXT];
1939
1945
  }
1946
+ /**
1947
+ * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
1948
+ * value so that it can be used as a return value of an instruction.
1949
+ *
1950
+ * @codeGenApi
1951
+ */
1952
+ function ɵɵresetView(value) {
1953
+ instructionState.lFrame.contextLView = null;
1954
+ return value;
1955
+ }
1940
1956
  function getCurrentTNode() {
1941
1957
  let currentTNode = getCurrentTNodePlaceholderOk();
1942
1958
  while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) {
@@ -1968,7 +1984,9 @@ function setCurrentTNodeAsParent() {
1968
1984
  instructionState.lFrame.isParent = true;
1969
1985
  }
1970
1986
  function getContextLView() {
1971
- return instructionState.lFrame.contextLView;
1987
+ const contextLView = instructionState.lFrame.contextLView;
1988
+ ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
1989
+ return contextLView;
1972
1990
  }
1973
1991
  function isInCheckNoChangesMode() {
1974
1992
  // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
@@ -2467,7 +2485,7 @@ function incrementInitPhaseFlags(lView, initPhase) {
2467
2485
  assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');
2468
2486
  let flags = lView[FLAGS];
2469
2487
  if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {
2470
- flags &= 2047 /* IndexWithinInitPhaseReset */;
2488
+ flags &= 4095 /* IndexWithinInitPhaseReset */;
2471
2489
  flags += 1 /* InitPhaseStateIncrementer */;
2472
2490
  lView[FLAGS] = flags;
2473
2491
  }
@@ -2531,12 +2549,12 @@ function callHook(currentView, initPhase, arr, i) {
2531
2549
  const directiveIndex = isInitHook ? -arr[i] : arr[i];
2532
2550
  const directive = currentView[directiveIndex];
2533
2551
  if (isInitHook) {
2534
- const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */;
2552
+ const indexWithintInitPhase = currentView[FLAGS] >> 12 /* IndexWithinInitPhaseShift */;
2535
2553
  // The init phase state must be always checked here as it may have been recursively updated.
2536
2554
  if (indexWithintInitPhase <
2537
2555
  (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&
2538
2556
  (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {
2539
- currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */;
2557
+ currentView[FLAGS] += 4096 /* IndexWithinInitPhaseIncrementer */;
2540
2558
  profiler(4 /* LifecycleHookStart */, directive, hook);
2541
2559
  try {
2542
2560
  hook.call(directive);
@@ -3097,6 +3115,8 @@ const BLOOM_MASK = BLOOM_SIZE - 1;
3097
3115
  const BLOOM_BUCKET_BITS = 5;
3098
3116
  /** Counter used to generate unique IDs for directives. */
3099
3117
  let nextNgElementId = 0;
3118
+ /** Value used when something wasn't found by an injector. */
3119
+ const NOT_FOUND = {};
3100
3120
  /**
3101
3121
  * Registers this directive as present in its node's injector by flipping the directive's
3102
3122
  * corresponding bit in the injector's bloom filter.
@@ -3208,23 +3228,7 @@ function getParentInjectorLocation(tNode, lView) {
3208
3228
  // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent
3209
3229
  // `NodeInjector`.
3210
3230
  while (lViewCursor !== null) {
3211
- // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.
3212
- const tView = lViewCursor[TVIEW];
3213
- const tViewType = tView.type;
3214
- if (tViewType === 2 /* Embedded */) {
3215
- ngDevMode &&
3216
- assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
3217
- parentTNode = tView.declTNode;
3218
- }
3219
- else if (tViewType === 1 /* Component */) {
3220
- // Components don't have `TView.declTNode` because each instance of component could be
3221
- // inserted in different location, hence `TView.declTNode` is meaningless.
3222
- parentTNode = lViewCursor[T_HOST];
3223
- }
3224
- else {
3225
- ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');
3226
- parentTNode = null;
3227
- }
3231
+ parentTNode = getTNodeFromLView(lViewCursor);
3228
3232
  if (parentTNode === null) {
3229
3233
  // If we have no parent, than we are done.
3230
3234
  return NO_PARENT_INJECTOR;
@@ -3385,93 +3389,116 @@ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
3385
3389
  */
3386
3390
  function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {
3387
3391
  if (tNode !== null) {
3388
- const bloomHash = bloomHashBitOrFactory(token);
3389
- // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
3390
- // so just call the factory function to create it.
3391
- if (typeof bloomHash === 'function') {
3392
- if (!enterDI(lView, tNode, flags)) {
3393
- // Failed to enter DI, try module injector instead. If a token is injected with the @Host
3394
- // flag, the module injector is not searched for that token in Ivy.
3395
- return (flags & InjectFlags.Host) ?
3396
- notFoundValueOrThrow(notFoundValue, token, flags) :
3397
- lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3392
+ // If the view or any of its ancestors have an embedded
3393
+ // view injector, we have to look it up there first.
3394
+ if (lView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) {
3395
+ const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);
3396
+ if (embeddedInjectorValue !== NOT_FOUND) {
3397
+ return embeddedInjectorValue;
3398
3398
  }
3399
- try {
3400
- const value = bloomHash(flags);
3401
- if (value == null && !(flags & InjectFlags.Optional)) {
3402
- throwProviderNotFoundError(token);
3403
- }
3404
- else {
3405
- return value;
3406
- }
3399
+ }
3400
+ // Otherwise try the node injector.
3401
+ const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);
3402
+ if (value !== NOT_FOUND) {
3403
+ return value;
3404
+ }
3405
+ }
3406
+ // Finally, fall back to the module injector.
3407
+ return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3408
+ }
3409
+ /**
3410
+ * Returns the value associated to the given token from the node injector.
3411
+ *
3412
+ * @param tNode The Node where the search for the injector should start
3413
+ * @param lView The `LView` that contains the `tNode`
3414
+ * @param token The token to look for
3415
+ * @param flags Injection flags
3416
+ * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
3417
+ * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
3418
+ */
3419
+ function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
3420
+ const bloomHash = bloomHashBitOrFactory(token);
3421
+ // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
3422
+ // so just call the factory function to create it.
3423
+ if (typeof bloomHash === 'function') {
3424
+ if (!enterDI(lView, tNode, flags)) {
3425
+ // Failed to enter DI, try module injector instead. If a token is injected with the @Host
3426
+ // flag, the module injector is not searched for that token in Ivy.
3427
+ return (flags & InjectFlags.Host) ?
3428
+ notFoundValueOrThrow(notFoundValue, token, flags) :
3429
+ lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3430
+ }
3431
+ try {
3432
+ const value = bloomHash(flags);
3433
+ if (value == null && !(flags & InjectFlags.Optional)) {
3434
+ throwProviderNotFoundError(token);
3407
3435
  }
3408
- finally {
3409
- leaveDI();
3410
- }
3411
- }
3412
- else if (typeof bloomHash === 'number') {
3413
- // A reference to the previous injector TView that was found while climbing the element
3414
- // injector tree. This is used to know if viewProviders can be accessed on the current
3415
- // injector.
3416
- let previousTView = null;
3417
- let injectorIndex = getInjectorIndex(tNode, lView);
3418
- let parentLocation = NO_PARENT_INJECTOR;
3419
- let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
3420
- // If we should skip this injector, or if there is no injector on this node, start by
3421
- // searching the parent injector.
3422
- if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
3423
- parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
3424
- lView[injectorIndex + 8 /* PARENT */];
3425
- if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
3426
- injectorIndex = -1;
3427
- }
3428
- else {
3429
- previousTView = lView[TVIEW];
3430
- injectorIndex = getParentInjectorIndex(parentLocation);
3431
- lView = getParentInjectorView(parentLocation, lView);
3432
- }
3436
+ else {
3437
+ return value;
3433
3438
  }
3434
- // Traverse up the injector tree until we find a potential match or until we know there
3435
- // *isn't* a match.
3436
- while (injectorIndex !== -1) {
3437
- ngDevMode && assertNodeInjector(lView, injectorIndex);
3438
- // Check the current injector. If it matches, see if it contains token.
3439
- const tView = lView[TVIEW];
3440
- ngDevMode &&
3441
- assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
3442
- if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
3443
- // At this point, we have an injector which *may* contain the token, so we step through
3444
- // the providers and directives associated with the injector's corresponding node to get
3445
- // the instance.
3446
- const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
3447
- if (instance !== NOT_FOUND) {
3448
- return instance;
3449
- }
3450
- }
3451
- parentLocation = lView[injectorIndex + 8 /* PARENT */];
3452
- if (parentLocation !== NO_PARENT_INJECTOR &&
3453
- shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
3454
- bloomHasToken(bloomHash, injectorIndex, lView)) {
3455
- // The def wasn't found anywhere on this node, so it was a false positive.
3456
- // Traverse up the tree and continue searching.
3457
- previousTView = tView;
3458
- injectorIndex = getParentInjectorIndex(parentLocation);
3459
- lView = getParentInjectorView(parentLocation, lView);
3460
- }
3461
- else {
3462
- // If we should not search parent OR If the ancestor bloom filter value does not have the
3463
- // bit corresponding to the directive we can give up on traversing up to find the specific
3464
- // injector.
3465
- injectorIndex = -1;
3439
+ }
3440
+ finally {
3441
+ leaveDI();
3442
+ }
3443
+ }
3444
+ else if (typeof bloomHash === 'number') {
3445
+ // A reference to the previous injector TView that was found while climbing the element
3446
+ // injector tree. This is used to know if viewProviders can be accessed on the current
3447
+ // injector.
3448
+ let previousTView = null;
3449
+ let injectorIndex = getInjectorIndex(tNode, lView);
3450
+ let parentLocation = NO_PARENT_INJECTOR;
3451
+ let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
3452
+ // If we should skip this injector, or if there is no injector on this node, start by
3453
+ // searching the parent injector.
3454
+ if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
3455
+ parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
3456
+ lView[injectorIndex + 8 /* PARENT */];
3457
+ if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
3458
+ injectorIndex = -1;
3459
+ }
3460
+ else {
3461
+ previousTView = lView[TVIEW];
3462
+ injectorIndex = getParentInjectorIndex(parentLocation);
3463
+ lView = getParentInjectorView(parentLocation, lView);
3464
+ }
3465
+ }
3466
+ // Traverse up the injector tree until we find a potential match or until we know there
3467
+ // *isn't* a match.
3468
+ while (injectorIndex !== -1) {
3469
+ ngDevMode && assertNodeInjector(lView, injectorIndex);
3470
+ // Check the current injector. If it matches, see if it contains token.
3471
+ const tView = lView[TVIEW];
3472
+ ngDevMode &&
3473
+ assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
3474
+ if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
3475
+ // At this point, we have an injector which *may* contain the token, so we step through
3476
+ // the providers and directives associated with the injector's corresponding node to get
3477
+ // the instance.
3478
+ const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
3479
+ if (instance !== NOT_FOUND) {
3480
+ return instance;
3466
3481
  }
3467
3482
  }
3483
+ parentLocation = lView[injectorIndex + 8 /* PARENT */];
3484
+ if (parentLocation !== NO_PARENT_INJECTOR &&
3485
+ shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
3486
+ bloomHasToken(bloomHash, injectorIndex, lView)) {
3487
+ // The def wasn't found anywhere on this node, so it was a false positive.
3488
+ // Traverse up the tree and continue searching.
3489
+ previousTView = tView;
3490
+ injectorIndex = getParentInjectorIndex(parentLocation);
3491
+ lView = getParentInjectorView(parentLocation, lView);
3492
+ }
3493
+ else {
3494
+ // If we should not search parent OR If the ancestor bloom filter value does not have the
3495
+ // bit corresponding to the directive we can give up on traversing up to find the specific
3496
+ // injector.
3497
+ injectorIndex = -1;
3498
+ }
3468
3499
  }
3469
3500
  }
3470
- return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3471
- }
3472
- const NOT_FOUND = {};
3473
- function createNodeInjector() {
3474
- return new NodeInjector(getCurrentTNode(), getLView());
3501
+ return notFoundValue;
3475
3502
  }
3476
3503
  function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
3477
3504
  const currentTView = lView[TVIEW];
@@ -3645,6 +3672,10 @@ class NodeInjector {
3645
3672
  return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);
3646
3673
  }
3647
3674
  }
3675
+ /** Creates a `NodeInjector` for the current node. */
3676
+ function createNodeInjector() {
3677
+ return new NodeInjector(getCurrentTNode(), getLView());
3678
+ }
3648
3679
  /**
3649
3680
  * @codeGenApi
3650
3681
  */
@@ -3683,6 +3714,73 @@ function getFactoryOf(type) {
3683
3714
  }
3684
3715
  return getFactoryDef(type);
3685
3716
  }
3717
+ /**
3718
+ * Returns a value from the closest embedded or node injector.
3719
+ *
3720
+ * @param tNode The Node where the search for the injector should start
3721
+ * @param lView The `LView` that contains the `tNode`
3722
+ * @param token The token to look for
3723
+ * @param flags Injection flags
3724
+ * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
3725
+ * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
3726
+ */
3727
+ function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
3728
+ let currentTNode = tNode;
3729
+ let currentLView = lView;
3730
+ // When an LView with an embedded view injector is inserted, it'll likely be interlaced with
3731
+ // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).
3732
+ // Since the bloom filters for the node injectors have already been constructed and we don't
3733
+ // have a way of extracting the records from an injector, the only way to maintain the correct
3734
+ // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve
3735
+ // the token at each level.
3736
+ while (currentTNode !== null && currentLView !== null &&
3737
+ (currentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) &&
3738
+ !(currentLView[FLAGS] & 512 /* IsRoot */)) {
3739
+ ngDevMode && assertTNodeForLView(currentTNode, currentLView);
3740
+ // Note that this lookup on the node injector is using the `Self` flag, because
3741
+ // we don't want the node injector to look at any parent injectors since we
3742
+ // may hit the embedded view injector first.
3743
+ const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);
3744
+ if (nodeInjectorValue !== NOT_FOUND) {
3745
+ return nodeInjectorValue;
3746
+ }
3747
+ // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191
3748
+ let parentTNode = currentTNode.parent;
3749
+ // `TNode.parent` includes the parent within the current view only. If it doesn't exist,
3750
+ // it means that we've hit the view boundary and we need to go up to the next view.
3751
+ if (!parentTNode) {
3752
+ // Before we go to the next LView, check if the token exists on the current embedded injector.
3753
+ const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
3754
+ if (embeddedViewInjector) {
3755
+ const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);
3756
+ if (embeddedViewInjectorValue !== NOT_FOUND) {
3757
+ return embeddedViewInjectorValue;
3758
+ }
3759
+ }
3760
+ // Otherwise keep going up the tree.
3761
+ parentTNode = getTNodeFromLView(currentLView);
3762
+ currentLView = currentLView[DECLARATION_VIEW];
3763
+ }
3764
+ currentTNode = parentTNode;
3765
+ }
3766
+ return notFoundValue;
3767
+ }
3768
+ /** Gets the TNode associated with an LView inside of the declaration view. */
3769
+ function getTNodeFromLView(lView) {
3770
+ const tView = lView[TVIEW];
3771
+ const tViewType = tView.type;
3772
+ // The parent pointer differs based on `TView.type`.
3773
+ if (tViewType === 2 /* Embedded */) {
3774
+ ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
3775
+ return tView.declTNode;
3776
+ }
3777
+ else if (tViewType === 1 /* Component */) {
3778
+ // Components don't have `TView.declTNode` because each instance of component could be
3779
+ // inserted in different location, hence `TView.declTNode` is meaningless.
3780
+ return lView[T_HOST];
3781
+ }
3782
+ return null;
3783
+ }
3686
3784
 
3687
3785
  /**
3688
3786
  * @license
@@ -4492,9 +4590,6 @@ class ReflectionCapabilities {
4492
4590
  constructor(reflect) {
4493
4591
  this._reflect = reflect || _global['Reflect'];
4494
4592
  }
4495
- isReflectionEnabled() {
4496
- return true;
4497
- }
4498
4593
  factory(t) {
4499
4594
  return (...args) => new t(...args);
4500
4595
  }
@@ -4666,38 +4761,6 @@ class ReflectionCapabilities {
4666
4761
  hasLifecycleHook(type, lcProperty) {
4667
4762
  return type instanceof Type && lcProperty in type.prototype;
4668
4763
  }
4669
- guards(type) {
4670
- return {};
4671
- }
4672
- getter(name) {
4673
- return new Function('o', 'return o.' + name + ';');
4674
- }
4675
- setter(name) {
4676
- return new Function('o', 'v', 'return o.' + name + ' = v;');
4677
- }
4678
- method(name) {
4679
- const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined');
4680
- return o.${name}.apply(o, args);`;
4681
- return new Function('o', 'args', functionBody);
4682
- }
4683
- // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
4684
- importUri(type) {
4685
- // StaticSymbol
4686
- if (typeof type === 'object' && type['filePath']) {
4687
- return type['filePath'];
4688
- }
4689
- // Runtime type
4690
- return `./${stringify(type)}`;
4691
- }
4692
- resourceUri(type) {
4693
- return `./${stringify(type)}`;
4694
- }
4695
- resolveIdentifier(name, moduleUrl, members, runtime) {
4696
- return runtime;
4697
- }
4698
- resolveEnum(enumIdentifier, name) {
4699
- return enumIdentifier[name];
4700
- }
4701
4764
  }
4702
4765
  function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
4703
4766
  if (!decoratorInvocations) {
@@ -4885,7 +4948,7 @@ function catchInjectorError(e, token, injectorErrorName, source) {
4885
4948
  throw e;
4886
4949
  }
4887
4950
  function formatError(text, obj, injectorErrorName, source = null) {
4888
- text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;
4951
+ text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;
4889
4952
  let context = stringify(obj);
4890
4953
  if (Array.isArray(obj)) {
4891
4954
  context = obj.map(stringify).join(' -> ');
@@ -5144,6 +5207,60 @@ function componentDefResolved(type) {
5144
5207
  componentDefPendingResolution.delete(type);
5145
5208
  }
5146
5209
 
5210
+ /**
5211
+ * @license
5212
+ * Copyright Google LLC All Rights Reserved.
5213
+ *
5214
+ * Use of this source code is governed by an MIT-style license that can be
5215
+ * found in the LICENSE file at https://angular.io/license
5216
+ */
5217
+ /**
5218
+ * Map of module-id to the corresponding NgModule.
5219
+ */
5220
+ const modules = new Map();
5221
+ /**
5222
+ * Whether to check for duplicate NgModule registrations.
5223
+ *
5224
+ * This can be disabled for testing.
5225
+ */
5226
+ let checkForDuplicateNgModules = true;
5227
+ function assertSameOrNotExisting(id, type, incoming) {
5228
+ if (type && type !== incoming && checkForDuplicateNgModules) {
5229
+ throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
5230
+ }
5231
+ }
5232
+ /**
5233
+ * Adds the given NgModule type to Angular's NgModule registry.
5234
+ *
5235
+ * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in
5236
+ * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a
5237
+ * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be
5238
+ * fully resolved when it's registered.
5239
+ *
5240
+ * @codeGenApi
5241
+ */
5242
+ function registerNgModuleType(ngModuleType, id) {
5243
+ const existing = modules.get(id) || null;
5244
+ assertSameOrNotExisting(id, existing, ngModuleType);
5245
+ modules.set(id, ngModuleType);
5246
+ }
5247
+ function clearModulesForTest() {
5248
+ modules.clear();
5249
+ }
5250
+ function getRegisteredNgModuleType(id) {
5251
+ return modules.get(id);
5252
+ }
5253
+ /**
5254
+ * Control whether the NgModule registration system enforces that each NgModule type registered has
5255
+ * a unique id.
5256
+ *
5257
+ * This is useful for testing as the NgModule registry cannot be properly reset between tests with
5258
+ * Angular's current API.
5259
+ */
5260
+ function setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {
5261
+ checkForDuplicateNgModules = !allowDuplicates;
5262
+ }
5263
+
5147
5264
  /**
5148
5265
  * @license
5149
5266
  * Copyright Google LLC All Rights Reserved.
@@ -6155,6 +6272,78 @@ function getSanitizer() {
6155
6272
  return lView && lView[SANITIZER];
6156
6273
  }
6157
6274
 
6275
+ /**
6276
+ * @license
6277
+ * Copyright Google LLC All Rights Reserved.
6278
+ *
6279
+ * Use of this source code is governed by an MIT-style license that can be
6280
+ * found in the LICENSE file at https://angular.io/license
6281
+ */
6282
+ // Keeps track of the currently-active LViews.
6283
+ const TRACKED_LVIEWS = new Map();
6284
+ // Used for generating unique IDs for LViews.
6285
+ let uniqueIdCounter = 0;
6286
+ /** Gets a unique ID that can be assigned to an LView. */
6287
+ function getUniqueLViewId() {
6288
+ return uniqueIdCounter++;
6289
+ }
6290
+ /** Starts tracking an LView. */
6291
+ function registerLView(lView) {
6292
+ ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');
6293
+ TRACKED_LVIEWS.set(lView[ID], lView);
6294
+ }
6295
+ /** Gets an LView by its unique ID. */
6296
+ function getLViewById(id) {
6297
+ ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');
6298
+ return TRACKED_LVIEWS.get(id) || null;
6299
+ }
6300
+ /** Stops tracking an LView. */
6301
+ function unregisterLView(lView) {
6302
+ ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');
6303
+ TRACKED_LVIEWS.delete(lView[ID]);
6304
+ }
6305
+
6306
+ /**
6307
+ * @license
6308
+ * Copyright Google LLC All Rights Reserved.
6309
+ *
6310
+ * Use of this source code is governed by an MIT-style license that can be
6311
+ * found in the LICENSE file at https://angular.io/license
6312
+ */
6313
+ /**
6314
+ * The internal view context which is specific to a given DOM element, directive or
6315
+ * component instance. Each value in here (besides the LView and element node details)
6316
+ * can be present, null or undefined. If undefined then it implies the value has not been
6317
+ * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
6318
+ *
6319
+ * Each value will get filled when the respective value is examined within the getContext
6320
+ * function. The component, element and each directive instance will share the same instance
6321
+ * of the context.
6322
+ */
6323
+ class LContext {
6324
+ constructor(
6325
+ /**
6326
+ * ID of the component's parent view data.
6327
+ */
6328
+ lViewId,
6329
+ /**
6330
+ * The index instance of the node.
6331
+ */
6332
+ nodeIndex,
6333
+ /**
6334
+ * The instance of the DOM node that is attached to the lNode.
6335
+ */
6336
+ native) {
6337
+ this.lViewId = lViewId;
6338
+ this.nodeIndex = nodeIndex;
6339
+ this.native = native;
6340
+ }
6341
+ /** Component's parent view data. */
6342
+ get lView() {
6343
+ return getLViewById(this.lViewId);
6344
+ }
6345
+ }
6346
+
6158
6347
  /**
6159
6348
  * @license
6160
6349
  * Copyright Google LLC All Rights Reserved.
@@ -6187,7 +6376,7 @@ function getLContext(target) {
6187
6376
  if (mpValue) {
6188
6377
  // only when it's an array is it considered an LView instance
6189
6378
  // ... otherwise it's an already constructed LContext instance
6190
- if (Array.isArray(mpValue)) {
6379
+ if (isLView(mpValue)) {
6191
6380
  const lView = mpValue;
6192
6381
  let nodeIndex;
6193
6382
  let component = undefined;
@@ -6246,13 +6435,7 @@ function getLContext(target) {
6246
6435
  while (parent = parent.parentNode) {
6247
6436
  const parentContext = readPatchedData(parent);
6248
6437
  if (parentContext) {
6249
- let lView;
6250
- if (Array.isArray(parentContext)) {
6251
- lView = parentContext;
6252
- }
6253
- else {
6254
- lView = parentContext.lView;
6255
- }
6438
+ const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;
6256
6439
  // the edge of the app was also reached here through another means
6257
6440
  // (maybe because the DOM was changed manually).
6258
6441
  if (!lView) {
@@ -6275,14 +6458,7 @@ function getLContext(target) {
6275
6458
  * Creates an empty instance of a `LContext` context
6276
6459
  */
6277
6460
  function createLContext(lView, nodeIndex, native) {
6278
- return {
6279
- lView,
6280
- nodeIndex,
6281
- native,
6282
- component: undefined,
6283
- directives: undefined,
6284
- localRefs: undefined,
6285
- };
6461
+ return new LContext(lView[ID], nodeIndex, native);
6286
6462
  }
6287
6463
  /**
6288
6464
  * Takes a component instance and returns the view for that component.
@@ -6291,21 +6467,24 @@ function createLContext(lView, nodeIndex, native) {
6291
6467
  * @returns The component's view
6292
6468
  */
6293
6469
  function getComponentViewByInstance(componentInstance) {
6294
- let lView = readPatchedData(componentInstance);
6295
- let view;
6296
- if (Array.isArray(lView)) {
6297
- const nodeIndex = findViaComponent(lView, componentInstance);
6298
- view = getComponentLViewByIndex(nodeIndex, lView);
6299
- const context = createLContext(lView, nodeIndex, view[HOST]);
6470
+ let patchedData = readPatchedData(componentInstance);
6471
+ let lView;
6472
+ if (isLView(patchedData)) {
6473
+ const contextLView = patchedData;
6474
+ const nodeIndex = findViaComponent(contextLView, componentInstance);
6475
+ lView = getComponentLViewByIndex(nodeIndex, contextLView);
6476
+ const context = createLContext(contextLView, nodeIndex, lView[HOST]);
6300
6477
  context.component = componentInstance;
6301
6478
  attachPatchData(componentInstance, context);
6302
6479
  attachPatchData(context.native, context);
6303
6480
  }
6304
6481
  else {
6305
- const context = lView;
6306
- view = getComponentLViewByIndex(context.nodeIndex, context.lView);
6482
+ const context = patchedData;
6483
+ const contextLView = context.lView;
6484
+ ngDevMode && assertLView(contextLView);
6485
+ lView = getComponentLViewByIndex(context.nodeIndex, contextLView);
6307
6486
  }
6308
- return view;
6487
+ return lView;
6309
6488
  }
6310
6489
  /**
6311
6490
  * This property will be monkey-patched on elements, components and directives.
@@ -6317,7 +6496,16 @@ const MONKEY_PATCH_KEY_NAME = '__ngContext__';
6317
6496
  */
6318
6497
  function attachPatchData(target, data) {
6319
6498
  ngDevMode && assertDefined(target, 'Target expected');
6320
- target[MONKEY_PATCH_KEY_NAME] = data;
6499
+ // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this
6500
+ // for `LView`, because we have control over when an `LView` is created and destroyed, whereas
6501
+ // we can't know when to remove an `LContext`.
6502
+ if (isLView(data)) {
6503
+ target[MONKEY_PATCH_KEY_NAME] = data[ID];
6504
+ registerLView(data);
6505
+ }
6506
+ else {
6507
+ target[MONKEY_PATCH_KEY_NAME] = data;
6508
+ }
6321
6509
  }
6322
6510
  /**
6323
6511
  * Returns the monkey-patch value data present on the target (which could be
@@ -6325,12 +6513,13 @@ function attachPatchData(target, data) {
6325
6513
  */
6326
6514
  function readPatchedData(target) {
6327
6515
  ngDevMode && assertDefined(target, 'Target expected');
6328
- return target[MONKEY_PATCH_KEY_NAME] || null;
6516
+ const data = target[MONKEY_PATCH_KEY_NAME];
6517
+ return (typeof data === 'number') ? getLViewById(data) : data || null;
6329
6518
  }
6330
6519
  function readPatchedLView(target) {
6331
6520
  const value = readPatchedData(target);
6332
6521
  if (value) {
6333
- return Array.isArray(value) ? value : value.lView;
6522
+ return isLView(value) ? value : value.lView;
6334
6523
  }
6335
6524
  return null;
6336
6525
  }
@@ -7277,6 +7466,8 @@ function cleanUpView(tView, lView) {
7277
7466
  lQueries.detachView(tView);
7278
7467
  }
7279
7468
  }
7469
+ // Unregister the view once everything else has been cleaned up.
7470
+ unregisterLView(lView);
7280
7471
  }
7281
7472
  }
7282
7473
  /** Removes listeners and unsubscribes from output subscriptions */
@@ -7444,7 +7635,8 @@ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
7444
7635
  renderer.insertBefore(parent, child, beforeNode, isMove);
7445
7636
  }
7446
7637
  else {
7447
- parent.insertBefore(child, beforeNode, isMove);
7638
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7639
+ targetParent.insertBefore(child, beforeNode, isMove);
7448
7640
  }
7449
7641
  }
7450
7642
  function nativeAppendChild(renderer, parent, child) {
@@ -7454,7 +7646,8 @@ function nativeAppendChild(renderer, parent, child) {
7454
7646
  renderer.appendChild(parent, child);
7455
7647
  }
7456
7648
  else {
7457
- parent.appendChild(child);
7649
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7650
+ targetParent.appendChild(child);
7458
7651
  }
7459
7652
  }
7460
7653
  function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
@@ -7474,6 +7667,10 @@ function nativeRemoveChild(renderer, parent, child, isHostElement) {
7474
7667
  parent.removeChild(child);
7475
7668
  }
7476
7669
  }
7670
+ /** Checks if an element is a `<template>` node. */
7671
+ function isTemplateNode(node) {
7672
+ return node.tagName === 'TEMPLATE' && node.content !== undefined;
7673
+ }
7477
7674
  /**
7478
7675
  * Returns a native parent of a given native node.
7479
7676
  */
@@ -8643,7 +8840,7 @@ function nameSuffix(text) {
8643
8840
  if (text == null)
8644
8841
  return '';
8645
8842
  const index = text.lastIndexOf('_Template');
8646
- return '_' + (index === -1 ? text : text.substr(0, index));
8843
+ return '_' + (index === -1 ? text : text.slice(0, index));
8647
8844
  }
8648
8845
  /**
8649
8846
  * This class is a debug version of Object literal so that we can have constructor name show up
@@ -8994,7 +9191,7 @@ class LViewDebug {
8994
9191
  attached: !!(flags & 128 /* Attached */),
8995
9192
  destroyed: !!(flags & 256 /* Destroyed */),
8996
9193
  isRoot: !!(flags & 512 /* IsRoot */),
8997
- indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */,
9194
+ indexWithinInitPhase: flags >> 12 /* IndexWithinInitPhaseShift */,
8998
9195
  };
8999
9196
  }
9000
9197
  get parent() {
@@ -9057,6 +9254,9 @@ class LViewDebug {
9057
9254
  get tHost() {
9058
9255
  return this._raw_lView[T_HOST];
9059
9256
  }
9257
+ get id() {
9258
+ return this._raw_lView[ID];
9259
+ }
9060
9260
  get decls() {
9061
9261
  return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
9062
9262
  }
@@ -9286,10 +9486,14 @@ function renderChildComponents(hostLView, components) {
9286
9486
  renderComponent$1(hostLView, components[i]);
9287
9487
  }
9288
9488
  }
9289
- function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
9489
+ function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
9290
9490
  const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
9291
9491
  lView[HOST] = host;
9292
9492
  lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;
9493
+ if (embeddedViewInjector !== null ||
9494
+ (parentLView && (parentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */))) {
9495
+ lView[FLAGS] |= 2048 /* HasEmbeddedViewInjector */;
9496
+ }
9293
9497
  resetPreOrderHookFlags(lView);
9294
9498
  ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
9295
9499
  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
@@ -9301,6 +9505,8 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
9301
9505
  lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;
9302
9506
  lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;
9303
9507
  lView[T_HOST] = tHostNode;
9508
+ lView[ID] = getUniqueLViewId();
9509
+ lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
9304
9510
  ngDevMode &&
9305
9511
  assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
9306
9512
  lView[DECLARATION_COMPONENT_VIEW] =
@@ -10309,7 +10515,6 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
10309
10515
  function invokeDirectivesHostBindings(tView, lView, tNode) {
10310
10516
  const start = tNode.directiveStart;
10311
10517
  const end = tNode.directiveEnd;
10312
- const firstCreatePass = tView.firstCreatePass;
10313
10518
  const elementIndex = tNode.index;
10314
10519
  const currentDirectiveIndex = getCurrentDirectiveIndex();
10315
10520
  try {
@@ -10456,7 +10661,7 @@ function addComponentLogic(lView, hostTNode, def) {
10456
10661
  // Only component views should be added to the view tree directly. Embedded views are
10457
10662
  // accessed through their containers because they may be removed / re-added later.
10458
10663
  const rendererFactory = lView[RENDERER_FACTORY];
10459
- const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));
10664
+ const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));
10460
10665
  // Component view will always be created before any injected LContainers,
10461
10666
  // so this is a regular element, wrap it with the component view
10462
10667
  lView[hostTNode.index] = componentView;
@@ -10825,8 +11030,11 @@ function tickRootContext(rootContext) {
10825
11030
  for (let i = 0; i < rootContext.components.length; i++) {
10826
11031
  const rootComponent = rootContext.components[i];
10827
11032
  const lView = readPatchedLView(rootComponent);
10828
- const tView = lView[TVIEW];
10829
- renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
11033
+ // We might not have an `LView` if the component was destroyed.
11034
+ if (lView !== null) {
11035
+ const tView = lView[TVIEW];
11036
+ renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
11037
+ }
10830
11038
  }
10831
11039
  }
10832
11040
  function detectChangesInternal(tView, lView, context) {
@@ -11685,12 +11893,16 @@ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */;
11685
11893
  * @globalApi ng
11686
11894
  */
11687
11895
  function getComponent$1(element) {
11688
- assertDomElement(element);
11896
+ ngDevMode && assertDomElement(element);
11689
11897
  const context = getLContext(element);
11690
11898
  if (context === null)
11691
11899
  return null;
11692
11900
  if (context.component === undefined) {
11693
- context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);
11901
+ const lView = context.lView;
11902
+ if (lView === null) {
11903
+ return null;
11904
+ }
11905
+ context.component = getComponentAtNodeIndex(context.nodeIndex, lView);
11694
11906
  }
11695
11907
  return context.component;
11696
11908
  }
@@ -11709,7 +11921,8 @@ function getComponent$1(element) {
11709
11921
  function getContext(element) {
11710
11922
  assertDomElement(element);
11711
11923
  const context = getLContext(element);
11712
- return context === null ? null : context.lView[CONTEXT];
11924
+ const lView = context ? context.lView : null;
11925
+ return lView === null ? null : lView[CONTEXT];
11713
11926
  }
11714
11927
  /**
11715
11928
  * Retrieves the component instance whose view contains the DOM element.
@@ -11728,11 +11941,10 @@ function getContext(element) {
11728
11941
  */
11729
11942
  function getOwningComponent(elementOrDir) {
11730
11943
  const context = getLContext(elementOrDir);
11731
- if (context === null)
11944
+ let lView = context ? context.lView : null;
11945
+ if (lView === null)
11732
11946
  return null;
11733
- let lView = context.lView;
11734
11947
  let parent;
11735
- ngDevMode && assertLView(lView);
11736
11948
  while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {
11737
11949
  lView = parent;
11738
11950
  }
@@ -11750,7 +11962,8 @@ function getOwningComponent(elementOrDir) {
11750
11962
  * @globalApi ng
11751
11963
  */
11752
11964
  function getRootComponents(elementOrDir) {
11753
- return [...getRootContext(elementOrDir).components];
11965
+ const lView = readPatchedLView(elementOrDir);
11966
+ return lView !== null ? [...getRootContext(lView).components] : [];
11754
11967
  }
11755
11968
  /**
11756
11969
  * Retrieves an `Injector` associated with an element, component or directive instance.
@@ -11764,10 +11977,11 @@ function getRootComponents(elementOrDir) {
11764
11977
  */
11765
11978
  function getInjector(elementOrDir) {
11766
11979
  const context = getLContext(elementOrDir);
11767
- if (context === null)
11980
+ const lView = context ? context.lView : null;
11981
+ if (lView === null)
11768
11982
  return Injector.NULL;
11769
- const tNode = context.lView[TVIEW].data[context.nodeIndex];
11770
- return new NodeInjector(tNode, context.lView);
11983
+ const tNode = lView[TVIEW].data[context.nodeIndex];
11984
+ return new NodeInjector(tNode, lView);
11771
11985
  }
11772
11986
  /**
11773
11987
  * Retrieve a set of injection tokens at a given DOM node.
@@ -11776,9 +11990,9 @@ function getInjector(elementOrDir) {
11776
11990
  */
11777
11991
  function getInjectionTokens(element) {
11778
11992
  const context = getLContext(element);
11779
- if (context === null)
11993
+ const lView = context ? context.lView : null;
11994
+ if (lView === null)
11780
11995
  return [];
11781
- const lView = context.lView;
11782
11996
  const tView = lView[TVIEW];
11783
11997
  const tNode = tView.data[context.nodeIndex];
11784
11998
  const providerTokens = [];
@@ -11828,10 +12042,10 @@ function getDirectives(node) {
11828
12042
  return [];
11829
12043
  }
11830
12044
  const context = getLContext(node);
11831
- if (context === null) {
12045
+ const lView = context ? context.lView : null;
12046
+ if (lView === null) {
11832
12047
  return [];
11833
12048
  }
11834
- const lView = context.lView;
11835
12049
  const tView = lView[TVIEW];
11836
12050
  const nodeIndex = context.nodeIndex;
11837
12051
  if (!(tView === null || tView === void 0 ? void 0 : tView.data[nodeIndex])) {
@@ -11891,7 +12105,11 @@ function getLocalRefs(target) {
11891
12105
  if (context === null)
11892
12106
  return {};
11893
12107
  if (context.localRefs === undefined) {
11894
- context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);
12108
+ const lView = context.lView;
12109
+ if (lView === null) {
12110
+ return {};
12111
+ }
12112
+ context.localRefs = discoverLocalRefs(lView, context.nodeIndex);
11895
12113
  }
11896
12114
  return context.localRefs || {};
11897
12115
  }
@@ -11955,11 +12173,11 @@ function getRenderedText(component) {
11955
12173
  * @globalApi ng
11956
12174
  */
11957
12175
  function getListeners(element) {
11958
- assertDomElement(element);
12176
+ ngDevMode && assertDomElement(element);
11959
12177
  const lContext = getLContext(element);
11960
- if (lContext === null)
12178
+ const lView = lContext === null ? null : lContext.lView;
12179
+ if (lView === null)
11961
12180
  return [];
11962
- const lView = lContext.lView;
11963
12181
  const tView = lView[TVIEW];
11964
12182
  const lCleanup = lView[CLEANUP];
11965
12183
  const tCleanup = tView.cleanup;
@@ -12010,10 +12228,10 @@ function getDebugNode$1(element) {
12010
12228
  throw new Error('Expecting instance of DOM Element');
12011
12229
  }
12012
12230
  const lContext = getLContext(element);
12013
- if (lContext === null) {
12231
+ const lView = lContext ? lContext.lView : null;
12232
+ if (lView === null) {
12014
12233
  return null;
12015
12234
  }
12016
- const lView = lContext.lView;
12017
12235
  const nodeIndex = lContext.nodeIndex;
12018
12236
  if (nodeIndex !== -1) {
12019
12237
  const valueInLView = lView[nodeIndex];
@@ -12038,6 +12256,7 @@ function getComponentLView(target) {
12038
12256
  const lContext = getLContext(target);
12039
12257
  const nodeIndx = lContext.nodeIndex;
12040
12258
  const lView = lContext.lView;
12259
+ ngDevMode && assertLView(lView);
12041
12260
  const componentLView = lView[nodeIndx];
12042
12261
  ngDevMode && assertLView(componentLView);
12043
12262
  return componentLView;
@@ -12185,7 +12404,7 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
12185
12404
  const rootContext = createRootContext(opts.scheduler, opts.playerHandler);
12186
12405
  const renderer = rendererFactory.createRenderer(hostRNode, componentDef);
12187
12406
  const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
12188
- const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);
12407
+ const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null, null);
12189
12408
  enterView(rootView);
12190
12409
  let component;
12191
12410
  try {
@@ -12240,7 +12459,7 @@ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRend
12240
12459
  }
12241
12460
  }
12242
12461
  const viewRenderer = rendererFactory.createRenderer(rNode, def);
12243
- const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);
12462
+ const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);
12244
12463
  if (tView.firstCreatePass) {
12245
12464
  diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
12246
12465
  markAsComponentHost(tView, tNode);
@@ -13785,75 +14004,6 @@ class KeyRegistry {
13785
14004
  }
13786
14005
  const _globalKeyRegistry = new KeyRegistry();
13787
14006
 
13788
- /**
13789
- * @license
13790
- * Copyright Google LLC All Rights Reserved.
13791
- *
13792
- * Use of this source code is governed by an MIT-style license that can be
13793
- * found in the LICENSE file at https://angular.io/license
13794
- */
13795
- /**
13796
- * Provides access to reflection data about symbols. Used internally by Angular
13797
- * to power dependency injection and compilation.
13798
- */
13799
- class Reflector {
13800
- constructor(reflectionCapabilities) {
13801
- this.reflectionCapabilities = reflectionCapabilities;
13802
- }
13803
- updateCapabilities(caps) {
13804
- this.reflectionCapabilities = caps;
13805
- }
13806
- factory(type) {
13807
- return this.reflectionCapabilities.factory(type);
13808
- }
13809
- parameters(typeOrFunc) {
13810
- return this.reflectionCapabilities.parameters(typeOrFunc);
13811
- }
13812
- annotations(typeOrFunc) {
13813
- return this.reflectionCapabilities.annotations(typeOrFunc);
13814
- }
13815
- propMetadata(typeOrFunc) {
13816
- return this.reflectionCapabilities.propMetadata(typeOrFunc);
13817
- }
13818
- hasLifecycleHook(type, lcProperty) {
13819
- return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
13820
- }
13821
- getter(name) {
13822
- return this.reflectionCapabilities.getter(name);
13823
- }
13824
- setter(name) {
13825
- return this.reflectionCapabilities.setter(name);
13826
- }
13827
- method(name) {
13828
- return this.reflectionCapabilities.method(name);
13829
- }
13830
- importUri(type) {
13831
- return this.reflectionCapabilities.importUri(type);
13832
- }
13833
- resourceUri(type) {
13834
- return this.reflectionCapabilities.resourceUri(type);
13835
- }
13836
- resolveIdentifier(name, moduleUrl, members, runtime) {
13837
- return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
13838
- }
13839
- resolveEnum(identifier, name) {
13840
- return this.reflectionCapabilities.resolveEnum(identifier, name);
13841
- }
13842
- }
13843
-
13844
- /**
13845
- * @license
13846
- * Copyright Google LLC All Rights Reserved.
13847
- *
13848
- * Use of this source code is governed by an MIT-style license that can be
13849
- * found in the LICENSE file at https://angular.io/license
13850
- */
13851
- /**
13852
- * The {@link Reflector} used internally in Angular to access metadata
13853
- * about symbols.
13854
- */
13855
- const reflector = new Reflector(new ReflectionCapabilities());
13856
-
13857
14007
  /**
13858
14008
  * @license
13859
14009
  * Copyright Google LLC All Rights Reserved.
@@ -13910,7 +14060,7 @@ function resolveReflectiveFactory(provider) {
13910
14060
  let resolvedDeps;
13911
14061
  if (provider.useClass) {
13912
14062
  const useClass = resolveForwardRef(provider.useClass);
13913
- factoryFn = reflector.factory(useClass);
14063
+ factoryFn = getReflect().factory(useClass);
13914
14064
  resolvedDeps = _dependenciesFor(useClass);
13915
14065
  }
13916
14066
  else if (provider.useExisting) {
@@ -14006,7 +14156,7 @@ function constructDependencies(typeOrFunc, dependencies) {
14006
14156
  }
14007
14157
  }
14008
14158
  function _dependenciesFor(typeOrFunc) {
14009
- const params = reflector.parameters(typeOrFunc);
14159
+ const params = getReflect().parameters(typeOrFunc);
14010
14160
  if (!params)
14011
14161
  return [];
14012
14162
  if (params.some(p => p == null)) {
@@ -14492,6 +14642,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
14492
14642
  * @param name Name of the DOM Node
14493
14643
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14494
14644
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14645
+ * @returns This function returns itself so that it may be chained.
14495
14646
  *
14496
14647
  * Attributes and localRefs are passed as an array of strings where elements with an even index
14497
14648
  * hold an attribute name and elements with an odd index hold an attribute value, ex.:
@@ -14543,9 +14694,11 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
14543
14694
  if (localRefsIndex !== null) {
14544
14695
  saveResolvedLocalsInData(lView, tNode);
14545
14696
  }
14697
+ return ɵɵelementStart;
14546
14698
  }
14547
14699
  /**
14548
14700
  * Mark the end of the element.
14701
+ * @returns This function returns itself so that it may be chained.
14549
14702
  *
14550
14703
  * @codeGenApi
14551
14704
  */
@@ -14576,6 +14729,7 @@ function ɵɵelementEnd() {
14576
14729
  if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
14577
14730
  setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
14578
14731
  }
14732
+ return ɵɵelementEnd;
14579
14733
  }
14580
14734
  /**
14581
14735
  * Creates an empty element using {@link elementStart} and {@link elementEnd}
@@ -14584,12 +14738,14 @@ function ɵɵelementEnd() {
14584
14738
  * @param name Name of the DOM Node
14585
14739
  * @param attrsIndex Index of the element's attributes in the `consts` array.
14586
14740
  * @param localRefsIndex Index of the element's local references in the `consts` array.
14741
+ * @returns This function returns itself so that it may be chained.
14587
14742
  *
14588
14743
  * @codeGenApi
14589
14744
  */
14590
14745
  function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
14591
14746
  ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
14592
14747
  ɵɵelementEnd();
14748
+ return ɵɵelement;
14593
14749
  }
14594
14750
  function logUnknownElementError(tView, element, tNode, hasDirectives) {
14595
14751
  const schemas = tView.schemas;
@@ -14658,6 +14814,7 @@ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, l
14658
14814
  * @param index Index of the element in the LView array
14659
14815
  * @param attrsIndex Index of the container attributes in the `consts` array.
14660
14816
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14817
+ * @returns This function returns itself so that it may be chained.
14661
14818
  *
14662
14819
  * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
14663
14820
  * the DOM (as a comment node can't have attributes). Attributes are here only for directive
@@ -14688,9 +14845,11 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
14688
14845
  if (localRefsIndex != null) {
14689
14846
  saveResolvedLocalsInData(lView, tNode);
14690
14847
  }
14848
+ return ɵɵelementContainerStart;
14691
14849
  }
14692
14850
  /**
14693
14851
  * Mark the end of the <ng-container>.
14852
+ * @returns This function returns itself so that it may be chained.
14694
14853
  *
14695
14854
  * @codeGenApi
14696
14855
  */
@@ -14712,6 +14871,7 @@ function ɵɵelementContainerEnd() {
14712
14871
  tView.queries.elementEnd(currentTNode);
14713
14872
  }
14714
14873
  }
14874
+ return ɵɵelementContainerEnd;
14715
14875
  }
14716
14876
  /**
14717
14877
  * Creates an empty logical container using {@link elementContainerStart}
@@ -14720,12 +14880,14 @@ function ɵɵelementContainerEnd() {
14720
14880
  * @param index Index of the element in the LView array
14721
14881
  * @param attrsIndex Index of the container attributes in the `consts` array.
14722
14882
  * @param localRefsIndex Index of the container's local references in the `consts` array.
14883
+ * @returns This function returns itself so that it may be chained.
14723
14884
  *
14724
14885
  * @codeGenApi
14725
14886
  */
14726
14887
  function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
14727
14888
  ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
14728
14889
  ɵɵelementContainerEnd();
14890
+ return ɵɵelementContainer;
14729
14891
  }
14730
14892
 
14731
14893
  /**
@@ -16294,7 +16456,7 @@ function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {
16294
16456
  function malformedStyleError(text, expecting, index) {
16295
16457
  ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');
16296
16458
  throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +
16297
- text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +
16459
+ text.substring(index, index + 1) + '<<]' + text.slice(index + 1) +
16298
16460
  `'. Expecting '${expecting}'.`);
16299
16461
  }
16300
16462
 
@@ -19979,7 +20141,7 @@ function removeInnerTemplateTranslation(message) {
19979
20141
  }
19980
20142
  ngDevMode &&
19981
20143
  assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`);
19982
- res += message.substr(index);
20144
+ res += message.slice(index);
19983
20145
  return res;
19984
20146
  }
19985
20147
  /**
@@ -20071,7 +20233,7 @@ function parseICUBlock(pattern) {
20071
20233
  else {
20072
20234
  icuType = 1 /* plural */;
20073
20235
  }
20074
- mainBinding = parseInt(binding.substr(1), 10);
20236
+ mainBinding = parseInt(binding.slice(1), 10);
20075
20237
  return '';
20076
20238
  });
20077
20239
  const parts = i18nParseTextIntoPartsAndICU(pattern);
@@ -21076,7 +21238,7 @@ class Version {
21076
21238
  /**
21077
21239
  * @publicApi
21078
21240
  */
21079
- const VERSION = new Version('14.0.0-next.1');
21241
+ const VERSION = new Version('14.0.0-next.10');
21080
21242
 
21081
21243
  /**
21082
21244
  * @license
@@ -21482,29 +21644,27 @@ function getNamespace(elementName) {
21482
21644
  return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
21483
21645
  }
21484
21646
  /**
21485
- * A change detection scheduler token for {@link RootContext}. This token is the default value used
21486
- * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
21647
+ * Injector that looks up a value using a specific injector, before falling back to the module
21648
+ * injector. Used primarily when creating components or embedded views dynamically.
21487
21649
  */
21488
- const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
21489
- providedIn: 'root',
21490
- factory: () => defaultScheduler,
21491
- });
21492
- function createChainedInjector(rootViewInjector, moduleInjector) {
21493
- return {
21494
- get: (token, notFoundValue, flags) => {
21495
- const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
21496
- if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
21497
- notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
21498
- // Return the value from the root element injector when
21499
- // - it provides it
21500
- // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21501
- // - the module injector should not be checked
21502
- // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21503
- return value;
21504
- }
21505
- return moduleInjector.get(token, notFoundValue, flags);
21650
+ class ChainedInjector {
21651
+ constructor(injector, parentInjector) {
21652
+ this.injector = injector;
21653
+ this.parentInjector = parentInjector;
21654
+ }
21655
+ get(token, notFoundValue, flags) {
21656
+ const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
21657
+ if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
21658
+ notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
21659
+ // Return the value from the root element injector when
21660
+ // - it provides it
21661
+ // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21662
+ // - the module injector should not be checked
21663
+ // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21664
+ return value;
21506
21665
  }
21507
- };
21666
+ return this.parentInjector.get(token, notFoundValue, flags);
21667
+ }
21508
21668
  }
21509
21669
  /**
21510
21670
  * Render3 implementation of {@link viewEngine_ComponentFactory}.
@@ -21532,7 +21692,7 @@ class ComponentFactory extends ComponentFactory$1 {
21532
21692
  }
21533
21693
  create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
21534
21694
  ngModule = ngModule || this.ngModule;
21535
- const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;
21695
+ const rootViewInjector = ngModule ? new ChainedInjector(injector, ngModule.injector) : injector;
21536
21696
  const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
21537
21697
  const sanitizer = rootViewInjector.get(Sanitizer, null);
21538
21698
  const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
@@ -21547,7 +21707,7 @@ class ComponentFactory extends ComponentFactory$1 {
21547
21707
  const rootContext = createRootContext();
21548
21708
  // Create the root view. Uses empty TView and ContentTemplate.
21549
21709
  const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
21550
- const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);
21710
+ const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);
21551
21711
  // rootView is the parent when bootstrapping
21552
21712
  // TODO(misko): it looks like we are entering view here but we don't really need to as
21553
21713
  // `renderView` does that. However as the code is written it is needed because
@@ -21717,62 +21877,6 @@ class NgModuleRef$1 {
21717
21877
  class NgModuleFactory$1 {
21718
21878
  }
21719
21879
 
21720
- /**
21721
- * @license
21722
- * Copyright Google LLC All Rights Reserved.
21723
- *
21724
- * Use of this source code is governed by an MIT-style license that can be
21725
- * found in the LICENSE file at https://angular.io/license
21726
- */
21727
- /**
21728
- * Map of module-id to the corresponding NgModule.
21729
- * - In pre Ivy we track NgModuleFactory,
21730
- * - In post Ivy we track the NgModuleType
21731
- */
21732
- const modules = new Map();
21733
- /**
21734
- * Registers a loaded module. Should only be called from generated NgModuleFactory code.
21735
- * @publicApi
21736
- */
21737
- function registerModuleFactory(id, factory) {
21738
- const existing = modules.get(id);
21739
- assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);
21740
- modules.set(id, factory);
21741
- }
21742
- function assertSameOrNotExisting(id, type, incoming) {
21743
- if (type && type !== incoming) {
21744
- throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
21745
- }
21746
- }
21747
- function registerNgModuleType(ngModuleType) {
21748
- const visited = new Set();
21749
- recurse(ngModuleType);
21750
- function recurse(ngModuleType) {
21751
- // The imports array of an NgModule must refer to other NgModules,
21752
- // so an error is thrown if no module definition is available.
21753
- const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);
21754
- const id = def.id;
21755
- if (id !== null) {
21756
- const existing = modules.get(id);
21757
- assertSameOrNotExisting(id, existing, ngModuleType);
21758
- modules.set(id, ngModuleType);
21759
- }
21760
- const imports = maybeUnwrapFn(def.imports);
21761
- for (const i of imports) {
21762
- if (!visited.has(i)) {
21763
- visited.add(i);
21764
- recurse(i);
21765
- }
21766
- }
21767
- }
21768
- }
21769
- function clearModulesForTest() {
21770
- modules.clear();
21771
- }
21772
- function getRegisteredNgModuleType(id) {
21773
- return (modules.get(id) || autoRegisterModuleById[id]);
21774
- }
21775
-
21776
21880
  /**
21777
21881
  * @license
21778
21882
  * Copyright Google LLC All Rights Reserved.
@@ -21843,33 +21947,6 @@ class NgModuleFactory extends NgModuleFactory$1 {
21843
21947
  constructor(moduleType) {
21844
21948
  super();
21845
21949
  this.moduleType = moduleType;
21846
- const ngModuleDef = getNgModuleDef(moduleType);
21847
- if (ngModuleDef !== null) {
21848
- // Register the NgModule with Angular's module registry. The location (and hence timing) of
21849
- // this call is critical to ensure this works correctly (modules get registered when expected)
21850
- // without bloating bundles (modules are registered when otherwise not referenced).
21851
- //
21852
- // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has
21853
- // several practical consequences:
21854
- //
21855
- // - If an .ngfactory file is not imported from, the module won't be registered (and can be
21856
- // tree shaken).
21857
- // - If an .ngfactory file is imported from, the module will be registered even if an instance
21858
- // is not actually created (via `create` below).
21859
- // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's
21860
- // imports,
21861
- //
21862
- // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are
21863
- // not a required API to use - there are other ways to obtain an NgModuleFactory for a given
21864
- // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,
21865
- // the side effect of registration is added here, in the constructor of NgModuleFactory,
21866
- // ensuring no matter how a factory is created, the module is registered correctly.
21867
- //
21868
- // An alternative would be to include the registration side effect inline following the actual
21869
- // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules
21870
- // will be registered and retained even if they're otherwise never referenced.
21871
- registerNgModuleType(moduleType);
21872
- }
21873
21950
  }
21874
21951
  create(parentInjector) {
21875
21952
  return new NgModuleRef(this.moduleType, parentInjector);
@@ -22668,9 +22745,9 @@ const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {
22668
22745
  this._declarationTContainer = _declarationTContainer;
22669
22746
  this.elementRef = elementRef;
22670
22747
  }
22671
- createEmbeddedView(context) {
22748
+ createEmbeddedView(context, injector) {
22672
22749
  const embeddedTView = this._declarationTContainer.tViews;
22673
- const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);
22750
+ const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);
22674
22751
  const declarationLContainer = this._declarationLView[this._declarationTContainer.index];
22675
22752
  ngDevMode && assertLContainer(declarationLContainer);
22676
22753
  embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
@@ -22786,8 +22863,17 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22786
22863
  get length() {
22787
22864
  return this._lContainer.length - CONTAINER_HEADER_OFFSET;
22788
22865
  }
22789
- createEmbeddedView(templateRef, context, index) {
22790
- const viewRef = templateRef.createEmbeddedView(context || {});
22866
+ createEmbeddedView(templateRef, context, indexOrOptions) {
22867
+ let index;
22868
+ let injector;
22869
+ if (typeof indexOrOptions === 'number') {
22870
+ index = indexOrOptions;
22871
+ }
22872
+ else if (indexOrOptions != null) {
22873
+ index = indexOrOptions.index;
22874
+ injector = indexOrOptions.injector;
22875
+ }
22876
+ const viewRef = templateRef.createEmbeddedView(context || {}, injector);
22791
22877
  this.insert(viewRef, index);
22792
22878
  return viewRef;
22793
22879
  }
@@ -22828,11 +22914,29 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22828
22914
  componentFactoryOrType :
22829
22915
  new ComponentFactory(getComponentDef(componentFactoryOrType));
22830
22916
  const contextInjector = injector || this.parentInjector;
22831
- if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {
22832
- // DO NOT REFACTOR. The code here used to have a `value || undefined` expression
22833
- // which seems to cause internal google apps to fail. This is documented in the
22834
- // following internal bug issue: go/b/142967802
22835
- const result = contextInjector.get(NgModuleRef$1, null);
22917
+ // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
22918
+ if (!ngModuleRef && componentFactory.ngModule == null) {
22919
+ // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
22920
+ // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
22921
+ // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
22922
+ // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try
22923
+ // using a provided injector first, then fall back to the parent injector of this
22924
+ // `ViewContainerRef` instance.
22925
+ //
22926
+ // For the factory-less case, it's critical to establish a connection with the module
22927
+ // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),
22928
+ // so that a component can use DI tokens provided in MgModules. For this reason, we can not
22929
+ // rely on the provided injector, since it might be detached from the DI tree (for example, if
22930
+ // it was created via `Injector.create` without specifying a parent injector, or if an
22931
+ // injector is retrieved from an `NgModuleRef` created via `createNgModuleRef` using an
22932
+ // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent
22933
+ // injector, which is normally connected to the DI tree, which includes module injector
22934
+ // subtree.
22935
+ const _injector = isComponentFactory ? contextInjector : this.parentInjector;
22936
+ // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
22937
+ // undefined` expression which seems to cause internal google apps to fail. This is documented
22938
+ // in the following internal bug issue: go/b/142967802
22939
+ const result = _injector.get(NgModuleRef$1, null);
22836
22940
  if (result) {
22837
22941
  ngModuleRef = result;
22838
22942
  }
@@ -23522,6 +23626,7 @@ const angularCoreEnv = (() => ({
23522
23626
  'ɵɵinvalidFactory': ɵɵinvalidFactory,
23523
23627
  'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
23524
23628
  'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
23629
+ 'ɵɵresetView': ɵɵresetView,
23525
23630
  'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
23526
23631
  'ɵɵProvidersFeature': ɵɵProvidersFeature,
23527
23632
  'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
@@ -23634,6 +23739,7 @@ const angularCoreEnv = (() => ({
23634
23739
  'ɵɵresolveBody': ɵɵresolveBody,
23635
23740
  'ɵɵsetComponentScope': ɵɵsetComponentScope,
23636
23741
  'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,
23742
+ 'ɵɵregisterNgModuleType': registerNgModuleType,
23637
23743
  'ɵɵsanitizeHtml': ɵɵsanitizeHtml,
23638
23744
  'ɵɵsanitizeStyle': ɵɵsanitizeStyle,
23639
23745
  'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,
@@ -23669,6 +23775,17 @@ function resetJitOptions() {
23669
23775
  jitOptions = null;
23670
23776
  }
23671
23777
 
23778
+ /**
23779
+ * @license
23780
+ * Copyright Google LLC All Rights Reserved.
23781
+ *
23782
+ * Use of this source code is governed by an MIT-style license that can be
23783
+ * found in the LICENSE file at https://angular.io/license
23784
+ */
23785
+ function patchModuleCompilation() {
23786
+ // Does nothing, but exists as a target for patching.
23787
+ }
23788
+
23672
23789
  /**
23673
23790
  * @license
23674
23791
  * Copyright Google LLC All Rights Reserved.
@@ -23725,7 +23842,11 @@ function isResolvedDeclaration(declaration) {
23725
23842
  * This function automatically gets called when a class has a `@NgModule` decorator.
23726
23843
  */
23727
23844
  function compileNgModule(moduleType, ngModule = {}) {
23845
+ patchModuleCompilation();
23728
23846
  compileNgModuleDefs(moduleType, ngModule);
23847
+ if (ngModule.id !== undefined) {
23848
+ registerNgModuleType(moduleType, ngModule.id);
23849
+ }
23729
23850
  // Because we don't know if all declarations have resolved yet at the moment the
23730
23851
  // NgModule decorator is executing, we're enqueueing the setting of module scope
23731
23852
  // on its declarations to be run at a later time when all declarations for the module,
@@ -24336,7 +24457,10 @@ function directiveMetadata(type, metadata) {
24336
24457
  usesInheritance: !extendsDirectlyFromObject(type),
24337
24458
  exportAs: extractExportAs(metadata.exportAs),
24338
24459
  providers: metadata.providers || null,
24339
- viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)
24460
+ viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),
24461
+ // TODO(alxhub): pass through the standalone flag from the directive metadata once standalone
24462
+ // functionality is fully rolled out.
24463
+ isStandalone: false,
24340
24464
  };
24341
24465
  }
24342
24466
  /**
@@ -24480,7 +24604,10 @@ function getPipeMetadata(type, meta) {
24480
24604
  type: type,
24481
24605
  name: type.name,
24482
24606
  pipeName: meta.name,
24483
- pure: meta.pure !== undefined ? meta.pure : true
24607
+ pure: meta.pure !== undefined ? meta.pure : true,
24608
+ // TODO(alxhub): pass through the standalone flag from the pipe metadata once standalone
24609
+ // functionality is fully rolled out.
24610
+ isStandalone: false,
24484
24611
  };
24485
24612
  }
24486
24613
 
@@ -24774,10 +24901,11 @@ class ApplicationInitStatus {
24774
24901
  }
24775
24902
  }
24776
24903
  ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
24777
- ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
24904
+ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
24778
24905
  (function () {
24779
24906
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
24780
- type: Injectable
24907
+ type: Injectable,
24908
+ args: [{ providedIn: 'root' }]
24781
24909
  }], function () {
24782
24910
  return [{ type: undefined, decorators: [{
24783
24911
  type: Inject,
@@ -24806,7 +24934,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
24806
24934
  *
24807
24935
  * @publicApi
24808
24936
  */
24809
- const APP_ID = new InjectionToken('AppId');
24937
+ const APP_ID = new InjectionToken('AppId', {
24938
+ providedIn: 'root',
24939
+ factory: _appIdRandomProviderFactory,
24940
+ });
24810
24941
  function _appIdRandomProviderFactory() {
24811
24942
  return `${_randomChar()}${_randomChar()}${_randomChar()}`;
24812
24943
  }
@@ -24849,6 +24980,15 @@ const APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
24849
24980
  * @publicApi
24850
24981
  */
24851
24982
  const PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
24983
+ // We keep this token here, rather than the animations package, so that modules that only care
24984
+ // about which animations module is loaded (e.g. the CDK) can retrieve it without having to
24985
+ // include extra dependencies. See #44970 for more context.
24986
+ /**
24987
+ * A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
24988
+ * module has been loaded.
24989
+ * @publicApi
24990
+ */
24991
+ const ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');
24852
24992
 
24853
24993
  /**
24854
24994
  * @license
@@ -24883,6 +25023,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24883
25023
  * Use of this source code is governed by an MIT-style license that can be
24884
25024
  * found in the LICENSE file at https://angular.io/license
24885
25025
  */
25026
+ /**
25027
+ * Work out the locale from the potential global properties.
25028
+ *
25029
+ * * Closure Compiler: use `goog.LOCALE`.
25030
+ * * Ivy enabled: use `$localize.locale`
25031
+ */
25032
+ function getGlobalLocale() {
25033
+ if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
25034
+ typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
25035
+ // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
25036
+ // * In order to preserve backwards compatibility, we use Angular default value over
25037
+ // Closure Compiler's one.
25038
+ return goog.LOCALE;
25039
+ }
25040
+ else {
25041
+ // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
25042
+ // COMPILE-TIME INLINER.
25043
+ //
25044
+ // * During compile time inlining of translations the expression will be replaced
25045
+ // with a string literal that is the current locale. Other forms of this expression are not
25046
+ // guaranteed to be replaced.
25047
+ //
25048
+ // * During runtime translation evaluation, the developer is required to set `$localize.locale`
25049
+ // if required, or just to provide their own `LOCALE_ID` provider.
25050
+ return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
25051
+ }
25052
+ }
24886
25053
  /**
24887
25054
  * Provide this token to set the locale of your application.
24888
25055
  * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
@@ -24905,7 +25072,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24905
25072
  *
24906
25073
  * @publicApi
24907
25074
  */
24908
- const LOCALE_ID = new InjectionToken('LocaleId');
25075
+ const LOCALE_ID = new InjectionToken('LocaleId', {
25076
+ providedIn: 'root',
25077
+ factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
25078
+ });
24909
25079
  /**
24910
25080
  * Provide this token to set the default currency code your application uses for
24911
25081
  * CurrencyPipe when there is no currency code passed into it. This is only used by
@@ -24944,7 +25114,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
24944
25114
  *
24945
25115
  * @publicApi
24946
25116
  */
24947
- const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');
25117
+ const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
25118
+ providedIn: 'root',
25119
+ factory: () => USD_CURRENCY_CODE,
25120
+ });
24948
25121
  /**
24949
25122
  * Use this token at bootstrap to provide the content of your translation file (`xtb`,
24950
25123
  * `xlf` or `xlf2`) when you want to translate your application in another language.
@@ -25111,10 +25284,11 @@ class Compiler {
25111
25284
  }
25112
25285
  }
25113
25286
  Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
25114
- Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
25287
+ Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
25115
25288
  (function () {
25116
25289
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
25117
- type: Injectable
25290
+ type: Injectable,
25291
+ args: [{ providedIn: 'root' }]
25118
25292
  }], null, null);
25119
25293
  })();
25120
25294
  /**
@@ -25992,26 +26166,7 @@ class PlatformRef {
25992
26166
  this._destroyed = false;
25993
26167
  }
25994
26168
  /**
25995
- * Creates an instance of an `@NgModule` for the given platform for offline compilation.
25996
- *
25997
- * @usageNotes
25998
- *
25999
- * The following example creates the NgModule for a browser platform.
26000
- *
26001
- * ```typescript
26002
- * my_module.ts:
26003
- *
26004
- * @NgModule({
26005
- * imports: [BrowserModule]
26006
- * })
26007
- * class MyModule {}
26008
- *
26009
- * main.ts:
26010
- * import {MyModuleNgFactory} from './my_module.ngfactory';
26011
- * import {platformBrowser} from '@angular/platform-browser';
26012
- *
26013
- * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
26014
- * ```
26169
+ * Creates an instance of an `@NgModule` for the given platform.
26015
26170
  *
26016
26171
  * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
26017
26172
  * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
@@ -26065,7 +26220,7 @@ class PlatformRef {
26065
26220
  });
26066
26221
  }
26067
26222
  /**
26068
- * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
26223
+ * Creates an instance of an `@NgModule` for a given platform.
26069
26224
  *
26070
26225
  * @usageNotes
26071
26226
  * ### Simple Example
@@ -26501,10 +26656,11 @@ class ApplicationRef {
26501
26656
  }
26502
26657
  }
26503
26658
  ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
26504
- ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
26659
+ ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
26505
26660
  (function () {
26506
26661
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
26507
- type: Injectable
26662
+ type: Injectable,
26663
+ args: [{ providedIn: 'root' }]
26508
26664
  }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null);
26509
26665
  })();
26510
26666
  function remove(list, el) {
@@ -26812,8 +26968,6 @@ var ng_module_factory_loader_impl = {};
26812
26968
  * Use of this source code is governed by an MIT-style license that can be
26813
26969
  * found in the LICENSE file at https://angular.io/license
26814
26970
  */
26815
- // TODO(alxhub): recombine the interfaces and implementations here and move the docs back onto the
26816
- // original classes.
26817
26971
  /**
26818
26972
  * @publicApi
26819
26973
  */
@@ -26829,47 +26983,92 @@ class DebugEventListener {
26829
26983
  function asNativeElements(debugEls) {
26830
26984
  return debugEls.map((el) => el.nativeElement);
26831
26985
  }
26832
- class DebugNode__POST_R3__ {
26986
+ /**
26987
+ * @publicApi
26988
+ */
26989
+ class DebugNode {
26833
26990
  constructor(nativeNode) {
26834
26991
  this.nativeNode = nativeNode;
26835
26992
  }
26993
+ /**
26994
+ * The `DebugElement` parent. Will be `null` if this is the root element.
26995
+ */
26836
26996
  get parent() {
26837
26997
  const parent = this.nativeNode.parentNode;
26838
- return parent ? new DebugElement__POST_R3__(parent) : null;
26998
+ return parent ? new DebugElement(parent) : null;
26839
26999
  }
27000
+ /**
27001
+ * The host dependency injector. For example, the root element's component instance injector.
27002
+ */
26840
27003
  get injector() {
26841
27004
  return getInjector(this.nativeNode);
26842
27005
  }
27006
+ /**
27007
+ * The element's own component instance, if it has one.
27008
+ */
26843
27009
  get componentInstance() {
26844
27010
  const nativeElement = this.nativeNode;
26845
27011
  return nativeElement &&
26846
27012
  (getComponent$1(nativeElement) || getOwningComponent(nativeElement));
26847
27013
  }
27014
+ /**
27015
+ * An object that provides parent context for this element. Often an ancestor component instance
27016
+ * that governs this element.
27017
+ *
27018
+ * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
27019
+ * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
27020
+ * of heroes"`.
27021
+ */
26848
27022
  get context() {
26849
27023
  return getComponent$1(this.nativeNode) || getContext(this.nativeNode);
26850
27024
  }
27025
+ /**
27026
+ * The callbacks attached to the component's @Output properties and/or the element's event
27027
+ * properties.
27028
+ */
26851
27029
  get listeners() {
26852
27030
  return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');
26853
27031
  }
27032
+ /**
27033
+ * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
27034
+ * variable name.
27035
+ */
26854
27036
  get references() {
26855
27037
  return getLocalRefs(this.nativeNode);
26856
27038
  }
27039
+ /**
27040
+ * This component's injector lookup tokens. Includes the component itself plus the tokens that the
27041
+ * component lists in its providers metadata.
27042
+ */
26857
27043
  get providerTokens() {
26858
27044
  return getInjectionTokens(this.nativeNode);
26859
27045
  }
26860
27046
  }
26861
- class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
27047
+ /**
27048
+ * @publicApi
27049
+ *
27050
+ * @see [Component testing scenarios](guide/testing-components-scenarios)
27051
+ * @see [Basics of testing components](guide/testing-components-basics)
27052
+ * @see [Testing utility APIs](guide/testing-utility-apis)
27053
+ */
27054
+ class DebugElement extends DebugNode {
26862
27055
  constructor(nativeNode) {
26863
27056
  ngDevMode && assertDomNode(nativeNode);
26864
27057
  super(nativeNode);
26865
27058
  }
27059
+ /**
27060
+ * The underlying DOM element at the root of the component.
27061
+ */
26866
27062
  get nativeElement() {
26867
27063
  return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
26868
27064
  }
27065
+ /**
27066
+ * The element tag name, if it is an element.
27067
+ */
26869
27068
  get name() {
26870
27069
  const context = getLContext(this.nativeNode);
26871
- if (context !== null) {
26872
- const lView = context.lView;
27070
+ const lView = context ? context.lView : null;
27071
+ if (lView !== null) {
26873
27072
  const tData = lView[TVIEW].data;
26874
27073
  const tNode = tData[context.nodeIndex];
26875
27074
  return tNode.value;
@@ -26892,10 +27091,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26892
27091
  */
26893
27092
  get properties() {
26894
27093
  const context = getLContext(this.nativeNode);
26895
- if (context === null) {
27094
+ const lView = context ? context.lView : null;
27095
+ if (lView === null) {
26896
27096
  return {};
26897
27097
  }
26898
- const lView = context.lView;
26899
27098
  const tData = lView[TVIEW].data;
26900
27099
  const tNode = tData[context.nodeIndex];
26901
27100
  const properties = {};
@@ -26906,6 +27105,9 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26906
27105
  collectPropertyBindings(properties, tNode, lView, tData);
26907
27106
  return properties;
26908
27107
  }
27108
+ /**
27109
+ * A map of attribute names to attribute values for an element.
27110
+ */
26909
27111
  get attributes() {
26910
27112
  const attributes = {};
26911
27113
  const element = this.nativeElement;
@@ -26913,10 +27115,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26913
27115
  return attributes;
26914
27116
  }
26915
27117
  const context = getLContext(element);
26916
- if (context === null) {
27118
+ const lView = context ? context.lView : null;
27119
+ if (lView === null) {
26917
27120
  return {};
26918
27121
  }
26919
- const lView = context.lView;
26920
27122
  const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;
26921
27123
  const lowercaseTNodeAttrs = [];
26922
27124
  // For debug nodes we take the element's attribute directly from the DOM since it allows us
@@ -26954,12 +27156,29 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26954
27156
  }
26955
27157
  return attributes;
26956
27158
  }
27159
+ /**
27160
+ * The inline styles of the DOM element.
27161
+ *
27162
+ * Will be `null` if there is no `style` property on the underlying DOM element.
27163
+ *
27164
+ * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
27165
+ */
26957
27166
  get styles() {
26958
27167
  if (this.nativeElement && this.nativeElement.style) {
26959
27168
  return this.nativeElement.style;
26960
27169
  }
26961
27170
  return {};
26962
27171
  }
27172
+ /**
27173
+ * A map containing the class names on the element as keys.
27174
+ *
27175
+ * This map is derived from the `className` property of the DOM element.
27176
+ *
27177
+ * Note: The values of this object will always be `true`. The class key will not appear in the KV
27178
+ * object if it does not exist on the element.
27179
+ *
27180
+ * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
27181
+ */
26963
27182
  get classes() {
26964
27183
  const result = {};
26965
27184
  const element = this.nativeElement;
@@ -26969,15 +27188,23 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26969
27188
  classes.forEach((value) => result[value] = true);
26970
27189
  return result;
26971
27190
  }
27191
+ /**
27192
+ * The `childNodes` of the DOM element as a `DebugNode` array.
27193
+ *
27194
+ * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
27195
+ */
26972
27196
  get childNodes() {
26973
27197
  const childNodes = this.nativeNode.childNodes;
26974
27198
  const children = [];
26975
27199
  for (let i = 0; i < childNodes.length; i++) {
26976
27200
  const element = childNodes[i];
26977
- children.push(getDebugNode__POST_R3__(element));
27201
+ children.push(getDebugNode(element));
26978
27202
  }
26979
27203
  return children;
26980
27204
  }
27205
+ /**
27206
+ * The immediate `DebugElement` children. Walk the tree by descending through `children`.
27207
+ */
26981
27208
  get children() {
26982
27209
  const nativeElement = this.nativeElement;
26983
27210
  if (!nativeElement)
@@ -26986,24 +27213,45 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
26986
27213
  const children = [];
26987
27214
  for (let i = 0; i < childNodes.length; i++) {
26988
27215
  const element = childNodes[i];
26989
- children.push(getDebugNode__POST_R3__(element));
27216
+ children.push(getDebugNode(element));
26990
27217
  }
26991
27218
  return children;
26992
27219
  }
27220
+ /**
27221
+ * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
27222
+ */
26993
27223
  query(predicate) {
26994
27224
  const results = this.queryAll(predicate);
26995
27225
  return results[0] || null;
26996
27226
  }
27227
+ /**
27228
+ * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
27229
+ */
26997
27230
  queryAll(predicate) {
26998
27231
  const matches = [];
26999
- _queryAllR3(this, predicate, matches, true);
27232
+ _queryAll(this, predicate, matches, true);
27000
27233
  return matches;
27001
27234
  }
27235
+ /**
27236
+ * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
27237
+ */
27002
27238
  queryAllNodes(predicate) {
27003
27239
  const matches = [];
27004
- _queryAllR3(this, predicate, matches, false);
27240
+ _queryAll(this, predicate, matches, false);
27005
27241
  return matches;
27006
27242
  }
27243
+ /**
27244
+ * Triggers the event by its name if there is a corresponding listener in the element's
27245
+ * `listeners` collection.
27246
+ *
27247
+ * If the event lacks a listener or there's some other problem, consider
27248
+ * calling `nativeElement.dispatchEvent(eventObject)`.
27249
+ *
27250
+ * @param eventName The name of the event to trigger
27251
+ * @param eventObj The _event object_ expected by the handler
27252
+ *
27253
+ * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
27254
+ */
27007
27255
  triggerEventHandler(eventName, eventObj) {
27008
27256
  const node = this.nativeNode;
27009
27257
  const invokedListeners = [];
@@ -27062,11 +27310,12 @@ function isPrimitiveValue(value) {
27062
27310
  return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||
27063
27311
  value === null;
27064
27312
  }
27065
- function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27313
+ function _queryAll(parentElement, predicate, matches, elementsOnly) {
27066
27314
  const context = getLContext(parentElement.nativeNode);
27067
- if (context !== null) {
27068
- const parentTNode = context.lView[TVIEW].data[context.nodeIndex];
27069
- _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27315
+ const lView = context ? context.lView : null;
27316
+ if (lView !== null) {
27317
+ const parentTNode = lView[TVIEW].data[context.nodeIndex];
27318
+ _queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27070
27319
  }
27071
27320
  else {
27072
27321
  // If the context is null, then `parentElement` was either created with Renderer2 or native DOM
@@ -27084,26 +27333,26 @@ function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
27084
27333
  * @param elementsOnly whether only elements should be searched
27085
27334
  * @param rootNativeNode the root native node on which predicate should not be matched
27086
27335
  */
27087
- function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27336
+ function _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
27088
27337
  ngDevMode && assertTNodeForLView(tNode, lView);
27089
27338
  const nativeNode = getNativeByTNodeOrNull(tNode, lView);
27090
27339
  // For each type of TNode, specific logic is executed.
27091
27340
  if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {
27092
27341
  // Case 1: the TNode is an element
27093
27342
  // The native node has to be checked.
27094
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27343
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27095
27344
  if (isComponentHost(tNode)) {
27096
27345
  // If the element is the host of a component, then all nodes in its view have to be processed.
27097
27346
  // Note: the component's content (tNode.child) will be processed from the insertion points.
27098
27347
  const componentView = getComponentLViewByIndex(tNode.index, lView);
27099
27348
  if (componentView && componentView[TVIEW].firstChild) {
27100
- _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27349
+ _queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
27101
27350
  }
27102
27351
  }
27103
27352
  else {
27104
27353
  if (tNode.child) {
27105
27354
  // Otherwise, its children have to be processed.
27106
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27355
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27107
27356
  }
27108
27357
  // We also have to query the DOM directly in order to catch elements inserted through
27109
27358
  // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
@@ -27119,16 +27368,16 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27119
27368
  // processed.
27120
27369
  const nodeOrContainer = lView[tNode.index];
27121
27370
  if (isLContainer(nodeOrContainer)) {
27122
- _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27371
+ _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
27123
27372
  }
27124
27373
  }
27125
27374
  else if (tNode.type & 4 /* Container */) {
27126
27375
  // Case 2: the TNode is a container
27127
27376
  // The native node has to be checked.
27128
27377
  const lContainer = lView[tNode.index];
27129
- _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27378
+ _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
27130
27379
  // Each view inside the container has to be processed.
27131
- _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27380
+ _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);
27132
27381
  }
27133
27382
  else if (tNode.type & 16 /* Projection */) {
27134
27383
  // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
@@ -27138,18 +27387,18 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27138
27387
  const head = componentHost.projection[tNode.projection];
27139
27388
  if (Array.isArray(head)) {
27140
27389
  for (let nativeNode of head) {
27141
- _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27390
+ _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
27142
27391
  }
27143
27392
  }
27144
27393
  else if (head) {
27145
27394
  const nextLView = componentView[PARENT];
27146
27395
  const nextTNode = nextLView[TVIEW].data[head.index];
27147
- _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27396
+ _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
27148
27397
  }
27149
27398
  }
27150
27399
  else if (tNode.child) {
27151
27400
  // Case 4: the TNode is a view.
27152
- _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27401
+ _queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
27153
27402
  }
27154
27403
  // We don't want to go to the next sibling of the root node.
27155
27404
  if (rootNativeNode !== nativeNode) {
@@ -27157,7 +27406,7 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27157
27406
  // link, depending on whether the current node has been projected.
27158
27407
  const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;
27159
27408
  if (nextTNode) {
27160
- _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27409
+ _queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
27161
27410
  }
27162
27411
  }
27163
27412
  }
@@ -27170,12 +27419,12 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
27170
27419
  * @param elementsOnly whether only elements should be searched
27171
27420
  * @param rootNativeNode the root native node on which predicate should not be matched
27172
27421
  */
27173
- function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27422
+ function _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
27174
27423
  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
27175
27424
  const childView = lContainer[i];
27176
27425
  const firstChild = childView[TVIEW].firstChild;
27177
27426
  if (firstChild) {
27178
- _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27427
+ _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
27179
27428
  }
27180
27429
  }
27181
27430
  }
@@ -27188,7 +27437,7 @@ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, element
27188
27437
  * @param elementsOnly whether only elements should be searched
27189
27438
  * @param rootNativeNode the root native node on which predicate should not be matched
27190
27439
  */
27191
- function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27440
+ function _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
27192
27441
  if (rootNativeNode !== nativeNode) {
27193
27442
  const debugNode = getDebugNode(nativeNode);
27194
27443
  if (!debugNode) {
@@ -27197,7 +27446,7 @@ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNati
27197
27446
  // Type of the "predicate and "matches" array are set based on the value of
27198
27447
  // the "elementsOnly" parameter. TypeScript is not able to properly infer these
27199
27448
  // types with generics, so we manually cast the parameters accordingly.
27200
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27449
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27201
27450
  matches.indexOf(debugNode) === -1) {
27202
27451
  matches.push(debugNode);
27203
27452
  }
@@ -27222,7 +27471,7 @@ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnl
27222
27471
  const node = nodes[i];
27223
27472
  const debugNode = getDebugNode(node);
27224
27473
  if (debugNode) {
27225
- if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&
27474
+ if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
27226
27475
  matches.indexOf(debugNode) === -1) {
27227
27476
  matches.push(debugNode);
27228
27477
  }
@@ -27263,25 +27512,24 @@ function collectPropertyBindings(properties, tNode, lView, tData) {
27263
27512
  // Need to keep the nodes in a global Map so that multiple angular apps are supported.
27264
27513
  const _nativeNodeToDebugNode = new Map();
27265
27514
  const NG_DEBUG_PROPERTY = '__ng_debug__';
27266
- function getDebugNode__POST_R3__(nativeNode) {
27515
+ /**
27516
+ * @publicApi
27517
+ */
27518
+ function getDebugNode(nativeNode) {
27267
27519
  if (nativeNode instanceof Node) {
27268
27520
  if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {
27269
27521
  nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?
27270
- new DebugElement__POST_R3__(nativeNode) :
27271
- new DebugNode__POST_R3__(nativeNode);
27522
+ new DebugElement(nativeNode) :
27523
+ new DebugNode(nativeNode);
27272
27524
  }
27273
27525
  return nativeNode[NG_DEBUG_PROPERTY];
27274
27526
  }
27275
27527
  return null;
27276
27528
  }
27277
- /**
27278
- * @publicApi
27279
- */
27280
- const getDebugNode = getDebugNode__POST_R3__;
27281
- function getDebugNodeR2__POST_R3__(_nativeNode) {
27529
+ // TODO: cleanup all references to this function and remove it.
27530
+ function getDebugNodeR2(_nativeNode) {
27282
27531
  return null;
27283
27532
  }
27284
- const getDebugNodeR2 = getDebugNodeR2__POST_R3__;
27285
27533
  function getAllDebugNodes() {
27286
27534
  return Array.from(_nativeNodeToDebugNode.values());
27287
27535
  }
@@ -27291,14 +27539,6 @@ function indexDebugNode(node) {
27291
27539
  function removeDebugNodeFromIndex(node) {
27292
27540
  _nativeNodeToDebugNode.delete(node.nativeNode);
27293
27541
  }
27294
- /**
27295
- * @publicApi
27296
- */
27297
- const DebugNode = DebugNode__POST_R3__;
27298
- /**
27299
- * @publicApi
27300
- */
27301
- const DebugElement = DebugElement__POST_R3__;
27302
27542
 
27303
27543
  /**
27304
27544
  * @license
@@ -28420,102 +28660,9 @@ const _CORE_PLATFORM_PROVIDERS = [
28420
28660
  const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
28421
28661
 
28422
28662
  /**
28423
- * @license
28424
- * Copyright Google LLC All Rights Reserved.
28425
- *
28426
- * Use of this source code is governed by an MIT-style license that can be
28427
- * found in the LICENSE file at https://angular.io/license
28428
- */
28429
- function _iterableDiffersFactory() {
28430
- return defaultIterableDiffers;
28431
- }
28432
- function _keyValueDiffersFactory() {
28433
- return defaultKeyValueDiffers;
28434
- }
28435
- function _localeFactory(locale) {
28436
- return locale || getGlobalLocale();
28437
- }
28438
- /**
28439
- * Work out the locale from the potential global properties.
28440
- *
28441
- * * Closure Compiler: use `goog.getLocale()`.
28442
- * * Ivy enabled: use `$localize.locale`
28443
- */
28444
- function getGlobalLocale() {
28445
- if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
28446
- typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
28447
- // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
28448
- // * In order to preserve backwards compatibility, we use Angular default value over
28449
- // Closure Compiler's one.
28450
- return goog.getLocale();
28451
- }
28452
- else {
28453
- // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
28454
- // COMPILE-TIME INLINER.
28455
- //
28456
- // * During compile time inlining of translations the expression will be replaced
28457
- // with a string literal that is the current locale. Other forms of this expression are not
28458
- // guaranteed to be replaced.
28459
- //
28460
- // * During runtime translation evaluation, the developer is required to set `$localize.locale`
28461
- // if required, or just to provide their own `LOCALE_ID` provider.
28462
- return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
28463
- }
28464
- }
28465
- /**
28466
- * A built-in [dependency injection token](guide/glossary#di-token)
28467
- * that is used to configure the root injector for bootstrapping.
28468
- */
28469
- const APPLICATION_MODULE_PROVIDERS = [
28470
- {
28471
- provide: ApplicationRef,
28472
- useClass: ApplicationRef,
28473
- deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
28474
- },
28475
- { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
28476
- {
28477
- provide: ApplicationInitStatus,
28478
- useClass: ApplicationInitStatus,
28479
- deps: [[new Optional(), APP_INITIALIZER]]
28480
- },
28481
- { provide: Compiler, useClass: Compiler, deps: [] },
28482
- APP_ID_RANDOM_PROVIDER,
28483
- { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },
28484
- { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },
28485
- {
28486
- provide: LOCALE_ID,
28487
- useFactory: _localeFactory,
28488
- deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
28489
- },
28490
- { provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
28491
- ];
28492
- /**
28493
- * Schedule work at next available slot.
28494
- *
28495
- * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
28496
- * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
28497
- * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
28498
- *
28499
- * @param ngZone NgZone to use for scheduling.
28500
- */
28501
- function zoneSchedulerFactory(ngZone) {
28502
- let queue = [];
28503
- ngZone.onStable.subscribe(() => {
28504
- while (queue.length) {
28505
- queue.pop()();
28506
- }
28507
- });
28508
- return function (fn) {
28509
- queue.push(fn);
28510
- };
28511
- }
28512
- /**
28513
- * Configures the root injector for an app with
28514
- * providers of `@angular/core` dependencies that `ApplicationRef` needs
28515
- * to bootstrap components.
28516
- *
28517
28663
  * Re-exported by `BrowserModule`, which is included automatically in the root
28518
- * `AppModule` when you create a new app with the CLI `new` command.
28664
+ * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
28665
+ * `ApplicationRef` to instantiate it.
28519
28666
  *
28520
28667
  * @publicApi
28521
28668
  */
@@ -28525,14 +28672,25 @@ class ApplicationModule {
28525
28672
  }
28526
28673
  ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
28527
28674
  ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
28528
- ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS });
28675
+ ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
28529
28676
  (function () {
28530
28677
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
28531
- type: NgModule,
28532
- args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
28678
+ type: NgModule
28533
28679
  }], function () { return [{ type: ApplicationRef }]; }, null);
28534
28680
  })();
28535
28681
 
28682
+ /**
28683
+ * @license
28684
+ * Copyright Google LLC All Rights Reserved.
28685
+ *
28686
+ * Use of this source code is governed by an MIT-style license that can be
28687
+ * found in the LICENSE file at https://angular.io/license
28688
+ */
28689
+ /** Coerces a value (typically a string) to a boolean. */
28690
+ function coerceToBoolean(value) {
28691
+ return typeof value === 'boolean' ? value : (value != null && value !== 'false');
28692
+ }
28693
+
28536
28694
  /**
28537
28695
  * @license
28538
28696
  * Copyright Google LLC All Rights Reserved.
@@ -28691,5 +28849,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
28691
28849
  * Generated bundle index. Do not edit.
28692
28850
  */
28693
28851
 
28694
- export { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, 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, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, 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, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, 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, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, 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, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, registerNgModuleType as ɵregisterNgModuleType, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵ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, ɵɵqueryRefresh, ɵɵreference, ɵɵ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, ɵɵviewQuery };
28852
+ export { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, 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, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, 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, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, 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, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵ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, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵ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, ɵɵviewQuery };
28695
28853
  //# sourceMappingURL=core.mjs.map