@angular/core 17.0.6 → 17.0.7

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 (60) hide show
  1. package/esm2022/primitives/signals/src/signal.mjs +2 -9
  2. package/esm2022/src/application/application_config.mjs +21 -0
  3. package/esm2022/src/application/application_init.mjs +188 -0
  4. package/esm2022/src/application/application_module.mjs +29 -0
  5. package/esm2022/src/application/application_ref.mjs +509 -0
  6. package/esm2022/src/application/application_tokens.mjs +121 -0
  7. package/esm2022/src/application/create_application.mjs +102 -0
  8. package/esm2022/src/change_detection/scheduling.mjs +103 -0
  9. package/esm2022/src/core.mjs +10 -7
  10. package/esm2022/src/core_private_export.mjs +5 -3
  11. package/esm2022/src/core_reactivity_export_internal.mjs +2 -2
  12. package/esm2022/src/core_render3_private_export.mjs +2 -2
  13. package/esm2022/src/error_handler.mjs +15 -1
  14. package/esm2022/src/hydration/annotate.mjs +1 -1
  15. package/esm2022/src/hydration/api.mjs +2 -2
  16. package/esm2022/src/hydration/cleanup.mjs +1 -1
  17. package/esm2022/src/image_performance_warning.mjs +2 -2
  18. package/esm2022/src/linker/query_list.mjs +8 -6
  19. package/esm2022/src/metadata/do_bootstrap.mjs +1 -1
  20. package/esm2022/src/platform/platform.mjs +135 -0
  21. package/esm2022/src/platform/platform_core_providers.mjs +15 -0
  22. package/esm2022/src/platform/platform_ref.mjs +179 -0
  23. package/esm2022/src/render3/instructions/change_detection.mjs +2 -4
  24. package/esm2022/src/render3/list_reconciliation.mjs +58 -24
  25. package/esm2022/src/render3/util/change_detection_utils.mjs +3 -1
  26. package/esm2022/src/render3/util/misc_utils.mjs +2 -2
  27. package/esm2022/src/render3/view_ref.mjs +7 -1
  28. package/esm2022/src/transfer_state.mjs +2 -2
  29. package/esm2022/src/util/performance.mjs +2 -2
  30. package/esm2022/src/version.mjs +1 -1
  31. package/esm2022/src/zone/ng_zone.mjs +10 -1
  32. package/esm2022/testing/src/component_fixture.mjs +20 -36
  33. package/esm2022/testing/src/logger.mjs +3 -3
  34. package/esm2022/testing/src/test_bed.mjs +5 -6
  35. package/fesm2022/core.mjs +1305 -1272
  36. package/fesm2022/core.mjs.map +1 -1
  37. package/fesm2022/primitives/signals.mjs +2 -9
  38. package/fesm2022/primitives/signals.mjs.map +1 -1
  39. package/fesm2022/rxjs-interop.mjs +1 -1
  40. package/fesm2022/testing.mjs +46 -64
  41. package/fesm2022/testing.mjs.map +1 -1
  42. package/index.d.ts +13 -14
  43. package/package.json +1 -1
  44. package/primitives/signals/index.d.ts +1 -1
  45. package/rxjs-interop/index.d.ts +1 -1
  46. package/schematics/migrations/block-template-entities/bundle.js +627 -476
  47. package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
  48. package/schematics/migrations/compiler-options/bundle.js +13 -13
  49. package/schematics/migrations/transfer-state/bundle.js +13 -13
  50. package/schematics/ng-generate/control-flow-migration/bundle.js +783 -528
  51. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  52. package/schematics/ng-generate/standalone-migration/bundle.js +932 -758
  53. package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
  54. package/testing/index.d.ts +6 -10
  55. package/esm2022/src/application_config.mjs +0 -21
  56. package/esm2022/src/application_init.mjs +0 -188
  57. package/esm2022/src/application_module.mjs +0 -29
  58. package/esm2022/src/application_ref.mjs +0 -997
  59. package/esm2022/src/application_tokens.mjs +0 -121
  60. package/esm2022/src/platform_core_providers.mjs +0 -15
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
63
63
  });
64
64
  };
65
65
 
66
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
66
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
67
67
  var block_template_entities_exports = {};
