@angular/core 8.1.0-next.3 → 8.1.2

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 (89) hide show
  1. package/bundles/core-testing.umd.js +1 -1
  2. package/bundles/core-testing.umd.min.js +1 -1
  3. package/bundles/core-testing.umd.min.js.map +1 -1
  4. package/bundles/core.umd.js +282 -234
  5. package/bundles/core.umd.js.map +1 -1
  6. package/bundles/core.umd.min.js +61 -61
  7. package/bundles/core.umd.min.js.map +1 -1
  8. package/core.d.ts +218 -233
  9. package/core.metadata.json +1 -1
  10. package/esm2015/index.js +2 -2
  11. package/esm2015/public_api.js +2 -2
  12. package/esm2015/src/change_detection/pipe_transform.js +4 -6
  13. package/esm2015/src/core.js +2 -2
  14. package/esm2015/src/core_render3_private_export.js +2 -2
  15. package/esm2015/src/di/index.js +1 -1
  16. package/esm2015/src/di/injectable.js +1 -1
  17. package/esm2015/src/di/interface/provider.js +1 -1
  18. package/esm2015/src/di/metadata.js +1 -1
  19. package/esm2015/src/event_emitter.js +3 -10
  20. package/esm2015/src/linker/component_factory.js +9 -3
  21. package/esm2015/src/linker/component_factory_resolver.js +9 -2
  22. package/esm2015/src/metadata/di.js +1 -1
  23. package/esm2015/src/metadata/directives.js +4 -3
  24. package/esm2015/src/reflection/reflection_capabilities.js +2 -2
  25. package/esm2015/src/render3/component.js +6 -2
  26. package/esm2015/src/render3/component_ref.js +6 -2
  27. package/esm2015/src/render3/i18n.js +15 -10
  28. package/esm2015/src/render3/index.js +2 -2
  29. package/esm2015/src/render3/instructions/all.js +2 -2
  30. package/esm2015/src/render3/instructions/attribute.js +5 -4
  31. package/esm2015/src/render3/instructions/embedded_view.js +5 -2
  32. package/esm2015/src/render3/instructions/property.js +9 -8
  33. package/esm2015/src/render3/instructions/shared.js +18 -5
  34. package/esm2015/src/render3/instructions/text.js +3 -3
  35. package/esm2015/src/render3/interfaces/container.js +6 -2
  36. package/esm2015/src/render3/interfaces/i18n.js +1 -17
  37. package/esm2015/src/render3/interfaces/node.js +2 -2
  38. package/esm2015/src/render3/interfaces/view.js +2 -2
  39. package/esm2015/src/render3/jit/environment.js +1 -2
  40. package/esm2015/src/render3/node_manipulation.js +212 -191
  41. package/esm2015/src/render3/state.js +6 -3
  42. package/esm2015/src/render3/util/view_traversal_utils.js +7 -2
  43. package/esm2015/src/render3/view_engine_compatibility.js +39 -12
  44. package/esm2015/src/util/assert.js +3 -2
  45. package/esm2015/src/util/decorators.js +1 -1
  46. package/esm2015/src/version.js +1 -1
  47. package/esm5/src/change_detection/pipe_transform.js +1 -1
  48. package/esm5/src/core_render3_private_export.js +2 -2
  49. package/esm5/src/di/index.js +1 -1
  50. package/esm5/src/di/injectable.js +1 -1
  51. package/esm5/src/di/interface/provider.js +1 -1
  52. package/esm5/src/di/metadata.js +1 -1
  53. package/esm5/src/event_emitter.js +3 -10
  54. package/esm5/src/linker/component_factory.js +7 -1
  55. package/esm5/src/linker/component_factory_resolver.js +7 -1
  56. package/esm5/src/metadata/di.js +1 -1
  57. package/esm5/src/metadata/directives.js +4 -3
  58. package/esm5/src/reflection/reflection_capabilities.js +2 -2
  59. package/esm5/src/render3/component.js +5 -2
  60. package/esm5/src/render3/component_ref.js +5 -2
  61. package/esm5/src/render3/i18n.js +11 -7
  62. package/esm5/src/render3/index.js +2 -2
  63. package/esm5/src/render3/instructions/attribute.js +5 -4
  64. package/esm5/src/render3/instructions/embedded_view.js +5 -2
  65. package/esm5/src/render3/instructions/property.js +7 -7
  66. package/esm5/src/render3/instructions/shared.js +15 -5
  67. package/esm5/src/render3/instructions/text.js +3 -3
  68. package/esm5/src/render3/interfaces/container.js +3 -2
  69. package/esm5/src/render3/interfaces/i18n.js +1 -1
  70. package/esm5/src/render3/interfaces/node.js +1 -1
  71. package/esm5/src/render3/interfaces/view.js +1 -1
  72. package/esm5/src/render3/jit/environment.js +1 -2
  73. package/esm5/src/render3/node_manipulation.js +179 -187
  74. package/esm5/src/render3/state.js +6 -3
  75. package/esm5/src/render3/util/view_traversal_utils.js +7 -2
  76. package/esm5/src/render3/view_engine_compatibility.js +32 -12
  77. package/esm5/src/util/assert.js +3 -2
  78. package/esm5/src/util/decorators.js +1 -1
  79. package/esm5/src/version.js +1 -1
  80. package/fesm2015/core.js +335 -242
  81. package/fesm2015/core.js.map +1 -1
  82. package/fesm2015/testing.js +1 -1
  83. package/fesm5/core.js +283 -234
  84. package/fesm5/core.js.map +1 -1
  85. package/fesm5/testing.js +1 -1
  86. package/package.json +1 -1
  87. package/src/r3_symbols.d.ts +73 -90
  88. package/testing/testing.d.ts +1 -1
  89. package/testing.d.ts +1 -1
