@angular/core 8.1.0-next.2 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/bundles/core-testing.umd.js +1 -1
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +1 -1
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +394 -279
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +101 -101
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.d.ts +221 -234
  10. package/core.metadata.json +1 -1
  11. package/esm2015/index.js +2 -2
  12. package/esm2015/public_api.js +2 -2
  13. package/esm2015/src/change_detection/pipe_transform.js +4 -6
  14. package/esm2015/src/core.js +2 -2
  15. package/esm2015/src/core_render3_private_export.js +2 -2
  16. package/esm2015/src/di/index.js +1 -1
  17. package/esm2015/src/di/injectable.js +1 -1
  18. package/esm2015/src/di/interface/provider.js +1 -1
  19. package/esm2015/src/di/metadata.js +1 -1
  20. package/esm2015/src/event_emitter.js +3 -10
  21. package/esm2015/src/linker/component_factory.js +9 -3
  22. package/esm2015/src/linker/component_factory_resolver.js +9 -2
  23. package/esm2015/src/metadata/di.js +1 -1
  24. package/esm2015/src/metadata/directives.js +4 -3
  25. package/esm2015/src/reflection/reflection_capabilities.js +2 -2
  26. package/esm2015/src/render3/component.js +6 -2
  27. package/esm2015/src/render3/component_ref.js +18 -13
  28. package/esm2015/src/render3/di.js +4 -6
  29. package/esm2015/src/render3/features/providers_feature.js +6 -3
  30. package/esm2015/src/render3/i18n.js +20 -13
  31. package/esm2015/src/render3/index.js +2 -2
  32. package/esm2015/src/render3/instructions/all.js +2 -2
  33. package/esm2015/src/render3/instructions/attribute.js +5 -4
  34. package/esm2015/src/render3/instructions/embedded_view.js +5 -2
  35. package/esm2015/src/render3/instructions/property.js +9 -8
  36. package/esm2015/src/render3/instructions/shared.js +36 -5
  37. package/esm2015/src/render3/instructions/text.js +15 -20
  38. package/esm2015/src/render3/instructions/text_interpolation.js +67 -12
  39. package/esm2015/src/render3/interfaces/container.js +6 -2
  40. package/esm2015/src/render3/interfaces/i18n.js +1 -17
  41. package/esm2015/src/render3/interfaces/node.js +2 -2
  42. package/esm2015/src/render3/interfaces/view.js +2 -2
  43. package/esm2015/src/render3/jit/environment.js +1 -2
  44. package/esm2015/src/render3/node_manipulation.js +235 -197
  45. package/esm2015/src/render3/query.js +12 -8
  46. package/esm2015/src/render3/state.js +6 -3
  47. package/esm2015/src/render3/util/misc_utils.js +1 -1
  48. package/esm2015/src/render3/util/view_traversal_utils.js +7 -2
  49. package/esm2015/src/render3/view_engine_compatibility.js +39 -12
  50. package/esm2015/src/util/assert.js +3 -2
  51. package/esm2015/src/util/decorators.js +1 -1
  52. package/esm2015/src/version.js +1 -1
  53. package/esm2015/testing/src/test_bed_common.js +5 -2
  54. package/esm5/src/change_detection/pipe_transform.js +1 -1
  55. package/esm5/src/core_render3_private_export.js +2 -2
  56. package/esm5/src/di/index.js +1 -1
  57. package/esm5/src/di/injectable.js +1 -1
  58. package/esm5/src/di/interface/provider.js +1 -1
  59. package/esm5/src/di/metadata.js +1 -1
  60. package/esm5/src/event_emitter.js +3 -10
  61. package/esm5/src/linker/component_factory.js +7 -1
  62. package/esm5/src/linker/component_factory_resolver.js +7 -1
  63. package/esm5/src/metadata/di.js +1 -1
  64. package/esm5/src/metadata/directives.js +4 -3
  65. package/esm5/src/reflection/reflection_capabilities.js +2 -2
  66. package/esm5/src/render3/component.js +5 -2
  67. package/esm5/src/render3/component_ref.js +13 -9
  68. package/esm5/src/render3/di.js +4 -5
  69. package/esm5/src/render3/features/providers_feature.js +6 -3
  70. package/esm5/src/render3/i18n.js +15 -10
  71. package/esm5/src/render3/index.js +2 -2
  72. package/esm5/src/render3/instructions/attribute.js +5 -4
  73. package/esm5/src/render3/instructions/embedded_view.js +5 -2
  74. package/esm5/src/render3/instructions/property.js +7 -7
  75. package/esm5/src/render3/instructions/shared.js +27 -5
  76. package/esm5/src/render3/instructions/text.js +12 -17
  77. package/esm5/src/render3/instructions/text_interpolation.js +49 -12
  78. package/esm5/src/render3/interfaces/container.js +3 -2
  79. package/esm5/src/render3/interfaces/i18n.js +1 -1
  80. package/esm5/src/render3/interfaces/node.js +1 -1
  81. package/esm5/src/render3/interfaces/view.js +1 -1
  82. package/esm5/src/render3/jit/environment.js +1 -2
  83. package/esm5/src/render3/node_manipulation.js +200 -192
  84. package/esm5/src/render3/query.js +10 -8
  85. package/esm5/src/render3/state.js +6 -3
  86. package/esm5/src/render3/util/misc_utils.js +1 -1
  87. package/esm5/src/render3/util/view_traversal_utils.js +7 -2
  88. package/esm5/src/render3/view_engine_compatibility.js +32 -12
  89. package/esm5/src/util/assert.js +3 -2
  90. package/esm5/src/util/decorators.js +1 -1
  91. package/esm5/src/version.js +1 -1
  92. package/esm5/testing/src/test_bed_common.js +1 -1
  93. package/fesm2015/core.js +483 -296
  94. package/fesm2015/core.js.map +1 -1
  95. package/fesm2015/testing.js +1 -1
  96. package/fesm2015/testing.js.map +1 -1
  97. package/fesm5/core.js +395 -279
  98. package/fesm5/core.js.map +1 -1
  99. package/fesm5/testing.js +1 -1
  100. package/fesm5/testing.js.map +1 -1
  101. package/package.json +1 -1
  102. package/src/r3_symbols.d.ts +73 -90
  103. package/testing/testing.d.ts +5 -2
  104. package/testing.d.ts +1 -1
