marko 6.0.8 → 6.0.10
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/dist/debug/dom.js +59 -47
- package/dist/debug/dom.mjs +59 -47
- package/dist/debug/html.js +98 -70
- package/dist/debug/html.mjs +98 -70
- package/dist/dom/resume.d.ts +2 -0
- package/dist/dom.js +38 -32
- package/dist/dom.mjs +38 -32
- package/dist/html/writer.d.ts +8 -8
- package/dist/html.js +64 -28
- package/dist/html.mjs +64 -28
- package/dist/translator/index.js +1294 -1170
- package/dist/translator/util/is-only-child-in-parent.d.ts +2 -2
- package/dist/translator/util/optional.d.ts +1 -0
- package/dist/translator/util/references.d.ts +16 -5
- package/dist/translator/util/serialize-reasons.d.ts +10 -12
- package/dist/translator/util/with-comment.d.ts +2 -0
- package/dist/translator/visitors/program/html.d.ts +4 -3
- package/dist/translator/visitors/program/index.d.ts +9 -5
- package/dist/translator/visitors/tag/native-tag.d.ts +2 -2
- package/package.json +1 -1
package/dist/html.js
CHANGED
@@ -1172,7 +1172,7 @@ var branchIdKey = Symbol();
|
|
1172
1172
|
function withBranchId(branchId, cb) {
|
1173
1173
|
return withContext(branchIdKey, branchId, cb);
|
1174
1174
|
}
|
1175
|
-
function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1175
|
+
function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1176
1176
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1177
1177
|
if (resumeBranch) {
|
1178
1178
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1191,14 +1191,18 @@ function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serialize
|
|
1191
1191
|
});
|
1192
1192
|
} else
|
1193
1193
|
forOf(list, cb);
|
1194
|
-
|
1195
|
-
|
1194
|
+
writeBranchEnd(
|
1195
|
+
scopeId,
|
1196
|
+
accessor,
|
1197
|
+
resumeMarker,
|
1198
|
+
parentEndTag,
|
1199
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1196
1200
|
"]" /* BranchEnd */,
|
1197
1201
|
scopeId + " " + accessor
|
1198
1202
|
)
|
1199
1203
|
);
|
1200
1204
|
}
|
1201
|
-
function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker,
|
1205
|
+
function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1202
1206
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1203
1207
|
if (resumeBranch) {
|
1204
1208
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1212,14 +1216,18 @@ function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch,
|
|
1212
1216
|
});
|
1213
1217
|
} else
|
1214
1218
|
forOf(list, cb);
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1219
|
+
writeBranchEnd(
|
1220
|
+
scopeId,
|
1221
|
+
accessor,
|
1222
|
+
resumeMarker,
|
1223
|
+
parentEndTag,
|
1224
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1225
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1218
1226
|
scopeId + " " + accessor + branchIds
|
1219
1227
|
)
|
1220
1228
|
);
|
1221
1229
|
}
|
1222
|
-
function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1230
|
+
function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1223
1231
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1224
1232
|
if (resumeBranch) {
|
1225
1233
|
let loopScopes = /* @__PURE__ */ new Map(), sep = "";
|
@@ -1235,14 +1243,18 @@ function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeM
|
|
1235
1243
|
});
|
1236
1244
|
} else
|
1237
1245
|
forIn(obj, cb);
|
1238
|
-
|
1239
|
-
|
1246
|
+
writeBranchEnd(
|
1247
|
+
scopeId,
|
1248
|
+
accessor,
|
1249
|
+
resumeMarker,
|
1250
|
+
parentEndTag,
|
1251
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1240
1252
|
"]" /* BranchEnd */,
|
1241
1253
|
scopeId + " " + accessor
|
1242
1254
|
)
|
1243
1255
|
);
|
1244
1256
|
}
|
1245
|
-
function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker,
|
1257
|
+
function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1246
1258
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1247
1259
|
if (resumeBranch) {
|
1248
1260
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1256,14 +1268,18 @@ function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch,
|
|
1256
1268
|
});
|
1257
1269
|
} else
|
1258
1270
|
forIn(obj, cb);
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1271
|
+
writeBranchEnd(
|
1272
|
+
scopeId,
|
1273
|
+
accessor,
|
1274
|
+
resumeMarker,
|
1275
|
+
parentEndTag,
|
1276
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1277
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1262
1278
|
scopeId + " " + accessor + branchIds
|
1263
1279
|
)
|
1264
1280
|
);
|
1265
1281
|
}
|
1266
|
-
function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1282
|
+
function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1267
1283
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1268
1284
|
if (resumeBranch) {
|
1269
1285
|
let loopScopes = /* @__PURE__ */ new Map(), sep = "";
|
@@ -1279,14 +1295,18 @@ function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch,
|
|
1279
1295
|
});
|
1280
1296
|
} else
|
1281
1297
|
forTo(to, from, step, cb);
|
1282
|
-
|
1283
|
-
|
1298
|
+
writeBranchEnd(
|
1299
|
+
scopeId,
|
1300
|
+
accessor,
|
1301
|
+
resumeMarker,
|
1302
|
+
parentEndTag,
|
1303
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1284
1304
|
"]" /* BranchEnd */,
|
1285
1305
|
scopeId + " " + accessor
|
1286
1306
|
)
|
1287
1307
|
);
|
1288
1308
|
}
|
1289
|
-
function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker,
|
1309
|
+
function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1290
1310
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1291
1311
|
if (resumeBranch) {
|
1292
1312
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1300,14 +1320,18 @@ function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serial
|
|
1300
1320
|
});
|
1301
1321
|
} else
|
1302
1322
|
forTo(to, from, step, cb);
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1323
|
+
writeBranchEnd(
|
1324
|
+
scopeId,
|
1325
|
+
accessor,
|
1326
|
+
resumeMarker,
|
1327
|
+
parentEndTag,
|
1328
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1329
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1306
1330
|
scopeId + " " + accessor + branchIds
|
1307
1331
|
)
|
1308
1332
|
);
|
1309
1333
|
}
|
1310
|
-
function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker) {
|
1334
|
+
function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1311
1335
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId();
|
1312
1336
|
resumeMarker && resumeBranch && $chunk.writeHTML(
|
1313
1337
|
$chunk.boundary.state.mark("[" /* BranchStart */, branchId + "")
|
@@ -1316,25 +1340,37 @@ function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMark
|
|
1316
1340
|
resumeBranch && branchIndex !== void 0 && writeScope(scopeId, {
|
1317
1341
|
["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
|
1318
1342
|
["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
|
1319
|
-
}),
|
1320
|
-
|
1343
|
+
}), writeBranchEnd(
|
1344
|
+
scopeId,
|
1345
|
+
accessor,
|
1346
|
+
resumeMarker,
|
1347
|
+
parentEndTag,
|
1348
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1321
1349
|
"]" /* BranchEnd */,
|
1322
1350
|
scopeId + " " + accessor
|
1323
1351
|
)
|
1324
1352
|
);
|
1325
1353
|
}
|
1326
|
-
function resumeSingleNodeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker,
|
1354
|
+
function resumeSingleNodeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1327
1355
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId(), branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb(), shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
1328
1356
|
shouldWriteBranch && writeScope(scopeId, {
|
1329
1357
|
["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
|
1330
1358
|
["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
|
1331
|
-
}),
|
1332
|
-
|
1333
|
-
|
1359
|
+
}), writeBranchEnd(
|
1360
|
+
scopeId,
|
1361
|
+
accessor,
|
1362
|
+
resumeMarker,
|
1363
|
+
parentEndTag,
|
1364
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1365
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1334
1366
|
scopeId + " " + accessor + (shouldWriteBranch ? " " + branchId : "")
|
1335
1367
|
)
|
1336
1368
|
);
|
1337
1369
|
}
|
1370
|
+
function writeBranchEnd(scopeId, accessor, resumeMarker, parentEndTag, mark) {
|
1371
|
+
let endTag = parentEndTag || "";
|
1372
|
+
resumeMarker ? mark ? $chunk.writeHTML(mark + endTag) : $chunk.writeHTML(endTag + markResumeNode(scopeId, accessor)) : $chunk.writeHTML(endTag);
|
1373
|
+
}
|
1338
1374
|
var writeScope = (scopeId, partialScope) => {
|
1339
1375
|
let { state } = $chunk.boundary, { scopes } = state, scope = scopes.get(scopeId);
|
1340
1376
|
return state.needsMainRuntime = !0, scope ? Object.assign(scope, partialScope) : (scope = partialScope, scope[K_SCOPE_ID] = scopeId, state.scopes.set(scopeId, scope)), state.writeScopes ? state.writeScopes[scopeId] = scope : state.writeScopes = { [scopeId]: scope }, scope;
|
package/dist/html.mjs
CHANGED
@@ -1090,7 +1090,7 @@ var branchIdKey = Symbol();
|
|
1090
1090
|
function withBranchId(branchId, cb) {
|
1091
1091
|
return withContext(branchIdKey, branchId, cb);
|
1092
1092
|
}
|
1093
|
-
function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1093
|
+
function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1094
1094
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1095
1095
|
if (resumeBranch) {
|
1096
1096
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1109,14 +1109,18 @@ function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serialize
|
|
1109
1109
|
});
|
1110
1110
|
} else
|
1111
1111
|
forOf(list, cb);
|
1112
|
-
|
1113
|
-
|
1112
|
+
writeBranchEnd(
|
1113
|
+
scopeId,
|
1114
|
+
accessor,
|
1115
|
+
resumeMarker,
|
1116
|
+
parentEndTag,
|
1117
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1114
1118
|
"]" /* BranchEnd */,
|
1115
1119
|
scopeId + " " + accessor
|
1116
1120
|
)
|
1117
1121
|
);
|
1118
1122
|
}
|
1119
|
-
function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker,
|
1123
|
+
function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1120
1124
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1121
1125
|
if (resumeBranch) {
|
1122
1126
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1130,14 +1134,18 @@ function resumeSingleNodeForOf(list, cb, by, scopeId, accessor, serializeBranch,
|
|
1130
1134
|
});
|
1131
1135
|
} else
|
1132
1136
|
forOf(list, cb);
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1137
|
+
writeBranchEnd(
|
1138
|
+
scopeId,
|
1139
|
+
accessor,
|
1140
|
+
resumeMarker,
|
1141
|
+
parentEndTag,
|
1142
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1143
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1136
1144
|
scopeId + " " + accessor + branchIds
|
1137
1145
|
)
|
1138
1146
|
);
|
1139
1147
|
}
|
1140
|
-
function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1148
|
+
function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1141
1149
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1142
1150
|
if (resumeBranch) {
|
1143
1151
|
let loopScopes = /* @__PURE__ */ new Map(), sep = "";
|
@@ -1153,14 +1161,18 @@ function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeM
|
|
1153
1161
|
});
|
1154
1162
|
} else
|
1155
1163
|
forIn(obj, cb);
|
1156
|
-
|
1157
|
-
|
1164
|
+
writeBranchEnd(
|
1165
|
+
scopeId,
|
1166
|
+
accessor,
|
1167
|
+
resumeMarker,
|
1168
|
+
parentEndTag,
|
1169
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1158
1170
|
"]" /* BranchEnd */,
|
1159
1171
|
scopeId + " " + accessor
|
1160
1172
|
)
|
1161
1173
|
);
|
1162
1174
|
}
|
1163
|
-
function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker,
|
1175
|
+
function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1164
1176
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1165
1177
|
if (resumeBranch) {
|
1166
1178
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1174,14 +1186,18 @@ function resumeSingleNodeForIn(obj, cb, by, scopeId, accessor, serializeBranch,
|
|
1174
1186
|
});
|
1175
1187
|
} else
|
1176
1188
|
forIn(obj, cb);
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1189
|
+
writeBranchEnd(
|
1190
|
+
scopeId,
|
1191
|
+
accessor,
|
1192
|
+
resumeMarker,
|
1193
|
+
parentEndTag,
|
1194
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1195
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1180
1196
|
scopeId + " " + accessor + branchIds
|
1181
1197
|
)
|
1182
1198
|
);
|
1183
1199
|
}
|
1184
|
-
function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker) {
|
1200
|
+
function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1185
1201
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0;
|
1186
1202
|
if (resumeBranch) {
|
1187
1203
|
let loopScopes = /* @__PURE__ */ new Map(), sep = "";
|
@@ -1197,14 +1213,18 @@ function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch,
|
|
1197
1213
|
});
|
1198
1214
|
} else
|
1199
1215
|
forTo(to, from, step, cb);
|
1200
|
-
|
1201
|
-
|
1216
|
+
writeBranchEnd(
|
1217
|
+
scopeId,
|
1218
|
+
accessor,
|
1219
|
+
resumeMarker,
|
1220
|
+
parentEndTag,
|
1221
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1202
1222
|
"]" /* BranchEnd */,
|
1203
1223
|
scopeId + " " + accessor
|
1204
1224
|
)
|
1205
1225
|
);
|
1206
1226
|
}
|
1207
|
-
function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker,
|
1227
|
+
function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1208
1228
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchIds = "";
|
1209
1229
|
if (resumeBranch) {
|
1210
1230
|
let loopScopes = /* @__PURE__ */ new Map();
|
@@ -1218,14 +1238,18 @@ function resumeSingleNodeForTo(to, from, step, cb, by, scopeId, accessor, serial
|
|
1218
1238
|
});
|
1219
1239
|
} else
|
1220
1240
|
forTo(to, from, step, cb);
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1241
|
+
writeBranchEnd(
|
1242
|
+
scopeId,
|
1243
|
+
accessor,
|
1244
|
+
resumeMarker,
|
1245
|
+
parentEndTag,
|
1246
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1247
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1224
1248
|
scopeId + " " + accessor + branchIds
|
1225
1249
|
)
|
1226
1250
|
);
|
1227
1251
|
}
|
1228
|
-
function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker) {
|
1252
|
+
function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1229
1253
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId();
|
1230
1254
|
resumeMarker && resumeBranch && $chunk.writeHTML(
|
1231
1255
|
$chunk.boundary.state.mark("[" /* BranchStart */, branchId + "")
|
@@ -1234,25 +1258,37 @@ function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMark
|
|
1234
1258
|
resumeBranch && branchIndex !== void 0 && writeScope(scopeId, {
|
1235
1259
|
["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
|
1236
1260
|
["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
|
1237
|
-
}),
|
1238
|
-
|
1261
|
+
}), writeBranchEnd(
|
1262
|
+
scopeId,
|
1263
|
+
accessor,
|
1264
|
+
resumeMarker,
|
1265
|
+
parentEndTag,
|
1266
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1239
1267
|
"]" /* BranchEnd */,
|
1240
1268
|
scopeId + " " + accessor
|
1241
1269
|
)
|
1242
1270
|
);
|
1243
1271
|
}
|
1244
|
-
function resumeSingleNodeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker,
|
1272
|
+
function resumeSingleNodeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag) {
|
1245
1273
|
let resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId(), branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb(), shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
1246
1274
|
shouldWriteBranch && writeScope(scopeId, {
|
1247
1275
|
["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
|
1248
1276
|
["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
|
1249
|
-
}),
|
1250
|
-
|
1251
|
-
|
1277
|
+
}), writeBranchEnd(
|
1278
|
+
scopeId,
|
1279
|
+
accessor,
|
1280
|
+
resumeMarker,
|
1281
|
+
parentEndTag,
|
1282
|
+
resumeMarker && (!parentEndTag || resumeBranch) && $chunk.boundary.state.mark(
|
1283
|
+
parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
|
1252
1284
|
scopeId + " " + accessor + (shouldWriteBranch ? " " + branchId : "")
|
1253
1285
|
)
|
1254
1286
|
);
|
1255
1287
|
}
|
1288
|
+
function writeBranchEnd(scopeId, accessor, resumeMarker, parentEndTag, mark) {
|
1289
|
+
let endTag = parentEndTag || "";
|
1290
|
+
resumeMarker ? mark ? $chunk.writeHTML(mark + endTag) : $chunk.writeHTML(endTag + markResumeNode(scopeId, accessor)) : $chunk.writeHTML(endTag);
|
1291
|
+
}
|
1256
1292
|
var writeScope = (scopeId, partialScope) => {
|
1257
1293
|
let { state } = $chunk.boundary, { scopes } = state, scope = scopes.get(scopeId);
|
1258
1294
|
return state.needsMainRuntime = !0, scope ? Object.assign(scope, partialScope) : (scope = partialScope, scope[K_SCOPE_ID] = scopeId, state.scopes.set(scopeId, scope)), state.writeScopes ? state.writeScopes[scopeId] = scope : state.writeScopes = { [scopeId]: scope }, scope;
|