@angular/core 14.0.0-next.11 → 14.0.0-next.14

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 (54) hide show
  1. package/core.d.ts +121 -66
  2. package/esm2020/src/application_ref.mjs +118 -32
  3. package/esm2020/src/application_tokens.mjs +5 -2
  4. package/esm2020/src/change_detection/change_detection.mjs +2 -2
  5. package/esm2020/src/change_detection/differs/default_iterable_differ.mjs +2 -2
  6. package/esm2020/src/change_detection/differs/default_keyvalue_differ.mjs +2 -2
  7. package/esm2020/src/compiler/compiler_facade_interface.mjs +7 -1
  8. package/esm2020/src/console.mjs +4 -3
  9. package/esm2020/src/core.mjs +2 -2
  10. package/esm2020/src/core_private_export.mjs +3 -2
  11. package/esm2020/src/core_render3_private_export.mjs +2 -2
  12. package/esm2020/src/di/index.mjs +2 -1
  13. package/esm2020/src/di/injection_token.mjs +7 -1
  14. package/esm2020/src/di/interface/defs.mjs +1 -1
  15. package/esm2020/src/di/r3_injector.mjs +216 -125
  16. package/esm2020/src/di/scope.mjs +1 -1
  17. package/esm2020/src/errors.mjs +1 -1
  18. package/esm2020/src/linker/component_factory.mjs +1 -1
  19. package/esm2020/src/linker/ng_module_factory.mjs +1 -1
  20. package/esm2020/src/linker/view_container_ref.mjs +12 -9
  21. package/esm2020/src/platform_core_providers.mjs +3 -14
  22. package/esm2020/src/render3/bindings.mjs +2 -2
  23. package/esm2020/src/render3/component_ref.mjs +8 -4
  24. package/esm2020/src/render3/definition.mjs +14 -20
  25. package/esm2020/src/render3/errors.mjs +6 -3
  26. package/esm2020/src/render3/errors_di.mjs +1 -1
  27. package/esm2020/src/render3/features/inherit_definition_feature.mjs +3 -2
  28. package/esm2020/src/render3/features/standalone_feature.mjs +7 -0
  29. package/esm2020/src/render3/index.mjs +4 -3
  30. package/esm2020/src/render3/instructions/shared.mjs +33 -15
  31. package/esm2020/src/render3/interfaces/definition.mjs +1 -1
  32. package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
  33. package/esm2020/src/render3/jit/directive.mjs +2 -3
  34. package/esm2020/src/render3/jit/environment.mjs +2 -1
  35. package/esm2020/src/render3/ng_module_ref.mjs +33 -4
  36. package/esm2020/src/testability/testability.mjs +4 -3
  37. package/esm2020/src/version.mjs +1 -1
  38. package/esm2020/testing/src/logger.mjs +3 -3
  39. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  40. package/esm2020/testing/src/r3_test_bed.mjs +5 -8
  41. package/esm2020/testing/src/test_bed.mjs +1 -1
  42. package/esm2020/testing/src/test_bed_common.mjs +1 -1
  43. package/fesm2015/core.mjs +487 -229
  44. package/fesm2015/core.mjs.map +1 -1
  45. package/fesm2015/testing.mjs +5 -8
  46. package/fesm2015/testing.mjs.map +1 -1
  47. package/fesm2020/core.mjs +485 -230
  48. package/fesm2020/core.mjs.map +1 -1
  49. package/fesm2020/testing.mjs +5 -8
  50. package/fesm2020/testing.mjs.map +1 -1
  51. package/package.json +1 -1
  52. package/schematics/migrations.json +2 -2
  53. package/testing/testing.d.ts +1 -42
  54. package/esm2020/src/change_detection/change_detection_util.mjs +0 -64
package/fesm2015/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.11
2
+ * @license Angular v14.0.0-next.14
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -918,19 +918,21 @@ function ɵɵdefineComponent(componentDefinition) {
918
918
  schemas: componentDefinition.schemas || null,
919
919
  tView: null,
920
920
  };
921
- const directiveTypes = componentDefinition.directives;
921
+ const dependencies = componentDefinition.dependencies;
922
922
  const feature = componentDefinition.features;
923
- const pipeTypes = componentDefinition.pipes;
924
923
  def.id += _renderCompCount++;
925
924
  def.inputs = invertObject(componentDefinition.inputs, declaredInputs),
926
925
  def.outputs = invertObject(componentDefinition.outputs),
927
926
  feature && feature.forEach((fn) => fn(def));
928
- def.directiveDefs = directiveTypes ?
929
- () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)
930
- .map(extractDirectiveDef) :
927
+ def.directiveDefs = dependencies ?
928
+ (() => (typeof dependencies === 'function' ? dependencies() : dependencies)
929
+ .map(extractDirectiveDef)
930
+ .filter(nonNull)) :
931
931
  null;
932
- def.pipeDefs = pipeTypes ?
933
- () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :
932
+ def.pipeDefs = dependencies ?
933
+ (() => (typeof dependencies === 'function' ? dependencies() : dependencies)
934
+ .map(getPipeDef$1)
935
+ .filter(nonNull)) :
934
936
  null;
935
937
  return def;
936
938
  });
@@ -947,21 +949,13 @@ function ɵɵdefineComponent(componentDefinition) {
947
949
  function ɵɵsetComponentScope(type, directives, pipes) {
948
950
  const def = type.ɵcmp;
949
951
  def.directiveDefs = () => directives.map(extractDirectiveDef);
950
- def.pipeDefs = () => pipes.map(extractPipeDef);
952
+ def.pipeDefs = () => pipes.map(getPipeDef$1);
951
953
  }
952
954
  function extractDirectiveDef(type) {
953
- const def = getComponentDef(type) || getDirectiveDef(type);
954
- if (ngDevMode && !def) {
955
- throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);
956
- }
957
- return def;
955
+ return getComponentDef(type) || getDirectiveDef(type);
958
956
  }
959
- function extractPipeDef(type) {
960
- const def = getPipeDef$1(type);
961
- if (ngDevMode && !def) {
962
- throw new Error(`'${type.name}' is not a 'PipeType'.`);
963
- }
964
- return def;
957
+ function nonNull(value) {
958
+ return value !== null;
965
959
  }
966
960
  const autoRegisterModuleById = {};
967
961
  /**
@@ -4008,6 +4002,12 @@ class InjectionToken {
4008
4002
  });
4009
4003
  }
4010
4004
  }
4005
+ /**
4006
+ * @internal
4007
+ */
4008
+ get multi() {
4009
+ return this;
4010
+ }
4011
4011
  toString() {
4012
4012
  return `InjectionToken ${this._desc}`;
4013
4013
  }
@@ -4120,6 +4120,12 @@ var FactoryTarget;
4120
4120
  FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
4121
4121
  FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
4122
4122
  })(FactoryTarget || (FactoryTarget = {}));
4123
+ var R3TemplateDependencyKind;
4124
+ (function (R3TemplateDependencyKind) {
4125
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
4126
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
4127
+ R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
4128
+ })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
4123
4129
  var ViewEncapsulation;