package/fesm2015/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.1.0-next.2
2
+ * @license Angular v8.1.1
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -929,7 +929,7 @@ class ReflectionCapabilities {
929
929
  if (typeof paramTypes === 'undefined') {
930
930
  result[i] = [];
931
931
  }
932
- else if (paramTypes[i] != Object) {
932
+ else if (paramTypes[i] && paramTypes[i] != Object) {
933
933
  result[i] = [paramTypes[i]];
934
934
  }
935
935
  else {
@@ -4893,7 +4893,7 @@ function throwError(msg) {
4893
4893
  function assertDomNode(node) {
4894
4894
  // If we're in a worker, `Node` will not be defined.
4895
4895
  assertEqual((typeof Node !== 'undefined' && node instanceof Node) ||
4896
- (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'), true, 'The provided value must be an instance of a DOM Node');
4896
+ (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'), true, `The provided value must be an instance of a DOM Node but got ${stringify(node)}`);
4897
4897
  }
4898
4898
  function assertDataInRange(arr, index) {
4899
4899
  const maxLen = arr ? arr.length : 0;
@@ -4922,6 +4922,8 @@ const ACTIVE_INDEX = 2;
4922
4922
  // As we already have these constants in LView, we don't need to re-create them.
4923
4923
  /** @type {?} */
4924
4924
  const NATIVE = 7;
4925
+ /** @type {?} */
4926
+ const VIEW_REFS = 8;
4925
4927
  /**
4926
4928
  * Size of LContainer's header. Represents the index after which all views in the
4927
4929
  * container will be inserted. We need to keep a record of current views so we know
@@ -4929,7 +4931,7 @@ const NATIVE = 7;
4929
4931
  * remove views from the DOM when they are no longer required.
4930
4932
  * @type {?}
4931
4933
  */
4932
- const CONTAINER_HEADER_OFFSET = 8;
4934
+ const CONTAINER_HEADER_OFFSET = 9;
4933
4935
 
4934
4936
  /**
4935
4937
  * @fileoverview added by tsickle
@@ -5998,9 +6000,12 @@ function resetComponentState() {
5998
6000
  * the direction of traversal (up or down the view tree) a bit clearer.
5999
6001
  *
6000
6002
  * @param {?} newView New state to become active
6003
+ * @param {?} safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.
6004
+ * This is not always the case (for example, the application may have crashed and `leaveView` is
6005
+ * being executed while unwinding the call stack).
6001
6006
  * @return {?}
6002
6007
  */
6003
- function leaveView(newView) {
6008
+ function leaveView(newView, safeToRunHooks) {
6004
6009
  /** @type {?} */
6005
6010
  const tView = lView[TVIEW];
6006
6011
  if (isCreationMode(lView)) {
@@ -6009,7 +6014,7 @@ function leaveView(newView) {
6009
6014
  else {
6010
6015
  try {
6011
6016
  resetPreOrderHookFlags(lView);
6012
- executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode, 2 /* AfterViewInitHooksToBeRun */, undefined);
6017
+ safeToRunHooks && executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode, 2 /* AfterViewInitHooksToBeRun */, undefined);
6013
6018
  }
6014
6019
  finally {
6015
6020
  // Views are clean and in update mode after being checked, so these bits are cleared
@@ -8306,7 +8311,12 @@ function getRootView(componentOrLView) {
8306
8311
  return lView;
8307
8312
  }
8308
8313
  /**
8309
- * Given a current view, finds the nearest component's host (LElement).
8314
+ * Given an `LView`, find the closest declaration view which is not an embedded view.
8315
+ *
8316
+ * This method searches for the `LView` associated with the component which declared the `LView`.
8317
+ *
8318
+ * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise
8319
+ * it walks the declaration parents until it finds a component view (non-embedded-view.)
8310
8320
  *
8311
8321
  * @param {?} lView LView for which we want a host element node
8312
8322
  * @return {?} The host node
@@ -8837,7 +8847,7 @@ function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flag
8837
8847
  /** @type {?} */
8838
8848
  const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;
8839
8849
  /** @type {?} */
8840
- const injectableIdx = locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders, isHostSpecialCase);
8850
+ const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);
8841
8851
  if (injectableIdx !== null) {
8842
8852
  return getNodeInjectable(currentTView.data, lView, injectableIdx, (/** @type {?} */ (tNode)));
8843
8853
  }
@@ -8850,15 +8860,13 @@ function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flag
8850
8860
  *
8851
8861
  * @template T
8852
8862
  * @param {?} tNode TNode on which directives are present.
8853
- * @param {?} lView The view we are currently processing
8863
+ * @param {?} tView The tView we are currently processing
8854
8864
  * @param {?} token Provider token or type of a directive to look for.
8855
8865
  * @param {?} canAccessViewProviders Whether view providers should be considered.
8856
8866
  * @param {?} isHostSpecialCase Whether the host special case applies.
8857
8867
  * @return {?} Index of a found directive or provider, or null when none found.
8858
8868
  */
8859
- function locateDirectiveOrProvider(tNode, lView, token, canAccessViewProviders, isHostSpecialCase) {
8860
- /** @type {?} */
8861
- const tView = lView[TVIEW];
8869
+ function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {
8862
8870
  /** @type {?} */
8863
8871
  const nodeProviderIndexes = tNode.providerIndexes;
8864
8872
  /** @type {?} */
@@ -14439,6 +14447,9 @@ function renderEmbeddedTemplate(viewToRender, tView, context) {
14439
14447
  tickRootContext(getRootContext(viewToRender));
14440
14448
  }
14441
14449
  else {
14450
+ // Will become true if the `try` block executes with no errors.
14451
+ /** @type {?} */
14452
+ let safeToRunHooks = false;
14442
14453
  try {
14443
14454
  setPreviousOrParentTNode((/** @type {?} */ (null)), true);
14444
14455
  oldView = enterView(viewToRender, viewToRender[T_HOST]);
@@ -14450,9 +14461,10 @@ function renderEmbeddedTemplate(viewToRender, tView, context) {
14450
14461
  // matching, etc again and again.
14451
14462
  viewToRender[TVIEW].firstTemplatePass = false;
14452
14463
  refreshDescendantViews(viewToRender);
14464
+ safeToRunHooks = true;
14453
14465
  }
14454
14466
  finally {
14455
- leaveView((/** @type {?} */ (oldView)));
14467
+ leaveView((/** @type {?} */ (oldView)), safeToRunHooks);
14456
14468
  setPreviousOrParentTNode(_previousOrParentTNode, _isParent);
14457
14469
  }
14458
14470
  }
@@ -14473,6 +14485,9 @@ function renderComponentOrTemplate(hostView, context, templateFn) {
14473
14485
  const normalExecutionPath = !getCheckNoChangesMode();
14474
14486
  /** @type {?} */
14475
14487
  const creationModeIsActive = isCreationMode(hostView);
14488
+ // Will become true if the `try` block executes with no errors.
14489
+ /** @type {?} */
14490
+ let safeToRunHooks = false;
14476
14491
  try {
14477
14492
  if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {
14478
14493
  rendererFactory.begin();
@@ -14487,12 +14502,13 @@ function renderComponentOrTemplate(hostView, context, templateFn) {
14487
14502
  resetPreOrderHookFlags(hostView);
14488
14503
  templateFn && executeTemplate(hostView, templateFn, 2 /* Update */, context);
14489
14504
  refreshDescendantViews(hostView);
14505
+ safeToRunHooks = true;
14490
14506
  }
14491
14507
  finally {
14492
14508
  if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {
14493
14509
  rendererFactory.end();
14494
14510
  }
14495
- leaveView(oldView);
14511
+ leaveView(oldView, safeToRunHooks);
14496
14512
  }
14497
14513
  }
14498
14514
  /**
@@ -15648,7 +15664,8 @@ function createLContainer(hostNative, currentView, native, tNode, isForViewConta
15648
15664
  null, // next
15649
15665
  null, // queries
15650
15666
  tNode, // t_host
15651
- native);
15667
+ native, // native,
15668
+ null);
15652
15669
  ngDevMode && attachLContainerDebug(lContainer);
15653
15670
  return lContainer;
15654
15671
  }
@@ -15931,6 +15948,9 @@ function checkView(hostView, component) {
15931
15948
  const templateFn = (/** @type {?} */ (hostTView.template));
15932
15949
  /** @type {?} */
15933
15950
  const creationMode = isCreationMode(hostView);
15951
+ // Will become true if the `try` block executes with no errors.
15952
+ /** @type {?} */
15953
+ let safeToRunHooks = false;
15934
15954
  try {
15935
15955
  resetPreOrderHookFlags(hostView);
15936
15956
  creationMode && executeViewQueryFn(1 /* Create */, hostTView, component);
@@ -15940,9 +15960,10 @@ function checkView(hostView, component) {
15940
15960
  if (!creationMode || hostTView.staticViewQueries) {
15941
15961
  executeViewQueryFn(2 /* Update */, hostTView, component);
15942
15962
  }
15963
+ safeToRunHooks = true;
15943
15964
  }
15944
15965
  finally {
15945
- leaveView(oldView);
15966
+ leaveView(oldView, safeToRunHooks);
15946
15967
  }
15947
15968
  }
15948
15969
  /**
@@ -16077,6 +16098,24 @@ function setInputsForProperty(lView, inputs, value) {
16077
16098
  }
16078
16099
  }
16079
16100
  }
16101
+ /**
16102
+ * Updates a text binding at a given index in a given LView.
16103
+ * @param {?} lView
16104
+ * @param {?} index
16105
+ * @param {?} value
16106
+ * @return {?}
16107
+ */
16108
+ function textBindingInternal(lView, index, value) {
16109
+ ngDevMode && assertNotSame(value, (/** @type {?} */ (NO_CHANGE)), 'value should not be NO_CHANGE');
16110
+ ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
16111
+ /** @type {?} */
16112
+ const element = (/** @type {?} */ ((/** @type {?} */ (getNativeByIndex(index, lView)))));
16113
+ ngDevMode && assertDefined(element, 'native element should exist');
16114
+ ngDevMode && ngDevMode.rendererSetText++;
16115
+ /** @type {?} */
16116
+ const renderer = lView[RENDERER];
16117
+ isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;
16118
+ }
16080
16119
 
16081
16120
  /**
16082
16121
  * @fileoverview added by tsickle
@@ -16523,7 +16562,9 @@ function ɵɵproperty(propName, value, sanitizer, nativeOnly) {
16523
16562
  const index = getSelectedIndex();
16524
16563
  ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');
16525
16564
  /** @type {?} */
16526
- const bindReconciledValue = ɵɵbind(value);
16565
+ const lView = getLView();
16566
+ /** @type {?} */
16567
+ const bindReconciledValue = bind(lView, value);
16527
16568
  if (bindReconciledValue !== NO_CHANGE) {
16528
16569
  elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);
16529
16570
  }
@@ -16532,15 +16573,12 @@ function ɵɵproperty(propName, value, sanitizer, nativeOnly) {
16532
16573
  /**
16533
16574
  * Creates a single value binding.
16534
16575
  *
16535
- * \@codeGenApi
16536
16576
  * @template T
16577
+ * @param {?} lView Current view
16537
16578
  * @param {?} value Value to diff
16538
- *
16539
16579
  * @return {?}
16540
16580
  */
16541
- function ɵɵbind(value) {
16542
- /** @type {?} */
16543
- const lView = getLView();
16581
+ function bind(lView, value) {
16544
16582
  /** @type {?} */
16545
16583
  const bindingIndex = lView[BINDING_INDEX]++;
16546
16584
  storeBindingMetadata(lView);
@@ -16573,9 +16611,11 @@ function ɵɵbind(value) {
16573
16611
  function ɵɵupdateSyntheticHostBinding(propName, value, sanitizer, nativeOnly) {
16574
16612
  /** @type {?} */
16575
16613
  const index = getSelectedIndex();
16614
+ /** @type {?} */
16615
+ const lView = getLView();
16576
16616
  // TODO(benlesh): remove bind call here.
16577
16617
  /** @type {?} */
16578
- const bound = ɵɵbind(value);
16618
+ const bound = bind(lView, value);
16579
16619
  if (bound !== NO_CHANGE) {
16580
16620
  elementPropertyInternal(index, propName, bound, sanitizer, nativeOnly, loadComponentRenderer);
16581
16621
  }
@@ -16606,10 +16646,11 @@ function ɵɵattribute(name, value, sanitizer, namespace) {
16606
16646
  const lView = getLView();
16607
16647
  // TODO(FW-1340): Refactor to remove the use of other instructions here.
16608
16648
  /** @type {?} */
16609
- const bound = ɵɵbind(value);
16649
+ const bound = bind(lView, value);
16610
16650
  if (bound !== NO_CHANGE) {
16611
- return elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);
16651
+ elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);
16612
16652
  }
16653
+ return ɵɵattribute;
16613
16654
  }
16614
16655
 
16615
16656
  /**
@@ -17470,191 +17511,48 @@ function getContainerRenderParent(tViewNode, view) {
17470
17511
  const container = getLContainer(tViewNode, view);
17471
17512
  return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;
17472
17513
  }
17473
- /**
17474
- * Stack used to keep track of projection nodes in walkTNodeTree.
17475
- *
17476
- * This is deliberately created outside of walkTNodeTree to avoid allocating
17477
- * a new array each time the function is called. Instead the array will be
17478
- * re-used by each invocation. This works because the function is not reentrant.
17479
- * @type {?}
17480
- */
17481
- const projectionNodeStack = [];
17482
- /**
17483
- * Walks a tree of TNodes, applying a transformation on the element nodes, either only on the first
17484
- * one found, or on all of them.
17485
- *
17486
- * @param {?} viewToWalk the view to walk
17487
- * @param {?} action identifies the action to be performed on the elements
17488
- * @param {?} renderer the current renderer.
17489
- * @param {?} renderParent Optional the render parent node to be set in all LContainers found,
17490
- * required for action modes Insert and Destroy.
17491
- * @param {?=} beforeNode Optional the node before which elements should be added, required for action
17492
- * Insert.
17493
- * @return {?}
17494
- */
17495
- function walkTNodeTree(viewToWalk, action, renderer, renderParent, beforeNode) {
17496
- /** @type {?} */
17497
- const rootTNode = (/** @type {?} */ (viewToWalk[TVIEW].node));
17498
- /** @type {?} */
17499
- let projectionNodeIndex = -1;
17500
- /** @type {?} */
17501
- let currentView = viewToWalk;
17502
- /** @type {?} */
17503
- let tNode = (/** @type {?} */ (rootTNode.child));
17504
- while (tNode) {
17505
- /** @type {?} */
17506
- let nextTNode = null;
17507
- if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {
17508
- executeNodeAction(action, renderer, renderParent, getNativeByTNode(tNode, currentView), tNode, beforeNode);
17509
- /** @type {?} */
17510
- const nodeOrContainer = currentView[tNode.index];
17511
- if (isLContainer(nodeOrContainer)) {
17512
- // This element has an LContainer, and its comment needs to be handled
17513
- executeNodeAction(action, renderer, renderParent, nodeOrContainer[NATIVE], tNode, beforeNode);
17514
- /** @type {?} */
17515
- const firstView = nodeOrContainer[CONTAINER_HEADER_OFFSET];
17516
- if (firstView) {
17517
- currentView = firstView;
17518
- nextTNode = currentView[TVIEW].node;
17519
- // When the walker enters a container, then the beforeNode has to become the local native
17520
- // comment node.
17521
- beforeNode = nodeOrContainer[NATIVE];
17522
- }
17523
- }
17524
- }
17525
- else if (tNode.type === 0 /* Container */) {
17526
- /** @type {?} */
17527
- const lContainer = (/** @type {?} */ ((/** @type {?} */ (currentView))[tNode.index]));
17528
- executeNodeAction(action, renderer, renderParent, lContainer[NATIVE], tNode, beforeNode);
17529
- /** @type {?} */
17530
- const firstView = lContainer[CONTAINER_HEADER_OFFSET];
17531
- if (firstView) {
17532
- currentView = firstView;
17533
- nextTNode = currentView[TVIEW].node;
17534
- // When the walker enters a container, then the beforeNode has to become the local native
17535
- // comment node.
17536
- beforeNode = lContainer[NATIVE];
17537
- }
17538
- }
17539
- else if (tNode.type === 1 /* Projection */) {
17540
- /** @type {?} */
17541
- const componentView = findComponentView((/** @type {?} */ (currentView)));
17542
- /** @type {?} */
17543
- const componentHost = (/** @type {?} */ (componentView[T_HOST]));
17544
- /** @type {?} */
17545
- const head = ((/** @type {?} */ (componentHost.projection)))[(/** @type {?} */ (tNode.projection))];
17546
- if (Array.isArray(head)) {
17547
- for (let nativeNode of head) {
17548
- executeNodeAction(action, renderer, renderParent, nativeNode, tNode, beforeNode);
17549
- }
17550
- }
17551
- else {
17552
- // Must store both the TNode and the view because this projection node could be nested
17553
- // deeply inside embedded views, and we need to get back down to this particular nested
17554
- // view.
17555
- projectionNodeStack[++projectionNodeIndex] = tNode;
17556
- projectionNodeStack[++projectionNodeIndex] = (/** @type {?} */ (currentView));
17557
- if (head) {
17558
- currentView = (/** @type {?} */ ((/** @type {?} */ (componentView[PARENT]))));
17559
- nextTNode = (/** @type {?} */ (currentView[TVIEW].data[head.index]));
17560
- }
17561
- }
17562
- }
17563
- else {
17564
- // Otherwise, this is a View
17565
- nextTNode = tNode.child;
17566
- }
17567
- if (nextTNode === null) {
17568
- // this last node was projected, we need to get back down to its projection node
17569
- if (tNode.projectionNext === null && (tNode.flags & 2 /* isProjected */)) {
17570
- currentView = (/** @type {?} */ (projectionNodeStack[projectionNodeIndex--]));
17571
- tNode = (/** @type {?} */ (projectionNodeStack[projectionNodeIndex--]));
17572
- }
17573
- if (tNode.flags & 2 /* isProjected */) {
17574
- nextTNode = tNode.projectionNext;
17575
- }
17576
- else if (tNode.type === 4 /* ElementContainer */) {
17577
- nextTNode = tNode.child || tNode.next;
17578
- }
17579
- else {
17580
- nextTNode = tNode.next;
17581
- }
17582
- /**
17583
- * Find the next node in the TNode tree, taking into account the place where a node is
17584
- * projected (in the shadow DOM) rather than where it comes from (in the light DOM).
17585
- *
17586
- * If there is no sibling node, then it goes to the next sibling of the parent node...
17587
- * until it reaches rootNode (at which point null is returned).
17588
- */
17589
- while (!nextTNode) {
17590
- // If parent is null, we're crossing the view boundary, so we should get the host TNode.
17591
- tNode = tNode.parent || currentView[T_HOST];
17592
- if (tNode === null || tNode === rootTNode)
17593
- return;
17594
- // When exiting a container, the beforeNode must be restored to the previous value
17595
- if (tNode.type === 0 /* Container */) {
17596
- currentView = (/** @type {?} */ (getLViewParent(currentView)));
17597
- beforeNode = currentView[tNode.index][NATIVE];
17598
- }
17599
- if (tNode.type === 2 /* View */) {
17600
- /**
17601
- * If current lView doesn't have next pointer, we try to find it by going up parents
17602
- * chain until:
17603
- * - we find an lView with a next pointer
17604
- * - or find a tNode with a parent that has a next pointer
17605
- * - or find a lContainer
17606
- * - or reach root TNode (in which case we exit, since we traversed all nodes)
17607
- */
17608
- while (!currentView[NEXT] && currentView[PARENT] &&
17609
- !(tNode.parent && tNode.parent.next)) {
17610
- if (tNode === rootTNode)
17611
- return;
17612
- currentView = (/** @type {?} */ (currentView[PARENT]));
17613
- if (isLContainer(currentView)) {
17614
- tNode = (/** @type {?} */ (currentView[T_HOST]));
17615
- currentView = currentView[PARENT];
17616
- beforeNode = currentView[tNode.index][NATIVE];
17617
- break;
17618
- }
17619
- tNode = (/** @type {?} */ (currentView[T_HOST]));
17620
- }
17621
- if (currentView[NEXT]) {
17622
- currentView = (/** @type {?} */ (currentView[NEXT]));
17623
- nextTNode = currentView[T_HOST];
17624
- }
17625
- else {
17626
- nextTNode = tNode.type === 4 /* ElementContainer */ && tNode.child || tNode.next;
17627
- }
17628
- }
17629
- else {
17630
- nextTNode = tNode.next;
17631
- }
17632
- }
17633
- }
17634
- tNode = nextTNode;
17635
- }
17636
- }
17637
17514
  /**
17638
17515
  * NOTE: for performance reasons, the possible actions are inlined within the function instead of
17639
17516
  * being passed as an argument.
17640
17517
  * @param {?} action
17641
17518
  * @param {?} renderer
17642
17519
  * @param {?} parent
17643
- * @param {?} node
17644
- * @param {?} tNode
17520
+ * @param {?} lNodeToHandle
17645
17521
  * @param {?=} beforeNode
17646
17522
  * @return {?}
17647
17523
  */
17648
- function executeNodeAction(action, renderer, parent, node, tNode, beforeNode) {
17524
+ function executeActionOnElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {
17525
+ ngDevMode && assertDefined(lNodeToHandle, '\'lNodeToHandle\' is undefined');
17526
+ /** @type {?} */
17527
+ let lContainer;
17528
+ /** @type {?} */
17529
+ let isComponent = false;
17530
+ // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is wrapped
17531
+ // in an array which needs to be unwrapped. We need to know if it is a component and if
17532
+ // it has LContainer so that we can process all of those cases appropriately.
17533
+ if (isLContainer(lNodeToHandle)) {
17534
+ lContainer = lNodeToHandle;
17535
+ }
17536
+ else if (isLView(lNodeToHandle)) {
17537
+ isComponent = true;
17538
+ ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');
17539
+ lNodeToHandle = (/** @type {?} */ (lNodeToHandle[HOST]));
17540
+ }
17541
+ /** @type {?} */
17542
+ const rNode = unwrapRNode(lNodeToHandle);
17543
+ ngDevMode && assertDomNode(rNode);
17649
17544
  if (action === 0 /* Insert */) {
17650
- nativeInsertBefore(renderer, (/** @type {?} */ (parent)), node, beforeNode || null);
17545
+ nativeInsertBefore(renderer, (/** @type {?} */ (parent)), rNode, beforeNode || null);
17651
17546
  }
17652
17547
  else if (action === 1 /* Detach */) {
17653
- nativeRemoveNode(renderer, node, isComponent(tNode));
17548
+ nativeRemoveNode(renderer, rNode, isComponent);
17654
17549
  }
17655
17550
  else if (action === 2 /* Destroy */) {
17656
17551
  ngDevMode && ngDevMode.rendererDestroyNode++;
17657
- (/** @type {?} */ (((/** @type {?} */ (renderer))).destroyNode))(node);
17552
+ (/** @type {?} */ (((/** @type {?} */ (renderer))).destroyNode))(rNode);
17553
+ }
17554
+ if (lContainer != null) {
17555
+ executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);
17658
17556
  }
17659
17557
  }
17660
17558
  /**
@@ -17667,19 +17565,21 @@ function createTextNode(value, renderer) {
17667
17565
  renderer.createTextNode(renderStringify(value));
17668
17566
  }
17669
17567
  /**
17670
- * @param {?} viewToWalk
17568
+ * @param {?} lView
17671
17569
  * @param {?} insertMode
17672
17570
  * @param {?=} beforeNode
17673
17571
  * @return {?}
17674
17572
  */
17675
- function addRemoveViewFromContainer(viewToWalk, insertMode, beforeNode) {
17573
+ function addRemoveViewFromContainer(lView, insertMode, beforeNode) {
17676
17574
  /** @type {?} */
17677
- const renderParent = getContainerRenderParent((/** @type {?} */ (viewToWalk[TVIEW].node)), viewToWalk);
17678
- ngDevMode && assertNodeType((/** @type {?} */ (viewToWalk[TVIEW].node)), 2 /* View */);
17575
+ const renderParent = getContainerRenderParent((/** @type {?} */ (lView[TVIEW].node)), lView);
17576
+ ngDevMode && assertNodeType((/** @type {?} */ (lView[TVIEW].node)), 2 /* View */);
17679
17577
  if (renderParent) {
17680
17578
  /** @type {?} */
17681
- const renderer = viewToWalk[RENDERER];
17682
- walkTNodeTree(viewToWalk, insertMode ? 0 /* Insert */ : 1 /* Detach */, renderer, renderParent, beforeNode);
17579
+ const renderer = lView[RENDERER];
17580
+ /** @type {?} */
17581
+ const action = insertMode ? 0 /* Insert */ : 1 /* Detach */;
17582
+ executeActionOnView(renderer, action, lView, renderParent, beforeNode);
17683
17583
  }
17684
17584
  }
17685
17585
  /**
@@ -17689,7 +17589,7 @@ function addRemoveViewFromContainer(viewToWalk, insertMode, beforeNode) {
17689
17589
  * @return {?}
17690
17590
  */
17691
17591
  function renderDetachView(lView) {
17692
- walkTNodeTree(lView, 1 /* Detach */, lView[RENDERER], null);
17592
+ executeActionOnView(lView[RENDERER], 1 /* Detach */, lView, null, null);
17693
17593
  }
17694
17594
  /**
17695
17595
  * Traverses down and up the tree of views and containers to remove listeners and
@@ -17830,17 +17730,17 @@ function removeView(lContainer, removeIndex) {
17830
17730
  * A standalone function which destroys an LView,
17831
17731
  * conducting cleanup (e.g. removing listeners, calling onDestroys).
17832
17732
  *
17833
- * @param {?} view The view to be destroyed.
17733
+ * @param {?} lView The view to be destroyed.
17834
17734
  * @return {?}
17835
17735
  */
17836
- function destroyLView(view) {
17837
- if (!(view[FLAGS] & 256 /* Destroyed */)) {
17736
+ function destroyLView(lView) {
17737
+ if (!(lView[FLAGS] & 256 /* Destroyed */)) {
17838
17738
  /** @type {?} */
17839
- const renderer = view[RENDERER];
17739
+ const renderer = lView[RENDERER];
17840
17740
  if (isProceduralRenderer(renderer) && renderer.destroyNode) {
17841
- walkTNodeTree(view, 2 /* Destroy */, renderer, null);
17741
+ executeActionOnView(renderer, 2 /* Destroy */, lView, null, null);
17842
17742
  }
17843
- destroyViewTree(view);
17743
+ destroyViewTree(lView);
17844
17744
  }
17845
17745
  }
17846
17746
  /**
@@ -17910,8 +17810,8 @@ function cleanUpView(view) {
17910
17810
  */
17911
17811
  function removeListeners(lView) {
17912
17812
  /** @type {?} */
17913
- const tCleanup = (/** @type {?} */ (lView[TVIEW].cleanup));
17914
- if (tCleanup != null) {
17813
+ const tCleanup = lView[TVIEW].cleanup;
17814
+ if (tCleanup !== null) {
17915
17815
  /** @type {?} */
17916
17816
  const lCleanup = (/** @type {?} */ (lView[CLEANUP]));
17917
17817
  for (let i = 0; i < tCleanup.length - 1; i += 2) {
@@ -18107,7 +18007,7 @@ function nativeAppendChild(renderer, parent, child) {
18107
18007
  * @return {?}
18108
18008
  */
18109
18009
  function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode) {
18110
- if (beforeNode) {
18010
+ if (beforeNode !== null) {
18111
18011
  nativeInsertBefore(renderer, parent, child, beforeNode);
18112
18012
  }
18113
18013
  else {
@@ -18223,6 +18123,7 @@ function getBeforeNodeForView(viewIndexInContainer, lContainer) {
18223
18123
  if (nextViewIndex < lContainer.length) {
18224
18124
  /** @type {?} */
18225
18125
  const lView = (/** @type {?} */ (lContainer[nextViewIndex]));
18126
+ ngDevMode && assertDefined(lView[T_HOST], 'Missing Host TNode');
18226
18127
  /** @type {?} */
18227
18128
  const tViewNodeChild = ((/** @type {?} */ (lView[T_HOST]))).child;
18228
18129
  return tViewNodeChild !== null ? getNativeByTNode(tViewNodeChild, lView) : lContainer[NATIVE];
@@ -18251,7 +18152,7 @@ function nativeRemoveNode(renderer, rNode, isHostElement) {
18251
18152
  /**
18252
18153
  * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and
18253
18154
  * stored on a component host level.
18254
- * @param {?} lView A LView where nodes are inserted (target VLview)
18155
+ * @param {?} lView A LView where nodes are inserted (target LView)
18255
18156
  * @param {?} tProjectionNode A projection node where previously re-distribution should be appended
18256
18157
  * (target insertion place)
18257
18158
  * @param {?} selectorIndex A bucket from where nodes to project should be taken
@@ -18285,6 +18186,21 @@ function appendProjectedNodes(lView, tProjectionNode, selectorIndex, componentVi
18285
18186
  }
18286
18187
  }
18287
18188
  }
18189
+ /**
18190
+ * Loops over all children of a TNode container and appends them to the DOM
18191
+ *
18192
+ * @param {?} ngContainerChildTNode The first child of the TNode container
18193
+ * @param {?} tProjectionNode The projection (ng-content) TNode
18194
+ * @param {?} currentView Current LView
18195
+ * @param {?} projectionView Projection view (view above current)
18196
+ * @return {?}
18197
+ */
18198
+ function appendProjectedChildren(ngContainerChildTNode, tProjectionNode, currentView, projectionView) {
18199
+ while (ngContainerChildTNode) {
18200
+ appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);
18201
+ ngContainerChildTNode = ngContainerChildTNode.next;
18202
+ }
18203
+ }
18288
18204
  /**
18289
18205
  * Appends a projected node to the DOM, or in the case of a projected container,
18290
18206
  * appends the nodes from all of the container's active views to the DOM.
@@ -18315,20 +18231,182 @@ function appendProjectedNode(projectedTNode, tProjectionNode, currentView, proje
18315
18231
  addRemoveViewFromContainer(nodeOrContainer[i], true, nodeOrContainer[NATIVE]);
18316
18232
  }
18317
18233
  }
18234
+ else if (projectedTNode.type === 5 /* IcuContainer */) {
18235
+ // The node we are adding is an ICU container which is why we also need to project all the
18236
+ // children nodes that might have been created previously and are linked to this anchor
18237
+ /** @type {?} */
18238
+ let ngContainerChildTNode = (/** @type {?} */ (projectedTNode.child));
18239
+ appendProjectedChildren(ngContainerChildTNode, ngContainerChildTNode, projectionView, projectionView);
18240
+ }
18318
18241
  else {
18319
18242
  if (projectedTNode.type === 4 /* ElementContainer */) {
18320
- /** @type {?} */
18321
- let ngContainerChildTNode = (/** @type {?} */ (projectedTNode.child));
18322
- while (ngContainerChildTNode) {
18323
- appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);
18324
- ngContainerChildTNode = ngContainerChildTNode.next;
18325
- }
18243
+ appendProjectedChildren(projectedTNode.child, tProjectionNode, currentView, projectionView);
18326
18244
  }
18327
18245
  if (isLContainer(nodeOrContainer)) {
18328
18246
  appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);
18329
18247
  }
18330
18248
  }
18331
18249
  }
18250
+ /**
18251
+ * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,
18252
+ * destroy)
18253
+ *
18254
+ * Inserting a view without projection or containers at top level is simple. Just iterate over the
18255
+ * root nodes of the View, and for each node perform the `action`.
18256
+ *
18257
+ * Things get more complicated with containers and projections. That is because coming across:
18258
+ * - Container: implies that we have to insert/remove/destroy the views of that container as well
18259
+ * which in turn can have their own Containers at the View roots.
18260
+ * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The
18261
+ * complication is that the nodes we are projecting can themselves have Containers
18262
+ * or other Projections.
18263
+ *
18264
+ * As you can see this is a very recursive problem. While the recursive implementation is not the
18265
+ * most efficient one, trying to unroll the nodes non-recursively results in very complex code that
18266
+ * is very hard (to maintain). We are sacrificing a bit of performance for readability using a
18267
+ * recursive implementation.
18268
+ *
18269
+ * @param {?} renderer Renderer to use
18270
+ * @param {?} action action to perform (insert, detach, destroy)
18271
+ * @param {?} lView The LView which needs to be inserted, detached, destroyed.
18272
+ * @param {?} renderParent parent DOM element for insertion/removal.
18273
+ * @param {?} beforeNode Before which node the insertions should happen.
18274
+ * @return {?}
18275
+ */
18276
+ function executeActionOnView(renderer, action, lView, renderParent, beforeNode) {
18277
+ /** @type {?} */
18278
+ const tView = lView[TVIEW];
18279
+ ngDevMode && assertNodeType((/** @type {?} */ (tView.node)), 2 /* View */);
18280
+ /** @type {?} */
18281
+ let viewRootTNode = (/** @type {?} */ (tView.node)).child;
18282
+ while (viewRootTNode !== null) {
18283
+ executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);
18284
+ viewRootTNode = viewRootTNode.next;
18285
+ }
18286
+ }
18287
+ /**
18288
+ * `executeActionOnProjection` performs an operation on the projection specified by `action`
18289
+ * (insert, detach, destroy).
18290
+ *
18291
+ * Inserting a projection requires us to locate the projected nodes from the parent component. The
18292
+ * complication is that those nodes themselves could be re-projected from their parent component.
18293
+ *
18294
+ * @param {?} renderer Renderer to use
18295
+ * @param {?} action action to perform (insert, detach, destroy)
18296
+ * @param {?} lView The LView which needs to be inserted, detached, destroyed.
18297
+ * @param {?} tProjectionNode
18298
+ * @param {?} renderParent parent DOM element for insertion/removal.
18299
+ * @param {?} beforeNode Before which node the insertions should happen.
18300
+ * @return {?}
18301
+ */
18302
+ function executeActionOnProjection(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {
18303
+ /** @type {?} */
18304
+ const componentLView = findComponentView(lView);
18305
+ /** @type {?} */
18306
+ const componentNode = (/** @type {?} */ (componentLView[T_HOST]));
18307
+ /** @type {?} */
18308
+ const nodeToProject = (/** @type {?} */ ((/** @type {?} */ (componentNode.projection))[tProjectionNode.projection]));
18309
+ if (Array.isArray(nodeToProject)) {
18310
+ for (let i = 0; i < nodeToProject.length; i++) {
18311
+ /** @type {?} */
18312
+ const rNode = nodeToProject[i];
18313
+ ngDevMode && assertDomNode(rNode);
18314
+ executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);
18315
+ }
18316
+ }
18317
+ else {
18318
+ /** @type {?} */
18319
+ let projectionTNode = nodeToProject;
18320
+ /** @type {?} */
18321
+ const projectedComponentLView = (/** @type {?} */ (componentLView[PARENT]));
18322
+ while (projectionTNode !== null) {
18323
+ executeActionOnNode(renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);
18324
+ projectionTNode = projectionTNode.projectionNext;
18325
+ }
18326
+ }
18327
+ }
18328
+ /**
18329
+ * `executeActionOnContainer` performs an operation on the container and its views as specified by
18330
+ * `action` (insert, detach, destroy)
18331
+ *
18332
+ * Inserting a Container is complicated by the fact that the container may have Views which
18333
+ * themselves have containers or projections.
18334
+ *
18335
+ * @param {?} renderer Renderer to use
18336
+ * @param {?} action action to perform (insert, detach, destroy)
18337
+ * @param {?} lContainer The LContainer which needs to be inserted, detached, destroyed.
18338
+ * @param {?} renderParent parent DOM element for insertion/removal.
18339
+ * @param {?} beforeNode Before which node the insertions should happen.
18340
+ * @return {?}
18341
+ */
18342
+ function executeActionOnContainer(renderer, action, lContainer, renderParent, beforeNode) {
18343
+ ngDevMode && assertLContainer(lContainer);
18344
+ /** @type {?} */
18345
+ const anchor = lContainer[NATIVE];
18346
+ // LContainer has its own before node.
18347
+ /** @type {?} */
18348
+ const native = unwrapRNode(lContainer);
18349
+ // An LContainer can be created dynamically on any node by injecting ViewContainerRef.
18350
+ // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node
18351
+ // (comment in the DOM) that will be different from the LContainer's host node. In this particular
18352
+ // case we need to execute action on 2 nodes:
18353
+ // - container's host node (this is done in the executeNodeAction)
18354
+ // - container's host node (this is done here)
18355
+ if (anchor !== native) {
18356
+ executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);
18357
+ }
18358
+ for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
18359
+ /** @type {?} */
18360
+ const lView = (/** @type {?} */ (lContainer[i]));
18361
+ executeActionOnView(renderer, action, lView, renderParent, anchor);
18362
+ }
18363
+ }
18364
+ /**
18365
+ * `executeActionOnElementContainer` performs an operation on the ng-container node and its child
18366
+ * nodes as specified by the `action` (insert, detach, destroy).
18367
+ *
18368
+ * @param {?} renderer Renderer to use
18369
+ * @param {?} action action to perform (insert, detach, destroy)
18370
+ * @param {?} lView The LView which needs to be inserted, detached, destroyed.
18371
+ * @param {?} tElementContainerNode The TNode associated with the ElementContainer.
18372
+ * @param {?} renderParent parent DOM element for insertion/removal.
18373
+ * @param {?} beforeNode Before which node the insertions should happen.
18374
+ * @return {?}
18375
+ */
18376
+ function executeActionOnElementContainer(renderer, action, lView, tElementContainerNode, renderParent, beforeNode) {
18377
+ /** @type {?} */
18378
+ const node = lView[tElementContainerNode.index];
18379
+ executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);
18380
+ /** @type {?} */
18381
+ let childTNode = tElementContainerNode.child;
18382
+ while (childTNode) {
18383
+ executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);
18384
+ childTNode = childTNode.next;
18385
+ }
18386
+ }
18387
+ /**
18388
+ * @param {?} renderer
18389
+ * @param {?} action
18390
+ * @param {?} lView
18391
+ * @param {?} tNode
18392
+ * @param {?} renderParent
18393
+ * @param {?} beforeNode
18394
+ * @return {?}
18395
+ */
18396
+ function executeActionOnNode(renderer, action, lView, tNode, renderParent, beforeNode) {
18397
+ /** @type {?} */
18398
+ const elementContainerRootTNodeType = tNode.type;
18399
+ if (elementContainerRootTNodeType === 4 /* ElementContainer */) {
18400
+ executeActionOnElementContainer(renderer, action, lView, (/** @type {?} */ (tNode)), renderParent, beforeNode);
18401
+ }
18402
+ else if (elementContainerRootTNodeType === 1 /* Projection */) {
18403
+ executeActionOnProjection(renderer, action, lView, (/** @type {?} */ (tNode)), renderParent, beforeNode);
18404
+ }
18405
+ else {
18406
+ ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */);
18407
+ executeActionOnElementOrContainer(action, renderer, renderParent, lView[tNode.index], beforeNode);
18408
+ }
18409
+ }
18332
18410
 
18333
18411
  /**
18334
18412
  * @fileoverview added by tsickle
@@ -19813,7 +19891,10 @@ function ɵɵembeddedViewEnd() {
19813
19891
  /** @type {?} */
19814
19892
  const lContainer = (/** @type {?} */ (lView[PARENT]));
19815
19893
  ngDevMode && assertLContainerOrUndefined(lContainer);
19816
- leaveView((/** @type {?} */ (lContainer[PARENT])));
19894
+ // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block
19895
+ // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to
19896
+ // an error being thrown.
19897
+ leaveView((/** @type {?} */ (lContainer[PARENT])), /* safeToRunHooks */ true);
19817
19898
  setPreviousOrParentTNode((/** @type {?} */ (viewHost)), false);
19818
19899
  }
19819
19900
 
@@ -20760,6 +20841,7 @@ function ɵɵtext(index, value) {
20760
20841
  ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
20761
20842
  /** @type {?} */
20762
20843
  const textNative = lView[index + HEADER_OFFSET] = createTextNode(value, lView[RENDERER]);
20844
+ ngDevMode && ngDevMode.rendererSetText++;
20763
20845
  /** @type {?} */
20764
20846
  const tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, 3 /* Element */, null, null);
20765
20847
  // Text nodes are self closing.
@@ -20772,24 +20854,19 @@ function ɵɵtext(index, value) {
20772
20854
  *
20773
20855
  * \@codeGenApi
20774
20856
  * @template T
20775
- * @param {?} index Index of the node in the data array.
20776
20857
  * @param {?} value Stringified value to write.
20777
20858
  *
20778
20859
  * @return {?}
20779
20860
  */
20780
- function ɵɵtextBinding(index, value) {
20781
- if (value !== NO_CHANGE) {
20782
- /** @type {?} */
20783
- const lView = getLView();
20784
- ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
20785
- /** @type {?} */
20786
- const element = (/** @type {?} */ ((/** @type {?} */ (getNativeByIndex(index, lView)))));
20787
- ngDevMode && assertDefined(element, 'native element should exist');
20788
- ngDevMode && ngDevMode.rendererSetText++;
20789
- /** @type {?} */
20790
- const renderer = lView[RENDERER];
20791
- isProceduralRenderer(renderer) ? renderer.setValue(element, renderStringify(value)) :
20792
- element.textContent = renderStringify(value);
20861
+ function ɵɵtextBinding(value) {
20862
+ /** @type {?} */
20863
+ const lView = getLView();
20864
+ /** @type {?} */
20865
+ const index = getSelectedIndex();
20866
+ /** @type {?} */
20867
+ const bound = bind(lView, value);
20868
+ if (bound !== NO_CHANGE) {
20869
+ textBindingInternal(lView, index, renderStringify(bound));
20793
20870
  }
20794
20871
  }
20795
20872
 
@@ -20847,7 +20924,13 @@ function ɵɵtextInterpolate(v0) {
20847
20924
  function ɵɵtextInterpolate1(prefix, v0, suffix) {
20848
20925
  /** @type {?} */
20849
20926
  const index = getSelectedIndex();
20850
- ɵɵtextBinding(index, ɵɵinterpolation1(prefix, v0, suffix));
20927
+ /** @type {?} */
20928
+ const lView = getLView();
20929
+ /** @type {?} */
20930
+ const interpolated = ɵɵinterpolation1(prefix, v0, suffix);
20931
+ if (interpolated !== NO_CHANGE) {
20932
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
20933
+ }
20851
20934
  return ɵɵtextInterpolate1;
20852
20935
  }
20853
20936
  /**
@@ -20877,7 +20960,13 @@ function ɵɵtextInterpolate1(prefix, v0, suffix) {
20877
20960
  function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {
20878
20961
  /** @type {?} */
20879
20962
  const index = getSelectedIndex();
20880
- ɵɵtextBinding(index, ɵɵinterpolation2(prefix, v0, i0, v1, suffix));
20963
+ /** @type {?} */
20964
+ const lView = getLView();
20965
+ /** @type {?} */
20966
+ const interpolated = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);
20967
+ if (interpolated !== NO_CHANGE) {
20968
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
20969
+ }
20881
20970
  return ɵɵtextInterpolate2;
20882
20971
  }
20883
20972
  /**
@@ -20910,7 +20999,13 @@ function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {
20910
20999
  function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
20911
21000
  /** @type {?} */
20912
21001
  const index = getSelectedIndex();
20913
- ɵɵtextBinding(index, ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix));
21002
+ /** @type {?} */
21003
+ const lView = getLView();
21004
+ /** @type {?} */
21005
+ const interpolated = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);
21006
+ if (interpolated !== NO_CHANGE) {
21007
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21008
+ }
20914
21009
  return ɵɵtextInterpolate3;
20915
21010
  }
20916
21011
  /**
@@ -20945,7 +21040,13 @@ function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
20945
21040
  function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
20946
21041
  /** @type {?} */
20947
21042
  const index = getSelectedIndex();
20948
- ɵɵtextBinding(index, ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix));
21043
+ /** @type {?} */
21044
+ const lView = getLView();
21045
+ /** @type {?} */
21046
+ const interpolated = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
21047
+ if (interpolated !== NO_CHANGE) {
21048
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21049
+ }
20949
21050
  return ɵɵtextInterpolate4;
20950
21051
  }
20951
21052
  /**
@@ -20982,7 +21083,13 @@ function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
20982
21083
  function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
20983
21084
  /** @type {?} */
20984
21085
  const index = getSelectedIndex();
20985
- ɵɵtextBinding(index, ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix));
21086
+ /** @type {?} */
21087
+ const lView = getLView();
21088
+ /** @type {?} */
21089
+ const interpolated = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
21090
+ if (interpolated !== NO_CHANGE) {
21091
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21092
+ }
20986
21093
  return ɵɵtextInterpolate5;
20987
21094
  }
20988
21095
  /**
@@ -21022,7 +21129,13 @@ function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix
21022
21129
  function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
21023
21130
  /** @type {?} */
21024
21131
  const index = getSelectedIndex();
21025
- ɵɵtextBinding(index, ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix));
21132
+ /** @type {?} */
21133
+ const lView = getLView();
21134
+ /** @type {?} */
21135
+ const interpolated = ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
21136
+ if (interpolated !== NO_CHANGE) {
21137
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21138
+ }
21026
21139
  return ɵɵtextInterpolate6;
21027
21140
  }
21028
21141
  /**
@@ -21063,7 +21176,13 @@ function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5
21063
21176
  function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
21064
21177
  /** @type {?} */
21065
21178
  const index = getSelectedIndex();
21066
- ɵɵtextBinding(index, ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix));
21179
+ /** @type {?} */
21180
+ const lView = getLView();
21181
+ /** @type {?} */
21182
+ const interpolated = ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
21183
+ if (interpolated !== NO_CHANGE) {
21184
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21185
+ }
21067
21186
  return ɵɵtextInterpolate7;
21068
21187
  }
21069
21188
  /**
@@ -21106,7 +21225,13 @@ function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5
21106
21225
  function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
21107
21226
  /** @type {?} */
21108
21227
  const index = getSelectedIndex();
21109
- ɵɵtextBinding(index, ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix));
21228
+ /** @type {?} */
21229
+ const lView = getLView();
21230
+ /** @type {?} */
21231
+ const interpolated = ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
21232
+ if (interpolated !== NO_CHANGE) {
21233
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21234
+ }
21110
21235
  return ɵɵtextInterpolate8;
21111
21236
  }
21112
21237
  /**
@@ -21136,7 +21261,13 @@ function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5
21136
21261
  function ɵɵtextInterpolateV(values) {
21137
21262
  /** @type {?} */
21138
21263
  const index = getSelectedIndex();
21139
- ɵɵtextBinding(index, ɵɵinterpolationV(values));
21264
+ /** @type {?} */
21265
+ const lView = getLView();
21266
+ /** @type {?} */
21267
+ const interpolated = ɵɵinterpolationV(values);
21268
+ if (interpolated !== NO_CHANGE) {
21269
+ textBindingInternal(lView, index, (/** @type {?} */ (interpolated)));
21270
+ }
21140
21271
  return ɵɵtextInterpolateV;
21141
21272
  }
21142
21273
 
@@ -21652,6 +21783,9 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
21652
21783
  const oldView = enterView(rootView, null);
21653
21784
  /** @type {?} */
21654
21785
  let component;
21786
+ // Will become true if the `try` block executes with no errors.
21787
+ /** @type {?} */
21788
+ let safeToRunHooks = false;
21655
21789
  try {
21656
21790
  if (rendererFactory.begin)
21657
21791
  rendererFactory.begin();
@@ -21663,9 +21797,10 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
21663
21797
  rootView[FLAGS] &= ~4 /* CreationMode */;
21664
21798
  resetPreOrderHookFlags(rootView);
21665
21799
  refreshDescendantViews(rootView); // update mode pass
21800
+ safeToRunHooks = true;
21666
21801
  }
21667
21802
  finally {
21668
- leaveView(oldView);
21803
+ leaveView(oldView, safeToRunHooks);
21669
21804
  if (rendererFactory.end)
21670
21805
  rendererFactory.end();
21671
21806
  }
@@ -22469,6 +22604,7 @@ function multiFactory(factoryFn, index, isViewProvider, isComponent, f) {
22469
22604
  * and publish them into the DI system, making it visible to others for injection.
22470
22605
  *
22471
22606
  * For example:
22607
+ * ```ts
22472
22608
  * class ComponentWithProviders {
22473
22609
  * constructor(private greeter: GreeterDE) {}
22474
22610
  *
@@ -22480,15 +22616,17 @@ function multiFactory(factoryFn, index, isViewProvider, isComponent, f) {
22480
22616
  * vars: 1,
22481
22617
  * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
22482
22618
  * if (fs & RenderFlags.Create) {
22483
- * text(0);
22619
+ * ɵɵtext(0);
22484
22620
  * }
22485
22621
  * if (fs & RenderFlags.Update) {
22486
- * textBinding(0, bind(ctx.greeter.greet()));
22622
+ * ɵɵselect(0);
22623
+ * ɵɵtextBinding(ctx.greeter.greet());
22487
22624
  * }
22488
22625
  * },
22489
22626
  * features: [ProvidersFeature([GreeterDE])]
22490
22627
  * });
22491
22628
  * }
22629
+ * ```
22492
22630
  *
22493
22631
  * \@codeGenApi
22494
22632
  * @template T
@@ -22539,6 +22677,12 @@ function ɵɵProvidersFeature(providers, viewProviders = []) {
22539
22677
  class ComponentRef {
22540
22678
  }
22541
22679
  /**
22680
+ * Base class for a factory that can create a component dynamically.
22681
+ * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
22682
+ * Use the resulting `ComponentFactory.create()` method to create a component of that type.
22683
+ *
22684
+ * @see [Dynamic Components](guide/dynamic-component-loader)
22685
+ *
22542
22686
  * \@publicApi
22543
22687
  * @abstract
22544
22688
  * @template C
@@ -22573,6 +22717,12 @@ class _NullComponentFactoryResolver {
22573
22717
  }
22574
22718
  }
22575
22719
  /**
22720
+ * A simple registry that maps `Components` to generated `ComponentFactory` classes
22721
+ * that can be used to create instances of components.
22722
+ * Use to obtain the factory for a given component type,
22723
+ * then use the factory's `create()` method to create a component of that type.
22724
+ *
22725
+ * @see [Dynamic Components](guide/dynamic-component-loader)
22576
22726
  * \@publicApi
22577
22727
  * @abstract
22578
22728
  */
@@ -23161,7 +23311,6 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23161
23311
  this._lContainer = _lContainer;
23162
23312
  this._hostTNode = _hostTNode;
23163
23313
  this._hostView = _hostView;
23164
- this._viewRefs = [];
23165
23314
  }
23166
23315
  /**
23167
23316
  * @return {?}
@@ -23200,7 +23349,9 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23200
23349
  * @param {?} index
23201
23350
  * @return {?}
23202
23351
  */
23203
- get(index) { return this._viewRefs[index] || null; }
23352
+ get(index) {
23353
+ return this._lContainer[VIEW_REFS] !== null && (/** @type {?} */ (this._lContainer[VIEW_REFS]))[index] || null;
23354
+ }
23204
23355
  /**
23205
23356
  * @return {?}
23206
23357
  */
@@ -23219,13 +23370,14 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23219
23370
  * @return {?}
23220
23371
  */
23221
23372
  createEmbeddedView(templateRef, context, index) {
23373
+ this.allocateContainerIfNeeded();
23222
23374
  /** @type {?} */
23223
23375
  const adjustedIdx = this._adjustIndex(index);
23224
23376
  /** @type {?} */
23225
23377
  const viewRef = ((/** @type {?} */ (templateRef)))
23226
23378
  .createEmbeddedView(context || (/** @type {?} */ ({})), this._lContainer, adjustedIdx);
23227
23379
  ((/** @type {?} */ (viewRef))).attachToViewContainerRef(this);
23228
- this._viewRefs.splice(adjustedIdx, 0, viewRef);
23380
+ (/** @type {?} */ (this._lContainer[VIEW_REFS])).splice(adjustedIdx, 0, viewRef);
23229
23381
  return viewRef;
23230
23382
  }
23231
23383
  /**
@@ -23257,6 +23409,7 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23257
23409
  if (viewRef.destroyed) {
23258
23410
  throw new Error('Cannot insert a destroyed View in a ViewContainer!');
23259
23411
  }
23412
+ this.allocateContainerIfNeeded();
23260
23413
  /** @type {?} */
23261
23414
  const lView = (/** @type {?} */ (((/** @type {?} */ (viewRef)))._lView));
23262
23415
  /** @type {?} */
@@ -23271,7 +23424,7 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23271
23424
  const beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);
23272
23425
  addRemoveViewFromContainer(lView, true, beforeNode);
23273
23426
  ((/** @type {?} */ (viewRef))).attachToViewContainerRef(this);
23274
- this._viewRefs.splice(adjustedIdx, 0, viewRef);
23427
+ (/** @type {?} */ (this._lContainer[VIEW_REFS])).splice(adjustedIdx, 0, viewRef);
23275
23428
  return viewRef;
23276
23429
  }
23277
23430
  /**
@@ -23294,28 +23447,34 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23294
23447
  * @param {?} viewRef
23295
23448
  * @return {?}
23296
23449
  */
23297
- indexOf(viewRef) { return this._viewRefs.indexOf(viewRef); }
23450
+ indexOf(viewRef) {
23451
+ return this._lContainer[VIEW_REFS] !== null ?
23452
+ (/** @type {?} */ (this._lContainer[VIEW_REFS])).indexOf(viewRef) :
23453
+ 0;
23454
+ }
23298
23455
  /**
23299
23456
  * @param {?=} index
23300
23457
  * @return {?}
23301
23458
  */
23302
23459
  remove(index) {
23460
+ this.allocateContainerIfNeeded();
23303
23461
  /** @type {?} */
23304
23462
  const adjustedIdx = this._adjustIndex(index, -1);
23305
23463
  removeView(this._lContainer, adjustedIdx);
23306
- this._viewRefs.splice(adjustedIdx, 1);
23464
+ (/** @type {?} */ (this._lContainer[VIEW_REFS])).splice(adjustedIdx, 1);
23307
23465
  }
23308
23466
  /**
23309
23467
  * @param {?=} index
23310
23468
  * @return {?}
23311
23469
  */
23312
23470
  detach(index) {
23471
+ this.allocateContainerIfNeeded();
23313
23472
  /** @type {?} */
23314
23473
  const adjustedIdx = this._adjustIndex(index, -1);
23315
23474
  /** @type {?} */
23316
23475
  const view = detachView(this._lContainer, adjustedIdx);
23317
23476
  /** @type {?} */
23318
- const wasDetached = view && this._viewRefs.splice(adjustedIdx, 1)[0] != null;
23477
+ const wasDetached = view && (/** @type {?} */ (this._lContainer[VIEW_REFS])).splice(adjustedIdx, 1)[0] != null;
23319
23478
  return wasDetached ? new ViewRef((/** @type {?} */ (view)), (/** @type {?} */ (view))[CONTEXT], -1) : null;
23320
23479
  }
23321
23480
  /**
@@ -23335,6 +23494,15 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
23335
23494
  }
23336
23495
  return index;
23337
23496
  }
23497
+ /**
23498
+ * @private
23499
+ * @return {?}
23500
+ */
23501
+ allocateContainerIfNeeded() {
23502
+ if (this._lContainer[VIEW_REFS] === null) {
23503
+ this._lContainer[VIEW_REFS] = [];
23504
+ }
23505
+ }
23338
23506
  };
23339
23507
  }
23340
23508
  ngDevMode && assertNodeOfPossibleTypes(hostTNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */);
@@ -23413,6 +23581,7 @@ function createViewRef(hostTNode, hostView, context) {
23413
23581
  return (/** @type {?} */ (null));
23414
23582
  }
23415
23583
  /**
23584
+ * Returns a Renderer2 (or throws when application was bootstrapped with Renderer3)
23416
23585
  * @param {?} view
23417
23586
  * @return {?}
23418
23587
  */
@@ -23427,11 +23596,19 @@ function getOrCreateRenderer2(view) {
23427
23596
  }
23428
23597
  }
23429
23598
  /**
23430
- * Returns a Renderer2 (or throws when application was bootstrapped with Renderer3)
23599
+ * Injects a Renderer2 for the current component.
23431
23600
  * @return {?}
23432
23601
  */
23433
23602
  function injectRenderer2() {
23434
- return getOrCreateRenderer2(getLView());
23603
+ // We need the Renderer to be based on the component that it's being injected into, however since
23604
+ // DI happens before we've entered its view, `getLView` will return the parent view instead.
23605
+ /** @type {?} */
23606
+ const lView = getLView();
23607
+ /** @type {?} */
23608
+ const tNode = getPreviousOrParentTNode();
23609
+ /** @type {?} */
23610
+ const nodeAtIndex = getComponentViewByIndex(tNode.index, lView);
23611
+ return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);
23435
23612
  }
