@gravito/signal 3.0.3 → 3.0.4
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/CHANGELOG.md +16 -0
- package/README.md +89 -60
- package/README.zh-TW.md +140 -9
- package/dist/MjmlRenderer-IUH663FT.mjs +8 -0
- package/dist/ReactMjmlRenderer-C3P5YO5L.mjs +8 -0
- package/dist/ReactRenderer-2JFLRVST.mjs +45 -0
- package/dist/{ReactRenderer-L5INVYKT.mjs → ReactRenderer-LYEOSYFS.mjs} +9 -8
- package/dist/ReactRenderer-V54CUUEI.mjs +45 -0
- package/dist/VueMjmlRenderer-4F4CXHDB.mjs +8 -0
- package/dist/VueMjmlRenderer-5WZR4CQG.mjs +8 -0
- package/dist/VueMjmlRenderer-U5YMWI44.mjs +8 -0
- package/dist/VueRenderer-3YBRQXME.mjs +48 -0
- package/dist/VueRenderer-46JGXTJ2.mjs +48 -0
- package/dist/VueRenderer-5KWD4R3C.mjs +48 -0
- package/dist/VueRenderer-C23U4O5E.mjs +48 -0
- package/dist/VueRenderer-LEVDFLHP.mjs +31 -0
- package/dist/VueRenderer-RNHSCCRI.mjs +48 -0
- package/dist/chunk-3WOR3XSL.mjs +82 -0
- package/dist/chunk-DBFIVHHG.mjs +79 -0
- package/dist/{chunk-6DZX6EAA.mjs → chunk-HEBXNMVQ.mjs} +12 -1
- package/dist/chunk-KB7IDDBT.mjs +82 -0
- package/dist/chunk-LZL5UUPC.mjs +82 -0
- package/dist/chunk-W6LXIJKK.mjs +57 -0
- package/dist/chunk-XBIVBJS2.mjs +8 -0
- package/dist/index.d.mts +1680 -209
- package/dist/index.d.ts +1680 -209
- package/dist/index.js +69405 -542
- package/dist/index.mjs +993 -110
- package/dist/lib-HJTRWKU5.mjs +67788 -0
- package/dist/{VueRenderer-Z5PRVBNH.mjs → server-renderer-4IM3P5XZ.mjs} +308 -423
- package/dist/server-renderer-7KWFSTPV.mjs +37193 -0
- package/dist/{VueRenderer-S65ZARRI.mjs → server-renderer-S5FPSTJ2.mjs} +931 -877
- package/dist/server-renderer-X5LUFVWT.mjs +37193 -0
- package/doc/OPTIMIZATION_PLAN.md +496 -0
- package/package.json +14 -12
- package/scripts/check-coverage.ts +64 -0
- package/src/Mailable.ts +340 -44
- package/src/OrbitSignal.ts +350 -50
- package/src/TypedMailable.ts +96 -0
- package/src/dev/DevMailbox.ts +89 -33
- package/src/dev/DevServer.ts +14 -14
- package/src/dev/storage/FileMailboxStorage.ts +66 -0
- package/src/dev/storage/MailboxStorage.ts +15 -0
- package/src/dev/storage/MemoryMailboxStorage.ts +36 -0
- package/src/dev/ui/mailbox.ts +1 -1
- package/src/dev/ui/preview.ts +4 -4
- package/src/errors.ts +69 -0
- package/src/events.ts +72 -0
- package/src/index.ts +20 -1
- package/src/renderers/HtmlRenderer.ts +20 -18
- package/src/renderers/MjmlRenderer.ts +73 -0
- package/src/renderers/ReactMjmlRenderer.ts +94 -0
- package/src/renderers/ReactRenderer.ts +26 -21
- package/src/renderers/Renderer.ts +43 -3
- package/src/renderers/TemplateRenderer.ts +48 -15
- package/src/renderers/VueMjmlRenderer.ts +99 -0
- package/src/renderers/VueRenderer.ts +26 -21
- package/src/renderers/mjml-templates.ts +50 -0
- package/src/transports/BaseTransport.ts +148 -0
- package/src/transports/LogTransport.ts +28 -6
- package/src/transports/MemoryTransport.ts +34 -6
- package/src/transports/SesTransport.ts +62 -17
- package/src/transports/SmtpTransport.ts +123 -27
- package/src/transports/Transport.ts +33 -4
- package/src/types.ts +172 -3
- package/src/utils/html.ts +43 -0
- package/src/webhooks/SendGridWebhookDriver.ts +80 -0
- package/src/webhooks/SesWebhookDriver.ts +44 -0
- package/tests/DevMailbox.test.ts +54 -0
- package/tests/FileMailboxStorage.test.ts +56 -0
- package/tests/MjmlLayout.test.ts +28 -0
- package/tests/MjmlRenderer.test.ts +53 -0
- package/tests/OrbitSignalWebhook.test.ts +56 -0
- package/tests/ReactMjmlRenderer.test.ts +33 -0
- package/tests/SendGridWebhookDriver.test.ts +69 -0
- package/tests/SesWebhookDriver.test.ts +46 -0
- package/tests/VueMjmlRenderer.test.ts +35 -0
- package/tests/dev-server.test.ts +1 -1
- package/tests/transports.test.ts +3 -3
- package/tsconfig.json +12 -24
- package/dist/OrbitMail-2Z7ZTKYA.mjs +0 -7
- package/dist/OrbitMail-BGV32HWN.mjs +0 -7
- package/dist/OrbitMail-FUYZQSAV.mjs +0 -7
- package/dist/OrbitMail-NAPCRK7B.mjs +0 -7
- package/dist/OrbitMail-REGJ276B.mjs +0 -7
- package/dist/OrbitMail-TCFBJWDT.mjs +0 -7
- package/dist/OrbitMail-XZZW6U4N.mjs +0 -7
- package/dist/OrbitSignal-IPSA2CDO.mjs +0 -7
- package/dist/OrbitSignal-MABW4DDW.mjs +0 -7
- package/dist/OrbitSignal-QSW5VQ5M.mjs +0 -7
- package/dist/OrbitSignal-R22QHWAA.mjs +0 -7
- package/dist/OrbitSignal-ZKKMEC27.mjs +0 -7
- package/dist/chunk-3U2CYJO5.mjs +0 -367
- package/dist/chunk-3XFC4T6M.mjs +0 -392
- package/dist/chunk-456QRYFW.mjs +0 -401
- package/dist/chunk-DT3R2TNV.mjs +0 -367
- package/dist/chunk-F6MVTUCT.mjs +0 -421
- package/dist/chunk-GADWIVC4.mjs +0 -400
- package/dist/chunk-HHKFAMSE.mjs +0 -380
- package/dist/chunk-NEQCQSZI.mjs +0 -406
- package/dist/chunk-OKRNL6PN.mjs +0 -400
- package/dist/chunk-ULN3GMY2.mjs +0 -367
- package/dist/chunk-XAWO7RSP.mjs +0 -398
- package/dist/chunk-YLVDJSED.mjs +0 -431
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS,
|
|
3
|
-
__require
|
|
4
|
-
|
|
5
|
-
} from "./chunk-6DZX6EAA.mjs";
|
|
3
|
+
__require
|
|
4
|
+
} from "./chunk-HEBXNMVQ.mjs";
|
|
6
5
|
|
|
7
|
-
// ../../node_modules/.bun/@vue+shared@3.5.
|
|
6
|
+
// ../../node_modules/.bun/@vue+shared@3.5.27/node_modules/@vue/shared/dist/shared.cjs.prod.js
|
|
8
7
|
var require_shared_cjs_prod = __commonJS({
|
|
9
|
-
"../../node_modules/.bun/@vue+shared@3.5.
|
|
8
|
+
"../../node_modules/.bun/@vue+shared@3.5.27/node_modules/@vue/shared/dist/shared.cjs.prod.js"(exports) {
|
|
10
9
|
"use strict";
|
|
11
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
11
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -593,9 +592,9 @@ var require_shared_cjs_prod = __commonJS({
|
|
|
593
592
|
}
|
|
594
593
|
});
|
|
595
594
|
|
|
596
|
-
// ../../node_modules/.bun/@vue+shared@3.5.
|
|
595
|
+
// ../../node_modules/.bun/@vue+shared@3.5.27/node_modules/@vue/shared/dist/shared.cjs.js
|
|
597
596
|
var require_shared_cjs = __commonJS({
|
|
598
|
-
"../../node_modules/.bun/@vue+shared@3.5.
|
|
597
|
+
"../../node_modules/.bun/@vue+shared@3.5.27/node_modules/@vue/shared/dist/shared.cjs.js"(exports) {
|
|
599
598
|
"use strict";
|
|
600
599
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
601
600
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1190,9 +1189,9 @@ var require_shared_cjs = __commonJS({
|
|
|
1190
1189
|
}
|
|
1191
1190
|
});
|
|
1192
1191
|
|
|
1193
|
-
// ../../node_modules/.bun/@vue+shared@3.5.
|
|
1192
|
+
// ../../node_modules/.bun/@vue+shared@3.5.27/node_modules/@vue/shared/index.js
|
|
1194
1193
|
var require_shared = __commonJS({
|
|
1195
|
-
"../../node_modules/.bun/@vue+shared@3.5.
|
|
1194
|
+
"../../node_modules/.bun/@vue+shared@3.5.27/node_modules/@vue/shared/index.js"(exports, module) {
|
|
1196
1195
|
"use strict";
|
|
1197
1196
|
if (process.env.NODE_ENV === "production") {
|
|
1198
1197
|
module.exports = require_shared_cjs_prod();
|
|
@@ -1202,9 +1201,9 @@ var require_shared = __commonJS({
|
|
|
1202
1201
|
}
|
|
1203
1202
|
});
|
|
1204
1203
|
|
|
1205
|
-
// ../../node_modules/.bun/entities@7.0.
|
|
1204
|
+
// ../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.js
|
|
1206
1205
|
var require_decode_codepoint = __commonJS({
|
|
1207
|
-
"../../node_modules/.bun/entities@7.0.
|
|
1206
|
+
"../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.js"(exports) {
|
|
1208
1207
|
"use strict";
|
|
1209
1208
|
var _a;
|
|
1210
1209
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1266,9 +1265,9 @@ var require_decode_codepoint = __commonJS({
|
|
|
1266
1265
|
}
|
|
1267
1266
|
});
|
|
1268
1267
|
|
|
1269
|
-
// ../../node_modules/.bun/entities@7.0.
|
|
1268
|
+
// ../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.js
|
|
1270
1269
|
var require_decode_shared = __commonJS({
|
|
1271
|
-
"../../node_modules/.bun/entities@7.0.
|
|
1270
|
+
"../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.js"(exports) {
|
|
1272
1271
|
"use strict";
|
|
1273
1272
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1274
1273
|
exports.decodeBase64 = decodeBase64;
|
|
@@ -1303,9 +1302,9 @@ var require_decode_shared = __commonJS({
|
|
|
1303
1302
|
}
|
|
1304
1303
|
});
|
|
1305
1304
|
|
|
1306
|
-
// ../../node_modules/.bun/entities@7.0.
|
|
1305
|
+
// ../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.js
|
|
1307
1306
|
var require_decode_data_html = __commonJS({
|
|
1308
|
-
"../../node_modules/.bun/entities@7.0.
|
|
1307
|
+
"../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.js"(exports) {
|
|
1309
1308
|
"use strict";
|
|
1310
1309
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1311
1310
|
exports.htmlDecodeTree = void 0;
|
|
@@ -1314,9 +1313,9 @@ var require_decode_data_html = __commonJS({
|
|
|
1314
1313
|
}
|
|
1315
1314
|
});
|
|
1316
1315
|
|
|
1317
|
-
// ../../node_modules/.bun/entities@7.0.
|
|
1316
|
+
// ../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.js
|
|
1318
1317
|
var require_decode_data_xml = __commonJS({
|
|
1319
|
-
"../../node_modules/.bun/entities@7.0.
|
|
1318
|
+
"../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.js"(exports) {
|
|
1320
1319
|
"use strict";
|
|
1321
1320
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1322
1321
|
exports.xmlDecodeTree = void 0;
|
|
@@ -1325,9 +1324,9 @@ var require_decode_data_xml = __commonJS({
|
|
|
1325
1324
|
}
|
|
1326
1325
|
});
|
|
1327
1326
|
|
|
1328
|
-
// ../../node_modules/.bun/entities@7.0.
|
|
1327
|
+
// ../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js
|
|
1329
1328
|
var require_bin_trie_flags = __commonJS({
|
|
1330
|
-
"../../node_modules/.bun/entities@7.0.
|
|
1329
|
+
"../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js"(exports) {
|
|
1331
1330
|
"use strict";
|
|
1332
1331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1333
1332
|
exports.BinTrieFlags = void 0;
|
|
@@ -1341,9 +1340,9 @@ var require_bin_trie_flags = __commonJS({
|
|
|
1341
1340
|
}
|
|
1342
1341
|
});
|
|
1343
1342
|
|
|
1344
|
-
// ../../node_modules/.bun/entities@7.0.
|
|
1343
|
+
// ../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/decode.js
|
|
1345
1344
|
var require_decode = __commonJS({
|
|
1346
|
-
"../../node_modules/.bun/entities@7.0.
|
|
1345
|
+
"../../node_modules/.bun/entities@7.0.1/node_modules/entities/dist/commonjs/decode.js"(exports) {
|
|
1347
1346
|
"use strict";
|
|
1348
1347
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1349
1348
|
exports.xmlDecodeTree = exports.htmlDecodeTree = exports.replaceCodePoint = exports.fromCodePoint = exports.decodeCodePoint = exports.EntityDecoder = exports.DecodingMode = void 0;
|
|
@@ -1409,6 +1408,7 @@ var require_decode = __commonJS({
|
|
|
1409
1408
|
this.treeIndex = 0;
|
|
1410
1409
|
this.excess = 1;
|
|
1411
1410
|
this.decodeMode = DecodingMode.Strict;
|
|
1411
|
+
this.runConsumed = 0;
|
|
1412
1412
|
}
|
|
1413
1413
|
/** Resets the instance to make it reusable. */
|
|
1414
1414
|
startEntity(decodeMode) {
|
|
@@ -1418,6 +1418,7 @@ var require_decode = __commonJS({
|
|
|
1418
1418
|
this.treeIndex = 0;
|
|
1419
1419
|
this.excess = 1;
|
|
1420
1420
|
this.consumed = 1;
|
|
1421
|
+
this.runConsumed = 0;
|
|
1421
1422
|
}
|
|
1422
1423
|
/**
|
|
1423
1424
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -1570,33 +1571,32 @@ var require_decode = __commonJS({
|
|
|
1570
1571
|
while (offset < input.length) {
|
|
1571
1572
|
if (valueLength === 0 && (current & bin_trie_flags_js_1.BinTrieFlags.FLAG13) !== 0) {
|
|
1572
1573
|
const runLength = (current & bin_trie_flags_js_1.BinTrieFlags.BRANCH_LENGTH) >> 7;
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
if (input.charCodeAt(offset) !== firstChar) {
|
|
1577
|
-
return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1578
|
-
}
|
|
1579
|
-
offset++;
|
|
1580
|
-
this.excess++;
|
|
1581
|
-
const remaining = runLength - 1;
|
|
1582
|
-
for (let runPos = 1; runPos < runLength; runPos += 2) {
|
|
1583
|
-
const packedWord = decodeTree[this.treeIndex + 1 + (runPos - 1 >> 1)];
|
|
1584
|
-
const low = packedWord & 255;
|
|
1585
|
-
if (input.charCodeAt(offset) !== low) {
|
|
1574
|
+
if (this.runConsumed === 0) {
|
|
1575
|
+
const firstChar = current & bin_trie_flags_js_1.BinTrieFlags.JUMP_TABLE;
|
|
1576
|
+
if (input.charCodeAt(offset) !== firstChar) {
|
|
1586
1577
|
return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1587
1578
|
}
|
|
1588
1579
|
offset++;
|
|
1589
1580
|
this.excess++;
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1581
|
+
this.runConsumed++;
|
|
1582
|
+
}
|
|
1583
|
+
while (this.runConsumed < runLength) {
|
|
1584
|
+
if (offset >= input.length) {
|
|
1585
|
+
return -1;
|
|
1586
|
+
}
|
|
1587
|
+
const charIndexInPacked = this.runConsumed - 1;
|
|
1588
|
+
const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)];
|
|
1589
|
+
const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255;
|
|
1590
|
+
if (input.charCodeAt(offset) !== expectedChar) {
|
|
1591
|
+
this.runConsumed = 0;
|
|
1592
|
+
return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1597
1593
|
}
|
|
1594
|
+
offset++;
|
|
1595
|
+
this.excess++;
|
|
1596
|
+
this.runConsumed++;
|
|
1598
1597
|
}
|
|
1599
|
-
this.
|
|
1598
|
+
this.runConsumed = 0;
|
|
1599
|
+
this.treeIndex += 1 + (runLength >> 1);
|
|
1600
1600
|
current = decodeTree[this.treeIndex];
|
|
1601
1601
|
valueLength = (current & bin_trie_flags_js_1.BinTrieFlags.VALUE_LENGTH) >> 14;
|
|
1602
1602
|
}
|
|
@@ -1780,9 +1780,9 @@ var require_decode = __commonJS({
|
|
|
1780
1780
|
}
|
|
1781
1781
|
});
|
|
1782
1782
|
|
|
1783
|
-
// ../../node_modules/.bun/@babel+parser@7.28.
|
|
1783
|
+
// ../../node_modules/.bun/@babel+parser@7.28.6/node_modules/@babel/parser/lib/index.js
|
|
1784
1784
|
var require_lib = __commonJS({
|
|
1785
|
-
"../../node_modules/.bun/@babel+parser@7.28.
|
|
1785
|
+
"../../node_modules/.bun/@babel+parser@7.28.6/node_modules/@babel/parser/lib/index.js"(exports) {
|
|
1786
1786
|
"use strict";
|
|
1787
1787
|
Object.defineProperty(exports, "__esModule", {
|
|
1788
1788
|
value: true
|
|
@@ -2136,18 +2136,16 @@ var require_lib = __commonJS({
|
|
|
2136
2136
|
syntaxPlugin
|
|
2137
2137
|
}) {
|
|
2138
2138
|
const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins";
|
|
2139
|
-
{
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
reasonCode = oldReasonCodes[reasonCode];
|
|
2150
|
-
}
|
|
2139
|
+
const oldReasonCodes = {
|
|
2140
|
+
AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",
|
|
2141
|
+
AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",
|
|
2142
|
+
ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",
|
|
2143
|
+
SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",
|
|
2144
|
+
SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",
|
|
2145
|
+
SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"
|
|
2146
|
+
};
|
|
2147
|
+
if (oldReasonCodes[reasonCode]) {
|
|
2148
|
+
reasonCode = oldReasonCodes[reasonCode];
|
|
2151
2149
|
}
|
|
2152
2150
|
return function constructor(loc, details) {
|
|
2153
2151
|
const error = new SyntaxError();
|
|
@@ -2408,10 +2406,8 @@ var require_lib = __commonJS({
|
|
|
2408
2406
|
}
|
|
2409
2407
|
parsePrivateName() {
|
|
2410
2408
|
const node = super.parsePrivateName();
|
|
2411
|
-
{
|
|
2412
|
-
|
|
2413
|
-
return node;
|
|
2414
|
-
}
|
|
2409
|
+
if (!this.getPluginOption("estree", "classFeatures")) {
|
|
2410
|
+
return node;
|
|
2415
2411
|
}
|
|
2416
2412
|
return this.convertPrivateNameToPrivateIdentifier(node);
|
|
2417
2413
|
}
|
|
@@ -2422,18 +2418,14 @@ var require_lib = __commonJS({
|
|
|
2422
2418
|
return this.castNodeTo(node, "PrivateIdentifier");
|
|
2423
2419
|
}
|
|
2424
2420
|
isPrivateName(node) {
|
|
2425
|
-
{
|
|
2426
|
-
|
|
2427
|
-
return super.isPrivateName(node);
|
|
2428
|
-
}
|
|
2421
|
+
if (!this.getPluginOption("estree", "classFeatures")) {
|
|
2422
|
+
return super.isPrivateName(node);
|
|
2429
2423
|
}
|
|
2430
2424
|
return node.type === "PrivateIdentifier";
|
|
2431
2425
|
}
|
|
2432
2426
|
getPrivateNameSV(node) {
|
|
2433
|
-
{
|
|
2434
|
-
|
|
2435
|
-
return super.getPrivateNameSV(node);
|
|
2436
|
-
}
|
|
2427
|
+
if (!this.getPluginOption("estree", "classFeatures")) {
|
|
2428
|
+
return super.getPrivateNameSV(node);
|
|
2437
2429
|
}
|
|
2438
2430
|
return node.name;
|
|
2439
2431
|
}
|
|
@@ -2481,35 +2473,25 @@ var require_lib = __commonJS({
|
|
|
2481
2473
|
}
|
|
2482
2474
|
parseClassProperty(...args) {
|
|
2483
2475
|
const propertyNode = super.parseClassProperty(...args);
|
|
2484
|
-
{
|
|
2485
|
-
|
|
2486
|
-
return propertyNode;
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
{
|
|
2490
|
-
this.castNodeTo(propertyNode, "PropertyDefinition");
|
|
2476
|
+
if (!this.getPluginOption("estree", "classFeatures")) {
|
|
2477
|
+
return propertyNode;
|
|
2491
2478
|
}
|
|
2479
|
+
this.castNodeTo(propertyNode, "PropertyDefinition");
|
|
2492
2480
|
return propertyNode;
|
|
2493
2481
|
}
|
|
2494
2482
|
parseClassPrivateProperty(...args) {
|
|
2495
2483
|
const propertyNode = super.parseClassPrivateProperty(...args);
|
|
2496
|
-
{
|
|
2497
|
-
|
|
2498
|
-
return propertyNode;
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2501
|
-
{
|
|
2502
|
-
this.castNodeTo(propertyNode, "PropertyDefinition");
|
|
2484
|
+
if (!this.getPluginOption("estree", "classFeatures")) {
|
|
2485
|
+
return propertyNode;
|
|
2503
2486
|
}
|
|
2487
|
+
this.castNodeTo(propertyNode, "PropertyDefinition");
|
|
2504
2488
|
propertyNode.computed = false;
|
|
2505
2489
|
return propertyNode;
|
|
2506
2490
|
}
|
|
2507
2491
|
parseClassAccessorProperty(node) {
|
|
2508
2492
|
const accessorPropertyNode = super.parseClassAccessorProperty(node);
|
|
2509
|
-
{
|
|
2510
|
-
|
|
2511
|
-
return accessorPropertyNode;
|
|
2512
|
-
}
|
|
2493
|
+
if (!this.getPluginOption("estree", "classFeatures")) {
|
|
2494
|
+
return accessorPropertyNode;
|
|
2513
2495
|
}
|
|
2514
2496
|
if (accessorPropertyNode.abstract && this.hasPlugin("typescript")) {
|
|
2515
2497
|
delete accessorPropertyNode.abstract;
|
|
@@ -2566,14 +2548,11 @@ var require_lib = __commonJS({
|
|
|
2566
2548
|
finishCallExpression(unfinished, optional) {
|
|
2567
2549
|
const node = super.finishCallExpression(unfinished, optional);
|
|
2568
2550
|
if (node.callee.type === "Import") {
|
|
2569
|
-
var _ref;
|
|
2551
|
+
var _ref, _ref2;
|
|
2570
2552
|
this.castNodeTo(node, "ImportExpression");
|
|
2571
2553
|
node.source = node.arguments[0];
|
|
2572
2554
|
node.options = (_ref = node.arguments[1]) != null ? _ref : null;
|
|
2573
|
-
|
|
2574
|
-
var _ref2;
|
|
2575
|
-
node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
|
|
2576
|
-
}
|
|
2555
|
+
node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
|
|
2577
2556
|
delete node.arguments;
|
|
2578
2557
|
delete node.callee;
|
|
2579
2558
|
} else if (node.type === "OptionalCallExpression") {
|
|
@@ -2697,9 +2676,7 @@ var require_lib = __commonJS({
|
|
|
2697
2676
|
j_cTag: new TokContext("</tag"),
|
|
2698
2677
|
j_expr: new TokContext("<tag>...</tag>", true)
|
|
2699
2678
|
};
|
|
2700
|
-
|
|
2701
|
-
types.template = new TokContext("`", true);
|
|
2702
|
-
}
|
|
2679
|
+
types.template = new TokContext("`", true);
|
|
2703
2680
|
var beforeExpr = true;
|
|
2704
2681
|
var startsExpr = true;
|
|
2705
2682
|
var isLoop = true;
|
|
@@ -2728,9 +2705,7 @@ var require_lib = __commonJS({
|
|
|
2728
2705
|
this.prefix = !!conf.prefix;
|
|
2729
2706
|
this.postfix = !!conf.postfix;
|
|
2730
2707
|
this.binop = conf.binop != null ? conf.binop : null;
|
|
2731
|
-
|
|
2732
|
-
this.updateContext = null;
|
|
2733
|
-
}
|
|
2708
|
+
this.updateContext = null;
|
|
2734
2709
|
}
|
|
2735
2710
|
};
|
|
2736
2711
|
var keywords$1 = /* @__PURE__ */ new Map();
|
|
@@ -3231,24 +3206,22 @@ var require_lib = __commonJS({
|
|
|
3231
3206
|
function getExportedToken(token) {
|
|
3232
3207
|
return tokenTypes[token];
|
|
3233
3208
|
}
|
|
3234
|
-
{
|
|
3235
|
-
|
|
3209
|
+
tokenTypes[8].updateContext = (context) => {
|
|
3210
|
+
context.pop();
|
|
3211
|
+
};
|
|
3212
|
+
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
3213
|
+
context.push(types.brace);
|
|
3214
|
+
};
|
|
3215
|
+
tokenTypes[22].updateContext = (context) => {
|
|
3216
|
+
if (context[context.length - 1] === types.template) {
|
|
3236
3217
|
context.pop();
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
} else {
|
|
3245
|
-
context.push(types.template);
|
|
3246
|
-
}
|
|
3247
|
-
};
|
|
3248
|
-
tokenTypes[143].updateContext = (context) => {
|
|
3249
|
-
context.push(types.j_expr, types.j_oTag);
|
|
3250
|
-
};
|
|
3251
|
-
}
|
|
3218
|
+
} else {
|
|
3219
|
+
context.push(types.template);
|
|
3220
|
+
}
|
|
3221
|
+
};
|
|
3222
|
+
tokenTypes[143].updateContext = (context) => {
|
|
3223
|
+
context.push(types.j_expr, types.j_oTag);
|
|
3224
|
+
};
|
|
3252
3225
|
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
3253
3226
|
var nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
3254
3227
|
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
@@ -5106,9 +5079,7 @@ var require_lib = __commonJS({
|
|
|
5106
5079
|
parseClassSuper(node) {
|
|
5107
5080
|
super.parseClassSuper(node);
|
|
5108
5081
|
if (node.superClass && (this.match(47) || this.match(51))) {
|
|
5109
|
-
|
|
5110
|
-
node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression();
|
|
5111
|
-
}
|
|
5082
|
+
node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression();
|
|
5112
5083
|
}
|
|
5113
5084
|
if (this.isContextual(113)) {
|
|
5114
5085
|
this.next();
|
|
@@ -6894,7 +6865,6 @@ var require_lib = __commonJS({
|
|
|
6894
6865
|
switch (node.type) {
|
|
6895
6866
|
case "ObjectExpression":
|
|
6896
6867
|
case "ObjectPattern":
|
|
6897
|
-
case "RecordExpression":
|
|
6898
6868
|
adjustInnerComments(node, node.properties, commentWS);
|
|
6899
6869
|
break;
|
|
6900
6870
|
case "CallExpression":
|
|
@@ -6914,7 +6884,6 @@ var require_lib = __commonJS({
|
|
|
6914
6884
|
break;
|
|
6915
6885
|
case "ArrayExpression":
|
|
6916
6886
|
case "ArrayPattern":
|
|
6917
|
-
case "TupleExpression":
|
|
6918
6887
|
adjustInnerComments(node, node.elements, commentWS);
|
|
6919
6888
|
break;
|
|
6920
6889
|
case "ExportNamedDeclaration":
|
|
@@ -6922,14 +6891,20 @@ var require_lib = __commonJS({
|
|
|
6922
6891
|
adjustInnerComments(node, node.specifiers, commentWS);
|
|
6923
6892
|
break;
|
|
6924
6893
|
case "TSEnumDeclaration":
|
|
6925
|
-
|
|
6926
|
-
adjustInnerComments(node, node.members, commentWS);
|
|
6927
|
-
}
|
|
6894
|
+
adjustInnerComments(node, node.members, commentWS);
|
|
6928
6895
|
break;
|
|
6929
6896
|
case "TSEnumBody":
|
|
6930
6897
|
adjustInnerComments(node, node.members, commentWS);
|
|
6931
6898
|
break;
|
|
6932
6899
|
default: {
|
|
6900
|
+
if (node.type === "RecordExpression") {
|
|
6901
|
+
adjustInnerComments(node, node.properties, commentWS);
|
|
6902
|
+
break;
|
|
6903
|
+
}
|
|
6904
|
+
if (node.type === "TupleExpression") {
|
|
6905
|
+
adjustInnerComments(node, node.elements, commentWS);
|
|
6906
|
+
break;
|
|
6907
|
+
}
|
|
6933
6908
|
setInnerComments(node, comments);
|
|
6934
6909
|
}
|
|
6935
6910
|
}
|
|
@@ -8880,19 +8855,17 @@ var require_lib = __commonJS({
|
|
|
8880
8855
|
}
|
|
8881
8856
|
};
|
|
8882
8857
|
var NodePrototype = Node.prototype;
|
|
8883
|
-
{
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
newNode[key] = this[key];
|
|
8891
|
-
}
|
|
8858
|
+
NodePrototype.__clone = function() {
|
|
8859
|
+
const newNode = new Node(void 0, this.start, this.loc.start);
|
|
8860
|
+
const keys = Object.keys(this);
|
|
8861
|
+
for (let i = 0, length = keys.length; i < length; i++) {
|
|
8862
|
+
const key = keys[i];
|
|
8863
|
+
if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
|
|
8864
|
+
newNode[key] = this[key];
|
|
8892
8865
|
}
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
}
|
|
8866
|
+
}
|
|
8867
|
+
return newNode;
|
|
8868
|
+
};
|
|
8896
8869
|
var NodeUtils = class extends UtilParser {
|
|
8897
8870
|
startNode() {
|
|
8898
8871
|
const loc = this.state.startLoc;
|
|
@@ -9740,13 +9713,9 @@ var require_lib = __commonJS({
|
|
|
9740
9713
|
this.expect(10);
|
|
9741
9714
|
if (!this.match(134)) {
|
|
9742
9715
|
this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
|
|
9743
|
-
|
|
9744
|
-
node.argument = super.parseExprAtom();
|
|
9745
|
-
}
|
|
9716
|
+
node.argument = super.parseExprAtom();
|
|
9746
9717
|
} else {
|
|
9747
|
-
|
|
9748
|
-
node.argument = this.parseStringLiteral(this.state.value);
|
|
9749
|
-
}
|
|
9718
|
+
node.argument = this.parseStringLiteral(this.state.value);
|
|
9750
9719
|
}
|
|
9751
9720
|
if (this.eat(12)) {
|
|
9752
9721
|
node.options = this.tsParseImportTypeOptions();
|
|
@@ -9758,9 +9727,7 @@ var require_lib = __commonJS({
|
|
|
9758
9727
|
node.qualifier = this.tsParseEntityName(1 | 2);
|
|
9759
9728
|
}
|
|
9760
9729
|
if (this.match(47)) {
|
|
9761
|
-
|
|
9762
|
-
node.typeParameters = this.tsParseTypeArguments();
|
|
9763
|
-
}
|
|
9730
|
+
node.typeParameters = this.tsParseTypeArguments();
|
|
9764
9731
|
}
|
|
9765
9732
|
return this.finishNode(node, "TSImportType");
|
|
9766
9733
|
}
|
|
@@ -9825,9 +9792,7 @@ var require_lib = __commonJS({
|
|
|
9825
9792
|
const node = this.startNode();
|
|
9826
9793
|
node.typeName = this.tsParseEntityName(1);
|
|
9827
9794
|
if (!this.hasPrecedingLineBreak() && this.match(47)) {
|
|
9828
|
-
|
|
9829
|
-
node.typeParameters = this.tsParseTypeArguments();
|
|
9830
|
-
}
|
|
9795
|
+
node.typeParameters = this.tsParseTypeArguments();
|
|
9831
9796
|
}
|
|
9832
9797
|
return this.finishNode(node, "TSTypeReference");
|
|
9833
9798
|
}
|
|
@@ -9850,14 +9815,10 @@ var require_lib = __commonJS({
|
|
|
9850
9815
|
if (this.match(83)) {
|
|
9851
9816
|
node.exprName = this.tsParseImportType();
|
|
9852
9817
|
} else {
|
|
9853
|
-
|
|
9854
|
-
node.exprName = this.tsParseEntityName(1 | 2);
|
|
9855
|
-
}
|
|
9818
|
+
node.exprName = this.tsParseEntityName(1 | 2);
|
|
9856
9819
|
}
|
|
9857
9820
|
if (!this.hasPrecedingLineBreak() && this.match(47)) {
|
|
9858
|
-
|
|
9859
|
-
node.typeParameters = this.tsParseTypeArguments();
|
|
9860
|
-
}
|
|
9821
|
+
node.typeParameters = this.tsParseTypeArguments();
|
|
9861
9822
|
}
|
|
9862
9823
|
return this.finishNode(node, "TSTypeQuery");
|
|
9863
9824
|
}
|
|
@@ -10078,12 +10039,10 @@ var require_lib = __commonJS({
|
|
|
10078
10039
|
node.readonly = true;
|
|
10079
10040
|
}
|
|
10080
10041
|
this.expect(0);
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
|
|
10086
|
-
}
|
|
10042
|
+
const typeParameter = this.startNode();
|
|
10043
|
+
typeParameter.name = this.tsParseTypeParameterName();
|
|
10044
|
+
typeParameter.constraint = this.tsExpectThenParseType(58);
|
|
10045
|
+
node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
|
|
10087
10046
|
node.nameType = this.eatContextual(93) ? this.tsParseType() : null;
|
|
10088
10047
|
this.expect(3);
|
|
10089
10048
|
if (this.match(53)) {
|
|
@@ -10215,11 +10174,9 @@ var require_lib = __commonJS({
|
|
|
10215
10174
|
return this.finishNode(node, "TSLiteralType");
|
|
10216
10175
|
}
|
|
10217
10176
|
tsParseTemplateLiteralType() {
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
return this.finishNode(node, "TSLiteralType");
|
|
10222
|
-
}
|
|
10177
|
+
const node = this.startNode();
|
|
10178
|
+
node.literal = super.parseTemplate(false);
|
|
10179
|
+
return this.finishNode(node, "TSLiteralType");
|
|
10223
10180
|
}
|
|
10224
10181
|
parseTemplateSubstitution() {
|
|
10225
10182
|
if (this.state.inType) return this.tsParseType();
|
|
@@ -10548,14 +10505,12 @@ var require_lib = __commonJS({
|
|
|
10548
10505
|
tsParseHeritageClause(token) {
|
|
10549
10506
|
const originalStartLoc = this.state.startLoc;
|
|
10550
10507
|
const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => {
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
node.typeParameters = this.tsParseTypeArguments();
|
|
10556
|
-
}
|
|
10557
|
-
return this.finishNode(node, "TSExpressionWithTypeArguments");
|
|
10508
|
+
const node = this.startNode();
|
|
10509
|
+
node.expression = this.tsParseEntityName(1 | 2);
|
|
10510
|
+
if (this.match(47)) {
|
|
10511
|
+
node.typeParameters = this.tsParseTypeArguments();
|
|
10558
10512
|
}
|
|
10513
|
+
return this.finishNode(node, "TSExpressionWithTypeArguments");
|
|
10559
10514
|
});
|
|
10560
10515
|
if (!delimitedList.length) {
|
|
10561
10516
|
this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, {
|
|
@@ -10671,11 +10626,9 @@ var require_lib = __commonJS({
|
|
|
10671
10626
|
this.expectContextual(126);
|
|
10672
10627
|
node.id = this.parseIdentifier();
|
|
10673
10628
|
this.checkIdentifier(node.id, node.const ? 8971 : 8459);
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
this.expect(8);
|
|
10678
|
-
}
|
|
10629
|
+
this.expect(5);
|
|
10630
|
+
node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
|
|
10631
|
+
this.expect(8);
|
|
10679
10632
|
return this.finishNode(node, "TSEnumDeclaration");
|
|
10680
10633
|
}
|
|
10681
10634
|
tsParseEnumBody() {
|
|
@@ -10714,9 +10667,7 @@ var require_lib = __commonJS({
|
|
|
10714
10667
|
tsParseAmbientExternalModuleDeclaration(node) {
|
|
10715
10668
|
if (this.isContextual(112)) {
|
|
10716
10669
|
node.kind = "global";
|
|
10717
|
-
|
|
10718
|
-
node.global = true;
|
|
10719
|
-
}
|
|
10670
|
+
node.global = true;
|
|
10720
10671
|
node.id = this.parseIdentifier();
|
|
10721
10672
|
} else if (this.match(134)) {
|
|
10722
10673
|
node.kind = "module";
|
|
@@ -10736,9 +10687,7 @@ var require_lib = __commonJS({
|
|
|
10736
10687
|
return this.finishNode(node, "TSModuleDeclaration");
|
|
10737
10688
|
}
|
|
10738
10689
|
tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) {
|
|
10739
|
-
|
|
10740
|
-
node.isExport = isExport || false;
|
|
10741
|
-
}
|
|
10690
|
+
node.isExport = isExport || false;
|
|
10742
10691
|
node.id = maybeDefaultIdentifier || this.parseIdentifier();
|
|
10743
10692
|
this.checkIdentifier(node.id, 4096);
|
|
10744
10693
|
this.expect(29);
|
|
@@ -11059,9 +11008,7 @@ var require_lib = __commonJS({
|
|
|
11059
11008
|
}
|
|
11060
11009
|
if (tokenIsTemplate(this.state.type)) {
|
|
11061
11010
|
const result2 = super.parseTaggedTemplateExpression(base, startLoc, state);
|
|
11062
|
-
|
|
11063
|
-
result2.typeParameters = typeArguments;
|
|
11064
|
-
}
|
|
11011
|
+
result2.typeParameters = typeArguments;
|
|
11065
11012
|
return result2;
|
|
11066
11013
|
}
|
|
11067
11014
|
if (!noCalls && this.eat(10)) {
|
|
@@ -11069,9 +11016,7 @@ var require_lib = __commonJS({
|
|
|
11069
11016
|
node2.callee = base;
|
|
11070
11017
|
node2.arguments = this.parseCallExpressionArguments();
|
|
11071
11018
|
this.tsCheckForInvalidTypeCasts(node2.arguments);
|
|
11072
|
-
|
|
11073
|
-
node2.typeParameters = typeArguments;
|
|
11074
|
-
}
|
|
11019
|
+
node2.typeParameters = typeArguments;
|
|
11075
11020
|
if (state.optionalChainMember) {
|
|
11076
11021
|
node2.optional = isOptionalCall;
|
|
11077
11022
|
}
|
|
@@ -11083,9 +11028,7 @@ var require_lib = __commonJS({
|
|
|
11083
11028
|
}
|
|
11084
11029
|
const node = this.startNodeAt(startLoc);
|
|
11085
11030
|
node.expression = base;
|
|
11086
|
-
|
|
11087
|
-
node.typeParameters = typeArguments;
|
|
11088
|
-
}
|
|
11031
|
+
node.typeParameters = typeArguments;
|
|
11089
11032
|
return this.finishNode(node, "TSInstantiationExpression");
|
|
11090
11033
|
});
|
|
11091
11034
|
if (missingParenErrorLoc) {
|
|
@@ -11112,9 +11055,7 @@ var require_lib = __commonJS({
|
|
|
11112
11055
|
callee
|
|
11113
11056
|
} = node;
|
|
11114
11057
|
if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) {
|
|
11115
|
-
|
|
11116
|
-
node.typeParameters = callee.typeParameters;
|
|
11117
|
-
}
|
|
11058
|
+
node.typeParameters = callee.typeParameters;
|
|
11118
11059
|
node.callee = callee.expression;
|
|
11119
11060
|
}
|
|
11120
11061
|
}
|
|
@@ -11205,9 +11146,7 @@ var require_lib = __commonJS({
|
|
|
11205
11146
|
nodeImportEquals.importKind = "value";
|
|
11206
11147
|
}
|
|
11207
11148
|
const declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
|
|
11208
|
-
|
|
11209
|
-
return declaration;
|
|
11210
|
-
}
|
|
11149
|
+
return declaration;
|
|
11211
11150
|
} else if (this.eat(29)) {
|
|
11212
11151
|
const assign = node;
|
|
11213
11152
|
assign.expression = super.parseExpression();
|
|
@@ -11554,9 +11493,7 @@ var require_lib = __commonJS({
|
|
|
11554
11493
|
parseClassSuper(node) {
|
|
11555
11494
|
super.parseClassSuper(node);
|
|
11556
11495
|
if (node.superClass && (this.match(47) || this.match(51))) {
|
|
11557
|
-
|
|
11558
|
-
node.superTypeParameters = this.tsParseTypeArgumentsInExpression();
|
|
11559
|
-
}
|
|
11496
|
+
node.superTypeParameters = this.tsParseTypeArgumentsInExpression();
|
|
11560
11497
|
}
|
|
11561
11498
|
if (this.eatContextual(113)) {
|
|
11562
11499
|
node.implements = this.tsParseHeritageClause("implements");
|
|
@@ -11770,9 +11707,7 @@ var require_lib = __commonJS({
|
|
|
11770
11707
|
const typeArguments = this.tsParseTypeArgumentsInExpression();
|
|
11771
11708
|
if (this.match(10)) {
|
|
11772
11709
|
const call = super.parseMaybeDecoratorArguments(expr, startLoc);
|
|
11773
|
-
|
|
11774
|
-
call.typeParameters = typeArguments;
|
|
11775
|
-
}
|
|
11710
|
+
call.typeParameters = typeArguments;
|
|
11776
11711
|
return call;
|
|
11777
11712
|
}
|
|
11778
11713
|
this.unexpected(null, 10);
|
|
@@ -11863,9 +11798,7 @@ var require_lib = __commonJS({
|
|
|
11863
11798
|
if (this.match(47) || this.match(51)) {
|
|
11864
11799
|
const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression());
|
|
11865
11800
|
if (typeArguments) {
|
|
11866
|
-
|
|
11867
|
-
node.typeParameters = typeArguments;
|
|
11868
|
-
}
|
|
11801
|
+
node.typeParameters = typeArguments;
|
|
11869
11802
|
}
|
|
11870
11803
|
}
|
|
11871
11804
|
return super.jsxParseOpeningElementAfterName(node);
|
|
@@ -12313,7 +12246,8 @@ var require_lib = __commonJS({
|
|
|
12313
12246
|
return false;
|
|
12314
12247
|
}
|
|
12315
12248
|
verifyBreakContinue(node, isBreak) {
|
|
12316
|
-
|
|
12249
|
+
var _node$label;
|
|
12250
|
+
if (((_node$label = node.label) == null ? void 0 : _node$label.type) === "Placeholder") return;
|
|
12317
12251
|
super.verifyBreakContinue(node, isBreak);
|
|
12318
12252
|
}
|
|
12319
12253
|
parseExpressionStatement(node, expr) {
|
|
@@ -12486,6 +12420,7 @@ var require_lib = __commonJS({
|
|
|
12486
12420
|
throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`);
|
|
12487
12421
|
}
|
|
12488
12422
|
if (proposal === "hack") {
|
|
12423
|
+
var _pluginsMap$get;
|
|
12489
12424
|
if (pluginsMap.has("placeholders")) {
|
|
12490
12425
|
throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
|
|
12491
12426
|
}
|
|
@@ -12497,25 +12432,20 @@ var require_lib = __commonJS({
|
|
|
12497
12432
|
const tokenList = TOPIC_TOKENS.map((t) => `"${t}"`).join(", ");
|
|
12498
12433
|
throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`);
|
|
12499
12434
|
}
|
|
12500
|
-
{
|
|
12501
|
-
|
|
12502
|
-
if (topicToken === "#" && ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash") {
|
|
12503
|
-
throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
|
|
12504
|
-
}
|
|
12435
|
+
if (topicToken === "#" && ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash") {
|
|
12436
|
+
throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
|
|
12505
12437
|
}
|
|
12506
12438
|
} else if (proposal === "smart" && ((_pluginsMap$get2 = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get2.syntaxType) === "hash") {
|
|
12507
12439
|
throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
|
|
12508
12440
|
}
|
|
12509
12441
|
}
|
|
12510
12442
|
if (pluginsMap.has("moduleAttributes")) {
|
|
12511
|
-
{
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
|
|
12518
|
-
}
|
|
12443
|
+
if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) {
|
|
12444
|
+
throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
|
|
12445
|
+
}
|
|
12446
|
+
const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version;
|
|
12447
|
+
if (moduleAttributesVersionPluginOption !== "may-2020") {
|
|
12448
|
+
throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.");
|
|
12519
12449
|
}
|
|
12520
12450
|
}
|
|
12521
12451
|
if (pluginsMap.has("importAssertions")) {
|
|
@@ -12523,19 +12453,16 @@ var require_lib = __commonJS({
|
|
|
12523
12453
|
throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");
|
|
12524
12454
|
}
|
|
12525
12455
|
}
|
|
12526
|
-
if (
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
}
|
|
12456
|
+
if (pluginsMap.has("deprecatedImportAssert")) ;
|
|
12457
|
+
else if (pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) {
|
|
12458
|
+
pluginsMap.set("deprecatedImportAssert", {});
|
|
12530
12459
|
}
|
|
12531
12460
|
if (pluginsMap.has("recordAndTuple")) {
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
|
|
12538
|
-
}
|
|
12461
|
+
const syntaxType = pluginsMap.get("recordAndTuple").syntaxType;
|
|
12462
|
+
if (syntaxType != null) {
|
|
12463
|
+
const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
|
|
12464
|
+
if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) {
|
|
12465
|
+
throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", "));
|
|
12539
12466
|
}
|
|
12540
12467
|
}
|
|
12541
12468
|
}
|
|
@@ -13223,14 +13150,12 @@ var require_lib = __commonJS({
|
|
|
13223
13150
|
throw this.unexpected();
|
|
13224
13151
|
}
|
|
13225
13152
|
default:
|
|
13226
|
-
{
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
|
|
13233
|
-
}
|
|
13153
|
+
if (type === 137) {
|
|
13154
|
+
return this.parseDecimalLiteral(this.state.value);
|
|
13155
|
+
} else if (type === 2 || type === 1) {
|
|
13156
|
+
return this.parseArrayLike(this.state.type === 2 ? 4 : 3, true);
|
|
13157
|
+
} else if (type === 6 || type === 7) {
|
|
13158
|
+
return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
|
|
13234
13159
|
}
|
|
13235
13160
|
if (tokenIsIdentifier(type)) {
|
|
13236
13161
|
if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) {
|
|
@@ -13354,16 +13279,12 @@ var require_lib = __commonJS({
|
|
|
13354
13279
|
const node = this.startNode();
|
|
13355
13280
|
this.next();
|
|
13356
13281
|
if (this.match(10) && !this.scope.allowDirectSuper) {
|
|
13357
|
-
{
|
|
13358
|
-
|
|
13359
|
-
this.raise(Errors.SuperNotAllowed, node);
|
|
13360
|
-
}
|
|
13282
|
+
if (!(this.optionFlags & 16)) {
|
|
13283
|
+
this.raise(Errors.SuperNotAllowed, node);
|
|
13361
13284
|
}
|
|
13362
13285
|
} else if (!this.scope.allowSuper) {
|
|
13363
|
-
{
|
|
13364
|
-
|
|
13365
|
-
this.raise(Errors.UnexpectedSuper, node);
|
|
13366
|
-
}
|
|
13286
|
+
if (!(this.optionFlags & 16)) {
|
|
13287
|
+
this.raise(Errors.UnexpectedSuper, node);
|
|
13367
13288
|
}
|
|
13368
13289
|
}
|
|
13369
13290
|
if (!this.match(10) && !this.match(0) && !this.match(16)) {
|
|
@@ -13443,9 +13364,7 @@ var require_lib = __commonJS({
|
|
|
13443
13364
|
return this.parseLiteral(value, "NumericLiteral");
|
|
13444
13365
|
}
|
|
13445
13366
|
parseBigIntLiteral(value) {
|
|
13446
|
-
|
|
13447
|
-
return this.parseLiteral(value, "BigIntLiteral");
|
|
13448
|
-
}
|
|
13367
|
+
return this.parseLiteral(value, "BigIntLiteral");
|
|
13449
13368
|
}
|
|
13450
13369
|
parseDecimalLiteral(value) {
|
|
13451
13370
|
return this.parseLiteral(value, "DecimalLiteral");
|
|
@@ -13665,10 +13584,8 @@ var require_lib = __commonJS({
|
|
|
13665
13584
|
if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
|
|
13666
13585
|
this.raise(Errors.InvalidRecordProperty, prop);
|
|
13667
13586
|
}
|
|
13668
|
-
{
|
|
13669
|
-
|
|
13670
|
-
this.addExtra(prop, "shorthand", true);
|
|
13671
|
-
}
|
|
13587
|
+
if (prop.shorthand) {
|
|
13588
|
+
this.addExtra(prop, "shorthand", true);
|
|
13672
13589
|
}
|
|
13673
13590
|
node.properties.push(prop);
|
|
13674
13591
|
}
|
|
@@ -14341,100 +14258,98 @@ var require_lib = __commonJS({
|
|
|
14341
14258
|
type
|
|
14342
14259
|
} = token;
|
|
14343
14260
|
if (typeof type === "number") {
|
|
14344
|
-
{
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14261
|
+
if (type === 139) {
|
|
14262
|
+
const {
|
|
14263
|
+
loc,
|
|
14264
|
+
start,
|
|
14265
|
+
value,
|
|
14266
|
+
end
|
|
14267
|
+
} = token;
|
|
14268
|
+
const hashEndPos = start + 1;
|
|
14269
|
+
const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
|
|
14270
|
+
tokens.splice(i, 1, new Token({
|
|
14271
|
+
type: getExportedToken(27),
|
|
14272
|
+
value: "#",
|
|
14273
|
+
start,
|
|
14274
|
+
end: hashEndPos,
|
|
14275
|
+
startLoc: loc.start,
|
|
14276
|
+
endLoc: hashEndLoc
|
|
14277
|
+
}), new Token({
|
|
14278
|
+
type: getExportedToken(132),
|
|
14279
|
+
value,
|
|
14280
|
+
start: hashEndPos,
|
|
14281
|
+
end,
|
|
14282
|
+
startLoc: hashEndLoc,
|
|
14283
|
+
endLoc: loc.end
|
|
14284
|
+
}));
|
|
14285
|
+
i++;
|
|
14286
|
+
continue;
|
|
14287
|
+
}
|
|
14288
|
+
if (tokenIsTemplate(type)) {
|
|
14289
|
+
const {
|
|
14290
|
+
loc,
|
|
14291
|
+
start,
|
|
14292
|
+
value,
|
|
14293
|
+
end
|
|
14294
|
+
} = token;
|
|
14295
|
+
const backquoteEnd = start + 1;
|
|
14296
|
+
const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
|
|
14297
|
+
let startToken;
|
|
14298
|
+
if (input.charCodeAt(start - startIndex) === 96) {
|
|
14299
|
+
startToken = new Token({
|
|
14300
|
+
type: getExportedToken(22),
|
|
14301
|
+
value: "`",
|
|
14348
14302
|
start,
|
|
14349
|
-
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
|
|
14353
|
-
|
|
14354
|
-
|
|
14355
|
-
type: getExportedToken(
|
|
14356
|
-
value: "
|
|
14303
|
+
end: backquoteEnd,
|
|
14304
|
+
startLoc: loc.start,
|
|
14305
|
+
endLoc: backquoteEndLoc
|
|
14306
|
+
});
|
|
14307
|
+
} else {
|
|
14308
|
+
startToken = new Token({
|
|
14309
|
+
type: getExportedToken(8),
|
|
14310
|
+
value: "}",
|
|
14357
14311
|
start,
|
|
14358
|
-
end:
|
|
14312
|
+
end: backquoteEnd,
|
|
14359
14313
|
startLoc: loc.start,
|
|
14360
|
-
endLoc:
|
|
14361
|
-
})
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14314
|
+
endLoc: backquoteEndLoc
|
|
14315
|
+
});
|
|
14316
|
+
}
|
|
14317
|
+
let templateValue, templateElementEnd, templateElementEndLoc, endToken;
|
|
14318
|
+
if (type === 24) {
|
|
14319
|
+
templateElementEnd = end - 1;
|
|
14320
|
+
templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
|
|
14321
|
+
templateValue = value === null ? null : value.slice(1, -1);
|
|
14322
|
+
endToken = new Token({
|
|
14323
|
+
type: getExportedToken(22),
|
|
14324
|
+
value: "`",
|
|
14325
|
+
start: templateElementEnd,
|
|
14365
14326
|
end,
|
|
14366
|
-
startLoc:
|
|
14327
|
+
startLoc: templateElementEndLoc,
|
|
14367
14328
|
endLoc: loc.end
|
|
14368
|
-
})
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
end
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
let startToken;
|
|
14382
|
-
if (input.charCodeAt(start - startIndex) === 96) {
|
|
14383
|
-
startToken = new Token({
|
|
14384
|
-
type: getExportedToken(22),
|
|
14385
|
-
value: "`",
|
|
14386
|
-
start,
|
|
14387
|
-
end: backquoteEnd,
|
|
14388
|
-
startLoc: loc.start,
|
|
14389
|
-
endLoc: backquoteEndLoc
|
|
14390
|
-
});
|
|
14391
|
-
} else {
|
|
14392
|
-
startToken = new Token({
|
|
14393
|
-
type: getExportedToken(8),
|
|
14394
|
-
value: "}",
|
|
14395
|
-
start,
|
|
14396
|
-
end: backquoteEnd,
|
|
14397
|
-
startLoc: loc.start,
|
|
14398
|
-
endLoc: backquoteEndLoc
|
|
14399
|
-
});
|
|
14400
|
-
}
|
|
14401
|
-
let templateValue, templateElementEnd, templateElementEndLoc, endToken;
|
|
14402
|
-
if (type === 24) {
|
|
14403
|
-
templateElementEnd = end - 1;
|
|
14404
|
-
templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
|
|
14405
|
-
templateValue = value === null ? null : value.slice(1, -1);
|
|
14406
|
-
endToken = new Token({
|
|
14407
|
-
type: getExportedToken(22),
|
|
14408
|
-
value: "`",
|
|
14409
|
-
start: templateElementEnd,
|
|
14410
|
-
end,
|
|
14411
|
-
startLoc: templateElementEndLoc,
|
|
14412
|
-
endLoc: loc.end
|
|
14413
|
-
});
|
|
14414
|
-
} else {
|
|
14415
|
-
templateElementEnd = end - 2;
|
|
14416
|
-
templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
|
|
14417
|
-
templateValue = value === null ? null : value.slice(1, -2);
|
|
14418
|
-
endToken = new Token({
|
|
14419
|
-
type: getExportedToken(23),
|
|
14420
|
-
value: "${",
|
|
14421
|
-
start: templateElementEnd,
|
|
14422
|
-
end,
|
|
14423
|
-
startLoc: templateElementEndLoc,
|
|
14424
|
-
endLoc: loc.end
|
|
14425
|
-
});
|
|
14426
|
-
}
|
|
14427
|
-
tokens.splice(i, 1, startToken, new Token({
|
|
14428
|
-
type: getExportedToken(20),
|
|
14429
|
-
value: templateValue,
|
|
14430
|
-
start: backquoteEnd,
|
|
14431
|
-
end: templateElementEnd,
|
|
14432
|
-
startLoc: backquoteEndLoc,
|
|
14433
|
-
endLoc: templateElementEndLoc
|
|
14434
|
-
}), endToken);
|
|
14435
|
-
i += 2;
|
|
14436
|
-
continue;
|
|
14329
|
+
});
|
|
14330
|
+
} else {
|
|
14331
|
+
templateElementEnd = end - 2;
|
|
14332
|
+
templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
|
|
14333
|
+
templateValue = value === null ? null : value.slice(1, -2);
|
|
14334
|
+
endToken = new Token({
|
|
14335
|
+
type: getExportedToken(23),
|
|
14336
|
+
value: "${",
|
|
14337
|
+
start: templateElementEnd,
|
|
14338
|
+
end,
|
|
14339
|
+
startLoc: templateElementEndLoc,
|
|
14340
|
+
endLoc: loc.end
|
|
14341
|
+
});
|
|
14437
14342
|
}
|
|
14343
|
+
tokens.splice(i, 1, startToken, new Token({
|
|
14344
|
+
type: getExportedToken(20),
|
|
14345
|
+
value: templateValue,
|
|
14346
|
+
start: backquoteEnd,
|
|
14347
|
+
end: templateElementEnd,
|
|
14348
|
+
startLoc: backquoteEndLoc,
|
|
14349
|
+
endLoc: templateElementEndLoc
|
|
14350
|
+
}), endToken);
|
|
14351
|
+
i += 2;
|
|
14352
|
+
continue;
|
|
14438
14353
|
}
|
|
14439
14354
|
token.type = getExportedToken(type);
|
|
14440
14355
|
}
|
|
@@ -16154,9 +16069,7 @@ var require_lib = __commonJS({
|
|
|
16154
16069
|
}
|
|
16155
16070
|
maybeParseImportAttributes(node) {
|
|
16156
16071
|
let attributes;
|
|
16157
|
-
|
|
16158
|
-
var useWith = false;
|
|
16159
|
-
}
|
|
16072
|
+
var useWith = false;
|
|
16160
16073
|
if (this.match(76)) {
|
|
16161
16074
|
if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) {
|
|
16162
16075
|
return;
|
|
@@ -16168,9 +16081,7 @@ var require_lib = __commonJS({
|
|
|
16168
16081
|
} else {
|
|
16169
16082
|
attributes = this.parseImportAttributes();
|
|
16170
16083
|
}
|
|
16171
|
-
|
|
16172
|
-
useWith = true;
|
|
16173
|
-
}
|
|
16084
|
+
useWith = true;
|
|
16174
16085
|
} else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) {
|
|
16175
16086
|
if (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions")) {
|
|
16176
16087
|
this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc);
|
|
@@ -18561,9 +18472,9 @@ var require_source_map = __commonJS({
|
|
|
18561
18472
|
}
|
|
18562
18473
|
});
|
|
18563
18474
|
|
|
18564
|
-
// ../../node_modules/.bun/@vue+compiler-core@3.5.
|
|
18475
|
+
// ../../node_modules/.bun/@vue+compiler-core@3.5.27/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js
|
|
18565
18476
|
var require_compiler_core_cjs_prod = __commonJS({
|
|
18566
|
-
"../../node_modules/.bun/@vue+compiler-core@3.5.
|
|
18477
|
+
"../../node_modules/.bun/@vue+compiler-core@3.5.27/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js"(exports) {
|
|
18567
18478
|
"use strict";
|
|
18568
18479
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18569
18480
|
var shared = require_shared();
|
|
@@ -25328,9 +25239,9 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
25328
25239
|
}
|
|
25329
25240
|
});
|
|
25330
25241
|
|
|
25331
|
-
// ../../node_modules/.bun/@vue+compiler-core@3.5.
|
|
25242
|
+
// ../../node_modules/.bun/@vue+compiler-core@3.5.27/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js
|
|
25332
25243
|
var require_compiler_core_cjs = __commonJS({
|
|
25333
|
-
"../../node_modules/.bun/@vue+compiler-core@3.5.
|
|
25244
|
+
"../../node_modules/.bun/@vue+compiler-core@3.5.27/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js"(exports) {
|
|
25334
25245
|
"use strict";
|
|
25335
25246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25336
25247
|
var shared = require_shared();
|
|
@@ -32219,9 +32130,9 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
|
|
|
32219
32130
|
}
|
|
32220
32131
|
});
|
|
32221
32132
|
|
|
32222
|
-
// ../../node_modules/.bun/@vue+compiler-core@3.5.
|
|
32133
|
+
// ../../node_modules/.bun/@vue+compiler-core@3.5.27/node_modules/@vue/compiler-core/index.js
|
|
32223
32134
|
var require_compiler_core = __commonJS({
|
|
32224
|
-
"../../node_modules/.bun/@vue+compiler-core@3.5.
|
|
32135
|
+
"../../node_modules/.bun/@vue+compiler-core@3.5.27/node_modules/@vue/compiler-core/index.js"(exports, module) {
|
|
32225
32136
|
"use strict";
|
|
32226
32137
|
if (process.env.NODE_ENV === "production") {
|
|
32227
32138
|
module.exports = require_compiler_core_cjs_prod();
|
|
@@ -32231,9 +32142,9 @@ var require_compiler_core = __commonJS({
|
|
|
32231
32142
|
}
|
|
32232
32143
|
});
|
|
32233
32144
|
|
|
32234
|
-
// ../../node_modules/.bun/@vue+compiler-dom@3.5.
|
|
32145
|
+
// ../../node_modules/.bun/@vue+compiler-dom@3.5.27/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js
|
|
32235
32146
|
var require_compiler_dom_cjs_prod = __commonJS({
|
|
32236
|
-
"../../node_modules/.bun/@vue+compiler-dom@3.5.
|
|
32147
|
+
"../../node_modules/.bun/@vue+compiler-dom@3.5.27/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js"(exports) {
|
|
32237
32148
|
"use strict";
|
|
32238
32149
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32239
32150
|
var compilerCore = require_compiler_core();
|
|
@@ -32906,9 +32817,9 @@ var require_compiler_dom_cjs_prod = __commonJS({
|
|
|
32906
32817
|
}
|
|
32907
32818
|
});
|
|
32908
32819
|
|
|
32909
|
-
// ../../node_modules/.bun/@vue+compiler-dom@3.5.
|
|
32820
|
+
// ../../node_modules/.bun/@vue+compiler-dom@3.5.27/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js
|
|
32910
32821
|
var require_compiler_dom_cjs = __commonJS({
|
|
32911
|
-
"../../node_modules/.bun/@vue+compiler-dom@3.5.
|
|
32822
|
+
"../../node_modules/.bun/@vue+compiler-dom@3.5.27/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js"(exports) {
|
|
32912
32823
|
"use strict";
|
|
32913
32824
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32914
32825
|
var compilerCore = require_compiler_core();
|
|
@@ -33823,9 +33734,9 @@ var require_compiler_dom_cjs = __commonJS({
|
|
|
33823
33734
|
}
|
|
33824
33735
|
});
|
|
33825
33736
|
|
|
33826
|
-
// ../../node_modules/.bun/@vue+compiler-dom@3.5.
|
|
33737
|
+
// ../../node_modules/.bun/@vue+compiler-dom@3.5.27/node_modules/@vue/compiler-dom/index.js
|
|
33827
33738
|
var require_compiler_dom = __commonJS({
|
|
33828
|
-
"../../node_modules/.bun/@vue+compiler-dom@3.5.
|
|
33739
|
+
"../../node_modules/.bun/@vue+compiler-dom@3.5.27/node_modules/@vue/compiler-dom/index.js"(exports, module) {
|
|
33829
33740
|
"use strict";
|
|
33830
33741
|
if (process.env.NODE_ENV === "production") {
|
|
33831
33742
|
module.exports = require_compiler_dom_cjs_prod();
|
|
@@ -33835,9 +33746,9 @@ var require_compiler_dom = __commonJS({
|
|
|
33835
33746
|
}
|
|
33836
33747
|
});
|
|
33837
33748
|
|
|
33838
|
-
// ../../node_modules/.bun/@vue+compiler-ssr@3.5.
|
|
33749
|
+
// ../../node_modules/.bun/@vue+compiler-ssr@3.5.27/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js
|
|
33839
33750
|
var require_compiler_ssr_cjs = __commonJS({
|
|
33840
|
-
"../../node_modules/.bun/@vue+compiler-ssr@3.5.
|
|
33751
|
+
"../../node_modules/.bun/@vue+compiler-ssr@3.5.27/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js"(exports) {
|
|
33841
33752
|
"use strict";
|
|
33842
33753
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33843
33754
|
var compilerDom = require_compiler_dom();
|
|
@@ -34774,11 +34685,11 @@ var require_compiler_ssr_cjs = __commonJS({
|
|
|
34774
34685
|
ast.codegenNode = compilerDom.createBlockStatement(context.body);
|
|
34775
34686
|
ast.ssrHelpers = Array.from(
|
|
34776
34687
|
/* @__PURE__ */ new Set([
|
|
34777
|
-
...Array.from(ast.helpers).filter((
|
|
34688
|
+
...Array.from(ast.helpers).filter((h) => h in ssrHelpers),
|
|
34778
34689
|
...context.helpers
|
|
34779
34690
|
])
|
|
34780
34691
|
);
|
|
34781
|
-
ast.helpers = new Set(Array.from(ast.helpers).filter((
|
|
34692
|
+
ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers)));
|
|
34782
34693
|
}
|
|
34783
34694
|
function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) {
|
|
34784
34695
|
const body = [];
|
|
@@ -35230,9 +35141,9 @@ var require_compiler_ssr_cjs = __commonJS({
|
|
|
35230
35141
|
}
|
|
35231
35142
|
});
|
|
35232
35143
|
|
|
35233
|
-
// ../../node_modules/.bun/@vue+server-renderer@3.5.
|
|
35144
|
+
// ../../node_modules/.bun/@vue+server-renderer@3.5.27+7a41347fad1059d7/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js
|
|
35234
35145
|
var require_server_renderer_cjs_prod = __commonJS({
|
|
35235
|
-
"../../node_modules/.bun/@vue+server-renderer@3.5.
|
|
35146
|
+
"../../node_modules/.bun/@vue+server-renderer@3.5.27+7a41347fad1059d7/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js"(exports) {
|
|
35236
35147
|
"use strict";
|
|
35237
35148
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35238
35149
|
var Vue = __require("vue");
|
|
@@ -35254,17 +35165,17 @@ var require_server_renderer_cjs_prod = __commonJS({
|
|
|
35254
35165
|
);
|
|
35255
35166
|
function ssrRenderAttrs(props, tag) {
|
|
35256
35167
|
let ret = "";
|
|
35257
|
-
for (
|
|
35258
|
-
if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value")
|
|
35168
|
+
for (let key in props) {
|
|
35169
|
+
if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value" || // force as property (not rendered in SSR)
|
|
35170
|
+
key.startsWith(".")) {
|
|
35259
35171
|
continue;
|
|
35260
35172
|
}
|
|
35261
35173
|
const value = props[key];
|
|
35262
|
-
if (key
|
|
35174
|
+
if (key.startsWith("^")) key = key.slice(1);
|
|
35175
|
+
if (key === "class" || key === "className") {
|
|
35263
35176
|
ret += ` class="${ssrRenderClass(value)}"`;
|
|
35264
35177
|
} else if (key === "style") {
|
|
35265
35178
|
ret += ` style="${ssrRenderStyle(value)}"`;
|
|
35266
|
-
} else if (key === "className") {
|
|
35267
|
-
ret += ` class="${String(value)}"`;
|
|
35268
35179
|
} else {
|
|
35269
35180
|
ret += ssrRenderDynamicAttr(key, value, tag);
|
|
35270
35181
|
}
|
|
@@ -35899,9 +35810,9 @@ var require_server_renderer_cjs_prod = __commonJS({
|
|
|
35899
35810
|
}
|
|
35900
35811
|
return ret;
|
|
35901
35812
|
}
|
|
35902
|
-
async function
|
|
35813
|
+
async function renderToString(input, context = {}) {
|
|
35903
35814
|
if (isVNode$1(input)) {
|
|
35904
|
-
return
|
|
35815
|
+
return renderToString(Vue.createApp({ render: () => input }), context);
|
|
35905
35816
|
}
|
|
35906
35817
|
const vnode = Vue.createVNode(input._component, input._props);
|
|
35907
35818
|
vnode.appContext = input._context;
|
|
@@ -36067,7 +35978,7 @@ var require_server_renderer_cjs_prod = __commonJS({
|
|
|
36067
35978
|
exports.renderToNodeStream = renderToNodeStream;
|
|
36068
35979
|
exports.renderToSimpleStream = renderToSimpleStream;
|
|
36069
35980
|
exports.renderToStream = renderToStream;
|
|
36070
|
-
exports.renderToString =
|
|
35981
|
+
exports.renderToString = renderToString;
|
|
36071
35982
|
exports.renderToWebStream = renderToWebStream;
|
|
36072
35983
|
exports.ssrGetDirectiveProps = ssrGetDirectiveProps;
|
|
36073
35984
|
exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps;
|
|
@@ -36090,9 +36001,9 @@ var require_server_renderer_cjs_prod = __commonJS({
|
|
|
36090
36001
|
}
|
|
36091
36002
|
});
|
|
36092
36003
|
|
|
36093
|
-
// ../../node_modules/.bun/@vue+server-renderer@3.5.
|
|
36004
|
+
// ../../node_modules/.bun/@vue+server-renderer@3.5.27+7a41347fad1059d7/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js
|
|
36094
36005
|
var require_server_renderer_cjs = __commonJS({
|
|
36095
|
-
"../../node_modules/.bun/@vue+server-renderer@3.5.
|
|
36006
|
+
"../../node_modules/.bun/@vue+server-renderer@3.5.27+7a41347fad1059d7/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js"(exports) {
|
|
36096
36007
|
"use strict";
|
|
36097
36008
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36098
36009
|
var Vue = __require("vue");
|
|
@@ -36114,17 +36025,17 @@ var require_server_renderer_cjs = __commonJS({
|
|
|
36114
36025
|
);
|
|
36115
36026
|
function ssrRenderAttrs(props, tag) {
|
|
36116
36027
|
let ret = "";
|
|
36117
|
-
for (
|
|
36118
|
-
if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value")
|
|
36028
|
+
for (let key in props) {
|
|
36029
|
+
if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value" || // force as property (not rendered in SSR)
|
|
36030
|
+
key.startsWith(".")) {
|
|
36119
36031
|
continue;
|
|
36120
36032
|
}
|
|
36121
36033
|
const value = props[key];
|
|
36122
|
-
if (key
|
|
36034
|
+
if (key.startsWith("^")) key = key.slice(1);
|
|
36035
|
+
if (key === "class" || key === "className") {
|
|
36123
36036
|
ret += ` class="${ssrRenderClass(value)}"`;
|
|
36124
36037
|
} else if (key === "style") {
|
|
36125
36038
|
ret += ` style="${ssrRenderStyle(value)}"`;
|
|
36126
|
-
} else if (key === "className") {
|
|
36127
|
-
ret += ` class="${String(value)}"`;
|
|
36128
36039
|
} else {
|
|
36129
36040
|
ret += ssrRenderDynamicAttr(key, value, tag);
|
|
36130
36041
|
}
|
|
@@ -36296,10 +36207,12 @@ var require_server_renderer_cjs = __commonJS({
|
|
|
36296
36207
|
function ssrInterpolate(value) {
|
|
36297
36208
|
return shared.escapeHtml(shared.toDisplayString(value));
|
|
36298
36209
|
}
|
|
36210
|
+
// @__NO_SIDE_EFFECTS__
|
|
36299
36211
|
function toRaw(observed) {
|
|
36300
36212
|
const raw = observed && observed["__v_raw"];
|
|
36301
|
-
return raw ? toRaw(raw) : observed;
|
|
36213
|
+
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
36302
36214
|
}
|
|
36215
|
+
// @__NO_SIDE_EFFECTS__
|
|
36303
36216
|
function isRef(r) {
|
|
36304
36217
|
return r ? r["__v_isRef"] === true : false;
|
|
36305
36218
|
}
|
|
@@ -36403,13 +36316,13 @@ var require_server_renderer_cjs = __commonJS({
|
|
|
36403
36316
|
return raw ? value : [`${key}=${value}`];
|
|
36404
36317
|
} else if (typeof value === "number" || typeof value === "boolean" || value == null) {
|
|
36405
36318
|
return raw ? value : [`${key}=${value}`];
|
|
36406
|
-
} else if (isRef(value)) {
|
|
36407
|
-
value = formatProp(key, toRaw(value.value), true);
|
|
36319
|
+
} else if (/* @__PURE__ */ isRef(value)) {
|
|
36320
|
+
value = formatProp(key, /* @__PURE__ */ toRaw(value.value), true);
|
|
36408
36321
|
return raw ? value : [`${key}=Ref<`, value, `>`];
|
|
36409
36322
|
} else if (shared.isFunction(value)) {
|
|
36410
36323
|
return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
|
|
36411
36324
|
} else {
|
|
36412
|
-
value = toRaw(value);
|
|
36325
|
+
value = /* @__PURE__ */ toRaw(value);
|
|
36413
36326
|
return raw ? value : [`${key}=`, value];
|
|
36414
36327
|
}
|
|
36415
36328
|
}
|
|
@@ -37025,9 +36938,9 @@ ${codeFrame}` : message);
|
|
|
37025
36938
|
}
|
|
37026
36939
|
return ret;
|
|
37027
36940
|
}
|
|
37028
|
-
async function
|
|
36941
|
+
async function renderToString(input, context = {}) {
|
|
37029
36942
|
if (isVNode$1(input)) {
|
|
37030
|
-
return
|
|
36943
|
+
return renderToString(Vue.createApp({ render: () => input }), context);
|
|
37031
36944
|
}
|
|
37032
36945
|
const vnode = Vue.createVNode(input._component, input._props);
|
|
37033
36946
|
vnode.appContext = input._context;
|
|
@@ -37193,7 +37106,7 @@ ${codeFrame}` : message);
|
|
|
37193
37106
|
exports.renderToNodeStream = renderToNodeStream;
|
|
37194
37107
|
exports.renderToSimpleStream = renderToSimpleStream;
|
|
37195
37108
|
exports.renderToStream = renderToStream;
|
|
37196
|
-
exports.renderToString =
|
|
37109
|
+
exports.renderToString = renderToString;
|
|
37197
37110
|
exports.renderToWebStream = renderToWebStream;
|
|
37198
37111
|
exports.ssrGetDirectiveProps = ssrGetDirectiveProps;
|
|
37199
37112
|
exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps;
|
|
@@ -37216,10 +37129,9 @@ ${codeFrame}` : message);
|
|
|
37216
37129
|
}
|
|
37217
37130
|
});
|
|
37218
37131
|
|
|
37219
|
-
// ../../node_modules/.bun/@vue+server-renderer@3.5.
|
|
37132
|
+
// ../../node_modules/.bun/@vue+server-renderer@3.5.27+7a41347fad1059d7/node_modules/@vue/server-renderer/index.js
|
|
37220
37133
|
var require_server_renderer = __commonJS({
|
|
37221
|
-
"../../node_modules/.bun/@vue+server-renderer@3.5.
|
|
37222
|
-
"use strict";
|
|
37134
|
+
"../../node_modules/.bun/@vue+server-renderer@3.5.27+7a41347fad1059d7/node_modules/@vue/server-renderer/index.js"(exports, module) {
|
|
37223
37135
|
if (process.env.NODE_ENV === "production") {
|
|
37224
37136
|
module.exports = require_server_renderer_cjs_prod();
|
|
37225
37137
|
} else {
|
|
@@ -37227,40 +37139,13 @@ var require_server_renderer = __commonJS({
|
|
|
37227
37139
|
}
|
|
37228
37140
|
}
|
|
37229
37141
|
});
|
|
37230
|
-
|
|
37231
|
-
// src/renderers/VueRenderer.ts
|
|
37232
|
-
var import_server_renderer = __toESM(require_server_renderer());
|
|
37233
|
-
import { createSSRApp, h } from "vue";
|
|
37234
|
-
var VueRenderer = class {
|
|
37235
|
-
constructor(component, props) {
|
|
37236
|
-
this.component = component;
|
|
37237
|
-
this.props = props;
|
|
37238
|
-
}
|
|
37239
|
-
async render(data) {
|
|
37240
|
-
const mergedProps = { ...this.props, ...data };
|
|
37241
|
-
const app = createSSRApp({
|
|
37242
|
-
render: () => h(this.component, mergedProps)
|
|
37243
|
-
});
|
|
37244
|
-
const html = await (0, import_server_renderer.renderToString)(app);
|
|
37245
|
-
const fullHtml = html.startsWith("<!DOCTYPE") ? html : `<!DOCTYPE html>${html}`;
|
|
37246
|
-
return {
|
|
37247
|
-
html: fullHtml,
|
|
37248
|
-
text: this.stripHtml(html)
|
|
37249
|
-
};
|
|
37250
|
-
}
|
|
37251
|
-
stripHtml(html) {
|
|
37252
|
-
return html.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, "").replace(/<script[^>]*>[\s\S]*?<\/script>/gi, "").replace(/<[^>]+>/g, "").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
37253
|
-
}
|
|
37254
|
-
};
|
|
37255
|
-
export {
|
|
37256
|
-
VueRenderer
|
|
37257
|
-
};
|
|
37142
|
+
export default require_server_renderer();
|
|
37258
37143
|
/*! Bundled license information:
|
|
37259
37144
|
|
|
37260
37145
|
@vue/shared/dist/shared.cjs.prod.js:
|
|
37261
37146
|
@vue/shared/dist/shared.cjs.js:
|
|
37262
37147
|
(**
|
|
37263
|
-
* @vue/shared v3.5.
|
|
37148
|
+
* @vue/shared v3.5.27
|
|
37264
37149
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
37265
37150
|
* @license MIT
|
|
37266
37151
|
**)
|
|
@@ -37268,7 +37153,7 @@ export {
|
|
|
37268
37153
|
@vue/compiler-core/dist/compiler-core.cjs.prod.js:
|
|
37269
37154
|
@vue/compiler-core/dist/compiler-core.cjs.js:
|
|
37270
37155
|
(**
|
|
37271
|
-
* @vue/compiler-core v3.5.
|
|
37156
|
+
* @vue/compiler-core v3.5.27
|
|
37272
37157
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
37273
37158
|
* @license MIT
|
|
37274
37159
|
**)
|
|
@@ -37276,14 +37161,14 @@ export {
|
|
|
37276
37161
|
@vue/compiler-dom/dist/compiler-dom.cjs.prod.js:
|
|
37277
37162
|
@vue/compiler-dom/dist/compiler-dom.cjs.js:
|
|
37278
37163
|
(**
|
|
37279
|
-
* @vue/compiler-dom v3.5.
|
|
37164
|
+
* @vue/compiler-dom v3.5.27
|
|
37280
37165
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
37281
37166
|
* @license MIT
|
|
37282
37167
|
**)
|
|
37283
37168
|
|
|
37284
37169
|
@vue/compiler-ssr/dist/compiler-ssr.cjs.js:
|
|
37285
37170
|
(**
|
|
37286
|
-
* @vue/compiler-ssr v3.5.
|
|
37171
|
+
* @vue/compiler-ssr v3.5.27
|
|
37287
37172
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
37288
37173
|
* @license MIT
|
|
37289
37174
|
**)
|
|
@@ -37291,7 +37176,7 @@ export {
|
|
|
37291
37176
|
@vue/server-renderer/dist/server-renderer.cjs.prod.js:
|
|
37292
37177
|
@vue/server-renderer/dist/server-renderer.cjs.js:
|
|
37293
37178
|
(**
|
|
37294
|
-
* @vue/server-renderer v3.5.
|
|
37179
|
+
* @vue/server-renderer v3.5.27
|
|
37295
37180
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
37296
37181
|
* @license MIT
|
|
37297
37182
|
**)
|