4124
4130
  (function (ViewEncapsulation) {
4125
4131
  ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
@@ -6907,8 +6913,10 @@ function maybeUnwrapFn(value) {
6907
6913
  * found in the LICENSE file at https://angular.io/license
6908
6914
  */
6909
6915
  /** Called when there are multiple component selectors that match a given node */
6910
- function throwMultipleComponentError(tNode) {
6911
- throw new RuntimeError(-300 /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}`);
6916
+ function throwMultipleComponentError(tNode, first, second) {
6917
+ throw new RuntimeError(-300 /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` +
6918
+ `${stringifyForError(first)} and ` +
6919
+ `${stringifyForError(second)}`);
6912
6920
  }
6913
6921
  /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
6914
6922
  function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {
@@ -10237,9 +10245,9 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
10237
10245
  propName = mapPropName(propName);
10238
10246
  if (ngDevMode) {
10239
10247
  validateAgainstEventProperties(propName);
10240
- if (!validateProperty(tView, element, propName, tNode)) {
10248
+ if (!validateProperty(element, tNode.value, propName, tView.schemas)) {
10241
10249
  // Return here since we only log warnings for unknown properties.
10242
- logUnknownPropertyError(propName, tNode);
10250
+ logUnknownPropertyError(propName, tNode.value);
10243
10251
  return;
10244
10252
  }
10245
10253
  ngDevMode.rendererSetProperty++;
@@ -10259,7 +10267,7 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
10259
10267
  // If the node is a container and the property didn't
10260
10268
  // match any of the inputs or schemas we should throw.
10261
10269
  if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {
10262
- logUnknownPropertyError(propName, tNode);
10270
+ logUnknownPropertyError(propName, tNode.value);
10263
10271
  }
10264
10272
  }
10265
10273
  }
@@ -10311,21 +10319,36 @@ function setNgReflectProperties(lView, element, type, dataValue, value) {
10311
10319
  }
10312
10320
  }
10313
10321
  }
10314
- function validateProperty(tView, element, propName, tNode) {
10322
+ /**
10323
+ * Validates that the property of the element is known at runtime and returns
10324
+ * false if it's not the case.
10325
+ * This check is relevant for JIT-compiled components (for AOT-compiled
10326
+ * ones this check happens at build time).
10327
+ *
10328
+ * The property is considered known if either:
10329
+ * - it's a known property of the element
10330
+ * - the element is allowed by one of the schemas
10331
+ * - the property is used for animations
10332
+ *
10333
+ * @param element Element to validate
10334
+ * @param tagName Name of the tag to check
10335
+ * @param propName Name of the property to check
10336
+ * @param schemas Array of schemas
10337
+ */
10338
+ function validateProperty(element, tagName, propName, schemas) {
10315
10339
  // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
10316
10340
  // mode where this check happens at compile time. In JIT mode, `schemas` is always present and
10317
10341
  // defined as an array (as an empty array in case `schemas` field is not defined) and we should
10318
10342
  // execute the check below.
10319
- if (tView.schemas === null)
10343
+ if (schemas === null)
10320
10344
  return true;
10321
- // The property is considered valid if the element matches the schema, it exists on the element
10345
+ // The property is considered valid if the element matches the schema, it exists on the element,
10322
10346
  // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).
10323
- if (matchingSchemas(tView.schemas, tNode.value) || propName in element ||
10324
- isAnimationProp(propName)) {
10347
+ if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
10325
10348
  return true;
10326
10349
  }
10327
10350
  // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we
10328
- // need to account for both here, while being careful for `typeof null` also returning 'object'.
10351
+ // need to account for both here, while being careful with `typeof null` also returning 'object'.
10329
10352
  return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
10330
10353
  }
10331
10354
  /**
@@ -10348,10 +10371,10 @@ function matchingSchemas(schemas, tagName) {
10348
10371
  /**
10349
10372
  * Logs an error that a property is not supported on an element.
10350
10373
  * @param propName Name of the invalid property.
10351
- * @param tNode Node on which we encountered the property.
10374
+ * @param tagName Name of the node on which we encountered the property.
10352
10375
  */
10353
- function logUnknownPropertyError(propName, tNode) {
10354
- let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`;
10376
+ function logUnknownPropertyError(propName, tagName) {
10377
+ const message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'.`;
10355
10378
  console.error(formatRuntimeError(303 /* UNKNOWN_BINDING */, message));
10356
10379
  }
10357
10380
  /**
@@ -10568,8 +10591,11 @@ function findDirectiveDefMatches(tView, viewData, tNode) {
10568
10591
  if (ngDevMode) {
10569
10592
  assertTNodeType(tNode, 2 /* Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
10570
10593
  `Please use a different tag to activate the ${stringify(def.type)} component.`);
10571
- if (tNode.flags & 2 /* isComponentHost */)
10572
- throwMultipleComponentError(tNode);
10594
+ if (tNode.flags & 2 /* isComponentHost */) {
10595
+ // If another component has been matched previously, it's the first element in the
10596
+ // `matches` array, see how we store components/directives in `matches` below.
10597
+ throwMultipleComponentError(tNode, matches[0].type, def.type);
10598
+ }
10573
10599
  }
10574
10600
  markAsComponentHost(tView, tNode);
10575
10601
  // The component is always stored first with directives after.
@@ -11371,6 +11397,14 @@ const NOT_YET = {};
11371
11397
  * a circular dependency among the providers.
11372
11398
  */
11373
11399
  const CIRCULAR = {};
11400
+ /**
11401
+ * A multi-provider token for initialization functions that will run upon construction of a
11402
+ * non-view injector.
11403
+ *
11404
+ * @publicApi
11405
+ */
11406
+ const INJECTOR_INITIALIZER = new InjectionToken('INJECTOR_INITIALIZER');
11407
+ const INJECTOR_DEF_TYPES = new InjectionToken('INJECTOR_DEF_TYPES');
11374
11408
  /**
11375
11409
  * A lazily initialized NullInjector.
11376
11410
  */
@@ -11388,7 +11422,7 @@ function getNullInjector() {
11388
11422
  */
11389
11423
  function createInjector(defType, parent = null, additionalProviders = null, name) {
11390
11424
  const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);
11391
- injector._resolveInjectorDefTypes();
11425
+ injector.resolveInjectorInitializers();
11392
11426
  return injector;
11393
11427
  }
11394
11428
  /**
@@ -11396,42 +11430,180 @@ function createInjector(defType, parent = null, additionalProviders = null, name
11396
11430
  * where resolving the injector types immediately can lead to an infinite loop. The injector types
11397
11431
  * should be resolved at a later point by calling `_resolveInjectorDefTypes`.
11398
11432
  */
