@angular/core 17.0.0-next.8 → 17.0.0-rc.0
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/application_ref.mjs +2 -1
- package/esm2022/src/core_private_export.mjs +4 -3
- package/esm2022/src/core_render3_private_export.mjs +2 -2
- package/esm2022/src/debug/debug_node.mjs +5 -9
- package/esm2022/src/defer/cleanup.mjs +70 -0
- package/esm2022/src/defer/discovery.mjs +47 -0
- package/esm2022/src/defer/dom_triggers.mjs +256 -0
- package/esm2022/src/defer/idle_scheduler.mjs +109 -0
- package/esm2022/src/defer/instructions.mjs +641 -0
- package/esm2022/src/defer/interfaces.mjs +79 -0
- package/esm2022/src/defer/timer_scheduler.mjs +192 -0
- package/esm2022/src/defer/utils.mjs +134 -0
- package/esm2022/src/hydration/api.mjs +1 -2
- package/esm2022/src/hydration/utils.mjs +2 -2
- package/esm2022/src/render/api.mjs +1 -1
- package/esm2022/src/render3/after_render_hooks.mjs +31 -1
- package/esm2022/src/render3/index.mjs +3 -2
- package/esm2022/src/render3/instructions/all.mjs +2 -2
- package/esm2022/src/render3/instructions/control_flow.mjs +25 -15
- package/esm2022/src/render3/interfaces/container.mjs +1 -4
- package/esm2022/src/render3/interfaces/definition.mjs +2 -4
- package/esm2022/src/render3/interfaces/i18n.mjs +1 -4
- package/esm2022/src/render3/interfaces/injector.mjs +1 -4
- package/esm2022/src/render3/interfaces/node.mjs +1 -4
- package/esm2022/src/render3/interfaces/projection.mjs +2 -4
- package/esm2022/src/render3/interfaces/query.mjs +2 -4
- package/esm2022/src/render3/interfaces/renderer.mjs +2 -4
- package/esm2022/src/render3/interfaces/renderer_dom.mjs +2 -4
- package/esm2022/src/render3/interfaces/view.mjs +1 -4
- package/esm2022/src/render3/list_reconciliation.mjs +58 -34
- package/esm2022/src/render3/reactive_lview_consumer.mjs +2 -7
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +777 -741
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +43 -6
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +413 -247
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +471 -259
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +659 -486
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/src/render3/instructions/defer.mjs +0 -1225
- package/esm2022/src/render3/instructions/defer_events.mjs +0 -174
- package/esm2022/src/render3/interfaces/defer.mjs +0 -79
|
@@ -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/ng-generate/control-flow-migration/index.mjs
|
|
67
67
|
var control_flow_migration_exports = {};
|
|
68
68
|
__export(control_flow_migration_exports, {
|
|
69
69
|
default: () => control_flow_migration_default
|
|
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(control_flow_migration_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* () {
|
|
@@ -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
|
};
|
|
@@ -2584,7 +2584,7 @@ var Identifiers = _Identifiers;
|
|
|
2584
2584
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2585
2585
|
})();
|
|
2586
2586
|
|
|
2587
|
-
// bazel-out/
|
|
2587
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2588
2588
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2589
2589
|
function dashCaseToCamelCase(input) {
|
|
2590
2590
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2672,7 +2672,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2672
2672
|
return [truthy, falsy];
|
|
2673
2673
|
}
|
|
2674
2674
|
|
|
2675
|
-
// bazel-out/
|
|
2675
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2676
2676
|
var VERSION = 3;
|
|
2677
2677
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2678
2678
|
var SourceMapGenerator = class {
|
|
@@ -2801,7 +2801,7 @@ function toBase64Digit(value) {
|
|
|
2801
2801
|
return B64_DIGITS[value];
|
|
2802
2802
|
}
|
|
2803
2803
|
|
|
2804
|
-
// bazel-out/
|
|
2804
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2805
2805
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2806
2806
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2807
2807
|
var _INDENT_WITH = " ";
|
|
@@ -3286,7 +3286,7 @@ function _createIndent(count) {
|
|
|
3286
3286
|
return res;
|
|
3287
3287
|
}
|
|
3288
3288
|
|
|
3289
|
-
// bazel-out/
|
|
3289
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3290
3290
|
function typeWithParameters(type, numParams) {
|
|
3291
3291
|
if (numParams === 0) {
|
|
3292
3292
|
return expressionType(type);
|
|
@@ -3351,7 +3351,7 @@ function generateForwardRef(expr) {
|
|
|
3351
3351
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3352
3352
|
}
|
|
3353
3353
|
|
|
3354
|
-
// bazel-out/
|
|
3354
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3355
3355
|
var R3FactoryDelegateType;
|
|
3356
3356
|
(function(R3FactoryDelegateType2) {
|
|
3357
3357
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3496,7 +3496,7 @@ function getInjectFn(target) {
|
|
|
3496
3496
|
}
|
|
3497
3497
|
}
|
|
3498
3498
|
|
|
3499
|
-
// bazel-out/
|
|
3499
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3500
3500
|
var Comment = class {
|
|
3501
3501
|
constructor(value, sourceSpan) {
|
|
3502
3502
|
this.value = value;
|
|
@@ -3876,7 +3876,7 @@ function visitAll(visitor, nodes) {
|
|
|
3876
3876
|
return result;
|
|
3877
3877
|
}
|
|
3878
3878
|
|
|
3879
|
-
// bazel-out/
|
|
3879
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3880
3880
|
var Message = class {
|
|
3881
3881
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3882
3882
|
this.nodes = nodes;
|
|
@@ -3995,7 +3995,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3995
3995
|
}
|
|
3996
3996
|
};
|
|
3997
3997
|
|
|
3998
|
-
// bazel-out/
|
|
3998
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
3999
3999
|
var _Visitor = class {
|
|
4000
4000
|
visitTag(tag) {
|
|
4001
4001
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4023,12 +4023,12 @@ ${doctype.dtd}
|
|
|
4023
4023
|
};
|
|
4024
4024
|
var _visitor = new _Visitor();
|
|
4025
4025
|
|
|
4026
|
-
// bazel-out/
|
|
4026
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4027
4027
|
function toPublicName(internalName) {
|
|
4028
4028
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4029
4029
|
}
|
|
4030
4030
|
|
|
4031
|
-
// bazel-out/
|
|
4031
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4032
4032
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4033
4033
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4034
4034
|
var I18N_ATTR = "i18n";
|
|
@@ -4130,7 +4130,7 @@ function declareI18nVariable(variable2) {
|
|
|
4130
4130
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4131
4131
|
}
|
|
4132
4132
|
|
|
4133
|
-
// bazel-out/
|
|
4133
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4134
4134
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4135
4135
|
var TEMPORARY_NAME = "_t";
|
|
4136
4136
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4353,7 +4353,7 @@ function getInstructionStatements(instructions) {
|
|
|
4353
4353
|
return statements;
|
|
4354
4354
|
}
|
|
4355
4355
|
|
|
4356
|
-
// bazel-out/
|
|
4356
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4357
4357
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4358
4358
|
let result = null;
|
|
4359
4359
|
const factoryMeta = {
|
|
@@ -4438,7 +4438,7 @@ function createFactoryFunction(type) {
|
|
|
4438
4438
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4439
4439
|
}
|
|
4440
4440
|
|
|
4441
|
-
// bazel-out/
|
|
4441
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4442
4442
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4443
4443
|
/^\s*$/,
|
|
4444
4444
|
/[<>]/,
|
|
@@ -4460,7 +4460,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4460
4460
|
}
|
|
4461
4461
|
}
|
|
4462
4462
|
|
|
4463
|
-
// bazel-out/
|
|
4463
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/interpolation_config.mjs
|
|
4464
4464
|
var InterpolationConfig = class {
|
|
4465
4465
|
static fromArray(markers) {
|
|
4466
4466
|
if (!markers) {
|
|
@@ -4476,7 +4476,7 @@ var InterpolationConfig = class {
|
|
|
4476
4476
|
};
|
|
4477
4477
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4478
4478
|
|
|
4479
|
-
// bazel-out/
|
|
4479
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4480
4480
|
var $EOF = 0;
|
|
4481
4481
|
var $BSPACE = 8;
|
|
4482
4482
|
var $TAB = 9;
|
|
@@ -4558,7 +4558,7 @@ function isQuote(code) {
|
|
|
4558
4558
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4559
4559
|
}
|
|
4560
4560
|
|
|
4561
|
-
// bazel-out/
|
|
4561
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4562
4562
|
var ParseLocation = class {
|
|
4563
4563
|
constructor(file, offset, line, col) {
|
|
4564
4564
|
this.file = file;
|
|
@@ -4705,7 +4705,7 @@ function sanitizeIdentifier(name) {
|
|
|
4705
4705
|
return name.replace(/\W/g, "_");
|
|
4706
4706
|
}
|
|
4707
4707
|
|
|
4708
|
-
// bazel-out/
|
|
4708
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4709
4709
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4710
4710
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4711
4711
|
constructor() {
|
|
@@ -4798,7 +4798,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4798
4798
|
}
|
|
4799
4799
|
};
|
|
4800
4800
|
|
|
4801
|
-
// bazel-out/
|
|
4801
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4802
4802
|
var policy;
|
|
4803
4803
|
function getPolicy() {
|
|
4804
4804
|
if (policy === void 0) {
|
|
@@ -4836,7 +4836,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4836
4836
|
return fn2.bind(_global);
|
|
4837
4837
|
}
|
|
4838
4838
|
|
|
4839
|
-
// bazel-out/
|
|
4839
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4840
4840
|
var JitEvaluator = class {
|
|
4841
4841
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4842
4842
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4927,7 +4927,7 @@ function isUseStrictStatement(statement) {
|
|
|
4927
4927
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4928
4928
|
}
|
|
4929
4929
|
|
|
4930
|
-
// bazel-out/
|
|
4930
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4931
4931
|
function compileInjector(meta) {
|
|
4932
4932
|
const definitionMap = new DefinitionMap();
|
|
4933
4933
|
if (meta.providers !== null) {
|
|
@@ -4944,7 +4944,7 @@ function createInjectorType(meta) {
|
|
|
4944
4944
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4945
4945
|
}
|
|
4946
4946
|
|
|
4947
|
-
// bazel-out/
|
|
4947
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4948
4948
|
var R3JitReflector = class {
|
|
4949
4949
|
constructor(context) {
|
|
4950
4950
|
this.context = context;
|
|
@@ -4960,7 +4960,7 @@ var R3JitReflector = class {
|
|
|
4960
4960
|
}
|
|
4961
4961
|
};
|
|
4962
4962
|
|
|
4963
|
-
// bazel-out/
|
|
4963
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4964
4964
|
var R3SelectorScopeMode;
|
|
4965
4965
|
(function(R3SelectorScopeMode2) {
|
|
4966
4966
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5101,7 +5101,7 @@ function tupleOfTypes(types) {
|
|
|
5101
5101
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5102
5102
|
}
|
|
5103
5103
|
|
|
5104
|
-
// bazel-out/
|
|
5104
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5105
5105
|
function compilePipeFromMetadata(metadata) {
|
|
5106
5106
|
const definitionMapValues = [];
|
|
5107
5107
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5122,7 +5122,7 @@ function createPipeType(metadata) {
|
|
|
5122
5122
|
]));
|
|
5123
5123
|
}
|
|
5124
5124
|
|
|
5125
|
-
// bazel-out/
|
|
5125
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5126
5126
|
var R3TemplateDependencyKind;
|
|
5127
5127
|
(function(R3TemplateDependencyKind2) {
|
|
5128
5128
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5130,7 +5130,7 @@ var R3TemplateDependencyKind;
|
|
|
5130
5130
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5131
5131
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5132
5132
|
|
|
5133
|
-
// bazel-out/
|
|
5133
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5134
5134
|
var ParserError = class {
|
|
5135
5135
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5136
5136
|
this.input = input;
|
|
@@ -5796,7 +5796,7 @@ var BoundElementProperty = class {
|
|
|
5796
5796
|
}
|
|
5797
5797
|
};
|
|
5798
5798
|
|
|
5799
|
-
// bazel-out/
|
|
5799
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5800
5800
|
var _EventHandlerVars = class {
|
|
5801
5801
|
};
|
|
5802
5802
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6437,7 +6437,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6437
6437
|
}
|
|
6438
6438
|
};
|
|
6439
6439
|
|
|
6440
|
-
// bazel-out/
|
|
6440
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6441
6441
|
var _SECURITY_SCHEMA;
|
|
6442
6442
|
function SECURITY_SCHEMA() {
|
|
6443
6443
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6495,7 +6495,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6495
6495
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6496
6496
|
}
|
|
6497
6497
|
|
|
6498
|
-
// bazel-out/
|
|
6498
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6499
6499
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6500
6500
|
"inherit",
|
|
6501
6501
|
"initial",
|
|
@@ -6742,7 +6742,7 @@ var ShadowCss = class {
|
|
|
6742
6742
|
while ((res = sep.exec(selector)) !== null) {
|
|
6743
6743
|
const separator = res[1];
|
|
6744
6744
|
const part2 = selector.slice(startIndex, res.index).trim();
|
|
6745
|
-
if (part2.match(
|
|
6745
|
+
if (part2.match(/__esc-ph-(\d+)__/) && ((_a2 = selector[res.index + 1]) == null ? void 0 : _a2.match(/[a-fA-F\d]/))) {
|
|
6746
6746
|
continue;
|
|
6747
6747
|
}
|
|
6748
6748
|
shouldScope = shouldScope || part2.indexOf(_polyfillHostNoCombinator) > -1;
|
|
@@ -6764,7 +6764,12 @@ var SafeSelector = class {
|
|
|
6764
6764
|
this.placeholders = [];
|
|
6765
6765
|
this.index = 0;
|
|
6766
6766
|
selector = this._escapeRegexMatches(selector, /(\[[^\]]*\])/g);
|
|
6767
|
-
selector =
|
|
6767
|
+
selector = selector.replace(/(\\.)/g, (_, keep) => {
|
|
6768
|
+
const replaceBy = `__esc-ph-${this.index}__`;
|
|
6769
|
+
this.placeholders.push(keep);
|
|
6770
|
+
this.index++;
|
|
6771
|
+
return replaceBy;
|
|
6772
|
+
});
|
|
6768
6773
|
this._content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
6769
6774
|
const replaceBy = `__ph-${this.index}__`;
|
|
6770
6775
|
this.placeholders.push(exp);
|
|
@@ -6773,7 +6778,7 @@ var SafeSelector = class {
|
|
|
6773
6778
|
});
|
|
6774
6779
|
}
|
|
6775
6780
|
restore(content) {
|
|
6776
|
-
return content.replace(
|
|
6781
|
+
return content.replace(/__(?:ph|esc-ph)-(\d+)__/g, (_ph, index) => this.placeholders[+index]);
|
|
6777
6782
|
}
|
|
6778
6783
|
content() {
|
|
6779
6784
|
return this._content;
|
|
@@ -6814,7 +6819,6 @@ var _commentRe = /\/\*[\s\S]*?\*\//g;
|
|
|
6814
6819
|
var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=/g;
|
|
6815
6820
|
var COMMENT_PLACEHOLDER = "%COMMENT%";
|
|
6816
6821
|
var _commentWithHashPlaceHolderRe = new RegExp(COMMENT_PLACEHOLDER, "g");
|
|
6817
|
-
var _placeholderRe = /__ph-(\d+)__/g;
|
|
6818
6822
|
var BLOCK_PLACEHOLDER = "%BLOCK%";
|
|
6819
6823
|
var _ruleRe = new RegExp(`(\\s*(?:${COMMENT_PLACEHOLDER}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, "g");
|
|
6820
6824
|
var CONTENT_PAIRS = /* @__PURE__ */ new Map([["{", "}"]]);
|
|
@@ -6962,7 +6966,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6962
6966
|
}
|
|
6963
6967
|
}
|
|
6964
6968
|
|
|
6965
|
-
// bazel-out/
|
|
6969
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6966
6970
|
var OpKind;
|
|
6967
6971
|
(function(OpKind2) {
|
|
6968
6972
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7004,6 +7008,8 @@ var OpKind;
|
|
|
7004
7008
|
OpKind2[OpKind2["I18nEnd"] = 36] = "I18nEnd";
|
|
7005
7009
|
OpKind2[OpKind2["I18nExpression"] = 37] = "I18nExpression";
|
|
7006
7010
|
OpKind2[OpKind2["I18nApply"] = 38] = "I18nApply";
|
|
7011
|
+
OpKind2[OpKind2["Icu"] = 39] = "Icu";
|
|
7012
|
+
OpKind2[OpKind2["IcuUpdate"] = 40] = "IcuUpdate";
|
|
7007
7013
|
})(OpKind || (OpKind = {}));
|
|
7008
7014
|
var ExpressionKind;
|
|
7009
7015
|
(function(ExpressionKind2) {
|
|
@@ -7066,8 +7072,13 @@ var BindingKind;
|
|
|
7066
7072
|
BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
|
|
7067
7073
|
BindingKind2[BindingKind2["Animation"] = 6] = "Animation";
|
|
7068
7074
|
})(BindingKind || (BindingKind = {}));
|
|
7075
|
+
var I18nParamResolutionTime;
|
|
7076
|
+
(function(I18nParamResolutionTime2) {
|
|
7077
|
+
I18nParamResolutionTime2[I18nParamResolutionTime2["Creation"] = 0] = "Creation";
|
|
7078
|
+
I18nParamResolutionTime2[I18nParamResolutionTime2["Postproccessing"] = 1] = "Postproccessing";
|
|
7079
|
+
})(I18nParamResolutionTime || (I18nParamResolutionTime = {}));
|
|
7069
7080
|
|
|
7070
|
-
// bazel-out/
|
|
7081
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7071
7082
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7072
7083
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7073
7084
|
var UsesSlotIndex = Symbol("UsesSlotIndex");
|
|
@@ -7116,7 +7127,7 @@ function hasConstTrait(value) {
|
|
|
7116
7127
|
return value[HasConst] === true;
|
|
7117
7128
|
}
|
|
7118
7129
|
|
|
7119
|
-
// bazel-out/
|
|
7130
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7120
7131
|
function createStatementOp(statement) {
|
|
7121
7132
|
return __spreadValues({
|
|
7122
7133
|
kind: OpKind.Statement,
|
|
@@ -7137,7 +7148,7 @@ var NEW_OP = {
|
|
|
7137
7148
|
next: null
|
|
7138
7149
|
};
|
|
7139
7150
|
|
|
7140
|
-
// bazel-out/
|
|
7151
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7141
7152
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7142
7153
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7143
7154
|
kind: OpKind.InterpolateText,
|
|
@@ -7246,13 +7257,14 @@ function createConditionalOp(target, test, conditions, sourceSpan) {
|
|
|
7246
7257
|
contextValue: null
|
|
7247
7258
|
}, NEW_OP), TRAIT_USES_SLOT_INDEX), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
7248
7259
|
}
|
|
7249
|
-
function createI18nExpressionOp(owner, expression, i18nPlaceholder, sourceSpan) {
|
|
7260
|
+
function createI18nExpressionOp(owner, expression, i18nPlaceholder, resolutionTime, sourceSpan) {
|
|
7250
7261
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7251
7262
|
kind: OpKind.I18nExpression,
|
|
7252
7263
|
owner,
|
|
7253
7264
|
target: owner,
|
|
7254
7265
|
expression,
|
|
7255
7266
|
i18nPlaceholder,
|
|
7267
|
+
resolutionTime,
|
|
7256
7268
|
sourceSpan
|
|
7257
7269
|
}, NEW_OP), TRAIT_CONSUMES_VARS), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7258
7270
|
}
|
|
@@ -7263,8 +7275,15 @@ function createI18nApplyOp(target, sourceSpan) {
|
|
|
7263
7275
|
sourceSpan
|
|
7264
7276
|
}, NEW_OP), TRAIT_USES_SLOT_INDEX);
|
|
7265
7277
|
}
|
|
7278
|
+
function createIcuUpdateOp(xref, sourceSpan) {
|
|
7279
|
+
return __spreadValues({
|
|
7280
|
+
kind: OpKind.IcuUpdate,
|
|
7281
|
+
xref,
|
|
7282
|
+
sourceSpan
|
|
7283
|
+
}, NEW_OP);
|
|
7284
|
+
}
|
|
7266
7285
|
|
|
7267
|
-
// bazel-out/
|
|
7286
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7268
7287
|
var _a;
|
|
7269
7288
|
var _b;
|
|
7270
7289
|
var _c;
|
|
@@ -7971,6 +7990,8 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
7971
7990
|
case OpKind.Advance:
|
|
7972
7991
|
case OpKind.Namespace:
|
|
7973
7992
|
case OpKind.I18nApply:
|
|
7993
|
+
case OpKind.Icu:
|
|
7994
|
+
case OpKind.IcuUpdate:
|
|
7974
7995
|
break;
|
|
7975
7996
|
default:
|
|
7976
7997
|
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
|
|
@@ -8052,7 +8073,7 @@ function isStringLiteral(expr) {
|
|
|
8052
8073
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8053
8074
|
}
|
|
8054
8075
|
|
|
8055
|
-
// bazel-out/
|
|
8076
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8056
8077
|
var _OpList = class {
|
|
8057
8078
|
constructor() {
|
|
8058
8079
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8243,7 +8264,7 @@ var OpList = _OpList;
|
|
|
8243
8264
|
_OpList.nextListId = 0;
|
|
8244
8265
|
})();
|
|
8245
8266
|
|
|
8246
|
-
// bazel-out/
|
|
8267
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8247
8268
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8248
8269
|
OpKind.Element,
|
|
8249
8270
|
OpKind.ElementStart,
|
|
@@ -8415,8 +8436,10 @@ function createI18nStartOp(xref, message, root) {
|
|
|
8415
8436
|
root: root != null ? root : xref,
|
|
8416
8437
|
message,
|
|
8417
8438
|
params: /* @__PURE__ */ new Map(),
|
|
8439
|
+
postprocessingParams: /* @__PURE__ */ new Map(),
|
|
8418
8440
|
messageIndex: null,
|
|
8419
|
-
subTemplateIndex: null
|
|
8441
|
+
subTemplateIndex: null,
|
|
8442
|
+
needsPostprocessing: false
|
|
8420
8443
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8421
8444
|
}
|
|
8422
8445
|
function createI18nEndOp(xref) {
|
|
@@ -8425,6 +8448,14 @@ function createI18nEndOp(xref) {
|
|
|
8425
8448
|
xref
|
|
8426
8449
|
}, NEW_OP);
|
|
8427
8450
|
}
|
|
8451
|
+
function createIcuOp(xref, message, sourceSpan) {
|
|
8452
|
+
return __spreadValues({
|
|
8453
|
+
kind: OpKind.Icu,
|
|
8454
|
+
xref,
|
|
8455
|
+
message,
|
|
8456
|
+
sourceSpan
|
|
8457
|
+
}, NEW_OP);
|
|
8458
|
+
}
|
|
8428
8459
|
function literalOrArrayLiteral(value) {
|
|
8429
8460
|
if (Array.isArray(value)) {
|
|
8430
8461
|
return literalArr(value.map(literalOrArrayLiteral));
|
|
@@ -8432,7 +8463,7 @@ function literalOrArrayLiteral(value) {
|
|
|
8432
8463
|
return literal(value, INFERRED_TYPE);
|
|
8433
8464
|
}
|
|
8434
8465
|
|
|
8435
|
-
// bazel-out/
|
|
8466
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8436
8467
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8437
8468
|
return __spreadValues(__spreadValues({
|
|
8438
8469
|
kind: OpKind.HostProperty,
|
|
@@ -8443,10 +8474,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8443
8474
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8444
8475
|
}
|
|
8445
8476
|
|
|
8446
|
-
// bazel-out/
|
|
8477
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8447
8478
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8448
8479
|
|
|
8449
|
-
// bazel-out/
|
|
8480
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8450
8481
|
var CompilationJobKind;
|
|
8451
8482
|
(function(CompilationJobKind2) {
|
|
8452
8483
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8551,7 +8582,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8551
8582
|
}
|
|
8552
8583
|
};
|
|
8553
8584
|
|
|
8554
|
-
// bazel-out/
|
|
8585
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
8555
8586
|
function phaseVarCounting(job) {
|
|
8556
8587
|
for (const unit of job.units) {
|
|
8557
8588
|
let varCount = 0;
|
|
@@ -8629,7 +8660,7 @@ function varsUsedByIrExpression(expr) {
|
|
|
8629
8660
|
}
|
|
8630
8661
|
}
|
|
8631
8662
|
|
|
8632
|
-
// bazel-out/
|
|
8663
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/align_pipe_variadic_var_offset.mjs
|
|
8633
8664
|
function phaseAlignPipeVariadicVarOffset(job) {
|
|
8634
8665
|
for (const unit of job.units) {
|
|
8635
8666
|
for (const op of unit.update) {
|
|
@@ -8651,7 +8682,7 @@ function phaseAlignPipeVariadicVarOffset(job) {
|
|
|
8651
8682
|
}
|
|
8652
8683
|
}
|
|
8653
8684
|
|
|
8654
|
-
// bazel-out/
|
|
8685
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8655
8686
|
function phaseFindAnyCasts(job) {
|
|
8656
8687
|
for (const unit of job.units) {
|
|
8657
8688
|
for (const op of unit.ops()) {
|
|
@@ -8669,7 +8700,7 @@ function removeAnys(e) {
|
|
|
8669
8700
|
return e;
|
|
8670
8701
|
}
|
|
8671
8702
|
|
|
8672
|
-
// bazel-out/
|
|
8703
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8673
8704
|
function phaseApplyI18nExpressions(job) {
|
|
8674
8705
|
for (const unit of job.units) {
|
|
8675
8706
|
for (const op of unit.update) {
|
|
@@ -8690,7 +8721,7 @@ function needsApplication(op) {
|
|
|
8690
8721
|
return false;
|
|
8691
8722
|
}
|
|
8692
8723
|
|
|
8693
|
-
// bazel-out/
|
|
8724
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8694
8725
|
function phaseAssignI18nSlotDependencies(job) {
|
|
8695
8726
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8696
8727
|
let lastSlotConsumer = null;
|
|
@@ -8711,7 +8742,7 @@ function phaseAssignI18nSlotDependencies(job) {
|
|
|
8711
8742
|
}
|
|
8712
8743
|
}
|
|
8713
8744
|
|
|
8714
|
-
// bazel-out/
|
|
8745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8715
8746
|
function getElementsByXrefId(unit) {
|
|
8716
8747
|
const elements = /* @__PURE__ */ new Map();
|
|
8717
8748
|
for (const op of unit.create) {
|
|
@@ -8723,7 +8754,7 @@ function getElementsByXrefId(unit) {
|
|
|
8723
8754
|
return elements;
|
|
8724
8755
|
}
|
|
8725
8756
|
|
|
8726
|
-
// bazel-out/
|
|
8757
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8727
8758
|
function phaseAttributeExtraction(job) {
|
|
8728
8759
|
for (const unit of job.units) {
|
|
8729
8760
|
const elements = getElementsByXrefId(unit);
|
|
@@ -8790,7 +8821,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8790
8821
|
}
|
|
8791
8822
|
}
|
|
8792
8823
|
|
|
8793
|
-
// bazel-out/
|
|
8824
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8794
8825
|
function lookupElement2(elements, xref) {
|
|
8795
8826
|
const el = elements.get(xref);
|
|
8796
8827
|
if (el === void 0) {
|
|
@@ -8840,7 +8871,7 @@ function phaseBindingSpecialization(job) {
|
|
|
8840
8871
|
}
|
|
8841
8872
|
}
|
|
8842
8873
|
|
|
8843
|
-
// bazel-out/
|
|
8874
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8844
8875
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8845
8876
|
Identifiers.attribute,
|
|
8846
8877
|
Identifiers.classProp,
|
|
@@ -8906,7 +8937,7 @@ function chainOperationsInList(opList) {
|
|
|
8906
8937
|
}
|
|
8907
8938
|
}
|
|
8908
8939
|
|
|
8909
|
-
// bazel-out/
|
|
8940
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
8910
8941
|
function phaseConditionals(job) {
|
|
8911
8942
|
for (const unit of job.units) {
|
|
8912
8943
|
for (const op of unit.ops()) {
|
|
@@ -8942,7 +8973,7 @@ function phaseConditionals(job) {
|
|
|
8942
8973
|
}
|
|
8943
8974
|
}
|
|
8944
8975
|
|
|
8945
|
-
// bazel-out/
|
|
8976
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
8946
8977
|
var TagContentType;
|
|
8947
8978
|
(function(TagContentType2) {
|
|
8948
8979
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -8975,7 +9006,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
8975
9006
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
8976
9007
|
}
|
|
8977
9008
|
|
|
8978
|
-
// bazel-out/
|
|
9009
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
8979
9010
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
8980
9011
|
["&&", BinaryOperator.And],
|
|
8981
9012
|
[">", BinaryOperator.Bigger],
|
|
@@ -9025,7 +9056,7 @@ function literalOrArrayLiteral2(value) {
|
|
|
9025
9056
|
return literal(value, INFERRED_TYPE);
|
|
9026
9057
|
}
|
|
9027
9058
|
|
|
9028
|
-
// bazel-out/
|
|
9059
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9029
9060
|
function phaseConstCollection(job) {
|
|
9030
9061
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9031
9062
|
for (const unit of job.units) {
|
|
@@ -9159,7 +9190,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9159
9190
|
return literalArr(attrArray);
|
|
9160
9191
|
}
|
|
9161
9192
|
|
|
9162
|
-
// bazel-out/
|
|
9193
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9163
9194
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9164
9195
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9165
9196
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9186,7 +9217,7 @@ function phaseEmptyElements(job) {
|
|
|
9186
9217
|
}
|
|
9187
9218
|
}
|
|
9188
9219
|
|
|
9189
|
-
// bazel-out/
|
|
9220
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9190
9221
|
function phaseExpandSafeReads(job) {
|
|
9191
9222
|
for (const unit of job.units) {
|
|
9192
9223
|
for (const op of unit.ops()) {
|
|
@@ -9322,7 +9353,7 @@ function ternaryTransform(e) {
|
|
|
9322
9353
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9323
9354
|
}
|
|
9324
9355
|
|
|
9325
|
-
// bazel-out/
|
|
9356
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9326
9357
|
function phaseGenerateAdvance(job) {
|
|
9327
9358
|
for (const unit of job.units) {
|
|
9328
9359
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9354,7 +9385,7 @@ function phaseGenerateAdvance(job) {
|
|
|
9354
9385
|
}
|
|
9355
9386
|
}
|
|
9356
9387
|
|
|
9357
|
-
// bazel-out/
|
|
9388
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9358
9389
|
function phaseGenerateProjectionDef(job) {
|
|
9359
9390
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9360
9391
|
const selectors = [];
|
|
@@ -9378,7 +9409,7 @@ function phaseGenerateProjectionDef(job) {
|
|
|
9378
9409
|
}
|
|
9379
9410
|
}
|
|
9380
9411
|
|
|
9381
|
-
// bazel-out/
|
|
9412
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9382
9413
|
function phaseGenerateVariables(job) {
|
|
9383
9414
|
recursivelyProcessView(job.root, null);
|
|
9384
9415
|
}
|
|
@@ -9418,7 +9449,6 @@ function getScopeForView(view, parent) {
|
|
|
9418
9449
|
}
|
|
9419
9450
|
for (const op of view.create) {
|
|
9420
9451
|
switch (op.kind) {
|
|
9421
|
-
case OpKind.Element:
|
|
9422
9452
|
case OpKind.ElementStart:
|
|
9423
9453
|
case OpKind.Template:
|
|
9424
9454
|
if (!Array.isArray(op.localRefs)) {
|
|
@@ -9460,7 +9490,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9460
9490
|
return newOps;
|
|
9461
9491
|
}
|
|
9462
9492
|
|
|
9463
|
-
// bazel-out/
|
|
9493
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_trait_collection.mjs
|
|
9464
9494
|
function phaseConstTraitCollection(job) {
|
|
9465
9495
|
const collectGlobalConsts = (e) => {
|
|
9466
9496
|
if (e instanceof ExpressionBase && hasConstTrait(e)) {
|
|
@@ -9481,7 +9511,7 @@ function phaseConstTraitCollection(job) {
|
|
|
9481
9511
|
}
|
|
9482
9512
|
}
|
|
9483
9513
|
|
|
9484
|
-
// bazel-out/
|
|
9514
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9485
9515
|
var STYLE_DOT = "style.";
|
|
9486
9516
|
var CLASS_DOT = "class.";
|
|
9487
9517
|
var STYLE_BANG = "style!";
|
|
@@ -9539,7 +9569,7 @@ function parseProperty(name) {
|
|
|
9539
9569
|
return { property: property2, suffix };
|
|
9540
9570
|
}
|
|
9541
9571
|
|
|
9542
|
-
// bazel-out/
|
|
9572
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
9543
9573
|
function phaseI18nConstCollection(job) {
|
|
9544
9574
|
const messageConstIndices = {};
|
|
9545
9575
|
for (const unit of job.units) {
|
|
@@ -9552,14 +9582,14 @@ function phaseI18nConstCollection(job) {
|
|
|
9552
9582
|
}
|
|
9553
9583
|
for (const unit of job.units) {
|
|
9554
9584
|
for (const op of unit.create) {
|
|
9555
|
-
if (op.kind === OpKind.I18nStart
|
|
9585
|
+
if (op.kind === OpKind.I18nStart) {
|
|
9556
9586
|
op.messageIndex = messageConstIndices[op.root];
|
|
9557
9587
|
}
|
|
9558
9588
|
}
|
|
9559
9589
|
}
|
|
9560
9590
|
}
|
|
9561
9591
|
|
|
9562
|
-
// bazel-out/
|
|
9592
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9563
9593
|
function mapLiteral(obj, quoted = false) {
|
|
9564
9594
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9565
9595
|
key,
|
|
@@ -9568,7 +9598,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9568
9598
|
})));
|
|
9569
9599
|
}
|
|
9570
9600
|
|
|
9571
|
-
// bazel-out/
|
|
9601
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9572
9602
|
var IcuSerializerVisitor = class {
|
|
9573
9603
|
visitText(text2) {
|
|
9574
9604
|
return text2.value;
|
|
@@ -9599,7 +9629,7 @@ function serializeIcuNode(icu) {
|
|
|
9599
9629
|
return icu.visit(serializer);
|
|
9600
9630
|
}
|
|
9601
9631
|
|
|
9602
|
-
// bazel-out/
|
|
9632
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9603
9633
|
var TokenType;
|
|
9604
9634
|
(function(TokenType2) {
|
|
9605
9635
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -9960,7 +9990,7 @@ function parseIntAutoRadix(text2) {
|
|
|
9960
9990
|
return result;
|
|
9961
9991
|
}
|
|
9962
9992
|
|
|
9963
|
-
// bazel-out/
|
|
9993
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
9964
9994
|
var SplitInterpolation = class {
|
|
9965
9995
|
constructor(strings, expressions, offsets) {
|
|
9966
9996
|
this.strings = strings;
|
|
@@ -10854,7 +10884,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
10854
10884
|
return offsetMap;
|
|
10855
10885
|
}
|
|
10856
10886
|
|
|
10857
|
-
// bazel-out/
|
|
10887
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
10858
10888
|
var NodeWithI18n = class {
|
|
10859
10889
|
constructor(sourceSpan, i18n2) {
|
|
10860
10890
|
this.sourceSpan = sourceSpan;
|
|
@@ -11005,11 +11035,11 @@ var RecursiveVisitor = class {
|
|
|
11005
11035
|
}
|
|
11006
11036
|
};
|
|
11007
11037
|
|
|
11008
|
-
// bazel-out/
|
|
11038
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11009
11039
|
var ElementSchemaRegistry = class {
|
|
11010
11040
|
};
|
|
11011
11041
|
|
|
11012
|
-
// bazel-out/
|
|
11042
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11013
11043
|
var BOOLEAN = "boolean";
|
|
11014
11044
|
var NUMBER = "number";
|
|
11015
11045
|
var STRING = "string";
|
|
@@ -11362,7 +11392,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11362
11392
|
}
|
|
11363
11393
|
}
|
|
11364
11394
|
|
|
11365
|
-
// bazel-out/
|
|
11395
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11366
11396
|
var HtmlTagDefinition = class {
|
|
11367
11397
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11368
11398
|
this.closedByChildren = {};
|
|
@@ -11395,7 +11425,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11395
11425
|
var _a2, _b2;
|
|
11396
11426
|
if (!TAG_DEFINITIONS) {
|
|
11397
11427
|
DEFAULT_TAG_DEFINITION = new HtmlTagDefinition({ canSelfClose: true });
|
|
11398
|
-
TAG_DEFINITIONS = {
|
|
11428
|
+
TAG_DEFINITIONS = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
11399
11429
|
"base": new HtmlTagDefinition({ isVoid: true }),
|
|
11400
11430
|
"meta": new HtmlTagDefinition({ isVoid: true }),
|
|
11401
11431
|
"area": new HtmlTagDefinition({ isVoid: true }),
|
|
@@ -11470,9 +11500,9 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11470
11500
|
contentType: { default: TagContentType.ESCAPABLE_RAW_TEXT, svg: TagContentType.PARSABLE_DATA }
|
|
11471
11501
|
}),
|
|
11472
11502
|
"textarea": new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true })
|
|
11473
|
-
};
|
|
11503
|
+
});
|
|
11474
11504
|
new DomElementSchemaRegistry().allKnownElementNames().forEach((knownTagName) => {
|
|
11475
|
-
if (!TAG_DEFINITIONS
|
|
11505
|
+
if (!TAG_DEFINITIONS[knownTagName] && getNsPrefix(knownTagName) === null) {
|
|
11476
11506
|
TAG_DEFINITIONS[knownTagName] = new HtmlTagDefinition({ canSelfClose: false });
|
|
11477
11507
|
}
|
|
11478
11508
|
});
|
|
@@ -11480,7 +11510,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11480
11510
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11481
11511
|
}
|
|
11482
11512
|
|
|
11483
|
-
// bazel-out/
|
|
11513
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11484
11514
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11485
11515
|
"A": "LINK",
|
|
11486
11516
|
"B": "BOLD_TEXT",
|
|
@@ -11574,7 +11604,7 @@ var PlaceholderRegistry = class {
|
|
|
11574
11604
|
}
|
|
11575
11605
|
};
|
|
11576
11606
|
|
|
11577
|
-
// bazel-out/
|
|
11607
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11578
11608
|
var _expParser = new Parser(new Lexer());
|
|
11579
11609
|
function createI18nMessageFactory(interpolationConfig) {
|
|
11580
11610
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
@@ -11736,14 +11766,14 @@ function extractPlaceholderName(input) {
|
|
|
11736
11766
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
11737
11767
|
}
|
|
11738
11768
|
|
|
11739
|
-
// bazel-out/
|
|
11769
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
11740
11770
|
var I18nError = class extends ParseError {
|
|
11741
11771
|
constructor(span, msg) {
|
|
11742
11772
|
super(span, msg);
|
|
11743
11773
|
}
|
|
11744
11774
|
};
|
|
11745
11775
|
|
|
11746
|
-
// bazel-out/
|
|
11776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
11747
11777
|
var NAMED_ENTITIES = {
|
|
11748
11778
|
"AElig": "\xC6",
|
|
11749
11779
|
"AMP": "&",
|
|
@@ -13874,7 +13904,7 @@ var NAMED_ENTITIES = {
|
|
|
13874
13904
|
var NGSP_UNICODE = "\uE500";
|
|
13875
13905
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
13876
13906
|
|
|
13877
|
-
// bazel-out/
|
|
13907
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
13878
13908
|
var TokenError = class extends ParseError {
|
|
13879
13909
|
constructor(errorMsg, tokenType, span) {
|
|
13880
13910
|
super(span, errorMsg);
|
|
@@ -14805,7 +14835,7 @@ var CursorError = class {
|
|
|
14805
14835
|
}
|
|
14806
14836
|
};
|
|
14807
14837
|
|
|
14808
|
-
// bazel-out/
|
|
14838
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
14809
14839
|
var TreeError = class extends ParseError {
|
|
14810
14840
|
static create(elementName, span, msg) {
|
|
14811
14841
|
return new TreeError(elementName, span, msg);
|
|
@@ -15189,7 +15219,7 @@ function decodeEntity(match, entity) {
|
|
|
15189
15219
|
return match;
|
|
15190
15220
|
}
|
|
15191
15221
|
|
|
15192
|
-
// bazel-out/
|
|
15222
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15193
15223
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15194
15224
|
"iframe|srcdoc",
|
|
15195
15225
|
"*|innerhtml",
|
|
@@ -15204,7 +15234,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15204
15234
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15205
15235
|
}
|
|
15206
15236
|
|
|
15207
|
-
// bazel-out/
|
|
15237
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15208
15238
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15209
15239
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15210
15240
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15360,7 +15390,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15360
15390
|
return jsDocComment(tags);
|
|
15361
15391
|
}
|
|
15362
15392
|
|
|
15363
|
-
// bazel-out/
|
|
15393
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15364
15394
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15365
15395
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15366
15396
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15408,7 +15438,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15408
15438
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15409
15439
|
}
|
|
15410
15440
|
|
|
15411
|
-
// bazel-out/
|
|
15441
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15412
15442
|
function createLocalizeStatements(variable2, message, params) {
|
|
15413
15443
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15414
15444
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15491,19 +15521,27 @@ function createEmptyMessagePart(location) {
|
|
|
15491
15521
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15492
15522
|
}
|
|
15493
15523
|
|
|
15494
|
-
// bazel-out/
|
|
15524
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_message_extraction.mjs
|
|
15495
15525
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15496
15526
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15497
15527
|
function phaseI18nMessageExtraction(job) {
|
|
15498
15528
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
15499
15529
|
for (const unit of job.units) {
|
|
15500
15530
|
for (const op of unit.create) {
|
|
15501
|
-
if (op.kind === OpKind.I18nStart
|
|
15531
|
+
if (op.kind === OpKind.I18nStart) {
|
|
15502
15532
|
if (op.xref === op.root) {
|
|
15503
15533
|
const params = new Map([...op.params.entries()].sort());
|
|
15504
15534
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
15505
15535
|
const closureVar = i18nGenerateClosureVar(job.pool, op.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
15506
|
-
|
|
15536
|
+
let transformFn = void 0;
|
|
15537
|
+
if (op.needsPostprocessing) {
|
|
15538
|
+
const extraTransformFnParams = [];
|
|
15539
|
+
if (op.postprocessingParams.size > 0) {
|
|
15540
|
+
extraTransformFnParams.push(literalMap([...op.postprocessingParams.entries()].map(([key, value]) => ({ key, value, quoted: true }))));
|
|
15541
|
+
}
|
|
15542
|
+
transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);
|
|
15543
|
+
}
|
|
15544
|
+
const statements = getTranslationDeclStmts(op.message, mainVar, closureVar, params, transformFn);
|
|
15507
15545
|
unit.create.push(createExtractedMessageOp(op.xref, mainVar, statements));
|
|
15508
15546
|
}
|
|
15509
15547
|
}
|
|
@@ -15538,7 +15576,7 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
15538
15576
|
return variable(name);
|
|
15539
15577
|
}
|
|
15540
15578
|
|
|
15541
|
-
// bazel-out/
|
|
15579
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15542
15580
|
function phaseI18nTextExtraction(job) {
|
|
15543
15581
|
var _a2;
|
|
15544
15582
|
for (const unit of job.units) {
|
|
@@ -15571,7 +15609,7 @@ function phaseI18nTextExtraction(job) {
|
|
|
15571
15609
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
15572
15610
|
const expr = op.interpolation.expressions[i];
|
|
15573
15611
|
const placeholder = op.i18nPlaceholders[i];
|
|
15574
|
-
ops.push(createI18nExpressionOp(i18nBlockId, expr, placeholder, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
15612
|
+
ops.push(createI18nExpressionOp(i18nBlockId, expr, placeholder.name, I18nParamResolutionTime.Creation, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
15575
15613
|
}
|
|
15576
15614
|
if (ops.length > 0) {
|
|
15577
15615
|
}
|
|
@@ -15582,13 +15620,52 @@ function phaseI18nTextExtraction(job) {
|
|
|
15582
15620
|
}
|
|
15583
15621
|
}
|
|
15584
15622
|
|
|
15585
|
-
// bazel-out/
|
|
15623
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/icu_extraction.mjs
|
|
15624
|
+
function phaseIcuExtraction(job) {
|
|
15625
|
+
for (const unit of job.units) {
|
|
15626
|
+
const icus = /* @__PURE__ */ new Map();
|
|
15627
|
+
let currentI18nId = null;
|
|
15628
|
+
for (const op of unit.create) {
|
|
15629
|
+
switch (op.kind) {
|
|
15630
|
+
case OpKind.I18nStart:
|
|
15631
|
+
currentI18nId = op.xref;
|
|
15632
|
+
break;
|
|
15633
|
+
case OpKind.I18nEnd:
|
|
15634
|
+
currentI18nId = null;
|
|
15635
|
+
break;
|
|
15636
|
+
case OpKind.Icu:
|
|
15637
|
+
if (currentI18nId === null) {
|
|
15638
|
+
throw Error("Unexpected ICU outside of an i18n block.");
|
|
15639
|
+
}
|
|
15640
|
+
icus.set(op.xref, { message: op.message, i18nBlockId: currentI18nId });
|
|
15641
|
+
OpList.remove(op);
|
|
15642
|
+
break;
|
|
15643
|
+
}
|
|
15644
|
+
}
|
|
15645
|
+
for (const op of unit.update) {
|
|
15646
|
+
switch (op.kind) {
|
|
15647
|
+
case OpKind.IcuUpdate:
|
|
15648
|
+
const { message, i18nBlockId } = icus.get(op.xref);
|
|
15649
|
+
const icuNode = message.nodes.find((n) => n instanceof Icu2);
|
|
15650
|
+
if (icuNode === void 0) {
|
|
15651
|
+
throw Error("Could not find ICU in i18n AST");
|
|
15652
|
+
}
|
|
15653
|
+
if (icuNode.expressionPlaceholder === void 0) {
|
|
15654
|
+
throw Error("ICU is missing an i18n placeholder");
|
|
15655
|
+
}
|
|
15656
|
+
OpList.replace(op, createI18nExpressionOp(i18nBlockId, new LexicalReadExpr(icuNode.expression), icuNode.expressionPlaceholder, I18nParamResolutionTime.Postproccessing, null));
|
|
15657
|
+
break;
|
|
15658
|
+
}
|
|
15659
|
+
}
|
|
15660
|
+
}
|
|
15661
|
+
}
|
|
15662
|
+
|
|
15663
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
15586
15664
|
function phaseLocalRefs(job) {
|
|
15587
15665
|
for (const unit of job.units) {
|
|
15588
15666
|
for (const op of unit.create) {
|
|
15589
15667
|
switch (op.kind) {
|
|
15590
15668
|
case OpKind.ElementStart:
|
|
15591
|
-
case OpKind.Element:
|
|
15592
15669
|
case OpKind.Template:
|
|
15593
15670
|
if (!Array.isArray(op.localRefs)) {
|
|
15594
15671
|
throw new Error(`AssertionError: expected localRefs to be an array still`);
|
|
@@ -15613,12 +15690,12 @@ function serializeLocalRefs(refs) {
|
|
|
15613
15690
|
return literalArr(constRefs);
|
|
15614
15691
|
}
|
|
15615
15692
|
|
|
15616
|
-
// bazel-out/
|
|
15693
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
15617
15694
|
function phaseNamespace(job) {
|
|
15618
15695
|
for (const unit of job.units) {
|
|
15619
15696
|
let activeNamespace = Namespace.HTML;
|
|
15620
15697
|
for (const op of unit.create) {
|
|
15621
|
-
if (op.kind !== OpKind.
|
|
15698
|
+
if (op.kind !== OpKind.ElementStart) {
|
|
15622
15699
|
continue;
|
|
15623
15700
|
}
|
|
15624
15701
|
if (op.namespace !== activeNamespace) {
|
|
@@ -15629,7 +15706,7 @@ function phaseNamespace(job) {
|
|
|
15629
15706
|
}
|
|
15630
15707
|
}
|
|
15631
15708
|
|
|
15632
|
-
// bazel-out/
|
|
15709
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
15633
15710
|
function parse(value) {
|
|
15634
15711
|
const styles = [];
|
|
15635
15712
|
let i = 0;
|
|
@@ -15690,7 +15767,7 @@ function hyphenate2(value) {
|
|
|
15690
15767
|
}).toLowerCase();
|
|
15691
15768
|
}
|
|
15692
15769
|
|
|
15693
|
-
// bazel-out/
|
|
15770
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
15694
15771
|
function phaseNaming(cpl) {
|
|
15695
15772
|
addNamesToView(cpl.root, cpl.componentName, { index: 0 }, cpl.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
15696
15773
|
}
|
|
@@ -15737,7 +15814,8 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15737
15814
|
if (op.slot === null) {
|
|
15738
15815
|
throw new Error(`Expected slot to be assigned`);
|
|
15739
15816
|
}
|
|
15740
|
-
|
|
15817
|
+
const tagToken = op.tag === null ? "" : "_" + prefixWithNamespace(op.tag, op.namespace);
|
|
15818
|
+
addNamesToView(childView, `${baseName}${tagToken}_${op.slot}`, state, compatibility);
|
|
15741
15819
|
break;
|
|
15742
15820
|
case OpKind.StyleProp:
|
|
15743
15821
|
op.name = normalizeStylePropName(op.name);
|
|
@@ -15791,7 +15869,7 @@ function stripImportant(name) {
|
|
|
15791
15869
|
return name;
|
|
15792
15870
|
}
|
|
15793
15871
|
|
|
15794
|
-
// bazel-out/
|
|
15872
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
15795
15873
|
function phaseMergeNextContext(job) {
|
|
15796
15874
|
for (const unit of job.units) {
|
|
15797
15875
|
for (const op of unit.create) {
|
|
@@ -15837,16 +15915,12 @@ function mergeNextContextsInOps(ops) {
|
|
|
15837
15915
|
}
|
|
15838
15916
|
}
|
|
15839
15917
|
|
|
15840
|
-
// bazel-out/
|
|
15918
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
15841
15919
|
var CONTAINER_TAG = "ng-container";
|
|
15842
15920
|
function phaseNgContainer(job) {
|
|
15843
15921
|
for (const unit of job.units) {
|
|
15844
15922
|
const updatedElementXrefs = /* @__PURE__ */ new Set();
|
|
15845
15923
|
for (const op of unit.create) {
|
|
15846
|
-
if (op.kind === OpKind.Element && op.tag === CONTAINER_TAG) {
|
|
15847
|
-
op.kind = OpKind.Container;
|
|
15848
|
-
updatedElementXrefs.add(op.xref);
|
|
15849
|
-
}
|
|
15850
15924
|
if (op.kind === OpKind.ElementStart && op.tag === CONTAINER_TAG) {
|
|
15851
15925
|
op.kind = OpKind.ContainerStart;
|
|
15852
15926
|
updatedElementXrefs.add(op.xref);
|
|
@@ -15858,7 +15932,7 @@ function phaseNgContainer(job) {
|
|
|
15858
15932
|
}
|
|
15859
15933
|
}
|
|
15860
15934
|
|
|
15861
|
-
// bazel-out/
|
|
15935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
15862
15936
|
function lookupElement3(elements, xref) {
|
|
15863
15937
|
const el = elements.get(xref);
|
|
15864
15938
|
if (el === void 0) {
|
|
@@ -15888,7 +15962,7 @@ function phaseNonbindable(job) {
|
|
|
15888
15962
|
}
|
|
15889
15963
|
}
|
|
15890
15964
|
|
|
15891
|
-
// bazel-out/
|
|
15965
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
15892
15966
|
function phaseNullishCoalescing(job) {
|
|
15893
15967
|
for (const unit of job.units) {
|
|
15894
15968
|
for (const op of unit.ops()) {
|
|
@@ -15904,7 +15978,7 @@ function phaseNullishCoalescing(job) {
|
|
|
15904
15978
|
}
|
|
15905
15979
|
}
|
|
15906
15980
|
|
|
15907
|
-
// bazel-out/
|
|
15981
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
15908
15982
|
function kindTest(kind) {
|
|
15909
15983
|
return (op) => op.kind === kind;
|
|
15910
15984
|
}
|
|
@@ -15974,7 +16048,7 @@ function keepLast(ops) {
|
|
|
15974
16048
|
return ops.slice(ops.length - 1);
|
|
15975
16049
|
}
|
|
15976
16050
|
|
|
15977
|
-
// bazel-out/
|
|
16051
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
15978
16052
|
function phaseParseExtractedStyles(cpl) {
|
|
15979
16053
|
for (const unit of cpl.units) {
|
|
15980
16054
|
for (const op of unit.create) {
|
|
@@ -15997,7 +16071,7 @@ function phaseParseExtractedStyles(cpl) {
|
|
|
15997
16071
|
}
|
|
15998
16072
|
}
|
|
15999
16073
|
|
|
16000
|
-
// bazel-out/
|
|
16074
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16001
16075
|
function phaseRemoveContentSelectors(job) {
|
|
16002
16076
|
for (const unit of job.units) {
|
|
16003
16077
|
const elements = getElementsByXrefId(unit);
|
|
@@ -16021,7 +16095,7 @@ function lookupElement4(elements, xref) {
|
|
|
16021
16095
|
return el;
|
|
16022
16096
|
}
|
|
16023
16097
|
|
|
16024
|
-
// bazel-out/
|
|
16098
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16025
16099
|
function phasePipeCreation(job) {
|
|
16026
16100
|
for (const unit of job.units) {
|
|
16027
16101
|
processPipeBindingsInView(unit);
|
|
@@ -16064,7 +16138,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16064
16138
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16065
16139
|
}
|
|
16066
16140
|
|
|
16067
|
-
// bazel-out/
|
|
16141
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16068
16142
|
function phasePipeVariadic(job) {
|
|
16069
16143
|
for (const unit of job.units) {
|
|
16070
16144
|
for (const op of unit.update) {
|
|
@@ -16081,7 +16155,7 @@ function phasePipeVariadic(job) {
|
|
|
16081
16155
|
}
|
|
16082
16156
|
}
|
|
16083
16157
|
|
|
16084
|
-
// bazel-out/
|
|
16158
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16085
16159
|
function phasePropagateI18nBlocks(job) {
|
|
16086
16160
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16087
16161
|
}
|
|
@@ -16118,36 +16192,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16118
16192
|
}
|
|
16119
16193
|
}
|
|
16120
16194
|
|
|
16121
|
-
// bazel-out/
|
|
16122
|
-
function phasePropagateI18nPlaceholders(job) {
|
|
16123
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
16124
|
-
for (const unit of job.units) {
|
|
16125
|
-
for (const op of unit.create) {
|
|
16126
|
-
if (op.kind === OpKind.I18nStart) {
|
|
16127
|
-
i18nOps.set(op.xref, op);
|
|
16128
|
-
}
|
|
16129
|
-
}
|
|
16130
|
-
}
|
|
16131
|
-
for (const op of i18nOps.values()) {
|
|
16132
|
-
if (op.xref !== op.root) {
|
|
16133
|
-
const rootOp = i18nOps.get(op.root);
|
|
16134
|
-
for (const [placeholder, value] of op.params) {
|
|
16135
|
-
rootOp.params.set(placeholder, value);
|
|
16136
|
-
}
|
|
16137
|
-
}
|
|
16138
|
-
}
|
|
16139
|
-
for (const op of i18nOps.values()) {
|
|
16140
|
-
if (op.xref === op.root) {
|
|
16141
|
-
for (const placeholder in op.message.placeholders) {
|
|
16142
|
-
if (!op.params.has(placeholder)) {
|
|
16143
|
-
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
16144
|
-
}
|
|
16145
|
-
}
|
|
16146
|
-
}
|
|
16147
|
-
}
|
|
16148
|
-
}
|
|
16149
|
-
|
|
16150
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16195
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16151
16196
|
function phasePureFunctionExtraction(job) {
|
|
16152
16197
|
for (const view of job.units) {
|
|
16153
16198
|
for (const op of view.ops()) {
|
|
@@ -16189,7 +16234,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16189
16234
|
}
|
|
16190
16235
|
};
|
|
16191
16236
|
|
|
16192
|
-
// bazel-out/
|
|
16237
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16193
16238
|
function phasePureLiteralStructures(job) {
|
|
16194
16239
|
for (const view of job.units) {
|
|
16195
16240
|
for (const op of view.update) {
|
|
@@ -16236,7 +16281,7 @@ function transformLiteralMap(expr) {
|
|
|
16236
16281
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16237
16282
|
}
|
|
16238
16283
|
|
|
16239
|
-
// bazel-out/
|
|
16284
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16240
16285
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16241
16286
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16242
16287
|
}
|
|
@@ -16272,7 +16317,7 @@ function elementContainerEnd() {
|
|
|
16272
16317
|
}
|
|
16273
16318
|
function template(slot, templateFnRef, decls, vars, tag, constIndex, sourceSpan) {
|
|
16274
16319
|
const args = [literal(slot), templateFnRef, literal(decls), literal(vars)];
|
|
16275
|
-
if (tag !== null) {
|
|
16320
|
+
if (tag !== null || constIndex !== null) {
|
|
16276
16321
|
args.push(literal(tag));
|
|
16277
16322
|
if (constIndex !== null) {
|
|
16278
16323
|
args.push(literal(constIndex));
|
|
@@ -16691,7 +16736,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
16691
16736
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
16692
16737
|
}
|
|
16693
16738
|
|
|
16694
|
-
// bazel-out/
|
|
16739
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
16695
16740
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
16696
16741
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
16697
16742
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -16963,7 +17008,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
16963
17008
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
16964
17009
|
}
|
|
16965
17010
|
|
|
16966
|
-
// bazel-out/
|
|
17011
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
16967
17012
|
function phaseRemoveEmptyBindings(job) {
|
|
16968
17013
|
for (const unit of job.units) {
|
|
16969
17014
|
for (const op of unit.update) {
|
|
@@ -16984,7 +17029,7 @@ function phaseRemoveEmptyBindings(job) {
|
|
|
16984
17029
|
}
|
|
16985
17030
|
}
|
|
16986
17031
|
|
|
16987
|
-
// bazel-out/
|
|
17032
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
16988
17033
|
function phaseResolveContexts(cpl) {
|
|
16989
17034
|
for (const unit of cpl.units) {
|
|
16990
17035
|
processLexicalScope(unit, unit.create);
|
|
@@ -17022,7 +17067,7 @@ function processLexicalScope(view, ops) {
|
|
|
17022
17067
|
}
|
|
17023
17068
|
}
|
|
17024
17069
|
|
|
17025
|
-
// bazel-out/
|
|
17070
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17026
17071
|
function phaseResolveDollarEvent(job) {
|
|
17027
17072
|
for (const unit of job.units) {
|
|
17028
17073
|
resolveDollarEvent(unit, unit.create);
|
|
@@ -17043,7 +17088,7 @@ function resolveDollarEvent(unit, ops) {
|
|
|
17043
17088
|
}
|
|
17044
17089
|
}
|
|
17045
17090
|
|
|
17046
|
-
// bazel-out/
|
|
17091
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_placeholders.mjs
|
|
17047
17092
|
var ESCAPE = "\uFFFD";
|
|
17048
17093
|
var ELEMENT_MARKER = "#";
|
|
17049
17094
|
var TEMPLATE_MARKER = "*";
|
|
@@ -17057,24 +17102,51 @@ var I18nParamValueFlags;
|
|
|
17057
17102
|
I18nParamValueFlags2[I18nParamValueFlags2["None"] = 0] = "None";
|
|
17058
17103
|
I18nParamValueFlags2[I18nParamValueFlags2["ElementTag"] = 1] = "ElementTag";
|
|
17059
17104
|
I18nParamValueFlags2[I18nParamValueFlags2["TemplateTag"] = 2] = "TemplateTag";
|
|
17060
|
-
I18nParamValueFlags2[I18nParamValueFlags2["
|
|
17105
|
+
I18nParamValueFlags2[I18nParamValueFlags2["OpenTag"] = 4] = "OpenTag";
|
|
17106
|
+
I18nParamValueFlags2[I18nParamValueFlags2["CloseTag"] = 8] = "CloseTag";
|
|
17061
17107
|
})(I18nParamValueFlags || (I18nParamValueFlags = {}));
|
|
17062
17108
|
var I18nPlaceholderParams = class {
|
|
17063
17109
|
constructor() {
|
|
17064
17110
|
this.values = /* @__PURE__ */ new Map();
|
|
17065
17111
|
}
|
|
17066
|
-
addValue(placeholder, value, subTemplateIndex, flags) {
|
|
17112
|
+
addValue(placeholder, value, subTemplateIndex, resolutionTime, flags) {
|
|
17067
17113
|
var _a2;
|
|
17068
17114
|
const placeholderValues = (_a2 = this.values.get(placeholder)) != null ? _a2 : [];
|
|
17069
|
-
placeholderValues.push({ value, subTemplateIndex, flags });
|
|
17115
|
+
placeholderValues.push({ value, subTemplateIndex, resolutionTime, flags });
|
|
17070
17116
|
this.values.set(placeholder, placeholderValues);
|
|
17071
17117
|
}
|
|
17072
17118
|
saveToOp(op) {
|
|
17073
17119
|
for (const [placeholder, placeholderValues] of this.values) {
|
|
17074
|
-
|
|
17120
|
+
const creationValues = placeholderValues.filter(({ resolutionTime }) => resolutionTime === I18nParamResolutionTime.Creation);
|
|
17121
|
+
if (creationValues.length > 1) {
|
|
17122
|
+
op.needsPostprocessing = true;
|
|
17123
|
+
}
|
|
17124
|
+
const serializedCreationValues = this.serializeValues(creationValues);
|
|
17125
|
+
if (serializedCreationValues !== null) {
|
|
17126
|
+
op.params.set(placeholder, literal(serializedCreationValues));
|
|
17127
|
+
}
|
|
17128
|
+
const serializedPostprocessingValues = this.serializeValues(placeholderValues.filter(({ resolutionTime }) => resolutionTime === I18nParamResolutionTime.Postproccessing));
|
|
17129
|
+
if (serializedPostprocessingValues !== null) {
|
|
17130
|
+
op.needsPostprocessing = true;
|
|
17131
|
+
op.postprocessingParams.set(placeholder, literal(serializedPostprocessingValues));
|
|
17132
|
+
}
|
|
17133
|
+
}
|
|
17134
|
+
}
|
|
17135
|
+
merge(other) {
|
|
17136
|
+
for (const [placeholder, otherValues] of other.values) {
|
|
17137
|
+
const currentValues = this.values.get(placeholder) || [];
|
|
17138
|
+
const flags = otherValues[0].flags;
|
|
17139
|
+
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
17140
|
+
this.values.set(placeholder, [...otherValues, ...currentValues]);
|
|
17141
|
+
} else {
|
|
17142
|
+
this.values.set(placeholder, [...currentValues, ...otherValues]);
|
|
17143
|
+
}
|
|
17075
17144
|
}
|
|
17076
17145
|
}
|
|
17077
17146
|
serializeValues(values) {
|
|
17147
|
+
if (values.length === 0) {
|
|
17148
|
+
return null;
|
|
17149
|
+
}
|
|
17078
17150
|
const serializedValues = values.map((value) => this.serializeValue(value));
|
|
17079
17151
|
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
|
|
17080
17152
|
}
|
|
@@ -17090,36 +17162,77 @@ var I18nPlaceholderParams = class {
|
|
|
17090
17162
|
closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : "";
|
|
17091
17163
|
}
|
|
17092
17164
|
const context = value.subTemplateIndex === null ? "" : `${CONTEXT_MARKER}${value.subTemplateIndex}`;
|
|
17165
|
+
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
17166
|
+
return `${ESCAPE}${tagMarker}${value.value}${context}${ESCAPE}${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
17167
|
+
}
|
|
17093
17168
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
17094
17169
|
}
|
|
17095
17170
|
};
|
|
17096
17171
|
function phaseResolveI18nPlaceholders(job) {
|
|
17172
|
+
const params = /* @__PURE__ */ new Map();
|
|
17173
|
+
const i18nOps = /* @__PURE__ */ new Map();
|
|
17174
|
+
resolvePlaceholders(job, params, i18nOps);
|
|
17175
|
+
propagatePlaceholders(params, i18nOps);
|
|
17176
|
+
for (const [xref, i18nOpParams] of params) {
|
|
17177
|
+
i18nOpParams.saveToOp(i18nOps.get(xref));
|
|
17178
|
+
}
|
|
17179
|
+
for (const op of i18nOps.values()) {
|
|
17180
|
+
if (op.xref === op.root) {
|
|
17181
|
+
for (const placeholder in op.message.placeholders) {
|
|
17182
|
+
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
17183
|
+
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
17184
|
+
}
|
|
17185
|
+
}
|
|
17186
|
+
}
|
|
17187
|
+
}
|
|
17188
|
+
}
|
|
17189
|
+
function resolvePlaceholders(job, params, i18nOps) {
|
|
17097
17190
|
for (const unit of job.units) {
|
|
17098
|
-
const
|
|
17099
|
-
const params = /* @__PURE__ */ new Map();
|
|
17191
|
+
const elements = /* @__PURE__ */ new Map();
|
|
17100
17192
|
let currentI18nOp = null;
|
|
17101
17193
|
for (const op of unit.create) {
|
|
17102
17194
|
switch (op.kind) {
|
|
17103
17195
|
case OpKind.I18nStart:
|
|
17104
|
-
case OpKind.I18n:
|
|
17105
17196
|
i18nOps.set(op.xref, op);
|
|
17106
17197
|
currentI18nOp = op.kind === OpKind.I18nStart ? op : null;
|
|
17107
17198
|
break;
|
|
17108
17199
|
case OpKind.I18nEnd:
|
|
17109
17200
|
currentI18nOp = null;
|
|
17110
17201
|
break;
|
|
17111
|
-
case OpKind.Element:
|
|
17112
17202
|
case OpKind.ElementStart:
|
|
17113
|
-
case OpKind.Template:
|
|
17114
17203
|
if (op.i18nPlaceholder !== void 0) {
|
|
17115
17204
|
if (currentI18nOp === null) {
|
|
17116
17205
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17117
17206
|
}
|
|
17207
|
+
elements.set(op.xref, op);
|
|
17118
17208
|
const { startName, closeName } = op.i18nPlaceholder;
|
|
17119
|
-
|
|
17120
|
-
|
|
17121
|
-
|
|
17122
|
-
|
|
17209
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17210
|
+
if (closeName === "") {
|
|
17211
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
17212
|
+
}
|
|
17213
|
+
addParam(params, currentI18nOp, startName, op.slot, currentI18nOp.subTemplateIndex, I18nParamResolutionTime.Creation, flags);
|
|
17214
|
+
}
|
|
17215
|
+
break;
|
|
17216
|
+
case OpKind.ElementEnd:
|
|
17217
|
+
const startOp = elements.get(op.xref);
|
|
17218
|
+
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17219
|
+
if (currentI18nOp === null) {
|
|
17220
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17221
|
+
}
|
|
17222
|
+
const { closeName } = startOp.i18nPlaceholder;
|
|
17223
|
+
if (closeName !== "") {
|
|
17224
|
+
addParam(params, currentI18nOp, closeName, startOp.slot, currentI18nOp.subTemplateIndex, I18nParamResolutionTime.Creation, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17225
|
+
}
|
|
17226
|
+
}
|
|
17227
|
+
break;
|
|
17228
|
+
case OpKind.Template:
|
|
17229
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17230
|
+
if (currentI18nOp === null) {
|
|
17231
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17232
|
+
}
|
|
17233
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentI18nOp, op);
|
|
17234
|
+
addParam(params, currentI18nOp, op.i18nPlaceholder.startName, op.slot, subTemplateIndex, I18nParamResolutionTime.Creation, I18nParamValueFlags.TemplateTag);
|
|
17235
|
+
addParam(params, currentI18nOp, op.i18nPlaceholder.closeName, op.slot, subTemplateIndex, I18nParamResolutionTime.Creation, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17123
17236
|
}
|
|
17124
17237
|
break;
|
|
17125
17238
|
}
|
|
@@ -17132,33 +17245,36 @@ function phaseResolveI18nPlaceholders(job) {
|
|
|
17132
17245
|
if (!i18nOp) {
|
|
17133
17246
|
throw Error("Cannot find corresponding i18nStart for i18nExpr");
|
|
17134
17247
|
}
|
|
17135
|
-
addParam(params, i18nOp, op.i18nPlaceholder
|
|
17248
|
+
addParam(params, i18nOp, op.i18nPlaceholder, index++, i18nOp.subTemplateIndex, op.resolutionTime);
|
|
17136
17249
|
i18nBlockPlaceholderIndices.set(op.owner, index);
|
|
17137
17250
|
}
|
|
17138
17251
|
}
|
|
17139
|
-
for (const [xref, i18nOpParams] of params) {
|
|
17140
|
-
i18nOpParams.saveToOp(i18nOps.get(xref));
|
|
17141
|
-
}
|
|
17142
17252
|
}
|
|
17143
17253
|
}
|
|
17144
|
-
function addParam(params, i18nOp, placeholder, value, subTemplateIndex, flags = I18nParamValueFlags.None) {
|
|
17145
|
-
|
|
17146
|
-
|
|
17147
|
-
i18nOpParams.addValue(placeholder, value, subTemplateIndex, flags);
|
|
17254
|
+
function addParam(params, i18nOp, placeholder, value, subTemplateIndex, resolutionTime, flags = I18nParamValueFlags.None) {
|
|
17255
|
+
const i18nOpParams = params.get(i18nOp.xref) || new I18nPlaceholderParams();
|
|
17256
|
+
i18nOpParams.addValue(placeholder, value, subTemplateIndex, resolutionTime, flags);
|
|
17148
17257
|
params.set(i18nOp.xref, i18nOpParams);
|
|
17149
17258
|
}
|
|
17150
|
-
function
|
|
17151
|
-
|
|
17152
|
-
|
|
17153
|
-
|
|
17154
|
-
return childOp.subTemplateIndex;
|
|
17155
|
-
}
|
|
17259
|
+
function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
|
|
17260
|
+
for (const childOp of job.views.get(op.xref).create) {
|
|
17261
|
+
if (childOp.kind === OpKind.I18nStart) {
|
|
17262
|
+
return childOp.subTemplateIndex;
|
|
17156
17263
|
}
|
|
17157
17264
|
}
|
|
17158
17265
|
return i18nOp.subTemplateIndex;
|
|
17159
17266
|
}
|
|
17267
|
+
function propagatePlaceholders(params, i18nOps) {
|
|
17268
|
+
for (const [xref, opParams] of params) {
|
|
17269
|
+
const op = i18nOps.get(xref);
|
|
17270
|
+
if (op.xref !== op.root) {
|
|
17271
|
+
const rootParams = params.get(op.root) || new I18nPlaceholderParams();
|
|
17272
|
+
rootParams.merge(opParams);
|
|
17273
|
+
}
|
|
17274
|
+
}
|
|
17275
|
+
}
|
|
17160
17276
|
|
|
17161
|
-
// bazel-out/
|
|
17277
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17162
17278
|
function phaseResolveNames(cpl) {
|
|
17163
17279
|
for (const unit of cpl.units) {
|
|
17164
17280
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17221,7 +17337,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17221
17337
|
}
|
|
17222
17338
|
}
|
|
17223
17339
|
|
|
17224
|
-
// bazel-out/
|
|
17340
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17225
17341
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17226
17342
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17227
17343
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17254,10 +17370,11 @@ function phaseResolveSanitizers(job) {
|
|
|
17254
17370
|
}
|
|
17255
17371
|
}
|
|
17256
17372
|
function isIframeElement(op) {
|
|
17257
|
-
|
|
17373
|
+
var _a2;
|
|
17374
|
+
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17258
17375
|
}
|
|
17259
17376
|
|
|
17260
|
-
// bazel-out/
|
|
17377
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17261
17378
|
function phaseSaveRestoreView(job) {
|
|
17262
17379
|
for (const view of job.views.values()) {
|
|
17263
17380
|
view.create.prepend([
|
|
@@ -17302,7 +17419,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
17302
17419
|
}
|
|
17303
17420
|
}
|
|
17304
17421
|
|
|
17305
|
-
// bazel-out/
|
|
17422
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
17306
17423
|
function phaseSlotAllocation(job) {
|
|
17307
17424
|
const slotMap = /* @__PURE__ */ new Map();
|
|
17308
17425
|
for (const unit of job.units) {
|
|
@@ -17345,7 +17462,7 @@ function phaseSlotAllocation(job) {
|
|
|
17345
17462
|
}
|
|
17346
17463
|
}
|
|
17347
17464
|
|
|
17348
|
-
// bazel-out/
|
|
17465
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
17349
17466
|
function phaseStyleBindingSpecialization(cpl) {
|
|
17350
17467
|
for (const unit of cpl.units) {
|
|
17351
17468
|
for (const op of unit.update) {
|
|
@@ -17375,7 +17492,7 @@ function phaseStyleBindingSpecialization(cpl) {
|
|
|
17375
17492
|
}
|
|
17376
17493
|
}
|
|
17377
17494
|
|
|
17378
|
-
// bazel-out/
|
|
17495
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
17379
17496
|
function phaseTemporaryVariables(cpl) {
|
|
17380
17497
|
for (const unit of cpl.units) {
|
|
17381
17498
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -17433,7 +17550,7 @@ function assignName(names, expr) {
|
|
|
17433
17550
|
expr.name = name;
|
|
17434
17551
|
}
|
|
17435
17552
|
|
|
17436
|
-
// bazel-out/
|
|
17553
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
17437
17554
|
function phaseVariableOptimization(job) {
|
|
17438
17555
|
for (const unit of job.units) {
|
|
17439
17556
|
optimizeVariablesInOpList(unit.create, job.compatibility);
|
|
@@ -17646,7 +17763,31 @@ function allowConservativeInlining(decl, target) {
|
|
|
17646
17763
|
}
|
|
17647
17764
|
}
|
|
17648
17765
|
|
|
17649
|
-
// bazel-out/
|
|
17766
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
17767
|
+
function phaseWrapIcus(job) {
|
|
17768
|
+
for (const unit of job.units) {
|
|
17769
|
+
let currentI18nOp = null;
|
|
17770
|
+
for (const op of unit.create) {
|
|
17771
|
+
switch (op.kind) {
|
|
17772
|
+
case OpKind.I18nStart:
|
|
17773
|
+
currentI18nOp = op;
|
|
17774
|
+
break;
|
|
17775
|
+
case OpKind.I18nEnd:
|
|
17776
|
+
currentI18nOp = null;
|
|
17777
|
+
break;
|
|
17778
|
+
case OpKind.Icu:
|
|
17779
|
+
if (currentI18nOp === null) {
|
|
17780
|
+
const id = job.allocateXrefId();
|
|
17781
|
+
OpList.insertBefore(createI18nStartOp(id, op.message), op);
|
|
17782
|
+
OpList.insertAfter(createI18nEndOp(id), op);
|
|
17783
|
+
}
|
|
17784
|
+
break;
|
|
17785
|
+
}
|
|
17786
|
+
}
|
|
17787
|
+
}
|
|
17788
|
+
}
|
|
17789
|
+
|
|
17790
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
17650
17791
|
var phases = [
|
|
17651
17792
|
{ kind: CompilationJobKind.Tmpl, fn: phaseRemoveContentSelectors },
|
|
17652
17793
|
{ kind: CompilationJobKind.Host, fn: phaseHostStylePropertyParsing },
|
|
@@ -17654,12 +17795,14 @@ var phases = [
|
|
|
17654
17795
|
{ kind: CompilationJobKind.Both, fn: phaseStyleBindingSpecialization },
|
|
17655
17796
|
{ kind: CompilationJobKind.Both, fn: phaseBindingSpecialization },
|
|
17656
17797
|
{ kind: CompilationJobKind.Tmpl, fn: phasePropagateI18nBlocks },
|
|
17798
|
+
{ kind: CompilationJobKind.Tmpl, fn: phaseWrapIcus },
|
|
17657
17799
|
{ kind: CompilationJobKind.Both, fn: phaseAttributeExtraction },
|
|
17658
17800
|
{ kind: CompilationJobKind.Both, fn: phaseParseExtractedStyles },
|
|
17659
17801
|
{ kind: CompilationJobKind.Tmpl, fn: phaseRemoveEmptyBindings },
|
|
17660
17802
|
{ kind: CompilationJobKind.Tmpl, fn: phaseConditionals },
|
|
17661
17803
|
{ kind: CompilationJobKind.Tmpl, fn: phasePipeCreation },
|
|
17662
17804
|
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nTextExtraction },
|
|
17805
|
+
{ kind: CompilationJobKind.Tmpl, fn: phaseIcuExtraction },
|
|
17663
17806
|
{ kind: CompilationJobKind.Tmpl, fn: phaseApplyI18nExpressions },
|
|
17664
17807
|
{ kind: CompilationJobKind.Tmpl, fn: phasePipeVariadic },
|
|
17665
17808
|
{ kind: CompilationJobKind.Both, fn: phasePureLiteralStructures },
|
|
@@ -17677,7 +17820,6 @@ var phases = [
|
|
|
17677
17820
|
{ kind: CompilationJobKind.Both, fn: phaseTemporaryVariables },
|
|
17678
17821
|
{ kind: CompilationJobKind.Tmpl, fn: phaseSlotAllocation },
|
|
17679
17822
|
{ kind: CompilationJobKind.Tmpl, fn: phaseResolveI18nPlaceholders },
|
|
17680
|
-
{ kind: CompilationJobKind.Tmpl, fn: phasePropagateI18nPlaceholders },
|
|
17681
17823
|
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nMessageExtraction },
|
|
17682
17824
|
{ kind: CompilationJobKind.Tmpl, fn: phaseI18nConstCollection },
|
|
17683
17825
|
{ kind: CompilationJobKind.Tmpl, fn: phaseConstTraitCollection },
|
|
@@ -17799,7 +17941,7 @@ function emitHostBindingFunction(job) {
|
|
|
17799
17941
|
);
|
|
17800
17942
|
}
|
|
17801
17943
|
|
|
17802
|
-
// bazel-out/
|
|
17944
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
17803
17945
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
17804
17946
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds) {
|
|
17805
17947
|
const cpl = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds);
|
|
@@ -17875,6 +18017,8 @@ function ingestNodes(unit, template2) {
|
|
|
17875
18017
|
ingestSwitchBlock(unit, node);
|
|
17876
18018
|
} else if (node instanceof DeferredBlock) {
|
|
17877
18019
|
ingestDeferBlock(unit, node);
|
|
18020
|
+
} else if (node instanceof Icu) {
|
|
18021
|
+
ingestIcu(unit, node);
|
|
17878
18022
|
} else {
|
|
17879
18023
|
throw new Error(`Unsupported template node: ${node.constructor.name}`);
|
|
17880
18024
|
}
|
|
@@ -17914,7 +18058,7 @@ function ingestTemplate(unit, tmpl) {
|
|
|
17914
18058
|
[namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);
|
|
17915
18059
|
}
|
|
17916
18060
|
const i18nPlaceholder = tmpl.i18n instanceof TagPlaceholder ? tmpl.i18n : void 0;
|
|
17917
|
-
const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace
|
|
18061
|
+
const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace, namespaceForKey(namespacePrefix), false, i18nPlaceholder, tmpl.startSourceSpan);
|
|
17918
18062
|
unit.create.push(tplOp);
|
|
17919
18063
|
ingestBindings(unit, tplOp, tmpl);
|
|
17920
18064
|
ingestReferences(tplOp, tmpl);
|
|
@@ -17922,7 +18066,7 @@ function ingestTemplate(unit, tmpl) {
|
|
|
17922
18066
|
for (const { name, value } of tmpl.variables) {
|
|
17923
18067
|
childView.contextVariables.set(name, value);
|
|
17924
18068
|
}
|
|
17925
|
-
if (tmpl.i18n instanceof Message) {
|
|
18069
|
+
if (isPlainTemplate(tmpl) && tmpl.i18n instanceof Message) {
|
|
17926
18070
|
const id = unit.job.allocateXrefId();
|
|
17927
18071
|
OpList.insertAfter(createI18nStartOp(id, tmpl.i18n), childView.create.head);
|
|
17928
18072
|
OpList.insertBefore(createI18nEndOp(id), childView.create.tail);
|
|
@@ -18032,6 +18176,16 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
18032
18176
|
const deferOnOp = createDeferOnOp(unit.job.allocateXrefId(), null);
|
|
18033
18177
|
unit.create.push(deferOnOp);
|
|
18034
18178
|
}
|
|
18179
|
+
function ingestIcu(unit, icu) {
|
|
18180
|
+
var _a2;
|
|
18181
|
+
if (icu.i18n instanceof Message) {
|
|
18182
|
+
const xref = unit.job.allocateXrefId();
|
|
18183
|
+
unit.create.push(createIcuOp(xref, icu.i18n, null));
|
|
18184
|
+
unit.update.push(createIcuUpdateOp(xref, null));
|
|
18185
|
+
} else {
|
|
18186
|
+
throw Error(`Unhandled i18n metadata type for ICU: ${(_a2 = icu.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
18187
|
+
}
|
|
18188
|
+
}
|
|
18035
18189
|
function convertAst(ast, job, baseSourceSpan) {
|
|
18036
18190
|
if (ast instanceof ASTWithSource) {
|
|
18037
18191
|
return convertAst(ast.ast, job, baseSourceSpan);
|
|
@@ -18094,13 +18248,15 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
18094
18248
|
throw new Error(`Unhandled expression type: ${ast.constructor.name}`);
|
|
18095
18249
|
}
|
|
18096
18250
|
}
|
|
18097
|
-
function
|
|
18251
|
+
function isPlainTemplate(tmpl) {
|
|
18098
18252
|
var _a2;
|
|
18253
|
+
return splitNsName((_a2 = tmpl.tagName) != null ? _a2 : "")[1] === "ng-template";
|
|
18254
|
+
}
|
|
18255
|
+
function ingestBindings(unit, op, element2) {
|
|
18099
18256
|
let flags = BindingFlags.None;
|
|
18100
|
-
const isPlainTemplate = element2 instanceof Template && splitNsName((_a2 = element2.tagName) != null ? _a2 : "")[1] === "ng-template";
|
|
18101
18257
|
if (element2 instanceof Template) {
|
|
18102
18258
|
flags |= BindingFlags.OnNgTemplateElement;
|
|
18103
|
-
if (isPlainTemplate) {
|
|
18259
|
+
if (element2 instanceof Template && isPlainTemplate(element2)) {
|
|
18104
18260
|
flags |= BindingFlags.BindingTargetsTemplate;
|
|
18105
18261
|
}
|
|
18106
18262
|
const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
|
|
@@ -18125,7 +18281,7 @@ function ingestBindings(unit, op, element2) {
|
|
|
18125
18281
|
throw Error("Animation listener should have a phase");
|
|
18126
18282
|
}
|
|
18127
18283
|
}
|
|
18128
|
-
if (element2 instanceof Template && !isPlainTemplate) {
|
|
18284
|
+
if (element2 instanceof Template && !isPlainTemplate(element2)) {
|
|
18129
18285
|
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null));
|
|
18130
18286
|
continue;
|
|
18131
18287
|
}
|
|
@@ -18211,10 +18367,10 @@ function convertSourceSpan(span, baseSourceSpan) {
|
|
|
18211
18367
|
return new ParseSourceSpan(start, end, fullStart);
|
|
18212
18368
|
}
|
|
18213
18369
|
|
|
18214
|
-
// bazel-out/
|
|
18370
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
18215
18371
|
var USE_TEMPLATE_PIPELINE = false;
|
|
18216
18372
|
|
|
18217
|
-
// bazel-out/
|
|
18373
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
18218
18374
|
var IMPORTANT_FLAG = "!important";
|
|
18219
18375
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
18220
18376
|
var StylingBuilder = class {
|
|
@@ -18547,7 +18703,7 @@ function isEmptyExpression(ast) {
|
|
|
18547
18703
|
return ast instanceof EmptyExpr;
|
|
18548
18704
|
}
|
|
18549
18705
|
|
|
18550
|
-
// bazel-out/
|
|
18706
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
18551
18707
|
var HtmlParser = class extends Parser2 {
|
|
18552
18708
|
constructor() {
|
|
18553
18709
|
super(getHtmlTagDefinition);
|
|
@@ -18557,7 +18713,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
18557
18713
|
}
|
|
18558
18714
|
};
|
|
18559
18715
|
|
|
18560
|
-
// bazel-out/
|
|
18716
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
18561
18717
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
18562
18718
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
18563
18719
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -18623,7 +18779,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
18623
18779
|
return result;
|
|
18624
18780
|
}
|
|
18625
18781
|
|
|
18626
|
-
// bazel-out/
|
|
18782
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
18627
18783
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
18628
18784
|
var ATTRIBUTE_PREFIX = "attr";
|
|
18629
18785
|
var CLASS_PREFIX = "class";
|
|
@@ -18943,7 +19099,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
18943
19099
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
18944
19100
|
}
|
|
18945
19101
|
|
|
18946
|
-
// bazel-out/
|
|
19102
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
18947
19103
|
function isStyleUrlResolvable(url) {
|
|
18948
19104
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
18949
19105
|
return false;
|
|
@@ -18952,7 +19108,7 @@ function isStyleUrlResolvable(url) {
|
|
|
18952
19108
|
}
|
|
18953
19109
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
18954
19110
|
|
|
18955
|
-
// bazel-out/
|
|
19111
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
18956
19112
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
18957
19113
|
var LINK_ELEMENT = "link";
|
|
18958
19114
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -19022,7 +19178,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
19022
19178
|
return selectAttr;
|
|
19023
19179
|
}
|
|
19024
19180
|
|
|
19025
|
-
// bazel-out/
|
|
19181
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
19026
19182
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+(.*)/;
|
|
19027
19183
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
19028
19184
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -19311,7 +19467,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
19311
19467
|
return expression.slice(start, end);
|
|
19312
19468
|
}
|
|
19313
19469
|
|
|
19314
|
-
// bazel-out/
|
|
19470
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
19315
19471
|
var TIME_PATTERN = /^\d+(ms|s)?$/;
|
|
19316
19472
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
19317
19473
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -19559,7 +19715,7 @@ function parseDeferredTime(value) {
|
|
|
19559
19715
|
return parseInt(time) * (units === "s" ? 1e3 : 1);
|
|
19560
19716
|
}
|
|
19561
19717
|
|
|
19562
|
-
// bazel-out/
|
|
19718
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
19563
19719
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
19564
19720
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
19565
19721
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -19694,7 +19850,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
19694
19850
|
return { triggers, prefetchTriggers };
|
|
19695
19851
|
}
|
|
19696
19852
|
|
|
19697
|
-
// bazel-out/
|
|
19853
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
19698
19854
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
19699
19855
|
var KW_BIND_IDX = 1;
|
|
19700
19856
|
var KW_LET_IDX = 2;
|
|
@@ -20125,7 +20281,7 @@ function textContents(node) {
|
|
|
20125
20281
|
}
|
|
20126
20282
|
}
|
|
20127
20283
|
|
|
20128
|
-
// bazel-out/
|
|
20284
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
20129
20285
|
var TagType;
|
|
20130
20286
|
(function(TagType2) {
|
|
20131
20287
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -20260,7 +20416,7 @@ function serializePlaceholderValue(value) {
|
|
|
20260
20416
|
}
|
|
20261
20417
|
}
|
|
20262
20418
|
|
|
20263
|
-
// bazel-out/
|
|
20419
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
20264
20420
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
20265
20421
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
20266
20422
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -21890,7 +22046,7 @@ function createClosureModeGuard2() {
|
|
|
21890
22046
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
21891
22047
|
}
|
|
21892
22048
|
|
|
21893
|
-
// bazel-out/
|
|
22049
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
21894
22050
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
21895
22051
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
21896
22052
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -22492,7 +22648,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
22492
22648
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
22493
22649
|
}
|
|
22494
22650
|
|
|
22495
|
-
// bazel-out/
|
|
22651
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
22496
22652
|
var R3TargetBinder = class {
|
|
22497
22653
|
constructor(directiveMatcher) {
|
|
22498
22654
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -23084,11 +23240,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
23084
23240
|
return templateEntities;
|
|
23085
23241
|
}
|
|
23086
23242
|
|
|
23087
|
-
// bazel-out/
|
|
23243
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
23088
23244
|
var ResourceLoader = class {
|
|
23089
23245
|
};
|
|
23090
23246
|
|
|
23091
|
-
// bazel-out/
|
|
23247
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
23092
23248
|
var CompilerFacadeImpl = class {
|
|
23093
23249
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
23094
23250
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -23640,17 +23796,17 @@ function publishFacade(global) {
|
|
|
23640
23796
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
23641
23797
|
}
|
|
23642
23798
|
|
|
23643
|
-
// bazel-out/
|
|
23644
|
-
var VERSION2 = new Version("17.0.0-
|
|
23799
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23800
|
+
var VERSION2 = new Version("17.0.0-rc.0");
|
|
23645
23801
|
|
|
23646
|
-
// bazel-out/
|
|
23802
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23647
23803
|
var _VisitorMode;
|
|
23648
23804
|
(function(_VisitorMode2) {
|
|
23649
23805
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
23650
23806
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
23651
23807
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
23652
23808
|
|
|
23653
|
-
// bazel-out/
|
|
23809
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
23654
23810
|
var XmlTagDefinition = class {
|
|
23655
23811
|
constructor() {
|
|
23656
23812
|
this.closedByParent = false;
|
|
@@ -23672,7 +23828,7 @@ var XmlTagDefinition = class {
|
|
|
23672
23828
|
};
|
|
23673
23829
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
23674
23830
|
|
|
23675
|
-
// bazel-out/
|
|
23831
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
23676
23832
|
var FactoryTarget2;
|
|
23677
23833
|
(function(FactoryTarget3) {
|
|
23678
23834
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -23682,14 +23838,14 @@ var FactoryTarget2;
|
|
|
23682
23838
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
23683
23839
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
23684
23840
|
|
|
23685
|
-
// bazel-out/
|
|
23841
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
23686
23842
|
publishFacade(_global);
|
|
23687
23843
|
|
|
23688
|
-
// bazel-out/
|
|
23844
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
23689
23845
|
var import_path2 = require("path");
|
|
23690
23846
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
23691
23847
|
|
|
23692
|
-
// bazel-out/
|
|
23848
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
23693
23849
|
var ngif = "*ngIf";
|
|
23694
23850
|
var ngfor = "*ngFor";
|
|
23695
23851
|
var ngswitch = "[ngSwitch]";
|
|
@@ -23731,13 +23887,16 @@ var ElementToMigrate = class {
|
|
|
23731
23887
|
return ((_a2 = this.el.sourceSpan) == null ? void 0 : _a2.end.offset) - this.nestCount - offset;
|
|
23732
23888
|
}
|
|
23733
23889
|
length() {
|
|
23734
|
-
|
|
23890
|
+
var _a2, _b2;
|
|
23891
|
+
return ((_a2 = this.el.sourceSpan) == null ? void 0 : _a2.end.offset) - ((_b2 = this.el.sourceSpan) == null ? void 0 : _b2.start.offset);
|
|
23735
23892
|
}
|
|
23736
23893
|
openLength() {
|
|
23737
|
-
|
|
23894
|
+
var _a2, _b2;
|
|
23895
|
+
return ((_a2 = this.el.children[0]) == null ? void 0 : _a2.sourceSpan.start.offset) - ((_b2 = this.el.sourceSpan) == null ? void 0 : _b2.start.offset);
|
|
23738
23896
|
}
|
|
23739
23897
|
closeLength() {
|
|
23740
|
-
|
|
23898
|
+
var _a2, _b2;
|
|
23899
|
+
return ((_a2 = this.el.sourceSpan) == null ? void 0 : _a2.end.offset) - ((_b2 = this.el.children[0]) == null ? void 0 : _b2.sourceSpan.end.offset);
|
|
23741
23900
|
}
|
|
23742
23901
|
preOffset(newOffset) {
|
|
23743
23902
|
return newOffset - this.openLength() + 1;
|
|
@@ -23756,7 +23915,10 @@ var Template2 = class {
|
|
|
23756
23915
|
}
|
|
23757
23916
|
generateContents(tmpl) {
|
|
23758
23917
|
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset + 1);
|
|
23759
|
-
this.children =
|
|
23918
|
+
this.children = "";
|
|
23919
|
+
if (this.el.children.length > 0) {
|
|
23920
|
+
this.children = tmpl.slice(this.el.children[0].sourceSpan.start.offset, this.el.children[this.el.children.length - 1].sourceSpan.end.offset);
|
|
23921
|
+
}
|
|
23760
23922
|
}
|
|
23761
23923
|
};
|
|
23762
23924
|
var AnalyzedFile = class {
|
|
@@ -23820,7 +23982,7 @@ var CaseCollector = class extends RecursiveVisitor {
|
|
|
23820
23982
|
}
|
|
23821
23983
|
};
|
|
23822
23984
|
|
|
23823
|
-
// bazel-out/
|
|
23985
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
23824
23986
|
function analyze(sourceFile, analyzedFiles) {
|
|
23825
23987
|
var _a2;
|
|
23826
23988
|
for (const node of sourceFile.statements) {
|
|
@@ -23865,16 +24027,21 @@ function getNestedCount(etm, aggregator) {
|
|
|
23865
24027
|
function migrateTemplate(template2) {
|
|
23866
24028
|
var _a2, _b2, _c2;
|
|
23867
24029
|
let parsed;
|
|
24030
|
+
let errors = [];
|
|
23868
24031
|
try {
|
|
23869
24032
|
parsed = new HtmlParser().parse(template2, "", {
|
|
23870
24033
|
tokenizeExpansionForms: true,
|
|
23871
24034
|
tokenizeBlocks: false
|
|
23872
24035
|
});
|
|
23873
24036
|
if (parsed.errors && parsed.errors.length > 0) {
|
|
23874
|
-
|
|
24037
|
+
for (let error2 of parsed.errors) {
|
|
24038
|
+
errors.push({ type: "parse", error: error2 });
|
|
24039
|
+
}
|
|
24040
|
+
return { migrated: null, errors };
|
|
23875
24041
|
}
|
|
23876
|
-
} catch (
|
|
23877
|
-
|
|
24042
|
+
} catch (error2) {
|
|
24043
|
+
errors.push({ type: "parse", error: error2 });
|
|
24044
|
+
return { migrated: null, errors };
|
|
23878
24045
|
}
|
|
23879
24046
|
let result = template2;
|
|
23880
24047
|
const visitor = new ElementCollector();
|
|
@@ -23894,28 +24061,41 @@ function migrateTemplate(template2) {
|
|
|
23894
24061
|
let offset = 0;
|
|
23895
24062
|
for (const el of visitor.elements) {
|
|
23896
24063
|
if (el.attr.name === ngif) {
|
|
23897
|
-
|
|
23898
|
-
|
|
23899
|
-
|
|
24064
|
+
try {
|
|
24065
|
+
let ifResult = migrateNgIf(el, visitor.templates, result, offset);
|
|
24066
|
+
result = ifResult.tmpl;
|
|
24067
|
+
offset = ifResult.offset;
|
|
24068
|
+
} catch (error2) {
|
|
24069
|
+
errors.push({ type: ngfor, error: error2 });
|
|
24070
|
+
}
|
|
23900
24071
|
} else if (el.attr.name === ngfor) {
|
|
23901
|
-
|
|
23902
|
-
|
|
23903
|
-
|
|
24072
|
+
try {
|
|
24073
|
+
let forResult = migrateNgFor(el, result, offset);
|
|
24074
|
+
result = forResult.tmpl;
|
|
24075
|
+
offset = forResult.offset;
|
|
24076
|
+
} catch (error2) {
|
|
24077
|
+
errors.push({ type: ngfor, error: error2 });
|
|
24078
|
+
}
|
|
23904
24079
|
} else if (el.attr.name === ngswitch) {
|
|
23905
|
-
|
|
23906
|
-
|
|
23907
|
-
|
|
24080
|
+
try {
|
|
24081
|
+
let switchResult = migrateNgSwitch(el, result, offset);
|
|
24082
|
+
result = switchResult.tmpl;
|
|
24083
|
+
offset = switchResult.offset;
|
|
24084
|
+
} catch (error2) {
|
|
24085
|
+
errors.push({ type: ngfor, error: error2 });
|
|
24086
|
+
}
|
|
23908
24087
|
}
|
|
23909
24088
|
}
|
|
23910
24089
|
for (const [_, t] of visitor.templates) {
|
|
23911
|
-
if (t.count
|
|
24090
|
+
if (t.count < 2) {
|
|
23912
24091
|
result = result.replace(t.contents, "");
|
|
23913
24092
|
}
|
|
23914
24093
|
}
|
|
23915
|
-
return result;
|
|
24094
|
+
return { migrated: result, errors };
|
|
23916
24095
|
}
|
|
23917
24096
|
function migrateNgFor(etm, tmpl, offset) {
|
|
23918
|
-
const
|
|
24097
|
+
const aliasWithEqualRegexp = /=\s+(count|index|first|last|even|odd)/gm;
|
|
24098
|
+
const aliasWithAsRegexp = /(count|index|first|last|even|odd)\s+as/gm;
|
|
23919
24099
|
const aliases = [];
|
|
23920
24100
|
const parts = etm.attr.value.split(";");
|
|
23921
24101
|
const condition = parts[0].replace("let ", "");
|
|
@@ -23927,10 +24107,14 @@ function migrateNgFor(etm, tmpl, offset) {
|
|
|
23927
24107
|
const trackByFn = part.replace("trackBy:", "").trim();
|
|
23928
24108
|
trackBy = `${trackByFn}($index, ${loopVar})`;
|
|
23929
24109
|
}
|
|
23930
|
-
if (part.match(
|
|
24110
|
+
if (part.match(aliasWithEqualRegexp)) {
|
|
23931
24111
|
const aliasParts = part.split("=");
|
|
23932
24112
|
aliases.push(` ${aliasParts[0].trim()} = $${aliasParts[1].trim()}`);
|
|
23933
24113
|
}
|
|
24114
|
+
if (part.match(aliasWithAsRegexp)) {
|
|
24115
|
+
const aliasParts = part.split(/\s+as\s+/);
|
|
24116
|
+
aliases.push(` let ${aliasParts[1].trim()} = $${aliasParts[0].trim()}`);
|
|
24117
|
+
}
|
|
23934
24118
|
}
|
|
23935
24119
|
const aliasStr = aliases.length > 0 ? `;${aliases.join(";")}` : "";
|
|
23936
24120
|
const startBlock = `@for (${condition}; track ${trackBy}${aliasStr}) {`;
|
|
@@ -23951,7 +24135,7 @@ function migrateNgIf(etm, ngTemplates, tmpl, offset) {
|
|
|
23951
24135
|
return buildIfBlock(etm, tmpl, offset);
|
|
23952
24136
|
}
|
|
23953
24137
|
function buildIfBlock(etm, tmpl, offset) {
|
|
23954
|
-
const condition = etm.attr.value;
|
|
24138
|
+
const condition = etm.attr.value.replace(" as ", "; as ");
|
|
23955
24139
|
const startBlock = `@if (${condition}) {`;
|
|
23956
24140
|
const ifBlock = startBlock + getMainBlock(etm, tmpl, offset) + `}`;
|
|
23957
24141
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + ifBlock + tmpl.slice(etm.end(offset));
|
|
@@ -23959,7 +24143,7 @@ function buildIfBlock(etm, tmpl, offset) {
|
|
|
23959
24143
|
return { tmpl: updatedTmpl, offset };
|
|
23960
24144
|
}
|
|
23961
24145
|
function buildIfElseBlock(etm, ngTemplates, tmpl, elseString, offset) {
|
|
23962
|
-
const condition = etm.getCondition(elseString);
|
|
24146
|
+
const condition = etm.getCondition(elseString).replace(" as ", "; as ");
|
|
23963
24147
|
const elseTmpl = ngTemplates.get(`#${etm.getTemplateName(elseString)}`);
|
|
23964
24148
|
const startBlock = `@if (${condition}) {`;
|
|
23965
24149
|
const mainBlock = getMainBlock(etm, tmpl, offset);
|
|
@@ -23970,10 +24154,11 @@ function buildIfElseBlock(etm, ngTemplates, tmpl, elseString, offset) {
|
|
|
23970
24154
|
let tmplEnd = tmpl.slice(etm.end(offset));
|
|
23971
24155
|
const updatedTmpl = tmplStart + ifElseBlock + tmplEnd;
|
|
23972
24156
|
offset = offset + etm.preOffset(startBlock.length) + etm.postOffset(mainBlock.length + postBlock.length);
|
|
24157
|
+
elseTmpl.count--;
|
|
23973
24158
|
return { tmpl: updatedTmpl, offset };
|
|
23974
24159
|
}
|
|
23975
24160
|
function buildIfThenElseBlock(etm, ngTemplates, tmpl, thenString, elseString, offset) {
|
|
23976
|
-
const condition = etm.getCondition(thenString);
|
|
24161
|
+
const condition = etm.getCondition(thenString).replace(" as ", "; as ");
|
|
23977
24162
|
const startBlock = `@if (${condition}) {`;
|
|
23978
24163
|
const elseBlock = `} @else {`;
|
|
23979
24164
|
const thenTmpl = ngTemplates.get(`#${etm.getTemplateName(thenString, elseString)}`);
|
|
@@ -23984,6 +24169,8 @@ function buildIfThenElseBlock(etm, ngTemplates, tmpl, thenString, elseString, of
|
|
|
23984
24169
|
let tmplEnd = tmpl.slice(etm.end(offset));
|
|
23985
24170
|
const updatedTmpl = tmplStart + ifThenElseBlock + tmplEnd;
|
|
23986
24171
|
offset = offset + etm.preOffset(startBlock.length) + etm.postOffset(postBlock.length);
|
|
24172
|
+
thenTmpl.count--;
|
|
24173
|
+
elseTmpl.count--;
|
|
23987
24174
|
return { tmpl: updatedTmpl, offset };
|
|
23988
24175
|
}
|
|
23989
24176
|
function getMainBlock(etm, tmpl, offset) {
|
|
@@ -24046,7 +24233,7 @@ function getSwitchCaseBlock(etm, tmpl, nestCount, offset) {
|
|
|
24046
24233
|
return `@case (${etm.attr.value}) { ${tmpl.slice(elStart, attrStart) + tmpl.slice(valEnd, elEnd)} }`;
|
|
24047
24234
|
}
|
|
24048
24235
|
|
|
24049
|
-
// bazel-out/
|
|
24236
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
24050
24237
|
function control_flow_migration_default() {
|
|
24051
24238
|
return (tree, context) => __async(this, null, function* () {
|
|
24052
24239
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|
|
@@ -24056,8 +24243,17 @@ function control_flow_migration_default() {
|
|
|
24056
24243
|
throw new import_schematics.SchematicsException("Could not find any tsconfig file. Cannot run the control flow migration.");
|
|
24057
24244
|
}
|
|
24058
24245
|
context.logger.warn("IMPORTANT! This migration is in developer preview. Use with caution.");
|
|
24246
|
+
let errors = [];
|
|
24059
24247
|
for (const tsconfigPath of allPaths) {
|
|
24060
|
-
runControlFlowMigration(tree, tsconfigPath, basePath);
|
|
24248
|
+
const migrateErrors = runControlFlowMigration(tree, tsconfigPath, basePath);
|
|
24249
|
+
errors = [...errors, ...migrateErrors];
|
|
24250
|
+
}
|
|
24251
|
+
if (errors.length > 0) {
|
|
24252
|
+
context.logger.warn(`WARNING: ${errors.length} errors occured during your migration:
|
|
24253
|
+
`);
|
|
24254
|
+
errors.forEach((err) => {
|
|
24255
|
+
context.logger.warn(err);
|
|
24256
|
+
});
|
|
24061
24257
|
}
|
|
24062
24258
|
});
|
|
24063
24259
|
}
|
|
@@ -24065,6 +24261,7 @@ function runControlFlowMigration(tree, tsconfigPath, basePath) {
|
|
|
24065
24261
|
const program = createMigrationProgram(tree, tsconfigPath, basePath);
|
|
24066
24262
|
const sourceFiles = program.getSourceFiles().filter((sourceFile) => canMigrateFile(basePath, sourceFile, program));
|
|
24067
24263
|
const analysis = /* @__PURE__ */ new Map();
|
|
24264
|
+
const migrateErrors = /* @__PURE__ */ new Map();
|
|
24068
24265
|
for (const sourceFile of sourceFiles) {
|
|
24069
24266
|
analyze(sourceFile, analysis);
|
|
24070
24267
|
}
|
|
@@ -24076,14 +24273,29 @@ function runControlFlowMigration(tree, tsconfigPath, basePath) {
|
|
|
24076
24273
|
for (const [start, end] of ranges) {
|
|
24077
24274
|
const template2 = content.slice(start, end);
|
|
24078
24275
|
const length = (end != null ? end : content.length) - start;
|
|
24079
|
-
const migrated = migrateTemplate(template2);
|
|
24276
|
+
const { migrated, errors } = migrateTemplate(template2);
|
|
24080
24277
|
if (migrated !== null) {
|
|
24081
24278
|
update.remove(start, length);
|
|
24082
24279
|
update.insertLeft(start, migrated);
|
|
24083
24280
|
}
|
|
24281
|
+
if (errors.length > 0) {
|
|
24282
|
+
migrateErrors.set(path2, errors);
|
|
24283
|
+
}
|
|
24084
24284
|
}
|
|
24085
24285
|
tree.commitUpdate(update);
|
|
24086
24286
|
}
|
|
24287
|
+
const errorList = [];
|
|
24288
|
+
for (let [template2, errors] of migrateErrors) {
|
|
24289
|
+
errorList.push(generateErrorMessage(template2, errors));
|
|
24290
|
+
}
|
|
24291
|
+
return errorList;
|
|
24292
|
+
}
|
|
24293
|
+
function generateErrorMessage(path2, errors) {
|
|
24294
|
+
let errorMessage = `Template "${path2}" encountered ${errors.length} errors during migration:
|
|
24295
|
+
`;
|
|
24296
|
+
errorMessage += errors.map((e) => ` - ${e.type}: ${e.error}
|
|
24297
|
+
`);
|
|
24298
|
+
return errorMessage;
|
|
24087
24299
|
}
|
|
24088
24300
|
// Annotate the CommonJS export names for ESM import in node:
|
|
24089
24301
|
0 && (module.exports = {});
|