68
68
  __export(block_template_entities_exports, {
69
69
  default: () => block_template_entities_default
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(block_template_entities_exports);
72
72
  var import_schematics = require("@angular-devkit/schematics");
73
73
  var import_path3 = require("path");
74
74
 
75
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
75
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
76
76
  var import_core = require("@angular-devkit/core");
77
77
  function getProjectTsConfigPaths(tree) {
78
78
  return __async(this, null, function* () {
@@ -152,11 +152,11 @@ function getWorkspace(tree) {
152
152
  });
153
153
  }
154
154
 
155
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
155
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
156
156
  var import_path = require("path");
157
157
  var import_typescript2 = __toESM(require("typescript"), 1);
158
158
 
159
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
159
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
160
160
  var path = __toESM(require("path"), 1);
161
161
  var import_typescript = __toESM(require("typescript"), 1);
162
162
  function parseTsconfigFile(tsconfigPath, basePath) {
@@ -173,7 +173,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
173
173
  return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
174
174
  }
175
175
 
176
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
176
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
177
177
  function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
178
178
  const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
179
179
  return import_typescript2.default.createProgram(rootNames, options, host);
@@ -206,7 +206,7 @@ function canMigrateFile(basePath, sourceFile, program) {
206
206
  return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
207
207
  }
208
208
 
209
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/selector.mjs
209
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
210
210
  var _SELECTOR_REGEXP = new RegExp(
211
211
  `(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
212
212
  "g"
@@ -514,7 +514,7 @@ var SelectorContext = class {
514
514
  }
515
515
  };
516
516
 
517
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/core.mjs
517
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
518
518
  var ViewEncapsulation;
519
519
  (function(ViewEncapsulation2) {
520
520
  ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
@@ -576,7 +576,7 @@ function parseSelectorToR3Selector(selector) {
576
576
  return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
577
577
  }
578
578
 
579
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
579
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
580
580
  var textEncoder;
581
581
  function computeDigest(message) {
582
582
  return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
@@ -816,7 +816,7 @@ function wordAt(bytes, index, endian) {
816
816
  return word;
817
817
  }
818
818
 
819
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
819
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
820
820
  var TypeModifier;
821
821
  (function(TypeModifier2) {
822
822
  TypeModifier2[TypeModifier2["None"] = 0] = "None";
@@ -1771,7 +1771,7 @@ function serializeTags(tags) {
1771
1771
  return out;
1772
1772
  }
1773
1773
 
1774
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/constant_pool.mjs
1774
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
1775
1775
  var CONSTANT_PREFIX = "_c";
1776
1776
  var UNKNOWN_VALUE_KEY = variable("<unknown>");
1777
1777
  var KEY_CONTEXT = {};
@@ -1954,7 +1954,7 @@ function isLongStringLiteral(expr) {
1954
1954
  return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
1955
1955
  }
1956
1956
 
1957
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
1957
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
1958
1958
  var CORE = "@angular/core";
1959
1959
  var _Identifiers = class {
1960
1960
  };
@@ -2587,7 +2587,7 @@ var Identifiers = _Identifiers;
2587
2587
  _Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
2588
2588
  })();
2589
2589
 
2590
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/util.mjs
2590
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
2591
2591
  var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
2592
2592
  function dashCaseToCamelCase(input) {
2593
2593
  return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
@@ -2675,7 +2675,7 @@ function partitionArray(arr, conditionFn) {
2675
2675
  return [truthy, falsy];
2676
2676
  }
2677
2677
 
2678
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/source_map.mjs
2678
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
2679
2679
  var VERSION = 3;
2680
2680
  var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
2681
2681
  var SourceMapGenerator = class {
@@ -2804,7 +2804,7 @@ function toBase64Digit(value) {
2804
2804
  return B64_DIGITS[value];
2805
2805
  }
2806
2806
 
2807
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
2807
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
2808
2808
  var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
2809
2809
  var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
2810
2810
  var _INDENT_WITH = " ";
@@ -3289,7 +3289,7 @@ function _createIndent(count) {
3289
3289
  return res;
3290
3290
  }
3291
3291
 
3292
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/util.mjs
3292
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
3293
3293
  function typeWithParameters(type, numParams) {
3294
3294
  if (numParams === 0) {
3295
3295
  return expressionType(type);
@@ -3354,7 +3354,7 @@ function generateForwardRef(expr) {
3354
3354
  return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
3355
3355
  }
3356
3356
 
3357
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
3357
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
3358
3358
  var R3FactoryDelegateType;
3359
3359
  (function(R3FactoryDelegateType2) {
3360
3360
  R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
@@ -3499,7 +3499,7 @@ function getInjectFn(target) {
3499
3499
  }
3500
3500
  }
3501
3501
 
3502
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
3502
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
3503
3503
  var TagContentType;
3504
3504
  (function(TagContentType2) {
3505
3505
  TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
@@ -3532,7 +3532,7 @@ function mergeNsAndName(prefix, localName) {
3532
3532
  return prefix ? `:${prefix}:${localName}` : localName;
3533
3533
  }
3534
3534
 
3535
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
3535
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
3536
3536
  var Comment = class {
3537
3537
  constructor(value, sourceSpan) {
3538
3538
  this.value = value;
@@ -3913,7 +3913,7 @@ function visitAll(visitor, nodes) {
3913
3913
  return result;
3914
3914
  }
3915
3915
 
3916
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
3916
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
3917
3917
  var Message = class {
3918
3918
  constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
3919
3919
  this.nodes = nodes;
@@ -4073,7 +4073,7 @@ var LocalizeMessageStringVisitor = class {
4073
4073
  }
4074
4074
  };
4075
4075
 
4076
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
4076
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
4077
4077
  var _Visitor = class {
4078
4078
  visitTag(tag) {
4079
4079
  const strAttrs = this._serializeAttributes(tag.attrs);
@@ -4101,12 +4101,12 @@ ${doctype.dtd}
4101
4101
  };
4102
4102
  var _visitor = new _Visitor();
4103
4103
 
4104
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
4104
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
4105
4105
  function toPublicName(internalName) {
4106
4106
  return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
4107
4107
  }
4108
4108
 
4109
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
4109
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
4110
4110
  var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
4111
4111
  var TRANSLATION_VAR_PREFIX = "i18n_";
4112
4112
  var I18N_ATTR = "i18n";
@@ -4208,7 +4208,7 @@ function declareI18nVariable(variable2) {
4208
4208
  return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
4209
4209
  }
4210
4210
 
4211
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
4211
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
4212
4212
  var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
4213
4213
  var TEMPORARY_NAME = "_t";
4214
4214
  var CONTEXT_NAME = "ctx";
@@ -4448,7 +4448,7 @@ function getInstructionStatements(instructions) {
4448
4448
  return statements;
4449
4449
  }
4450
4450
 
4451
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
4451
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
4452
4452
  function compileInjectable(meta, resolveForwardRefs) {
4453
4453
  let result = null;
4454
4454
  const factoryMeta = {
@@ -4533,7 +4533,7 @@ function createFactoryFunction(type) {
4533
4533
  return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
4534
4534
  }
4535
4535
 
4536
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/assertions.mjs
4536
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
4537
4537
  var UNUSABLE_INTERPOLATION_REGEXPS = [
4538
4538
  /^\s*$/,
4539
4539
  /[<>]/,
@@ -4555,7 +4555,7 @@ function assertInterpolationSymbols(identifier, value) {
4555
4555
  }
4556
4556
  }
4557
4557
 
4558
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
4558
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
4559
4559
  var InterpolationConfig = class {
4560
4560
  static fromArray(markers) {
4561
4561
  if (!markers) {
@@ -4572,7 +4572,7 @@ var InterpolationConfig = class {
4572
4572
  var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
4573
4573
  var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
4574
4574
 
4575
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/chars.mjs
4575
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
4576
4576
  var $EOF = 0;
4577
4577
  var $BSPACE = 8;
4578
4578
  var $TAB = 9;
@@ -4654,7 +4654,7 @@ function isQuote(code) {
4654
4654
  return code === $SQ || code === $DQ || code === $BT;
4655
4655
  }
4656
4656
 
4657
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/parse_util.mjs
4657
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
4658
4658
  var ParseLocation = class {
4659
4659
  constructor(file, offset, line, col) {
4660
4660
  this.file = file;
@@ -4801,7 +4801,7 @@ function sanitizeIdentifier(name) {
4801
4801
  return name.replace(/\W/g, "_");
4802
4802
  }
4803
4803
 
4804
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
4804
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
4805
4805
  var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
4806
4806
  var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
4807
4807
  constructor() {
@@ -4894,7 +4894,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
4894
4894
  }
4895
4895
  };
4896
4896
 
4897
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
4897
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
4898
4898
  var policy;
4899
4899
  function getPolicy() {
4900
4900
  if (policy === void 0) {
@@ -4932,7 +4932,7 @@ function newTrustedFunctionForJIT(...args) {
4932
4932
  return fn2.bind(_global);
4933
4933
  }
4934
4934
 
4935
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
4935
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
4936
4936
  var JitEvaluator = class {
4937
4937
  evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
4938
4938
  const converter = new JitEmitterVisitor(refResolver);
@@ -5023,7 +5023,7 @@ function isUseStrictStatement(statement) {
5023
5023
  return statement.isEquivalent(literal("use strict").toStmt());
5024
5024
  }
5025
5025
 
5026
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
5026
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
5027
5027
  function compileInjector(meta) {
5028
5028
  const definitionMap = new DefinitionMap();
5029
5029
  if (meta.providers !== null) {
@@ -5040,7 +5040,7 @@ function createInjectorType(meta) {
5040
5040
  return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
5041
5041
  }
5042
5042
 
5043
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
5043
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
5044
5044
  var R3JitReflector = class {
5045
5045
  constructor(context) {
5046
5046
  this.context = context;
@@ -5056,7 +5056,7 @@ var R3JitReflector = class {
5056
5056
  }
5057
5057
  };
5058
5058
 
5059
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
5059
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
5060
5060
  var R3SelectorScopeMode;
5061
5061
  (function(R3SelectorScopeMode2) {
5062
5062
  R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
@@ -5197,7 +5197,7 @@ function tupleOfTypes(types) {
5197
5197
  return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
5198
5198
  }
5199
5199
 
5200
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
5200
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
5201
5201
  function compilePipeFromMetadata(metadata) {
5202
5202
  const definitionMapValues = [];
5203
5203
  definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
@@ -5218,7 +5218,7 @@ function createPipeType(metadata) {
5218
5218
  ]));
5219
5219
  }
5220
5220
 
5221
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
5221
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
5222
5222
  var R3TemplateDependencyKind;
5223
5223
  (function(R3TemplateDependencyKind2) {
5224
5224
  R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
@@ -5226,7 +5226,7 @@ var R3TemplateDependencyKind;
5226
5226
  R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
5227
5227
  })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
5228
5228
 
5229
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
5229
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
5230
5230
  var ParserError = class {
5231
5231
  constructor(message, input, errLocation, ctxLocation) {
5232
5232
  this.input = input;
@@ -5892,7 +5892,7 @@ var BoundElementProperty = class {
5892
5892
  }
5893
5893
  };
5894
5894
 
5895
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
5895
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
5896
5896
  var _EventHandlerVars = class {
5897
5897
  };
5898
5898
  var EventHandlerVars = _EventHandlerVars;
@@ -6533,7 +6533,7 @@ var BuiltinFunctionCall = class extends Call {
6533
6533
  }
6534
6534
  };
6535
6535
 
6536
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
6536
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
6537
6537
  var _SECURITY_SCHEMA;
6538
6538
  function SECURITY_SCHEMA() {
6539
6539
  if (!_SECURITY_SCHEMA) {
@@ -6591,7 +6591,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
6591
6591
  return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
6592
6592
  }
6593
6593
 
6594
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/shadow_css.mjs
6594
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
6595
6595
  var animationKeywords = /* @__PURE__ */ new Set([
6596
6596
  "inherit",
6597
6597
  "initial",
@@ -7062,7 +7062,7 @@ function repeatGroups(groups, multiples) {
7062
7062
  }
7063
7063
  }
7064
7064
 
7065
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
7065
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
7066
7066
  var OpKind;
7067
7067
  (function(OpKind2) {
7068
7068
  OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
@@ -7134,10 +7134,11 @@ var ExpressionKind;
7134
7134
  ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
7135
7135
  ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
7136
7136
  ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 20] = "SanitizerExpr";
7137
- ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 21] = "SlotLiteralExpr";
7138
- ExpressionKind2[ExpressionKind2["ConditionalCase"] = 22] = "ConditionalCase";
7139
- ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 23] = "DerivedRepeaterVar";
7140
- ExpressionKind2[ExpressionKind2["ConstCollected"] = 24] = "ConstCollected";
7137
+ ExpressionKind2[ExpressionKind2["TrustedValueFnExpr"] = 21] = "TrustedValueFnExpr";
7138
+ ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 22] = "SlotLiteralExpr";
7139
+ ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
7140
+ ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
7141
+ ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
7141
7142
  })(ExpressionKind || (ExpressionKind = {}));
7142
7143
  var VariableFlags;
7143
7144
  (function(VariableFlags2) {
@@ -7156,15 +7157,6 @@ var CompatibilityMode;
7156
7157
  CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
7157
7158
  CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
7158
7159
  })(CompatibilityMode || (CompatibilityMode = {}));
7159
- var SanitizerFn;
7160
- (function(SanitizerFn2) {
7161
- SanitizerFn2[SanitizerFn2["Html"] = 0] = "Html";
7162
- SanitizerFn2[SanitizerFn2["Script"] = 1] = "Script";
7163
- SanitizerFn2[SanitizerFn2["Style"] = 2] = "Style";
7164
- SanitizerFn2[SanitizerFn2["Url"] = 3] = "Url";
7165
- SanitizerFn2[SanitizerFn2["ResourceUrl"] = 4] = "ResourceUrl";
7166
- SanitizerFn2[SanitizerFn2["IframeAttribute"] = 5] = "IframeAttribute";
7167
- })(SanitizerFn || (SanitizerFn = {}));
7168
7160
  var DeferSecondaryKind;
7169
7161
  (function(DeferSecondaryKind2) {
7170
7162
  DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
@@ -7235,7 +7227,7 @@ var TemplateKind;
7235
7227
  TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
7236
7228
  })(TemplateKind || (TemplateKind = {}));
7237
7229
 
7238
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
7230
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
7239
7231
  var ConsumesSlot = Symbol("ConsumesSlot");
7240
7232
  var DependsOnSlotContext = Symbol("DependsOnSlotContext");
7241
7233
  var ConsumesVarsTrait = Symbol("ConsumesVars");
@@ -7267,7 +7259,7 @@ function hasUsesVarOffsetTrait(expr) {
7267
7259
  return expr[UsesVarOffset] === true;
7268
7260
  }
7269
7261
 
7270
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
7262
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
7271
7263
  function createStatementOp(statement) {
7272
7264
  return __spreadValues({
7273
7265
  kind: OpKind.Statement,
@@ -7289,7 +7281,7 @@ var NEW_OP = {
7289
7281
  next: null
7290
7282
  };
7291
7283
 
7292
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
7284
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
7293
7285
  function createInterpolateTextOp(xref, interpolation, sourceSpan) {
7294
7286
  return __spreadValues(__spreadValues(__spreadValues({
7295
7287
  kind: OpKind.InterpolateText,
@@ -7308,7 +7300,7 @@ var Interpolation2 = class {
7308
7300
  }
7309
7301
  }
7310
7302
  };
7311
- function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplate, i18nContext, sourceSpan) {
7303
+ function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
7312
7304
  return __spreadValues({
7313
7305
  kind: OpKind.Binding,
7314
7306
  bindingKind: kind,
@@ -7318,12 +7310,14 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
7318
7310
  unit,
7319
7311
  securityContext,
7320
7312
  isTextAttribute,
7321
- isStructuralTemplate,
7322
- i18nContext,
7313
+ isStructuralTemplateAttribute,
7314
+ templateKind,
7315
+ i18nContext: null,
7316
+ i18nMessage,
7323
7317
  sourceSpan
7324
7318
  }, NEW_OP);
7325
7319
  }
7326
- function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplate, i18nContext, sourceSpan) {
7320
+ function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
7327
7321
  return __spreadValues(__spreadValues(__spreadValues({
7328
7322
  kind: OpKind.Property,
7329
7323
  target,
@@ -7332,8 +7326,10 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
7332
7326
  isAnimationTrigger,
7333
7327
  securityContext,
7334
7328
  sanitizer: null,
7335
- isStructuralTemplate,
7329
+ isStructuralTemplateAttribute,
7330
+ templateKind,
7336
7331
  i18nContext,
7332
+ i18nMessage,
7337
7333
  sourceSpan
7338
7334
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
7339
7335
  }
@@ -7372,7 +7368,7 @@ function createClassMapOp(xref, expression, sourceSpan) {
7372
7368
  sourceSpan
7373
7369
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
7374
7370
  }
7375
- function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplate, i18nContext, sourceSpan) {
7371
+ function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
7376
7372
  return __spreadValues(__spreadValues(__spreadValues({
7377
7373
  kind: OpKind.Attribute,
7378
7374
  target,
@@ -7381,8 +7377,10 @@ function createAttributeOp(target, name, expression, securityContext, isTextAttr
7381
7377
  securityContext,
7382
7378
  sanitizer: null,
7383
7379
  isTextAttribute,
7384
- isStructuralTemplate,
7385
- i18nContext,
7380
+ isStructuralTemplateAttribute,
7381
+ templateKind,
7382
+ i18nContext: null,
7383
+ i18nMessage,
7386
7384
  sourceSpan
7387
7385
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
7388
7386
  }
@@ -7447,7 +7445,7 @@ function createI18nApplyOp(owner, handle, sourceSpan) {
7447
7445
  }, NEW_OP);
7448
7446
  }
7449
7447
 
7450
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
7448
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
7451
7449
  var _a;
7452
7450
  var _b;
7453
7451
  var _c;
@@ -7978,26 +7976,6 @@ var ReadTemporaryExpr = class extends ExpressionBase {
7978
7976
  return r;
7979
7977
  }
7980
7978
  };
7981
- var SanitizerExpr = class extends ExpressionBase {
7982
- constructor(fn2) {
7983
- super();
7984
- this.fn = fn2;
7985
- this.kind = ExpressionKind.SanitizerExpr;
7986
- }
7987
- visitExpression(visitor, context) {
7988
- }
7989
- isEquivalent(e) {
7990
- return e instanceof SanitizerExpr && e.fn === this.fn;
7991
- }
7992
- isConstant() {
7993
- return true;
7994
- }
7995
- clone() {
7996
- return new SanitizerExpr(this.fn);
7997
- }
7998
- transformInternalExpressions() {
7999
- }
8000
- };
8001
7979
  var SlotLiteralExpr = class extends ExpressionBase {
8002
7980
  constructor(slot) {
8003
7981
  super();
@@ -8116,7 +8094,6 @@ function transformExpressionsInOp(op, transform2, flags) {
8116
8094
  case OpKind.ClassProp:
8117
8095
  case OpKind.ClassMap:
8118
8096
  case OpKind.Binding:
8119
- case OpKind.HostProperty:
8120
8097
  if (op.expression instanceof Interpolation2) {
8121
8098
  transformExpressionsInInterpolation(op.expression, transform2, flags);
8122
8099
  } else {
@@ -8124,6 +8101,7 @@ function transformExpressionsInOp(op, transform2, flags) {
8124
8101
  }
8125
8102
  break;
8126
8103
  case OpKind.Property:
8104
+ case OpKind.HostProperty:
8127
8105
  case OpKind.Attribute:
8128
8106
  if (op.expression instanceof Interpolation2) {
8129
8107
  transformExpressionsInInterpolation(op.expression, transform2, flags);
@@ -8165,6 +8143,7 @@ function transformExpressionsInOp(op, transform2, flags) {
8165
8143
  break;
8166
8144
  case OpKind.ExtractedAttribute:
8167
8145
  op.expression = op.expression && transformExpressionsInExpression(op.expression, transform2, flags);
8146
+ op.trustedValueFn = op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform2, flags);
8168
8147
  break;
8169
8148
  case OpKind.RepeaterCreate:
8170
8149
  op.track = transformExpressionsInExpression(op.track, transform2, flags);
@@ -8272,6 +8251,10 @@ function transformExpressionsInExpression(expr, transform2, flags) {
8272
8251
  }
8273
8252
  } else if (expr instanceof NotExpr) {
8274
8253
  expr.condition = transformExpressionsInExpression(expr.condition, transform2, flags);
8254
+ } else if (expr instanceof TaggedTemplateExpr) {
8255
+ expr.tag = transformExpressionsInExpression(expr.tag, transform2, flags);
8256
+ expr.template.expressions = expr.template.expressions.map((e) => transformExpressionsInExpression(e, transform2, flags));
8257
+ } else if (expr instanceof WrappedNodeExpr) {
8275
8258
  } else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
8276
8259
  } else {
8277
8260
  throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
@@ -8303,7 +8286,7 @@ function isStringLiteral(expr) {
8303
8286
  return expr instanceof LiteralExpr && typeof expr.value === "string";
8304
8287
  }
8305
8288
 
8306
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
8289
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
8307
8290
  var _OpList = class {
8308
8291
  constructor() {
8309
8292
  this.debugListId = _OpList.nextListId++;
@@ -8494,14 +8477,14 @@ var OpList = _OpList;
8494
8477
  _OpList.nextListId = 0;
8495
8478
  })();
8496
8479
 
8497
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
8480
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
8498
8481
  var SlotHandle = class {
8499
8482
  constructor() {
8500
8483
  this.slot = null;
8501
8484
  }
8502
8485
  };
8503
8486
 
8504
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
8487
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
8505
8488
  var elementContainerOpKinds = /* @__PURE__ */ new Set([
8506
8489
  OpKind.Element,
8507
8490
  OpKind.ElementStart,
@@ -8545,7 +8528,7 @@ function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace
8545
8528
  sourceSpan
8546
8529
  }, TRAIT_CONSUMES_SLOT), NEW_OP);
8547
8530
  }
8548
- function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, sourceSpan) {
8531
+ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, sourceSpan) {
8549
8532
  return __spreadProps(__spreadValues(__spreadValues({
8550
8533
  kind: OpKind.RepeaterCreate,
8551
8534
  attributes: null,
@@ -8563,6 +8546,8 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, so
8563
8546
  vars: null,
8564
8547
  varNames,
8565
8548
  usesComponentInstance: false,
8549
+ i18nPlaceholder,
8550
+ emptyI18nPlaceholder,
8566
8551
  sourceSpan
8567
8552
  }, TRAIT_CONSUMES_SLOT), NEW_OP), {
8568
8553
  numSlotsUsed: emptyView === null ? 2 : 3
@@ -8596,7 +8581,9 @@ function createTextOp(xref, initialValue, sourceSpan) {
8596
8581
  sourceSpan
8597
8582
  }, TRAIT_CONSUMES_SLOT), NEW_OP);
8598
8583
  }
8599
- function createListenerOp(target, targetSlot, name, tag, animationPhase, hostListener, sourceSpan) {
8584
+ function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {
8585
+ const handlerList = new OpList();
8586
+ handlerList.push(handlerOps);
8600
8587
  return __spreadValues({
8601
8588
  kind: OpKind.Listener,
8602
8589
  target,
@@ -8604,11 +8591,12 @@ function createListenerOp(target, targetSlot, name, tag, animationPhase, hostLis
8604
8591
  tag,
8605
8592
  hostListener,
8606
8593
  name,
8607
- handlerOps: new OpList(),
8594
+ handlerOps: handlerList,
8608
8595
  handlerFnName: null,
8609
8596
  consumesDollarEvent: false,
8610
8597
  isAnimationListener: animationPhase !== null,
8611
8598
  animationPhase,
8599
+ eventTarget,
8612
8600
  sourceSpan
8613
8601
  }, NEW_OP);
8614
8602
  }
@@ -8645,14 +8633,17 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
8645
8633
  sourceSpan
8646
8634
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
8647
8635
  }
8648
- function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext) {
8636
+ function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
8649
8637
  return __spreadValues({
8650
8638
  kind: OpKind.ExtractedAttribute,
8651
8639
  target,
8652
8640
  bindingKind,
8653
8641
  name,
8654
8642
  expression,
8655
- i18nContext
8643
+ i18nContext,
8644
+ i18nMessage,
8645
+ securityContext,
8646
+ trustedValueFn: null
8656
8647
  }, NEW_OP);
8657
8648
  }
8658
8649
  function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
@@ -8762,22 +8753,24 @@ function createI18nAttributesOp(xref, handle, target) {
8762
8753
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
8763
8754
  }
8764
8755
 
8765
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
8766
- function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, sourceSpan) {
8756
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
8757
+ function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
8767
8758
  return __spreadValues(__spreadValues({
8768
8759
  kind: OpKind.HostProperty,
8769
8760
  name,
8770
8761
  expression,
8771
8762
  isAnimationTrigger,
8772
8763
  i18nContext,
8764
+ securityContext,
8765
+ sanitizer: null,
8773
8766
  sourceSpan
8774
8767
  }, TRAIT_CONSUMES_VARS), NEW_OP);
8775
8768
  }
8776
8769
 
8777
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
8770
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
8778
8771
  var CTX_REF = "CTX_REF_MARKER";
8779
8772
 
8780
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
8773
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
8781
8774
  var CompilationJobKind;
8782
8775
  (function(CompilationJobKind2) {
8783
8776
  CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
@@ -8884,7 +8877,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
8884
8877
  }
8885
8878
  };
8886
8879
 
8887
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
8880
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
8888
8881
  function deleteAnyCasts(job) {
8889
8882
  for (const unit of job.units) {
8890
8883
  for (const op of unit.ops()) {
@@ -8902,7 +8895,7 @@ function removeAnys(e) {
8902
8895
  return e;
8903
8896
  }
8904
8897
 
8905
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
8898
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
8906
8899
  function applyI18nExpressions(job) {
8907
8900
  const i18nContexts = /* @__PURE__ */ new Map();
8908
8901
  for (const unit of job.units) {
@@ -8945,62 +8938,52 @@ function needsApplication(i18nContexts, op) {
8945
8938
  return false;
8946
8939
  }
8947
8940
 
8948
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
8941
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
8949
8942
  function assignI18nSlotDependencies(job) {
8950
- const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
8951
- let lastSlotConsumer = null;
8952
- let currentI18nOp = null;
8953
8943
  for (const unit of job.units) {
8954
- for (const op of unit.create) {
8955
- if (hasConsumesSlotTrait(op)) {
8956
- lastSlotConsumer = op.xref;
8944
+ let updateOp = unit.update.head;
8945
+ let i18nExpressionsInProgress = [];
8946
+ let state = null;
8947
+ for (const createOp of unit.create) {
8948
+ if (createOp.kind === OpKind.I18nStart) {
8949
+ state = {
8950
+ blockXref: createOp.xref,
8951
+ lastSlotConsumer: createOp.xref
8952
+ };
8953
+ } else if (createOp.kind === OpKind.I18nEnd) {
8954
+ for (const op of i18nExpressionsInProgress) {
8955
+ op.target = state.lastSlotConsumer;
8956
+ OpList.insertBefore(op, updateOp);
8957
+ }
8958
+ i18nExpressionsInProgress.length = 0;
8959
+ state = null;
8957
8960
  }
8958
- switch (op.kind) {
8959
- case OpKind.I18nStart:
8960
- currentI18nOp = op;
8961
- break;
8962
- case OpKind.I18nEnd:
8963
- if (currentI18nOp === null) {
8964
- throw new Error("AssertionError: Expected an active I18n block while calculating last slot consumers");
8961
+ if (hasConsumesSlotTrait(createOp)) {
8962
+ if (state !== null) {
8963
+ state.lastSlotConsumer = createOp.xref;
8964
+ }
8965
+ while (true) {
8966
+ if (updateOp.next === null) {
8967
+ break;
8965
8968
  }
8966
- if (lastSlotConsumer === null) {
8967
- throw new Error("AssertionError: Expected a last slot consumer while calculating last slot consumers");
8969
+ if (state !== null && updateOp.kind === OpKind.I18nExpression && updateOp.usage === I18nExpressionFor.I18nText && updateOp.i18nOwner === state.blockXref) {
8970
+ const opToRemove = updateOp;
8971
+ updateOp = updateOp.next;
8972
+ OpList.remove(opToRemove);
8973
+ i18nExpressionsInProgress.push(opToRemove);
8974
+ continue;
8968
8975
  }
8969
- i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
8970
- currentI18nOp = null;
8971
- break;
8972
- }
8973
- }
8974
- let opsToMove = [];
8975
- let moveAfterTarget = null;
8976
- let previousTarget = null;
8977
- for (const op of unit.update) {
8978
- if (hasDependsOnSlotContextTrait(op)) {
8979
- if (moveAfterTarget !== null && previousTarget === moveAfterTarget && op.target !== previousTarget) {
8980
- OpList.insertBefore(opsToMove, op);
8981
- moveAfterTarget = null;
8982
- opsToMove = [];
8983
- }
8984
- previousTarget = op.target;
8985
- }
8986
- if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nText) {
8987
- OpList.remove(op);
8988
- opsToMove.push(op);
8989
- const target = i18nLastSlotConsumers.get(op.i18nOwner);
8990
- if (target === void 0) {
8991
- throw new Error("AssertionError: Expected to find a last slot consumer for an I18nExpressionOp");
8976
+ if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) {
8977
+ break;
8978
+ }
8979
+ updateOp = updateOp.next;
8992
8980
  }
8993
- op.target = target;
8994
- moveAfterTarget = op.target;
8995
8981
  }
8996
8982
  }
8997
- if (moveAfterTarget !== null) {
8998
- unit.update.push(opsToMove);
8999
- }
9000
8983
  }
9001
8984
  }
9002
8985
 
9003
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
8986
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
9004
8987
  function createOpXrefMap(unit) {
9005
8988
  const map = /* @__PURE__ */ new Map();
9006
8989
  for (const op of unit.create) {
@@ -9012,7 +8995,7 @@ function createOpXrefMap(unit) {
9012
8995
  return map;
9013
8996
  }
9014
8997
 
9015
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
8998
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
9016
8999
  function extractAttributes(job) {
9017
9000
  for (const unit of job.units) {
9018
9001
  const elements = createOpXrefMap(unit);
@@ -9024,25 +9007,52 @@ function extractAttributes(job) {
9024
9007
  case OpKind.Property:
9025
9008
  if (!op.isAnimationTrigger) {
9026
9009
  let bindingKind;
9027
- if (op.i18nContext !== null) {
9010
+ if (op.i18nMessage !== null && op.templateKind === null) {
9028
9011
  bindingKind = BindingKind.I18n;
9029
- } else if (op.isStructuralTemplate) {
9012
+ } else if (op.isStructuralTemplateAttribute) {
9030
9013
  bindingKind = BindingKind.Template;
9031
9014
  } else {
9032
9015
  bindingKind = BindingKind.Property;
9033
9016
  }
9034
- OpList.insertBefore(createExtractedAttributeOp(op.target, bindingKind, op.name, null, null), lookupElement(elements, op.target));
9017
+ OpList.insertBefore(
9018
+ createExtractedAttributeOp(
9019
+ op.target,
9020
+ bindingKind,
9021
+ op.name,
9022
+ null,
9023
+ null,
9024
+ null,
9025
+ op.securityContext
9026
+ ),
9027
+ lookupElement(elements, op.target)
9028
+ );
9035
9029
  }
9036
9030
  break;
9037
9031
  case OpKind.StyleProp:
9038
9032
  case OpKind.ClassProp:
9039
9033
  if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
9040
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null, null), lookupElement(elements, op.target));
9034
+ OpList.insertBefore(createExtractedAttributeOp(
9035
+ op.target,
9036
+ BindingKind.Property,
9037
+ op.name,
9038
+ null,
9039
+ null,
9040
+ null,
9041
+ SecurityContext.STYLE
9042
+ ), lookupElement(elements, op.target));
9041
9043
  }
9042
9044
  break;
9043
9045
  case OpKind.Listener:
9044
9046
  if (!op.isAnimationListener) {
9045
- const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null, null);
9047
+ const extractedAttributeOp = createExtractedAttributeOp(
9048
+ op.target,
9049
+ BindingKind.Property,
9050
+ op.name,
9051
+ null,
9052
+ null,
9053
+ null,
9054
+ SecurityContext.NONE
9055
+ );
9046
9056
  if (job.kind === CompilationJobKind.Host) {
9047
9057
  unit.create.push(extractedAttributeOp);
9048
9058
  } else {
@@ -9076,7 +9086,7 @@ function extractAttributeOp(unit, op, elements) {
9076
9086
  }
9077
9087
  }
9078
9088
  if (extractable) {
9079
- const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplate ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext);
9089
+ const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9080
9090
  if (unit.job.kind === CompilationJobKind.Host) {
9081
9091
  unit.create.push(extractedAttributeOp);
9082
9092
  } else {
@@ -9087,7 +9097,7 @@ function extractAttributeOp(unit, op, elements) {
9087
9097
  }
9088
9098
  }
9089
9099
 
9090
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
9100
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
9091
9101
  function lookupElement2(elements, xref) {
9092
9102
  const el = elements.get(xref);
9093
9103
  if (el === void 0) {
@@ -9117,15 +9127,15 @@ function specializeBindings(job) {
9117
9127
  const target = lookupElement2(elements, op.target);
9118
9128
  target.nonBindable = true;
9119
9129
  } else {
9120
- OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplate, op.i18nContext, op.sourceSpan));
9130
+ OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9121
9131
  }
9122
9132
  break;
9123
9133
  case BindingKind.Property:
9124
9134
  case BindingKind.Animation:
9125
9135
  if (job.kind === CompilationJobKind.Host) {
9126
- OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.sourceSpan));
9136
+ OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
9127
9137
  } else {
9128
- OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplate, op.i18nContext, op.sourceSpan));
9138
+ OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
9129
9139
  }
9130
9140
  break;
9131
9141
  case BindingKind.I18n:
@@ -9137,7 +9147,7 @@ function specializeBindings(job) {
9137
9147
  }
9138
9148
  }
9139
9149
 
9140
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
9150
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
9141
9151
  var CHAINABLE = /* @__PURE__ */ new Set([
9142
9152
  Identifiers.attribute,
9143
9153
  Identifiers.classProp,
@@ -9203,7 +9213,7 @@ function chainOperationsInList(opList) {
9203
9213
  }
9204
9214
  }
9205
9215
 
9206
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
9216
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
9207
9217
  function collapseSingletonInterpolations(job) {
9208
9218
  for (const unit of job.units) {
9209
9219
  for (const op of unit.update) {
@@ -9215,7 +9225,7 @@ function collapseSingletonInterpolations(job) {
9215
9225
  }
9216
9226
  }
9217
9227
 
9218
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
9228
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
9219
9229
  function generateConditionalExpressions(job) {
9220
9230
  for (const unit of job.units) {
9221
9231
  for (const op of unit.ops()) {
@@ -9252,7 +9262,7 @@ function generateConditionalExpressions(job) {
9252
9262
  }
9253
9263
  }
9254
9264
 
9255
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
9265
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
9256
9266
  var BINARY_OPERATORS = /* @__PURE__ */ new Map([
9257
9267
  ["&&", BinaryOperator.And],
9258
9268
  [">", BinaryOperator.Bigger],
@@ -9302,7 +9312,7 @@ function literalOrArrayLiteral(value) {
9302
9312
  return literal(value);
9303
9313
  }
9304
9314
 
9305
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
9315
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
9306
9316
  function collectElementConsts(job) {
9307
9317
  const allElementAttributes = /* @__PURE__ */ new Map();
9308
9318
  for (const unit of job.units) {
@@ -9310,7 +9320,7 @@ function collectElementConsts(job) {
9310
9320
  if (op.kind === OpKind.ExtractedAttribute) {
9311
9321
  const attributes = allElementAttributes.get(op.target) || new ElementAttributes();
9312
9322
  allElementAttributes.set(op.target, attributes);
9313
- attributes.add(op.bindingKind, op.name, op.expression);
9323
+ attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
9314
9324
  OpList.remove(op);
9315
9325
  }
9316
9326
  }
@@ -9372,7 +9382,7 @@ var ElementAttributes = class {
9372
9382
  var _a2;
9373
9383
  return (_a2 = this.byKind.get(BindingKind.I18n)) != null ? _a2 : FLYWEIGHT_ARRAY;
9374
9384
  }
9375
- add(kind, name, value) {
9385
+ add(kind, name, value, trustedValueFn) {
9376
9386
  var _a2;
9377
9387
  if (this.known.has(name)) {
9378
9388
  return;
@@ -9390,7 +9400,14 @@ var ElementAttributes = class {
9390
9400
  if (value === null) {
9391
9401
  throw Error("Attribute, i18n attribute, & style element attributes must have a value");
9392
9402
  }
9393
- array.push(value);
9403
+ if (trustedValueFn !== null) {
9404
+ if (!isStringLiteral(value)) {
9405
+ throw Error("AssertionError: extracted attribute value should be string literal");
9406
+ }
9407
+ array.push(taggedTemplate(trustedValueFn, new TemplateLiteral([new TemplateLiteralElement(value.value)], []), void 0, value.sourceSpan));
9408
+ } else {
9409
+ array.push(value);
9410
+ }
9394
9411
  }
9395
9412
  }
9396
9413
  arrayFor(kind) {
@@ -9436,7 +9453,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
9436
9453
  return literalArr(attrArray);
9437
9454
  }
9438
9455
 
9439
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
9456
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
9440
9457
  function convertI18nBindings(job) {
9441
9458
  const i18nAttributesByElem = /* @__PURE__ */ new Map();
9442
9459
  for (const unit of job.units) {
@@ -9477,7 +9494,7 @@ function convertI18nBindings(job) {
9477
9494
  }
9478
9495
  }
9479
9496
 
9480
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
9497
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
9481
9498
  function createDeferDepsFns(job) {
9482
9499
  for (const unit of job.units) {
9483
9500
  for (const op of unit.create) {
@@ -9505,11 +9522,12 @@ function createDeferDepsFns(job) {
9505
9522
  }
9506
9523
  }
9507
9524
 
9508
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
9525
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
9509
9526
  function createI18nContexts(job) {
9510
9527
  const rootContexts = /* @__PURE__ */ new Map();
9511
9528
  let currentI18nOp = null;
9512
9529
  let xref;
9530
+ const messageToContext = /* @__PURE__ */ new Map();
9513
9531
  for (const unit of job.units) {
9514
9532
  for (const op of unit.create) {
9515
9533
  switch (op.kind) {
@@ -9539,6 +9557,24 @@ function createI18nContexts(job) {
9539
9557
  break;
9540
9558
  }
9541
9559
  }
9560
+ for (const op of unit.ops()) {
9561
+ switch (op.kind) {
9562
+ case OpKind.Binding:
9563
+ case OpKind.Property:
9564
+ case OpKind.Attribute:
9565
+ case OpKind.ExtractedAttribute:
9566
+ if (!op.i18nMessage) {
9567
+ continue;
9568
+ }
9569
+ if (!messageToContext.has(op.i18nMessage)) {
9570
+ const i18nContext = job.allocateXrefId();
9571
+ unit.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, op.i18nMessage, null));
9572
+ messageToContext.set(op.i18nMessage, i18nContext);
9573
+ }
9574
+ op.i18nContext = messageToContext.get(op.i18nMessage);
9575
+ break;
9576
+ }
9577
+ }
9542
9578
  }
9543
9579
  for (const unit of job.units) {
9544
9580
  for (const op of unit.create) {
@@ -9549,7 +9585,7 @@ function createI18nContexts(job) {
9549
9585
  }
9550
9586
  }
9551
9587
 
9552
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
9588
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
9553
9589
  function configureDeferInstructions(job) {
9554
9590
  for (const unit of job.units) {
9555
9591
  for (const op of unit.create) {
@@ -9566,7 +9602,7 @@ function configureDeferInstructions(job) {
9566
9602
  }
9567
9603
  }
9568
9604
 
9569
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
9605
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
9570
9606
  function resolveDeferTargetNames(job) {
9571
9607
  const scopes = /* @__PURE__ */ new Map();
9572
9608
  function getScopeForView2(view) {
@@ -9660,7 +9696,7 @@ var Scope = class {
9660
9696
  }
9661
9697
  };
9662
9698
 
9663
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
9699
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
9664
9700
  var REPLACEMENTS = /* @__PURE__ */ new Map([
9665
9701
  [OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
9666
9702
  [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
@@ -9687,7 +9723,7 @@ function collapseEmptyInstructions(job) {
9687
9723
  }
9688
9724
  }
9689
9725
 
9690
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
9726
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
9691
9727
  function expandSafeReads(job) {
9692
9728
  for (const unit of job.units) {
9693
9729
  for (const op of unit.ops()) {
@@ -9823,7 +9859,7 @@ function ternaryTransform(e) {
9823
9859
  return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
9824
9860
  }
9825
9861
 
9826
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
9862
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
9827
9863
  var ESCAPE = "\uFFFD";
9828
9864
  var ELEMENT_MARKER = "#";
9829
9865
  var TEMPLATE_MARKER = "*";
@@ -9962,7 +9998,7 @@ function formatValue(value) {
9962
9998
  return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
9963
9999
  }
9964
10000
 
9965
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
10001
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
9966
10002
  function generateAdvance(job) {
9967
10003
  for (const unit of job.units) {
9968
10004
  const slotMap = /* @__PURE__ */ new Map();
@@ -9994,7 +10030,7 @@ function generateAdvance(job) {
9994
10030
  }
9995
10031
  }
9996
10032
 
9997
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
10033
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
9998
10034
  function generateProjectionDefs(job) {
9999
10035
  const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
10000
10036
  const selectors = [];
@@ -10018,7 +10054,7 @@ function generateProjectionDefs(job) {
10018
10054
  }
10019
10055
  }
10020
10056
 
10021
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
10057
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
10022
10058
  function generateVariables(job) {
10023
10059
  recursivelyProcessView(job.root, null);
10024
10060
  }
@@ -10027,8 +10063,13 @@ function recursivelyProcessView(view, parentScope) {
10027
10063
  for (const op of view.create) {
10028
10064
  switch (op.kind) {
10029
10065
  case OpKind.Template:
10066
+ recursivelyProcessView(view.job.views.get(op.xref), scope);
10067
+ break;
10030
10068
  case OpKind.RepeaterCreate:
10031
10069
  recursivelyProcessView(view.job.views.get(op.xref), scope);
10070
+ if (op.emptyView) {
10071
+ recursivelyProcessView(view.job.views.get(op.emptyView), scope);
10072
+ }
10032
10073
  break;
10033
10074
  case OpKind.Listener:
10034
10075
  op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
@@ -10106,7 +10147,7 @@ function generateVariablesInScopeForView(view, scope) {
10106
10147
  return newOps;
10107
10148
  }
10108
10149
 
10109
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
10150
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
10110
10151
  function collectConstExpressions(job) {
10111
10152
  for (const unit of job.units) {
10112
10153
  for (const op of unit.ops()) {
@@ -10120,7 +10161,7 @@ function collectConstExpressions(job) {
10120
10161
  }
10121
10162
  }
10122
10163
 
10123
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
10164
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
10124
10165
  var STYLE_DOT = "style.";
10125
10166
  var CLASS_DOT = "class.";
10126
10167
  var STYLE_BANG = "style!";
@@ -10178,7 +10219,7 @@ function parseProperty(name) {
10178
10219
  return { property: property2, suffix };
10179
10220
  }
10180
10221
 
10181
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/map_util.mjs
10222
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
10182
10223
  function mapLiteral(obj, quoted = false) {
10183
10224
  return literalMap(Object.keys(obj).map((key) => ({
10184
10225
  key,
@@ -10187,7 +10228,7 @@ function mapLiteral(obj, quoted = false) {
10187
10228
  })));
10188
10229
  }
10189
10230
 
10190
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
10231
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
10191
10232
  var IcuSerializerVisitor = class {
10192
10233
  visitText(text2) {
10193
10234
  return text2.value;
@@ -10221,7 +10262,7 @@ function serializeIcuNode(icu) {
10221
10262
  return icu.visit(serializer);
10222
10263
  }
10223
10264
 
10224
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
10265
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
10225
10266
  var TokenType;
10226
10267
  (function(TokenType2) {
10227
10268
  TokenType2[TokenType2["Character"] = 0] = "Character";
@@ -10582,7 +10623,7 @@ function parseIntAutoRadix(text2) {
10582
10623
  return result;
10583
10624
  }
10584
10625
 
10585
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
10626
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
10586
10627
  var SplitInterpolation = class {
10587
10628
  constructor(strings, expressions, offsets) {
10588
10629
  this.strings = strings;
@@ -11476,7 +11517,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
11476
11517
  return offsetMap;
11477
11518
  }
11478
11519
 
11479
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
11520
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
11480
11521
  var NodeWithI18n = class {
11481
11522
  constructor(sourceSpan, i18n2) {
11482
11523
  this.sourceSpan = sourceSpan;
@@ -11628,11 +11669,11 @@ var RecursiveVisitor = class {
11628
11669
  }
11629
11670
  };
11630
11671
 
11631
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
11672
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
11632
11673
  var ElementSchemaRegistry = class {
11633
11674
  };
11634
11675
 
11635
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
11676
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
11636
11677
  var BOOLEAN = "boolean";
11637
11678
  var NUMBER = "number";
11638
11679
  var STRING = "string";
@@ -11985,7 +12026,7 @@ function _isPixelDimensionStyle(prop) {
11985
12026
  }
11986
12027
  }
11987
12028
 
11988
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
12029
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
11989
12030
  var HtmlTagDefinition = class {
11990
12031
  constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
11991
12032
  this.closedByChildren = {};
@@ -12103,7 +12144,7 @@ function getHtmlTagDefinition(tagName) {
12103
12144
  return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
12104
12145
  }
12105
12146
 
12106
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
12147
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
12107
12148
  var TAG_TO_PLACEHOLDER_NAMES = {
12108
12149
  "A": "LINK",
12109
12150
  "B": "BOLD_TEXT",
@@ -12225,7 +12266,7 @@ var PlaceholderRegistry = class {
12225
12266
  }
12226
12267
  };
12227
12268
 
12228
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
12269
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
12229
12270
  var _expParser = new Parser(new Lexer());
12230
12271
  function createI18nMessageFactory(interpolationConfig, containerBlocks) {
12231
12272
  const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
@@ -12404,14 +12445,14 @@ function extractPlaceholderName(input) {
12404
12445
  return input.split(_CUSTOM_PH_EXP)[2];
12405
12446
  }
12406
12447
 
12407
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
12448
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
12408
12449
  var I18nError = class extends ParseError {
12409
12450
  constructor(span, msg) {
12410
12451
  super(span, msg);
12411
12452
  }
12412
12453
  };
12413
12454
 
12414
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
12455
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
12415
12456
  var NAMED_ENTITIES = {
12416
12457
  "AElig": "\xC6",
12417
12458
  "AMP": "&",
@@ -14542,7 +14583,7 @@ var NAMED_ENTITIES = {
14542
14583
  var NGSP_UNICODE = "\uE500";
14543
14584
  NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
14544
14585
 
14545
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
14586
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
14546
14587
  var TokenError = class extends ParseError {
14547
14588
  constructor(errorMsg, tokenType, span) {
14548
14589
  super(span, errorMsg);
@@ -15463,7 +15504,7 @@ var CursorError = class {
15463
15504
  }
15464
15505
  };
15465
15506
 
15466
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
15507
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
15467
15508
  var TreeError = class extends ParseError {
15468
15509
  static create(elementName, span, msg) {
15469
15510
  return new TreeError(elementName, span, msg);
@@ -15847,7 +15888,7 @@ function decodeEntity(match, entity) {
15847
15888
  return match;
15848
15889
  }
15849
15890
 
15850
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
15891
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
15851
15892
  var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
15852
15893
  "iframe|srcdoc",
15853
15894
  "*|innerhtml",
@@ -15862,7 +15903,7 @@ function isTrustedTypesSink(tagName, propName) {
15862
15903
  return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
15863
15904
  }
15864
15905
 
15865
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
15906
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
15866
15907
  var setI18nRefs = (htmlNode, i18nNode) => {
15867
15908
  if (htmlNode instanceof NodeWithI18n) {
15868
15909
  if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
@@ -16019,7 +16060,7 @@ function i18nMetaToJSDoc(meta) {
16019
16060
  return jsDocComment(tags);
16020
16061
  }
16021
16062
 
16022
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
16063
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
16023
16064
  var GOOG_GET_MSG = "goog.getMsg";
16024
16065
  function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
16025
16066
  const messageString = serializeI18nMessageForGetMsg(message);
@@ -16070,7 +16111,7 @@ function serializeI18nMessageForGetMsg(message) {
16070
16111
  return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
16071
16112
  }
16072
16113
 
16073
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
16114
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
16074
16115
  function createLocalizeStatements(variable2, message, params) {
16075
16116
  const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
16076
16117
  const sourceSpan = getSourceSpan(message);
@@ -16159,13 +16200,13 @@ function createEmptyMessagePart(location) {
16159
16200
  return new LiteralPiece("", new ParseSourceSpan(location, location));
16160
16201
  }
16161
16202
 
16162
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
16203
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
16163
16204
  var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
16164
16205
  var TRANSLATION_VAR_PREFIX2 = "i18n_";
16165
16206
  var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
16166
16207
  var ESCAPE2 = "\uFFFD";
16167
16208
  function collectI18nConsts(job) {
16168
- var _a2;
16209
+ var _a2, _b2;
16169
16210
  const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
16170
16211
  const extractedAttributesByI18nContext = /* @__PURE__ */ new Map();
16171
16212
  const i18nAttributesByElement = /* @__PURE__ */ new Map();
@@ -16174,11 +16215,13 @@ function collectI18nConsts(job) {
16174
16215
  for (const unit of job.units) {
16175
16216
  for (const op of unit.ops()) {
16176
16217
  if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {
16177
- extractedAttributesByI18nContext.set(op.i18nContext, op);
16218
+ const attributes = (_a2 = extractedAttributesByI18nContext.get(op.i18nContext)) != null ? _a2 : [];
16219
+ attributes.push(op);
16220
+ extractedAttributesByI18nContext.set(op.i18nContext, attributes);
16178
16221
  } else if (op.kind === OpKind.I18nAttributes) {
16179
16222
  i18nAttributesByElement.set(op.target, op);
16180
16223
  } else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {
16181
- const expressions = (_a2 = i18nExpressionsByElement.get(op.target)) != null ? _a2 : [];
16224
+ const expressions = (_b2 = i18nExpressionsByElement.get(op.target)) != null ? _b2 : [];
16182
16225
  expressions.push(op);
16183
16226
  i18nExpressionsByElement.set(op.target, expressions);
16184
16227
  } else if (op.kind === OpKind.I18nMessage) {
@@ -16199,9 +16242,11 @@ function collectI18nConsts(job) {
16199
16242
  } else {
16200
16243
  job.constsInitializers.push(...statements);
16201
16244
  i18nValuesByContext.set(op.i18nContext, mainVar);
16202
- const attributeForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
16203
- if (attributeForMessage !== void 0) {
16204
- attributeForMessage.expression = mainVar;
16245
+ const attributesForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
16246
+ if (attributesForMessage !== void 0) {
16247
+ for (const attr of attributesForMessage) {
16248
+ attr.expression = mainVar.clone();
16249
+ }
16205
16250
  }
16206
16251
  }
16207
16252
  }
@@ -16317,7 +16362,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
16317
16362
  return variable(name);
16318
16363
  }
16319
16364
 
16320
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
16365
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
16321
16366
  function convertI18nText(job) {
16322
16367
  var _a2;
16323
16368
  for (const unit of job.units) {
@@ -16376,7 +16421,7 @@ function convertI18nText(job) {
16376
16421
  }
16377
16422
  }
16378
16423
 
16379
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
16424
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
16380
16425
  function liftLocalRefs(job) {
16381
16426
  for (const unit of job.units) {
16382
16427
  for (const op of unit.create) {
@@ -16406,7 +16451,7 @@ function serializeLocalRefs(refs) {
16406
16451
  return literalArr(constRefs);
16407
16452
  }
16408
16453
 
16409
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
16454
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
16410
16455
  function emitNamespaceChanges(job) {
16411
16456
  for (const unit of job.units) {
16412
16457
  let activeNamespace = Namespace.HTML;
@@ -16422,7 +16467,7 @@ function emitNamespaceChanges(job) {
16422
16467
  }
16423
16468
  }
16424
16469
 
16425
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
16470
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
16426
16471
  function parse(value) {
16427
16472
  const styles = [];
16428
16473
  let i = 0;
@@ -16483,7 +16528,7 @@ function hyphenate2(value) {
16483
16528
  }).toLowerCase();
16484
16529
  }
16485
16530
 
16486
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
16531
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
16487
16532
  function nameFunctionsAndVariables(job) {
16488
16533
  addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
16489
16534
  }
@@ -16598,7 +16643,7 @@ function stripImportant(name) {
16598
16643
  return name;
16599
16644
  }
16600
16645
 
16601
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
16646
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
16602
16647
  function mergeNextContextExpressions(job) {
16603
16648
  for (const unit of job.units) {
16604
16649
  for (const op of unit.create) {
@@ -16644,7 +16689,7 @@ function mergeNextContextsInOps(ops) {
16644
16689
  }
16645
16690
  }
16646
16691
 
16647
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
16692
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
16648
16693
  var CONTAINER_TAG = "ng-container";
16649
16694
  function generateNgContainerOps(job) {
16650
16695
  for (const unit of job.units) {
@@ -16661,7 +16706,7 @@ function generateNgContainerOps(job) {
16661
16706
  }
16662
16707
  }
16663
16708
 
16664
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
16709
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
16665
16710
  function lookupElement3(elements, xref) {
16666
16711
  const el = elements.get(xref);
16667
16712
  if (el === void 0) {
@@ -16691,7 +16736,7 @@ function disableBindings(job) {
16691
16736
  }
16692
16737
  }
16693
16738
 
16694
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
16739
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
16695
16740
  function generateNullishCoalesceExpressions(job) {
16696
16741
  for (const unit of job.units) {
16697
16742
  for (const op of unit.ops()) {
@@ -16707,7 +16752,7 @@ function generateNullishCoalesceExpressions(job) {
16707
16752
  }
16708
16753
  }
16709
16754
 
16710
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
16755
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
16711
16756
  function kindTest(kind) {
16712
16757
  return (op) => op.kind === kind;
16713
16758
  }
@@ -16781,7 +16826,7 @@ function keepLast(ops) {
16781
16826
  return ops.slice(ops.length - 1);
16782
16827
  }
16783
16828
 
16784
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
16829
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
16785
16830
  function parseExtractedStyles(job) {
16786
16831
  for (const unit of job.units) {
16787
16832
  for (const op of unit.create) {
@@ -16789,13 +16834,13 @@ function parseExtractedStyles(job) {
16789
16834
  if (op.name === "style") {
16790
16835
  const parsedStyles = parse(op.expression.value);
16791
16836
  for (let i = 0; i < parsedStyles.length - 1; i += 2) {
16792
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null), op);
16837
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
16793
16838
  }
16794
16839
  OpList.remove(op);
16795
16840
  } else if (op.name === "class") {
16796
16841
  const parsedClasses = op.expression.value.trim().split(/\s+/g);
16797
16842
  for (const parsedClass of parsedClasses) {
16798
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null), op);
16843
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
16799
16844
  }
16800
16845
  OpList.remove(op);
16801
16846
  }
@@ -16804,7 +16849,7 @@ function parseExtractedStyles(job) {
16804
16849
  }
16805
16850
  }
16806
16851
 
16807
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
16852
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
16808
16853
  function removeContentSelectors(job) {
16809
16854
  for (const unit of job.units) {
16810
16855
  const elements = createOpXrefMap(unit);
@@ -16838,7 +16883,7 @@ function lookupInXrefMap(map, xref) {
16838
16883
  return el;
16839
16884
  }
16840
16885
 
16841
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
16886
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
16842
16887
  function createPipes(job) {
16843
16888
  for (const unit of job.units) {
16844
16889
  processPipeBindingsInView(unit);
@@ -16886,7 +16931,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
16886
16931
  throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
16887
16932
  }
16888
16933
 
16889
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
16934
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
16890
16935
  function createVariadicPipes(job) {
16891
16936
  for (const unit of job.units) {
16892
16937
  for (const op of unit.update) {
@@ -16903,7 +16948,7 @@ function createVariadicPipes(job) {
16903
16948
  }
16904
16949
  }
16905
16950
 
16906
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
16951
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
16907
16952
  function propagateI18nBlocks(job) {
16908
16953
  propagateI18nBlocksToTemplates(job.root, 0);
16909
16954
  }
@@ -16922,19 +16967,29 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
16922
16967
  i18nBlock = null;
16923
16968
  break;
16924
16969
  case OpKind.Template:
16925
- const templateView = unit.job.views.get(op.xref);
16926
- if (op.i18nPlaceholder !== void 0) {
16927
- if (i18nBlock === null) {
16928
- throw Error("Expected template with i18n placeholder to be in an i18n block.");
16929
- }
16930
- subTemplateIndex++;
16931
- wrapTemplateWithI18n(templateView, i18nBlock);
16970
+ subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
16971
+ break;
16972
+ case OpKind.RepeaterCreate:
16973
+ const forView = unit.job.views.get(op.xref);
16974
+ subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
16975
+ if (op.emptyView !== null) {
16976
+ subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
16932
16977
  }
16933
- subTemplateIndex = propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
16978
+ break;
16934
16979
  }
16935
16980
  }
16936
16981
  return subTemplateIndex;
16937
16982
  }
16983
+ function propagateI18nBlocksForView(view, i18nBlock, i18nPlaceholder, subTemplateIndex) {
16984
+ if (i18nPlaceholder !== void 0) {
16985
+ if (i18nBlock === null) {
16986
+ throw Error("Expected template with i18n placeholder to be in an i18n block.");
16987
+ }
16988
+ subTemplateIndex++;
16989
+ wrapTemplateWithI18n(view, i18nBlock);
16990
+ }
16991
+ return propagateI18nBlocksToTemplates(view, subTemplateIndex);
16992
+ }
16938
16993
  function wrapTemplateWithI18n(unit, parentI18n) {
16939
16994
  var _a2;
16940
16995
  if (((_a2 = unit.create.head.next) == null ? void 0 : _a2.kind) !== OpKind.I18nStart) {
@@ -16944,7 +16999,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
16944
16999
  }
16945
17000
  }
16946
17001
 
16947
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
17002
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
16948
17003
  function extractPureFunctions(job) {
16949
17004
  for (const view of job.units) {
16950
17005
  for (const op of view.ops()) {
@@ -16986,7 +17041,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
16986
17041
  }
16987
17042
  };
16988
17043
 
16989
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
17044
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
16990
17045
  function generatePureLiteralStructures(job) {
16991
17046
  for (const unit of job.units) {
16992
17047
  for (const op of unit.update) {
@@ -17033,7 +17088,7 @@ function transformLiteralMap(expr) {
17033
17088
  return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
17034
17089
  }
17035
17090
 
17036
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
17091
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
17037
17092
  function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
17038
17093
  return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
17039
17094
  }
@@ -17091,17 +17146,13 @@ function disableBindings2() {
17091
17146
  function enableBindings() {
17092
17147
  return call(Identifiers.enableBindings, [], null);
17093
17148
  }
17094
- function listener(name, handlerFn, sourceSpan) {
17095
- return call(Identifiers.listener, [
17096
- literal(name),
17097
- handlerFn
17098
- ], sourceSpan);
17099
- }
17100
- function syntheticHostListener(name, handlerFn, sourceSpan) {
17101
- return call(Identifiers.syntheticHostListener, [
17102
- literal(name),
17103
- handlerFn
17104
- ], sourceSpan);
17149
+ function listener(name, handlerFn, eventTargetResolver, syntheticHost, sourceSpan) {
17150
+ const args = [literal(name), handlerFn];
17151
+ if (eventTargetResolver !== null) {
17152
+ args.push(literal(false));
17153
+ args.push(importExpr(eventTargetResolver));
17154
+ }
17155
+ return call(syntheticHost ? Identifiers.syntheticHostListener : Identifiers.listener, args, sourceSpan);
17105
17156
  }
17106
17157
  function pipe(slot, name) {
17107
17158
  return call(Identifiers.pipe, [
@@ -17360,8 +17411,12 @@ function classMapInterpolate(strings, expressions, sourceSpan) {
17360
17411
  const interpolationArgs = collateInterpolationArgs(strings, expressions);
17361
17412
  return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
17362
17413
  }
17363
- function hostProperty(name, expression, sourceSpan) {
17364
- return call(Identifiers.hostProperty, [literal(name), expression], sourceSpan);
17414
+ function hostProperty(name, expression, sanitizer, sourceSpan) {
17415
+ const args = [literal(name), expression];
17416
+ if (sanitizer !== null) {
17417
+ args.push(sanitizer);
17418
+ }
17419
+ return call(Identifiers.hostProperty, args, sourceSpan);
17365
17420
  }
17366
17421
  function syntheticHostProperty(name, expression, sourceSpan) {
17367
17422
  return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
@@ -17548,14 +17603,11 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
17548
17603
  return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
17549
17604
  }
17550
17605
 
17551
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
17552
- var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
17553
- [SanitizerFn.Html, Identifiers.sanitizeHtml],
17554
- [SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
17555
- [SanitizerFn.ResourceUrl, Identifiers.sanitizeResourceUrl],
17556
- [SanitizerFn.Script, Identifiers.sanitizeScript],
17557
- [SanitizerFn.Style, Identifiers.sanitizeStyle],
17558
- [SanitizerFn.Url, Identifiers.sanitizeUrl]
17606
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
17607
+ var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
17608
+ ["window", Identifiers.resolveWindow],
17609
+ ["document", Identifiers.resolveDocument],
17610
+ ["body", Identifiers.resolveBody]
17559
17611
  ]);
17560
17612
  function reify(job) {
17561
17613
  for (const unit of job.units) {
@@ -17625,8 +17677,11 @@ function reifyCreateOperations(unit, ops) {
17625
17677
  break;
17626
17678
  case OpKind.Listener:
17627
17679
  const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
17628
- const reified = op.hostListener && op.isAnimationListener ? syntheticHostListener(op.name, listenerFn, op.sourceSpan) : listener(op.name, listenerFn, op.sourceSpan);
17629
- OpList.replace(op, reified);
17680
+ const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
17681
+ if (eventTargetResolver === void 0) {
17682
+ throw new Error(`AssertionError: unknown event target ${op.eventTarget}`);
17683
+ }
17684
+ OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
17630
17685
  break;
17631
17686
  case OpKind.Variable:
17632
17687
  if (op.variable.name === null) {
@@ -17781,7 +17836,7 @@ function reifyUpdateOperations(_unit, ops) {
17781
17836
  if (op.isAnimationTrigger) {
17782
17837
  OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
17783
17838
  } else {
17784
- OpList.replace(op, hostProperty(op.name, op.expression, op.sourceSpan));
17839
+ OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
17785
17840
  }
17786
17841
  }
17787
17842
  break;
@@ -17859,8 +17914,6 @@ function reifyIrExpression(expr) {
17859
17914
  return pipeBind(expr.targetSlot.slot, expr.varOffset, expr.args);
17860
17915
  case ExpressionKind.PipeBindingVariadic:
17861
17916
  return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);
17862
- case ExpressionKind.SanitizerExpr:
17863
- return importExpr(sanitizerIdentifierMap.get(expr.fn));
17864
17917
  case ExpressionKind.SlotLiteralExpr:
17865
17918
  return literal(expr.slot.slot);
17866
17919
  default:
@@ -17883,7 +17936,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
17883
17936
  return fn(params, handlerStmts, void 0, void 0, name);
17884
17937
  }
17885
17938
 
17886
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
17939
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
17887
17940
  function removeEmptyBindings(job) {
17888
17941
  for (const unit of job.units) {
17889
17942
  for (const op of unit.update) {
@@ -17904,7 +17957,7 @@ function removeEmptyBindings(job) {
17904
17957
  }
17905
17958
  }
17906
17959
 
17907
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
17960
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
17908
17961
  function removeI18nContexts(job) {
17909
17962
  for (const unit of job.units) {
17910
17963
  for (const op of unit.create) {
@@ -17920,7 +17973,7 @@ function removeI18nContexts(job) {
17920
17973
  }
17921
17974
  }
17922
17975
 
17923
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
17976
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
17924
17977
  function removeUnusedI18nAttributesOps(job) {
17925
17978
  for (const unit of job.units) {
17926
17979
  const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
@@ -17942,7 +17995,7 @@ function removeUnusedI18nAttributesOps(job) {
17942
17995
  }
17943
17996
  }
17944
17997
 
17945
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
17998
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
17946
17999
  function generateRepeaterDerivedVars(job) {
17947
18000
  const repeaters = /* @__PURE__ */ new Map();
17948
18001
  for (const unit of job.units) {
@@ -17974,7 +18027,7 @@ function generateRepeaterDerivedVars(job) {
17974
18027
  }
17975
18028
  }
17976
18029
 
17977
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
18030
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
17978
18031
  function resolveContexts(job) {
17979
18032
  for (const unit of job.units) {
17980
18033
  processLexicalScope(unit, unit.create);
@@ -18015,7 +18068,7 @@ function processLexicalScope(view, ops) {
18015
18068
  }
18016
18069
  }
18017
18070
 
18018
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
18071
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
18019
18072
  function resolveDollarEvent(job) {
18020
18073
  for (const unit of job.units) {
18021
18074
  transformDollarEvent(unit, unit.create);
@@ -18036,7 +18089,7 @@ function transformDollarEvent(unit, ops) {
18036
18089
  }
18037
18090
  }
18038
18091
 
18039
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
18092
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
18040
18093
  function resolveI18nElementPlaceholders(job) {
18041
18094
  const i18nContexts = /* @__PURE__ */ new Map();
18042
18095
  const elements = /* @__PURE__ */ new Map();
@@ -18101,18 +18154,52 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingSt
18101
18154
  }
18102
18155
  break;
18103
18156
  case OpKind.Template:
18157
+ const view = job.views.get(op.xref);
18104
18158
  if (op.i18nPlaceholder === void 0) {
18105
- resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
18159
+ resolvePlaceholdersForView(job, view, i18nContexts, elements);
18106
18160
  } else {
18107
18161
  if (currentOps === null) {
18108
18162
  throw Error("i18n tag placeholder should only occur inside an i18n block");
18109
18163
  }
18110
18164
  if (op.templateKind === TemplateKind.Structural) {
18111
- resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements, op);
18165
+ resolvePlaceholdersForView(job, view, i18nContexts, elements, op);
18112
18166
  } else {
18113
- recordTemplateStart(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18114
- resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
18115
- recordTemplateClose(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18167
+ recordTemplateStart(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18168
+ resolvePlaceholdersForView(job, view, i18nContexts, elements);
18169
+ recordTemplateClose(job, view, op.handle.slot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18170
+ pendingStructuralDirective = void 0;
18171
+ }
18172
+ }
18173
+ break;
18174
+ case OpKind.RepeaterCreate:
18175
+ if (pendingStructuralDirective !== void 0) {
18176
+ throw Error("AssertionError: Unexpected structural directive associated with @for block");
18177
+ }
18178
+ const forSlot = op.handle.slot + 1;
18179
+ const forView = job.views.get(op.xref);
18180
+ if (op.i18nPlaceholder === void 0) {
18181
+ resolvePlaceholdersForView(job, forView, i18nContexts, elements);
18182
+ } else {
18183
+ if (currentOps === null) {
18184
+ throw Error("i18n tag placeholder should only occur inside an i18n block");
18185
+ }
18186
+ recordTemplateStart(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18187
+ resolvePlaceholdersForView(job, forView, i18nContexts, elements);
18188
+ recordTemplateClose(job, forView, forSlot, op.i18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18189
+ pendingStructuralDirective = void 0;
18190
+ }
18191
+ if (op.emptyView !== null) {
18192
+ const emptySlot = op.handle.slot + 2;
18193
+ const emptyView = job.views.get(op.emptyView);
18194
+ if (op.emptyI18nPlaceholder === void 0) {
18195
+ resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
18196
+ } else {
18197
+ if (currentOps === null) {
18198
+ throw Error("i18n tag placeholder should only occur inside an i18n block");
18199
+ }
18200
+ recordTemplateStart(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18201
+ resolvePlaceholdersForView(job, emptyView, i18nContexts, elements);
18202
+ recordTemplateClose(job, emptyView, emptySlot, op.emptyI18nPlaceholder, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
18116
18203
  pendingStructuralDirective = void 0;
18117
18204
  }
18118
18205
  }
@@ -18145,8 +18232,8 @@ function recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {
18145
18232
  addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);
18146
18233
  }
18147
18234
  }
18148
- function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirective) {
18149
- let { startName, closeName } = op.i18nPlaceholder;
18235
+ function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
18236
+ let { startName, closeName } = i18nPlaceholder;
18150
18237
  let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
18151
18238
  if (!closeName) {
18152
18239
  flags |= I18nParamValueFlags.CloseTag;
@@ -18154,20 +18241,20 @@ function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirectiv
18154
18241
  if (structuralDirective !== void 0) {
18155
18242
  addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
18156
18243
  }
18157
- addParam(i18nContext.params, startName, op.handle.slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, op), flags);
18244
+ addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
18158
18245
  }
18159
- function recordTemplateClose(job, op, i18nContext, i18nBlock, structuralDirective) {
18160
- const { startName, closeName } = op.i18nPlaceholder;
18246
+ function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
18247
+ const { startName, closeName } = i18nPlaceholder;
18161
18248
  const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
18162
18249
  if (closeName) {
18163
- addParam(i18nContext.params, closeName, op.handle.slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, op), flags);
18250
+ addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
18164
18251
  if (structuralDirective !== void 0) {
18165
18252
  addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
18166
18253
  }
18167
18254
  }
18168
18255
  }
18169
- function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
18170
- for (const childOp of job.views.get(op.xref).create) {
18256
+ function getSubTemplateIndexForTemplateTag(job, i18nOp, view) {
18257
+ for (const childOp of view.create) {
18171
18258
  if (childOp.kind === OpKind.I18nStart) {
18172
18259
  return childOp.subTemplateIndex;
18173
18260
  }
@@ -18181,7 +18268,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
18181
18268
  params.set(placeholder, values);
18182
18269
  }
18183
18270
 
18184
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
18271
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
18185
18272
  function resolveI18nExpressionPlaceholders(job) {
18186
18273
  var _a2;
18187
18274
  const subTemplateIndicies = /* @__PURE__ */ new Map();
@@ -18220,7 +18307,7 @@ function resolveI18nExpressionPlaceholders(job) {
18220
18307
  }
18221
18308
  }
18222
18309
 
18223
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
18310
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
18224
18311
  function resolveI18nIcuPlaceholders(job) {
18225
18312
  for (const unit of job.units) {
18226
18313
  for (const op of unit.create) {
@@ -18264,7 +18351,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
18264
18351
  }
18265
18352
  };
18266
18353
 
18267
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
18354
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
18268
18355
  function resolveNames(job) {
18269
18356
  for (const unit of job.units) {
18270
18357
  processLexicalScope2(unit, unit.create, null);
@@ -18328,31 +18415,55 @@ function processLexicalScope2(unit, ops, savedView) {
18328
18415
  }
18329
18416
  }
18330
18417
 
18331
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
18332
- var sanitizers = /* @__PURE__ */ new Map([
18333
- [SecurityContext.HTML, SanitizerFn.Html],
18334
- [SecurityContext.SCRIPT, SanitizerFn.Script],
18335
- [SecurityContext.STYLE, SanitizerFn.Style],
18336
- [SecurityContext.URL, SanitizerFn.Url],
18337
- [SecurityContext.RESOURCE_URL, SanitizerFn.ResourceUrl]
18418
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
18419
+ var sanitizerFns = /* @__PURE__ */ new Map([
18420
+ [SecurityContext.HTML, Identifiers.sanitizeHtml],
18421
+ [SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl],
18422
+ [SecurityContext.SCRIPT, Identifiers.sanitizeScript],
18423
+ [SecurityContext.STYLE, Identifiers.sanitizeStyle],
18424
+ [SecurityContext.URL, Identifiers.sanitizeUrl]
18425
+ ]);
18426
+ var trustedValueFns = /* @__PURE__ */ new Map([
18427
+ [SecurityContext.HTML, Identifiers.trustConstantHtml],
18428
+ [SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl]
18338
18429
  ]);
18339
18430
  function resolveSanitizers(job) {
18431
+ var _a2, _b2;
18340
18432
  for (const unit of job.units) {
18341
18433
  const elements = createOpXrefMap(unit);
18342
- let sanitizerFn;
18434
+ if (job.kind !== CompilationJobKind.Host) {
18435
+ for (const op of unit.create) {
18436
+ if (op.kind === OpKind.ExtractedAttribute) {
18437
+ const trustedValueFn = (_a2 = trustedValueFns.get(getOnlySecurityContext(op.securityContext))) != null ? _a2 : null;
18438
+ op.trustedValueFn = trustedValueFn !== null ? importExpr(trustedValueFn) : null;
18439
+ }
18440
+ }
18441
+ }
18343
18442
  for (const op of unit.update) {
18344
18443
  switch (op.kind) {
18345
18444
  case OpKind.Property:
18346
18445
  case OpKind.Attribute:
18347
- sanitizerFn = sanitizers.get(op.securityContext) || null;
18348
- op.sanitizer = sanitizerFn ? new SanitizerExpr(sanitizerFn) : null;
18446
+ case OpKind.HostProperty:
18447
+ let sanitizerFn = null;
18448
+ if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.indexOf(SecurityContext.URL) > -1 && op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {
18449
+ sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;
18450
+ } else {
18451
+ sanitizerFn = (_b2 = sanitizerFns.get(getOnlySecurityContext(op.securityContext))) != null ? _b2 : null;
18452
+ }
18453
+ op.sanitizer = sanitizerFn !== null ? importExpr(sanitizerFn) : null;
18349
18454
  if (op.sanitizer === null) {
18350
- const ownerOp = elements.get(op.target);
18351
- if (ownerOp === void 0 || !isElementOrContainerOp(ownerOp)) {
18352
- throw Error("Property should have an element-like owner");
18455
+ let isIframe = false;
18456
+ if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {
18457
+ isIframe = true;
18458
+ } else {
18459
+ const ownerOp = elements.get(op.target);
18460
+ if (ownerOp === void 0 || !isElementOrContainerOp(ownerOp)) {
18461
+ throw Error("Property should have an element-like owner");
18462
+ }
18463
+ isIframe = isIframeElement(ownerOp);
18353
18464
  }
18354
- if (isIframeElement(ownerOp) && isIframeSecuritySensitiveAttr(op.name)) {
18355
- op.sanitizer = new SanitizerExpr(SanitizerFn.IframeAttribute);
18465
+ if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {
18466
+ op.sanitizer = importExpr(Identifiers.validateIframeAttribute);
18356
18467
  }
18357
18468
  }
18358
18469
  break;
@@ -18364,8 +18475,17 @@ function isIframeElement(op) {
18364
18475
  var _a2;
18365
18476
  return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
18366
18477
  }
18478
+ function getOnlySecurityContext(securityContext) {
18479
+ if (Array.isArray(securityContext)) {
18480
+ if (securityContext.length > 1) {
18481
+ throw Error(`AssertionError: Ambiguous security context`);
18482
+ }
18483
+ return securityContext[0] || SecurityContext.NONE;
18484
+ }
18485
+ return securityContext;
18486
+ }
18367
18487
 
18368
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
18488
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
18369
18489
  function saveAndRestoreView(job) {
18370
18490
  for (const unit of job.units) {
18371
18491
  unit.create.prepend([
@@ -18410,7 +18530,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
18410
18530
  }
18411
18531
  }
18412
18532
 
18413
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
18533
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
18414
18534
  function allocateSlots(job) {
18415
18535
  const slotMap = /* @__PURE__ */ new Map();
18416
18536
  for (const unit of job.units) {
@@ -18435,7 +18555,7 @@ function allocateSlots(job) {
18435
18555
  }
18436
18556
  }
18437
18557
 
18438
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
18558
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
18439
18559
  function specializeStyleBindings(job) {
18440
18560
  for (const unit of job.units) {
18441
18561
  for (const op of unit.update) {
@@ -18465,7 +18585,7 @@ function specializeStyleBindings(job) {
18465
18585
  }
18466
18586
  }
18467
18587
 
18468
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
18588
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
18469
18589
  function generateTemporaryVariables(job) {
18470
18590
  for (const unit of job.units) {
18471
18591
  unit.create.prepend(generateTemporaries(unit.create));
@@ -18523,7 +18643,7 @@ function assignName(names, expr) {
18523
18643
  expr.name = name;
18524
18644
  }
18525
18645
 
18526
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
18646
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
18527
18647
  function generateTrackFns(job) {
18528
18648
  for (const unit of job.units) {
18529
18649
  for (const op of unit.create) {
@@ -18553,7 +18673,7 @@ function generateTrackFns(job) {
18553
18673
  }
18554
18674
  }
18555
18675
 
18556
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
18676
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
18557
18677
  function optimizeTrackFns(job) {
18558
18678
  for (const unit of job.units) {
18559
18679
  for (const op of unit.create) {
@@ -18600,7 +18720,7 @@ function isTrackByFunctionCall(rootView, expr) {
18600
18720
  return true;
18601
18721
  }
18602
18722
 
18603
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
18723
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
18604
18724
  function generateTrackVariables(job) {
18605
18725
  for (const unit of job.units) {
18606
18726
  for (const op of unit.create) {
@@ -18621,7 +18741,7 @@ function generateTrackVariables(job) {
18621
18741
  }
18622
18742
  }
18623
18743
 
18624
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
18744
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
18625
18745
  function countVariables(job) {
18626
18746
  for (const unit of job.units) {
18627
18747
  let varCount = 0;
@@ -18726,7 +18846,7 @@ function isSingletonInterpolation(expr) {
18726
18846
  return true;
18727
18847
  }
18728
18848
 
18729
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
18849
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
18730
18850
  function optimizeVariables(job) {
18731
18851
  for (const unit of job.units) {
18732
18852
  inlineAlwaysInlineVariables(unit.create);
@@ -18976,7 +19096,7 @@ function allowConservativeInlining(decl, target) {
18976
19096
  }
18977
19097
  }
18978
19098
 
18979
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
19099
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
18980
19100
  function wrapI18nIcus(job) {
18981
19101
  for (const unit of job.units) {
18982
19102
  let currentI18nOp = null;
@@ -19006,17 +19126,17 @@ function wrapI18nIcus(job) {
19006
19126
  }
19007
19127
  }
19008
19128
 
19009
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
19129
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
19010
19130
  var phases = [
19011
19131
  { kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
19012
19132
  { kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
19013
19133
  { kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
19014
19134
  { kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
19015
19135
  { kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
19016
- { kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
19017
19136
  { kind: CompilationJobKind.Both, fn: specializeStyleBindings },
19018
19137
  { kind: CompilationJobKind.Both, fn: specializeBindings },
19019
19138
  { kind: CompilationJobKind.Both, fn: extractAttributes },
19139
+ { kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
19020
19140
  { kind: CompilationJobKind.Both, fn: parseExtractedStyles },
19021
19141
  { kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
19022
19142
  { kind: CompilationJobKind.Both, fn: collapseSingletonInterpolations },
@@ -19034,7 +19154,7 @@ var phases = [
19034
19154
  { kind: CompilationJobKind.Tmpl, fn: generateProjectionDefs },
19035
19155
  { kind: CompilationJobKind.Tmpl, fn: generateVariables },
19036
19156
  { kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
19037
- { kind: CompilationJobKind.Tmpl, fn: deleteAnyCasts },
19157
+ { kind: CompilationJobKind.Both, fn: deleteAnyCasts },
19038
19158
  { kind: CompilationJobKind.Both, fn: resolveDollarEvent },
19039
19159
  { kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
19040
19160
  { kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
@@ -19042,7 +19162,7 @@ var phases = [
19042
19162
  { kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
19043
19163
  { kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
19044
19164
  { kind: CompilationJobKind.Both, fn: resolveContexts },
19045
- { kind: CompilationJobKind.Tmpl, fn: resolveSanitizers },
19165
+ { kind: CompilationJobKind.Both, fn: resolveSanitizers },
19046
19166
  { kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },
19047
19167
  { kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },
19048
19168
  { kind: CompilationJobKind.Both, fn: expandSafeReads },
@@ -19172,8 +19292,10 @@ function emitHostBindingFunction(job) {
19172
19292
  );
19173
19293
  }
19174
19294
 
19175
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
19295
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
19176
19296
  var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
19297
+ var domSchema = new DomElementSchemaRegistry();
19298
+ var NG_TEMPLATE_TAG_NAME = "ng-template";
19177
19299
  function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
19178
19300
  const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
19179
19301
  ingestNodes(job.root, template2);
@@ -19183,17 +19305,27 @@ function ingestHostBinding(input, bindingParser, constantPool) {
19183
19305
  var _a2, _b2, _c2;
19184
19306
  const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
19185
19307
  for (const property2 of (_a2 = input.properties) != null ? _a2 : []) {
19186
- ingestHostProperty(job, property2, false);
19308
+ let bindingKind = BindingKind.Property;
19309
+ if (property2.name.startsWith("attr.")) {
19310
+ property2.name = property2.name.substring("attr.".length);
19311
+ bindingKind = BindingKind.Attribute;
19312
+ }
19313
+ if (property2.isAnimation) {
19314
+ bindingKind = BindingKind.Animation;
19315
+ }
19316
+ const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
19317
+ ingestHostProperty(job, property2, bindingKind, false, securityContexts);
19187
19318
  }
19188
19319
  for (const [name, expr] of (_b2 = Object.entries(input.attributes)) != null ? _b2 : []) {
19189
- ingestHostAttribute(job, name, expr);
19320
+ const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, name, true).filter((context) => context !== SecurityContext.NONE);
19321
+ ingestHostAttribute(job, name, expr, securityContexts);
19190
19322
  }
19191
19323
  for (const event of (_c2 = input.events) != null ? _c2 : []) {
19192
19324
  ingestHostEvent(job, event);
19193
19325
  }
19194
19326
  return job;
19195
19327
  }
19196
- function ingestHostProperty(job, property2, isTextAttribute) {
19328
+ function ingestHostProperty(job, property2, bindingKind, isTextAttribute, securityContexts) {
19197
19329
  let expression;
19198
19330
  const ast = property2.expression.ast;
19199
19331
  if (ast instanceof Interpolation) {
@@ -19201,33 +19333,27 @@ function ingestHostProperty(job, property2, isTextAttribute) {
19201
19333
  } else {
19202
19334
  expression = convertAst(ast, job, property2.sourceSpan);
19203
19335
  }
19204
- let bindingKind = BindingKind.Property;
19205
- if (property2.name.startsWith("attr.")) {
19206
- property2.name = property2.name.substring("attr.".length);
19207
- bindingKind = BindingKind.Attribute;
19208
- }
19209
- if (property2.isAnimation) {
19210
- bindingKind = BindingKind.Animation;
19211
- }
19212
- job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, null, property2.sourceSpan));
19336
+ job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, securityContexts, isTextAttribute, false, null, null, property2.sourceSpan));
19213
19337
  }
19214
- function ingestHostAttribute(job, name, value) {
19338
+ function ingestHostAttribute(job, name, value, securityContexts) {
19215
19339
  const attrBinding = createBindingOp(
19216
19340
  job.root.xref,
19217
19341
  BindingKind.Attribute,
19218
19342
  name,
19219
19343
  value,
19220
19344
  null,
19221
- SecurityContext.NONE,
19345
+ securityContexts,
19222
19346
  true,
19223
19347
  false,
19224
19348
  null,
19349
+ null,
19225
19350
  null
19226
19351
  );
19227
19352
  job.root.update.push(attrBinding);
19228
19353
  }
19229
19354
  function ingestHostEvent(job, event) {
19230
- const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, event.targetOrPhase, true, event.sourceSpan);
19355
+ const [phase, target] = event.type === 0 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
19356
+ const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, [], phase, target, true, event.sourceSpan);
19231
19357
  eventBinding.handlerOps.push(createStatementOp(new ReturnStatement(convertAst(event.handler.ast, job, event.sourceSpan), event.handlerSpan)));
19232
19358
  job.root.create.push(eventBinding);
19233
19359
  }
@@ -19267,14 +19393,17 @@ function ingestElement(unit, element2) {
19267
19393
  const [namespaceKey, elementName] = splitNsName(element2.name);
19268
19394
  const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
19269
19395
  unit.create.push(startOp);
19270
- ingestBindings(unit, startOp, element2);
19396
+ ingestElementBindings(unit, startOp, element2);
19271
19397
  ingestReferences(startOp, element2);
19398
+ let i18nBlockId = null;
19399
+ if (element2.i18n instanceof Message) {
19400
+ i18nBlockId = unit.job.allocateXrefId();
19401
+ unit.create.push(createI18nStartOp(i18nBlockId, element2.i18n));
19402
+ }
19272
19403
  ingestNodes(unit, element2.children);
19273
19404
  const endOp = createElementEndOp(id, (_a2 = element2.endSourceSpan) != null ? _a2 : element2.startSourceSpan);
19274
19405
  unit.create.push(endOp);
19275
- if (element2.i18n instanceof Message) {
19276
- const i18nBlockId = unit.job.allocateXrefId();
19277
- OpList.insertAfter(createI18nStartOp(i18nBlockId, element2.i18n), startOp);
19406
+ if (i18nBlockId !== null) {
19278
19407
  OpList.insertBefore(createI18nEndOp(i18nBlockId), endOp);
19279
19408
  }
19280
19409
  }
@@ -19294,7 +19423,7 @@ function ingestTemplate(unit, tmpl) {
19294
19423
  const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
19295
19424
  const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
19296
19425
  unit.create.push(templateOp);
19297
- ingestBindings(unit, templateOp, tmpl);
19426
+ ingestTemplateBindings(unit, templateOp, tmpl, templateKind);
19298
19427
  ingestReferences(templateOp, tmpl);
19299
19428
  ingestNodes(childView, tmpl.children);
19300
19429
  for (const { name, value } of tmpl.variables) {
@@ -19313,7 +19442,8 @@ function ingestContent(unit, content) {
19313
19442
  const attrs = content.attributes.flatMap((a) => [a.name, a.value]);
19314
19443
  const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, attrs, content.sourceSpan);
19315
19444
  for (const attr of content.attributes) {
19316
- ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue, attr.i18n);
19445
+ const securityContext = domSchema.securityContext(content.name, attr.name, true);
19446
+ unit.update.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
19317
19447
  }
19318
19448
  unit.create.push(op);
19319
19449
  }
@@ -19407,35 +19537,38 @@ function ingestSwitchBlock(unit, switchBlock) {
19407
19537
  const conditional2 = createConditionalOp(firstXref, firstSlotHandle, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
19408
19538
  unit.update.push(conditional2);
19409
19539
  }
19410
- function ingestDeferView(unit, suffix, children, sourceSpan) {
19540
+ function ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {
19541
+ if (i18nMeta !== void 0 && !(i18nMeta instanceof BlockPlaceholder)) {
19542
+ throw Error("Unhandled i18n metadata type for defer block");
19543
+ }
19411
19544
  if (children === void 0) {
19412
19545
  return null;
19413
19546
  }
19414
19547
  const secondaryView = unit.job.allocateView(unit.xref);
19415
19548
  ingestNodes(secondaryView, children);
19416
- const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, void 0, sourceSpan);
19549
+ const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan);
19417
19550
  unit.create.push(templateOp);
19418
19551
  return templateOp;
19419
19552
  }
19420
19553
  function ingestDeferBlock(unit, deferBlock) {
19421
- var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
19554
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
19422
19555
  const blockMeta = unit.job.deferBlocksMeta.get(deferBlock);
19423
19556
  if (blockMeta === void 0) {
19424
19557
  throw new Error(`AssertionError: unable to find metadata for deferred block`);
19425
19558
  }
19426
- const main = ingestDeferView(unit, "", deferBlock.children, deferBlock.sourceSpan);
19427
- const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.children, (_b2 = deferBlock.loading) == null ? void 0 : _b2.sourceSpan);
19428
- const placeholder = ingestDeferView(unit, "Placeholder", (_c2 = deferBlock.placeholder) == null ? void 0 : _c2.children, (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.sourceSpan);
19429
- const error2 = ingestDeferView(unit, "Error", (_e2 = deferBlock.error) == null ? void 0 : _e2.children, (_f2 = deferBlock.error) == null ? void 0 : _f2.sourceSpan);
19559
+ const main = ingestDeferView(unit, "", deferBlock.i18n, deferBlock.children, deferBlock.sourceSpan);
19560
+ const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.i18n, (_b2 = deferBlock.loading) == null ? void 0 : _b2.children, (_c2 = deferBlock.loading) == null ? void 0 : _c2.sourceSpan);
19561
+ const placeholder = ingestDeferView(unit, "Placeholder", (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.i18n, (_e2 = deferBlock.placeholder) == null ? void 0 : _e2.children, (_f2 = deferBlock.placeholder) == null ? void 0 : _f2.sourceSpan);
19562
+ const error2 = ingestDeferView(unit, "Error", (_g = deferBlock.error) == null ? void 0 : _g.i18n, (_h = deferBlock.error) == null ? void 0 : _h.children, (_i = deferBlock.error) == null ? void 0 : _i.sourceSpan);
19430
19563
  const deferXref = unit.job.allocateXrefId();
19431
19564
  const deferOp = createDeferOp(deferXref, main.xref, main.handle, blockMeta, deferBlock.sourceSpan);
19432
- deferOp.placeholderView = (_g = placeholder == null ? void 0 : placeholder.xref) != null ? _g : null;
19433
- deferOp.placeholderSlot = (_h = placeholder == null ? void 0 : placeholder.handle) != null ? _h : null;
19434
- deferOp.loadingSlot = (_i = loading == null ? void 0 : loading.handle) != null ? _i : null;
19435
- deferOp.errorSlot = (_j = error2 == null ? void 0 : error2.handle) != null ? _j : null;
19436
- deferOp.placeholderMinimumTime = (_l = (_k = deferBlock.placeholder) == null ? void 0 : _k.minimumTime) != null ? _l : null;
19437
- deferOp.loadingMinimumTime = (_n = (_m = deferBlock.loading) == null ? void 0 : _m.minimumTime) != null ? _n : null;
19438
- deferOp.loadingAfterTime = (_p = (_o = deferBlock.loading) == null ? void 0 : _o.afterTime) != null ? _p : null;
19565
+ deferOp.placeholderView = (_j = placeholder == null ? void 0 : placeholder.xref) != null ? _j : null;
19566
+ deferOp.placeholderSlot = (_k = placeholder == null ? void 0 : placeholder.handle) != null ? _k : null;
19567
+ deferOp.loadingSlot = (_l = loading == null ? void 0 : loading.handle) != null ? _l : null;
19568
+ deferOp.errorSlot = (_m = error2 == null ? void 0 : error2.handle) != null ? _m : null;
19569
+ deferOp.placeholderMinimumTime = (_o = (_n = deferBlock.placeholder) == null ? void 0 : _n.minimumTime) != null ? _o : null;
19570
+ deferOp.loadingMinimumTime = (_q = (_p = deferBlock.loading) == null ? void 0 : _p.minimumTime) != null ? _q : null;
19571
+ deferOp.loadingAfterTime = (_s = (_r = deferBlock.loading) == null ? void 0 : _r.afterTime) != null ? _s : null;
19439
19572
  unit.create.push(deferOp);
19440
19573
  let prefetch = false;
19441
19574
  let deferOnOps = [];
@@ -19517,7 +19650,7 @@ function ingestIcu(unit, icu) {
19517
19650
  }
19518
19651
  }
19519
19652
  function ingestForBlock(unit, forBlock) {
19520
- var _a2;
19653
+ var _a2, _b2, _c2;
19521
19654
  const repeaterView = unit.job.allocateView(unit.xref);
19522
19655
  const createRepeaterAlias = (ident, repeaterVar) => {
19523
19656
  repeaterView.aliases.add({
@@ -19551,8 +19684,16 @@ function ingestForBlock(unit, forBlock) {
19551
19684
  $odd: forBlock.contextVariables.$odd.name,
19552
19685
  $implicit: forBlock.item.name
19553
19686
  };
19687
+ if (forBlock.i18n !== void 0 && !(forBlock.i18n instanceof BlockPlaceholder)) {
19688
+ throw Error("AssertionError: Unhandled i18n metadata type or @for");
19689
+ }
19690
+ if (((_a2 = forBlock.empty) == null ? void 0 : _a2.i18n) !== void 0 && !(forBlock.empty.i18n instanceof BlockPlaceholder)) {
19691
+ throw Error("AssertionError: Unhandled i18n metadata type or @empty");
19692
+ }
19693
+ const i18nPlaceholder = forBlock.i18n;
19694
+ const emptyI18nPlaceholder = (_b2 = forBlock.empty) == null ? void 0 : _b2.i18n;
19554
19695
  const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);
19555
- const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_a2 = emptyView == null ? void 0 : emptyView.xref) != null ? _a2 : null, tagName, track, varNames, forBlock.sourceSpan);
19696
+ const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_c2 = emptyView == null ? void 0 : emptyView.xref) != null ? _c2 : null, tagName, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, forBlock.sourceSpan);
19556
19697
  unit.create.push(repeaterCreate2);
19557
19698
  const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));
19558
19699
  const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
@@ -19640,120 +19781,128 @@ function convertAst(ast, job, baseSourceSpan) {
19640
19781
  throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
19641
19782
  }
19642
19783
  }
19784
+ function convertAstWithInterpolation(job, value, i18nMeta) {
19785
+ var _a2, _b2;
19786
+ let expression;
19787
+ if (value instanceof Interpolation) {
19788
+ expression = new Interpolation2(value.strings, value.expressions.map((e) => convertAst(e, job, null)), Object.keys((_b2 = (_a2 = asMessage(i18nMeta)) == null ? void 0 : _a2.placeholders) != null ? _b2 : {}));
19789
+ } else if (value instanceof AST) {
19790
+ expression = convertAst(value, job, null);
19791
+ } else {
19792
+ expression = literal(value);
19793
+ }
19794
+ return expression;
19795
+ }
19796
+ var BINDING_KINDS = /* @__PURE__ */ new Map([
19797
+ [0, BindingKind.Property],
19798
+ [1, BindingKind.Attribute],
19799
+ [2, BindingKind.ClassName],
19800
+ [3, BindingKind.StyleProperty],
19801
+ [4, BindingKind.Animation]
19802
+ ]);
19643
19803
  function isPlainTemplate(tmpl) {
19644
19804
  var _a2;
19645
- return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] === "ng-template";
19646
- }
19647
- function ingestBindings(unit, op, element2) {
19648
- let flags = BindingFlags.None;
19649
- let hasI18nAttributes = false;
19650
- if (element2 instanceof Template) {
19651
- flags |= BindingFlags.OnNgTemplateElement;
19652
- if (element2 instanceof Template && isPlainTemplate(element2)) {
19653
- flags |= BindingFlags.BindingTargetsTemplate;
19654
- }
19655
- const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
19656
- for (const attr of element2.templateAttrs) {
19657
- if (attr instanceof TextAttribute) {
19658
- ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue, attr.i18n);
19659
- hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
19660
- } else {
19661
- ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags, attr.i18n);
19662
- hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
19663
- }
19664
- }
19805
+ return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] === NG_TEMPLATE_TAG_NAME;
19806
+ }
19807
+ function asMessage(i18nMeta) {
19808
+ if (i18nMeta == null) {
19809
+ return null;
19810
+ }
19811
+ if (!(i18nMeta instanceof Message)) {
19812
+ throw Error(`Expected i18n meta to be a Message, but got: ${i18nMeta.constructor.name}`);
19665
19813
  }
19814
+ return i18nMeta;
19815
+ }
19816
+ function ingestElementBindings(unit, op, element2) {
19817
+ var _a2;
19818
+ let bindings = new Array();
19666
19819
  for (const attr of element2.attributes) {
19667
- ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, flags | BindingFlags.TextValue, attr.i18n);
19668
- hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
19820
+ const securityContext = domSchema.securityContext(element2.name, attr.name, true);
19821
+ bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
19669
19822
  }
19670
19823
  for (const input of element2.inputs) {
19671
- ingestBinding(unit, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, flags, input.i18n);
19672
- hasI18nAttributes || (hasI18nAttributes = input.i18n !== void 0);
19824
+ bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, (_a2 = asMessage(input.i18n)) != null ? _a2 : null, input.sourceSpan));
19673
19825
  }
19826
+ unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
19827
+ unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
19674
19828
  for (const output of element2.outputs) {
19675
- let listenerOp;
19676
- if (output.type === 1) {
19677
- if (output.phase === null) {
19678
- throw Error("Animation listener should have a phase");
19679
- }
19680
- }
19681
- if (element2 instanceof Template && !isPlainTemplate(element2)) {
19682
- unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null));
19683
- continue;
19684
- }
19685
- listenerOp = createListenerOp(op.xref, op.handle, output.name, op.tag, output.phase, false, output.sourceSpan);
19686
- let handlerExprs;
19687
- let handler = output.handler;
19688
- if (handler instanceof ASTWithSource) {
19689
- handler = handler.ast;
19829
+ if (output.type === 1 && output.phase === null) {
19830
+ throw Error("Animation listener should have a phase");
19690
19831
  }
19691
- if (handler instanceof Chain) {
19692
- handlerExprs = handler.expressions;
19832
+ unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
19833
+ }
19834
+ if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
19835
+ unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
19836
+ }
19837
+ }
19838
+ function ingestTemplateBindings(unit, op, template2, templateKind) {
19839
+ let bindings = new Array();
19840
+ for (const attr of template2.templateAttrs) {
19841
+ if (attr instanceof TextAttribute) {
19842
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
19843
+ bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
19693
19844
  } else {
19694
- handlerExprs = [handler];
19845
+ bindings.push(createTemplateBinding(unit, op.xref, attr.type, attr.name, astOf(attr.value), attr.unit, attr.securityContext, true, templateKind, asMessage(attr.i18n), attr.sourceSpan));
19695
19846
  }
19696
- if (handlerExprs.length === 0) {
19697
- throw new Error("Expected listener to have non-empty expression list.");
19847
+ }
19848
+ for (const attr of template2.attributes) {
19849
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
19850
+ bindings.push(createTemplateBinding(unit, op.xref, 1, attr.name, attr.value, null, securityContext, false, templateKind, asMessage(attr.i18n), attr.sourceSpan));
19851
+ }
19852
+ for (const input of template2.inputs) {
19853
+ bindings.push(createTemplateBinding(unit, op.xref, input.type, input.name, astOf(input.value), input.unit, input.securityContext, false, templateKind, asMessage(input.i18n), input.sourceSpan));
19854
+ }
19855
+ unit.create.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.ExtractedAttribute));
19856
+ unit.update.push(bindings.filter((b) => (b == null ? void 0 : b.kind) === OpKind.Binding));
19857
+ for (const output of template2.outputs) {
19858
+ if (output.type === 1 && output.phase === null) {
19859
+ throw Error("Animation listener should have a phase");
19698
19860
  }
19699
- const expressions = handlerExprs.map((expr) => convertAst(expr, unit.job, output.handlerSpan));
19700
- const returnExpr = expressions.pop();
19701
- for (const expr of expressions) {
19702
- const stmtOp = createStatementOp(new ExpressionStatement(expr, expr.sourceSpan));
19703
- listenerOp.handlerOps.push(stmtOp);
19861
+ if (templateKind === TemplateKind.NgTemplate) {
19862
+ unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
19863
+ }
19864
+ if (templateKind === TemplateKind.Structural && output.type !== 1) {
19865
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
19866
+ unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
19704
19867
  }
19705
- listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
19706
- unit.create.push(listenerOp);
19707
19868
  }
19708
- if (hasI18nAttributes) {
19869
+ if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
19709
19870
  unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
19710
19871
  }
19711
19872
  }
19712
- var BINDING_KINDS = /* @__PURE__ */ new Map([
19713
- [0, BindingKind.Property],
19714
- [1, BindingKind.Attribute],
19715
- [2, BindingKind.ClassName],
19716
- [3, BindingKind.StyleProperty],
19717
- [4, BindingKind.Animation]
19718
- ]);
19719
- var BindingFlags;
19720
- (function(BindingFlags2) {
19721
- BindingFlags2[BindingFlags2["None"] = 0] = "None";
19722
- BindingFlags2[BindingFlags2["TextValue"] = 1] = "TextValue";
19723
- BindingFlags2[BindingFlags2["BindingTargetsTemplate"] = 2] = "BindingTargetsTemplate";
19724
- BindingFlags2[BindingFlags2["IsStructuralTemplateAttribute"] = 4] = "IsStructuralTemplateAttribute";
19725
- BindingFlags2[BindingFlags2["OnNgTemplateElement"] = 8] = "OnNgTemplateElement";
19726
- })(BindingFlags || (BindingFlags = {}));
19727
- function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags, i18nMeta) {
19728
- if (value instanceof ASTWithSource) {
19729
- value = value.ast;
19730
- }
19731
- let i18nContext = null;
19732
- if (i18nMeta !== void 0) {
19733
- if (!(i18nMeta instanceof Message)) {
19734
- throw Error(`Unhandled i18n metadata type for binding: ${i18nMeta.constructor.name}`);
19873
+ function createTemplateBinding(view, xref, type, name, value, unit, securityContext, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
19874
+ const isTextBinding = typeof value === "string";
19875
+ if (templateKind === TemplateKind.Structural) {
19876
+ if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
19877
+ return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
19878
+ }
19879
+ if (!isTextBinding && (type === 1 || type === 4)) {
19880
+ return null;
19735
19881
  }
19736
- i18nContext = view.job.allocateXrefId();
19737
- view.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, i18nMeta, null));
19738
- }
19739
- if (flags & BindingFlags.OnNgTemplateElement && !(flags & BindingFlags.BindingTargetsTemplate) && type === 0) {
19740
- view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null, i18nContext));
19741
- return;
19742
19882
  }
19743
- let expression;
19744
- if (value instanceof Interpolation) {
19745
- let i18nPlaceholders = [];
19746
- if (i18nMeta !== void 0) {
19747
- i18nPlaceholders = Object.keys(i18nMeta.placeholders);
19883
+ let bindingType = BINDING_KINDS.get(type);
19884
+ if (templateKind === TemplateKind.NgTemplate) {
19885
+ if (type === 2 || type === 3 || type === 1 && !isTextBinding) {
19886
+ bindingType = BindingKind.Property;
19748
19887
  }
19749
- expression = new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, view.job, null)), i18nPlaceholders);
19750
- } else if (value instanceof AST) {
19751
- expression = convertAst(value, view.job, null);
19752
- } else {
19753
- expression = value;
19754
19888
  }
19755
- const kind = BINDING_KINDS.get(type);
19756
- view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, !!(flags & BindingFlags.TextValue), !!(flags & BindingFlags.IsStructuralTemplateAttribute), i18nContext, sourceSpan));
19889
+ return createBindingOp(xref, bindingType, name, convertAstWithInterpolation(view.job, value, i18nMessage), unit, securityContext, isTextBinding, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan);
19890
+ }
19891
+ function makeListenerHandlerOps(unit, handler, handlerSpan) {
19892
+ handler = astOf(handler);
19893
+ const handlerOps = new Array();
19894
+ let handlerExprs = handler instanceof Chain ? handler.expressions : [handler];
19895
+ if (handlerExprs.length === 0) {
19896
+ throw new Error("Expected listener to have non-empty expression list.");
19897
+ }
19898
+ const expressions = handlerExprs.map((expr) => convertAst(expr, unit.job, handlerSpan));
19899
+ const returnExpr = expressions.pop();
19900
+ handlerOps.push(...expressions.map((e) => createStatementOp(new ExpressionStatement(e, e.sourceSpan))));
19901
+ handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
19902
+ return handlerOps;
19903
+ }
19904
+ function astOf(ast) {
19905
+ return ast instanceof ASTWithSource ? ast.ast : ast;
19757
19906
  }
19758
19907
  function ingestReferences(op, element2) {
19759
19908
  assertIsArray(op.localRefs);
@@ -19793,18 +19942,19 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
19793
19942
  }
19794
19943
  if (root !== null) {
19795
19944
  for (const attr of root.attributes) {
19796
- ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue, attr.i18n);
19945
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
19946
+ unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
19797
19947
  }
19798
19948
  const tagName = root instanceof Element ? root.name : root.tagName;
19799
- return tagName === "ng-template" ? null : tagName;
19949
+ return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;
19800
19950
  }
19801
19951
  return null;
19802
19952
  }
19803
19953
 
19804
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
19954
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
19805
19955
  var USE_TEMPLATE_PIPELINE = false;
19806
19956
 
19807
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
19957
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
19808
19958
  var IMPORTANT_FLAG = "!important";
19809
19959
  var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
19810
19960
  var StylingBuilder = class {
@@ -20137,7 +20287,7 @@ function isEmptyExpression(ast) {
20137
20287
  return ast instanceof EmptyExpr;
20138
20288
  }
20139
20289
 
20140
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
20290
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
20141
20291
  var HtmlParser = class extends Parser2 {
20142
20292
  constructor() {
20143
20293
  super(getHtmlTagDefinition);
@@ -20147,7 +20297,7 @@ var HtmlParser = class extends Parser2 {
20147
20297
  }
20148
20298
  };
20149
20299
 
20150
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
20300
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
20151
20301
  var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
20152
20302
  var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
20153
20303
  var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
@@ -20213,7 +20363,7 @@ function visitAllWithSiblings(visitor, nodes) {
20213
20363
  return result;
20214
20364
  }
20215
20365
 
20216
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
20366
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
20217
20367
  var PROPERTY_PARTS_SEPARATOR = ".";
20218
20368
  var ATTRIBUTE_PREFIX = "attr";
20219
20369
  var CLASS_PREFIX = "class";
@@ -20533,7 +20683,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
20533
20683
  return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
20534
20684
  }
20535
20685
 
20536
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
20686
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
20537
20687
  function isStyleUrlResolvable(url) {
20538
20688
  if (url == null || url.length === 0 || url[0] == "/")
20539
20689
  return false;
@@ -20542,7 +20692,7 @@ function isStyleUrlResolvable(url) {
20542
20692
  }
20543
20693
  var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
20544
20694
 
20545
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
20695
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
20546
20696
  var NG_CONTENT_SELECT_ATTR = "select";
20547
20697
  var LINK_ELEMENT = "link";
20548
20698
  var LINK_STYLE_REL_ATTR = "rel";
@@ -20612,7 +20762,7 @@ function normalizeNgContentSelect(selectAttr) {
20612
20762
  return selectAttr;
20613
20763
  }
20614
20764
 
20615
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
20765
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
20616
20766
  var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
20617
20767
  var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
20618
20768
  var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
@@ -20903,7 +21053,7 @@ function stripOptionalParentheses(param, errors) {
20903
21053
  return expression.slice(start, end);
20904
21054
  }
20905
21055
 
20906
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
21056
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
20907
21057
  var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
20908
21058
  var SEPARATOR_PATTERN = /^\s$/;
20909
21059
  var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
@@ -21167,7 +21317,7 @@ function parseDeferredTime(value) {
21167
21317
  return parseFloat(time) * (units === "s" ? 1e3 : 1);
21168
21318
  }
21169
21319
 
21170
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
21320
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
21171
21321
  var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
21172
21322
  var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
21173
21323
  var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
@@ -21302,7 +21452,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
21302
21452
  return { triggers, prefetchTriggers };
21303
21453
  }
21304
21454
 
21305
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
21455
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
21306
21456
  var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
21307
21457
  var KW_BIND_IDX = 1;
21308
21458
  var KW_LET_IDX = 2;
@@ -21733,7 +21883,7 @@ function textContents(node) {
21733
21883
  }
21734
21884
  }
21735
21885
 
21736
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
21886
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
21737
21887
  var TagType;
21738
21888
  (function(TagType2) {
21739
21889
  TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
@@ -21878,21 +22028,21 @@ function serializePlaceholderValue(value) {
21878
22028
  }
21879
22029
  }
21880
22030
 
21881
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
22031
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
21882
22032
  var NG_CONTENT_SELECT_ATTR2 = "select";
21883
22033
  var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
21884
22034
  var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
21885
- var NG_TEMPLATE_TAG_NAME = "ng-template";
21886
- var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([["window", Identifiers.resolveWindow], ["document", Identifiers.resolveDocument], ["body", Identifiers.resolveBody]]);
22035
+ var NG_TEMPLATE_TAG_NAME2 = "ng-template";
22036
+ var GLOBAL_TARGET_RESOLVERS2 = /* @__PURE__ */ new Map([["window", Identifiers.resolveWindow], ["document", Identifiers.resolveDocument], ["body", Identifiers.resolveBody]]);
21887
22037
  var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
21888
22038
  function renderFlagCheckIfStmt(flags, statements) {
21889
22039
  return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);
21890
22040
  }
21891
22041
  function prepareEventListenerParameters(eventAst, handlerName = null, scope = null) {
21892
22042
  const { type, name, target, phase, handler } = eventAst;
21893
- if (target && !GLOBAL_TARGET_RESOLVERS.has(target)) {
22043
+ if (target && !GLOBAL_TARGET_RESOLVERS2.has(target)) {
21894
22044
  throw new Error(`Unexpected global target '${target}' defined for '${name}' event.
21895
- Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS.keys())}.`);
22045
+ Supported list of global targets: ${Array.from(GLOBAL_TARGET_RESOLVERS2.keys())}.`);
21896
22046
  }