11399
- function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) {
11400
- return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);
11433
+ function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {
11434
+ const providers = [
11435
+ ...flatten(additionalProviders || EMPTY_ARRAY),
11436
+ ...importProvidersFrom(defType),
11437
+ ];
11438
+ name = name || (typeof defType === 'object' ? undefined : stringify(defType));
11439
+ return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);
11440
+ }
11441
+ /**
11442
+ * The logic visits an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive
11443
+ * providers and invokes specified callbacks when:
11444
+ * - an injector type is visited (typically an NgModule)
11445
+ * - a provider is visited
11446
+ *
11447
+ * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
11448
+ * the function will return "true" to indicate that the providers of the type definition need
11449
+ * to be processed. This allows us to process providers of injector types after all imports of
11450
+ * an injector definition are processed. (following View Engine semantics: see FW-1349)
11451
+ */
11452
+ function walkProviderTree(container, providersOut, parents, dedup) {
11453
+ container = resolveForwardRef(container);
11454
+ if (!container)
11455
+ return false;
11456
+ // Either the defOrWrappedDef is an InjectorType (with injector def) or an
11457
+ // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic
11458
+ // read, so care is taken to only do the read once.
11459
+ // First attempt to read the injector def (`ɵinj`).
11460
+ let def = getInjectorDef(container);
11461
+ // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.
11462
+ const ngModule = (def == null) && container.ngModule || undefined;
11463
+ // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
11464
+ // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
11465
+ // is the `ngModule`.
11466
+ const defType = (ngModule === undefined) ? container : ngModule;
11467
+ // Check for circular dependencies.
11468
+ if (ngDevMode && parents.indexOf(defType) !== -1) {
11469
+ const defName = stringify(defType);
11470
+ const path = parents.map(stringify);
11471
+ throwCyclicDependencyError(defName, path);
11472
+ }
11473
+ // Check for multiple imports of the same module
11474
+ const isDuplicate = dedup.has(defType);
11475
+ // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual
11476
+ // `InjectorDef` is on its `ngModule`.
11477
+ if (ngModule !== undefined) {
11478
+ def = getInjectorDef(ngModule);
11479
+ }
11480
+ // If no definition was found, it might be from exports. Remove it.
11481
+ if (def == null) {
11482
+ return false;
11483
+ }
11484
+ // Add providers in the same way that @NgModule resolution did:
11485
+ // First, include providers from any imports.
11486
+ if (def.imports != null && !isDuplicate) {
11487
+ // Before processing defType's imports, add it to the set of parents. This way, if it ends
11488
+ // up deeply importing itself, this can be detected.
11489
+ ngDevMode && parents.push(defType);
11490
+ // Add it to the set of dedups. This way we can detect multiple imports of the same module
11491
+ dedup.add(defType);
11492
+ let importTypesWithProviders;
11493
+ try {
11494
+ deepForEach(def.imports, imported => {
11495
+ if (walkProviderTree(imported, providersOut, parents, dedup)) {
11496
+ if (importTypesWithProviders === undefined)
11497
+ importTypesWithProviders = [];
11498
+ // If the processed import is an injector type with providers, we store it in the
11499
+ // list of import types with providers, so that we can process those afterwards.
11500
+ importTypesWithProviders.push(imported);
11501
+ }
11502
+ });
11503
+ }
11504
+ finally {
11505
+ // Remove it from the parents set when finished.
11506
+ ngDevMode && parents.pop();
11507
+ }
11508
+ // Imports which are declared with providers (TypeWithProviders) need to be processed
11509
+ // after all imported modules are processed. This is similar to how View Engine
11510
+ // processes/merges module imports in the metadata resolver. See: FW-1349.
11511
+ if (importTypesWithProviders !== undefined) {
11512
+ for (let i = 0; i < importTypesWithProviders.length; i++) {
11513
+ const { ngModule, providers } = importTypesWithProviders[i];
11514
+ deepForEach(providers, provider => {
11515
+ validateProvider(provider, providers || EMPTY_ARRAY, ngModule);
11516
+ providersOut.push(provider);
11517
+ });
11518
+ }
11519
+ }
11520
+ }
11521
+ // Track the InjectorType and add a provider for it.
11522
+ // It's important that this is done after the def's imports.
11523
+ const factory = getFactoryDef(defType) || (() => new defType());
11524
+ // Provider to create `defType` using its factory.
11525
+ providersOut.push({
11526
+ provide: defType,
11527
+ useFactory: factory,
11528
+ deps: EMPTY_ARRAY,
11529
+ });
11530
+ providersOut.push({
11531
+ provide: INJECTOR_DEF_TYPES,
11532
+ useValue: defType,
11533
+ multi: true,
11534
+ });
11535
+ // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.
11536
+ providersOut.push({
11537
+ provide: INJECTOR_INITIALIZER,
11538
+ useValue: () => inject(defType),
11539
+ multi: true,
11540
+ });
11541
+ // Next, include providers listed on the definition itself.
11542
+ const defProviders = def.providers;
11543
+ if (defProviders != null && !isDuplicate) {
11544
+ const injectorType = container;
11545
+ deepForEach(defProviders, provider => {
11546
+ // TODO: fix cast
11547
+ validateProvider(provider, defProviders, injectorType);
11548
+ providersOut.push(provider);
11549
+ });
11550
+ }
11551
+ return (ngModule !== undefined &&
11552
+ container.providers !== undefined);
11553
+ }
11554
+ /**
11555
+ * An `Injector` that's part of the environment injector hierarchy, which exists outside of the
11556
+ * component tree.
11557
+ */
11558
+ class EnvironmentInjector {
11559
+ }
11560
+ /**
11561
+ * Collects providers from all NgModules, including transitively imported ones.
11562
+ *
11563
+ * @returns The list of collected providers from the specified list of NgModules.
11564
+ * @publicApi
11565
+ */
11566
+ function importProvidersFrom(...injectorTypes) {
11567
+ const providers = [];
11568
+ deepForEach(injectorTypes, injectorDef => walkProviderTree(injectorDef, providers, [], new Set()));
11569
+ return providers;
11401
11570
  }
11402
- class R3Injector {
11403
- constructor(def, additionalProviders, parent, source = null) {
11571
+ class R3Injector extends EnvironmentInjector {
11572
+ constructor(providers, parent, source, scopes) {
11573
+ super();
11404
11574
  this.parent = parent;
11575
+ this.source = source;
11576
+ this.scopes = scopes;
11405
11577
  /**
11406
11578
  * Map of tokens to records which contain the instances of those tokens.
11407
11579
  * - `null` value implies that we don't have the record. Used by tree-shakable injectors
11408
11580
  * to prevent further searches.
11409
11581
  */
11410
11582
  this.records = new Map();
11411
- /**
11412
- * The transitive set of `InjectorType`s which define this injector.
11413
- */
11414
- this.injectorDefTypes = new Set();
11415
11583
  /**
11416
11584
  * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
11417
11585
  */
11418
- this.onDestroy = new Set();
11586
+ this._ngOnDestroyHooks = new Set();
11587
+ this._onDestroyHooks = [];
11419
11588
  this._destroyed = false;
11420
- const dedupStack = [];
11421
- // Start off by creating Records for every provider declared in every InjectorType
11422
- // included transitively in additional providers then do the same for `def`. This order is
11423
- // important because `def` may include providers that override ones in additionalProviders.
11424
- additionalProviders &&
11425
- deepForEach(additionalProviders, provider => this.processProvider(provider, def, additionalProviders));
11426
- deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));
11589
+ // Start off by creating Records for every provider.
11590
+ for (const provider of providers) {
11591
+ this.processProvider(provider);
11592
+ }
11427
11593
  // Make sure the INJECTOR token provides this injector.
11428
11594
  this.records.set(INJECTOR, makeRecord(undefined, this));
11595
+ // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.
11596
+ if (scopes.has('environment')) {
11597
+ this.records.set(EnvironmentInjector, makeRecord(undefined, this));
11598
+ }
11429
11599
  // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide
11430
11600
  // any injectable scoped to APP_ROOT_SCOPE.
11431
11601
  const record = this.records.get(INJECTOR_SCOPE);
11432
- this.scope = record != null ? record.value : null;
11433
- // Source name, used for debugging
11434
- this.source = source || (typeof def === 'object' ? null : stringify(def));
11602
+ if (record != null && typeof record.value === 'string') {
11603
+ this.scopes.add(record.value);
11604
+ }
11605
+ this.injectorDefTypes =
11606
+ new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));
11435
11607
  }
