@angular/compiler 14.0.0-next.13 → 14.0.0-next.16

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 (148) hide show
  1. package/esm2020/src/compiler.mjs +3 -2
  2. package/esm2020/src/compiler_facade_interface.mjs +7 -1
  3. package/esm2020/src/core.mjs +6 -6
  4. package/esm2020/src/expression_parser/parser.mjs +12 -12
  5. package/esm2020/src/i18n/i18n_parser.mjs +3 -3
  6. package/esm2020/src/jit_compiler_facade.mjs +74 -42
  7. package/esm2020/src/ml_parser/html_whitespaces.mjs +2 -2
  8. package/esm2020/src/ml_parser/lexer.mjs +36 -36
  9. package/esm2020/src/ml_parser/parser.mjs +41 -41
  10. package/esm2020/src/render3/partial/api.mjs +1 -1
  11. package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
  12. package/esm2020/src/render3/partial/component.mjs +28 -37
  13. package/esm2020/src/render3/partial/directive.mjs +6 -3
  14. package/esm2020/src/render3/partial/factory.mjs +1 -1
  15. package/esm2020/src/render3/partial/injectable.mjs +1 -1
  16. package/esm2020/src/render3/partial/injector.mjs +1 -1
  17. package/esm2020/src/render3/partial/ng_module.mjs +3 -3
  18. package/esm2020/src/render3/partial/pipe.mjs +6 -3
  19. package/esm2020/src/render3/r3_ast.mjs +3 -3
  20. package/esm2020/src/render3/r3_factory.mjs +6 -6
  21. package/esm2020/src/render3/r3_identifiers.mjs +2 -1
  22. package/esm2020/src/render3/r3_pipe_compiler.mjs +2 -1
  23. package/esm2020/src/render3/util.mjs +4 -4
  24. package/esm2020/src/render3/view/api.mjs +7 -2
  25. package/esm2020/src/render3/view/compiler.mjs +42 -35
  26. package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +58 -5
  27. package/esm2020/src/render3/view/i18n/meta.mjs +4 -4
  28. package/esm2020/src/render3/view/i18n/util.mjs +2 -2
  29. package/esm2020/src/render3/view/style_parser.mjs +19 -19
  30. package/esm2020/src/render3/view/styling_builder.mjs +6 -6
  31. package/esm2020/src/render3/view/template.mjs +25 -25
  32. package/esm2020/src/render3/view/util.mjs +4 -4
  33. package/esm2020/src/selector.mjs +8 -8
  34. package/esm2020/src/template_parser/binding_parser.mjs +8 -8
  35. package/esm2020/src/util.mjs +8 -8
  36. package/esm2020/src/version.mjs +1 -1
  37. package/fesm2015/compiler.mjs +400 -300
  38. package/fesm2015/compiler.mjs.map +1 -1
  39. package/fesm2015/testing.mjs +1 -1
  40. package/fesm2020/compiler.mjs +408 -313
  41. package/fesm2020/compiler.mjs.map +1 -1
  42. package/fesm2020/testing.mjs +1 -1
  43. package/index.d.ts +4964 -5
  44. package/package.json +3 -3
  45. package/testing/index.d.ts +22 -5
  46. package/compiler.d.ts +0 -8
  47. package/public_api.d.ts +0 -13
  48. package/src/assertions.d.ts +0 -8
  49. package/src/chars.d.ts +0 -75
  50. package/src/compiler.d.ts +0 -77
  51. package/src/compiler_facade_interface.d.ts +0 -284
  52. package/src/compiler_util/expression_converter.d.ts +0 -71
  53. package/src/config.d.ts +0 -25
  54. package/src/constant_pool.d.ts +0 -37
  55. package/src/core.d.ts +0 -216
  56. package/src/expression_parser/ast.d.ts +0 -440
  57. package/src/expression_parser/lexer.d.ts +0 -47
  58. package/src/expression_parser/parser.d.ts +0 -315
  59. package/src/i18n/big_integer.d.ts +0 -108
  60. package/src/i18n/digest.d.ts +0 -44
  61. package/src/i18n/extractor_merger.d.ts +0 -27
  62. package/src/i18n/i18n_ast.d.ts +0 -148
  63. package/src/i18n/i18n_html_parser.d.ts +0 -19
  64. package/src/i18n/i18n_parser.d.ts +0 -18
  65. package/src/i18n/index.d.ts +0 -15
  66. package/src/i18n/message_bundle.d.ts +0 -28
  67. package/src/i18n/parse_util.d.ts +0 -14
  68. package/src/i18n/serializers/placeholder.d.ts +0 -25
  69. package/src/i18n/serializers/serializer.d.ts +0 -46
  70. package/src/i18n/serializers/xliff.d.ts +0 -19
  71. package/src/i18n/serializers/xliff2.d.ts +0 -19
  72. package/src/i18n/serializers/xmb.d.ts +0 -22
  73. package/src/i18n/serializers/xml_helper.d.ts +0 -52
  74. package/src/i18n/serializers/xtb.d.ts +0 -20
  75. package/src/i18n/translation_bundle.d.ts +0 -27
  76. package/src/injectable_compiler_2.d.ts +0 -24
  77. package/src/jit_compiler_facade.d.ts +0 -46
  78. package/src/ml_parser/ast.d.ts +0 -89
  79. package/src/ml_parser/entities.d.ts +0 -9
  80. package/src/ml_parser/html_parser.d.ts +0 -13
  81. package/src/ml_parser/html_tags.d.ts +0 -33
  82. package/src/ml_parser/html_whitespaces.d.ts +0 -45
  83. package/src/ml_parser/icu_ast_expander.d.ts +0 -42
  84. package/src/ml_parser/interpolation_config.d.ts +0 -14
  85. package/src/ml_parser/lexer.d.ts +0 -114
  86. package/src/ml_parser/parser.d.ts +0 -26
  87. package/src/ml_parser/tags.d.ts +0 -29
  88. package/src/ml_parser/tokens.d.ts +0 -141
  89. package/src/ml_parser/xml_parser.d.ts +0 -13
  90. package/src/ml_parser/xml_tags.d.ts +0 -24
  91. package/src/output/abstract_emitter.d.ts +0 -66
  92. package/src/output/abstract_js_emitter.d.ts +0 -19
  93. package/src/output/map_util.d.ts +0 -18
  94. package/src/output/output_ast.d.ts +0 -575
  95. package/src/output/output_jit.d.ts +0 -73
  96. package/src/output/output_jit_trusted_types.d.ts +0 -43
  97. package/src/output/source_map.d.ts +0 -29
  98. package/src/parse_util.d.ts +0 -75
  99. package/src/render3/partial/api.d.ts +0 -441
  100. package/src/render3/partial/class_metadata.d.ts +0 -10
  101. package/src/render3/partial/component.d.ts +0 -39
  102. package/src/render3/partial/directive.d.ts +0 -13
  103. package/src/render3/partial/factory.d.ts +0 -3
  104. package/src/render3/partial/injectable.d.ts +0 -19
  105. package/src/render3/partial/injector.d.ts +0 -3
  106. package/src/render3/partial/ng_module.d.ts +0 -3
  107. package/src/render3/partial/pipe.d.ts +0 -12
  108. package/src/render3/partial/util.d.ts +0 -33
  109. package/src/render3/r3_ast.d.ts +0 -211
  110. package/src/render3/r3_class_metadata_compiler.d.ts +0 -35
  111. package/src/render3/r3_factory.d.ts +0 -94
  112. package/src/render3/r3_identifiers.d.ts +0 -182
  113. package/src/render3/r3_injector_compiler.d.ts +0 -18
  114. package/src/render3/r3_jit.d.ts +0 -22
  115. package/src/render3/r3_module_compiler.d.ts +0 -103
  116. package/src/render3/r3_pipe_compiler.d.ts +0 -50
  117. package/src/render3/r3_template_transform.d.ts +0 -24
  118. package/src/render3/util.d.ts +0 -94
  119. package/src/render3/view/api.d.ts +0 -328
  120. package/src/render3/view/compiler.d.ts +0 -86
  121. package/src/render3/view/i18n/context.d.ts +0 -68
  122. package/src/render3/view/i18n/get_msg_utils.d.ts +0 -13
  123. package/src/render3/view/i18n/icu_serializer.d.ts +0 -9
  124. package/src/render3/view/i18n/localize_utils.d.ts +0 -24
  125. package/src/render3/view/i18n/meta.d.ts +0 -78
  126. package/src/render3/view/i18n/util.d.ts +0 -78
  127. package/src/render3/view/style_parser.d.ts +0 -18
  128. package/src/render3/view/styling_builder.d.ts +0 -211
  129. package/src/render3/view/t2_api.d.ts +0 -152
  130. package/src/render3/view/t2_binder.d.ts +0 -57
  131. package/src/render3/view/template.d.ts +0 -450
  132. package/src/render3/view/util.d.ts +0 -94
  133. package/src/resource_loader.d.ts +0 -17
  134. package/src/schema/dom_element_schema_registry.d.ts +0 -45
  135. package/src/schema/dom_security_schema.d.ts +0 -11
  136. package/src/schema/element_schema_registry.d.ts +0 -29
  137. package/src/schema/trusted_types_sinks.d.ts +0 -15
  138. package/src/selector.d.ts +0 -105
  139. package/src/shadow_css.d.ts +0 -76
  140. package/src/style_url_resolver.d.ts +0 -8
  141. package/src/template_parser/binding_parser.d.ts +0 -91
  142. package/src/template_parser/template_preparser.d.ts +0 -24
  143. package/src/util.d.ts +0 -42
  144. package/src/version.d.ts +0 -14
  145. package/testing/package.json +0 -9
  146. package/testing/public_api.d.ts +0 -13
  147. package/testing/src/testing.d.ts +0 -23
  148. package/testing/testing.d.ts +0 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.13