21897
22047
  const eventArgumentName = "$event";
21898
22048
  const implicitReceiverAccesses = /* @__PURE__ */ new Set();
@@ -21925,7 +22075,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
21925
22075
  if (target) {
21926
22076
  params.push(
21927
22077
  literal(false),
21928
- importExpr(GLOBAL_TARGET_RESOLVERS.get(target))
22078
+ importExpr(GLOBAL_TARGET_RESOLVERS2.get(target))
21929
22079
  );
21930
22080
  }
21931
22081
  return params;
@@ -22471,10 +22621,10 @@ var TemplateDefinitionBuilder = class {
22471
22621
  var _a2;
22472
22622
  const tagNameWithoutNamespace = template2.tagName ? splitNsName(template2.tagName)[1] : template2.tagName;
22473
22623
  const contextNameSuffix = template2.tagName ? "_" + sanitizeIdentifier(template2.tagName) : "";
22474
- const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template2.attributes, template2.inputs, template2.outputs, void 0, template2.templateAttrs);
22624
+ const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, template2.attributes, template2.inputs, template2.outputs, void 0, template2.templateAttrs);
22475
22625
  const templateIndex = this.createEmbeddedTemplateFn(tagNameWithoutNamespace, template2.children, contextNameSuffix, template2.sourceSpan, template2.variables, attrsExprs, template2.references, template2.i18n);