23436
23613
 
23437
23614
  /**
@@ -23630,7 +23807,7 @@ class Version {
23630
23807
  * \@publicApi
23631
23808
  * @type {?}
23632
23809
  */
23633
- const VERSION = new Version('8.1.0-next.2');
23810
+ const VERSION = new Version('8.1.1');
23634
23811
 
23635
23812
  /**
23636
23813
  * @fileoverview added by tsickle
@@ -28210,6 +28387,9 @@ class ComponentFactory$1 extends ComponentFactory {
28210
28387
  let component;
28211
28388
  /** @type {?} */
28212
28389
  let tElementNode;
28390
+ // Will become true if the `try` block executes with no errors.
28391
+ /** @type {?} */
28392
+ let safeToRunHooks = false;
28213
28393
  try {
28214
28394
  /** @type {?} */
28215
28395
  const componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, renderer);
@@ -28231,9 +28411,10 @@ class ComponentFactory$1 extends ComponentFactory {
28231
28411
  component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);
28232
28412
  addToViewTree(rootLView, componentView);
28233
28413
  refreshDescendantViews(rootLView);
28414
+ safeToRunHooks = true;
28234
28415
  }
28235
28416
  finally {
28236
- leaveView(oldLView);
28417
+ leaveView(oldLView, safeToRunHooks);
28237
28418
  }
