@angular/core 17.1.0-next.2 → 17.1.0-next.3
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.
- package/esm2022/src/hydration/annotate.mjs +30 -20
- package/esm2022/src/hydration/interfaces.mjs +1 -1
- package/esm2022/src/hydration/node_lookup_utils.mjs +23 -2
- package/esm2022/src/render3/node_manipulation.mjs +2 -2
- package/esm2022/src/render3/view_manipulation.mjs +13 -5
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +64 -25
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +6 -1
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +693 -345
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +823 -384
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +996 -622
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/darwin-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/
|
|
75
|
+
// bazel-out/darwin-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/
|
|
155
|
+
// bazel-out/darwin-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/
|
|
159
|
+
// bazel-out/darwin-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/
|
|
176
|
+
// bazel-out/darwin-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/
|
|
209
|
+
// bazel-out/darwin-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/
|
|
517
|
+
// bazel-out/darwin-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/
|
|
579
|
+
// bazel-out/darwin-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/
|
|
819
|
+
// bazel-out/darwin-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/
|
|
1774
|
+
// bazel-out/darwin-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/
|
|
1957
|
+
// bazel-out/darwin-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/
|
|
2590
|
+
// bazel-out/darwin-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/
|
|
2678
|
+
// bazel-out/darwin-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/
|
|
2807
|
+
// bazel-out/darwin-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/
|
|
3292
|
+
// bazel-out/darwin-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/
|
|
3357
|
+
// bazel-out/darwin-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/
|
|
3502
|
+
// bazel-out/darwin-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/
|
|
3535
|
+
// bazel-out/darwin-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/
|
|
3916
|
+
// bazel-out/darwin-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/
|
|
4076
|
+
// bazel-out/darwin-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/
|
|
4104
|
+
// bazel-out/darwin-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/
|
|
4109
|
+
// bazel-out/darwin-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/
|
|
4211
|
+
// bazel-out/darwin-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/
|
|
4451
|
+
// bazel-out/darwin-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/
|
|
4536
|
+
// bazel-out/darwin-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/
|
|
4558
|
+
// bazel-out/darwin-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/
|
|
4575
|
+
// bazel-out/darwin-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/
|
|
4657
|
+
// bazel-out/darwin-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/
|
|
4804
|
+
// bazel-out/darwin-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/
|
|
4897
|
+
// bazel-out/darwin-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/
|
|
4935
|
+
// bazel-out/darwin-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/
|
|
5026
|
+
// bazel-out/darwin-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/
|
|
5043
|
+
// bazel-out/darwin-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/
|
|
5059
|
+
// bazel-out/darwin-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/
|
|
5200
|
+
// bazel-out/darwin-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/
|
|
5221
|
+
// bazel-out/darwin-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/
|
|
5229
|
+
// bazel-out/darwin-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/
|
|
5895
|
+
// bazel-out/darwin-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/
|
|
6536
|
+
// bazel-out/darwin-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/
|
|
6594
|
+
// bazel-out/darwin-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/
|
|
7065
|
+
// bazel-out/darwin-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";
|
|
@@ -7109,6 +7109,7 @@ var OpKind;
|
|
|
7109
7109
|
OpKind2[OpKind2["IcuStart"] = 41] = "IcuStart";
|
|
7110
7110
|
OpKind2[OpKind2["IcuEnd"] = 42] = "IcuEnd";
|
|
7111
7111
|
OpKind2[OpKind2["I18nContext"] = 43] = "I18nContext";
|
|
7112
|
+
OpKind2[OpKind2["I18nAttributes"] = 44] = "I18nAttributes";
|
|
7112
7113
|
})(OpKind || (OpKind = {}));
|
|
7113
7114
|
var ExpressionKind;
|
|
7114
7115
|
(function(ExpressionKind2) {
|
|
@@ -7185,6 +7186,11 @@ var I18nParamResolutionTime;
|
|
|
7185
7186
|
I18nParamResolutionTime2[I18nParamResolutionTime2["Creation"] = 0] = "Creation";
|
|
7186
7187
|
I18nParamResolutionTime2[I18nParamResolutionTime2["Postproccessing"] = 1] = "Postproccessing";
|
|
7187
7188
|
})(I18nParamResolutionTime || (I18nParamResolutionTime = {}));
|
|
7189
|
+
var I18nExpressionFor;
|
|
7190
|
+
(function(I18nExpressionFor2) {
|
|
7191
|
+
I18nExpressionFor2[I18nExpressionFor2["I18nText"] = 0] = "I18nText";
|
|
7192
|
+
I18nExpressionFor2[I18nExpressionFor2["I18nAttribute"] = 1] = "I18nAttribute";
|
|
7193
|
+
})(I18nExpressionFor || (I18nExpressionFor = {}));
|
|
7188
7194
|
var I18nParamValueFlags;
|
|
7189
7195
|
(function(I18nParamValueFlags2) {
|
|
7190
7196
|
I18nParamValueFlags2[I18nParamValueFlags2["None"] = 0] = "None";
|
|
@@ -7220,9 +7226,16 @@ var I18nContextKind;
|
|
|
7220
7226
|
(function(I18nContextKind2) {
|
|
7221
7227
|
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
7222
7228
|
I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
|
|
7229
|
+
I18nContextKind2[I18nContextKind2["Attr"] = 2] = "Attr";
|
|
7223
7230
|
})(I18nContextKind || (I18nContextKind = {}));
|
|
7231
|
+
var TemplateKind;
|
|
7232
|
+
(function(TemplateKind2) {
|
|
7233
|
+
TemplateKind2[TemplateKind2["NgTemplate"] = 0] = "NgTemplate";
|
|
7234
|
+
TemplateKind2[TemplateKind2["Structural"] = 1] = "Structural";
|
|
7235
|
+
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7236
|
+
})(TemplateKind || (TemplateKind = {}));
|
|
7224
7237
|
|
|
7225
|
-
// bazel-out/
|
|
7238
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7226
7239
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7227
7240
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7228
7241
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7254,7 +7267,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7254
7267
|
return expr[UsesVarOffset] === true;
|
|
7255
7268
|
}
|
|
7256
7269
|
|
|
7257
|
-
// bazel-out/
|
|
7270
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7258
7271
|
function createStatementOp(statement) {
|
|
7259
7272
|
return __spreadValues({
|
|
7260
7273
|
kind: OpKind.Statement,
|
|
@@ -7276,23 +7289,26 @@ var NEW_OP = {
|
|
|
7276
7289
|
next: null
|
|
7277
7290
|
};
|
|
7278
7291
|
|
|
7279
|
-
// bazel-out/
|
|
7280
|
-
function createInterpolateTextOp(xref, interpolation,
|
|
7292
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7293
|
+
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7281
7294
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7282
7295
|
kind: OpKind.InterpolateText,
|
|
7283
7296
|
target: xref,
|
|
7284
7297
|
interpolation,
|
|
7285
|
-
i18nPlaceholders,
|
|
7286
7298
|
sourceSpan
|
|
7287
7299
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7288
7300
|
}
|
|
7289
7301
|
var Interpolation2 = class {
|
|
7290
|
-
constructor(strings, expressions) {
|
|
7302
|
+
constructor(strings, expressions, i18nPlaceholders) {
|
|
7291
7303
|
this.strings = strings;
|
|
7292
7304
|
this.expressions = expressions;
|
|
7305
|
+
this.i18nPlaceholders = i18nPlaceholders;
|
|
7306
|
+
if (i18nPlaceholders.length !== 0 && i18nPlaceholders.length !== expressions.length) {
|
|
7307
|
+
throw new Error(`Expected ${expressions.length} placeholders to match interpolation expression count, but got ${i18nPlaceholders.length}`);
|
|
7308
|
+
}
|
|
7293
7309
|
}
|
|
7294
7310
|
};
|
|
7295
|
-
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute,
|
|
7311
|
+
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplate, i18nContext, sourceSpan) {
|
|
7296
7312
|
return __spreadValues({
|
|
7297
7313
|
kind: OpKind.Binding,
|
|
7298
7314
|
bindingKind: kind,
|
|
@@ -7302,11 +7318,12 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
7302
7318
|
unit,
|
|
7303
7319
|
securityContext,
|
|
7304
7320
|
isTextAttribute,
|
|
7305
|
-
|
|
7321
|
+
isStructuralTemplate,
|
|
7322
|
+
i18nContext,
|
|
7306
7323
|
sourceSpan
|
|
7307
7324
|
}, NEW_OP);
|
|
7308
7325
|
}
|
|
7309
|
-
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext,
|
|
7326
|
+
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplate, i18nContext, sourceSpan) {
|
|
7310
7327
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7311
7328
|
kind: OpKind.Property,
|
|
7312
7329
|
target,
|
|
@@ -7315,7 +7332,8 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7315
7332
|
isAnimationTrigger,
|
|
7316
7333
|
securityContext,
|
|
7317
7334
|
sanitizer: null,
|
|
7318
|
-
|
|
7335
|
+
isStructuralTemplate,
|
|
7336
|
+
i18nContext,
|
|
7319
7337
|
sourceSpan
|
|
7320
7338
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7321
7339
|
}
|
|
@@ -7354,7 +7372,7 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
7354
7372
|
sourceSpan
|
|
7355
7373
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7356
7374
|
}
|
|
7357
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute,
|
|
7375
|
+
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplate, i18nContext, sourceSpan) {
|
|
7358
7376
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7359
7377
|
kind: OpKind.Attribute,
|
|
7360
7378
|
target,
|
|
@@ -7363,7 +7381,8 @@ function createAttributeOp(target, name, expression, securityContext, isTextAttr
|
|
|
7363
7381
|
securityContext,
|
|
7364
7382
|
sanitizer: null,
|
|
7365
7383
|
isTextAttribute,
|
|
7366
|
-
|
|
7384
|
+
isStructuralTemplate,
|
|
7385
|
+
i18nContext,
|
|
7367
7386
|
sourceSpan
|
|
7368
7387
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7369
7388
|
}
|
|
@@ -7404,28 +7423,31 @@ function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
|
7404
7423
|
sourceSpan
|
|
7405
7424
|
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7406
7425
|
}
|
|
7407
|
-
function createI18nExpressionOp(context, target, handle, expression, i18nPlaceholder, resolutionTime, sourceSpan) {
|
|
7426
|
+
function createI18nExpressionOp(context, target, i18nOwner, handle, expression, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {
|
|
7408
7427
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7409
7428
|
kind: OpKind.I18nExpression,
|
|
7410
7429
|
context,
|
|
7411
7430
|
target,
|
|
7431
|
+
i18nOwner,
|
|
7412
7432
|
handle,
|
|
7413
7433
|
expression,
|
|
7414
7434
|
i18nPlaceholder,
|
|
7415
7435
|
resolutionTime,
|
|
7436
|
+
usage,
|
|
7437
|
+
name,
|
|
7416
7438
|
sourceSpan
|
|
7417
7439
|
}, NEW_OP), TRAIT_CONSUMES_VARS), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7418
7440
|
}
|
|
7419
|
-
function createI18nApplyOp(
|
|
7441
|
+
function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
7420
7442
|
return __spreadValues({
|
|
7421
7443
|
kind: OpKind.I18nApply,
|
|
7422
|
-
|
|
7444
|
+
owner,
|
|
7423
7445
|
handle,
|
|
7424
7446
|
sourceSpan
|
|
7425
7447
|
}, NEW_OP);
|
|
7426
7448
|
}
|
|
7427
7449
|
|
|
7428
|
-
// bazel-out/
|
|
7450
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7429
7451
|
var _a;
|
|
7430
7452
|
var _b;
|
|
7431
7453
|
var _c;
|
|
@@ -8195,6 +8217,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8195
8217
|
case OpKind.ProjectionDef:
|
|
8196
8218
|
case OpKind.Template:
|
|
8197
8219
|
case OpKind.Text:
|
|
8220
|
+
case OpKind.I18nAttributes:
|
|
8198
8221
|
break;
|
|
8199
8222
|
default:
|
|
8200
8223
|
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
|
|
@@ -8206,6 +8229,8 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8206
8229
|
} else if (expr instanceof BinaryOperatorExpr) {
|
|
8207
8230
|
expr.lhs = transformExpressionsInExpression(expr.lhs, transform2, flags);
|
|
8208
8231
|
expr.rhs = transformExpressionsInExpression(expr.rhs, transform2, flags);
|
|
8232
|
+
} else if (expr instanceof UnaryOperatorExpr) {
|
|
8233
|
+
expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
|
|
8209
8234
|
} else if (expr instanceof ReadPropExpr) {
|
|
8210
8235
|
expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
|
|
8211
8236
|
} else if (expr instanceof ReadKeyExpr) {
|
|
@@ -8245,6 +8270,8 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8245
8270
|
for (let i = 0; i < expr.expressions.length; i++) {
|
|
8246
8271
|
expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform2, flags);
|
|
8247
8272
|
}
|
|
8273
|
+
} else if (expr instanceof NotExpr) {
|
|
8274
|
+
expr.condition = transformExpressionsInExpression(expr.condition, transform2, flags);
|
|
8248
8275
|
} else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
|
|
8249
8276
|
} else {
|
|
8250
8277
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
@@ -8276,7 +8303,7 @@ function isStringLiteral(expr) {
|
|
|
8276
8303
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8277
8304
|
}
|
|
8278
8305
|
|
|
8279
|
-
// bazel-out/
|
|
8306
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8280
8307
|
var _OpList = class {
|
|
8281
8308
|
constructor() {
|
|
8282
8309
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8467,14 +8494,14 @@ var OpList = _OpList;
|
|
|
8467
8494
|
_OpList.nextListId = 0;
|
|
8468
8495
|
})();
|
|
8469
8496
|
|
|
8470
|
-
// bazel-out/
|
|
8497
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8471
8498
|
var SlotHandle = class {
|
|
8472
8499
|
constructor() {
|
|
8473
8500
|
this.slot = null;
|
|
8474
8501
|
}
|
|
8475
8502
|
};
|
|
8476
8503
|
|
|
8477
|
-
// bazel-out/
|
|
8504
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8478
8505
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8479
8506
|
OpKind.Element,
|
|
8480
8507
|
OpKind.ElementStart,
|
|
@@ -8500,10 +8527,11 @@ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan)
|
|
|
8500
8527
|
sourceSpan
|
|
8501
8528
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8502
8529
|
}
|
|
8503
|
-
function createTemplateOp(xref, tag, functionNameSuffix, namespace, i18nPlaceholder, sourceSpan) {
|
|
8530
|
+
function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, sourceSpan) {
|
|
8504
8531
|
return __spreadValues(__spreadValues({
|
|
8505
8532
|
kind: OpKind.Template,
|
|
8506
8533
|
xref,
|
|
8534
|
+
templateKind,
|
|
8507
8535
|
attributes: null,
|
|
8508
8536
|
tag,
|
|
8509
8537
|
handle: new SlotHandle(),
|
|
@@ -8604,25 +8632,27 @@ function createProjectionDefOp(def) {
|
|
|
8604
8632
|
def
|
|
8605
8633
|
}, NEW_OP);
|
|
8606
8634
|
}
|
|
8607
|
-
function createProjectionOp(xref, selector, sourceSpan) {
|
|
8635
|
+
function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceSpan) {
|
|
8608
8636
|
return __spreadValues(__spreadValues({
|
|
8609
8637
|
kind: OpKind.Projection,
|
|
8610
8638
|
xref,
|
|
8611
8639
|
handle: new SlotHandle(),
|
|
8612
8640
|
selector,
|
|
8641
|
+
i18nPlaceholder,
|
|
8613
8642
|
projectionSlotIndex: 0,
|
|
8614
|
-
attributes
|
|
8643
|
+
attributes,
|
|
8615
8644
|
localRefs: [],
|
|
8616
8645
|
sourceSpan
|
|
8617
8646
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8618
8647
|
}
|
|
8619
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression) {
|
|
8648
|
+
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext) {
|
|
8620
8649
|
return __spreadValues({
|
|
8621
8650
|
kind: OpKind.ExtractedAttribute,
|
|
8622
8651
|
target,
|
|
8623
8652
|
bindingKind,
|
|
8624
8653
|
name,
|
|
8625
|
-
expression
|
|
8654
|
+
expression,
|
|
8655
|
+
i18nContext
|
|
8626
8656
|
}, NEW_OP);
|
|
8627
8657
|
}
|
|
8628
8658
|
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
@@ -8659,10 +8689,11 @@ function createDeferOnOp(defer2, trigger, prefetch, sourceSpan) {
|
|
|
8659
8689
|
sourceSpan
|
|
8660
8690
|
}, NEW_OP);
|
|
8661
8691
|
}
|
|
8662
|
-
function createI18nMessageOp(xref, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {
|
|
8692
|
+
function createI18nMessageOp(xref, i18nContext, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {
|
|
8663
8693
|
return __spreadValues({
|
|
8664
8694
|
kind: OpKind.I18nMessage,
|
|
8665
8695
|
xref,
|
|
8696
|
+
i18nContext,
|
|
8666
8697
|
i18nBlock,
|
|
8667
8698
|
message,
|
|
8668
8699
|
messagePlaceholder,
|
|
@@ -8707,6 +8738,9 @@ function createIcuEndOp(xref) {
|
|
|
8707
8738
|
}, NEW_OP);
|
|
8708
8739
|
}
|
|
8709
8740
|
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8741
|
+
if (i18nBlock === null && contextKind !== I18nContextKind.Attr) {
|
|
8742
|
+
throw new Error("AssertionError: i18nBlock must be provided for non-attribute contexts.");
|
|
8743
|
+
}
|
|
8710
8744
|
return __spreadValues({
|
|
8711
8745
|
kind: OpKind.I18nContext,
|
|
8712
8746
|
contextKind,
|
|
@@ -8718,22 +8752,32 @@ function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan)
|
|
|
8718
8752
|
postprocessingParams: /* @__PURE__ */ new Map()
|
|
8719
8753
|
}, NEW_OP);
|
|
8720
8754
|
}
|
|
8755
|
+
function createI18nAttributesOp(xref, handle, target) {
|
|
8756
|
+
return __spreadValues(__spreadValues({
|
|
8757
|
+
kind: OpKind.I18nAttributes,
|
|
8758
|
+
xref,
|
|
8759
|
+
handle,
|
|
8760
|
+
target,
|
|
8761
|
+
i18nAttributesConfig: null
|
|
8762
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8763
|
+
}
|
|
8721
8764
|
|
|
8722
|
-
// bazel-out/
|
|
8723
|
-
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8765
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8766
|
+
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, sourceSpan) {
|
|
8724
8767
|
return __spreadValues(__spreadValues({
|
|
8725
8768
|
kind: OpKind.HostProperty,
|
|
8726
8769
|
name,
|
|
8727
8770
|
expression,
|
|
8728
8771
|
isAnimationTrigger,
|
|
8772
|
+
i18nContext,
|
|
8729
8773
|
sourceSpan
|
|
8730
8774
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8731
8775
|
}
|
|
8732
8776
|
|
|
8733
|
-
// bazel-out/
|
|
8777
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8734
8778
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8735
8779
|
|
|
8736
|
-
// bazel-out/
|
|
8780
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8737
8781
|
var CompilationJobKind;
|
|
8738
8782
|
(function(CompilationJobKind2) {
|
|
8739
8783
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8840,7 +8884,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8840
8884
|
}
|
|
8841
8885
|
};
|
|
8842
8886
|
|
|
8843
|
-
// bazel-out/
|
|
8887
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8844
8888
|
function deleteAnyCasts(job) {
|
|
8845
8889
|
for (const unit of job.units) {
|
|
8846
8890
|
for (const op of unit.ops()) {
|
|
@@ -8858,7 +8902,7 @@ function removeAnys(e) {
|
|
|
8858
8902
|
return e;
|
|
8859
8903
|
}
|
|
8860
8904
|
|
|
8861
|
-
// bazel-out/
|
|
8905
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8862
8906
|
function applyI18nExpressions(job) {
|
|
8863
8907
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8864
8908
|
for (const unit of job.units) {
|
|
@@ -8871,7 +8915,7 @@ function applyI18nExpressions(job) {
|
|
|
8871
8915
|
for (const unit of job.units) {
|
|
8872
8916
|
for (const op of unit.update) {
|
|
8873
8917
|
if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) {
|
|
8874
|
-
OpList.insertAfter(createI18nApplyOp(op.
|
|
8918
|
+
OpList.insertAfter(createI18nApplyOp(op.i18nOwner, op.handle, null), op);
|
|
8875
8919
|
}
|
|
8876
8920
|
}
|
|
8877
8921
|
}
|
|
@@ -8883,13 +8927,25 @@ function needsApplication(i18nContexts, op) {
|
|
|
8883
8927
|
}
|
|
8884
8928
|
const context = i18nContexts.get(op.context);
|
|
8885
8929
|
const nextContext2 = i18nContexts.get(op.next.context);
|
|
8886
|
-
if (context
|
|
8930
|
+
if (context === void 0) {
|
|
8931
|
+
throw new Error("AssertionError: expected an I18nContextOp to exist for the I18nExpressionOp's context");
|
|
8932
|
+
}
|
|
8933
|
+
if (nextContext2 === void 0) {
|
|
8934
|
+
throw new Error("AssertionError: expected an I18nContextOp to exist for the next I18nExpressionOp's context");
|
|
8935
|
+
}
|
|
8936
|
+
if (context.i18nBlock !== null) {
|
|
8937
|
+
if (context.i18nBlock !== nextContext2.i18nBlock) {
|
|
8938
|
+
return true;
|
|
8939
|
+
}
|
|
8940
|
+
return false;
|
|
8941
|
+
}
|
|
8942
|
+
if (op.i18nOwner !== op.next.i18nOwner) {
|
|
8887
8943
|
return true;
|
|
8888
8944
|
}
|
|
8889
8945
|
return false;
|
|
8890
8946
|
}
|
|
8891
8947
|
|
|
8892
|
-
// bazel-out/
|
|
8948
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8893
8949
|
function assignI18nSlotDependencies(job) {
|
|
8894
8950
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8895
8951
|
let lastSlotConsumer = null;
|
|
@@ -8904,20 +8960,47 @@ function assignI18nSlotDependencies(job) {
|
|
|
8904
8960
|
currentI18nOp = op;
|
|
8905
8961
|
break;
|
|
8906
8962
|
case OpKind.I18nEnd:
|
|
8963
|
+
if (currentI18nOp === null) {
|
|
8964
|
+
throw new Error("AssertionError: Expected an active I18n block while calculating last slot consumers");
|
|
8965
|
+
}
|
|
8966
|
+
if (lastSlotConsumer === null) {
|
|
8967
|
+
throw new Error("AssertionError: Expected a last slot consumer while calculating last slot consumers");
|
|
8968
|
+
}
|
|
8907
8969
|
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8908
8970
|
currentI18nOp = null;
|
|
8909
8971
|
break;
|
|
8910
8972
|
}
|
|
8911
8973
|
}
|
|
8974
|
+
let opsToMove = [];
|
|
8975
|
+
let moveAfterTarget = null;
|
|
8976
|
+
let previousTarget = null;
|
|
8912
8977
|
for (const op of unit.update) {
|
|
8913
|
-
if (op
|
|
8914
|
-
op.target
|
|
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");
|
|
8992
|
+
}
|
|
8993
|
+
op.target = target;
|
|
8994
|
+
moveAfterTarget = op.target;
|
|
8915
8995
|
}
|
|
8916
8996
|
}
|
|
8997
|
+
if (moveAfterTarget !== null) {
|
|
8998
|
+
unit.update.push(opsToMove);
|
|
8999
|
+
}
|
|
8917
9000
|
}
|
|
8918
9001
|
}
|
|
8919
9002
|
|
|
8920
|
-
// bazel-out/
|
|
9003
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8921
9004
|
function createOpXrefMap(unit) {
|
|
8922
9005
|
const map = /* @__PURE__ */ new Map();
|
|
8923
9006
|
for (const op of unit.create) {
|
|
@@ -8929,7 +9012,7 @@ function createOpXrefMap(unit) {
|
|
|
8929
9012
|
return map;
|
|
8930
9013
|
}
|
|
8931
9014
|
|
|
8932
|
-
// bazel-out/
|
|
9015
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8933
9016
|
function extractAttributes(job) {
|
|
8934
9017
|
for (const unit of job.units) {
|
|
8935
9018
|
const elements = createOpXrefMap(unit);
|
|
@@ -8940,18 +9023,26 @@ function extractAttributes(job) {
|
|
|
8940
9023
|
break;
|
|
8941
9024
|
case OpKind.Property:
|
|
8942
9025
|
if (!op.isAnimationTrigger) {
|
|
8943
|
-
|
|
9026
|
+
let bindingKind;
|
|
9027
|
+
if (op.i18nContext !== null) {
|
|
9028
|
+
bindingKind = BindingKind.I18n;
|
|
9029
|
+
} else if (op.isStructuralTemplate) {
|
|
9030
|
+
bindingKind = BindingKind.Template;
|
|
9031
|
+
} else {
|
|
9032
|
+
bindingKind = BindingKind.Property;
|
|
9033
|
+
}
|
|
9034
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, bindingKind, op.name, null, null), lookupElement(elements, op.target));
|
|
8944
9035
|
}
|
|
8945
9036
|
break;
|
|
8946
9037
|
case OpKind.StyleProp:
|
|
8947
9038
|
case OpKind.ClassProp:
|
|
8948
9039
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
8949
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null), lookupElement(elements, op.target));
|
|
9040
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null, null), lookupElement(elements, op.target));
|
|
8950
9041
|
}
|
|
8951
9042
|
break;
|
|
8952
9043
|
case OpKind.Listener:
|
|
8953
9044
|
if (!op.isAnimationListener) {
|
|
8954
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null);
|
|
9045
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null, null);
|
|
8955
9046
|
if (job.kind === CompilationJobKind.Host) {
|
|
8956
9047
|
unit.create.push(extractedAttributeOp);
|
|
8957
9048
|
} else {
|
|
@@ -8985,7 +9076,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8985
9076
|
}
|
|
8986
9077
|
}
|
|
8987
9078
|
if (extractable) {
|
|
8988
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.
|
|
9079
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplate ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext);
|
|
8989
9080
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
8990
9081
|
unit.create.push(extractedAttributeOp);
|
|
8991
9082
|
} else {
|
|
@@ -8996,7 +9087,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8996
9087
|
}
|
|
8997
9088
|
}
|
|
8998
9089
|
|
|
8999
|
-
// bazel-out/
|
|
9090
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
9000
9091
|
function lookupElement2(elements, xref) {
|
|
9001
9092
|
const el = elements.get(xref);
|
|
9002
9093
|
if (el === void 0) {
|
|
@@ -9026,15 +9117,15 @@ function specializeBindings(job) {
|
|
|
9026
9117
|
const target = lookupElement2(elements, op.target);
|
|
9027
9118
|
target.nonBindable = true;
|
|
9028
9119
|
} else {
|
|
9029
|
-
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.
|
|
9120
|
+
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplate, op.i18nContext, op.sourceSpan));
|
|
9030
9121
|
}
|
|
9031
9122
|
break;
|
|
9032
9123
|
case BindingKind.Property:
|
|
9033
9124
|
case BindingKind.Animation:
|
|
9034
9125
|
if (job.kind === CompilationJobKind.Host) {
|
|
9035
|
-
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.sourceSpan));
|
|
9126
|
+
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.sourceSpan));
|
|
9036
9127
|
} else {
|
|
9037
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.
|
|
9128
|
+
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplate, op.i18nContext, op.sourceSpan));
|
|
9038
9129
|
}
|
|
9039
9130
|
break;
|
|
9040
9131
|
case BindingKind.I18n:
|
|
@@ -9046,7 +9137,7 @@ function specializeBindings(job) {
|
|
|
9046
9137
|
}
|
|
9047
9138
|
}
|
|
9048
9139
|
|
|
9049
|
-
// bazel-out/
|
|
9140
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9050
9141
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9051
9142
|
Identifiers.attribute,
|
|
9052
9143
|
Identifiers.classProp,
|
|
@@ -9112,7 +9203,7 @@ function chainOperationsInList(opList) {
|
|
|
9112
9203
|
}
|
|
9113
9204
|
}
|
|
9114
9205
|
|
|
9115
|
-
// bazel-out/
|
|
9206
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9116
9207
|
function collapseSingletonInterpolations(job) {
|
|
9117
9208
|
for (const unit of job.units) {
|
|
9118
9209
|
for (const op of unit.update) {
|
|
@@ -9124,7 +9215,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9124
9215
|
}
|
|
9125
9216
|
}
|
|
9126
9217
|
|
|
9127
|
-
// bazel-out/
|
|
9218
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9128
9219
|
function generateConditionalExpressions(job) {
|
|
9129
9220
|
for (const unit of job.units) {
|
|
9130
9221
|
for (const op of unit.ops()) {
|
|
@@ -9161,7 +9252,7 @@ function generateConditionalExpressions(job) {
|
|
|
9161
9252
|
}
|
|
9162
9253
|
}
|
|
9163
9254
|
|
|
9164
|
-
// bazel-out/
|
|
9255
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9165
9256
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9166
9257
|
["&&", BinaryOperator.And],
|
|
9167
9258
|
[">", BinaryOperator.Bigger],
|
|
@@ -9211,7 +9302,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9211
9302
|
return literal(value);
|
|
9212
9303
|
}
|
|
9213
9304
|
|
|
9214
|
-
// bazel-out/
|
|
9305
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9215
9306
|
function collectElementConsts(job) {
|
|
9216
9307
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9217
9308
|
for (const unit of job.units) {
|
|
@@ -9297,7 +9388,7 @@ var ElementAttributes = class {
|
|
|
9297
9388
|
array.push(...getAttributeNameLiterals(name));
|
|
9298
9389
|
if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
|
|
9299
9390
|
if (value === null) {
|
|
9300
|
-
throw Error("Attribute & style element attributes must have a value");
|
|
9391
|
+
throw Error("Attribute, i18n attribute, & style element attributes must have a value");
|
|
9301
9392
|
}
|
|
9302
9393
|
array.push(value);
|
|
9303
9394
|
}
|
|
@@ -9345,7 +9436,48 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9345
9436
|
return literalArr(attrArray);
|
|
9346
9437
|
}
|
|
9347
9438
|
|
|
9348
|
-
// bazel-out/
|
|
9439
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
9440
|
+
function convertI18nBindings(job) {
|
|
9441
|
+
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
9442
|
+
for (const unit of job.units) {
|
|
9443
|
+
for (const op of unit.create) {
|
|
9444
|
+
if (op.kind === OpKind.I18nAttributes) {
|
|
9445
|
+
i18nAttributesByElem.set(op.target, op);
|
|
9446
|
+
}
|
|
9447
|
+
}
|
|
9448
|
+
for (const op of unit.update) {
|
|
9449
|
+
switch (op.kind) {
|
|
9450
|
+
case OpKind.Property:
|
|
9451
|
+
case OpKind.Attribute:
|
|
9452
|
+
if (op.i18nContext === null) {
|
|
9453
|
+
continue;
|
|
9454
|
+
}
|
|
9455
|
+
if (!(op.expression instanceof Interpolation2)) {
|
|
9456
|
+
continue;
|
|
9457
|
+
}
|
|
9458
|
+
const i18nAttributesForElem = i18nAttributesByElem.get(op.target);
|
|
9459
|
+
if (i18nAttributesForElem === void 0) {
|
|
9460
|
+
throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");
|
|
9461
|
+
}
|
|
9462
|
+
if (i18nAttributesForElem.target !== op.target) {
|
|
9463
|
+
throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");
|
|
9464
|
+
}
|
|
9465
|
+
const ops = [];
|
|
9466
|
+
for (let i = 0; i < op.expression.expressions.length; i++) {
|
|
9467
|
+
const expr = op.expression.expressions[i];
|
|
9468
|
+
if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) {
|
|
9469
|
+
throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`);
|
|
9470
|
+
}
|
|
9471
|
+
ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));
|
|
9472
|
+
}
|
|
9473
|
+
OpList.replaceWithMany(op, ops);
|
|
9474
|
+
break;
|
|
9475
|
+
}
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
}
|
|
9479
|
+
|
|
9480
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9349
9481
|
function createDeferDepsFns(job) {
|
|
9350
9482
|
for (const unit of job.units) {
|
|
9351
9483
|
for (const op of unit.create) {
|
|
@@ -9373,7 +9505,7 @@ function createDeferDepsFns(job) {
|
|
|
9373
9505
|
}
|
|
9374
9506
|
}
|
|
9375
9507
|
|
|
9376
|
-
// bazel-out/
|
|
9508
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9377
9509
|
function createI18nContexts(job) {
|
|
9378
9510
|
const rootContexts = /* @__PURE__ */ new Map();
|
|
9379
9511
|
let currentI18nOp = null;
|
|
@@ -9417,7 +9549,7 @@ function createI18nContexts(job) {
|
|
|
9417
9549
|
}
|
|
9418
9550
|
}
|
|
9419
9551
|
|
|
9420
|
-
// bazel-out/
|
|
9552
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9421
9553
|
function configureDeferInstructions(job) {
|
|
9422
9554
|
for (const unit of job.units) {
|
|
9423
9555
|
for (const op of unit.create) {
|
|
@@ -9434,7 +9566,7 @@ function configureDeferInstructions(job) {
|
|
|
9434
9566
|
}
|
|
9435
9567
|
}
|
|
9436
9568
|
|
|
9437
|
-
// bazel-out/
|
|
9569
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9438
9570
|
function resolveDeferTargetNames(job) {
|
|
9439
9571
|
const scopes = /* @__PURE__ */ new Map();
|
|
9440
9572
|
function getScopeForView2(view) {
|
|
@@ -9528,7 +9660,7 @@ var Scope = class {
|
|
|
9528
9660
|
}
|
|
9529
9661
|
};
|
|
9530
9662
|
|
|
9531
|
-
// bazel-out/
|
|
9663
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9532
9664
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9533
9665
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9534
9666
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9555,7 +9687,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9555
9687
|
}
|
|
9556
9688
|
}
|
|
9557
9689
|
|
|
9558
|
-
// bazel-out/
|
|
9690
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9559
9691
|
function expandSafeReads(job) {
|
|
9560
9692
|
for (const unit of job.units) {
|
|
9561
9693
|
for (const op of unit.ops()) {
|
|
@@ -9691,7 +9823,7 @@ function ternaryTransform(e) {
|
|
|
9691
9823
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9692
9824
|
}
|
|
9693
9825
|
|
|
9694
|
-
// bazel-out/
|
|
9826
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9695
9827
|
var ESCAPE = "\uFFFD";
|
|
9696
9828
|
var ELEMENT_MARKER = "#";
|
|
9697
9829
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9715,6 +9847,15 @@ function extractI18nMessages(job) {
|
|
|
9715
9847
|
}
|
|
9716
9848
|
}
|
|
9717
9849
|
}
|
|
9850
|
+
for (const unit of job.units) {
|
|
9851
|
+
for (const op of unit.create) {
|
|
9852
|
+
if (op.kind !== OpKind.I18nContext || op.contextKind !== I18nContextKind.Attr) {
|
|
9853
|
+
continue;
|
|
9854
|
+
}
|
|
9855
|
+
const i18nMessageOp = createI18nMessage(job, op);
|
|
9856
|
+
unit.create.push(i18nMessageOp);
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9718
9859
|
const i18nBlockMessages = /* @__PURE__ */ new Map();
|
|
9719
9860
|
for (const unit of job.units) {
|
|
9720
9861
|
for (const op of unit.create) {
|
|
@@ -9737,6 +9878,9 @@ function extractI18nMessages(job) {
|
|
|
9737
9878
|
}
|
|
9738
9879
|
const i18nContext = i18nContexts.get(op.context);
|
|
9739
9880
|
if (i18nContext.contextKind === I18nContextKind.Icu) {
|
|
9881
|
+
if (i18nContext.i18nBlock === null) {
|
|
9882
|
+
throw Error("ICU context should have its i18n block set.");
|
|
9883
|
+
}
|
|
9740
9884
|
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9741
9885
|
unit.create.push(subMessage);
|
|
9742
9886
|
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
@@ -9753,69 +9897,54 @@ function extractI18nMessages(job) {
|
|
|
9753
9897
|
}
|
|
9754
9898
|
}
|
|
9755
9899
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9756
|
-
let
|
|
9757
|
-
const
|
|
9758
|
-
|
|
9759
|
-
|
|
9900
|
+
let formattedParams = formatParams(context.params);
|
|
9901
|
+
const formattedPostprocessingParams = formatParams(context.postprocessingParams);
|
|
9902
|
+
let needsPostprocessing = formattedPostprocessingParams.size > 0;
|
|
9903
|
+
for (const values of context.params.values()) {
|
|
9904
|
+
if (values.length > 1) {
|
|
9905
|
+
needsPostprocessing = true;
|
|
9906
|
+
}
|
|
9907
|
+
}
|
|
9908
|
+
return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9760
9909
|
}
|
|
9761
9910
|
function formatParams(params) {
|
|
9762
9911
|
const formattedParams = /* @__PURE__ */ new Map();
|
|
9763
|
-
let needsPostprocessing = false;
|
|
9764
9912
|
for (const [placeholder, placeholderValues] of params) {
|
|
9765
|
-
const
|
|
9766
|
-
needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
|
|
9913
|
+
const serializedValues = formatParamValues(placeholderValues);
|
|
9767
9914
|
if (serializedValues !== null) {
|
|
9768
9915
|
formattedParams.set(placeholder, literal(serializedValues));
|
|
9769
9916
|
}
|
|
9770
9917
|
}
|
|
9771
|
-
return
|
|
9918
|
+
return formattedParams;
|
|
9772
9919
|
}
|
|
9773
9920
|
function formatParamValues(values) {
|
|
9774
9921
|
if (values.length === 0) {
|
|
9775
|
-
return
|
|
9922
|
+
return null;
|
|
9776
9923
|
}
|
|
9777
|
-
collapseElementTemplatePairs(values);
|
|
9778
9924
|
const serializedValues = values.map((value) => formatValue(value));
|
|
9779
|
-
return serializedValues.length === 1 ?
|
|
9925
|
+
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
|
|
9780
9926
|
}
|
|
9781
|
-
function
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
const value = values[i];
|
|
9786
|
-
if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
|
|
9787
|
-
const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
|
|
9788
|
-
valueIndicies.push(i);
|
|
9789
|
-
valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
|
|
9790
|
-
}
|
|
9791
|
-
}
|
|
9792
|
-
for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
|
|
9793
|
-
if (valueIndicies.length > 1) {
|
|
9794
|
-
const elementIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.ElementTag);
|
|
9795
|
-
const templateIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.TemplateTag);
|
|
9796
|
-
if (elementIndex !== void 0 && templateIndex !== void 0) {
|
|
9797
|
-
const elementValue = values[elementIndex];
|
|
9798
|
-
const templateValue = values[templateIndex];
|
|
9799
|
-
let compundValue;
|
|
9800
|
-
if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
|
|
9801
|
-
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9802
|
-
} else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
|
|
9803
|
-
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
|
|
9804
|
-
} else {
|
|
9805
|
-
compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9806
|
-
}
|
|
9807
|
-
values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
9808
|
-
values.splice(templateIndex, 1, null);
|
|
9809
|
-
}
|
|
9927
|
+
function formatValue(value) {
|
|
9928
|
+
if (value.flags & I18nParamValueFlags.ElementTag && value.flags & I18nParamValueFlags.TemplateTag) {
|
|
9929
|
+
if (typeof value.value !== "object") {
|
|
9930
|
+
throw Error("AssertionError: Expected i18n param value to have an element and template slot");
|
|
9810
9931
|
}
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9932
|
+
const elementValue = formatValue(__spreadProps(__spreadValues({}, value), {
|
|
9933
|
+
value: value.value.element,
|
|
9934
|
+
flags: value.flags & ~I18nParamValueFlags.TemplateTag
|
|
9935
|
+
}));
|
|
9936
|
+
const templateValue = formatValue(__spreadProps(__spreadValues({}, value), {
|
|
9937
|
+
value: value.value.template,
|
|
9938
|
+
flags: value.flags & ~I18nParamValueFlags.ElementTag
|
|
9939
|
+
}));
|
|
9940
|
+
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9941
|
+
return `${templateValue}${elementValue}${templateValue}`;
|
|
9815
9942
|
}
|
|
9943
|
+
return value.flags & I18nParamValueFlags.CloseTag ? `${elementValue}${templateValue}` : `${templateValue}${elementValue}`;
|
|
9944
|
+
}
|
|
9945
|
+
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9946
|
+
return `${formatValue(__spreadProps(__spreadValues({}, value), { flags: value.flags & ~I18nParamValueFlags.CloseTag }))}${formatValue(__spreadProps(__spreadValues({}, value), { flags: value.flags & ~I18nParamValueFlags.OpenTag }))}`;
|
|
9816
9947
|
}
|
|
9817
|
-
}
|
|
9818
|
-
function formatValue(value) {
|
|
9819
9948
|
if (value.flags === I18nParamValueFlags.None) {
|
|
9820
9949
|
return `${value.value}`;
|
|
9821
9950
|
}
|
|
@@ -9830,13 +9959,10 @@ function formatValue(value) {
|
|
|
9830
9959
|
closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : "";
|
|
9831
9960
|
}
|
|
9832
9961
|
const context = value.subTemplateIndex === null ? "" : `${CONTEXT_MARKER}${value.subTemplateIndex}`;
|
|
9833
|
-
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9834
|
-
return `${ESCAPE}${tagMarker}${value.value}${context}${ESCAPE}${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9835
|
-
}
|
|
9836
9962
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9837
9963
|
}
|
|
9838
9964
|
|
|
9839
|
-
// bazel-out/
|
|
9965
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9840
9966
|
function generateAdvance(job) {
|
|
9841
9967
|
for (const unit of job.units) {
|
|
9842
9968
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9853,7 +9979,7 @@ function generateAdvance(job) {
|
|
|
9853
9979
|
if (!hasDependsOnSlotContextTrait(op)) {
|
|
9854
9980
|
continue;
|
|
9855
9981
|
} else if (!slotMap.has(op.target)) {
|
|
9856
|
-
throw new Error(`AssertionError: reference to unknown slot for
|
|
9982
|
+
throw new Error(`AssertionError: reference to unknown slot for target ${op.target}`);
|
|
9857
9983
|
}
|
|
9858
9984
|
const slot = slotMap.get(op.target);
|
|
9859
9985
|
if (slotContext !== slot) {
|
|
@@ -9868,7 +9994,7 @@ function generateAdvance(job) {
|
|
|
9868
9994
|
}
|
|
9869
9995
|
}
|
|
9870
9996
|
|
|
9871
|
-
// bazel-out/
|
|
9997
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9872
9998
|
function generateProjectionDefs(job) {
|
|
9873
9999
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9874
10000
|
const selectors = [];
|
|
@@ -9892,7 +10018,7 @@ function generateProjectionDefs(job) {
|
|
|
9892
10018
|
}
|
|
9893
10019
|
}
|
|
9894
10020
|
|
|
9895
|
-
// bazel-out/
|
|
10021
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9896
10022
|
function generateVariables(job) {
|
|
9897
10023
|
recursivelyProcessView(job.root, null);
|
|
9898
10024
|
}
|
|
@@ -9980,7 +10106,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9980
10106
|
return newOps;
|
|
9981
10107
|
}
|
|
9982
10108
|
|
|
9983
|
-
// bazel-out/
|
|
10109
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9984
10110
|
function collectConstExpressions(job) {
|
|
9985
10111
|
for (const unit of job.units) {
|
|
9986
10112
|
for (const op of unit.ops()) {
|
|
@@ -9994,7 +10120,7 @@ function collectConstExpressions(job) {
|
|
|
9994
10120
|
}
|
|
9995
10121
|
}
|
|
9996
10122
|
|
|
9997
|
-
// bazel-out/
|
|
10123
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9998
10124
|
var STYLE_DOT = "style.";
|
|
9999
10125
|
var CLASS_DOT = "class.";
|
|
10000
10126
|
var STYLE_BANG = "style!";
|
|
@@ -10052,7 +10178,7 @@ function parseProperty(name) {
|
|
|
10052
10178
|
return { property: property2, suffix };
|
|
10053
10179
|
}
|
|
10054
10180
|
|
|
10055
|
-
// bazel-out/
|
|
10181
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10056
10182
|
function mapLiteral(obj, quoted = false) {
|
|
10057
10183
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10058
10184
|
key,
|
|
@@ -10061,7 +10187,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10061
10187
|
})));
|
|
10062
10188
|
}
|
|
10063
10189
|
|
|
10064
|
-
// bazel-out/
|
|
10190
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10065
10191
|
var IcuSerializerVisitor = class {
|
|
10066
10192
|
visitText(text2) {
|
|
10067
10193
|
return text2.value;
|
|
@@ -10095,7 +10221,7 @@ function serializeIcuNode(icu) {
|
|
|
10095
10221
|
return icu.visit(serializer);
|
|
10096
10222
|
}
|
|
10097
10223
|
|
|
10098
|
-
// bazel-out/
|
|
10224
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10099
10225
|
var TokenType;
|
|
10100
10226
|
(function(TokenType2) {
|
|
10101
10227
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10456,7 +10582,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10456
10582
|
return result;
|
|
10457
10583
|
}
|
|
10458
10584
|
|
|
10459
|
-
// bazel-out/
|
|
10585
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10460
10586
|
var SplitInterpolation = class {
|
|
10461
10587
|
constructor(strings, expressions, offsets) {
|
|
10462
10588
|
this.strings = strings;
|
|
@@ -11350,7 +11476,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11350
11476
|
return offsetMap;
|
|
11351
11477
|
}
|
|
11352
11478
|
|
|
11353
|
-
// bazel-out/
|
|
11479
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11354
11480
|
var NodeWithI18n = class {
|
|
11355
11481
|
constructor(sourceSpan, i18n2) {
|
|
11356
11482
|
this.sourceSpan = sourceSpan;
|
|
@@ -11502,11 +11628,11 @@ var RecursiveVisitor = class {
|
|
|
11502
11628
|
}
|
|
11503
11629
|
};
|
|
11504
11630
|
|
|
11505
|
-
// bazel-out/
|
|
11631
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11506
11632
|
var ElementSchemaRegistry = class {
|
|
11507
11633
|
};
|
|
11508
11634
|
|
|
11509
|
-
// bazel-out/
|
|
11635
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11510
11636
|
var BOOLEAN = "boolean";
|
|
11511
11637
|
var NUMBER = "number";
|
|
11512
11638
|
var STRING = "string";
|
|
@@ -11859,7 +11985,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11859
11985
|
}
|
|
11860
11986
|
}
|
|
11861
11987
|
|
|
11862
|
-
// bazel-out/
|
|
11988
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11863
11989
|
var HtmlTagDefinition = class {
|
|
11864
11990
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11865
11991
|
this.closedByChildren = {};
|
|
@@ -11977,7 +12103,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11977
12103
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11978
12104
|
}
|
|
11979
12105
|
|
|
11980
|
-
// bazel-out/
|
|
12106
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11981
12107
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11982
12108
|
"A": "LINK",
|
|
11983
12109
|
"B": "BOLD_TEXT",
|
|
@@ -12099,7 +12225,7 @@ var PlaceholderRegistry = class {
|
|
|
12099
12225
|
}
|
|
12100
12226
|
};
|
|
12101
12227
|
|
|
12102
|
-
// bazel-out/
|
|
12228
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12103
12229
|
var _expParser = new Parser(new Lexer());
|
|
12104
12230
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12105
12231
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12278,14 +12404,14 @@ function extractPlaceholderName(input) {
|
|
|
12278
12404
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12279
12405
|
}
|
|
12280
12406
|
|
|
12281
|
-
// bazel-out/
|
|
12407
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12282
12408
|
var I18nError = class extends ParseError {
|
|
12283
12409
|
constructor(span, msg) {
|
|
12284
12410
|
super(span, msg);
|
|
12285
12411
|
}
|
|
12286
12412
|
};
|
|
12287
12413
|
|
|
12288
|
-
// bazel-out/
|
|
12414
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12289
12415
|
var NAMED_ENTITIES = {
|
|
12290
12416
|
"AElig": "\xC6",
|
|
12291
12417
|
"AMP": "&",
|
|
@@ -14416,7 +14542,7 @@ var NAMED_ENTITIES = {
|
|
|
14416
14542
|
var NGSP_UNICODE = "\uE500";
|
|
14417
14543
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14418
14544
|
|
|
14419
|
-
// bazel-out/
|
|
14545
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14420
14546
|
var TokenError = class extends ParseError {
|
|
14421
14547
|
constructor(errorMsg, tokenType, span) {
|
|
14422
14548
|
super(span, errorMsg);
|
|
@@ -15337,7 +15463,7 @@ var CursorError = class {
|
|
|
15337
15463
|
}
|
|
15338
15464
|
};
|
|
15339
15465
|
|
|
15340
|
-
// bazel-out/
|
|
15466
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15341
15467
|
var TreeError = class extends ParseError {
|
|
15342
15468
|
static create(elementName, span, msg) {
|
|
15343
15469
|
return new TreeError(elementName, span, msg);
|
|
@@ -15721,7 +15847,7 @@ function decodeEntity(match, entity) {
|
|
|
15721
15847
|
return match;
|
|
15722
15848
|
}
|
|
15723
15849
|
|
|
15724
|
-
// bazel-out/
|
|
15850
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15725
15851
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15726
15852
|
"iframe|srcdoc",
|
|
15727
15853
|
"*|innerhtml",
|
|
@@ -15736,7 +15862,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15736
15862
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15737
15863
|
}
|
|
15738
15864
|
|
|
15739
|
-
// bazel-out/
|
|
15865
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15740
15866
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15741
15867
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15742
15868
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15893,7 +16019,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15893
16019
|
return jsDocComment(tags);
|
|
15894
16020
|
}
|
|
15895
16021
|
|
|
15896
|
-
// bazel-out/
|
|
16022
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15897
16023
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15898
16024
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15899
16025
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15944,7 +16070,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15944
16070
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15945
16071
|
}
|
|
15946
16072
|
|
|
15947
|
-
// bazel-out/
|
|
16073
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15948
16074
|
function createLocalizeStatements(variable2, message, params) {
|
|
15949
16075
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15950
16076
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16033,59 +16159,136 @@ function createEmptyMessagePart(location) {
|
|
|
16033
16159
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16034
16160
|
}
|
|
16035
16161
|
|
|
16036
|
-
// bazel-out/
|
|
16162
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16037
16163
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16038
16164
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16165
|
+
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
16166
|
+
var ESCAPE2 = "\uFFFD";
|
|
16039
16167
|
function collectI18nConsts(job) {
|
|
16168
|
+
var _a2;
|
|
16040
16169
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
16041
|
-
const
|
|
16170
|
+
const extractedAttributesByI18nContext = /* @__PURE__ */ new Map();
|
|
16171
|
+
const i18nAttributesByElement = /* @__PURE__ */ new Map();
|
|
16172
|
+
const i18nExpressionsByElement = /* @__PURE__ */ new Map();
|
|
16042
16173
|
const messages = /* @__PURE__ */ new Map();
|
|
16174
|
+
for (const unit of job.units) {
|
|
16175
|
+
for (const op of unit.ops()) {
|
|
16176
|
+
if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {
|
|
16177
|
+
extractedAttributesByI18nContext.set(op.i18nContext, op);
|
|
16178
|
+
} else if (op.kind === OpKind.I18nAttributes) {
|
|
16179
|
+
i18nAttributesByElement.set(op.target, op);
|
|
16180
|
+
} else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {
|
|
16181
|
+
const expressions = (_a2 = i18nExpressionsByElement.get(op.target)) != null ? _a2 : [];
|
|
16182
|
+
expressions.push(op);
|
|
16183
|
+
i18nExpressionsByElement.set(op.target, expressions);
|
|
16184
|
+
} else if (op.kind === OpKind.I18nMessage) {
|
|
16185
|
+
messages.set(op.xref, op);
|
|
16186
|
+
}
|
|
16187
|
+
}
|
|
16188
|
+
}
|
|
16189
|
+
const i18nValuesByContext = /* @__PURE__ */ new Map();
|
|
16190
|
+
const messageConstIndices = /* @__PURE__ */ new Map();
|
|
16043
16191
|
for (const unit of job.units) {
|
|
16044
16192
|
for (const op of unit.create) {
|
|
16045
16193
|
if (op.kind === OpKind.I18nMessage) {
|
|
16046
|
-
|
|
16194
|
+
if (op.messagePlaceholder === null) {
|
|
16195
|
+
const { mainVar, statements } = collectMessage(job, fileBasedI18nSuffix, messages, op);
|
|
16196
|
+
if (op.i18nBlock !== null) {
|
|
16197
|
+
const i18nConst = job.addConst(mainVar, statements);
|
|
16198
|
+
messageConstIndices.set(op.i18nBlock, i18nConst);
|
|
16199
|
+
} else {
|
|
16200
|
+
job.constsInitializers.push(...statements);
|
|
16201
|
+
i18nValuesByContext.set(op.i18nContext, mainVar);
|
|
16202
|
+
const attributeForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
|
|
16203
|
+
if (attributeForMessage !== void 0) {
|
|
16204
|
+
attributeForMessage.expression = mainVar;
|
|
16205
|
+
}
|
|
16206
|
+
}
|
|
16207
|
+
}
|
|
16047
16208
|
OpList.remove(op);
|
|
16048
16209
|
}
|
|
16049
16210
|
}
|
|
16050
16211
|
}
|
|
16051
|
-
for (const
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
|
|
16212
|
+
for (const unit of job.units) {
|
|
16213
|
+
for (const elem of unit.create) {
|
|
16214
|
+
if (isElementOrContainerOp(elem)) {
|
|
16215
|
+
const i18nAttributes2 = i18nAttributesByElement.get(elem.xref);
|
|
16216
|
+
if (i18nAttributes2 === void 0) {
|
|
16217
|
+
continue;
|
|
16218
|
+
}
|
|
16219
|
+
let i18nExpressions = i18nExpressionsByElement.get(elem.xref);
|
|
16220
|
+
if (i18nExpressions === void 0) {
|
|
16221
|
+
throw new Error("AssertionError: Could not find any i18n expressions associated with an I18nAttributes instruction");
|
|
16222
|
+
}
|
|
16223
|
+
const seenPropertyNames = /* @__PURE__ */ new Set();
|
|
16224
|
+
i18nExpressions = i18nExpressions.filter((i18nExpr) => {
|
|
16225
|
+
const seen = seenPropertyNames.has(i18nExpr.name);
|
|
16226
|
+
seenPropertyNames.add(i18nExpr.name);
|
|
16227
|
+
return !seen;
|
|
16228
|
+
});
|
|
16229
|
+
const i18nAttributeConfig = i18nExpressions.flatMap((i18nExpr) => {
|
|
16230
|
+
const i18nExprValue = i18nValuesByContext.get(i18nExpr.context);
|
|
16231
|
+
if (i18nExprValue === void 0) {
|
|
16232
|
+
throw new Error("AssertionError: Could not find i18n expression's value");
|
|
16233
|
+
}
|
|
16234
|
+
return [literal(i18nExpr.name), i18nExprValue];
|
|
16235
|
+
});
|
|
16236
|
+
i18nAttributes2.i18nAttributesConfig = job.addConst(new LiteralArrayExpr(i18nAttributeConfig));
|
|
16237
|
+
}
|
|
16055
16238
|
}
|
|
16056
16239
|
}
|
|
16057
16240
|
for (const unit of job.units) {
|
|
16058
16241
|
for (const op of unit.create) {
|
|
16059
16242
|
if (op.kind === OpKind.I18nStart) {
|
|
16060
|
-
|
|
16243
|
+
const msgIndex = messageConstIndices.get(op.root);
|
|
16244
|
+
if (msgIndex === void 0) {
|
|
16245
|
+
throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");
|
|
16246
|
+
}
|
|
16247
|
+
op.messageIndex = msgIndex;
|
|
16061
16248
|
}
|
|
16062
16249
|
}
|
|
16063
16250
|
}
|
|
16064
16251
|
}
|
|
16065
16252
|
function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
|
|
16253
|
+
var _a2;
|
|
16066
16254
|
const statements = [];
|
|
16255
|
+
const subMessagePlaceholders = /* @__PURE__ */ new Map();
|
|
16067
16256
|
for (const subMessageId of messageOp.subMessages) {
|
|
16068
16257
|
const subMessage = messages.get(subMessageId);
|
|
16069
16258
|
const { mainVar: subMessageVar, statements: subMessageStatements } = collectMessage(job, fileBasedI18nSuffix, messages, subMessage);
|
|
16070
16259
|
statements.push(...subMessageStatements);
|
|
16071
|
-
|
|
16260
|
+
const subMessages = (_a2 = subMessagePlaceholders.get(subMessage.messagePlaceholder)) != null ? _a2 : [];
|
|
16261
|
+
subMessages.push(subMessageVar);
|
|
16262
|
+
subMessagePlaceholders.set(subMessage.messagePlaceholder, subMessages);
|
|
16072
16263
|
}
|
|
16264
|
+
addSubMessageParams(messageOp, subMessagePlaceholders);
|
|
16073
16265
|
messageOp.params = new Map([...messageOp.params.entries()].sort());
|
|
16074
|
-
assertAllParamsResolved(messageOp);
|
|
16075
16266
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
16076
16267
|
const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
16077
16268
|
let transformFn = void 0;
|
|
16078
16269
|
if (messageOp.needsPostprocessing) {
|
|
16079
|
-
|
|
16270
|
+
const postprocessingParams = Object.fromEntries([...messageOp.postprocessingParams.entries()].sort());
|
|
16271
|
+
const formattedPostprocessingParams = formatI18nPlaceholderNamesInMap(postprocessingParams, false);
|
|
16080
16272
|
const extraTransformFnParams = [];
|
|
16081
16273
|
if (messageOp.postprocessingParams.size > 0) {
|
|
16082
|
-
extraTransformFnParams.push(
|
|
16274
|
+
extraTransformFnParams.push(mapLiteral(formattedPostprocessingParams, true));
|
|
16083
16275
|
}
|
|
16084
16276
|
transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);
|
|
16085
16277
|
}
|
|
16086
16278
|
statements.push(...getTranslationDeclStmts(messageOp.message, mainVar, closureVar, messageOp.params, transformFn));
|
|
16087
16279
|
return { mainVar, statements };
|
|
16088
16280
|
}
|
|
16281
|
+
function addSubMessageParams(messageOp, subMessagePlaceholders) {
|
|
16282
|
+
for (const [placeholder, subMessages] of subMessagePlaceholders) {
|
|
16283
|
+
if (subMessages.length === 1) {
|
|
16284
|
+
messageOp.params.set(placeholder, subMessages[0]);
|
|
16285
|
+
} else {
|
|
16286
|
+
messageOp.params.set(placeholder, literal(`${ESCAPE2}${I18N_ICU_MAPPING_PREFIX2}${placeholder}${ESCAPE2}`));
|
|
16287
|
+
messageOp.postprocessingParams.set(placeholder, literalArr(subMessages));
|
|
16288
|
+
messageOp.needsPostprocessing = true;
|
|
16289
|
+
}
|
|
16290
|
+
}
|
|
16291
|
+
}
|
|
16089
16292
|
function getTranslationDeclStmts(message, variable2, closureVar, params, transformFn) {
|
|
16090
16293
|
const paramsObject = Object.fromEntries(params);
|
|
16091
16294
|
const statements = [
|
|
@@ -16113,23 +16316,9 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16113
16316
|
}
|
|
16114
16317
|
return variable(name);
|
|
16115
16318
|
}
|
|
16116
|
-
function assertAllParamsResolved(op) {
|
|
16117
|
-
for (let placeholder in op.message.placeholders) {
|
|
16118
|
-
placeholder = placeholder.trimEnd();
|
|
16119
|
-
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
16120
|
-
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
16121
|
-
}
|
|
16122
|
-
}
|
|
16123
|
-
for (let placeholder in op.message.placeholderToMessage) {
|
|
16124
|
-
placeholder = placeholder.trimEnd();
|
|
16125
|
-
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
16126
|
-
throw Error(`Failed to resolve i18n message placeholder: ${placeholder}`);
|
|
16127
|
-
}
|
|
16128
|
-
}
|
|
16129
|
-
}
|
|
16130
16319
|
|
|
16131
|
-
// bazel-out/
|
|
16132
|
-
function
|
|
16320
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16321
|
+
function convertI18nText(job) {
|
|
16133
16322
|
var _a2;
|
|
16134
16323
|
for (const unit of job.units) {
|
|
16135
16324
|
let currentI18n = null;
|
|
@@ -16178,7 +16367,7 @@ function extractI18nText(job) {
|
|
|
16178
16367
|
const ops = [];
|
|
16179
16368
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
16180
16369
|
const expr = op.interpolation.expressions[i];
|
|
16181
|
-
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.handle, expr, op.i18nPlaceholders[i], resolutionTime, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
16370
|
+
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, op.interpolation.i18nPlaceholders[i], resolutionTime, I18nExpressionFor.I18nText, "", (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
16182
16371
|
}
|
|
16183
16372
|
OpList.replaceWithMany(op, ops);
|
|
16184
16373
|
break;
|
|
@@ -16187,7 +16376,7 @@ function extractI18nText(job) {
|
|
|
16187
16376
|
}
|
|
16188
16377
|
}
|
|
16189
16378
|
|
|
16190
|
-
// bazel-out/
|
|
16379
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16191
16380
|
function liftLocalRefs(job) {
|
|
16192
16381
|
for (const unit of job.units) {
|
|
16193
16382
|
for (const op of unit.create) {
|
|
@@ -16217,7 +16406,7 @@ function serializeLocalRefs(refs) {
|
|
|
16217
16406
|
return literalArr(constRefs);
|
|
16218
16407
|
}
|
|
16219
16408
|
|
|
16220
|
-
// bazel-out/
|
|
16409
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16221
16410
|
function emitNamespaceChanges(job) {
|
|
16222
16411
|
for (const unit of job.units) {
|
|
16223
16412
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16233,7 +16422,7 @@ function emitNamespaceChanges(job) {
|
|
|
16233
16422
|
}
|
|
16234
16423
|
}
|
|
16235
16424
|
|
|
16236
|
-
// bazel-out/
|
|
16425
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16237
16426
|
function parse(value) {
|
|
16238
16427
|
const styles = [];
|
|
16239
16428
|
let i = 0;
|
|
@@ -16294,7 +16483,7 @@ function hyphenate2(value) {
|
|
|
16294
16483
|
}).toLowerCase();
|
|
16295
16484
|
}
|
|
16296
16485
|
|
|
16297
|
-
// bazel-out/
|
|
16486
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16298
16487
|
function nameFunctionsAndVariables(job) {
|
|
16299
16488
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16300
16489
|
}
|
|
@@ -16409,7 +16598,7 @@ function stripImportant(name) {
|
|
|
16409
16598
|
return name;
|
|
16410
16599
|
}
|
|
16411
16600
|
|
|
16412
|
-
// bazel-out/
|
|
16601
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16413
16602
|
function mergeNextContextExpressions(job) {
|
|
16414
16603
|
for (const unit of job.units) {
|
|
16415
16604
|
for (const op of unit.create) {
|
|
@@ -16455,7 +16644,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16455
16644
|
}
|
|
16456
16645
|
}
|
|
16457
16646
|
|
|
16458
|
-
// bazel-out/
|
|
16647
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16459
16648
|
var CONTAINER_TAG = "ng-container";
|
|
16460
16649
|
function generateNgContainerOps(job) {
|
|
16461
16650
|
for (const unit of job.units) {
|
|
@@ -16472,7 +16661,7 @@ function generateNgContainerOps(job) {
|
|
|
16472
16661
|
}
|
|
16473
16662
|
}
|
|
16474
16663
|
|
|
16475
|
-
// bazel-out/
|
|
16664
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16476
16665
|
function lookupElement3(elements, xref) {
|
|
16477
16666
|
const el = elements.get(xref);
|
|
16478
16667
|
if (el === void 0) {
|
|
@@ -16502,7 +16691,7 @@ function disableBindings(job) {
|
|
|
16502
16691
|
}
|
|
16503
16692
|
}
|
|
16504
16693
|
|
|
16505
|
-
// bazel-out/
|
|
16694
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16506
16695
|
function generateNullishCoalesceExpressions(job) {
|
|
16507
16696
|
for (const unit of job.units) {
|
|
16508
16697
|
for (const op of unit.ops()) {
|
|
@@ -16518,7 +16707,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16518
16707
|
}
|
|
16519
16708
|
}
|
|
16520
16709
|
|
|
16521
|
-
// bazel-out/
|
|
16710
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16522
16711
|
function kindTest(kind) {
|
|
16523
16712
|
return (op) => op.kind === kind;
|
|
16524
16713
|
}
|
|
@@ -16592,7 +16781,7 @@ function keepLast(ops) {
|
|
|
16592
16781
|
return ops.slice(ops.length - 1);
|
|
16593
16782
|
}
|
|
16594
16783
|
|
|
16595
|
-
// bazel-out/
|
|
16784
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16596
16785
|
function parseExtractedStyles(job) {
|
|
16597
16786
|
for (const unit of job.units) {
|
|
16598
16787
|
for (const op of unit.create) {
|
|
@@ -16600,13 +16789,13 @@ function parseExtractedStyles(job) {
|
|
|
16600
16789
|
if (op.name === "style") {
|
|
16601
16790
|
const parsedStyles = parse(op.expression.value);
|
|
16602
16791
|
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
16603
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1])), op);
|
|
16792
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null), op);
|
|
16604
16793
|
}
|
|
16605
16794
|
OpList.remove(op);
|
|
16606
16795
|
} else if (op.name === "class") {
|
|
16607
16796
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
16608
16797
|
for (const parsedClass of parsedClasses) {
|
|
16609
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null), op);
|
|
16798
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null), op);
|
|
16610
16799
|
}
|
|
16611
16800
|
OpList.remove(op);
|
|
16612
16801
|
}
|
|
@@ -16615,22 +16804,32 @@ function parseExtractedStyles(job) {
|
|
|
16615
16804
|
}
|
|
16616
16805
|
}
|
|
16617
16806
|
|
|
16618
|
-
// bazel-out/
|
|
16807
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16619
16808
|
function removeContentSelectors(job) {
|
|
16620
16809
|
for (const unit of job.units) {
|
|
16621
16810
|
const elements = createOpXrefMap(unit);
|
|
16622
|
-
for (const op of unit.
|
|
16811
|
+
for (const op of unit.ops()) {
|
|
16623
16812
|
switch (op.kind) {
|
|
16624
16813
|
case OpKind.Binding:
|
|
16625
16814
|
const target = lookupInXrefMap(elements, op.target);
|
|
16626
|
-
if (op.name
|
|
16815
|
+
if (isSelectAttribute(op.name) && target.kind === OpKind.Projection) {
|
|
16627
16816
|
OpList.remove(op);
|
|
16628
16817
|
}
|
|
16629
16818
|
break;
|
|
16819
|
+
case OpKind.Projection:
|
|
16820
|
+
for (let i = op.attributes.length - 2; i >= 0; i -= 2) {
|
|
16821
|
+
if (isSelectAttribute(op.attributes[i])) {
|
|
16822
|
+
op.attributes.splice(i, 2);
|
|
16823
|
+
}
|
|
16824
|
+
}
|
|
16825
|
+
break;
|
|
16630
16826
|
}
|
|
16631
16827
|
}
|
|
16632
16828
|
}
|
|
16633
16829
|
}
|
|
16830
|
+
function isSelectAttribute(name) {
|
|
16831
|
+
return name.toLowerCase() === "select";
|
|
16832
|
+
}
|
|
16634
16833
|
function lookupInXrefMap(map, xref) {
|
|
16635
16834
|
const el = map.get(xref);
|
|
16636
16835
|
if (el === void 0) {
|
|
@@ -16639,7 +16838,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16639
16838
|
return el;
|
|
16640
16839
|
}
|
|
16641
16840
|
|
|
16642
|
-
// bazel-out/
|
|
16841
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16643
16842
|
function createPipes(job) {
|
|
16644
16843
|
for (const unit of job.units) {
|
|
16645
16844
|
processPipeBindingsInView(unit);
|
|
@@ -16687,7 +16886,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16687
16886
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16688
16887
|
}
|
|
16689
16888
|
|
|
16690
|
-
// bazel-out/
|
|
16889
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16691
16890
|
function createVariadicPipes(job) {
|
|
16692
16891
|
for (const unit of job.units) {
|
|
16693
16892
|
for (const op of unit.update) {
|
|
@@ -16704,7 +16903,7 @@ function createVariadicPipes(job) {
|
|
|
16704
16903
|
}
|
|
16705
16904
|
}
|
|
16706
16905
|
|
|
16707
|
-
// bazel-out/
|
|
16906
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16708
16907
|
function propagateI18nBlocks(job) {
|
|
16709
16908
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16710
16909
|
}
|
|
@@ -16717,6 +16916,9 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16717
16916
|
i18nBlock = op;
|
|
16718
16917
|
break;
|
|
16719
16918
|
case OpKind.I18nEnd:
|
|
16919
|
+
if (i18nBlock.subTemplateIndex === null) {
|
|
16920
|
+
subTemplateIndex = 0;
|
|
16921
|
+
}
|
|
16720
16922
|
i18nBlock = null;
|
|
16721
16923
|
break;
|
|
16722
16924
|
case OpKind.Template:
|
|
@@ -16742,7 +16944,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16742
16944
|
}
|
|
16743
16945
|
}
|
|
16744
16946
|
|
|
16745
|
-
// bazel-out/
|
|
16947
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16746
16948
|
function extractPureFunctions(job) {
|
|
16747
16949
|
for (const view of job.units) {
|
|
16748
16950
|
for (const op of view.ops()) {
|
|
@@ -16784,7 +16986,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16784
16986
|
}
|
|
16785
16987
|
};
|
|
16786
16988
|
|
|
16787
|
-
// bazel-out/
|
|
16989
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16788
16990
|
function generatePureLiteralStructures(job) {
|
|
16789
16991
|
for (const unit of job.units) {
|
|
16790
16992
|
for (const op of unit.update) {
|
|
@@ -16831,7 +17033,7 @@ function transformLiteralMap(expr) {
|
|
|
16831
17033
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16832
17034
|
}
|
|
16833
17035
|
|
|
16834
|
-
// bazel-out/
|
|
17036
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16835
17037
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16836
17038
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16837
17039
|
}
|
|
@@ -17046,6 +17248,10 @@ function i18n(slot, constIndex, subTemplateIndex) {
|
|
|
17046
17248
|
function i18nEnd() {
|
|
17047
17249
|
return call(Identifiers.i18nEnd, [], null);
|
|
17048
17250
|
}
|
|
17251
|
+
function i18nAttributes(slot, i18nAttributesConfig) {
|
|
17252
|
+
const args = [literal(slot), literal(i18nAttributesConfig)];
|
|
17253
|
+
return call(Identifiers.i18nAttributes, args, null);
|
|
17254
|
+
}
|
|
17049
17255
|
function property(name, expression, sanitizer, sourceSpan) {
|
|
17050
17256
|
const args = [literal(name), expression];
|
|
17051
17257
|
if (sanitizer !== null) {
|
|
@@ -17342,7 +17548,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17342
17548
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17343
17549
|
}
|
|
17344
17550
|
|
|
17345
|
-
// bazel-out/
|
|
17551
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17346
17552
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17347
17553
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17348
17554
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17392,6 +17598,12 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17392
17598
|
case OpKind.I18n:
|
|
17393
17599
|
OpList.replace(op, i18n(op.handle.slot, op.messageIndex, op.subTemplateIndex));
|
|
17394
17600
|
break;
|
|
17601
|
+
case OpKind.I18nAttributes:
|
|
17602
|
+
if (op.i18nAttributesConfig === null) {
|
|
17603
|
+
throw new Error(`AssertionError: i18nAttributesConfig was not set`);
|
|
17604
|
+
}
|
|
17605
|
+
OpList.replace(op, i18nAttributes(op.handle.slot, op.i18nAttributesConfig));
|
|
17606
|
+
break;
|
|
17395
17607
|
case OpKind.Template:
|
|
17396
17608
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
17397
17609
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
@@ -17671,7 +17883,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17671
17883
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17672
17884
|
}
|
|
17673
17885
|
|
|
17674
|
-
// bazel-out/
|
|
17886
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17675
17887
|
function removeEmptyBindings(job) {
|
|
17676
17888
|
for (const unit of job.units) {
|
|
17677
17889
|
for (const op of unit.update) {
|
|
@@ -17692,7 +17904,7 @@ function removeEmptyBindings(job) {
|
|
|
17692
17904
|
}
|
|
17693
17905
|
}
|
|
17694
17906
|
|
|
17695
|
-
// bazel-out/
|
|
17907
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17696
17908
|
function removeI18nContexts(job) {
|
|
17697
17909
|
for (const unit of job.units) {
|
|
17698
17910
|
for (const op of unit.create) {
|
|
@@ -17708,7 +17920,29 @@ function removeI18nContexts(job) {
|
|
|
17708
17920
|
}
|
|
17709
17921
|
}
|
|
17710
17922
|
|
|
17711
|
-
// bazel-out/
|
|
17923
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
17924
|
+
function removeUnusedI18nAttributesOps(job) {
|
|
17925
|
+
for (const unit of job.units) {
|
|
17926
|
+
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
17927
|
+
for (const op of unit.update) {
|
|
17928
|
+
switch (op.kind) {
|
|
17929
|
+
case OpKind.I18nExpression:
|
|
17930
|
+
ownersWithI18nExpressions.add(op.i18nOwner);
|
|
17931
|
+
}
|
|
17932
|
+
}
|
|
17933
|
+
for (const op of unit.create) {
|
|
17934
|
+
switch (op.kind) {
|
|
17935
|
+
case OpKind.I18nAttributes:
|
|
17936
|
+
if (ownersWithI18nExpressions.has(op.xref)) {
|
|
17937
|
+
continue;
|
|
17938
|
+
}
|
|
17939
|
+
OpList.remove(op);
|
|
17940
|
+
}
|
|
17941
|
+
}
|
|
17942
|
+
}
|
|
17943
|
+
}
|
|
17944
|
+
|
|
17945
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17712
17946
|
function generateRepeaterDerivedVars(job) {
|
|
17713
17947
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17714
17948
|
for (const unit of job.units) {
|
|
@@ -17740,7 +17974,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17740
17974
|
}
|
|
17741
17975
|
}
|
|
17742
17976
|
|
|
17743
|
-
// bazel-out/
|
|
17977
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17744
17978
|
function resolveContexts(job) {
|
|
17745
17979
|
for (const unit of job.units) {
|
|
17746
17980
|
processLexicalScope(unit, unit.create);
|
|
@@ -17781,7 +18015,7 @@ function processLexicalScope(view, ops) {
|
|
|
17781
18015
|
}
|
|
17782
18016
|
}
|
|
17783
18017
|
|
|
17784
|
-
// bazel-out/
|
|
18018
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17785
18019
|
function resolveDollarEvent(job) {
|
|
17786
18020
|
for (const unit of job.units) {
|
|
17787
18021
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17802,7 +18036,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17802
18036
|
}
|
|
17803
18037
|
}
|
|
17804
18038
|
|
|
17805
|
-
// bazel-out/
|
|
18039
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17806
18040
|
function resolveI18nElementPlaceholders(job) {
|
|
17807
18041
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17808
18042
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17820,8 +18054,9 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17820
18054
|
}
|
|
17821
18055
|
resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
|
|
17822
18056
|
}
|
|
17823
|
-
function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
18057
|
+
function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingStructuralDirective) {
|
|
17824
18058
|
let currentOps = null;
|
|
18059
|
+
let pendingStructuralDirectiveCloses = /* @__PURE__ */ new Map();
|
|
17825
18060
|
for (const op of unit.create) {
|
|
17826
18061
|
switch (op.kind) {
|
|
17827
18062
|
case OpKind.I18nStart:
|
|
@@ -17838,50 +18073,99 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
|
17838
18073
|
if (currentOps === null) {
|
|
17839
18074
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17840
18075
|
}
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
flags |= I18nParamValueFlags.CloseTag;
|
|
18076
|
+
recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18077
|
+
if (pendingStructuralDirective && op.i18nPlaceholder.closeName) {
|
|
18078
|
+
pendingStructuralDirectiveCloses.set(op.xref, pendingStructuralDirective);
|
|
17845
18079
|
}
|
|
17846
|
-
|
|
18080
|
+
pendingStructuralDirective = void 0;
|
|
17847
18081
|
}
|
|
17848
18082
|
break;
|
|
17849
18083
|
case OpKind.ElementEnd:
|
|
17850
18084
|
const startOp = elements.get(op.xref);
|
|
17851
18085
|
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17852
18086
|
if (currentOps === null) {
|
|
17853
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17854
|
-
}
|
|
17855
|
-
const { closeName } = startOp.i18nPlaceholder;
|
|
17856
|
-
if (closeName !== "") {
|
|
17857
|
-
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
18087
|
+
throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");
|
|
17858
18088
|
}
|
|
18089
|
+
recordElementClose(startOp, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirectiveCloses.get(op.xref));
|
|
18090
|
+
pendingStructuralDirectiveCloses.delete(op.xref);
|
|
17859
18091
|
}
|
|
17860
18092
|
break;
|
|
17861
|
-
case OpKind.
|
|
18093
|
+
case OpKind.Projection:
|
|
17862
18094
|
if (op.i18nPlaceholder !== void 0) {
|
|
17863
18095
|
if (currentOps === null) {
|
|
17864
18096
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17865
18097
|
}
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
|
-
|
|
17873
|
-
addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
|
|
18098
|
+
recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18099
|
+
recordElementClose(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18100
|
+
pendingStructuralDirective = void 0;
|
|
18101
|
+
}
|
|
18102
|
+
break;
|
|
18103
|
+
case OpKind.Template:
|
|
18104
|
+
if (op.i18nPlaceholder === void 0) {
|
|
17874
18105
|
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17875
|
-
if (!isSelfClosing) {
|
|
17876
|
-
addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17877
|
-
}
|
|
17878
18106
|
} else {
|
|
17879
|
-
|
|
18107
|
+
if (currentOps === null) {
|
|
18108
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18109
|
+
}
|
|
18110
|
+
if (op.templateKind === TemplateKind.Structural) {
|
|
18111
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements, op);
|
|
18112
|
+
} 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);
|
|
18116
|
+
pendingStructuralDirective = void 0;
|
|
18117
|
+
}
|
|
17880
18118
|
}
|
|
17881
18119
|
break;
|
|
17882
18120
|
}
|
|
17883
18121
|
}
|
|
17884
18122
|
}
|
|
18123
|
+
function recordElementStart(op, i18nContext, i18nBlock, structuralDirective) {
|
|
18124
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
18125
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
18126
|
+
let value = op.handle.slot;
|
|
18127
|
+
if (structuralDirective !== void 0) {
|
|
18128
|
+
flags |= I18nParamValueFlags.TemplateTag;
|
|
18129
|
+
value = { element: value, template: structuralDirective.handle.slot };
|
|
18130
|
+
}
|
|
18131
|
+
if (!closeName) {
|
|
18132
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
18133
|
+
}
|
|
18134
|
+
addParam(i18nContext.params, startName, value, i18nBlock.subTemplateIndex, flags);
|
|
18135
|
+
}
|
|
18136
|
+
function recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {
|
|
18137
|
+
const { closeName } = op.i18nPlaceholder;
|
|
18138
|
+
if (closeName) {
|
|
18139
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag;
|
|
18140
|
+
let value = op.handle.slot;
|
|
18141
|
+
if (structuralDirective !== void 0) {
|
|
18142
|
+
flags |= I18nParamValueFlags.TemplateTag;
|
|
18143
|
+
value = { element: value, template: structuralDirective.handle.slot };
|
|
18144
|
+
}
|
|
18145
|
+
addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);
|
|
18146
|
+
}
|
|
18147
|
+
}
|
|
18148
|
+
function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirective) {
|
|
18149
|
+
let { startName, closeName } = op.i18nPlaceholder;
|
|
18150
|
+
let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
18151
|
+
if (!closeName) {
|
|
18152
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
18153
|
+
}
|
|
18154
|
+
if (structuralDirective !== void 0) {
|
|
18155
|
+
addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18156
|
+
}
|
|
18157
|
+
addParam(i18nContext.params, startName, op.handle.slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, op), flags);
|
|
18158
|
+
}
|
|
18159
|
+
function recordTemplateClose(job, op, i18nContext, i18nBlock, structuralDirective) {
|
|
18160
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
18161
|
+
const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
|
|
18162
|
+
if (closeName) {
|
|
18163
|
+
addParam(i18nContext.params, closeName, op.handle.slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, op), flags);
|
|
18164
|
+
if (structuralDirective !== void 0) {
|
|
18165
|
+
addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18166
|
+
}
|
|
18167
|
+
}
|
|
18168
|
+
}
|
|
17885
18169
|
function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
|
|
17886
18170
|
for (const childOp of job.views.get(op.xref).create) {
|
|
17887
18171
|
if (childOp.kind === OpKind.I18nStart) {
|
|
@@ -17897,8 +18181,9 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17897
18181
|
params.set(placeholder, values);
|
|
17898
18182
|
}
|
|
17899
18183
|
|
|
17900
|
-
// bazel-out/
|
|
18184
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17901
18185
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18186
|
+
var _a2;
|
|
17902
18187
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17903
18188
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17904
18189
|
for (const unit of job.units) {
|
|
@@ -17914,12 +18199,13 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17914
18199
|
}
|
|
17915
18200
|
}
|
|
17916
18201
|
const expressionIndices = /* @__PURE__ */ new Map();
|
|
18202
|
+
const referenceIndex = (op) => op.usage === I18nExpressionFor.I18nText ? op.i18nOwner : op.context;
|
|
17917
18203
|
for (const unit of job.units) {
|
|
17918
18204
|
for (const op of unit.update) {
|
|
17919
18205
|
if (op.kind === OpKind.I18nExpression) {
|
|
17920
18206
|
const i18nContext = i18nContexts.get(op.context);
|
|
17921
|
-
const index = expressionIndices.get(op
|
|
17922
|
-
const subTemplateIndex = subTemplateIndicies.get(op.
|
|
18207
|
+
const index = expressionIndices.get(referenceIndex(op)) || 0;
|
|
18208
|
+
const subTemplateIndex = (_a2 = subTemplateIndicies.get(op.i18nOwner)) != null ? _a2 : null;
|
|
17923
18209
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17924
18210
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17925
18211
|
values.push({
|
|
@@ -17928,13 +18214,13 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17928
18214
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
17929
18215
|
});
|
|
17930
18216
|
params.set(op.i18nPlaceholder, values);
|
|
17931
|
-
expressionIndices.set(op
|
|
18217
|
+
expressionIndices.set(referenceIndex(op), index + 1);
|
|
17932
18218
|
}
|
|
17933
18219
|
}
|
|
17934
18220
|
}
|
|
17935
18221
|
}
|
|
17936
18222
|
|
|
17937
|
-
// bazel-out/
|
|
18223
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
17938
18224
|
function resolveI18nIcuPlaceholders(job) {
|
|
17939
18225
|
for (const unit of job.units) {
|
|
17940
18226
|
for (const op of unit.create) {
|
|
@@ -17978,7 +18264,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17978
18264
|
}
|
|
17979
18265
|
};
|
|
17980
18266
|
|
|
17981
|
-
// bazel-out/
|
|
18267
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17982
18268
|
function resolveNames(job) {
|
|
17983
18269
|
for (const unit of job.units) {
|
|
17984
18270
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18042,7 +18328,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18042
18328
|
}
|
|
18043
18329
|
}
|
|
18044
18330
|
|
|
18045
|
-
// bazel-out/
|
|
18331
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18046
18332
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
18047
18333
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
18048
18334
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -18079,7 +18365,7 @@ function isIframeElement(op) {
|
|
|
18079
18365
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
18080
18366
|
}
|
|
18081
18367
|
|
|
18082
|
-
// bazel-out/
|
|
18368
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18083
18369
|
function saveAndRestoreView(job) {
|
|
18084
18370
|
for (const unit of job.units) {
|
|
18085
18371
|
unit.create.prepend([
|
|
@@ -18124,7 +18410,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18124
18410
|
}
|
|
18125
18411
|
}
|
|
18126
18412
|
|
|
18127
|
-
// bazel-out/
|
|
18413
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18128
18414
|
function allocateSlots(job) {
|
|
18129
18415
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18130
18416
|
for (const unit of job.units) {
|
|
@@ -18149,7 +18435,7 @@ function allocateSlots(job) {
|
|
|
18149
18435
|
}
|
|
18150
18436
|
}
|
|
18151
18437
|
|
|
18152
|
-
// bazel-out/
|
|
18438
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18153
18439
|
function specializeStyleBindings(job) {
|
|
18154
18440
|
for (const unit of job.units) {
|
|
18155
18441
|
for (const op of unit.update) {
|
|
@@ -18179,7 +18465,7 @@ function specializeStyleBindings(job) {
|
|
|
18179
18465
|
}
|
|
18180
18466
|
}
|
|
18181
18467
|
|
|
18182
|
-
// bazel-out/
|
|
18468
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18183
18469
|
function generateTemporaryVariables(job) {
|
|
18184
18470
|
for (const unit of job.units) {
|
|
18185
18471
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18237,7 +18523,7 @@ function assignName(names, expr) {
|
|
|
18237
18523
|
expr.name = name;
|
|
18238
18524
|
}
|
|
18239
18525
|
|
|
18240
|
-
// bazel-out/
|
|
18526
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18241
18527
|
function generateTrackFns(job) {
|
|
18242
18528
|
for (const unit of job.units) {
|
|
18243
18529
|
for (const op of unit.create) {
|
|
@@ -18267,7 +18553,7 @@ function generateTrackFns(job) {
|
|
|
18267
18553
|
}
|
|
18268
18554
|
}
|
|
18269
18555
|
|
|
18270
|
-
// bazel-out/
|
|
18556
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18271
18557
|
function optimizeTrackFns(job) {
|
|
18272
18558
|
for (const unit of job.units) {
|
|
18273
18559
|
for (const op of unit.create) {
|
|
@@ -18314,7 +18600,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18314
18600
|
return true;
|
|
18315
18601
|
}
|
|
18316
18602
|
|
|
18317
|
-
// bazel-out/
|
|
18603
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18318
18604
|
function generateTrackVariables(job) {
|
|
18319
18605
|
for (const unit of job.units) {
|
|
18320
18606
|
for (const op of unit.create) {
|
|
@@ -18335,7 +18621,7 @@ function generateTrackVariables(job) {
|
|
|
18335
18621
|
}
|
|
18336
18622
|
}
|
|
18337
18623
|
|
|
18338
|
-
// bazel-out/
|
|
18624
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18339
18625
|
function countVariables(job) {
|
|
18340
18626
|
for (const unit of job.units) {
|
|
18341
18627
|
let varCount = 0;
|
|
@@ -18440,7 +18726,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18440
18726
|
return true;
|
|
18441
18727
|
}
|
|
18442
18728
|
|
|
18443
|
-
// bazel-out/
|
|
18729
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18444
18730
|
function optimizeVariables(job) {
|
|
18445
18731
|
for (const unit of job.units) {
|
|
18446
18732
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18690,7 +18976,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18690
18976
|
}
|
|
18691
18977
|
}
|
|
18692
18978
|
|
|
18693
|
-
// bazel-out/
|
|
18979
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18694
18980
|
function wrapI18nIcus(job) {
|
|
18695
18981
|
for (const unit of job.units) {
|
|
18696
18982
|
let currentI18nOp = null;
|
|
@@ -18720,16 +19006,16 @@ function wrapI18nIcus(job) {
|
|
|
18720
19006
|
}
|
|
18721
19007
|
}
|
|
18722
19008
|
|
|
18723
|
-
// bazel-out/
|
|
19009
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18724
19010
|
var phases = [
|
|
18725
19011
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18726
19012
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
18727
19013
|
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
18728
|
-
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
18729
|
-
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18730
19014
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
18731
19015
|
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
18732
19016
|
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
19017
|
+
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
19018
|
+
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18733
19019
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
18734
19020
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
18735
19021
|
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
@@ -18738,7 +19024,10 @@ var phases = [
|
|
|
18738
19024
|
{ kind: CompilationJobKind.Tmpl, fn: generateConditionalExpressions },
|
|
18739
19025
|
{ kind: CompilationJobKind.Tmpl, fn: createPipes },
|
|
18740
19026
|
{ kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },
|
|
18741
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
19027
|
+
{ kind: CompilationJobKind.Tmpl, fn: convertI18nText },
|
|
19028
|
+
{ kind: CompilationJobKind.Tmpl, fn: convertI18nBindings },
|
|
19029
|
+
{ kind: CompilationJobKind.Tmpl, fn: removeUnusedI18nAttributesOps },
|
|
19030
|
+
{ kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },
|
|
18742
19031
|
{ kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },
|
|
18743
19032
|
{ kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },
|
|
18744
19033
|
{ kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },
|
|
@@ -18768,7 +19057,6 @@ var phases = [
|
|
|
18768
19057
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
18769
19058
|
{ kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
|
|
18770
19059
|
{ kind: CompilationJobKind.Both, fn: collectElementConsts },
|
|
18771
|
-
{ kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },
|
|
18772
19060
|
{ kind: CompilationJobKind.Tmpl, fn: removeI18nContexts },
|
|
18773
19061
|
{ kind: CompilationJobKind.Both, fn: countVariables },
|
|
18774
19062
|
{ kind: CompilationJobKind.Tmpl, fn: generateAdvance },
|
|
@@ -18884,7 +19172,7 @@ function emitHostBindingFunction(job) {
|
|
|
18884
19172
|
);
|
|
18885
19173
|
}
|
|
18886
19174
|
|
|
18887
|
-
// bazel-out/
|
|
19175
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18888
19176
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18889
19177
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18890
19178
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
@@ -18909,7 +19197,7 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
18909
19197
|
let expression;
|
|
18910
19198
|
const ast = property2.expression.ast;
|
|
18911
19199
|
if (ast instanceof Interpolation) {
|
|
18912
|
-
expression = new Interpolation2(ast.strings, ast.expressions.map((expr) => convertAst(expr, job, property2.sourceSpan)));
|
|
19200
|
+
expression = new Interpolation2(ast.strings, ast.expressions.map((expr) => convertAst(expr, job, property2.sourceSpan)), []);
|
|
18913
19201
|
} else {
|
|
18914
19202
|
expression = convertAst(ast, job, property2.sourceSpan);
|
|
18915
19203
|
}
|
|
@@ -18921,7 +19209,7 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
18921
19209
|
if (property2.isAnimation) {
|
|
18922
19210
|
bindingKind = BindingKind.Animation;
|
|
18923
19211
|
}
|
|
18924
|
-
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, property2.sourceSpan));
|
|
19212
|
+
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, null, property2.sourceSpan));
|
|
18925
19213
|
}
|
|
18926
19214
|
function ingestHostAttribute(job, name, value) {
|
|
18927
19215
|
const attrBinding = createBindingOp(
|
|
@@ -18933,6 +19221,7 @@ function ingestHostAttribute(job, name, value) {
|
|
|
18933
19221
|
SecurityContext.NONE,
|
|
18934
19222
|
true,
|
|
18935
19223
|
false,
|
|
19224
|
+
null,
|
|
18936
19225
|
null
|
|
18937
19226
|
);
|
|
18938
19227
|
job.root.update.push(attrBinding);
|
|
@@ -19002,24 +19291,29 @@ function ingestTemplate(unit, tmpl) {
|
|
|
19002
19291
|
const i18nPlaceholder = tmpl.i18n instanceof TagPlaceholder ? tmpl.i18n : void 0;
|
|
19003
19292
|
const namespace = namespaceForKey(namespacePrefix);
|
|
19004
19293
|
const functionNameSuffix = tagNameWithoutNamespace === null ? "" : prefixWithNamespace(tagNameWithoutNamespace, namespace);
|
|
19005
|
-
const
|
|
19006
|
-
|
|
19007
|
-
|
|
19008
|
-
|
|
19294
|
+
const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
|
|
19295
|
+
const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
|
|
19296
|
+
unit.create.push(templateOp);
|
|
19297
|
+
ingestBindings(unit, templateOp, tmpl);
|
|
19298
|
+
ingestReferences(templateOp, tmpl);
|
|
19009
19299
|
ingestNodes(childView, tmpl.children);
|
|
19010
19300
|
for (const { name, value } of tmpl.variables) {
|
|
19011
19301
|
childView.contextVariables.set(name, value !== "" ? value : "$implicit");
|
|
19012
19302
|
}
|
|
19013
|
-
if (
|
|
19303
|
+
if (templateKind === TemplateKind.NgTemplate && tmpl.i18n instanceof Message) {
|
|
19014
19304
|
const id = unit.job.allocateXrefId();
|
|
19015
19305
|
OpList.insertAfter(createI18nStartOp(id, tmpl.i18n), childView.create.head);
|
|
19016
19306
|
OpList.insertBefore(createI18nEndOp(id), childView.create.tail);
|
|
19017
19307
|
}
|
|
19018
19308
|
}
|
|
19019
19309
|
function ingestContent(unit, content) {
|
|
19020
|
-
|
|
19310
|
+
if (content.i18n !== void 0 && !(content.i18n instanceof TagPlaceholder)) {
|
|
19311
|
+
throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);
|
|
19312
|
+
}
|
|
19313
|
+
const attrs = content.attributes.flatMap((a) => [a.name, a.value]);
|
|
19314
|
+
const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, attrs, content.sourceSpan);
|
|
19021
19315
|
for (const attr of content.attributes) {
|
|
19022
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
19316
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue, attr.i18n);
|
|
19023
19317
|
}
|
|
19024
19318
|
unit.create.push(op);
|
|
19025
19319
|
}
|
|
@@ -19047,9 +19341,10 @@ function ingestBoundText(unit, text2, i18nPlaceholders) {
|
|
|
19047
19341
|
const textXref = unit.job.allocateXrefId();
|
|
19048
19342
|
unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
|
|
19049
19343
|
const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
|
|
19050
|
-
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan))
|
|
19344
|
+
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan)), i18nPlaceholders), text2.sourceSpan));
|
|
19051
19345
|
}
|
|
19052
19346
|
function ingestIfBlock(unit, ifBlock) {
|
|
19347
|
+
var _a2;
|
|
19053
19348
|
let firstXref = null;
|
|
19054
19349
|
let firstSlotHandle = null;
|
|
19055
19350
|
let conditions = [];
|
|
@@ -19063,14 +19358,21 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
19063
19358
|
if (ifCase.expressionAlias !== null) {
|
|
19064
19359
|
cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);
|
|
19065
19360
|
}
|
|
19066
|
-
|
|
19067
|
-
|
|
19361
|
+
let ifCaseI18nMeta = void 0;
|
|
19362
|
+
if (ifCase.i18n !== void 0) {
|
|
19363
|
+
if (!(ifCase.i18n instanceof BlockPlaceholder)) {
|
|
19364
|
+
throw Error(`Unhandled i18n metadata type for if block: ${(_a2 = ifCase.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19365
|
+
}
|
|
19366
|
+
ifCaseI18nMeta = ifCase.i18n;
|
|
19367
|
+
}
|
|
19368
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Conditional", Namespace.HTML, ifCaseI18nMeta, ifCase.sourceSpan);
|
|
19369
|
+
unit.create.push(templateOp);
|
|
19068
19370
|
if (firstXref === null) {
|
|
19069
19371
|
firstXref = cView.xref;
|
|
19070
|
-
firstSlotHandle =
|
|
19372
|
+
firstSlotHandle = templateOp.handle;
|
|
19071
19373
|
}
|
|
19072
19374
|
const caseExpr = ifCase.expression ? convertAst(ifCase.expression, unit.job, null) : null;
|
|
19073
|
-
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr,
|
|
19375
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle, ifCase.expressionAlias);
|
|
19074
19376
|
conditions.push(conditionalCaseExpr);
|
|
19075
19377
|
ingestNodes(cView, ifCase.children);
|
|
19076
19378
|
}
|
|
@@ -19078,19 +19380,27 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
19078
19380
|
unit.update.push(conditional2);
|
|
19079
19381
|
}
|
|
19080
19382
|
function ingestSwitchBlock(unit, switchBlock) {
|
|
19383
|
+
var _a2;
|
|
19081
19384
|
let firstXref = null;
|
|
19082
19385
|
let firstSlotHandle = null;
|
|
19083
19386
|
let conditions = [];
|
|
19084
19387
|
for (const switchCase of switchBlock.cases) {
|
|
19085
19388
|
const cView = unit.job.allocateView(unit.xref);
|
|
19086
|
-
|
|
19087
|
-
|
|
19389
|
+
let switchCaseI18nMeta = void 0;
|
|
19390
|
+
if (switchCase.i18n !== void 0) {
|
|
19391
|
+
if (!(switchCase.i18n instanceof BlockPlaceholder)) {
|
|
19392
|
+
throw Error(`Unhandled i18n metadata type for switch block: ${(_a2 = switchCase.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19393
|
+
}
|
|
19394
|
+
switchCaseI18nMeta = switchCase.i18n;
|
|
19395
|
+
}
|
|
19396
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.sourceSpan);
|
|
19397
|
+
unit.create.push(templateOp);
|
|
19088
19398
|
if (firstXref === null) {
|
|
19089
19399
|
firstXref = cView.xref;
|
|
19090
|
-
firstSlotHandle =
|
|
19400
|
+
firstSlotHandle = templateOp.handle;
|
|
19091
19401
|
}
|
|
19092
19402
|
const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;
|
|
19093
|
-
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr,
|
|
19403
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle);
|
|
19094
19404
|
conditions.push(conditionalCaseExpr);
|
|
19095
19405
|
ingestNodes(cView, switchCase.children);
|
|
19096
19406
|
}
|
|
@@ -19103,7 +19413,7 @@ function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
|
19103
19413
|
}
|
|
19104
19414
|
const secondaryView = unit.job.allocateView(unit.xref);
|
|
19105
19415
|
ingestNodes(secondaryView, children);
|
|
19106
|
-
const templateOp = createTemplateOp(secondaryView.xref, null, `Defer${suffix}`, Namespace.HTML, void 0, sourceSpan);
|
|
19416
|
+
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, void 0, sourceSpan);
|
|
19107
19417
|
unit.create.push(templateOp);
|
|
19108
19418
|
return templateOp;
|
|
19109
19419
|
}
|
|
@@ -19189,17 +19499,12 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
19189
19499
|
unit.update.push(deferWhenOps);
|
|
19190
19500
|
}
|
|
19191
19501
|
function ingestIcu(unit, icu) {
|
|
19192
|
-
var _a2
|
|
19502
|
+
var _a2;
|
|
19193
19503
|
if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
|
|
19194
19504
|
const xref = unit.job.allocateXrefId();
|
|
19195
19505
|
const icuNode = icu.i18n.nodes[0];
|
|
19196
19506
|
unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
|
|
19197
|
-
const
|
|
19198
|
-
if (expressionPlaceholder === void 0 || icu.vars[expressionPlaceholder] === void 0) {
|
|
19199
|
-
throw Error("ICU should have a text binding");
|
|
19200
|
-
}
|
|
19201
|
-
ingestBoundText(unit, icu.vars[expressionPlaceholder], [expressionPlaceholder]);
|
|
19202
|
-
for (const [placeholder, text2] of Object.entries(icu.placeholders)) {
|
|
19507
|
+
for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
|
|
19203
19508
|
if (text2 instanceof BoundText) {
|
|
19204
19509
|
ingestBoundText(unit, text2, [placeholder]);
|
|
19205
19510
|
} else {
|
|
@@ -19208,7 +19513,7 @@ function ingestIcu(unit, icu) {
|
|
|
19208
19513
|
}
|
|
19209
19514
|
unit.create.push(createIcuEndOp(xref));
|
|
19210
19515
|
} else {
|
|
19211
|
-
throw Error(`Unhandled i18n metadata type for ICU: ${(
|
|
19516
|
+
throw Error(`Unhandled i18n metadata type for ICU: ${(_a2 = icu.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19212
19517
|
}
|
|
19213
19518
|
}
|
|
19214
19519
|
function ingestForBlock(unit, forBlock) {
|
|
@@ -19283,6 +19588,15 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19283
19588
|
}
|
|
19284
19589
|
} else if (ast instanceof LiteralPrimitive) {
|
|
19285
19590
|
return literal(ast.value, void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
19591
|
+
} else if (ast instanceof Unary) {
|
|
19592
|
+
switch (ast.operator) {
|
|
19593
|
+
case "+":
|
|
19594
|
+
return new UnaryOperatorExpr(UnaryOperator.Plus, convertAst(ast.expr, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
19595
|
+
case "-":
|
|
19596
|
+
return new UnaryOperatorExpr(UnaryOperator.Minus, convertAst(ast.expr, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
19597
|
+
default:
|
|
19598
|
+
throw new Error(`AssertionError: unknown unary operator ${ast.operator}`);
|
|
19599
|
+
}
|
|
19286
19600
|
} else if (ast instanceof Binary) {
|
|
19287
19601
|
const operator = BINARY_OPERATORS.get(ast.operation);
|
|
19288
19602
|
if (operator === void 0) {
|
|
@@ -19320,6 +19634,8 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19320
19634
|
return new SafeInvokeFunctionExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.args.map((a) => convertAst(a, job, baseSourceSpan)));
|
|
19321
19635
|
} else if (ast instanceof EmptyExpr) {
|
|
19322
19636
|
return new EmptyExpr2(convertSourceSpan(ast.span, baseSourceSpan));
|
|
19637
|
+
} else if (ast instanceof PrefixNot) {
|
|
19638
|
+
return not(convertAst(ast.expression, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));
|
|
19323
19639
|
} else {
|
|
19324
19640
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
|
|
19325
19641
|
}
|
|
@@ -19330,6 +19646,7 @@ function isPlainTemplate(tmpl) {
|
|
|
19330
19646
|
}
|
|
19331
19647
|
function ingestBindings(unit, op, element2) {
|
|
19332
19648
|
let flags = BindingFlags.None;
|
|
19649
|
+
let hasI18nAttributes = false;
|
|
19333
19650
|
if (element2 instanceof Template) {
|
|
19334
19651
|
flags |= BindingFlags.OnNgTemplateElement;
|
|
19335
19652
|
if (element2 instanceof Template && isPlainTemplate(element2)) {
|
|
@@ -19338,17 +19655,21 @@ function ingestBindings(unit, op, element2) {
|
|
|
19338
19655
|
const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
|
|
19339
19656
|
for (const attr of element2.templateAttrs) {
|
|
19340
19657
|
if (attr instanceof TextAttribute) {
|
|
19341
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue);
|
|
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);
|
|
19342
19660
|
} else {
|
|
19343
|
-
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags);
|
|
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);
|
|
19344
19663
|
}
|
|
19345
19664
|
}
|
|
19346
19665
|
}
|
|
19347
19666
|
for (const attr of element2.attributes) {
|
|
19348
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, flags | BindingFlags.TextValue);
|
|
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);
|
|
19349
19669
|
}
|
|
19350
19670
|
for (const input of element2.inputs) {
|
|
19351
|
-
ingestBinding(unit, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, flags);
|
|
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);
|
|
19352
19673
|
}
|
|
19353
19674
|
for (const output of element2.outputs) {
|
|
19354
19675
|
let listenerOp;
|
|
@@ -19358,7 +19679,7 @@ function ingestBindings(unit, op, element2) {
|
|
|
19358
19679
|
}
|
|
19359
19680
|
}
|
|
19360
19681
|
if (element2 instanceof Template && !isPlainTemplate(element2)) {
|
|
19361
|
-
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null));
|
|
19682
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null));
|
|
19362
19683
|
continue;
|
|
19363
19684
|
}
|
|
19364
19685
|
listenerOp = createListenerOp(op.xref, op.handle, output.name, op.tag, output.phase, false, output.sourceSpan);
|
|
@@ -19384,6 +19705,9 @@ function ingestBindings(unit, op, element2) {
|
|
|
19384
19705
|
listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19385
19706
|
unit.create.push(listenerOp);
|
|
19386
19707
|
}
|
|
19708
|
+
if (hasI18nAttributes) {
|
|
19709
|
+
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19710
|
+
}
|
|
19387
19711
|
}
|
|
19388
19712
|
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19389
19713
|
[0, BindingKind.Property],
|
|
@@ -19400,24 +19724,36 @@ var BindingFlags;
|
|
|
19400
19724
|
BindingFlags2[BindingFlags2["IsStructuralTemplateAttribute"] = 4] = "IsStructuralTemplateAttribute";
|
|
19401
19725
|
BindingFlags2[BindingFlags2["OnNgTemplateElement"] = 8] = "OnNgTemplateElement";
|
|
19402
19726
|
})(BindingFlags || (BindingFlags = {}));
|
|
19403
|
-
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags) {
|
|
19727
|
+
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags, i18nMeta) {
|
|
19404
19728
|
if (value instanceof ASTWithSource) {
|
|
19405
19729
|
value = value.ast;
|
|
19406
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}`);
|
|
19735
|
+
}
|
|
19736
|
+
i18nContext = view.job.allocateXrefId();
|
|
19737
|
+
view.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, i18nMeta, null));
|
|
19738
|
+
}
|
|
19407
19739
|
if (flags & BindingFlags.OnNgTemplateElement && !(flags & BindingFlags.BindingTargetsTemplate) && type === 0) {
|
|
19408
|
-
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null));
|
|
19740
|
+
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null, i18nContext));
|
|
19409
19741
|
return;
|
|
19410
19742
|
}
|
|
19411
19743
|
let expression;
|
|
19412
19744
|
if (value instanceof Interpolation) {
|
|
19413
|
-
|
|
19745
|
+
let i18nPlaceholders = [];
|
|
19746
|
+
if (i18nMeta !== void 0) {
|
|
19747
|
+
i18nPlaceholders = Object.keys(i18nMeta.placeholders);
|
|
19748
|
+
}
|
|
19749
|
+
expression = new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, view.job, null)), i18nPlaceholders);
|
|
19414
19750
|
} else if (value instanceof AST) {
|
|
19415
19751
|
expression = convertAst(value, view.job, null);
|
|
19416
19752
|
} else {
|
|
19417
19753
|
expression = value;
|
|
19418
19754
|
}
|
|
19419
19755
|
const kind = BINDING_KINDS.get(type);
|
|
19420
|
-
view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, !!(flags & BindingFlags.TextValue), !!(flags & BindingFlags.IsStructuralTemplateAttribute), sourceSpan));
|
|
19756
|
+
view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, !!(flags & BindingFlags.TextValue), !!(flags & BindingFlags.IsStructuralTemplateAttribute), i18nContext, sourceSpan));
|
|
19421
19757
|
}
|
|
19422
19758
|
function ingestReferences(op, element2) {
|
|
19423
19759
|
assertIsArray(op.localRefs);
|
|
@@ -19457,7 +19793,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19457
19793
|
}
|
|
19458
19794
|
if (root !== null) {
|
|
19459
19795
|
for (const attr of root.attributes) {
|
|
19460
|
-
ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
19796
|
+
ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue, attr.i18n);
|
|
19461
19797
|
}
|
|
19462
19798
|
const tagName = root instanceof Element ? root.name : root.tagName;
|
|
19463
19799
|
return tagName === "ng-template" ? null : tagName;
|
|
@@ -19465,10 +19801,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19465
19801
|
return null;
|
|
19466
19802
|
}
|
|
19467
19803
|
|
|
19468
|
-
// bazel-out/
|
|
19804
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19469
19805
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19470
19806
|
|
|
19471
|
-
// bazel-out/
|
|
19807
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19472
19808
|
var IMPORTANT_FLAG = "!important";
|
|
19473
19809
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19474
19810
|
var StylingBuilder = class {
|
|
@@ -19801,7 +20137,7 @@ function isEmptyExpression(ast) {
|
|
|
19801
20137
|
return ast instanceof EmptyExpr;
|
|
19802
20138
|
}
|
|
19803
20139
|
|
|
19804
|
-
// bazel-out/
|
|
20140
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19805
20141
|
var HtmlParser = class extends Parser2 {
|
|
19806
20142
|
constructor() {
|
|
19807
20143
|
super(getHtmlTagDefinition);
|
|
@@ -19811,7 +20147,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19811
20147
|
}
|
|
19812
20148
|
};
|
|
19813
20149
|
|
|
19814
|
-
// bazel-out/
|
|
20150
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19815
20151
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19816
20152
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19817
20153
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19877,7 +20213,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19877
20213
|
return result;
|
|
19878
20214
|
}
|
|
19879
20215
|
|
|
19880
|
-
// bazel-out/
|
|
20216
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19881
20217
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19882
20218
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19883
20219
|
var CLASS_PREFIX = "class";
|
|
@@ -20197,7 +20533,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20197
20533
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20198
20534
|
}
|
|
20199
20535
|
|
|
20200
|
-
// bazel-out/
|
|
20536
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20201
20537
|
function isStyleUrlResolvable(url) {
|
|
20202
20538
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20203
20539
|
return false;
|
|
@@ -20206,7 +20542,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20206
20542
|
}
|
|
20207
20543
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20208
20544
|
|
|
20209
|
-
// bazel-out/
|
|
20545
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20210
20546
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20211
20547
|
var LINK_ELEMENT = "link";
|
|
20212
20548
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20276,7 +20612,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20276
20612
|
return selectAttr;
|
|
20277
20613
|
}
|
|
20278
20614
|
|
|
20279
|
-
// bazel-out/
|
|
20615
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20280
20616
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20281
20617
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20282
20618
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20567,7 +20903,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20567
20903
|
return expression.slice(start, end);
|
|
20568
20904
|
}
|
|
20569
20905
|
|
|
20570
|
-
// bazel-out/
|
|
20906
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20571
20907
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20572
20908
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20573
20909
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20831,7 +21167,7 @@ function parseDeferredTime(value) {
|
|
|
20831
21167
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20832
21168
|
}
|
|
20833
21169
|
|
|
20834
|
-
// bazel-out/
|
|
21170
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20835
21171
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20836
21172
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20837
21173
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20966,7 +21302,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20966
21302
|
return { triggers, prefetchTriggers };
|
|
20967
21303
|
}
|
|
20968
21304
|
|
|
20969
|
-
// bazel-out/
|
|
21305
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20970
21306
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20971
21307
|
var KW_BIND_IDX = 1;
|
|
20972
21308
|
var KW_LET_IDX = 2;
|
|
@@ -21397,7 +21733,7 @@ function textContents(node) {
|
|
|
21397
21733
|
}
|
|
21398
21734
|
}
|
|
21399
21735
|
|
|
21400
|
-
// bazel-out/
|
|
21736
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21401
21737
|
var TagType;
|
|
21402
21738
|
(function(TagType2) {
|
|
21403
21739
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21542,7 +21878,7 @@ function serializePlaceholderValue(value) {
|
|
|
21542
21878
|
}
|
|
21543
21879
|
}
|
|
21544
21880
|
|
|
21545
|
-
// bazel-out/
|
|
21881
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21546
21882
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21547
21883
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21548
21884
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -23219,7 +23555,7 @@ function createClosureModeGuard2() {
|
|
|
23219
23555
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23220
23556
|
}
|
|
23221
23557
|
|
|
23222
|
-
// bazel-out/
|
|
23558
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23223
23559
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23224
23560
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23225
23561
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23552,6 +23888,8 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23552
23888
|
}
|
|
23553
23889
|
return emitHostBindingFunction(hostJob);
|
|
23554
23890
|
}
|
|
23891
|
+
let bindingId = 0;
|
|
23892
|
+
const getNextBindingId = () => `${bindingId++}`;
|
|
23555
23893
|
const bindingContext = variable(CONTEXT_NAME);
|
|
23556
23894
|
const styleBuilder = new StylingBuilder(bindingContext);
|
|
23557
23895
|
const { styleAttr, classAttr } = hostBindingsMetadata.specialAttributes;
|
|
@@ -23601,7 +23939,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23601
23939
|
const syntheticHostBindings = [];
|
|
23602
23940
|
for (const binding of allOtherBindings) {
|
|
23603
23941
|
const value = binding.expression.visit(getValueConverter());
|
|
23604
|
-
const bindingExpr = bindingFn(bindingContext, value);
|
|
23942
|
+
const bindingExpr = bindingFn(bindingContext, value, getNextBindingId);
|
|
23605
23943
|
const { bindingName, instruction, isAttribute } = getBindingNameAndInstruction(binding);
|
|
23606
23944
|
const securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute).filter((context) => context !== SecurityContext.NONE);
|
|
23607
23945
|
let sanitizerFn = null;
|
|
@@ -23646,9 +23984,11 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23646
23984
|
styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach((instruction) => {
|
|
23647
23985
|
for (const call2 of instruction.calls) {
|
|
23648
23986
|
totalHostVarsCount += Math.max(call2.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);
|
|
23987
|
+
const { params, stmts } = convertStylingCall(call2, bindingContext, bindingFn, getNextBindingId);
|
|
23988
|
+
updateVariables.push(...stmts);
|
|
23649
23989
|
updateInstructions.push({
|
|
23650
23990
|
reference: instruction.reference,
|
|
23651
|
-
paramsOrFn:
|
|
23991
|
+
paramsOrFn: params,
|
|
23652
23992
|
span: null
|
|
23653
23993
|
});
|
|
23654
23994
|
}
|
|
@@ -23670,11 +24010,19 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23670
24010
|
}
|
|
23671
24011
|
return null;
|
|
23672
24012
|
}
|
|
23673
|
-
function bindingFn(implicit, value) {
|
|
23674
|
-
return convertPropertyBinding(null, implicit, value,
|
|
24013
|
+
function bindingFn(implicit, value, getNextBindingIdFn) {
|
|
24014
|
+
return convertPropertyBinding(null, implicit, value, getNextBindingIdFn());
|
|
23675
24015
|
}
|
|
23676
|
-
function convertStylingCall(call2, bindingContext, bindingFn2) {
|
|
23677
|
-
|
|
24016
|
+
function convertStylingCall(call2, bindingContext, bindingFn2, getNextBindingIdFn) {
|
|
24017
|
+
const stmts = [];
|
|
24018
|
+
const params = call2.params((value) => {
|
|
24019
|
+
const result = bindingFn2(bindingContext, value, getNextBindingIdFn);
|
|
24020
|
+
if (Array.isArray(result.stmts) && result.stmts.length > 0) {
|
|
24021
|
+
stmts.push(...result.stmts);
|
|
24022
|
+
}
|
|
24023
|
+
return result.currValExpr;
|
|
24024
|
+
});
|
|
24025
|
+
return { params, stmts };
|
|
23678
24026
|
}
|
|
23679
24027
|
function getBindingNameAndInstruction(binding) {
|
|
23680
24028
|
let bindingName = binding.name;
|
|
@@ -23821,7 +24169,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23821
24169
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23822
24170
|
}
|
|
23823
24171
|
|
|
23824
|
-
// bazel-out/
|
|
24172
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23825
24173
|
var R3TargetBinder = class {
|
|
23826
24174
|
constructor(directiveMatcher) {
|
|
23827
24175
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -24426,11 +24774,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24426
24774
|
return templateEntities;
|
|
24427
24775
|
}
|
|
24428
24776
|
|
|
24429
|
-
// bazel-out/
|
|
24777
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24430
24778
|
var ResourceLoader = class {
|
|
24431
24779
|
};
|
|
24432
24780
|
|
|
24433
|
-
// bazel-out/
|
|
24781
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24434
24782
|
var CompilerFacadeImpl = class {
|
|
24435
24783
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24436
24784
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24982,17 +25330,17 @@ function publishFacade(global) {
|
|
|
24982
25330
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24983
25331
|
}
|
|
24984
25332
|
|
|
24985
|
-
// bazel-out/
|
|
24986
|
-
var VERSION2 = new Version("17.1.0-next.
|
|
25333
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25334
|
+
var VERSION2 = new Version("17.1.0-next.3");
|
|
24987
25335
|
|
|
24988
|
-
// bazel-out/
|
|
25336
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24989
25337
|
var _VisitorMode;
|
|
24990
25338
|
(function(_VisitorMode2) {
|
|
24991
25339
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24992
25340
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24993
25341
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24994
25342
|
|
|
24995
|
-
// bazel-out/
|
|
25343
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24996
25344
|
var XmlTagDefinition = class {
|
|
24997
25345
|
constructor() {
|
|
24998
25346
|
this.closedByParent = false;
|
|
@@ -25014,7 +25362,7 @@ var XmlTagDefinition = class {
|
|
|
25014
25362
|
};
|
|
25015
25363
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25016
25364
|
|
|
25017
|
-
// bazel-out/
|
|
25365
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25018
25366
|
var FactoryTarget2;
|
|
25019
25367
|
(function(FactoryTarget3) {
|
|
25020
25368
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25024,10 +25372,10 @@ var FactoryTarget2;
|
|
|
25024
25372
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25025
25373
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25026
25374
|
|
|
25027
|
-
// bazel-out/
|
|
25375
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25028
25376
|
publishFacade(_global);
|
|
25029
25377
|
|
|
25030
|
-
// bazel-out/
|
|
25378
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
25031
25379
|
var import_path2 = require("path");
|
|
25032
25380
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
25033
25381
|
var REPLACEMENTS2 = {
|
|
@@ -25135,7 +25483,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25135
25483
|
});
|
|
25136
25484
|
}
|
|
25137
25485
|
|
|
25138
|
-
// bazel-out/
|
|
25486
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
25139
25487
|
function block_template_entities_default() {
|
|
25140
25488
|
return (tree) => __async(this, null, function* () {
|
|
25141
25489
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|