11436
11608
  /**
11437
11609
  * Flag indicating that this injector was previously destroyed.
@@ -11451,15 +11623,24 @@ class R3Injector {
11451
11623
  this._destroyed = true;
11452
11624
  try {
11453
11625
  // Call all the lifecycle hooks.
11454
- this.onDestroy.forEach(service => service.ngOnDestroy());
11626
+ for (const service of this._ngOnDestroyHooks) {
11627
+ service.ngOnDestroy();
11628
+ }
11629
+ for (const hook of this._onDestroyHooks) {
11630
+ hook();
11631
+ }
11455
11632
  }
11456
11633
  finally {
11457
11634
  // Release all references.
11458
11635
  this.records.clear();
11459
- this.onDestroy.clear();
11636
+ this._ngOnDestroyHooks.clear();
11460
11637
  this.injectorDefTypes.clear();
11638
+ this._onDestroyHooks.length = 0;
11461
11639
  }
11462
11640
  }
11641
+ onDestroy(callback) {
11642
+ this._onDestroyHooks.push(callback);
11643
+ }
11463
11644
  get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {
11464
11645
  this.assertNotDestroyed();
11465
11646
  // Set the injection context.
@@ -11523,12 +11704,26 @@ class R3Injector {
11523
11704
  }
11524
11705
  }
11525
11706
  /** @internal */
11526
- _resolveInjectorDefTypes() {
11527
- this.injectorDefTypes.forEach(defType => this.get(defType));
11707
+ resolveInjectorInitializers() {
11708
+ const previousInjector = setCurrentInjector(this);
11709
+ const previousInjectImplementation = setInjectImplementation(undefined);
11710
+ try {
11711
+ const initializers = this.get(INJECTOR_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);
11712
+ for (const initializer of initializers) {
11713
+ initializer();
11714
+ }
11715
+ }
11716
+ finally {
11717
+ setCurrentInjector(previousInjector);
11718
+ setInjectImplementation(previousInjectImplementation);
11719
+ }
11528
11720
  }
11529
11721
  toString() {
11530
- const tokens = [], records = this.records;
11531
- records.forEach((v, token) => tokens.push(stringify(token)));
11722
+ const tokens = [];
11723
+ const records = this.records;
11724
+ for (const token of records.keys()) {
11725
+ tokens.push(stringify(token));
11726
+ }
11532
11727
  return `R3Injector[${tokens.join(', ')}]`;
11533
11728
  }
11534
11729
  assertNotDestroyed() {
@@ -11536,105 +11731,16 @@ class R3Injector {
11536
11731
  throw new RuntimeError(205 /* INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');
11537
11732
  }
11538
11733
  }
11539
- /**
11540
- * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
11541
- * to this injector.
11542
- *
11543
- * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
11544
- * the function will return "true" to indicate that the providers of the type definition need
11545
- * to be processed. This allows us to process providers of injector types after all imports of
11546
- * an injector definition are processed. (following View Engine semantics: see FW-1349)
11547
- */
11548
- processInjectorType(defOrWrappedDef, parents, dedupStack) {
11549
- defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
11550
- if (!defOrWrappedDef)
11551
- return false;
11552
- // Either the defOrWrappedDef is an InjectorType (with injector def) or an
11553
- // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic
11554
- // read, so care is taken to only do the read once.
11555
- // First attempt to read the injector def (`ɵinj`).
11556
- let def = getInjectorDef(defOrWrappedDef);
11557
- // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.
11558
- const ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;
11559
- // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
11560
- // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
11561
- // is the `ngModule`.
11562
- const defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;
11563
- // Check for circular dependencies.
11564
- if (ngDevMode && parents.indexOf(defType) !== -1) {
11565
- const defName = stringify(defType);
11566
- const path = parents.map(stringify);
11567
- throwCyclicDependencyError(defName, path);
11568
- }
11569
- // Check for multiple imports of the same module
11570
- const isDuplicate = dedupStack.indexOf(defType) !== -1;
11571
- // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual
11572
- // `InjectorDef` is on its `ngModule`.
11573
- if (ngModule !== undefined) {
11574
- def = getInjectorDef(ngModule);
11575
- }
11576
- // If no definition was found, it might be from exports. Remove it.
11577
- if (def == null) {
11578
- return false;
11579
- }
11580
- // Add providers in the same way that @NgModule resolution did:
11581
- // First, include providers from any imports.
11582
- if (def.imports != null && !isDuplicate) {
11583
- // Before processing defType's imports, add it to the set of parents. This way, if it ends
11584
- // up deeply importing itself, this can be detected.
11585
- ngDevMode && parents.push(defType);
11586
- // Add it to the set of dedups. This way we can detect multiple imports of the same module
11587
- dedupStack.push(defType);
11588
- let importTypesWithProviders;
11589
- try {
11590
- deepForEach(def.imports, imported => {
11591
- if (this.processInjectorType(imported, parents, dedupStack)) {
11592
- if (importTypesWithProviders === undefined)
11593
- importTypesWithProviders = [];
11594
- // If the processed import is an injector type with providers, we store it in the
11595
- // list of import types with providers, so that we can process those afterwards.
11596
- importTypesWithProviders.push(imported);
11597
- }
11598
- });
11599
- }
11600
- finally {
11601
- // Remove it from the parents set when finished.
11602
- ngDevMode && parents.pop();
11603
- }
11604
- // Imports which are declared with providers (TypeWithProviders) need to be processed
11605
- // after all imported modules are processed. This is similar to how View Engine
11606
- // processes/merges module imports in the metadata resolver. See: FW-1349.
11607
- if (importTypesWithProviders !== undefined) {
11608
- for (let i = 0; i < importTypesWithProviders.length; i++) {
11609
- const { ngModule, providers } = importTypesWithProviders[i];
11610
- deepForEach(providers, provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));
11611
- }
11612
- }
11613
- }
11614
- // Track the InjectorType and add a provider for it. It's important that this is done after the
11615
- // def's imports.
11616
- this.injectorDefTypes.add(defType);
11617
- const factory = getFactoryDef(defType) || (() => new defType());
11618
- this.records.set(defType, makeRecord(factory, NOT_YET));
11619
- // Next, include providers listed on the definition itself.
11620
- const defProviders = def.providers;
11621
- if (defProviders != null && !isDuplicate) {
11622
- const injectorType = defOrWrappedDef;
11623
- deepForEach(defProviders, provider => this.processProvider(provider, injectorType, defProviders));
11624
- }
11625
- return (ngModule !== undefined &&
11626
- defOrWrappedDef.providers !== undefined);
11627
- }
11628
11734
  /**
11629
11735
  * Process a `SingleProvider` and add it.
11630
11736
  */
11631
- processProvider(provider, ngModuleType, providers) {
11737
+ processProvider(provider) {
11632
11738
  // Determine the token from the provider. Either it's its own token, or has a {provide: ...}
11633
11739
  // property.
11634
11740
  provider = resolveForwardRef(provider);
11635
11741
  let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);
11636
11742
  // Construct a `Record` for the provider.
11637
- const record = providerToRecord(provider, ngModuleType, providers);
11743
+ const record = providerToRecord(provider);
11638
11744
  if (!isTypeProvider(provider) && provider.multi === true) {
11639
11745
  // If the provider indicates that it's a multi-provider, process it specially.
11640
11746
  // First check whether it's been defined already.
@@ -11670,7 +11776,7 @@ class R3Injector {
11670
11776
  record.value = record.factory();
11671
11777
  }
11672
11778
  if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {
11673
- this.onDestroy.add(record.value);
11779
+ this._ngOnDestroyHooks.add(record.value);
11674
11780
  }
11675
11781
  return record.value;
11676
11782
  }
@@ -11680,7 +11786,7 @@ class R3Injector {
11680
11786
  }
11681
11787
  const providedIn = resolveForwardRef(def.providedIn);
11682
11788
  if (typeof providedIn === 'string') {
11683
- return providedIn === 'any' || (providedIn === this.scope);
11789
+ return providedIn === 'any' || (this.scopes.has(providedIn));
11684
11790
  }
11685
11791
  else {
11686
11792
  return this.injectorDefTypes.has(providedIn);
@@ -11726,12 +11832,12 @@ function getUndecoratedInjectableFactory(token) {
11726
11832
  return () => new token();
11727
11833
  }
11728
11834
  }
11729
- function providerToRecord(provider, ngModuleType, providers) {
11835
+ function providerToRecord(provider) {
11730
11836
  if (isValueProvider(provider)) {
11731
11837
  return makeRecord(undefined, provider.useValue);
11732
11838
  }
11733
11839
  else {
11734
- const factory = providerToFactory(provider, ngModuleType, providers);
11840
+ const factory = providerToFactory(provider);
11735
11841
  return makeRecord(factory, NOT_YET);
11736
11842
  }
11737
11843
  }
@@ -11805,6 +11911,17 @@ function couldBeInjectableType(value) {
11805
11911
  return (typeof value === 'function') ||
11806
11912
  (typeof value === 'object' && value instanceof InjectionToken);
11807
11913
  }
11914
+ function validateProvider(provider, providers, containerType) {
11915
+ if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||
11916
+ isExistingProvider(provider)) {
11917
+ return;
11918
+ }
11919
+ // Here we expect the provider to be a `useClass` provider (by elimination).
11920
+ const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));
11921
+ if (ngDevMode && !classRef) {
11922
+ throwInvalidProviderError(containerType, providers, provider);
11923
+ }
11924
+ }
11808
11925
 
11809
11926
  /**
11810
11927
  * @license
@@ -12582,7 +12699,7 @@ function ɵɵInheritDefinitionFeature(definition) {
12582
12699
  else {
12583
12700
  if (superType.ɵcmp) {
12584
12701
  const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
12585
- 'Directives cannot inherit Components' :
12702
+ `Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}` :
12586
12703
  '';
12587
12704
  throw new RuntimeError(903 /* INVALID_INHERITANCE */, errorMessage);
12588
12705
  }