28238
28419
  /** @type {?} */
28239
28420
  const componentRef = new ComponentRef$1(this.componentType, component, createElementRef(ElementRef, tElementNode, rootLView), rootLView, tElementNode);
@@ -28282,22 +28463,24 @@ class ComponentRef$1 extends ComponentRef {
28282
28463
  * @return {?}
28283
28464
  */
28284
28465
  destroy() {
28285
- ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
28286
- (/** @type {?} */ (this.destroyCbs)).forEach((/**
28287
- * @param {?} fn
28288
- * @return {?}
28289
- */
28290
- fn => fn()));
28291
- this.destroyCbs = null;
28292
- !this.hostView.destroyed && this.hostView.destroy();
28466
+ if (this.destroyCbs) {
28467
+ this.destroyCbs.forEach((/**
28468
+ * @param {?} fn
28469
+ * @return {?}
28470
+ */
28471
+ fn => fn()));
28472
+ this.destroyCbs = null;
28473
+ !this.hostView.destroyed && this.hostView.destroy();
28474
+ }
28293
28475
  }
28294
28476
  /**
28295
28477
  * @param {?} callback
28296
28478
  * @return {?}
28297
28479
  */
28298
28480
  onDestroy(callback) {
28299
- ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
28300
- (/** @type {?} */ (this.destroyCbs)).push(callback);
28481
+ if (this.destroyCbs) {
28482
+ this.destroyCbs.push(callback);
28483
+ }
28301
28484
  }
28302
28485
  }
