@angular/core 17.0.0-next.6 → 17.0.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/render3/instructions/control_flow.mjs +64 -61
- package/esm2022/src/render3/instructions/defer.mjs +255 -39
- package/esm2022/src/render3/instructions/defer_events.mjs +17 -7
- package/esm2022/src/render3/interfaces/definition.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/list_reconciliation.mjs +257 -0
- package/esm2022/src/render3/pipe.mjs +4 -4
- package/esm2022/src/render3/util/global_utils.mjs +3 -2
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +35 -3
- package/esm2022/src/render3/view_ref.mjs +11 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +13300 -12781
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +13 -8
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +952 -558
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +1273 -829
- 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_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
67
67
|
var block_template_entities_exports = {};
|
|
68
68
|
__export(block_template_entities_exports, {
|
|
69
69
|
default: () => block_template_entities_default
|
|
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(block_template_entities_exports);
|
|
|
72
72
|
var import_schematics = require("@angular-devkit/schematics");
|
|
73
73
|
var import_path3 = require("path");
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
|
|
76
76
|
var import_core = require("@angular-devkit/core");
|
|
77
77
|
function getProjectTsConfigPaths(tree) {
|
|
78
78
|
return __async(this, null, function* () {
|
|
@@ -85,7 +85,7 @@ function getProjectTsConfigPaths(tree) {
|
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
87
|
for (const [, options] of allTargetOptions(target)) {
|
|
88
|
-
const tsConfig = options
|
|
88
|
+
const tsConfig = options["tsConfig"];
|
|
89
89
|
if (typeof tsConfig !== "string" || !tree.exists(tsConfig)) {
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
@@ -152,11 +152,11 @@ function getWorkspace(tree) {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
// bazel-out/
|
|
155
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
156
156
|
var import_path = require("path");
|
|
157
157
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
158
158
|
|
|
159
|
-
// bazel-out/
|
|
159
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
160
160
|
var path = __toESM(require("path"), 1);
|
|
161
161
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
162
162
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -173,7 +173,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
173
173
|
return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
// bazel-out/
|
|
176
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
177
177
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
178
178
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
179
179
|
return import_typescript2.default.createProgram(rootNames, options, host);
|
|
@@ -206,7 +206,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
206
206
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
210
210
|
var _SELECTOR_REGEXP = new RegExp(
|
|
211
211
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
212
212
|
"g"
|
|
@@ -514,7 +514,7 @@ var SelectorContext = class {
|
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
-
// bazel-out/
|
|
517
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
|
|
518
518
|
var ViewEncapsulation;
|
|
519
519
|
(function(ViewEncapsulation2) {
|
|
520
520
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -576,7 +576,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
576
576
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
// bazel-out/
|
|
579
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
580
580
|
var textEncoder;
|
|
581
581
|
function computeDigest(message) {
|
|
582
582
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -813,7 +813,7 @@ function wordAt(bytes, index, endian) {
|
|
|
813
813
|
return word;
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
// bazel-out/
|
|
816
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
817
817
|
var TypeModifier;
|
|
818
818
|
(function(TypeModifier2) {
|
|
819
819
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1768,7 +1768,7 @@ function serializeTags(tags) {
|
|
|
1768
1768
|
return out;
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
-
// bazel-out/
|
|
1771
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1772
1772
|
var CONSTANT_PREFIX = "_c";
|
|
1773
1773
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1774
1774
|
var KEY_CONTEXT = {};
|
|
@@ -1951,7 +1951,7 @@ function isLongStringLiteral(expr) {
|
|
|
1951
1951
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1952
1952
|
}
|
|
1953
1953
|
|
|
1954
|
-
// bazel-out/
|
|
1954
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1955
1955
|
var CORE = "@angular/core";
|
|
1956
1956
|
var _Identifiers = class {
|
|
1957
1957
|
};
|
|
@@ -2578,7 +2578,7 @@ var Identifiers = _Identifiers;
|
|
|
2578
2578
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2579
2579
|
})();
|
|
2580
2580
|
|
|
2581
|
-
// bazel-out/
|
|
2581
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2582
2582
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2583
2583
|
function dashCaseToCamelCase(input) {
|
|
2584
2584
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2666,7 +2666,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2666
2666
|
return [truthy, falsy];
|
|
2667
2667
|
}
|
|
2668
2668
|
|
|
2669
|
-
// bazel-out/
|
|
2669
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2670
2670
|
var VERSION = 3;
|
|
2671
2671
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2672
2672
|
var SourceMapGenerator = class {
|
|
@@ -2795,7 +2795,7 @@ function toBase64Digit(value) {
|
|
|
2795
2795
|
return B64_DIGITS[value];
|
|
2796
2796
|
}
|
|
2797
2797
|
|
|
2798
|
-
// bazel-out/
|
|
2798
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2799
2799
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2800
2800
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2801
2801
|
var _INDENT_WITH = " ";
|
|
@@ -3024,7 +3024,14 @@ var AbstractEmitterVisitor = class {
|
|
|
3024
3024
|
return null;
|
|
3025
3025
|
}
|
|
3026
3026
|
visitInvokeFunctionExpr(expr, ctx) {
|
|
3027
|
+
const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr;
|
|
3028
|
+
if (shouldParenthesize) {
|
|
3029
|
+
ctx.print(expr.fn, "(");
|
|
3030
|
+
}
|
|
3027
3031
|
expr.fn.visitExpression(this, ctx);
|
|
3032
|
+
if (shouldParenthesize) {
|
|
3033
|
+
ctx.print(expr.fn, ")");
|
|
3034
|
+
}
|
|
3028
3035
|
ctx.print(expr, `(`);
|
|
3029
3036
|
this.visitAllExpressions(expr.args, ctx, ",");
|
|
3030
3037
|
ctx.print(expr, `)`);
|
|
@@ -3273,7 +3280,7 @@ function _createIndent(count) {
|
|
|
3273
3280
|
return res;
|
|
3274
3281
|
}
|
|
3275
3282
|
|
|
3276
|
-
// bazel-out/
|
|
3283
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3277
3284
|
function typeWithParameters(type, numParams) {
|
|
3278
3285
|
if (numParams === 0) {
|
|
3279
3286
|
return expressionType(type);
|
|
@@ -3320,7 +3327,7 @@ function wrapReference(value) {
|
|
|
3320
3327
|
}
|
|
3321
3328
|
function refsToArray(refs, shouldForwardDeclare) {
|
|
3322
3329
|
const values = literalArr(refs.map((ref) => ref.value));
|
|
3323
|
-
return shouldForwardDeclare ?
|
|
3330
|
+
return shouldForwardDeclare ? arrowFn([], values) : values;
|
|
3324
3331
|
}
|
|
3325
3332
|
function createMayBeForwardRefExpression(expression, forwardRef) {
|
|
3326
3333
|
return { expression, forwardRef };
|
|
@@ -3335,10 +3342,10 @@ function convertFromMaybeForwardRefExpression({ expression, forwardRef }) {
|
|
|
3335
3342
|
}
|
|
3336
3343
|
}
|
|
3337
3344
|
function generateForwardRef(expr) {
|
|
3338
|
-
return importExpr(Identifiers.forwardRef).callFn([
|
|
3345
|
+
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3339
3346
|
}
|
|
3340
3347
|
|
|
3341
|
-
// bazel-out/
|
|
3348
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3342
3349
|
var R3FactoryDelegateType;
|
|
3343
3350
|
(function(R3FactoryDelegateType2) {
|
|
3344
3351
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3394,7 +3401,7 @@ function compileFactoryFunction(meta) {
|
|
|
3394
3401
|
}
|
|
3395
3402
|
let factoryFn = fn([new FnParam("t", DYNAMIC_TYPE)], body, INFERRED_TYPE, void 0, `${meta.name}_Factory`);
|
|
3396
3403
|
if (baseFactoryVar !== null) {
|
|
3397
|
-
factoryFn =
|
|
3404
|
+
factoryFn = arrowFn([], [
|
|
3398
3405
|
new DeclareVarStmt(baseFactoryVar.name),
|
|
3399
3406
|
new ReturnStatement(factoryFn)
|
|
3400
3407
|
]).callFn([], void 0, true);
|
|
@@ -3483,7 +3490,7 @@ function getInjectFn(target) {
|
|
|
3483
3490
|
}
|
|
3484
3491
|
}
|
|
3485
3492
|
|
|
3486
|
-
// bazel-out/
|
|
3493
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3487
3494
|
var Comment = class {
|
|
3488
3495
|
constructor(value, sourceSpan) {
|
|
3489
3496
|
this.value = value;
|
|
@@ -3851,7 +3858,7 @@ function visitAll(visitor, nodes) {
|
|
|
3851
3858
|
return result;
|
|
3852
3859
|
}
|
|
3853
3860
|
|
|
3854
|
-
// bazel-out/
|
|
3861
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3855
3862
|
var Message = class {
|
|
3856
3863
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3857
3864
|
this.nodes = nodes;
|
|
@@ -3970,7 +3977,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3970
3977
|
}
|
|
3971
3978
|
};
|
|
3972
3979
|
|
|
3973
|
-
// bazel-out/
|
|
3980
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
3974
3981
|
var _Visitor = class {
|
|
3975
3982
|
visitTag(tag) {
|
|
3976
3983
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -3998,12 +4005,12 @@ ${doctype.dtd}
|
|
|
3998
4005
|
};
|
|
3999
4006
|
var _visitor = new _Visitor();
|
|
4000
4007
|
|
|
4001
|
-
// bazel-out/
|
|
4008
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4002
4009
|
function toPublicName(internalName) {
|
|
4003
4010
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4004
4011
|
}
|
|
4005
4012
|
|
|
4006
|
-
// bazel-out/
|
|
4013
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4007
4014
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4008
4015
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4009
4016
|
var I18N_ATTR = "i18n";
|
|
@@ -4105,7 +4112,7 @@ function declareI18nVariable(variable2) {
|
|
|
4105
4112
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4106
4113
|
}
|
|
4107
4114
|
|
|
4108
|
-
// bazel-out/
|
|
4115
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4109
4116
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4110
4117
|
var TEMPORARY_NAME = "_t";
|
|
4111
4118
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4260,7 +4267,12 @@ var DefinitionMap = class {
|
|
|
4260
4267
|
}
|
|
4261
4268
|
set(key, value) {
|
|
4262
4269
|
if (value) {
|
|
4263
|
-
this.values.
|
|
4270
|
+
const existing = this.values.find((value2) => value2.key === key);
|
|
4271
|
+
if (existing) {
|
|
4272
|
+
existing.value = value;
|
|
4273
|
+
} else {
|
|
4274
|
+
this.values.push({ key, value, quoted: false });
|
|
4275
|
+
}
|
|
4264
4276
|
}
|
|
4265
4277
|
}
|
|
4266
4278
|
toLiteralMap() {
|
|
@@ -4323,7 +4335,7 @@ function getInstructionStatements(instructions) {
|
|
|
4323
4335
|
return statements;
|
|
4324
4336
|
}
|
|
4325
4337
|
|
|
4326
|
-
// bazel-out/
|
|
4338
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4327
4339
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4328
4340
|
let result = null;
|
|
4329
4341
|
const factoryMeta = {
|
|
@@ -4361,10 +4373,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
4361
4373
|
delegateType: R3FactoryDelegateType.Function
|
|
4362
4374
|
}));
|
|
4363
4375
|
} else {
|
|
4364
|
-
result = {
|
|
4365
|
-
statements: [],
|
|
4366
|
-
expression: fn([], [new ReturnStatement(meta.useFactory.callFn([]))])
|
|
4367
|
-
};
|
|
4376
|
+
result = { statements: [], expression: arrowFn([], meta.useFactory.callFn([])) };
|
|
4368
4377
|
}
|
|
4369
4378
|
} else if (meta.useValue !== void 0) {
|
|
4370
4379
|
result = compileFactoryFunction(__spreadProps(__spreadValues({}, factoryMeta), {
|
|
@@ -4408,10 +4417,10 @@ function delegateToFactory(type, useType, unwrapForwardRefs) {
|
|
|
4408
4417
|
return createFactoryFunction(unwrappedType);
|
|
4409
4418
|
}
|
|
4410
4419
|
function createFactoryFunction(type) {
|
|
4411
|
-
return
|
|
4420
|
+
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4412
4421
|
}
|
|
4413
4422
|
|
|
4414
|
-
// bazel-out/
|
|
4423
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4415
4424
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4416
4425
|
/^\s*$/,
|
|
4417
4426
|
/[<>]/,
|
|
@@ -4433,7 +4442,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4433
4442
|
}
|
|
4434
4443
|
}
|
|
4435
4444
|
|
|
4436
|
-
// bazel-out/
|
|
4445
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/interpolation_config.mjs
|
|
4437
4446
|
var InterpolationConfig = class {
|
|
4438
4447
|
static fromArray(markers) {
|
|
4439
4448
|
if (!markers) {
|
|
@@ -4449,7 +4458,7 @@ var InterpolationConfig = class {
|
|
|
4449
4458
|
};
|
|
4450
4459
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4451
4460
|
|
|
4452
|
-
// bazel-out/
|
|
4461
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4453
4462
|
var $EOF = 0;
|
|
4454
4463
|
var $BSPACE = 8;
|
|
4455
4464
|
var $TAB = 9;
|
|
@@ -4531,7 +4540,7 @@ function isQuote(code) {
|
|
|
4531
4540
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4532
4541
|
}
|
|
4533
4542
|
|
|
4534
|
-
// bazel-out/
|
|
4543
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4535
4544
|
var ParseLocation = class {
|
|
4536
4545
|
constructor(file, offset, line, col) {
|
|
4537
4546
|
this.file = file;
|
|
@@ -4678,7 +4687,7 @@ function sanitizeIdentifier(name) {
|
|
|
4678
4687
|
return name.replace(/\W/g, "_");
|
|
4679
4688
|
}
|
|
4680
4689
|
|
|
4681
|
-
// bazel-out/
|
|
4690
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4682
4691
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4683
4692
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4684
4693
|
constructor() {
|
|
@@ -4771,7 +4780,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4771
4780
|
}
|
|
4772
4781
|
};
|
|
4773
4782
|
|
|
4774
|
-
// bazel-out/
|
|
4783
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4775
4784
|
var policy;
|
|
4776
4785
|
function getPolicy() {
|
|
4777
4786
|
if (policy === void 0) {
|
|
@@ -4809,7 +4818,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4809
4818
|
return fn2.bind(_global);
|
|
4810
4819
|
}
|
|
4811
4820
|
|
|
4812
|
-
// bazel-out/
|
|
4821
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4813
4822
|
var JitEvaluator = class {
|
|
4814
4823
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4815
4824
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4900,7 +4909,7 @@ function isUseStrictStatement(statement) {
|
|
|
4900
4909
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4901
4910
|
}
|
|
4902
4911
|
|
|
4903
|
-
// bazel-out/
|
|
4912
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4904
4913
|
function compileInjector(meta) {
|
|
4905
4914
|
const definitionMap = new DefinitionMap();
|
|
4906
4915
|
if (meta.providers !== null) {
|
|
@@ -4917,7 +4926,7 @@ function createInjectorType(meta) {
|
|
|
4917
4926
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4918
4927
|
}
|
|
4919
4928
|
|
|
4920
|
-
// bazel-out/
|
|
4929
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4921
4930
|
var R3JitReflector = class {
|
|
4922
4931
|
constructor(context) {
|
|
4923
4932
|
this.context = context;
|
|
@@ -4933,7 +4942,7 @@ var R3JitReflector = class {
|
|
|
4933
4942
|
}
|
|
4934
4943
|
};
|
|
4935
4944
|
|
|
4936
|
-
// bazel-out/
|
|
4945
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4937
4946
|
var R3SelectorScopeMode;
|
|
4938
4947
|
(function(R3SelectorScopeMode2) {
|
|
4939
4948
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5074,7 +5083,7 @@ function tupleOfTypes(types) {
|
|
|
5074
5083
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5075
5084
|
}
|
|
5076
5085
|
|
|
5077
|
-
// bazel-out/
|
|
5086
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5078
5087
|
function compilePipeFromMetadata(metadata) {
|
|
5079
5088
|
const definitionMapValues = [];
|
|
5080
5089
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5095,7 +5104,7 @@ function createPipeType(metadata) {
|
|
|
5095
5104
|
]));
|
|
5096
5105
|
}
|
|
5097
5106
|
|
|
5098
|
-
// bazel-out/
|
|
5107
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5099
5108
|
var R3TemplateDependencyKind;
|
|
5100
5109
|
(function(R3TemplateDependencyKind2) {
|
|
5101
5110
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5103,7 +5112,7 @@ var R3TemplateDependencyKind;
|
|
|
5103
5112
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5104
5113
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5105
5114
|
|
|
5106
|
-
// bazel-out/
|
|
5115
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5107
5116
|
var ParserError = class {
|
|
5108
5117
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5109
5118
|
this.input = input;
|
|
@@ -5769,7 +5778,7 @@ var BoundElementProperty = class {
|
|
|
5769
5778
|
}
|
|
5770
5779
|
};
|
|
5771
5780
|
|
|
5772
|
-
// bazel-out/
|
|
5781
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5773
5782
|
var _EventHandlerVars = class {
|
|
5774
5783
|
};
|
|
5775
5784
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6410,7 +6419,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6410
6419
|
}
|
|
6411
6420
|
};
|
|
6412
6421
|
|
|
6413
|
-
// bazel-out/
|
|
6422
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6414
6423
|
var _SECURITY_SCHEMA;
|
|
6415
6424
|
function SECURITY_SCHEMA() {
|
|
6416
6425
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6468,7 +6477,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6468
6477
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6469
6478
|
}
|
|
6470
6479
|
|
|
6471
|
-
// bazel-out/
|
|
6480
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6472
6481
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6473
6482
|
"inherit",
|
|
6474
6483
|
"initial",
|
|
@@ -6935,7 +6944,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6935
6944
|
}
|
|
6936
6945
|
}
|
|
6937
6946
|
|
|
6938
|
-
// bazel-out/
|
|
6947
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6939
6948
|
var OpKind;
|
|
6940
6949
|
(function(OpKind2) {
|
|
6941
6950
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -6964,14 +6973,19 @@ var OpKind;
|
|
|
6964
6973
|
OpKind2[OpKind2["Pipe"] = 23] = "Pipe";
|
|
6965
6974
|
OpKind2[OpKind2["Attribute"] = 24] = "Attribute";
|
|
6966
6975
|
OpKind2[OpKind2["ExtractedAttribute"] = 25] = "ExtractedAttribute";
|
|
6967
|
-
OpKind2[OpKind2["
|
|
6968
|
-
OpKind2[OpKind2["
|
|
6969
|
-
OpKind2[OpKind2["
|
|
6970
|
-
OpKind2[OpKind2["
|
|
6971
|
-
OpKind2[OpKind2["
|
|
6972
|
-
OpKind2[OpKind2["
|
|
6973
|
-
OpKind2[OpKind2["
|
|
6974
|
-
OpKind2[OpKind2["
|
|
6976
|
+
OpKind2[OpKind2["Defer"] = 26] = "Defer";
|
|
6977
|
+
OpKind2[OpKind2["DeferSecondaryBlock"] = 27] = "DeferSecondaryBlock";
|
|
6978
|
+
OpKind2[OpKind2["DeferOn"] = 28] = "DeferOn";
|
|
6979
|
+
OpKind2[OpKind2["ExtractedMessage"] = 29] = "ExtractedMessage";
|
|
6980
|
+
OpKind2[OpKind2["HostProperty"] = 30] = "HostProperty";
|
|
6981
|
+
OpKind2[OpKind2["Namespace"] = 31] = "Namespace";
|
|
6982
|
+
OpKind2[OpKind2["ProjectionDef"] = 32] = "ProjectionDef";
|
|
6983
|
+
OpKind2[OpKind2["Projection"] = 33] = "Projection";
|
|
6984
|
+
OpKind2[OpKind2["I18nStart"] = 34] = "I18nStart";
|
|
6985
|
+
OpKind2[OpKind2["I18n"] = 35] = "I18n";
|
|
6986
|
+
OpKind2[OpKind2["I18nEnd"] = 36] = "I18nEnd";
|
|
6987
|
+
OpKind2[OpKind2["I18nExpression"] = 37] = "I18nExpression";
|
|
6988
|
+
OpKind2[OpKind2["I18nApply"] = 38] = "I18nApply";
|
|
6975
6989
|
})(OpKind || (OpKind = {}));
|
|
6976
6990
|
var ExpressionKind;
|
|
6977
6991
|
(function(ExpressionKind2) {
|
|
@@ -6996,6 +7010,7 @@ var ExpressionKind;
|
|
|
6996
7010
|
ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 18] = "ReadTemporaryExpr";
|
|
6997
7011
|
ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 19] = "SanitizerExpr";
|
|
6998
7012
|
ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 20] = "SlotLiteralExpr";
|
|
7013
|
+
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 21] = "ConditionalCase";
|
|
6999
7014
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7000
7015
|
var SemanticVariableKind;
|
|
7001
7016
|
(function(SemanticVariableKind2) {
|
|
@@ -7017,6 +7032,12 @@ var SanitizerFn;
|
|
|
7017
7032
|
SanitizerFn2[SanitizerFn2["ResourceUrl"] = 4] = "ResourceUrl";
|
|
7018
7033
|
SanitizerFn2[SanitizerFn2["IframeAttribute"] = 5] = "IframeAttribute";
|
|
7019
7034
|
})(SanitizerFn || (SanitizerFn = {}));
|
|
7035
|
+
var DeferSecondaryKind;
|
|
7036
|
+
(function(DeferSecondaryKind2) {
|
|
7037
|
+
DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
|
|
7038
|
+
DeferSecondaryKind2[DeferSecondaryKind2["Placeholder"] = 1] = "Placeholder";
|
|
7039
|
+
DeferSecondaryKind2[DeferSecondaryKind2["Error"] = 2] = "Error";
|
|
7040
|
+
})(DeferSecondaryKind || (DeferSecondaryKind = {}));
|
|
7020
7041
|
var BindingKind;
|
|
7021
7042
|
(function(BindingKind2) {
|
|
7022
7043
|
BindingKind2[BindingKind2["Attribute"] = 0] = "Attribute";
|
|
@@ -7028,12 +7049,13 @@ var BindingKind;
|
|
|
7028
7049
|
BindingKind2[BindingKind2["Animation"] = 6] = "Animation";
|
|
7029
7050
|
})(BindingKind || (BindingKind = {}));
|
|
7030
7051
|
|
|
7031
|
-
// bazel-out/
|
|
7052
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7032
7053
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7033
7054
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7034
7055
|
var UsesSlotIndex = Symbol("UsesSlotIndex");
|
|
7035
7056
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
7036
7057
|
var UsesVarOffset = Symbol("UsesVarOffset");
|
|
7058
|
+
var HasConst = Symbol("HasConst");
|
|
7037
7059
|
var TRAIT_CONSUMES_SLOT = {
|
|
7038
7060
|
[ConsumesSlot]: true,
|
|
7039
7061
|
slot: null,
|
|
@@ -7041,7 +7063,7 @@ var TRAIT_CONSUMES_SLOT = {
|
|
|
7041
7063
|
};
|
|
7042
7064
|
var TRAIT_USES_SLOT_INDEX = {
|
|
7043
7065
|
[UsesSlotIndex]: true,
|
|
7044
|
-
|
|
7066
|
+
targetSlot: null
|
|
7045
7067
|
};
|
|
7046
7068
|
var TRAIT_DEPENDS_ON_SLOT_CONTEXT = {
|
|
7047
7069
|
[DependsOnSlotContext]: true
|
|
@@ -7053,6 +7075,10 @@ var TRAIT_USES_VAR_OFFSET = {
|
|
|
7053
7075
|
[UsesVarOffset]: true,
|
|
7054
7076
|
varOffset: null
|
|
7055
7077
|
};
|
|
7078
|
+
var TRAIT_HAS_CONST = {
|
|
7079
|
+
[HasConst]: true,
|
|
7080
|
+
constIndex: null
|
|
7081
|
+
};
|
|
7056
7082
|
function hasConsumesSlotTrait(op) {
|
|
7057
7083
|
return op[ConsumesSlot] === true;
|
|
7058
7084
|
}
|
|
@@ -7068,8 +7094,11 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7068
7094
|
function hasUsesSlotIndexTrait(value) {
|
|
7069
7095
|
return value[UsesSlotIndex] === true;
|
|
7070
7096
|
}
|
|
7097
|
+
function hasConstTrait(value) {
|
|
7098
|
+
return value[HasConst] === true;
|
|
7099
|
+
}
|
|
7071
7100
|
|
|
7072
|
-
// bazel-out/
|
|
7101
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7073
7102
|
function createStatementOp(statement) {
|
|
7074
7103
|
return __spreadValues({
|
|
7075
7104
|
kind: OpKind.Statement,
|
|
@@ -7090,12 +7119,13 @@ var NEW_OP = {
|
|
|
7090
7119
|
next: null
|
|
7091
7120
|
};
|
|
7092
7121
|
|
|
7093
|
-
// bazel-out/
|
|
7094
|
-
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7122
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7123
|
+
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7095
7124
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7096
7125
|
kind: OpKind.InterpolateText,
|
|
7097
7126
|
target: xref,
|
|
7098
7127
|
interpolation,
|
|
7128
|
+
i18nPlaceholders,
|
|
7099
7129
|
sourceSpan
|
|
7100
7130
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7101
7131
|
}
|
|
@@ -7187,18 +7217,35 @@ function createAdvanceOp(delta, sourceSpan) {
|
|
|
7187
7217
|
sourceSpan
|
|
7188
7218
|
}, NEW_OP);
|
|
7189
7219
|
}
|
|
7190
|
-
function createConditionalOp(target, test, sourceSpan) {
|
|
7191
|
-
return __spreadValues(__spreadValues(__spreadValues({
|
|
7220
|
+
function createConditionalOp(target, test, conditions, sourceSpan) {
|
|
7221
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
7192
7222
|
kind: OpKind.Conditional,
|
|
7193
7223
|
target,
|
|
7194
7224
|
test,
|
|
7195
|
-
conditions
|
|
7225
|
+
conditions,
|
|
7196
7226
|
processed: null,
|
|
7227
|
+
sourceSpan,
|
|
7228
|
+
contextValue: null
|
|
7229
|
+
}, NEW_OP), TRAIT_USES_SLOT_INDEX), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
7230
|
+
}
|
|
7231
|
+
function createI18nExpressionOp(target, expression, i18nPlaceholder, sourceSpan) {
|
|
7232
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
7233
|
+
kind: OpKind.I18nExpression,
|
|
7234
|
+
target,
|
|
7235
|
+
expression,
|
|
7236
|
+
i18nPlaceholder,
|
|
7237
|
+
sourceSpan
|
|
7238
|
+
}, NEW_OP), TRAIT_CONSUMES_VARS), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7239
|
+
}
|
|
7240
|
+
function createI18nApplyOp(target, sourceSpan) {
|
|
7241
|
+
return __spreadValues(__spreadValues({
|
|
7242
|
+
kind: OpKind.I18nApply,
|
|
7243
|
+
target,
|
|
7197
7244
|
sourceSpan
|
|
7198
|
-
}, NEW_OP), TRAIT_USES_SLOT_INDEX)
|
|
7245
|
+
}, NEW_OP), TRAIT_USES_SLOT_INDEX);
|
|
7199
7246
|
}
|
|
7200
7247
|
|
|
7201
|
-
// bazel-out/
|
|
7248
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7202
7249
|
var _a;
|
|
7203
7250
|
var _b;
|
|
7204
7251
|
var _c;
|
|
@@ -7244,7 +7291,7 @@ var _ReferenceExpr = class extends ExpressionBase {
|
|
|
7244
7291
|
this.offset = offset;
|
|
7245
7292
|
this.kind = ExpressionKind.Reference;
|
|
7246
7293
|
this[_a] = true;
|
|
7247
|
-
this.
|
|
7294
|
+
this.targetSlot = null;
|
|
7248
7295
|
}
|
|
7249
7296
|
visitExpression() {
|
|
7250
7297
|
}
|
|
@@ -7258,7 +7305,7 @@ var _ReferenceExpr = class extends ExpressionBase {
|
|
|
7258
7305
|
}
|
|
7259
7306
|
clone() {
|
|
7260
7307
|
const expr = new _ReferenceExpr(this.target, this.offset);
|
|
7261
|
-
expr.
|
|
7308
|
+
expr.targetSlot = this.targetSlot;
|
|
7262
7309
|
return expr;
|
|
7263
7310
|
}
|
|
7264
7311
|
};
|
|
@@ -7484,7 +7531,7 @@ var _PipeBindingExpr = class extends ExpressionBase {
|
|
|
7484
7531
|
this[_d] = true;
|
|
7485
7532
|
this[_e] = true;
|
|
7486
7533
|
this[_f] = true;
|
|
7487
|
-
this.
|
|
7534
|
+
this.targetSlot = null;
|
|
7488
7535
|
this.varOffset = null;
|
|
7489
7536
|
}
|
|
7490
7537
|
visitExpression(visitor, context) {
|
|
@@ -7505,7 +7552,7 @@ var _PipeBindingExpr = class extends ExpressionBase {
|
|
|
7505
7552
|
}
|
|
7506
7553
|
clone() {
|
|
7507
7554
|
const r = new _PipeBindingExpr(this.target, this.name, this.args.map((a) => a.clone()));
|
|
7508
|
-
r.
|
|
7555
|
+
r.targetSlot = this.targetSlot;
|
|
7509
7556
|
r.varOffset = this.varOffset;
|
|
7510
7557
|
return r;
|
|
7511
7558
|
}
|
|
@@ -7525,7 +7572,7 @@ var _PipeBindingVariadicExpr = class extends ExpressionBase {
|
|
|
7525
7572
|
this[_g] = true;
|
|
7526
7573
|
this[_h] = true;
|
|
7527
7574
|
this[_j] = true;
|
|
7528
|
-
this.
|
|
7575
|
+
this.targetSlot = null;
|
|
7529
7576
|
this.varOffset = null;
|
|
7530
7577
|
}
|
|
7531
7578
|
visitExpression(visitor, context) {
|
|
@@ -7542,7 +7589,7 @@ var _PipeBindingVariadicExpr = class extends ExpressionBase {
|
|
|
7542
7589
|
}
|
|
7543
7590
|
clone() {
|
|
7544
7591
|
const r = new _PipeBindingVariadicExpr(this.target, this.name, this.args.clone(), this.numArgs);
|
|
7545
|
-
r.
|
|
7592
|
+
r.targetSlot = this.targetSlot;
|
|
7546
7593
|
r.varOffset = this.varOffset;
|
|
7547
7594
|
return r;
|
|
7548
7595
|
}
|
|
@@ -7750,18 +7797,20 @@ var _SlotLiteralExpr = class extends ExpressionBase {
|
|
|
7750
7797
|
this.target = target;
|
|
7751
7798
|
this.kind = ExpressionKind.SlotLiteralExpr;
|
|
7752
7799
|
this[_k] = true;
|
|
7753
|
-
this.
|
|
7800
|
+
this.targetSlot = null;
|
|
7754
7801
|
}
|
|
7755
7802
|
visitExpression(visitor, context) {
|
|
7756
7803
|
}
|
|
7757
7804
|
isEquivalent(e) {
|
|
7758
|
-
return e instanceof _SlotLiteralExpr && e.target === this.target && e.
|
|
7805
|
+
return e instanceof _SlotLiteralExpr && e.target === this.target && e.targetSlot === this.targetSlot;
|
|
7759
7806
|
}
|
|
7760
7807
|
isConstant() {
|
|
7761
7808
|
return true;
|
|
7762
7809
|
}
|
|
7763
7810
|
clone() {
|
|
7764
|
-
|
|
7811
|
+
const copy = new _SlotLiteralExpr(this.target);
|
|
7812
|
+
copy.targetSlot = this.targetSlot;
|
|
7813
|
+
return copy;
|
|
7765
7814
|
}
|
|
7766
7815
|
transformInternalExpressions() {
|
|
7767
7816
|
}
|
|
@@ -7770,6 +7819,34 @@ var SlotLiteralExpr = _SlotLiteralExpr;
|
|
|
7770
7819
|
(() => {
|
|
7771
7820
|
_k = UsesSlotIndex;
|
|
7772
7821
|
})();
|
|
7822
|
+
var ConditionalCaseExpr = class extends ExpressionBase {
|
|
7823
|
+
constructor(expr, target, alias = null) {
|
|
7824
|
+
super();
|
|
7825
|
+
this.expr = expr;
|
|
7826
|
+
this.target = target;
|
|
7827
|
+
this.alias = alias;
|
|
7828
|
+
this.kind = ExpressionKind.ConditionalCase;
|
|
7829
|
+
}
|
|
7830
|
+
visitExpression(visitor, context) {
|
|
7831
|
+
if (this.expr !== null) {
|
|
7832
|
+
this.expr.visitExpression(visitor, context);
|
|
7833
|
+
}
|
|
7834
|
+
}
|
|
7835
|
+
isEquivalent(e) {
|
|
7836
|
+
return e instanceof ConditionalCaseExpr && e.expr === this.expr;
|
|
7837
|
+
}
|
|
7838
|
+
isConstant() {
|
|
7839
|
+
return true;
|
|
7840
|
+
}
|
|
7841
|
+
clone() {
|
|
7842
|
+
return new ConditionalCaseExpr(this.expr, this.target);
|
|
7843
|
+
}
|
|
7844
|
+
transformInternalExpressions(transform2, flags) {
|
|
7845
|
+
if (this.expr !== null) {
|
|
7846
|
+
this.expr = transformExpressionsInExpression(this.expr, transform2, flags);
|
|
7847
|
+
}
|
|
7848
|
+
}
|
|
7849
|
+
};
|
|
7773
7850
|
function visitExpressionsInOp(op, visitor) {
|
|
7774
7851
|
transformExpressionsInOp(op, (expr, flags) => {
|
|
7775
7852
|
visitor(expr, flags);
|
|
@@ -7809,6 +7886,9 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
7809
7886
|
}
|
|
7810
7887
|
op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform2, flags);
|
|
7811
7888
|
break;
|
|
7889
|
+
case OpKind.I18nExpression:
|
|
7890
|
+
op.expression = transformExpressionsInExpression(op.expression, transform2, flags);
|
|
7891
|
+
break;
|
|
7812
7892
|
case OpKind.InterpolateText:
|
|
7813
7893
|
transformExpressionsInInterpolation(op.interpolation, transform2, flags);
|
|
7814
7894
|
break;
|
|
@@ -7820,14 +7900,17 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
7820
7900
|
break;
|
|
7821
7901
|
case OpKind.Conditional:
|
|
7822
7902
|
for (const condition of op.conditions) {
|
|
7823
|
-
if (condition
|
|
7903
|
+
if (condition.expr === null) {
|
|
7824
7904
|
continue;
|
|
7825
7905
|
}
|
|
7826
|
-
condition
|
|
7906
|
+
condition.expr = transformExpressionsInExpression(condition.expr, transform2, flags);
|
|
7827
7907
|
}
|
|
7828
7908
|
if (op.processed !== null) {
|
|
7829
7909
|
op.processed = transformExpressionsInExpression(op.processed, transform2, flags);
|
|
7830
7910
|
}
|
|
7911
|
+
if (op.contextValue !== null) {
|
|
7912
|
+
op.contextValue = transformExpressionsInExpression(op.contextValue, transform2, flags);
|
|
7913
|
+
}
|
|
7831
7914
|
break;
|
|
7832
7915
|
case OpKind.Listener:
|
|
7833
7916
|
for (const innerOp of op.handlerOps) {
|
|
@@ -7843,17 +7926,20 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
7843
7926
|
transformExpressionsInStatement(statement, transform2, flags);
|
|
7844
7927
|
}
|
|
7845
7928
|
break;
|
|
7929
|
+
case OpKind.I18n:
|
|
7846
7930
|
case OpKind.I18nStart:
|
|
7847
|
-
for (const placeholder
|
|
7848
|
-
op.
|
|
7931
|
+
for (const [placeholder, expression] of op.params) {
|
|
7932
|
+
op.params.set(placeholder, transformExpressionsInExpression(expression, transform2, flags));
|
|
7849
7933
|
}
|
|
7850
7934
|
break;
|
|
7935
|
+
case OpKind.Defer:
|
|
7936
|
+
case OpKind.DeferSecondaryBlock:
|
|
7937
|
+
case OpKind.DeferOn:
|
|
7851
7938
|
case OpKind.Projection:
|
|
7852
7939
|
case OpKind.ProjectionDef:
|
|
7853
7940
|
case OpKind.Element:
|
|
7854
7941
|
case OpKind.ElementStart:
|
|
7855
7942
|
case OpKind.ElementEnd:
|
|
7856
|
-
case OpKind.I18n:
|
|
7857
7943
|
case OpKind.I18nEnd:
|
|
7858
7944
|
case OpKind.Container:
|
|
7859
7945
|
case OpKind.ContainerStart:
|
|
@@ -7865,6 +7951,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
7865
7951
|
case OpKind.Pipe:
|
|
7866
7952
|
case OpKind.Advance:
|
|
7867
7953
|
case OpKind.Namespace:
|
|
7954
|
+
case OpKind.I18nApply:
|
|
7868
7955
|
break;
|
|
7869
7956
|
default:
|
|
7870
7957
|
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
|
|
@@ -7946,7 +8033,7 @@ function isStringLiteral(expr) {
|
|
|
7946
8033
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
7947
8034
|
}
|
|
7948
8035
|
|
|
7949
|
-
// bazel-out/
|
|
8036
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
7950
8037
|
var _OpList = class {
|
|
7951
8038
|
constructor() {
|
|
7952
8039
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8065,7 +8152,7 @@ var _OpList = class {
|
|
|
8065
8152
|
const last = prev;
|
|
8066
8153
|
if (oldPrev !== null) {
|
|
8067
8154
|
oldPrev.next = first;
|
|
8068
|
-
first.prev =
|
|
8155
|
+
first.prev = oldPrev;
|
|
8069
8156
|
}
|
|
8070
8157
|
if (oldNext !== null) {
|
|
8071
8158
|
oldNext.prev = last;
|
|
@@ -8137,7 +8224,7 @@ var OpList = _OpList;
|
|
|
8137
8224
|
_OpList.nextListId = 0;
|
|
8138
8225
|
})();
|
|
8139
8226
|
|
|
8140
|
-
// bazel-out/
|
|
8227
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8141
8228
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8142
8229
|
OpKind.Element,
|
|
8143
8230
|
OpKind.ElementStart,
|
|
@@ -8149,7 +8236,7 @@ var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
|
8149
8236
|
function isElementOrContainerOp(op) {
|
|
8150
8237
|
return elementContainerOpKinds.has(op.kind);
|
|
8151
8238
|
}
|
|
8152
|
-
function createElementStartOp(tag, xref, namespace,
|
|
8239
|
+
function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan) {
|
|
8153
8240
|
return __spreadValues(__spreadValues({
|
|
8154
8241
|
kind: OpKind.ElementStart,
|
|
8155
8242
|
xref,
|
|
@@ -8158,23 +8245,22 @@ function createElementStartOp(tag, xref, namespace, i18n2, sourceSpan) {
|
|
|
8158
8245
|
localRefs: [],
|
|
8159
8246
|
nonBindable: false,
|
|
8160
8247
|
namespace,
|
|
8161
|
-
|
|
8248
|
+
i18nPlaceholder,
|
|
8162
8249
|
sourceSpan
|
|
8163
8250
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8164
8251
|
}
|
|
8165
|
-
function createTemplateOp(xref, tag, namespace,
|
|
8252
|
+
function createTemplateOp(xref, tag, namespace, generatedInBlock, i18n2, sourceSpan) {
|
|
8166
8253
|
return __spreadValues(__spreadValues({
|
|
8167
8254
|
kind: OpKind.Template,
|
|
8168
8255
|
xref,
|
|
8169
8256
|
attributes: null,
|
|
8170
8257
|
tag,
|
|
8171
|
-
|
|
8258
|
+
block: generatedInBlock,
|
|
8172
8259
|
decls: null,
|
|
8173
8260
|
vars: null,
|
|
8174
8261
|
localRefs: [],
|
|
8175
8262
|
nonBindable: false,
|
|
8176
8263
|
namespace,
|
|
8177
|
-
i18n: i18n2,
|
|
8178
8264
|
sourceSpan
|
|
8179
8265
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8180
8266
|
}
|
|
@@ -8246,7 +8332,7 @@ function createProjectionDefOp(def) {
|
|
|
8246
8332
|
}, NEW_OP);
|
|
8247
8333
|
}
|
|
8248
8334
|
function createProjectionOp(xref, selector) {
|
|
8249
|
-
return __spreadValues(__spreadValues(
|
|
8335
|
+
return __spreadValues(__spreadValues({
|
|
8250
8336
|
kind: OpKind.Projection,
|
|
8251
8337
|
xref,
|
|
8252
8338
|
selector,
|
|
@@ -8254,9 +8340,8 @@ function createProjectionOp(xref, selector) {
|
|
|
8254
8340
|
attributes: null,
|
|
8255
8341
|
localRefs: [],
|
|
8256
8342
|
nonBindable: false,
|
|
8257
|
-
i18n: void 0,
|
|
8258
8343
|
sourceSpan: null
|
|
8259
|
-
}, NEW_OP), TRAIT_CONSUMES_SLOT)
|
|
8344
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8260
8345
|
}
|
|
8261
8346
|
function createExtractedAttributeOp(target, bindingKind, name, expression) {
|
|
8262
8347
|
return __spreadValues({
|
|
@@ -8267,6 +8352,34 @@ function createExtractedAttributeOp(target, bindingKind, name, expression) {
|
|
|
8267
8352
|
expression
|
|
8268
8353
|
}, NEW_OP);
|
|
8269
8354
|
}
|
|
8355
|
+
function createDeferOp(xref, main, sourceSpan) {
|
|
8356
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
8357
|
+
kind: OpKind.Defer,
|
|
8358
|
+
xref,
|
|
8359
|
+
target: main,
|
|
8360
|
+
loading: null,
|
|
8361
|
+
placeholder: null,
|
|
8362
|
+
error: null,
|
|
8363
|
+
sourceSpan
|
|
8364
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT), TRAIT_USES_SLOT_INDEX);
|
|
8365
|
+
}
|
|
8366
|
+
function createDeferSecondaryOp(deferOp, secondaryView, secondaryBlockKind) {
|
|
8367
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
8368
|
+
kind: OpKind.DeferSecondaryBlock,
|
|
8369
|
+
deferOp,
|
|
8370
|
+
target: secondaryView,
|
|
8371
|
+
secondaryBlockKind,
|
|
8372
|
+
constValue: null,
|
|
8373
|
+
makeExpression: literalOrArrayLiteral
|
|
8374
|
+
}, NEW_OP), TRAIT_USES_SLOT_INDEX), TRAIT_HAS_CONST);
|
|
8375
|
+
}
|
|
8376
|
+
function createDeferOnOp(xref, sourceSpan) {
|
|
8377
|
+
return __spreadValues(__spreadValues({
|
|
8378
|
+
kind: OpKind.DeferOn,
|
|
8379
|
+
xref,
|
|
8380
|
+
sourceSpan
|
|
8381
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8382
|
+
}
|
|
8270
8383
|
function createExtractedMessageOp(owner, expression, statements) {
|
|
8271
8384
|
return __spreadValues({
|
|
8272
8385
|
kind: OpKind.ExtractedMessage,
|
|
@@ -8275,12 +8388,12 @@ function createExtractedMessageOp(owner, expression, statements) {
|
|
|
8275
8388
|
statements
|
|
8276
8389
|
}, NEW_OP);
|
|
8277
8390
|
}
|
|
8278
|
-
function createI18nStartOp(xref,
|
|
8391
|
+
function createI18nStartOp(xref, message) {
|
|
8279
8392
|
return __spreadValues(__spreadValues({
|
|
8280
8393
|
kind: OpKind.I18nStart,
|
|
8281
8394
|
xref,
|
|
8282
|
-
|
|
8283
|
-
|
|
8395
|
+
message,
|
|
8396
|
+
params: /* @__PURE__ */ new Map(),
|
|
8284
8397
|
messageIndex: null
|
|
8285
8398
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8286
8399
|
}
|
|
@@ -8290,8 +8403,14 @@ function createI18nEndOp(xref) {
|
|
|
8290
8403
|
xref
|
|
8291
8404
|
}, NEW_OP);
|
|
8292
8405
|
}
|
|
8406
|
+
function literalOrArrayLiteral(value) {
|
|
8407
|
+
if (Array.isArray(value)) {
|
|
8408
|
+
return literalArr(value.map(literalOrArrayLiteral));
|
|
8409
|
+
}
|
|
8410
|
+
return literal(value, INFERRED_TYPE);
|
|
8411
|
+
}
|
|
8293
8412
|
|
|
8294
|
-
// bazel-out/
|
|
8413
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8295
8414
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8296
8415
|
return __spreadValues(__spreadValues({
|
|
8297
8416
|
kind: OpKind.HostProperty,
|
|
@@ -8302,7 +8421,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8302
8421
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8303
8422
|
}
|
|
8304
8423
|
|
|
8305
|
-
// bazel-out/
|
|
8424
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8425
|
+
var CTX_REF = "CTX_REF_MARKER";
|
|
8426
|
+
|
|
8427
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8306
8428
|
var CompilationJobKind;
|
|
8307
8429
|
(function(CompilationJobKind2) {
|
|
8308
8430
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8407,7 +8529,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8407
8529
|
}
|
|
8408
8530
|
};
|
|
8409
8531
|
|
|
8410
|
-
// bazel-out/
|
|
8532
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
8411
8533
|
function phaseVarCounting(job) {
|
|
8412
8534
|
for (const unit of job.units) {
|
|
8413
8535
|
let varCount = 0;
|
|
@@ -8415,6 +8537,8 @@ function phaseVarCounting(job) {
|
|
|
8415
8537
|
if (hasConsumesVarsTrait(op)) {
|
|
8416
8538
|
varCount += varsUsedByOp(op);
|
|
8417
8539
|
}
|
|
8540
|
+
}
|
|
8541
|
+
for (const op of unit.ops()) {
|
|
8418
8542
|
visitExpressionsInOp(op, (expr) => {
|
|
8419
8543
|
if (!isIrExpression(expr)) {
|
|
8420
8544
|
return;
|
|
@@ -8463,6 +8587,9 @@ function varsUsedByOp(op) {
|
|
|
8463
8587
|
return slots;
|
|
8464
8588
|
case OpKind.InterpolateText:
|
|
8465
8589
|
return op.interpolation.expressions.length;
|
|
8590
|
+
case OpKind.I18nExpression:
|
|
8591
|
+
case OpKind.Conditional:
|
|
8592
|
+
return 1;
|
|
8466
8593
|
default:
|
|
8467
8594
|
throw new Error(`Unhandled op: ${OpKind[op.kind]}`);
|
|
8468
8595
|
}
|
|
@@ -8480,7 +8607,7 @@ function varsUsedByIrExpression(expr) {
|
|
|
8480
8607
|
}
|
|
8481
8608
|
}
|
|
8482
8609
|
|
|
8483
|
-
// bazel-out/
|
|
8610
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/align_pipe_variadic_var_offset.mjs
|
|
8484
8611
|
function phaseAlignPipeVariadicVarOffset(job) {
|
|
8485
8612
|
for (const unit of job.units) {
|
|
8486
8613
|
for (const op of unit.update) {
|
|
@@ -8502,7 +8629,7 @@ function phaseAlignPipeVariadicVarOffset(job) {
|
|
|
8502
8629
|
}
|
|
8503
8630
|
}
|
|
8504
8631
|
|
|
8505
|
-
// bazel-out/
|
|
8632
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8506
8633
|
function phaseFindAnyCasts(job) {
|
|
8507
8634
|
for (const unit of job.units) {
|
|
8508
8635
|
for (const op of unit.ops()) {
|
|
@@ -8520,7 +8647,28 @@ function removeAnys(e) {
|
|
|
8520
8647
|
return e;
|
|
8521
8648
|
}
|
|
8522
8649
|
|
|
8523
|
-
// bazel-out/
|
|
8650
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8651
|
+
function phaseApplyI18nExpressions(job) {
|
|
8652
|
+
for (const unit of job.units) {
|
|
8653
|
+
for (const op of unit.update) {
|
|
8654
|
+
if (op.kind === OpKind.I18nExpression && needsApplication(op)) {
|
|
8655
|
+
OpList.insertAfter(createI18nApplyOp(op.target, null), op);
|
|
8656
|
+
}
|
|
8657
|
+
}
|
|
8658
|
+
}
|
|
8659
|
+
}
|
|
8660
|
+
function needsApplication(op) {
|
|
8661
|
+
var _a2;
|
|
8662
|
+
if (((_a2 = op.next) == null ? void 0 : _a2.kind) !== OpKind.I18nExpression) {
|
|
8663
|
+
return true;
|
|
8664
|
+
}
|
|
8665
|
+
if (op.next.target !== op.target) {
|
|
8666
|
+
return true;
|
|
8667
|
+
}
|
|
8668
|
+
return false;
|
|
8669
|
+
}
|
|
8670
|
+
|
|
8671
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8524
8672
|
function getElementsByXrefId(unit) {
|
|
8525
8673
|
const elements = /* @__PURE__ */ new Map();
|
|
8526
8674
|
for (const op of unit.create) {
|
|
@@ -8532,7 +8680,7 @@ function getElementsByXrefId(unit) {
|
|
|
8532
8680
|
return elements;
|
|
8533
8681
|
}
|
|
8534
8682
|
|
|
8535
|
-
// bazel-out/
|
|
8683
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8536
8684
|
function phaseAttributeExtraction(job) {
|
|
8537
8685
|
for (const unit of job.units) {
|
|
8538
8686
|
const elements = getElementsByXrefId(unit);
|
|
@@ -8599,7 +8747,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8599
8747
|
}
|
|
8600
8748
|
}
|
|
8601
8749
|
|
|
8602
|
-
// bazel-out/
|
|
8750
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8603
8751
|
function lookupElement2(elements, xref) {
|
|
8604
8752
|
const el = elements.get(xref);
|
|
8605
8753
|
if (el === void 0) {
|
|
@@ -8649,16 +8797,22 @@ function phaseBindingSpecialization(job) {
|
|
|
8649
8797
|
}
|
|
8650
8798
|
}
|
|
8651
8799
|
|
|
8652
|
-
// bazel-out/
|
|
8800
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8653
8801
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8654
|
-
Identifiers.
|
|
8655
|
-
Identifiers.
|
|
8802
|
+
Identifiers.attribute,
|
|
8803
|
+
Identifiers.classProp,
|
|
8656
8804
|
Identifiers.element,
|
|
8657
|
-
Identifiers.
|
|
8805
|
+
Identifiers.elementContainer,
|
|
8806
|
+
Identifiers.elementContainerEnd,
|
|
8807
|
+
Identifiers.elementContainerStart,
|
|
8808
|
+
Identifiers.elementEnd,
|
|
8809
|
+
Identifiers.elementStart,
|
|
8658
8810
|
Identifiers.hostProperty,
|
|
8659
|
-
Identifiers.
|
|
8811
|
+
Identifiers.i18nExp,
|
|
8812
|
+
Identifiers.listener,
|
|
8813
|
+
Identifiers.listener,
|
|
8814
|
+
Identifiers.property,
|
|
8660
8815
|
Identifiers.styleProp,
|
|
8661
|
-
Identifiers.attribute,
|
|
8662
8816
|
Identifiers.stylePropInterpolate1,
|
|
8663
8817
|
Identifiers.stylePropInterpolate2,
|
|
8664
8818
|
Identifiers.stylePropInterpolate3,
|
|
@@ -8668,13 +8822,8 @@ var CHAINABLE = /* @__PURE__ */ new Set([
|
|
|
8668
8822
|
Identifiers.stylePropInterpolate7,
|
|
8669
8823
|
Identifiers.stylePropInterpolate8,
|
|
8670
8824
|
Identifiers.stylePropInterpolateV,
|
|
8671
|
-
Identifiers.classProp,
|
|
8672
|
-
Identifiers.listener,
|
|
8673
|
-
Identifiers.elementContainerStart,
|
|
8674
|
-
Identifiers.elementContainerEnd,
|
|
8675
|
-
Identifiers.elementContainer,
|
|
8676
|
-
Identifiers.listener,
|
|
8677
8825
|
Identifiers.syntheticHostListener,
|
|
8826
|
+
Identifiers.syntheticHostProperty,
|
|
8678
8827
|
Identifiers.templateCreate
|
|
8679
8828
|
]);
|
|
8680
8829
|
function phaseChaining(job) {
|
|
@@ -8714,7 +8863,7 @@ function chainOperationsInList(opList) {
|
|
|
8714
8863
|
}
|
|
8715
8864
|
}
|
|
8716
8865
|
|
|
8717
|
-
// bazel-out/
|
|
8866
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
8718
8867
|
function phaseConditionals(job) {
|
|
8719
8868
|
for (const unit of job.units) {
|
|
8720
8869
|
for (const op of unit.ops()) {
|
|
@@ -8722,26 +8871,35 @@ function phaseConditionals(job) {
|
|
|
8722
8871
|
continue;
|
|
8723
8872
|
}
|
|
8724
8873
|
let test;
|
|
8725
|
-
const defaultCase = op.conditions.findIndex((
|
|
8874
|
+
const defaultCase = op.conditions.findIndex((cond) => cond.expr === null);
|
|
8726
8875
|
if (defaultCase >= 0) {
|
|
8727
|
-
const
|
|
8876
|
+
const xref = op.conditions.splice(defaultCase, 1)[0].target;
|
|
8728
8877
|
test = new SlotLiteralExpr(xref);
|
|
8729
8878
|
} else {
|
|
8730
8879
|
test = literal(-1);
|
|
8731
8880
|
}
|
|
8732
|
-
let tmp = new AssignTemporaryExpr(op.test, job.allocateXrefId());
|
|
8881
|
+
let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId());
|
|
8733
8882
|
for (let i = op.conditions.length - 1; i >= 0; i--) {
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8883
|
+
let conditionalCase = op.conditions[i];
|
|
8884
|
+
if (conditionalCase.expr === null) {
|
|
8885
|
+
continue;
|
|
8886
|
+
}
|
|
8887
|
+
if (tmp !== null) {
|
|
8888
|
+
const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref);
|
|
8889
|
+
conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);
|
|
8890
|
+
} else if (conditionalCase.alias !== null) {
|
|
8891
|
+
const caseExpressionTemporaryXref = job.allocateXrefId();
|
|
8892
|
+
conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);
|
|
8893
|
+
op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);
|
|
8894
|
+
}
|
|
8895
|
+
test = new ConditionalExpr(conditionalCase.expr, new SlotLiteralExpr(conditionalCase.target), test);
|
|
8738
8896
|
}
|
|
8739
8897
|
op.processed = test;
|
|
8740
8898
|
}
|
|
8741
8899
|
}
|
|
8742
8900
|
}
|
|
8743
8901
|
|
|
8744
|
-
// bazel-out/
|
|
8902
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
8745
8903
|
var TagContentType;
|
|
8746
8904
|
(function(TagContentType2) {
|
|
8747
8905
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -8774,7 +8932,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
8774
8932
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
8775
8933
|
}
|
|
8776
8934
|
|
|
8777
|
-
// bazel-out/
|
|
8935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
8778
8936
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
8779
8937
|
["&&", BinaryOperator.And],
|
|
8780
8938
|
[">", BinaryOperator.Bigger],
|
|
@@ -8794,15 +8952,16 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
8794
8952
|
["||", BinaryOperator.Or],
|
|
8795
8953
|
["+", BinaryOperator.Plus]
|
|
8796
8954
|
]);
|
|
8797
|
-
var NAMESPACES = /* @__PURE__ */ new Map([["svg", Namespace.SVG], ["math", Namespace.Math]]);
|
|
8798
8955
|
function namespaceForKey(namespacePrefixKey) {
|
|
8799
8956
|
var _a2;
|
|
8957
|
+
const NAMESPACES = /* @__PURE__ */ new Map([["svg", Namespace.SVG], ["math", Namespace.Math]]);
|
|
8800
8958
|
if (namespacePrefixKey === null) {
|
|
8801
8959
|
return Namespace.HTML;
|
|
8802
8960
|
}
|
|
8803
8961
|
return (_a2 = NAMESPACES.get(namespacePrefixKey)) != null ? _a2 : Namespace.HTML;
|
|
8804
8962
|
}
|
|
8805
8963
|
function keyForNamespace(namespace) {
|
|
8964
|
+
const NAMESPACES = /* @__PURE__ */ new Map([["svg", Namespace.SVG], ["math", Namespace.Math]]);
|
|
8806
8965
|
for (const [k, n] of NAMESPACES.entries()) {
|
|
8807
8966
|
if (n === namespace) {
|
|
8808
8967
|
return k;
|
|
@@ -8816,14 +8975,14 @@ function prefixWithNamespace(strippedTag, namespace) {
|
|
|
8816
8975
|
}
|
|
8817
8976
|
return `:${keyForNamespace(namespace)}:${strippedTag}`;
|
|
8818
8977
|
}
|
|
8819
|
-
function
|
|
8978
|
+
function literalOrArrayLiteral2(value) {
|
|
8820
8979
|
if (Array.isArray(value)) {
|
|
8821
|
-
return literalArr(value.map(
|
|
8980
|
+
return literalArr(value.map(literalOrArrayLiteral2));
|
|
8822
8981
|
}
|
|
8823
8982
|
return literal(value, INFERRED_TYPE);
|
|
8824
8983
|
}
|
|
8825
8984
|
|
|
8826
|
-
// bazel-out/
|
|
8985
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
8827
8986
|
function phaseConstCollection(job) {
|
|
8828
8987
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
8829
8988
|
for (const unit of job.units) {
|
|
@@ -8937,7 +9096,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
8937
9096
|
const attrArray = [...attributes];
|
|
8938
9097
|
if (projectAs !== null) {
|
|
8939
9098
|
const parsedR3Selector = parseSelectorToR3Selector(projectAs)[0];
|
|
8940
|
-
attrArray.push(literal(5),
|
|
9099
|
+
attrArray.push(literal(5), literalOrArrayLiteral2(parsedR3Selector));
|
|
8941
9100
|
}
|
|
8942
9101
|
if (classes.length > 0) {
|
|
8943
9102
|
attrArray.push(literal(1), ...classes);
|
|
@@ -8957,12 +9116,13 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
8957
9116
|
return literalArr(attrArray);
|
|
8958
9117
|
}
|
|
8959
9118
|
|
|
8960
|
-
// bazel-out/
|
|
9119
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
8961
9120
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
8962
9121
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
8963
9122
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
8964
9123
|
[OpKind.I18nEnd, [OpKind.I18nStart, OpKind.I18n]]
|
|
8965
9124
|
]);
|
|
9125
|
+
var IGNORED_OP_KINDS = /* @__PURE__ */ new Set([OpKind.Pipe]);
|
|
8966
9126
|
function phaseEmptyElements(job) {
|
|
8967
9127
|
for (const unit of job.units) {
|
|
8968
9128
|
for (const op of unit.create) {
|
|
@@ -8971,15 +9131,19 @@ function phaseEmptyElements(job) {
|
|
|
8971
9131
|
continue;
|
|
8972
9132
|
}
|
|
8973
9133
|
const [startKind, mergedKind] = opReplacements;
|
|
8974
|
-
|
|
8975
|
-
|
|
9134
|
+
let prevOp = op.prev;
|
|
9135
|
+
while (prevOp !== null && IGNORED_OP_KINDS.has(prevOp.kind)) {
|
|
9136
|
+
prevOp = prevOp.prev;
|
|
9137
|
+
}
|
|
9138
|
+
if (prevOp !== null && prevOp.kind === startKind) {
|
|
9139
|
+
prevOp.kind = mergedKind;
|
|
8976
9140
|
OpList.remove(op);
|
|
8977
9141
|
}
|
|
8978
9142
|
}
|
|
8979
9143
|
}
|
|
8980
9144
|
}
|
|
8981
9145
|
|
|
8982
|
-
// bazel-out/
|
|
9146
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
8983
9147
|
function phaseExpandSafeReads(job) {
|
|
8984
9148
|
for (const unit of job.units) {
|
|
8985
9149
|
for (const op of unit.ops()) {
|
|
@@ -9115,16 +9279,28 @@ function ternaryTransform(e) {
|
|
|
9115
9279
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9116
9280
|
}
|
|
9117
9281
|
|
|
9118
|
-
// bazel-out/
|
|
9282
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9119
9283
|
function phaseGenerateAdvance(job) {
|
|
9120
9284
|
for (const unit of job.units) {
|
|
9121
9285
|
const slotMap = /* @__PURE__ */ new Map();
|
|
9286
|
+
let lastSlotOp = null;
|
|
9122
9287
|
for (const op of unit.create) {
|
|
9288
|
+
if (op.kind === OpKind.I18nEnd) {
|
|
9289
|
+
if (lastSlotOp === null) {
|
|
9290
|
+
throw Error("Expected to have encountered an op prior to i18nEnd that consumes a slot");
|
|
9291
|
+
}
|
|
9292
|
+
let lastSlot = lastSlotOp.slot;
|
|
9293
|
+
if (lastSlotOp.kind === OpKind.I18nStart && job.compatibility) {
|
|
9294
|
+
lastSlot++;
|
|
9295
|
+
}
|
|
9296
|
+
slotMap.set(op.xref, lastSlot);
|
|
9297
|
+
}
|
|
9123
9298
|
if (!hasConsumesSlotTrait(op)) {
|
|
9124
9299
|
continue;
|
|
9125
9300
|
} else if (op.slot === null) {
|
|
9126
9301
|
throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`);
|
|
9127
9302
|
}
|
|
9303
|
+
lastSlotOp = op;
|
|
9128
9304
|
slotMap.set(op.xref, op.slot);
|
|
9129
9305
|
}
|
|
9130
9306
|
let slotContext = 0;
|
|
@@ -9147,33 +9323,31 @@ function phaseGenerateAdvance(job) {
|
|
|
9147
9323
|
}
|
|
9148
9324
|
}
|
|
9149
9325
|
|
|
9150
|
-
// bazel-out/
|
|
9151
|
-
function
|
|
9326
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9327
|
+
function phaseGenerateProjectionDef(job) {
|
|
9328
|
+
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9329
|
+
const selectors = [];
|
|
9330
|
+
let projectionSlotIndex = 0;
|
|
9152
9331
|
for (const unit of job.units) {
|
|
9153
|
-
const elements = getElementsByXrefId(unit);
|
|
9154
9332
|
for (const op of unit.create) {
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
if (start.i18n instanceof Message) {
|
|
9159
|
-
const id = job.allocateXrefId();
|
|
9160
|
-
OpList.insertAfter(createI18nStartOp(id, start.i18n), start);
|
|
9161
|
-
OpList.insertBefore(createI18nEndOp(id), op);
|
|
9162
|
-
}
|
|
9163
|
-
break;
|
|
9164
|
-
case OpKind.Template:
|
|
9165
|
-
if (op.i18n !== void 0) {
|
|
9166
|
-
const id = job.allocateXrefId();
|
|
9167
|
-
OpList.insertBefore(createI18nStartOp(id, op.i18n), op);
|
|
9168
|
-
OpList.insertAfter(createI18nEndOp(id), op);
|
|
9169
|
-
}
|
|
9170
|
-
break;
|
|
9333
|
+
if (op.kind === OpKind.Projection) {
|
|
9334
|
+
selectors.push(op.selector);
|
|
9335
|
+
op.projectionSlotIndex = projectionSlotIndex++;
|
|
9171
9336
|
}
|
|
9172
9337
|
}
|
|
9173
9338
|
}
|
|
9339
|
+
if (selectors.length > 0) {
|
|
9340
|
+
let defExpr = null;
|
|
9341
|
+
if (selectors.length > 1 || selectors[0] !== "*") {
|
|
9342
|
+
const def = selectors.map((s) => s === "*" ? s : parseSelectorToR3Selector(s));
|
|
9343
|
+
defExpr = job.pool.getConstLiteral(literalOrArrayLiteral2(def), share);
|
|
9344
|
+
}
|
|
9345
|
+
job.contentSelectors = job.pool.getConstLiteral(literalOrArrayLiteral2(selectors), share);
|
|
9346
|
+
job.root.create.prepend([createProjectionDefOp(defExpr)]);
|
|
9347
|
+
}
|
|
9174
9348
|
}
|
|
9175
9349
|
|
|
9176
|
-
// bazel-out/
|
|
9350
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9177
9351
|
function phaseGenerateVariables(job) {
|
|
9178
9352
|
recursivelyProcessView(job.root, null);
|
|
9179
9353
|
}
|
|
@@ -9242,7 +9416,9 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9242
9416
|
newOps.push(createVariableOp(view.job.allocateXrefId(), scope.viewContextVariable, new NextContextExpr()));
|
|
9243
9417
|
}
|
|
9244
9418
|
for (const [name, value] of view.job.views.get(scope.view).contextVariables) {
|
|
9245
|
-
|
|
9419
|
+
const context = new ContextExpr(scope.view);
|
|
9420
|
+
const variable2 = value === CTX_REF ? context : new ReadPropExpr(context, value);
|
|
9421
|
+
newOps.push(createVariableOp(view.job.allocateXrefId(), scope.contextVariables.get(name), variable2));
|
|
9246
9422
|
}
|
|
9247
9423
|
for (const ref of scope.references) {
|
|
9248
9424
|
newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.offset)));
|
|
@@ -9253,16 +9429,41 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9253
9429
|
return newOps;
|
|
9254
9430
|
}
|
|
9255
9431
|
|
|
9256
|
-
// bazel-out/
|
|
9432
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_trait_collection.mjs
|
|
9433
|
+
function phaseConstTraitCollection(job) {
|
|
9434
|
+
const collectGlobalConsts = (e) => {
|
|
9435
|
+
if (e instanceof ExpressionBase && hasConstTrait(e)) {
|
|
9436
|
+
const ea = e;
|
|
9437
|
+
if (ea.constValue !== null) {
|
|
9438
|
+
ea.constIndex = job.addConst(ea.constValue);
|
|
9439
|
+
}
|
|
9440
|
+
}
|
|
9441
|
+
return e;
|
|
9442
|
+
};
|
|
9443
|
+
for (const unit of job.units) {
|
|
9444
|
+
for (const op of unit.ops()) {
|
|
9445
|
+
if (hasConstTrait(op) && op.constValue !== null) {
|
|
9446
|
+
op.constIndex = job.addConst(op.makeExpression(op.constValue));
|
|
9447
|
+
}
|
|
9448
|
+
transformExpressionsInOp(op, collectGlobalConsts, VisitorContextFlag.None);
|
|
9449
|
+
}
|
|
9450
|
+
}
|
|
9451
|
+
}
|
|
9452
|
+
|
|
9453
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9257
9454
|
var STYLE_DOT = "style.";
|
|
9258
9455
|
var CLASS_DOT = "class.";
|
|
9259
9456
|
var STYLE_BANG = "style!";
|
|
9260
9457
|
var CLASS_BANG = "class!";
|
|
9458
|
+
var BANG_IMPORTANT = "!important";
|
|
9261
9459
|
function phaseHostStylePropertyParsing(job) {
|
|
9262
9460
|
for (const op of job.root.update) {
|
|
9263
9461
|
if (op.kind !== OpKind.Binding) {
|
|
9264
9462
|
continue;
|
|
9265
9463
|
}
|
|
9464
|
+
if (op.name.endsWith(BANG_IMPORTANT)) {
|
|
9465
|
+
op.name = op.name.substring(0, op.name.length - BANG_IMPORTANT.length);
|
|
9466
|
+
}
|
|
9266
9467
|
if (op.name.startsWith(STYLE_DOT)) {
|
|
9267
9468
|
op.bindingKind = BindingKind.StyleProperty;
|
|
9268
9469
|
op.name = op.name.substring(STYLE_DOT.length);
|
|
@@ -9307,7 +9508,27 @@ function parseProperty(name) {
|
|
|
9307
9508
|
return { property: property2, suffix };
|
|
9308
9509
|
}
|
|
9309
9510
|
|
|
9310
|
-
// bazel-out/
|
|
9511
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
9512
|
+
function phaseI18nConstCollection(job) {
|
|
9513
|
+
const messageConstIndices = {};
|
|
9514
|
+
for (const unit of job.units) {
|
|
9515
|
+
for (const op of unit.create) {
|
|
9516
|
+
if (op.kind === OpKind.ExtractedMessage) {
|
|
9517
|
+
messageConstIndices[op.owner] = job.addConst(op.expression, op.statements);
|
|
9518
|
+
OpList.remove(op);
|
|
9519
|
+
}
|
|
9520
|
+
}
|
|
9521
|
+
}
|
|
9522
|
+
for (const unit of job.units) {
|
|
9523
|
+
for (const op of unit.create) {
|
|
9524
|
+
if ((op.kind === OpKind.I18nStart || op.kind === OpKind.I18n) && messageConstIndices[op.xref] !== void 0) {
|
|
9525
|
+
op.messageIndex = messageConstIndices[op.xref];
|
|
9526
|
+
}
|
|
9527
|
+
}
|
|
9528
|
+
}
|
|
9529
|
+
}
|
|
9530
|
+
|
|
9531
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9311
9532
|
function mapLiteral(obj, quoted = false) {
|
|
9312
9533
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9313
9534
|
key,
|
|
@@ -9316,7 +9537,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9316
9537
|
})));
|
|
9317
9538
|
}
|
|
9318
9539
|
|
|
9319
|
-
// bazel-out/
|
|
9540
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9320
9541
|
var IcuSerializerVisitor = class {
|
|
9321
9542
|
visitText(text2) {
|
|
9322
9543
|
return text2.value;
|
|
@@ -9347,7 +9568,7 @@ function serializeIcuNode(icu) {
|
|
|
9347
9568
|
return icu.visit(serializer);
|
|
9348
9569
|
}
|
|
9349
9570
|
|
|
9350
|
-
// bazel-out/
|
|
9571
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9351
9572
|
var TokenType;
|
|
9352
9573
|
(function(TokenType2) {
|
|
9353
9574
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -9708,7 +9929,7 @@ function parseIntAutoRadix(text2) {
|
|
|
9708
9929
|
return result;
|
|
9709
9930
|
}
|
|
9710
9931
|
|
|
9711
|
-
// bazel-out/
|
|
9932
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
9712
9933
|
var SplitInterpolation = class {
|
|
9713
9934
|
constructor(strings, expressions, offsets) {
|
|
9714
9935
|
this.strings = strings;
|
|
@@ -10602,7 +10823,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
10602
10823
|
return offsetMap;
|
|
10603
10824
|
}
|
|
10604
10825
|
|
|
10605
|
-
// bazel-out/
|
|
10826
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
10606
10827
|
var NodeWithI18n = class {
|
|
10607
10828
|
constructor(sourceSpan, i18n2) {
|
|
10608
10829
|
this.sourceSpan = sourceSpan;
|
|
@@ -10753,11 +10974,11 @@ var RecursiveVisitor = class {
|
|
|
10753
10974
|
}
|
|
10754
10975
|
};
|
|
10755
10976
|
|
|
10756
|
-
// bazel-out/
|
|
10977
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
10757
10978
|
var ElementSchemaRegistry = class {
|
|
10758
10979
|
};
|
|
10759
10980
|
|
|
10760
|
-
// bazel-out/
|
|
10981
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
10761
10982
|
var BOOLEAN = "boolean";
|
|
10762
10983
|
var NUMBER = "number";
|
|
10763
10984
|
var STRING = "string";
|
|
@@ -11110,7 +11331,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11110
11331
|
}
|
|
11111
11332
|
}
|
|
11112
11333
|
|
|
11113
|
-
// bazel-out/
|
|
11334
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11114
11335
|
var HtmlTagDefinition = class {
|
|
11115
11336
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11116
11337
|
this.closedByChildren = {};
|
|
@@ -11228,7 +11449,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11228
11449
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11229
11450
|
}
|
|
11230
11451
|
|
|
11231
|
-
// bazel-out/
|
|
11452
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11232
11453
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11233
11454
|
"A": "LINK",
|
|
11234
11455
|
"B": "BOLD_TEXT",
|
|
@@ -11322,7 +11543,7 @@ var PlaceholderRegistry = class {
|
|
|
11322
11543
|
}
|
|
11323
11544
|
};
|
|
11324
11545
|
|
|
11325
|
-
// bazel-out/
|
|
11546
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11326
11547
|
var _expParser = new Parser(new Lexer());
|
|
11327
11548
|
function createI18nMessageFactory(interpolationConfig) {
|
|
11328
11549
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
@@ -11484,14 +11705,14 @@ function extractPlaceholderName(input) {
|
|
|
11484
11705
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
11485
11706
|
}
|
|
11486
11707
|
|
|
11487
|
-
// bazel-out/
|
|
11708
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
11488
11709
|
var I18nError = class extends ParseError {
|
|
11489
11710
|
constructor(span, msg) {
|
|
11490
11711
|
super(span, msg);
|
|
11491
11712
|
}
|
|
11492
11713
|
};
|
|
11493
11714
|
|
|
11494
|
-
// bazel-out/
|
|
11715
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
11495
11716
|
var NAMED_ENTITIES = {
|
|
11496
11717
|
"AElig": "\xC6",
|
|
11497
11718
|
"AMP": "&",
|
|
@@ -13622,7 +13843,7 @@ var NAMED_ENTITIES = {
|
|
|
13622
13843
|
var NGSP_UNICODE = "\uE500";
|
|
13623
13844
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
13624
13845
|
|
|
13625
|
-
// bazel-out/
|
|
13846
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
13626
13847
|
var TokenError = class extends ParseError {
|
|
13627
13848
|
constructor(errorMsg, tokenType, span) {
|
|
13628
13849
|
super(span, errorMsg);
|
|
@@ -13664,6 +13885,7 @@ var _ControlFlowError = class {
|
|
|
13664
13885
|
};
|
|
13665
13886
|
var _Tokenizer = class {
|
|
13666
13887
|
constructor(_file, _getTagDefinition, options) {
|
|
13888
|
+
var _a2;
|
|
13667
13889
|
this._getTagDefinition = _getTagDefinition;
|
|
13668
13890
|
this._currentTokenStart = null;
|
|
13669
13891
|
this._currentTokenType = null;
|
|
@@ -13679,7 +13901,7 @@ var _Tokenizer = class {
|
|
|
13679
13901
|
this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) : new PlainCharacterCursor(_file, range);
|
|
13680
13902
|
this._preserveLineEndings = options.preserveLineEndings || false;
|
|
13681
13903
|
this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;
|
|
13682
|
-
this._tokenizeBlocks = options.tokenizeBlocks
|
|
13904
|
+
this._tokenizeBlocks = (_a2 = options.tokenizeBlocks) != null ? _a2 : true;
|
|
13683
13905
|
try {
|
|
13684
13906
|
this._cursor.init();
|
|
13685
13907
|
} catch (e) {
|
|
@@ -14545,7 +14767,7 @@ var CursorError = class {
|
|
|
14545
14767
|
}
|
|
14546
14768
|
};
|
|
14547
14769
|
|
|
14548
|
-
// bazel-out/
|
|
14770
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
14549
14771
|
var TreeError = class extends ParseError {
|
|
14550
14772
|
static create(elementName, span, msg) {
|
|
14551
14773
|
return new TreeError(elementName, span, msg);
|
|
@@ -14915,7 +15137,7 @@ function decodeEntity(match, entity) {
|
|
|
14915
15137
|
return match;
|
|
14916
15138
|
}
|
|
14917
15139
|
|
|
14918
|
-
// bazel-out/
|
|
15140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
14919
15141
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
14920
15142
|
"iframe|srcdoc",
|
|
14921
15143
|
"*|innerhtml",
|
|
@@ -14930,7 +15152,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
14930
15152
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
14931
15153
|
}
|
|
14932
15154
|
|
|
14933
|
-
// bazel-out/
|
|
15155
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
14934
15156
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
14935
15157
|
if (htmlNode instanceof NodeWithI18n) {
|
|
14936
15158
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15086,7 +15308,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15086
15308
|
return jsDocComment(tags);
|
|
15087
15309
|
}
|
|
15088
15310
|
|
|
15089
|
-
// bazel-out/
|
|
15311
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15090
15312
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15091
15313
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15092
15314
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15134,7 +15356,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15134
15356
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15135
15357
|
}
|
|
15136
15358
|
|
|
15137
|
-
// bazel-out/
|
|
15359
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15138
15360
|
function createLocalizeStatements(variable2, message, params) {
|
|
15139
15361
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15140
15362
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15217,27 +15439,28 @@ function createEmptyMessagePart(location) {
|
|
|
15217
15439
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15218
15440
|
}
|
|
15219
15441
|
|
|
15220
|
-
// bazel-out/
|
|
15442
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_message_extraction.mjs
|
|
15221
15443
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15222
15444
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15223
15445
|
function phaseI18nMessageExtraction(job) {
|
|
15224
15446
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
15225
15447
|
for (const unit of job.units) {
|
|
15226
15448
|
for (const op of unit.create) {
|
|
15227
|
-
if (op.kind === OpKind.I18nStart
|
|
15228
|
-
const params =
|
|
15449
|
+
if (op.kind === OpKind.I18nStart || op.kind === OpKind.I18n) {
|
|
15450
|
+
const params = new Map([...op.params.entries()].sort());
|
|
15229
15451
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
15230
|
-
const closureVar = i18nGenerateClosureVar(job.pool, op.
|
|
15231
|
-
const statements = getTranslationDeclStmts(op.
|
|
15452
|
+
const closureVar = i18nGenerateClosureVar(job.pool, op.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
15453
|
+
const statements = getTranslationDeclStmts(op.message, mainVar, closureVar, params, void 0);
|
|
15232
15454
|
unit.create.push(createExtractedMessageOp(op.xref, mainVar, statements));
|
|
15233
15455
|
}
|
|
15234
15456
|
}
|
|
15235
15457
|
}
|
|
15236
15458
|
}
|
|
15237
|
-
function getTranslationDeclStmts(message, variable2, closureVar, params
|
|
15459
|
+
function getTranslationDeclStmts(message, variable2, closureVar, params, transformFn) {
|
|
15460
|
+
const paramsObject = Object.fromEntries(params);
|
|
15238
15461
|
const statements = [
|
|
15239
15462
|
declareI18nVariable(variable2),
|
|
15240
|
-
ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable2, message, closureVar,
|
|
15463
|
+
ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable2, message, closureVar, paramsObject), createLocalizeStatements(variable2, message, formatI18nPlaceholderNamesInMap(paramsObject, false)))
|
|
15241
15464
|
];
|
|
15242
15465
|
if (transformFn) {
|
|
15243
15466
|
statements.push(new ExpressionStatement(variable2.set(transformFn(variable2))));
|
|
@@ -15261,29 +15484,51 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
15261
15484
|
return variable(name);
|
|
15262
15485
|
}
|
|
15263
15486
|
|
|
15264
|
-
// bazel-out/
|
|
15487
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15265
15488
|
function phaseI18nTextExtraction(job) {
|
|
15489
|
+
var _a2;
|
|
15266
15490
|
for (const unit of job.units) {
|
|
15267
|
-
let
|
|
15491
|
+
let currentI18nId = null;
|
|
15492
|
+
const textNodes = /* @__PURE__ */ new Map();
|
|
15268
15493
|
for (const op of unit.create) {
|
|
15269
15494
|
switch (op.kind) {
|
|
15270
15495
|
case OpKind.I18nStart:
|
|
15271
|
-
|
|
15496
|
+
currentI18nId = op.xref;
|
|
15272
15497
|
break;
|
|
15273
15498
|
case OpKind.I18nEnd:
|
|
15274
|
-
|
|
15499
|
+
currentI18nId = null;
|
|
15275
15500
|
break;
|
|
15276
15501
|
case OpKind.Text:
|
|
15277
|
-
if (
|
|
15502
|
+
if (currentI18nId !== null) {
|
|
15503
|
+
textNodes.set(op.xref, currentI18nId);
|
|
15278
15504
|
OpList.remove(op);
|
|
15279
15505
|
}
|
|
15280
15506
|
break;
|
|
15281
15507
|
}
|
|
15282
15508
|
}
|
|
15509
|
+
for (const op of unit.update) {
|
|
15510
|
+
switch (op.kind) {
|
|
15511
|
+
case OpKind.InterpolateText:
|
|
15512
|
+
if (!textNodes.has(op.target)) {
|
|
15513
|
+
continue;
|
|
15514
|
+
}
|
|
15515
|
+
const i18nBlockId = textNodes.get(op.target);
|
|
15516
|
+
const ops = [];
|
|
15517
|
+
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
15518
|
+
const expr = op.interpolation.expressions[i];
|
|
15519
|
+
const placeholder = op.i18nPlaceholders[i];
|
|
15520
|
+
ops.push(createI18nExpressionOp(i18nBlockId, expr, placeholder, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
15521
|
+
}
|
|
15522
|
+
if (ops.length > 0) {
|
|
15523
|
+
}
|
|
15524
|
+
OpList.replaceWithMany(op, ops);
|
|
15525
|
+
break;
|
|
15526
|
+
}
|
|
15527
|
+
}
|
|
15283
15528
|
}
|
|
15284
15529
|
}
|
|
15285
15530
|
|
|
15286
|
-
// bazel-out/
|
|
15531
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
15287
15532
|
function phaseLocalRefs(job) {
|
|
15288
15533
|
for (const unit of job.units) {
|
|
15289
15534
|
for (const op of unit.create) {
|
|
@@ -15314,7 +15559,7 @@ function serializeLocalRefs(refs) {
|
|
|
15314
15559
|
return literalArr(constRefs);
|
|
15315
15560
|
}
|
|
15316
15561
|
|
|
15317
|
-
// bazel-out/
|
|
15562
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
15318
15563
|
function phaseNamespace(job) {
|
|
15319
15564
|
for (const unit of job.units) {
|
|
15320
15565
|
let activeNamespace = Namespace.HTML;
|
|
@@ -15330,7 +15575,7 @@ function phaseNamespace(job) {
|
|
|
15330
15575
|
}
|
|
15331
15576
|
}
|
|
15332
15577
|
|
|
15333
|
-
// bazel-out/
|
|
15578
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
15334
15579
|
function parse(value) {
|
|
15335
15580
|
const styles = [];
|
|
15336
15581
|
let i = 0;
|
|
@@ -15391,7 +15636,7 @@ function hyphenate2(value) {
|
|
|
15391
15636
|
}).toLowerCase();
|
|
15392
15637
|
}
|
|
15393
15638
|
|
|
15394
|
-
// bazel-out/
|
|
15639
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
15395
15640
|
function phaseNaming(cpl) {
|
|
15396
15641
|
addNamesToView(cpl.root, cpl.componentName, { index: 0 }, cpl.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
15397
15642
|
}
|
|
@@ -15412,7 +15657,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15412
15657
|
if (op.handlerFnName !== null) {
|
|
15413
15658
|
break;
|
|
15414
15659
|
}
|
|
15415
|
-
if (!op.hostListener && op.
|
|
15660
|
+
if (!op.hostListener && op.targetSlot === null) {
|
|
15416
15661
|
throw new Error(`Expected a slot to be assigned`);
|
|
15417
15662
|
}
|
|
15418
15663
|
let animation = "";
|
|
@@ -15423,7 +15668,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15423
15668
|
if (op.hostListener) {
|
|
15424
15669
|
op.handlerFnName = `${baseName}_${animation}${op.name}_HostBindingHandler`;
|
|
15425
15670
|
} else {
|
|
15426
|
-
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation}${op.name}_${op.
|
|
15671
|
+
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation}${op.name}_${op.targetSlot}_listener`;
|
|
15427
15672
|
}
|
|
15428
15673
|
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
15429
15674
|
break;
|
|
@@ -15492,7 +15737,7 @@ function stripImportant(name) {
|
|
|
15492
15737
|
return name;
|
|
15493
15738
|
}
|
|
15494
15739
|
|
|
15495
|
-
// bazel-out/
|
|
15740
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
15496
15741
|
function phaseMergeNextContext(job) {
|
|
15497
15742
|
for (const unit of job.units) {
|
|
15498
15743
|
for (const op of unit.create) {
|
|
@@ -15538,12 +15783,16 @@ function mergeNextContextsInOps(ops) {
|
|
|
15538
15783
|
}
|
|
15539
15784
|
}
|
|
15540
15785
|
|
|
15541
|
-
// bazel-out/
|
|
15786
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
15542
15787
|
var CONTAINER_TAG = "ng-container";
|
|
15543
15788
|
function phaseNgContainer(job) {
|
|
15544
15789
|
for (const unit of job.units) {
|
|
15545
15790
|
const updatedElementXrefs = /* @__PURE__ */ new Set();
|
|
15546
15791
|
for (const op of unit.create) {
|
|
15792
|
+
if (op.kind === OpKind.Element && op.tag === CONTAINER_TAG) {
|
|
15793
|
+
op.kind = OpKind.Container;
|
|
15794
|
+
updatedElementXrefs.add(op.xref);
|
|
15795
|
+
}
|
|
15547
15796
|
if (op.kind === OpKind.ElementStart && op.tag === CONTAINER_TAG) {
|
|
15548
15797
|
op.kind = OpKind.ContainerStart;
|
|
15549
15798
|
updatedElementXrefs.add(op.xref);
|
|
@@ -15555,32 +15804,7 @@ function phaseNgContainer(job) {
|
|
|
15555
15804
|
}
|
|
15556
15805
|
}
|
|
15557
15806
|
|
|
15558
|
-
// bazel-out/
|
|
15559
|
-
function phaseNoListenersOnTemplates(job) {
|
|
15560
|
-
for (const unit of job.units) {
|
|
15561
|
-
let inTemplate = false;
|
|
15562
|
-
for (const op of unit.create) {
|
|
15563
|
-
switch (op.kind) {
|
|
15564
|
-
case OpKind.Template:
|
|
15565
|
-
inTemplate = true;
|
|
15566
|
-
break;
|
|
15567
|
-
case OpKind.ElementStart:
|
|
15568
|
-
case OpKind.Element:
|
|
15569
|
-
case OpKind.ContainerStart:
|
|
15570
|
-
case OpKind.Container:
|
|
15571
|
-
inTemplate = false;
|
|
15572
|
-
break;
|
|
15573
|
-
case OpKind.Listener:
|
|
15574
|
-
if (inTemplate) {
|
|
15575
|
-
OpList.remove(op);
|
|
15576
|
-
}
|
|
15577
|
-
break;
|
|
15578
|
-
}
|
|
15579
|
-
}
|
|
15580
|
-
}
|
|
15581
|
-
}
|
|
15582
|
-
|
|
15583
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
15807
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
15584
15808
|
function lookupElement3(elements, xref) {
|
|
15585
15809
|
const el = elements.get(xref);
|
|
15586
15810
|
if (el === void 0) {
|
|
@@ -15610,7 +15834,7 @@ function phaseNonbindable(job) {
|
|
|
15610
15834
|
}
|
|
15611
15835
|
}
|
|
15612
15836
|
|
|
15613
|
-
// bazel-out/
|
|
15837
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
15614
15838
|
function phaseNullishCoalescing(job) {
|
|
15615
15839
|
for (const unit of job.units) {
|
|
15616
15840
|
for (const op of unit.ops()) {
|
|
@@ -15626,37 +15850,131 @@ function phaseNullishCoalescing(job) {
|
|
|
15626
15850
|
}
|
|
15627
15851
|
}
|
|
15628
15852
|
|
|
15629
|
-
// bazel-out/
|
|
15630
|
-
function
|
|
15631
|
-
|
|
15853
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
15854
|
+
function kindTest(kind) {
|
|
15855
|
+
return (op) => op.kind === kind;
|
|
15856
|
+
}
|
|
15857
|
+
var CREATE_ORDERING = [
|
|
15858
|
+
{ test: (op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener },
|
|
15859
|
+
{ test: (op) => op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) }
|
|
15860
|
+
];
|
|
15861
|
+
var UPDATE_ORDERING = [
|
|
15862
|
+
{ test: (op) => op.kind === OpKind.HostProperty && op.expression instanceof Interpolation2 },
|
|
15863
|
+
{ test: (op) => op.kind === OpKind.HostProperty && !(op.expression instanceof Interpolation2) },
|
|
15864
|
+
{ test: kindTest(OpKind.StyleMap), transform: keepLast },
|
|
15865
|
+
{ test: kindTest(OpKind.ClassMap), transform: keepLast },
|
|
15866
|
+
{ test: kindTest(OpKind.StyleProp) },
|
|
15867
|
+
{ test: kindTest(OpKind.ClassProp) },
|
|
15868
|
+
{ test: (op) => op.kind === OpKind.Property && op.expression instanceof Interpolation2 },
|
|
15869
|
+
{ test: (op) => op.kind === OpKind.Property && !(op.expression instanceof Interpolation2) },
|
|
15870
|
+
{ test: kindTest(OpKind.Attribute) }
|
|
15871
|
+
];
|
|
15872
|
+
var handledOpKinds = /* @__PURE__ */ new Set([
|
|
15873
|
+
OpKind.Listener,
|
|
15874
|
+
OpKind.StyleMap,
|
|
15875
|
+
OpKind.ClassMap,
|
|
15876
|
+
OpKind.StyleProp,
|
|
15877
|
+
OpKind.ClassProp,
|
|
15878
|
+
OpKind.Property,
|
|
15879
|
+
OpKind.HostProperty,
|
|
15880
|
+
OpKind.Attribute
|
|
15881
|
+
]);
|
|
15882
|
+
function phaseOrdering(job) {
|
|
15883
|
+
for (const unit of job.units) {
|
|
15884
|
+
let opsToOrder = [];
|
|
15632
15885
|
for (const op of unit.create) {
|
|
15633
|
-
if (
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
OpList.remove(op);
|
|
15640
|
-
} else if (op.name === "class") {
|
|
15641
|
-
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
15642
|
-
for (const parsedClass of parsedClasses) {
|
|
15643
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null), op);
|
|
15644
|
-
}
|
|
15645
|
-
OpList.remove(op);
|
|
15646
|
-
}
|
|
15886
|
+
if (handledOpKinds.has(op.kind)) {
|
|
15887
|
+
opsToOrder.push(op);
|
|
15888
|
+
OpList.remove(op);
|
|
15889
|
+
} else {
|
|
15890
|
+
OpList.insertBefore(reorder(opsToOrder, CREATE_ORDERING), op);
|
|
15891
|
+
opsToOrder = [];
|
|
15647
15892
|
}
|
|
15648
15893
|
}
|
|
15649
|
-
|
|
15650
|
-
|
|
15651
|
-
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15894
|
+
unit.create.push(reorder(opsToOrder, CREATE_ORDERING));
|
|
15895
|
+
opsToOrder = [];
|
|
15896
|
+
for (const op of unit.update) {
|
|
15897
|
+
if (handledOpKinds.has(op.kind)) {
|
|
15898
|
+
opsToOrder.push(op);
|
|
15899
|
+
OpList.remove(op);
|
|
15900
|
+
} else {
|
|
15901
|
+
OpList.insertBefore(reorder(opsToOrder, UPDATE_ORDERING), op);
|
|
15902
|
+
opsToOrder = [];
|
|
15903
|
+
}
|
|
15904
|
+
}
|
|
15905
|
+
unit.update.push(reorder(opsToOrder, UPDATE_ORDERING));
|
|
15906
|
+
}
|
|
15907
|
+
}
|
|
15908
|
+
function reorder(ops, ordering) {
|
|
15909
|
+
const groups = Array.from(ordering, () => new Array());
|
|
15910
|
+
for (const op of ops) {
|
|
15911
|
+
const groupIndex = ordering.findIndex((o) => o.test(op));
|
|
15912
|
+
groups[groupIndex].push(op);
|
|
15913
|
+
}
|
|
15914
|
+
return groups.flatMap((group, i) => {
|
|
15915
|
+
const transform2 = ordering[i].transform;
|
|
15916
|
+
return transform2 ? transform2(group) : group;
|
|
15917
|
+
});
|
|
15918
|
+
}
|
|
15919
|
+
function keepLast(ops) {
|
|
15920
|
+
return ops.slice(ops.length - 1);
|
|
15921
|
+
}
|
|
15922
|
+
|
|
15923
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
15924
|
+
function phaseParseExtractedStyles(cpl) {
|
|
15925
|
+
for (const unit of cpl.units) {
|
|
15926
|
+
for (const op of unit.create) {
|
|
15927
|
+
if (op.kind === OpKind.ExtractedAttribute && op.bindingKind === BindingKind.Attribute && isStringLiteral(op.expression)) {
|
|
15928
|
+
if (op.name === "style") {
|
|
15929
|
+
const parsedStyles = parse(op.expression.value);
|
|
15930
|
+
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
15931
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1])), op);
|
|
15932
|
+
}
|
|
15933
|
+
OpList.remove(op);
|
|
15934
|
+
} else if (op.name === "class") {
|
|
15935
|
+
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
15936
|
+
for (const parsedClass of parsedClasses) {
|
|
15937
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null), op);
|
|
15938
|
+
}
|
|
15939
|
+
OpList.remove(op);
|
|
15940
|
+
}
|
|
15941
|
+
}
|
|
15942
|
+
}
|
|
15943
|
+
}
|
|
15944
|
+
}
|
|
15945
|
+
|
|
15946
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
15947
|
+
function phaseRemoveContentSelectors(job) {
|
|
15948
|
+
for (const unit of job.units) {
|
|
15949
|
+
const elements = getElementsByXrefId(unit);
|
|
15950
|
+
for (const op of unit.update) {
|
|
15951
|
+
switch (op.kind) {
|
|
15952
|
+
case OpKind.Binding:
|
|
15953
|
+
const target = lookupElement4(elements, op.target);
|
|
15954
|
+
if (op.name.toLowerCase() === "select" && target.kind === OpKind.Projection) {
|
|
15955
|
+
OpList.remove(op);
|
|
15956
|
+
}
|
|
15957
|
+
continue;
|
|
15958
|
+
}
|
|
15959
|
+
}
|
|
15960
|
+
}
|
|
15961
|
+
}
|
|
15962
|
+
function lookupElement4(elements, xref) {
|
|
15963
|
+
const el = elements.get(xref);
|
|
15964
|
+
if (el === void 0) {
|
|
15965
|
+
throw new Error("All attributes should have an element-like target.");
|
|
15966
|
+
}
|
|
15967
|
+
return el;
|
|
15968
|
+
}
|
|
15969
|
+
|
|
15970
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
15971
|
+
function phasePipeCreation(job) {
|
|
15972
|
+
for (const unit of job.units) {
|
|
15973
|
+
processPipeBindingsInView(unit);
|
|
15974
|
+
}
|
|
15975
|
+
}
|
|
15976
|
+
function processPipeBindingsInView(unit) {
|
|
15977
|
+
for (const updateOp of unit.update) {
|
|
15660
15978
|
visitExpressionsInOp(updateOp, (expr, flags) => {
|
|
15661
15979
|
if (!isIrExpression(expr)) {
|
|
15662
15980
|
return;
|
|
@@ -15692,7 +16010,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
15692
16010
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
15693
16011
|
}
|
|
15694
16012
|
|
|
15695
|
-
// bazel-out/
|
|
16013
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
15696
16014
|
function phasePipeVariadic(job) {
|
|
15697
16015
|
for (const unit of job.units) {
|
|
15698
16016
|
for (const op of unit.update) {
|
|
@@ -15709,77 +16027,7 @@ function phasePipeVariadic(job) {
|
|
|
15709
16027
|
}
|
|
15710
16028
|
}
|
|
15711
16029
|
|
|
15712
|
-
// bazel-out/
|
|
15713
|
-
function kindTest(kind) {
|
|
15714
|
-
return (op) => op.kind === kind;
|
|
15715
|
-
}
|
|
15716
|
-
var CREATE_ORDERING = [
|
|
15717
|
-
{ test: (op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener },
|
|
15718
|
-
{ test: (op) => op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) }
|
|
15719
|
-
];
|
|
15720
|
-
var UPDATE_ORDERING = [
|
|
15721
|
-
{ test: (op) => op.kind === OpKind.HostProperty && op.expression instanceof Interpolation2 },
|
|
15722
|
-
{ test: (op) => op.kind === OpKind.HostProperty && !(op.expression instanceof Interpolation2) },
|
|
15723
|
-
{ test: kindTest(OpKind.StyleMap), transform: keepLast },
|
|
15724
|
-
{ test: kindTest(OpKind.ClassMap), transform: keepLast },
|
|
15725
|
-
{ test: kindTest(OpKind.StyleProp) },
|
|
15726
|
-
{ test: kindTest(OpKind.ClassProp) },
|
|
15727
|
-
{ test: (op) => op.kind === OpKind.Property && op.expression instanceof Interpolation2 },
|
|
15728
|
-
{ test: (op) => op.kind === OpKind.Property && !(op.expression instanceof Interpolation2) },
|
|
15729
|
-
{ test: kindTest(OpKind.Attribute) }
|
|
15730
|
-
];
|
|
15731
|
-
var handledOpKinds = /* @__PURE__ */ new Set([
|
|
15732
|
-
OpKind.Listener,
|
|
15733
|
-
OpKind.StyleMap,
|
|
15734
|
-
OpKind.ClassMap,
|
|
15735
|
-
OpKind.StyleProp,
|
|
15736
|
-
OpKind.ClassProp,
|
|
15737
|
-
OpKind.Property,
|
|
15738
|
-
OpKind.HostProperty,
|
|
15739
|
-
OpKind.Attribute
|
|
15740
|
-
]);
|
|
15741
|
-
function phaseOrdering(job) {
|
|
15742
|
-
for (const unit of job.units) {
|
|
15743
|
-
let opsToOrder = [];
|
|
15744
|
-
for (const op of unit.create) {
|
|
15745
|
-
if (handledOpKinds.has(op.kind)) {
|
|
15746
|
-
opsToOrder.push(op);
|
|
15747
|
-
OpList.remove(op);
|
|
15748
|
-
} else {
|
|
15749
|
-
OpList.insertBefore(reorder(opsToOrder, CREATE_ORDERING), op);
|
|
15750
|
-
opsToOrder = [];
|
|
15751
|
-
}
|
|
15752
|
-
}
|
|
15753
|
-
unit.create.push(reorder(opsToOrder, CREATE_ORDERING));
|
|
15754
|
-
opsToOrder = [];
|
|
15755
|
-
for (const op of unit.update) {
|
|
15756
|
-
if (handledOpKinds.has(op.kind)) {
|
|
15757
|
-
opsToOrder.push(op);
|
|
15758
|
-
OpList.remove(op);
|
|
15759
|
-
} else {
|
|
15760
|
-
OpList.insertBefore(reorder(opsToOrder, UPDATE_ORDERING), op);
|
|
15761
|
-
opsToOrder = [];
|
|
15762
|
-
}
|
|
15763
|
-
}
|
|
15764
|
-
unit.update.push(reorder(opsToOrder, UPDATE_ORDERING));
|
|
15765
|
-
}
|
|
15766
|
-
}
|
|
15767
|
-
function reorder(ops, ordering) {
|
|
15768
|
-
const groups = Array.from(ordering, () => new Array());
|
|
15769
|
-
for (const op of ops) {
|
|
15770
|
-
const groupIndex = ordering.findIndex((o) => o.test(op));
|
|
15771
|
-
groups[groupIndex].push(op);
|
|
15772
|
-
}
|
|
15773
|
-
return groups.flatMap((group, i) => {
|
|
15774
|
-
const transform2 = ordering[i].transform;
|
|
15775
|
-
return transform2 ? transform2(group) : group;
|
|
15776
|
-
});
|
|
15777
|
-
}
|
|
15778
|
-
function keepLast(ops) {
|
|
15779
|
-
return ops.slice(ops.length - 1);
|
|
15780
|
-
}
|
|
15781
|
-
|
|
15782
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16030
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
15783
16031
|
function phasePureFunctionExtraction(job) {
|
|
15784
16032
|
for (const view of job.units) {
|
|
15785
16033
|
for (const op of view.ops()) {
|
|
@@ -15809,19 +16057,19 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
15809
16057
|
toSharedConstantDeclaration(declName, keyExpr) {
|
|
15810
16058
|
const fnParams = [];
|
|
15811
16059
|
for (let idx = 0; idx < this.numArgs; idx++) {
|
|
15812
|
-
fnParams.push(new FnParam("
|
|
16060
|
+
fnParams.push(new FnParam("a" + idx));
|
|
15813
16061
|
}
|
|
15814
16062
|
const returnExpr = transformExpressionsInExpression(keyExpr, (expr) => {
|
|
15815
16063
|
if (!(expr instanceof PureFunctionParameterExpr)) {
|
|
15816
16064
|
return expr;
|
|
15817
16065
|
}
|
|
15818
|
-
return variable("
|
|
16066
|
+
return variable("a" + expr.index);
|
|
15819
16067
|
}, VisitorContextFlag.None);
|
|
15820
|
-
return new
|
|
16068
|
+
return new DeclareVarStmt(declName, new ArrowFunctionExpr(fnParams, returnExpr), void 0, StmtModifier.Final);
|
|
15821
16069
|
}
|
|
15822
16070
|
};
|
|
15823
16071
|
|
|
15824
|
-
// bazel-out/
|
|
16072
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
15825
16073
|
function phasePureLiteralStructures(job) {
|
|
15826
16074
|
for (const view of job.units) {
|
|
15827
16075
|
for (const op of view.update) {
|
|
@@ -15868,7 +16116,7 @@ function transformLiteralMap(expr) {
|
|
|
15868
16116
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
15869
16117
|
}
|
|
15870
16118
|
|
|
15871
|
-
// bazel-out/
|
|
16119
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
15872
16120
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
15873
16121
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
15874
16122
|
}
|
|
@@ -15978,6 +16226,25 @@ function text(slot, initialValue, sourceSpan) {
|
|
|
15978
16226
|
}
|
|
15979
16227
|
return call(Identifiers.text, args, sourceSpan);
|
|
15980
16228
|
}
|
|
16229
|
+
function defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeholderSlot, errorSlot, loadingConfigIndex, placeholderConfigIndex, sourceSpan) {
|
|
16230
|
+
const args = [
|
|
16231
|
+
literal(selfSlot),
|
|
16232
|
+
literal(primarySlot),
|
|
16233
|
+
literal(dependencyResolverFn),
|
|
16234
|
+
literal(loadingSlot),
|
|
16235
|
+
literal(placeholderSlot),
|
|
16236
|
+
literal(errorSlot),
|
|
16237
|
+
literal(loadingConfigIndex),
|
|
16238
|
+
literal(placeholderConfigIndex)
|
|
16239
|
+
];
|
|
16240
|
+
while (args[args.length - 1].value === null) {
|
|
16241
|
+
args.pop();
|
|
16242
|
+
}
|
|
16243
|
+
return call(Identifiers.defer, args, sourceSpan);
|
|
16244
|
+
}
|
|
16245
|
+
function deferOn(sourceSpan) {
|
|
16246
|
+
return call(Identifiers.deferOnIdle, [], sourceSpan);
|
|
16247
|
+
}
|
|
15981
16248
|
function projectionDef(def) {
|
|
15982
16249
|
return call(Identifiers.projectionDef, def ? [def] : [], null);
|
|
15983
16250
|
}
|
|
@@ -15994,8 +16261,8 @@ function projection(slot, projectionSlotIndex, attributes) {
|
|
|
15994
16261
|
function i18nStart(slot, constIndex) {
|
|
15995
16262
|
return call(Identifiers.i18nStart, [literal(slot), literal(constIndex)], null);
|
|
15996
16263
|
}
|
|
15997
|
-
function i18n(slot) {
|
|
15998
|
-
return call(Identifiers.i18n, [literal(slot)], null);
|
|
16264
|
+
function i18n(slot, constIndex) {
|
|
16265
|
+
return call(Identifiers.i18n, [literal(slot), literal(constIndex)], null);
|
|
15999
16266
|
}
|
|
16000
16267
|
function i18nEnd() {
|
|
16001
16268
|
return call(Identifiers.i18nEnd, [], null);
|
|
@@ -16070,6 +16337,12 @@ function textInterpolate(strings, expressions, sourceSpan) {
|
|
|
16070
16337
|
}
|
|
16071
16338
|
return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
|
|
16072
16339
|
}
|
|
16340
|
+
function i18nExp(expr, sourceSpan) {
|
|
16341
|
+
return call(Identifiers.i18nExp, [expr], sourceSpan);
|
|
16342
|
+
}
|
|
16343
|
+
function i18nApply(slot, sourceSpan) {
|
|
16344
|
+
return call(Identifiers.i18nApply, [literal(slot)], sourceSpan);
|
|
16345
|
+
}
|
|
16073
16346
|
function propertyInterpolate(name, strings, expressions, sanitizer, sourceSpan) {
|
|
16074
16347
|
const interpolationArgs = collateInterpolationArgs(strings, expressions);
|
|
16075
16348
|
const extraArgs = [];
|
|
@@ -16134,8 +16407,12 @@ function call(instruction, args, sourceSpan) {
|
|
|
16134
16407
|
const expr = importExpr(instruction).callFn(args, sourceSpan);
|
|
16135
16408
|
return createStatementOp(new ExpressionStatement(expr, sourceSpan));
|
|
16136
16409
|
}
|
|
16137
|
-
function conditional(slot, condition) {
|
|
16138
|
-
|
|
16410
|
+
function conditional(slot, condition, contextValue, sourceSpan) {
|
|
16411
|
+
const args = [literal(slot), condition];
|
|
16412
|
+
if (contextValue !== null) {
|
|
16413
|
+
args.push(contextValue);
|
|
16414
|
+
}
|
|
16415
|
+
return call(Identifiers.conditional, args, sourceSpan);
|
|
16139
16416
|
}
|
|
16140
16417
|
var TEXT_INTERPOLATE_CONFIG = {
|
|
16141
16418
|
constant: [
|
|
@@ -16286,7 +16563,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
16286
16563
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
16287
16564
|
}
|
|
16288
16565
|
|
|
16289
|
-
// bazel-out/
|
|
16566
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
16290
16567
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
16291
16568
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
16292
16569
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -16302,6 +16579,7 @@ function phaseReify(cpl) {
|
|
|
16302
16579
|
}
|
|
16303
16580
|
}
|
|
16304
16581
|
function reifyCreateOperations(unit, ops) {
|
|
16582
|
+
var _a2, _b2, _c2, _d2;
|
|
16305
16583
|
for (const op of ops) {
|
|
16306
16584
|
transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
|
|
16307
16585
|
switch (op.kind) {
|
|
@@ -16333,14 +16611,14 @@ function reifyCreateOperations(unit, ops) {
|
|
|
16333
16611
|
OpList.replace(op, i18nEnd());
|
|
16334
16612
|
break;
|
|
16335
16613
|
case OpKind.I18n:
|
|
16336
|
-
OpList.replace(op, i18n(op.slot));
|
|
16614
|
+
OpList.replace(op, i18n(op.slot, op.messageIndex));
|
|
16337
16615
|
break;
|
|
16338
16616
|
case OpKind.Template:
|
|
16339
16617
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
16340
16618
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
16341
16619
|
}
|
|
16342
16620
|
const childView = unit.job.views.get(op.xref);
|
|
16343
|
-
OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.
|
|
16621
|
+
OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.block ? null : op.tag, op.attributes, op.sourceSpan));
|
|
16344
16622
|
break;
|
|
16345
16623
|
case OpKind.DisableBindings:
|
|
16346
16624
|
OpList.replace(op, disableBindings());
|
|
@@ -16375,6 +16653,15 @@ function reifyCreateOperations(unit, ops) {
|
|
|
16375
16653
|
break;
|
|
16376
16654
|
}
|
|
16377
16655
|
break;
|
|
16656
|
+
case OpKind.Defer:
|
|
16657
|
+
OpList.replace(op, defer(op.slot, op.targetSlot, null, op.loading && op.loading.targetSlot, op.placeholder && op.placeholder.targetSlot, op.error && op.error.targetSlot, (_b2 = (_a2 = op.loading) == null ? void 0 : _a2.constIndex) != null ? _b2 : null, (_d2 = (_c2 = op.placeholder) == null ? void 0 : _c2.constIndex) != null ? _d2 : null, op.sourceSpan));
|
|
16658
|
+
break;
|
|
16659
|
+
case OpKind.DeferSecondaryBlock:
|
|
16660
|
+
OpList.remove(op);
|
|
16661
|
+
break;
|
|
16662
|
+
case OpKind.DeferOn:
|
|
16663
|
+
OpList.replace(op, deferOn(op.sourceSpan));
|
|
16664
|
+
break;
|
|
16378
16665
|
case OpKind.ProjectionDef:
|
|
16379
16666
|
OpList.replace(op, projectionDef(op.def));
|
|
16380
16667
|
break;
|
|
@@ -16429,6 +16716,12 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
16429
16716
|
OpList.replace(op, classMap(op.expression, op.sourceSpan));
|
|
16430
16717
|
}
|
|
16431
16718
|
break;
|
|
16719
|
+
case OpKind.I18nExpression:
|
|
16720
|
+
OpList.replace(op, i18nExp(op.expression, op.sourceSpan));
|
|
16721
|
+
break;
|
|
16722
|
+
case OpKind.I18nApply:
|
|
16723
|
+
OpList.replace(op, i18nApply(op.targetSlot, op.sourceSpan));
|
|
16724
|
+
break;
|
|
16432
16725
|
case OpKind.InterpolateText:
|
|
16433
16726
|
OpList.replace(op, textInterpolate(op.interpolation.strings, op.interpolation.expressions, op.sourceSpan));
|
|
16434
16727
|
break;
|
|
@@ -16460,10 +16753,10 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
16460
16753
|
if (op.processed === null) {
|
|
16461
16754
|
throw new Error(`Conditional test was not set.`);
|
|
16462
16755
|
}
|
|
16463
|
-
if (op.
|
|
16756
|
+
if (op.targetSlot === null) {
|
|
16464
16757
|
throw new Error(`Conditional slot was not set.`);
|
|
16465
16758
|
}
|
|
16466
|
-
OpList.replace(op, conditional(op.
|
|
16759
|
+
OpList.replace(op, conditional(op.targetSlot, op.processed, op.contextValue, op.sourceSpan));
|
|
16467
16760
|
break;
|
|
16468
16761
|
case OpKind.Statement:
|
|
16469
16762
|
break;
|
|
@@ -16480,7 +16773,7 @@ function reifyIrExpression(expr) {
|
|
|
16480
16773
|
case ExpressionKind.NextContext:
|
|
16481
16774
|
return nextContext(expr.steps);
|
|
16482
16775
|
case ExpressionKind.Reference:
|
|
16483
|
-
return reference(expr.
|
|
16776
|
+
return reference(expr.targetSlot + 1 + expr.offset);
|
|
16484
16777
|
case ExpressionKind.LexicalRead:
|
|
16485
16778
|
throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);
|
|
16486
16779
|
case ExpressionKind.RestoreView:
|
|
@@ -16515,13 +16808,13 @@ function reifyIrExpression(expr) {
|
|
|
16515
16808
|
case ExpressionKind.PureFunctionParameterExpr:
|
|
16516
16809
|
throw new Error(`AssertionError: expected PureFunctionParameterExpr to have been extracted`);
|
|
16517
16810
|
case ExpressionKind.PipeBinding:
|
|
16518
|
-
return pipeBind(expr.
|
|
16811
|
+
return pipeBind(expr.targetSlot, expr.varOffset, expr.args);
|
|
16519
16812
|
case ExpressionKind.PipeBindingVariadic:
|
|
16520
|
-
return pipeBindV(expr.
|
|
16813
|
+
return pipeBindV(expr.targetSlot, expr.varOffset, expr.args);
|
|
16521
16814
|
case ExpressionKind.SanitizerExpr:
|
|
16522
16815
|
return importExpr(sanitizerIdentifierMap.get(expr.fn));
|
|
16523
16816
|
case ExpressionKind.SlotLiteralExpr:
|
|
16524
|
-
return literal(expr.
|
|
16817
|
+
return literal(expr.targetSlot);
|
|
16525
16818
|
default:
|
|
16526
16819
|
throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);
|
|
16527
16820
|
}
|
|
@@ -16542,7 +16835,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
16542
16835
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
16543
16836
|
}
|
|
16544
16837
|
|
|
16545
|
-
// bazel-out/
|
|
16838
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
16546
16839
|
function phaseRemoveEmptyBindings(job) {
|
|
16547
16840
|
for (const unit of job.units) {
|
|
16548
16841
|
for (const op of unit.update) {
|
|
@@ -16563,7 +16856,7 @@ function phaseRemoveEmptyBindings(job) {
|
|
|
16563
16856
|
}
|
|
16564
16857
|
}
|
|
16565
16858
|
|
|
16566
|
-
// bazel-out/
|
|
16859
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
16567
16860
|
function phaseResolveContexts(cpl) {
|
|
16568
16861
|
for (const unit of cpl.units) {
|
|
16569
16862
|
processLexicalScope(unit, unit.create);
|
|
@@ -16601,7 +16894,7 @@ function processLexicalScope(view, ops) {
|
|
|
16601
16894
|
}
|
|
16602
16895
|
}
|
|
16603
16896
|
|
|
16604
|
-
// bazel-out/
|
|
16897
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
16605
16898
|
function phaseResolveDollarEvent(job) {
|
|
16606
16899
|
for (const unit of job.units) {
|
|
16607
16900
|
resolveDollarEvent(unit, unit.create);
|
|
@@ -16622,45 +16915,86 @@ function resolveDollarEvent(unit, ops) {
|
|
|
16622
16915
|
}
|
|
16623
16916
|
}
|
|
16624
16917
|
|
|
16625
|
-
// bazel-out/
|
|
16918
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_placeholders.mjs
|
|
16626
16919
|
var ESCAPE = "\uFFFD";
|
|
16627
16920
|
function phaseResolveI18nPlaceholders(job) {
|
|
16628
16921
|
for (const unit of job.units) {
|
|
16629
|
-
|
|
16630
|
-
let
|
|
16631
|
-
let
|
|
16922
|
+
const i18nOps = /* @__PURE__ */ new Map();
|
|
16923
|
+
let startTagSlots = /* @__PURE__ */ new Map();
|
|
16924
|
+
let closeTagSlots = /* @__PURE__ */ new Map();
|
|
16925
|
+
let currentI18nOp = null;
|
|
16632
16926
|
for (const op of unit.create) {
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
16638
|
-
|
|
16639
|
-
|
|
16640
|
-
|
|
16641
|
-
|
|
16642
|
-
|
|
16643
|
-
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
placeholder
|
|
16649
|
-
|
|
16650
|
-
|
|
16927
|
+
switch (op.kind) {
|
|
16928
|
+
case OpKind.I18nStart:
|
|
16929
|
+
case OpKind.I18n:
|
|
16930
|
+
i18nOps.set(op.xref, op);
|
|
16931
|
+
currentI18nOp = op.kind === OpKind.I18nStart ? op : null;
|
|
16932
|
+
startTagSlots = /* @__PURE__ */ new Map();
|
|
16933
|
+
closeTagSlots = /* @__PURE__ */ new Map();
|
|
16934
|
+
break;
|
|
16935
|
+
case OpKind.I18nEnd:
|
|
16936
|
+
if (currentI18nOp === null) {
|
|
16937
|
+
throw Error("Missing corresponding i18n start op for i18n end op");
|
|
16938
|
+
}
|
|
16939
|
+
for (const [placeholder, slots] of startTagSlots) {
|
|
16940
|
+
currentI18nOp.params.set(placeholder, serializeSlots(slots, true));
|
|
16941
|
+
}
|
|
16942
|
+
for (const [placeholder, slots] of closeTagSlots) {
|
|
16943
|
+
currentI18nOp.params.set(placeholder, serializeSlots(slots, false));
|
|
16944
|
+
}
|
|
16945
|
+
currentI18nOp = null;
|
|
16946
|
+
break;
|
|
16947
|
+
case OpKind.Element:
|
|
16948
|
+
case OpKind.ElementStart:
|
|
16949
|
+
if (op.i18nPlaceholder != void 0) {
|
|
16950
|
+
if (currentI18nOp === null) {
|
|
16951
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
16952
|
+
}
|
|
16953
|
+
if (!op.slot) {
|
|
16954
|
+
throw Error("Slots should be allocated before i18n placeholder resolution");
|
|
16955
|
+
}
|
|
16956
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
16957
|
+
addTagSlot(startTagSlots, startName, op.slot);
|
|
16958
|
+
addTagSlot(closeTagSlots, closeName, op.slot);
|
|
16959
|
+
}
|
|
16960
|
+
break;
|
|
16651
16961
|
}
|
|
16652
16962
|
}
|
|
16653
|
-
|
|
16654
|
-
|
|
16963
|
+
const i18nBlockPlaceholderIndices = /* @__PURE__ */ new Map();
|
|
16964
|
+
for (const op of unit.update) {
|
|
16965
|
+
if (op.kind === OpKind.I18nExpression) {
|
|
16966
|
+
const i18nOp = i18nOps.get(op.target);
|
|
16967
|
+
let index = i18nBlockPlaceholderIndices.get(op.target) || 0;
|
|
16968
|
+
if (!i18nOp) {
|
|
16969
|
+
throw Error("Cannot find corresponding i18nStart for i18nExpr");
|
|
16970
|
+
}
|
|
16971
|
+
i18nOp.params.set(op.i18nPlaceholder.name, literal(`${ESCAPE}${index++}${ESCAPE}`));
|
|
16972
|
+
i18nBlockPlaceholderIndices.set(op.target, index);
|
|
16973
|
+
}
|
|
16655
16974
|
}
|
|
16656
|
-
for (
|
|
16657
|
-
const
|
|
16658
|
-
|
|
16975
|
+
for (const op of i18nOps.values()) {
|
|
16976
|
+
for (const placeholder in op.message.placeholders) {
|
|
16977
|
+
if (!op.params.has(placeholder)) {
|
|
16978
|
+
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
16979
|
+
}
|
|
16980
|
+
}
|
|
16659
16981
|
}
|
|
16660
16982
|
}
|
|
16661
16983
|
}
|
|
16984
|
+
function addTagSlot(tagSlots, placeholder, slot) {
|
|
16985
|
+
const slots = tagSlots.get(placeholder) || [];
|
|
16986
|
+
slots.push(slot);
|
|
16987
|
+
tagSlots.set(placeholder, slots);
|
|
16988
|
+
}
|
|
16989
|
+
function serializeSlots(slots, start) {
|
|
16990
|
+
const slotStrings = slots.map((slot) => `${ESCAPE}${start ? "" : "/"}#${slot}${ESCAPE}`);
|
|
16991
|
+
if (slotStrings.length === 1) {
|
|
16992
|
+
return literal(slotStrings[0]);
|
|
16993
|
+
}
|
|
16994
|
+
return literal(`[${slotStrings.join("|")}]`);
|
|
16995
|
+
}
|
|
16662
16996
|
|
|
16663
|
-
// bazel-out/
|
|
16997
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
16664
16998
|
function phaseResolveNames(cpl) {
|
|
16665
16999
|
for (const unit of cpl.units) {
|
|
16666
17000
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -16723,7 +17057,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
16723
17057
|
}
|
|
16724
17058
|
}
|
|
16725
17059
|
|
|
16726
|
-
// bazel-out/
|
|
17060
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
16727
17061
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
16728
17062
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
16729
17063
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -16759,7 +17093,7 @@ function isIframeElement(op) {
|
|
|
16759
17093
|
return (op.kind === OpKind.Element || op.kind === OpKind.ElementStart) && op.tag.toLowerCase() === "iframe";
|
|
16760
17094
|
}
|
|
16761
17095
|
|
|
16762
|
-
// bazel-out/
|
|
17096
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
16763
17097
|
function phaseSaveRestoreView(job) {
|
|
16764
17098
|
for (const view of job.views.values()) {
|
|
16765
17099
|
view.create.prepend([
|
|
@@ -16804,7 +17138,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
16804
17138
|
}
|
|
16805
17139
|
}
|
|
16806
17140
|
|
|
16807
|
-
// bazel-out/
|
|
17141
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
16808
17142
|
function phaseSlotAllocation(job) {
|
|
16809
17143
|
const slotMap = /* @__PURE__ */ new Map();
|
|
16810
17144
|
for (const unit of job.units) {
|
|
@@ -16825,29 +17159,29 @@ function phaseSlotAllocation(job) {
|
|
|
16825
17159
|
const childView = job.views.get(op.xref);
|
|
16826
17160
|
op.decls = childView.decls;
|
|
16827
17161
|
}
|
|
16828
|
-
if (hasUsesSlotIndexTrait(op) && op.
|
|
17162
|
+
if (hasUsesSlotIndexTrait(op) && op.targetSlot === null) {
|
|
16829
17163
|
if (!slotMap.has(op.target)) {
|
|
16830
17164
|
throw new Error(`AssertionError: no slot allocated for ${OpKind[op.kind]} target ${op.target}`);
|
|
16831
17165
|
}
|
|
16832
|
-
op.
|
|
17166
|
+
op.targetSlot = slotMap.get(op.target);
|
|
16833
17167
|
}
|
|
16834
17168
|
visitExpressionsInOp(op, (expr) => {
|
|
16835
17169
|
if (!isIrExpression(expr)) {
|
|
16836
17170
|
return;
|
|
16837
17171
|
}
|
|
16838
|
-
if (!hasUsesSlotIndexTrait(expr) || expr.
|
|
17172
|
+
if (!hasUsesSlotIndexTrait(expr) || expr.targetSlot !== null) {
|
|
16839
17173
|
return;
|
|
16840
17174
|
}
|
|
16841
17175
|
if (!slotMap.has(expr.target)) {
|
|
16842
17176
|
throw new Error(`AssertionError: no slot allocated for ${expr.constructor.name} target ${expr.target}`);
|
|
16843
17177
|
}
|
|
16844
|
-
expr.
|
|
17178
|
+
expr.targetSlot = slotMap.get(expr.target);
|
|
16845
17179
|
});
|
|
16846
17180
|
}
|
|
16847
17181
|
}
|
|
16848
17182
|
}
|
|
16849
17183
|
|
|
16850
|
-
// bazel-out/
|
|
17184
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
16851
17185
|
function phaseStyleBindingSpecialization(cpl) {
|
|
16852
17186
|
for (const unit of cpl.units) {
|
|
16853
17187
|
for (const op of unit.update) {
|
|
@@ -16877,42 +17211,55 @@ function phaseStyleBindingSpecialization(cpl) {
|
|
|
16877
17211
|
}
|
|
16878
17212
|
}
|
|
16879
17213
|
|
|
16880
|
-
// bazel-out/
|
|
17214
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
16881
17215
|
function phaseTemporaryVariables(cpl) {
|
|
16882
17216
|
for (const unit of cpl.units) {
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
17217
|
+
unit.create.prepend(generateTemporaries(unit.create));
|
|
17218
|
+
unit.update.prepend(generateTemporaries(unit.update));
|
|
17219
|
+
}
|
|
17220
|
+
}
|
|
17221
|
+
function generateTemporaries(ops) {
|
|
17222
|
+
let opCount = 0;
|
|
17223
|
+
let generatedStatements = [];
|
|
17224
|
+
for (const op of ops) {
|
|
17225
|
+
const finalReads = /* @__PURE__ */ new Map();
|
|
17226
|
+
visitExpressionsInOp(op, (expr, flag) => {
|
|
17227
|
+
if (flag & VisitorContextFlag.InChildOperation) {
|
|
17228
|
+
return;
|
|
17229
|
+
}
|
|
17230
|
+
if (expr instanceof ReadTemporaryExpr) {
|
|
17231
|
+
finalReads.set(expr.xref, expr);
|
|
17232
|
+
}
|
|
17233
|
+
});
|
|
17234
|
+
let count = 0;
|
|
17235
|
+
const assigned = /* @__PURE__ */ new Set();
|
|
17236
|
+
const released = /* @__PURE__ */ new Set();
|
|
17237
|
+
const defs = /* @__PURE__ */ new Map();
|
|
17238
|
+
visitExpressionsInOp(op, (expr, flag) => {
|
|
17239
|
+
if (flag & VisitorContextFlag.InChildOperation) {
|
|
17240
|
+
return;
|
|
17241
|
+
}
|
|
17242
|
+
if (expr instanceof AssignTemporaryExpr) {
|
|
17243
|
+
if (!assigned.has(expr.xref)) {
|
|
17244
|
+
assigned.add(expr.xref);
|
|
17245
|
+
defs.set(expr.xref, `tmp_${opCount}_${count++}`);
|
|
16890
17246
|
}
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
visitExpressionsInOp(op, (expr) => {
|
|
16897
|
-
if (expr instanceof AssignTemporaryExpr) {
|
|
16898
|
-
if (!assigned.has(expr.xref)) {
|
|
16899
|
-
assigned.add(expr.xref);
|
|
16900
|
-
defs.set(expr.xref, `tmp_${opCount}_${count++}`);
|
|
16901
|
-
}
|
|
16902
|
-
assignName(defs, expr);
|
|
16903
|
-
} else if (expr instanceof ReadTemporaryExpr) {
|
|
16904
|
-
if (finalReads.get(expr.xref) === expr) {
|
|
16905
|
-
released.add(expr.xref);
|
|
16906
|
-
count--;
|
|
16907
|
-
}
|
|
16908
|
-
assignName(defs, expr);
|
|
17247
|
+
assignName(defs, expr);
|
|
17248
|
+
} else if (expr instanceof ReadTemporaryExpr) {
|
|
17249
|
+
if (finalReads.get(expr.xref) === expr) {
|
|
17250
|
+
released.add(expr.xref);
|
|
17251
|
+
count--;
|
|
16909
17252
|
}
|
|
16910
|
-
|
|
16911
|
-
|
|
16912
|
-
|
|
17253
|
+
assignName(defs, expr);
|
|
17254
|
+
}
|
|
17255
|
+
});
|
|
17256
|
+
generatedStatements.push(...Array.from(new Set(defs.values())).map((name) => createStatementOp(new DeclareVarStmt(name))));
|
|
17257
|
+
opCount++;
|
|
17258
|
+
if (op.kind === OpKind.Listener) {
|
|
17259
|
+
op.handlerOps.prepend(generateTemporaries(op.handlerOps));
|
|
16913
17260
|
}
|
|
16914
|
-
unit.update.prepend(generatedStatements);
|
|
16915
17261
|
}
|
|
17262
|
+
return generatedStatements;
|
|
16916
17263
|
}
|
|
16917
17264
|
function assignName(names, expr) {
|
|
16918
17265
|
const name = names.get(expr.xref);
|
|
@@ -16922,7 +17269,7 @@ function assignName(names, expr) {
|
|
|
16922
17269
|
expr.name = name;
|
|
16923
17270
|
}
|
|
16924
17271
|
|
|
16925
|
-
// bazel-out/
|
|
17272
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
16926
17273
|
function phaseVariableOptimization(job) {
|
|
16927
17274
|
for (const unit of job.units) {
|
|
16928
17275
|
optimizeVariablesInOpList(unit.create, job.compatibility);
|
|
@@ -17124,6 +17471,9 @@ function tryInlineVariableInitializer(id, initializer, target, declFences) {
|
|
|
17124
17471
|
function allowConservativeInlining(decl, target) {
|
|
17125
17472
|
switch (decl.variable.kind) {
|
|
17126
17473
|
case SemanticVariableKind.Identifier:
|
|
17474
|
+
if (decl.initializer instanceof ReadVarExpr && decl.initializer.name === "ctx") {
|
|
17475
|
+
return true;
|
|
17476
|
+
}
|
|
17127
17477
|
return false;
|
|
17128
17478
|
case SemanticVariableKind.Context:
|
|
17129
17479
|
return target.kind === OpKind.Variable;
|
|
@@ -17132,79 +17482,9 @@ function allowConservativeInlining(decl, target) {
|
|
|
17132
17482
|
}
|
|
17133
17483
|
}
|
|
17134
17484
|
|
|
17135
|
-
// bazel-out/
|
|
17136
|
-
function phaseGenerateProjectionDef(job) {
|
|
17137
|
-
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
17138
|
-
const selectors = [];
|
|
17139
|
-
let projectionSlotIndex = 0;
|
|
17140
|
-
for (const unit of job.units) {
|
|
17141
|
-
for (const op of unit.create) {
|
|
17142
|
-
if (op.kind === OpKind.Projection) {
|
|
17143
|
-
selectors.push(op.selector);
|
|
17144
|
-
op.projectionSlotIndex = projectionSlotIndex++;
|
|
17145
|
-
}
|
|
17146
|
-
}
|
|
17147
|
-
}
|
|
17148
|
-
if (selectors.length > 0) {
|
|
17149
|
-
let defExpr = null;
|
|
17150
|
-
if (selectors.length > 1 || selectors[0] !== "*") {
|
|
17151
|
-
const def = selectors.map((s) => s === "*" ? s : parseSelectorToR3Selector(s));
|
|
17152
|
-
defExpr = job.pool.getConstLiteral(literalOrArrayLiteral(def), share);
|
|
17153
|
-
}
|
|
17154
|
-
job.contentSelectors = job.pool.getConstLiteral(literalOrArrayLiteral(selectors), share);
|
|
17155
|
-
job.root.create.prepend([createProjectionDefOp(defExpr)]);
|
|
17156
|
-
}
|
|
17157
|
-
}
|
|
17158
|
-
|
|
17159
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
17160
|
-
function phaseI18nConstCollection(job) {
|
|
17161
|
-
const messageConstIndices = {};
|
|
17162
|
-
for (const unit of job.units) {
|
|
17163
|
-
for (const op of unit.create) {
|
|
17164
|
-
if (op.kind === OpKind.ExtractedMessage) {
|
|
17165
|
-
messageConstIndices[op.owner] = job.addConst(op.expression, op.statements);
|
|
17166
|
-
OpList.remove(op);
|
|
17167
|
-
}
|
|
17168
|
-
}
|
|
17169
|
-
}
|
|
17170
|
-
for (const unit of job.units) {
|
|
17171
|
-
for (const op of unit.create) {
|
|
17172
|
-
if (op.kind === OpKind.I18nStart && messageConstIndices[op.xref] !== void 0) {
|
|
17173
|
-
op.messageIndex = messageConstIndices[op.xref];
|
|
17174
|
-
}
|
|
17175
|
-
}
|
|
17176
|
-
}
|
|
17177
|
-
}
|
|
17178
|
-
|
|
17179
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
17180
|
-
function phaseRemoveContentSelectors(job) {
|
|
17181
|
-
for (const unit of job.units) {
|
|
17182
|
-
const elements = getElementsByXrefId(unit);
|
|
17183
|
-
for (const op of unit.update) {
|
|
17184
|
-
switch (op.kind) {
|
|
17185
|
-
case OpKind.Binding:
|
|
17186
|
-
const target = lookupElement4(elements, op.target);
|
|
17187
|
-
if (op.name.toLowerCase() === "select" && target.kind === OpKind.Projection) {
|
|
17188
|
-
OpList.remove(op);
|
|
17189
|
-
}
|
|
17190
|
-
continue;
|
|
17191
|
-
}
|
|
17192
|
-
}
|
|
17193
|
-
}
|
|
17194
|
-
}
|
|
17195
|
-
function lookupElement4(elements, xref) {
|
|
17196
|
-
const el = elements.get(xref);
|
|
17197
|
-
if (el === void 0) {
|
|
17198
|
-
throw new Error("All attributes should have an element-like target.");
|
|
17199
|
-
}
|
|
17200
|
-
return el;
|
|
17201
|
-
}
|
|
17202
|
-
|
|
17203
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
17485
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
17204
17486
|
var phases = [
|
|
17205
17487
|
{ kind: CompilationJobKind.Tmpl, fn: phaseRemoveContentSelectors },
|
|
17206
|
-
{ kind: CompilationJobKind.Tmpl, fn: phaseGenerateI18nBlocks },
|
|
17207
|
-
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nTextExtraction },
|
|
17208
17488
|
{ kind: CompilationJobKind.Host, fn: phaseHostStylePropertyParsing },
|
|
17209
17489
|
{ kind: CompilationJobKind.Tmpl, fn: phaseNamespace },
|
|
17210
17490
|
{ kind: CompilationJobKind.Both, fn: phaseStyleBindingSpecialization },
|
|
@@ -17213,8 +17493,9 @@ var phases = [
|
|
|
17213
17493
|
{ kind: CompilationJobKind.Both, fn: phaseParseExtractedStyles },
|
|
17214
17494
|
{ kind: CompilationJobKind.Tmpl, fn: phaseRemoveEmptyBindings },
|
|
17215
17495
|
{ kind: CompilationJobKind.Tmpl, fn: phaseConditionals },
|
|
17216
|
-
{ kind: CompilationJobKind.Tmpl, fn: phaseNoListenersOnTemplates },
|
|
17217
17496
|
{ kind: CompilationJobKind.Tmpl, fn: phasePipeCreation },
|
|
17497
|
+
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nTextExtraction },
|
|
17498
|
+
{ kind: CompilationJobKind.Tmpl, fn: phaseApplyI18nExpressions },
|
|
17218
17499
|
{ kind: CompilationJobKind.Tmpl, fn: phasePipeVariadic },
|
|
17219
17500
|
{ kind: CompilationJobKind.Both, fn: phasePureLiteralStructures },
|
|
17220
17501
|
{ kind: CompilationJobKind.Tmpl, fn: phaseGenerateProjectionDef },
|
|
@@ -17233,6 +17514,7 @@ var phases = [
|
|
|
17233
17514
|
{ kind: CompilationJobKind.Tmpl, fn: phaseResolveI18nPlaceholders },
|
|
17234
17515
|
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nMessageExtraction },
|
|
17235
17516
|
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nConstCollection },
|
|
17517
|
+
{ kind: CompilationJobKind.Tmpl, fn: phaseConstTraitCollection },
|
|
17236
17518
|
{ kind: CompilationJobKind.Both, fn: phaseConstCollection },
|
|
17237
17519
|
{ kind: CompilationJobKind.Both, fn: phaseVarCounting },
|
|
17238
17520
|
{ kind: CompilationJobKind.Tmpl, fn: phaseGenerateAdvance },
|
|
@@ -17350,7 +17632,7 @@ function emitHostBindingFunction(job) {
|
|
|
17350
17632
|
);
|
|
17351
17633
|
}
|
|
17352
17634
|
|
|
17353
|
-
// bazel-out/
|
|
17635
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
17354
17636
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
17355
17637
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds) {
|
|
17356
17638
|
const cpl = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds);
|
|
@@ -17420,35 +17702,51 @@ function ingestNodes(unit, template2) {
|
|
|
17420
17702
|
ingestText(unit, node);
|
|
17421
17703
|
} else if (node instanceof BoundText) {
|
|
17422
17704
|
ingestBoundText(unit, node);
|
|
17705
|
+
} else if (node instanceof IfBlock) {
|
|
17706
|
+
ingestIfBlock(unit, node);
|
|
17423
17707
|
} else if (node instanceof SwitchBlock) {
|
|
17424
17708
|
ingestSwitchBlock(unit, node);
|
|
17709
|
+
} else if (node instanceof DeferredBlock) {
|
|
17710
|
+
ingestDeferBlock(unit, node);
|
|
17425
17711
|
} else {
|
|
17426
17712
|
throw new Error(`Unsupported template node: ${node.constructor.name}`);
|
|
17427
17713
|
}
|
|
17428
17714
|
}
|
|
17429
17715
|
}
|
|
17430
17716
|
function ingestElement(unit, element2) {
|
|
17717
|
+
if (element2.i18n !== void 0 && !(element2.i18n instanceof Message || element2.i18n instanceof TagPlaceholder)) {
|
|
17718
|
+
throw Error(`Unhandled i18n metadata type for element: ${element2.i18n.constructor.name}`);
|
|
17719
|
+
}
|
|
17431
17720
|
const staticAttributes = {};
|
|
17432
17721
|
for (const attr of element2.attributes) {
|
|
17433
17722
|
staticAttributes[attr.name] = attr.value;
|
|
17434
17723
|
}
|
|
17435
17724
|
const id = unit.job.allocateXrefId();
|
|
17436
17725
|
const [namespaceKey, elementName] = splitNsName(element2.name);
|
|
17437
|
-
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n, element2.startSourceSpan);
|
|
17726
|
+
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
|
|
17438
17727
|
unit.create.push(startOp);
|
|
17439
17728
|
ingestBindings(unit, startOp, element2);
|
|
17440
17729
|
ingestReferences(startOp, element2);
|
|
17441
17730
|
ingestNodes(unit, element2.children);
|
|
17442
|
-
|
|
17731
|
+
const endOp = createElementEndOp(id, element2.endSourceSpan);
|
|
17732
|
+
unit.create.push(endOp);
|
|
17733
|
+
if (element2.i18n instanceof Message) {
|
|
17734
|
+
const i18nBlockId = unit.job.allocateXrefId();
|
|
17735
|
+
OpList.insertAfter(createI18nStartOp(i18nBlockId, element2.i18n), startOp);
|
|
17736
|
+
OpList.insertBefore(createI18nEndOp(i18nBlockId), endOp);
|
|
17737
|
+
}
|
|
17443
17738
|
}
|
|
17444
17739
|
function ingestTemplate(unit, tmpl) {
|
|
17740
|
+
if (tmpl.i18n !== void 0 && !(tmpl.i18n instanceof Message)) {
|
|
17741
|
+
throw Error(`Unhandled i18n metadata type for template: ${tmpl.i18n.constructor.name}`);
|
|
17742
|
+
}
|
|
17445
17743
|
const childView = unit.job.allocateView(unit.xref);
|
|
17446
17744
|
let tagNameWithoutNamespace = tmpl.tagName;
|
|
17447
17745
|
let namespacePrefix = "";
|
|
17448
17746
|
if (tmpl.tagName) {
|
|
17449
17747
|
[namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);
|
|
17450
17748
|
}
|
|
17451
|
-
const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace != null ? tagNameWithoutNamespace : "ng-template", namespaceForKey(namespacePrefix), false,
|
|
17749
|
+
const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace != null ? tagNameWithoutNamespace : "ng-template", namespaceForKey(namespacePrefix), false, void 0, tmpl.startSourceSpan);
|
|
17452
17750
|
unit.create.push(tplOp);
|
|
17453
17751
|
ingestBindings(unit, tplOp, tmpl);
|
|
17454
17752
|
ingestReferences(tplOp, tmpl);
|
|
@@ -17456,11 +17754,16 @@ function ingestTemplate(unit, tmpl) {
|
|
|
17456
17754
|
for (const { name, value } of tmpl.variables) {
|
|
17457
17755
|
childView.contextVariables.set(name, value);
|
|
17458
17756
|
}
|
|
17757
|
+
if (tmpl.i18n instanceof Message) {
|
|
17758
|
+
const id = unit.job.allocateXrefId();
|
|
17759
|
+
OpList.insertAfter(createI18nStartOp(id, tmpl.i18n), childView.create.head);
|
|
17760
|
+
OpList.insertBefore(createI18nEndOp(id), childView.create.tail);
|
|
17761
|
+
}
|
|
17459
17762
|
}
|
|
17460
17763
|
function ingestContent(unit, content) {
|
|
17461
17764
|
const op = createProjectionOp(unit.job.allocateXrefId(), content.selector);
|
|
17462
17765
|
for (const attr of content.attributes) {
|
|
17463
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan,
|
|
17766
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
17464
17767
|
}
|
|
17465
17768
|
unit.create.push(op);
|
|
17466
17769
|
}
|
|
@@ -17475,27 +17778,91 @@ function ingestBoundText(unit, text2) {
|
|
|
17475
17778
|
if (!(value instanceof Interpolation)) {
|
|
17476
17779
|
throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${value.constructor.name}`);
|
|
17477
17780
|
}
|
|
17781
|
+
if (text2.i18n !== void 0 && !(text2.i18n instanceof Container)) {
|
|
17782
|
+
throw Error(`Unhandled i18n metadata type for text interpolation: ${text2.i18n.constructor.name}`);
|
|
17783
|
+
}
|
|
17784
|
+
const i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder) : [];
|
|
17478
17785
|
const textXref = unit.job.allocateXrefId();
|
|
17479
17786
|
unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
|
|
17480
17787
|
const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
|
|
17481
|
-
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan))), text2.sourceSpan));
|
|
17788
|
+
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan))), i18nPlaceholders, text2.sourceSpan));
|
|
17789
|
+
}
|
|
17790
|
+
function ingestIfBlock(unit, ifBlock) {
|
|
17791
|
+
let firstXref = null;
|
|
17792
|
+
let conditions = [];
|
|
17793
|
+
for (const ifCase of ifBlock.branches) {
|
|
17794
|
+
const cView = unit.job.allocateView(unit.xref);
|
|
17795
|
+
if (ifCase.expressionAlias !== null) {
|
|
17796
|
+
cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);
|
|
17797
|
+
}
|
|
17798
|
+
if (firstXref === null) {
|
|
17799
|
+
firstXref = cView.xref;
|
|
17800
|
+
}
|
|
17801
|
+
unit.create.push(createTemplateOp(cView.xref, "Conditional", Namespace.HTML, true, void 0, ifCase.sourceSpan));
|
|
17802
|
+
const caseExpr = ifCase.expression ? convertAst(ifCase.expression, unit.job, null) : null;
|
|
17803
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, cView.xref, ifCase.expressionAlias);
|
|
17804
|
+
conditions.push(conditionalCaseExpr);
|
|
17805
|
+
ingestNodes(cView, ifCase.children);
|
|
17806
|
+
}
|
|
17807
|
+
const conditional2 = createConditionalOp(firstXref, null, conditions, ifBlock.sourceSpan);
|
|
17808
|
+
unit.update.push(conditional2);
|
|
17482
17809
|
}
|
|
17483
17810
|
function ingestSwitchBlock(unit, switchBlock) {
|
|
17484
17811
|
let firstXref = null;
|
|
17485
17812
|
let conditions = [];
|
|
17486
17813
|
for (const switchCase of switchBlock.cases) {
|
|
17487
17814
|
const cView = unit.job.allocateView(unit.xref);
|
|
17488
|
-
if (
|
|
17815
|
+
if (firstXref === null) {
|
|
17489
17816
|
firstXref = cView.xref;
|
|
17490
|
-
|
|
17817
|
+
}
|
|
17818
|
+
unit.create.push(createTemplateOp(cView.xref, "Case", Namespace.HTML, true, void 0, switchCase.sourceSpan));
|
|
17491
17819
|
const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;
|
|
17492
|
-
|
|
17820
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, cView.xref);
|
|
17821
|
+
conditions.push(conditionalCaseExpr);
|
|
17493
17822
|
ingestNodes(cView, switchCase.children);
|
|
17494
17823
|
}
|
|
17495
|
-
const conditional2 = createConditionalOp(firstXref, convertAst(switchBlock.expression, unit.job,
|
|
17496
|
-
conditional2.conditions = conditions;
|
|
17824
|
+
const conditional2 = createConditionalOp(firstXref, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
|
|
17497
17825
|
unit.update.push(conditional2);
|
|
17498
17826
|
}
|
|
17827
|
+
function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
17828
|
+
if (children === void 0) {
|
|
17829
|
+
return null;
|
|
17830
|
+
}
|
|
17831
|
+
const secondaryView = unit.job.allocateView(unit.xref);
|
|
17832
|
+
ingestNodes(secondaryView, children);
|
|
17833
|
+
const templateOp = createTemplateOp(secondaryView.xref, `Defer${suffix}`, Namespace.HTML, true, void 0, sourceSpan);
|
|
17834
|
+
unit.create.push(templateOp);
|
|
17835
|
+
return templateOp;
|
|
17836
|
+
}
|
|
17837
|
+
function ingestDeferBlock(unit, deferBlock) {
|
|
17838
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
17839
|
+
const main = ingestDeferView(unit, "", deferBlock.children, deferBlock.sourceSpan);
|
|
17840
|
+
const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.children, (_b2 = deferBlock.loading) == null ? void 0 : _b2.sourceSpan);
|
|
17841
|
+
const placeholder = ingestDeferView(unit, "Placeholder", (_c2 = deferBlock.placeholder) == null ? void 0 : _c2.children, (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.sourceSpan);
|
|
17842
|
+
const error2 = ingestDeferView(unit, "Error", (_e2 = deferBlock.error) == null ? void 0 : _e2.children, (_f2 = deferBlock.error) == null ? void 0 : _f2.sourceSpan);
|
|
17843
|
+
const deferOp = createDeferOp(unit.job.allocateXrefId(), main.xref, deferBlock.sourceSpan);
|
|
17844
|
+
unit.create.push(deferOp);
|
|
17845
|
+
if (loading && deferBlock.loading) {
|
|
17846
|
+
deferOp.loading = createDeferSecondaryOp(deferOp.xref, loading.xref, DeferSecondaryKind.Loading);
|
|
17847
|
+
if (deferBlock.loading.afterTime !== null || deferBlock.loading.minimumTime !== null) {
|
|
17848
|
+
deferOp.loading.constValue = [deferBlock.loading.minimumTime, deferBlock.loading.afterTime];
|
|
17849
|
+
}
|
|
17850
|
+
unit.create.push(deferOp.loading);
|
|
17851
|
+
}
|
|
17852
|
+
if (placeholder && deferBlock.placeholder) {
|
|
17853
|
+
deferOp.placeholder = createDeferSecondaryOp(deferOp.xref, placeholder.xref, DeferSecondaryKind.Placeholder);
|
|
17854
|
+
if (deferBlock.placeholder.minimumTime !== null) {
|
|
17855
|
+
deferOp.placeholder.constValue = [deferBlock.placeholder.minimumTime];
|
|
17856
|
+
}
|
|
17857
|
+
unit.create.push(deferOp.placeholder);
|
|
17858
|
+
}
|
|
17859
|
+
if (error2 && deferBlock.error) {
|
|
17860
|
+
deferOp.error = createDeferSecondaryOp(deferOp.xref, error2.xref, DeferSecondaryKind.Error);
|
|
17861
|
+
unit.create.push(deferOp.error);
|
|
17862
|
+
}
|
|
17863
|
+
const deferOnOp = createDeferOnOp(unit.job.allocateXrefId(), null);
|
|
17864
|
+
unit.create.push(deferOnOp);
|
|
17865
|
+
}
|
|
17499
17866
|
function convertAst(ast, job, baseSourceSpan) {
|
|
17500
17867
|
if (ast instanceof ASTWithSource) {
|
|
17501
17868
|
return convertAst(ast.ast, job, baseSourceSpan);
|
|
@@ -17559,20 +17926,28 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
17559
17926
|
}
|
|
17560
17927
|
}
|
|
17561
17928
|
function ingestBindings(unit, op, element2) {
|
|
17929
|
+
var _a2;
|
|
17930
|
+
let flags = BindingFlags.None;
|
|
17931
|
+
const isPlainTemplate = element2 instanceof Template && splitNsName((_a2 = element2.tagName) != null ? _a2 : "")[1] === "ng-template";
|
|
17562
17932
|
if (element2 instanceof Template) {
|
|
17933
|
+
flags |= BindingFlags.OnNgTemplateElement;
|
|
17934
|
+
if (isPlainTemplate) {
|
|
17935
|
+
flags |= BindingFlags.BindingTargetsTemplate;
|
|
17936
|
+
}
|
|
17937
|
+
const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
|
|
17563
17938
|
for (const attr of element2.templateAttrs) {
|
|
17564
17939
|
if (attr instanceof TextAttribute) {
|
|
17565
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan,
|
|
17940
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue);
|
|
17566
17941
|
} else {
|
|
17567
|
-
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan,
|
|
17942
|
+
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags);
|
|
17568
17943
|
}
|
|
17569
17944
|
}
|
|
17570
17945
|
}
|
|
17571
17946
|
for (const attr of element2.attributes) {
|
|
17572
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan,
|
|
17947
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, flags | BindingFlags.TextValue);
|
|
17573
17948
|
}
|
|
17574
17949
|
for (const input of element2.inputs) {
|
|
17575
|
-
ingestBinding(unit, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan,
|
|
17950
|
+
ingestBinding(unit, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, flags);
|
|
17576
17951
|
}
|
|
17577
17952
|
for (const output of element2.outputs) {
|
|
17578
17953
|
let listenerOp;
|
|
@@ -17581,6 +17956,10 @@ function ingestBindings(unit, op, element2) {
|
|
|
17581
17956
|
throw Error("Animation listener should have a phase");
|
|
17582
17957
|
}
|
|
17583
17958
|
}
|
|
17959
|
+
if (element2 instanceof Template && !isPlainTemplate) {
|
|
17960
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null));
|
|
17961
|
+
continue;
|
|
17962
|
+
}
|
|
17584
17963
|
listenerOp = createListenerOp(op.xref, output.name, op.tag, output.phase, false, output.sourceSpan);
|
|
17585
17964
|
let handlerExprs;
|
|
17586
17965
|
let handler = output.handler;
|
|
@@ -17612,10 +17991,22 @@ var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
|
17612
17991
|
[3, BindingKind.StyleProperty],
|
|
17613
17992
|
[4, BindingKind.Animation]
|
|
17614
17993
|
]);
|
|
17615
|
-
|
|
17994
|
+
var BindingFlags;
|
|
17995
|
+
(function(BindingFlags2) {
|
|
17996
|
+
BindingFlags2[BindingFlags2["None"] = 0] = "None";
|
|
17997
|
+
BindingFlags2[BindingFlags2["TextValue"] = 1] = "TextValue";
|
|
17998
|
+
BindingFlags2[BindingFlags2["BindingTargetsTemplate"] = 2] = "BindingTargetsTemplate";
|
|
17999
|
+
BindingFlags2[BindingFlags2["IsStructuralTemplateAttribute"] = 4] = "IsStructuralTemplateAttribute";
|
|
18000
|
+
BindingFlags2[BindingFlags2["OnNgTemplateElement"] = 8] = "OnNgTemplateElement";
|
|
18001
|
+
})(BindingFlags || (BindingFlags = {}));
|
|
18002
|
+
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags) {
|
|
17616
18003
|
if (value instanceof ASTWithSource) {
|
|
17617
18004
|
value = value.ast;
|
|
17618
18005
|
}
|
|
18006
|
+
if (flags & BindingFlags.OnNgTemplateElement && !(flags & BindingFlags.BindingTargetsTemplate) && type === 0) {
|
|
18007
|
+
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null));
|
|
18008
|
+
return;
|
|
18009
|
+
}
|
|
17619
18010
|
let expression;
|
|
17620
18011
|
if (value instanceof Interpolation) {
|
|
17621
18012
|
expression = new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, view.job, null)));
|
|
@@ -17625,7 +18016,7 @@ function ingestBinding(view, xref, name, value, type, unit, securityContext, sou
|
|
|
17625
18016
|
expression = value;
|
|
17626
18017
|
}
|
|
17627
18018
|
const kind = BINDING_KINDS.get(type);
|
|
17628
|
-
view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext,
|
|
18019
|
+
view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, !!(flags & BindingFlags.TextValue), !!(flags & BindingFlags.IsStructuralTemplateAttribute), sourceSpan));
|
|
17629
18020
|
}
|
|
17630
18021
|
function ingestReferences(op, element2) {
|
|
17631
18022
|
assertIsArray(op.localRefs);
|
|
@@ -17651,10 +18042,10 @@ function convertSourceSpan(span, baseSourceSpan) {
|
|
|
17651
18042
|
return new ParseSourceSpan(start, end, fullStart);
|
|
17652
18043
|
}
|
|
17653
18044
|
|
|
17654
|
-
// bazel-out/
|
|
18045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
17655
18046
|
var USE_TEMPLATE_PIPELINE = false;
|
|
17656
18047
|
|
|
17657
|
-
// bazel-out/
|
|
18048
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
17658
18049
|
var IMPORTANT_FLAG = "!important";
|
|
17659
18050
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
17660
18051
|
var StylingBuilder = class {
|
|
@@ -17987,7 +18378,7 @@ function isEmptyExpression(ast) {
|
|
|
17987
18378
|
return ast instanceof EmptyExpr;
|
|
17988
18379
|
}
|
|
17989
18380
|
|
|
17990
|
-
// bazel-out/
|
|
18381
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
17991
18382
|
var HtmlParser = class extends Parser2 {
|
|
17992
18383
|
constructor() {
|
|
17993
18384
|
super(getHtmlTagDefinition);
|
|
@@ -17997,7 +18388,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
17997
18388
|
}
|
|
17998
18389
|
};
|
|
17999
18390
|
|
|
18000
|
-
// bazel-out/
|
|
18391
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
18001
18392
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
18002
18393
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
18003
18394
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -18063,7 +18454,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
18063
18454
|
return result;
|
|
18064
18455
|
}
|
|
18065
18456
|
|
|
18066
|
-
// bazel-out/
|
|
18457
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
18067
18458
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
18068
18459
|
var ATTRIBUTE_PREFIX = "attr";
|
|
18069
18460
|
var CLASS_PREFIX = "class";
|
|
@@ -18383,7 +18774,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
18383
18774
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
18384
18775
|
}
|
|
18385
18776
|
|
|
18386
|
-
// bazel-out/
|
|
18777
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
18387
18778
|
function isStyleUrlResolvable(url) {
|
|
18388
18779
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
18389
18780
|
return false;
|
|
@@ -18392,7 +18783,7 @@ function isStyleUrlResolvable(url) {
|
|
|
18392
18783
|
}
|
|
18393
18784
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
18394
18785
|
|
|
18395
|
-
// bazel-out/
|
|
18786
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
18396
18787
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
18397
18788
|
var LINK_ELEMENT = "link";
|
|
18398
18789
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -18462,7 +18853,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
18462
18853
|
return selectAttr;
|
|
18463
18854
|
}
|
|
18464
18855
|
|
|
18465
|
-
// bazel-out/
|
|
18856
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
18466
18857
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+(.*)/;
|
|
18467
18858
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+(.*)/;
|
|
18468
18859
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -18740,7 +19131,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
18740
19131
|
return expression.slice(start, end);
|
|
18741
19132
|
}
|
|
18742
19133
|
|
|
18743
|
-
// bazel-out/
|
|
19134
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
18744
19135
|
var TIME_PATTERN = /^\d+(ms|s)?$/;
|
|
18745
19136
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
18746
19137
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -18988,7 +19379,7 @@ function parseDeferredTime(value) {
|
|
|
18988
19379
|
return parseInt(time) * (units === "s" ? 1e3 : 1);
|
|
18989
19380
|
}
|
|
18990
19381
|
|
|
18991
|
-
// bazel-out/
|
|
19382
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
18992
19383
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
18993
19384
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
18994
19385
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -19115,7 +19506,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
19115
19506
|
return { triggers, prefetchTriggers };
|
|
19116
19507
|
}
|
|
19117
19508
|
|
|
19118
|
-
// bazel-out/
|
|
19509
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
19119
19510
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
19120
19511
|
var KW_BIND_IDX = 1;
|
|
19121
19512
|
var KW_LET_IDX = 2;
|
|
@@ -19304,23 +19695,6 @@ var HtmlAstToIvyAst = class {
|
|
|
19304
19695
|
if (this.processedNodes.has(block)) {
|
|
19305
19696
|
return null;
|
|
19306
19697
|
}
|
|
19307
|
-
if (!this.options.enabledBlockTypes.has(block.name)) {
|
|
19308
|
-
let errorMessage;
|
|
19309
|
-
if (isConnectedDeferLoopBlock(block.name)) {
|
|
19310
|
-
errorMessage = `@${block.name} block can only be used after an @defer block.`;
|
|
19311
|
-
this.processedNodes.add(block);
|
|
19312
|
-
} else if (isConnectedForLoopBlock(block.name)) {
|
|
19313
|
-
errorMessage = `@${block.name} block can only be used after an @for block.`;
|
|
19314
|
-
this.processedNodes.add(block);
|
|
19315
|
-
} else if (isConnectedIfLoopBlock(block.name)) {
|
|
19316
|
-
errorMessage = `@${block.name} block can only be used after an @if or @else if block.`;
|
|
19317
|
-
this.processedNodes.add(block);
|
|
19318
|
-
} else {
|
|
19319
|
-
errorMessage = `Unrecognized block @${block.name}.`;
|
|
19320
|
-
}
|
|
19321
|
-
this.reportError(errorMessage, block.sourceSpan);
|
|
19322
|
-
return null;
|
|
19323
|
-
}
|
|
19324
19698
|
let result = null;
|
|
19325
19699
|
switch (block.name) {
|
|
19326
19700
|
case "defer":
|
|
@@ -19336,10 +19710,20 @@ var HtmlAstToIvyAst = class {
|
|
|
19336
19710
|
result = createIfBlock(block, this.findConnectedBlocks(index, context, isConnectedIfLoopBlock), this, this.bindingParser);
|
|
19337
19711
|
break;
|
|
19338
19712
|
default:
|
|
19339
|
-
|
|
19340
|
-
|
|
19341
|
-
|
|
19342
|
-
|
|
19713
|
+
let errorMessage;
|
|
19714
|
+
if (isConnectedDeferLoopBlock(block.name)) {
|
|
19715
|
+
errorMessage = `@${block.name} block can only be used after an @defer block.`;
|
|
19716
|
+
this.processedNodes.add(block);
|
|
19717
|
+
} else if (isConnectedForLoopBlock(block.name)) {
|
|
19718
|
+
errorMessage = `@${block.name} block can only be used after an @for block.`;
|
|
19719
|
+
this.processedNodes.add(block);
|
|
19720
|
+
} else if (isConnectedIfLoopBlock(block.name)) {
|
|
19721
|
+
errorMessage = `@${block.name} block can only be used after an @if or @else if block.`;
|
|
19722
|
+
this.processedNodes.add(block);
|
|
19723
|
+
} else {
|
|
19724
|
+
errorMessage = `Unrecognized block @${block.name}.`;
|
|
19725
|
+
}
|
|
19726
|
+
result = { node: null, errors: [new ParseError(block.sourceSpan, errorMessage)] };
|
|
19343
19727
|
break;
|
|
19344
19728
|
}
|
|
19345
19729
|
this.errors.push(...result.errors);
|
|
@@ -19550,7 +19934,10 @@ function textContents(node) {
|
|
|
19550
19934
|
}
|
|
19551
19935
|
}
|
|
19552
19936
|
|
|
19553
|
-
// bazel-out/
|
|
19937
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/block_syntax_switch.mjs
|
|
19938
|
+
var BLOCK_SYNTAX_ENABLED_DEFAULT = true;
|
|
19939
|
+
|
|
19940
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
19554
19941
|
var TagType;
|
|
19555
19942
|
(function(TagType2) {
|
|
19556
19943
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -19685,7 +20072,7 @@ function serializePlaceholderValue(value) {
|
|
|
19685
20072
|
}
|
|
19686
20073
|
}
|
|
19687
20074
|
|
|
19688
|
-
// bazel-out/
|
|
20075
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
19689
20076
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
19690
20077
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
19691
20078
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -21172,6 +21559,7 @@ function getTextInterpolationExpression(interpolation) {
|
|
|
21172
21559
|
}
|
|
21173
21560
|
}
|
|
21174
21561
|
function parseTemplate(template2, templateUrl, options = {}) {
|
|
21562
|
+
var _a2;
|
|
21175
21563
|
const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
|
|
21176
21564
|
const bindingParser = makeBindingParser(interpolationConfig);
|
|
21177
21565
|
const htmlParser = new HtmlParser();
|
|
@@ -21179,7 +21567,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
21179
21567
|
leadingTriviaChars: LEADING_TRIVIA_CHARS
|
|
21180
21568
|
}, options), {
|
|
21181
21569
|
tokenizeExpansionForms: true,
|
|
21182
|
-
tokenizeBlocks: options.
|
|
21570
|
+
tokenizeBlocks: (_a2 = options.enableBlockSyntax) != null ? _a2 : BLOCK_SYNTAX_ENABLED_DEFAULT
|
|
21183
21571
|
}));
|
|
21184
21572
|
if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
|
|
21185
21573
|
const parsedTemplate2 = {
|
|
@@ -21221,10 +21609,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
|
|
|
21221
21609
|
rootNodes = visitAll2(new I18nMetaVisitor(interpolationConfig, false), rootNodes);
|
|
21222
21610
|
}
|
|
21223
21611
|
}
|
|
21224
|
-
const { nodes, errors, styleUrls, styles, ngContentSelectors, commentNodes } = htmlAstToRender3Ast(rootNodes, bindingParser, {
|
|
21225
|
-
collectCommentNodes: !!options.collectCommentNodes,
|
|
21226
|
-
enabledBlockTypes: options.enabledBlockTypes || /* @__PURE__ */ new Set()
|
|
21227
|
-
});
|
|
21612
|
+
const { nodes, errors, styleUrls, styles, ngContentSelectors, commentNodes } = htmlAstToRender3Ast(rootNodes, bindingParser, { collectCommentNodes: !!options.collectCommentNodes });
|
|
21228
21613
|
errors.push(...parseResult.errors, ...i18nMetaResult.errors);
|
|
21229
21614
|
const parsedTemplate = {
|
|
21230
21615
|
interpolationConfig,
|
|
@@ -21316,7 +21701,7 @@ function createClosureModeGuard2() {
|
|
|
21316
21701
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
21317
21702
|
}
|
|
21318
21703
|
|
|
21319
|
-
// bazel-out/
|
|
21704
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
21320
21705
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
21321
21706
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
21322
21707
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -21423,7 +21808,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
21423
21808
|
if (constExpressions.length > 0) {
|
|
21424
21809
|
let constsExpr = literalArr(constExpressions);
|
|
21425
21810
|
if (prepareStatements.length > 0) {
|
|
21426
|
-
constsExpr =
|
|
21811
|
+
constsExpr = arrowFn([], [...prepareStatements, new ReturnStatement(constsExpr)]);
|
|
21427
21812
|
}
|
|
21428
21813
|
definitionMap.set("consts", constsExpr);
|
|
21429
21814
|
}
|
|
@@ -21439,7 +21824,10 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
21439
21824
|
definitionMap.set("vars", literal(tpl.root.vars));
|
|
21440
21825
|
if (tpl.consts.length > 0) {
|
|
21441
21826
|
if (tpl.constsInitializers.length > 0) {
|
|
21442
|
-
definitionMap.set("consts",
|
|
21827
|
+
definitionMap.set("consts", arrowFn([], [
|
|
21828
|
+
...tpl.constsInitializers,
|
|
21829
|
+
new ReturnStatement(literalArr(tpl.consts))
|
|
21830
|
+
]));
|
|
21443
21831
|
} else {
|
|
21444
21832
|
definitionMap.set("consts", literalArr(tpl.consts));
|
|
21445
21833
|
}
|
|
@@ -21504,10 +21892,10 @@ function compileDeclarationList(list, mode) {
|
|
|
21504
21892
|
case 0:
|
|
21505
21893
|
return list;
|
|
21506
21894
|
case 1:
|
|
21507
|
-
return
|
|
21895
|
+
return arrowFn([], list);
|
|
21508
21896
|
case 2:
|
|
21509
21897
|
const resolvedList = list.prop("map").callFn([importExpr(Identifiers.resolveForwardRef)]);
|
|
21510
|
-
return
|
|
21898
|
+
return arrowFn([], resolvedList);
|
|
21511
21899
|
case 3:
|
|
21512
21900
|
throw new Error(`Unsupported with an array of pre-resolved dependencies`);
|
|
21513
21901
|
}
|
|
@@ -21915,7 +22303,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
21915
22303
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
21916
22304
|
}
|
|
21917
22305
|
|
|
21918
|
-
// bazel-out/
|
|
22306
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
21919
22307
|
var R3TargetBinder = class {
|
|
21920
22308
|
constructor(directiveMatcher) {
|
|
21921
22309
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -22501,12 +22889,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
22501
22889
|
return templateEntities;
|
|
22502
22890
|
}
|
|
22503
22891
|
|
|
22504
|
-
// bazel-out/
|
|
22892
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
22505
22893
|
var ResourceLoader = class {
|
|
22506
22894
|
};
|
|
22507
22895
|
|
|
22508
|
-
// bazel-out/
|
|
22509
|
-
var enabledBlockTypes;
|
|
22896
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
22510
22897
|
var CompilerFacadeImpl = class {
|
|
22511
22898
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
22512
22899
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -22882,7 +23269,7 @@ function convertPipeDeclarationToMetadata(pipe2) {
|
|
|
22882
23269
|
}
|
|
22883
23270
|
function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
|
|
22884
23271
|
const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
|
|
22885
|
-
const parsed = parseTemplate(template2, sourceMapUrl, { preserveWhitespaces, interpolationConfig
|
|
23272
|
+
const parsed = parseTemplate(template2, sourceMapUrl, { preserveWhitespaces, interpolationConfig });
|
|
22886
23273
|
if (parsed.errors !== null) {
|
|
22887
23274
|
const errors = parsed.errors.map((err) => err.toString()).join(", ");
|
|
22888
23275
|
throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);
|
|
@@ -23058,17 +23445,17 @@ function publishFacade(global) {
|
|
|
23058
23445
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
23059
23446
|
}
|
|
23060
23447
|
|
|
23061
|
-
// bazel-out/
|
|
23062
|
-
var VERSION2 = new Version("17.0.0-next.
|
|
23448
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23449
|
+
var VERSION2 = new Version("17.0.0-next.7");
|
|
23063
23450
|
|
|
23064
|
-
// bazel-out/
|
|
23451
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23065
23452
|
var _VisitorMode;
|
|
23066
23453
|
(function(_VisitorMode2) {
|
|
23067
23454
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
23068
23455
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
23069
23456
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
23070
23457
|
|
|
23071
|
-
// bazel-out/
|
|
23458
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
23072
23459
|
var XmlTagDefinition = class {
|
|
23073
23460
|
constructor() {
|
|
23074
23461
|
this.closedByParent = false;
|
|
@@ -23090,7 +23477,7 @@ var XmlTagDefinition = class {
|
|
|
23090
23477
|
};
|
|
23091
23478
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
23092
23479
|
|
|
23093
|
-
// bazel-out/
|
|
23480
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
23094
23481
|
var FactoryTarget2;
|
|
23095
23482
|
(function(FactoryTarget3) {
|
|
23096
23483
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -23100,10 +23487,10 @@ var FactoryTarget2;
|
|
|
23100
23487
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
23101
23488
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
23102
23489
|
|
|
23103
|
-
// bazel-out/
|
|
23490
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
23104
23491
|
publishFacade(_global);
|
|
23105
23492
|
|
|
23106
|
-
// bazel-out/
|
|
23493
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
23107
23494
|
var import_path2 = require("path");
|
|
23108
23495
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
23109
23496
|
var REPLACEMENTS2 = {
|
|
@@ -23199,7 +23586,7 @@ var TextRangeCollector = class extends RecursiveVisitor {
|
|
|
23199
23586
|
}
|
|
23200
23587
|
};
|
|
23201
23588
|
|
|
23202
|
-
// bazel-out/
|
|
23589
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
23203
23590
|
function block_template_entities_default() {
|
|
23204
23591
|
return (tree) => __async(this, null, function* () {
|
|
23205
23592
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|
|
@@ -23239,6 +23626,13 @@ function runBlockTemplateEntitiesMigration(tree, tsconfigPath, basePath) {
|
|
|
23239
23626
|
}
|
|
23240
23627
|
// Annotate the CommonJS export names for ESM import in node:
|
|
23241
23628
|
0 && (module.exports = {});
|
|
23629
|
+
/*!
|
|
23630
|
+
* @license
|
|
23631
|
+
* Copyright Google LLC All Rights Reserved.
|
|
23632
|
+
*
|
|
23633
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
23634
|
+
* found in the LICENSE file at https://angular.io/license
|
|
23635
|
+
*/
|
|
23242
23636
|
/**
|
|
23243
23637
|
* @license
|
|
23244
23638
|
* Copyright Google LLC All Rights Reserved.
|