22476
22626
  this.templatePropertyBindings(templateIndex, template2.templateAttrs);
22477
- if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME) {
22627
+ if (tagNameWithoutNamespace === NG_TEMPLATE_TAG_NAME2) {
22478
22628
  const [i18nInputs, inputs] = partitionArray(template2.inputs, hasI18nMeta);
22479
22629
  if (i18nInputs.length > 0) {
22480
22630
  this.i18nAttributesInstruction(templateIndex, i18nInputs, (_a2 = template2.startSourceSpan) != null ? _a2 : template2.sourceSpan);
@@ -22715,8 +22865,8 @@ var TemplateDefinitionBuilder = class {
22715
22865
  }
22716
22866
  if (root !== null) {
22717
22867
  const name = root instanceof Element ? root.name : root.tagName;
22718
- tagName = name === NG_TEMPLATE_TAG_NAME ? null : name;
22719
- attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, root.attributes, root.inputs, []);
22868
+ tagName = name === NG_TEMPLATE_TAG_NAME2 ? null : name;
22869
+ attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME2, root.attributes, root.inputs, []);
22720
22870
  }
22721
22871
  return { tagName, attrsExprs };
22722
22872
  }
@@ -23555,7 +23705,7 @@ function createClosureModeGuard2() {
23555
23705
  return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
23556
23706
  }