28303
28486
 
@@ -29440,7 +29623,7 @@ function readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask,
29440
29623
  elementPropertyInternal(nodeIndex, propName, value, sanitizeFn);
29441
29624
  break;
29442
29625
  case 0 /* Text */:
29443
- ɵɵtextBinding(nodeIndex, value);
29626
+ textBindingInternal(viewData, nodeIndex, value);
29444
29627
  break;
29445
29628
  case 2 /* IcuSwitch */:
29446
29629
  tIcuIndex = (/** @type {?} */ (updateOpCodes[++j]));
@@ -29639,15 +29822,21 @@ let shiftsCounter = 0;
29639
29822
  *
29640
29823
  * \@codeGenApi
29641
29824
  * @template T
29642
- * @param {?} expression The binding's new value or NO_CHANGE
29825
+ * @param {?} value The binding's value
29826
+ * @return {?} This function returns itself so that it may be chained
29827
+ * (e.g. `i18nExp(ctx.name)(ctx.title)`)
29643
29828
  *
29644
- * @return {?}
29645
29829
  */
29646
- function ɵɵi18nExp(expression) {
29830
+ function ɵɵi18nExp(value) {
29831
+ /** @type {?} */
29832
+ const lView = getLView();
29833
+ /** @type {?} */
29834
+ const expression = bind(lView, value);
29647
29835
  if (expression !== NO_CHANGE) {
29648
29836
  changeMask = changeMask | (1 << shiftsCounter);
29649
29837
  }
29650
29838
  shiftsCounter++;
29839
+ return ɵɵi18nExp;
29651
29840
  }
29652
29841
  /**
29653
29842
  * Updates a translation block or an i18n attribute when the bindings have changed.
@@ -29959,18 +30148,19 @@ const LOCALIZE_PH_REGEXP = /\{\$(.*?)\}/g;
29959
30148
  * @param {?=} placeholders
29960
30149
  * @return {?}
29961
30150
  */
29962
- function ɵɵi18nLocalize(input, placeholders = {}) {
30151
+ function ɵɵi18nLocalize(input, placeholders) {
29963
30152
  if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string
29964
30153
  input = TRANSLATIONS[input];
29965
30154
  }
29966
- return Object.keys(placeholders).length ?
29967
- input.replace(LOCALIZE_PH_REGEXP, (/**
29968
- * @param {?} match
30155
+ if (placeholders !== undefined && Object.keys(placeholders).length) {
30156
+ return input.replace(LOCALIZE_PH_REGEXP, (/**
30157
+ * @param {?} _
29969
30158
  * @param {?} key
29970
30159
  * @return {?}
29971
30160
  */
29972
- (match, key) => placeholders[key] || '')) :
29973
- input;
30161
+ (_, key) => placeholders[key] || ''));
30162
+ }
30163
+ return input;
29974
30164
  }