@@ -12828,22 +12945,8 @@ function getSymbolIterator() {
12828
12945
  * Use of this source code is governed by an MIT-style license that can be
12829
12946
  * found in the LICENSE file at https://angular.io/license
12830
12947
  */
12831
- function devModeEqual(a, b) {
12832
- const isListLikeIterableA = isListLikeIterable(a);
12833
- const isListLikeIterableB = isListLikeIterable(b);
12834
- if (isListLikeIterableA && isListLikeIterableB) {
12835
- return areIterablesEqual(a, b, devModeEqual);
12836
- }
12837
- else {
12838
- const isAObject = a && (typeof a === 'object' || typeof a === 'function');
12839
- const isBObject = b && (typeof b === 'object' || typeof b === 'function');
12840
- if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
12841
- return true;
12842
- }
12843
- else {
12844
- return Object.is(a, b);
12845
- }
12846
- }
12948
+ function isIterable(obj) {
12949
+ return obj !== null && typeof obj === 'object' && obj[getSymbolIterator()] !== undefined;
12847
12950
  }
12848
12951
  function isListLikeIterable(obj) {
12849
12952
  if (!isJsObject(obj))
@@ -12884,6 +12987,31 @@ function isJsObject(o) {
12884
12987
  return o !== null && (typeof o === 'function' || typeof o === 'object');
12885
12988
  }
12886
12989
 
12990
+ /**
12991
+ * @license
12992
+ * Copyright Google LLC All Rights Reserved.
12993
+ *
12994
+ * Use of this source code is governed by an MIT-style license that can be
12995
+ * found in the LICENSE file at https://angular.io/license
12996
+ */
12997
+ function devModeEqual(a, b) {
12998
+ const isListLikeIterableA = isListLikeIterable(a);
12999
+ const isListLikeIterableB = isListLikeIterable(b);
13000
+ if (isListLikeIterableA && isListLikeIterableB) {
13001
+ return areIterablesEqual(a, b, devModeEqual);
13002
+ }
13003
+ else {
13004
+ const isAObject = a && (typeof a === 'object' || typeof a === 'function');
13005
+ const isBObject = b && (typeof b === 'object' || typeof b === 'function');
13006
+ if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
13007
+ return true;
13008
+ }
13009
+ else {
13010
+ return Object.is(a, b);
13011
+ }
13012
+ }
13013
+ }
13014
+
12887
13015
  /**
12888
13016
  * @license
12889
13017
  * Copyright Google LLC All Rights Reserved.
@@ -21028,6 +21156,13 @@ function ɵɵProvidersFeature(providers, viewProviders = []) {
21028
21156
  };
21029
21157
  }
21030
21158
 
21159
+ /**
21160
+ * TODO: Implements standalone stuff!
21161
+ *
21162
+ * @codeGenApi
21163
+ */
21164
+ function ɵɵStandaloneFeature(definition) { }
21165
+
21031
21166
  /**
21032
21167
  * @license
21033
21168
  * Copyright Google LLC All Rights Reserved.
@@ -21258,7 +21393,7 @@ class Version {
21258
21393
  /**
21259
21394
  * @publicApi
21260
21395
  */
21261
- const VERSION = new Version('14.0.0-next.11');
21396
+ const VERSION = new Version('14.0.0-next.14');
21262
21397
 
21263
21398
  /**
21264
21399
  * @license
@@ -21710,9 +21845,12 @@ class ComponentFactory extends ComponentFactory$1 {
21710
21845
  get outputs() {
21711
21846
  return toRefArray(this.componentDef.outputs);
21712
21847
  }
21713
- create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
21714
- ngModule = ngModule || this.ngModule;
21715
- const rootViewInjector = ngModule ? new ChainedInjector(injector, ngModule.injector) : injector;
21848
+ create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {
21849
+ environmentInjector = environmentInjector || this.ngModule;
21850
+ let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?
21851
+ environmentInjector :
21852
+ environmentInjector === null || environmentInjector === void 0 ? void 0 : environmentInjector.injector;
21853
+ const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;
21716
21854
  const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
21717
21855
  const sanitizer = rootViewInjector.get(Sanitizer, null);
21718
21856
  const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
@@ -21938,11 +22076,11 @@ class NgModuleRef extends NgModuleRef$1 {
21938
22076
  provide: ComponentFactoryResolver$1,
21939
22077
  useValue: this.componentFactoryResolver
21940
22078
  }
21941
- ], stringify(ngModuleType));
22079
+ ], stringify(ngModuleType), new Set(['environment']));
21942
22080
  // We need to resolve the injector types separately from the injector creation, because
21943
22081
  // the module might be trying to use this ref in its constructor for DI which will cause a
21944
22082
  // circular error that will eventually error out, because the injector isn't created yet.
21945
- this._r3Injector._resolveInjectorDefTypes();
22083
+ this._r3Injector.resolveInjectorInitializers();
21946
22084
  this.instance = this.get(ngModuleType);
21947
22085
  }
21948
22086
  get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) {
@@ -21972,6 +22110,35 @@ class NgModuleFactory extends NgModuleFactory$1 {
21972
22110
  return new NgModuleRef(this.moduleType, parentInjector);
21973
22111
  }
21974
22112
  }
22113
+ class EnvironmentNgModuleRefAdapter extends NgModuleRef$1 {
22114
+ constructor(providers, parent, source) {
22115
+ super();
22116
+ this.componentFactoryResolver = new ComponentFactoryResolver(this);
22117
+ this.instance = null;
22118
+ const injector = new R3Injector([
22119
+ ...providers,
22120
+ { provide: NgModuleRef$1, useValue: this },
22121
+ { provide: ComponentFactoryResolver$1, useValue: this.componentFactoryResolver },
22122
+ ], parent || getNullInjector(), source, new Set(['environment']));
22123
+ this.injector = injector;
22124
+ injector.resolveInjectorInitializers();
22125
+ }
22126
+ destroy() {
22127
+ this.injector.destroy();
22128
+ }
22129
+ onDestroy(callback) {
22130
+ this.injector.onDestroy(callback);
22131
+ }
22132
+ }
22133
+ /**
22134
+ * Create a new environment injector.
22135
+ *
22136
+ * @publicApi
22137
+ */
22138
+ function createEnvironmentInjector(providers, parent = null, debugName = null) {
22139
+ const adapter = new EnvironmentNgModuleRefAdapter(providers, parent, debugName);
22140
+ return adapter.injector;
22141
+ }
21975
22142
 
21976
22143
  /**
21977
22144
  * @license
@@ -22897,7 +23064,7 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22897
23064
  this.insert(viewRef, index);
22898
23065
  return viewRef;
22899
23066
  }
22900
- createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, ngModuleRef) {
23067
+ createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {
22901
23068
  const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);
22902
23069
  let index;
22903
23070
  // This function supports 2 signatures and we need to handle options correctly for both:
@@ -22925,17 +23092,20 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22925
23092
  'is incompatible. Please use an object as the second argument instead.');
22926
23093
  }
22927
23094
  const options = (indexOrOptions || {});
23095
+ if (ngDevMode && options.environmentInjector && options.ngModuleRef) {
23096
+ throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);
23097
+ }
22928
23098
  index = options.index;
22929
23099
  injector = options.injector;
22930
23100
  projectableNodes = options.projectableNodes;
22931
- ngModuleRef = options.ngModuleRef;
23101
+ environmentInjector = options.environmentInjector || options.ngModuleRef;
22932
23102
  }
22933
23103
  const componentFactory = isComponentFactory ?
22934
23104
  componentFactoryOrType :
22935
23105
  new ComponentFactory(getComponentDef(componentFactoryOrType));
22936
23106
  const contextInjector = injector || this.parentInjector;
22937
23107
  // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
22938
- if (!ngModuleRef && componentFactory.ngModule == null) {
23108
+ if (!environmentInjector && componentFactory.ngModule == null) {
22939
23109
  // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
22940
23110
  // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
22941
23111
  // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
@@ -22956,12 +23126,12 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22956
23126
  // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
22957
23127
  // undefined` expression which seems to cause internal google apps to fail. This is documented
22958
23128
  // in the following internal bug issue: go/b/142967802
22959
- const result = _injector.get(NgModuleRef$1, null);
23129
+ const result = _injector.get(EnvironmentInjector, null);
22960
23130
  if (result) {
22961
- ngModuleRef = result;
23131
+ environmentInjector = result;
22962
23132
  }
22963
23133
  }
22964
- const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
23134
+ const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);
22965
23135
  this.insert(componentRef.hostView, index);
22966
23136
  return componentRef;
22967
23137
  }
@@ -23651,6 +23821,7 @@ const angularCoreEnv = (() => ({
23651
23821
  'ɵɵProvidersFeature': ɵɵProvidersFeature,
23652
23822
  'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
23653
23823
  'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
23824
+ 'ɵɵStandaloneFeature': ɵɵStandaloneFeature,
23654
23825
  'ɵɵnextContext': ɵɵnextContext,
23655
23826
  'ɵɵnamespaceHTML': ɵɵnamespaceHTML,
23656
23827
  'ɵɵnamespaceMathML': ɵɵnamespaceMathML,
@@ -24355,7 +24526,7 @@ function compileComponent(type, metadata) {
24355
24526
  }
24356
24527
  }
24357
24528
  const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;
24358
- const meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });
24529
+ const meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, declarations: [], changeDetection: metadata.changeDetection, encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });
24359
24530
  compilationDepth++;
24360
24531
  try {
24361
24532
  if (meta.usesInheritance) {
@@ -24982,7 +25153,10 @@ const PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');
24982
25153
  * A token that indicates an opaque platform ID.
24983
25154
  * @publicApi
24984
25155
  */
24985
- const PLATFORM_ID = new InjectionToken('Platform ID');
25156
+ const PLATFORM_ID = new InjectionToken('Platform ID', {
25157
+ providedIn: 'platform',
25158
+ factory: () => 'unknown', // set a default platform name, when none set explicitly
25159
+ });
24986
25160
  /**
24987
25161
  * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
24988
25162
  * be called for every component that is bootstrapped.
@@ -25029,10 +25203,11 @@ class Console {
25029
25203
  }
25030
25204
  }
25031
25205
  Console.ɵfac = function Console_Factory(t) { return new (t || Console)(); };
25032
- Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac });
25206
+ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac, providedIn: 'platform' });
25033
25207
  (function () {
25034
25208
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{
25035
- type: Injectable
25209
+ type: Injectable,
25210
+ args: [{ providedIn: 'platform' }]
25036
25211
  }], null, null);
25037
25212
  })();
25038
25213
 
@@ -25995,10 +26170,11 @@ class TestabilityRegistry {
25995
26170
  }
25996
26171
  }
25997
26172
  TestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); };
25998
- TestabilityRegistry.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac });
26173
+ TestabilityRegistry.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac, providedIn: 'platform' });
25999
26174
  (function () {
26000
26175
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{
26001
- type: Injectable
26176
+ type: Injectable,
26177
+ args: [{ providedIn: 'platform' }]
26002
26178
  }], function () { return []; }, null);
26003
26179
  })();
26004
26180
  class _NoopGetTestability {
@@ -26023,7 +26199,20 @@ let _testabilityGetter = new _NoopGetTestability();
26023
26199
  * Use of this source code is governed by an MIT-style license that can be
26024
26200
  * found in the LICENSE file at https://angular.io/license
26025
26201
  */
26026
- let _platform;
26202
+ let _platformInjector = null;
26203
+ /**
26204
+ * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
26205
+ * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
26206
+ */
26207
+ const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
26208
+ /**
26209
+ * Internal token that allows to register extra callbacks that should be invoked during the
26210
+ * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the
26211
+ * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the
26212
+ * entire class tree-shakeable.
26213
+ */
26214
+ const PLATFORM_ON_DESTROY = new InjectionToken('PlatformOnDestroy');
26215
+ const NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;
26027
26216
  function compileNgModuleFactory(injector, options, moduleType) {
26028
26217
  ngDevMode && assertNgModuleType(moduleType);
26029
26218
  const moduleFactory = new NgModuleFactory(moduleType);
@@ -26068,7 +26257,6 @@ function publishDefaultGlobalUtils() {
26068
26257
  function isBoundToModule(cf) {
26069
26258
  return cf.isBoundToModule;
26070
26259
  }
26071
- const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
26072
26260
  /**
26073
26261
  * A token for third-party components that can register themselves with NgProbe.
26074
26262
  *
@@ -26087,19 +26275,19 @@ class NgProbeToken {
26087
26275
  * @publicApi
26088
26276
  */
26089
26277
  function createPlatform(injector) {
26090
- if (_platform && !_platform.destroyed &&
26091
- !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
26278
+ if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
26092
26279
  const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
26093
26280
  'There can be only one platform. Destroy the previous one to create a new one.' :
26094
26281
  '';
26095
26282
  throw new RuntimeError(400 /* MULTIPLE_PLATFORMS */, errorMessage);
26096
26283
  }
26097
26284
  publishDefaultGlobalUtils();
26098
- _platform = injector.get(PlatformRef);
26285
+ _platformInjector = injector;
26286
+ const platform = injector.get(PlatformRef);
26099
26287
  const inits = injector.get(PLATFORM_INITIALIZER, null);
26100
26288
  if (inits)
26101
- inits.forEach((init) => init());
26102
- return _platform;
26289
+ inits.forEach(initFn => initFn());
26290
+ return platform;
26103
26291
  }
26104
26292
  /**
26105
26293
  * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
@@ -26118,15 +26306,16 @@ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
26118
26306
  return (extraProviders = []) => {
26119
26307
  let platform = getPlatform();
26120
26308
  if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
26309
+ const platformProviders = [
26310
+ ...providers,
26311
+ ...extraProviders,
26312
+ { provide: marker, useValue: true }
26313
+ ];
26121
26314
  if (parentPlatformFactory) {
26122
- parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));
26315
+ parentPlatformFactory(platformProviders);
26123
26316
  }
26124
26317
  else {
26125
- const injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true }, {
26126
- provide: INJECTOR_SCOPE,
26127
- useValue: 'platform'
26128
- });
26129
- createPlatform(Injector.create({ providers: injectedProviders, name: desc }));
26318
+ createPlatform(createPlatformInjector(platformProviders, desc));
26130
26319
  }
26131
26320
  }
26132
26321
  return assertPlatform(marker);
@@ -26149,6 +26338,20 @@ function assertPlatform(requiredToken) {
26149
26338
  }
26150
26339
  return platform;
26151
26340
  }
26341
+ /**
26342
+ * Helper function to create an instance of a platform injector (that maintains the 'platform'
26343
+ * scope).
26344
+ */
26345
+ function createPlatformInjector(providers = [], name) {
26346
+ return Injector.create({
26347
+ name,
26348
+ providers: [
26349
+ { provide: INJECTOR_SCOPE, useValue: 'platform' },
26350
+ { provide: PLATFORM_ON_DESTROY, useValue: () => _platformInjector = null },
26351
+ ...providers
26352
+ ],
26353
+ });
26354
+ }
26152
26355
  /**
26153
26356
  * Destroys the current Angular platform and all Angular applications on the page.
26154
26357
  * Destroys all modules and listeners registered with the platform.
@@ -26156,9 +26359,8 @@ function assertPlatform(requiredToken) {
26156
26359
  * @publicApi
26157
26360
  */
26158
26361
  function destroyPlatform() {
26159
- if (_platform && !_platform.destroyed) {
26160
- _platform.destroy();
26161
- }
26362
+ var _a;
26363
+ (_a = getPlatform()) === null || _a === void 0 ? void 0 : _a.destroy();
26162
26364
  }
26163
26365
  /**
26164
26366
  * Returns the current platform.
@@ -26166,7 +26368,8 @@ function destroyPlatform() {
26166
26368
  * @publicApi
26167
26369
  */
26168
26370
  function getPlatform() {
26169
- return _platform && !_platform.destroyed ? _platform : null;
26371
+ var _a;
26372
+ return (_a = _platformInjector === null || _platformInjector === void 0 ? void 0 : _platformInjector.get(PlatformRef)) !== null && _a !== void 0 ? _a : null;
26170
26373
  }
26171
26374
  /**
26172
26375
  * The Angular platform is the entry point for Angular on a web page.
@@ -26300,21 +26503,27 @@ class PlatformRef {
26300
26503
  const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
26301
26504
  'The platform has already been destroyed!' :
26302
26505
  '';
26303
- throw new RuntimeError(404 /* ALREADY_DESTROYED_PLATFORM */, errorMessage);
26506
+ throw new RuntimeError(404 /* PLATFORM_ALREADY_DESTROYED */, errorMessage);
26304
26507
  }
26305
26508
  this._modules.slice().forEach(module => module.destroy());
26306
26509
  this._destroyListeners.forEach(listener => listener());
26510
+ const destroyListener = this._injector.get(PLATFORM_ON_DESTROY, null);
26511
+ destroyListener === null || destroyListener === void 0 ? void 0 : destroyListener();
26307
26512
  this._destroyed = true;
26308
26513
  }