23557
23707
 
23558
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
23708
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
23559
23709
  var ATTR_REGEX = /attr\.([^\]]+)/;
23560
23710
  var COMPONENT_VARIABLE = "%COMP%";
23561
23711
  var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
@@ -23876,6 +24026,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
23876
24026
  }
23877
24027
  const hostJob = ingestHostBinding({
23878
24028
  componentName: name,
24029
+ componentSelector: selector,
23879
24030
  properties: bindings,
23880
24031
  events: eventBindings,
23881
24032
  attributes: hostBindingsMetadata.attributes
@@ -24169,7 +24320,7 @@ function createHostDirectivesMappingArray(mapping) {
24169
24320
  return elements.length > 0 ? literalArr(elements) : null;
24170
24321
  }
24171
24322
 
24172
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
24323
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
24173
24324
  var R3TargetBinder = class {
24174
24325
  constructor(directiveMatcher) {
24175
24326
  this.directiveMatcher = directiveMatcher;
@@ -24774,11 +24925,11 @@ function extractScopedNodeEntities(rootScope) {
24774
24925
  return templateEntities;
24775
24926
  }
24776
24927
 
24777
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/resource_loader.mjs
24928
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
24778
24929
  var ResourceLoader = class {
24779
24930
  };
24780
24931
 
24781
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
24932
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
24782
24933
  var CompilerFacadeImpl = class {
24783
24934
  constructor(jitEvaluator = new JitEvaluator()) {
24784
24935
  this.jitEvaluator = jitEvaluator;
@@ -25330,17 +25481,17 @@ function publishFacade(global) {
25330
25481
  ng.\u0275compilerFacade = new CompilerFacadeImpl();
25331
25482
  }
25332
25483
 
25333
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/version.mjs
25334
- var VERSION2 = new Version("17.0.6");
25484
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
25485
+ var VERSION2 = new Version("17.0.7");
25335
25486
 
25336
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
25487
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
25337
25488
  var _VisitorMode;
25338
25489
  (function(_VisitorMode2) {
25339
25490
  _VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
25340
25491
  _VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
25341
25492
  })(_VisitorMode || (_VisitorMode = {}));
25342
25493
 
25343
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
25494
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
25344
25495
  var XmlTagDefinition = class {
25345
25496
  constructor() {
25346
25497
  this.closedByParent = false;
@@ -25362,7 +25513,7 @@ var XmlTagDefinition = class {
25362
25513
  };
25363
25514
  var _TAG_DEFINITION = new XmlTagDefinition();
25364
25515
 
25365
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
25516
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
25366
25517
  var FactoryTarget2;
25367
25518
  (function(FactoryTarget3) {
25368
25519
  FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
@@ -25372,10 +25523,10 @@ var FactoryTarget2;
25372
25523
  FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
25373
25524
  })(FactoryTarget2 || (FactoryTarget2 = {}));
25374
25525
 
25375
- // bazel-out/darwin-fastbuild/bin/packages/compiler/src/compiler.mjs
25526
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
25376
25527
  publishFacade(_global);
25377
25528
 
25378
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
25529
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
25379
25530
  var import_path2 = require("path");
25380
25531
  var import_typescript3 = __toESM(require("typescript"), 1);
25381
25532
  var REPLACEMENTS2 = {
@@ -25483,7 +25634,7 @@ function forEachClass(sourceFile, callback) {
25483
25634
  });
25484
25635
  }
25485
25636
 
25486
- // bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
25637
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
25487
25638
  function block_template_entities_default() {
25488
25639
  return (tree) => __async(this, null, function* () {
25489
25640
  const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);