@angular/compiler 19.0.0-next.9 → 19.0.0-rc.1
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/fesm2022/compiler.mjs +1740 -755
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +53 -10
- package/package.json +2 -2
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.0-
|
|
2
|
+
* @license Angular v19.0.0-rc.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -20,23 +20,21 @@ const _SELECTOR_REGEXP = new RegExp('(\\:not\\()|' + // 1: ":not("
|
|
|
20
20
|
* of selecting subsets out of them.
|
|
21
21
|
*/
|
|
22
22
|
class CssSelector {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.notSelectors = [];
|
|
39
|
-
}
|
|
23
|
+
element = null;
|
|
24
|
+
classNames = [];
|
|
25
|
+
/**
|
|
26
|
+
* The selectors are encoded in pairs where:
|
|
27
|
+
* - even locations are attribute names
|
|
28
|
+
* - odd locations are attribute values.
|
|
29
|
+
*
|
|
30
|
+
* Example:
|
|
31
|
+
* Selector: `[key1=value1][key2]` would parse to:
|
|
32
|
+
* ```
|
|
33
|
+
* ['key1', 'value1', 'key2', '']
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
attrs = [];
|
|
37
|
+
notSelectors = [];
|
|
40
38
|
static parse(selector) {
|
|
41
39
|
const results = [];
|
|
42
40
|
const _addResult = (res, cssSel) => {
|
|
@@ -184,20 +182,18 @@ class CssSelector {
|
|
|
184
182
|
* are contained in a given CssSelector.
|
|
185
183
|
*/
|
|
186
184
|
class SelectorMatcher {
|
|
187
|
-
constructor() {
|
|
188
|
-
this._elementMap = new Map();
|
|
189
|
-
this._elementPartialMap = new Map();
|
|
190
|
-
this._classMap = new Map();
|
|
191
|
-
this._classPartialMap = new Map();
|
|
192
|
-
this._attrValueMap = new Map();
|
|
193
|
-
this._attrValuePartialMap = new Map();
|
|
194
|
-
this._listContexts = [];
|
|
195
|
-
}
|
|
196
185
|
static createNotMatcher(notSelectors) {
|
|
197
186
|
const notMatcher = new SelectorMatcher();
|
|
198
187
|
notMatcher.addSelectables(notSelectors, null);
|
|
199
188
|
return notMatcher;
|
|
200
189
|
}
|
|
190
|
+
_elementMap = new Map();
|
|
191
|
+
_elementPartialMap = new Map();
|
|
192
|
+
_classMap = new Map();
|
|
193
|
+
_classPartialMap = new Map();
|
|
194
|
+
_attrValueMap = new Map();
|
|
195
|
+
_attrValuePartialMap = new Map();
|
|
196
|
+
_listContexts = [];
|
|
201
197
|
addSelectables(cssSelectors, callbackCtxt) {
|
|
202
198
|
let listContext = null;
|
|
203
199
|
if (cssSelectors.length > 1) {
|
|
@@ -368,13 +364,18 @@ class SelectorMatcher {
|
|
|
368
364
|
}
|
|
369
365
|
}
|
|
370
366
|
class SelectorListContext {
|
|
367
|
+
selectors;
|
|
368
|
+
alreadyMatched = false;
|
|
371
369
|
constructor(selectors) {
|
|
372
370
|
this.selectors = selectors;
|
|
373
|
-
this.alreadyMatched = false;
|
|
374
371
|
}
|
|
375
372
|
}
|
|
376
373
|
// Store context to pass back selector and context when a selector is matched
|
|
377
374
|
class SelectorContext {
|
|
375
|
+
selector;
|
|
376
|
+
cbContext;
|
|
377
|
+
listContext;
|
|
378
|
+
notSelectors;
|
|
378
379
|
constructor(selector, cbContext, listContext) {
|
|
379
380
|
this.selector = selector;
|
|
380
381
|
this.cbContext = cbContext;
|
|
@@ -514,14 +515,14 @@ function computeDigest(message) {
|
|
|
514
515
|
/**
|
|
515
516
|
* Return the message id or compute it using the XLIFF2/XMB/$localize digest.
|
|
516
517
|
*/
|
|
517
|
-
function decimalDigest(message
|
|
518
|
-
return message.id || computeDecimalDigest(message
|
|
518
|
+
function decimalDigest(message) {
|
|
519
|
+
return message.id || computeDecimalDigest(message);
|
|
519
520
|
}
|
|
520
521
|
/**
|
|
521
522
|
* Compute the message id using the XLIFF2/XMB/$localize digest.
|
|
522
523
|
*/
|
|
523
|
-
function computeDecimalDigest(message
|
|
524
|
-
const visitor = new
|
|
524
|
+
function computeDecimalDigest(message) {
|
|
525
|
+
const visitor = new _SerializerIgnoreIcuExpVisitor();
|
|
525
526
|
const parts = message.nodes.map((a) => a.visit(visitor, null));
|
|
526
527
|
return computeMsgId(parts.join(''), message.meaning);
|
|
527
528
|
}
|
|
@@ -569,21 +570,11 @@ function serializeNodes(nodes) {
|
|
|
569
570
|
/**
|
|
570
571
|
* Serialize the i18n ast to something xml-like in order to generate an UID.
|
|
571
572
|
*
|
|
572
|
-
* Ignore the expressions so that message IDs stays identical if only the expression changes.
|
|
573
|
+
* Ignore the ICU expressions so that message IDs stays identical if only the expression changes.
|
|
573
574
|
*
|
|
574
575
|
* @internal
|
|
575
576
|
*/
|
|
576
|
-
class
|
|
577
|
-
constructor(preservePlaceholders) {
|
|
578
|
-
super();
|
|
579
|
-
this.preservePlaceholders = preservePlaceholders;
|
|
580
|
-
}
|
|
581
|
-
visitPlaceholder(ph, context) {
|
|
582
|
-
// Do not take the expression into account when `preservePlaceholders` is disabled.
|
|
583
|
-
return this.preservePlaceholders
|
|
584
|
-
? super.visitPlaceholder(ph, context)
|
|
585
|
-
: `<ph name="${ph.name}"/>`;
|
|
586
|
-
}
|
|
577
|
+
class _SerializerIgnoreIcuExpVisitor extends _SerializerVisitor {
|
|
587
578
|
visitIcu(icu) {
|
|
588
579
|
let strCases = Object.keys(icu.cases).map((k) => `${k} {${icu.cases[k].visit(this)}}`);
|
|
589
580
|
// Do not take the expression into account
|
|
@@ -827,6 +818,7 @@ var TypeModifier;
|
|
|
827
818
|
TypeModifier[TypeModifier["Const"] = 1] = "Const";
|
|
828
819
|
})(TypeModifier || (TypeModifier = {}));
|
|
829
820
|
class Type {
|
|
821
|
+
modifiers;
|
|
830
822
|
constructor(modifiers = TypeModifier.None) {
|
|
831
823
|
this.modifiers = modifiers;
|
|
832
824
|
}
|
|
@@ -846,6 +838,7 @@ var BuiltinTypeName;
|
|
|
846
838
|
BuiltinTypeName[BuiltinTypeName["None"] = 7] = "None";
|
|
847
839
|
})(BuiltinTypeName || (BuiltinTypeName = {}));
|
|
848
840
|
class BuiltinType extends Type {
|
|
841
|
+
name;
|
|
849
842
|
constructor(name, modifiers) {
|
|
850
843
|
super(modifiers);
|
|
851
844
|
this.name = name;
|
|
@@ -855,6 +848,8 @@ class BuiltinType extends Type {
|
|
|
855
848
|
}
|
|
856
849
|
}
|
|
857
850
|
class ExpressionType extends Type {
|
|
851
|
+
value;
|
|
852
|
+
typeParams;
|
|
858
853
|
constructor(value, modifiers, typeParams = null) {
|
|
859
854
|
super(modifiers);
|
|
860
855
|
this.value = value;
|
|
@@ -865,6 +860,7 @@ class ExpressionType extends Type {
|
|
|
865
860
|
}
|
|
866
861
|
}
|
|
867
862
|
class ArrayType extends Type {
|
|
863
|
+
of;
|
|
868
864
|
constructor(of, modifiers) {
|
|
869
865
|
super(modifiers);
|
|
870
866
|
this.of = of;
|
|
@@ -874,6 +870,7 @@ class ArrayType extends Type {
|
|
|
874
870
|
}
|
|
875
871
|
}
|
|
876
872
|
class MapType extends Type {
|
|
873
|
+
valueType;
|
|
877
874
|
constructor(valueType, modifiers) {
|
|
878
875
|
super(modifiers);
|
|
879
876
|
this.valueType = valueType || null;
|
|
@@ -883,6 +880,7 @@ class MapType extends Type {
|
|
|
883
880
|
}
|
|
884
881
|
}
|
|
885
882
|
class TransplantedType extends Type {
|
|
883
|
+
type;
|
|
886
884
|
constructor(type, modifiers) {
|
|
887
885
|
super(modifiers);
|
|
888
886
|
this.type = type;
|
|
@@ -948,6 +946,8 @@ function areAllEquivalent(base, other) {
|
|
|
948
946
|
return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));
|
|
949
947
|
}
|
|
950
948
|
class Expression {
|
|
949
|
+
type;
|
|
950
|
+
sourceSpan;
|
|
951
951
|
constructor(type, sourceSpan) {
|
|
952
952
|
this.type = type || null;
|
|
953
953
|
this.sourceSpan = sourceSpan || null;
|
|
@@ -1031,6 +1031,7 @@ class Expression {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
class ReadVarExpr extends Expression {
|
|
1034
|
+
name;
|
|
1034
1035
|
constructor(name, type, sourceSpan) {
|
|
1035
1036
|
super(type, sourceSpan);
|
|
1036
1037
|
this.name = name;
|
|
@@ -1052,6 +1053,7 @@ class ReadVarExpr extends Expression {
|
|
|
1052
1053
|
}
|
|
1053
1054
|
}
|
|
1054
1055
|
class TypeofExpr extends Expression {
|
|
1056
|
+
expr;
|
|
1055
1057
|
constructor(expr, type, sourceSpan) {
|
|
1056
1058
|
super(type, sourceSpan);
|
|
1057
1059
|
this.expr = expr;
|
|
@@ -1070,6 +1072,7 @@ class TypeofExpr extends Expression {
|
|
|
1070
1072
|
}
|
|
1071
1073
|
}
|
|
1072
1074
|
class WrappedNodeExpr extends Expression {
|
|
1075
|
+
node;
|
|
1073
1076
|
constructor(node, type, sourceSpan) {
|
|
1074
1077
|
super(type, sourceSpan);
|
|
1075
1078
|
this.node = node;
|
|
@@ -1088,6 +1091,8 @@ class WrappedNodeExpr extends Expression {
|
|
|
1088
1091
|
}
|
|
1089
1092
|
}
|
|
1090
1093
|
class WriteVarExpr extends Expression {
|
|
1094
|
+
name;
|
|
1095
|
+
value;
|
|
1091
1096
|
constructor(name, value, type, sourceSpan) {
|
|
1092
1097
|
super(type || value.type, sourceSpan);
|
|
1093
1098
|
this.name = name;
|
|
@@ -1113,6 +1118,9 @@ class WriteVarExpr extends Expression {
|
|
|
1113
1118
|
}
|
|
1114
1119
|
}
|
|
1115
1120
|
class WriteKeyExpr extends Expression {
|
|
1121
|
+
receiver;
|
|
1122
|
+
index;
|
|
1123
|
+
value;
|
|
1116
1124
|
constructor(receiver, index, value, type, sourceSpan) {
|
|
1117
1125
|
super(type || value.type, sourceSpan);
|
|
1118
1126
|
this.receiver = receiver;
|
|
@@ -1136,6 +1144,9 @@ class WriteKeyExpr extends Expression {
|
|
|
1136
1144
|
}
|
|
1137
1145
|
}
|
|
1138
1146
|
class WritePropExpr extends Expression {
|
|
1147
|
+
receiver;
|
|
1148
|
+
name;
|
|
1149
|
+
value;
|
|
1139
1150
|
constructor(receiver, name, value, type, sourceSpan) {
|
|
1140
1151
|
super(type || value.type, sourceSpan);
|
|
1141
1152
|
this.receiver = receiver;
|
|
@@ -1159,6 +1170,9 @@ class WritePropExpr extends Expression {
|
|
|
1159
1170
|
}
|
|
1160
1171
|
}
|
|
1161
1172
|
class InvokeFunctionExpr extends Expression {
|
|
1173
|
+
fn;
|
|
1174
|
+
args;
|
|
1175
|
+
pure;
|
|
1162
1176
|
constructor(fn, args, type, sourceSpan, pure = false) {
|
|
1163
1177
|
super(type, sourceSpan);
|
|
1164
1178
|
this.fn = fn;
|
|
@@ -1186,6 +1200,8 @@ class InvokeFunctionExpr extends Expression {
|
|
|
1186
1200
|
}
|
|
1187
1201
|
}
|
|
1188
1202
|
class TaggedTemplateExpr extends Expression {
|
|
1203
|
+
tag;
|
|
1204
|
+
template;
|
|
1189
1205
|
constructor(tag, template, type, sourceSpan) {
|
|
1190
1206
|
super(type, sourceSpan);
|
|
1191
1207
|
this.tag = tag;
|
|
@@ -1208,6 +1224,8 @@ class TaggedTemplateExpr extends Expression {
|
|
|
1208
1224
|
}
|
|
1209
1225
|
}
|
|
1210
1226
|
class InstantiateExpr extends Expression {
|
|
1227
|
+
classExpr;
|
|
1228
|
+
args;
|
|
1211
1229
|
constructor(classExpr, args, type, sourceSpan) {
|
|
1212
1230
|
super(type, sourceSpan);
|
|
1213
1231
|
this.classExpr = classExpr;
|
|
@@ -1229,6 +1247,7 @@ class InstantiateExpr extends Expression {
|
|
|
1229
1247
|
}
|
|
1230
1248
|
}
|
|
1231
1249
|
class LiteralExpr extends Expression {
|
|
1250
|
+
value;
|
|
1232
1251
|
constructor(value, type, sourceSpan) {
|
|
1233
1252
|
super(type, sourceSpan);
|
|
1234
1253
|
this.value = value;
|
|
@@ -1247,6 +1266,8 @@ class LiteralExpr extends Expression {
|
|
|
1247
1266
|
}
|
|
1248
1267
|
}
|
|
1249
1268
|
class TemplateLiteral {
|
|
1269
|
+
elements;
|
|
1270
|
+
expressions;
|
|
1250
1271
|
constructor(elements, expressions) {
|
|
1251
1272
|
this.elements = elements;
|
|
1252
1273
|
this.expressions = expressions;
|
|
@@ -1256,6 +1277,9 @@ class TemplateLiteral {
|
|
|
1256
1277
|
}
|
|
1257
1278
|
}
|
|
1258
1279
|
class TemplateLiteralElement {
|
|
1280
|
+
text;
|
|
1281
|
+
sourceSpan;
|
|
1282
|
+
rawText;
|
|
1259
1283
|
constructor(text, sourceSpan, rawText) {
|
|
1260
1284
|
this.text = text;
|
|
1261
1285
|
this.sourceSpan = sourceSpan;
|
|
@@ -1273,12 +1297,17 @@ class TemplateLiteralElement {
|
|
|
1273
1297
|
}
|
|
1274
1298
|
}
|
|
1275
1299
|
class LiteralPiece {
|
|
1300
|
+
text;
|
|
1301
|
+
sourceSpan;
|
|
1276
1302
|
constructor(text, sourceSpan) {
|
|
1277
1303
|
this.text = text;
|
|
1278
1304
|
this.sourceSpan = sourceSpan;
|
|
1279
1305
|
}
|
|
1280
1306
|
}
|
|
1281
1307
|
class PlaceholderPiece {
|
|
1308
|
+
text;
|
|
1309
|
+
sourceSpan;
|
|
1310
|
+
associatedMessage;
|
|
1282
1311
|
/**
|
|
1283
1312
|
* Create a new instance of a `PlaceholderPiece`.
|
|
1284
1313
|
*
|
|
@@ -1298,6 +1327,10 @@ const MEANING_SEPARATOR$1 = '|';
|
|
|
1298
1327
|
const ID_SEPARATOR$1 = '@@';
|
|
1299
1328
|
const LEGACY_ID_INDICATOR = '␟';
|
|
1300
1329
|
class LocalizedString extends Expression {
|
|
1330
|
+
metaBlock;
|
|
1331
|
+
messageParts;
|
|
1332
|
+
placeHolderNames;
|
|
1333
|
+
expressions;
|
|
1301
1334
|
constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {
|
|
1302
1335
|
super(STRING_TYPE, sourceSpan);
|
|
1303
1336
|
this.metaBlock = metaBlock;
|
|
@@ -1403,6 +1436,8 @@ function createCookedRawString(metaBlock, messagePart, range) {
|
|
|
1403
1436
|
}
|
|
1404
1437
|
}
|
|
1405
1438
|
class ExternalExpr extends Expression {
|
|
1439
|
+
value;
|
|
1440
|
+
typeParams;
|
|
1406
1441
|
constructor(value, type, typeParams = null, sourceSpan) {
|
|
1407
1442
|
super(type, sourceSpan);
|
|
1408
1443
|
this.value = value;
|
|
@@ -1411,8 +1446,7 @@ class ExternalExpr extends Expression {
|
|
|
1411
1446
|
isEquivalent(e) {
|
|
1412
1447
|
return (e instanceof ExternalExpr &&
|
|
1413
1448
|
this.value.name === e.value.name &&
|
|
1414
|
-
this.value.moduleName === e.value.moduleName
|
|
1415
|
-
this.value.runtime === e.value.runtime);
|
|
1449
|
+
this.value.moduleName === e.value.moduleName);
|
|
1416
1450
|
}
|
|
1417
1451
|
isConstant() {
|
|
1418
1452
|
return false;
|
|
@@ -1425,13 +1459,17 @@ class ExternalExpr extends Expression {
|
|
|
1425
1459
|
}
|
|
1426
1460
|
}
|
|
1427
1461
|
class ExternalReference {
|
|
1428
|
-
|
|
1462
|
+
moduleName;
|
|
1463
|
+
name;
|
|
1464
|
+
constructor(moduleName, name) {
|
|
1429
1465
|
this.moduleName = moduleName;
|
|
1430
1466
|
this.name = name;
|
|
1431
|
-
this.runtime = runtime;
|
|
1432
1467
|
}
|
|
1433
1468
|
}
|
|
1434
1469
|
class ConditionalExpr extends Expression {
|
|
1470
|
+
condition;
|
|
1471
|
+
falseCase;
|
|
1472
|
+
trueCase;
|
|
1435
1473
|
constructor(condition, trueCase, falseCase = null, type, sourceSpan) {
|
|
1436
1474
|
super(type || trueCase.type, sourceSpan);
|
|
1437
1475
|
this.condition = condition;
|
|
@@ -1455,12 +1493,15 @@ class ConditionalExpr extends Expression {
|
|
|
1455
1493
|
}
|
|
1456
1494
|
}
|
|
1457
1495
|
class DynamicImportExpr extends Expression {
|
|
1458
|
-
|
|
1496
|
+
url;
|
|
1497
|
+
urlComment;
|
|
1498
|
+
constructor(url, sourceSpan, urlComment) {
|
|
1459
1499
|
super(null, sourceSpan);
|
|
1460
1500
|
this.url = url;
|
|
1501
|
+
this.urlComment = urlComment;
|
|
1461
1502
|
}
|
|
1462
1503
|
isEquivalent(e) {
|
|
1463
|
-
return e instanceof DynamicImportExpr && this.url === e.url;
|
|
1504
|
+
return e instanceof DynamicImportExpr && this.url === e.url && this.urlComment === e.urlComment;
|
|
1464
1505
|
}
|
|
1465
1506
|
isConstant() {
|
|
1466
1507
|
return false;
|
|
@@ -1469,10 +1510,11 @@ class DynamicImportExpr extends Expression {
|
|
|
1469
1510
|
return visitor.visitDynamicImportExpr(this, context);
|
|
1470
1511
|
}
|
|
1471
1512
|
clone() {
|
|
1472
|
-
return new DynamicImportExpr(this.url, this.sourceSpan);
|
|
1513
|
+
return new DynamicImportExpr(typeof this.url === 'string' ? this.url : this.url.clone(), this.sourceSpan, this.urlComment);
|
|
1473
1514
|
}
|
|
1474
1515
|
}
|
|
1475
1516
|
class NotExpr extends Expression {
|
|
1517
|
+
condition;
|
|
1476
1518
|
constructor(condition, sourceSpan) {
|
|
1477
1519
|
super(BOOL_TYPE, sourceSpan);
|
|
1478
1520
|
this.condition = condition;
|
|
@@ -1491,6 +1533,8 @@ class NotExpr extends Expression {
|
|
|
1491
1533
|
}
|
|
1492
1534
|
}
|
|
1493
1535
|
class FnParam {
|
|
1536
|
+
name;
|
|
1537
|
+
type;
|
|
1494
1538
|
constructor(name, type = null) {
|
|
1495
1539
|
this.name = name;
|
|
1496
1540
|
this.type = type;
|
|
@@ -1503,6 +1547,9 @@ class FnParam {
|
|
|
1503
1547
|
}
|
|
1504
1548
|
}
|
|
1505
1549
|
class FunctionExpr extends Expression {
|
|
1550
|
+
params;
|
|
1551
|
+
statements;
|
|
1552
|
+
name;
|
|
1506
1553
|
constructor(params, statements, type, sourceSpan, name) {
|
|
1507
1554
|
super(type, sourceSpan);
|
|
1508
1555
|
this.params = params;
|
|
@@ -1529,6 +1576,8 @@ class FunctionExpr extends Expression {
|
|
|
1529
1576
|
}
|
|
1530
1577
|
}
|
|
1531
1578
|
class ArrowFunctionExpr extends Expression {
|
|
1579
|
+
params;
|
|
1580
|
+
body;
|
|
1532
1581
|
// Note that `body: Expression` represents `() => expr` whereas
|
|
1533
1582
|
// `body: Statement[]` represents `() => { expr }`.
|
|
1534
1583
|
constructor(params, body, type, sourceSpan) {
|
|
@@ -1563,6 +1612,9 @@ class ArrowFunctionExpr extends Expression {
|
|
|
1563
1612
|
}
|
|
1564
1613
|
}
|
|
1565
1614
|
class UnaryOperatorExpr extends Expression {
|
|
1615
|
+
operator;
|
|
1616
|
+
expr;
|
|
1617
|
+
parens;
|
|
1566
1618
|
constructor(operator, expr, type, sourceSpan, parens = true) {
|
|
1567
1619
|
super(type || NUMBER_TYPE, sourceSpan);
|
|
1568
1620
|
this.operator = operator;
|
|
@@ -1585,6 +1637,10 @@ class UnaryOperatorExpr extends Expression {
|
|
|
1585
1637
|
}
|
|
1586
1638
|
}
|
|
1587
1639
|
class BinaryOperatorExpr extends Expression {
|
|
1640
|
+
operator;
|
|
1641
|
+
rhs;
|
|
1642
|
+
parens;
|
|
1643
|
+
lhs;
|
|
1588
1644
|
constructor(operator, lhs, rhs, type, sourceSpan, parens = true) {
|
|
1589
1645
|
super(type || lhs.type, sourceSpan);
|
|
1590
1646
|
this.operator = operator;
|
|
@@ -1609,6 +1665,8 @@ class BinaryOperatorExpr extends Expression {
|
|
|
1609
1665
|
}
|
|
1610
1666
|
}
|
|
1611
1667
|
class ReadPropExpr extends Expression {
|
|
1668
|
+
receiver;
|
|
1669
|
+
name;
|
|
1612
1670
|
constructor(receiver, name, type, sourceSpan) {
|
|
1613
1671
|
super(type, sourceSpan);
|
|
1614
1672
|
this.receiver = receiver;
|
|
@@ -1635,6 +1693,8 @@ class ReadPropExpr extends Expression {
|
|
|
1635
1693
|
}
|
|
1636
1694
|
}
|
|
1637
1695
|
class ReadKeyExpr extends Expression {
|
|
1696
|
+
receiver;
|
|
1697
|
+
index;
|
|
1638
1698
|
constructor(receiver, index, type, sourceSpan) {
|
|
1639
1699
|
super(type, sourceSpan);
|
|
1640
1700
|
this.receiver = receiver;
|
|
@@ -1659,6 +1719,7 @@ class ReadKeyExpr extends Expression {
|
|
|
1659
1719
|
}
|
|
1660
1720
|
}
|
|
1661
1721
|
class LiteralArrayExpr extends Expression {
|
|
1722
|
+
entries;
|
|
1662
1723
|
constructor(entries, type, sourceSpan) {
|
|
1663
1724
|
super(type, sourceSpan);
|
|
1664
1725
|
this.entries = entries;
|
|
@@ -1677,6 +1738,9 @@ class LiteralArrayExpr extends Expression {
|
|
|
1677
1738
|
}
|
|
1678
1739
|
}
|
|
1679
1740
|
class LiteralMapEntry {
|
|
1741
|
+
key;
|
|
1742
|
+
value;
|
|
1743
|
+
quoted;
|
|
1680
1744
|
constructor(key, value, quoted) {
|
|
1681
1745
|
this.key = key;
|
|
1682
1746
|
this.value = value;
|
|
@@ -1690,10 +1754,11 @@ class LiteralMapEntry {
|
|
|
1690
1754
|
}
|
|
1691
1755
|
}
|
|
1692
1756
|
class LiteralMapExpr extends Expression {
|
|
1757
|
+
entries;
|
|
1758
|
+
valueType = null;
|
|
1693
1759
|
constructor(entries, type, sourceSpan) {
|
|
1694
1760
|
super(type, sourceSpan);
|
|
1695
1761
|
this.entries = entries;
|
|
1696
|
-
this.valueType = null;
|
|
1697
1762
|
if (type) {
|
|
1698
1763
|
this.valueType = type.valueType;
|
|
1699
1764
|
}
|
|
@@ -1713,6 +1778,7 @@ class LiteralMapExpr extends Expression {
|
|
|
1713
1778
|
}
|
|
1714
1779
|
}
|
|
1715
1780
|
class CommaExpr extends Expression {
|
|
1781
|
+
parts;
|
|
1716
1782
|
constructor(parts, sourceSpan) {
|
|
1717
1783
|
super(parts[parts.length - 1].type, sourceSpan);
|
|
1718
1784
|
this.parts = parts;
|
|
@@ -1742,6 +1808,9 @@ var StmtModifier;
|
|
|
1742
1808
|
StmtModifier[StmtModifier["Static"] = 8] = "Static";
|
|
1743
1809
|
})(StmtModifier || (StmtModifier = {}));
|
|
1744
1810
|
class LeadingComment {
|
|
1811
|
+
text;
|
|
1812
|
+
multiline;
|
|
1813
|
+
trailingNewline;
|
|
1745
1814
|
constructor(text, multiline, trailingNewline) {
|
|
1746
1815
|
this.text = text;
|
|
1747
1816
|
this.multiline = multiline;
|
|
@@ -1752,6 +1821,7 @@ class LeadingComment {
|
|
|
1752
1821
|
}
|
|
1753
1822
|
}
|
|
1754
1823
|
class JSDocComment extends LeadingComment {
|
|
1824
|
+
tags;
|
|
1755
1825
|
constructor(tags) {
|
|
1756
1826
|
super('', /* multiline */ true, /* trailingNewline */ true);
|
|
1757
1827
|
this.tags = tags;
|
|
@@ -1761,6 +1831,9 @@ class JSDocComment extends LeadingComment {
|
|
|
1761
1831
|
}
|
|
1762
1832
|
}
|
|
1763
1833
|
class Statement {
|
|
1834
|
+
modifiers;
|
|
1835
|
+
sourceSpan;
|
|
1836
|
+
leadingComments;
|
|
1764
1837
|
constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) {
|
|
1765
1838
|
this.modifiers = modifiers;
|
|
1766
1839
|
this.sourceSpan = sourceSpan;
|
|
@@ -1775,6 +1848,9 @@ class Statement {
|
|
|
1775
1848
|
}
|
|
1776
1849
|
}
|
|
1777
1850
|
class DeclareVarStmt extends Statement {
|
|
1851
|
+
name;
|
|
1852
|
+
value;
|
|
1853
|
+
type;
|
|
1778
1854
|
constructor(name, value, type, modifiers, sourceSpan, leadingComments) {
|
|
1779
1855
|
super(modifiers, sourceSpan, leadingComments);
|
|
1780
1856
|
this.name = name;
|
|
@@ -1791,6 +1867,10 @@ class DeclareVarStmt extends Statement {
|
|
|
1791
1867
|
}
|
|
1792
1868
|
}
|
|
1793
1869
|
class DeclareFunctionStmt extends Statement {
|
|
1870
|
+
name;
|
|
1871
|
+
params;
|
|
1872
|
+
statements;
|
|
1873
|
+
type;
|
|
1794
1874
|
constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) {
|
|
1795
1875
|
super(modifiers, sourceSpan, leadingComments);
|
|
1796
1876
|
this.name = name;
|
|
@@ -1808,6 +1888,7 @@ class DeclareFunctionStmt extends Statement {
|
|
|
1808
1888
|
}
|
|
1809
1889
|
}
|
|
1810
1890
|
class ExpressionStatement extends Statement {
|
|
1891
|
+
expr;
|
|
1811
1892
|
constructor(expr, sourceSpan, leadingComments) {
|
|
1812
1893
|
super(StmtModifier.None, sourceSpan, leadingComments);
|
|
1813
1894
|
this.expr = expr;
|
|
@@ -1820,6 +1901,7 @@ class ExpressionStatement extends Statement {
|
|
|
1820
1901
|
}
|
|
1821
1902
|
}
|
|
1822
1903
|
class ReturnStatement extends Statement {
|
|
1904
|
+
value;
|
|
1823
1905
|
constructor(value, sourceSpan = null, leadingComments) {
|
|
1824
1906
|
super(StmtModifier.None, sourceSpan, leadingComments);
|
|
1825
1907
|
this.value = value;
|
|
@@ -1832,6 +1914,9 @@ class ReturnStatement extends Statement {
|
|
|
1832
1914
|
}
|
|
1833
1915
|
}
|
|
1834
1916
|
class IfStmt extends Statement {
|
|
1917
|
+
condition;
|
|
1918
|
+
trueCase;
|
|
1919
|
+
falseCase;
|
|
1835
1920
|
constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) {
|
|
1836
1921
|
super(StmtModifier.None, sourceSpan, leadingComments);
|
|
1837
1922
|
this.condition = condition;
|
|
@@ -1950,7 +2035,9 @@ class RecursiveAstVisitor$1 {
|
|
|
1950
2035
|
this.visitAllStatements(ast.body, context);
|
|
1951
2036
|
}
|
|
1952
2037
|
else {
|
|
1953
|
-
this.
|
|
2038
|
+
// Note: `body.visitExpression`, rather than `this.visitExpressiont(body)`,
|
|
2039
|
+
// because the latter won't recurse into the sub-expressions.
|
|
2040
|
+
ast.body.visitExpression(this, context);
|
|
1954
2041
|
}
|
|
1955
2042
|
return this.visitExpression(ast, context);
|
|
1956
2043
|
}
|
|
@@ -2232,10 +2319,12 @@ const POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;
|
|
|
2232
2319
|
* change the referenced expression.
|
|
2233
2320
|
*/
|
|
2234
2321
|
class FixupExpression extends Expression {
|
|
2322
|
+
resolved;
|
|
2323
|
+
original;
|
|
2324
|
+
shared = false;
|
|
2235
2325
|
constructor(resolved) {
|
|
2236
2326
|
super(resolved.type);
|
|
2237
2327
|
this.resolved = resolved;
|
|
2238
|
-
this.shared = false;
|
|
2239
2328
|
this.original = resolved;
|
|
2240
2329
|
}
|
|
2241
2330
|
visitExpression(visitor, context) {
|
|
@@ -2268,20 +2357,21 @@ class FixupExpression extends Expression {
|
|
|
2268
2357
|
* The constant pool also supports sharing access to ivy definitions references.
|
|
2269
2358
|
*/
|
|
2270
2359
|
class ConstantPool {
|
|
2360
|
+
isClosureCompilerEnabled;
|
|
2361
|
+
statements = [];
|
|
2362
|
+
literals = new Map();
|
|
2363
|
+
literalFactories = new Map();
|
|
2364
|
+
sharedConstants = new Map();
|
|
2365
|
+
/**
|
|
2366
|
+
* Constant pool also tracks claimed names from {@link uniqueName}.
|
|
2367
|
+
* This is useful to avoid collisions if variables are intended to be
|
|
2368
|
+
* named a certain way- but may conflict. We wouldn't want to always suffix
|
|
2369
|
+
* them with unique numbers.
|
|
2370
|
+
*/
|
|
2371
|
+
_claimedNames = new Map();
|
|
2372
|
+
nextNameIndex = 0;
|
|
2271
2373
|
constructor(isClosureCompilerEnabled = false) {
|
|
2272
2374
|
this.isClosureCompilerEnabled = isClosureCompilerEnabled;
|
|
2273
|
-
this.statements = [];
|
|
2274
|
-
this.literals = new Map();
|
|
2275
|
-
this.literalFactories = new Map();
|
|
2276
|
-
this.sharedConstants = new Map();
|
|
2277
|
-
/**
|
|
2278
|
-
* Constant pool also tracks claimed names from {@link uniqueName}.
|
|
2279
|
-
* This is useful to avoid collisions if variables are intended to be
|
|
2280
|
-
* named a certain way- but may conflict. We wouldn't want to always suffix
|
|
2281
|
-
* them with unique numbers.
|
|
2282
|
-
*/
|
|
2283
|
-
this._claimedNames = new Map();
|
|
2284
|
-
this.nextNameIndex = 0;
|
|
2285
2375
|
}
|
|
2286
2376
|
getConstLiteral(literal, forceShared) {
|
|
2287
2377
|
if ((literal instanceof LiteralExpr && !isLongStringLiteral(literal)) ||
|
|
@@ -2427,7 +2517,7 @@ class ConstantPool {
|
|
|
2427
2517
|
}
|
|
2428
2518
|
}
|
|
2429
2519
|
class GenericKeyFn {
|
|
2430
|
-
static
|
|
2520
|
+
static INSTANCE = new GenericKeyFn();
|
|
2431
2521
|
keyOf(expr) {
|
|
2432
2522
|
if (expr instanceof LiteralExpr && typeof expr.value === 'string') {
|
|
2433
2523
|
return `"${expr.value}"`;
|
|
@@ -2479,505 +2569,504 @@ function isLongStringLiteral(expr) {
|
|
|
2479
2569
|
const CORE = '@angular/core';
|
|
2480
2570
|
class Identifiers {
|
|
2481
2571
|
/* Methods */
|
|
2482
|
-
static
|
|
2483
|
-
static
|
|
2484
|
-
static
|
|
2485
|
-
static
|
|
2572
|
+
static NEW_METHOD = 'factory';
|
|
2573
|
+
static TRANSFORM_METHOD = 'transform';
|
|
2574
|
+
static PATCH_DEPS = 'patchedDeps';
|
|
2575
|
+
static core = { name: null, moduleName: CORE };
|
|
2486
2576
|
/* Instructions */
|
|
2487
|
-
static
|
|
2488
|
-
static
|
|
2489
|
-
static
|
|
2490
|
-
static
|
|
2491
|
-
static
|
|
2492
|
-
static
|
|
2493
|
-
static
|
|
2494
|
-
static
|
|
2577
|
+
static namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE };
|
|
2578
|
+
static namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE };
|
|
2579
|
+
static namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE };
|
|
2580
|
+
static element = { name: 'ɵɵelement', moduleName: CORE };
|
|
2581
|
+
static elementStart = { name: 'ɵɵelementStart', moduleName: CORE };
|
|
2582
|
+
static elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE };
|
|
2583
|
+
static advance = { name: 'ɵɵadvance', moduleName: CORE };
|
|
2584
|
+
static syntheticHostProperty = {
|
|
2495
2585
|
name: 'ɵɵsyntheticHostProperty',
|
|
2496
2586
|
moduleName: CORE,
|
|
2497
|
-
};
|
|
2498
|
-
static
|
|
2587
|
+
};
|
|
2588
|
+
static syntheticHostListener = {
|
|
2499
2589
|
name: 'ɵɵsyntheticHostListener',
|
|
2500
2590
|
moduleName: CORE,
|
|
2501
|
-
};
|
|
2502
|
-
static
|
|
2503
|
-
static
|
|
2591
|
+
};
|
|
2592
|
+
static attribute = { name: 'ɵɵattribute', moduleName: CORE };
|
|
2593
|
+
static attributeInterpolate1 = {
|
|
2504
2594
|
name: 'ɵɵattributeInterpolate1',
|
|
2505
2595
|
moduleName: CORE,
|
|
2506
|
-
};
|
|
2507
|
-
static
|
|
2596
|
+
};
|
|
2597
|
+
static attributeInterpolate2 = {
|
|
2508
2598
|
name: 'ɵɵattributeInterpolate2',
|
|
2509
2599
|
moduleName: CORE,
|
|
2510
|
-
};
|
|
2511
|
-
static
|
|
2600
|
+
};
|
|
2601
|
+
static attributeInterpolate3 = {
|
|
2512
2602
|
name: 'ɵɵattributeInterpolate3',
|
|
2513
2603
|
moduleName: CORE,
|
|
2514
|
-
};
|
|
2515
|
-
static
|
|
2604
|
+
};
|
|
2605
|
+
static attributeInterpolate4 = {
|
|
2516
2606
|
name: 'ɵɵattributeInterpolate4',
|
|
2517
2607
|
moduleName: CORE,
|
|
2518
|
-
};
|
|
2519
|
-
static
|
|
2608
|
+
};
|
|
2609
|
+
static attributeInterpolate5 = {
|
|
2520
2610
|
name: 'ɵɵattributeInterpolate5',
|
|
2521
2611
|
moduleName: CORE,
|
|
2522
|
-
};
|
|
2523
|
-
static
|
|
2612
|
+
};
|
|
2613
|
+
static attributeInterpolate6 = {
|
|
2524
2614
|
name: 'ɵɵattributeInterpolate6',
|
|
2525
2615
|
moduleName: CORE,
|
|
2526
|
-
};
|
|
2527
|
-
static
|
|
2616
|
+
};
|
|
2617
|
+
static attributeInterpolate7 = {
|
|
2528
2618
|
name: 'ɵɵattributeInterpolate7',
|
|
2529
2619
|
moduleName: CORE,
|
|
2530
|
-
};
|
|
2531
|
-
static
|
|
2620
|
+
};
|
|
2621
|
+
static attributeInterpolate8 = {
|
|
2532
2622
|
name: 'ɵɵattributeInterpolate8',
|
|
2533
2623
|
moduleName: CORE,
|
|
2534
|
-
};
|
|
2535
|
-
static
|
|
2624
|
+
};
|
|
2625
|
+
static attributeInterpolateV = {
|
|
2536
2626
|
name: 'ɵɵattributeInterpolateV',
|
|
2537
2627
|
moduleName: CORE,
|
|
2538
|
-
};
|
|
2539
|
-
static
|
|
2540
|
-
static
|
|
2628
|
+
};
|
|
2629
|
+
static classProp = { name: 'ɵɵclassProp', moduleName: CORE };
|
|
2630
|
+
static elementContainerStart = {
|
|
2541
2631
|
name: 'ɵɵelementContainerStart',
|
|
2542
2632
|
moduleName: CORE,
|
|
2543
|
-
};
|
|
2544
|
-
static
|
|
2633
|
+
};
|
|
2634
|
+
static elementContainerEnd = {
|
|
2545
2635
|
name: 'ɵɵelementContainerEnd',
|
|
2546
2636
|
moduleName: CORE,
|
|
2547
|
-
};
|
|
2548
|
-
static
|
|
2549
|
-
static
|
|
2550
|
-
static
|
|
2637
|
+
};
|
|
2638
|
+
static elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE };
|
|
2639
|
+
static styleMap = { name: 'ɵɵstyleMap', moduleName: CORE };
|
|
2640
|
+
static styleMapInterpolate1 = {
|
|
2551
2641
|
name: 'ɵɵstyleMapInterpolate1',
|
|
2552
2642
|
moduleName: CORE,
|
|
2553
|
-
};
|
|
2554
|
-
static
|
|
2643
|
+
};
|
|
2644
|
+
static styleMapInterpolate2 = {
|
|
2555
2645
|
name: 'ɵɵstyleMapInterpolate2',
|
|
2556
2646
|
moduleName: CORE,
|
|
2557
|
-
};
|
|
2558
|
-
static
|
|
2647
|
+
};
|
|
2648
|
+
static styleMapInterpolate3 = {
|
|
2559
2649
|
name: 'ɵɵstyleMapInterpolate3',
|
|
2560
2650
|
moduleName: CORE,
|
|
2561
|
-
};
|
|
2562
|
-
static
|
|
2651
|
+
};
|
|
2652
|
+
static styleMapInterpolate4 = {
|
|
2563
2653
|
name: 'ɵɵstyleMapInterpolate4',
|
|
2564
2654
|
moduleName: CORE,
|
|
2565
|
-
};
|
|
2566
|
-
static
|
|
2655
|
+
};
|
|
2656
|
+
static styleMapInterpolate5 = {
|
|
2567
2657
|
name: 'ɵɵstyleMapInterpolate5',
|
|
2568
2658
|
moduleName: CORE,
|
|
2569
|
-
};
|
|
2570
|
-
static
|
|
2659
|
+
};
|
|
2660
|
+
static styleMapInterpolate6 = {
|
|
2571
2661
|
name: 'ɵɵstyleMapInterpolate6',
|
|
2572
2662
|
moduleName: CORE,
|
|
2573
|
-
};
|
|
2574
|
-
static
|
|
2663
|
+
};
|
|
2664
|
+
static styleMapInterpolate7 = {
|
|
2575
2665
|
name: 'ɵɵstyleMapInterpolate7',
|
|
2576
2666
|
moduleName: CORE,
|
|
2577
|
-
};
|
|
2578
|
-
static
|
|
2667
|
+
};
|
|
2668
|
+
static styleMapInterpolate8 = {
|
|
2579
2669
|
name: 'ɵɵstyleMapInterpolate8',
|
|
2580
2670
|
moduleName: CORE,
|
|
2581
|
-
};
|
|
2582
|
-
static
|
|
2671
|
+
};
|
|
2672
|
+
static styleMapInterpolateV = {
|
|
2583
2673
|
name: 'ɵɵstyleMapInterpolateV',
|
|
2584
2674
|
moduleName: CORE,
|
|
2585
|
-
};
|
|
2586
|
-
static
|
|
2587
|
-
static
|
|
2675
|
+
};
|
|
2676
|
+
static classMap = { name: 'ɵɵclassMap', moduleName: CORE };
|
|
2677
|
+
static classMapInterpolate1 = {
|
|
2588
2678
|
name: 'ɵɵclassMapInterpolate1',
|
|
2589
2679
|
moduleName: CORE,
|
|
2590
|
-
};
|
|
2591
|
-
static
|
|
2680
|
+
};
|
|
2681
|
+
static classMapInterpolate2 = {
|
|
2592
2682
|
name: 'ɵɵclassMapInterpolate2',
|
|
2593
2683
|
moduleName: CORE,
|
|
2594
|
-
};
|
|
2595
|
-
static
|
|
2684
|
+
};
|
|
2685
|
+
static classMapInterpolate3 = {
|
|
2596
2686
|
name: 'ɵɵclassMapInterpolate3',
|
|
2597
2687
|
moduleName: CORE,
|
|
2598
|
-
};
|
|
2599
|
-
static
|
|
2688
|
+
};
|
|
2689
|
+
static classMapInterpolate4 = {
|
|
2600
2690
|
name: 'ɵɵclassMapInterpolate4',
|
|
2601
2691
|
moduleName: CORE,
|
|
2602
|
-
};
|
|
2603
|
-
static
|
|
2692
|
+
};
|
|
2693
|
+
static classMapInterpolate5 = {
|
|
2604
2694
|
name: 'ɵɵclassMapInterpolate5',
|
|
2605
2695
|
moduleName: CORE,
|
|
2606
|
-
};
|
|
2607
|
-
static
|
|
2696
|
+
};
|
|
2697
|
+
static classMapInterpolate6 = {
|
|
2608
2698
|
name: 'ɵɵclassMapInterpolate6',
|
|
2609
2699
|
moduleName: CORE,
|
|
2610
|
-
};
|
|
2611
|
-
static
|
|
2700
|
+
};
|
|
2701
|
+
static classMapInterpolate7 = {
|
|
2612
2702
|
name: 'ɵɵclassMapInterpolate7',
|
|
2613
2703
|
moduleName: CORE,
|
|
2614
|
-
};
|
|
2615
|
-
static
|
|
2704
|
+
};
|
|
2705
|
+
static classMapInterpolate8 = {
|
|
2616
2706
|
name: 'ɵɵclassMapInterpolate8',
|
|
2617
2707
|
moduleName: CORE,
|
|
2618
|
-
};
|
|
2619
|
-
static
|
|
2708
|
+
};
|
|
2709
|
+
static classMapInterpolateV = {
|
|
2620
2710
|
name: 'ɵɵclassMapInterpolateV',
|
|
2621
2711
|
moduleName: CORE,
|
|
2622
|
-
};
|
|
2623
|
-
static
|
|
2624
|
-
static
|
|
2712
|
+
};
|
|
2713
|
+
static styleProp = { name: 'ɵɵstyleProp', moduleName: CORE };
|
|
2714
|
+
static stylePropInterpolate1 = {
|
|
2625
2715
|
name: 'ɵɵstylePropInterpolate1',
|
|
2626
2716
|
moduleName: CORE,
|
|
2627
|
-
};
|
|
2628
|
-
static
|
|
2717
|
+
};
|
|
2718
|
+
static stylePropInterpolate2 = {
|
|
2629
2719
|
name: 'ɵɵstylePropInterpolate2',
|
|
2630
2720
|
moduleName: CORE,
|
|
2631
|
-
};
|
|
2632
|
-
static
|
|
2721
|
+
};
|
|
2722
|
+
static stylePropInterpolate3 = {
|
|
2633
2723
|
name: 'ɵɵstylePropInterpolate3',
|
|
2634
2724
|
moduleName: CORE,
|
|
2635
|
-
};
|
|
2636
|
-
static
|
|
2725
|
+
};
|
|
2726
|
+
static stylePropInterpolate4 = {
|
|
2637
2727
|
name: 'ɵɵstylePropInterpolate4',
|
|
2638
2728
|
moduleName: CORE,
|
|
2639
|
-
};
|
|
2640
|
-
static
|
|
2729
|
+
};
|
|
2730
|
+
static stylePropInterpolate5 = {
|
|
2641
2731
|
name: 'ɵɵstylePropInterpolate5',
|
|
2642
2732
|
moduleName: CORE,
|
|
2643
|
-
};
|
|
2644
|
-
static
|
|
2733
|
+
};
|
|
2734
|
+
static stylePropInterpolate6 = {
|
|
2645
2735
|
name: 'ɵɵstylePropInterpolate6',
|
|
2646
2736
|
moduleName: CORE,
|
|
2647
|
-
};
|
|
2648
|
-
static
|
|
2737
|
+
};
|
|
2738
|
+
static stylePropInterpolate7 = {
|
|
2649
2739
|
name: 'ɵɵstylePropInterpolate7',
|
|
2650
2740
|
moduleName: CORE,
|
|
2651
|
-
};
|
|
2652
|
-
static
|
|
2741
|
+
};
|
|
2742
|
+
static stylePropInterpolate8 = {
|
|
2653
2743
|
name: 'ɵɵstylePropInterpolate8',
|
|
2654
2744
|
moduleName: CORE,
|
|
2655
|
-
};
|
|
2656
|
-
static
|
|
2745
|
+
};
|
|
2746
|
+
static stylePropInterpolateV = {
|
|
2657
2747
|
name: 'ɵɵstylePropInterpolateV',
|
|
2658
2748
|
moduleName: CORE,
|
|
2659
|
-
};
|
|
2660
|
-
static
|
|
2661
|
-
static
|
|
2662
|
-
static
|
|
2663
|
-
static
|
|
2664
|
-
static
|
|
2665
|
-
static
|
|
2666
|
-
static
|
|
2667
|
-
static
|
|
2668
|
-
static
|
|
2669
|
-
static
|
|
2670
|
-
static
|
|
2671
|
-
static
|
|
2672
|
-
static
|
|
2749
|
+
};
|
|
2750
|
+
static nextContext = { name: 'ɵɵnextContext', moduleName: CORE };
|
|
2751
|
+
static resetView = { name: 'ɵɵresetView', moduleName: CORE };
|
|
2752
|
+
static templateCreate = { name: 'ɵɵtemplate', moduleName: CORE };
|
|
2753
|
+
static defer = { name: 'ɵɵdefer', moduleName: CORE };
|
|
2754
|
+
static deferWhen = { name: 'ɵɵdeferWhen', moduleName: CORE };
|
|
2755
|
+
static deferOnIdle = { name: 'ɵɵdeferOnIdle', moduleName: CORE };
|
|
2756
|
+
static deferOnImmediate = { name: 'ɵɵdeferOnImmediate', moduleName: CORE };
|
|
2757
|
+
static deferOnTimer = { name: 'ɵɵdeferOnTimer', moduleName: CORE };
|
|
2758
|
+
static deferOnHover = { name: 'ɵɵdeferOnHover', moduleName: CORE };
|
|
2759
|
+
static deferOnInteraction = { name: 'ɵɵdeferOnInteraction', moduleName: CORE };
|
|
2760
|
+
static deferOnViewport = { name: 'ɵɵdeferOnViewport', moduleName: CORE };
|
|
2761
|
+
static deferPrefetchWhen = { name: 'ɵɵdeferPrefetchWhen', moduleName: CORE };
|
|
2762
|
+
static deferPrefetchOnIdle = {
|
|
2673
2763
|
name: 'ɵɵdeferPrefetchOnIdle',
|
|
2674
2764
|
moduleName: CORE,
|
|
2675
|
-
};
|
|
2676
|
-
static
|
|
2765
|
+
};
|
|
2766
|
+
static deferPrefetchOnImmediate = {
|
|
2677
2767
|
name: 'ɵɵdeferPrefetchOnImmediate',
|
|
2678
2768
|
moduleName: CORE,
|
|
2679
|
-
};
|
|
2680
|
-
static
|
|
2769
|
+
};
|
|
2770
|
+
static deferPrefetchOnTimer = {
|
|
2681
2771
|
name: 'ɵɵdeferPrefetchOnTimer',
|
|
2682
2772
|
moduleName: CORE,
|
|
2683
|
-
};
|
|
2684
|
-
static
|
|
2773
|
+
};
|
|
2774
|
+
static deferPrefetchOnHover = {
|
|
2685
2775
|
name: 'ɵɵdeferPrefetchOnHover',
|
|
2686
2776
|
moduleName: CORE,
|
|
2687
|
-
};
|
|
2688
|
-
static
|
|
2777
|
+
};
|
|
2778
|
+
static deferPrefetchOnInteraction = {
|
|
2689
2779
|
name: 'ɵɵdeferPrefetchOnInteraction',
|
|
2690
2780
|
moduleName: CORE,
|
|
2691
|
-
};
|
|
2692
|
-
static
|
|
2781
|
+
};
|
|
2782
|
+
static deferPrefetchOnViewport = {
|
|
2693
2783
|
name: 'ɵɵdeferPrefetchOnViewport',
|
|
2694
2784
|
moduleName: CORE,
|
|
2695
|
-
};
|
|
2696
|
-
static
|
|
2697
|
-
static
|
|
2698
|
-
static
|
|
2785
|
+
};
|
|
2786
|
+
static deferHydrateWhen = { name: 'ɵɵdeferHydrateWhen', moduleName: CORE };
|
|
2787
|
+
static deferHydrateNever = { name: 'ɵɵdeferHydrateNever', moduleName: CORE };
|
|
2788
|
+
static deferHydrateOnIdle = {
|
|
2699
2789
|
name: 'ɵɵdeferHydrateOnIdle',
|
|
2700
2790
|
moduleName: CORE,
|
|
2701
|
-
};
|
|
2702
|
-
static
|
|
2791
|
+
};
|
|
2792
|
+
static deferHydrateOnImmediate = {
|
|
2703
2793
|
name: 'ɵɵdeferHydrateOnImmediate',
|
|
2704
2794
|
moduleName: CORE,
|
|
2705
|
-
};
|
|
2706
|
-
static
|
|
2795
|
+
};
|
|
2796
|
+
static deferHydrateOnTimer = {
|
|
2707
2797
|
name: 'ɵɵdeferHydrateOnTimer',
|
|
2708
2798
|
moduleName: CORE,
|
|
2709
|
-
};
|
|
2710
|
-
static
|
|
2799
|
+
};
|
|
2800
|
+
static deferHydrateOnHover = {
|
|
2711
2801
|
name: 'ɵɵdeferHydrateOnHover',
|
|
2712
2802
|
moduleName: CORE,
|
|
2713
|
-
};
|
|
2714
|
-
static
|
|
2803
|
+
};
|
|
2804
|
+
static deferHydrateOnInteraction = {
|
|
2715
2805
|
name: 'ɵɵdeferHydrateOnInteraction',
|
|
2716
2806
|
moduleName: CORE,
|
|
2717
|
-
};
|
|
2718
|
-
static
|
|
2807
|
+
};
|
|
2808
|
+
static deferHydrateOnViewport = {
|
|
2719
2809
|
name: 'ɵɵdeferHydrateOnViewport',
|
|
2720
2810
|
moduleName: CORE,
|
|
2721
|
-
};
|
|
2722
|
-
static
|
|
2811
|
+
};
|
|
2812
|
+
static deferEnableTimerScheduling = {
|
|
2723
2813
|
name: 'ɵɵdeferEnableTimerScheduling',
|
|
2724
2814
|
moduleName: CORE,
|
|
2725
|
-
};
|
|
2726
|
-
static
|
|
2727
|
-
static
|
|
2728
|
-
static
|
|
2729
|
-
static
|
|
2815
|
+
};
|
|
2816
|
+
static conditional = { name: 'ɵɵconditional', moduleName: CORE };
|
|
2817
|
+
static repeater = { name: 'ɵɵrepeater', moduleName: CORE };
|
|
2818
|
+
static repeaterCreate = { name: 'ɵɵrepeaterCreate', moduleName: CORE };
|
|
2819
|
+
static repeaterTrackByIndex = {
|
|
2730
2820
|
name: 'ɵɵrepeaterTrackByIndex',
|
|
2731
2821
|
moduleName: CORE,
|
|
2732
|
-
};
|
|
2733
|
-
static
|
|
2822
|
+
};
|
|
2823
|
+
static repeaterTrackByIdentity = {
|
|
2734
2824
|
name: 'ɵɵrepeaterTrackByIdentity',
|
|
2735
2825
|
moduleName: CORE,
|
|
2736
|
-
};
|
|
2737
|
-
static
|
|
2738
|
-
static
|
|
2739
|
-
static
|
|
2740
|
-
static
|
|
2741
|
-
static
|
|
2742
|
-
static
|
|
2743
|
-
static
|
|
2744
|
-
static
|
|
2745
|
-
static
|
|
2746
|
-
static
|
|
2747
|
-
static
|
|
2748
|
-
static
|
|
2749
|
-
static
|
|
2750
|
-
static
|
|
2751
|
-
static
|
|
2752
|
-
static
|
|
2753
|
-
static
|
|
2754
|
-
static
|
|
2755
|
-
static
|
|
2756
|
-
static
|
|
2757
|
-
static
|
|
2758
|
-
static
|
|
2759
|
-
static
|
|
2760
|
-
static
|
|
2761
|
-
static
|
|
2762
|
-
static
|
|
2763
|
-
static
|
|
2764
|
-
static
|
|
2765
|
-
static
|
|
2766
|
-
static
|
|
2767
|
-
static
|
|
2768
|
-
static
|
|
2769
|
-
static
|
|
2770
|
-
static
|
|
2826
|
+
};
|
|
2827
|
+
static componentInstance = { name: 'ɵɵcomponentInstance', moduleName: CORE };
|
|
2828
|
+
static text = { name: 'ɵɵtext', moduleName: CORE };
|
|
2829
|
+
static enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE };
|
|
2830
|
+
static disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE };
|
|
2831
|
+
static getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE };
|
|
2832
|
+
static textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE };
|
|
2833
|
+
static textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE };
|
|
2834
|
+
static textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE };
|
|
2835
|
+
static textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE };
|
|
2836
|
+
static textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE };
|
|
2837
|
+
static textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE };
|
|
2838
|
+
static textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE };
|
|
2839
|
+
static textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE };
|
|
2840
|
+
static textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE };
|
|
2841
|
+
static textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE };
|
|
2842
|
+
static restoreView = { name: 'ɵɵrestoreView', moduleName: CORE };
|
|
2843
|
+
static pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE };
|
|
2844
|
+
static pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE };
|
|
2845
|
+
static pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE };
|
|
2846
|
+
static pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE };
|
|
2847
|
+
static pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE };
|
|
2848
|
+
static pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE };
|
|
2849
|
+
static pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE };
|
|
2850
|
+
static pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE };
|
|
2851
|
+
static pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE };
|
|
2852
|
+
static pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE };
|
|
2853
|
+
static pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE };
|
|
2854
|
+
static pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE };
|
|
2855
|
+
static pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };
|
|
2856
|
+
static pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };
|
|
2857
|
+
static pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };
|
|
2858
|
+
static hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };
|
|
2859
|
+
static property = { name: 'ɵɵproperty', moduleName: CORE };
|
|
2860
|
+
static propertyInterpolate = {
|
|
2771
2861
|
name: 'ɵɵpropertyInterpolate',
|
|
2772
2862
|
moduleName: CORE,
|
|
2773
|
-
};
|
|
2774
|
-
static
|
|
2863
|
+
};
|
|
2864
|
+
static propertyInterpolate1 = {
|
|
2775
2865
|
name: 'ɵɵpropertyInterpolate1',
|
|
2776
2866
|
moduleName: CORE,
|
|
2777
|
-
};
|
|
2778
|
-
static
|
|
2867
|
+
};
|
|
2868
|
+
static propertyInterpolate2 = {
|
|
2779
2869
|
name: 'ɵɵpropertyInterpolate2',
|
|
2780
2870
|
moduleName: CORE,
|
|
2781
|
-
};
|
|
2782
|
-
static
|
|
2871
|
+
};
|
|
2872
|
+
static propertyInterpolate3 = {
|
|
2783
2873
|
name: 'ɵɵpropertyInterpolate3',
|
|
2784
2874
|
moduleName: CORE,
|
|
2785
|
-
};
|
|
2786
|
-
static
|
|
2875
|
+
};
|
|
2876
|
+
static propertyInterpolate4 = {
|
|
2787
2877
|
name: 'ɵɵpropertyInterpolate4',
|
|
2788
2878
|
moduleName: CORE,
|
|
2789
|
-
};
|
|
2790
|
-
static
|
|
2879
|
+
};
|
|
2880
|
+
static propertyInterpolate5 = {
|
|
2791
2881
|
name: 'ɵɵpropertyInterpolate5',
|
|
2792
2882
|
moduleName: CORE,
|
|
2793
|
-
};
|
|
2794
|
-
static
|
|
2883
|
+
};
|
|
2884
|
+
static propertyInterpolate6 = {
|
|
2795
2885
|
name: 'ɵɵpropertyInterpolate6',
|
|
2796
2886
|
moduleName: CORE,
|
|
2797
|
-
};
|
|
2798
|
-
static
|
|
2887
|
+
};
|
|
2888
|
+
static propertyInterpolate7 = {
|
|
2799
2889
|
name: 'ɵɵpropertyInterpolate7',
|
|
2800
2890
|
moduleName: CORE,
|
|
2801
|
-
};
|
|
2802
|
-
static
|
|
2891
|
+
};
|
|
2892
|
+
static propertyInterpolate8 = {
|
|
2803
2893
|
name: 'ɵɵpropertyInterpolate8',
|
|
2804
2894
|
moduleName: CORE,
|
|
2805
|
-
};
|
|
2806
|
-
static
|
|
2895
|
+
};
|
|
2896
|
+
static propertyInterpolateV = {
|
|
2807
2897
|
name: 'ɵɵpropertyInterpolateV',
|
|
2808
2898
|
moduleName: CORE,
|
|
2809
|
-
};
|
|
2810
|
-
static
|
|
2811
|
-
static
|
|
2812
|
-
static
|
|
2813
|
-
static
|
|
2814
|
-
static
|
|
2815
|
-
static
|
|
2816
|
-
static
|
|
2817
|
-
static
|
|
2818
|
-
static
|
|
2819
|
-
static
|
|
2820
|
-
static
|
|
2821
|
-
static
|
|
2822
|
-
static
|
|
2823
|
-
static
|
|
2824
|
-
static
|
|
2825
|
-
static
|
|
2826
|
-
static
|
|
2899
|
+
};
|
|
2900
|
+
static i18n = { name: 'ɵɵi18n', moduleName: CORE };
|
|
2901
|
+
static i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE };
|
|
2902
|
+
static i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE };
|
|
2903
|
+
static i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE };
|
|
2904
|
+
static i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE };
|
|
2905
|
+
static i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE };
|
|
2906
|
+
static i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE };
|
|
2907
|
+
static pipe = { name: 'ɵɵpipe', moduleName: CORE };
|
|
2908
|
+
static projection = { name: 'ɵɵprojection', moduleName: CORE };
|
|
2909
|
+
static projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE };
|
|
2910
|
+
static reference = { name: 'ɵɵreference', moduleName: CORE };
|
|
2911
|
+
static inject = { name: 'ɵɵinject', moduleName: CORE };
|
|
2912
|
+
static injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE };
|
|
2913
|
+
static directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
|
|
2914
|
+
static invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE };
|
|
2915
|
+
static invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE };
|
|
2916
|
+
static templateRefExtractor = {
|
|
2827
2917
|
name: 'ɵɵtemplateRefExtractor',
|
|
2828
2918
|
moduleName: CORE,
|
|
2829
|
-
};
|
|
2830
|
-
static
|
|
2831
|
-
static
|
|
2832
|
-
static
|
|
2833
|
-
static
|
|
2834
|
-
static
|
|
2835
|
-
static
|
|
2919
|
+
};
|
|
2920
|
+
static forwardRef = { name: 'forwardRef', moduleName: CORE };
|
|
2921
|
+
static resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };
|
|
2922
|
+
static replaceMetadata = { name: 'ɵɵreplaceMetadata', moduleName: CORE };
|
|
2923
|
+
static ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };
|
|
2924
|
+
static declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };
|
|
2925
|
+
static InjectableDeclaration = {
|
|
2836
2926
|
name: 'ɵɵInjectableDeclaration',
|
|
2837
2927
|
moduleName: CORE,
|
|
2838
|
-
};
|
|
2839
|
-
static
|
|
2840
|
-
static
|
|
2841
|
-
static
|
|
2842
|
-
static
|
|
2928
|
+
};
|
|
2929
|
+
static resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE };
|
|
2930
|
+
static resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE };
|
|
2931
|
+
static resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE };
|
|
2932
|
+
static getComponentDepsFactory = {
|
|
2843
2933
|
name: 'ɵɵgetComponentDepsFactory',
|
|
2844
2934
|
moduleName: CORE,
|
|
2845
|
-
};
|
|
2846
|
-
static
|
|
2847
|
-
static
|
|
2848
|
-
static
|
|
2849
|
-
static
|
|
2935
|
+
};
|
|
2936
|
+
static defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE };
|
|
2937
|
+
static declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE };
|
|
2938
|
+
static setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE };
|
|
2939
|
+
static ChangeDetectionStrategy = {
|
|
2850
2940
|
name: 'ChangeDetectionStrategy',
|
|
2851
2941
|
moduleName: CORE,
|
|
2852
|
-
};
|
|
2853
|
-
static
|
|
2942
|
+
};
|
|
2943
|
+
static ViewEncapsulation = {
|
|
2854
2944
|
name: 'ViewEncapsulation',
|
|
2855
2945
|
moduleName: CORE,
|
|
2856
|
-
};
|
|
2857
|
-
static
|
|
2946
|
+
};
|
|
2947
|
+
static ComponentDeclaration = {
|
|
2858
2948
|
name: 'ɵɵComponentDeclaration',
|
|
2859
2949
|
moduleName: CORE,
|
|
2860
|
-
};
|
|
2861
|
-
static
|
|
2950
|
+
};
|
|
2951
|
+
static FactoryDeclaration = {
|
|
2862
2952
|
name: 'ɵɵFactoryDeclaration',
|
|
2863
2953
|
moduleName: CORE,
|
|
2864
|
-
};
|
|
2865
|
-
static
|
|
2866
|
-
static
|
|
2867
|
-
static
|
|
2868
|
-
static
|
|
2869
|
-
static
|
|
2954
|
+
};
|
|
2955
|
+
static declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE };
|
|
2956
|
+
static FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE };
|
|
2957
|
+
static defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE };
|
|
2958
|
+
static declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE };
|
|
2959
|
+
static DirectiveDeclaration = {
|
|
2870
2960
|
name: 'ɵɵDirectiveDeclaration',
|
|
2871
2961
|
moduleName: CORE,
|
|
2872
|
-
};
|
|
2873
|
-
static
|
|
2874
|
-
static
|
|
2962
|
+
};
|
|
2963
|
+
static InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE };
|
|
2964
|
+
static InjectorDeclaration = {
|
|
2875
2965
|
name: 'ɵɵInjectorDeclaration',
|
|
2876
2966
|
moduleName: CORE,
|
|
2877
|
-
};
|
|
2878
|
-
static
|
|
2879
|
-
static
|
|
2880
|
-
static
|
|
2967
|
+
};
|
|
2968
|
+
static defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE };
|
|
2969
|
+
static declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE };
|
|
2970
|
+
static NgModuleDeclaration = {
|
|
2881
2971
|
name: 'ɵɵNgModuleDeclaration',
|
|
2882
2972
|
moduleName: CORE,
|
|
2883
|
-
};
|
|
2884
|
-
static
|
|
2973
|
+
};
|
|
2974
|
+
static ModuleWithProviders = {
|
|
2885
2975
|
name: 'ModuleWithProviders',
|
|
2886
2976
|
moduleName: CORE,
|
|
2887
|
-
};
|
|
2888
|
-
static
|
|
2889
|
-
static
|
|
2890
|
-
static
|
|
2891
|
-
static
|
|
2977
|
+
};
|
|
2978
|
+
static defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE };
|
|
2979
|
+
static declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE };
|
|
2980
|
+
static setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE };
|
|
2981
|
+
static registerNgModuleType = {
|
|
2892
2982
|
name: 'ɵɵregisterNgModuleType',
|
|
2893
2983
|
moduleName: CORE,
|
|
2894
|
-
};
|
|
2895
|
-
static
|
|
2896
|
-
static
|
|
2897
|
-
static
|
|
2898
|
-
static
|
|
2984
|
+
};
|
|
2985
|
+
static PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE };
|
|
2986
|
+
static definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE };
|
|
2987
|
+
static declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE };
|
|
2988
|
+
static declareClassMetadata = {
|
|
2899
2989
|
name: 'ɵɵngDeclareClassMetadata',
|
|
2900
2990
|
moduleName: CORE,
|
|
2901
|
-
};
|
|
2902
|
-
static
|
|
2991
|
+
};
|
|
2992
|
+
static declareClassMetadataAsync = {
|
|
2903
2993
|
name: 'ɵɵngDeclareClassMetadataAsync',
|
|
2904
2994
|
moduleName: CORE,
|
|
2905
|
-
};
|
|
2906
|
-
static
|
|
2907
|
-
static
|
|
2995
|
+
};
|
|
2996
|
+
static setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE };
|
|
2997
|
+
static setClassMetadataAsync = {
|
|
2908
2998
|
name: 'ɵsetClassMetadataAsync',
|
|
2909
2999
|
moduleName: CORE,
|
|
2910
|
-
};
|
|
2911
|
-
static
|
|
2912
|
-
static
|
|
2913
|
-
static
|
|
2914
|
-
static
|
|
2915
|
-
static
|
|
3000
|
+
};
|
|
3001
|
+
static setClassDebugInfo = { name: 'ɵsetClassDebugInfo', moduleName: CORE };
|
|
3002
|
+
static queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE };
|
|
3003
|
+
static viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE };
|
|
3004
|
+
static loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE };
|
|
3005
|
+
static contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
|
|
2916
3006
|
// Signal queries
|
|
2917
|
-
static
|
|
2918
|
-
static
|
|
2919
|
-
static
|
|
3007
|
+
static viewQuerySignal = { name: 'ɵɵviewQuerySignal', moduleName: CORE };
|
|
3008
|
+
static contentQuerySignal = { name: 'ɵɵcontentQuerySignal', moduleName: CORE };
|
|
3009
|
+
static queryAdvance = { name: 'ɵɵqueryAdvance', moduleName: CORE };
|
|
2920
3010
|
// Two-way bindings
|
|
2921
|
-
static
|
|
2922
|
-
static
|
|
2923
|
-
static
|
|
2924
|
-
static
|
|
2925
|
-
static
|
|
2926
|
-
static
|
|
2927
|
-
static
|
|
2928
|
-
static
|
|
3011
|
+
static twoWayProperty = { name: 'ɵɵtwoWayProperty', moduleName: CORE };
|
|
3012
|
+
static twoWayBindingSet = { name: 'ɵɵtwoWayBindingSet', moduleName: CORE };
|
|
3013
|
+
static twoWayListener = { name: 'ɵɵtwoWayListener', moduleName: CORE };
|
|
3014
|
+
static declareLet = { name: 'ɵɵdeclareLet', moduleName: CORE };
|
|
3015
|
+
static storeLet = { name: 'ɵɵstoreLet', moduleName: CORE };
|
|
3016
|
+
static readContextLet = { name: 'ɵɵreadContextLet', moduleName: CORE };
|
|
3017
|
+
static NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
|
|
3018
|
+
static InheritDefinitionFeature = {
|
|
2929
3019
|
name: 'ɵɵInheritDefinitionFeature',
|
|
2930
3020
|
moduleName: CORE,
|
|
2931
|
-
};
|
|
2932
|
-
static
|
|
3021
|
+
};
|
|
3022
|
+
static CopyDefinitionFeature = {
|
|
2933
3023
|
name: 'ɵɵCopyDefinitionFeature',
|
|
2934
3024
|
moduleName: CORE,
|
|
2935
|
-
};
|
|
2936
|
-
static
|
|
2937
|
-
static
|
|
2938
|
-
static { this.HostDirectivesFeature = {
|
|
3025
|
+
};
|
|
3026
|
+
static ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
|
|
3027
|
+
static HostDirectivesFeature = {
|
|
2939
3028
|
name: 'ɵɵHostDirectivesFeature',
|
|
2940
3029
|
moduleName: CORE,
|
|
2941
|
-
};
|
|
2942
|
-
static
|
|
3030
|
+
};
|
|
3031
|
+
static InputTransformsFeatureFeature = {
|
|
2943
3032
|
name: 'ɵɵInputTransformsFeature',
|
|
2944
3033
|
moduleName: CORE,
|
|
2945
|
-
};
|
|
2946
|
-
static
|
|
3034
|
+
};
|
|
3035
|
+
static ExternalStylesFeature = {
|
|
2947
3036
|
name: 'ɵɵExternalStylesFeature',
|
|
2948
3037
|
moduleName: CORE,
|
|
2949
|
-
};
|
|
2950
|
-
static
|
|
2951
|
-
static
|
|
3038
|
+
};
|
|
3039
|
+
static listener = { name: 'ɵɵlistener', moduleName: CORE };
|
|
3040
|
+
static getInheritedFactory = {
|
|
2952
3041
|
name: 'ɵɵgetInheritedFactory',
|
|
2953
3042
|
moduleName: CORE,
|
|
2954
|
-
};
|
|
3043
|
+
};
|
|
2955
3044
|
// sanitization-related functions
|
|
2956
|
-
static
|
|
2957
|
-
static
|
|
2958
|
-
static
|
|
3045
|
+
static sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE };
|
|
3046
|
+
static sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE };
|
|
3047
|
+
static sanitizeResourceUrl = {
|
|
2959
3048
|
name: 'ɵɵsanitizeResourceUrl',
|
|
2960
3049
|
moduleName: CORE,
|
|
2961
|
-
};
|
|
2962
|
-
static
|
|
2963
|
-
static
|
|
2964
|
-
static
|
|
3050
|
+
};
|
|
3051
|
+
static sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE };
|
|
3052
|
+
static sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };
|
|
3053
|
+
static sanitizeUrlOrResourceUrl = {
|
|
2965
3054
|
name: 'ɵɵsanitizeUrlOrResourceUrl',
|
|
2966
3055
|
moduleName: CORE,
|
|
2967
|
-
};
|
|
2968
|
-
static
|
|
2969
|
-
static
|
|
3056
|
+
};
|
|
3057
|
+
static trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };
|
|
3058
|
+
static trustConstantResourceUrl = {
|
|
2970
3059
|
name: 'ɵɵtrustConstantResourceUrl',
|
|
2971
3060
|
moduleName: CORE,
|
|
2972
|
-
};
|
|
2973
|
-
static
|
|
3061
|
+
};
|
|
3062
|
+
static validateIframeAttribute = {
|
|
2974
3063
|
name: 'ɵɵvalidateIframeAttribute',
|
|
2975
3064
|
moduleName: CORE,
|
|
2976
|
-
};
|
|
3065
|
+
};
|
|
2977
3066
|
// type-checking
|
|
2978
|
-
static
|
|
2979
|
-
static
|
|
2980
|
-
static
|
|
3067
|
+
static InputSignalBrandWriteType = { name: 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE', moduleName: CORE };
|
|
3068
|
+
static UnwrapDirectiveSignalInputs = { name: 'ɵUnwrapDirectiveSignalInputs', moduleName: CORE };
|
|
3069
|
+
static unwrapWritableSignal = { name: 'ɵunwrapWritableSignal', moduleName: CORE };
|
|
2981
3070
|
}
|
|
2982
3071
|
|
|
2983
3072
|
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
@@ -3063,6 +3152,10 @@ function stringify(token) {
|
|
|
3063
3152
|
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
|
|
3064
3153
|
}
|
|
3065
3154
|
class Version {
|
|
3155
|
+
full;
|
|
3156
|
+
major;
|
|
3157
|
+
minor;
|
|
3158
|
+
patch;
|
|
3066
3159
|
constructor(full) {
|
|
3067
3160
|
this.full = full;
|
|
3068
3161
|
const splits = full.split('.');
|
|
@@ -3095,17 +3188,31 @@ function partitionArray(arr, conditionFn) {
|
|
|
3095
3188
|
}
|
|
3096
3189
|
return [truthy, falsy];
|
|
3097
3190
|
}
|
|
3191
|
+
const V1_TO_18 = /^([1-9]|1[0-8])\./;
|
|
3192
|
+
function getJitStandaloneDefaultForVersion(version) {
|
|
3193
|
+
if (version.startsWith('0.')) {
|
|
3194
|
+
// 0.0.0 is always "latest", default is true.
|
|
3195
|
+
return true;
|
|
3196
|
+
}
|
|
3197
|
+
if (V1_TO_18.test(version)) {
|
|
3198
|
+
// Angular v2 - v18 default is false.
|
|
3199
|
+
return false;
|
|
3200
|
+
}
|
|
3201
|
+
// All other Angular versions (v19+) default to true.
|
|
3202
|
+
return true;
|
|
3203
|
+
}
|
|
3098
3204
|
|
|
3099
3205
|
// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
|
|
3100
3206
|
const VERSION$1 = 3;
|
|
3101
3207
|
const JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';
|
|
3102
3208
|
class SourceMapGenerator {
|
|
3209
|
+
file;
|
|
3210
|
+
sourcesContent = new Map();
|
|
3211
|
+
lines = [];
|
|
3212
|
+
lastCol0 = 0;
|
|
3213
|
+
hasMappings = false;
|
|
3103
3214
|
constructor(file = null) {
|
|
3104
3215
|
this.file = file;
|
|
3105
|
-
this.sourcesContent = new Map();
|
|
3106
|
-
this.lines = [];
|
|
3107
|
-
this.lastCol0 = 0;
|
|
3108
|
-
this.hasMappings = false;
|
|
3109
3216
|
}
|
|
3110
3217
|
// The content is `null` when the content is expected to be loaded using the URL
|
|
3111
3218
|
addSource(url, content = null) {
|
|
@@ -3242,17 +3349,20 @@ const _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
|
3242
3349
|
const _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
3243
3350
|
const _INDENT_WITH = ' ';
|
|
3244
3351
|
class _EmittedLine {
|
|
3352
|
+
indent;
|
|
3353
|
+
partsLength = 0;
|
|
3354
|
+
parts = [];
|
|
3355
|
+
srcSpans = [];
|
|
3245
3356
|
constructor(indent) {
|
|
3246
3357
|
this.indent = indent;
|
|
3247
|
-
this.partsLength = 0;
|
|
3248
|
-
this.parts = [];
|
|
3249
|
-
this.srcSpans = [];
|
|
3250
3358
|
}
|
|
3251
3359
|
}
|
|
3252
3360
|
class EmitterVisitorContext {
|
|
3361
|
+
_indent;
|
|
3253
3362
|
static createRoot() {
|
|
3254
3363
|
return new EmitterVisitorContext(0);
|
|
3255
3364
|
}
|
|
3365
|
+
_lines;
|
|
3256
3366
|
constructor(_indent) {
|
|
3257
3367
|
this._indent = _indent;
|
|
3258
3368
|
this._lines = [new _EmittedLine(_indent)];
|
|
@@ -3383,6 +3493,7 @@ class EmitterVisitorContext {
|
|
|
3383
3493
|
}
|
|
3384
3494
|
}
|
|
3385
3495
|
class AbstractEmitterVisitor {
|
|
3496
|
+
_escapeDollarInStrings;
|
|
3386
3497
|
constructor(_escapeDollarInStrings) {
|
|
3387
3498
|
this._escapeDollarInStrings = _escapeDollarInStrings;
|
|
3388
3499
|
}
|
|
@@ -4030,6 +4141,10 @@ function getInjectFn(target) {
|
|
|
4030
4141
|
}
|
|
4031
4142
|
|
|
4032
4143
|
class ParserError {
|
|
4144
|
+
input;
|
|
4145
|
+
errLocation;
|
|
4146
|
+
ctxLocation;
|
|
4147
|
+
message;
|
|
4033
4148
|
constructor(message, input, errLocation, ctxLocation) {
|
|
4034
4149
|
this.input = input;
|
|
4035
4150
|
this.errLocation = errLocation;
|
|
@@ -4038,6 +4153,8 @@ class ParserError {
|
|
|
4038
4153
|
}
|
|
4039
4154
|
}
|
|
4040
4155
|
class ParseSpan {
|
|
4156
|
+
start;
|
|
4157
|
+
end;
|
|
4041
4158
|
constructor(start, end) {
|
|
4042
4159
|
this.start = start;
|
|
4043
4160
|
this.end = end;
|
|
@@ -4047,6 +4164,8 @@ class ParseSpan {
|
|
|
4047
4164
|
}
|
|
4048
4165
|
}
|
|
4049
4166
|
class AST {
|
|
4167
|
+
span;
|
|
4168
|
+
sourceSpan;
|
|
4050
4169
|
constructor(span,
|
|
4051
4170
|
/**
|
|
4052
4171
|
* Absolute location of the expression AST in a source code file.
|
|
@@ -4060,6 +4179,7 @@ class AST {
|
|
|
4060
4179
|
}
|
|
4061
4180
|
}
|
|
4062
4181
|
class ASTWithName extends AST {
|
|
4182
|
+
nameSpan;
|
|
4063
4183
|
constructor(span, sourceSpan, nameSpan) {
|
|
4064
4184
|
super(span, sourceSpan);
|
|
4065
4185
|
this.nameSpan = nameSpan;
|
|
@@ -4092,6 +4212,7 @@ class ThisReceiver extends ImplicitReceiver {
|
|
|
4092
4212
|
* Multiple expressions separated by a semicolon.
|
|
4093
4213
|
*/
|
|
4094
4214
|
class Chain extends AST {
|
|
4215
|
+
expressions;
|
|
4095
4216
|
constructor(span, sourceSpan, expressions) {
|
|
4096
4217
|
super(span, sourceSpan);
|
|
4097
4218
|
this.expressions = expressions;
|
|
@@ -4101,6 +4222,9 @@ class Chain extends AST {
|
|
|
4101
4222
|
}
|
|
4102
4223
|
}
|
|
4103
4224
|
class Conditional extends AST {
|
|
4225
|
+
condition;
|
|
4226
|
+
trueExp;
|
|
4227
|
+
falseExp;
|
|
4104
4228
|
constructor(span, sourceSpan, condition, trueExp, falseExp) {
|
|
4105
4229
|
super(span, sourceSpan);
|
|
4106
4230
|
this.condition = condition;
|
|
@@ -4112,6 +4236,8 @@ class Conditional extends AST {
|
|
|
4112
4236
|
}
|
|
4113
4237
|
}
|
|
4114
4238
|
class PropertyRead extends ASTWithName {
|
|
4239
|
+
receiver;
|
|
4240
|
+
name;
|
|
4115
4241
|
constructor(span, sourceSpan, nameSpan, receiver, name) {
|
|
4116
4242
|
super(span, sourceSpan, nameSpan);
|
|
4117
4243
|
this.receiver = receiver;
|
|
@@ -4122,6 +4248,9 @@ class PropertyRead extends ASTWithName {
|
|
|
4122
4248
|
}
|
|
4123
4249
|
}
|
|
4124
4250
|
class PropertyWrite extends ASTWithName {
|
|
4251
|
+
receiver;
|
|
4252
|
+
name;
|
|
4253
|
+
value;
|
|
4125
4254
|
constructor(span, sourceSpan, nameSpan, receiver, name, value) {
|
|
4126
4255
|
super(span, sourceSpan, nameSpan);
|
|
4127
4256
|
this.receiver = receiver;
|
|
@@ -4133,6 +4262,8 @@ class PropertyWrite extends ASTWithName {
|
|
|
4133
4262
|
}
|
|
4134
4263
|
}
|
|
4135
4264
|
class SafePropertyRead extends ASTWithName {
|
|
4265
|
+
receiver;
|
|
4266
|
+
name;
|
|
4136
4267
|
constructor(span, sourceSpan, nameSpan, receiver, name) {
|
|
4137
4268
|
super(span, sourceSpan, nameSpan);
|
|
4138
4269
|
this.receiver = receiver;
|
|
@@ -4143,6 +4274,8 @@ class SafePropertyRead extends ASTWithName {
|
|
|
4143
4274
|
}
|
|
4144
4275
|
}
|
|
4145
4276
|
class KeyedRead extends AST {
|
|
4277
|
+
receiver;
|
|
4278
|
+
key;
|
|
4146
4279
|
constructor(span, sourceSpan, receiver, key) {
|
|
4147
4280
|
super(span, sourceSpan);
|
|
4148
4281
|
this.receiver = receiver;
|
|
@@ -4153,6 +4286,8 @@ class KeyedRead extends AST {
|
|
|
4153
4286
|
}
|
|
4154
4287
|
}
|
|
4155
4288
|
class SafeKeyedRead extends AST {
|
|
4289
|
+
receiver;
|
|
4290
|
+
key;
|
|
4156
4291
|
constructor(span, sourceSpan, receiver, key) {
|
|
4157
4292
|
super(span, sourceSpan);
|
|
4158
4293
|
this.receiver = receiver;
|
|
@@ -4163,6 +4298,9 @@ class SafeKeyedRead extends AST {
|
|
|
4163
4298
|
}
|
|
4164
4299
|
}
|
|
4165
4300
|
class KeyedWrite extends AST {
|
|
4301
|
+
receiver;
|
|
4302
|
+
key;
|
|
4303
|
+
value;
|
|
4166
4304
|
constructor(span, sourceSpan, receiver, key, value) {
|
|
4167
4305
|
super(span, sourceSpan);
|
|
4168
4306
|
this.receiver = receiver;
|
|
@@ -4174,6 +4312,9 @@ class KeyedWrite extends AST {
|
|
|
4174
4312
|
}
|
|
4175
4313
|
}
|
|
4176
4314
|
class BindingPipe extends ASTWithName {
|
|
4315
|
+
exp;
|
|
4316
|
+
name;
|
|
4317
|
+
args;
|
|
4177
4318
|
constructor(span, sourceSpan, exp, name, args, nameSpan) {
|
|
4178
4319
|
super(span, sourceSpan, nameSpan);
|
|
4179
4320
|
this.exp = exp;
|
|
@@ -4185,6 +4326,7 @@ class BindingPipe extends ASTWithName {
|
|
|
4185
4326
|
}
|
|
4186
4327
|
}
|
|
4187
4328
|
class LiteralPrimitive extends AST {
|
|
4329
|
+
value;
|
|
4188
4330
|
constructor(span, sourceSpan, value) {
|
|
4189
4331
|
super(span, sourceSpan);
|
|
4190
4332
|
this.value = value;
|
|
@@ -4194,6 +4336,7 @@ class LiteralPrimitive extends AST {
|
|
|
4194
4336
|
}
|
|
4195
4337
|
}
|
|
4196
4338
|
class LiteralArray extends AST {
|
|
4339
|
+
expressions;
|
|
4197
4340
|
constructor(span, sourceSpan, expressions) {
|
|
4198
4341
|
super(span, sourceSpan);
|
|
4199
4342
|
this.expressions = expressions;
|
|
@@ -4203,6 +4346,8 @@ class LiteralArray extends AST {
|
|
|
4203
4346
|
}
|
|
4204
4347
|
}
|
|
4205
4348
|
class LiteralMap extends AST {
|
|
4349
|
+
keys;
|
|
4350
|
+
values;
|
|
4206
4351
|
constructor(span, sourceSpan, keys, values) {
|
|
4207
4352
|
super(span, sourceSpan);
|
|
4208
4353
|
this.keys = keys;
|
|
@@ -4213,6 +4358,8 @@ class LiteralMap extends AST {
|
|
|
4213
4358
|
}
|
|
4214
4359
|
}
|
|
4215
4360
|
class Interpolation$1 extends AST {
|
|
4361
|
+
strings;
|
|
4362
|
+
expressions;
|
|
4216
4363
|
constructor(span, sourceSpan, strings, expressions) {
|
|
4217
4364
|
super(span, sourceSpan);
|
|
4218
4365
|
this.strings = strings;
|
|
@@ -4223,6 +4370,9 @@ class Interpolation$1 extends AST {
|
|
|
4223
4370
|
}
|
|
4224
4371
|
}
|
|
4225
4372
|
class Binary extends AST {
|
|
4373
|
+
operation;
|
|
4374
|
+
left;
|
|
4375
|
+
right;
|
|
4226
4376
|
constructor(span, sourceSpan, operation, left, right) {
|
|
4227
4377
|
super(span, sourceSpan);
|
|
4228
4378
|
this.operation = operation;
|
|
@@ -4239,6 +4389,13 @@ class Binary extends AST {
|
|
|
4239
4389
|
* after consumers have been given a chance to fully support Unary.
|
|
4240
4390
|
*/
|
|
4241
4391
|
class Unary extends Binary {
|
|
4392
|
+
operator;
|
|
4393
|
+
expr;
|
|
4394
|
+
// Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not
|
|
4395
|
+
// depend on these fields when operating on `Unary`.
|
|
4396
|
+
left = null;
|
|
4397
|
+
right = null;
|
|
4398
|
+
operation = null;
|
|
4242
4399
|
/**
|
|
4243
4400
|
* Creates a unary minus expression "-x", represented as `Binary` using "0 - x".
|
|
4244
4401
|
*/
|
|
@@ -4259,11 +4416,6 @@ class Unary extends Binary {
|
|
|
4259
4416
|
super(span, sourceSpan, binaryOp, binaryLeft, binaryRight);
|
|
4260
4417
|
this.operator = operator;
|
|
4261
4418
|
this.expr = expr;
|
|
4262
|
-
// Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not
|
|
4263
|
-
// depend on these fields when operating on `Unary`.
|
|
4264
|
-
this.left = null;
|
|
4265
|
-
this.right = null;
|
|
4266
|
-
this.operation = null;
|
|
4267
4419
|
}
|
|
4268
4420
|
visit(visitor, context = null) {
|
|
4269
4421
|
if (visitor.visitUnary !== undefined) {
|
|
@@ -4273,6 +4425,7 @@ class Unary extends Binary {
|
|
|
4273
4425
|
}
|
|
4274
4426
|
}
|
|
4275
4427
|
class PrefixNot extends AST {
|
|
4428
|
+
expression;
|
|
4276
4429
|
constructor(span, sourceSpan, expression) {
|
|
4277
4430
|
super(span, sourceSpan);
|
|
4278
4431
|
this.expression = expression;
|
|
@@ -4281,7 +4434,18 @@ class PrefixNot extends AST {
|
|
|
4281
4434
|
return visitor.visitPrefixNot(this, context);
|
|
4282
4435
|
}
|
|
4283
4436
|
}
|
|
4437
|
+
class TypeofExpression extends AST {
|
|
4438
|
+
expression;
|
|
4439
|
+
constructor(span, sourceSpan, expression) {
|
|
4440
|
+
super(span, sourceSpan);
|
|
4441
|
+
this.expression = expression;
|
|
4442
|
+
}
|
|
4443
|
+
visit(visitor, context = null) {
|
|
4444
|
+
return visitor.visitTypeofExpresion(this, context);
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4284
4447
|
class NonNullAssert extends AST {
|
|
4448
|
+
expression;
|
|
4285
4449
|
constructor(span, sourceSpan, expression) {
|
|
4286
4450
|
super(span, sourceSpan);
|
|
4287
4451
|
this.expression = expression;
|
|
@@ -4291,6 +4455,9 @@ class NonNullAssert extends AST {
|
|
|
4291
4455
|
}
|
|
4292
4456
|
}
|
|
4293
4457
|
class Call extends AST {
|
|
4458
|
+
receiver;
|
|
4459
|
+
args;
|
|
4460
|
+
argumentSpan;
|
|
4294
4461
|
constructor(span, sourceSpan, receiver, args, argumentSpan) {
|
|
4295
4462
|
super(span, sourceSpan);
|
|
4296
4463
|
this.receiver = receiver;
|
|
@@ -4302,6 +4469,9 @@ class Call extends AST {
|
|
|
4302
4469
|
}
|
|
4303
4470
|
}
|
|
4304
4471
|
class SafeCall extends AST {
|
|
4472
|
+
receiver;
|
|
4473
|
+
args;
|
|
4474
|
+
argumentSpan;
|
|
4305
4475
|
constructor(span, sourceSpan, receiver, args, argumentSpan) {
|
|
4306
4476
|
super(span, sourceSpan);
|
|
4307
4477
|
this.receiver = receiver;
|
|
@@ -4317,12 +4487,18 @@ class SafeCall extends AST {
|
|
|
4317
4487
|
* starting and ending byte offsets, respectively, of the text span in a source file.
|
|
4318
4488
|
*/
|
|
4319
4489
|
class AbsoluteSourceSpan {
|
|
4490
|
+
start;
|
|
4491
|
+
end;
|
|
4320
4492
|
constructor(start, end) {
|
|
4321
4493
|
this.start = start;
|
|
4322
4494
|
this.end = end;
|
|
4323
4495
|
}
|
|
4324
4496
|
}
|
|
4325
4497
|
class ASTWithSource extends AST {
|
|
4498
|
+
ast;
|
|
4499
|
+
source;
|
|
4500
|
+
location;
|
|
4501
|
+
errors;
|
|
4326
4502
|
constructor(ast, source, location, absoluteOffset, errors) {
|
|
4327
4503
|
super(new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length));
|
|
4328
4504
|
this.ast = ast;
|
|
@@ -4341,6 +4517,9 @@ class ASTWithSource extends AST {
|
|
|
4341
4517
|
}
|
|
4342
4518
|
}
|
|
4343
4519
|
class VariableBinding {
|
|
4520
|
+
sourceSpan;
|
|
4521
|
+
key;
|
|
4522
|
+
value;
|
|
4344
4523
|
/**
|
|
4345
4524
|
* @param sourceSpan entire span of the binding.
|
|
4346
4525
|
* @param key name of the LHS along with its span.
|
|
@@ -4353,6 +4532,9 @@ class VariableBinding {
|
|
|
4353
4532
|
}
|
|
4354
4533
|
}
|
|
4355
4534
|
class ExpressionBinding {
|
|
4535
|
+
sourceSpan;
|
|
4536
|
+
key;
|
|
4537
|
+
value;
|
|
4356
4538
|
/**
|
|
4357
4539
|
* @param sourceSpan entire span of the binding.
|
|
4358
4540
|
* @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its
|
|
@@ -4419,6 +4601,9 @@ class RecursiveAstVisitor {
|
|
|
4419
4601
|
visitPrefixNot(ast, context) {
|
|
4420
4602
|
this.visit(ast.expression, context);
|
|
4421
4603
|
}
|
|
4604
|
+
visitTypeofExpresion(ast, context) {
|
|
4605
|
+
this.visit(ast.expression, context);
|
|
4606
|
+
}
|
|
4422
4607
|
visitNonNullAssert(ast, context) {
|
|
4423
4608
|
this.visit(ast.expression, context);
|
|
4424
4609
|
}
|
|
@@ -4495,6 +4680,9 @@ class AstTransformer {
|
|
|
4495
4680
|
visitPrefixNot(ast, context) {
|
|
4496
4681
|
return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this));
|
|
4497
4682
|
}
|
|
4683
|
+
visitTypeofExpresion(ast, context) {
|
|
4684
|
+
return new TypeofExpression(ast.span, ast.sourceSpan, ast.expression.visit(this));
|
|
4685
|
+
}
|
|
4498
4686
|
visitNonNullAssert(ast, context) {
|
|
4499
4687
|
return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this));
|
|
4500
4688
|
}
|
|
@@ -4613,6 +4801,13 @@ class AstMemoryEfficientTransformer {
|
|
|
4613
4801
|
}
|
|
4614
4802
|
return ast;
|
|
4615
4803
|
}
|
|
4804
|
+
visitTypeofExpresion(ast, context) {
|
|
4805
|
+
const expression = ast.expression.visit(this);
|
|
4806
|
+
if (expression !== ast.expression) {
|
|
4807
|
+
return new TypeofExpression(ast.span, ast.sourceSpan, expression);
|
|
4808
|
+
}
|
|
4809
|
+
return ast;
|
|
4810
|
+
}
|
|
4616
4811
|
visitNonNullAssert(ast, context) {
|
|
4617
4812
|
const expression = ast.expression.visit(this);
|
|
4618
4813
|
if (expression !== ast.expression) {
|
|
@@ -4699,6 +4894,14 @@ class AstMemoryEfficientTransformer {
|
|
|
4699
4894
|
}
|
|
4700
4895
|
// Bindings
|
|
4701
4896
|
class ParsedProperty {
|
|
4897
|
+
name;
|
|
4898
|
+
expression;
|
|
4899
|
+
type;
|
|
4900
|
+
sourceSpan;
|
|
4901
|
+
keySpan;
|
|
4902
|
+
valueSpan;
|
|
4903
|
+
isLiteral;
|
|
4904
|
+
isAnimation;
|
|
4702
4905
|
constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {
|
|
4703
4906
|
this.name = name;
|
|
4704
4907
|
this.expression = expression;
|
|
@@ -4727,6 +4930,13 @@ var ParsedEventType;
|
|
|
4727
4930
|
ParsedEventType[ParsedEventType["TwoWay"] = 2] = "TwoWay";
|
|
4728
4931
|
})(ParsedEventType || (ParsedEventType = {}));
|
|
4729
4932
|
class ParsedEvent {
|
|
4933
|
+
name;
|
|
4934
|
+
targetOrPhase;
|
|
4935
|
+
type;
|
|
4936
|
+
handler;
|
|
4937
|
+
sourceSpan;
|
|
4938
|
+
handlerSpan;
|
|
4939
|
+
keySpan;
|
|
4730
4940
|
constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) {
|
|
4731
4941
|
this.name = name;
|
|
4732
4942
|
this.targetOrPhase = targetOrPhase;
|
|
@@ -4741,6 +4951,11 @@ class ParsedEvent {
|
|
|
4741
4951
|
* ParsedVariable represents a variable declaration in a microsyntax expression.
|
|
4742
4952
|
*/
|
|
4743
4953
|
class ParsedVariable {
|
|
4954
|
+
name;
|
|
4955
|
+
value;
|
|
4956
|
+
sourceSpan;
|
|
4957
|
+
keySpan;
|
|
4958
|
+
valueSpan;
|
|
4744
4959
|
constructor(name, value, sourceSpan, keySpan, valueSpan) {
|
|
4745
4960
|
this.name = name;
|
|
4746
4961
|
this.value = value;
|
|
@@ -4765,6 +4980,14 @@ var BindingType;
|
|
|
4765
4980
|
BindingType[BindingType["TwoWay"] = 5] = "TwoWay";
|
|
4766
4981
|
})(BindingType || (BindingType = {}));
|
|
4767
4982
|
class BoundElementProperty {
|
|
4983
|
+
name;
|
|
4984
|
+
type;
|
|
4985
|
+
securityContext;
|
|
4986
|
+
value;
|
|
4987
|
+
unit;
|
|
4988
|
+
sourceSpan;
|
|
4989
|
+
keySpan;
|
|
4990
|
+
valueSpan;
|
|
4768
4991
|
constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) {
|
|
4769
4992
|
this.name = name;
|
|
4770
4993
|
this.type = type;
|
|
@@ -4824,6 +5047,8 @@ function mergeNsAndName(prefix, localName) {
|
|
|
4824
5047
|
* is true.
|
|
4825
5048
|
*/
|
|
4826
5049
|
class Comment$1 {
|
|
5050
|
+
value;
|
|
5051
|
+
sourceSpan;
|
|
4827
5052
|
constructor(value, sourceSpan) {
|
|
4828
5053
|
this.value = value;
|
|
4829
5054
|
this.sourceSpan = sourceSpan;
|
|
@@ -4833,6 +5058,8 @@ class Comment$1 {
|
|
|
4833
5058
|
}
|
|
4834
5059
|
}
|
|
4835
5060
|
class Text$3 {
|
|
5061
|
+
value;
|
|
5062
|
+
sourceSpan;
|
|
4836
5063
|
constructor(value, sourceSpan) {
|
|
4837
5064
|
this.value = value;
|
|
4838
5065
|
this.sourceSpan = sourceSpan;
|
|
@@ -4842,6 +5069,9 @@ class Text$3 {
|
|
|
4842
5069
|
}
|
|
4843
5070
|
}
|
|
4844
5071
|
class BoundText {
|
|
5072
|
+
value;
|
|
5073
|
+
sourceSpan;
|
|
5074
|
+
i18n;
|
|
4845
5075
|
constructor(value, sourceSpan, i18n) {
|
|
4846
5076
|
this.value = value;
|
|
4847
5077
|
this.sourceSpan = sourceSpan;
|
|
@@ -4858,6 +5088,12 @@ class BoundText {
|
|
|
4858
5088
|
* `keySpan` may also not be present for synthetic attributes from ICU expansions.
|
|
4859
5089
|
*/
|
|
4860
5090
|
class TextAttribute {
|
|
5091
|
+
name;
|
|
5092
|
+
value;
|
|
5093
|
+
sourceSpan;
|
|
5094
|
+
keySpan;
|
|
5095
|
+
valueSpan;
|
|
5096
|
+
i18n;
|
|
4861
5097
|
constructor(name, value, sourceSpan, keySpan, valueSpan, i18n) {
|
|
4862
5098
|
this.name = name;
|
|
4863
5099
|
this.value = value;
|
|
@@ -4871,6 +5107,15 @@ class TextAttribute {
|
|
|
4871
5107
|
}
|
|
4872
5108
|
}
|
|
4873
5109
|
class BoundAttribute {
|
|
5110
|
+
name;
|
|
5111
|
+
type;
|
|
5112
|
+
securityContext;
|
|
5113
|
+
value;
|
|
5114
|
+
unit;
|
|
5115
|
+
sourceSpan;
|
|
5116
|
+
keySpan;
|
|
5117
|
+
valueSpan;
|
|
5118
|
+
i18n;
|
|
4874
5119
|
constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) {
|
|
4875
5120
|
this.name = name;
|
|
4876
5121
|
this.type = type;
|
|
@@ -4893,6 +5138,14 @@ class BoundAttribute {
|
|
|
4893
5138
|
}
|
|
4894
5139
|
}
|
|
4895
5140
|
class BoundEvent {
|
|
5141
|
+
name;
|
|
5142
|
+
type;
|
|
5143
|
+
handler;
|
|
5144
|
+
target;
|
|
5145
|
+
phase;
|
|
5146
|
+
sourceSpan;
|
|
5147
|
+
handlerSpan;
|
|
5148
|
+
keySpan;
|
|
4896
5149
|
constructor(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) {
|
|
4897
5150
|
this.name = name;
|
|
4898
5151
|
this.type = type;
|
|
@@ -4916,6 +5169,16 @@ class BoundEvent {
|
|
|
4916
5169
|
}
|
|
4917
5170
|
}
|
|
4918
5171
|
class Element$1 {
|
|
5172
|
+
name;
|
|
5173
|
+
attributes;
|
|
5174
|
+
inputs;
|
|
5175
|
+
outputs;
|
|
5176
|
+
children;
|
|
5177
|
+
references;
|
|
5178
|
+
sourceSpan;
|
|
5179
|
+
startSourceSpan;
|
|
5180
|
+
endSourceSpan;
|
|
5181
|
+
i18n;
|
|
4919
5182
|
constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
4920
5183
|
this.name = name;
|
|
4921
5184
|
this.attributes = attributes;
|
|
@@ -4933,6 +5196,11 @@ class Element$1 {
|
|
|
4933
5196
|
}
|
|
4934
5197
|
}
|
|
4935
5198
|
class DeferredTrigger {
|
|
5199
|
+
nameSpan;
|
|
5200
|
+
sourceSpan;
|
|
5201
|
+
prefetchSpan;
|
|
5202
|
+
whenOrOnSourceSpan;
|
|
5203
|
+
hydrateSpan;
|
|
4936
5204
|
constructor(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan, hydrateSpan) {
|
|
4937
5205
|
this.nameSpan = nameSpan;
|
|
4938
5206
|
this.sourceSpan = sourceSpan;
|
|
@@ -4945,6 +5213,7 @@ class DeferredTrigger {
|
|
|
4945
5213
|
}
|
|
4946
5214
|
}
|
|
4947
5215
|
class BoundDeferredTrigger extends DeferredTrigger {
|
|
5216
|
+
value;
|
|
4948
5217
|
constructor(value, sourceSpan, prefetchSpan, whenSourceSpan, hydrateSpan) {
|
|
4949
5218
|
// BoundDeferredTrigger is for 'when' triggers. These aren't really "triggers" and don't have a
|
|
4950
5219
|
// nameSpan. Trigger names are the built in event triggers like hover, interaction, etc.
|
|
@@ -4959,30 +5228,38 @@ class IdleDeferredTrigger extends DeferredTrigger {
|
|
|
4959
5228
|
class ImmediateDeferredTrigger extends DeferredTrigger {
|
|
4960
5229
|
}
|
|
4961
5230
|
class HoverDeferredTrigger extends DeferredTrigger {
|
|
5231
|
+
reference;
|
|
4962
5232
|
constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
|
|
4963
5233
|
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
|
|
4964
5234
|
this.reference = reference;
|
|
4965
5235
|
}
|
|
4966
5236
|
}
|
|
4967
5237
|
class TimerDeferredTrigger extends DeferredTrigger {
|
|
5238
|
+
delay;
|
|
4968
5239
|
constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
|
|
4969
5240
|
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
|
|
4970
5241
|
this.delay = delay;
|
|
4971
5242
|
}
|
|
4972
5243
|
}
|
|
4973
5244
|
class InteractionDeferredTrigger extends DeferredTrigger {
|
|
5245
|
+
reference;
|
|
4974
5246
|
constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
|
|
4975
5247
|
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
|
|
4976
5248
|
this.reference = reference;
|
|
4977
5249
|
}
|
|
4978
5250
|
}
|
|
4979
5251
|
class ViewportDeferredTrigger extends DeferredTrigger {
|
|
5252
|
+
reference;
|
|
4980
5253
|
constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan) {
|
|
4981
5254
|
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan, hydrateSpan);
|
|
4982
5255
|
this.reference = reference;
|
|
4983
5256
|
}
|
|
4984
5257
|
}
|
|
4985
5258
|
class BlockNode {
|
|
5259
|
+
nameSpan;
|
|
5260
|
+
sourceSpan;
|
|
5261
|
+
startSourceSpan;
|
|
5262
|
+
endSourceSpan;
|
|
4986
5263
|
constructor(nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
4987
5264
|
this.nameSpan = nameSpan;
|
|
4988
5265
|
this.sourceSpan = sourceSpan;
|
|
@@ -4991,6 +5268,9 @@ class BlockNode {
|
|
|
4991
5268
|
}
|
|
4992
5269
|
}
|
|
4993
5270
|
class DeferredBlockPlaceholder extends BlockNode {
|
|
5271
|
+
children;
|
|
5272
|
+
minimumTime;
|
|
5273
|
+
i18n;
|
|
4994
5274
|
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
4995
5275
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
4996
5276
|
this.children = children;
|
|
@@ -5002,6 +5282,10 @@ class DeferredBlockPlaceholder extends BlockNode {
|
|
|
5002
5282
|
}
|
|
5003
5283
|
}
|
|
5004
5284
|
class DeferredBlockLoading extends BlockNode {
|
|
5285
|
+
children;
|
|
5286
|
+
afterTime;
|
|
5287
|
+
minimumTime;
|
|
5288
|
+
i18n;
|
|
5005
5289
|
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
5006
5290
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5007
5291
|
this.children = children;
|
|
@@ -5014,6 +5298,8 @@ class DeferredBlockLoading extends BlockNode {
|
|
|
5014
5298
|
}
|
|
5015
5299
|
}
|
|
5016
5300
|
class DeferredBlockError extends BlockNode {
|
|
5301
|
+
children;
|
|
5302
|
+
i18n;
|
|
5017
5303
|
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
5018
5304
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5019
5305
|
this.children = children;
|
|
@@ -5024,6 +5310,18 @@ class DeferredBlockError extends BlockNode {
|
|
|
5024
5310
|
}
|
|
5025
5311
|
}
|
|
5026
5312
|
class DeferredBlock extends BlockNode {
|
|
5313
|
+
children;
|
|
5314
|
+
placeholder;
|
|
5315
|
+
loading;
|
|
5316
|
+
error;
|
|
5317
|
+
mainBlockSpan;
|
|
5318
|
+
i18n;
|
|
5319
|
+
triggers;
|
|
5320
|
+
prefetchTriggers;
|
|
5321
|
+
hydrateTriggers;
|
|
5322
|
+
definedTriggers;
|
|
5323
|
+
definedPrefetchTriggers;
|
|
5324
|
+
definedHydrateTriggers;
|
|
5027
5325
|
constructor(children, triggers, prefetchTriggers, hydrateTriggers, placeholder, loading, error, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
5028
5326
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5029
5327
|
this.children = children;
|
|
@@ -5058,6 +5356,9 @@ class DeferredBlock extends BlockNode {
|
|
|
5058
5356
|
}
|
|
5059
5357
|
}
|
|
5060
5358
|
class SwitchBlock extends BlockNode {
|
|
5359
|
+
expression;
|
|
5360
|
+
cases;
|
|
5361
|
+
unknownBlocks;
|
|
5061
5362
|
constructor(expression, cases,
|
|
5062
5363
|
/**
|
|
5063
5364
|
* These blocks are only captured to allow for autocompletion in the language service. They
|
|
@@ -5074,6 +5375,9 @@ class SwitchBlock extends BlockNode {
|
|
|
5074
5375
|
}
|
|
5075
5376
|
}
|
|
5076
5377
|
class SwitchBlockCase extends BlockNode {
|
|
5378
|
+
expression;
|
|
5379
|
+
children;
|
|
5380
|
+
i18n;
|
|
5077
5381
|
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {
|
|
5078
5382
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5079
5383
|
this.expression = expression;
|
|
@@ -5085,6 +5389,15 @@ class SwitchBlockCase extends BlockNode {
|
|
|
5085
5389
|
}
|
|
5086
5390
|
}
|
|
5087
5391
|
class ForLoopBlock extends BlockNode {
|
|
5392
|
+
item;
|
|
5393
|
+
expression;
|
|
5394
|
+
trackBy;
|
|
5395
|
+
trackKeywordSpan;
|
|
5396
|
+
contextVariables;
|
|
5397
|
+
children;
|
|
5398
|
+
empty;
|
|
5399
|
+
mainBlockSpan;
|
|
5400
|
+
i18n;
|
|
5088
5401
|
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {
|
|
5089
5402
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5090
5403
|
this.item = item;
|
|
@@ -5102,6 +5415,8 @@ class ForLoopBlock extends BlockNode {
|
|
|
5102
5415
|
}
|
|
5103
5416
|
}
|
|
5104
5417
|
class ForLoopBlockEmpty extends BlockNode {
|
|
5418
|
+
children;
|
|
5419
|
+
i18n;
|
|
5105
5420
|
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {
|
|
5106
5421
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5107
5422
|
this.children = children;
|
|
@@ -5112,6 +5427,7 @@ class ForLoopBlockEmpty extends BlockNode {
|
|
|
5112
5427
|
}
|
|
5113
5428
|
}
|
|
5114
5429
|
class IfBlock extends BlockNode {
|
|
5430
|
+
branches;
|
|
5115
5431
|
constructor(branches, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
5116
5432
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5117
5433
|
this.branches = branches;
|
|
@@ -5121,6 +5437,10 @@ class IfBlock extends BlockNode {
|
|
|
5121
5437
|
}
|
|
5122
5438
|
}
|
|
5123
5439
|
class IfBlockBranch extends BlockNode {
|
|
5440
|
+
expression;
|
|
5441
|
+
children;
|
|
5442
|
+
expressionAlias;
|
|
5443
|
+
i18n;
|
|
5124
5444
|
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {
|
|
5125
5445
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
5126
5446
|
this.expression = expression;
|
|
@@ -5133,6 +5453,9 @@ class IfBlockBranch extends BlockNode {
|
|
|
5133
5453
|
}
|
|
5134
5454
|
}
|
|
5135
5455
|
class UnknownBlock {
|
|
5456
|
+
name;
|
|
5457
|
+
sourceSpan;
|
|
5458
|
+
nameSpan;
|
|
5136
5459
|
constructor(name, sourceSpan, nameSpan) {
|
|
5137
5460
|
this.name = name;
|
|
5138
5461
|
this.sourceSpan = sourceSpan;
|
|
@@ -5143,6 +5466,11 @@ class UnknownBlock {
|
|
|
5143
5466
|
}
|
|
5144
5467
|
}
|
|
5145
5468
|
class LetDeclaration$1 {
|
|
5469
|
+
name;
|
|
5470
|
+
value;
|
|
5471
|
+
sourceSpan;
|
|
5472
|
+
nameSpan;
|
|
5473
|
+
valueSpan;
|
|
5146
5474
|
constructor(name, value, sourceSpan, nameSpan, valueSpan) {
|
|
5147
5475
|
this.name = name;
|
|
5148
5476
|
this.value = value;
|
|
@@ -5155,6 +5483,18 @@ class LetDeclaration$1 {
|
|
|
5155
5483
|
}
|
|
5156
5484
|
}
|
|
5157
5485
|
class Template {
|
|
5486
|
+
tagName;
|
|
5487
|
+
attributes;
|
|
5488
|
+
inputs;
|
|
5489
|
+
outputs;
|
|
5490
|
+
templateAttrs;
|
|
5491
|
+
children;
|
|
5492
|
+
references;
|
|
5493
|
+
variables;
|
|
5494
|
+
sourceSpan;
|
|
5495
|
+
startSourceSpan;
|
|
5496
|
+
endSourceSpan;
|
|
5497
|
+
i18n;
|
|
5158
5498
|
constructor(
|
|
5159
5499
|
// tagName is the name of the container element, if applicable.
|
|
5160
5500
|
// `null` is a special case for when there is a structural directive on an `ng-template` so
|
|
@@ -5179,19 +5519,29 @@ class Template {
|
|
|
5179
5519
|
}
|
|
5180
5520
|
}
|
|
5181
5521
|
class Content {
|
|
5522
|
+
selector;
|
|
5523
|
+
attributes;
|
|
5524
|
+
children;
|
|
5525
|
+
sourceSpan;
|
|
5526
|
+
i18n;
|
|
5527
|
+
name = 'ng-content';
|
|
5182
5528
|
constructor(selector, attributes, children, sourceSpan, i18n) {
|
|
5183
5529
|
this.selector = selector;
|
|
5184
5530
|
this.attributes = attributes;
|
|
5185
5531
|
this.children = children;
|
|
5186
5532
|
this.sourceSpan = sourceSpan;
|
|
5187
5533
|
this.i18n = i18n;
|
|
5188
|
-
this.name = 'ng-content';
|
|
5189
5534
|
}
|
|
5190
5535
|
visit(visitor) {
|
|
5191
5536
|
return visitor.visitContent(this);
|
|
5192
5537
|
}
|
|
5193
5538
|
}
|
|
5194
5539
|
class Variable {
|
|
5540
|
+
name;
|
|
5541
|
+
value;
|
|
5542
|
+
sourceSpan;
|
|
5543
|
+
keySpan;
|
|
5544
|
+
valueSpan;
|
|
5195
5545
|
constructor(name, value, sourceSpan, keySpan, valueSpan) {
|
|
5196
5546
|
this.name = name;
|
|
5197
5547
|
this.value = value;
|
|
@@ -5204,6 +5554,11 @@ class Variable {
|
|
|
5204
5554
|
}
|
|
5205
5555
|
}
|
|
5206
5556
|
class Reference {
|
|
5557
|
+
name;
|
|
5558
|
+
value;
|
|
5559
|
+
sourceSpan;
|
|
5560
|
+
keySpan;
|
|
5561
|
+
valueSpan;
|
|
5207
5562
|
constructor(name, value, sourceSpan, keySpan, valueSpan) {
|
|
5208
5563
|
this.name = name;
|
|
5209
5564
|
this.value = value;
|
|
@@ -5216,6 +5571,10 @@ class Reference {
|
|
|
5216
5571
|
}
|
|
5217
5572
|
}
|
|
5218
5573
|
class Icu$1 {
|
|
5574
|
+
vars;
|
|
5575
|
+
placeholders;
|
|
5576
|
+
sourceSpan;
|
|
5577
|
+
i18n;
|
|
5219
5578
|
constructor(vars, placeholders, sourceSpan, i18n) {
|
|
5220
5579
|
this.vars = vars;
|
|
5221
5580
|
this.placeholders = placeholders;
|
|
@@ -5310,6 +5669,17 @@ function visitAll$1(visitor, nodes) {
|
|
|
5310
5669
|
}
|
|
5311
5670
|
|
|
5312
5671
|
class Message {
|
|
5672
|
+
nodes;
|
|
5673
|
+
placeholders;
|
|
5674
|
+
placeholderToMessage;
|
|
5675
|
+
meaning;
|
|
5676
|
+
description;
|
|
5677
|
+
customId;
|
|
5678
|
+
sources;
|
|
5679
|
+
id;
|
|
5680
|
+
/** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */
|
|
5681
|
+
legacyIds = [];
|
|
5682
|
+
messageString;
|
|
5313
5683
|
/**
|
|
5314
5684
|
* @param nodes message AST
|
|
5315
5685
|
* @param placeholders maps placeholder names to static content and their source spans
|
|
@@ -5325,8 +5695,6 @@ class Message {
|
|
|
5325
5695
|
this.meaning = meaning;
|
|
5326
5696
|
this.description = description;
|
|
5327
5697
|
this.customId = customId;
|
|
5328
|
-
/** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */
|
|
5329
|
-
this.legacyIds = [];
|
|
5330
5698
|
this.id = this.customId;
|
|
5331
5699
|
this.messageString = serializeMessage(this.nodes);
|
|
5332
5700
|
if (nodes.length) {
|
|
@@ -5346,6 +5714,8 @@ class Message {
|
|
|
5346
5714
|
}
|
|
5347
5715
|
}
|
|
5348
5716
|
class Text$2 {
|
|
5717
|
+
value;
|
|
5718
|
+
sourceSpan;
|
|
5349
5719
|
constructor(value, sourceSpan) {
|
|
5350
5720
|
this.value = value;
|
|
5351
5721
|
this.sourceSpan = sourceSpan;
|
|
@@ -5356,6 +5726,8 @@ class Text$2 {
|
|
|
5356
5726
|
}
|
|
5357
5727
|
// TODO(vicb): do we really need this node (vs an array) ?
|
|
5358
5728
|
class Container {
|
|
5729
|
+
children;
|
|
5730
|
+
sourceSpan;
|
|
5359
5731
|
constructor(children, sourceSpan) {
|
|
5360
5732
|
this.children = children;
|
|
5361
5733
|
this.sourceSpan = sourceSpan;
|
|
@@ -5365,6 +5737,11 @@ class Container {
|
|
|
5365
5737
|
}
|
|
5366
5738
|
}
|
|
5367
5739
|
class Icu {
|
|
5740
|
+
expression;
|
|
5741
|
+
type;
|
|
5742
|
+
cases;
|
|
5743
|
+
sourceSpan;
|
|
5744
|
+
expressionPlaceholder;
|
|
5368
5745
|
constructor(expression, type, cases, sourceSpan, expressionPlaceholder) {
|
|
5369
5746
|
this.expression = expression;
|
|
5370
5747
|
this.type = type;
|
|
@@ -5377,6 +5754,15 @@ class Icu {
|
|
|
5377
5754
|
}
|
|
5378
5755
|
}
|
|
5379
5756
|
class TagPlaceholder {
|
|
5757
|
+
tag;
|
|
5758
|
+
attrs;
|
|
5759
|
+
startName;
|
|
5760
|
+
closeName;
|
|
5761
|
+
children;
|
|
5762
|
+
isVoid;
|
|
5763
|
+
sourceSpan;
|
|
5764
|
+
startSourceSpan;
|
|
5765
|
+
endSourceSpan;
|
|
5380
5766
|
constructor(tag, attrs, startName, closeName, children, isVoid,
|
|
5381
5767
|
// TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan)
|
|
5382
5768
|
sourceSpan, startSourceSpan, endSourceSpan) {
|
|
@@ -5395,6 +5781,9 @@ class TagPlaceholder {
|
|
|
5395
5781
|
}
|
|
5396
5782
|
}
|
|
5397
5783
|
class Placeholder {
|
|
5784
|
+
value;
|
|
5785
|
+
name;
|
|
5786
|
+
sourceSpan;
|
|
5398
5787
|
constructor(value, name, sourceSpan) {
|
|
5399
5788
|
this.value = value;
|
|
5400
5789
|
this.name = name;
|
|
@@ -5405,6 +5794,11 @@ class Placeholder {
|
|
|
5405
5794
|
}
|
|
5406
5795
|
}
|
|
5407
5796
|
class IcuPlaceholder {
|
|
5797
|
+
value;
|
|
5798
|
+
name;
|
|
5799
|
+
sourceSpan;
|
|
5800
|
+
/** Used to capture a message computed from a previous processing pass (see `setI18nRefs()`). */
|
|
5801
|
+
previousMessage;
|
|
5408
5802
|
constructor(value, name, sourceSpan) {
|
|
5409
5803
|
this.value = value;
|
|
5410
5804
|
this.name = name;
|
|
@@ -5415,6 +5809,14 @@ class IcuPlaceholder {
|
|
|
5415
5809
|
}
|
|
5416
5810
|
}
|
|
5417
5811
|
class BlockPlaceholder {
|
|
5812
|
+
name;
|
|
5813
|
+
parameters;
|
|
5814
|
+
startName;
|
|
5815
|
+
closeName;
|
|
5816
|
+
children;
|
|
5817
|
+
sourceSpan;
|
|
5818
|
+
startSourceSpan;
|
|
5819
|
+
endSourceSpan;
|
|
5418
5820
|
constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
5419
5821
|
this.name = name;
|
|
5420
5822
|
this.parameters = parameters;
|
|
@@ -5525,13 +5927,14 @@ class Serializer {
|
|
|
5525
5927
|
* A simple mapper that take a function to transform an internal name to a public name
|
|
5526
5928
|
*/
|
|
5527
5929
|
class SimplePlaceholderMapper extends RecurseVisitor {
|
|
5930
|
+
mapName;
|
|
5931
|
+
internalToPublic = {};
|
|
5932
|
+
publicToNextId = {};
|
|
5933
|
+
publicToInternal = {};
|
|
5528
5934
|
// create a mapping from the message
|
|
5529
5935
|
constructor(message, mapName) {
|
|
5530
5936
|
super();
|
|
5531
5937
|
this.mapName = mapName;
|
|
5532
|
-
this.internalToPublic = {};
|
|
5533
|
-
this.publicToNextId = {};
|
|
5534
|
-
this.publicToInternal = {};
|
|
5535
5938
|
message.nodes.forEach((node) => node.visit(this));
|
|
5536
5939
|
}
|
|
5537
5940
|
toPublicName(internalName) {
|
|
@@ -5609,12 +6012,12 @@ class _Visitor$2 {
|
|
|
5609
6012
|
}
|
|
5610
6013
|
}
|
|
5611
6014
|
const _visitor = new _Visitor$2();
|
|
5612
|
-
function serialize(nodes) {
|
|
6015
|
+
function serialize$1(nodes) {
|
|
5613
6016
|
return nodes.map((node) => node.visit(_visitor)).join('');
|
|
5614
6017
|
}
|
|
5615
6018
|
class Declaration {
|
|
6019
|
+
attrs = {};
|
|
5616
6020
|
constructor(unescapedAttrs) {
|
|
5617
|
-
this.attrs = {};
|
|
5618
6021
|
Object.keys(unescapedAttrs).forEach((k) => {
|
|
5619
6022
|
this.attrs[k] = escapeXml(unescapedAttrs[k]);
|
|
5620
6023
|
});
|
|
@@ -5624,6 +6027,8 @@ class Declaration {
|
|
|
5624
6027
|
}
|
|
5625
6028
|
}
|
|
5626
6029
|
class Doctype {
|
|
6030
|
+
rootTag;
|
|
6031
|
+
dtd;
|
|
5627
6032
|
constructor(rootTag, dtd) {
|
|
5628
6033
|
this.rootTag = rootTag;
|
|
5629
6034
|
this.dtd = dtd;
|
|
@@ -5633,10 +6038,12 @@ class Doctype {
|
|
|
5633
6038
|
}
|
|
5634
6039
|
}
|
|
5635
6040
|
class Tag {
|
|
6041
|
+
name;
|
|
6042
|
+
children;
|
|
6043
|
+
attrs = {};
|
|
5636
6044
|
constructor(name, unescapedAttrs = {}, children = []) {
|
|
5637
6045
|
this.name = name;
|
|
5638
6046
|
this.children = children;
|
|
5639
|
-
this.attrs = {};
|
|
5640
6047
|
Object.keys(unescapedAttrs).forEach((k) => {
|
|
5641
6048
|
this.attrs[k] = escapeXml(unescapedAttrs[k]);
|
|
5642
6049
|
});
|
|
@@ -5646,6 +6053,7 @@ class Tag {
|
|
|
5646
6053
|
}
|
|
5647
6054
|
}
|
|
5648
6055
|
class Text$1 {
|
|
6056
|
+
value;
|
|
5649
6057
|
constructor(unescapedValue) {
|
|
5650
6058
|
this.value = escapeXml(unescapedValue);
|
|
5651
6059
|
}
|
|
@@ -5703,10 +6111,6 @@ const _DOCTYPE = `<!ELEMENT messagebundle (msg)*>
|
|
|
5703
6111
|
|
|
5704
6112
|
<!ELEMENT ex (#PCDATA)>`;
|
|
5705
6113
|
class Xmb extends Serializer {
|
|
5706
|
-
constructor(preservePlaceholders = true) {
|
|
5707
|
-
super();
|
|
5708
|
-
this.preservePlaceholders = preservePlaceholders;
|
|
5709
|
-
}
|
|
5710
6114
|
write(messages, locale) {
|
|
5711
6115
|
const exampleVisitor = new ExampleVisitor();
|
|
5712
6116
|
const visitor = new _Visitor$1();
|
|
@@ -5729,7 +6133,7 @@ class Xmb extends Serializer {
|
|
|
5729
6133
|
rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)]));
|
|
5730
6134
|
});
|
|
5731
6135
|
rootNode.children.push(new CR());
|
|
5732
|
-
return serialize([
|
|
6136
|
+
return serialize$1([
|
|
5733
6137
|
new Declaration({ version: '1.0', encoding: 'UTF-8' }),
|
|
5734
6138
|
new CR(),
|
|
5735
6139
|
new Doctype(_MESSAGES_TAG, _DOCTYPE),
|
|
@@ -5742,7 +6146,7 @@ class Xmb extends Serializer {
|
|
|
5742
6146
|
throw new Error('Unsupported');
|
|
5743
6147
|
}
|
|
5744
6148
|
digest(message) {
|
|
5745
|
-
return digest(message
|
|
6149
|
+
return digest(message);
|
|
5746
6150
|
}
|
|
5747
6151
|
createNameMapper(message) {
|
|
5748
6152
|
return new SimplePlaceholderMapper(message, toPublicName);
|
|
@@ -5823,8 +6227,8 @@ class _Visitor$1 {
|
|
|
5823
6227
|
return [].concat(...nodes.map((node) => node.visit(this)));
|
|
5824
6228
|
}
|
|
5825
6229
|
}
|
|
5826
|
-
function digest(message
|
|
5827
|
-
return decimalDigest(message
|
|
6230
|
+
function digest(message) {
|
|
6231
|
+
return decimalDigest(message);
|
|
5828
6232
|
}
|
|
5829
6233
|
// TC requires at least one non-empty example on placeholders
|
|
5830
6234
|
class ExampleVisitor {
|
|
@@ -6028,9 +6432,7 @@ function conditionallyCreateDirectiveBindingLiteral(map, forInputs) {
|
|
|
6028
6432
|
* property names that are set can be resolved to their documented declaration.
|
|
6029
6433
|
*/
|
|
6030
6434
|
class DefinitionMap {
|
|
6031
|
-
|
|
6032
|
-
this.values = [];
|
|
6033
|
-
}
|
|
6435
|
+
values = [];
|
|
6034
6436
|
set(key, value) {
|
|
6035
6437
|
if (value) {
|
|
6036
6438
|
const existing = this.values.find((value) => value.key === key);
|
|
@@ -6248,6 +6650,8 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
6248
6650
|
}
|
|
6249
6651
|
|
|
6250
6652
|
class InterpolationConfig {
|
|
6653
|
+
start;
|
|
6654
|
+
end;
|
|
6251
6655
|
static fromArray(markers) {
|
|
6252
6656
|
if (!markers) {
|
|
6253
6657
|
return DEFAULT_INTERPOLATION_CONFIG;
|
|
@@ -6347,6 +6751,10 @@ function isQuote(code) {
|
|
|
6347
6751
|
}
|
|
6348
6752
|
|
|
6349
6753
|
class ParseLocation {
|
|
6754
|
+
file;
|
|
6755
|
+
offset;
|
|
6756
|
+
line;
|
|
6757
|
+
col;
|
|
6350
6758
|
constructor(file, offset, line, col) {
|
|
6351
6759
|
this.file = file;
|
|
6352
6760
|
this.offset = offset;
|
|
@@ -6432,12 +6840,18 @@ class ParseLocation {
|
|
|
6432
6840
|
}
|
|
6433
6841
|
}
|
|
6434
6842
|
class ParseSourceFile {
|
|
6843
|
+
content;
|
|
6844
|
+
url;
|
|
6435
6845
|
constructor(content, url) {
|
|
6436
6846
|
this.content = content;
|
|
6437
6847
|
this.url = url;
|
|
6438
6848
|
}
|
|
6439
6849
|
}
|
|
6440
6850
|
class ParseSourceSpan {
|
|
6851
|
+
start;
|
|
6852
|
+
end;
|
|
6853
|
+
fullStart;
|
|
6854
|
+
details;
|
|
6441
6855
|
/**
|
|
6442
6856
|
* Create an object that holds information about spans of tokens/nodes captured during
|
|
6443
6857
|
* lexing/parsing of text.
|
|
@@ -6477,6 +6891,9 @@ var ParseErrorLevel;
|
|
|
6477
6891
|
ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR";
|
|
6478
6892
|
})(ParseErrorLevel || (ParseErrorLevel = {}));
|
|
6479
6893
|
class ParseError {
|
|
6894
|
+
span;
|
|
6895
|
+
msg;
|
|
6896
|
+
level;
|
|
6480
6897
|
constructor(span, msg, level = ParseErrorLevel.ERROR) {
|
|
6481
6898
|
this.span = span;
|
|
6482
6899
|
this.msg = msg;
|
|
@@ -6821,12 +7238,13 @@ class JitEvaluator {
|
|
|
6821
7238
|
* An Angular AST visitor that converts AST nodes into executable JavaScript code.
|
|
6822
7239
|
*/
|
|
6823
7240
|
class JitEmitterVisitor extends AbstractJsEmitterVisitor {
|
|
7241
|
+
refResolver;
|
|
7242
|
+
_evalArgNames = [];
|
|
7243
|
+
_evalArgValues = [];
|
|
7244
|
+
_evalExportedVars = [];
|
|
6824
7245
|
constructor(refResolver) {
|
|
6825
7246
|
super();
|
|
6826
7247
|
this.refResolver = refResolver;
|
|
6827
|
-
this._evalArgNames = [];
|
|
6828
|
-
this._evalArgValues = [];
|
|
6829
|
-
this._evalExportedVars = [];
|
|
6830
7248
|
}
|
|
6831
7249
|
createReturnStmt(ctx) {
|
|
6832
7250
|
const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map((resultVar) => new LiteralMapEntry(resultVar, variable(resultVar), false))));
|
|
@@ -6898,6 +7316,7 @@ function createInjectorType(meta) {
|
|
|
6898
7316
|
* Only supports `resolveExternalReference`, all other methods throw.
|
|
6899
7317
|
*/
|
|
6900
7318
|
class R3JitReflector {
|
|
7319
|
+
context;
|
|
6901
7320
|
constructor(context) {
|
|
6902
7321
|
this.context = context;
|
|
6903
7322
|
}
|
|
@@ -7120,8 +7539,8 @@ function compilePipeFromMetadata(metadata) {
|
|
|
7120
7539
|
definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });
|
|
7121
7540
|
// e.g. `pure: true`
|
|
7122
7541
|
definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });
|
|
7123
|
-
if (metadata.isStandalone) {
|
|
7124
|
-
definitionMapValues.push({ key: 'standalone', value: literal(
|
|
7542
|
+
if (metadata.isStandalone === false) {
|
|
7543
|
+
definitionMapValues.push({ key: 'standalone', value: literal(false), quoted: false });
|
|
7125
7544
|
}
|
|
7126
7545
|
const expression = importExpr(Identifiers.definePipe)
|
|
7127
7546
|
.callFn([literalMap(definitionMapValues)], undefined, true);
|
|
@@ -7299,23 +7718,6 @@ const scopedAtRuleIdentifiers = [
|
|
|
7299
7718
|
in comments in lieu of the next selector when running under polyfill.
|
|
7300
7719
|
*/
|
|
7301
7720
|
class ShadowCss {
|
|
7302
|
-
constructor() {
|
|
7303
|
-
/**
|
|
7304
|
-
* Regular expression used to extrapolate the possible keyframes from an
|
|
7305
|
-
* animation declaration (with possibly multiple animation definitions)
|
|
7306
|
-
*
|
|
7307
|
-
* The regular expression can be divided in three parts
|
|
7308
|
-
* - (^|\s+|,)
|
|
7309
|
-
* captures how many (if any) leading whitespaces are present or a comma
|
|
7310
|
-
* - (?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))
|
|
7311
|
-
* captures two different possible keyframes, ones which are quoted or ones which are valid css
|
|
7312
|
-
* indents (custom properties excluded)
|
|
7313
|
-
* - (?=[,\s;]|$)
|
|
7314
|
-
* simply matches the end of the possible keyframe, valid endings are: a comma, a space, a
|
|
7315
|
-
* semicolon or the end of the string
|
|
7316
|
-
*/
|
|
7317
|
-
this._animationDeclarationKeyframesRe = /(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
7318
|
-
}
|
|
7319
7721
|
/*
|
|
7320
7722
|
* Shim some cssText with the given selector. Returns cssText that can be included in the document
|
|
7321
7723
|
*
|
|
@@ -7458,6 +7860,21 @@ class ShadowCss {
|
|
|
7458
7860
|
return `${spaces1}${quote}${name}${quote}${spaces2}`;
|
|
7459
7861
|
});
|
|
7460
7862
|
}
|
|
7863
|
+
/**
|
|
7864
|
+
* Regular expression used to extrapolate the possible keyframes from an
|
|
7865
|
+
* animation declaration (with possibly multiple animation definitions)
|
|
7866
|
+
*
|
|
7867
|
+
* The regular expression can be divided in three parts
|
|
7868
|
+
* - (^|\s+|,)
|
|
7869
|
+
* captures how many (if any) leading whitespaces are present or a comma
|
|
7870
|
+
* - (?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))
|
|
7871
|
+
* captures two different possible keyframes, ones which are quoted or ones which are valid css
|
|
7872
|
+
* indents (custom properties excluded)
|
|
7873
|
+
* - (?=[,\s;]|$)
|
|
7874
|
+
* simply matches the end of the possible keyframe, valid endings are: a comma, a space, a
|
|
7875
|
+
* semicolon or the end of the string
|
|
7876
|
+
*/
|
|
7877
|
+
_animationDeclarationKeyframesRe = /(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
7461
7878
|
/**
|
|
7462
7879
|
* Scope an animation rule so that the keyframes mentioned in such rule
|
|
7463
7880
|
* are scoped if defined in the component's css and left untouched otherwise.
|
|
@@ -7730,6 +8147,8 @@ class ShadowCss {
|
|
|
7730
8147
|
return new CssRule(selector, rule.content);
|
|
7731
8148
|
});
|
|
7732
8149
|
}
|
|
8150
|
+
_safeSelector;
|
|
8151
|
+
_shouldScopeIndicator;
|
|
7733
8152
|
// `isParentSelector` is used to distinguish the selectors which are coming from
|
|
7734
8153
|
// the initial selector string and any nested selectors, parsed recursively,
|
|
7735
8154
|
// for example `selector = 'a:where(.one)'` could be the parent, while recursive call
|
|
@@ -7913,9 +8332,10 @@ class ShadowCss {
|
|
|
7913
8332
|
}
|
|
7914
8333
|
}
|
|
7915
8334
|
class SafeSelector {
|
|
8335
|
+
placeholders = [];
|
|
8336
|
+
index = 0;
|
|
8337
|
+
_content;
|
|
7916
8338
|
constructor(selector) {
|
|
7917
|
-
this.placeholders = [];
|
|
7918
|
-
this.index = 0;
|
|
7919
8339
|
// Replaces attribute selectors with placeholders.
|
|
7920
8340
|
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
|
7921
8341
|
selector = this._escapeRegexMatches(selector, /(\[[^\]]*\])/g);
|
|
@@ -8005,6 +8425,8 @@ const _cssCommaInPlaceholderReGlobal = new RegExp(COMMA_IN_PLACEHOLDER, 'g');
|
|
|
8005
8425
|
const _cssSemiInPlaceholderReGlobal = new RegExp(SEMI_IN_PLACEHOLDER, 'g');
|
|
8006
8426
|
const _cssColonInPlaceholderReGlobal = new RegExp(COLON_IN_PLACEHOLDER, 'g');
|
|
8007
8427
|
class CssRule {
|
|
8428
|
+
selector;
|
|
8429
|
+
content;
|
|
8008
8430
|
constructor(selector, content) {
|
|
8009
8431
|
this.selector = selector;
|
|
8010
8432
|
this.content = content;
|
|
@@ -8030,6 +8452,8 @@ function processRules(input, ruleCallback) {
|
|
|
8030
8452
|
return unescapeInStrings(escapedResult);
|
|
8031
8453
|
}
|
|
8032
8454
|
class StringWithEscapedBlocks {
|
|
8455
|
+
escapedString;
|
|
8456
|
+
blocks;
|
|
8033
8457
|
constructor(escapedString, blocks) {
|
|
8034
8458
|
this.escapedString = escapedString;
|
|
8035
8459
|
this.blocks = blocks;
|
|
@@ -8862,6 +9286,9 @@ function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
|
8862
9286
|
};
|
|
8863
9287
|
}
|
|
8864
9288
|
class Interpolation {
|
|
9289
|
+
strings;
|
|
9290
|
+
expressions;
|
|
9291
|
+
i18nPlaceholders;
|
|
8865
9292
|
constructor(strings, expressions, i18nPlaceholders) {
|
|
8866
9293
|
this.strings = strings;
|
|
8867
9294
|
this.expressions = expressions;
|
|
@@ -9114,7 +9541,6 @@ function createStoreLetOp(target, declaredName, value, sourceSpan) {
|
|
|
9114
9541
|
};
|
|
9115
9542
|
}
|
|
9116
9543
|
|
|
9117
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9118
9544
|
/**
|
|
9119
9545
|
* Check whether a given `o.Expression` is a logical IR expression type.
|
|
9120
9546
|
*/
|
|
@@ -9133,10 +9559,11 @@ class ExpressionBase extends Expression {
|
|
|
9133
9559
|
* Logical expression representing a lexical read of a variable name.
|
|
9134
9560
|
*/
|
|
9135
9561
|
class LexicalReadExpr extends ExpressionBase {
|
|
9562
|
+
name;
|
|
9563
|
+
kind = ExpressionKind.LexicalRead;
|
|
9136
9564
|
constructor(name) {
|
|
9137
9565
|
super();
|
|
9138
9566
|
this.name = name;
|
|
9139
|
-
this.kind = ExpressionKind.LexicalRead;
|
|
9140
9567
|
}
|
|
9141
9568
|
visitExpression(visitor, context) { }
|
|
9142
9569
|
isEquivalent(other) {
|
|
@@ -9157,12 +9584,15 @@ class LexicalReadExpr extends ExpressionBase {
|
|
|
9157
9584
|
* Runtime operation to retrieve the value of a local reference.
|
|
9158
9585
|
*/
|
|
9159
9586
|
class ReferenceExpr extends ExpressionBase {
|
|
9587
|
+
target;
|
|
9588
|
+
targetSlot;
|
|
9589
|
+
offset;
|
|
9590
|
+
kind = ExpressionKind.Reference;
|
|
9160
9591
|
constructor(target, targetSlot, offset) {
|
|
9161
9592
|
super();
|
|
9162
9593
|
this.target = target;
|
|
9163
9594
|
this.targetSlot = targetSlot;
|
|
9164
9595
|
this.offset = offset;
|
|
9165
|
-
this.kind = ExpressionKind.Reference;
|
|
9166
9596
|
}
|
|
9167
9597
|
visitExpression() { }
|
|
9168
9598
|
isEquivalent(e) {
|
|
@@ -9177,15 +9607,17 @@ class ReferenceExpr extends ExpressionBase {
|
|
|
9177
9607
|
}
|
|
9178
9608
|
}
|
|
9179
9609
|
class StoreLetExpr extends ExpressionBase {
|
|
9180
|
-
|
|
9610
|
+
target;
|
|
9611
|
+
value;
|
|
9612
|
+
sourceSpan;
|
|
9613
|
+
kind = ExpressionKind.StoreLet;
|
|
9614
|
+
[ConsumesVarsTrait] = true;
|
|
9615
|
+
[DependsOnSlotContext] = true;
|
|
9181
9616
|
constructor(target, value, sourceSpan) {
|
|
9182
9617
|
super();
|
|
9183
9618
|
this.target = target;
|
|
9184
9619
|
this.value = value;
|
|
9185
9620
|
this.sourceSpan = sourceSpan;
|
|
9186
|
-
this.kind = ExpressionKind.StoreLet;
|
|
9187
|
-
this[_a] = true;
|
|
9188
|
-
this[_b] = true;
|
|
9189
9621
|
}
|
|
9190
9622
|
visitExpression() { }
|
|
9191
9623
|
isEquivalent(e) {
|
|
@@ -9202,11 +9634,13 @@ class StoreLetExpr extends ExpressionBase {
|
|
|
9202
9634
|
}
|
|
9203
9635
|
}
|
|
9204
9636
|
class ContextLetReferenceExpr extends ExpressionBase {
|
|
9637
|
+
target;
|
|
9638
|
+
targetSlot;
|
|
9639
|
+
kind = ExpressionKind.ContextLetReference;
|
|
9205
9640
|
constructor(target, targetSlot) {
|
|
9206
9641
|
super();
|
|
9207
9642
|
this.target = target;
|
|
9208
9643
|
this.targetSlot = targetSlot;
|
|
9209
|
-
this.kind = ExpressionKind.ContextLetReference;
|
|
9210
9644
|
}
|
|
9211
9645
|
visitExpression() { }
|
|
9212
9646
|
isEquivalent(e) {
|
|
@@ -9224,10 +9658,11 @@ class ContextLetReferenceExpr extends ExpressionBase {
|
|
|
9224
9658
|
* A reference to the current view context (usually the `ctx` variable in a template function).
|
|
9225
9659
|
*/
|
|
9226
9660
|
class ContextExpr extends ExpressionBase {
|
|
9661
|
+
view;
|
|
9662
|
+
kind = ExpressionKind.Context;
|
|
9227
9663
|
constructor(view) {
|
|
9228
9664
|
super();
|
|
9229
9665
|
this.view = view;
|
|
9230
|
-
this.kind = ExpressionKind.Context;
|
|
9231
9666
|
}
|
|
9232
9667
|
visitExpression() { }
|
|
9233
9668
|
isEquivalent(e) {
|
|
@@ -9245,10 +9680,11 @@ class ContextExpr extends ExpressionBase {
|
|
|
9245
9680
|
* A reference to the current view context inside a track function.
|
|
9246
9681
|
*/
|
|
9247
9682
|
class TrackContextExpr extends ExpressionBase {
|
|
9683
|
+
view;
|
|
9684
|
+
kind = ExpressionKind.TrackContext;
|
|
9248
9685
|
constructor(view) {
|
|
9249
9686
|
super();
|
|
9250
9687
|
this.view = view;
|
|
9251
|
-
this.kind = ExpressionKind.TrackContext;
|
|
9252
9688
|
}
|
|
9253
9689
|
visitExpression() { }
|
|
9254
9690
|
isEquivalent(e) {
|
|
@@ -9266,10 +9702,10 @@ class TrackContextExpr extends ExpressionBase {
|
|
|
9266
9702
|
* Runtime operation to navigate to the next view context in the view hierarchy.
|
|
9267
9703
|
*/
|
|
9268
9704
|
class NextContextExpr extends ExpressionBase {
|
|
9705
|
+
kind = ExpressionKind.NextContext;
|
|
9706
|
+
steps = 1;
|
|
9269
9707
|
constructor() {
|
|
9270
9708
|
super();
|
|
9271
|
-
this.kind = ExpressionKind.NextContext;
|
|
9272
|
-
this.steps = 1;
|
|
9273
9709
|
}
|
|
9274
9710
|
visitExpression() { }
|
|
9275
9711
|
isEquivalent(e) {
|
|
@@ -9292,9 +9728,9 @@ class NextContextExpr extends ExpressionBase {
|
|
|
9292
9728
|
* operation.
|
|
9293
9729
|
*/
|
|
9294
9730
|
class GetCurrentViewExpr extends ExpressionBase {
|
|
9731
|
+
kind = ExpressionKind.GetCurrentView;
|
|
9295
9732
|
constructor() {
|
|
9296
9733
|
super();
|
|
9297
|
-
this.kind = ExpressionKind.GetCurrentView;
|
|
9298
9734
|
}
|
|
9299
9735
|
visitExpression() { }
|
|
9300
9736
|
isEquivalent(e) {
|
|
@@ -9312,10 +9748,11 @@ class GetCurrentViewExpr extends ExpressionBase {
|
|
|
9312
9748
|
* Runtime operation to restore a snapshotted view.
|
|
9313
9749
|
*/
|
|
9314
9750
|
class RestoreViewExpr extends ExpressionBase {
|
|
9751
|
+
view;
|
|
9752
|
+
kind = ExpressionKind.RestoreView;
|
|
9315
9753
|
constructor(view) {
|
|
9316
9754
|
super();
|
|
9317
9755
|
this.view = view;
|
|
9318
|
-
this.kind = ExpressionKind.RestoreView;
|
|
9319
9756
|
}
|
|
9320
9757
|
visitExpression(visitor, context) {
|
|
9321
9758
|
if (typeof this.view !== 'number') {
|
|
@@ -9349,10 +9786,11 @@ class RestoreViewExpr extends ExpressionBase {
|
|
|
9349
9786
|
* Runtime operation to reset the current view context after `RestoreView`.
|
|
9350
9787
|
*/
|
|
9351
9788
|
class ResetViewExpr extends ExpressionBase {
|
|
9789
|
+
expr;
|
|
9790
|
+
kind = ExpressionKind.ResetView;
|
|
9352
9791
|
constructor(expr) {
|
|
9353
9792
|
super();
|
|
9354
9793
|
this.expr = expr;
|
|
9355
|
-
this.kind = ExpressionKind.ResetView;
|
|
9356
9794
|
}
|
|
9357
9795
|
visitExpression(visitor, context) {
|
|
9358
9796
|
this.expr.visitExpression(visitor, context);
|
|
@@ -9371,11 +9809,13 @@ class ResetViewExpr extends ExpressionBase {
|
|
|
9371
9809
|
}
|
|
9372
9810
|
}
|
|
9373
9811
|
class TwoWayBindingSetExpr extends ExpressionBase {
|
|
9812
|
+
target;
|
|
9813
|
+
value;
|
|
9814
|
+
kind = ExpressionKind.TwoWayBindingSet;
|
|
9374
9815
|
constructor(target, value) {
|
|
9375
9816
|
super();
|
|
9376
9817
|
this.target = target;
|
|
9377
9818
|
this.value = value;
|
|
9378
|
-
this.kind = ExpressionKind.TwoWayBindingSet;
|
|
9379
9819
|
}
|
|
9380
9820
|
visitExpression(visitor, context) {
|
|
9381
9821
|
this.target.visitExpression(visitor, context);
|
|
@@ -9399,11 +9839,12 @@ class TwoWayBindingSetExpr extends ExpressionBase {
|
|
|
9399
9839
|
* Read of a variable declared as an `ir.VariableOp` and referenced through its `ir.XrefId`.
|
|
9400
9840
|
*/
|
|
9401
9841
|
class ReadVariableExpr extends ExpressionBase {
|
|
9842
|
+
xref;
|
|
9843
|
+
kind = ExpressionKind.ReadVariable;
|
|
9844
|
+
name = null;
|
|
9402
9845
|
constructor(xref) {
|
|
9403
9846
|
super();
|
|
9404
9847
|
this.xref = xref;
|
|
9405
|
-
this.kind = ExpressionKind.ReadVariable;
|
|
9406
|
-
this.name = null;
|
|
9407
9848
|
}
|
|
9408
9849
|
visitExpression() { }
|
|
9409
9850
|
isEquivalent(other) {
|
|
@@ -9420,18 +9861,29 @@ class ReadVariableExpr extends ExpressionBase {
|
|
|
9420
9861
|
}
|
|
9421
9862
|
}
|
|
9422
9863
|
class PureFunctionExpr extends ExpressionBase {
|
|
9423
|
-
|
|
9864
|
+
kind = ExpressionKind.PureFunctionExpr;
|
|
9865
|
+
[ConsumesVarsTrait] = true;
|
|
9866
|
+
[UsesVarOffset] = true;
|
|
9867
|
+
varOffset = null;
|
|
9868
|
+
/**
|
|
9869
|
+
* The expression which should be memoized as a pure computation.
|
|
9870
|
+
*
|
|
9871
|
+
* This expression contains internal `PureFunctionParameterExpr`s, which are placeholders for the
|
|
9872
|
+
* positional argument expressions in `args.
|
|
9873
|
+
*/
|
|
9874
|
+
body;
|
|
9875
|
+
/**
|
|
9876
|
+
* Positional arguments to the pure function which will memoize the `body` expression, which act
|
|
9877
|
+
* as memoization keys.
|
|
9878
|
+
*/
|
|
9879
|
+
args;
|
|
9880
|
+
/**
|
|
9881
|
+
* Once extracted to the `ConstantPool`, a reference to the function which defines the computation
|
|
9882
|
+
* of `body`.
|
|
9883
|
+
*/
|
|
9884
|
+
fn = null;
|
|
9424
9885
|
constructor(expression, args) {
|
|
9425
9886
|
super();
|
|
9426
|
-
this.kind = ExpressionKind.PureFunctionExpr;
|
|
9427
|
-
this[_c] = true;
|
|
9428
|
-
this[_d] = true;
|
|
9429
|
-
this.varOffset = null;
|
|
9430
|
-
/**
|
|
9431
|
-
* Once extracted to the `ConstantPool`, a reference to the function which defines the computation
|
|
9432
|
-
* of `body`.
|
|
9433
|
-
*/
|
|
9434
|
-
this.fn = null;
|
|
9435
9887
|
this.body = expression;
|
|
9436
9888
|
this.args = args;
|
|
9437
9889
|
}
|
|
@@ -9473,10 +9925,11 @@ class PureFunctionExpr extends ExpressionBase {
|
|
|
9473
9925
|
}
|
|
9474
9926
|
}
|
|
9475
9927
|
class PureFunctionParameterExpr extends ExpressionBase {
|
|
9928
|
+
index;
|
|
9929
|
+
kind = ExpressionKind.PureFunctionParameterExpr;
|
|
9476
9930
|
constructor(index) {
|
|
9477
9931
|
super();
|
|
9478
9932
|
this.index = index;
|
|
9479
|
-
this.kind = ExpressionKind.PureFunctionParameterExpr;
|
|
9480
9933
|
}
|
|
9481
9934
|
visitExpression() { }
|
|
9482
9935
|
isEquivalent(other) {
|
|
@@ -9491,17 +9944,20 @@ class PureFunctionParameterExpr extends ExpressionBase {
|
|
|
9491
9944
|
}
|
|
9492
9945
|
}
|
|
9493
9946
|
class PipeBindingExpr extends ExpressionBase {
|
|
9494
|
-
|
|
9947
|
+
target;
|
|
9948
|
+
targetSlot;
|
|
9949
|
+
name;
|
|
9950
|
+
args;
|
|
9951
|
+
kind = ExpressionKind.PipeBinding;
|
|
9952
|
+
[ConsumesVarsTrait] = true;
|
|
9953
|
+
[UsesVarOffset] = true;
|
|
9954
|
+
varOffset = null;
|
|
9495
9955
|
constructor(target, targetSlot, name, args) {
|
|
9496
9956
|
super();
|
|
9497
9957
|
this.target = target;
|
|
9498
9958
|
this.targetSlot = targetSlot;
|
|
9499
9959
|
this.name = name;
|
|
9500
9960
|
this.args = args;
|
|
9501
|
-
this.kind = ExpressionKind.PipeBinding;
|
|
9502
|
-
this[_e] = true;
|
|
9503
|
-
this[_f] = true;
|
|
9504
|
-
this.varOffset = null;
|
|
9505
9961
|
}
|
|
9506
9962
|
visitExpression(visitor, context) {
|
|
9507
9963
|
for (const arg of this.args) {
|
|
@@ -9526,7 +9982,15 @@ class PipeBindingExpr extends ExpressionBase {
|
|
|
9526
9982
|
}
|
|
9527
9983
|
}
|
|
9528
9984
|
class PipeBindingVariadicExpr extends ExpressionBase {
|
|
9529
|
-
|
|
9985
|
+
target;
|
|
9986
|
+
targetSlot;
|
|
9987
|
+
name;
|
|
9988
|
+
args;
|
|
9989
|
+
numArgs;
|
|
9990
|
+
kind = ExpressionKind.PipeBindingVariadic;
|
|
9991
|
+
[ConsumesVarsTrait] = true;
|
|
9992
|
+
[UsesVarOffset] = true;
|
|
9993
|
+
varOffset = null;
|
|
9530
9994
|
constructor(target, targetSlot, name, args, numArgs) {
|
|
9531
9995
|
super();
|
|
9532
9996
|
this.target = target;
|
|
@@ -9534,10 +9998,6 @@ class PipeBindingVariadicExpr extends ExpressionBase {
|
|
|
9534
9998
|
this.name = name;
|
|
9535
9999
|
this.args = args;
|
|
9536
10000
|
this.numArgs = numArgs;
|
|
9537
|
-
this.kind = ExpressionKind.PipeBindingVariadic;
|
|
9538
|
-
this[_g] = true;
|
|
9539
|
-
this[_h] = true;
|
|
9540
|
-
this.varOffset = null;
|
|
9541
10001
|
}
|
|
9542
10002
|
visitExpression(visitor, context) {
|
|
9543
10003
|
this.args.visitExpression(visitor, context);
|
|
@@ -9558,11 +10018,13 @@ class PipeBindingVariadicExpr extends ExpressionBase {
|
|
|
9558
10018
|
}
|
|
9559
10019
|
}
|
|
9560
10020
|
class SafePropertyReadExpr extends ExpressionBase {
|
|
10021
|
+
receiver;
|
|
10022
|
+
name;
|
|
10023
|
+
kind = ExpressionKind.SafePropertyRead;
|
|
9561
10024
|
constructor(receiver, name) {
|
|
9562
10025
|
super();
|
|
9563
10026
|
this.receiver = receiver;
|
|
9564
10027
|
this.name = name;
|
|
9565
|
-
this.kind = ExpressionKind.SafePropertyRead;
|
|
9566
10028
|
}
|
|
9567
10029
|
// An alias for name, which allows other logic to handle property reads and keyed reads together.
|
|
9568
10030
|
get index() {
|
|
@@ -9585,11 +10047,13 @@ class SafePropertyReadExpr extends ExpressionBase {
|
|
|
9585
10047
|
}
|
|
9586
10048
|
}
|
|
9587
10049
|
class SafeKeyedReadExpr extends ExpressionBase {
|
|
10050
|
+
receiver;
|
|
10051
|
+
index;
|
|
10052
|
+
kind = ExpressionKind.SafeKeyedRead;
|
|
9588
10053
|
constructor(receiver, index, sourceSpan) {
|
|
9589
10054
|
super(sourceSpan);
|
|
9590
10055
|
this.receiver = receiver;
|
|
9591
10056
|
this.index = index;
|
|
9592
|
-
this.kind = ExpressionKind.SafeKeyedRead;
|
|
9593
10057
|
}
|
|
9594
10058
|
visitExpression(visitor, context) {
|
|
9595
10059
|
this.receiver.visitExpression(visitor, context);
|
|
@@ -9610,11 +10074,13 @@ class SafeKeyedReadExpr extends ExpressionBase {
|
|
|
9610
10074
|
}
|
|
9611
10075
|
}
|
|
9612
10076
|
class SafeInvokeFunctionExpr extends ExpressionBase {
|
|
10077
|
+
receiver;
|
|
10078
|
+
args;
|
|
10079
|
+
kind = ExpressionKind.SafeInvokeFunction;
|
|
9613
10080
|
constructor(receiver, args) {
|
|
9614
10081
|
super();
|
|
9615
10082
|
this.receiver = receiver;
|
|
9616
10083
|
this.args = args;
|
|
9617
|
-
this.kind = ExpressionKind.SafeInvokeFunction;
|
|
9618
10084
|
}
|
|
9619
10085
|
visitExpression(visitor, context) {
|
|
9620
10086
|
this.receiver.visitExpression(visitor, context);
|
|
@@ -9639,11 +10105,13 @@ class SafeInvokeFunctionExpr extends ExpressionBase {
|
|
|
9639
10105
|
}
|
|
9640
10106
|
}
|
|
9641
10107
|
class SafeTernaryExpr extends ExpressionBase {
|
|
10108
|
+
guard;
|
|
10109
|
+
expr;
|
|
10110
|
+
kind = ExpressionKind.SafeTernaryExpr;
|
|
9642
10111
|
constructor(guard, expr) {
|
|
9643
10112
|
super();
|
|
9644
10113
|
this.guard = guard;
|
|
9645
10114
|
this.expr = expr;
|
|
9646
|
-
this.kind = ExpressionKind.SafeTernaryExpr;
|
|
9647
10115
|
}
|
|
9648
10116
|
visitExpression(visitor, context) {
|
|
9649
10117
|
this.guard.visitExpression(visitor, context);
|
|
@@ -9664,10 +10132,7 @@ class SafeTernaryExpr extends ExpressionBase {
|
|
|
9664
10132
|
}
|
|
9665
10133
|
}
|
|
9666
10134
|
class EmptyExpr extends ExpressionBase {
|
|
9667
|
-
|
|
9668
|
-
super(...arguments);
|
|
9669
|
-
this.kind = ExpressionKind.EmptyExpr;
|
|
9670
|
-
}
|
|
10135
|
+
kind = ExpressionKind.EmptyExpr;
|
|
9671
10136
|
visitExpression(visitor, context) { }
|
|
9672
10137
|
isEquivalent(e) {
|
|
9673
10138
|
return e instanceof EmptyExpr;
|
|
@@ -9681,12 +10146,14 @@ class EmptyExpr extends ExpressionBase {
|
|
|
9681
10146
|
transformInternalExpressions() { }
|
|
9682
10147
|
}
|
|
9683
10148
|
class AssignTemporaryExpr extends ExpressionBase {
|
|
10149
|
+
expr;
|
|
10150
|
+
xref;
|
|
10151
|
+
kind = ExpressionKind.AssignTemporaryExpr;
|
|
10152
|
+
name = null;
|
|
9684
10153
|
constructor(expr, xref) {
|
|
9685
10154
|
super();
|
|
9686
10155
|
this.expr = expr;
|
|
9687
10156
|
this.xref = xref;
|
|
9688
|
-
this.kind = ExpressionKind.AssignTemporaryExpr;
|
|
9689
|
-
this.name = null;
|
|
9690
10157
|
}
|
|
9691
10158
|
visitExpression(visitor, context) {
|
|
9692
10159
|
this.expr.visitExpression(visitor, context);
|
|
@@ -9707,11 +10174,12 @@ class AssignTemporaryExpr extends ExpressionBase {
|
|
|
9707
10174
|
}
|
|
9708
10175
|
}
|
|
9709
10176
|
class ReadTemporaryExpr extends ExpressionBase {
|
|
10177
|
+
xref;
|
|
10178
|
+
kind = ExpressionKind.ReadTemporaryExpr;
|
|
10179
|
+
name = null;
|
|
9710
10180
|
constructor(xref) {
|
|
9711
10181
|
super();
|
|
9712
10182
|
this.xref = xref;
|
|
9713
|
-
this.kind = ExpressionKind.ReadTemporaryExpr;
|
|
9714
|
-
this.name = null;
|
|
9715
10183
|
}
|
|
9716
10184
|
visitExpression(visitor, context) { }
|
|
9717
10185
|
isEquivalent() {
|
|
@@ -9728,10 +10196,11 @@ class ReadTemporaryExpr extends ExpressionBase {
|
|
|
9728
10196
|
}
|
|
9729
10197
|
}
|
|
9730
10198
|
class SlotLiteralExpr extends ExpressionBase {
|
|
10199
|
+
slot;
|
|
10200
|
+
kind = ExpressionKind.SlotLiteralExpr;
|
|
9731
10201
|
constructor(slot) {
|
|
9732
10202
|
super();
|
|
9733
10203
|
this.slot = slot;
|
|
9734
|
-
this.kind = ExpressionKind.SlotLiteralExpr;
|
|
9735
10204
|
}
|
|
9736
10205
|
visitExpression(visitor, context) { }
|
|
9737
10206
|
isEquivalent(e) {
|
|
@@ -9746,6 +10215,11 @@ class SlotLiteralExpr extends ExpressionBase {
|
|
|
9746
10215
|
transformInternalExpressions() { }
|
|
9747
10216
|
}
|
|
9748
10217
|
class ConditionalCaseExpr extends ExpressionBase {
|
|
10218
|
+
expr;
|
|
10219
|
+
target;
|
|
10220
|
+
targetSlot;
|
|
10221
|
+
alias;
|
|
10222
|
+
kind = ExpressionKind.ConditionalCase;
|
|
9749
10223
|
/**
|
|
9750
10224
|
* Create an expression for one branch of a conditional.
|
|
9751
10225
|
* @param expr The expression to be tested for this case. Might be null, as in an `else` case.
|
|
@@ -9757,7 +10231,6 @@ class ConditionalCaseExpr extends ExpressionBase {
|
|
|
9757
10231
|
this.target = target;
|
|
9758
10232
|
this.targetSlot = targetSlot;
|
|
9759
10233
|
this.alias = alias;
|
|
9760
|
-
this.kind = ExpressionKind.ConditionalCase;
|
|
9761
10234
|
}
|
|
9762
10235
|
visitExpression(visitor, context) {
|
|
9763
10236
|
if (this.expr !== null) {
|
|
@@ -9780,10 +10253,11 @@ class ConditionalCaseExpr extends ExpressionBase {
|
|
|
9780
10253
|
}
|
|
9781
10254
|
}
|
|
9782
10255
|
class ConstCollectedExpr extends ExpressionBase {
|
|
10256
|
+
expr;
|
|
10257
|
+
kind = ExpressionKind.ConstCollected;
|
|
9783
10258
|
constructor(expr) {
|
|
9784
10259
|
super();
|
|
9785
10260
|
this.expr = expr;
|
|
9786
|
-
this.kind = ExpressionKind.ConstCollected;
|
|
9787
10261
|
}
|
|
9788
10262
|
transformInternalExpressions(transform, flags) {
|
|
9789
10263
|
this.expr = transform(this.expr, flags);
|
|
@@ -10106,27 +10580,27 @@ function isStringLiteral(expr) {
|
|
|
10106
10580
|
* @param OpT specific subtype of `Op` nodes which this list contains.
|
|
10107
10581
|
*/
|
|
10108
10582
|
class OpList {
|
|
10109
|
-
static
|
|
10583
|
+
static nextListId = 0;
|
|
10584
|
+
/**
|
|
10585
|
+
* Debug ID of this `OpList` instance.
|
|
10586
|
+
*/
|
|
10587
|
+
debugListId = OpList.nextListId++;
|
|
10588
|
+
// OpList uses static head/tail nodes of a special `ListEnd` type.
|
|
10589
|
+
// This avoids the need for special casing of the first and last list
|
|
10590
|
+
// elements in all list operations.
|
|
10591
|
+
head = {
|
|
10592
|
+
kind: OpKind.ListEnd,
|
|
10593
|
+
next: null,
|
|
10594
|
+
prev: null,
|
|
10595
|
+
debugListId: this.debugListId,
|
|
10596
|
+
};
|
|
10597
|
+
tail = {
|
|
10598
|
+
kind: OpKind.ListEnd,
|
|
10599
|
+
next: null,
|
|
10600
|
+
prev: null,
|
|
10601
|
+
debugListId: this.debugListId,
|
|
10602
|
+
};
|
|
10110
10603
|
constructor() {
|
|
10111
|
-
/**
|
|
10112
|
-
* Debug ID of this `OpList` instance.
|
|
10113
|
-
*/
|
|
10114
|
-
this.debugListId = OpList.nextListId++;
|
|
10115
|
-
// OpList uses static head/tail nodes of a special `ListEnd` type.
|
|
10116
|
-
// This avoids the need for special casing of the first and last list
|
|
10117
|
-
// elements in all list operations.
|
|
10118
|
-
this.head = {
|
|
10119
|
-
kind: OpKind.ListEnd,
|
|
10120
|
-
next: null,
|
|
10121
|
-
prev: null,
|
|
10122
|
-
debugListId: this.debugListId,
|
|
10123
|
-
};
|
|
10124
|
-
this.tail = {
|
|
10125
|
-
kind: OpKind.ListEnd,
|
|
10126
|
-
next: null,
|
|
10127
|
-
prev: null,
|
|
10128
|
-
debugListId: this.debugListId,
|
|
10129
|
-
};
|
|
10130
10604
|
// Link `head` and `tail` together at the start (list is empty).
|
|
10131
10605
|
this.head.next = this.tail;
|
|
10132
10606
|
this.tail.prev = this.head;
|
|
@@ -10354,9 +10828,7 @@ class OpList {
|
|
|
10354
10828
|
}
|
|
10355
10829
|
|
|
10356
10830
|
class SlotHandle {
|
|
10357
|
-
|
|
10358
|
-
this.slot = null;
|
|
10359
|
-
}
|
|
10831
|
+
slot = null;
|
|
10360
10832
|
}
|
|
10361
10833
|
|
|
10362
10834
|
/**
|
|
@@ -10784,55 +11256,56 @@ var CompilationJobKind;
|
|
|
10784
11256
|
* Contains one or more corresponding compilation units.
|
|
10785
11257
|
*/
|
|
10786
11258
|
class CompilationJob {
|
|
11259
|
+
componentName;
|
|
11260
|
+
pool;
|
|
11261
|
+
compatibility;
|
|
10787
11262
|
constructor(componentName, pool, compatibility) {
|
|
10788
11263
|
this.componentName = componentName;
|
|
10789
11264
|
this.pool = pool;
|
|
10790
11265
|
this.compatibility = compatibility;
|
|
10791
|
-
this.kind = CompilationJobKind.Both;
|
|
10792
|
-
/**
|
|
10793
|
-
* Tracks the next `ir.XrefId` which can be assigned as template structures are ingested.
|
|
10794
|
-
*/
|
|
10795
|
-
this.nextXrefId = 0;
|
|
10796
11266
|
}
|
|
11267
|
+
kind = CompilationJobKind.Both;
|
|
10797
11268
|
/**
|
|
10798
11269
|
* Generate a new unique `ir.XrefId` in this job.
|
|
10799
11270
|
*/
|
|
10800
11271
|
allocateXrefId() {
|
|
10801
11272
|
return this.nextXrefId++;
|
|
10802
11273
|
}
|
|
11274
|
+
/**
|
|
11275
|
+
* Tracks the next `ir.XrefId` which can be assigned as template structures are ingested.
|
|
11276
|
+
*/
|
|
11277
|
+
nextXrefId = 0;
|
|
10803
11278
|
}
|
|
10804
11279
|
/**
|
|
10805
11280
|
* Compilation-in-progress of a whole component's template, including the main template and any
|
|
10806
11281
|
* embedded views or host bindings.
|
|
10807
11282
|
*/
|
|
10808
11283
|
class ComponentCompilationJob extends CompilationJob {
|
|
11284
|
+
relativeContextFilePath;
|
|
11285
|
+
i18nUseExternalIds;
|
|
11286
|
+
deferMeta;
|
|
11287
|
+
allDeferrableDepsFn;
|
|
10809
11288
|
constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn) {
|
|
10810
11289
|
super(componentName, pool, compatibility);
|
|
10811
11290
|
this.relativeContextFilePath = relativeContextFilePath;
|
|
10812
11291
|
this.i18nUseExternalIds = i18nUseExternalIds;
|
|
10813
11292
|
this.deferMeta = deferMeta;
|
|
10814
11293
|
this.allDeferrableDepsFn = allDeferrableDepsFn;
|
|
10815
|
-
this.kind = CompilationJobKind.Tmpl;
|
|
10816
|
-
this.fnSuffix = 'Template';
|
|
10817
|
-
this.views = new Map();
|
|
10818
|
-
/**
|
|
10819
|
-
* Causes ngContentSelectors to be emitted, for content projection slots in the view. Possibly a
|
|
10820
|
-
* reference into the constant pool.
|
|
10821
|
-
*/
|
|
10822
|
-
this.contentSelectors = null;
|
|
10823
|
-
/**
|
|
10824
|
-
* Constant expressions used by operations within this component's compilation.
|
|
10825
|
-
*
|
|
10826
|
-
* This will eventually become the `consts` array in the component definition.
|
|
10827
|
-
*/
|
|
10828
|
-
this.consts = [];
|
|
10829
|
-
/**
|
|
10830
|
-
* Initialization statements needed to set up the consts.
|
|
10831
|
-
*/
|
|
10832
|
-
this.constsInitializers = [];
|
|
10833
11294
|
this.root = new ViewCompilationUnit(this, this.allocateXrefId(), null);
|
|
10834
11295
|
this.views.set(this.root.xref, this.root);
|
|
10835
11296
|
}
|
|
11297
|
+
kind = CompilationJobKind.Tmpl;
|
|
11298
|
+
fnSuffix = 'Template';
|
|
11299
|
+
/**
|
|
11300
|
+
* The root view, representing the component's template.
|
|
11301
|
+
*/
|
|
11302
|
+
root;
|
|
11303
|
+
views = new Map();
|
|
11304
|
+
/**
|
|
11305
|
+
* Causes ngContentSelectors to be emitted, for content projection slots in the view. Possibly a
|
|
11306
|
+
* reference into the constant pool.
|
|
11307
|
+
*/
|
|
11308
|
+
contentSelectors = null;
|
|
10836
11309
|
/**
|
|
10837
11310
|
* Add a `ViewCompilation` for a new embedded view to this compilation.
|
|
10838
11311
|
*/
|
|
@@ -10860,36 +11333,47 @@ class ComponentCompilationJob extends CompilationJob {
|
|
|
10860
11333
|
}
|
|
10861
11334
|
return idx;
|
|
10862
11335
|
}
|
|
11336
|
+
/**
|
|
11337
|
+
* Constant expressions used by operations within this component's compilation.
|
|
11338
|
+
*
|
|
11339
|
+
* This will eventually become the `consts` array in the component definition.
|
|
11340
|
+
*/
|
|
11341
|
+
consts = [];
|
|
11342
|
+
/**
|
|
11343
|
+
* Initialization statements needed to set up the consts.
|
|
11344
|
+
*/
|
|
11345
|
+
constsInitializers = [];
|
|
10863
11346
|
}
|
|
10864
11347
|
/**
|
|
10865
11348
|
* A compilation unit is compiled into a template function. Some example units are views and host
|
|
10866
11349
|
* bindings.
|
|
10867
11350
|
*/
|
|
10868
11351
|
class CompilationUnit {
|
|
11352
|
+
xref;
|
|
10869
11353
|
constructor(xref) {
|
|
10870
11354
|
this.xref = xref;
|
|
10871
|
-
/**
|
|
10872
|
-
* List of creation operations for this view.
|
|
10873
|
-
*
|
|
10874
|
-
* Creation operations may internally contain other operations, including update operations.
|
|
10875
|
-
*/
|
|
10876
|
-
this.create = new OpList();
|
|
10877
|
-
/**
|
|
10878
|
-
* List of update operations for this view.
|
|
10879
|
-
*/
|
|
10880
|
-
this.update = new OpList();
|
|
10881
|
-
/**
|
|
10882
|
-
* Name of the function which will be generated for this unit.
|
|
10883
|
-
*
|
|
10884
|
-
* May be `null` if not yet determined.
|
|
10885
|
-
*/
|
|
10886
|
-
this.fnName = null;
|
|
10887
|
-
/**
|
|
10888
|
-
* Number of variable slots used within this view, or `null` if variables have not yet been
|
|
10889
|
-
* counted.
|
|
10890
|
-
*/
|
|
10891
|
-
this.vars = null;
|
|
10892
11355
|
}
|
|
11356
|
+
/**
|
|
11357
|
+
* List of creation operations for this view.
|
|
11358
|
+
*
|
|
11359
|
+
* Creation operations may internally contain other operations, including update operations.
|
|
11360
|
+
*/
|
|
11361
|
+
create = new OpList();
|
|
11362
|
+
/**
|
|
11363
|
+
* List of update operations for this view.
|
|
11364
|
+
*/
|
|
11365
|
+
update = new OpList();
|
|
11366
|
+
/**
|
|
11367
|
+
* Name of the function which will be generated for this unit.
|
|
11368
|
+
*
|
|
11369
|
+
* May be `null` if not yet determined.
|
|
11370
|
+
*/
|
|
11371
|
+
fnName = null;
|
|
11372
|
+
/**
|
|
11373
|
+
* Number of variable slots used within this view, or `null` if variables have not yet been
|
|
11374
|
+
* counted.
|
|
11375
|
+
*/
|
|
11376
|
+
vars = null;
|
|
10893
11377
|
/**
|
|
10894
11378
|
* Iterate over all `ir.Op`s within this view.
|
|
10895
11379
|
*
|
|
@@ -10913,26 +11397,28 @@ class CompilationUnit {
|
|
|
10913
11397
|
* Compilation-in-progress of an individual view within a template.
|
|
10914
11398
|
*/
|
|
10915
11399
|
class ViewCompilationUnit extends CompilationUnit {
|
|
11400
|
+
job;
|
|
11401
|
+
parent;
|
|
10916
11402
|
constructor(job, xref, parent) {
|
|
10917
11403
|
super(xref);
|
|
10918
11404
|
this.job = job;
|
|
10919
11405
|
this.parent = parent;
|
|
10920
|
-
/**
|
|
10921
|
-
* Map of declared variables available within this view to the property on the context object
|
|
10922
|
-
* which they alias.
|
|
10923
|
-
*/
|
|
10924
|
-
this.contextVariables = new Map();
|
|
10925
|
-
/**
|
|
10926
|
-
* Set of aliases available within this view. An alias is a variable whose provided expression is
|
|
10927
|
-
* inlined at every location it is used. It may also depend on context variables, by name.
|
|
10928
|
-
*/
|
|
10929
|
-
this.aliases = new Set();
|
|
10930
|
-
/**
|
|
10931
|
-
* Number of declaration slots used within this view, or `null` if slots have not yet been
|
|
10932
|
-
* allocated.
|
|
10933
|
-
*/
|
|
10934
|
-
this.decls = null;
|
|
10935
11406
|
}
|
|
11407
|
+
/**
|
|
11408
|
+
* Map of declared variables available within this view to the property on the context object
|
|
11409
|
+
* which they alias.
|
|
11410
|
+
*/
|
|
11411
|
+
contextVariables = new Map();
|
|
11412
|
+
/**
|
|
11413
|
+
* Set of aliases available within this view. An alias is a variable whose provided expression is
|
|
11414
|
+
* inlined at every location it is used. It may also depend on context variables, by name.
|
|
11415
|
+
*/
|
|
11416
|
+
aliases = new Set();
|
|
11417
|
+
/**
|
|
11418
|
+
* Number of declaration slots used within this view, or `null` if slots have not yet been
|
|
11419
|
+
* allocated.
|
|
11420
|
+
*/
|
|
11421
|
+
decls = null;
|
|
10936
11422
|
}
|
|
10937
11423
|
/**
|
|
10938
11424
|
* Compilation-in-progress of a host binding, which contains a single unit for that host binding.
|
|
@@ -10940,23 +11426,25 @@ class ViewCompilationUnit extends CompilationUnit {
|
|
|
10940
11426
|
class HostBindingCompilationJob extends CompilationJob {
|
|
10941
11427
|
constructor(componentName, pool, compatibility) {
|
|
10942
11428
|
super(componentName, pool, compatibility);
|
|
10943
|
-
this.kind = CompilationJobKind.Host;
|
|
10944
|
-
this.fnSuffix = 'HostBindings';
|
|
10945
11429
|
this.root = new HostBindingCompilationUnit(this);
|
|
10946
11430
|
}
|
|
11431
|
+
kind = CompilationJobKind.Host;
|
|
11432
|
+
fnSuffix = 'HostBindings';
|
|
11433
|
+
root;
|
|
10947
11434
|
get units() {
|
|
10948
11435
|
return [this.root];
|
|
10949
11436
|
}
|
|
10950
11437
|
}
|
|
10951
11438
|
class HostBindingCompilationUnit extends CompilationUnit {
|
|
11439
|
+
job;
|
|
10952
11440
|
constructor(job) {
|
|
10953
11441
|
super(0);
|
|
10954
11442
|
this.job = job;
|
|
10955
|
-
/**
|
|
10956
|
-
* Much like an element can have attributes, so can a host binding function.
|
|
10957
|
-
*/
|
|
10958
|
-
this.attributes = null;
|
|
10959
11443
|
}
|
|
11444
|
+
/**
|
|
11445
|
+
* Much like an element can have attributes, so can a host binding function.
|
|
11446
|
+
*/
|
|
11447
|
+
attributes = null;
|
|
10960
11448
|
}
|
|
10961
11449
|
|
|
10962
11450
|
/**
|
|
@@ -11610,6 +12098,11 @@ const FLYWEIGHT_ARRAY = Object.freeze([]);
|
|
|
11610
12098
|
* Container for all of the various kinds of attributes which are applied on an element.
|
|
11611
12099
|
*/
|
|
11612
12100
|
class ElementAttributes {
|
|
12101
|
+
compatibility;
|
|
12102
|
+
known = new Map();
|
|
12103
|
+
byKind = new Map();
|
|
12104
|
+
propertyBindings = null;
|
|
12105
|
+
projectAs = null;
|
|
11613
12106
|
get attributes() {
|
|
11614
12107
|
return this.byKind.get(BindingKind.Attribute) ?? FLYWEIGHT_ARRAY;
|
|
11615
12108
|
}
|
|
@@ -11630,10 +12123,6 @@ class ElementAttributes {
|
|
|
11630
12123
|
}
|
|
11631
12124
|
constructor(compatibility) {
|
|
11632
12125
|
this.compatibility = compatibility;
|
|
11633
|
-
this.known = new Map();
|
|
11634
|
-
this.byKind = new Map();
|
|
11635
|
-
this.propertyBindings = null;
|
|
11636
|
-
this.projectAs = null;
|
|
11637
12126
|
}
|
|
11638
12127
|
isKnown(kind, name) {
|
|
11639
12128
|
const nameToValue = this.known.get(kind) ?? new Set();
|
|
@@ -12055,9 +12544,7 @@ function resolveDeferTargetNames(job) {
|
|
|
12055
12544
|
}
|
|
12056
12545
|
}
|
|
12057
12546
|
class Scope$1 {
|
|
12058
|
-
|
|
12059
|
-
this.targets = new Map();
|
|
12060
|
-
}
|
|
12547
|
+
targets = new Map();
|
|
12061
12548
|
}
|
|
12062
12549
|
|
|
12063
12550
|
const REPLACEMENTS = new Map([
|
|
@@ -12892,12 +13379,16 @@ function serializeIcuNode(icu) {
|
|
|
12892
13379
|
}
|
|
12893
13380
|
|
|
12894
13381
|
class NodeWithI18n {
|
|
13382
|
+
sourceSpan;
|
|
13383
|
+
i18n;
|
|
12895
13384
|
constructor(sourceSpan, i18n) {
|
|
12896
13385
|
this.sourceSpan = sourceSpan;
|
|
12897
13386
|
this.i18n = i18n;
|
|
12898
13387
|
}
|
|
12899
13388
|
}
|
|
12900
13389
|
class Text extends NodeWithI18n {
|
|
13390
|
+
value;
|
|
13391
|
+
tokens;
|
|
12901
13392
|
constructor(value, sourceSpan, tokens, i18n) {
|
|
12902
13393
|
super(sourceSpan, i18n);
|
|
12903
13394
|
this.value = value;
|
|
@@ -12908,6 +13399,10 @@ class Text extends NodeWithI18n {
|
|
|
12908
13399
|
}
|
|
12909
13400
|
}
|
|
12910
13401
|
class Expansion extends NodeWithI18n {
|
|
13402
|
+
switchValue;
|
|
13403
|
+
type;
|
|
13404
|
+
cases;
|
|
13405
|
+
switchValueSourceSpan;
|
|
12911
13406
|
constructor(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {
|
|
12912
13407
|
super(sourceSpan, i18n);
|
|
12913
13408
|
this.switchValue = switchValue;
|
|
@@ -12920,6 +13415,11 @@ class Expansion extends NodeWithI18n {
|
|
|
12920
13415
|
}
|
|
12921
13416
|
}
|
|
12922
13417
|
class ExpansionCase {
|
|
13418
|
+
value;
|
|
13419
|
+
expression;
|
|
13420
|
+
sourceSpan;
|
|
13421
|
+
valueSourceSpan;
|
|
13422
|
+
expSourceSpan;
|
|
12923
13423
|
constructor(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {
|
|
12924
13424
|
this.value = value;
|
|
12925
13425
|
this.expression = expression;
|
|
@@ -12932,6 +13432,11 @@ class ExpansionCase {
|
|
|
12932
13432
|
}
|
|
12933
13433
|
}
|
|
12934
13434
|
class Attribute extends NodeWithI18n {
|
|
13435
|
+
name;
|
|
13436
|
+
value;
|
|
13437
|
+
keySpan;
|
|
13438
|
+
valueSpan;
|
|
13439
|
+
valueTokens;
|
|
12935
13440
|
constructor(name, value, sourceSpan, keySpan, valueSpan, valueTokens, i18n) {
|
|
12936
13441
|
super(sourceSpan, i18n);
|
|
12937
13442
|
this.name = name;
|
|
@@ -12945,6 +13450,11 @@ class Attribute extends NodeWithI18n {
|
|
|
12945
13450
|
}
|
|
12946
13451
|
}
|
|
12947
13452
|
class Element extends NodeWithI18n {
|
|
13453
|
+
name;
|
|
13454
|
+
attrs;
|
|
13455
|
+
children;
|
|
13456
|
+
startSourceSpan;
|
|
13457
|
+
endSourceSpan;
|
|
12948
13458
|
constructor(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n) {
|
|
12949
13459
|
super(sourceSpan, i18n);
|
|
12950
13460
|
this.name = name;
|
|
@@ -12958,6 +13468,8 @@ class Element extends NodeWithI18n {
|
|
|
12958
13468
|
}
|
|
12959
13469
|
}
|
|
12960
13470
|
class Comment {
|
|
13471
|
+
value;
|
|
13472
|
+
sourceSpan;
|
|
12961
13473
|
constructor(value, sourceSpan) {
|
|
12962
13474
|
this.value = value;
|
|
12963
13475
|
this.sourceSpan = sourceSpan;
|
|
@@ -12967,6 +13479,12 @@ class Comment {
|
|
|
12967
13479
|
}
|
|
12968
13480
|
}
|
|
12969
13481
|
class Block extends NodeWithI18n {
|
|
13482
|
+
name;
|
|
13483
|
+
parameters;
|
|
13484
|
+
children;
|
|
13485
|
+
nameSpan;
|
|
13486
|
+
startSourceSpan;
|
|
13487
|
+
endSourceSpan;
|
|
12970
13488
|
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n) {
|
|
12971
13489
|
super(sourceSpan, i18n);
|
|
12972
13490
|
this.name = name;
|
|
@@ -12981,6 +13499,8 @@ class Block extends NodeWithI18n {
|
|
|
12981
13499
|
}
|
|
12982
13500
|
}
|
|
12983
13501
|
class BlockParameter {
|
|
13502
|
+
expression;
|
|
13503
|
+
sourceSpan;
|
|
12984
13504
|
constructor(expression, sourceSpan) {
|
|
12985
13505
|
this.expression = expression;
|
|
12986
13506
|
this.sourceSpan = sourceSpan;
|
|
@@ -12990,6 +13510,11 @@ class BlockParameter {
|
|
|
12990
13510
|
}
|
|
12991
13511
|
}
|
|
12992
13512
|
class LetDeclaration {
|
|
13513
|
+
name;
|
|
13514
|
+
value;
|
|
13515
|
+
sourceSpan;
|
|
13516
|
+
nameSpan;
|
|
13517
|
+
valueSpan;
|
|
12993
13518
|
constructor(name, value, sourceSpan, nameSpan, valueSpan) {
|
|
12994
13519
|
this.name = name;
|
|
12995
13520
|
this.value = value;
|
|
@@ -15189,12 +15714,16 @@ const NGSP_UNICODE = '\uE500';
|
|
|
15189
15714
|
NAMED_ENTITIES['ngsp'] = NGSP_UNICODE;
|
|
15190
15715
|
|
|
15191
15716
|
class TokenError extends ParseError {
|
|
15717
|
+
tokenType;
|
|
15192
15718
|
constructor(errorMsg, tokenType, span) {
|
|
15193
15719
|
super(span, errorMsg);
|
|
15194
15720
|
this.tokenType = tokenType;
|
|
15195
15721
|
}
|
|
15196
15722
|
}
|
|
15197
15723
|
class TokenizeResult {
|
|
15724
|
+
tokens;
|
|
15725
|
+
errors;
|
|
15726
|
+
nonNormalizedIcuExpressions;
|
|
15198
15727
|
constructor(tokens, errors, nonNormalizedIcuExpressions) {
|
|
15199
15728
|
this.tokens = tokens;
|
|
15200
15729
|
this.errors = errors;
|
|
@@ -15223,12 +15752,29 @@ var CharacterReferenceType;
|
|
|
15223
15752
|
CharacterReferenceType["DEC"] = "decimal";
|
|
15224
15753
|
})(CharacterReferenceType || (CharacterReferenceType = {}));
|
|
15225
15754
|
class _ControlFlowError {
|
|
15755
|
+
error;
|
|
15226
15756
|
constructor(error) {
|
|
15227
15757
|
this.error = error;
|
|
15228
15758
|
}
|
|
15229
15759
|
}
|
|
15230
15760
|
// See https://www.w3.org/TR/html51/syntax.html#writing-html-documents
|
|
15231
15761
|
class _Tokenizer {
|
|
15762
|
+
_getTagDefinition;
|
|
15763
|
+
_cursor;
|
|
15764
|
+
_tokenizeIcu;
|
|
15765
|
+
_interpolationConfig;
|
|
15766
|
+
_leadingTriviaCodePoints;
|
|
15767
|
+
_currentTokenStart = null;
|
|
15768
|
+
_currentTokenType = null;
|
|
15769
|
+
_expansionCaseStack = [];
|
|
15770
|
+
_inInterpolation = false;
|
|
15771
|
+
_preserveLineEndings;
|
|
15772
|
+
_i18nNormalizeLineEndingsInICUs;
|
|
15773
|
+
_tokenizeBlocks;
|
|
15774
|
+
_tokenizeLet;
|
|
15775
|
+
tokens = [];
|
|
15776
|
+
errors = [];
|
|
15777
|
+
nonNormalizedIcuExpressions = [];
|
|
15232
15778
|
/**
|
|
15233
15779
|
* @param _file The html source file being tokenized.
|
|
15234
15780
|
* @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.
|
|
@@ -15236,13 +15782,6 @@ class _Tokenizer {
|
|
|
15236
15782
|
*/
|
|
15237
15783
|
constructor(_file, _getTagDefinition, options) {
|
|
15238
15784
|
this._getTagDefinition = _getTagDefinition;
|
|
15239
|
-
this._currentTokenStart = null;
|
|
15240
|
-
this._currentTokenType = null;
|
|
15241
|
-
this._expansionCaseStack = [];
|
|
15242
|
-
this._inInterpolation = false;
|
|
15243
|
-
this.tokens = [];
|
|
15244
|
-
this.errors = [];
|
|
15245
|
-
this.nonNormalizedIcuExpressions = [];
|
|
15246
15785
|
this._tokenizeIcu = options.tokenizeExpansionForms || false;
|
|
15247
15786
|
this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;
|
|
15248
15787
|
this._leadingTriviaCodePoints =
|
|
@@ -16149,6 +16688,10 @@ function mergeTextTokens(srcTokens) {
|
|
|
16149
16688
|
return dstTokens;
|
|
16150
16689
|
}
|
|
16151
16690
|
class PlainCharacterCursor {
|
|
16691
|
+
state;
|
|
16692
|
+
file;
|
|
16693
|
+
input;
|
|
16694
|
+
end;
|
|
16152
16695
|
constructor(fileOrCursor, range) {
|
|
16153
16696
|
if (fileOrCursor instanceof PlainCharacterCursor) {
|
|
16154
16697
|
this.file = fileOrCursor.file;
|
|
@@ -16245,6 +16788,7 @@ class PlainCharacterCursor {
|
|
|
16245
16788
|
}
|
|
16246
16789
|
}
|
|
16247
16790
|
class EscapedCharacterCursor extends PlainCharacterCursor {
|
|
16791
|
+
internalState;
|
|
16248
16792
|
constructor(fileOrCursor, range) {
|
|
16249
16793
|
if (fileOrCursor instanceof EscapedCharacterCursor) {
|
|
16250
16794
|
super(fileOrCursor);
|
|
@@ -16380,6 +16924,8 @@ class EscapedCharacterCursor extends PlainCharacterCursor {
|
|
|
16380
16924
|
}
|
|
16381
16925
|
}
|
|
16382
16926
|
class CursorError {
|
|
16927
|
+
msg;
|
|
16928
|
+
cursor;
|
|
16383
16929
|
constructor(msg, cursor) {
|
|
16384
16930
|
this.msg = msg;
|
|
16385
16931
|
this.cursor = cursor;
|
|
@@ -16387,6 +16933,7 @@ class CursorError {
|
|
|
16387
16933
|
}
|
|
16388
16934
|
|
|
16389
16935
|
class TreeError extends ParseError {
|
|
16936
|
+
elementName;
|
|
16390
16937
|
static create(elementName, span, msg) {
|
|
16391
16938
|
return new TreeError(elementName, span, msg);
|
|
16392
16939
|
}
|
|
@@ -16396,12 +16943,15 @@ class TreeError extends ParseError {
|
|
|
16396
16943
|
}
|
|
16397
16944
|
}
|
|
16398
16945
|
class ParseTreeResult {
|
|
16946
|
+
rootNodes;
|
|
16947
|
+
errors;
|
|
16399
16948
|
constructor(rootNodes, errors) {
|
|
16400
16949
|
this.rootNodes = rootNodes;
|
|
16401
16950
|
this.errors = errors;
|
|
16402
16951
|
}
|
|
16403
16952
|
}
|
|
16404
16953
|
class Parser$1 {
|
|
16954
|
+
getTagDefinition;
|
|
16405
16955
|
constructor(getTagDefinition) {
|
|
16406
16956
|
this.getTagDefinition = getTagDefinition;
|
|
16407
16957
|
}
|
|
@@ -16413,13 +16963,17 @@ class Parser$1 {
|
|
|
16413
16963
|
}
|
|
16414
16964
|
}
|
|
16415
16965
|
class _TreeBuilder {
|
|
16966
|
+
tokens;
|
|
16967
|
+
getTagDefinition;
|
|
16968
|
+
_index = -1;
|
|
16969
|
+
// `_peek` will be initialized by the call to `_advance()` in the constructor.
|
|
16970
|
+
_peek;
|
|
16971
|
+
_containerStack = [];
|
|
16972
|
+
rootNodes = [];
|
|
16973
|
+
errors = [];
|
|
16416
16974
|
constructor(tokens, getTagDefinition) {
|
|
16417
16975
|
this.tokens = tokens;
|
|
16418
16976
|
this.getTagDefinition = getTagDefinition;
|
|
16419
|
-
this._index = -1;
|
|
16420
|
-
this._containerStack = [];
|
|
16421
|
-
this.rootNodes = [];
|
|
16422
|
-
this.errors = [];
|
|
16423
16977
|
this._advance();
|
|
16424
16978
|
}
|
|
16425
16979
|
build() {
|
|
@@ -16952,14 +17506,17 @@ function replaceNgsp(value) {
|
|
|
16952
17506
|
* such that trimming whitespace does not does not drop required information from the node.
|
|
16953
17507
|
*/
|
|
16954
17508
|
class WhitespaceVisitor {
|
|
17509
|
+
preserveSignificantWhitespace;
|
|
17510
|
+
originalNodeMap;
|
|
17511
|
+
requireContext;
|
|
17512
|
+
// How many ICU expansions which are currently being visited. ICUs can be nested, so this
|
|
17513
|
+
// tracks the current depth of nesting. If this depth is greater than 0, then this visitor is
|
|
17514
|
+
// currently processing content inside an ICU expansion.
|
|
17515
|
+
icuExpansionDepth = 0;
|
|
16955
17516
|
constructor(preserveSignificantWhitespace, originalNodeMap, requireContext = true) {
|
|
16956
17517
|
this.preserveSignificantWhitespace = preserveSignificantWhitespace;
|
|
16957
17518
|
this.originalNodeMap = originalNodeMap;
|
|
16958
17519
|
this.requireContext = requireContext;
|
|
16959
|
-
// How many ICU expansions which are currently being visited. ICUs can be nested, so this
|
|
16960
|
-
// tracks the current depth of nesting. If this depth is greater than 0, then this visitor is
|
|
16961
|
-
// currently processing content inside an ICU expansion.
|
|
16962
|
-
this.icuExpansionDepth = 0;
|
|
16963
17520
|
}
|
|
16964
17521
|
visitElement(element, context) {
|
|
16965
17522
|
if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {
|
|
@@ -17111,7 +17668,19 @@ var TokenType;
|
|
|
17111
17668
|
TokenType[TokenType["Number"] = 6] = "Number";
|
|
17112
17669
|
TokenType[TokenType["Error"] = 7] = "Error";
|
|
17113
17670
|
})(TokenType || (TokenType = {}));
|
|
17114
|
-
const KEYWORDS = [
|
|
17671
|
+
const KEYWORDS = [
|
|
17672
|
+
'var',
|
|
17673
|
+
'let',
|
|
17674
|
+
'as',
|
|
17675
|
+
'null',
|
|
17676
|
+
'undefined',
|
|
17677
|
+
'true',
|
|
17678
|
+
'false',
|
|
17679
|
+
'if',
|
|
17680
|
+
'else',
|
|
17681
|
+
'this',
|
|
17682
|
+
'typeof',
|
|
17683
|
+
];
|
|
17115
17684
|
class Lexer {
|
|
17116
17685
|
tokenize(text) {
|
|
17117
17686
|
const scanner = new _Scanner(text);
|
|
@@ -17125,6 +17694,11 @@ class Lexer {
|
|
|
17125
17694
|
}
|
|
17126
17695
|
}
|
|
17127
17696
|
class Token {
|
|
17697
|
+
index;
|
|
17698
|
+
end;
|
|
17699
|
+
type;
|
|
17700
|
+
numValue;
|
|
17701
|
+
strValue;
|
|
17128
17702
|
constructor(index, end, type, numValue, strValue) {
|
|
17129
17703
|
this.index = index;
|
|
17130
17704
|
this.end = end;
|
|
@@ -17174,6 +17748,9 @@ class Token {
|
|
|
17174
17748
|
isKeywordThis() {
|
|
17175
17749
|
return this.type == TokenType.Keyword && this.strValue == 'this';
|
|
17176
17750
|
}
|
|
17751
|
+
isKeywordTypeof() {
|
|
17752
|
+
return this.type === TokenType.Keyword && this.strValue === 'typeof';
|
|
17753
|
+
}
|
|
17177
17754
|
isError() {
|
|
17178
17755
|
return this.type == TokenType.Error;
|
|
17179
17756
|
}
|
|
@@ -17223,10 +17800,12 @@ function newErrorToken(index, end, message) {
|
|
|
17223
17800
|
}
|
|
17224
17801
|
const EOF = new Token(-1, -1, TokenType.Character, 0, '');
|
|
17225
17802
|
class _Scanner {
|
|
17803
|
+
input;
|
|
17804
|
+
length;
|
|
17805
|
+
peek = 0;
|
|
17806
|
+
index = -1;
|
|
17226
17807
|
constructor(input) {
|
|
17227
17808
|
this.input = input;
|
|
17228
|
-
this.peek = 0;
|
|
17229
|
-
this.index = -1;
|
|
17230
17809
|
this.length = input.length;
|
|
17231
17810
|
this.advance();
|
|
17232
17811
|
}
|
|
@@ -17466,20 +18045,6 @@ function isIdentifierStart(code) {
|
|
|
17466
18045
|
code == $_ ||
|
|
17467
18046
|
code == $$);
|
|
17468
18047
|
}
|
|
17469
|
-
function isIdentifier(input) {
|
|
17470
|
-
if (input.length == 0)
|
|
17471
|
-
return false;
|
|
17472
|
-
const scanner = new _Scanner(input);
|
|
17473
|
-
if (!isIdentifierStart(scanner.peek))
|
|
17474
|
-
return false;
|
|
17475
|
-
scanner.advance();
|
|
17476
|
-
while (scanner.peek !== $EOF) {
|
|
17477
|
-
if (!isIdentifierPart(scanner.peek))
|
|
17478
|
-
return false;
|
|
17479
|
-
scanner.advance();
|
|
17480
|
-
}
|
|
17481
|
-
return true;
|
|
17482
|
-
}
|
|
17483
18048
|
function isIdentifierPart(code) {
|
|
17484
18049
|
return isAsciiLetter(code) || isDigit(code) || code == $_ || code == $$;
|
|
17485
18050
|
}
|
|
@@ -17514,6 +18079,9 @@ function parseIntAutoRadix(text) {
|
|
|
17514
18079
|
}
|
|
17515
18080
|
|
|
17516
18081
|
class SplitInterpolation {
|
|
18082
|
+
strings;
|
|
18083
|
+
expressions;
|
|
18084
|
+
offsets;
|
|
17517
18085
|
constructor(strings, expressions, offsets) {
|
|
17518
18086
|
this.strings = strings;
|
|
17519
18087
|
this.expressions = expressions;
|
|
@@ -17521,6 +18089,9 @@ class SplitInterpolation {
|
|
|
17521
18089
|
}
|
|
17522
18090
|
}
|
|
17523
18091
|
class TemplateBindingParseResult {
|
|
18092
|
+
templateBindings;
|
|
18093
|
+
warnings;
|
|
18094
|
+
errors;
|
|
17524
18095
|
constructor(templateBindings, warnings, errors) {
|
|
17525
18096
|
this.templateBindings = templateBindings;
|
|
17526
18097
|
this.warnings = warnings;
|
|
@@ -17528,9 +18099,10 @@ class TemplateBindingParseResult {
|
|
|
17528
18099
|
}
|
|
17529
18100
|
}
|
|
17530
18101
|
class Parser {
|
|
18102
|
+
_lexer;
|
|
18103
|
+
errors = [];
|
|
17531
18104
|
constructor(_lexer) {
|
|
17532
18105
|
this._lexer = _lexer;
|
|
17533
|
-
this.errors = [];
|
|
17534
18106
|
}
|
|
17535
18107
|
parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
17536
18108
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
@@ -17798,6 +18370,23 @@ var ParseContextFlags;
|
|
|
17798
18370
|
ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
|
|
17799
18371
|
})(ParseContextFlags || (ParseContextFlags = {}));
|
|
17800
18372
|
class _ParseAST {
|
|
18373
|
+
input;
|
|
18374
|
+
location;
|
|
18375
|
+
absoluteOffset;
|
|
18376
|
+
tokens;
|
|
18377
|
+
parseFlags;
|
|
18378
|
+
errors;
|
|
18379
|
+
offset;
|
|
18380
|
+
rparensExpected = 0;
|
|
18381
|
+
rbracketsExpected = 0;
|
|
18382
|
+
rbracesExpected = 0;
|
|
18383
|
+
context = ParseContextFlags.None;
|
|
18384
|
+
// Cache of expression start and input indeces to the absolute source span they map to, used to
|
|
18385
|
+
// prevent creating superfluous source spans in `sourceSpan`.
|
|
18386
|
+
// A serial of the expression start and input index is used for mapping because both are stateful
|
|
18387
|
+
// and may change for subsequent expressions visited by the parser.
|
|
18388
|
+
sourceSpanCache = new Map();
|
|
18389
|
+
index = 0;
|
|
17801
18390
|
constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {
|
|
17802
18391
|
this.input = input;
|
|
17803
18392
|
this.location = location;
|
|
@@ -17806,16 +18395,6 @@ class _ParseAST {
|
|
|
17806
18395
|
this.parseFlags = parseFlags;
|
|
17807
18396
|
this.errors = errors;
|
|
17808
18397
|
this.offset = offset;
|
|
17809
|
-
this.rparensExpected = 0;
|
|
17810
|
-
this.rbracketsExpected = 0;
|
|
17811
|
-
this.rbracesExpected = 0;
|
|
17812
|
-
this.context = ParseContextFlags.None;
|
|
17813
|
-
// Cache of expression start and input indeces to the absolute source span they map to, used to
|
|
17814
|
-
// prevent creating superfluous source spans in `sourceSpan`.
|
|
17815
|
-
// A serial of the expression start and input index is used for mapping because both are stateful
|
|
17816
|
-
// and may change for subsequent expressions visited by the parser.
|
|
17817
|
-
this.sourceSpanCache = new Map();
|
|
17818
|
-
this.index = 0;
|
|
17819
18398
|
}
|
|
17820
18399
|
peek(offset) {
|
|
17821
18400
|
const i = this.index + offset;
|
|
@@ -18200,6 +18779,12 @@ class _ParseAST {
|
|
|
18200
18779
|
return new PrefixNot(this.span(start), this.sourceSpan(start), result);
|
|
18201
18780
|
}
|
|
18202
18781
|
}
|
|
18782
|
+
else if (this.next.isKeywordTypeof()) {
|
|
18783
|
+
this.advance();
|
|
18784
|
+
const start = this.inputIndex;
|
|
18785
|
+
let result = this.parsePrefix();
|
|
18786
|
+
return new TypeofExpression(this.span(start), this.sourceSpan(start), result);
|
|
18787
|
+
}
|
|
18203
18788
|
return this.parseCallChain();
|
|
18204
18789
|
}
|
|
18205
18790
|
parseCallChain() {
|
|
@@ -18680,10 +19265,7 @@ class _ParseAST {
|
|
|
18680
19265
|
}
|
|
18681
19266
|
}
|
|
18682
19267
|
class SimpleExpressionChecker extends RecursiveAstVisitor {
|
|
18683
|
-
|
|
18684
|
-
super(...arguments);
|
|
18685
|
-
this.errors = [];
|
|
18686
|
-
}
|
|
19268
|
+
errors = [];
|
|
18687
19269
|
visitPipe() {
|
|
18688
19270
|
this.errors.push('pipes');
|
|
18689
19271
|
}
|
|
@@ -18724,6 +19306,131 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
18724
19306
|
return offsetMap;
|
|
18725
19307
|
}
|
|
18726
19308
|
|
|
19309
|
+
/** Serializes the given AST into a normalized string format. */
|
|
19310
|
+
function serialize(expression) {
|
|
19311
|
+
return expression.visit(new SerializeExpressionVisitor());
|
|
19312
|
+
}
|
|
19313
|
+
class SerializeExpressionVisitor {
|
|
19314
|
+
visitUnary(ast, context) {
|
|
19315
|
+
return `${ast.operator}${ast.expr.visit(this, context)}`;
|
|
19316
|
+
}
|
|
19317
|
+
visitBinary(ast, context) {
|
|
19318
|
+
return `${ast.left.visit(this, context)} ${ast.operation} ${ast.right.visit(this, context)}`;
|
|
19319
|
+
}
|
|
19320
|
+
visitChain(ast, context) {
|
|
19321
|
+
return ast.expressions.map((e) => e.visit(this, context)).join('; ');
|
|
19322
|
+
}
|
|
19323
|
+
visitConditional(ast, context) {
|
|
19324
|
+
return `${ast.condition.visit(this, context)} ? ${ast.trueExp.visit(this, context)} : ${ast.falseExp.visit(this, context)}`;
|
|
19325
|
+
}
|
|
19326
|
+
visitThisReceiver() {
|
|
19327
|
+
return 'this';
|
|
19328
|
+
}
|
|
19329
|
+
visitImplicitReceiver() {
|
|
19330
|
+
return '';
|
|
19331
|
+
}
|
|
19332
|
+
visitInterpolation(ast, context) {
|
|
19333
|
+
return interleave(ast.strings, ast.expressions.map((e) => e.visit(this, context))).join('');
|
|
19334
|
+
}
|
|
19335
|
+
visitKeyedRead(ast, context) {
|
|
19336
|
+
return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}]`;
|
|
19337
|
+
}
|
|
19338
|
+
visitKeyedWrite(ast, context) {
|
|
19339
|
+
return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}] = ${ast.value.visit(this, context)}`;
|
|
19340
|
+
}
|
|
19341
|
+
visitLiteralArray(ast, context) {
|
|
19342
|
+
return `[${ast.expressions.map((e) => e.visit(this, context)).join(', ')}]`;
|
|
19343
|
+
}
|
|
19344
|
+
visitLiteralMap(ast, context) {
|
|
19345
|
+
return `{${zip(ast.keys.map((literal) => (literal.quoted ? `'${literal.key}'` : literal.key)), ast.values.map((value) => value.visit(this, context)))
|
|
19346
|
+
.map(([key, value]) => `${key}: ${value}`)
|
|
19347
|
+
.join(', ')}}`;
|
|
19348
|
+
}
|
|
19349
|
+
visitLiteralPrimitive(ast) {
|
|
19350
|
+
if (ast.value === null)
|
|
19351
|
+
return 'null';
|
|
19352
|
+
switch (typeof ast.value) {
|
|
19353
|
+
case 'number':
|
|
19354
|
+
case 'boolean':
|
|
19355
|
+
return ast.value.toString();
|
|
19356
|
+
case 'undefined':
|
|
19357
|
+
return 'undefined';
|
|
19358
|
+
case 'string':
|
|
19359
|
+
return `'${ast.value.replace(/'/g, `\\'`)}'`;
|
|
19360
|
+
default:
|
|
19361
|
+
throw new Error(`Unsupported primitive type: ${ast.value}`);
|
|
19362
|
+
}
|
|
19363
|
+
}
|
|
19364
|
+
visitPipe(ast, context) {
|
|
19365
|
+
return `${ast.exp.visit(this, context)} | ${ast.name}`;
|
|
19366
|
+
}
|
|
19367
|
+
visitPrefixNot(ast, context) {
|
|
19368
|
+
return `!${ast.expression.visit(this, context)}`;
|
|
19369
|
+
}
|
|
19370
|
+
visitNonNullAssert(ast, context) {
|
|
19371
|
+
return `${ast.expression.visit(this, context)}!`;
|
|
19372
|
+
}
|
|
19373
|
+
visitPropertyRead(ast, context) {
|
|
19374
|
+
if (ast.receiver instanceof ImplicitReceiver) {
|
|
19375
|
+
return ast.name;
|
|
19376
|
+
}
|
|
19377
|
+
else {
|
|
19378
|
+
return `${ast.receiver.visit(this, context)}.${ast.name}`;
|
|
19379
|
+
}
|
|
19380
|
+
}
|
|
19381
|
+
visitPropertyWrite(ast, context) {
|
|
19382
|
+
if (ast.receiver instanceof ImplicitReceiver) {
|
|
19383
|
+
return `${ast.name} = ${ast.value.visit(this, context)}`;
|
|
19384
|
+
}
|
|
19385
|
+
else {
|
|
19386
|
+
return `${ast.receiver.visit(this, context)}.${ast.name} = ${ast.value.visit(this, context)}`;
|
|
19387
|
+
}
|
|
19388
|
+
}
|
|
19389
|
+
visitSafePropertyRead(ast, context) {
|
|
19390
|
+
return `${ast.receiver.visit(this, context)}?.${ast.name}`;
|
|
19391
|
+
}
|
|
19392
|
+
visitSafeKeyedRead(ast, context) {
|
|
19393
|
+
return `${ast.receiver.visit(this, context)}?.[${ast.key.visit(this, context)}]`;
|
|
19394
|
+
}
|
|
19395
|
+
visitCall(ast, context) {
|
|
19396
|
+
return `${ast.receiver.visit(this, context)}(${ast.args
|
|
19397
|
+
.map((e) => e.visit(this, context))
|
|
19398
|
+
.join(', ')})`;
|
|
19399
|
+
}
|
|
19400
|
+
visitSafeCall(ast, context) {
|
|
19401
|
+
return `${ast.receiver.visit(this, context)}?.(${ast.args
|
|
19402
|
+
.map((e) => e.visit(this, context))
|
|
19403
|
+
.join(', ')})`;
|
|
19404
|
+
}
|
|
19405
|
+
visitTypeofExpresion(ast, context) {
|
|
19406
|
+
return `typeof ${ast.expression.visit(this, context)}`;
|
|
19407
|
+
}
|
|
19408
|
+
visitASTWithSource(ast, context) {
|
|
19409
|
+
return ast.ast.visit(this, context);
|
|
19410
|
+
}
|
|
19411
|
+
}
|
|
19412
|
+
/** Zips the two input arrays into a single array of pairs of elements at the same index. */
|
|
19413
|
+
function zip(left, right) {
|
|
19414
|
+
if (left.length !== right.length)
|
|
19415
|
+
throw new Error('Array lengths must match');
|
|
19416
|
+
return left.map((l, i) => [l, right[i]]);
|
|
19417
|
+
}
|
|
19418
|
+
/**
|
|
19419
|
+
* Interleaves the two arrays, starting with the first item on the left, then the first item
|
|
19420
|
+
* on the right, second item from the left, and so on. When the first array's items are exhausted,
|
|
19421
|
+
* the remaining items from the other array are included with no interleaving.
|
|
19422
|
+
*/
|
|
19423
|
+
function interleave(left, right) {
|
|
19424
|
+
const result = [];
|
|
19425
|
+
for (let index = 0; index < Math.max(left.length, right.length); index++) {
|
|
19426
|
+
if (index < left.length)
|
|
19427
|
+
result.push(left[index]);
|
|
19428
|
+
if (index < right.length)
|
|
19429
|
+
result.push(right[index]);
|
|
19430
|
+
}
|
|
19431
|
+
return result;
|
|
19432
|
+
}
|
|
19433
|
+
|
|
18727
19434
|
// =================================================================================================
|
|
18728
19435
|
// =================================================================================================
|
|
18729
19436
|
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
@@ -19073,12 +19780,12 @@ const _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName,
|
|
|
19073
19780
|
return inverted;
|
|
19074
19781
|
}, new Map());
|
|
19075
19782
|
class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
19783
|
+
_schema = new Map();
|
|
19784
|
+
// We don't allow binding to events for security reasons. Allowing event bindings would almost
|
|
19785
|
+
// certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.
|
|
19786
|
+
_eventSchema = new Map();
|
|
19076
19787
|
constructor() {
|
|
19077
19788
|
super();
|
|
19078
|
-
this._schema = new Map();
|
|
19079
|
-
// We don't allow binding to events for security reasons. Allowing event bindings would almost
|
|
19080
|
-
// certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.
|
|
19081
|
-
this._eventSchema = new Map();
|
|
19082
19789
|
SCHEMA.forEach((encodedType) => {
|
|
19083
19790
|
const type = new Map();
|
|
19084
19791
|
const events = new Set();
|
|
@@ -19275,9 +19982,15 @@ function _isPixelDimensionStyle(prop) {
|
|
|
19275
19982
|
}
|
|
19276
19983
|
|
|
19277
19984
|
class HtmlTagDefinition {
|
|
19985
|
+
closedByChildren = {};
|
|
19986
|
+
contentType;
|
|
19987
|
+
closedByParent = false;
|
|
19988
|
+
implicitNamespacePrefix;
|
|
19989
|
+
isVoid;
|
|
19990
|
+
ignoreFirstLf;
|
|
19991
|
+
canSelfClose;
|
|
19992
|
+
preventNamespaceInheritance;
|
|
19278
19993
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false, } = {}) {
|
|
19279
|
-
this.closedByChildren = {};
|
|
19280
|
-
this.closedByParent = false;
|
|
19281
19994
|
if (closedByChildren && closedByChildren.length > 0) {
|
|
19282
19995
|
closedByChildren.forEach((tagName) => (this.closedByChildren[tagName] = true));
|
|
19283
19996
|
}
|
|
@@ -19459,12 +20172,10 @@ const TAG_TO_PLACEHOLDER_NAMES = {
|
|
|
19459
20172
|
* Returns the same placeholder name when the content is identical.
|
|
19460
20173
|
*/
|
|
19461
20174
|
class PlaceholderRegistry {
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
this._signatureToName = {};
|
|
19467
|
-
}
|
|
20175
|
+
// Count the occurrence of the base name top generate a unique name
|
|
20176
|
+
_placeHolderNameCounts = {};
|
|
20177
|
+
// Maps signature to placeholder names
|
|
20178
|
+
_signatureToName = {};
|
|
19468
20179
|
getStartTagPlaceholderName(tag, attrs, isVoid) {
|
|
19469
20180
|
const signature = this._hashTag(tag, attrs, isVoid);
|
|
19470
20181
|
if (this._signatureToName[signature]) {
|
|
@@ -19557,19 +20268,25 @@ const _expParser = new Parser(new Lexer());
|
|
|
19557
20268
|
/**
|
|
19558
20269
|
* Returns a function converting html nodes to an i18n Message given an interpolationConfig
|
|
19559
20270
|
*/
|
|
19560
|
-
function createI18nMessageFactory(interpolationConfig, containerBlocks, retainEmptyTokens) {
|
|
19561
|
-
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks, retainEmptyTokens);
|
|
20271
|
+
function createI18nMessageFactory(interpolationConfig, containerBlocks, retainEmptyTokens, preserveExpressionWhitespace) {
|
|
20272
|
+
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks, retainEmptyTokens, preserveExpressionWhitespace);
|
|
19562
20273
|
return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
|
|
19563
20274
|
}
|
|
19564
20275
|
function noopVisitNodeFn(_html, i18n) {
|
|
19565
20276
|
return i18n;
|
|
19566
20277
|
}
|
|
19567
20278
|
class _I18nVisitor {
|
|
19568
|
-
|
|
20279
|
+
_expressionParser;
|
|
20280
|
+
_interpolationConfig;
|
|
20281
|
+
_containerBlocks;
|
|
20282
|
+
_retainEmptyTokens;
|
|
20283
|
+
_preserveExpressionWhitespace;
|
|
20284
|
+
constructor(_expressionParser, _interpolationConfig, _containerBlocks, _retainEmptyTokens, _preserveExpressionWhitespace) {
|
|
19569
20285
|
this._expressionParser = _expressionParser;
|
|
19570
20286
|
this._interpolationConfig = _interpolationConfig;
|
|
19571
20287
|
this._containerBlocks = _containerBlocks;
|
|
19572
20288
|
this._retainEmptyTokens = _retainEmptyTokens;
|
|
20289
|
+
this._preserveExpressionWhitespace = _preserveExpressionWhitespace;
|
|
19573
20290
|
}
|
|
19574
20291
|
toI18nMessage(nodes, meaning = '', description = '', customId = '', visitNodeFn) {
|
|
19575
20292
|
const context = {
|
|
@@ -19698,14 +20415,24 @@ class _I18nVisitor {
|
|
|
19698
20415
|
case 8 /* TokenType.INTERPOLATION */:
|
|
19699
20416
|
case 17 /* TokenType.ATTR_VALUE_INTERPOLATION */:
|
|
19700
20417
|
hasInterpolation = true;
|
|
19701
|
-
const expression = token.parts
|
|
20418
|
+
const [startMarker, expression, endMarker] = token.parts;
|
|
19702
20419
|
const baseName = extractPlaceholderName(expression) || 'INTERPOLATION';
|
|
19703
20420
|
const phName = context.placeholderRegistry.getPlaceholderName(baseName, expression);
|
|
19704
|
-
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19708
|
-
|
|
20421
|
+
if (this._preserveExpressionWhitespace) {
|
|
20422
|
+
context.placeholderToContent[phName] = {
|
|
20423
|
+
text: token.parts.join(''),
|
|
20424
|
+
sourceSpan: token.sourceSpan,
|
|
20425
|
+
};
|
|
20426
|
+
nodes.push(new Placeholder(expression, phName, token.sourceSpan));
|
|
20427
|
+
}
|
|
20428
|
+
else {
|
|
20429
|
+
const normalized = this.normalizeExpression(token);
|
|
20430
|
+
context.placeholderToContent[phName] = {
|
|
20431
|
+
text: `${startMarker}${normalized}${endMarker}`,
|
|
20432
|
+
sourceSpan: token.sourceSpan,
|
|
20433
|
+
};
|
|
20434
|
+
nodes.push(new Placeholder(normalized, phName, token.sourceSpan));
|
|
20435
|
+
}
|
|
19709
20436
|
break;
|
|
19710
20437
|
default:
|
|
19711
20438
|
// Try to merge text tokens with previous tokens. We do this even for all tokens
|
|
@@ -19752,6 +20479,15 @@ class _I18nVisitor {
|
|
|
19752
20479
|
return nodes[0];
|
|
19753
20480
|
}
|
|
19754
20481
|
}
|
|
20482
|
+
// Normalize expression whitespace by parsing and re-serializing it. This makes
|
|
20483
|
+
// message IDs more durable to insignificant whitespace changes.
|
|
20484
|
+
normalizeExpression(token) {
|
|
20485
|
+
const expression = token.parts[1];
|
|
20486
|
+
const expr = this._expressionParser.parseBinding(expression,
|
|
20487
|
+
/* location */ token.sourceSpan.start.toString(),
|
|
20488
|
+
/* absoluteOffset */ token.sourceSpan.start.offset, this._interpolationConfig);
|
|
20489
|
+
return serialize(expr);
|
|
20490
|
+
}
|
|
19755
20491
|
}
|
|
19756
20492
|
/**
|
|
19757
20493
|
* Re-use the source-spans from `previousI18n` metadata for the `nodes`.
|
|
@@ -19884,6 +20620,15 @@ const setI18nRefs = (originalNodeMap) => {
|
|
|
19884
20620
|
* stored with other element's and attribute's information.
|
|
19885
20621
|
*/
|
|
19886
20622
|
class I18nMetaVisitor {
|
|
20623
|
+
interpolationConfig;
|
|
20624
|
+
keepI18nAttrs;
|
|
20625
|
+
enableI18nLegacyMessageIdFormat;
|
|
20626
|
+
containerBlocks;
|
|
20627
|
+
preserveSignificantWhitespace;
|
|
20628
|
+
retainEmptyTokens;
|
|
20629
|
+
// whether visited nodes contain i18n information
|
|
20630
|
+
hasI18nMeta = false;
|
|
20631
|
+
_errors = [];
|
|
19887
20632
|
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS, preserveSignificantWhitespace = true,
|
|
19888
20633
|
// When dropping significant whitespace we need to retain empty tokens or
|
|
19889
20634
|
// else we won't be able to reuse source spans because empty tokens would be
|
|
@@ -19898,13 +20643,11 @@ class I18nMetaVisitor {
|
|
|
19898
20643
|
this.containerBlocks = containerBlocks;
|
|
19899
20644
|
this.preserveSignificantWhitespace = preserveSignificantWhitespace;
|
|
19900
20645
|
this.retainEmptyTokens = retainEmptyTokens;
|
|
19901
|
-
// whether visited nodes contain i18n information
|
|
19902
|
-
this.hasI18nMeta = false;
|
|
19903
|
-
this._errors = [];
|
|
19904
20646
|
}
|
|
19905
20647
|
_generateI18nMessage(nodes, meta = '', visitNodeFn) {
|
|
19906
20648
|
const { meaning, description, customId } = this._parseMetadata(meta);
|
|
19907
|
-
const createI18nMessage = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks, this.retainEmptyTokens
|
|
20649
|
+
const createI18nMessage = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks, this.retainEmptyTokens,
|
|
20650
|
+
/* preserveExpressionWhitespace */ this.preserveSignificantWhitespace);
|
|
19908
20651
|
const message = createI18nMessage(nodes, meaning, description, customId, visitNodeFn);
|
|
19909
20652
|
this._setMessageId(message, meta);
|
|
19910
20653
|
this._setLegacyIds(message, meta);
|
|
@@ -20053,9 +20796,7 @@ class I18nMetaVisitor {
|
|
|
20053
20796
|
*/
|
|
20054
20797
|
_setMessageId(message, meta) {
|
|
20055
20798
|
if (!message.id) {
|
|
20056
|
-
message.id =
|
|
20057
|
-
(meta instanceof Message && meta.id) ||
|
|
20058
|
-
decimalDigest(message, /* preservePlaceholders */ this.preserveSignificantWhitespace);
|
|
20799
|
+
message.id = (meta instanceof Message && meta.id) || decimalDigest(message);
|
|
20059
20800
|
}
|
|
20060
20801
|
}
|
|
20061
20802
|
/**
|
|
@@ -20066,11 +20807,7 @@ class I18nMetaVisitor {
|
|
|
20066
20807
|
*/
|
|
20067
20808
|
_setLegacyIds(message, meta) {
|
|
20068
20809
|
if (this.enableI18nLegacyMessageIdFormat) {
|
|
20069
|
-
message.legacyIds = [
|
|
20070
|
-
computeDigest(message),
|
|
20071
|
-
computeDecimalDigest(message,
|
|
20072
|
-
/* preservePlaceholders */ this.preserveSignificantWhitespace),
|
|
20073
|
-
];
|
|
20810
|
+
message.legacyIds = [computeDigest(message), computeDecimalDigest(message)];
|
|
20074
20811
|
}
|
|
20075
20812
|
else if (typeof meta !== 'string') {
|
|
20076
20813
|
// This occurs if we are doing the 2nd pass after whitespace removal (see `parseTemplate()` in
|
|
@@ -20263,6 +21000,8 @@ function createLocalizeStatements(variable, message, params) {
|
|
|
20263
21000
|
* The result can be used for generating the `$localize` tagged template literals.
|
|
20264
21001
|
*/
|
|
20265
21002
|
class LocalizeSerializerVisitor {
|
|
21003
|
+
placeholderToMessage;
|
|
21004
|
+
pieces;
|
|
20266
21005
|
constructor(placeholderToMessage, pieces) {
|
|
20267
21006
|
this.placeholderToMessage = placeholderToMessage;
|
|
20268
21007
|
this.pieces = pieces;
|
|
@@ -21581,6 +22320,7 @@ function extractPureFunctions(job) {
|
|
|
21581
22320
|
}
|
|
21582
22321
|
}
|
|
21583
22322
|
class PureFunctionConstant extends GenericKeyFn {
|
|
22323
|
+
numArgs;
|
|
21584
22324
|
constructor(numArgs) {
|
|
21585
22325
|
super();
|
|
21586
22326
|
this.numArgs = numArgs;
|
|
@@ -25280,6 +26020,9 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
25280
26020
|
else if (ast instanceof PrefixNot) {
|
|
25281
26021
|
return not(convertAst(ast.expression, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));
|
|
25282
26022
|
}
|
|
26023
|
+
else if (ast instanceof TypeofExpression) {
|
|
26024
|
+
return typeofExpr(convertAst(ast.expression, job, baseSourceSpan));
|
|
26025
|
+
}
|
|
25283
26026
|
else {
|
|
25284
26027
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
|
|
25285
26028
|
}
|
|
@@ -25837,6 +26580,11 @@ const ANIMATE_PROP_PREFIX = 'animate-';
|
|
|
25837
26580
|
* Parses bindings in templates and in the directive host area.
|
|
25838
26581
|
*/
|
|
25839
26582
|
class BindingParser {
|
|
26583
|
+
_exprParser;
|
|
26584
|
+
_interpolationConfig;
|
|
26585
|
+
_schemaRegistry;
|
|
26586
|
+
errors;
|
|
26587
|
+
_allowInvalidAssignmentEvents;
|
|
25840
26588
|
constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors, _allowInvalidAssignmentEvents = false) {
|
|
25841
26589
|
this._exprParser = _exprParser;
|
|
25842
26590
|
this._interpolationConfig = _interpolationConfig;
|
|
@@ -26239,10 +26987,7 @@ class BindingParser {
|
|
|
26239
26987
|
}
|
|
26240
26988
|
}
|
|
26241
26989
|
class PipeCollector extends RecursiveAstVisitor {
|
|
26242
|
-
|
|
26243
|
-
super(...arguments);
|
|
26244
|
-
this.pipes = new Map();
|
|
26245
|
-
}
|
|
26990
|
+
pipes = new Map();
|
|
26246
26991
|
visitPipe(ast, context) {
|
|
26247
26992
|
this.pipes.set(ast.name, ast);
|
|
26248
26993
|
ast.exp.visit(this);
|
|
@@ -26350,6 +27095,11 @@ var PreparsedElementType;
|
|
|
26350
27095
|
PreparsedElementType[PreparsedElementType["OTHER"] = 4] = "OTHER";
|
|
26351
27096
|
})(PreparsedElementType || (PreparsedElementType = {}));
|
|
26352
27097
|
class PreparsedElement {
|
|
27098
|
+
type;
|
|
27099
|
+
selectAttr;
|
|
27100
|
+
hrefAttr;
|
|
27101
|
+
nonBindable;
|
|
27102
|
+
projectAs;
|
|
26353
27103
|
constructor(type, selectAttr, hrefAttr, nonBindable, projectAs) {
|
|
26354
27104
|
this.type = type;
|
|
26355
27105
|
this.selectAttr = selectAttr;
|
|
@@ -26860,6 +27610,18 @@ function getHydrateSpan(expression, sourceSpan) {
|
|
|
26860
27610
|
return new ParseSourceSpan(sourceSpan.start, sourceSpan.start.moveBy('hydrate'.length));
|
|
26861
27611
|
}
|
|
26862
27612
|
class OnTriggerParser {
|
|
27613
|
+
expression;
|
|
27614
|
+
start;
|
|
27615
|
+
span;
|
|
27616
|
+
triggers;
|
|
27617
|
+
errors;
|
|
27618
|
+
validator;
|
|
27619
|
+
placeholder;
|
|
27620
|
+
prefetchSpan;
|
|
27621
|
+
onSourceSpan;
|
|
27622
|
+
hydrateSpan;
|
|
27623
|
+
index = 0;
|
|
27624
|
+
tokens;
|
|
26863
27625
|
constructor(expression, start, span, triggers, errors, validator, placeholder, prefetchSpan, onSourceSpan, hydrateSpan) {
|
|
26864
27626
|
this.expression = expression;
|
|
26865
27627
|
this.start = start;
|
|
@@ -26871,7 +27633,6 @@ class OnTriggerParser {
|
|
|
26871
27633
|
this.prefetchSpan = prefetchSpan;
|
|
26872
27634
|
this.onSourceSpan = onSourceSpan;
|
|
26873
27635
|
this.hydrateSpan = hydrateSpan;
|
|
26874
|
-
this.index = 0;
|
|
26875
27636
|
this.tokens = new Lexer().tokenize(expression.slice(start));
|
|
26876
27637
|
}
|
|
26877
27638
|
parse() {
|
|
@@ -27134,7 +27895,7 @@ const HYDRATE_WHEN_PATTERN = /^hydrate\s+when\s/;
|
|
|
27134
27895
|
/** Pattern to identify a `hydrate on` trigger. */
|
|
27135
27896
|
const HYDRATE_ON_PATTERN = /^hydrate\s+on\s/;
|
|
27136
27897
|
/** Pattern to identify a `hydrate never` trigger. */
|
|
27137
|
-
const HYDRATE_NEVER_PATTERN = /^hydrate\s+never\s
|
|
27898
|
+
const HYDRATE_NEVER_PATTERN = /^hydrate\s+never(\s*)$/;
|
|
27138
27899
|
/** Pattern to identify a `minimum` parameter in a block. */
|
|
27139
27900
|
const MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
27140
27901
|
/** Pattern to identify a `after` parameter in a block. */
|
|
@@ -27342,21 +28103,23 @@ function htmlAstToRender3Ast(htmlNodes, bindingParser, options) {
|
|
|
27342
28103
|
return result;
|
|
27343
28104
|
}
|
|
27344
28105
|
class HtmlAstToIvyAst {
|
|
28106
|
+
bindingParser;
|
|
28107
|
+
options;
|
|
28108
|
+
errors = [];
|
|
28109
|
+
styles = [];
|
|
28110
|
+
styleUrls = [];
|
|
28111
|
+
ngContentSelectors = [];
|
|
28112
|
+
// This array will be populated if `Render3ParseOptions['collectCommentNodes']` is true
|
|
28113
|
+
commentNodes = [];
|
|
28114
|
+
inI18nBlock = false;
|
|
28115
|
+
/**
|
|
28116
|
+
* Keeps track of the nodes that have been processed already when previous nodes were visited.
|
|
28117
|
+
* These are typically blocks connected to other blocks or text nodes between connected blocks.
|
|
28118
|
+
*/
|
|
28119
|
+
processedNodes = new Set();
|
|
27345
28120
|
constructor(bindingParser, options) {
|
|
27346
28121
|
this.bindingParser = bindingParser;
|
|
27347
28122
|
this.options = options;
|
|
27348
|
-
this.errors = [];
|
|
27349
|
-
this.styles = [];
|
|
27350
|
-
this.styleUrls = [];
|
|
27351
|
-
this.ngContentSelectors = [];
|
|
27352
|
-
// This array will be populated if `Render3ParseOptions['collectCommentNodes']` is true
|
|
27353
|
-
this.commentNodes = [];
|
|
27354
|
-
this.inI18nBlock = false;
|
|
27355
|
-
/**
|
|
27356
|
-
* Keeps track of the nodes that have been processed already when previous nodes were visited.
|
|
27357
|
-
* These are typically blocks connected to other blocks or text nodes between connected blocks.
|
|
27358
|
-
*/
|
|
27359
|
-
this.processedNodes = new Set();
|
|
27360
28123
|
}
|
|
27361
28124
|
// HTML visitor
|
|
27362
28125
|
visitElement(element) {
|
|
@@ -27992,8 +28755,8 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
|
|
|
27992
28755
|
if (meta.exportAs !== null) {
|
|
27993
28756
|
definitionMap.set('exportAs', literalArr(meta.exportAs.map((e) => literal(e))));
|
|
27994
28757
|
}
|
|
27995
|
-
if (meta.isStandalone) {
|
|
27996
|
-
definitionMap.set('standalone', literal(
|
|
28758
|
+
if (meta.isStandalone === false) {
|
|
28759
|
+
definitionMap.set('standalone', literal(false));
|
|
27997
28760
|
}
|
|
27998
28761
|
if (meta.isSignal) {
|
|
27999
28762
|
definitionMap.set('signals', literal(true));
|
|
@@ -28037,10 +28800,6 @@ function addFeatures(definitionMap, meta) {
|
|
|
28037
28800
|
if (meta.lifecycle.usesOnChanges) {
|
|
28038
28801
|
features.push(importExpr(Identifiers.NgOnChangesFeature));
|
|
28039
28802
|
}
|
|
28040
|
-
// TODO: better way of differentiating component vs directive metadata.
|
|
28041
|
-
if (meta.hasOwnProperty('template') && meta.isStandalone) {
|
|
28042
|
-
features.push(importExpr(Identifiers.StandaloneFeature));
|
|
28043
|
-
}
|
|
28044
28803
|
if ('externalStyles' in meta && meta.externalStyles?.length) {
|
|
28045
28804
|
const externalStyleNodes = meta.externalStyles.map((externalStyle) => literal(externalStyle));
|
|
28046
28805
|
features.push(importExpr(Identifiers.ExternalStylesFeature).callFn([literalArr(externalStyleNodes)]));
|
|
@@ -28569,6 +29328,7 @@ function findMatchingDirectivesAndPipes(template, directiveSelectors) {
|
|
|
28569
29328
|
* target.
|
|
28570
29329
|
*/
|
|
28571
29330
|
class R3TargetBinder {
|
|
29331
|
+
directiveMatcher;
|
|
28572
29332
|
constructor(directiveMatcher) {
|
|
28573
29333
|
this.directiveMatcher = directiveMatcher;
|
|
28574
29334
|
}
|
|
@@ -28606,21 +29366,25 @@ class R3TargetBinder {
|
|
|
28606
29366
|
* be analyzed and have their child `Scope`s available in `childScopes`.
|
|
28607
29367
|
*/
|
|
28608
29368
|
class Scope {
|
|
29369
|
+
parentScope;
|
|
29370
|
+
rootNode;
|
|
29371
|
+
/**
|
|
29372
|
+
* Named members of the `Scope`, such as `Reference`s or `Variable`s.
|
|
29373
|
+
*/
|
|
29374
|
+
namedEntities = new Map();
|
|
29375
|
+
/**
|
|
29376
|
+
* Set of elements that belong to this scope.
|
|
29377
|
+
*/
|
|
29378
|
+
elementsInScope = new Set();
|
|
29379
|
+
/**
|
|
29380
|
+
* Child `Scope`s for immediately nested `ScopedNode`s.
|
|
29381
|
+
*/
|
|
29382
|
+
childScopes = new Map();
|
|
29383
|
+
/** Whether this scope is deferred or if any of its ancestors are deferred. */
|
|
29384
|
+
isDeferred;
|
|
28609
29385
|
constructor(parentScope, rootNode) {
|
|
28610
29386
|
this.parentScope = parentScope;
|
|
28611
29387
|
this.rootNode = rootNode;
|
|
28612
|
-
/**
|
|
28613
|
-
* Named members of the `Scope`, such as `Reference`s or `Variable`s.
|
|
28614
|
-
*/
|
|
28615
|
-
this.namedEntities = new Map();
|
|
28616
|
-
/**
|
|
28617
|
-
* Set of elements that belong to this scope.
|
|
28618
|
-
*/
|
|
28619
|
-
this.elementsInScope = new Set();
|
|
28620
|
-
/**
|
|
28621
|
-
* Child `Scope`s for immediately nested `ScopedNode`s.
|
|
28622
|
-
*/
|
|
28623
|
-
this.childScopes = new Map();
|
|
28624
29388
|
this.isDeferred =
|
|
28625
29389
|
parentScope !== null && parentScope.isDeferred ? true : rootNode instanceof DeferredBlock;
|
|
28626
29390
|
}
|
|
@@ -28791,14 +29555,19 @@ class Scope {
|
|
|
28791
29555
|
* Usually used via the static `apply()` method.
|
|
28792
29556
|
*/
|
|
28793
29557
|
class DirectiveBinder {
|
|
29558
|
+
matcher;
|
|
29559
|
+
directives;
|
|
29560
|
+
eagerDirectives;
|
|
29561
|
+
bindings;
|
|
29562
|
+
references;
|
|
29563
|
+
// Indicates whether we are visiting elements within a `defer` block
|
|
29564
|
+
isInDeferBlock = false;
|
|
28794
29565
|
constructor(matcher, directives, eagerDirectives, bindings, references) {
|
|
28795
29566
|
this.matcher = matcher;
|
|
28796
29567
|
this.directives = directives;
|
|
28797
29568
|
this.eagerDirectives = eagerDirectives;
|
|
28798
29569
|
this.bindings = bindings;
|
|
28799
29570
|
this.references = references;
|
|
28800
|
-
// Indicates whether we are visiting elements within a `defer` block
|
|
28801
|
-
this.isInDeferBlock = false;
|
|
28802
29571
|
}
|
|
28803
29572
|
/**
|
|
28804
29573
|
* Process a template (list of `Node`s) and perform directive matching against each node.
|
|
@@ -28957,6 +29726,16 @@ class DirectiveBinder {
|
|
|
28957
29726
|
* by overridden methods from that visitor.
|
|
28958
29727
|
*/
|
|
28959
29728
|
class TemplateBinder extends RecursiveAstVisitor {
|
|
29729
|
+
bindings;
|
|
29730
|
+
symbols;
|
|
29731
|
+
usedPipes;
|
|
29732
|
+
eagerPipes;
|
|
29733
|
+
deferBlocks;
|
|
29734
|
+
nestingLevel;
|
|
29735
|
+
scope;
|
|
29736
|
+
rootNode;
|
|
29737
|
+
level;
|
|
29738
|
+
visitNode;
|
|
28960
29739
|
constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, rootNode, level) {
|
|
28961
29740
|
super();
|
|
28962
29741
|
this.bindings = bindings;
|
|
@@ -29196,6 +29975,21 @@ class TemplateBinder extends RecursiveAstVisitor {
|
|
|
29196
29975
|
* See `BoundTarget` for documentation on the individual methods.
|
|
29197
29976
|
*/
|
|
29198
29977
|
class R3BoundTarget {
|
|
29978
|
+
target;
|
|
29979
|
+
directives;
|
|
29980
|
+
eagerDirectives;
|
|
29981
|
+
bindings;
|
|
29982
|
+
references;
|
|
29983
|
+
exprTargets;
|
|
29984
|
+
symbols;
|
|
29985
|
+
nestingLevel;
|
|
29986
|
+
scopedNodeEntities;
|
|
29987
|
+
usedPipes;
|
|
29988
|
+
eagerPipes;
|
|
29989
|
+
/** Deferred blocks, ordered as they appear in the template. */
|
|
29990
|
+
deferredBlocks;
|
|
29991
|
+
/** Map of deferred blocks to their scope. */
|
|
29992
|
+
deferredScopes;
|
|
29199
29993
|
constructor(target, directives, eagerDirectives, bindings, references, exprTargets, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, rawDeferred) {
|
|
29200
29994
|
this.target = target;
|
|
29201
29995
|
this.directives = directives;
|
|
@@ -29383,11 +30177,12 @@ class ResourceLoader {
|
|
|
29383
30177
|
}
|
|
29384
30178
|
|
|
29385
30179
|
class CompilerFacadeImpl {
|
|
30180
|
+
jitEvaluator;
|
|
30181
|
+
FactoryTarget = FactoryTarget$1;
|
|
30182
|
+
ResourceLoader = ResourceLoader;
|
|
30183
|
+
elementSchemaRegistry = new DomElementSchemaRegistry();
|
|
29386
30184
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
29387
30185
|
this.jitEvaluator = jitEvaluator;
|
|
29388
|
-
this.FactoryTarget = FactoryTarget$1;
|
|
29389
|
-
this.ResourceLoader = ResourceLoader;
|
|
29390
|
-
this.elementSchemaRegistry = new DomElementSchemaRegistry();
|
|
29391
30186
|
}
|
|
29392
30187
|
compilePipe(angularCoreEnv, sourceMapUrl, facade) {
|
|
29393
30188
|
const metadata = {
|
|
@@ -29692,7 +30487,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
|
29692
30487
|
deps: null,
|
|
29693
30488
|
typeArgumentCount: 0,
|
|
29694
30489
|
fullInheritance: false,
|
|
29695
|
-
isStandalone: declaration.isStandalone ??
|
|
30490
|
+
isStandalone: declaration.isStandalone ?? getJitStandaloneDefaultForVersion(declaration.version),
|
|
29696
30491
|
isSignal: declaration.isSignal ?? false,
|
|
29697
30492
|
hostDirectives,
|
|
29698
30493
|
};
|
|
@@ -30016,7 +30811,7 @@ function convertDeclarePipeFacadeToMetadata(declaration) {
|
|
|
30016
30811
|
pipeName: declaration.name,
|
|
30017
30812
|
deps: null,
|
|
30018
30813
|
pure: declaration.pure ?? true,
|
|
30019
|
-
isStandalone: declaration.isStandalone ??
|
|
30814
|
+
isStandalone: declaration.isStandalone ?? getJitStandaloneDefaultForVersion(declaration.version),
|
|
30020
30815
|
};
|
|
30021
30816
|
}
|
|
30022
30817
|
function convertDeclareInjectorFacadeToMetadata(declaration) {
|
|
@@ -30041,9 +30836,12 @@ function publishFacade(global) {
|
|
|
30041
30836
|
* @description
|
|
30042
30837
|
* Entry point for all public APIs of the compiler package.
|
|
30043
30838
|
*/
|
|
30044
|
-
const VERSION = new Version('19.0.0-
|
|
30839
|
+
const VERSION = new Version('19.0.0-rc.1');
|
|
30045
30840
|
|
|
30046
30841
|
class CompilerConfig {
|
|
30842
|
+
defaultEncapsulation;
|
|
30843
|
+
preserveWhitespaces;
|
|
30844
|
+
strictInjectionParameters;
|
|
30047
30845
|
constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {
|
|
30048
30846
|
this.defaultEncapsulation = defaultEncapsulation;
|
|
30049
30847
|
this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));
|
|
@@ -30072,6 +30870,8 @@ function mergeTranslations(nodes, translations, interpolationConfig, implicitTag
|
|
|
30072
30870
|
return visitor.merge(nodes, translations, interpolationConfig);
|
|
30073
30871
|
}
|
|
30074
30872
|
class ExtractionResult {
|
|
30873
|
+
messages;
|
|
30874
|
+
errors;
|
|
30075
30875
|
constructor(messages, errors) {
|
|
30076
30876
|
this.messages = messages;
|
|
30077
30877
|
this.errors = errors;
|
|
@@ -30090,6 +30890,30 @@ var _VisitorMode;
|
|
|
30090
30890
|
* @internal
|
|
30091
30891
|
*/
|
|
30092
30892
|
class _Visitor {
|
|
30893
|
+
_implicitTags;
|
|
30894
|
+
_implicitAttrs;
|
|
30895
|
+
_preserveSignificantWhitespace;
|
|
30896
|
+
// Using non-null assertions because all variables are (re)set in init()
|
|
30897
|
+
_depth;
|
|
30898
|
+
// <el i18n>...</el>
|
|
30899
|
+
_inI18nNode;
|
|
30900
|
+
_inImplicitNode;
|
|
30901
|
+
// <!--i18n-->...<!--/i18n-->
|
|
30902
|
+
_inI18nBlock;
|
|
30903
|
+
_blockMeaningAndDesc;
|
|
30904
|
+
_blockChildren;
|
|
30905
|
+
_blockStartDepth;
|
|
30906
|
+
// {<icu message>}
|
|
30907
|
+
_inIcu;
|
|
30908
|
+
// set to void 0 when not in a section
|
|
30909
|
+
_msgCountAtSectionStart;
|
|
30910
|
+
_errors;
|
|
30911
|
+
_mode;
|
|
30912
|
+
// _VisitorMode.Extract only
|
|
30913
|
+
_messages;
|
|
30914
|
+
// _VisitorMode.Merge only
|
|
30915
|
+
_translations;
|
|
30916
|
+
_createI18nMessage;
|
|
30093
30917
|
constructor(_implicitTags, _implicitAttrs, _preserveSignificantWhitespace = true) {
|
|
30094
30918
|
this._implicitTags = _implicitTags;
|
|
30095
30919
|
this._implicitAttrs = _implicitAttrs;
|
|
@@ -30282,7 +31106,8 @@ class _Visitor {
|
|
|
30282
31106
|
// When dropping significant whitespace we need to retain whitespace tokens or
|
|
30283
31107
|
// else we won't be able to reuse source spans because empty tokens would be
|
|
30284
31108
|
// removed and cause a mismatch.
|
|
30285
|
-
!this._preserveSignificantWhitespace
|
|
31109
|
+
/* retainEmptyTokens */ !this._preserveSignificantWhitespace,
|
|
31110
|
+
/* preserveExpressionWhitespace */ this._preserveSignificantWhitespace);
|
|
30286
31111
|
}
|
|
30287
31112
|
// looks for translatable attributes
|
|
30288
31113
|
_visitAttributesOf(el) {
|
|
@@ -30303,7 +31128,9 @@ class _Visitor {
|
|
|
30303
31128
|
// add a translatable message
|
|
30304
31129
|
_addMessage(ast, msgMeta) {
|
|
30305
31130
|
if (ast.length == 0 ||
|
|
30306
|
-
(ast
|
|
31131
|
+
this._isEmptyAttributeValue(ast) ||
|
|
31132
|
+
this._isPlaceholderOnlyAttributeValue(ast) ||
|
|
31133
|
+
this._isPlaceholderOnlyMessage(ast)) {
|
|
30307
31134
|
// Do not create empty messages
|
|
30308
31135
|
return null;
|
|
30309
31136
|
}
|
|
@@ -30312,6 +31139,41 @@ class _Visitor {
|
|
|
30312
31139
|
this._messages.push(message);
|
|
30313
31140
|
return message;
|
|
30314
31141
|
}
|
|
31142
|
+
// Check for cases like `<div i18n-title title="">`.
|
|
31143
|
+
_isEmptyAttributeValue(ast) {
|
|
31144
|
+
if (!isAttrNode(ast))
|
|
31145
|
+
return false;
|
|
31146
|
+
const node = ast[0];
|
|
31147
|
+
return node.value.trim() === '';
|
|
31148
|
+
}
|
|
31149
|
+
// Check for cases like `<div i18n-title title="{{ name }}">`.
|
|
31150
|
+
_isPlaceholderOnlyAttributeValue(ast) {
|
|
31151
|
+
if (!isAttrNode(ast))
|
|
31152
|
+
return false;
|
|
31153
|
+
const tokens = ast[0].valueTokens ?? [];
|
|
31154
|
+
const interpolations = tokens.filter((token) => token.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */);
|
|
31155
|
+
const plainText = tokens
|
|
31156
|
+
.filter((token) => token.type === 16 /* TokenType.ATTR_VALUE_TEXT */)
|
|
31157
|
+
// `AttributeValueTextToken` always has exactly one part per its type.
|
|
31158
|
+
.map((token) => token.parts[0].trim())
|
|
31159
|
+
.join('');
|
|
31160
|
+
// Check if there is a single interpolation and all text around it is empty.
|
|
31161
|
+
return interpolations.length === 1 && plainText === '';
|
|
31162
|
+
}
|
|
31163
|
+
// Check for cases like `<div i18n>{{ name }}</div>`.
|
|
31164
|
+
_isPlaceholderOnlyMessage(ast) {
|
|
31165
|
+
if (!isTextNode(ast))
|
|
31166
|
+
return false;
|
|
31167
|
+
const tokens = ast[0].tokens;
|
|
31168
|
+
const interpolations = tokens.filter((token) => token.type === 8 /* TokenType.INTERPOLATION */);
|
|
31169
|
+
const plainText = tokens
|
|
31170
|
+
.filter((token) => token.type === 5 /* TokenType.TEXT */)
|
|
31171
|
+
// `TextToken` always has exactly one part per its type.
|
|
31172
|
+
.map((token) => token.parts[0].trim())
|
|
31173
|
+
.join('');
|
|
31174
|
+
// Check if there is a single interpolation and all text around it is empty.
|
|
31175
|
+
return interpolations.length === 1 && plainText === '';
|
|
31176
|
+
}
|
|
30315
31177
|
// Translates the given message given the `TranslationBundle`
|
|
30316
31178
|
// This is used for translating elements / blocks - see `_translateAttributes` for attributes
|
|
30317
31179
|
// no-op when called in extraction mode (returns [])
|
|
@@ -30454,16 +31316,20 @@ function _parseMessageMeta(i18n) {
|
|
|
30454
31316
|
: ['', meaningAndDesc];
|
|
30455
31317
|
return { meaning, description, id: id.trim() };
|
|
30456
31318
|
}
|
|
31319
|
+
function isTextNode(ast) {
|
|
31320
|
+
return ast.length === 1 && ast[0] instanceof Text;
|
|
31321
|
+
}
|
|
31322
|
+
function isAttrNode(ast) {
|
|
31323
|
+
return ast.length === 1 && ast[0] instanceof Attribute;
|
|
31324
|
+
}
|
|
30457
31325
|
|
|
30458
31326
|
class XmlTagDefinition {
|
|
30459
|
-
|
|
30460
|
-
|
|
30461
|
-
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
30465
|
-
this.preventNamespaceInheritance = false;
|
|
30466
|
-
}
|
|
31327
|
+
closedByParent = false;
|
|
31328
|
+
implicitNamespacePrefix = null;
|
|
31329
|
+
isVoid = false;
|
|
31330
|
+
ignoreFirstLf = false;
|
|
31331
|
+
canSelfClose = true;
|
|
31332
|
+
preventNamespaceInheritance = false;
|
|
30467
31333
|
requireExtraParent(currentParent) {
|
|
30468
31334
|
return false;
|
|
30469
31335
|
}
|
|
@@ -30544,7 +31410,7 @@ class Xliff extends Serializer {
|
|
|
30544
31410
|
file,
|
|
30545
31411
|
new CR(),
|
|
30546
31412
|
]);
|
|
30547
|
-
return serialize([
|
|
31413
|
+
return serialize$1([
|
|
30548
31414
|
new Declaration({ version: '1.0', encoding: 'UTF-8' }),
|
|
30549
31415
|
new CR(),
|
|
30550
31416
|
xliff,
|
|
@@ -30635,9 +31501,11 @@ class _WriteVisitor$1 {
|
|
|
30635
31501
|
// TODO(vicb): add error management (structure)
|
|
30636
31502
|
// Extract messages as xml nodes from the xliff file
|
|
30637
31503
|
class XliffParser {
|
|
30638
|
-
|
|
30639
|
-
|
|
30640
|
-
|
|
31504
|
+
// using non-null assertions because they're re(set) by parse()
|
|
31505
|
+
_unitMlString;
|
|
31506
|
+
_errors;
|
|
31507
|
+
_msgIdToHtml;
|
|
31508
|
+
_locale = null;
|
|
30641
31509
|
parse(xliff, url) {
|
|
30642
31510
|
this._unitMlString = null;
|
|
30643
31511
|
this._msgIdToHtml = {};
|
|
@@ -30713,6 +31581,8 @@ class XliffParser {
|
|
|
30713
31581
|
}
|
|
30714
31582
|
// Convert ml nodes (xliff syntax) to i18n nodes
|
|
30715
31583
|
class XmlToI18n$2 {
|
|
31584
|
+
// using non-null assertion because it's re(set) by convert()
|
|
31585
|
+
_errors;
|
|
30716
31586
|
convert(message, url) {
|
|
30717
31587
|
const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });
|
|
30718
31588
|
this._errors = xmlIcu.errors;
|
|
@@ -30819,7 +31689,7 @@ class Xliff2 extends Serializer {
|
|
|
30819
31689
|
new CR(2),
|
|
30820
31690
|
]);
|
|
30821
31691
|
const xliff = new Tag(_XLIFF_TAG, { version: _VERSION, xmlns: _XMLNS, srcLang: locale || _DEFAULT_SOURCE_LANG }, [new CR(2), file, new CR()]);
|
|
30822
|
-
return serialize([
|
|
31692
|
+
return serialize$1([
|
|
30823
31693
|
new Declaration({ version: '1.0', encoding: 'UTF-8' }),
|
|
30824
31694
|
new CR(),
|
|
30825
31695
|
xliff,
|
|
@@ -30844,13 +31714,11 @@ class Xliff2 extends Serializer {
|
|
|
30844
31714
|
return { locale: locale, i18nNodesByMsgId };
|
|
30845
31715
|
}
|
|
30846
31716
|
digest(message) {
|
|
30847
|
-
return decimalDigest(message
|
|
31717
|
+
return decimalDigest(message);
|
|
30848
31718
|
}
|
|
30849
31719
|
}
|
|
30850
31720
|
class _WriteVisitor {
|
|
30851
|
-
|
|
30852
|
-
this._nextPlaceholderId = 0;
|
|
30853
|
-
}
|
|
31721
|
+
_nextPlaceholderId = 0;
|
|
30854
31722
|
visitText(text, context) {
|
|
30855
31723
|
return [new Text$1(text.value)];
|
|
30856
31724
|
}
|
|
@@ -30943,9 +31811,11 @@ class _WriteVisitor {
|
|
|
30943
31811
|
}
|
|
30944
31812
|
// Extract messages as xml nodes from the xliff file
|
|
30945
31813
|
class Xliff2Parser {
|
|
30946
|
-
|
|
30947
|
-
|
|
30948
|
-
|
|
31814
|
+
// using non-null assertions because they're all (re)set by parse()
|
|
31815
|
+
_unitMlString;
|
|
31816
|
+
_errors;
|
|
31817
|
+
_msgIdToHtml;
|
|
31818
|
+
_locale = null;
|
|
30949
31819
|
parse(xliff, url) {
|
|
30950
31820
|
this._unitMlString = null;
|
|
30951
31821
|
this._msgIdToHtml = {};
|
|
@@ -31026,6 +31896,8 @@ class Xliff2Parser {
|
|
|
31026
31896
|
}
|
|
31027
31897
|
// Convert ml nodes (xliff syntax) to i18n nodes
|
|
31028
31898
|
class XmlToI18n$1 {
|
|
31899
|
+
// using non-null assertion because re(set) by convert()
|
|
31900
|
+
_errors;
|
|
31029
31901
|
convert(message, url) {
|
|
31030
31902
|
const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });
|
|
31031
31903
|
this._errors = xmlIcu.errors;
|
|
@@ -31143,7 +32015,7 @@ class Xtb extends Serializer {
|
|
|
31143
32015
|
return { locale: locale, i18nNodesByMsgId };
|
|
31144
32016
|
}
|
|
31145
32017
|
digest(message) {
|
|
31146
|
-
return digest(message
|
|
32018
|
+
return digest(message);
|
|
31147
32019
|
}
|
|
31148
32020
|
createNameMapper(message) {
|
|
31149
32021
|
return new SimplePlaceholderMapper(message, toPublicName);
|
|
@@ -31165,9 +32037,11 @@ function createLazyProperty(messages, id, valueFn) {
|
|
|
31165
32037
|
}
|
|
31166
32038
|
// Extract messages as xml nodes from the xtb file
|
|
31167
32039
|
class XtbParser {
|
|
31168
|
-
|
|
31169
|
-
|
|
31170
|
-
|
|
32040
|
+
// using non-null assertions because they're (re)set by parse()
|
|
32041
|
+
_bundleDepth;
|
|
32042
|
+
_errors;
|
|
32043
|
+
_msgIdToHtml;
|
|
32044
|
+
_locale = null;
|
|
31171
32045
|
parse(xtb, url) {
|
|
31172
32046
|
this._bundleDepth = 0;
|
|
31173
32047
|
this._msgIdToHtml = {};
|
|
@@ -31233,6 +32107,8 @@ class XtbParser {
|
|
|
31233
32107
|
}
|
|
31234
32108
|
// Convert ml nodes (xtb syntax) to i18n nodes
|
|
31235
32109
|
class XmlToI18n {
|
|
32110
|
+
// using non-null assertion because it's (re)set by convert()
|
|
32111
|
+
_errors;
|
|
31236
32112
|
convert(message, url) {
|
|
31237
32113
|
const xmlIcu = new XmlParser().parse(message, url, { tokenizeExpansionForms: true });
|
|
31238
32114
|
this._errors = xmlIcu.errors;
|
|
@@ -31287,6 +32163,10 @@ class XmlToI18n {
|
|
|
31287
32163
|
* A container for translated messages
|
|
31288
32164
|
*/
|
|
31289
32165
|
class TranslationBundle {
|
|
32166
|
+
_i18nNodesByMsgId;
|
|
32167
|
+
digest;
|
|
32168
|
+
mapperFactory;
|
|
32169
|
+
_i18nToHtml;
|
|
31290
32170
|
constructor(_i18nNodesByMsgId = {}, locale, digest, mapperFactory, missingTranslationStrategy = MissingTranslationStrategy.Warning, console) {
|
|
31291
32171
|
this._i18nNodesByMsgId = _i18nNodesByMsgId;
|
|
31292
32172
|
this.digest = digest;
|
|
@@ -31313,6 +32193,17 @@ class TranslationBundle {
|
|
|
31313
32193
|
}
|
|
31314
32194
|
}
|
|
31315
32195
|
class I18nToHtmlVisitor {
|
|
32196
|
+
_i18nNodesByMsgId;
|
|
32197
|
+
_locale;
|
|
32198
|
+
_digest;
|
|
32199
|
+
_mapperFactory;
|
|
32200
|
+
_missingTranslationStrategy;
|
|
32201
|
+
_console;
|
|
32202
|
+
// using non-null assertions because they're (re)set by convert()
|
|
32203
|
+
_srcMsg;
|
|
32204
|
+
_errors = [];
|
|
32205
|
+
_contextStack = [];
|
|
32206
|
+
_mapper;
|
|
31316
32207
|
constructor(_i18nNodesByMsgId = {}, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {
|
|
31317
32208
|
this._i18nNodesByMsgId = _i18nNodesByMsgId;
|
|
31318
32209
|
this._locale = _locale;
|
|
@@ -31320,8 +32211,6 @@ class I18nToHtmlVisitor {
|
|
|
31320
32211
|
this._mapperFactory = _mapperFactory;
|
|
31321
32212
|
this._missingTranslationStrategy = _missingTranslationStrategy;
|
|
31322
32213
|
this._console = _console;
|
|
31323
|
-
this._errors = [];
|
|
31324
|
-
this._contextStack = [];
|
|
31325
32214
|
}
|
|
31326
32215
|
convert(srcMsg) {
|
|
31327
32216
|
this._contextStack.length = 0;
|
|
@@ -31437,6 +32326,10 @@ class I18nToHtmlVisitor {
|
|
|
31437
32326
|
}
|
|
31438
32327
|
|
|
31439
32328
|
class I18NHtmlParser {
|
|
32329
|
+
_htmlParser;
|
|
32330
|
+
// @override
|
|
32331
|
+
getTagDefinition;
|
|
32332
|
+
_translationBundle;
|
|
31440
32333
|
constructor(_htmlParser, translations, translationsFormat, missingTranslation = MissingTranslationStrategy.Warning, console) {
|
|
31441
32334
|
this._htmlParser = _htmlParser;
|
|
31442
32335
|
if (translations) {
|
|
@@ -31460,7 +32353,7 @@ function createSerializer(format) {
|
|
|
31460
32353
|
format = (format || 'xlf').toLowerCase();
|
|
31461
32354
|
switch (format) {
|
|
31462
32355
|
case 'xmb':
|
|
31463
|
-
return new Xmb(
|
|
32356
|
+
return new Xmb();
|
|
31464
32357
|
case 'xtb':
|
|
31465
32358
|
return new Xtb();
|
|
31466
32359
|
case 'xliff2':
|
|
@@ -31477,13 +32370,18 @@ function createSerializer(format) {
|
|
|
31477
32370
|
* A container for message extracted from the templates.
|
|
31478
32371
|
*/
|
|
31479
32372
|
class MessageBundle {
|
|
32373
|
+
_htmlParser;
|
|
32374
|
+
_implicitTags;
|
|
32375
|
+
_implicitAttrs;
|
|
32376
|
+
_locale;
|
|
32377
|
+
_preserveWhitespace;
|
|
32378
|
+
_messages = [];
|
|
31480
32379
|
constructor(_htmlParser, _implicitTags, _implicitAttrs, _locale = null, _preserveWhitespace = true) {
|
|
31481
32380
|
this._htmlParser = _htmlParser;
|
|
31482
32381
|
this._implicitTags = _implicitTags;
|
|
31483
32382
|
this._implicitAttrs = _implicitAttrs;
|
|
31484
32383
|
this._locale = _locale;
|
|
31485
32384
|
this._preserveWhitespace = _preserveWhitespace;
|
|
31486
|
-
this._messages = [];
|
|
31487
32385
|
}
|
|
31488
32386
|
updateFromTemplate(source, url, interpolationConfig) {
|
|
31489
32387
|
const htmlParserResult = this._htmlParser.parse(source, url, {
|
|
@@ -31677,6 +32575,96 @@ function compileClassDebugInfo(debugInfo) {
|
|
|
31677
32575
|
return iife.callFn([]);
|
|
31678
32576
|
}
|
|
31679
32577
|
|
|
32578
|
+
/*!
|
|
32579
|
+
* @license
|
|
32580
|
+
* Copyright Google LLC All Rights Reserved.
|
|
32581
|
+
*
|
|
32582
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
32583
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
32584
|
+
*/
|
|
32585
|
+
/**
|
|
32586
|
+
* Compiles the expression that initializes HMR for a class.
|
|
32587
|
+
* @param meta HMR metadata extracted from the class.
|
|
32588
|
+
*/
|
|
32589
|
+
function compileHmrInitializer(meta) {
|
|
32590
|
+
const id = encodeURIComponent(`${meta.filePath}@${meta.className}`);
|
|
32591
|
+
const urlPartial = `/@ng/component?c=${id}&t=`;
|
|
32592
|
+
const moduleName = 'm';
|
|
32593
|
+
const dataName = 'd';
|
|
32594
|
+
const timestampName = 't';
|
|
32595
|
+
const importCallbackName = `${meta.className}_HmrLoad`;
|
|
32596
|
+
const locals = meta.locals.map((localName) => variable(localName));
|
|
32597
|
+
// m.default
|
|
32598
|
+
const defaultRead = variable(moduleName).prop('default');
|
|
32599
|
+
// ɵɵreplaceMetadata(Comp, m.default, [...]);
|
|
32600
|
+
const replaceCall = importExpr(Identifiers.replaceMetadata)
|
|
32601
|
+
.callFn([meta.type, defaultRead, new ExternalExpr(Identifiers.core), literalArr(locals)]);
|
|
32602
|
+
// (m) => m.default && ɵɵreplaceMetadata(...)
|
|
32603
|
+
const replaceCallback = arrowFn([new FnParam(moduleName)], defaultRead.and(replaceCall));
|
|
32604
|
+
// '<urlPartial>' + encodeURIComponent(t)
|
|
32605
|
+
const urlValue = literal(urlPartial)
|
|
32606
|
+
.plus(variable('encodeURIComponent').callFn([variable(timestampName)]));
|
|
32607
|
+
// function Cmp_HmrLoad(t) {
|
|
32608
|
+
// import(/* @vite-ignore */ url).then((m) => m.default && replaceMetadata(...));
|
|
32609
|
+
// }
|
|
32610
|
+
const importCallback = new DeclareFunctionStmt(importCallbackName, [new FnParam(timestampName)], [
|
|
32611
|
+
// The vite-ignore special comment is required to prevent Vite from generating a superfluous
|
|
32612
|
+
// warning for each usage within the development code. If Vite provides a method to
|
|
32613
|
+
// programmatically avoid this warning in the future, this added comment can be removed here.
|
|
32614
|
+
new DynamicImportExpr(urlValue, null, '@vite-ignore')
|
|
32615
|
+
.prop('then')
|
|
32616
|
+
.callFn([replaceCallback])
|
|
32617
|
+
.toStmt(),
|
|
32618
|
+
], null, StmtModifier.Final);
|
|
32619
|
+
// (d) => d.id === <id> && Cmp_HmrLoad(d.timestamp)
|
|
32620
|
+
const updateCallback = arrowFn([new FnParam(dataName)], variable(dataName)
|
|
32621
|
+
.prop('id')
|
|
32622
|
+
.identical(literal(id))
|
|
32623
|
+
.and(variable(importCallbackName).callFn([variable(dataName).prop('timestamp')])));
|
|
32624
|
+
// Cmp_HmrLoad(Date.now());
|
|
32625
|
+
// Initial call to kick off the loading in order to avoid edge cases with components
|
|
32626
|
+
// coming from lazy chunks that change before the chunk has loaded.
|
|
32627
|
+
const initialCall = variable(importCallbackName)
|
|
32628
|
+
.callFn([variable('Date').prop('now').callFn([])]);
|
|
32629
|
+
// import.meta.hot
|
|
32630
|
+
const hotRead = variable('import').prop('meta').prop('hot');
|
|
32631
|
+
// import.meta.hot.on('angular:component-update', () => ...);
|
|
32632
|
+
const hotListener = hotRead
|
|
32633
|
+
.clone()
|
|
32634
|
+
.prop('on')
|
|
32635
|
+
.callFn([literal('angular:component-update'), updateCallback]);
|
|
32636
|
+
return arrowFn([], [
|
|
32637
|
+
// function Cmp_HmrLoad() {...}.
|
|
32638
|
+
importCallback,
|
|
32639
|
+
// ngDevMode && Cmp_HmrLoad(Date.now());
|
|
32640
|
+
devOnlyGuardedExpression(initialCall).toStmt(),
|
|
32641
|
+
// ngDevMode && import.meta.hot && import.meta.hot.on(...)
|
|
32642
|
+
devOnlyGuardedExpression(hotRead.and(hotListener)).toStmt(),
|
|
32643
|
+
])
|
|
32644
|
+
.callFn([]);
|
|
32645
|
+
}
|
|
32646
|
+
/**
|
|
32647
|
+
* Compiles the HMR update callback for a class.
|
|
32648
|
+
* @param definitions Compiled definitions for the class (e.g. `defineComponent` calls).
|
|
32649
|
+
* @param constantStatements Supporting constants statements that were generated alongside
|
|
32650
|
+
* the definition.
|
|
32651
|
+
* @param meta HMR metadata extracted from the class.
|
|
32652
|
+
*/
|
|
32653
|
+
function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
32654
|
+
// The class name should always be first and core should be second.
|
|
32655
|
+
const params = [meta.className, meta.coreName, ...meta.locals].map((name) => new FnParam(name, DYNAMIC_TYPE));
|
|
32656
|
+
const body = [...constantStatements];
|
|
32657
|
+
for (const field of definitions) {
|
|
32658
|
+
if (field.initializer !== null) {
|
|
32659
|
+
body.push(variable(meta.className).prop(field.name).set(field.initializer).toStmt());
|
|
32660
|
+
for (const stmt of field.statements) {
|
|
32661
|
+
body.push(stmt);
|
|
32662
|
+
}
|
|
32663
|
+
}
|
|
32664
|
+
}
|
|
32665
|
+
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
|
|
32666
|
+
}
|
|
32667
|
+
|
|
31680
32668
|
/**
|
|
31681
32669
|
* Every time we make a breaking change to the declaration interface or partial-linker behavior, we
|
|
31682
32670
|
* must update this constant to prevent old partial-linkers from incorrectly processing the
|
|
@@ -31692,7 +32680,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
31692
32680
|
function compileDeclareClassMetadata(metadata) {
|
|
31693
32681
|
const definitionMap = new DefinitionMap();
|
|
31694
32682
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
31695
|
-
definitionMap.set('version', literal('19.0.0-
|
|
32683
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
31696
32684
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31697
32685
|
definitionMap.set('type', metadata.type);
|
|
31698
32686
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -31710,7 +32698,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
31710
32698
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
31711
32699
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
31712
32700
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
31713
|
-
definitionMap.set('version', literal('19.0.0-
|
|
32701
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
31714
32702
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31715
32703
|
definitionMap.set('type', metadata.type);
|
|
31716
32704
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -31805,10 +32793,10 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
31805
32793
|
const definitionMap = new DefinitionMap();
|
|
31806
32794
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
31807
32795
|
definitionMap.set('minVersion', literal(minVersion));
|
|
31808
|
-
definitionMap.set('version', literal('19.0.0-
|
|
32796
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
31809
32797
|
// e.g. `type: MyDirective`
|
|
31810
32798
|
definitionMap.set('type', meta.type.value);
|
|
31811
|
-
if (meta.isStandalone) {
|
|
32799
|
+
if (meta.isStandalone !== undefined) {
|
|
31812
32800
|
definitionMap.set('isStandalone', literal(meta.isStandalone));
|
|
31813
32801
|
}
|
|
31814
32802
|
if (meta.isSignal) {
|
|
@@ -32180,10 +33168,7 @@ function compileUsedDependenciesMetadata(meta) {
|
|
|
32180
33168
|
});
|
|
32181
33169
|
}
|
|
32182
33170
|
class BlockPresenceVisitor extends RecursiveVisitor$1 {
|
|
32183
|
-
|
|
32184
|
-
super(...arguments);
|
|
32185
|
-
this.hasBlocks = false;
|
|
32186
|
-
}
|
|
33171
|
+
hasBlocks = false;
|
|
32187
33172
|
visitDeferredBlock() {
|
|
32188
33173
|
this.hasBlocks = true;
|
|
32189
33174
|
}
|
|
@@ -32227,7 +33212,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
32227
33212
|
function compileDeclareFactoryFunction(meta) {
|
|
32228
33213
|
const definitionMap = new DefinitionMap();
|
|
32229
33214
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
32230
|
-
definitionMap.set('version', literal('19.0.0-
|
|
33215
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
32231
33216
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32232
33217
|
definitionMap.set('type', meta.type.value);
|
|
32233
33218
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -32262,7 +33247,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
32262
33247
|
function createInjectableDefinitionMap(meta) {
|
|
32263
33248
|
const definitionMap = new DefinitionMap();
|
|
32264
33249
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
32265
|
-
definitionMap.set('version', literal('19.0.0-
|
|
33250
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
32266
33251
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32267
33252
|
definitionMap.set('type', meta.type.value);
|
|
32268
33253
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -32313,7 +33298,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
32313
33298
|
function createInjectorDefinitionMap(meta) {
|
|
32314
33299
|
const definitionMap = new DefinitionMap();
|
|
32315
33300
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
32316
|
-
definitionMap.set('version', literal('19.0.0-
|
|
33301
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
32317
33302
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32318
33303
|
definitionMap.set('type', meta.type.value);
|
|
32319
33304
|
definitionMap.set('providers', meta.providers);
|
|
@@ -32346,7 +33331,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
32346
33331
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
32347
33332
|
}
|
|
32348
33333
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
32349
|
-
definitionMap.set('version', literal('19.0.0-
|
|
33334
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
32350
33335
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32351
33336
|
definitionMap.set('type', meta.type.value);
|
|
32352
33337
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -32397,11 +33382,11 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
32397
33382
|
function createPipeDefinitionMap(meta) {
|
|
32398
33383
|
const definitionMap = new DefinitionMap();
|
|
32399
33384
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
32400
|
-
definitionMap.set('version', literal('19.0.0-
|
|
33385
|
+
definitionMap.set('version', literal('19.0.0-rc.1'));
|
|
32401
33386
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32402
33387
|
// e.g. `type: MyPipe`
|
|
32403
33388
|
definitionMap.set('type', meta.type.value);
|
|
32404
|
-
if (meta.isStandalone) {
|
|
33389
|
+
if (meta.isStandalone !== undefined) {
|
|
32405
33390
|
definitionMap.set('isStandalone', literal(meta.isStandalone));
|
|
32406
33391
|
}
|
|
32407
33392
|
// e.g. `name: "myPipe"`
|
|
@@ -32430,5 +33415,5 @@ publishFacade(_global);
|
|
|
32430
33415
|
|
|
32431
33416
|
// This file is not used to build this module. It is only used during editing
|
|
32432
33417
|
|
|
32433
|
-
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName,
|
|
33418
|
+
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
|
|
32434
33419
|
//# sourceMappingURL=compiler.mjs.map
|