26514
+ /**
26515
+ * Indicates whether this instance was destroyed.
26516
+ */
26309
26517
  get destroyed() {
26310
26518
  return this._destroyed;
26311
26519
  }
26312
26520
  }
26313
26521
  PlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); };
26314
- PlatformRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac });
26522
+ PlatformRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' });
26315
26523
  (function () {
26316
26524
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
26317
- type: Injectable
26525
+ type: Injectable,
26526
+ args: [{ providedIn: 'platform' }]
26318
26527
  }], function () { return [{ type: Injector }]; }, null);
26319
26528
  })();
26320
26529
  function getNgZone(ngZoneOption, extra) {
@@ -26453,17 +26662,18 @@ function optionsReducer(dst, objs) {
26453
26662
  */
26454
26663
  class ApplicationRef {
26455
26664
  /** @internal */
26456
- constructor(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
26665
+ constructor(_zone, _injector, _exceptionHandler, _initStatus) {
26457
26666
  this._zone = _zone;
26458
26667
  this._injector = _injector;
26459
26668
  this._exceptionHandler = _exceptionHandler;
26460
- this._componentFactoryResolver = _componentFactoryResolver;
26461
26669
  this._initStatus = _initStatus;
26462
26670
  /** @internal */
26463
26671
  this._bootstrapListeners = [];
26464
26672
  this._views = [];
26465
26673
  this._runningTick = false;
26466
26674
  this._stable = true;
26675
+ this._destroyed = false;
26676
+ this._destroyListeners = [];
26467
26677
  /**
26468
26678
  * Get a list of component types registered to this application.
26469
26679
  * This list is populated even before the component is created.
@@ -26523,6 +26733,12 @@ class ApplicationRef {
26523
26733
  this.isStable =
26524
26734
  merge$1(isCurrentlyStable, isStable.pipe(share()));
26525
26735
  }
26736
+ /**
26737
+ * Indicates whether this instance was destroyed.
26738
+ */
26739
+ get destroyed() {
26740
+ return this._destroyed;
26741
+ }
26526
26742
  /**
26527
26743
  * Bootstrap a component onto the element identified by its selector or, optionally, to a
26528
26744
  * specified element.
@@ -26561,6 +26777,7 @@ class ApplicationRef {
26561
26777
  * {@example core/ts/platform/platform.ts region='domNode'}
26562
26778
  */
26563
26779
  bootstrap(componentOrFactory, rootSelectorOrNode) {
26780
+ NG_DEV_MODE && this.warnIfDestroyed();
26564
26781
  if (!this._initStatus.done) {
26565
26782
  const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
26566
26783
  'Cannot bootstrap as there are still asynchronous initializers running. ' +
@@ -26573,8 +26790,8 @@ class ApplicationRef {
26573
26790
  componentFactory = componentOrFactory;
26574
26791
  }
26575
26792
  else {
26576
- componentFactory =
26577
- this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);
26793
+ const resolver = this._injector.get(ComponentFactoryResolver$1);
26794
+ componentFactory = resolver.resolveComponentFactory(componentOrFactory);
26578
26795
  }
26579
26796
  this.componentTypes.push(componentFactory.componentType);
26580
26797
  // Create a factory associated with the current module if it's not bound to some other
@@ -26612,6 +26829,7 @@ class ApplicationRef {
26612
26829
  * detection pass during which all change detection must complete.
26613
26830
  */
26614
26831
  tick() {
26832
+ NG_DEV_MODE && this.warnIfDestroyed();
26615
26833
  if (this._runningTick) {
26616
26834
  const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
26617
26835
  'ApplicationRef.tick is called recursively' :
@@ -26643,6 +26861,7 @@ class ApplicationRef {
26643
26861
  * This will throw if the view is already attached to a ViewContainer.
26644
26862
  */
26645
26863
  attachView(viewRef) {
26864
+ NG_DEV_MODE && this.warnIfDestroyed();
26646
26865
  const view = viewRef;
26647
26866
  this._views.push(view);
26648
26867
  view.attachToAppRef(this);
@@ -26651,6 +26870,7 @@ class ApplicationRef {
26651
26870
  * Detaches a view from dirty checking again.
26652
26871
  */
26653
26872
  detachView(viewRef) {
26873
+ NG_DEV_MODE && this.warnIfDestroyed();
26654
26874
  const view = viewRef;
26655
26875
  remove(this._views, view);
26656
26876
  view.detachFromAppRef();
@@ -26665,8 +26885,48 @@ class ApplicationRef {
26665
26885
  }
26666
26886
  /** @internal */
26667
26887
  ngOnDestroy() {
26668
- this._views.slice().forEach((view) => view.destroy());
26669
- this._onMicrotaskEmptySubscription.unsubscribe();
26888
+ if (this._destroyed)
26889
+ return;
26890
+ try {
26891
+ // Call all the lifecycle hooks.
26892
+ this._destroyListeners.forEach(listener => listener());
26893
+ // Destroy all registered views.
26894
+ this._views.slice().forEach((view) => view.destroy());
26895
+ this._onMicrotaskEmptySubscription.unsubscribe();
26896
+ }
26897
+ finally {
26898
+ // Indicate that this instance is destroyed.
26899
+ this._destroyed = true;
26900
+ // Release all references.
26901
+ this._views = [];
26902
+ this._bootstrapListeners = [];
26903
+ this._destroyListeners = [];
26904
+ }
26905
+ }
26906
+ /**
26907
+ * Registers a listener to be called when an instance is destroyed.
26908
+ *
26909
+ * @param callback A callback function to add as a listener.
26910
+ * @returns A function which unregisters a listener.
26911
+ *
26912
+ * @internal
26913
+ */
26914
+ onDestroy(callback) {
26915
+ NG_DEV_MODE && this.warnIfDestroyed();
26916
+ this._destroyListeners.push(callback);
26917
+ return () => remove(this._destroyListeners, callback);
26918
+ }
26919
+ destroy() {
26920
+ if (this._destroyed) {
26921
+ throw new RuntimeError(406 /* APPLICATION_REF_ALREADY_DESTROYED */, NG_DEV_MODE && 'This instance of the `ApplicationRef` has already been destroyed.');
26922
+ }
26923
+ const injector = this._injector;
26924
+ // Check that this injector instance supports destroy operation.
26925
+ if (injector.destroy && !injector.destroyed) {
26926
+ // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle
26927
+ // hook, which invokes the remaining cleanup actions.
26928
+ injector.destroy();
26929
+ }
26670
26930
  }
26671
26931
  /**
26672
26932
  * Returns the number of attached views.
@@ -26674,14 +26934,19 @@ class ApplicationRef {
26674
26934
  get viewCount() {
26675
26935
  return this._views.length;
26676
26936
  }
26937
+ warnIfDestroyed() {
26938
+ if (NG_DEV_MODE && this._destroyed) {
26939
+ console.warn(formatRuntimeError(406 /* APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));
26940
+ }
26941
+ }
26677
26942
  }
26678
- ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
26943
+ ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ApplicationInitStatus)); };
26679
26944
  ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
26680
26945
  (function () {
26681
26946
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
26682
26947
  type: Injectable,
26683
26948
  args: [{ providedIn: 'root' }]
26684
- }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null);
26949
+ }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ApplicationInitStatus }]; }, null);
26685
26950
  })();
26686
26951
  function remove(list, el) {
26687
26952
  const index = list.indexOf(el);
@@ -28665,19 +28930,12 @@ const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
28665
28930
  * Use of this source code is governed by an MIT-style license that can be
28666
28931
  * found in the LICENSE file at https://angular.io/license
28667
28932
  */
28668
- const _CORE_PLATFORM_PROVIDERS = [
28669
- // Set a default platform name for platforms that don't set it explicitly.
28670
- { provide: PLATFORM_ID, useValue: 'unknown' },
28671
- { provide: PlatformRef, deps: [Injector] },
28672
- { provide: TestabilityRegistry, deps: [] },
28673
- { provide: Console, deps: [] },
28674
- ];
28675
28933
  /**
28676
28934
  * This platform has to be included in any other platform
28677
28935
  *
28678
28936
  * @publicApi
28679
28937
  */
28680
- const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
28938
+ const platformCore = createPlatformFactory(null, 'core', []);
28681
28939
 
28682
28940
  /**
28683
28941
  * Re-exported by `BrowserModule`, which is included automatically in the root
@@ -28869,5 +29127,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
28869
29127
  * Generated bundle index. Do not edit.
28870
29128
  */
28871
29129
 
28872
- 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 };
29130
+ 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, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, INJECTOR_INITIALIZER, 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, createEnvironmentInjector, 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, ɵɵStandaloneFeature, ɵɵ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 };
28873
29131
  //# sourceMappingURL=core.mjs.map