package/fesm5/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.1.0-next.3
2
+ * @license Angular v8.1.2
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -862,7 +862,7 @@ var ReflectionCapabilities = /** @class */ (function () {
862
862
  if (typeof paramTypes === 'undefined') {
863
863
  result[i] = [];
864
864
  }
865
- else if (paramTypes[i] != Object) {
865
+ else if (paramTypes[i] && paramTypes[i] != Object) {
866
866
  result[i] = [paramTypes[i]];
867
867
  }
868
868
  else {
@@ -3940,7 +3940,7 @@ function throwError(msg) {
3940
3940
  function assertDomNode(node) {
3941
3941
  // If we're in a worker, `Node` will not be defined.
3942
3942
  assertEqual((typeof Node !== 'undefined' && node instanceof Node) ||
3943
- (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'), true, 'The provided value must be an instance of a DOM Node');
3943
+ (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'), true, "The provided value must be an instance of a DOM Node but got " + stringify(node));
3944
3944
  }
3945
3945
  function assertDataInRange(arr, index) {
3946
3946
  var maxLen = arr ? arr.length : 0;
@@ -3969,13 +3969,14 @@ var ACTIVE_INDEX = 2;
3969
3969
  // PARENT, NEXT, QUERIES and T_HOST are indices 3, 4, 5 and 6.
3970
3970
  // As we already have these constants in LView, we don't need to re-create them.
3971
3971
  var NATIVE = 7;
3972
+ var VIEW_REFS = 8;
3972
3973
  /**
3973
3974
  * Size of LContainer's header. Represents the index after which all views in the
3974
3975
  * container will be inserted. We need to keep a record of current views so we know
3975
3976
  * which views are already in the DOM (and don't need to be re-added) and so we can
3976
3977
  * remove views from the DOM when they are no longer required.
3977
3978
  */
3978
- var CONTAINER_HEADER_OFFSET = 8;
3979
+ var CONTAINER_HEADER_OFFSET = 9;
3979
3980
 
3980
3981
  /**
3981
3982
  * @license
@@ -4828,8 +4829,11 @@ function resetComponentState() {
4828
4829
  * the direction of traversal (up or down the view tree) a bit clearer.
4829
4830
  *
4830
4831
  * @param newView New state to become active
4832
+ * @param safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.
4833
+ * This is not always the case (for example, the application may have crashed and `leaveView` is
4834
+ * being executed while unwinding the call stack).
4831
4835
  */
4832
- function leaveView(newView) {
4836
+ function leaveView(newView, safeToRunHooks) {
4833
4837
  var tView = lView[TVIEW];
4834
4838
  if (isCreationMode(lView)) {
4835
4839
  lView[FLAGS] &= ~4 /* CreationMode */;
@@ -4837,7 +4841,7 @@ function leaveView(newView) {
4837
4841
  else {
4838
4842
  try {
4839
4843
  resetPreOrderHookFlags(lView);
4840
- executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode, 2 /* AfterViewInitHooksToBeRun */, undefined);
4844
+ safeToRunHooks && executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode, 2 /* AfterViewInitHooksToBeRun */, undefined);
4841
4845
  }
4842
4846
  finally {
4843
4847
  // Views are clean and in update mode after being checked, so these bits are cleared
@@ -6724,7 +6728,12 @@ function getRootView(componentOrLView) {
6724
6728
  return lView;
6725
6729
  }
6726
6730
  /**
6727
- * Given a current view, finds the nearest component's host (LElement).
6731
+ * Given an `LView`, find the closest declaration view which is not an embedded view.
6732
+ *
6733
+ * This method searches for the `LView` associated with the component which declared the `LView`.
6734
+ *
6735
+ * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise
6736
+ * it walks the declaration parents until it finds a component view (non-embedded-view.)
6728
6737
  *
6729
6738
  * @param lView LView for which we want a host element node
6730
6739
  * @returns The host node
@@ -11406,6 +11415,8 @@ function renderEmbeddedTemplate(viewToRender, tView, context) {
11406
11415
  tickRootContext(getRootContext(viewToRender));
11407
11416
  }
11408
11417
  else {
11418
+ // Will become true if the `try` block executes with no errors.
11419
+ var safeToRunHooks = false;
11409
11420
  try {
11410
11421
  setPreviousOrParentTNode(null, true);
11411
11422
  oldView = enterView(viewToRender, viewToRender[T_HOST]);
@@ -11417,9 +11428,10 @@ function renderEmbeddedTemplate(viewToRender, tView, context) {
11417
11428
  // matching, etc again and again.
11418
11429
  viewToRender[TVIEW].firstTemplatePass = false;
11419
11430
  refreshDescendantViews(viewToRender);
11431
+ safeToRunHooks = true;
11420
11432
  }
11421
11433
  finally {
11422
- leaveView(oldView);
11434
+ leaveView(oldView, safeToRunHooks);
11423
11435
  setPreviousOrParentTNode(_previousOrParentTNode, _isParent);
11424
11436
  }
11425
11437
  }
@@ -11429,6 +11441,8 @@ function renderComponentOrTemplate(hostView, context, templateFn) {
11429
11441
  var oldView = enterView(hostView, hostView[T_HOST]);
11430
11442
  var normalExecutionPath = !getCheckNoChangesMode();
11431
11443
  var creationModeIsActive = isCreationMode(hostView);
11444
+ // Will become true if the `try` block executes with no errors.
11445
+ var safeToRunHooks = false;
11432
11446
  try {
11433
11447
  if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {
11434
11448
  rendererFactory.begin();
@@ -11443,12 +11457,13 @@ function renderComponentOrTemplate(hostView, context, templateFn) {
11443
11457
  resetPreOrderHookFlags(hostView);
11444
11458
  templateFn && executeTemplate(hostView, templateFn, 2 /* Update */, context);
11445
11459
  refreshDescendantViews(hostView);
11460
+ safeToRunHooks = true;
11446
11461
  }
11447
11462
  finally {
11448
11463
  if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {
11449
11464
  rendererFactory.end();
11450
11465
  }
11451
- leaveView(oldView);
11466
+ leaveView(oldView, safeToRunHooks);
11452
11467
  }
11453
11468
  }
11454
11469
  function executeTemplate(lView, templateFn, rf, context) {
@@ -12323,7 +12338,8 @@ function createLContainer(hostNative, currentView, native, tNode, isForViewConta
12323
12338
  null, // next
12324
12339
  null, // queries
12325
12340
  tNode, // t_host
12326
- native);
12341
+ native, // native,
12342
+ null);
12327
12343
  ngDevMode && attachLContainerDebug(lContainer);
12328
12344
  return lContainer;
12329
12345
  }
@@ -12555,6 +12571,8 @@ function checkView(hostView, component) {
12555
12571
  var oldView = enterView(hostView, hostView[T_HOST]);
12556
12572
  var templateFn = hostTView.template;
12557
12573
  var creationMode = isCreationMode(hostView);
12574
+ // Will become true if the `try` block executes with no errors.
12575
+ var safeToRunHooks = false;
12558
12576
  try {
12559
12577
  resetPreOrderHookFlags(hostView);
12560
12578
  creationMode && executeViewQueryFn(1 /* Create */, hostTView, component);
@@ -12564,9 +12582,10 @@ function checkView(hostView, component) {
12564
12582
  if (!creationMode || hostTView.staticViewQueries) {
12565
12583
  executeViewQueryFn(2 /* Update */, hostTView, component);
12566
12584
  }
12585
+ safeToRunHooks = true;
12567
12586
  }
12568
12587
  finally {
12569
- leaveView(oldView);
12588
+ leaveView(oldView, safeToRunHooks);
12570
12589
  }
12571
12590
  }
12572
12591
  function executeViewQueryFn(flags, tView, component) {
@@ -13016,7 +13035,8 @@ function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {
13016
13035
  function ɵɵproperty(propName, value, sanitizer, nativeOnly) {
13017
13036
  var index = getSelectedIndex();
13018
13037
  ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');
13019
- var bindReconciledValue = ɵɵbind(value);
13038
+ var lView = getLView();
13039
+ var bindReconciledValue = bind(lView, value);
13020
13040
  if (bindReconciledValue !== NO_CHANGE) {
13021
13041
  elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);
13022
13042
  }
@@ -13025,12 +13045,10 @@ function ɵɵproperty(propName, value, sanitizer, nativeOnly) {
13025
13045
  /**
13026
13046
  * Creates a single value binding.
13027
13047
  *
13048
+ * @param lView Current view
13028
13049
  * @param value Value to diff
13029
- *
13030
- * @codeGenApi
13031
13050
  */
13032
- function ɵɵbind(value) {
13033
- var lView = getLView();
13051
+ function bind(lView, value) {
13034
13052
  var bindingIndex = lView[BINDING_INDEX]++;
13035
13053
  storeBindingMetadata(lView);
13036
13054
  return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;
@@ -13060,8 +13078,9 @@ function ɵɵbind(value) {
13060
13078
  */
13061
13079
  function ɵɵupdateSyntheticHostBinding(propName, value, sanitizer, nativeOnly) {
13062
13080
  var index = getSelectedIndex();
13081
+ var lView = getLView();
13063
13082
  // TODO(benlesh): remove bind call here.
13064
- var bound = ɵɵbind(value);
13083
+ var bound = bind(lView, value);
13065
13084
  if (bound !== NO_CHANGE) {
13066
13085
  elementPropertyInternal(index, propName, bound, sanitizer, nativeOnly, loadComponentRenderer);
13067
13086
  }
@@ -13084,10 +13103,11 @@ function ɵɵattribute(name, value, sanitizer, namespace) {
13084
13103
  var index = getSelectedIndex();
13085
13104
  var lView = getLView();
13086
13105
  // TODO(FW-1340): Refactor to remove the use of other instructions here.
13087
- var bound = ɵɵbind(value);
13106
+ var bound = bind(lView, value);
13088
13107
  if (bound !== NO_CHANGE) {
13089
- return elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);
13108
+ elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);
13090
13109
  }
13110
+ return ɵɵattribute;
13091
13111
  }
13092
13112
 
13093
13113
  /**
@@ -13773,193 +13793,52 @@ function getContainerRenderParent(tViewNode, view) {
13773
13793
  var container = getLContainer(tViewNode, view);
13774
13794
  return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;
13775
13795
  }
13776
- /**
13777
- * Stack used to keep track of projection nodes in walkTNodeTree.
13778
- *
13779
- * This is deliberately created outside of walkTNodeTree to avoid allocating
13780
- * a new array each time the function is called. Instead the array will be
13781
- * re-used by each invocation. This works because the function is not reentrant.
13782
- */
13783
- var projectionNodeStack = [];
13784
- /**
13785
- * Walks a tree of TNodes, applying a transformation on the element nodes, either only on the first
13786
- * one found, or on all of them.
13787
- *
13788
- * @param viewToWalk the view to walk
13789
- * @param action identifies the action to be performed on the elements
13790
- * @param renderer the current renderer.
13791
- * @param renderParent Optional the render parent node to be set in all LContainers found,
13792
- * required for action modes Insert and Destroy.
13793
- * @param beforeNode Optional the node before which elements should be added, required for action
13794
- * Insert.
13795
- */
13796
- function walkTNodeTree(viewToWalk, action, renderer, renderParent, beforeNode) {
13797
- var e_1, _a;
13798
- var rootTNode = viewToWalk[TVIEW].node;
13799
- var projectionNodeIndex = -1;
13800
- var currentView = viewToWalk;
13801
- var tNode = rootTNode.child;
13802
- while (tNode) {
13803
- var nextTNode = null;
13804
- if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {
13805
- executeNodeAction(action, renderer, renderParent, getNativeByTNode(tNode, currentView), tNode, beforeNode);
13806
- var nodeOrContainer = currentView[tNode.index];
13807
- if (isLContainer(nodeOrContainer)) {
13808
- // This element has an LContainer, and its comment needs to be handled
13809
- executeNodeAction(action, renderer, renderParent, nodeOrContainer[NATIVE], tNode, beforeNode);
13810
- var firstView = nodeOrContainer[CONTAINER_HEADER_OFFSET];
13811
- if (firstView) {
13812
- currentView = firstView;
13813
- nextTNode = currentView[TVIEW].node;
13814
- // When the walker enters a container, then the beforeNode has to become the local native
13815
- // comment node.
13816
- beforeNode = nodeOrContainer[NATIVE];
13817
- }
13818
- }
13819
- }
13820
- else if (tNode.type === 0 /* Container */) {
13821
- var lContainer = currentView[tNode.index];
13822
- executeNodeAction(action, renderer, renderParent, lContainer[NATIVE], tNode, beforeNode);
13823
- var firstView = lContainer[CONTAINER_HEADER_OFFSET];
13824
- if (firstView) {
13825
- currentView = firstView;
13826
- nextTNode = currentView[TVIEW].node;
13827
- // When the walker enters a container, then the beforeNode has to become the local native
13828
- // comment node.
13829
- beforeNode = lContainer[NATIVE];
13830
- }
13831
- }
13832
- else if (tNode.type === 1 /* Projection */) {
13833
- var componentView = findComponentView(currentView);
13834
- var componentHost = componentView[T_HOST];
13835
- var head = componentHost.projection[tNode.projection];
13836
- if (Array.isArray(head)) {
13837
- try {
13838
- for (var head_1 = __values(head), head_1_1 = head_1.next(); !head_1_1.done; head_1_1 = head_1.next()) {
13839
- var nativeNode = head_1_1.value;
13840
- executeNodeAction(action, renderer, renderParent, nativeNode, tNode, beforeNode);
13841
- }
13842
- }
13843
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
13844
- finally {
13845
- try {
13846
- if (head_1_1 && !head_1_1.done && (_a = head_1.return)) _a.call(head_1);
13847
- }
13848
- finally { if (e_1) throw e_1.error; }
13849
- }
13850
- }
13851
- else {
13852
- // Must store both the TNode and the view because this projection node could be nested
13853
- // deeply inside embedded views, and we need to get back down to this particular nested
13854
- // view.
13855
- projectionNodeStack[++projectionNodeIndex] = tNode;
13856
- projectionNodeStack[++projectionNodeIndex] = currentView;
13857
- if (head) {
13858
- currentView = componentView[PARENT];
13859
- nextTNode = currentView[TVIEW].data[head.index];
13860
- }
13861
- }
13862
- }
13863
- else {
13864
- // Otherwise, this is a View
13865
- nextTNode = tNode.child;
13866
- }
13867
- if (nextTNode === null) {
13868
- // this last node was projected, we need to get back down to its projection node
13869
- if (tNode.projectionNext === null && (tNode.flags & 2 /* isProjected */)) {
13870
- currentView = projectionNodeStack[projectionNodeIndex--];
13871
- tNode = projectionNodeStack[projectionNodeIndex--];
13872
- }
13873
- if (tNode.flags & 2 /* isProjected */) {
13874
- nextTNode = tNode.projectionNext;
13875
- }
13876
- else if (tNode.type === 4 /* ElementContainer */) {
13877
- nextTNode = tNode.child || tNode.next;
13878
- }
13879
- else {
13880
- nextTNode = tNode.next;
13881
- }
13882
- /**
13883
- * Find the next node in the TNode tree, taking into account the place where a node is
13884
- * projected (in the shadow DOM) rather than where it comes from (in the light DOM).
13885
- *
13886
- * If there is no sibling node, then it goes to the next sibling of the parent node...
13887
- * until it reaches rootNode (at which point null is returned).
13888
- */
13889
- while (!nextTNode) {
13890
- // If parent is null, we're crossing the view boundary, so we should get the host TNode.
13891
- tNode = tNode.parent || currentView[T_HOST];
13892
- if (tNode === null || tNode === rootTNode)
13893
- return;
13894
- // When exiting a container, the beforeNode must be restored to the previous value
13895
- if (tNode.type === 0 /* Container */) {
13896
- currentView = getLViewParent(currentView);
13897
- beforeNode = currentView[tNode.index][NATIVE];
13898
- }
13899
- if (tNode.type === 2 /* View */) {
13900
- /**
13901
- * If current lView doesn't have next pointer, we try to find it by going up parents
13902
- * chain until:
13903
- * - we find an lView with a next pointer
13904
- * - or find a tNode with a parent that has a next pointer
13905
- * - or find a lContainer
13906
- * - or reach root TNode (in which case we exit, since we traversed all nodes)
13907
- */
13908
- while (!currentView[NEXT] && currentView[PARENT] &&
13909
- !(tNode.parent && tNode.parent.next)) {
13910
- if (tNode === rootTNode)
13911
- return;
13912
- currentView = currentView[PARENT];
13913
- if (isLContainer(currentView)) {
13914
- tNode = currentView[T_HOST];
13915
- currentView = currentView[PARENT];
13916
- beforeNode = currentView[tNode.index][NATIVE];
13917
- break;
13918
- }
13919
- tNode = currentView[T_HOST];
13920
- }
13921
- if (currentView[NEXT]) {
13922
- currentView = currentView[NEXT];
13923
- nextTNode = currentView[T_HOST];
13924
- }
13925
- else {
13926
- nextTNode = tNode.type === 4 /* ElementContainer */ && tNode.child || tNode.next;
13927
- }
13928
- }
13929
- else {
13930
- nextTNode = tNode.next;
13931
- }
13932
- }
13933
- }
13934
- tNode = nextTNode;
13935
- }
13936
- }
13937
13796
  /**
13938
13797
  * NOTE: for performance reasons, the possible actions are inlined within the function instead of
13939
13798
  * being passed as an argument.
13940
13799
  */
13941
- function executeNodeAction(action, renderer, parent, node, tNode, beforeNode) {
13800
+ function executeActionOnElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {
13801
+ ngDevMode && assertDefined(lNodeToHandle, '\'lNodeToHandle\' is undefined');
13802
+ var lContainer;
13803
+ var isComponent = false;
13804
+ // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is wrapped
13805
+ // in an array which needs to be unwrapped. We need to know if it is a component and if
13806
+ // it has LContainer so that we can process all of those cases appropriately.
13807
+ if (isLContainer(lNodeToHandle)) {
13808
+ lContainer = lNodeToHandle;
13809
+ }
13810
+ else if (isLView(lNodeToHandle)) {
13811
+ isComponent = true;
13812
+ ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');
13813
+ lNodeToHandle = lNodeToHandle[HOST];
13814
+ }
13815
+ var rNode = unwrapRNode(lNodeToHandle);
13816
+ ngDevMode && assertDomNode(rNode);
13942
13817
  if (action === 0 /* Insert */) {
13943
- nativeInsertBefore(renderer, parent, node, beforeNode || null);
13818
+ nativeInsertBefore(renderer, parent, rNode, beforeNode || null);
13944
13819
  }
13945
13820
  else if (action === 1 /* Detach */) {
13946
- nativeRemoveNode(renderer, node, isComponent(tNode));
13821
+ nativeRemoveNode(renderer, rNode, isComponent);
13947
13822
  }
13948
13823
  else if (action === 2 /* Destroy */) {
13949
13824
  ngDevMode && ngDevMode.rendererDestroyNode++;
13950
- renderer.destroyNode(node);
13825
+ renderer.destroyNode(rNode);
13826
+ }
13827
+ if (lContainer != null) {
13828
+ executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);
13951
13829
  }
13952
13830
  }
13953
13831
  function createTextNode(value, renderer) {
13954
13832
  return isProceduralRenderer(renderer) ? renderer.createText(renderStringify(value)) :
13955
13833
  renderer.createTextNode(renderStringify(value));
13956
13834
  }
13957
- function addRemoveViewFromContainer(viewToWalk, insertMode, beforeNode) {
13958
- var renderParent = getContainerRenderParent(viewToWalk[TVIEW].node, viewToWalk);
13959
- ngDevMode && assertNodeType(viewToWalk[TVIEW].node, 2 /* View */);
13835
+ function addRemoveViewFromContainer(lView, insertMode, beforeNode) {
13836
+ var renderParent = getContainerRenderParent(lView[TVIEW].node, lView);
13837
+ ngDevMode && assertNodeType(lView[TVIEW].node, 2 /* View */);
13960
13838
  if (renderParent) {
13961
- var renderer = viewToWalk[RENDERER];
13962
- walkTNodeTree(viewToWalk, insertMode ? 0 /* Insert */ : 1 /* Detach */, renderer, renderParent, beforeNode);
13839
+ var renderer = lView[RENDERER];
13840
+ var action = insertMode ? 0 /* Insert */ : 1 /* Detach */;
13841
+ executeActionOnView(renderer, action, lView, renderParent, beforeNode);
13963
13842
  }
13964
13843
  }
13965
13844
  /**
@@ -13968,7 +13847,7 @@ function addRemoveViewFromContainer(viewToWalk, insertMode, beforeNode) {
13968
13847
  * @param lView the `LView` to be detached.
13969
13848
  */
13970
13849
  function renderDetachView(lView) {
13971
- walkTNodeTree(lView, 1 /* Detach */, lView[RENDERER], null);
13850
+ executeActionOnView(lView[RENDERER], 1 /* Detach */, lView, null, null);
13972
13851
  }
13973
13852
  /**
13974
13853
  * Traverses down and up the tree of views and containers to remove listeners and
@@ -14098,15 +13977,15 @@ function removeView(lContainer, removeIndex) {
14098
13977
  * A standalone function which destroys an LView,
14099
13978
  * conducting cleanup (e.g. removing listeners, calling onDestroys).
14100
13979
  *
14101
- * @param view The view to be destroyed.
13980
+ * @param lView The view to be destroyed.
14102
13981
  */
14103
- function destroyLView(view) {
14104
- if (!(view[FLAGS] & 256 /* Destroyed */)) {
14105
- var renderer = view[RENDERER];
13982
+ function destroyLView(lView) {
13983
+ if (!(lView[FLAGS] & 256 /* Destroyed */)) {
13984
+ var renderer = lView[RENDERER];
14106
13985
  if (isProceduralRenderer(renderer) && renderer.destroyNode) {
14107
- walkTNodeTree(view, 2 /* Destroy */, renderer, null);
13986
+ executeActionOnView(renderer, 2 /* Destroy */, lView, null, null);
14108
13987
  }
14109
- destroyViewTree(view);
13988
+ destroyViewTree(lView);
14110
13989
  }
14111
13990
  }
14112
13991
  /**
@@ -14169,7 +14048,7 @@ function cleanUpView(view) {
14169
14048
  /** Removes listeners and unsubscribes from output subscriptions */
14170
14049
  function removeListeners(lView) {
14171
14050
  var tCleanup = lView[TVIEW].cleanup;
14172
- if (tCleanup != null) {
14051
+ if (tCleanup !== null) {
14173
14052
  var lCleanup = lView[CLEANUP];
14174
14053
  for (var i = 0; i < tCleanup.length - 1; i += 2) {
14175
14054
  if (typeof tCleanup[i] === 'string') {
@@ -14321,7 +14200,7 @@ function nativeAppendChild(renderer, parent, child) {
14321
14200
  }
14322
14201
  }
14323
14202
  function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode) {
14324
- if (beforeNode) {
14203
+ if (beforeNode !== null) {
14325
14204
  nativeInsertBefore(renderer, parent, child, beforeNode);
14326
14205
  }
14327
14206
  else {
@@ -14378,7 +14257,7 @@ function getNativeAnchorNode(parentTNode, lView) {
14378
14257
  * @returns Whether or not the child was appended
14379
14258
  */
14380
14259
  function appendChild(childEl, childTNode, currentView) {
14381
- var e_2, _a;
14260
+ var e_1, _a;
14382
14261
  var renderParent = getRenderParent(childTNode, currentView);
14383
14262
  if (renderParent != null) {
14384
14263
  var renderer = currentView[RENDERER];
@@ -14391,12 +14270,12 @@ function appendChild(childEl, childTNode, currentView) {
14391
14270
  nativeAppendOrInsertBefore(renderer, renderParent, nativeNode, anchorNode);
14392
14271
  }
14393
14272
  }
14394
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
14273
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
14395
14274
  finally {
14396
14275
  try {
14397
14276
  if (childEl_1_1 && !childEl_1_1.done && (_a = childEl_1.return)) _a.call(childEl_1);
14398
14277
  }
14399
- finally { if (e_2) throw e_2.error; }
14278
+ finally { if (e_1) throw e_1.error; }
14400
14279
  }
14401
14280
  }
14402
14281
  else {
@@ -14421,6 +14300,7 @@ function getBeforeNodeForView(viewIndexInContainer, lContainer) {
14421
14300
  var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;
14422
14301
  if (nextViewIndex < lContainer.length) {
14423
14302
  var lView = lContainer[nextViewIndex];
14303
+ ngDevMode && assertDefined(lView[T_HOST], 'Missing Host TNode');
14424
14304
  var tViewNodeChild = lView[T_HOST].child;
14425
14305
  return tViewNodeChild !== null ? getNativeByTNode(tViewNodeChild, lView) : lContainer[NATIVE];
14426
14306
  }
@@ -14446,7 +14326,7 @@ function nativeRemoveNode(renderer, rNode, isHostElement) {
14446
14326
  /**
14447
14327
  * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and
14448
14328
  * stored on a component host level.
14449
- * @param lView A LView where nodes are inserted (target VLview)
14329
+ * @param lView A LView where nodes are inserted (target LView)
14450
14330
  * @param tProjectionNode A projection node where previously re-distribution should be appended
14451
14331
  * (target insertion place)
14452
14332
  * @param selectorIndex A bucket from where nodes to project should be taken
@@ -14532,6 +14412,137 @@ function appendProjectedNode(projectedTNode, tProjectionNode, currentView, proje
14532
14412
  }
14533
14413
  }
14534
14414
  }
14415
+ /**
14416
+ * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,
14417
+ * destroy)
14418
+ *
14419
+ * Inserting a view without projection or containers at top level is simple. Just iterate over the
14420
+ * root nodes of the View, and for each node perform the `action`.
14421
+ *
14422
+ * Things get more complicated with containers and projections. That is because coming across:
14423
+ * - Container: implies that we have to insert/remove/destroy the views of that container as well
14424
+ * which in turn can have their own Containers at the View roots.
14425
+ * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The
14426
+ * complication is that the nodes we are projecting can themselves have Containers
14427
+ * or other Projections.
14428
+ *
14429
+ * As you can see this is a very recursive problem. While the recursive implementation is not the
14430
+ * most efficient one, trying to unroll the nodes non-recursively results in very complex code that
14431
+ * is very hard (to maintain). We are sacrificing a bit of performance for readability using a
14432
+ * recursive implementation.
14433
+ *
14434
+ * @param renderer Renderer to use
14435
+ * @param action action to perform (insert, detach, destroy)
14436
+ * @param lView The LView which needs to be inserted, detached, destroyed.
14437
+ * @param renderParent parent DOM element for insertion/removal.
14438
+ * @param beforeNode Before which node the insertions should happen.
14439
+ */
14440
+ function executeActionOnView(renderer, action, lView, renderParent, beforeNode) {
14441
+ var tView = lView[TVIEW];
14442
+ ngDevMode && assertNodeType(tView.node, 2 /* View */);
14443
+ var viewRootTNode = tView.node.child;
14444
+ while (viewRootTNode !== null) {
14445
+ executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);
14446
+ viewRootTNode = viewRootTNode.next;
14447
+ }
14448
+ }
14449
+ /**
14450
+ * `executeActionOnProjection` performs an operation on the projection specified by `action`
14451
+ * (insert, detach, destroy).
14452
+ *
14453
+ * Inserting a projection requires us to locate the projected nodes from the parent component. The
14454
+ * complication is that those nodes themselves could be re-projected from their parent component.
14455
+ *
14456
+ * @param renderer Renderer to use
14457
+ * @param action action to perform (insert, detach, destroy)
14458
+ * @param lView The LView which needs to be inserted, detached, destroyed.
14459
+ * @param renderParent parent DOM element for insertion/removal.
14460
+ * @param beforeNode Before which node the insertions should happen.
14461
+ */
14462
+ function executeActionOnProjection(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {
14463
+ var componentLView = findComponentView(lView);
14464
+ var componentNode = componentLView[T_HOST];
14465
+ var nodeToProject = componentNode.projection[tProjectionNode.projection];
14466
+ if (Array.isArray(nodeToProject)) {
14467
+ for (var i = 0; i < nodeToProject.length; i++) {
14468
+ var rNode = nodeToProject[i];
14469
+ ngDevMode && assertDomNode(rNode);
14470
+ executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);
14471
+ }
14472
+ }
14473
+ else {
14474
+ var projectionTNode = nodeToProject;
14475
+ var projectedComponentLView = componentLView[PARENT];
14476
+ while (projectionTNode !== null) {
14477
+ executeActionOnNode(renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);
14478
+ projectionTNode = projectionTNode.projectionNext;
14479
+ }
14480
+ }
14481
+ }
14482
+ /**
14483
+ * `executeActionOnContainer` performs an operation on the container and its views as specified by
14484
+ * `action` (insert, detach, destroy)
14485
+ *
14486
+ * Inserting a Container is complicated by the fact that the container may have Views which
14487
+ * themselves have containers or projections.
14488
+ *
14489
+ * @param renderer Renderer to use
14490
+ * @param action action to perform (insert, detach, destroy)
14491
+ * @param lContainer The LContainer which needs to be inserted, detached, destroyed.
14492
+ * @param renderParent parent DOM element for insertion/removal.
14493
+ * @param beforeNode Before which node the insertions should happen.
14494
+ */
14495
+ function executeActionOnContainer(renderer, action, lContainer, renderParent, beforeNode) {
14496
+ ngDevMode && assertLContainer(lContainer);
14497
+ var anchor = lContainer[NATIVE]; // LContainer has its own before node.
14498
+ var native = unwrapRNode(lContainer);
14499
+ // An LContainer can be created dynamically on any node by injecting ViewContainerRef.
14500
+ // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node
14501
+ // (comment in the DOM) that will be different from the LContainer's host node. In this particular
14502
+ // case we need to execute action on 2 nodes:
14503
+ // - container's host node (this is done in the executeNodeAction)
14504
+ // - container's host node (this is done here)
14505
+ if (anchor !== native) {
14506
+ executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);
14507
+ }
14508
+ for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
14509
+ var lView = lContainer[i];
14510
+ executeActionOnView(renderer, action, lView, renderParent, anchor);
14511
+ }
14512
+ }
14513
+ /**
14514
+ * `executeActionOnElementContainer` performs an operation on the ng-container node and its child
14515
+ * nodes as specified by the `action` (insert, detach, destroy).
14516
+ *
14517
+ * @param renderer Renderer to use
14518
+ * @param action action to perform (insert, detach, destroy)
14519
+ * @param lView The LView which needs to be inserted, detached, destroyed.
14520
+ * @param tElementContainerNode The TNode associated with the ElementContainer.
14521
+ * @param renderParent parent DOM element for insertion/removal.
14522
+ * @param beforeNode Before which node the insertions should happen.
14523
+ */
14524
+ function executeActionOnElementContainer(renderer, action, lView, tElementContainerNode, renderParent, beforeNode) {
14525
+ var node = lView[tElementContainerNode.index];
14526
+ executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);
14527
+ var childTNode = tElementContainerNode.child;
14528
+ while (childTNode) {
14529
+ executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);
14530
+ childTNode = childTNode.next;
14531
+ }
14532
+ }
14533
+ function executeActionOnNode(renderer, action, lView, tNode, renderParent, beforeNode) {
14534
+ var elementContainerRootTNodeType = tNode.type;
14535
+ if (elementContainerRootTNodeType === 4 /* ElementContainer */) {
14536
+ executeActionOnElementContainer(renderer, action, lView, tNode, renderParent, beforeNode);
14537
+ }
14538
+ else if (elementContainerRootTNodeType === 1 /* Projection */) {
14539
+ executeActionOnProjection(renderer, action, lView, tNode, renderParent, beforeNode);
14540
+ }
14541
+ else {
14542
+ ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */);
14543
+ executeActionOnElementOrContainer(action, renderer, renderParent, lView[tNode.index], beforeNode);
14544
+ }
14545
+ }
14535
14546
 
14536
14547
  /**
14537
14548
  * @license
@@ -15755,7 +15766,10 @@ function ɵɵembeddedViewEnd() {
15755
15766
  refreshDescendantViews(lView); // update mode pass
15756
15767
  var lContainer = lView[PARENT];
15757
15768
  ngDevMode && assertLContainerOrUndefined(lContainer);
15758
- leaveView(lContainer[PARENT]);
15769
+ // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block
15770
+ // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to
15771
+ // an error being thrown.
15772
+ leaveView(lContainer[PARENT], /* safeToRunHooks */ true);
15759
15773
  setPreviousOrParentTNode(viewHost, false);
15760
15774
  }
15761
15775
 
@@ -16625,7 +16639,7 @@ function ɵɵtext(index, value) {
16625
16639
  function ɵɵtextBinding(value) {
16626
16640
  var lView = getLView();
16627
16641
  var index = getSelectedIndex();
16628
- var bound = ɵɵbind(value);
16642
+ var bound = bind(lView, value);
16629
16643
  if (bound !== NO_CHANGE) {
16630
16644
  textBindingInternal(lView, index, renderStringify(bound));
16631
16645
  }
@@ -17370,6 +17384,8 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
17370
17384
  var rootView = createLView(null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null, rendererFactory, renderer, undefined, opts.injector || null);
17371
17385
  var oldView = enterView(rootView, null);
17372
17386
  var component;
17387
+ // Will become true if the `try` block executes with no errors.
17388
+ var safeToRunHooks = false;
17373
17389
  try {
17374
17390
  if (rendererFactory.begin)
17375
17391
  rendererFactory.begin();
@@ -17380,9 +17396,10 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
17380
17396
  rootView[FLAGS] &= ~4 /* CreationMode */;
17381
17397
  resetPreOrderHookFlags(rootView);
17382
17398
  refreshDescendantViews(rootView); // update mode pass
17399
+ safeToRunHooks = true;
17383
17400
  }
17384
17401
  finally {
17385
- leaveView(oldView);
17402
+ leaveView(oldView, safeToRunHooks);
17386
17403
  if (rendererFactory.end)
17387
17404
  rendererFactory.end();
17388
17405
  }
@@ -18071,6 +18088,12 @@ var ComponentRef = /** @class */ (function () {
18071
18088
  return ComponentRef;
18072
18089
  }());
18073
18090
  /**
18091
+ * Base class for a factory that can create a component dynamically.
18092
+ * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
18093
+ * Use the resulting `ComponentFactory.create()` method to create a component of that type.
18094
+ *
18095
+ * @see [Dynamic Components](guide/dynamic-component-loader)
18096
+ *
18074
18097
  * @publicApi
18075
18098
  */
18076
18099
  var ComponentFactory = /** @class */ (function () {
@@ -18101,6 +18124,12 @@ var _NullComponentFactoryResolver = /** @class */ (function () {
18101
18124
  return _NullComponentFactoryResolver;
18102
18125
  }());
18103
18126
  /**
18127
+ * A simple registry that maps `Components` to generated `ComponentFactory` classes
18128
+ * that can be used to create instances of components.
18129
+ * Use to obtain the factory for a given component type,
18130
+ * then use the factory's `create()` method to create a component of that type.
18131
+ *
18132
+ * @see [Dynamic Components](guide/dynamic-component-loader)
18104
18133
  * @publicApi
18105
18134
  */
18106
18135
  var ComponentFactoryResolver = /** @class */ (function () {
@@ -18598,7 +18627,6 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18598
18627
  _this._lContainer = _lContainer;
18599
18628
  _this._hostTNode = _hostTNode;
18600
18629
  _this._hostView = _hostView;
18601
- _this._viewRefs = [];
18602
18630
  return _this;
18603
18631
  }
18604
18632
  Object.defineProperty(ViewContainerRef_.prototype, "element", {
@@ -18631,7 +18659,9 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18631
18659
  this.remove(0);
18632
18660
  }
18633
18661
  };
18634
- ViewContainerRef_.prototype.get = function (index) { return this._viewRefs[index] || null; };
18662
+ ViewContainerRef_.prototype.get = function (index) {
18663
+ return this._lContainer[VIEW_REFS] !== null && this._lContainer[VIEW_REFS][index] || null;
18664
+ };
18635
18665
  Object.defineProperty(ViewContainerRef_.prototype, "length", {
18636
18666
  get: function () {
18637
18667
  // Note that if there are no views, the container
@@ -18643,11 +18673,12 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18643
18673
  configurable: true
18644
18674
  });
18645
18675
  ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {
18676
+ this.allocateContainerIfNeeded();
18646
18677
  var adjustedIdx = this._adjustIndex(index);
18647
18678
  var viewRef = templateRef
18648
18679
  .createEmbeddedView(context || {}, this._lContainer, adjustedIdx);
18649
18680
  viewRef.attachToViewContainerRef(this);
18650
- this._viewRefs.splice(adjustedIdx, 0, viewRef);
18681
+ this._lContainer[VIEW_REFS].splice(adjustedIdx, 0, viewRef);
18651
18682
  return viewRef;
18652
18683
  };
18653
18684
  ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {
@@ -18663,6 +18694,7 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18663
18694
  if (viewRef.destroyed) {
18664
18695
  throw new Error('Cannot insert a destroyed View in a ViewContainer!');
18665
18696
  }
18697
+ this.allocateContainerIfNeeded();
18666
18698
  var lView = viewRef._lView;
18667
18699
  var adjustedIdx = this._adjustIndex(index);
18668
18700
  if (viewAttachedToContainer(lView)) {
@@ -18674,7 +18706,7 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18674
18706
  var beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);
18675
18707
  addRemoveViewFromContainer(lView, true, beforeNode);
18676
18708
  viewRef.attachToViewContainerRef(this);
18677
- this._viewRefs.splice(adjustedIdx, 0, viewRef);
18709
+ this._lContainer[VIEW_REFS].splice(adjustedIdx, 0, viewRef);
18678
18710
  return viewRef;
18679
18711
  };
18680
18712
  ViewContainerRef_.prototype.move = function (viewRef, newIndex) {
@@ -18687,16 +18719,22 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18687
18719
  this.insert(viewRef, newIndex);
18688
18720
  return viewRef;
18689
18721
  };
18690
- ViewContainerRef_.prototype.indexOf = function (viewRef) { return this._viewRefs.indexOf(viewRef); };
18722
+ ViewContainerRef_.prototype.indexOf = function (viewRef) {
18723
+ return this._lContainer[VIEW_REFS] !== null ?
18724
+ this._lContainer[VIEW_REFS].indexOf(viewRef) :
18725
+ 0;
18726
+ };
18691
18727
  ViewContainerRef_.prototype.remove = function (index) {
18728
+ this.allocateContainerIfNeeded();
18692
18729
  var adjustedIdx = this._adjustIndex(index, -1);
18693
18730
  removeView(this._lContainer, adjustedIdx);
18694
- this._viewRefs.splice(adjustedIdx, 1);
18731
+ this._lContainer[VIEW_REFS].splice(adjustedIdx, 1);
18695
18732
  };
18696
18733
  ViewContainerRef_.prototype.detach = function (index) {
18734
+ this.allocateContainerIfNeeded();
18697
18735
  var adjustedIdx = this._adjustIndex(index, -1);
18698
18736
  var view = detachView(this._lContainer, adjustedIdx);
18699
- var wasDetached = view && this._viewRefs.splice(adjustedIdx, 1)[0] != null;
18737
+ var wasDetached = view && this._lContainer[VIEW_REFS].splice(adjustedIdx, 1)[0] != null;
18700
18738
  return wasDetached ? new ViewRef(view, view[CONTEXT], -1) : null;
18701
18739
  };
18702
18740
  ViewContainerRef_.prototype._adjustIndex = function (index, shift) {
@@ -18711,6 +18749,11 @@ function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, h
18711
18749
  }
18712
18750
  return index;
18713
18751
  };
18752
+ ViewContainerRef_.prototype.allocateContainerIfNeeded = function () {
18753
+ if (this._lContainer[VIEW_REFS] === null) {
18754
+ this._lContainer[VIEW_REFS] = [];
18755
+ }
18756
+ };
18714
18757
  return ViewContainerRef_;
18715
18758
  }(ViewContainerRefToken));
18716
18759
  }
@@ -18777,6 +18820,7 @@ function createViewRef(hostTNode, hostView, context) {
18777
18820
  }
18778
18821
  return null;
18779
18822
  }
18823
+ /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */
18780
18824
  function getOrCreateRenderer2(view) {
18781
18825
  var renderer = view[RENDERER];
18782
18826
  if (isProceduralRenderer(renderer)) {
@@ -18786,9 +18830,14 @@ function getOrCreateRenderer2(view) {
18786
18830
  throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');
18787
18831
  }
18788
18832
  }
18789
- /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */
18833
+ /** Injects a Renderer2 for the current component. */
18790
18834
  function injectRenderer2() {
18791
- return getOrCreateRenderer2(getLView());
18835
+ // We need the Renderer to be based on the component that it's being injected into, however since
18836
+ // DI happens before we've entered its view, `getLView` will return the parent view instead.
18837
+ var lView = getLView();
18838
+ var tNode = getPreviousOrParentTNode();
18839
+ var nodeAtIndex = getComponentViewByIndex(tNode.index, lView);
18840
+ return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);
18792
18841
  }
18793
18842
 
18794
18843
  /**
@@ -18981,7 +19030,7 @@ var Version = /** @class */ (function () {
18981
19030
  /**
18982
19031
  * @publicApi
18983
19032
  */
18984
- var VERSION = new Version('8.1.0-next.3');
19033
+ var VERSION = new Version('8.1.2');
18985
19034
 
18986
19035
  /**
18987
19036
  * @license
@@ -22181,6 +22230,8 @@ var ComponentFactory$1 = /** @class */ (function (_super) {
22181
22230
  var oldLView = enterView(rootLView, null);
22182
22231
  var component;
22183
22232
  var tElementNode;
22233
+ // Will become true if the `try` block executes with no errors.
22234
+ var safeToRunHooks = false;
22184
22235
  try {
22185
22236
  var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, renderer);
22186
22237
  tElementNode = getTNode(0, rootLView);
@@ -22197,9 +22248,10 @@ var ComponentFactory$1 = /** @class */ (function (_super) {
22197
22248
  component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);
22198
22249
  addToViewTree(rootLView, componentView);
22199
22250
  refreshDescendantViews(rootLView);
22251
+ safeToRunHooks = true;
22200
22252
  }
22201
22253
  finally {
22202
- leaveView(oldLView);
22254
+ leaveView(oldLView, safeToRunHooks);
22203
22255
  }
22204
22256
  var componentRef = new ComponentRef$1(this.componentType, component, createElementRef(ElementRef, tElementNode, rootLView), rootLView, tElementNode);
22205
22257
  if (isInternalRootView) {
@@ -23316,15 +23368,19 @@ var shiftsCounter = 0;
23316
23368
  * update the translated nodes.
23317
23369
  *
23318
23370
  * @param value The binding's value
23371
+ * @returns This function returns itself so that it may be chained
23372
+ * (e.g. `i18nExp(ctx.name)(ctx.title)`)
23319
23373
  *
23320
23374
  * @codeGenApi
23321
23375
  */
23322
23376
  function ɵɵi18nExp(value) {
23323
- var expression = ɵɵbind(value);
23377
+ var lView = getLView();
23378
+ var expression = bind(lView, value);
23324
23379
  if (expression !== NO_CHANGE) {
23325
23380
  changeMask = changeMask | (1 << shiftsCounter);
23326
23381
  }
23327
23382
  shiftsCounter++;
23383
+ return ɵɵi18nExp;
23328
23384
  }
23329
23385
  /**
23330
23386
  * Updates a translation block or an i18n attribute when the bindings have changed.
@@ -23583,13 +23639,13 @@ var LOCALIZE_PH_REGEXP = /\{\$(.*?)\}/g;
23583
23639
  * @deprecated this method is temporary & should not be used as it will be removed soon
23584
23640
  */
23585
23641
  function ɵɵi18nLocalize(input, placeholders) {
23586
- if (placeholders === void 0) { placeholders = {}; }
23587
23642
  if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string
23588
23643
  input = TRANSLATIONS[input];
23589
23644
  }
23590
- return Object.keys(placeholders).length ?
23591
- input.replace(LOCALIZE_PH_REGEXP, function (match, key) { return placeholders[key] || ''; }) :
23592
- input;
23645
+ if (placeholders !== undefined && Object.keys(placeholders).length) {
23646
+ return input.replace(LOCALIZE_PH_REGEXP, function (_, key) { return placeholders[key] || ''; });
23647
+ }
23648
+ return input;
23593
23649
  }
23594
23650
  /**
23595
23651
  * The locale id that the application is currently using (for translations and ICU expressions).
@@ -24284,7 +24340,7 @@ function unwrapValue$1(newValue) {
24284
24340
  * that create event emitters. When the title is clicked, the emitter
24285
24341
  * emits an open or close event to toggle the current visibility state.
24286
24342
  *
24287
- * ```
24343
+ * ```html
24288
24344
  * @Component({
24289
24345
  * selector: 'zippy',
24290
24346
  * template: `
@@ -24313,17 +24369,10 @@ function unwrapValue$1(newValue) {
24313
24369
  * Access the event object with the `$event` argument passed to the output event
24314
24370
  * handler:
24315
24371
  *
24316
- * ```
24372
+ * ```html
24317
24373
  * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
24318
24374
  * ```
24319
24375
  *
24320
- * ### Notes
24321
- *
24322
- * Uses Rx.Observable but provides an adapter to make it work as specified here:
24323
- * https://github.com/jhusain/observable-spec
24324
- *
24325
- * Once a reference implementation of the spec is available, switch to it.
24326
- *
24327
24376
  * @publicApi
24328
24377
  */
24329
24378
  var EventEmitter = /** @class */ (function (_super) {
@@ -25017,7 +25066,6 @@ var ɵ0$9 = function () { return ({
25017
25066
  'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
25018
25067
  'ɵɵProvidersFeature': ɵɵProvidersFeature,
25019
25068
  'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
25020
- 'ɵɵbind': ɵɵbind,
25021
25069
  'ɵɵcontainer': ɵɵcontainer,
25022
25070
  'ɵɵnextContext': ɵɵnextContext,
25023
25071
  'ɵɵcontainerRefreshStart': ɵɵcontainerRefreshStart,
@@ -25888,9 +25936,10 @@ var ɵ8 = function (hostPropertyName) { return ({ hostPropertyName: hostProperty
25888
25936
  var HostBinding = makePropDecorator('HostBinding', ɵ8);
25889
25937
  var ɵ9 = function (eventName, args) { return ({ eventName: eventName, args: args }); };
25890
25938
  /**
25891
- * Binds a CSS event to a host listener and supplies configuration metadata.
25939
+ * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
25892
25940
  * Angular invokes the supplied handler method when the host element emits the specified event,
25893
25941
  * and updates the bound element with the result.
25942
+ *
25894
25943
  * If the handler method returns false, applies `preventDefault` on the bound element.
25895
25944
  *
25896
25945
  * @usageNotes
@@ -25898,7 +25947,7 @@ var ɵ9 = function (eventName, args) { return ({ eventName: eventName, args: arg
25898
25947
  * The following example declares a directive
25899
25948
  * that attaches a click listener to a button and counts clicks.
25900
25949
  *
25901
- * ```
25950
+ * ```ts
25902
25951
  * @Directive({selector: 'button[counting]'})
25903
25952
  * class CountClicks {
25904
25953
  * numberOfClicks = 0;
@@ -31060,5 +31109,5 @@ var NgModuleFactory_ = /** @class */ (function (_super) {
31060
31109
  * Generated bundle index. Do not edit.
31061
31110
  */
31062
31111
 
31063
- 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, ɵ0, ɵ1, 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 };
31112
+ 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, ɵ0, ɵ1, 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 };
31064
31113
  //# sourceMappingURL=core.js.map