2
+ * @license Angular v14.0.0-next.16
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -211,7 +211,7 @@ class CssSelector {
211
211
  let inNot = false;
212
212
  _SELECTOR_REGEXP.lastIndex = 0;
213
213
  while (match = _SELECTOR_REGEXP.exec(selector)) {
214
- if (match[1 /* NOT */]) {
214
+ if (match[1 /* SelectorRegexp.NOT */]) {
215
215
  if (inNot) {
216
216
  throw new Error('Nesting :not in a selector is not allowed');
217
217
  }
@@ -219,9 +219,9 @@ class CssSelector {
219
219
  current = new CssSelector();
220
220
  cssSelector.notSelectors.push(current);
221
221
  }
222
- const tag = match[2 /* TAG */];
222
+ const tag = match[2 /* SelectorRegexp.TAG */];
223
223
  if (tag) {
224
- const prefix = match[3 /* PREFIX */];
224
+ const prefix = match[3 /* SelectorRegexp.PREFIX */];
225
225
  if (prefix === '#') {
226
226
  // #hash
227
227
  current.addAttribute('id', tag.slice(1));
@@ -235,15 +235,15 @@ class CssSelector {
235
235
  current.setElement(tag);
236
236
  }
237
237
  }
238
- const attribute = match[4 /* ATTRIBUTE */];
238
+ const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */];
239
239
  if (attribute) {
240
- current.addAttribute(current.unescapeAttribute(attribute), match[6 /* ATTRIBUTE_VALUE */]);
240
+ current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]);
241
241
  }
242
- if (match[7 /* NOT_END */]) {
242
+ if (match[7 /* SelectorRegexp.NOT_END */]) {
243
243
  inNot = false;
244
244
  current = cssSelector;
245
245
  }
246
- if (match[8 /* SEPARATOR */]) {
246
+ if (match[8 /* SelectorRegexp.SEPARATOR */]) {
247
247
  if (inNot) {
248
248
  throw new Error('Multiple selectors in :not are not supported');
249
249
  }
@@ -611,26 +611,26 @@ var MissingTranslationStrategy;
611
611
  })(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
612
612
  function parserSelectorToSimpleSelector(selector) {
613
613
  const classes = selector.classNames && selector.classNames.length ?
614
- [8 /* CLASS */, ...selector.classNames] :
614
+ [8 /* SelectorFlags.CLASS */, ...selector.classNames] :
615
615
  [];
616
616
  const elementName = selector.element && selector.element !== '*' ? selector.element : '';
617
617
  return [elementName, ...selector.attrs, ...classes];
618
618
  }
619
619
  function parserSelectorToNegativeSelector(selector) {
620
620
  const classes = selector.classNames && selector.classNames.length ?
621
- [8 /* CLASS */, ...selector.classNames] :
621
+ [8 /* SelectorFlags.CLASS */, ...selector.classNames] :
622
622
  [];
623
623
  if (selector.element) {
624
624
  return [
625
- 1 /* NOT */ | 4 /* ELEMENT */, selector.element, ...selector.attrs, ...classes
625
+ 1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes
626
626
  ];
627
627
  }
628
628
  else if (selector.attrs.length) {
629
- return [1 /* NOT */ | 2 /* ATTRIBUTE */, ...selector.attrs, ...classes];
629
+ return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes];
630
630
  }
631
631
  else {
632
632
  return selector.classNames && selector.classNames.length ?
633
- [1 /* NOT */ | 8 /* CLASS */, ...selector.classNames] :
633
+ [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] :
634
634
  [];
635
635
  }
636
636
  }
@@ -756,13 +756,13 @@ class Version {
756
756
  this.patch = splits.slice(2).join('.');
757
757
  }
758
758
  }
759
- const __window = typeof window !== 'undefined' && window;
760
- const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
761
- self instanceof WorkerGlobalScope && self;
762
- const __global = typeof global !== 'undefined' && global;
763
- // Check __global first, because in Node tests both __global and __window may be defined and _global
764
- // should be __global in that case.
765
- const _global = __global || __window || __self;
759
+ // Check `global` first, because in Node tests both `global` and `window` may be defined and our
760
+ // `_global` variable should point to the NodeJS `global` in that case. Note: Typeof/Instanceof
761
+ // checks are considered side-effects in Terser. We explicitly mark this as side-effect free:
762
+ // https://github.com/terser/terser/issues/250.
763
+ const _global = ( /* @__PURE__ */(() => (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||
764
+ (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
765
+ self instanceof WorkerGlobalScope && self))());
766
766
  function newArray(size, value) {
767
767
  const list = [];
768
768
  for (let i = 0; i < size; i++) {
@@ -2920,6 +2920,7 @@ Identifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
2920
2920
  Identifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
2921
2921
  Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };
2922
2922
  Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
2923
+ Identifiers.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE };
2923
2924
  Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
2924
2925
  Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
2925
2926
  Identifiers.getInheritedFactory = {
@@ -3661,10 +3662,10 @@ function createMayBeForwardRefExpression(expression, forwardRef) {
3661
3662
  */
3662
3663
  function convertFromMaybeForwardRefExpression({ expression, forwardRef }) {
3663
3664
  switch (forwardRef) {
3664
- case 0 /* None */:
3665
- case 1 /* Wrapped */:
3665
+ case 0 /* ForwardRefHandling.None */:
3666
+ case 1 /* ForwardRefHandling.Wrapped */:
3666
3667
  return expression;
3667
- case 2 /* Unwrapped */:
3668
+ case 2 /* ForwardRefHandling.Unwrapped */:
3668
3669
  return generateForwardRef(expression);
3669
3670
  }
3670
3671
  }
@@ -3788,14 +3789,14 @@ function compileInjectDependency(dep, target, index) {
3788
3789
  }
3789
3790
  else if (dep.attributeNameType === null) {
3790
3791
  // Build up the injection flags according to the metadata.
3791
- const flags = 0 /* Default */ | (dep.self ? 2 /* Self */ : 0) |
3792
- (dep.skipSelf ? 4 /* SkipSelf */ : 0) | (dep.host ? 1 /* Host */ : 0) |
3793
- (dep.optional ? 8 /* Optional */ : 0) |
3794
- (target === FactoryTarget$1.Pipe ? 16 /* ForPipe */ : 0);
3792
+ const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) |
3793
+ (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) |
3794
+ (dep.optional ? 8 /* InjectFlags.Optional */ : 0) |
3795
+ (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0);
3795
3796
  // If this dependency is optional or otherwise has non-default flags, then additional
3796
3797
  // parameters describing how to inject the dependency must be passed to the inject function
3797
3798
  // that's being used.
3798
- let flagsParam = (flags !== 0 /* Default */ || dep.optional) ? literal(flags) : null;
3799
+ let flagsParam = (flags !== 0 /* InjectFlags.Default */ || dep.optional) ? literal(flags) : null;
3799
3800
  // Build up the arguments to the injectFn call.
3800
3801
  const injectArgs = [dep.token];
3801
3802
  if (flagsParam) {
@@ -3966,8 +3967,8 @@ class BoundEvent {
3966
3967
  this.keySpan = keySpan;
3967
3968
  }
3968
3969
  static fromParsedEvent(event) {
3969
- const target = event.type === 0 /* Regular */ ? event.targetOrPhase : null;
3970
- const phase = event.type === 1 /* Animation */ ? event.targetOrPhase : null;
3970
+ const target = event.type === 0 /* ParsedEventType.Regular */ ? event.targetOrPhase : null;
3971
+ const phase = event.type === 1 /* ParsedEventType.Animation */ ? event.targetOrPhase : null;
3971
3972
  if (event.keySpan === undefined) {
3972
3973
  throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);
3973
3974
  }
@@ -4791,7 +4792,7 @@ function assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId =
4791
4792
  * @param useCamelCase whether to camelCase the placeholder name when formatting.
4792
4793
  * @returns A new map of formatted placeholder names to expressions.
4793
4794
  */
4794
- function i18nFormatPlaceholderNames(params = {}, useCamelCase) {
4795
+ function formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {
4795
4796
  const _params = {};
4796
4797
  if (params && Object.keys(params).length) {
4797
4798
  Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);
@@ -5025,10 +5026,10 @@ function getQueryPredicate(query, constantPool) {
5025
5026
  else {
5026
5027
  // The original predicate may have been wrapped in a `forwardRef()` call.
5027
5028
  switch (query.predicate.forwardRef) {
5028
- case 0 /* None */:
5029
- case 2 /* Unwrapped */:
5029
+ case 0 /* ForwardRefHandling.None */:
5030
+ case 2 /* ForwardRefHandling.Unwrapped */:
5030
5031
  return query.predicate.expression;
5031
- case 1 /* Wrapped */:
5032
+ case 1 /* ForwardRefHandling.Wrapped */:
5032
5033
  return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
5033
5034
  }
5034
5035
  }
@@ -6173,9 +6174,24 @@ function createPipeType(metadata) {
6173
6174
  return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [
6174
6175
  typeWithParameters(metadata.type.type, metadata.typeArgumentCount),
6175
6176
  new ExpressionType(new LiteralExpr(metadata.pipeName)),
6177
+ new ExpressionType(new LiteralExpr(metadata.isStandalone)),
6176
6178
  ]));
6177
6179
  }
6178
6180
 
6181
+ /**
6182
+ * @license
6183
+ * Copyright Google LLC All Rights Reserved.
6184
+ *
6185
+ * Use of this source code is governed by an MIT-style license that can be
6186
+ * found in the LICENSE file at https://angular.io/license
6187
+ */
6188
+ var R3TemplateDependencyKind;
6189
+ (function (R3TemplateDependencyKind) {
6190
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
6191
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
6192
+ R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
6193
+ })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
6194
+
6179
6195
  /**
6180
6196
  * @license
6181
6197
  * Copyright Google LLC All Rights Reserved.
@@ -8425,7 +8441,7 @@ function parse(value) {
8425
8441
  const styles = [];
8426
8442
  let i = 0;
8427
8443
  let parenDepth = 0;
8428
- let quote = 0 /* QuoteNone */;
8444
+ let quote = 0 /* Char.QuoteNone */;
8429
8445
  let valueStart = 0;
8430
8446
  let propStart = 0;
8431
8447
  let currentProp = null;
@@ -8433,41 +8449,41 @@ function parse(value) {
8433
8449
  while (i < value.length) {
8434
8450
  const token = value.charCodeAt(i++);
8435
8451
  switch (token) {
8436
- case 40 /* OpenParen */:
8452
+ case 40 /* Char.OpenParen */:
8437
8453
  parenDepth++;
8438
8454
  break;
8439
- case 41 /* CloseParen */:
8455
+ case 41 /* Char.CloseParen */:
8440
8456
  parenDepth--;
8441
8457
  break;
8442
- case 39 /* QuoteSingle */:
8458
+ case 39 /* Char.QuoteSingle */:
8443
8459
  // valueStart needs to be there since prop values don't
8444
8460
  // have quotes in CSS
8445
8461
  valueHasQuotes = valueHasQuotes || valueStart > 0;
8446
- if (quote === 0 /* QuoteNone */) {
8447
- quote = 39 /* QuoteSingle */;
8462
+ if (quote === 0 /* Char.QuoteNone */) {
8463
+ quote = 39 /* Char.QuoteSingle */;
8448
8464
  }
8449
- else if (quote === 39 /* QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {
8450
- quote = 0 /* QuoteNone */;
8465
+ else if (quote === 39 /* Char.QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {
8466
+ quote = 0 /* Char.QuoteNone */;
8451
8467
  }
8452
8468
  break;
8453
- case 34 /* QuoteDouble */:
8469
+ case 34 /* Char.QuoteDouble */:
8454
8470
  // same logic as above
8455
8471
  valueHasQuotes = valueHasQuotes || valueStart > 0;
8456
- if (quote === 0 /* QuoteNone */) {
8457
- quote = 34 /* QuoteDouble */;
8472
+ if (quote === 0 /* Char.QuoteNone */) {
8473
+ quote = 34 /* Char.QuoteDouble */;
8458
8474
  }
8459
- else if (quote === 34 /* QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {
8460
- quote = 0 /* QuoteNone */;
8475
+ else if (quote === 34 /* Char.QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {
8476
+ quote = 0 /* Char.QuoteNone */;
8461
8477
  }
8462
8478
  break;
8463
- case 58 /* Colon */:
8464
- if (!currentProp && parenDepth === 0 && quote === 0 /* QuoteNone */) {
8479
+ case 58 /* Char.Colon */:
8480
+ if (!currentProp && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {
8465
8481
  currentProp = hyphenate(value.substring(propStart, i - 1).trim());
8466
8482
  valueStart = i;
8467
8483
  }
8468
8484
  break;
8469
- case 59 /* Semicolon */:
8470
- if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* QuoteNone */) {
8485
+ case 59 /* Char.Semicolon */:
8486
+ if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {
8471
8487
  const styleVal = value.substring(valueStart, i - 1).trim();
8472
8488
  styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);
8473
8489
  propStart = i;
@@ -8487,7 +8503,7 @@ function parse(value) {
8487
8503
  function stripUnnecessaryQuotes(value) {
8488
8504
  const qS = value.charCodeAt(0);
8489
8505
  const qE = value.charCodeAt(value.length - 1);
8490
- if (qS == qE && (qS == 39 /* QuoteSingle */ || qS == 34 /* QuoteDouble */)) {
8506
+ if (qS == qE && (qS == 39 /* Char.QuoteSingle */ || qS == 34 /* Char.QuoteDouble */)) {
8491
8507
  const tempValue = value.substring(1, value.length - 1);
8492
8508
  // special case to avoid using a multi-quoted string that was just chomped
8493
8509
  // (e.g. `font-family: "Verdana", "sans-serif"`)
@@ -8638,13 +8654,13 @@ class StylingBuilder {
8638
8654
  let binding = null;
8639
8655
  let name = input.name;
8640
8656
  switch (input.type) {
8641
- case 0 /* Property */:
8657
+ case 0 /* BindingType.Property */:
8642
8658
  binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
8643
8659
  break;
8644
- case 3 /* Style */:
8660
+ case 3 /* BindingType.Style */:
8645
8661
  binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
8646
8662
  break;
8647
- case 2 /* Class */:
8663
+ case 2 /* BindingType.Class */:
8648
8664
  binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
8649
8665
  break;
8650
8666
  }
@@ -8743,14 +8759,14 @@ class StylingBuilder {
8743
8759
  populateInitialStylingAttrs(attrs) {
8744
8760
  // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]
8745
8761
  if (this._initialClassValues.length) {
8746
- attrs.push(literal(1 /* Classes */));
8762
+ attrs.push(literal(1 /* AttributeMarker.Classes */));
8747
8763
  for (let i = 0; i < this._initialClassValues.length; i++) {
8748
8764
  attrs.push(literal(this._initialClassValues[i]));
8749
8765
  }
8750
8766
  }
8751
8767
  // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]
8752
8768
  if (this._initialStyleValues.length) {
8753
- attrs.push(literal(2 /* Styles */));
8769
+ attrs.push(literal(2 /* AttributeMarker.Styles */));
8754
8770
  for (let i = 0; i < this._initialStyleValues.length; i += 2) {
8755
8771
  attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));
8756
8772
  }
@@ -9482,9 +9498,9 @@ class Parser$1 {
9482
9498
  this._checkNoInterpolation(input, location, interpolationConfig);
9483
9499
  const sourceToLex = this._stripComments(input);
9484
9500
  const tokens = this._lexer.tokenize(sourceToLex);
9485
- let flags = 1 /* Action */;
9501
+ let flags = 1 /* ParseFlags.Action */;
9486
9502
  if (isAssignmentEvent) {
9487
- flags |= 2 /* AssignmentEvent */;
9503
+ flags |= 2 /* ParseFlags.AssignmentEvent */;
9488
9504
  }
9489
9505
  const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();
9490
9506
  return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
@@ -9513,7 +9529,7 @@ class Parser$1 {
9513
9529
  this._checkNoInterpolation(input, location, interpolationConfig);
9514
9530
  const sourceToLex = this._stripComments(input);
9515
9531
  const tokens = this._lexer.tokenize(sourceToLex);
9516
- return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9532
+ return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)
9517
9533
  .parseChain();
9518
9534
  }
9519
9535
  /**
@@ -9544,7 +9560,7 @@ class Parser$1 {
9544
9560
  */
9545
9561
  parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
9546
9562
  const tokens = this._lexer.tokenize(templateValue);
9547
- const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* None */, this.errors, 0 /* relative offset */);
9563
+ const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0 /* relative offset */);
9548
9564
  return parser.parseTemplateBindings({
9549
9565
  source: templateKey,
9550
9566
  span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
@@ -9559,7 +9575,7 @@ class Parser$1 {
9559
9575
  const expressionText = expressions[i].text;
9560
9576
  const sourceToLex = this._stripComments(expressionText);
9561
9577
  const tokens = this._lexer.tokenize(sourceToLex);
9562
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, offsets[i])
9578
+ const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, offsets[i])
9563
9579
  .parseChain();
9564
9580
  expressionNodes.push(ast);
9565
9581
  }
@@ -9573,7 +9589,7 @@ class Parser$1 {
9573
9589
  parseInterpolationExpression(expression, location, absoluteOffset) {
9574
9590
  const sourceToLex = this._stripComments(expression);
9575
9591
  const tokens = this._lexer.tokenize(sourceToLex);
9576
- const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9592
+ const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)
9577
9593
  .parseChain();
9578
9594
  const strings = ['', '']; // The prefix and suffix strings are both empty
9579
9595
  return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
@@ -9929,7 +9945,7 @@ class _ParseAST {
9929
9945
  const expr = this.parsePipe();
9930
9946
  exprs.push(expr);
9931
9947
  if (this.consumeOptionalCharacter($SEMICOLON)) {
9932
- if (!(this.parseFlags & 1 /* Action */)) {
9948
+ if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {
9933
9949
  this.error('Binding expression cannot contain chained expression');
9934
9950
  }
9935
9951
  while (this.consumeOptionalCharacter($SEMICOLON)) {
@@ -9953,7 +9969,7 @@ class _ParseAST {
9953
9969
  const start = this.inputIndex;
9954
9970
  let result = this.parseExpression();
9955
9971
  if (this.consumeOptionalOperator('|')) {
9956
- if (this.parseFlags & 1 /* Action */) {
9972
+ if (this.parseFlags & 1 /* ParseFlags.Action */) {
9957
9973
  this.error('Cannot have a pipe in an action expression');
9958
9974
  }
9959
9975
  do {
@@ -10305,7 +10321,7 @@ class _ParseAST {
10305
10321
  }
10306
10322
  else {
10307
10323
  if (this.consumeOptionalAssignment()) {
10308
- if (!(this.parseFlags & 1 /* Action */)) {
10324
+ if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {
10309
10325
  this.error('Bindings cannot contain assignments');
10310
10326
  return new EmptyExpr(this.span(start), this.sourceSpan(start));
10311
10327
  }
@@ -10337,7 +10353,7 @@ class _ParseAST {
10337
10353
  // primary expression is substituted as LHS of the assignment operator to achieve
10338
10354
  // two-way-binding, such that the LHS could be the non-null operator. The grammar doesn't
10339
10355
  // naturally allow for this syntax, so assignment events are parsed specially.
10340
- if ((this.parseFlags & 2 /* AssignmentEvent */) && this.next.isOperator('!') &&
10356
+ if ((this.parseFlags & 2 /* ParseFlags.AssignmentEvent */) && this.next.isOperator('!') &&
10341
10357
  this.peek(1).isOperator('=')) {
10342
10358
  // First skip over the ! operator.
10343
10359
  this.advance();
@@ -10659,7 +10675,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
10659
10675
  let tokenIndex = 0;
10660
10676
  while (tokenIndex < interpolatedTokens.length) {
10661
10677
  const currentToken = interpolatedTokens[tokenIndex];
10662
- if (currentToken.type === 9 /* ENCODED_ENTITY */) {
10678
+ if (currentToken.type === 9 /* MlParserTokenType.ENCODED_ENTITY */) {
10663
10679
  const [decoded, encoded] = currentToken.parts;
10664
10680
  consumedInOriginalTemplate += encoded.length;
10665
10681
  consumedInInput += decoded.length;
@@ -13057,14 +13073,14 @@ class _Tokenizer {
13057
13073
  else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
13058
13074
  // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while
13059
13075
  // the premature end of an interpolation is given by the start of a new HTML element.
13060
- this._consumeWithInterpolation(5 /* TEXT */, 8 /* INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());
13076
+ this._consumeWithInterpolation(5 /* TokenType.TEXT */, 8 /* TokenType.INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());
13061
13077
  }
13062
13078
  }
13063
13079
  catch (e) {
13064
13080
  this.handleError(e);
13065
13081
  }
13066
13082
  }
13067
- this._beginToken(24 /* EOF */);
13083
+ this._beginToken(24 /* TokenType.EOF */);
13068
13084
  this._endToken([]);
13069
13085
  }
13070
13086
  /**
@@ -13208,7 +13224,7 @@ class _Tokenizer {
13208
13224
  return char;
13209
13225
  }
13210
13226
  _consumeEntity(textTokenType) {
13211
- this._beginToken(9 /* ENCODED_ENTITY */);
13227
+ this._beginToken(9 /* TokenType.ENCODED_ENTITY */);
13212
13228
  const start = this._cursor.clone();
13213
13229
  this._cursor.advance();
13214
13230
  if (this._attemptCharCode($HASH)) {
@@ -13254,7 +13270,7 @@ class _Tokenizer {
13254
13270
  }
13255
13271
  }
13256
13272
  _consumeRawText(consumeEntities, endMarkerPredicate) {
13257
- this._beginToken(consumeEntities ? 6 /* ESCAPABLE_RAW_TEXT */ : 7 /* RAW_TEXT */);
13273
+ this._beginToken(consumeEntities ? 6 /* TokenType.ESCAPABLE_RAW_TEXT */ : 7 /* TokenType.RAW_TEXT */);
13258
13274
  const parts = [];
13259
13275
  while (true) {
13260
13276
  const tagCloseStart = this._cursor.clone();
@@ -13266,8 +13282,8 @@ class _Tokenizer {
13266
13282
  if (consumeEntities && this._cursor.peek() === $AMPERSAND) {
13267
13283
  this._endToken([this._processCarriageReturns(parts.join(''))]);
13268
13284
  parts.length = 0;
13269
- this._consumeEntity(6 /* ESCAPABLE_RAW_TEXT */);
13270
- this._beginToken(6 /* ESCAPABLE_RAW_TEXT */);
13285
+ this._consumeEntity(6 /* TokenType.ESCAPABLE_RAW_TEXT */);
13286
+ this._beginToken(6 /* TokenType.ESCAPABLE_RAW_TEXT */);
13271
13287
  }
13272
13288
  else {
13273
13289
  parts.push(this._readChar());
@@ -13276,25 +13292,25 @@ class _Tokenizer {
13276
13292
  this._endToken([this._processCarriageReturns(parts.join(''))]);
13277
13293
  }
13278
13294
  _consumeComment(start) {
13279
- this._beginToken(10 /* COMMENT_START */, start);
13295
+ this._beginToken(10 /* TokenType.COMMENT_START */, start);
13280
13296
  this._requireCharCode($MINUS);
13281
13297
  this._endToken([]);
13282
13298
  this._consumeRawText(false, () => this._attemptStr('-->'));
13283
- this._beginToken(11 /* COMMENT_END */);
13299
+ this._beginToken(11 /* TokenType.COMMENT_END */);
13284
13300
  this._requireStr('-->');
13285
13301
  this._endToken([]);
13286
13302
  }
13287
13303
  _consumeCdata(start) {
13288
- this._beginToken(12 /* CDATA_START */, start);
13304
+ this._beginToken(12 /* TokenType.CDATA_START */, start);
13289
13305
  this._requireStr('CDATA[');
13290
13306
  this._endToken([]);
13291
13307
  this._consumeRawText(false, () => this._attemptStr(']]>'));
13292
- this._beginToken(13 /* CDATA_END */);
13308
+ this._beginToken(13 /* TokenType.CDATA_END */);
13293
13309
  this._requireStr(']]>');
13294
13310
  this._endToken([]);
13295
13311
  }
13296
13312
  _consumeDocType(start) {
13297
- this._beginToken(18 /* DOC_TYPE */, start);
13313
+ this._beginToken(18 /* TokenType.DOC_TYPE */, start);
13298
13314
  const contentStart = this._cursor.clone();
13299
13315
  this._attemptUntilChar($GT);
13300
13316
  const content = this._cursor.getChars(contentStart);
@@ -13348,12 +13364,12 @@ class _Tokenizer {
13348
13364
  if (e instanceof _ControlFlowError) {
13349
13365
  if (openTagToken) {
13350
13366
  // We errored before we could close the opening tag, so it is incomplete.
13351
- openTagToken.type = 4 /* INCOMPLETE_TAG_OPEN */;
13367
+ openTagToken.type = 4 /* TokenType.INCOMPLETE_TAG_OPEN */;
13352
13368
  }
13353
13369
  else {
13354
13370
  // When the start tag is invalid, assume we want a "<" as text.
13355
13371
  // Back to back text tokens are merged at the end.
13356
- this._beginToken(5 /* TEXT */, start);
13372
+ this._beginToken(5 /* TokenType.TEXT */, start);
13357
13373
  this._endToken(['<']);
13358
13374
  }
13359
13375
  return;
@@ -13380,13 +13396,13 @@ class _Tokenizer {
13380
13396
  this._attemptCharCodeUntilFn(isNotWhitespace);
13381
13397
  return this._attemptCharCode($GT);
13382
13398
  });
13383
- this._beginToken(3 /* TAG_CLOSE */);
13399
+ this._beginToken(3 /* TokenType.TAG_CLOSE */);
13384
13400
  this._requireCharCodeUntilFn(code => code === $GT, 3);
13385
13401
  this._cursor.advance(); // Consume the `>`
13386
13402
  this._endToken([prefix, tagName]);
13387
13403
  }
13388
13404
  _consumeTagOpenStart(start) {
13389
- this._beginToken(0 /* TAG_OPEN_START */, start);
13405
+ this._beginToken(0 /* TokenType.TAG_OPEN_START */, start);
13390
13406
  const parts = this._consumePrefixAndName();
13391
13407
  return this._endToken(parts);
13392
13408
  }
@@ -13395,7 +13411,7 @@ class _Tokenizer {
13395
13411
  if (attrNameStart === $SQ || attrNameStart === $DQ) {
13396
13412
  throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());
13397
13413
  }
13398
- this._beginToken(14 /* ATTR_NAME */);
13414
+ this._beginToken(14 /* TokenType.ATTR_NAME */);
13399
13415
  const prefixAndName = this._consumePrefixAndName();
13400
13416
  this._endToken(prefixAndName);
13401
13417
  }
@@ -13407,27 +13423,27 @@ class _Tokenizer {
13407
13423
  // In an attribute then end of the attribute value and the premature end to an interpolation
13408
13424
  // are both triggered by the `quoteChar`.
13409
13425
  const endPredicate = () => this._cursor.peek() === quoteChar;
13410
- this._consumeWithInterpolation(16 /* ATTR_VALUE_TEXT */, 17 /* ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13426
+ this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13411
13427
  this._consumeQuote(quoteChar);
13412
13428
  }
13413
13429
  else {
13414
13430
  const endPredicate = () => isNameEnd(this._cursor.peek());
13415
- this._consumeWithInterpolation(16 /* ATTR_VALUE_TEXT */, 17 /* ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13431
+ this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13416
13432
  }
13417
13433
  }
13418
13434
  _consumeQuote(quoteChar) {
13419
- this._beginToken(15 /* ATTR_QUOTE */);
13435
+ this._beginToken(15 /* TokenType.ATTR_QUOTE */);
13420
13436
  this._requireCharCode(quoteChar);
13421
13437
  this._endToken([String.fromCodePoint(quoteChar)]);
13422
13438
  }
13423
13439
  _consumeTagOpenEnd() {
13424
- const tokenType = this._attemptCharCode($SLASH) ? 2 /* TAG_OPEN_END_VOID */ : 1 /* TAG_OPEN_END */;
13440
+ const tokenType = this._attemptCharCode($SLASH) ? 2 /* TokenType.TAG_OPEN_END_VOID */ : 1 /* TokenType.TAG_OPEN_END */;
13425
13441
  this._beginToken(tokenType);
13426
13442
  this._requireCharCode($GT);
13427
13443
  this._endToken([]);
13428
13444
  }
13429
13445
  _consumeTagClose(start) {
13430
- this._beginToken(3 /* TAG_CLOSE */, start);
13446
+ this._beginToken(3 /* TokenType.TAG_CLOSE */, start);
13431
13447
  this._attemptCharCodeUntilFn(isNotWhitespace);
13432
13448
  const prefixAndName = this._consumePrefixAndName();
13433
13449
  this._attemptCharCodeUntilFn(isNotWhitespace);
@@ -13435,11 +13451,11 @@ class _Tokenizer {
13435
13451
  this._endToken(prefixAndName);
13436
13452
  }
13437
13453
  _consumeExpansionFormStart() {
13438
- this._beginToken(19 /* EXPANSION_FORM_START */);
13454
+ this._beginToken(19 /* TokenType.EXPANSION_FORM_START */);
13439
13455
  this._requireCharCode($LBRACE);
13440
13456
  this._endToken([]);
13441
- this._expansionCaseStack.push(19 /* EXPANSION_FORM_START */);
13442
- this._beginToken(7 /* RAW_TEXT */);
13457
+ this._expansionCaseStack.push(19 /* TokenType.EXPANSION_FORM_START */);
13458
+ this._beginToken(7 /* TokenType.RAW_TEXT */);
13443
13459
  const condition = this._readUntil($COMMA);
13444
13460
  const normalizedCondition = this._processCarriageReturns(condition);
13445
13461
  if (this._i18nNormalizeLineEndingsInICUs) {
@@ -13455,32 +13471,32 @@ class _Tokenizer {
13455
13471
  }
13456
13472
  this._requireCharCode($COMMA);
13457
13473
  this._attemptCharCodeUntilFn(isNotWhitespace);
13458
- this._beginToken(7 /* RAW_TEXT */);
13474
+ this._beginToken(7 /* TokenType.RAW_TEXT */);
13459
13475
  const type = this._readUntil($COMMA);
13460
13476
  this._endToken([type]);
13461
13477
  this._requireCharCode($COMMA);
13462
13478
  this._attemptCharCodeUntilFn(isNotWhitespace);
13463
13479
  }
13464
13480
  _consumeExpansionCaseStart() {
13465
- this._beginToken(20 /* EXPANSION_CASE_VALUE */);
13481
+ this._beginToken(20 /* TokenType.EXPANSION_CASE_VALUE */);
13466
13482
  const value = this._readUntil($LBRACE).trim();
13467
13483
  this._endToken([value]);
13468
13484
  this._attemptCharCodeUntilFn(isNotWhitespace);
13469
- this._beginToken(21 /* EXPANSION_CASE_EXP_START */);
13485
+ this._beginToken(21 /* TokenType.EXPANSION_CASE_EXP_START */);
13470
13486
  this._requireCharCode($LBRACE);
13471
13487
  this._endToken([]);
13472
13488
  this._attemptCharCodeUntilFn(isNotWhitespace);
13473
- this._expansionCaseStack.push(21 /* EXPANSION_CASE_EXP_START */);
13489
+ this._expansionCaseStack.push(21 /* TokenType.EXPANSION_CASE_EXP_START */);
13474
13490
  }
13475
13491
  _consumeExpansionCaseEnd() {
13476
- this._beginToken(22 /* EXPANSION_CASE_EXP_END */);
13492
+ this._beginToken(22 /* TokenType.EXPANSION_CASE_EXP_END */);
13477
13493
  this._requireCharCode($RBRACE);
13478
13494
  this._endToken([]);
13479
13495
  this._attemptCharCodeUntilFn(isNotWhitespace);
13480
13496
  this._expansionCaseStack.pop();
13481
13497
  }
13482
13498
  _consumeExpansionFormEnd() {
13483
- this._beginToken(23 /* EXPANSION_FORM_END */);
13499
+ this._beginToken(23 /* TokenType.EXPANSION_FORM_END */);
13484
13500
  this._requireCharCode($RBRACE);
13485
13501
  this._endToken([]);
13486
13502
  this._expansionCaseStack.pop();
@@ -13630,12 +13646,12 @@ class _Tokenizer {
13630
13646
  _isInExpansionCase() {
13631
13647
  return this._expansionCaseStack.length > 0 &&
13632
13648
  this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
13633
- 21 /* EXPANSION_CASE_EXP_START */;
13649
+ 21 /* TokenType.EXPANSION_CASE_EXP_START */;
13634
13650
  }
13635
13651
  _isInExpansionForm() {
13636
13652
  return this._expansionCaseStack.length > 0 &&
13637
13653
  this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
13638
- 19 /* EXPANSION_FORM_START */;
13654
+ 19 /* TokenType.EXPANSION_FORM_START */;
13639
13655
  }
13640
13656
  isExpansionFormStart() {
13641
13657
  if (this._cursor.peek() !== $LBRACE) {
@@ -13682,9 +13698,9 @@ function mergeTextTokens(srcTokens) {
13682
13698
  let lastDstToken = undefined;
13683
13699
  for (let i = 0; i < srcTokens.length; i++) {
13684
13700
  const token = srcTokens[i];
13685
- if ((lastDstToken && lastDstToken.type === 5 /* TEXT */ && token.type === 5 /* TEXT */) ||
13686
- (lastDstToken && lastDstToken.type === 16 /* ATTR_VALUE_TEXT */ &&
13687
- token.type === 16 /* ATTR_VALUE_TEXT */)) {
13701
+ if ((lastDstToken && lastDstToken.type === 5 /* TokenType.TEXT */ && token.type === 5 /* TokenType.TEXT */) ||
13702
+ (lastDstToken && lastDstToken.type === 16 /* TokenType.ATTR_VALUE_TEXT */ &&
13703
+ token.type === 16 /* TokenType.ATTR_VALUE_TEXT */)) {
13688
13704
  lastDstToken.parts[0] += token.parts[0];
13689
13705
  lastDstToken.sourceSpan.end = token.sourceSpan.end;
13690
13706
  }
@@ -13977,28 +13993,28 @@ class _TreeBuilder {
13977
13993
  this._advance();
13978
13994
  }
13979
13995
  build() {
13980
- while (this._peek.type !== 24 /* EOF */) {
13981
- if (this._peek.type === 0 /* TAG_OPEN_START */ ||
13982
- this._peek.type === 4 /* INCOMPLETE_TAG_OPEN */) {
13996
+ while (this._peek.type !== 24 /* TokenType.EOF */) {
13997
+ if (this._peek.type === 0 /* TokenType.TAG_OPEN_START */ ||
13998
+ this._peek.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {
13983
13999
  this._consumeStartTag(this._advance());
13984
14000
  }
13985
- else if (this._peek.type === 3 /* TAG_CLOSE */) {
14001
+ else if (this._peek.type === 3 /* TokenType.TAG_CLOSE */) {
13986
14002
  this._consumeEndTag(this._advance());
13987
14003
  }
13988
- else if (this._peek.type === 12 /* CDATA_START */) {
14004
+ else if (this._peek.type === 12 /* TokenType.CDATA_START */) {
13989
14005
  this._closeVoidElement();
13990
14006
  this._consumeCdata(this._advance());
13991
14007
  }
13992
- else if (this._peek.type === 10 /* COMMENT_START */) {
14008
+ else if (this._peek.type === 10 /* TokenType.COMMENT_START */) {
13993
14009
  this._closeVoidElement();
13994
14010
  this._consumeComment(this._advance());
13995
14011
  }
13996
- else if (this._peek.type === 5 /* TEXT */ || this._peek.type === 7 /* RAW_TEXT */ ||
13997
- this._peek.type === 6 /* ESCAPABLE_RAW_TEXT */) {
14012
+ else if (this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 7 /* TokenType.RAW_TEXT */ ||
14013
+ this._peek.type === 6 /* TokenType.ESCAPABLE_RAW_TEXT */) {
13998
14014
  this._closeVoidElement();
13999
14015
  this._consumeText(this._advance());
14000
14016
  }
14001
- else if (this._peek.type === 19 /* EXPANSION_FORM_START */) {
14017
+ else if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */) {
14002
14018
  this._consumeExpansion(this._advance());
14003
14019
  }
14004
14020
  else {
@@ -14024,11 +14040,11 @@ class _TreeBuilder {
14024
14040
  }
14025
14041
  _consumeCdata(_startToken) {
14026
14042
  this._consumeText(this._advance());
14027
- this._advanceIf(13 /* CDATA_END */);
14043
+ this._advanceIf(13 /* TokenType.CDATA_END */);
14028
14044
  }
14029
14045
  _consumeComment(token) {
14030
- const text = this._advanceIf(7 /* RAW_TEXT */);
14031
- this._advanceIf(11 /* COMMENT_END */);
14046
+ const text = this._advanceIf(7 /* TokenType.RAW_TEXT */);
14047
+ this._advanceIf(11 /* TokenType.COMMENT_END */);
14032
14048
  const value = text != null ? text.parts[0].trim() : null;
14033
14049
  this._addToParent(new Comment(value, token.sourceSpan));
14034
14050
  }
@@ -14037,14 +14053,14 @@ class _TreeBuilder {
14037
14053
  const type = this._advance();
14038
14054
  const cases = [];
14039
14055
  // read =
14040
- while (this._peek.type === 20 /* EXPANSION_CASE_VALUE */) {
14056
+ while (this._peek.type === 20 /* TokenType.EXPANSION_CASE_VALUE */) {
14041
14057
  const expCase = this._parseExpansionCase();
14042
14058
  if (!expCase)
14043
14059
  return; // error
14044
14060
  cases.push(expCase);
14045
14061
  }
14046
14062
  // read the final }
14047
- if (this._peek.type !== 23 /* EXPANSION_FORM_END */) {
14063
+ if (this._peek.type !== 23 /* TokenType.EXPANSION_FORM_END */) {
14048
14064
  this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));
14049
14065
  return;
14050
14066
  }
@@ -14055,7 +14071,7 @@ class _TreeBuilder {
14055
14071
  _parseExpansionCase() {
14056
14072
  const value = this._advance();
14057
14073
  // read {
14058
- if (this._peek.type !== 21 /* EXPANSION_CASE_EXP_START */) {
14074
+ if (this._peek.type !== 21 /* TokenType.EXPANSION_CASE_EXP_START */) {
14059
14075
  this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '{'.`));
14060
14076
  return null;
14061
14077
  }
@@ -14065,7 +14081,7 @@ class _TreeBuilder {
14065
14081
  if (!exp)
14066
14082
  return null;
14067
14083
  const end = this._advance();
14068
- exp.push({ type: 24 /* EOF */, parts: [], sourceSpan: end.sourceSpan });
14084
+ exp.push({ type: 24 /* TokenType.EOF */, parts: [], sourceSpan: end.sourceSpan });
14069
14085
  // parse everything in between { and }
14070
14086
  const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);
14071
14087
  expansionCaseParser.build();
@@ -14079,14 +14095,14 @@ class _TreeBuilder {
14079
14095
  }
14080
14096
  _collectExpansionExpTokens(start) {
14081
14097
  const exp = [];
14082
- const expansionFormStack = [21 /* EXPANSION_CASE_EXP_START */];
14098
+ const expansionFormStack = [21 /* TokenType.EXPANSION_CASE_EXP_START */];
14083
14099
  while (true) {
14084
- if (this._peek.type === 19 /* EXPANSION_FORM_START */ ||
14085
- this._peek.type === 21 /* EXPANSION_CASE_EXP_START */) {
14100
+ if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */ ||
14101
+ this._peek.type === 21 /* TokenType.EXPANSION_CASE_EXP_START */) {
14086
14102
  expansionFormStack.push(this._peek.type);
14087
14103
  }
14088
- if (this._peek.type === 22 /* EXPANSION_CASE_EXP_END */) {
14089
- if (lastOnStack(expansionFormStack, 21 /* EXPANSION_CASE_EXP_START */)) {
14104
+ if (this._peek.type === 22 /* TokenType.EXPANSION_CASE_EXP_END */) {
14105
+ if (lastOnStack(expansionFormStack, 21 /* TokenType.EXPANSION_CASE_EXP_START */)) {
14090
14106
  expansionFormStack.pop();
14091
14107
  if (expansionFormStack.length === 0)
14092
14108
  return exp;
@@ -14096,8 +14112,8 @@ class _TreeBuilder {
14096
14112
  return null;
14097
14113
  }
14098
14114
  }
14099
- if (this._peek.type === 23 /* EXPANSION_FORM_END */) {
14100
- if (lastOnStack(expansionFormStack, 19 /* EXPANSION_FORM_START */)) {
14115
+ if (this._peek.type === 23 /* TokenType.EXPANSION_FORM_END */) {
14116
+ if (lastOnStack(expansionFormStack, 19 /* TokenType.EXPANSION_FORM_START */)) {
14101
14117
  expansionFormStack.pop();
14102
14118
  }
14103
14119
  else {
@@ -14105,7 +14121,7 @@ class _TreeBuilder {
14105
14121
  return null;
14106
14122
  }
14107
14123
  }
14108
- if (this._peek.type === 24 /* EOF */) {
14124
+ if (this._peek.type === 24 /* TokenType.EOF */) {
14109
14125
  this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));
14110
14126
  return null;
14111
14127
  }
@@ -14124,18 +14140,18 @@ class _TreeBuilder {
14124
14140
  tokens[0] = { type: token.type, sourceSpan: token.sourceSpan, parts: [text] };
14125
14141
  }
14126
14142
  }
14127
- while (this._peek.type === 8 /* INTERPOLATION */ || this._peek.type === 5 /* TEXT */ ||
14128
- this._peek.type === 9 /* ENCODED_ENTITY */) {
14143
+ while (this._peek.type === 8 /* TokenType.INTERPOLATION */ || this._peek.type === 5 /* TokenType.TEXT */ ||
14144
+ this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {
14129
14145
  token = this._advance();
14130
14146
  tokens.push(token);
14131
- if (token.type === 8 /* INTERPOLATION */) {
14147
+ if (token.type === 8 /* TokenType.INTERPOLATION */) {
14132
14148
  // For backward compatibility we decode HTML entities that appear in interpolation
14133
14149
  // expressions. This is arguably a bug, but it could be a considerable breaking change to
14134
14150
  // fix it. It should be addressed in a larger project to refactor the entire parser/lexer
14135
14151
  // chain after View Engine has been removed.
14136
14152
  text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity);
14137
14153
  }
14138
- else if (token.type === 9 /* ENCODED_ENTITY */) {
14154
+ else if (token.type === 9 /* TokenType.ENCODED_ENTITY */) {
14139
14155
  text += token.parts[0];
14140
14156
  }
14141
14157
  else {
@@ -14156,14 +14172,14 @@ class _TreeBuilder {
14156
14172
  _consumeStartTag(startTagToken) {
14157
14173
  const [prefix, name] = startTagToken.parts;
14158
14174
  const attrs = [];
14159
- while (this._peek.type === 14 /* ATTR_NAME */) {
14175
+ while (this._peek.type === 14 /* TokenType.ATTR_NAME */) {
14160
14176
  attrs.push(this._consumeAttr(this._advance()));
14161
14177
  }
14162
14178
  const fullName = this._getElementFullName(prefix, name, this._getParentElement());
14163
14179
  let selfClosing = false;
14164
14180
  // Note: There could have been a tokenizer error
14165
14181
  // so that we don't get a token for the end tag...
14166
- if (this._peek.type === 2 /* TAG_OPEN_END_VOID */) {
14182
+ if (this._peek.type === 2 /* TokenType.TAG_OPEN_END_VOID */) {
14167
14183
  this._advance();
14168
14184
  selfClosing = true;
14169
14185
  const tagDef = this.getTagDefinition(fullName);
@@ -14171,7 +14187,7 @@ class _TreeBuilder {
14171
14187
  this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void and foreign elements can be self closed "${startTagToken.parts[1]}"`));
14172
14188
  }
14173
14189
  }
14174
- else if (this._peek.type === 1 /* TAG_OPEN_END */) {
14190
+ else if (this._peek.type === 1 /* TokenType.TAG_OPEN_END */) {
14175
14191
  this._advance();
14176
14192
  selfClosing = false;
14177
14193
  }
@@ -14186,7 +14202,7 @@ class _TreeBuilder {
14186
14202
  // element start tag also represents the end tag.
14187
14203
  this._popElement(fullName, span);
14188
14204
  }
14189
- else if (startTagToken.type === 4 /* INCOMPLETE_TAG_OPEN */) {
14205
+ else if (startTagToken.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {
14190
14206
  // We already know the opening tag is not complete, so it is unlikely it has a corresponding
14191
14207
  // close tag. Let's optimistically parse it as a full element and emit an error.
14192
14208
  this._popElement(fullName, null);
@@ -14243,7 +14259,7 @@ class _TreeBuilder {
14243
14259
  const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);
14244
14260
  let attrEnd = attrName.sourceSpan.end;
14245
14261
  // Consume any quote
14246
- if (this._peek.type === 15 /* ATTR_QUOTE */) {
14262
+ if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {
14247
14263
  this._advance();
14248
14264
  }
14249
14265
  // Consume the attribute value
@@ -14256,22 +14272,22 @@ class _TreeBuilder {
14256
14272
  // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not
14257
14273
  // able to see that `_advance()` will actually mutate `_peek`.
14258
14274
  const nextTokenType = this._peek.type;
14259
- if (nextTokenType === 16 /* ATTR_VALUE_TEXT */) {
14275
+ if (nextTokenType === 16 /* TokenType.ATTR_VALUE_TEXT */) {
14260
14276
  valueStartSpan = this._peek.sourceSpan;
14261
14277
  valueEnd = this._peek.sourceSpan.end;
14262
- while (this._peek.type === 16 /* ATTR_VALUE_TEXT */ ||
14263
- this._peek.type === 17 /* ATTR_VALUE_INTERPOLATION */ ||
14264
- this._peek.type === 9 /* ENCODED_ENTITY */) {
14278
+ while (this._peek.type === 16 /* TokenType.ATTR_VALUE_TEXT */ ||
14279
+ this._peek.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */ ||
14280
+ this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {
14265
14281
  const valueToken = this._advance();
14266
14282
  valueTokens.push(valueToken);
14267
- if (valueToken.type === 17 /* ATTR_VALUE_INTERPOLATION */) {
14283
+ if (valueToken.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */) {
14268
14284
  // For backward compatibility we decode HTML entities that appear in interpolation
14269
14285
  // expressions. This is arguably a bug, but it could be a considerable breaking change to
14270
14286
  // fix it. It should be addressed in a larger project to refactor the entire parser/lexer
14271
14287
  // chain after View Engine has been removed.
14272
14288
  value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity);
14273
14289
  }
14274
- else if (valueToken.type === 9 /* ENCODED_ENTITY */) {
14290
+ else if (valueToken.type === 9 /* TokenType.ENCODED_ENTITY */) {
14275
14291
  value += valueToken.parts[0];
14276
14292
  }
14277
14293
  else {
@@ -14281,7 +14297,7 @@ class _TreeBuilder {
14281
14297
  }
14282
14298
  }
14283
14299
  // Consume any quote
14284
- if (this._peek.type === 15 /* ATTR_QUOTE */) {
14300
+ if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {
14285
14301
  const quoteToken = this._advance();
14286
14302
  attrEnd = quoteToken.sourceSpan.end;
14287
14303
  }
@@ -14411,7 +14427,7 @@ class WhitespaceVisitor {
14411
14427
  (context.prev instanceof Expansion || context.next instanceof Expansion);
14412
14428
  if (isNotBlank || hasExpansionSibling) {
14413
14429
  // Process the whitespace in the tokens of this Text node
14414
- const tokens = text.tokens.map(token => token.type === 5 /* TEXT */ ? createWhitespaceProcessedTextToken(token) : token);
14430
+ const tokens = text.tokens.map(token => token.type === 5 /* TokenType.TEXT */ ? createWhitespaceProcessedTextToken(token) : token);
14415
14431
  // Process the whitespace of the value of this Text node
14416
14432
  const value = processWhitespace(text.value);
14417
14433
  return new Text(value, text.sourceSpan, tokens, text.i18n);
@@ -15260,7 +15276,7 @@ class BindingParser {
15260
15276
  }
15261
15277
  createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {
15262
15278
  if (boundProp.isAnimation) {
15263
- return new BoundElementProperty(boundProp.name, 4 /* Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
15279
+ return new BoundElementProperty(boundProp.name, 4 /* BindingType.Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
15264
15280
  }
15265
15281
  let unit = null;
15266
15282
  let bindingType = undefined;
@@ -15281,17 +15297,17 @@ class BindingParser {
15281
15297
  const name = boundPropertyName.substring(nsSeparatorIdx + 1);
15282
15298
  boundPropertyName = mergeNsAndName(ns, name);
15283
15299
  }
15284
- bindingType = 1 /* Attribute */;
15300
+ bindingType = 1 /* BindingType.Attribute */;
15285
15301
  }
15286
15302
  else if (parts[0] == CLASS_PREFIX) {
15287
15303
  boundPropertyName = parts[1];
15288
- bindingType = 2 /* Class */;
15304
+ bindingType = 2 /* BindingType.Class */;
15289
15305
  securityContexts = [SecurityContext.NONE];
15290
15306
  }
15291
15307
  else if (parts[0] == STYLE_PREFIX) {
15292
15308
  unit = parts.length > 2 ? parts[2] : null;
15293
15309
  boundPropertyName = parts[1];
15294
- bindingType = 3 /* Style */;
15310
+ bindingType = 3 /* BindingType.Style */;
15295
15311
  securityContexts = [SecurityContext.STYLE];
15296
15312
  }
15297
15313
  }
@@ -15300,7 +15316,7 @@ class BindingParser {
15300
15316
  const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);
15301
15317
  boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;
15302
15318
  securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);
15303
- bindingType = 0 /* Property */;
15319
+ bindingType = 0 /* BindingType.Property */;
15304
15320
  if (!skipValidation) {
15305
15321
  this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);
15306
15322
  }
@@ -15332,7 +15348,7 @@ class BindingParser {
15332
15348
  const eventName = matches[0];
15333
15349
  const phase = matches[1].toLowerCase();
15334
15350
  const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);
15335
- targetEvents.push(new ParsedEvent(eventName, phase, 1 /* Animation */, ast, sourceSpan, handlerSpan, keySpan));
15351
+ targetEvents.push(new ParsedEvent(eventName, phase, 1 /* ParsedEventType.Animation */, ast, sourceSpan, handlerSpan, keySpan));
15336
15352
  if (eventName.length === 0) {
15337
15353
  this._reportError(`Animation event name is missing in binding`, sourceSpan);
15338
15354
  }
@@ -15350,7 +15366,7 @@ class BindingParser {
15350
15366
  const [target, eventName] = splitAtColon(name, [null, name]);
15351
15367
  const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);
15352
15368
  targetMatchableAttrs.push([name, ast.source]);
15353
- targetEvents.push(new ParsedEvent(eventName, target, 0 /* Regular */, ast, sourceSpan, handlerSpan, keySpan));
15369
+ targetEvents.push(new ParsedEvent(eventName, target, 0 /* ParsedEventType.Regular */, ast, sourceSpan, handlerSpan, keySpan));
15354
15370
  // Don't detect directives for event names for now,
15355
15371
  // so don't add the event name to the matchableAttrs
15356
15372
  }
@@ -16431,8 +16447,8 @@ class _I18nVisitor {
16431
16447
  let hasInterpolation = false;
16432
16448
  for (const token of tokens) {
16433
16449
  switch (token.type) {
16434
- case 8 /* INTERPOLATION */:
16435
- case 17 /* ATTR_VALUE_INTERPOLATION */:
16450
+ case 8 /* TokenType.INTERPOLATION */:
16451
+ case 17 /* TokenType.ATTR_VALUE_INTERPOLATION */:
16436
16452
  hasInterpolation = true;
16437
16453
  const expression = token.parts[1];
16438
16454
  const baseName = extractPlaceholderName(expression) || 'INTERPOLATION';
@@ -16761,25 +16777,78 @@ function parseI18nMeta(meta = '') {
16761
16777
  function i18nMetaToJSDoc(meta) {
16762
16778
  const tags = [];
16763
16779
  if (meta.description) {
16764
- tags.push({ tagName: "desc" /* Desc */, text: meta.description });
16780
+ tags.push({ tagName: "desc" /* o.JSDocTagName.Desc */, text: meta.description });
16765
16781
  }
16766
16782
  else {
16767
16783
  // Suppress the JSCompiler warning that a `@desc` was not given for this message.
16768
- tags.push({ tagName: "suppress" /* Suppress */, text: '{msgDescriptions}' });
16784
+ tags.push({ tagName: "suppress" /* o.JSDocTagName.Suppress */, text: '{msgDescriptions}' });
16769
16785
  }
16770
16786
  if (meta.meaning) {
16771
- tags.push({ tagName: "meaning" /* Meaning */, text: meta.meaning });
16787
+ tags.push({ tagName: "meaning" /* o.JSDocTagName.Meaning */, text: meta.meaning });
16772
16788
  }
16773
16789
  return jsDocComment(tags);
16774
16790
  }
16775
16791
 
16776
16792
  /** Closure uses `goog.getMsg(message)` to lookup translations */
16777
16793
  const GOOG_GET_MSG = 'goog.getMsg';
16778
- function createGoogleGetMsgStatements(variable$1, message, closureVar, params) {
16794
+ /**
16795
+ * Generates a `goog.getMsg()` statement and reassignment. The template:
16796
+ *
16797
+ * ```html
16798
+ * <div i18n>Sent from {{ sender }} to <span class="receiver">{{ receiver }}</span></div>
16799
+ * ```
16800
+ *
16801
+ * Generates:
16802
+ *
16803
+ * ```typescript
16804
+ * const MSG_FOO = goog.getMsg(
16805
+ * // Message template.
16806
+ * 'Sent from {$interpolation} to {$startTagSpan}{$interpolation_1}{$closeTagSpan}.',
16807
+ * // Placeholder values, set to magic strings which get replaced by the Angular runtime.
16808
+ * {
16809
+ * 'interpolation': '\uFFFD0\uFFFD',
16810
+ * 'startTagSpan': '\uFFFD1\uFFFD',
16811
+ * 'interpolation_1': '\uFFFD2\uFFFD',
16812
+ * 'closeTagSpan': '\uFFFD3\uFFFD',
16813
+ * },
16814
+ * // Options bag.
16815
+ * {
16816
+ * // Maps each placeholder to the original Angular source code which generates it's value.
16817
+ * original_code: {
16818
+ * 'interpolation': '{{ sender }}',
16819
+ * 'startTagSpan': '<span class="receiver">',
16820
+ * 'interploation_1': '{{ receiver }}',
16821
+ * 'closeTagSpan': '</span>',
16822
+ * },
16823
+ * },
16824
+ * );
16825
+ * const I18N_0 = MSG_FOO;
16826
+ * ```
16827
+ */
16828
+ function createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {
16779
16829
  const messageString = serializeI18nMessageForGetMsg(message);
16780
16830
  const args = [literal(messageString)];
16781
- if (Object.keys(params).length) {
16782
- args.push(mapLiteral(params, true));
16831
+ if (Object.keys(placeholderValues).length) {
16832
+ // Message template parameters containing the magic strings replaced by the Angular runtime with
16833
+ // real data, e.g. `{'interpolation': '\uFFFD0\uFFFD'}`.
16834
+ args.push(mapLiteral(formatI18nPlaceholderNamesInMap(placeholderValues, true /* useCamelCase */), true /* quoted */));
16835
+ // Message options object, which contains original source code for placeholders (as they are
16836
+ // present in a template, e.g.
16837
+ // `{original_code: {'interpolation': '{{ name }}', 'startTagSpan': '<span>'}}`.
16838
+ args.push(mapLiteral({
16839
+ original_code: literalMap(Object.keys(placeholderValues)
16840
+ .map((param) => ({
16841
+ key: formatI18nPlaceholderName(param),
16842
+ quoted: true,
16843
+ value: message.placeholders[param] ?
16844
+ // Get source span for typical placeholder if it exists.
16845
+ literal(message.placeholders[param].sourceSpan.toString()) :
16846
+ // Otherwise must be an ICU expression, get it's source span.
16847
+ literal(message.placeholderToMessage[param]
16848
+ .nodes.map((node) => node.sourceSpan.toString())
16849
+ .join('')),
16850
+ }))),
16851
+ }));
16783
16852
  }
16784
16853
  // /**
16785
16854
  // * @desc description of message
@@ -16989,7 +17058,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
16989
17058
  statements.push(new ExpressionStatement(invokeInstruction(null, Identifiers.resetView, [])));
16990
17059
  }
16991
17060
  }
16992
- const eventName = type === 1 /* Animation */ ? prepareSyntheticListenerName(name, phase) : name;
17061
+ const eventName = type === 1 /* ParsedEventType.Animation */ ? prepareSyntheticListenerName(name, phase) : name;
16993
17062
  const fnName = handlerName && sanitizeIdentifier(handlerName);
16994
17063
  const fnArgs = [];
16995
17064
  if (implicitReceiverAccesses.has(eventArgumentName)) {
@@ -17141,10 +17210,10 @@ class TemplateDefinitionBuilder {
17141
17210
  const creationVariables = this._bindingScope.viewSnapshotStatements();
17142
17211
  const updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);
17143
17212
  const creationBlock = creationStatements.length > 0 ?
17144
- [renderFlagCheckIfStmt(1 /* Create */, creationVariables.concat(creationStatements))] :
17213
+ [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, creationVariables.concat(creationStatements))] :
17145
17214
  [];
17146
17215
  const updateBlock = updateStatements.length > 0 ?
17147
- [renderFlagCheckIfStmt(2 /* Update */, updateVariables.concat(updateStatements))] :
17216
+ [renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(updateStatements))] :
17148
17217
  [];
17149
17218
  return fn(
17150
17219
  // i.e. (rf: RenderFlags, ctx: any)
@@ -17182,7 +17251,7 @@ class TemplateDefinitionBuilder {
17182
17251
  const scopedName = this._bindingScope.freshReferenceName();
17183
17252
  const retrievalLevel = this.level;
17184
17253
  const lhs = variable(variable$1.name + scopedName);
17185
- this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* CONTEXT */, (scope, relativeLevel) => {
17254
+ this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* DeclarationPriority.CONTEXT */, (scope, relativeLevel) => {
17186
17255
  let rhs;
17187
17256
  if (scope.bindingLevel === retrievalLevel) {
17188
17257
  if (scope.isListenerScope() && scope.hasRestoreViewVariable()) {
@@ -17435,7 +17504,7 @@ class TemplateDefinitionBuilder {
17435
17504
  element.inputs.forEach(input => {
17436
17505
  const stylingInputWasSet = stylingBuilder.registerBoundInput(input);
17437
17506
  if (!stylingInputWasSet) {
17438
- if (input.type === 0 /* Property */ && input.i18n) {
17507
+ if (input.type === 0 /* BindingType.Property */ && input.i18n) {
17439
17508
  boundI18nAttrs.push(input);
17440
17509
  }
17441
17510
  else {
@@ -17508,7 +17577,7 @@ class TemplateDefinitionBuilder {
17508
17577
  // Generate element input bindings
17509
17578
  allOtherInputs.forEach(input => {
17510
17579
  const inputType = input.type;
17511
- if (inputType === 4 /* Animation */) {
17580
+ if (inputType === 4 /* BindingType.Animation */) {
17512
17581
  const value = input.value.visit(this._valueConverter);
17513
17582
  // animation bindings can be presented in the following formats:
17514
17583
  // 1. [@binding]="fooExp"
@@ -17535,7 +17604,7 @@ class TemplateDefinitionBuilder {
17535
17604
  if (value !== undefined) {
17536
17605
  const params = [];
17537
17606
  const [attrNamespace, attrName] = splitNsName(input.name);
17538
- const isAttributeBinding = inputType === 1 /* Attribute */;
17607
+ const isAttributeBinding = inputType === 1 /* BindingType.Attribute */;
17539
17608
  const sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);
17540
17609
  if (sanitizationRef)
17541
17610
  params.push(sanitizationRef);
@@ -17551,7 +17620,7 @@ class TemplateDefinitionBuilder {
17551
17620
  }
17552
17621
  }
17553
17622
  this.allocateBindingSlots(value);
17554
- if (inputType === 0 /* Property */) {
17623
+ if (inputType === 0 /* BindingType.Property */) {
17555
17624
  if (value instanceof Interpolation) {
17556
17625
  // prop="{{value}}" and friends
17557
17626
  this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);
@@ -17565,7 +17634,7 @@ class TemplateDefinitionBuilder {
17565
17634
  });
17566
17635
  }
17567
17636
  }
17568
- else if (inputType === 1 /* Attribute */) {
17637
+ else if (inputType === 1 /* BindingType.Attribute */) {
17569
17638
  if (value instanceof Interpolation && getInterpolationArgsLength(value) > 1) {
17570
17639
  // attr.name="text{{value}}" and friends
17571
17640
  this.interpolatedUpdateInstruction(getAttributeInterpolationExpression(value), elementIndex, attrName, input, value, params);
@@ -17730,7 +17799,7 @@ class TemplateDefinitionBuilder {
17730
17799
  // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values
17731
17800
  const transformFn = (raw) => {
17732
17801
  const params = { ...vars, ...placeholders };
17733
- const formatted = i18nFormatPlaceholderNames(params, /* useCamelCase */ false);
17802
+ const formatted = formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false);
17734
17803
  return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
17735
17804
  };
17736
17805
  // in case the whole i18n message is a single ICU - we do not need to
@@ -17961,13 +18030,13 @@ class TemplateDefinitionBuilder {
17961
18030
  const input = inputs[i];
17962
18031
  // We don't want the animation and attribute bindings in the
17963
18032
  // attributes array since they aren't used for directive matching.
17964
- if (input.type !== 4 /* Animation */ && input.type !== 1 /* Attribute */) {
18033
+ if (input.type !== 4 /* BindingType.Animation */ && input.type !== 1 /* BindingType.Attribute */) {
17965
18034
  addAttrExpr(input.name);
17966
18035
  }
17967
18036
  }
17968
18037
  for (let i = 0; i < outputs.length; i++) {
17969
18038
  const output = outputs[i];
17970
- if (output.type !== 1 /* Animation */) {
18039
+ if (output.type !== 1 /* ParsedEventType.Animation */) {
17971
18040
  addAttrExpr(output.name);
17972
18041
  }
17973
18042
  }
@@ -17976,15 +18045,15 @@ class TemplateDefinitionBuilder {
17976
18045
  // to the expressions. The marker is important because it tells the runtime
17977
18046
  // code that this is where attributes without values start...
17978
18047
  if (attrExprs.length !== attrsLengthBeforeInputs) {
17979
- attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* Bindings */));
18048
+ attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* core.AttributeMarker.Bindings */));
17980
18049
  }
17981
18050
  }
17982
18051
  if (templateAttrs.length) {
17983
- attrExprs.push(literal(4 /* Template */));
18052
+ attrExprs.push(literal(4 /* core.AttributeMarker.Template */));
17984
18053
  templateAttrs.forEach(attr => addAttrExpr(attr.name));
17985
18054
  }
17986
18055
  if (boundI18nAttrs.length) {
17987
- attrExprs.push(literal(6 /* I18n */));
18056
+ attrExprs.push(literal(6 /* core.AttributeMarker.I18n */));
17988
18057
  boundI18nAttrs.forEach(attr => addAttrExpr(attr.name));
17989
18058
  }
17990
18059
  return attrExprs;
@@ -18015,7 +18084,7 @@ class TemplateDefinitionBuilder {
18015
18084
  const variableName = this._bindingScope.freshReferenceName();
18016
18085
  const retrievalLevel = this.level;
18017
18086
  const lhs = variable(variableName);
18018
- this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DEFAULT */, (scope, relativeLevel) => {
18087
+ this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DeclarationPriority.DEFAULT */, (scope, relativeLevel) => {
18019
18088
  // e.g. nextContext(2);
18020
18089
  const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];
18021
18090
  // e.g. const $foo$ = reference(1);
@@ -18029,7 +18098,7 @@ class TemplateDefinitionBuilder {
18029
18098
  prepareListenerParameter(tagName, outputAst, index) {
18030
18099
  return () => {
18031
18100
  const eventName = outputAst.name;
18032
- const bindingFnName = outputAst.type === 1 /* Animation */ ?
18101
+ const bindingFnName = outputAst.type === 1 /* ParsedEventType.Animation */ ?
18033
18102
  // synthetic @listener.foo values are treated the exact same as are standard listeners
18034
18103
  prepareSyntheticListenerFunctionName(eventName, outputAst.phase) :
18035
18104
  sanitizeIdentifier(eventName);
@@ -18149,7 +18218,7 @@ function getAttributeNameLiterals(name) {
18149
18218
  const nameLiteral = literal(attributeName);
18150
18219
  if (attributeNamespace) {
18151
18220
  return [
18152
- literal(0 /* NamespaceURI */), literal(attributeNamespace), nameLiteral
18221
+ literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral
18153
18222
  ];
18154
18223
  }
18155
18224
  return [nameLiteral];
@@ -18218,7 +18287,7 @@ class BindingScope {
18218
18287
  * @param declareLocalCallback The callback to invoke when declaring this local var
18219
18288
  * @param localRef Whether or not this is a local ref
18220
18289
  */
18221
- set(retrievalLevel, name, lhs, priority = 0 /* DEFAULT */, declareLocalCallback, localRef) {
18290
+ set(retrievalLevel, name, lhs, priority = 0 /* DeclarationPriority.DEFAULT */, declareLocalCallback, localRef) {
18222
18291
  if (this.map.has(name)) {
18223
18292
  if (localRef) {
18224
18293
  // Do not throw an error if it's a local ref and do not update existing value,
@@ -18274,7 +18343,7 @@ class BindingScope {
18274
18343
  return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;
18275
18344
  }
18276
18345
  maybeGenerateSharedContextVar(value) {
18277
- if (value.priority === 1 /* CONTEXT */ &&
18346
+ if (value.priority === 1 /* DeclarationPriority.CONTEXT */ &&
18278
18347
  value.retrievalLevel < this.bindingLevel) {
18279
18348
  const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);
18280
18349
  if (sharedCtxObj) {
@@ -18295,7 +18364,7 @@ class BindingScope {
18295
18364
  return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];
18296
18365
  },
18297
18366
  declare: false,
18298
- priority: 2 /* SHARED_CONTEXT */,
18367
+ priority: 2 /* DeclarationPriority.SHARED_CONTEXT */,
18299
18368
  });
18300
18369
  }
18301
18370
  getComponentProperty(name) {
@@ -18392,7 +18461,7 @@ function getNgProjectAsLiteral(attribute) {
18392
18461
  // Parse the attribute value into a CssSelectorList. Note that we only take the
18393
18462
  // first selector, because we don't support multiple selectors in ngProjectAs.
18394
18463
  const parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];
18395
- return [literal(5 /* ProjectAs */), asLiteral(parsedR3Selector)];
18464
+ return [literal(5 /* core.AttributeMarker.ProjectAs */), asLiteral(parsedR3Selector)];
18396
18465
  }
18397
18466
  /**
18398
18467
  * Gets the instruction to generate for an interpolated property
@@ -18651,7 +18720,7 @@ const NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';
18651
18720
  function getTranslationDeclStmts(message, variable, closureVar, params = {}, transformFn) {
18652
18721
  const statements = [
18653
18722
  declareI18nVariable(variable),
18654
- ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, i18nFormatPlaceholderNames(params, /* useCamelCase */ true)), createLocalizeStatements(variable, message, i18nFormatPlaceholderNames(params, /* useCamelCase */ false))),
18723
+ ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, params), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false))),
18655
18724
  ];
18656
18725
  if (transformFn) {
18657
18726
  statements.push(new ExpressionStatement(variable.set(transformFn(variable))));
@@ -18745,6 +18814,10 @@ function addFeatures(definitionMap, meta) {
18745
18814
  if (meta.lifecycle.usesOnChanges) {
18746
18815
  features.push(importExpr(Identifiers.NgOnChangesFeature));
18747
18816
  }
18817
+ // TODO: better way of differentiating component vs directive metadata.
18818
+ if (meta.hasOwnProperty('template') && meta.isStandalone) {
18819
+ features.push(importExpr(Identifiers.StandaloneFeature));
18820
+ }
18748
18821
  if (features.length) {
18749
18822
  definitionMap.set('features', literalArr(features));
18750
18823
  }
@@ -18808,17 +18881,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18808
18881
  definitionMap.set('consts', constsExpr);
18809
18882
  }
18810
18883
  definitionMap.set('template', templateFunctionExpression);
18811
- // e.g. `directives: [MyDirective]`
18812
- if (meta.directives.length > 0) {
18813
- const directivesList = literalArr(meta.directives.map(dir => dir.type));
18814
- const directivesExpr = compileDeclarationList(directivesList, meta.declarationListEmitMode);
18815
- definitionMap.set('directives', directivesExpr);
18816
- }
18817
- // e.g. `pipes: [MyPipe]`
18818
- if (meta.pipes.size > 0) {
18819
- const pipesList = literalArr(Array.from(meta.pipes.values()));
18820
- const pipesExpr = compileDeclarationList(pipesList, meta.declarationListEmitMode);
18821
- definitionMap.set('pipes', pipesExpr);
18884
+ if (meta.declarations.length > 0) {
18885
+ definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));
18822
18886
  }
18823
18887
  if (meta.encapsulation === null) {
18824
18888
  meta.encapsulation = ViewEncapsulation.Emulated;
@@ -18828,8 +18892,15 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18828
18892
  const styleValues = meta.encapsulation == ViewEncapsulation.Emulated ?
18829
18893
  compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) :
18830
18894
  meta.styles;
18831
- const strings = styleValues.map(str => constantPool.getConstLiteral(literal(str)));
18832
- definitionMap.set('styles', literalArr(strings));
18895
+ const styleNodes = styleValues.reduce((result, style) => {
18896
+ if (style.trim().length > 0) {
18897
+ result.push(constantPool.getConstLiteral(literal(style)));
18898
+ }
18899
+ return result;
18900
+ }, []);
18901
+ if (styleNodes.length > 0) {
18902
+ definitionMap.set('styles', literalArr(styleNodes));
18903
+ }
18833
18904
  }
18834
18905
  else if (meta.encapsulation === ViewEncapsulation.Emulated) {
18835
18906
  // If there is no style, don't generate css selectors on elements
@@ -18856,8 +18927,9 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18856
18927
  * to be consumed by upstream compilations.
18857
18928
  */
18858
18929
  function createComponentType(meta) {
18859
- const typeParams = createDirectiveTypeParams(meta);
18930
+ const typeParams = createBaseDirectiveTypeParams(meta);
18860
18931
  typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
18932
+ typeParams.push(expressionType(literal(meta.isStandalone)));
18861
18933
  return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
18862
18934
  }
18863
18935
  /**
@@ -18866,13 +18938,13 @@ function createComponentType(meta) {
18866
18938
  */
18867
18939
  function compileDeclarationList(list, mode) {
18868
18940
  switch (mode) {
18869
- case 0 /* Direct */:
18941
+ case 0 /* DeclarationListEmitMode.Direct */:
18870
18942
  // directives: [MyDir],
18871
18943
  return list;
18872
- case 1 /* Closure */:
18944
+ case 1 /* DeclarationListEmitMode.Closure */:
18873
18945
  // directives: function () { return [MyDir]; }
18874
18946
  return fn([], [new ReturnStatement(list)]);
18875
- case 2 /* ClosureResolved */:
18947
+ case 2 /* DeclarationListEmitMode.ClosureResolved */:
18876
18948
  // directives: function () { return [MyDir].map(ng.resolveForwardRef); }
18877
18949
  const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);
18878
18950
  return fn([], [new ReturnStatement(resolvedList)]);
@@ -18890,9 +18962,9 @@ function prepareQueryParams(query, constantPool) {
18890
18962
  * @param query
18891
18963
  */
18892
18964
  function toQueryFlags(query) {
18893
- return (query.descendants ? 1 /* descendants */ : 0 /* none */) |
18894
- (query.static ? 2 /* isStatic */ : 0 /* none */) |
18895
- (query.emitDistinctChangesOnly ? 4 /* emitDistinctChangesOnly */ : 0 /* none */);
18965
+ return (query.descendants ? 1 /* QueryFlags.descendants */ : 0 /* QueryFlags.none */) |
18966
+ (query.static ? 2 /* QueryFlags.isStatic */ : 0 /* QueryFlags.none */) |
18967
+ (query.emitDistinctChangesOnly ? 4 /* QueryFlags.emitDistinctChangesOnly */ : 0 /* QueryFlags.none */);
18896
18968
  }
18897
18969
  function convertAttributesToExpressions(attributes) {
18898
18970
  const values = [];
@@ -18926,8 +18998,8 @@ function createContentQueriesFunction(queries, constantPool, name) {
18926
18998
  new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),
18927
18999
  new FnParam('dirIndex', null)
18928
19000
  ], [
18929
- renderFlagCheckIfStmt(1 /* Create */, createStatements),
18930
- renderFlagCheckIfStmt(2 /* Update */, updateStatements)
19001
+ renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),
19002
+ renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)
18931
19003
  ], INFERRED_TYPE, null, contentQueriesFnName);
18932
19004
  }
18933
19005
  function stringAsType(str) {
@@ -18948,7 +19020,7 @@ function stringArrayAsType(arr) {
18948
19020
  return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) :
18949
19021
  NONE_TYPE;
18950
19022
  }
18951
- function createDirectiveTypeParams(meta) {
19023
+ function createBaseDirectiveTypeParams(meta) {
18952
19024
  // On the type side, remove newlines from the selector as it will need to fit into a TypeScript
18953
19025
  // string literal, which must be on one line.
18954
19026
  const selectorForType = meta.selector !== null ? meta.selector.replace(/\n/g, '') : null;
@@ -18966,7 +19038,11 @@ function createDirectiveTypeParams(meta) {
18966
19038
  * to be consumed by upstream compilations.
18967
19039
  */
18968
19040
  function createDirectiveType(meta) {
18969
- const typeParams = createDirectiveTypeParams(meta);
19041
+ const typeParams = createBaseDirectiveTypeParams(meta);
19042
+ // Directives have no NgContentSelectors slot, but instead express a `never` type
19043
+ // so that future fields align.
19044
+ typeParams.push(NONE_TYPE);
19045
+ typeParams.push(expressionType(literal(meta.isStandalone)));
18970
19046
  return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
18971
19047
  }
18972
19048
  // Define and update any view queries
@@ -18989,8 +19065,8 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
18989
19065
  });
18990
19066
  const viewQueryFnName = name ? `${name}_Query` : null;
18991
19067
  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [
18992
- renderFlagCheckIfStmt(1 /* Create */, createStatements),
18993
- renderFlagCheckIfStmt(2 /* Update */, updateStatements)
19068
+ renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),
19069
+ renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)
18994
19070
  ], INFERRED_TYPE, null, viewQueryFnName);
18995
19071
  }
18996
19072
  // Return a host binding function or null if one is not necessary.
@@ -19130,10 +19206,10 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
19130
19206
  const hostBindingsFnName = name ? `${name}_HostBindings` : null;
19131
19207
  const statements = [];
19132
19208
  if (createInstructions.length > 0) {
19133
- statements.push(renderFlagCheckIfStmt(1 /* Create */, getInstructionStatements(createInstructions)));
19209
+ statements.push(renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, getInstructionStatements(createInstructions)));
19134
19210
  }
19135
19211
  if (updateInstructions.length > 0) {
19136
- statements.push(renderFlagCheckIfStmt(2 /* Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));
19212
+ statements.push(renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));
19137
19213
  }
19138
19214
  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);
19139
19215
  }
@@ -19174,12 +19250,12 @@ function createHostListeners(eventBindings, name) {
19174
19250
  const instructions = [];
19175
19251
  for (const binding of eventBindings) {
19176
19252
  let bindingName = binding.name && sanitizeIdentifier(binding.name);
19177
- const bindingFnName = binding.type === 1 /* Animation */ ?
19253
+ const bindingFnName = binding.type === 1 /* ParsedEventType.Animation */ ?
19178
19254
  prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) :
19179
19255
  bindingName;
19180
19256
  const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;
19181
19257
  const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);
19182
- if (binding.type == 1 /* Animation */) {
19258
+ if (binding.type == 1 /* ParsedEventType.Animation */) {
19183
19259
  syntheticListenerParams.push(params);
19184
19260
  }
19185
19261
  else {
@@ -19228,7 +19304,7 @@ function parseHostBindings(host) {
19228
19304
  }
19229
19305
  }
19230
19306
  }
19231
- else if (matches[1 /* Binding */] != null) {
19307
+ else if (matches[1 /* HostBindingGroup.Binding */] != null) {
19232
19308
  if (typeof value !== 'string') {
19233
19309
  // TODO(alxhub): make this a diagnostic.
19234
19310
  throw new Error(`Property binding must be string`);
@@ -19236,14 +19312,14 @@ function parseHostBindings(host) {
19236
19312
  // synthetic properties (the ones that have a `@` as a prefix)
19237
19313
  // are still treated the same as regular properties. Therefore
19238
19314
  // there is no point in storing them in a separate map.
19239
- properties[matches[1 /* Binding */]] = value;
19315
+ properties[matches[1 /* HostBindingGroup.Binding */]] = value;
19240
19316
  }
19241
- else if (matches[2 /* Event */] != null) {
19317
+ else if (matches[2 /* HostBindingGroup.Event */] != null) {
19242
19318
  if (typeof value !== 'string') {
19243
19319
  // TODO(alxhub): make this a diagnostic.
19244
19320
  throw new Error(`Event binding must be string`);
19245
19321
  }
19246
- listeners[matches[2 /* Event */]] = value;
19322
+ listeners[matches[2 /* HostBindingGroup.Event */]] = value;
19247
19323
  }
19248
19324
  }
19249
19325
  return { attributes, listeners, properties, specialAttributes };
@@ -19328,10 +19404,10 @@ class CompilerFacadeImpl {
19328
19404
  internalType: new WrappedNodeExpr(facade.type),
19329
19405
  typeArgumentCount: facade.typeArgumentCount,
19330
19406
  providedIn: computeProvidedIn(facade.providedIn),
19331
- useClass: convertToProviderExpression(facade, USE_CLASS),
19332
- useFactory: wrapExpression(facade, USE_FACTORY),
19333
- useValue: convertToProviderExpression(facade, USE_VALUE),
19334
- useExisting: convertToProviderExpression(facade, USE_EXISTING),
19407
+ useClass: convertToProviderExpression(facade, 'useClass'),
19408
+ useFactory: wrapExpression(facade, 'useFactory'),
19409
+ useValue: convertToProviderExpression(facade, 'useValue'),
19410
+ useExisting: convertToProviderExpression(facade, 'useExisting'),
19335
19411
  deps: facade.deps?.map(convertR3DependencyMetadata),
19336
19412
  },
19337
19413
  /* resolveForwardRefs */ true);
@@ -19344,10 +19420,10 @@ class CompilerFacadeImpl {
19344
19420
  internalType: new WrappedNodeExpr(facade.type),
19345
19421
  typeArgumentCount: 0,
19346
19422
  providedIn: computeProvidedIn(facade.providedIn),
19347
- useClass: convertToProviderExpression(facade, USE_CLASS),
19348
- useFactory: wrapExpression(facade, USE_FACTORY),
19349
- useValue: convertToProviderExpression(facade, USE_VALUE),
19350
- useExisting: convertToProviderExpression(facade, USE_EXISTING),
19423
+ useClass: convertToProviderExpression(facade, 'useClass'),
19424
+ useFactory: wrapExpression(facade, 'useFactory'),
19425
+ useValue: convertToProviderExpression(facade, 'useValue'),
19426
+ useExisting: convertToProviderExpression(facade, 'useExisting'),
19351
19427
  deps: facade.deps?.map(convertR3DeclareDependencyMetadata),
19352
19428
  },
19353
19429
  /* resolveForwardRefs */ true);
@@ -19414,7 +19490,8 @@ class CompilerFacadeImpl {
19414
19490
  ...convertDirectiveFacadeToMetadata(facade),
19415
19491
  selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),
19416
19492
  template,
19417
- declarationListEmitMode: 0 /* Direct */,
19493
+ declarations: facade.declarations.map(convertDeclarationFacadeToMetadata),
19494
+ declarationListEmitMode: 0 /* DeclarationListEmitMode.Direct */,
19418
19495
  styles: [...facade.styles, ...template.styles],
19419
19496
  encapsulation: facade.encapsulation,
19420
19497
  interpolation,
@@ -19486,10 +19563,6 @@ class CompilerFacadeImpl {
19486
19563
  return res['$def'];
19487
19564
  }
19488
19565
  }
19489
- const USE_CLASS = Object.keys({ useClass: null })[0];
19490
- const USE_FACTORY = Object.keys({ useFactory: null })[0];
19491
- const USE_VALUE = Object.keys({ useValue: null })[0];
19492
- const USE_EXISTING = Object.keys({ useExisting: null })[0];
19493
19566
  function convertToR3QueryMetadata(facade) {
19494
19567
  return {
19495
19568
  ...facade,
@@ -19515,7 +19588,7 @@ function convertQueryPredicate(predicate) {
19515
19588
  // The predicate is an array of strings so pass it through.
19516
19589
  predicate :
19517
19590
  // The predicate is a type - assume that we will need to unwrap any `forwardRef()` calls.
19518
- createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* Wrapped */);
19591
+ createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* ForwardRefHandling.Wrapped */);
19519
19592
  }
19520
19593
  function convertDirectiveFacadeToMetadata(facade) {
19521
19594
  const inputsFromMetadata = parseInputOutputs(facade.inputs || []);
@@ -19593,31 +19666,57 @@ function convertOpaqueValuesToExpressions(obj) {
19593
19666
  }
19594
19667
  return result;
19595
19668
  }
19596
- function convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl) {
19597
- const { template, interpolation } = parseJitTemplate(declaration.template, declaration.type.name, sourceMapUrl, declaration.preserveWhitespaces ?? false, declaration.interpolation);
19669
+ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {
19670
+ const { template, interpolation } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation);
19671
+ const declarations = [];
19672
+ if (decl.dependencies) {
19673
+ for (const innerDep of decl.dependencies) {
19674
+ switch (innerDep.kind) {
19675
+ case 'directive':
19676
+ case 'component':
19677
+ declarations.push(convertDirectiveDeclarationToMetadata(innerDep));
19678
+ break;
19679
+ case 'pipe':
19680
+ declarations.push(convertPipeDeclarationToMetadata(innerDep));
19681
+ break;
19682
+ }
19683
+ }
19684
+ }
19685
+ else if (decl.components || decl.directives || decl.pipes) {
19686
+ // Existing declarations on NPM may not be using the new `dependencies` merged field, and may
19687
+ // have separate fields for dependencies instead. Unify them for JIT compilation.
19688
+ decl.components &&
19689
+ declarations.push(...decl.components.map(dir => convertDirectiveDeclarationToMetadata(dir, /* isComponent */ true)));
19690
+ decl.directives &&
19691
+ declarations.push(...decl.directives.map(dir => convertDirectiveDeclarationToMetadata(dir)));
19692
+ decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
19693
+ }
19598
19694
  return {
19599
- ...convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan),
19695
+ ...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),
19600
19696
  template,
19601
- styles: declaration.styles ?? [],
19602
- directives: (declaration.components ?? [])
19603
- .concat(declaration.directives ?? [])
19604
- .map(convertUsedDirectiveDeclarationToMetadata),
19605
- pipes: convertUsedPipesToMetadata(declaration.pipes),
19606
- viewProviders: declaration.viewProviders !== undefined ?
19607
- new WrappedNodeExpr(declaration.viewProviders) :
19697
+ styles: decl.styles ?? [],
19698
+ declarations,
19699
+ viewProviders: decl.viewProviders !== undefined ? new WrappedNodeExpr(decl.viewProviders) :
19608
19700
  null,
19609
- animations: declaration.animations !== undefined ? new WrappedNodeExpr(declaration.animations) :
19610
- null,
19611
- changeDetection: declaration.changeDetection ?? ChangeDetectionStrategy.Default,
19612
- encapsulation: declaration.encapsulation ?? ViewEncapsulation.Emulated,
19701
+ animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null,
19702
+ changeDetection: decl.changeDetection ?? ChangeDetectionStrategy.Default,
19703
+ encapsulation: decl.encapsulation ?? ViewEncapsulation.Emulated,
19613
19704
  interpolation,
19614
- declarationListEmitMode: 2 /* ClosureResolved */,
19705
+ declarationListEmitMode: 2 /* DeclarationListEmitMode.ClosureResolved */,
19615
19706
  relativeContextFilePath: '',
19616
19707
  i18nUseExternalIds: true,
19617
19708
  };
19618
19709
  }
19619
- function convertUsedDirectiveDeclarationToMetadata(declaration) {
19710
+ function convertDeclarationFacadeToMetadata(declaration) {
19711
+ return {
19712
+ ...declaration,
19713
+ type: new WrappedNodeExpr(declaration.type),
19714
+ };
19715
+ }
19716
+ function convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {
19620
19717
  return {
19718
+ kind: R3TemplateDependencyKind.Directive,
19719
+ isComponent: isComponent || declaration.kind === 'component',
19621
19720
  selector: declaration.selector,
19622
19721
  type: new WrappedNodeExpr(declaration.type),
19623
19722
  inputs: declaration.inputs ?? [],
@@ -19625,16 +19724,24 @@ function convertUsedDirectiveDeclarationToMetadata(declaration) {
19625
19724
  exportAs: declaration.exportAs ?? null,
19626
19725
  };
19627
19726
  }
19628
- function convertUsedPipesToMetadata(declaredPipes) {
19629
- const pipes = new Map();
19630
- if (declaredPipes === undefined) {
19631
- return pipes;
19632
- }
19633
- for (const pipeName of Object.keys(declaredPipes)) {
19634
- const pipeType = declaredPipes[pipeName];
19635
- pipes.set(pipeName, new WrappedNodeExpr(pipeType));
19727
+ function convertPipeMapToMetadata(pipes) {
19728
+ if (!pipes) {
19729
+ return [];
19636
19730
  }
19637
- return pipes;
19731
+ return Object.keys(pipes).map(name => {
19732
+ return {
19733
+ kind: R3TemplateDependencyKind.Pipe,
19734
+ name,
19735
+ type: new WrappedNodeExpr(pipes[name]),
19736
+ };
19737
+ });
19738
+ }
19739
+ function convertPipeDeclarationToMetadata(pipe) {
19740
+ return {
19741
+ kind: R3TemplateDependencyKind.Pipe,
19742
+ name: pipe.name,
19743
+ type: new WrappedNodeExpr(pipe.type),
19744
+ };
19638
19745
  }
19639
19746
  function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
19640
19747
  const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
@@ -19656,7 +19763,7 @@ function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces,
19656
19763
  */
19657
19764
  function convertToProviderExpression(obj, property) {
19658
19765
  if (obj.hasOwnProperty(property)) {
19659
- return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* None */);
19766
+ return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* ForwardRefHandling.None */);
19660
19767
  }
19661
19768
  else {
19662
19769
  return undefined;
@@ -19674,7 +19781,7 @@ function computeProvidedIn(providedIn) {
19674
19781
  const expression = typeof providedIn === 'function' ? new WrappedNodeExpr(providedIn) :
19675
19782
  new LiteralExpr(providedIn ?? null);
19676
19783
  // See `convertToProviderExpression()` for why this uses `ForwardRefHandling.None`.
19677
- return createMayBeForwardRefExpression(expression, 0 /* None */);
19784
+ return createMayBeForwardRefExpression(expression, 0 /* ForwardRefHandling.None */);
19678
19785
  }
19679
19786
  function convertR3DependencyMetadataArray(facades) {
19680
19787
  return facades == null ? null : facades.map(convertR3DependencyMetadata);
@@ -19781,7 +19888,7 @@ function publishFacade(global) {
19781
19888
  * Use of this source code is governed by an MIT-style license that can be
19782
19889
  * found in the LICENSE file at https://angular.io/license
19783
19890
  */
19784
- const VERSION = new Version('14.0.0-next.13');
19891
+ const VERSION = new Version('14.0.0-next.16');
19785
19892
 
19786
19893
  /**
19787
19894
  * @license
@@ -21278,14 +21385,6 @@ var FactoryTarget;
21278
21385
  * found in the LICENSE file at https://angular.io/license
21279
21386
  */
21280
21387
 
21281
- /**
21282
- * @license
21283
- * Copyright Google LLC All Rights Reserved.
21284
- *
21285
- * Use of this source code is governed by an MIT-style license that can be
21286
- * found in the LICENSE file at https://angular.io/license
21287
- */
21288
-
21289
21388
  /**
21290
21389
  * @license
21291
21390
  * Copyright Google LLC All Rights Reserved.
@@ -21822,7 +21921,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21822
21921
  function compileDeclareClassMetadata(metadata) {
21823
21922
  const definitionMap = new DefinitionMap();
21824
21923
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21825
- definitionMap.set('version', literal('14.0.0-next.13'));
21924
+ definitionMap.set('version', literal('14.0.0-next.16'));
21826
21925
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21827
21926
  definitionMap.set('type', metadata.type);
21828
21927
  definitionMap.set('decorators', metadata.decorators);
@@ -21922,7 +22021,7 @@ function compileDependency(dep) {
21922
22021
  *
21923
22022
  * Do not include any prerelease in these versions as they are ignored.
21924
22023
  */
21925
- const MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';
22024
+ const MINIMUM_PARTIAL_LINKER_VERSION$5 = '14.0.0';
21926
22025
  /**
21927
22026
  * Compile a directive declaration defined by the `R3DirectiveMetadata`.
21928
22027
  */
@@ -21939,9 +22038,12 @@ function compileDeclareDirectiveFromMetadata(meta) {
21939
22038
  function createDirectiveDefinitionMap(meta) {
21940
22039
  const definitionMap = new DefinitionMap();
21941
22040
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21942
- definitionMap.set('version', literal('14.0.0-next.13'));
22041
+ definitionMap.set('version', literal('14.0.0-next.16'));
21943
22042
  // e.g. `type: MyDirective`
21944
22043
  definitionMap.set('type', meta.internalType);
22044
+ if (meta.isStandalone) {
22045
+ definitionMap.set('isStandalone', literal(meta.isStandalone));
22046
+ }
21945
22047
  // e.g. `selector: 'some-dir'`
21946
22048
  if (meta.selector !== null) {
21947
22049
  definitionMap.set('selector', literal(meta.selector));
@@ -22046,9 +22148,7 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
22046
22148
  definitionMap.set('isInline', literal(true));
22047
22149
  }
22048
22150
  definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));
22049
- definitionMap.set('components', compileUsedDirectiveMetadata(meta, directive => directive.isComponent === true));
22050
- definitionMap.set('directives', compileUsedDirectiveMetadata(meta, directive => directive.isComponent !== true));
22051
- definitionMap.set('pipes', compileUsedPipeMetadata(meta));
22151
+ definitionMap.set('dependencies', compileUsedDependenciesMetadata(meta));
22052
22152
  definitionMap.set('viewProviders', meta.viewProviders);
22053
22153
  definitionMap.set('animations', meta.animations);
22054
22154
  if (meta.changeDetection !== undefined) {
@@ -22104,43 +22204,35 @@ function computeEndLocation(file, contents) {
22104
22204
  } while (lineStart !== -1);
22105
22205
  return new ParseLocation(file, length, line, length - lastLineStart);
22106
22206
  }
22107
- /**
22108
- * Compiles the directives as registered in the component metadata into an array literal of the
22109
- * individual directives. If the component does not use any directives, then null is returned.
22110
- */
22111
- function compileUsedDirectiveMetadata(meta, predicate) {
22112
- const wrapType = meta.declarationListEmitMode !== 0 /* Direct */ ?
22207
+ function compileUsedDependenciesMetadata(meta) {
22208
+ const wrapType = meta.declarationListEmitMode !== 0 /* DeclarationListEmitMode.Direct */ ?
22113
22209
  generateForwardRef :
22114
22210
  (expr) => expr;
22115
- const directives = meta.directives.filter(predicate);
22116
- return toOptionalLiteralArray(directives, directive => {
22117
- const dirMeta = new DefinitionMap();
22118
- dirMeta.set('type', wrapType(directive.type));
22119
- dirMeta.set('selector', literal(directive.selector));
22120
- dirMeta.set('inputs', toOptionalLiteralArray(directive.inputs, literal));
22121
- dirMeta.set('outputs', toOptionalLiteralArray(directive.outputs, literal));
22122
- dirMeta.set('exportAs', toOptionalLiteralArray(directive.exportAs, literal));
22123
- return dirMeta.toLiteralMap();
22211
+ return toOptionalLiteralArray(meta.declarations, decl => {
22212
+ switch (decl.kind) {
22213
+ case R3TemplateDependencyKind.Directive:
22214
+ const dirMeta = new DefinitionMap();
22215
+ dirMeta.set('kind', literal(decl.isComponent ? 'component' : 'directive'));
22216
+ dirMeta.set('type', wrapType(decl.type));
22217
+ dirMeta.set('selector', literal(decl.selector));
22218
+ dirMeta.set('inputs', toOptionalLiteralArray(decl.inputs, literal));
22219
+ dirMeta.set('outputs', toOptionalLiteralArray(decl.outputs, literal));
22220
+ dirMeta.set('exportAs', toOptionalLiteralArray(decl.exportAs, literal));
22221
+ return dirMeta.toLiteralMap();
22222
+ case R3TemplateDependencyKind.Pipe:
22223
+ const pipeMeta = new DefinitionMap();
22224
+ pipeMeta.set('kind', literal('pipe'));
22225
+ pipeMeta.set('type', wrapType(decl.type));
22226
+ pipeMeta.set('name', literal(decl.name));
22227
+ return pipeMeta.toLiteralMap();
22228
+ case R3TemplateDependencyKind.NgModule:
22229
+ const ngModuleMeta = new DefinitionMap();
22230
+ ngModuleMeta.set('kind', literal('ngmodule'));
22231
+ ngModuleMeta.set('type', wrapType(decl.type));
22232
+ return ngModuleMeta.toLiteralMap();
22233
+ }
22124
22234
  });
22125
22235
  }
22126
- /**
22127
- * Compiles the pipes as registered in the component metadata into an object literal, where the
22128
- * pipe's name is used as key and a reference to its type as value. If the component does not use
22129
- * any pipes, then null is returned.
22130
- */
22131
- function compileUsedPipeMetadata(meta) {
22132
- if (meta.pipes.size === 0) {
22133
- return null;
22134
- }
22135
- const wrapType = meta.declarationListEmitMode !== 0 /* Direct */ ?
22136
- generateForwardRef :
22137
- (expr) => expr;
22138
- const entries = [];
22139
- for (const [name, pipe] of meta.pipes) {
22140
- entries.push({ key: name, value: wrapType(pipe), quoted: true });
22141
- }
22142
- return literalMap(entries);
22143
- }
22144
22236
 
22145
22237
  /**
22146
22238
  * @license
@@ -22160,7 +22252,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22160
22252
  function compileDeclareFactoryFunction(meta) {
22161
22253
  const definitionMap = new DefinitionMap();
22162
22254
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22163
- definitionMap.set('version', literal('14.0.0-next.13'));
22255
+ definitionMap.set('version', literal('14.0.0-next.16'));
22164
22256
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22165
22257
  definitionMap.set('type', meta.internalType);
22166
22258
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22202,7 +22294,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22202
22294
  function createInjectableDefinitionMap(meta) {
22203
22295
  const definitionMap = new DefinitionMap();
22204
22296
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22205
- definitionMap.set('version', literal('14.0.0-next.13'));
22297
+ definitionMap.set('version', literal('14.0.0-next.16'));
22206
22298
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22207
22299
  definitionMap.set('type', meta.internalType);
22208
22300
  // Only generate providedIn property if it has a non-null value
@@ -22260,7 +22352,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22260
22352
  function createInjectorDefinitionMap(meta) {
22261
22353
  const definitionMap = new DefinitionMap();
22262
22354
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22263
- definitionMap.set('version', literal('14.0.0-next.13'));
22355
+ definitionMap.set('version', literal('14.0.0-next.16'));
22264
22356
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22265
22357
  definitionMap.set('type', meta.internalType);
22266
22358
  definitionMap.set('providers', meta.providers);
@@ -22284,7 +22376,7 @@ function createInjectorDefinitionMap(meta) {
22284
22376
  *
22285
22377
  * Do not include any prerelease in these versions as they are ignored.
22286
22378
  */
22287
- const MINIMUM_PARTIAL_LINKER_VERSION$1 = '12.0.0';
22379
+ const MINIMUM_PARTIAL_LINKER_VERSION$1 = '14.0.0';
22288
22380
  function compileDeclareNgModuleFromMetadata(meta) {
22289
22381
  const definitionMap = createNgModuleDefinitionMap(meta);
22290
22382
  const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);
@@ -22297,7 +22389,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22297
22389
  function createNgModuleDefinitionMap(meta) {
22298
22390
  const definitionMap = new DefinitionMap();
22299
22391
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22300
- definitionMap.set('version', literal('14.0.0-next.13'));
22392
+ definitionMap.set('version', literal('14.0.0-next.16'));
22301
22393
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22302
22394
  definitionMap.set('type', meta.internalType);
22303
22395
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22339,7 +22431,7 @@ function createNgModuleDefinitionMap(meta) {
22339
22431
  *
22340
22432
  * Do not include any prerelease in these versions as they are ignored.
22341
22433
  */
22342
- const MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
22434
+ const MINIMUM_PARTIAL_LINKER_VERSION = '14.0.0';
22343
22435
  /**
22344
22436
  * Compile a Pipe declaration defined by the `R3PipeMetadata`.
22345
22437
  */
@@ -22355,10 +22447,13 @@ function compileDeclarePipeFromMetadata(meta) {
22355
22447
  function createPipeDefinitionMap(meta) {
22356
22448
  const definitionMap = new DefinitionMap();
22357
22449
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22358
- definitionMap.set('version', literal('14.0.0-next.13'));
22450
+ definitionMap.set('version', literal('14.0.0-next.16'));
22359
22451
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22360
22452
  // e.g. `type: MyPipe`
22361
22453
  definitionMap.set('type', meta.internalType);
22454
+ if (meta.isStandalone) {
22455
+ definitionMap.set('isStandalone', literal(meta.isStandalone));
22456
+ }
22362
22457
  // e.g. `name: "myPipe"`
22363
22458
  definitionMap.set('name', literal(meta.pipeName));
22364
22459
  if (meta.pure === false) {
@@ -22405,5 +22500,5 @@ publishFacade(_global);
22405
22500
  * found in the LICENSE file at https://angular.io/license
22406
22501
  */
22407
22502
 
22408
- export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
22503
+ export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
22409
22504
  //# sourceMappingURL=compiler.mjs.map