29975
30165
  /**
29976
30166
  * The locale id that the application is currently using (for translations and ICU expressions).
@@ -30766,7 +30956,7 @@ function unwrapValue$1(newValue) {
30766
30956
  * that create event emitters. When the title is clicked, the emitter
30767
30957
  * emits an open or close event to toggle the current visibility state.
30768
30958
  *
30769
- * ```
30959
+ * ```html
30770
30960
  * \@Component({
30771
30961
  * selector: 'zippy',
30772
30962
  * template: `
@@ -30795,17 +30985,10 @@ function unwrapValue$1(newValue) {
30795
30985
  * Access the event object with the `$event` argument passed to the output event
30796
30986
  * handler:
30797
30987
  *
30798
- * ```
30988
+ * ```html
30799
30989
  * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
30800
30990
  * ```
30801
30991
  *
30802
- * ### Notes
30803
- *
30804
- * Uses Rx.Observable but provides an adapter to make it work as specified here:
30805
- * https://github.com/jhusain/observable-spec
30806
- *
30807
- * Once a reference implementation of the spec is available, switch to it.
30808
- *
30809
30992
  * \@publicApi
30810
30993
  * @template T
30811
30994
  */
@@ -31335,9 +31518,11 @@ function queryByReadToken(read, tNode, currentView) {
31335
31518
  }
31336
31519
  else {
31337
31520
  /** @type {?} */
31338
- const matchingIdx = locateDirectiveOrProvider(tNode, currentView, (/** @type {?} */ (read)), false, false);
31521
+ const tView = currentView[TVIEW];
31522
+ /** @type {?} */
31523
+ const matchingIdx = locateDirectiveOrProvider(tNode, tView, (/** @type {?} */ (read)), false, false);
31339
31524
  if (matchingIdx !== null) {
31340
- return getNodeInjectable(currentView[TVIEW].data, currentView, matchingIdx, (/** @type {?} */ (tNode)));
31525
+ return getNodeInjectable(tView.data, currentView, matchingIdx, (/** @type {?} */ (tNode)));
31341
31526
  }
31342
31527
  }
31343
31528
  return null;
@@ -31401,7 +31586,9 @@ function queryRead(tNode, currentView, read, matchingIdx) {
31401
31586
  */
31402
31587
  function add(query, tNode, insertBeforeContainer) {
31403
31588
  /** @type {?} */
31404
- const currentView = getLView();
31589
+ const lView = getLView();
31590
+ /** @type {?} */
31591
+ const tView = lView[TVIEW];
31405
31592
  while (query) {
31406
31593
  /** @type {?} */
31407
31594
  const predicate = query.predicate;
@@ -31411,13 +31598,13 @@ function add(query, tNode, insertBeforeContainer) {
31411
31598
  /** @type {?} */
31412
31599
  let result = null;
31413
31600
  if (type === TemplateRef) {
31414
- result = queryByTemplateRef(type, tNode, currentView, predicate.read);
31601
+ result = queryByTemplateRef(type, tNode, lView, predicate.read);
31415
31602
  }
31416
31603
  else {
31417
31604
  /** @type {?} */
31418
- const matchingIdx = locateDirectiveOrProvider(tNode, currentView, type, false, false);
31605
+ const matchingIdx = locateDirectiveOrProvider(tNode, tView, type, false, false);
31419
31606
  if (matchingIdx !== null) {
31420
- result = queryRead(tNode, currentView, predicate.read, matchingIdx);
31607
+ result = queryRead(tNode, lView, predicate.read, matchingIdx);
31421
31608
  }
31422
31609
  }
31423
31610
  if (result !== null) {
@@ -31432,7 +31619,7 @@ function add(query, tNode, insertBeforeContainer) {
31432
31619
  const matchingIdx = getIdxOfMatchingSelector(tNode, selector[i]);
31433
31620
  if (matchingIdx !== null) {
31434
31621
  /** @type {?} */
31435
- const result = queryRead(tNode, currentView, predicate.read, matchingIdx);
31622
+ const result = queryRead(tNode, lView, predicate.read, matchingIdx);
31436
31623
  if (result !== null) {
31437
31624
  addMatch(query, result, insertBeforeContainer);
31438
31625
  }
@@ -31758,7 +31945,6 @@ const ɵ0$9 = /**
31758
31945
  'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
31759
31946
  'ɵɵProvidersFeature': ɵɵProvidersFeature,
31760
31947
  'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
31761
- 'ɵɵbind': ɵɵbind,
31762
31948
  'ɵɵcontainer': ɵɵcontainer,
31763
31949
  'ɵɵnextContext': ɵɵnextContext,
31764
31950
  'ɵɵcontainerRefreshStart': ɵɵcontainerRefreshStart,
@@ -32990,9 +33176,10 @@ const ɵ9 = /**
32990
33176
  */
32991
33177
  (eventName, args) => ({ eventName, args });
32992
33178
  /**
32993
- * Binds a CSS event to a host listener and supplies configuration metadata.
33179
+ * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
32994
33180
  * Angular invokes the supplied handler method when the host element emits the specified event,
32995
33181
  * and updates the bound element with the result.
33182
+ *
32996
33183
  * If the handler method returns false, applies `preventDefault` on the bound element.
32997
33184
  *
32998
33185
  * \@usageNotes
@@ -33000,7 +33187,7 @@ const ɵ9 = /**
33000
33187
  * The following example declares a directive
33001
33188
  * that attaches a click listener to a button and counts clicks.
33002
33189
  *
33003
- * ```
33190
+ * ```ts
33004
33191
  * \@Directive({selector: 'button[counting]'})
33005
33192
  * class CountClicks {
33006
33193
  * numberOfClicks = 0;
@@ -39994,5 +40181,5 @@ class NgModuleFactory_ extends NgModuleFactory {
39994
40181
  * Generated bundle index. Do not edit.
39995
40182
  */
39996
40183
 
39997
- export { APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_r, _iterableDiffersFactory as ɵangular_packages_core_core_o, _keyValueDiffersFactory as ɵangular_packages_core_core_p, _localeFactory as ɵangular_packages_core_core_q, zoneSchedulerFactory as ɵangular_packages_core_core_s, _appIdRandomProviderFactory as ɵangular_packages_core_core_f, DefaultIterableDifferFactory as ɵangular_packages_core_core_m, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_n, DebugElement__PRE_R3__ as ɵangular_packages_core_core_l, DebugNode__PRE_R3__ as ɵangular_packages_core_core_k, NullInjector as ɵangular_packages_core_core_b, injectInjectorOnly as ɵangular_packages_core_core_a, ReflectiveInjector_ as ɵangular_packages_core_core_c, ReflectiveDependency as ɵangular_packages_core_core_d, resolveReflectiveProviders as ɵangular_packages_core_core_e, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_j, wtfEnabled as ɵangular_packages_core_core_t, createScope as ɵangular_packages_core_core_v, detectWTF as ɵangular_packages_core_core_u, endTimeRange as ɵangular_packages_core_core_y, leave as ɵangular_packages_core_core_w, startTimeRange as ɵangular_packages_core_core_x, SCHEDULER as ɵangular_packages_core_core_bb, injectAttributeImpl as ɵangular_packages_core_core_bc, getLView as ɵangular_packages_core_core_bd, getPreviousOrParentTNode as ɵangular_packages_core_core_be, nextContextImpl as ɵangular_packages_core_core_bf, BoundPlayerFactory as ɵangular_packages_core_core_bj, getRootContext as ɵangular_packages_core_core_bp, loadInternal as ɵangular_packages_core_core_bo, createElementRef as ɵangular_packages_core_core_g, createTemplateRef as ɵangular_packages_core_core_h, createViewRef as ɵangular_packages_core_core_i, getUrlSanitizer as ɵangular_packages_core_core_bh, noSideEffects as ɵangular_packages_core_core_bn, makeParamDecorator as ɵangular_packages_core_core_bk, makePropDecorator as ɵangular_packages_core_core_bl, getClosureSafeProperty as ɵangular_packages_core_core_bq, _def as ɵangular_packages_core_core_z, DebugContext as ɵangular_packages_core_core_ba, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken, enableProdMode, isDevMode, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugEventListener, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS$1 as TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID$1 as LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, Attribute, ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, ViewEncapsulation, Version, VERSION, InjectFlags, ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, forwardRef, resolveForwardRef, Injectable, Injector, ɵɵinject, inject, INJECTOR, ReflectiveInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, NoopNgZone as ɵNoopNgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ComponentFactory as ɵComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef$1 as ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable, ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, Console as ɵConsole, setCurrentInjector as ɵsetCurrentInjector, getInjectableDef as ɵgetInjectableDef, APP_ROOT as ɵAPP_ROOT, ivyEnabled as ɵivyEnabled, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, resolveComponentResources as ɵresolveComponentResources, ReflectionCapabilities as ɵReflectionCapabilities, RenderDebugInfo as ɵRenderDebugInfo, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeStyle as ɵ_sanitizeStyle, _sanitizeUrl as ɵ_sanitizeUrl, _global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify, makeDecorator as ɵmakeDecorator, isObservable as ɵisObservable, isPromise as ɵisPromise, clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, getLocalePluralCase as ɵgetLocalePluralCase, findLocaleData as ɵfindLocaleData, LOCALE_DATA as ɵLOCALE_DATA, LocaleDataIndex as ɵLocaleDataIndex, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefinePipe, ɵɵdefineNgModule, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, ɵɵdirectiveInject, ɵɵinjectAttribute, ɵɵgetFactoryOf, ɵɵgetInheritedFactory, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵtemplateRefExtractor, ɵɵProvidersFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, LifecycleHooksFeature as ɵLifecycleHooksFeature, NgModuleRef$1 as ɵRender3NgModuleRef, markDirty as ɵmarkDirty, NgModuleFactory$1 as ɵNgModuleFactory, NO_CHANGE as ɵNO_CHANGE, ɵɵcontainer, ɵɵnextContext, ɵɵelementStart, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵelement, ɵɵlistener, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵembeddedViewStart, ɵɵprojection, ɵɵbind, ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵgetCurrentView, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, ɵɵrestoreView, ɵɵcontainerRefreshStart, ɵɵcontainerRefreshEnd, ɵɵqueryRefresh, ɵɵviewQuery, ɵɵstaticViewQuery, ɵɵstaticContentQuery, ɵɵloadViewQuery, ɵɵcontentQuery, ɵɵloadContentQuery, ɵɵelementEnd, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵupdateSyntheticHostBinding, ɵɵcomponentHostSyntheticListener, ɵɵprojectionDef, ɵɵreference, ɵɵenableBindings, ɵɵdisableBindings, ɵɵallocHostVars, ɵɵelementContainerStart, ɵɵelementContainerEnd, ɵɵstyling, ɵɵstyleMap, ɵɵclassMap, ɵɵstyleProp, ɵɵstylingApply, ɵɵclassProp, ɵɵelementHostAttrs, ɵɵselect, ɵɵtextBinding, ɵɵtemplate, ɵɵembeddedViewEnd, store as ɵstore, ɵɵload, ɵɵpipe, whenRendered as ɵwhenRendered, ɵɵi18n, ɵɵi18nAttributes, ɵɵi18nExp, ɵɵi18nStart, ɵɵi18nEnd, ɵɵi18nApply, ɵɵi18nPostprocess, i18nConfigureLocalize as ɵi18nConfigureLocalize, ɵɵi18nLocalize, setLocaleId as ɵsetLocaleId, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, setClassMetadata as ɵsetClassMetadata, ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, patchComponentDefWithScope as ɵpatchComponentDefWithScope, resetCompiledComponents as ɵresetCompiledComponents, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, transitiveScopesFor as ɵtransitiveScopesFor, compilePipe as ɵcompilePipe, ɵɵsanitizeHtml, ɵɵsanitizeStyle, ɵɵdefaultStyleSanitizer, ɵɵsanitizeScript, ɵɵsanitizeUrl, ɵɵsanitizeResourceUrl, ɵɵsanitizeUrlOrResourceUrl, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, getLContext as ɵgetLContext, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_COMPONENT_DEF as ɵNG_COMPONENT_DEF, NG_DIRECTIVE_DEF as ɵNG_DIRECTIVE_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_MODULE_DEF as ɵNG_MODULE_DEF, NG_BASE_DEF as ɵNG_BASE_DEF, NG_INJECTABLE_DEF as ɵNG_INJECTABLE_DEF, NG_INJECTOR_DEF as ɵNG_INJECTOR_DEF, bindPlayerFactory as ɵbindPlayerFactory, addPlayer as ɵaddPlayer, getPlayers as ɵgetPlayers, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, registerNgModuleType as ɵregisterNgModuleType, publishGlobalUtil as ɵpublishGlobalUtil, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, createInjector as ɵcreateInjector, INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__, registerModuleFactory as ɵregisterModuleFactory, EMPTY_ARRAY$3 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, anchorDef as ɵand, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, directiveDef as ɵdid, elementDef as ɵeld, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, queryDef as ɵqud, textDef as ɵted, unwrapValue as ɵunv, viewDef as ɵvid };
40184
+ export { APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_r, _iterableDiffersFactory as ɵangular_packages_core_core_o, _keyValueDiffersFactory as ɵangular_packages_core_core_p, _localeFactory as ɵangular_packages_core_core_q, zoneSchedulerFactory as ɵangular_packages_core_core_s, _appIdRandomProviderFactory as ɵangular_packages_core_core_f, DefaultIterableDifferFactory as ɵangular_packages_core_core_m, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_n, DebugElement__PRE_R3__ as ɵangular_packages_core_core_l, DebugNode__PRE_R3__ as ɵangular_packages_core_core_k, NullInjector as ɵangular_packages_core_core_b, injectInjectorOnly as ɵangular_packages_core_core_a, ReflectiveInjector_ as ɵangular_packages_core_core_c, ReflectiveDependency as ɵangular_packages_core_core_d, resolveReflectiveProviders as ɵangular_packages_core_core_e, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_j, wtfEnabled as ɵangular_packages_core_core_t, createScope as ɵangular_packages_core_core_v, detectWTF as ɵangular_packages_core_core_u, endTimeRange as ɵangular_packages_core_core_y, leave as ɵangular_packages_core_core_w, startTimeRange as ɵangular_packages_core_core_x, SCHEDULER as ɵangular_packages_core_core_bb, injectAttributeImpl as ɵangular_packages_core_core_bc, getLView as ɵangular_packages_core_core_bd, getPreviousOrParentTNode as ɵangular_packages_core_core_be, nextContextImpl as ɵangular_packages_core_core_bf, BoundPlayerFactory as ɵangular_packages_core_core_bj, getRootContext as ɵangular_packages_core_core_bp, loadInternal as ɵangular_packages_core_core_bo, createElementRef as ɵangular_packages_core_core_g, createTemplateRef as ɵangular_packages_core_core_h, createViewRef as ɵangular_packages_core_core_i, getUrlSanitizer as ɵangular_packages_core_core_bh, noSideEffects as ɵangular_packages_core_core_bn, makeParamDecorator as ɵangular_packages_core_core_bk, makePropDecorator as ɵangular_packages_core_core_bl, getClosureSafeProperty as ɵangular_packages_core_core_bq, _def as ɵangular_packages_core_core_z, DebugContext as ɵangular_packages_core_core_ba, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken, enableProdMode, isDevMode, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugEventListener, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS$1 as TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID$1 as LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, Attribute, ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, ViewEncapsulation, Version, VERSION, InjectFlags, ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, forwardRef, resolveForwardRef, Injectable, Injector, ɵɵinject, inject, INJECTOR, ReflectiveInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, NoopNgZone as ɵNoopNgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ComponentFactory as ɵComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef$1 as ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable, ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, Console as ɵConsole, setCurrentInjector as ɵsetCurrentInjector, getInjectableDef as ɵgetInjectableDef, APP_ROOT as ɵAPP_ROOT, ivyEnabled as ɵivyEnabled, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, resolveComponentResources as ɵresolveComponentResources, ReflectionCapabilities as ɵReflectionCapabilities, RenderDebugInfo as ɵRenderDebugInfo, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeStyle as ɵ_sanitizeStyle, _sanitizeUrl as ɵ_sanitizeUrl, _global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify, makeDecorator as ɵmakeDecorator, isObservable as ɵisObservable, isPromise as ɵisPromise, clearOverrides as ɵclearOverrides, initServicesIfNeeded as ɵinitServicesIfNeeded, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, getLocalePluralCase as ɵgetLocalePluralCase, findLocaleData as ɵfindLocaleData, LOCALE_DATA as ɵLOCALE_DATA, LocaleDataIndex as ɵLocaleDataIndex, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefinePipe, ɵɵdefineNgModule, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, ɵɵdirectiveInject, ɵɵinjectAttribute, ɵɵgetFactoryOf, ɵɵgetInheritedFactory, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵtemplateRefExtractor, ɵɵProvidersFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, LifecycleHooksFeature as ɵLifecycleHooksFeature, NgModuleRef$1 as ɵRender3NgModuleRef, markDirty as ɵmarkDirty, NgModuleFactory$1 as ɵNgModuleFactory, NO_CHANGE as ɵNO_CHANGE, ɵɵcontainer, ɵɵnextContext, ɵɵelementStart, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵelement, ɵɵlistener, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵembeddedViewStart, ɵɵprojection, ɵɵinterpolation1, ɵɵinterpolation2, ɵɵinterpolation3, ɵɵinterpolation4, ɵɵinterpolation5, ɵɵinterpolation6, ɵɵinterpolation7, ɵɵinterpolation8, ɵɵinterpolationV, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵgetCurrentView, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, ɵɵrestoreView, ɵɵcontainerRefreshStart, ɵɵcontainerRefreshEnd, ɵɵqueryRefresh, ɵɵviewQuery, ɵɵstaticViewQuery, ɵɵstaticContentQuery, ɵɵloadViewQuery, ɵɵcontentQuery, ɵɵloadContentQuery, ɵɵelementEnd, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵupdateSyntheticHostBinding, ɵɵcomponentHostSyntheticListener, ɵɵprojectionDef, ɵɵreference, ɵɵenableBindings, ɵɵdisableBindings, ɵɵallocHostVars, ɵɵelementContainerStart, ɵɵelementContainerEnd, ɵɵstyling, ɵɵstyleMap, ɵɵclassMap, ɵɵstyleProp, ɵɵstylingApply, ɵɵclassProp, ɵɵelementHostAttrs, ɵɵselect, ɵɵtextBinding, ɵɵtemplate, ɵɵembeddedViewEnd, store as ɵstore, ɵɵload, ɵɵpipe, whenRendered as ɵwhenRendered, ɵɵi18n, ɵɵi18nAttributes, ɵɵi18nExp, ɵɵi18nStart, ɵɵi18nEnd, ɵɵi18nApply, ɵɵi18nPostprocess, i18nConfigureLocalize as ɵi18nConfigureLocalize, ɵɵi18nLocalize, setLocaleId as ɵsetLocaleId, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, setClassMetadata as ɵsetClassMetadata, ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, patchComponentDefWithScope as ɵpatchComponentDefWithScope, resetCompiledComponents as ɵresetCompiledComponents, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, transitiveScopesFor as ɵtransitiveScopesFor, compilePipe as ɵcompilePipe, ɵɵsanitizeHtml, ɵɵsanitizeStyle, ɵɵdefaultStyleSanitizer, ɵɵsanitizeScript, ɵɵsanitizeUrl, ɵɵsanitizeResourceUrl, ɵɵsanitizeUrlOrResourceUrl, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, getLContext as ɵgetLContext, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_COMPONENT_DEF as ɵNG_COMPONENT_DEF, NG_DIRECTIVE_DEF as ɵNG_DIRECTIVE_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_MODULE_DEF as ɵNG_MODULE_DEF, NG_BASE_DEF as ɵNG_BASE_DEF, NG_INJECTABLE_DEF as ɵNG_INJECTABLE_DEF, NG_INJECTOR_DEF as ɵNG_INJECTOR_DEF, bindPlayerFactory as ɵbindPlayerFactory, addPlayer as ɵaddPlayer, getPlayers as ɵgetPlayers, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, registerNgModuleType as ɵregisterNgModuleType, publishGlobalUtil as ɵpublishGlobalUtil, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, createInjector as ɵcreateInjector, INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__, registerModuleFactory as ɵregisterModuleFactory, EMPTY_ARRAY$3 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, anchorDef as ɵand, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, directiveDef as ɵdid, elementDef as ɵeld, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, queryDef as ɵqud, textDef as ɵted, unwrapValue as ɵunv, viewDef as ɵvid };
39998
40185
  //# sourceMappingURL=core.js.map