@danielx/civet 0.11.5 → 0.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +306 -0
  2. package/README.md +2 -7
  3. package/dist/babel-plugin.js +7 -6
  4. package/dist/babel-plugin.mjs +3 -3
  5. package/dist/browser.js +807 -540
  6. package/dist/civet +24 -18
  7. package/dist/config.js +7313 -7
  8. package/dist/config.mjs +7338 -4
  9. package/dist/esbuild-plugin.js +7 -6
  10. package/dist/esm.mjs +10 -16
  11. package/dist/main.js +1787 -895
  12. package/dist/main.mjs +1782 -891
  13. package/dist/node-worker.mjs +1 -2
  14. package/dist/ts-diagnostic.js +5 -4
  15. package/dist/ts-diagnostic.mjs +1 -1
  16. package/dist/types.d.ts +11 -2
  17. package/dist/unplugin/astro.js +8 -7
  18. package/dist/unplugin/astro.mjs +6 -4
  19. package/dist/unplugin/esbuild.d.ts +1 -1
  20. package/dist/unplugin/esbuild.js +7 -6
  21. package/dist/unplugin/esbuild.mjs +5 -3
  22. package/dist/unplugin/farm.d.ts +3 -1
  23. package/dist/unplugin/farm.js +7 -6
  24. package/dist/unplugin/farm.mjs +6 -4
  25. package/dist/unplugin/rolldown.d.ts +1 -1
  26. package/dist/unplugin/rolldown.js +7 -6
  27. package/dist/unplugin/rolldown.mjs +5 -3
  28. package/dist/unplugin/rollup.d.ts +1 -1
  29. package/dist/unplugin/rollup.js +7 -6
  30. package/dist/unplugin/rollup.mjs +5 -3
  31. package/dist/unplugin/rspack.d.ts +1 -1
  32. package/dist/unplugin/rspack.js +7 -6
  33. package/dist/unplugin/rspack.mjs +5 -3
  34. package/dist/unplugin/unplugin.d.ts +27 -3
  35. package/dist/unplugin/unplugin.js +68 -42
  36. package/dist/unplugin/unplugin.mjs +53 -30
  37. package/dist/unplugin/vite.d.ts +1 -1
  38. package/dist/unplugin/vite.js +7 -6
  39. package/dist/unplugin/vite.mjs +5 -3
  40. package/dist/unplugin/webpack.d.ts +1 -1
  41. package/dist/unplugin/webpack.js +7 -6
  42. package/dist/unplugin/webpack.mjs +5 -3
  43. package/package.json +33 -17
package/dist/browser.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var Civet = (() => {
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -34,9 +35,9 @@ var Civet = (() => {
34
35
  mod
35
36
  )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
36
37
 
37
- // node_modules/@danielx/hera/dist/machine.js
38
+ // node_modules/.pnpm/@danielx+hera@0.8.20/node_modules/@danielx/hera/dist/machine.js
38
39
  var require_machine = __commonJS({
39
- "node_modules/@danielx/hera/dist/machine.js"(exports, module) {
40
+ "node_modules/.pnpm/@danielx+hera@0.8.20/node_modules/@danielx/hera/dist/machine.js"(exports, module) {
40
41
  "use strict";
41
42
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
42
43
  for (var name in all)
@@ -57,7 +58,7 @@ var Civet = (() => {
57
58
  $N: () => $N2,
58
59
  $P: () => $P2,
59
60
  $Q: () => $Q2,
60
- $R: () => $R106,
61
+ $R: () => $R107,
61
62
  $R$0: () => $R$02,
62
63
  $S: () => $S2,
63
64
  $T: () => $T2,
@@ -90,7 +91,7 @@ var Civet = (() => {
90
91
  };
91
92
  };
92
93
  }
93
- function $R106(regExp) {
94
+ function $R107(regExp) {
94
95
  return function(_ctx, state2) {
95
96
  let { input, pos } = state2;
96
97
  regExp.lastIndex = state2.pos;
@@ -377,11 +378,15 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
377
378
 
378
379
  // source/browser-shim.civet
379
380
  function dirname(path) {
380
- return path.replace(/[^]*\//, "");
381
+ let i = path.lastIndexOf("/");
382
+ return i < 0 ? "." : i === 0 ? "/" : path.slice(0, i);
381
383
  }
382
384
  function resolve(path) {
383
385
  return path;
384
386
  }
387
+ function relative(_from, to) {
388
+ return to;
389
+ }
385
390
  function createRequire(path) {
386
391
  return (id) => {
387
392
  throw new ReferenceError(
@@ -395,37 +400,38 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
395
400
  browser_shim_default = {
396
401
  dirname,
397
402
  resolve,
403
+ relative,
398
404
  createRequire
399
405
  };
400
406
  }
401
407
  });
402
408
 
403
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\browser.civet.jsx
404
- var browser_civet_exports = {};
405
- __export(browser_civet_exports, {
409
+ // source/browser.civet
410
+ var browser_exports = {};
411
+ __export(browser_exports, {
406
412
  ParseError: () => import_lib2.ParseError,
407
413
  ParseErrors: () => ParseErrors,
408
- SourceMap: () => SourceMap2,
414
+ SourceMap: () => SourceMap,
409
415
  autoRunScripts: () => autoRunScripts,
410
416
  compile: () => compile,
411
417
  decode: () => decode,
412
- generate: () => generate_civet_default,
418
+ generate: () => generate_default,
413
419
  isCompileError: () => isCompileError,
414
- lib: () => lib_civet_exports,
420
+ lib: () => lib_exports,
415
421
  parse: () => parse,
416
422
  parseProgram: () => parseProgram,
417
423
  prune: () => prune,
418
424
  runScript: () => runScript,
419
425
  runScripts: () => runScripts,
420
- sourcemap: () => sourcemap_civet_exports
426
+ sourcemap: () => sourcemap_exports
421
427
  });
422
428
 
423
429
  // source/parser.hera
424
430
  var import_lib2 = __toESM(require_machine());
425
431
 
426
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\lib.civet.jsx
427
- var lib_civet_exports = {};
428
- __export(lib_civet_exports, {
432
+ // source/parser/lib.civet
433
+ var lib_exports = {};
434
+ __export(lib_exports, {
429
435
  addPostfixStatement: () => addPostfixStatement,
430
436
  adjustBindingElements: () => adjustBindingElements,
431
437
  adjustIndexAccess: () => adjustIndexAccess,
@@ -478,6 +484,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
478
484
  maybeRefAssignment: () => maybeRefAssignment,
479
485
  modifyString: () => modifyString,
480
486
  negateCondition: () => negateCondition,
487
+ parenthesizeExpression: () => parenthesizeExpression,
481
488
  precedenceCustomDefault: () => precedenceCustomDefault,
482
489
  precedenceStep: () => precedenceStep,
483
490
  prepend: () => prepend,
@@ -497,15 +504,18 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
497
504
  reorderBindingRestProperty: () => reorderBindingRestProperty,
498
505
  replaceNode: () => replaceNode,
499
506
  replaceNodes: () => replaceNodes,
507
+ rewriteDynamicImportCall: () => rewriteDynamicImportCall,
508
+ rewriteModuleSpecifier: () => rewriteModuleSpecifier,
500
509
  skipImplicitArguments: () => skipImplicitArguments,
501
510
  stripTrailingImplicitComma: () => stripTrailingImplicitComma,
502
511
  trimFirstSpace: () => trimFirstSpace,
503
512
  typeOfJSX: () => typeOfJSX,
513
+ typeSuffixForExpression: () => typeSuffixForExpression,
504
514
  wrapIIFE: () => wrapIIFE,
505
515
  wrapTypeInPromise: () => wrapTypeInPromise
506
516
  });
507
517
 
508
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\util.civet.jsx
518
+ // source/parser/util.civet
509
519
  function len(arr, length) {
510
520
  return arr.length === length;
511
521
  }
@@ -884,12 +894,9 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
884
894
  if (isASTNodeObject(expression)) {
885
895
  switch (expression.type) {
886
896
  case "Literal": {
887
- switch (expression.subtype) {
888
- case "NullLiteral":
889
- return;
890
- default:
891
- t = literalType(expression);
892
- }
897
+ if (expression.subtype === "NullLiteral")
898
+ return;
899
+ t = literalType(expression);
893
900
  break;
894
901
  }
895
902
  case "RegularExpressionLiteral":
@@ -1235,7 +1242,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1235
1242
  children: [...signature.children, "=>", block]
1236
1243
  });
1237
1244
  let children = [makeLeftHandSideExpression(fn), "()"];
1238
- if (fn.type === "FunctionExpression" && (gatherRecursiveWithinFunction(block, (a1) => typeof a1 == "object" && a1 != null && "token" in a1 && a1.token === "this").length && children.splice(1, 0, ".bind(this)"), gatherRecursiveWithinFunction(block, (a2) => typeof a2 == "object" && a2 != null && "token" in a2 && a2.token === "arguments").length)) {
1245
+ if (fn.type === "FunctionExpression" && (gatherRecursiveWithinFunction(block, ((a1) => typeof a1 == "object" && a1 != null && "token" in a1 && a1.token === "this")).length && children.splice(1, 0, ".bind(this)"), gatherRecursiveWithinFunction(block, ((a2) => typeof a2 == "object" && a2 != null && "token" in a2 && a2.token === "arguments")).length)) {
1239
1246
  let binding = {
1240
1247
  type: "Identifier",
1241
1248
  name: "arguments",
@@ -1286,7 +1293,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1286
1293
  return result;
1287
1294
  }
1288
1295
 
1289
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\traversal.civet.jsx
1296
+ // source/parser/traversal.civet
1290
1297
  function gatherRecursiveWithinFunction(node, predicate) {
1291
1298
  return gatherRecursive(node, predicate, isFunction);
1292
1299
  }
@@ -1360,7 +1367,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1360
1367
  return predicate(node) && nodes.push(node), nodes;
1361
1368
  }
1362
1369
 
1363
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\ref.civet.jsx
1370
+ // source/parser/ref.civet
1364
1371
  var range = (start, end) => {
1365
1372
  let length = end - start;
1366
1373
  if (length <= 0) return [];
@@ -1432,20 +1439,27 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1432
1439
  let n = 0, name = base;
1433
1440
  for (; names.has(name); )
1434
1441
  n++, name = `${base}${n}`;
1435
- names.add(name), ref.children = ref.names = [name];
1442
+ if (names.add(name), ref.$loc) {
1443
+ let loc = ref.$loc;
1444
+ delete ref.$loc, ref.children = [{ $loc: loc, token: name }], ref.names = [name];
1445
+ } else
1446
+ ref.children = ref.names = [name];
1436
1447
  }
1437
1448
  }
1438
1449
 
1439
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\binding.civet.jsx
1450
+ // source/parser/binding.civet
1440
1451
  function adjustAtBindings(statements, asThis = !1) {
1441
1452
  for (let ref1 = gatherRecursiveAll(statements, ($1) => $1.type === "AtBindingProperty"), i1 = 0, len3 = ref1.length; i1 < len3; i1++) {
1442
1453
  let binding = ref1[i1], { ref } = binding;
1443
1454
  if (asThis) {
1444
1455
  let atBinding = binding.binding;
1445
- atBinding.children.pop(), atBinding.type = void 0, binding.children.unshift(ref.id, ": this.", ref.base), binding.type = "Property", binding.ref = void 0;
1446
- return;
1447
- }
1448
- ref.names[0] !== ref.base && binding.children.unshift(ref.base, ": ");
1456
+ atBinding.children.pop(), atBinding.type = void 0;
1457
+ let atLoc = atBinding.at?.$loc, ref2;
1458
+ atLoc ? ref2 = { $loc: atLoc, token: "this." } : ref2 = "this.";
1459
+ let thisNode = ref2;
1460
+ binding.children.splice(1, 0, ref.id, ": ", thisNode, ref.base), binding.type = "Property", binding.ref = void 0;
1461
+ } else
1462
+ ref.names[0] !== ref.base && binding.children.unshift(ref.base, ": ");
1449
1463
  }
1450
1464
  }
1451
1465
  function adjustBindingElements(elements) {
@@ -1498,16 +1512,16 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1498
1512
  };
1499
1513
  }
1500
1514
  function gatherSubbindings(node, subbindings = []) {
1501
- for (let ref2 = gatherRecursiveAll(node, ($) => $.subbinding != null), i3 = 0, len22 = ref2.length; i3 < len22; i3++) {
1502
- let p = ref2[i3], { subbinding } = p;
1515
+ for (let ref3 = gatherRecursiveAll(node, ($) => $.subbinding != null), i3 = 0, len22 = ref3.length; i3 < len22; i3++) {
1516
+ let p = ref3[i3], { subbinding } = p;
1503
1517
  subbindings.push(", ", subbinding), gatherSubbindings(subbinding, subbindings);
1504
1518
  }
1505
1519
  return subbindings;
1506
1520
  }
1507
1521
  function simplifyBindingProperties(node) {
1508
1522
  let results = [];
1509
- for (let ref3 = gatherRecursiveAll(node, ($3) => $3.type === "BindingProperty"), i4 = 0, len3 = ref3.length; i4 < len3; i4++) {
1510
- let p = ref3[i4], { name, value } = p;
1523
+ for (let ref4 = gatherRecursiveAll(node, ($3) => $3.type === "BindingProperty"), i4 = 0, len3 = ref4.length; i4 < len3; i4++) {
1524
+ let p = ref4[i4], { name, value } = p;
1511
1525
  if (value?.type === "NamedBindingPattern" && value.binding === name) {
1512
1526
  let [ws] = p.children;
1513
1527
  results.push(p.children = [ws, name, p.delim]);
@@ -1520,14 +1534,19 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1520
1534
  let thisAssignments = [], splices = [];
1521
1535
  function insertRestSplices(s, p, thisAssignments2) {
1522
1536
  let m;
1523
- for (let ref4 = gatherRecursiveAll(
1537
+ for (let ref5 = gatherRecursiveAll(
1524
1538
  s,
1525
1539
  (n) => n.blockPrefix || opts?.injectParamProps && n.accessModifier || n.type === "AtBinding" || opts?.assignPins && (m = n.type, m === "PinPattern" || m === "PinProperty")
1526
- ), i5 = 0, len4 = ref4.length; i5 < len4; i5++) {
1527
- let n = ref4[i5];
1540
+ ), i5 = 0, len4 = ref5.length; i5 < len4; i5++) {
1541
+ let n = ref5[i5];
1528
1542
  if (n.type === "AtBinding") {
1529
- let { ref } = n, { id } = ref;
1530
- thisAssignments2.push([`this.${id} = `, ref]);
1543
+ let { ref, at } = n, { id } = ref, atLoc = at?.$loc;
1544
+ atLoc ? (ref.$loc = { pos: atLoc.pos + 1, length: id.length }, thisAssignments2.push([
1545
+ { $loc: atLoc, token: "this." },
1546
+ { $loc: ref.$loc, token: id },
1547
+ " = ",
1548
+ ref
1549
+ ])) : thisAssignments2.push([`this.${id} = `, ref]);
1531
1550
  continue;
1532
1551
  }
1533
1552
  if (opts?.assignPins && (n.type === "PinProperty" && (n.children = n.children.flatMap(($4) => $4 === n.name ? [n.name, ": ", n.value] : $4), updateParentPointers(n), n = n.value), n.type === "PinPattern")) {
@@ -1544,8 +1563,8 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1544
1563
  continue;
1545
1564
  }
1546
1565
  if (opts?.injectParamProps && n.type === "Parameter" && n.accessModifier) {
1547
- for (let ref5 = n.names, i6 = 0, len5 = ref5.length; i6 < len5; i6++) {
1548
- let id = ref5[i6];
1566
+ for (let ref6 = n.names, i6 = 0, len5 = ref6.length; i6 < len5; i6++) {
1567
+ let id = ref6[i6];
1549
1568
  thisAssignments2.push({
1550
1569
  type: "AssignmentExpression",
1551
1570
  children: [`this.${id} = `, id],
@@ -1561,7 +1580,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1561
1580
  return insertRestSplices(statements, splices, thisAssignments), [splices, thisAssignments];
1562
1581
  }
1563
1582
  function arrayElementHasTrailingComma(elementNode) {
1564
- let ref6, lastChild = (ref6 = elementNode.children)[ref6.length - 1];
1583
+ let ref7, lastChild = (ref7 = elementNode.children)[ref7.length - 1];
1565
1584
  return lastChild && lastChild[lastChild.length - 1]?.token === ",";
1566
1585
  }
1567
1586
  function gatherBindingPatternTypeSuffix(pattern) {
@@ -1572,8 +1591,8 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1572
1591
  case "ArrayBindingPattern": {
1573
1592
  {
1574
1593
  let results1 = [];
1575
- for (let ref7 = pattern.elements, i7 = 0, len6 = ref7.length; i7 < len6; i7++) {
1576
- let elem = ref7[i7], { typeSuffix, initializer } = elem;
1594
+ for (let ref8 = pattern.elements, i7 = 0, len6 = ref8.length; i7 < len6; i7++) {
1595
+ let elem = ref8[i7], { typeSuffix, initializer } = elem;
1577
1596
  typeSuffix ??= elem.binding?.typeSuffix, typeSuffix && count++, initializer != null && (typeSuffix ??= typeSuffixForExpression(trimFirstSpace(initializer.expression)));
1578
1597
  let typeElement = [typeSuffix?.t, elem.delim];
1579
1598
  typeSuffix?.optional && (typeElement[0] = parenthesizeType(typeElement[0]), typeElement.unshift("undefined |")), elem.type === "BindingRestElement" ? (typeElement[0] ??= "unknown[]", typeElement.unshift(elem.dots)) : typeElement[0] ??= "unknown", results1.push(typeElement);
@@ -1594,14 +1613,15 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1594
1613
  case "ObjectBindingPattern": {
1595
1614
  {
1596
1615
  let restType, results2 = [];
1597
- for (let ref8 = pattern.properties, i8 = 0, len7 = ref8.length; i8 < len7; i8++) {
1598
- let prop = ref8[i8], { typeSuffix, initializer } = prop;
1616
+ for (let ref9 = pattern.properties, i8 = 0, len7 = ref9.length; i8 < len7; i8++) {
1617
+ let prop = ref9[i8], { typeSuffix, initializer } = prop;
1599
1618
  switch (typeSuffix ??= prop.value?.typeSuffix, typeSuffix && count++, initializer != null && (typeSuffix ??= typeSuffixForExpression(trimFirstSpace(initializer.expression))), typeSuffix ??= {
1600
1619
  type: "TypeSuffix",
1601
1620
  ts: !0,
1602
1621
  children: [": unknown"]
1603
1622
  }, prop.initializer && !typeSuffix.optional && typeSuffix.children.unshift(typeSuffix.optional = "?"), prop.type) {
1604
- case "BindingProperty": {
1623
+ case "BindingProperty":
1624
+ case "PinProperty": {
1605
1625
  let ws = prop.children.slice(0, prop.children.indexOf(prop.name));
1606
1626
  results2.push([...ws, prop.name, typeSuffix, prop.delim]);
1607
1627
  break;
@@ -1634,12 +1654,12 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1634
1654
  return pattern;
1635
1655
  }
1636
1656
 
1637
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\comptime.civet.jsx
1657
+ // source/parser/comptime.civet
1638
1658
  init_browser_shim();
1639
1659
  init_browser_shim();
1640
1660
  init_browser_shim();
1641
1661
 
1642
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\helper.civet.jsx
1662
+ // source/parser/helper.civet
1643
1663
  var preludeVar = "var ";
1644
1664
  function ts(children) {
1645
1665
  return {
@@ -1975,7 +1995,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
1975
1995
  }
1976
1996
  }
1977
1997
 
1978
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\generate.civet.jsx
1998
+ // source/generate.civet
1979
1999
  function stringify(node) {
1980
2000
  try {
1981
2001
  return JSON.stringify(removeParentPointers(node));
@@ -2019,10 +2039,8 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
2019
2039
  if (!node.children) {
2020
2040
  if (node.token != null)
2021
2041
  return node.token;
2022
- switch (node.type) {
2023
- case "Ref":
2024
- throw new Error(`Unpopulated ref ${stringify(node)}`);
2025
- }
2042
+ if (node.type === "Ref")
2043
+ throw new Error(`Unpopulated ref ${stringify(node)}`);
2026
2044
  debugger;
2027
2045
  throw new Error(`Unknown node ${stringify(node)}`);
2028
2046
  }
@@ -2032,7 +2050,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
2032
2050
  throw new Error(`Unknown node ${stringify(node)}`);
2033
2051
  }
2034
2052
  }
2035
- var generate_civet_default = gen;
2053
+ var generate_default = gen;
2036
2054
  function prune(node) {
2037
2055
  if (node != null && !(typeof node == "string" && node.length === 0)) {
2038
2056
  if (node.parent != null && delete node.parent, Array.isArray(node)) {
@@ -2043,7 +2061,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
2043
2061
  }
2044
2062
  }
2045
2063
 
2046
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\comptime.civet.jsx
2064
+ // source/parser/comptime.civet
2047
2065
  function expressionizeComptime(statement) {
2048
2066
  let { expressions } = statement.block, expression = wrapIIFE(expressions, hasAwait(expressions));
2049
2067
  return makeNode({
@@ -2072,7 +2090,7 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
2072
2090
  ...extractPreludeFor(content),
2073
2091
  content
2074
2092
  ];
2075
- let options = { js: !0 }, js = generate_civet_default(prune(content), options);
2093
+ let options = { js: !0 }, js = generate_default(prune(content), options);
2076
2094
  if (js = `"use strict";${js}`, options.errors != null)
2077
2095
  return;
2078
2096
  let output, context, contextGlobal;
@@ -2277,14 +2295,14 @@ ${js}`
2277
2295
  return recurse(value);
2278
2296
  }
2279
2297
 
2280
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\function.civet.jsx
2298
+ // source/parser/function.civet
2281
2299
  var concatAssign = (lhs, rhs) => (rhs?.[Symbol.isConcatSpreadable] ?? Array.isArray(rhs) ? lhs.push.apply(lhs, rhs) : lhs.push(rhs), lhs);
2282
2300
  function getTypeArguments(args) {
2283
2301
  for (; typeof args == "object" && args != null && "args" in args; )
2284
2302
  args = args.args;
2285
2303
  if (!Array.isArray(args))
2286
2304
  throw new Error("getTypeArguments could not find relevant array");
2287
- return args.filter((a1) => typeof a1 == "object" && a1 != null && "type" in a1 && a1.type === "TypeArgument");
2305
+ return args.filter(((a1) => typeof a1 == "object" && a1 != null && "type" in a1 && a1.type === "TypeArgument"));
2288
2306
  }
2289
2307
  function isVoidType(t) {
2290
2308
  return typeof t == "object" && t != null && "type" in t && t.type === "TypeLiteral" && "t" in t && typeof t.t == "object" && t.t != null && "type" in t.t && t.t.type === "VoidType";
@@ -2332,7 +2350,9 @@ ${js}`
2332
2350
  if (followingOverloads(f).length)
2333
2351
  f.ts = !0;
2334
2352
  else {
2335
- let block = makeEmptyBlock();
2353
+ let ref1, lastChild = (ref1 = f.parameters?.children)?.[ref1.length - 1], ref2;
2354
+ Array.isArray(lastChild) ? ref2 = lastChild[lastChild.length - 1] : ref2 = lastChild;
2355
+ let block = makeEmptyBlock(ref2?.$loc);
2336
2356
  block.parent = f, f.block = block, f.children.push(block), f.ts = !1;
2337
2357
  }
2338
2358
  }
@@ -2426,9 +2446,9 @@ ${js}`
2426
2446
  block,
2427
2447
  (r) => r.type === "ReturnStatement" && !r.expression
2428
2448
  ).forEach((r) => (r.expression = ref, r.children.splice(-1, 1, " ", ref)));
2429
- let ref1;
2430
- if ((ref1 = block.children)[ref1.length - 2]?.type !== "ReturnStatement") {
2431
- let ref2, indent = getIndent((ref2 = block.expressions)[ref2.length - 1]);
2449
+ let ref3;
2450
+ if ((ref3 = block.children)[ref3.length - 2]?.type !== "ReturnStatement") {
2451
+ let ref4, indent = getIndent((ref4 = block.expressions)[ref4.length - 1]);
2432
2452
  block.expressions.push([
2433
2453
  indent,
2434
2454
  wrapWithReturn(ref, block, !indent)
@@ -2490,15 +2510,15 @@ ${js}`
2490
2510
  function recurse(pattern2) {
2491
2511
  switch (pattern2.type) {
2492
2512
  case "ArrayBindingPattern": {
2493
- for (let ref3 = pattern2.elements, i2 = 0, len12 = ref3.length; i2 < len12; i2++) {
2494
- let element = ref3[i2];
2513
+ for (let ref5 = pattern2.elements, i2 = 0, len12 = ref5.length; i2 < len12; i2++) {
2514
+ let element = ref5[i2];
2495
2515
  recurse(element);
2496
2516
  }
2497
2517
  break;
2498
2518
  }
2499
2519
  case "ObjectBindingPattern": {
2500
- for (let ref4 = pattern2.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
2501
- let property = ref4[i3];
2520
+ for (let ref6 = pattern2.properties, i3 = 0, len22 = ref6.length; i3 < len22; i3++) {
2521
+ let property = ref6[i3];
2502
2522
  recurse(property);
2503
2523
  }
2504
2524
  break;
@@ -2528,15 +2548,15 @@ ${js}`
2528
2548
  switch (node.type) {
2529
2549
  case "BlockStatement": {
2530
2550
  if (node.expressions.length) {
2531
- let ref5;
2532
- assignResults((ref5 = node.expressions)[ref5.length - 1], collect);
2551
+ let ref7;
2552
+ assignResults((ref7 = node.expressions)[ref7.length - 1], collect);
2533
2553
  } else
2534
2554
  node.expressions.push(["", collect("void 0"), ";"]), updateParentPointers(node);
2535
2555
  return;
2536
2556
  }
2537
2557
  case "CaseBlock": {
2538
- for (let ref6 = node.clauses, i4 = 0, len3 = ref6.length; i4 < len3; i4++) {
2539
- let clause = ref6[i4];
2558
+ for (let ref8 = node.clauses, i4 = 0, len3 = ref8.length; i4 < len3; i4++) {
2559
+ let clause = ref8[i4];
2540
2560
  assignResults(clause, collect);
2541
2561
  }
2542
2562
  return;
@@ -2556,7 +2576,7 @@ ${js}`
2556
2576
  exp = exp;
2557
2577
  let outer = exp;
2558
2578
  exp.type === "LabelledStatement" && (exp = exp.statement);
2559
- let ref7, ref8, m1;
2579
+ let ref9, m1;
2560
2580
  switch (exp.type) {
2561
2581
  case "BreakStatement":
2562
2582
  case "ContinueStatement":
@@ -2566,9 +2586,13 @@ ${js}`
2566
2586
  case "ThrowStatement":
2567
2587
  return;
2568
2588
  case "Declaration": {
2569
- let ref9;
2570
- exp.bindings?.length ? ref9 = patternAsValue((ref7 = exp.bindings)[ref7.length - 1].pattern) : ref9 = "void 0";
2571
- let value = ref9;
2589
+ let ref10;
2590
+ if (exp.bindings?.length) {
2591
+ let ref11;
2592
+ ref10 = patternAsValue((ref11 = exp.bindings)[ref11.length - 1].pattern);
2593
+ } else
2594
+ ref10 = "void 0";
2595
+ let value = ref10;
2572
2596
  exp.children.push([
2573
2597
  "",
2574
2598
  [";", collect(value)]
@@ -2595,7 +2619,7 @@ ${js}`
2595
2619
  case "BlockStatement": {
2596
2620
  if (exp.expressions.some(isExit))
2597
2621
  return;
2598
- assignResults((ref8 = exp.expressions)[ref8.length - 1], collect);
2622
+ assignResults((ref9 = exp.expressions)[ref9.length - 1], collect);
2599
2623
  return;
2600
2624
  }
2601
2625
  case "IfStatement": {
@@ -2607,15 +2631,15 @@ ${js}`
2607
2631
  return;
2608
2632
  }
2609
2633
  case "SwitchStatement": {
2610
- for (let ref10 = exp.caseBlock.clauses, i5 = 0, len4 = ref10.length; i5 < len4; i5++) {
2611
- let clause = ref10[i5];
2634
+ for (let ref12 = exp.caseBlock.clauses, i5 = 0, len4 = ref12.length; i5 < len4; i5++) {
2635
+ let clause = ref12[i5];
2612
2636
  assignResults(clause, collect);
2613
2637
  }
2614
2638
  return;
2615
2639
  }
2616
2640
  case "TryStatement": {
2617
- for (let ref11 = exp.blocks, i6 = 0, len5 = ref11.length; i6 < len5; i6++) {
2618
- let block = ref11[i6];
2641
+ for (let ref13 = exp.blocks, i6 = 0, len5 = ref13.length; i6 < len5; i6++) {
2642
+ let block = ref13[i6];
2619
2643
  assignResults(block, collect);
2620
2644
  }
2621
2645
  return;
@@ -2658,9 +2682,9 @@ ${js}`
2658
2682
  assert.notEqual(breakIndex, -1, "Could not find break in when clause"), node.children.splice(breakIndex, 1), node.break = void 0;
2659
2683
  }
2660
2684
  if (insertReturn(node.block), !isExit(node.block)) {
2661
- let comment = hasTrailingComment(node.block.expressions), ref12;
2685
+ let comment = hasTrailingComment(node.block.expressions), ref14;
2662
2686
  node.block.expressions.push([
2663
- comment ? (ref12 = node.block.expressions)[ref12.length - 1][0] || `
2687
+ comment ? (ref14 = node.block.expressions)[ref14.length - 1][0] || `
2664
2688
  ` : "",
2665
2689
  wrapWithReturn(void 0, node, !comment)
2666
2690
  ]);
@@ -2678,7 +2702,7 @@ ${js}`
2678
2702
  return;
2679
2703
  let outer = exp;
2680
2704
  exp.type === "LabelledStatement" && (exp = exp.statement);
2681
- let ref13, m3;
2705
+ let m3;
2682
2706
  switch (exp.type) {
2683
2707
  case "BreakStatement":
2684
2708
  case "ContinueStatement":
@@ -2688,9 +2712,13 @@ ${js}`
2688
2712
  case "ThrowStatement":
2689
2713
  return;
2690
2714
  case "Declaration": {
2691
- let ref14;
2692
- exp.bindings?.length ? ref14 = [" ", patternAsValue((ref13 = exp.bindings)[ref13.length - 1].pattern)] : ref14 = [];
2693
- let value = ref14, parent = outer.parent, index = findChildIndex(parent?.expressions, outer);
2715
+ let ref15;
2716
+ if (exp.bindings?.length) {
2717
+ let ref16;
2718
+ ref15 = [" ", patternAsValue((ref16 = exp.bindings)[ref16.length - 1].pattern)];
2719
+ } else
2720
+ ref15 = [];
2721
+ let value = ref15, parent = outer.parent, index = findChildIndex(parent?.expressions, outer);
2694
2722
  assert.notEqual(index, -1, "Could not find declaration in parent"), parent.expressions.splice(index + 1, 0, [
2695
2723
  "",
2696
2724
  {
@@ -2741,15 +2769,15 @@ ${js}`
2741
2769
  return;
2742
2770
  }
2743
2771
  case "SwitchStatement": {
2744
- for (let ref15 = exp.caseBlock.clauses, i7 = 0, len6 = ref15.length; i7 < len6; i7++) {
2745
- let clause = ref15[i7];
2772
+ for (let ref17 = exp.caseBlock.clauses, i7 = 0, len6 = ref17.length; i7 < len6; i7++) {
2773
+ let clause = ref17[i7];
2746
2774
  insertReturn(clause);
2747
2775
  }
2748
2776
  return;
2749
2777
  }
2750
2778
  case "TryStatement": {
2751
- for (let ref16 = exp.blocks, i8 = 0, len7 = ref16.length; i8 < len7; i8++) {
2752
- let block = ref16[i8];
2779
+ for (let ref18 = exp.blocks, i8 = 0, len7 = ref18.length; i8 < len7; i8++) {
2780
+ let block = ref18[i8];
2753
2781
  insertReturn(block);
2754
2782
  }
2755
2783
  return;
@@ -2927,8 +2955,8 @@ ${js}`
2927
2955
  return !1;
2928
2956
  let reduction = statement.type === "ForStatement" && statement.reduction;
2929
2957
  function fillBlock(expression) {
2930
- let ref17, m5;
2931
- return m5 = (ref17 = block.expressions)[ref17.length - 1], Array.isArray(m5) && m5.length >= 2 && typeof m5[1] == "object" && m5[1] != null && "type" in m5[1] && m5[1].type === "EmptyStatement" && "implicit" in m5[1] && m5[1].implicit === !0 && block.expressions.pop(), block.expressions.push(expression), block.empty = !1, braceBlock(block);
2958
+ let ref19, m5;
2959
+ return m5 = (ref19 = block.expressions)[ref19.length - 1], Array.isArray(m5) && m5.length >= 2 && typeof m5[1] == "object" && m5[1] != null && "type" in m5[1] && m5[1].type === "EmptyStatement" && "implicit" in m5[1] && m5[1].implicit === !0 && block.expressions.pop(), block.expressions.push(expression), block.empty = !1, braceBlock(block);
2932
2960
  }
2933
2961
  if (reduction)
2934
2962
  switch (reduction.subtype) {
@@ -2974,8 +3002,8 @@ ${js}`
2974
3002
  function append2(p) {
2975
3003
  (rest ? after : before).push(p);
2976
3004
  }
2977
- for (let ref18 = parameters.parameters, i9 = 0, len8 = ref18.length; i9 < len8; i9++) {
2978
- let param = ref18[i9];
3005
+ for (let ref20 = parameters.parameters, i9 = 0, len8 = ref20.length; i9 < len8; i9++) {
3006
+ let param = ref20[i9];
2979
3007
  switch (param.type) {
2980
3008
  case "ThisType": {
2981
3009
  if (tt)
@@ -2984,7 +3012,7 @@ ${js}`
2984
3012
  message: "Only one typed this parameter is allowed"
2985
3013
  }), append2(param);
2986
3014
  else if (tt = trimFirstSpace(param), before.length || rest) {
2987
- let ref19, delim = (ref19 = tt.children)[ref19.length - 1];
3015
+ let ref21, delim = (ref21 = tt.children)[ref21.length - 1];
2988
3016
  Array.isArray(delim) && (delim = delim[delim.length - 1]), typeof delim == "object" && delim != null && "token" in delim && delim.token === "," || (tt = {
2989
3017
  ...tt,
2990
3018
  children: [...tt.children, ", "]
@@ -3014,7 +3042,7 @@ ${js}`
3014
3042
  let names = after.flatMap(($8) => $8.names), elements = after.map((p) => p.type === "Error" ? p : {
3015
3043
  ...p,
3016
3044
  // omit individual argument types from output
3017
- children: p.children.filter((a2) => a2 !== p.typeSuffix),
3045
+ children: p.children.filter(((a2) => a2 !== p.typeSuffix)),
3018
3046
  type: "BindingElement"
3019
3047
  }), pattern = gatherBindingPatternTypeSuffix(makeNode({
3020
3048
  type: "ArrayBindingPattern",
@@ -3036,7 +3064,7 @@ ${js}`
3036
3064
  names
3037
3065
  });
3038
3066
  if (rest.typeSuffix) {
3039
- let optionalType = function(typeSuffix3, fallback) {
3067
+ let optionalType2 = function(typeSuffix3, fallback) {
3040
3068
  let t2 = typeSuffix3?.t ?? fallback;
3041
3069
  return typeSuffix3?.optional ? [
3042
3070
  t2,
@@ -3045,7 +3073,9 @@ ${js}`
3045
3073
  message: "Optional parameter not allowed in/after rest parameter"
3046
3074
  }
3047
3075
  ] : t2;
3048
- }, ref = makeRef("rest"), restRef = [
3076
+ };
3077
+ var optionalType = optionalType2;
3078
+ let ref = makeRef("rest"), restRef = [
3049
3079
  { children: [ref], ts: !0 },
3050
3080
  { children: [restIdentifier], js: !0 }
3051
3081
  ];
@@ -3065,10 +3095,10 @@ ${js}`
3065
3095
  children: [ref],
3066
3096
  ts: !0
3067
3097
  });
3068
- let oldSuffix = rest.typeSuffix, colon = oldSuffix.colon ?? ": ", afterTypes = after.flatMap((p) => [",", optionalType(p.typeSuffix, " unknown")]), t = [
3098
+ let oldSuffix = rest.typeSuffix, colon = oldSuffix.colon ?? ": ", afterTypes = after.flatMap((p) => [",", optionalType2(p.typeSuffix, " unknown")]), t = [
3069
3099
  "[",
3070
3100
  "...",
3071
- optionalType(oldSuffix, "unknown[]"),
3101
+ optionalType2(oldSuffix, "unknown[]"),
3072
3102
  ...afterTypes,
3073
3103
  "]"
3074
3104
  ], typeSuffix2 = makeNode({
@@ -3107,14 +3137,14 @@ ${js}`
3107
3137
  if (simplifyBindingProperties(parameters.parameters), simplifyBindingProperties(subbindings), isConstructor) {
3108
3138
  let { ancestor } = findAncestor(f, ($10) => $10.type === "ClassExpression");
3109
3139
  if (ancestor != null) {
3110
- let fields = new Set(gatherRecursiveWithinFunction(ancestor, ($11) => $11.type === "FieldDefinition").map(($12) => $12.id).filter((a3) => typeof a3 == "object" && a3 != null && "type" in a3 && a3.type === "Identifier").map(($13) => $13.name)), classExpressions = ancestor.body.expressions, index2 = findChildIndex(classExpressions, f);
3140
+ let fields = new Set(gatherRecursiveWithinFunction(ancestor, ($11) => $11.type === "FieldDefinition").map(($12) => $12.id).filter(((a3) => typeof a3 == "object" && a3 != null && "type" in a3 && a3.type === "Identifier")).map(($13) => $13.name)), classExpressions = ancestor.body.expressions, index2 = findChildIndex(classExpressions, f);
3111
3141
  assert.notEqual(index2, -1, "Could not find constructor in class"), index2 -= precedingOverloads(f).length;
3112
3142
  let fStatement = classExpressions[index2];
3113
- for (let ref20 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i10 = 0, len9 = ref20.length; i10 < len9; i10++) {
3114
- let parameter = ref20[i10], { accessModifier } = parameter;
3143
+ for (let ref22 = gatherRecursive(parameters, ($14) => $14.type === "Parameter"), i10 = 0, len9 = ref22.length; i10 < len9; i10++) {
3144
+ let parameter = ref22[i10], { accessModifier } = parameter;
3115
3145
  if (accessModifier || parameter.typeSuffix)
3116
- for (let ref21 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i11 = 0, len10 = ref21.length; i11 < len10; i11++) {
3117
- let binding = ref21[i11], typeSuffix = binding.parent?.typeSuffix;
3146
+ for (let ref23 = gatherRecursive(parameter, ($15) => $15.type === "AtBinding"), i11 = 0, len10 = ref23.length; i11 < len10; i11++) {
3147
+ let binding = ref23[i11], typeSuffix = binding.parent?.typeSuffix;
3118
3148
  if (!(accessModifier || typeSuffix))
3119
3149
  continue;
3120
3150
  parameter.accessModifier && (replaceNode(parameter.accessModifier, void 0), parameter.accessModifier = void 0);
@@ -3140,8 +3170,8 @@ ${js}`
3140
3170
  bindings: [],
3141
3171
  decl: "const"
3142
3172
  }));
3143
- for (let ref22 = splices, i12 = 0, len11 = ref22.length; i12 < len11; i12++) {
3144
- let binding = ref22[i12];
3173
+ for (let ref24 = splices, i12 = 0, len11 = ref24.length; i12 < len11; i12++) {
3174
+ let binding = ref24[i12];
3145
3175
  assert.equal(binding.type, "PostRestBindingElements", "splice should be of type Binding"), prefix.push(makeNode({
3146
3176
  type: "Declaration",
3147
3177
  children: ["let ", binding],
@@ -3163,10 +3193,10 @@ ${js}`
3163
3193
  function findSuperCall(block) {
3164
3194
  let { expressions } = block, superCalls = gatherNodes(
3165
3195
  expressions,
3166
- (a4) => typeof a4 == "object" && a4 != null && "type" in a4 && a4.type === "CallExpression" && "children" in a4 && Array.isArray(a4.children) && a4.children.length >= 1 && typeof a4.children[0] == "object" && a4.children[0] != null && "token" in a4.children[0] && a4.children[0].token === "super"
3196
+ ((a4) => typeof a4 == "object" && a4 != null && "type" in a4 && a4.type === "CallExpression" && "children" in a4 && Array.isArray(a4.children) && a4.children.length >= 1 && typeof a4.children[0] == "object" && a4.children[0] != null && "token" in a4.children[0] && a4.children[0].token === "super")
3167
3197
  );
3168
3198
  if (superCalls.length) {
3169
- let { child } = findAncestor(superCalls[0], (a5) => a5 === block), index = findChildIndex(expressions, child);
3199
+ let { child } = findAncestor(superCalls[0], ((a5) => a5 === block)), index = findChildIndex(expressions, child);
3170
3200
  if (index < 0)
3171
3201
  throw new Error("Could not find super call within top-level expressions");
3172
3202
  return index;
@@ -3179,8 +3209,8 @@ ${js}`
3179
3209
  if (f.async != null)
3180
3210
  addAsync = !0;
3181
3211
  else
3182
- for (let ref23 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "Await"), i13 = 0, len12 = ref23.length; i13 < len12; i13++) {
3183
- let a = ref23[i13], i = findChildIndex(a.parent, a);
3212
+ for (let ref25 = gatherRecursiveWithinFunction(block, ($17) => $17.type === "Await"), i13 = 0, len12 = ref25.length; i13 < len12; i13++) {
3213
+ let a = ref25[i13], i = findChildIndex(a.parent, a);
3184
3214
  a.parent.children.splice(i + 1, 0, {
3185
3215
  type: "Error",
3186
3216
  message: `await invalid in ${signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
@@ -3190,15 +3220,15 @@ ${js}`
3190
3220
  if (f.generator != null)
3191
3221
  addGenerator = !0;
3192
3222
  else
3193
- for (let ref24 = gatherRecursiveWithinFunction(block, ($18) => $18.type === "YieldExpression"), i14 = 0, len13 = ref24.length; i14 < len13; i14++) {
3194
- let y = ref24[i14], i = y.children.findIndex(($19) => $19.type === "Yield");
3223
+ for (let ref26 = gatherRecursiveWithinFunction(block, ($18) => $18.type === "YieldExpression"), i14 = 0, len13 = ref26.length; i14 < len13; i14++) {
3224
+ let y = ref26[i14], i = y.children.findIndex(($19) => $19.type === "Yield");
3195
3225
  y.children.splice(i + 1, 0, {
3196
3226
  type: "Error",
3197
3227
  message: `yield invalid in ${f.type === "ArrowFunction" ? "=> arrow function" : signature.modifier.get ? "getter" : signature.modifier.set ? "setter" : signature.name}`
3198
3228
  });
3199
3229
  }
3200
- for (let ref25 = [f, ...precedingOverloads(f)], i15 = 0, len14 = ref25.length; i15 < len14; i15++) {
3201
- let overload = ref25[i15];
3230
+ for (let ref27 = [f, ...precedingOverloads(f)], i15 = 0, len14 = ref27.length; i15 < len14; i15++) {
3231
+ let overload = ref27[i15];
3202
3232
  addAsync && overload.async != null && !overload.async.length && (overload.async.push("async "), overload.signature.modifier.async = !0), addGenerator && overload.generator != null && !overload.generator.length && (overload.generator.push("*"), overload.signature.modifier.generator = !0), overload.signature.modifier.async && !overload.signature.modifier.generator && overload.signature.returnType && !isPromiseType(overload.signature.returnType.t) && replaceNode(
3203
3233
  overload.signature.returnType.t,
3204
3234
  wrapTypeInPromise(overload.signature.returnType.t),
@@ -3207,8 +3237,8 @@ ${js}`
3207
3237
  }
3208
3238
  }
3209
3239
  function processFunctions(statements, config2) {
3210
- for (let ref26 = gatherRecursiveAll(statements, ($20) => $20.type === "FunctionExpression" || $20.type === "ArrowFunction" || $20.type === "MethodDefinition"), i16 = 0, len15 = ref26.length; i16 < len15; i16++) {
3211
- let f = ref26[i16];
3240
+ for (let ref28 = gatherRecursiveAll(statements, ($20) => $20.type === "FunctionExpression" || $20.type === "ArrowFunction" || $20.type === "MethodDefinition"), i16 = 0, len15 = ref28.length; i16 < len15; i16++) {
3241
+ let f = ref28[i16];
3212
3242
  (f.type === "FunctionExpression" || f.type === "MethodDefinition") && implicitFunctionBlock(f), processSignature(f), processParams(f), processReturn(f, config2.implicitReturns);
3213
3243
  }
3214
3244
  }
@@ -3255,17 +3285,17 @@ ${js}`
3255
3285
  }
3256
3286
  let done;
3257
3287
  if (!async) {
3258
- let ref27;
3259
- if ((ref27 = blockContainingStatement(exp)) && typeof ref27 == "object" && "block" in ref27 && "index" in ref27) {
3260
- let { block: parentBlock, index } = ref27;
3288
+ let ref29;
3289
+ if ((ref29 = blockContainingStatement(exp)) && typeof ref29 == "object" && "block" in ref29 && "index" in ref29) {
3290
+ let { block: parentBlock, index } = ref29;
3261
3291
  statements[0][0] = parentBlock.expressions[index][0], parentBlock.expressions.splice(index, index + 1 - index, ...statements), updateParentPointers(parentBlock), braceBlock(parentBlock), done = !0;
3262
3292
  }
3263
3293
  }
3264
3294
  done || (generator || (statements[statements.length - 1][1] = wrapWithReturn(statements[statements.length - 1][1])), children.splice(i, 1, wrapIIFE(statements, async, generator)), updateParentPointers(exp));
3265
3295
  }
3266
3296
  function processIterationExpressions(statements) {
3267
- for (let ref28 = gatherRecursiveAll(statements, ($21) => $21.type === "IterationExpression"), i17 = 0, len16 = ref28.length; i17 < len16; i17++) {
3268
- let s = ref28[i17];
3297
+ for (let ref30 = gatherRecursiveAll(statements, ($21) => $21.type === "IterationExpression"), i17 = 0, len16 = ref30.length; i17 < len16; i17++) {
3298
+ let s = ref30[i17];
3269
3299
  expressionizeIteration(s);
3270
3300
  }
3271
3301
  }
@@ -3284,17 +3314,17 @@ ${js}`
3284
3314
  for (let i18 = 0, len17 = parameterList.length; i18 < len17; i18++) {
3285
3315
  let parameter = parameterList[i18];
3286
3316
  if (typeof parameter == "object" && parameter != null && "type" in parameter && parameter.type === "Parameter") {
3287
- let ref29;
3288
- if (ref29 = parameter.initializer) {
3289
- let initializer = ref29;
3317
+ let ref31;
3318
+ if (ref31 = parameter.initializer) {
3319
+ let initializer = ref31;
3290
3320
  args.push(initializer.expression, parameter.delim), parameter = {
3291
3321
  ...parameter,
3292
3322
  initializer: void 0,
3293
- children: parameter.children.filter((a6) => a6 !== initializer)
3323
+ children: parameter.children.filter(((a6) => a6 !== initializer))
3294
3324
  };
3295
3325
  } else
3296
3326
  args.push(parameter.children.filter(
3297
- (a7) => a7 !== parameter.typeSuffix
3327
+ ((a7) => a7 !== parameter.typeSuffix)
3298
3328
  ));
3299
3329
  }
3300
3330
  results3.push(parameter);
@@ -3356,11 +3386,11 @@ ${js}`
3356
3386
  });
3357
3387
  return isStatement(body) && (braceBlock(block), fn.ampersandBlock = !1), gatherRecursiveWithinFunction(
3358
3388
  block,
3359
- (a8) => a8 === ref
3389
+ ((a8) => a8 === ref)
3360
3390
  ).length > 1 && (fn.ampersandBlock = !1), fn;
3361
3391
  }
3362
3392
 
3363
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\block.civet.jsx
3393
+ // source/parser/block.civet
3364
3394
  function blockWithPrefix(prefixStatements, block) {
3365
3395
  if (prefixStatements && prefixStatements.length) {
3366
3396
  let expressions = [...prefixStatements, ...block.expressions];
@@ -3396,12 +3426,14 @@ ${js}`
3396
3426
  function bracedBlock(block) {
3397
3427
  return block = duplicateBlock(block), braceBlock(block), block;
3398
3428
  }
3399
- function makeEmptyBlock() {
3400
- let expressions = [];
3401
- return {
3429
+ function makeEmptyBlock(loc) {
3430
+ let expressions = [], ref1;
3431
+ loc ? ref1 = { $loc: loc, token: "{" } : ref1 = "{";
3432
+ let open = ref1, ref2;
3433
+ return loc ? ref2 = { $loc: { pos: loc.pos + loc.length, length: 0 }, token: "}" } : ref2 = "}", {
3402
3434
  type: "BlockStatement",
3403
3435
  expressions,
3404
- children: ["{", expressions, "}"],
3436
+ children: [open, expressions, ref2],
3405
3437
  bare: !1,
3406
3438
  empty: !0
3407
3439
  };
@@ -3450,8 +3482,8 @@ ${js}`
3450
3482
  }
3451
3483
  function processBlocks(statements) {
3452
3484
  insertSemicolon(statements);
3453
- for (let ref1 = gatherRecursive(statements, ($) => $.type === "BlockStatement"), i2 = 0, len12 = ref1.length; i2 < len12; i2++) {
3454
- let block = ref1[i2], m1;
3485
+ for (let ref3 = gatherRecursive(statements, ($) => $.type === "BlockStatement"), i2 = 0, len12 = ref3.length; i2 < len12; i2++) {
3486
+ let block = ref3[i2], m1;
3455
3487
  if (block.unwrapObject && block.expressions.length === 1 && (m1 = block.expressions[0][1], typeof m1 == "object" && m1 != null && "type" in m1 && m1.type === "ParenthesizedExpression" && "implicit" in m1 && m1.implicit === !0 && "expression" in m1 && typeof m1.expression == "object" && m1.expression != null && "type" in m1.expression && m1.expression.type === "ObjectExpression")) {
3456
3488
  let object = block.expressions[0][1].expression;
3457
3489
  if (!(() => {
@@ -3465,8 +3497,8 @@ ${js}`
3465
3497
  })())
3466
3498
  continue;
3467
3499
  block.expressions[0][1] = block.expressions[0][1].expression, unbraceBlock(block);
3468
- for (let ref2 = object.properties, i3 = 0, len22 = ref2.length; i3 < len22; i3++) {
3469
- let i = i3, prop = ref2[i3], m2;
3500
+ for (let ref4 = object.properties, i3 = 0, len22 = ref4.length; i3 < len22; i3++) {
3501
+ let i = i3, prop = ref4[i3], m2;
3470
3502
  m2 = prop.name, typeof m2 == "object" && m2 != null && "type" in m2 && m2.type === "ComputedPropertyName" && "implicit" in m2 && m2.implicit === !0 && replaceNode(prop.name, prop.name.expression, prop), prop.delim?.implicit && (needsPrecedingSemicolon(object.properties[i + 1]) ? prop.delim.token = ";" : (replaceNode(prop.delim, void 0, prop), prop.delim = void 0));
3471
3503
  let colon = prop.children.indexOf(": ");
3472
3504
  colon < 0 || prop.children[colon - 1] === prop.name && prop.children.splice(colon - 1, 2);
@@ -3533,7 +3565,7 @@ ${js}`
3533
3565
  };
3534
3566
  }
3535
3567
 
3536
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\op.civet.jsx
3568
+ // source/parser/op.civet
3537
3569
  var precedenceOrder = [
3538
3570
  ["||", "??"],
3539
3571
  ["^^"],
@@ -3590,7 +3622,7 @@ ${js}`
3590
3622
  for (; i < expandedOps.length; ) {
3591
3623
  let op = expandedOps[i];
3592
3624
  if (op.special) {
3593
- let advanceLeft = function(allowEqual) {
3625
+ let advanceLeft2 = function(allowEqual) {
3594
3626
  for (; start >= 4; ) {
3595
3627
  let prevPrec = getPrecedence(expandedOps[start - 2]);
3596
3628
  if (!(prevPrec > prec || allowEqual && prevPrec === prec))
@@ -3598,7 +3630,7 @@ ${js}`
3598
3630
  start -= 4;
3599
3631
  }
3600
3632
  return !1;
3601
- }, advanceRight = function(allowEqual) {
3633
+ }, advanceRight2 = function(allowEqual) {
3602
3634
  for (; end + 4 < expandedOps.length; ) {
3603
3635
  let nextPrec = getPrecedence(expandedOps[end + 2]);
3604
3636
  if (!(nextPrec > prec || allowEqual && nextPrec === prec))
@@ -3606,29 +3638,31 @@ ${js}`
3606
3638
  end += 4;
3607
3639
  }
3608
3640
  return !1;
3609
- }, start = i - 2, end = i + 2, prec = getPrecedence(op), error;
3641
+ };
3642
+ var advanceLeft = advanceLeft2, advanceRight = advanceRight2;
3643
+ let start = i - 2, end = i + 2, prec = getPrecedence(op), error;
3610
3644
  switch (op.assoc) {
3611
3645
  case "left":
3612
3646
  case void 0: {
3613
- advanceLeft(!0), advanceRight(!1);
3647
+ advanceLeft2(!0), advanceRight2(!1);
3614
3648
  break;
3615
3649
  }
3616
3650
  case "right": {
3617
- advanceLeft(!1), advanceRight(!0);
3651
+ advanceLeft2(!1), advanceRight2(!0);
3618
3652
  break;
3619
3653
  }
3620
3654
  case "non": {
3621
- (advanceLeft(!1) || advanceRight(!1)) && (error = {
3655
+ (advanceLeft2(!1) || advanceRight2(!1)) && (error = {
3622
3656
  type: "Error",
3623
3657
  message: `non-associative operator ${op.token} used at same precedence level without parenthesization`
3624
3658
  });
3625
3659
  break;
3626
3660
  }
3627
3661
  case "arguments": {
3628
- advanceLeft(!1) && (error = {
3662
+ advanceLeft2(!1) && (error = {
3629
3663
  type: "Error",
3630
3664
  message: `arguments operator ${op.token} used at same precedence level as ${expandedOps[start - 2].token} to the left`
3631
- }), advanceRight(!0);
3665
+ }), advanceRight2(!0);
3632
3666
  break;
3633
3667
  }
3634
3668
  default:
@@ -3733,7 +3767,7 @@ ${js}`
3733
3767
  }
3734
3768
  }
3735
3769
 
3736
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\pattern-matching.civet.jsx
3770
+ // source/parser/pattern-matching.civet
3737
3771
  function processPatternTest(lhs, patterns) {
3738
3772
  let { ref, refAssignmentComma } = maybeRefAssignment(lhs, "m"), conditionExpression = flatJoin(patterns.map(($1) => getPatternConditions($1, ref)).map(($2) => flatJoin($2, " && ")), " || ");
3739
3773
  return makeLeftHandSideExpression(makeNode({
@@ -3934,7 +3968,9 @@ ${js}`
3934
3968
  break;
3935
3969
  }
3936
3970
  }
3937
- let [splices, thisAssignments] = gatherBindingCode(pattern), patternBindings2 = nonMatcherBindings(pattern), subbindings = gatherSubbindings(patternBindings2);
3971
+ let [splices, thisAssignments] = gatherBindingCode(pattern), patternBindings2 = nonMatcherBindings(pattern);
3972
+ "typeSuffix" in patternBindings2 && (typeSuffix = patternBindings2.typeSuffix);
3973
+ let subbindings = gatherSubbindings(patternBindings2);
3938
3974
  simplifyBindingProperties(patternBindings2), simplifyBindingProperties(subbindings), splices = splices.flatMap((s) => [", ", nonMatcherBindings(s)]), thisAssignments = thisAssignments.map(($7) => ["", $7, ";"]);
3939
3975
  let duplicateDeclarations = aggregateDuplicateBindings([patternBindings2, splices, subbindings]), blockPrefix = [];
3940
3976
  if (ref || subbindings.length || splices.length) {
@@ -4046,25 +4082,31 @@ ${js}`
4046
4082
  switch (pattern.type) {
4047
4083
  case "ArrayBindingPattern":
4048
4084
  case "PostRestBindingElements": {
4049
- let elements = elideMatchersFromArrayBindings(pattern.elements);
4050
- return makeNode({
4085
+ let elements = elideMatchersFromArrayBindings(pattern.elements), node = makeNode({
4051
4086
  ...pattern,
4052
4087
  elements,
4053
4088
  children: pattern.children.map(($9) => $9 === pattern.elements ? elements : $9)
4054
- });
4089
+ }), typePattern = {
4090
+ ...node,
4091
+ typeSuffix: void 0,
4092
+ elements: elements.filter((element) => element?.type != null)
4093
+ };
4094
+ return node.typeSuffix = gatherBindingPatternTypeSuffix(typePattern).typeSuffix, node;
4055
4095
  }
4056
4096
  case "ObjectBindingPattern": {
4057
4097
  let properties = elideMatchersFromPropertyBindings(pattern.properties);
4058
- return makeNode({
4098
+ return gatherBindingPatternTypeSuffix(makeNode({
4059
4099
  ...pattern,
4100
+ typeSuffix: void 0,
4060
4101
  properties,
4061
4102
  children: pattern.children.map(($10) => $10 === pattern.properties ? properties : $10)
4062
- });
4103
+ }));
4063
4104
  }
4064
4105
  case "NamedBindingPattern": {
4065
4106
  let bindings = nonMatcherBindings(pattern.pattern);
4066
4107
  return makeNode({
4067
4108
  ...pattern,
4109
+ typeSuffix: bindings?.typeSuffix,
4068
4110
  subbinding: (m2 = bindings?.type, m2 === "ArrayBindingPattern" || m2 === "ObjectBindingPattern" || m2 === "Identifier" ? [bindings, " = ", pattern.binding] : void 0)
4069
4111
  });
4070
4112
  }
@@ -4137,7 +4179,7 @@ ${js}`
4137
4179
  }
4138
4180
  }
4139
4181
 
4140
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\declaration.civet.jsx
4182
+ // source/parser/declaration.civet
4141
4183
  function len2(arr, length) {
4142
4184
  return arr.length === length;
4143
4185
  }
@@ -4367,7 +4409,7 @@ ${js}`
4367
4409
  case "IfStatement": {
4368
4410
  if (ref4 = s.else?.block) {
4369
4411
  let elseBlock = ref4;
4370
- elseBlock.bare && !elseBlock.semicolon && elseBlock.children.push(elseBlock.semicolon = ";"), ancestor.expressions.splice(index + 1 + blockPrefix.length, 0, ["", elseBlock]), s.children = s.children.filter((a1) => a1 !== s.else), s.else = void 0;
4412
+ elseBlock.bare && !elseBlock.semicolon && elseBlock.children.push(elseBlock.semicolon = ";"), ancestor.expressions.splice(index + 1 + blockPrefix.length, 0, ["", elseBlock]), s.children = s.children.filter(((a1) => a1 !== s.else)), s.else = void 0;
4371
4413
  }
4372
4414
  let block = s.then;
4373
4415
  block.bare && !block.semicolon && block.children.push(block.semicolon = ";");
@@ -4401,7 +4443,7 @@ ${js}`
4401
4443
  let { ref: ref2, statementDeclaration } = condition.expression;
4402
4444
  if (!blockPrefix)
4403
4445
  return;
4404
- if (replaceNode(s.condition, parenthesizeExpression(ref2), s), !statementDeclaration) {
4446
+ if (replaceNode(s.condition, parenthesizeExpression(ref2), s), !statementDeclaration && condition.expression.hoistDec) {
4405
4447
  let declStatement = ["", [{
4406
4448
  type: "Declaration",
4407
4449
  children: ["let ", ...condition.expression.children]
@@ -4409,7 +4451,7 @@ ${js}`
4409
4451
  blockPrefix.unshift(declStatement);
4410
4452
  }
4411
4453
  let block = blockWithPrefix(blockPrefix, makeEmptyBlock());
4412
- updateParentPointers(block, s.parent), replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.parent = block;
4454
+ updateParentPointers(block, s.parent), s.parent?.type === "StatementExpression" ? replaceNode(s, block, s.parent) : replaceBlockExpression(s.parent, s, block), block.expressions.push(["", s]), s.parent = block;
4413
4455
  break;
4414
4456
  }
4415
4457
  }
@@ -4419,7 +4461,7 @@ ${js}`
4419
4461
  let ref5;
4420
4462
  if (ref5 = from[from.length - 1]?.assertion) {
4421
4463
  let assert2 = ref5, ref6;
4422
- ref6 = from[from.length - 1], ref6.children = ref6.children.filter((a2) => a2 !== assert2), from.push(", {", assert2.keyword, ":", assert2.object, "}");
4464
+ ref6 = from[from.length - 1], ref6.children = ref6.children.filter(((a2) => a2 !== assert2)), from.push(", {", assert2.keyword, ":", assert2.object, "}");
4423
4465
  }
4424
4466
  return ["(", ...from, ")"];
4425
4467
  }
@@ -4563,7 +4605,7 @@ ${js}`
4563
4605
  return [extendsToken, insertTrimmingSpace(ws, " "), wrapped];
4564
4606
  }
4565
4607
 
4566
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\unary.civet.jsx
4608
+ // source/parser/unary.civet
4567
4609
  function processUnaryExpression(pre, exp, post) {
4568
4610
  if (!(pre.length || post))
4569
4611
  return exp;
@@ -4674,7 +4716,7 @@ ${js}`
4674
4716
  return processUnaryExpression(pre, args, post);
4675
4717
  }
4676
4718
 
4677
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\pipe.civet.jsx
4719
+ // source/parser/pipe.civet
4678
4720
  function constructInvocation(fn, arg) {
4679
4721
  let expr = fn.expr;
4680
4722
  for (; expr.type === "ParenthesizedExpression"; )
@@ -4691,12 +4733,7 @@ ${js}`
4691
4733
  let lhs = expr;
4692
4734
  lhs.type !== "NewExpression" && (lhs = makeLeftHandSideExpression(lhs));
4693
4735
  let comment = skipIfOnlyWS(fn.trailingComment);
4694
- switch (comment && lhs.children.push(comment), comment = skipIfOnlyWS(fn.leadingComment), comment && lhs.children.splice(1, 0, comment), arg.type) {
4695
- case "CommaExpression": {
4696
- arg = makeLeftHandSideExpression(arg);
4697
- break;
4698
- }
4699
- }
4736
+ comment && lhs.children.push(comment), comment = skipIfOnlyWS(fn.leadingComment), comment && lhs.children.splice(1, 0, comment), arg.type === "CommaExpression" && (arg = makeLeftHandSideExpression(arg));
4700
4737
  let args = [arg], call = {
4701
4738
  type: "Call",
4702
4739
  args,
@@ -4835,7 +4872,7 @@ ${js}`
4835
4872
  }
4836
4873
  }
4837
4874
 
4838
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\for.civet.jsx
4875
+ // source/parser/for.civet
4839
4876
  function processRangeExpression(start, ws1, range2, end) {
4840
4877
  ws1 = [ws1, range2.children[0]];
4841
4878
  let ws2 = range2.children[1], comma = { $loc: range2.$loc, token: "," }, ref;
@@ -5158,7 +5195,7 @@ ${js}`
5158
5195
  };
5159
5196
  }
5160
5197
 
5161
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\auto-dec.civet.jsx
5198
+ // source/parser/auto-dec.civet
5162
5199
  var concatAssign2 = (lhs, rhs) => (rhs?.[Symbol.isConcatSpreadable] ?? Array.isArray(rhs) ? lhs.push.apply(lhs, rhs) : lhs.push(rhs), lhs);
5163
5200
  function findDecs(statements) {
5164
5201
  let declarationNames = gatherNodes(statements, ($) => $.type === "Declaration").flatMap(($1) => $1.names), globals = getConfig().globals || [];
@@ -5246,7 +5283,7 @@ ${js}`
5246
5283
  scopes.pop();
5247
5284
  }
5248
5285
 
5249
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\string.civet.jsx
5286
+ // source/parser/string.civet
5250
5287
  function getIndentLevel(str, tab) {
5251
5288
  if (tab != null && tab != 1) {
5252
5289
  let tabs = str.match(/\t/g), numTabs = tabs ? tabs.length : 0;
@@ -5356,7 +5393,7 @@ ${js}`
5356
5393
  return JSON.stringify(str);
5357
5394
  }
5358
5395
 
5359
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\parser\lib.civet.jsx
5396
+ // source/parser/lib.civet
5360
5397
  var xor = (a, b) => a ? !b && a : b;
5361
5398
  function len1(arr, length) {
5362
5399
  return arr.length === length;
@@ -5383,6 +5420,47 @@ ${js}`
5383
5420
  (node) => ({ ...node, token: "[" })
5384
5421
  ), dot);
5385
5422
  }
5423
+ function rewriteModuleSpecifier(module) {
5424
+ switch (module.type) {
5425
+ case "Literal": {
5426
+ if (module.subtype !== "StringLiteral")
5427
+ return module;
5428
+ let child = module.children[0], rewritten = rewriteModuleSpecifier(child);
5429
+ return rewritten === child ? module : {
5430
+ ...module,
5431
+ raw: rewritten.token,
5432
+ children: module.children.map(($3) => $3 === child ? rewritten : $3)
5433
+ };
5434
+ }
5435
+ }
5436
+ let { token } = module, config2 = getConfig();
5437
+ return config2.rewriteTsImports && (token = token.replace(/\.([mc])?ts(['"])$/, ".$1js$2")), config2.rewriteCivetImports && (token = token.replace(
5438
+ /\.civet(['"])$/,
5439
+ `${config2.rewriteCivetImports.replace(/\$/g, "$$")}$1`
5440
+ )), token === module.token ? module : { ...module, token, input: module.token };
5441
+ }
5442
+ function rewriteDynamicImportCall(call) {
5443
+ let i = call.args.findIndex((arg) => !isWhitespaceOrEmpty(arg) && !isComma(arg));
5444
+ if (i < 0)
5445
+ return call;
5446
+ let firstArg = call.args[i], target = firstArg?.type === "Argument" ? firstArg.expression : firstArg;
5447
+ if (target?.type !== "Literal")
5448
+ return call;
5449
+ let rewrittenArg = rewriteModuleSpecifier(target);
5450
+ if (rewrittenArg === target)
5451
+ return call;
5452
+ firstArg?.type === "Argument" && (rewrittenArg = {
5453
+ ...firstArg,
5454
+ expression: rewrittenArg,
5455
+ children: firstArg.children.map(($4) => $4 === firstArg.expression ? rewrittenArg : $4)
5456
+ });
5457
+ let args = call.args.slice(0);
5458
+ return args[i] = rewrittenArg, {
5459
+ ...call,
5460
+ args,
5461
+ children: call.children.map(($5) => $5 === call.args ? args : $5)
5462
+ };
5463
+ }
5386
5464
  function negateCondition(condition) {
5387
5465
  let { expression } = condition, children = condition.children.slice(), i = children.indexOf(expression);
5388
5466
  if (i < 0)
@@ -5480,7 +5558,7 @@ ${js}`
5480
5558
  }
5481
5559
  function processTryBlock($0) {
5482
5560
  let [t, , b, cs, e, f] = $0, c, m;
5483
- if (cs.some(($3) => (m = $3.binding?.parameter, typeof m == "object" && m != null && "type" in m && m.type === "CatchPattern"))) {
5561
+ if (cs.some(($6) => (m = $6.binding?.parameter, typeof m == "object" && m != null && "type" in m && m.type === "CatchPattern"))) {
5484
5562
  let ref = makeRef("e"), binding = {
5485
5563
  type: "CatchBinding",
5486
5564
  children: ["(", ref, ")"],
@@ -6019,6 +6097,21 @@ ${js}`
6019
6097
  }
6020
6098
  function processBindingPatternLHS(lhs, tail) {
6021
6099
  adjustAtBindings(lhs, !0);
6100
+ for (let ref8 = gatherRecursiveAll(lhs, ($7) => $7.type === "AtBinding"), i5 = 0, len4 = ref8.length; i5 < len4; i5++) {
6101
+ let atBinding = ref8[i5], { ref } = atBinding, thisExpr = ["this.", ref.id];
6102
+ atBinding.type = void 0, atBinding.children = thisExpr;
6103
+ for (let ref9 = gatherRecursiveAll(lhs, (n) => n.blockPrefix), i6 = 0, len5 = ref9.length; i6 < len5; i6++) {
6104
+ let nodeWithPrefix = ref9[i6], { blockPrefix } = nodeWithPrefix;
6105
+ blockPrefix.children = blockPrefix.children.map((c) => c === ref ? thisExpr : c);
6106
+ }
6107
+ }
6108
+ for (let ref10 = gatherRecursiveAll(lhs, (n) => n.blockPrefix), i7 = 0, len6 = ref10.length; i7 < len6; i7++) {
6109
+ let nodeWithPrefix = ref10[i7], { blockPrefix } = nodeWithPrefix;
6110
+ for (let ref11 = gatherRecursiveAll(blockPrefix, ($8) => $8.type === "AtBinding"), i8 = 0, len7 = ref11.length; i8 < len7; i8++) {
6111
+ let atBinding = ref11[i8];
6112
+ atBinding.type = void 0, atBinding.children = ["this.", atBinding.ref.id];
6113
+ }
6114
+ }
6022
6115
  let [splices, thisAssignments] = gatherBindingCode(lhs), subbindings = gatherSubbindings(lhs);
6023
6116
  simplifyBindingProperties(lhs), simplifyBindingProperties(subbindings), tail.push(
6024
6117
  ...splices.map((s) => [", ", s]),
@@ -6027,40 +6120,42 @@ ${js}`
6027
6120
  );
6028
6121
  }
6029
6122
  function processAssignments(statements) {
6030
- for (let ref8 = gatherRecursiveAll(statements, ($4) => $4.type === "AssignmentExpression" || $4.type === "UpdateExpression"), i5 = 0, len4 = ref8.length; i5 < len4; i5++) {
6031
- let extractAssignment = function(lhs) {
6123
+ for (let ref12 = gatherRecursiveAll(statements, ($9) => $9.type === "AssignmentExpression" || $9.type === "UpdateExpression"), i9 = 0, len8 = ref12.length; i9 < len8; i9++) {
6124
+ let extractAssignment2 = function(lhs) {
6032
6125
  let expr = lhs;
6033
6126
  for (; expr.type === "ParenthesizedExpression"; )
6034
6127
  expr = expr.expression;
6035
6128
  let m1;
6036
6129
  if (m1 = expr.type, m1 === "AssignmentExpression" || m1 === "UpdateExpression")
6037
6130
  return expr.type === "UpdateExpression" && expr.children[0] === expr.assigned ? (pre.push("("), post.push([", ", lhs, ")"])) : (pre.push(["(", lhs, ", "]), post.push(")")), expr.assigned;
6038
- }, exp = ref8[i5];
6131
+ };
6132
+ var extractAssignment = extractAssignment2;
6133
+ let exp = ref12[i9];
6039
6134
  checkValidLHS(exp.assigned);
6040
- let pre = [], post = [], ref9;
6135
+ let pre = [], post = [], ref13;
6041
6136
  switch (exp.type) {
6042
6137
  case "AssignmentExpression": {
6043
6138
  if (!exp.lhs)
6044
6139
  continue;
6045
- for (let ref10 = exp.lhs, i6 = 0, len5 = ref10.length; i6 < len5; i6++) {
6046
- let lhsPart = ref10[i6], ref11;
6047
- if (ref11 = extractAssignment(lhsPart[1])) {
6048
- let newLhs = ref11;
6140
+ for (let ref14 = exp.lhs, i10 = 0, len9 = ref14.length; i10 < len9; i10++) {
6141
+ let lhsPart = ref14[i10], ref15;
6142
+ if (ref15 = extractAssignment2(lhsPart[1])) {
6143
+ let newLhs = ref15;
6049
6144
  lhsPart[1] = newLhs;
6050
6145
  }
6051
6146
  }
6052
6147
  break;
6053
6148
  }
6054
6149
  case "UpdateExpression": {
6055
- if (ref9 = extractAssignment(exp.assigned)) {
6056
- let newLhs = ref9, i = exp.children.indexOf(exp.assigned);
6150
+ if (ref13 = extractAssignment2(exp.assigned)) {
6151
+ let newLhs = ref13, i = exp.children.indexOf(exp.assigned);
6057
6152
  exp.assigned = exp.children[i] = newLhs;
6058
6153
  }
6059
6154
  break;
6060
6155
  }
6061
6156
  }
6062
6157
  if (pre.length && exp.children.unshift(...pre), post.length && exp.children.push(...post), exp.type === "UpdateExpression") {
6063
- let { assigned } = exp, ref = makeRef(), newMemberExp = unchainOptionalMemberExpression(assigned, ref, (children) => exp.children.map(($5) => $5 === assigned ? children : $5));
6158
+ let { assigned } = exp, ref = makeRef(), newMemberExp = unchainOptionalMemberExpression(assigned, ref, (children) => exp.children.map(($10) => $10 === assigned ? children : $10));
6064
6159
  newMemberExp !== assigned && (newMemberExp.usesRef && (newMemberExp.hoistDec = {
6065
6160
  type: "Declaration",
6066
6161
  children: ["let ", ref],
@@ -6068,22 +6163,22 @@ ${js}`
6068
6163
  }), replaceNode(exp, newMemberExp));
6069
6164
  }
6070
6165
  }
6071
- for (let ref12 = gatherRecursiveAll(statements, ($6) => $6.type === "AssignmentExpression"), i7 = 0, len6 = ref12.length; i7 < len6; i7++) {
6072
- let exp = ref12[i7];
6166
+ for (let ref16 = gatherRecursiveAll(statements, ($11) => $11.type === "AssignmentExpression"), i11 = 0, len10 = ref16.length; i11 < len10; i11++) {
6167
+ let exp = ref16[i11];
6073
6168
  if (exp.names !== null)
6074
6169
  continue;
6075
- let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length, ref13, ref14;
6076
- if (blockContainingStatement(exp) && !(ref13 = $1[$1.length - 1])?.[ref13.length - 1]?.special && !isShortCircuitOp((ref14 = $1[$1.length - 1])?.[ref14.length - 1])) {
6077
- let ref15;
6078
- if (ref15 = prependStatementExpressionBlock(
6170
+ let { lhs: $1, expression: $2 } = exp, tail = [], len3 = $1.length, ref17, ref18;
6171
+ if (blockContainingStatement(exp) && !(ref17 = $1[$1.length - 1])?.[ref17.length - 1]?.special && !isShortCircuitOp((ref18 = $1[$1.length - 1])?.[ref18.length - 1])) {
6172
+ let ref19;
6173
+ if (ref19 = prependStatementExpressionBlock(
6079
6174
  { type: "Initializer", expression: $2, children: [void 0, void 0, $2] },
6080
6175
  exp
6081
6176
  )) {
6082
- let ref = ref15;
6177
+ let ref = ref19;
6083
6178
  replaceNode($2, ref, exp), $2 = ref;
6084
6179
  }
6085
6180
  }
6086
- if ($1.some(($7) => $7[$7.length - 1].special)) {
6181
+ if ($1.some(($12) => $12[$12.length - 1].special)) {
6087
6182
  if ($1.length !== 1) throw new Error("Only one assignment with id= is allowed");
6088
6183
  let [, lhs, , op] = $1[0], { call, omitLhs } = op, index = exp.children.indexOf($2);
6089
6184
  if (index < 0) throw new Error("Assertion error: exp not in AssignmentExpression");
@@ -6096,13 +6191,13 @@ ${js}`
6096
6191
  continue;
6097
6192
  }
6098
6193
  }
6099
- let wrapped = !1, i = 0;
6194
+ let wrapped = !1, insideParens = exp.parent?.type === "ParenthesizedExpression", i = 0;
6100
6195
  for (; i < len3; ) {
6101
6196
  let lastAssignment = $1[i++], [, lhs, , op] = lastAssignment;
6102
6197
  if (op.token !== "=")
6103
6198
  continue;
6104
6199
  let m2;
6105
- m2 = lhs.type, (m2 === "ObjectExpression" || m2 === "ObjectBindingPattern") && (wrapped || (wrapped = !0, lhs.children.splice(0, 0, "("), tail.push(")")));
6200
+ m2 = lhs.type, (m2 === "ObjectExpression" || m2 === "ObjectBindingPattern") && (wrapped || insideParens || (wrapped = !0, lhs.children.splice(0, 0, "("), tail.push(")")));
6106
6201
  }
6107
6202
  let refsToDeclare = /* @__PURE__ */ new Set();
6108
6203
  for (i = len3 - 1; i >= 0; ) {
@@ -6124,7 +6219,7 @@ ${js}`
6124
6219
  message: "Slice range cannot be decreasing in assignment"
6125
6220
  });
6126
6221
  break;
6127
- } else m3 = lhs.type, (m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern" || m3 === "NamedBindingPattern") && (processBindingPatternLHS(lhs, tail), gatherRecursiveAll(lhs, ($8) => $8.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare)));
6222
+ } else m3 = lhs.type, (m3 === "ObjectBindingPattern" || m3 === "ArrayBindingPattern" || m3 === "NamedBindingPattern") && (processBindingPatternLHS(lhs, tail), gatherRecursiveAll(lhs, ($13) => $13.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare)));
6128
6223
  }
6129
6224
  i--;
6130
6225
  }
@@ -6145,7 +6240,7 @@ ${js}`
6145
6240
  }
6146
6241
  i--;
6147
6242
  }
6148
- if (refsToDeclare.size && (exp.hoistDec ? exp.hoistDec.children.push([...refsToDeclare].map(($9) => [",", $9])) : exp.hoistDec = {
6243
+ if (refsToDeclare.size && (exp.hoistDec ? exp.hoistDec.children.push([...refsToDeclare].map(($14) => [",", $14])) : exp.hoistDec = {
6149
6244
  type: "Declaration",
6150
6245
  children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
6151
6246
  names: []
@@ -6180,9 +6275,9 @@ ${js}`
6180
6275
  }
6181
6276
  j++;
6182
6277
  }
6183
- let ref16;
6184
- if (ref16 = conditions.length) {
6185
- let l = ref16, cs = flatJoin(conditions, " && ");
6278
+ let ref20;
6279
+ if (ref20 = conditions.length) {
6280
+ let l = ref20, cs = flatJoin(conditions, " && ");
6186
6281
  return {
6187
6282
  ...exp,
6188
6283
  children: [...cs, " ? ", innerExp(children), " : void 0"],
@@ -6214,8 +6309,8 @@ ${js}`
6214
6309
  }
6215
6310
  function processTypes(node) {
6216
6311
  let results1 = [];
6217
- for (let ref17 = gatherRecursiveAll(node, ($10) => $10.type === "TypeUnary"), i8 = 0, len7 = ref17.length; i8 < len7; i8++) {
6218
- let unary = ref17[i8], suffixIndex = unary.suffix.length - 1, results2 = [];
6312
+ for (let ref21 = gatherRecursiveAll(node, ($15) => $15.type === "TypeUnary"), i12 = 0, len11 = ref21.length; i12 < len11; i12++) {
6313
+ let unary = ref21[i12], suffixIndex = unary.suffix.length - 1, results2 = [];
6219
6314
  for (; suffixIndex >= 0; ) {
6220
6315
  let suffix = unary.suffix[suffixIndex];
6221
6316
  if (typeof suffix == "object" && suffix != null && "token" in suffix && suffix.token === "?") {
@@ -6226,7 +6321,7 @@ ${js}`
6226
6321
  for (; m5 = unary.suffix[suffixIndex], typeof m5 == "object" && m5 != null && "type" in m5 && m5.type === "NonNullAssertion"; )
6227
6322
  unary.suffix.splice(suffixIndex--, 1);
6228
6323
  let { parent, prefix } = unary;
6229
- unary.prefix = [], unary.children = unary.children.filter((a1) => a1 !== prefix);
6324
+ unary.prefix = [], unary.children = unary.children.filter(((a1) => a1 !== prefix));
6230
6325
  let outer = unary.suffix.splice(suffixIndex + 1, 1 / 0), space = getTrimmingSpace(unary), replace;
6231
6326
  if (unary.parent?.type === "TypeElement" && !unary.parent.name) {
6232
6327
  if (count === 1) {
@@ -6273,12 +6368,12 @@ ${js}`
6273
6368
  for (; m7 = unary.suffix[suffixIndex], typeof m7 == "object" && m7 != null && "token" in m7 && m7.token === "?"; )
6274
6369
  unary.suffix.splice(suffixIndex--, 1);
6275
6370
  let { parent, prefix } = unary;
6276
- unary.prefix = [], unary.children = unary.children.filter((a2) => a2 !== prefix);
6371
+ unary.prefix = [], unary.children = unary.children.filter(((a2) => a2 !== prefix));
6277
6372
  let outer = unary.suffix.splice(suffixIndex + 1, 1 / 0), space = getTrimmingSpace(unary);
6278
6373
  inplaceInsertTrimmingSpace(unary, "");
6279
- let ref18;
6280
- unary.suffix.length ? ref18 = unary : ref18 = unary.t;
6281
- let t = ref18, argArray = [makeNode({
6374
+ let ref22;
6375
+ unary.suffix.length ? ref22 = unary : ref22 = unary.t;
6376
+ let t = ref22, argArray = [makeNode({
6282
6377
  type: "TypeArgument",
6283
6378
  ts: !0,
6284
6379
  t,
@@ -6314,16 +6409,16 @@ ${js}`
6314
6409
  return results1;
6315
6410
  }
6316
6411
  function processStatementExpressions(statements) {
6317
- for (let ref19 = gatherRecursiveAll(statements, ($11) => $11.type === "StatementExpression"), i9 = 0, len8 = ref19.length; i9 < len8; i9++) {
6318
- let exp = ref19[i9], { maybe, statement } = exp;
6412
+ for (let ref23 = gatherRecursiveAll(statements, ($16) => $16.type === "StatementExpression"), i13 = 0, len12 = ref23.length; i13 < len12; i13++) {
6413
+ let exp = ref23[i13], { maybe, statement } = exp;
6319
6414
  if ((maybe || statement.type === "ThrowStatement") && blockContainingStatement(exp)) {
6320
6415
  replaceNode(exp, statement);
6321
6416
  continue;
6322
6417
  }
6323
- let ref20;
6418
+ let ref24;
6324
6419
  switch (statement.type) {
6325
6420
  case "IfStatement": {
6326
- (ref20 = expressionizeIfStatement(statement)) ? replaceNode(statement, ref20, exp) : replaceNode(statement, wrapIIFE([["", statement]]), exp);
6421
+ (ref24 = expressionizeIfStatement(statement)) ? replaceNode(statement, ref24, exp) : replaceNode(statement, wrapIIFE([["", statement]]), exp);
6327
6422
  break;
6328
6423
  }
6329
6424
  case "IterationExpression": {
@@ -6364,11 +6459,11 @@ ${js}`
6364
6459
  });
6365
6460
  }
6366
6461
  function processFinallyClauses(statements) {
6367
- for (let ref21 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i10 = 0, len9 = ref21.length; i10 < len9; i10++) {
6368
- let f = ref21[i10], ref22;
6369
- if (!((ref22 = blockContainingStatement(f)) && typeof ref22 == "object" && "block" in ref22 && "index" in ref22))
6462
+ for (let ref25 = gatherRecursiveAll(statements, ($) => $.type === "FinallyClause" && $.parent?.type !== "TryStatement"), i14 = 0, len13 = ref25.length; i14 < len13; i14++) {
6463
+ let f = ref25[i14], ref26;
6464
+ if (!((ref26 = blockContainingStatement(f)) && typeof ref26 == "object" && "block" in ref26 && "index" in ref26))
6370
6465
  throw new Error("finally clause must be inside try statement or block");
6371
- let { block, index } = ref22, indent = block.expressions[index][0], expressions = block.expressions.slice(index + 1), t = makeNode({
6466
+ let { block, index } = ref26, indent = block.expressions[index][0], expressions = block.expressions.slice(index + 1), t = makeNode({
6372
6467
  type: "BlockStatement",
6373
6468
  expressions,
6374
6469
  children: ["{", expressions, "}"],
@@ -6428,9 +6523,9 @@ ${js}`
6428
6523
  }
6429
6524
  }
6430
6525
  function processCoffeeClasses(statements) {
6431
- for (let ref23 = gatherRecursiveAll(statements, ($12) => $12.type === "ClassExpression"), i11 = 0, len10 = ref23.length; i11 < len10; i11++) {
6432
- let ce = ref23[i11], { expressions } = ce.body, indent = expressions[0]?.[0] ?? `
6433
- `, autoBinds = expressions.filter(($13) => $13[1]?.autoBind);
6526
+ for (let ref27 = gatherRecursiveAll(statements, ($17) => $17.type === "ClassExpression"), i15 = 0, len14 = ref27.length; i15 < len14; i15++) {
6527
+ let ce = ref27[i15], { expressions } = ce.body, indent = expressions[0]?.[0] ?? `
6528
+ `, autoBinds = expressions.filter(($18) => $18[1]?.autoBind);
6434
6529
  if (autoBinds.length) {
6435
6530
  let construct;
6436
6531
  for (let [, c] of expressions)
@@ -6466,30 +6561,30 @@ ${js}`
6466
6561
  0,
6467
6562
  ...(() => {
6468
6563
  let results3 = [];
6469
- for (let i12 = 0, len11 = autoBinds.length; i12 < len11; i12++) {
6470
- let [, a] = autoBinds[i12];
6564
+ for (let i16 = 0, len15 = autoBinds.length; i16 < len15; i16++) {
6565
+ let [, a] = autoBinds[i16];
6471
6566
  results3.push([indent, ["this.", a.name, " = this.", a.name, ".bind(this)"], ";"]);
6472
6567
  }
6473
6568
  return results3;
6474
6569
  })()
6475
6570
  );
6476
6571
  }
6477
- let public_static_function_assignments = expressions.filter(($14) => $14[1]?.type === "CoffeeClassPublic" && $14[1].assignment?.expression?.type === "FunctionExpression").map(($15) => $15[1].assignment);
6572
+ let public_static_function_assignments = expressions.filter(($19) => $19[1]?.type === "CoffeeClassPublic" && $19[1].assignment?.expression?.type === "FunctionExpression").map(($20) => $20[1].assignment);
6478
6573
  for (let public_static_function_assignment of public_static_function_assignments) {
6479
6574
  let id = public_static_function_assignment.lhs[0][1];
6480
6575
  replaceNode(public_static_function_assignment, convertFunctionToMethod(id, public_static_function_assignment.expression));
6481
6576
  }
6482
- let public_static_arrow_function_assignments = expressions.filter(($16) => $16[1]?.type === "CoffeeClassPublic" && $16[1].assignment?.expression?.type === "ArrowFunction").map(($17) => $17[1].assignment);
6577
+ let public_static_arrow_function_assignments = expressions.filter(($21) => $21[1]?.type === "CoffeeClassPublic" && $21[1].assignment?.expression?.type === "ArrowFunction").map(($22) => $22[1].assignment);
6483
6578
  for (let public_static_arrow_function_assignment of public_static_arrow_function_assignments) {
6484
6579
  let id = public_static_arrow_function_assignment.lhs[0][1];
6485
6580
  replaceNode(public_static_arrow_function_assignment, convertArrowFunctionToMethod(id, public_static_arrow_function_assignment.expression));
6486
6581
  }
6487
- let privates = expressions.filter(($18) => $18[1]?.type === "CoffeeClassPrivate");
6582
+ let privates = expressions.filter(($23) => $23[1]?.type === "CoffeeClassPrivate");
6488
6583
  if (!privates.length)
6489
6584
  continue;
6490
6585
  let { parent } = ce;
6491
- for (let i13 = expressions.length + -1; i13 >= 0; --i13) {
6492
- let i = i13;
6586
+ for (let i17 = expressions.length + -1; i17 >= 0; --i17) {
6587
+ let i = i17;
6493
6588
  expressions[i][1]?.type === "CoffeeClassPrivate" && expressions.splice(i, 1);
6494
6589
  }
6495
6590
  let wrapped = wrapIIFE([
@@ -6521,31 +6616,31 @@ ${js}`
6521
6616
  root.expressions,
6522
6617
  root.topLevelAwait,
6523
6618
  root.topLevelYield ? "*" : void 0
6524
- ), statements = [["", rootIIFE]], root.children = root.children.map(($19) => $19 === root.expressions ? statements : $19), root.expressions = statements), hoistRefDecs(statements), processFunctions(statements, config2), config2.coffeeClasses && processCoffeeClasses(statements), statements.unshift(...extractPreludeFor(statements)), config2.autoLet ? createConstLetDecs(statements, [], "let") : config2.autoConst ? createConstLetDecs(statements, [], "const") : config2.autoVar && createVarDecs(root, []), config2.repl && processRepl(root, rootIIFE), processBlocks(statements), populateRefs(statements), adjustAtBindings(statements), getSync() && processComptime(statements);
6619
+ ), statements = [["", rootIIFE]], root.children = root.children.map(($24) => $24 === root.expressions ? statements : $24), root.expressions = statements), hoistRefDecs(statements), processFunctions(statements, config2), config2.coffeeClasses && processCoffeeClasses(statements), statements.unshift(...extractPreludeFor(statements)), config2.autoLet ? createConstLetDecs(statements, [], "let") : config2.autoConst ? createConstLetDecs(statements, [], "const") : config2.autoVar && createVarDecs(root, []), config2.repl && processRepl(root, rootIIFE), processBlocks(statements), populateRefs(statements), adjustAtBindings(statements), getSync() && processComptime(statements);
6525
6620
  }
6526
6621
  async function processProgramAsync(root) {
6527
6622
  let { expressions: statements } = root;
6528
6623
  await processComptime(statements);
6529
6624
  }
6530
6625
  function processRepl(root, rootIIFE) {
6531
- let topBlock = gatherRecursive(rootIIFE, ($20) => $20.type === "BlockStatement")[0], i = 0;
6532
- for (let ref24 = gatherRecursiveWithinFunction(topBlock, ($21) => $21.type === "Declaration"), i14 = 0, len12 = ref24.length; i14 < len12; i14++) {
6533
- let decl = ref24[i14];
6626
+ let topBlock = gatherRecursive(rootIIFE, ($25) => $25.type === "BlockStatement")[0], i = 0;
6627
+ for (let ref28 = gatherRecursiveWithinFunction(topBlock, ($26) => $26.type === "Declaration"), i18 = 0, len16 = ref28.length; i18 < len16; i18++) {
6628
+ let decl = ref28[i18];
6534
6629
  decl.names?.length && (decl.parent === topBlock || decl.decl === "var") && (decl.children.shift(), decl.bindings[0]?.pattern?.type === "ObjectBindingPattern" && (decl.children.unshift("("), decl.children.push(")")), root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]));
6535
6630
  }
6536
- for (let ref25 = gatherRecursive(topBlock, ($22) => $22.type === "FunctionExpression"), i15 = 0, len13 = ref25.length; i15 < len13; i15++) {
6537
- let func = ref25[i15];
6631
+ for (let ref29 = gatherRecursive(topBlock, ($27) => $27.type === "FunctionExpression"), i19 = 0, len17 = ref29.length; i19 < len17; i19++) {
6632
+ let func = ref29[i19];
6538
6633
  func.name && func.parent?.type === "BlockStatement" && (func.parent === topBlock ? (replaceNode(func, void 0), root.expressions.splice(i++, 0, ["", func]), func.parent = root) : (func.children.unshift(func.name, "="), root.expressions.splice(i++, 0, ["", `var ${func.name}`, ";"])));
6539
6634
  }
6540
- for (let ref26 = gatherRecursiveWithinFunction(topBlock, ($23) => $23.type === "ClassExpression"), i16 = 0, len14 = ref26.length; i16 < len14; i16++) {
6541
- let classExp = ref26[i16], m8;
6635
+ for (let ref30 = gatherRecursiveWithinFunction(topBlock, ($28) => $28.type === "ClassExpression"), i20 = 0, len18 = ref30.length; i20 < len18; i20++) {
6636
+ let classExp = ref30[i20], m8;
6542
6637
  (classExp.name && classExp.parent === topBlock || (m8 = classExp.parent, typeof m8 == "object" && m8 != null && "type" in m8 && m8.type === "ReturnStatement" && "parent" in m8 && m8.parent === topBlock)) && (classExp.children.unshift(classExp.name, "="), root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]));
6543
6638
  }
6544
6639
  }
6545
6640
  function processPlaceholders(statements) {
6546
6641
  let placeholderMap = /* @__PURE__ */ new Map(), liftedIfs = /* @__PURE__ */ new Set();
6547
- for (let ref27 = gatherRecursiveAll(statements, ($24) => $24.type === "Placeholder"), i17 = 0, len15 = ref27.length; i17 < len15; i17++) {
6548
- let exp = ref27[i17], ancestor;
6642
+ for (let ref31 = gatherRecursiveAll(statements, ($29) => $29.type === "Placeholder"), i21 = 0, len19 = ref31.length; i21 < len19; i21++) {
6643
+ let exp = ref31[i21], ancestor;
6549
6644
  if (exp.subtype === ".") {
6550
6645
  ({ ancestor } = findAncestor(
6551
6646
  exp,
@@ -6614,11 +6709,11 @@ ${js}`
6614
6709
  }
6615
6710
  for (let [ancestor, placeholders] of placeholderMap) {
6616
6711
  let ref = makeRef("$"), typeSuffix;
6617
- for (let i18 = 0, len16 = placeholders.length; i18 < len16; i18++) {
6618
- let placeholder = placeholders[i18];
6712
+ for (let i22 = 0, len20 = placeholders.length; i22 < len20; i22++) {
6713
+ let placeholder = placeholders[i22];
6619
6714
  typeSuffix ??= placeholder.typeSuffix;
6620
- let ref28;
6621
- (ref28 = placeholder.children)[ref28.length - 1] = ref;
6715
+ let ref32;
6716
+ (ref32 = placeholder.children)[ref32.length - 1] = ref;
6622
6717
  }
6623
6718
  let { parent } = ancestor, body = maybeUnwrap(ancestor), fnExp = makeAmpersandFunction({ ref, typeSuffix, body }), outer;
6624
6719
  switch (parent?.type) {
@@ -6635,8 +6730,10 @@ ${js}`
6635
6730
  break;
6636
6731
  }
6637
6732
  case "PipelineExpression": {
6638
- let i = findChildIndex(parent, ancestor), ref29;
6639
- i === 1 ? ref29 = ancestor === parent.children[i] : i === 2 ? ref29 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3] : ref29 = void 0, outer = ref29;
6733
+ {
6734
+ let i = findChildIndex(parent, ancestor), ref33;
6735
+ i === 1 ? ref33 = ancestor === parent.children[i] : i === 2 ? ref33 = ancestor === parent.children[i][findChildIndex(parent.children[i], ancestor)][3] : ref33 = void 0, outer = ref33;
6736
+ }
6640
6737
  break;
6641
6738
  }
6642
6739
  case "AssignmentExpression":
@@ -6648,9 +6745,9 @@ ${js}`
6648
6745
  }
6649
6746
  }
6650
6747
  outer || (fnExp = makeLeftHandSideExpression(fnExp)), replaceNode(ancestor, fnExp, parent), typeof parent == "object" && parent != null && "type" in parent && parent.type === "BlockStatement" && "parent" in parent && typeof parent.parent == "object" && parent.parent != null && "type" in parent.parent && parent.parent.type === "ArrowFunction" && "ampersandBlock" in parent.parent && parent.parent.ampersandBlock === !0 && "body" in parent.parent && parent.parent.body === body && (parent.parent.body = fnExp);
6651
- let ref30;
6652
- if (ref30 = getTrimmingSpace(body)) {
6653
- let ws = ref30;
6748
+ let ref34;
6749
+ if (ref34 = getTrimmingSpace(body)) {
6750
+ let ws = ref34;
6654
6751
  inplaceInsertTrimmingSpace(body, ""), inplacePrepend(ws, fnExp);
6655
6752
  }
6656
6753
  }
@@ -6681,8 +6778,8 @@ ${js}`
6681
6778
  }
6682
6779
  ];
6683
6780
  }
6684
- let ref31;
6685
- Array.isArray(rest.delim) && (ref31 = rest.delim)[ref31.length - 1]?.token === "," && (rest.delim = rest.delim.slice(0, -1), rest.children = [...rest.children.slice(0, -1), rest.delim]);
6781
+ let ref35;
6782
+ Array.isArray(rest.delim) && (ref35 = rest.delim)[ref35.length - 1]?.token === "," && (rest.delim = rest.delim.slice(0, -1), rest.children = [...rest.children.slice(0, -1), rest.delim]);
6686
6783
  let children = [...props, ...after, rest];
6687
6784
  return restCount > 1 && children.push({
6688
6785
  type: "Error",
@@ -6731,7 +6828,7 @@ ${js}`
6731
6828
  }
6732
6829
  lastType = child.type;
6733
6830
  }
6734
- return type.length === 1 ? type[0] : (type = type.flatMap(($25) => [$25, ", "]), type.pop(), ["[", type, "]"]);
6831
+ return type.length === 1 ? type[0] : (type = type.flatMap(($30) => [$30, ", "]), type.pop(), ["[", type, "]"]);
6735
6832
  }
6736
6833
  }
6737
6834
 
@@ -6854,6 +6951,11 @@ ${js}`
6854
6951
  NestedClassSignatureElements,
6855
6952
  NestedClassSignatureElement,
6856
6953
  ClassSignatureElement,
6954
+ AbstractModifier,
6955
+ DeclareModifier,
6956
+ OverrideModifier,
6957
+ ReadonlyModifier,
6958
+ StaticModifier,
6857
6959
  AccessModifier,
6858
6960
  FieldDefinition,
6859
6961
  ThisLiteral,
@@ -6890,7 +6992,9 @@ ${js}`
6890
6992
  AfterReturnShorthand,
6891
6993
  Parameters,
6892
6994
  ShortArrowParameters,
6995
+ ESArrowIdentifierParameters,
6893
6996
  ArrowParameters,
6997
+ ThinArrowParameters,
6894
6998
  NonEmptyParameters,
6895
6999
  ParameterList,
6896
7000
  NestedParameterList,
@@ -7574,6 +7678,7 @@ ${js}`
7574
7678
  CoffeeNotEnabled,
7575
7679
  CoffeeOfEnabled,
7576
7680
  CoffeePrototypeEnabled,
7681
+ ESArrowFunctionEnabled,
7577
7682
  JSXCodeNestedEnabled,
7578
7683
  JSXCodeSameLineEnabled,
7579
7684
  ObjectIsEnabled,
@@ -7594,7 +7699,7 @@ ${js}`
7594
7699
  Dedented,
7595
7700
  PushExtraIndent1
7596
7701
  };
7597
- var $L0 = (0, import_lib2.$L)(""), $L1 = (0, import_lib2.$L)("{"), $L2 = (0, import_lib2.$L)("/ "), $L3 = (0, import_lib2.$L)("="), $L4 = (0, import_lib2.$L)("("), $L5 = (0, import_lib2.$L)("... "), $L6 = (0, import_lib2.$L)("?"), $L7 = (0, import_lib2.$L)("."), $L8 = (0, import_lib2.$L)("tuple"), $L9 = (0, import_lib2.$L)("++"), $L10 = (0, import_lib2.$L)("--"), $L11 = (0, import_lib2.$L)("\u29FA"), $L12 = (0, import_lib2.$L)("\u2014"), $L13 = (0, import_lib2.$L)("=>"), $L14 = (0, import_lib2.$L)("\u21D2"), $L15 = (0, import_lib2.$L)("import"), $L16 = (0, import_lib2.$L)(":"), $L17 = (0, import_lib2.$L)(" "), $L18 = (0, import_lib2.$L)("<"), $L19 = (0, import_lib2.$L)("implements"), $L20 = (0, import_lib2.$L)("<:"), $L21 = (0, import_lib2.$L)("^"), $L22 = (0, import_lib2.$L)("<?"), $L23 = (0, import_lib2.$L)("-"), $L24 = (0, import_lib2.$L)("import.meta"), $L25 = (0, import_lib2.$L)("return.value"), $L26 = (0, import_lib2.$L)(","), $L27 = (0, import_lib2.$L)("tighter"), $L28 = (0, import_lib2.$L)("looser"), $L29 = (0, import_lib2.$L)("same"), $L30 = (0, import_lib2.$L)("left"), $L31 = (0, import_lib2.$L)("right"), $L32 = (0, import_lib2.$L)("non"), $L33 = (0, import_lib2.$L)("relational"), $L34 = (0, import_lib2.$L)("arguments"), $L35 = (0, import_lib2.$L)("->"), $L36 = (0, import_lib2.$L)("\u2192"), $L37 = (0, import_lib2.$L)("}"), $L38 = (0, import_lib2.$L)("null"), $L39 = (0, import_lib2.$L)("true"), $L40 = (0, import_lib2.$L)("false"), $L41 = (0, import_lib2.$L)("yes"), $L42 = (0, import_lib2.$L)("on"), $L43 = (0, import_lib2.$L)("no"), $L44 = (0, import_lib2.$L)("off"), $L45 = (0, import_lib2.$L)(">"), $L46 = (0, import_lib2.$L)("]"), $L47 = (0, import_lib2.$L)("\u2022"), $L48 = (0, import_lib2.$L)("//"), $L49 = (0, import_lib2.$L)("**="), $L50 = (0, import_lib2.$L)("*="), $L51 = (0, import_lib2.$L)("%/"), $L52 = (0, import_lib2.$L)("\xF7"), $L53 = (0, import_lib2.$L)("%%"), $L54 = (0, import_lib2.$L)("/="), $L55 = (0, import_lib2.$L)("%="), $L56 = (0, import_lib2.$L)("+="), $L57 = (0, import_lib2.$L)("-="), $L58 = (0, import_lib2.$L)("<<="), $L59 = (0, import_lib2.$L)("\u226A="), $L60 = (0, import_lib2.$L)(">>>="), $L61 = (0, import_lib2.$L)("\u22D9="), $L62 = (0, import_lib2.$L)(">>="), $L63 = (0, import_lib2.$L)("\u226B="), $L64 = (0, import_lib2.$L)("&&="), $L65 = (0, import_lib2.$L)("&="), $L66 = (0, import_lib2.$L)("^="), $L67 = (0, import_lib2.$L)("||="), $L68 = (0, import_lib2.$L)("\u2016="), $L69 = (0, import_lib2.$L)("|="), $L70 = (0, import_lib2.$L)("??="), $L71 = (0, import_lib2.$L)("\u2047="), $L72 = (0, import_lib2.$L)("?="), $L73 = (0, import_lib2.$L)("and="), $L74 = (0, import_lib2.$L)("or="), $L75 = (0, import_lib2.$L)("*"), $L76 = (0, import_lib2.$L)("**"), $L77 = (0, import_lib2.$L)("/"), $L78 = (0, import_lib2.$L)("%"), $L79 = (0, import_lib2.$L)("+"), $L80 = (0, import_lib2.$L)("<="), $L81 = (0, import_lib2.$L)("\u2264"), $L82 = (0, import_lib2.$L)(">="), $L83 = (0, import_lib2.$L)("\u2265"), $L84 = (0, import_lib2.$L)("!<?"), $L85 = (0, import_lib2.$L)("<<"), $L86 = (0, import_lib2.$L)("\u226A"), $L87 = (0, import_lib2.$L)(">>>"), $L88 = (0, import_lib2.$L)("\u22D9"), $L89 = (0, import_lib2.$L)(">>"), $L90 = (0, import_lib2.$L)("\u226B"), $L91 = (0, import_lib2.$L)("!=="), $L92 = (0, import_lib2.$L)("\u2262"), $L93 = (0, import_lib2.$L)("!="), $L94 = (0, import_lib2.$L)("\u2260"), $L95 = (0, import_lib2.$L)("isnt"), $L96 = (0, import_lib2.$L)("==="), $L97 = (0, import_lib2.$L)("\u2263"), $L98 = (0, import_lib2.$L)("\u2A76"), $L99 = (0, import_lib2.$L)("=="), $L100 = (0, import_lib2.$L)("\u2261"), $L101 = (0, import_lib2.$L)("\u2A75"), $L102 = (0, import_lib2.$L)("and"), $L103 = (0, import_lib2.$L)("&&"), $L104 = (0, import_lib2.$L)("or"), $L105 = (0, import_lib2.$L)("||"), $L106 = (0, import_lib2.$L)("\u2016"), $L107 = (0, import_lib2.$L)("^^"), $L108 = (0, import_lib2.$L)("xor"), $L109 = (0, import_lib2.$L)("xnor"), $L110 = (0, import_lib2.$L)("??"), $L111 = (0, import_lib2.$L)("\u2047"), $L112 = (0, import_lib2.$L)("instanceof"), $L113 = (0, import_lib2.$L)("\u2208"), $L114 = (0, import_lib2.$L)("\u220B"), $L115 = (0, import_lib2.$L)("\u220C"), $L116 = (0, import_lib2.$L)("\u2209"), $L117 = (0, import_lib2.$L)("&"), $L118 = (0, import_lib2.$L)("|"), $L119 = (0, import_lib2.$L)(";"), $L120 = (0, import_lib2.$L)("some"), $L121 = (0, import_lib2.$L)("every"), $L122 = (0, import_lib2.$L)("count"), $L123 = (0, import_lib2.$L)("first"), $L124 = (0, import_lib2.$L)("sum"), $L125 = (0, import_lib2.$L)("product"), $L126 = (0, import_lib2.$L)("min"), $L127 = (0, import_lib2.$L)("max"), $L128 = (0, import_lib2.$L)("join"), $L129 = (0, import_lib2.$L)("concat"), $L130 = (0, import_lib2.$L)("break"), $L131 = (0, import_lib2.$L)("continue"), $L132 = (0, import_lib2.$L)("debugger"), $L133 = (0, import_lib2.$L)("require"), $L134 = (0, import_lib2.$L)("with"), $L135 = (0, import_lib2.$L)("assert"), $L136 = (0, import_lib2.$L)(":="), $L137 = (0, import_lib2.$L)("\u2254"), $L138 = (0, import_lib2.$L)(".="), $L139 = (0, import_lib2.$L)("::="), $L140 = (0, import_lib2.$L)("/*"), $L141 = (0, import_lib2.$L)("*/"), $L142 = (0, import_lib2.$L)("\\"), $L143 = (0, import_lib2.$L)(")"), $L144 = (0, import_lib2.$L)("abstract"), $L145 = (0, import_lib2.$L)("as"), $L146 = (0, import_lib2.$L)("@"), $L147 = (0, import_lib2.$L)("@@"), $L148 = (0, import_lib2.$L)("async"), $L149 = (0, import_lib2.$L)("await"), $L150 = (0, import_lib2.$L)("`"), $L151 = (0, import_lib2.$L)("by"), $L152 = (0, import_lib2.$L)("case"), $L153 = (0, import_lib2.$L)("catch"), $L154 = (0, import_lib2.$L)("class"), $L155 = (0, import_lib2.$L)("#{"), $L156 = (0, import_lib2.$L)("comptime"), $L157 = (0, import_lib2.$L)("declare"), $L158 = (0, import_lib2.$L)("default"), $L159 = (0, import_lib2.$L)("delete"), $L160 = (0, import_lib2.$L)("do"), $L161 = (0, import_lib2.$L)(".."), $L162 = (0, import_lib2.$L)("\u2025"), $L163 = (0, import_lib2.$L)("..."), $L164 = (0, import_lib2.$L)("\u2026"), $L165 = (0, import_lib2.$L)("::"), $L166 = (0, import_lib2.$L)('"'), $L167 = (0, import_lib2.$L)("each"), $L168 = (0, import_lib2.$L)("else"), $L169 = (0, import_lib2.$L)("!"), $L170 = (0, import_lib2.$L)("export"), $L171 = (0, import_lib2.$L)("extends"), $L172 = (0, import_lib2.$L)("finally"), $L173 = (0, import_lib2.$L)("for"), $L174 = (0, import_lib2.$L)("from"), $L175 = (0, import_lib2.$L)("function"), $L176 = (0, import_lib2.$L)("get"), $L177 = (0, import_lib2.$L)("set"), $L178 = (0, import_lib2.$L)("#"), $L179 = (0, import_lib2.$L)("if"), $L180 = (0, import_lib2.$L)("in"), $L181 = (0, import_lib2.$L)("infer"), $L182 = (0, import_lib2.$L)("let"), $L183 = (0, import_lib2.$L)("const"), $L184 = (0, import_lib2.$L)("is"), $L185 = (0, import_lib2.$L)("var"), $L186 = (0, import_lib2.$L)("like"), $L187 = (0, import_lib2.$L)("loop"), $L188 = (0, import_lib2.$L)("new"), $L189 = (0, import_lib2.$L)("not"), $L190 = (0, import_lib2.$L)("of"), $L191 = (0, import_lib2.$L)("["), $L192 = (0, import_lib2.$L)("operator"), $L193 = (0, import_lib2.$L)("override"), $L194 = (0, import_lib2.$L)("own"), $L195 = (0, import_lib2.$L)("public"), $L196 = (0, import_lib2.$L)("private"), $L197 = (0, import_lib2.$L)("protected"), $L198 = (0, import_lib2.$L)("||>"), $L199 = (0, import_lib2.$L)("|\u25B7"), $L200 = (0, import_lib2.$L)("|>="), $L201 = (0, import_lib2.$L)("\u25B7="), $L202 = (0, import_lib2.$L)("|>"), $L203 = (0, import_lib2.$L)("\u25B7"), $L204 = (0, import_lib2.$L)("readonly"), $L205 = (0, import_lib2.$L)("return"), $L206 = (0, import_lib2.$L)("satisfies"), $L207 = (0, import_lib2.$L)("'"), $L208 = (0, import_lib2.$L)("static"), $L209 = (0, import_lib2.$L)("${"), $L210 = (0, import_lib2.$L)("super"), $L211 = (0, import_lib2.$L)("switch"), $L212 = (0, import_lib2.$L)("target"), $L213 = (0, import_lib2.$L)("then"), $L214 = (0, import_lib2.$L)("this"), $L215 = (0, import_lib2.$L)("throw"), $L216 = (0, import_lib2.$L)('"""'), $L217 = (0, import_lib2.$L)("'''"), $L218 = (0, import_lib2.$L)("///"), $L219 = (0, import_lib2.$L)("```"), $L220 = (0, import_lib2.$L)("try"), $L221 = (0, import_lib2.$L)("typeof"), $L222 = (0, import_lib2.$L)("undefined"), $L223 = (0, import_lib2.$L)("unless"), $L224 = (0, import_lib2.$L)("until"), $L225 = (0, import_lib2.$L)("using"), $L226 = (0, import_lib2.$L)("void"), $L227 = (0, import_lib2.$L)("when"), $L228 = (0, import_lib2.$L)("while"), $L229 = (0, import_lib2.$L)("yield"), $L230 = (0, import_lib2.$L)("/>"), $L231 = (0, import_lib2.$L)("</"), $L232 = (0, import_lib2.$L)("<>"), $L233 = (0, import_lib2.$L)("</>"), $L234 = (0, import_lib2.$L)("<!--"), $L235 = (0, import_lib2.$L)("-->"), $L236 = (0, import_lib2.$L)("type"), $L237 = (0, import_lib2.$L)("enum"), $L238 = (0, import_lib2.$L)("interface"), $L239 = (0, import_lib2.$L)("global"), $L240 = (0, import_lib2.$L)("module"), $L241 = (0, import_lib2.$L)("namespace"), $L242 = (0, import_lib2.$L)("asserts"), $L243 = (0, import_lib2.$L)("keyof"), $L244 = (0, import_lib2.$L)("???"), $L245 = (0, import_lib2.$L)("unique"), $L246 = (0, import_lib2.$L)("symbol"), $L247 = (0, import_lib2.$L)("[]"), $L248 = (0, import_lib2.$L)("civet"), $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy")), $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy")), $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy")), $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy")), $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy")), $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy")), $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy")), $R8 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy")), $R9 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy")), $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy")), $R11 = (0, import_lib2.$R)(new RegExp("%%?", "suy")), $R12 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy")), $R13 = (0, import_lib2.$R)(new RegExp("[)\\]}]", "suy")), $R14 = (0, import_lib2.$R)(new RegExp("[+-]", "suy")), $R15 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy")), $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy")), $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy")), $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy")), $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy")), $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy")), $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy")), $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy")), $R24 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy")), $R25 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R26 = (0, import_lib2.$R)(new RegExp("[=>]", "suy")), $R27 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy")), $R28 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy")), $R29 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy")), $R30 = (0, import_lib2.$R)(new RegExp("[:.]", "suy")), $R31 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy")), $R32 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy")), $R33 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy")), $R34 = (0, import_lib2.$R)(new RegExp(`[^;"'\\s=>]+`, "suy")), $R35 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy")), $R36 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy")), $R37 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy")), $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy")), $R39 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy")), $R40 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy")), $R41 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy")), $R42 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy")), $R43 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy")), $R44 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy")), $R45 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy")), $R46 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy")), $R47 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy")), $R48 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"\\n])*', "suy")), $R49 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'\\n])*", "suy")), $R50 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy")), $R51 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy")), $R52 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy")), $R53 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy")), $R54 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy")), $R55 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy")), $R56 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy")), $R57 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy")), $R58 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy")), $R59 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy")), $R60 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy")), $R61 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R62 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy")), $R63 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy")), $R64 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy")), $R65 = (0, import_lib2.$R)(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy")), $R66 = (0, import_lib2.$R)(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy")), $R67 = (0, import_lib2.$R)(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy")), $R68 = (0, import_lib2.$R)(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy")), $R69 = (0, import_lib2.$R)(new RegExp("(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy")), $R70 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy")), $R71 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy")), $R72 = (0, import_lib2.$R)(new RegExp(".", "suy")), $R73 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy")), $R74 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy")), $R75 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy")), $R76 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy")), $R77 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\#])", "suy")), $R78 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy")), $R79 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue})", "suy")), $R80 = (0, import_lib2.$R)(new RegExp("[=:]", "suy")), $R81 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy")), $R82 = (0, import_lib2.$R)(new RegExp("\\s", "suy")), $R83 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy")), $R84 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R85 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy")), $R86 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy")), $R87 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy")), $R88 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy")), $R89 = (0, import_lib2.$R)(new RegExp("[<>]", "suy")), $R90 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy")), $R91 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy")), $R92 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy")), $R93 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy")), $R94 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy")), $R95 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy")), $R96 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R97 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy")), $R98 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy")), $R99 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy")), $R100 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy")), $R101 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy")), $R102 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy")), $R103 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy")), $R104 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy")), $R105 = (0, import_lib2.$R)(new RegExp("[^]*", "suy")), Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7702
+ var $L0 = (0, import_lib2.$L)(""), $L1 = (0, import_lib2.$L)("{"), $L2 = (0, import_lib2.$L)("/ "), $L3 = (0, import_lib2.$L)("="), $L4 = (0, import_lib2.$L)("("), $L5 = (0, import_lib2.$L)("... "), $L6 = (0, import_lib2.$L)("?"), $L7 = (0, import_lib2.$L)("."), $L8 = (0, import_lib2.$L)("tuple"), $L9 = (0, import_lib2.$L)("++"), $L10 = (0, import_lib2.$L)("--"), $L11 = (0, import_lib2.$L)("\u29FA"), $L12 = (0, import_lib2.$L)("\u2014"), $L13 = (0, import_lib2.$L)("=>"), $L14 = (0, import_lib2.$L)("\u21D2"), $L15 = (0, import_lib2.$L)("import"), $L16 = (0, import_lib2.$L)(":"), $L17 = (0, import_lib2.$L)(" "), $L18 = (0, import_lib2.$L)("<"), $L19 = (0, import_lib2.$L)("implements"), $L20 = (0, import_lib2.$L)("<:"), $L21 = (0, import_lib2.$L)("^"), $L22 = (0, import_lib2.$L)("<?"), $L23 = (0, import_lib2.$L)("-"), $L24 = (0, import_lib2.$L)("import.meta"), $L25 = (0, import_lib2.$L)("return.value"), $L26 = (0, import_lib2.$L)(","), $L27 = (0, import_lib2.$L)("tighter"), $L28 = (0, import_lib2.$L)("looser"), $L29 = (0, import_lib2.$L)("same"), $L30 = (0, import_lib2.$L)("left"), $L31 = (0, import_lib2.$L)("right"), $L32 = (0, import_lib2.$L)("non"), $L33 = (0, import_lib2.$L)("relational"), $L34 = (0, import_lib2.$L)("arguments"), $L35 = (0, import_lib2.$L)("->"), $L36 = (0, import_lib2.$L)("\u2192"), $L37 = (0, import_lib2.$L)("}"), $L38 = (0, import_lib2.$L)("null"), $L39 = (0, import_lib2.$L)("true"), $L40 = (0, import_lib2.$L)("false"), $L41 = (0, import_lib2.$L)("yes"), $L42 = (0, import_lib2.$L)("on"), $L43 = (0, import_lib2.$L)("no"), $L44 = (0, import_lib2.$L)("off"), $L45 = (0, import_lib2.$L)(">"), $L46 = (0, import_lib2.$L)("]"), $L47 = (0, import_lib2.$L)("\u2022"), $L48 = (0, import_lib2.$L)("//"), $L49 = (0, import_lib2.$L)("**="), $L50 = (0, import_lib2.$L)("*="), $L51 = (0, import_lib2.$L)("%/"), $L52 = (0, import_lib2.$L)("\xF7"), $L53 = (0, import_lib2.$L)("%%"), $L54 = (0, import_lib2.$L)("/="), $L55 = (0, import_lib2.$L)("%="), $L56 = (0, import_lib2.$L)("+="), $L57 = (0, import_lib2.$L)("-="), $L58 = (0, import_lib2.$L)("<<="), $L59 = (0, import_lib2.$L)("\u226A="), $L60 = (0, import_lib2.$L)(">>>="), $L61 = (0, import_lib2.$L)("\u22D9="), $L62 = (0, import_lib2.$L)(">>="), $L63 = (0, import_lib2.$L)("\u226B="), $L64 = (0, import_lib2.$L)("&&="), $L65 = (0, import_lib2.$L)("&="), $L66 = (0, import_lib2.$L)("^="), $L67 = (0, import_lib2.$L)("||="), $L68 = (0, import_lib2.$L)("\u2016="), $L69 = (0, import_lib2.$L)("|="), $L70 = (0, import_lib2.$L)("??="), $L71 = (0, import_lib2.$L)("\u2047="), $L72 = (0, import_lib2.$L)("?="), $L73 = (0, import_lib2.$L)("and="), $L74 = (0, import_lib2.$L)("or="), $L75 = (0, import_lib2.$L)("*"), $L76 = (0, import_lib2.$L)("**"), $L77 = (0, import_lib2.$L)("/"), $L78 = (0, import_lib2.$L)("%"), $L79 = (0, import_lib2.$L)("+"), $L80 = (0, import_lib2.$L)("<="), $L81 = (0, import_lib2.$L)("\u2264"), $L82 = (0, import_lib2.$L)(">="), $L83 = (0, import_lib2.$L)("\u2265"), $L84 = (0, import_lib2.$L)("!<?"), $L85 = (0, import_lib2.$L)("<<"), $L86 = (0, import_lib2.$L)("\u226A"), $L87 = (0, import_lib2.$L)(">>>"), $L88 = (0, import_lib2.$L)("\u22D9"), $L89 = (0, import_lib2.$L)(">>"), $L90 = (0, import_lib2.$L)("\u226B"), $L91 = (0, import_lib2.$L)("!=="), $L92 = (0, import_lib2.$L)("\u2262"), $L93 = (0, import_lib2.$L)("!="), $L94 = (0, import_lib2.$L)("\u2260"), $L95 = (0, import_lib2.$L)("isnt"), $L96 = (0, import_lib2.$L)("==="), $L97 = (0, import_lib2.$L)("\u2263"), $L98 = (0, import_lib2.$L)("\u2A76"), $L99 = (0, import_lib2.$L)("=="), $L100 = (0, import_lib2.$L)("\u2261"), $L101 = (0, import_lib2.$L)("\u2A75"), $L102 = (0, import_lib2.$L)("and"), $L103 = (0, import_lib2.$L)("&&"), $L104 = (0, import_lib2.$L)("or"), $L105 = (0, import_lib2.$L)("||"), $L106 = (0, import_lib2.$L)("\u2016"), $L107 = (0, import_lib2.$L)("^^"), $L108 = (0, import_lib2.$L)("xor"), $L109 = (0, import_lib2.$L)("xnor"), $L110 = (0, import_lib2.$L)("??"), $L111 = (0, import_lib2.$L)("\u2047"), $L112 = (0, import_lib2.$L)("instanceof"), $L113 = (0, import_lib2.$L)("\u2208"), $L114 = (0, import_lib2.$L)("\u220B"), $L115 = (0, import_lib2.$L)("\u220C"), $L116 = (0, import_lib2.$L)("\u2209"), $L117 = (0, import_lib2.$L)("&"), $L118 = (0, import_lib2.$L)("|"), $L119 = (0, import_lib2.$L)(";"), $L120 = (0, import_lib2.$L)("some"), $L121 = (0, import_lib2.$L)("every"), $L122 = (0, import_lib2.$L)("count"), $L123 = (0, import_lib2.$L)("first"), $L124 = (0, import_lib2.$L)("sum"), $L125 = (0, import_lib2.$L)("product"), $L126 = (0, import_lib2.$L)("min"), $L127 = (0, import_lib2.$L)("max"), $L128 = (0, import_lib2.$L)("join"), $L129 = (0, import_lib2.$L)("concat"), $L130 = (0, import_lib2.$L)("break"), $L131 = (0, import_lib2.$L)("continue"), $L132 = (0, import_lib2.$L)("debugger"), $L133 = (0, import_lib2.$L)("require"), $L134 = (0, import_lib2.$L)("with"), $L135 = (0, import_lib2.$L)("assert"), $L136 = (0, import_lib2.$L)(":="), $L137 = (0, import_lib2.$L)("\u2254"), $L138 = (0, import_lib2.$L)(".="), $L139 = (0, import_lib2.$L)("::="), $L140 = (0, import_lib2.$L)("/*"), $L141 = (0, import_lib2.$L)("*/"), $L142 = (0, import_lib2.$L)("\\"), $L143 = (0, import_lib2.$L)(")"), $L144 = (0, import_lib2.$L)("abstract"), $L145 = (0, import_lib2.$L)("as"), $L146 = (0, import_lib2.$L)("@"), $L147 = (0, import_lib2.$L)("@@"), $L148 = (0, import_lib2.$L)("async"), $L149 = (0, import_lib2.$L)("await"), $L150 = (0, import_lib2.$L)("`"), $L151 = (0, import_lib2.$L)("by"), $L152 = (0, import_lib2.$L)("case"), $L153 = (0, import_lib2.$L)("catch"), $L154 = (0, import_lib2.$L)("class"), $L155 = (0, import_lib2.$L)("#{"), $L156 = (0, import_lib2.$L)("comptime"), $L157 = (0, import_lib2.$L)("declare"), $L158 = (0, import_lib2.$L)("default"), $L159 = (0, import_lib2.$L)("delete"), $L160 = (0, import_lib2.$L)("do"), $L161 = (0, import_lib2.$L)(".."), $L162 = (0, import_lib2.$L)("\u2025"), $L163 = (0, import_lib2.$L)("..."), $L164 = (0, import_lib2.$L)("\u2026"), $L165 = (0, import_lib2.$L)("::"), $L166 = (0, import_lib2.$L)('"'), $L167 = (0, import_lib2.$L)("each"), $L168 = (0, import_lib2.$L)("else"), $L169 = (0, import_lib2.$L)("!"), $L170 = (0, import_lib2.$L)("export"), $L171 = (0, import_lib2.$L)("extends"), $L172 = (0, import_lib2.$L)("finally"), $L173 = (0, import_lib2.$L)("for"), $L174 = (0, import_lib2.$L)("from"), $L175 = (0, import_lib2.$L)("function"), $L176 = (0, import_lib2.$L)("get"), $L177 = (0, import_lib2.$L)("set"), $L178 = (0, import_lib2.$L)("#"), $L179 = (0, import_lib2.$L)("if"), $L180 = (0, import_lib2.$L)("in"), $L181 = (0, import_lib2.$L)("infer"), $L182 = (0, import_lib2.$L)("let"), $L183 = (0, import_lib2.$L)("const"), $L184 = (0, import_lib2.$L)("is"), $L185 = (0, import_lib2.$L)("var"), $L186 = (0, import_lib2.$L)("like"), $L187 = (0, import_lib2.$L)("loop"), $L188 = (0, import_lib2.$L)("new"), $L189 = (0, import_lib2.$L)("not"), $L190 = (0, import_lib2.$L)("of"), $L191 = (0, import_lib2.$L)("["), $L192 = (0, import_lib2.$L)("operator"), $L193 = (0, import_lib2.$L)("override"), $L194 = (0, import_lib2.$L)("own"), $L195 = (0, import_lib2.$L)("public"), $L196 = (0, import_lib2.$L)("private"), $L197 = (0, import_lib2.$L)("protected"), $L198 = (0, import_lib2.$L)("||>"), $L199 = (0, import_lib2.$L)("|\u25B7"), $L200 = (0, import_lib2.$L)("|>="), $L201 = (0, import_lib2.$L)("\u25B7="), $L202 = (0, import_lib2.$L)("|>"), $L203 = (0, import_lib2.$L)("\u25B7"), $L204 = (0, import_lib2.$L)("readonly"), $L205 = (0, import_lib2.$L)("return"), $L206 = (0, import_lib2.$L)("satisfies"), $L207 = (0, import_lib2.$L)("'"), $L208 = (0, import_lib2.$L)("static"), $L209 = (0, import_lib2.$L)("${"), $L210 = (0, import_lib2.$L)("super"), $L211 = (0, import_lib2.$L)("switch"), $L212 = (0, import_lib2.$L)("target"), $L213 = (0, import_lib2.$L)("then"), $L214 = (0, import_lib2.$L)("this"), $L215 = (0, import_lib2.$L)("throw"), $L216 = (0, import_lib2.$L)('"""'), $L217 = (0, import_lib2.$L)("'''"), $L218 = (0, import_lib2.$L)("///"), $L219 = (0, import_lib2.$L)("```"), $L220 = (0, import_lib2.$L)("try"), $L221 = (0, import_lib2.$L)("typeof"), $L222 = (0, import_lib2.$L)("undefined"), $L223 = (0, import_lib2.$L)("unless"), $L224 = (0, import_lib2.$L)("until"), $L225 = (0, import_lib2.$L)("using"), $L226 = (0, import_lib2.$L)("void"), $L227 = (0, import_lib2.$L)("when"), $L228 = (0, import_lib2.$L)("while"), $L229 = (0, import_lib2.$L)("yield"), $L230 = (0, import_lib2.$L)("/>"), $L231 = (0, import_lib2.$L)("</"), $L232 = (0, import_lib2.$L)("<>"), $L233 = (0, import_lib2.$L)("</>"), $L234 = (0, import_lib2.$L)("<!--"), $L235 = (0, import_lib2.$L)("-->"), $L236 = (0, import_lib2.$L)("type"), $L237 = (0, import_lib2.$L)("enum"), $L238 = (0, import_lib2.$L)("interface"), $L239 = (0, import_lib2.$L)("global"), $L240 = (0, import_lib2.$L)("module"), $L241 = (0, import_lib2.$L)("namespace"), $L242 = (0, import_lib2.$L)("asserts"), $L243 = (0, import_lib2.$L)("keyof"), $L244 = (0, import_lib2.$L)("???"), $L245 = (0, import_lib2.$L)("unique"), $L246 = (0, import_lib2.$L)("symbol"), $L247 = (0, import_lib2.$L)("[]"), $L248 = (0, import_lib2.$L)("civet"), $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy")), $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy")), $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy")), $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy")), $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy")), $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy")), $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy")), $R8 = (0, import_lib2.$R)(new RegExp("[@#]", "suy")), $R9 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy")), $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy")), $R11 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy")), $R12 = (0, import_lib2.$R)(new RegExp("%%?", "suy")), $R13 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy")), $R14 = (0, import_lib2.$R)(new RegExp("[)\\]}]", "suy")), $R15 = (0, import_lib2.$R)(new RegExp("[+-]", "suy")), $R16 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy")), $R17 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy")), $R18 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy")), $R19 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy")), $R20 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R21 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy")), $R22 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy")), $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy")), $R24 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy")), $R25 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy")), $R26 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R27 = (0, import_lib2.$R)(new RegExp("[=>]", "suy")), $R28 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy")), $R29 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy")), $R30 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy")), $R31 = (0, import_lib2.$R)(new RegExp("[:.]", "suy")), $R32 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy")), $R33 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy")), $R34 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy")), $R35 = (0, import_lib2.$R)(new RegExp(`[^;"'\\s=>]+`, "suy")), $R36 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy")), $R37 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy")), $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy")), $R39 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy")), $R40 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy")), $R41 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy")), $R42 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy")), $R43 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy")), $R44 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy")), $R45 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy")), $R46 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy")), $R47 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy")), $R48 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy")), $R49 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"\\n])*', "suy")), $R50 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'\\n])*", "suy")), $R51 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy")), $R52 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy")), $R53 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy")), $R54 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy")), $R55 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy")), $R56 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy")), $R57 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy")), $R58 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy")), $R59 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy")), $R60 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy")), $R61 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy")), $R62 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R63 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy")), $R64 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy")), $R65 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy")), $R66 = (0, import_lib2.$R)(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy")), $R67 = (0, import_lib2.$R)(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy")), $R68 = (0, import_lib2.$R)(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy")), $R69 = (0, import_lib2.$R)(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy")), $R70 = (0, import_lib2.$R)(new RegExp("(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy")), $R71 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy")), $R72 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy")), $R73 = (0, import_lib2.$R)(new RegExp(".", "suy")), $R74 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy")), $R75 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy")), $R76 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy")), $R77 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy")), $R78 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\#])", "suy")), $R79 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy")), $R80 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue})", "suy")), $R81 = (0, import_lib2.$R)(new RegExp("[=:]", "suy")), $R82 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy")), $R83 = (0, import_lib2.$R)(new RegExp("\\s", "suy")), $R84 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy")), $R85 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R86 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy")), $R87 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy")), $R88 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy")), $R89 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy")), $R90 = (0, import_lib2.$R)(new RegExp("[<>]", "suy")), $R91 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy")), $R92 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy")), $R93 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy")), $R94 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy")), $R95 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy")), $R96 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy")), $R97 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R98 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy")), $R99 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy")), $R100 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy")), $R101 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy")), $R102 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy")), $R103 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy")), $R104 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy")), $R105 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy")), $R106 = (0, import_lib2.$R)(new RegExp("[^]*", "suy")), Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7598
7703
  var reset = $1, init = $2, ws1 = $3, statements = $4, ws2 = $5;
7599
7704
  let program = {
7600
7705
  type: "BlockStatement",
@@ -7700,7 +7805,7 @@ ${js}`
7700
7805
  return (0, import_lib2.$EVENT_C)(ctx, state2, "StatementExpression", StatementExpression$$);
7701
7806
  }
7702
7807
  var CommaExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpression, (0, import_lib2.$Q)((0, import_lib2.$S)(CommaDelimiter, AssignmentExpression))), function($skip, $loc, $0, $1, $2) {
7703
- return $2.length == 0 ? $1 : $0;
7808
+ return $2.length ? $0 : $1;
7704
7809
  });
7705
7810
  function CommaExpression(ctx, state2) {
7706
7811
  return (0, import_lib2.$EVENT)(ctx, state2, "CommaExpression", CommaExpression$0);
@@ -7709,7 +7814,7 @@ ${js}`
7709
7814
  var ws = $1, ws2 = $3, iteration = $4;
7710
7815
  return iteration.subtype === "do" || iteration.subtype === "comptime" ? $skip : (ws2 && (ws ? ws = [ws, ws2] : ws = ws2), iteration = { ...iteration, resultsParent: !0 }, prepend(ws, iteration));
7711
7816
  }), CommaExpressionSpread$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AssignmentExpressionSpread, (0, import_lib2.$Q)((0, import_lib2.$S)(CommaDelimiter, AssignmentExpressionSpread))), function($skip, $loc, $0, $1, $2) {
7712
- return $2.length == 0 ? $1 : $0;
7817
+ return $2.length ? $0 : $1;
7713
7818
  }), CommaExpressionSpread$$ = [CommaExpressionSpread$0, CommaExpressionSpread$1];
7714
7819
  function CommaExpressionSpread(ctx, state2) {
7715
7820
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CommaExpressionSpread", CommaExpressionSpread$$);
@@ -7805,7 +7910,7 @@ ${js}`
7805
7910
  return (0, import_lib2.$EVENT)(ctx, state2, "ArgumentsWithTrailingCallExpressions", ArgumentsWithTrailingCallExpressions$0);
7806
7911
  }
7807
7912
  var TrailingCallExpressions$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)(ExplicitCallExpressionRest), (0, import_lib2.$E)(IndentedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2) {
7808
- return $1 = $1.flat(), !$1.length && !$2 ? $skip : $2 ? [...$1, ...$2] : $1;
7913
+ return $1 = $1.flat(), $1.length || $2 ? $2 ? [...$1, ...$2] : $1 : $skip;
7809
7914
  });
7810
7915
  function TrailingCallExpressions(ctx, state2) {
7811
7916
  return (0, import_lib2.$EVENT)(ctx, state2, "TrailingCallExpressions", TrailingCallExpressions$0);
@@ -8006,12 +8111,12 @@ ${js}`
8006
8111
  return (0, import_lib2.$EVENT_C)(ctx, state2, "BinaryOpRHS", BinaryOpRHS$$);
8007
8112
  }
8008
8113
  var IsLike$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Is, (0, import_lib2.$E)(_), (0, import_lib2.$E)((0, import_lib2.$S)(OmittedNegation, (0, import_lib2.$E)(_))), Like), function($skip, $loc, $0, $1, $2, $3, $4) {
8009
- var not = $3;
8114
+ var negated = $3;
8010
8115
  return {
8011
8116
  type: "PatternTest",
8012
8117
  children: $0,
8013
8118
  special: !0,
8014
- negated: !!not
8119
+ negated: !!negated
8015
8120
  };
8016
8121
  });
8017
8122
  function IsLike(ctx, state2) {
@@ -8114,8 +8219,8 @@ ${js}`
8114
8219
  };
8115
8220
  }), NWTypePostfix$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(As, (0, import_lib2.$E)(ExclamationPoint), (0, import_lib2.$C)(Type, (0, import_lib2.$S)(__, Const))), function($skip, $loc, $0, $1, $2, $3) {
8116
8221
  var as = $1, ex = $2, type = $3;
8117
- let children;
8118
- return ex ? children = [{ $loc: ex.$loc, token: "as unknown " }, as, type] : children = [as, type], { ts: !0, children };
8222
+ let ref1;
8223
+ return ex ? ref1 = [{ $loc: ex.$loc, token: "as unknown " }, as, type] : ref1 = [as, type], { ts: !0, children: ref1 };
8119
8224
  }), NWTypePostfix$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(Satisfies, Type), function($skip, $loc, $0, $1, $2) {
8120
8225
  return { ts: !0, children: $0 };
8121
8226
  }), NWTypePostfix$$ = [NWTypePostfix$0, NWTypePostfix$1, NWTypePostfix$2];
@@ -8284,8 +8389,8 @@ ${js}`
8284
8389
  function TrailingPostfix(ctx, state2) {
8285
8390
  return (0, import_lib2.$EVENT)(ctx, state2, "TrailingPostfix", TrailingPostfix$0);
8286
8391
  }
8287
- var FatArrowBody$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), ExpressionizedStatement)), NonPipelineExpression, (0, import_lib2.$N)(TrailingDeclaration), (0, import_lib2.$N)(TrailingPipe), (0, import_lib2.$N)(TrailingPostfix), (0, import_lib2.$N)(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8288
- var exp = $3;
8392
+ var FatArrowBody$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(EOS), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), ExpressionizedStatement)), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), Declaration)), NonPipelineExpression, (0, import_lib2.$N)(TrailingDeclaration), (0, import_lib2.$N)(TrailingPipe), (0, import_lib2.$N)(TrailingPostfix), (0, import_lib2.$N)(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
8393
+ var exp = $4;
8289
8394
  exp = makeExpressionStatement(exp);
8290
8395
  let expressions = [["", exp]];
8291
8396
  return {
@@ -8305,9 +8410,12 @@ ${js}`
8305
8410
  function ConditionalExpression(ctx, state2) {
8306
8411
  return (0, import_lib2.$EVENT)(ctx, state2, "ConditionalExpression", ConditionalExpression$0);
8307
8412
  }
8308
- var TernaryRest$0 = NestedTernaryRest, TernaryRest$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeBinaryExistentialEnabled), (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R5, "TernaryRest /[ \\t]/")), _, QuestionMark, MaybeNestedExpression, __, Colon, MaybeNestedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
8413
+ var TernaryRest$0 = NestedTernaryRest, TernaryRest$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeBinaryExistentialEnabled), (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R5, "TernaryRest /[ \\t]/")), _, QuestionMark, PushIndent, (0, import_lib2.$E)((0, import_lib2.$S)(Nested, Expression, _, Colon, Nested, Expression)), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8414
+ var thenelse = $6;
8415
+ return thenelse ? [$3, $4, ...thenelse] : $skip;
8416
+ }), TernaryRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeBinaryExistentialEnabled), (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R5, "TernaryRest /[ \\t]/")), _, QuestionMark, MaybeNestedExpression, __, Colon, MaybeNestedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
8309
8417
  return $0.slice(2);
8310
- }), TernaryRest$$ = [TernaryRest$0, TernaryRest$1];
8418
+ }), TernaryRest$$ = [TernaryRest$0, TernaryRest$1, TernaryRest$2];
8311
8419
  function TernaryRest(ctx, state2) {
8312
8420
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TernaryRest", TernaryRest$$);
8313
8421
  }
@@ -8321,24 +8429,29 @@ ${js}`
8321
8429
  function ShortCircuitExpression(ctx, state2) {
8322
8430
  return (0, import_lib2.$EVENT)(ctx, state2, "ShortCircuitExpression", ShortCircuitExpression$0);
8323
8431
  }
8324
- var PipelineExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PipelineAllowed, (0, import_lib2.$E)(_), PipelineHeadItem, PipelineExpressionBody), function($skip, $loc, $0, $1, $2, $3, $4) {
8325
- var ws = $2, head = $3, body = $4;
8432
+ var PipelineExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PipelineAllowed, (0, import_lib2.$E)(_), PipelineHeadItem, PipelineExpressionBody, (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8433
+ var ws = $2, head = $3, body = $4, trailing = $5;
8434
+ let node;
8326
8435
  if (head.type === "ArrowFunction" && head.ampersandBlock) {
8327
8436
  let expressions = [{
8328
8437
  type: "PipelineExpression",
8329
8438
  children: [ws, head.block.expressions[0], body]
8330
8439
  }], block = { ...head.block, expressions, children: [expressions] };
8331
- return {
8440
+ node = {
8332
8441
  ...head,
8333
8442
  block,
8334
8443
  body: expressions,
8335
8444
  children: [...head.children.slice(0, -1), block]
8336
8445
  };
8337
- }
8338
- return {
8339
- type: "PipelineExpression",
8340
- children: [ws, head, body]
8341
- };
8446
+ } else
8447
+ node = {
8448
+ type: "PipelineExpression",
8449
+ children: [ws, head, body]
8450
+ };
8451
+ return trailing ? processCallMemberExpression({
8452
+ type: "CallExpression",
8453
+ children: [node, ...trailing]
8454
+ }) : node;
8342
8455
  });
8343
8456
  function PipelineExpression(ctx, state2) {
8344
8457
  return (0, import_lib2.$EVENT)(ctx, state2, "PipelineExpression", PipelineExpression$0);
@@ -8403,7 +8516,8 @@ ${js}`
8403
8516
  }
8404
8517
  var ParenthesizedExpression$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(PostfixedCommaExpression, __, CloseParen)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
8405
8518
  var open = $1;
8406
- if (!$3) return $skip;
8519
+ if (!$3)
8520
+ return $skip;
8407
8521
  let [expression, ws, close] = $3;
8408
8522
  return expression.type === "ParenthesizedExpression" && expression.implicit ? {
8409
8523
  ...expression,
@@ -8570,7 +8684,8 @@ ${js}`
8570
8684
  }
8571
8685
  var ImplementsClause$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ImplementsToken, PushIndent, (0, import_lib2.$Q)((0, import_lib2.$S)(Nested, TypeIdentifier, ArrayBulletDelimiter)), PopIndent), function($skip, $loc, $0, $1, $2, $3, $4) {
8572
8686
  var i = $1, targets = $3;
8573
- if (!targets.length) return $skip;
8687
+ if (!targets.length)
8688
+ return $skip;
8574
8689
  let last = targets.at(-1).slice(0, -1);
8575
8690
  return targets = targets.slice(0, -1).concat(last), {
8576
8691
  ts: !0,
@@ -8643,14 +8758,14 @@ ${js}`
8643
8758
  function NestedClassElement(ctx, state2) {
8644
8759
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedClassElement", NestedClassElement$0);
8645
8760
  }
8646
- var ClassElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, (0, import_lib2.$E)(Decorators), (0, import_lib2.$E)((0, import_lib2.$S)(Declare, (0, import_lib2.$E)(_))), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)((0, import_lib2.$S)(Static, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Override, (0, import_lib2.$E)(_))), ActualAssignment), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8761
+ var ClassElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, (0, import_lib2.$E)(Decorators), (0, import_lib2.$E)(DeclareModifier), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)(StaticModifier), (0, import_lib2.$E)(OverrideModifier), ActualAssignment), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8647
8762
  var decorators = $2, declare = $3, access = $4, static_ = $5, override = $6, assignment = $7;
8648
8763
  return {
8649
8764
  type: static_ ? "CoffeeClassPublic" : "CoffeeClassPrivate",
8650
8765
  children: [decorators, declare, access, static_, override, assignment],
8651
8766
  assignment
8652
8767
  };
8653
- }), ClassElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)((0, import_lib2.$S)(Declare, (0, import_lib2.$E)(_))), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)((0, import_lib2.$S)(Static, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Override, (0, import_lib2.$E)(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8768
+ }), ClassElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)(DeclareModifier), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)(StaticModifier), (0, import_lib2.$E)(OverrideModifier), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8654
8769
  var decorators = $1, declare = $2, access = $3, static_ = $4, override = $5, definition = $6;
8655
8770
  let ts2 = definition.ts || !!declare;
8656
8771
  return definition.type === "MultiMethodDefinition" ? {
@@ -8678,7 +8793,7 @@ ${js}`
8678
8793
  function ClassElementDefinition(ctx, state2) {
8679
8794
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ClassElementDefinition", ClassElementDefinition$$);
8680
8795
  }
8681
- var ClassSignature$0 = (0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)((0, import_lib2.$S)(Abstract, __)), Class, (0, import_lib2.$E)(ClassBinding), (0, import_lib2.$E)(ClassHeritage), ClassSignatureBody);
8796
+ var ClassSignature$0 = (0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)(AbstractModifier), Class, (0, import_lib2.$E)(ClassBinding), (0, import_lib2.$E)(ClassHeritage), ClassSignatureBody);
8682
8797
  function ClassSignature(ctx, state2) {
8683
8798
  return (0, import_lib2.$EVENT)(ctx, state2, "ClassSignature", ClassSignature$0);
8684
8799
  }
@@ -8697,11 +8812,43 @@ ${js}`
8697
8812
  function NestedClassSignatureElement(ctx, state2) {
8698
8813
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedClassSignatureElement", NestedClassSignatureElement$0);
8699
8814
  }
8700
- var ClassSignatureElement$0 = (0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)((0, import_lib2.$S)(Static, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Override, (0, import_lib2.$E)(_))), (0, import_lib2.$C)(MethodSignature, FieldDefinition)), ClassSignatureElement$1 = (0, import_lib2.$S)(Static, ClassSignatureBody), ClassSignatureElement$$ = [ClassSignatureElement$0, ClassSignatureElement$1];
8815
+ var ClassSignatureElement$0 = (0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)(StaticModifier), (0, import_lib2.$E)(OverrideModifier), (0, import_lib2.$C)(MethodSignature, FieldDefinition)), ClassSignatureElement$1 = (0, import_lib2.$S)(Static, ClassSignatureBody), ClassSignatureElement$$ = [ClassSignatureElement$0, ClassSignatureElement$1];
8701
8816
  function ClassSignatureElement(ctx, state2) {
8702
8817
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ClassSignatureElement", ClassSignatureElement$$);
8703
8818
  }
8704
- var AccessModifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$C)(Public, Private, Protected), NotDedented)), (0, import_lib2.$E)((0, import_lib2.$S)(Readonly, NotDedented))), function($skip, $loc, $0, $1, $2) {
8819
+ var AbstractModifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Abstract, NotDedented, (0, import_lib2.$Y)(ClassElementName)), function(value) {
8820
+ return [value[0], value[1]];
8821
+ });
8822
+ function AbstractModifier(ctx, state2) {
8823
+ return (0, import_lib2.$EVENT)(ctx, state2, "AbstractModifier", AbstractModifier$0);
8824
+ }
8825
+ var DeclareModifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Declare, NotDedented, (0, import_lib2.$Y)(ClassElementName)), function(value) {
8826
+ return [value[0], value[1]];
8827
+ });
8828
+ function DeclareModifier(ctx, state2) {
8829
+ return (0, import_lib2.$EVENT)(ctx, state2, "DeclareModifier", DeclareModifier$0);
8830
+ }
8831
+ var OverrideModifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Override, NotDedented, (0, import_lib2.$Y)(ClassElementName)), function(value) {
8832
+ return [value[0], value[1]];
8833
+ });
8834
+ function OverrideModifier(ctx, state2) {
8835
+ return (0, import_lib2.$EVENT)(ctx, state2, "OverrideModifier", OverrideModifier$0);
8836
+ }
8837
+ var ReadonlyModifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Readonly, NotDedented, (0, import_lib2.$Y)((0, import_lib2.$C)(ClassElementName, (0, import_lib2.$EXPECT)($R8, "ReadonlyModifier /[@#]/")))), function(value) {
8838
+ return [value[0], value[1]];
8839
+ });
8840
+ function ReadonlyModifier(ctx, state2) {
8841
+ return (0, import_lib2.$EVENT)(ctx, state2, "ReadonlyModifier", ReadonlyModifier$0);
8842
+ }
8843
+ var StaticModifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)(Static, (0, import_lib2.$Y)(IndentedFurther)), function(value) {
8844
+ return [value[0], ""];
8845
+ }), StaticModifier$1 = (0, import_lib2.$T)((0, import_lib2.$S)(Static, NotDedented, (0, import_lib2.$Y)(ClassElementName)), function(value) {
8846
+ return [value[0], value[1]];
8847
+ }), StaticModifier$$ = [StaticModifier$0, StaticModifier$1];
8848
+ function StaticModifier(ctx, state2) {
8849
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "StaticModifier", StaticModifier$$);
8850
+ }
8851
+ var AccessModifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$C)(Public, Private, Protected), NotDedented)), (0, import_lib2.$E)(ReadonlyModifier), (0, import_lib2.$Y)((0, import_lib2.$C)(ClassElementName, (0, import_lib2.$EXPECT)($R8, "AccessModifier /[@#]/")))), function($skip, $loc, $0, $1, $2, $3) {
8705
8852
  return $1 || $2 ? {
8706
8853
  ts: !0,
8707
8854
  children: $0
@@ -8736,7 +8883,7 @@ ${js}`
8736
8883
  children: $0,
8737
8884
  readonly
8738
8885
  };
8739
- }), FieldDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Abstract, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Readonly, (0, import_lib2.$E)(_))), ClassElementName, (0, import_lib2.$E)(TypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8886
+ }), FieldDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(AbstractModifier), (0, import_lib2.$E)(ReadonlyModifier), ClassElementName, (0, import_lib2.$E)(TypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8740
8887
  var abstract = $1, readonly = $2, id = $3, typeSuffix = $4, initializer = $5;
8741
8888
  return {
8742
8889
  type: "FieldDefinition",
@@ -8858,10 +9005,11 @@ ${js}`
8858
9005
  var from = $1, fws = $2, i = $3, iws = $4, imports = $5;
8859
9006
  return dynamizeImportDeclarationExpression([i, iws, imports, fws, from]);
8860
9007
  }), CallExpression$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, (0, import_lib2.$Q)(CallExpressionRest)), function($skip, $loc, $0, $1, $2, $3) {
8861
- var rest = $3;
9008
+ var argsWithTrailing = $2, rest = $3;
9009
+ let [args, ...trailing] = argsWithTrailing;
8862
9010
  return processCallMemberExpression({
8863
9011
  type: "CallExpression",
8864
- children: [$1, ...$2, ...rest.flat()]
9012
+ children: [$1, rewriteDynamicImportCall(args), ...trailing, ...rest.flat()]
8865
9013
  });
8866
9014
  }), CallExpression$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(MemberExpression, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(AllowedTrailingCallExpressions)), function($skip, $loc, $0, $1, $2, $3) {
8867
9015
  var member = $1, rest = $2, trailing = $3;
@@ -8875,12 +9023,13 @@ ${js}`
8875
9023
  }
8876
9024
  var CallExpressionRest$0 = MemberExpressionRest, CallExpressionRest$1 = (0, import_lib2.$T)((0, import_lib2.$S)(TypeArguments, (0, import_lib2.$N)((0, import_lib2.$C)(IdentifierName, NumericLiteral))), function(value) {
8877
9025
  return value[0];
8878
- }), CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R8, "CallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
9026
+ }), CallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R9, "CallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
8879
9027
  var literal = $2;
8880
9028
  return literal.type === "StringLiteral" && (literal = "`" + literal.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`"), literal;
8881
9029
  }), CallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ArgumentsWithTrailingCallExpressions), function($skip, $loc, $0, $1, $2) {
8882
9030
  var optional = $1, argsWithTrailing = $2;
8883
- if (!optional) return argsWithTrailing;
9031
+ if (!optional)
9032
+ return argsWithTrailing;
8884
9033
  let call = argsWithTrailing[0];
8885
9034
  return [{
8886
9035
  ...call,
@@ -8893,7 +9042,7 @@ ${js}`
8893
9042
  }
8894
9043
  var ExplicitCallExpressionRest$0 = MemberExpressionRest, ExplicitCallExpressionRest$1 = (0, import_lib2.$T)((0, import_lib2.$S)(TypeArguments, (0, import_lib2.$N)((0, import_lib2.$C)(IdentifierName, NumericLiteral))), function(value) {
8895
9044
  return value[0];
8896
- }), ExplicitCallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R8, "ExplicitCallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
9045
+ }), ExplicitCallExpressionRest$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R9, "ExplicitCallExpressionRest /(?=['\"`])/"), (0, import_lib2.$C)(TemplateLiteral, StringLiteral)), function($skip, $loc, $0, $1, $2) {
8897
9046
  var literal = $2;
8898
9047
  return literal.type === "StringLiteral" && (literal = "`" + literal.token.slice(1, -1).replace(/(`|\$\{)/g, "\\$1") + "`"), literal;
8899
9048
  }), ExplicitCallExpressionRest$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), ExplicitArguments), function($skip, $loc, $0, $1, $2) {
@@ -8907,7 +9056,7 @@ ${js}`
8907
9056
  function ExplicitCallExpressionRest(ctx, state2) {
8908
9057
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ExplicitCallExpressionRest", ExplicitCallExpressionRest$$);
8909
9058
  }
8910
- var OptionalShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R9, "OptionalShorthand /(?=[\\/?])/"), (0, import_lib2.$Q)(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
9059
+ var OptionalShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R10, "OptionalShorthand /(?=[\\/?])/"), (0, import_lib2.$Q)(InlineComment), QuestionMark, OptionalDot), function($skip, $loc, $0, $1, $2, $3, $4) {
8911
9060
  var comments = $2, q = $3, d = $4;
8912
9061
  return {
8913
9062
  type: "Optional",
@@ -8951,7 +9100,7 @@ ${js}`
8951
9100
  function MemberBase(ctx, state2) {
8952
9101
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MemberBase", MemberBase$$);
8953
9102
  }
8954
- var MemberExpressionRest$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R10, "MemberExpressionRest /(?=[\\/\\[{?.!@#'\u2019:])/"), (0, import_lib2.$Q)(InlineComment), MemberExpressionRestBody), function($skip, $loc, $0, $1, $2, $3) {
9103
+ var MemberExpressionRest$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R11, "MemberExpressionRest /(?=[\\/\\[{?.!@#'\u2019:])/"), (0, import_lib2.$Q)(InlineComment), MemberExpressionRestBody), function($skip, $loc, $0, $1, $2, $3) {
8955
9104
  var comments = $2, body = $3;
8956
9105
  return Array.isArray(body) ? [...comments, ...body] : {
8957
9106
  ...body,
@@ -8963,11 +9112,11 @@ ${js}`
8963
9112
  }
8964
9113
  var MemberExpressionRestBody$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), (0, import_lib2.$Q)(InlineComment), MemberBracketContent), function($skip, $loc, $0, $1, $2, $3) {
8965
9114
  var dot = $1, comments = $2, content = $3;
8966
- return !dot && !comments.length ? content : dot ? dot.type === "Optional" && content.type === "SliceExpression" ? [...dot.children.slice(0, -1), ...comments, content] : {
9115
+ return dot || comments.length ? dot ? dot.type === "Optional" && content.type === "SliceExpression" ? [...dot.children.slice(0, -1), ...comments, content] : {
8967
9116
  ...content,
8968
9117
  children: [dot, ...comments, ...content.children],
8969
9118
  optional: dot
8970
- } : [...comments, content];
9119
+ } : [...comments, content] : content;
8971
9120
  }), MemberExpressionRestBody$1 = PropertyAccess, MemberExpressionRestBody$2 = PropertyGlob, MemberExpressionRestBody$3 = PropertyBind, MemberExpressionRestBody$4 = NonNullAssertion, MemberExpressionRestBody$$ = [MemberExpressionRestBody$0, MemberExpressionRestBody$1, MemberExpressionRestBody$2, MemberExpressionRestBody$3, MemberExpressionRestBody$4];
8972
9121
  function MemberExpressionRestBody(ctx, state2) {
8973
9122
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MemberExpressionRestBody", MemberExpressionRestBody$$);
@@ -8993,7 +9142,7 @@ ${js}`
8993
9142
  children: $0,
8994
9143
  expression
8995
9144
  };
8996
- }), MemberBracketContent$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBracket, PostfixedExpression, __, (0, import_lib2.$EXPECT)($R11, "MemberBracketContent /%%?/"), __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
9145
+ }), MemberBracketContent$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBracket, PostfixedExpression, __, (0, import_lib2.$EXPECT)($R12, "MemberBracketContent /%%?/"), __, CloseBracket), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8997
9146
  var open = $1, expression = $2, ws1 = $3, ws2 = $5, close = $6;
8998
9147
  return {
8999
9148
  type: "Index",
@@ -9014,7 +9163,7 @@ ${js}`
9014
9163
  }, end || (reversed ? end = {
9015
9164
  $loc: le.$loc,
9016
9165
  token: "0"
9017
- } : !dots.right.inclusive && !dots.triple && (end = {
9166
+ } : dots.right.inclusive || dots.triple || (end = {
9018
9167
  $loc: le.$loc,
9019
9168
  token: "-1"
9020
9169
  })), dots.left.inclusive || (start = [makeLeftHandSideExpression(start), ` ${sign} 1`]), end) {
@@ -9045,14 +9194,14 @@ ${js}`
9045
9194
  function SliceParameters(ctx, state2) {
9046
9195
  return (0, import_lib2.$EVENT_C)(ctx, state2, "SliceParameters", SliceParameters$$);
9047
9196
  }
9048
- var AccessStart$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), Dot, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R12, "AccessStart /[.\\s]/"))), function($skip, $loc, $0, $1, $2, $3) {
9197
+ var AccessStart$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(PropertyAccessModifier), Dot, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R13, "AccessStart /[.\\s]/"))), function($skip, $loc, $0, $1, $2, $3) {
9049
9198
  var modifier = $1, dot = $2;
9050
9199
  return {
9051
9200
  type: "AccessStart",
9052
9201
  children: modifier ? [modifier, dot] : [dot],
9053
9202
  optional: modifier?.token === "?"
9054
9203
  };
9055
- }), AccessStart$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PropertyAccessModifier, InsertDot, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R12, "AccessStart /[.\\s]/"))), function($skip, $loc, $0, $1, $2, $3) {
9204
+ }), AccessStart$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PropertyAccessModifier, InsertDot, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R13, "AccessStart /[.\\s]/"))), function($skip, $loc, $0, $1, $2, $3) {
9056
9205
  var modifier = $1, dot = $2;
9057
9206
  return {
9058
9207
  type: "AccessStart",
@@ -9250,28 +9399,49 @@ ${js}`
9250
9399
  }
9251
9400
  var ShortArrowParameters$0 = (0, import_lib2.$TV)((0, import_lib2.$C)(ObjectBindingPattern, ArrayBindingPattern), function($skip, $loc, $0, $1) {
9252
9401
  var binding = $0;
9253
- let { typeSuffix } = binding;
9254
- return {
9402
+ let { typeSuffix } = binding, parameters = [{
9255
9403
  type: "Parameter",
9256
9404
  children: [binding, typeSuffix],
9257
9405
  names: binding.names,
9258
9406
  typeSuffix
9407
+ }];
9408
+ return {
9409
+ type: "Parameters",
9410
+ children: ["(", parameters, ")"],
9411
+ parameters
9259
9412
  };
9260
9413
  });
9261
9414
  function ShortArrowParameters(ctx, state2) {
9262
9415
  return (0, import_lib2.$EVENT)(ctx, state2, "ShortArrowParameters", ShortArrowParameters$0);
9263
9416
  }
9264
- var ArrowParameters$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ShortArrowParameters), function($skip, $loc, $0, $1) {
9265
- let parameters = [$1];
9417
+ var ESArrowIdentifierParameters$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ESArrowFunctionEnabled, Identifier), function($skip, $loc, $0, $1, $2) {
9418
+ var id = $2;
9419
+ let parameters = [{
9420
+ type: "Parameter",
9421
+ children: [id],
9422
+ names: id.names,
9423
+ binding: id,
9424
+ typeSuffix: void 0,
9425
+ initializer: void 0,
9426
+ delim: void 0
9427
+ }];
9266
9428
  return {
9267
9429
  type: "Parameters",
9268
9430
  children: ["(", parameters, ")"],
9269
9431
  parameters
9270
9432
  };
9271
- }), ArrowParameters$1 = Parameters, ArrowParameters$$ = [ArrowParameters$0, ArrowParameters$1];
9433
+ });
9434
+ function ESArrowIdentifierParameters(ctx, state2) {
9435
+ return (0, import_lib2.$EVENT)(ctx, state2, "ESArrowIdentifierParameters", ESArrowIdentifierParameters$0);
9436
+ }
9437
+ var ArrowParameters$0 = ESArrowIdentifierParameters, ArrowParameters$1 = ShortArrowParameters, ArrowParameters$2 = Parameters, ArrowParameters$$ = [ArrowParameters$0, ArrowParameters$1, ArrowParameters$2];
9272
9438
  function ArrowParameters(ctx, state2) {
9273
9439
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ArrowParameters", ArrowParameters$$);
9274
9440
  }
9441
+ var ThinArrowParameters$0 = ShortArrowParameters, ThinArrowParameters$1 = Parameters, ThinArrowParameters$$ = [ThinArrowParameters$0, ThinArrowParameters$1];
9442
+ function ThinArrowParameters(ctx, state2) {
9443
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "ThinArrowParameters", ThinArrowParameters$$);
9444
+ }
9275
9445
  var NonEmptyParameters$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(TypeParameters), OpenParen, ParameterList, (0, import_lib2.$S)(__, CloseParen)), function($skip, $loc, $0, $1, $2, $3, $4) {
9276
9446
  var tp = $1, open = $2, parameters = $3, close = $4;
9277
9447
  return {
@@ -9343,7 +9513,7 @@ ${js}`
9343
9513
  function ParameterElement(ctx, state2) {
9344
9514
  return (0, import_lib2.$EVENT)(ctx, state2, "ParameterElement", ParameterElement$0);
9345
9515
  }
9346
- var ParameterElementDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ParameterElementDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R13, "ParameterElementDelimiter /[)\\]}]/")))), ParameterElementDelimiter$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function(value) {
9516
+ var ParameterElementDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ParameterElementDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R14, "ParameterElementDelimiter /[)\\]}]/")))), ParameterElementDelimiter$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function(value) {
9347
9517
  return value[1];
9348
9518
  }), ParameterElementDelimiter$$ = [ParameterElementDelimiter$0, ParameterElementDelimiter$1, ParameterElementDelimiter$2];
9349
9519
  function ParameterElementDelimiter(ctx, state2) {
@@ -9357,11 +9527,12 @@ ${js}`
9357
9527
  return (0, import_lib2.$EVENT)(ctx, state2, "BindingIdentifier", BindingIdentifier$0);
9358
9528
  }
9359
9529
  var NWBindingIdentifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(At, AtIdentifierRef), function($skip, $loc, $0, $1, $2) {
9360
- var ref = $2;
9530
+ var at = $1, ref = $2;
9361
9531
  return {
9362
9532
  type: "AtBinding",
9363
9533
  children: [ref],
9364
9534
  ref,
9535
+ at,
9365
9536
  names: []
9366
9537
  };
9367
9538
  }), NWBindingIdentifier$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, AtIdentifierRef), function($skip, $loc, $0, $1, $2) {
@@ -9393,35 +9564,40 @@ ${js}`
9393
9564
  return {
9394
9565
  type: "PinPattern",
9395
9566
  children: [expression],
9396
- expression
9567
+ expression,
9568
+ typeSuffix: typeSuffixForExpression(expression)
9397
9569
  };
9398
9570
  }), PinPattern$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Caret, SingleLineExpressionWithIndentedApplicationForbidden), function($skip, $loc, $0, $1, $2) {
9399
9571
  var expression = $2;
9400
9572
  return {
9401
9573
  type: "PinPattern",
9402
9574
  children: [expression],
9403
- expression
9575
+ expression,
9576
+ typeSuffix: typeSuffixForExpression(expression)
9404
9577
  };
9405
9578
  }), PinPattern$2 = (0, import_lib2.$TV)(ActualMemberExpression, function($skip, $loc, $0, $1) {
9406
9579
  var expression = $0;
9407
9580
  return {
9408
9581
  type: "PinPattern",
9409
9582
  children: [expression],
9410
- expression
9583
+ expression,
9584
+ typeSuffix: typeSuffixForExpression(expression)
9411
9585
  };
9412
- }), PinPattern$3 = (0, import_lib2.$TV)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R14, "PinPattern /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1) {
9586
+ }), PinPattern$3 = (0, import_lib2.$TV)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R15, "PinPattern /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1) {
9413
9587
  var expression = $0;
9414
9588
  return {
9415
9589
  type: "PinPattern",
9416
9590
  children: [expression],
9417
- expression
9591
+ expression,
9592
+ typeSuffix: typeSuffixForExpression(expression)
9418
9593
  };
9419
9594
  }), PinPattern$4 = (0, import_lib2.$TV)(Undefined, function($skip, $loc, $0, $1) {
9420
9595
  var expression = $0;
9421
9596
  return {
9422
9597
  type: "PinPattern",
9423
9598
  children: [expression],
9424
- expression
9599
+ expression,
9600
+ typeSuffix: typeSuffixForExpression(expression)
9425
9601
  };
9426
9602
  }), PinPattern$$ = [PinPattern$0, PinPattern$1, PinPattern$2, PinPattern$3, PinPattern$4];
9427
9603
  function PinPattern(ctx, state2) {
@@ -9582,7 +9758,8 @@ ${js}`
9582
9758
  value: {
9583
9759
  type: "PinPattern",
9584
9760
  children: [binding],
9585
- expression: binding
9761
+ expression: binding,
9762
+ typeSuffix: typeSuffixForExpression(binding)
9586
9763
  }
9587
9764
  };
9588
9765
  }), BindingProperty$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), BindingIdentifier, (0, import_lib2.$E)(Caret), (0, import_lib2.$E)(BindingTypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
@@ -9755,7 +9932,8 @@ ${js}`
9755
9932
  };
9756
9933
  }), FunctionExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(ArrowFunction), OpenParen, __, BinaryOp, __, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
9757
9934
  var open = $2, ws1 = $3, op = $4, ws2 = $5, close = $6;
9758
- if (op.special && op.call && !op.negated) return op.call;
9935
+ if (op.special && op.call && !op.negated)
9936
+ return op.call;
9759
9937
  ws1 || (ws1 = op.spaced ? [" "] : []), ws2 || (ws2 = op.spaced ? [" "] : []);
9760
9938
  let refA = makeRef("a"), refB = makeRef("b"), body = processBinaryOpExpression([refA, [
9761
9939
  [ws1, op, ws2, refB]
@@ -9827,7 +10005,7 @@ ${js}`
9827
10005
  children: [open, fn, close],
9828
10006
  expression: fn
9829
10007
  };
9830
- }), FunctionExpression$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R15, "FunctionExpression /\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S/")), (0, import_lib2.$N)((0, import_lib2.$S)(Placeholder, (0, import_lib2.$C)(TypePostfix, BinaryOpRHS))), BinaryOp, __, NonPipelineAssignmentExpression, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
10008
+ }), FunctionExpression$5 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenParen, __, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R16, "FunctionExpression /\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S/")), (0, import_lib2.$N)((0, import_lib2.$S)(Placeholder, (0, import_lib2.$C)(TypePostfix, BinaryOpRHS))), BinaryOp, __, NonPipelineAssignmentExpression, CloseParen), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
9831
10009
  var open = $1, ws1 = $2, op = $5, ws2 = $6, rhs = $7, close = $8;
9832
10010
  ws1 || (ws1 = op.spaced ? [" "] : []), ws2 || (ws2 = op.spaced ? [" "] : []);
9833
10011
  let refA = makeRef("a"), fn = makeAmpersandFunction({
@@ -9863,7 +10041,8 @@ ${js}`
9863
10041
  var op = $1, w1 = $2, id = $3, behavior = $4, ids = $5;
9864
10042
  let children = [];
9865
10043
  return setOperatorBehavior(id.name, behavior), behavior?.error && children.push(behavior.error), ids.forEach(([, , id2, behavior2]) => {
9866
- setOperatorBehavior(id2.name, behavior2), behavior2?.error && children.push(behavior2.error);
10044
+ if (setOperatorBehavior(id2.name, behavior2), behavior2?.error)
10045
+ return children.push(behavior2.error);
9867
10046
  }), {
9868
10047
  id,
9869
10048
  children
@@ -9928,7 +10107,7 @@ ${js}`
9928
10107
  function OperatorAssociativity(ctx, state2) {
9929
10108
  return (0, import_lib2.$EVENT)(ctx, state2, "OperatorAssociativity", OperatorAssociativity$0);
9930
10109
  }
9931
- var ThinArrowFunction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, _)), ArrowParameters, (0, import_lib2.$E)(ReturnTypeSuffix), (0, import_lib2.$E)(_), ThinArrow, (0, import_lib2.$C)(BracedObjectSingleLineStatements, NoCommaBracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10110
+ var ThinArrowFunction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Async, _)), ThinArrowParameters, (0, import_lib2.$E)(ReturnTypeSuffix), (0, import_lib2.$E)(_), ThinArrow, (0, import_lib2.$C)(BracedObjectSingleLineStatements, NoCommaBracedOrEmptyBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
9932
10111
  var async = $1, parameters = $2, returnType = $3, ws = $4, arrow = $5, block = $6;
9933
10112
  async || (async = []);
9934
10113
  let generator = [];
@@ -10006,7 +10185,8 @@ ${js}`
10006
10185
  }
10007
10186
  var ImplicitNestedBlock$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertOpenBrace, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(NestedBlockStatements, InsertNewline, InsertIndent, InsertCloseBrace)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
10008
10187
  var open = $2;
10009
- if (!$4) return $skip;
10188
+ if (!$4)
10189
+ return $skip;
10010
10190
  let [block, ...tail] = $4;
10011
10191
  return {
10012
10192
  ...block,
@@ -10036,9 +10216,9 @@ ${js}`
10036
10216
  function BareNestedBlock(ctx, state2) {
10037
10217
  return (0, import_lib2.$EVENT)(ctx, state2, "BareNestedBlock", BareNestedBlock$0);
10038
10218
  }
10039
- var BareBlock$0 = BareNestedBlock, BareBlock$1 = ExplicitBlock, BareBlock$2 = ThenClause, BareBlock$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$N)(EOS), Statement), function($skip, $loc, $0, $1, $2, $3) {
10040
- var ws = $1, s = $3;
10041
- let expressions = [[ws, s]];
10219
+ var BareBlock$0 = BareNestedBlock, BareBlock$1 = ExplicitBlock, BareBlock$2 = ThenClause, BareBlock$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$N)(EOS), Statement, (0, import_lib2.$E)(SemicolonDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
10220
+ var ws = $1, s = $3, semi = $4;
10221
+ let expressions = [semi ? [ws, s, semi] : [ws, s]];
10042
10222
  return {
10043
10223
  type: "BlockStatement",
10044
10224
  expressions,
@@ -10186,7 +10366,7 @@ ${js}`
10186
10366
  return value[1];
10187
10367
  }), NonSingleBracedBlock$1 = ImplicitNestedBlock, NonSingleBracedBlock$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenBrace, (0, import_lib2.$C)(NestedBulletedArray, NestedImplicitObjectLiteral), InsertCloseBrace), function($skip, $loc, $0, $1, $2, $3) {
10188
10368
  var o = $1, s = $2, c = $3;
10189
- let expressions = [s];
10369
+ let expressions = [["", s]];
10190
10370
  return {
10191
10371
  type: "BlockStatement",
10192
10372
  expressions,
@@ -10289,7 +10469,7 @@ ${js}`
10289
10469
  function BlockStatementPart(ctx, state2) {
10290
10470
  return (0, import_lib2.$EVENT)(ctx, state2, "BlockStatementPart", BlockStatementPart$0);
10291
10471
  }
10292
- var Literal$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R16, `Literal /(?=[0-9.'"tfyno])/`), LiteralContent), function($skip, $loc, $0, $1, $2) {
10472
+ var Literal$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R17, `Literal /(?=[0-9.'"tfyno])/`), LiteralContent), function($skip, $loc, $0, $1, $2) {
10293
10473
  var literal = $2;
10294
10474
  return {
10295
10475
  type: "Literal",
@@ -10311,7 +10491,7 @@ ${js}`
10311
10491
  function NullLiteral(ctx, state2) {
10312
10492
  return (0, import_lib2.$EVENT)(ctx, state2, "NullLiteral", NullLiteral$0);
10313
10493
  }
10314
- var BooleanLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R17, "BooleanLiteral /(?=true|false|yes|no|on|off)/"), _BooleanLiteral), function(value) {
10494
+ var BooleanLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R18, "BooleanLiteral /(?=true|false|yes|no|on|off)/"), _BooleanLiteral), function(value) {
10315
10495
  return value[1];
10316
10496
  });
10317
10497
  function BooleanLiteral(ctx, state2) {
@@ -10371,14 +10551,14 @@ ${js}`
10371
10551
  function SymbolElement(ctx, state2) {
10372
10552
  return (0, import_lib2.$EVENT)(ctx, state2, "SymbolElement", SymbolElement$0);
10373
10553
  }
10374
- var Identifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R18, "Identifier /(?=\\p{ID_Start}|[_$])/"), (0, import_lib2.$N)(ReservedWord), IdentifierName), function(value) {
10554
+ var Identifier$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R19, "Identifier /(?=\\p{ID_Start}|[_$])/"), (0, import_lib2.$N)(ReservedWord), IdentifierName), function(value) {
10375
10555
  var id = value[2];
10376
10556
  return id;
10377
10557
  });
10378
10558
  function Identifier(ctx, state2) {
10379
10559
  return (0, import_lib2.$EVENT)(ctx, state2, "Identifier", Identifier$0);
10380
10560
  }
10381
- var IdentifierName$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R19, "IdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
10561
+ var IdentifierName$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R20, "IdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
10382
10562
  return {
10383
10563
  type: "Identifier",
10384
10564
  name: $0,
@@ -10400,7 +10580,7 @@ ${js}`
10400
10580
  function UpcomingAssignment(ctx, state2) {
10401
10581
  return (0, import_lib2.$EVENT)(ctx, state2, "UpcomingAssignment", UpcomingAssignment$0);
10402
10582
  }
10403
- var ArrayLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R20, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral), function(value) {
10583
+ var ArrayLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R21, "ArrayLiteral /(?=\\[|\\s*[.\u2022\\/])/"), _ArrayLiteral), function(value) {
10404
10584
  return value[1];
10405
10585
  });
10406
10586
  function ArrayLiteral(ctx, state2) {
@@ -10410,7 +10590,8 @@ ${js}`
10410
10590
  return value[0];
10411
10591
  }), _ArrayLiteral$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBracket, CloseBracket, ApplicationStart, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(NestedElementList, SingleLineElementList)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10412
10592
  var open = $1, close = $2, content = $5;
10413
- if (!content) return $skip;
10593
+ if (!content)
10594
+ return $skip;
10414
10595
  let last = content[content.length - 1], lastArray = Array.isArray(last) ? last : last.children;
10415
10596
  return isComma(lastArray[lastArray.length - 1]) && (lastArray = lastArray.slice(0, -1), Array.isArray(last) ? last = lastArray : last = { ...last, children: lastArray }, content = [...content.slice(0, -1), last]), {
10416
10597
  type: "ArrayExpression",
@@ -10419,13 +10600,14 @@ ${js}`
10419
10600
  };
10420
10601
  }), _ArrayLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBracket, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(ArrayLiteralContent, __, CloseBracket)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
10421
10602
  var open = $1;
10422
- if (!$3) return $skip;
10603
+ if (!$3)
10604
+ return $skip;
10423
10605
  let [content, ws, close] = $3;
10424
10606
  if (content.type === "RangeExpression")
10425
10607
  return prepend(ws, content);
10426
- let children;
10427
- Array.isArray(content) ? children = [open, ...content, ...ws, close] : children = [open, content, ...ws, close];
10428
- let names = children.flatMap((c) => c?.names || []);
10608
+ let ref2;
10609
+ Array.isArray(content) ? ref2 = [open, ...content, ...ws, close] : ref2 = [open, content, ...ws, close];
10610
+ let children = ref2, names = children.flatMap((c) => c?.names || []);
10429
10611
  return {
10430
10612
  type: "ArrayExpression",
10431
10613
  children,
@@ -10483,7 +10665,7 @@ ${js}`
10483
10665
  function OptionalRangeEnd(ctx, state2) {
10484
10666
  return (0, import_lib2.$EVENT_C)(ctx, state2, "OptionalRangeEnd", OptionalRangeEnd$$);
10485
10667
  }
10486
- var RangeEnd$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R21, "RangeEnd /([<>])(=?)|([\u2264\u2265])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
10668
+ var RangeEnd$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R22, "RangeEnd /([<>])(=?)|([\u2264\u2265])/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
10487
10669
  let dir = $1, equal = $2, unicode = $3;
10488
10670
  return unicode && (equal = "=", unicode === "\u2264" ? dir = "<" : unicode === "\u2265" && (dir = ">")), {
10489
10671
  increasing: dir === "<",
@@ -10612,7 +10794,8 @@ ${js}`
10612
10794
  }
10613
10795
  var NestedBulletedArray$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)(InsertSpace, InsertOpenBracket), PushIndent, AllowPipeline, (0, import_lib2.$Q)(NestedArrayBullet), RestorePipeline, InsertCloseBracket, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
10614
10796
  var open = $1, content = $4, close = $6;
10615
- if (!content.length) return $skip;
10797
+ if (!content.length)
10798
+ return $skip;
10616
10799
  content = content.flat();
10617
10800
  let last = content[content.length - 1];
10618
10801
  return last.children?.at(-1)?.implicit && (last.children = last.children.slice(0, -1)), {
@@ -10625,7 +10808,8 @@ ${js}`
10625
10808
  }
10626
10809
  var BulletedArray$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenBracket, (0, import_lib2.$E)((0, import_lib2.$S)(ArrayBullet, (0, import_lib2.$Q)(NestedArrayBullet))), InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3) {
10627
10810
  var open = $1, content = $2, close = $3;
10628
- if (!content) return $skip;
10811
+ if (!content)
10812
+ return $skip;
10629
10813
  content = [
10630
10814
  ...trimFirstSpace(content[0]),
10631
10815
  // replace first space with bracket
@@ -10649,9 +10833,11 @@ ${js}`
10649
10833
  }
10650
10834
  var ArrayBullet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(BulletIndent, (0, import_lib2.$E)((0, import_lib2.$S)(ElementList, ArrayBulletDelimiter)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
10651
10835
  var bullet = $1, content = $2;
10652
- if (!content) return $skip;
10836
+ if (!content)
10837
+ return $skip;
10653
10838
  let [list, delimiter] = content;
10654
- if (!list.length) return $skip;
10839
+ if (!list.length)
10840
+ return $skip;
10655
10841
  if (list = list.slice(), list[0] = prepend(bullet, list[0]), delimiter) {
10656
10842
  let last = list.length - 1;
10657
10843
  list[last] = append(list[last], delimiter);
@@ -10678,7 +10864,7 @@ ${js}`
10678
10864
  function BulletIndent(ctx, state2) {
10679
10865
  return (0, import_lib2.$EVENT)(ctx, state2, "BulletIndent", BulletIndent$0);
10680
10866
  }
10681
- var Bullet$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L47, 'Bullet "\u2022"'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R22, "Bullet /[ \\t]*/"))), Bullet$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'Bullet "."'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R23, "Bullet /[ \\t]+/"))), Bullet$$ = [Bullet$0, Bullet$1];
10867
+ var Bullet$0 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L47, 'Bullet "\u2022"'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R23, "Bullet /[ \\t]*/"))), Bullet$1 = (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'Bullet "."'), (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R24, "Bullet /[ \\t]+/"))), Bullet$$ = [Bullet$0, Bullet$1];
10682
10868
  function Bullet(ctx, state2) {
10683
10869
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Bullet", Bullet$$);
10684
10870
  }
@@ -10700,7 +10886,8 @@ ${js}`
10700
10886
  }
10701
10887
  var BracedObjectLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBrace, CloseBrace, ApplicationStart, AllowAll, (0, import_lib2.$E)((0, import_lib2.$C)(NestedPropertyDefinitions, SingleLineObjectProperties)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
10702
10888
  var open = $1, close = $2, properties = $5;
10703
- if (!properties?.length) return $skip;
10889
+ if (!properties?.length)
10890
+ return $skip;
10704
10891
  let last = properties[properties.length - 1];
10705
10892
  return last.delim?.implicit && (last = {
10706
10893
  ...last,
@@ -10714,7 +10901,8 @@ ${js}`
10714
10901
  };
10715
10902
  }), BracedObjectLiteral$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(OpenBrace, AllowAll, (0, import_lib2.$E)((0, import_lib2.$S)(BracedObjectLiteralContent, __, CloseBrace)), RestoreAll), function($skip, $loc, $0, $1, $2, $3, $4) {
10716
10903
  var open = $1;
10717
- if (!$3) return $skip;
10904
+ if (!$3)
10905
+ return $skip;
10718
10906
  let [properties, ...close] = $3;
10719
10907
  return {
10720
10908
  type: "ObjectExpression",
@@ -10850,7 +11038,7 @@ ${js}`
10850
11038
  function InlineObjectPropertyDelimiter(ctx, state2) {
10851
11039
  return (0, import_lib2.$EVENT)(ctx, state2, "InlineObjectPropertyDelimiter", InlineObjectPropertyDelimiter$0);
10852
11040
  }
10853
- var ObjectPropertyDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ObjectPropertyDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R13, "ObjectPropertyDelimiter /[)\\]}]/")))), ObjectPropertyDelimiter$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function($skip, $loc, $0, $1, $2) {
11041
+ var ObjectPropertyDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ObjectPropertyDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R14, "ObjectPropertyDelimiter /[)\\]}]/")))), ObjectPropertyDelimiter$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function($skip, $loc, $0, $1, $2) {
10854
11042
  return { ...$2, implicit: !0 };
10855
11043
  }), ObjectPropertyDelimiter$$ = [ObjectPropertyDelimiter$0, ObjectPropertyDelimiter$1, ObjectPropertyDelimiter$2];
10856
11044
  function ObjectPropertyDelimiter(ctx, state2) {
@@ -10880,7 +11068,7 @@ ${js}`
10880
11068
  }), PropertyDefinition$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), NamedProperty), function($skip, $loc, $0, $1, $2) {
10881
11069
  var ws = $1, prop = $2;
10882
11070
  return prepend(ws, prop);
10883
- }), PropertyDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R24, "PropertyDefinition /[!+-]?/")), PropertyName, (0, import_lib2.$Y)(ObjectPropertyDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
11071
+ }), PropertyDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R25, "PropertyDefinition /[!+-]?/")), PropertyName, (0, import_lib2.$Y)(ObjectPropertyDelimiter)), function($skip, $loc, $0, $1, $2, $3, $4) {
10884
11072
  var ws = $1, toggle = $2, id = $3;
10885
11073
  if (toggle) {
10886
11074
  let value = toggle === "+" ? "true" : "false";
@@ -10904,7 +11092,7 @@ ${js}`
10904
11092
  var ws = $1, def = $2;
10905
11093
  return def.type === "MultiMethodDefinition" ? {
10906
11094
  children: def.children.flatMap((c, i) => i ? [",", c] : [c])
10907
- } : !def.block || def.block.empty ? $skip : prepend(ws, def);
11095
+ } : def.block && !def.block.empty ? prepend(ws, def) : $skip;
10908
11096
  }), PropertyDefinition$4 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), DotDotDot, Expression), function($skip, $loc, $0, $1, $2, $3) {
10909
11097
  var ws = $1, dots = $2, exp = $3;
10910
11098
  return {
@@ -10916,7 +11104,7 @@ ${js}`
10916
11104
  };
10917
11105
  }), PropertyDefinition$5 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$N)((0, import_lib2.$C)(EOS, (0, import_lib2.$EXPECT)($L7, 'PropertyDefinition "."'))), (0, import_lib2.$Q)(UnaryOp), CallExpression, (0, import_lib2.$E)(UnaryPostfix)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
10918
11106
  var ws = $1, pre = $3, value = $4, post = $5;
10919
- if (!pre.length && !post)
11107
+ if (!(pre.length || post))
10920
11108
  switch (value.type) {
10921
11109
  // `{identifier}` remains `{identifier}`, the one shorthand JS supports
10922
11110
  case "Identifier":
@@ -10932,7 +11120,8 @@ ${js}`
10932
11120
  }), [first, ...value.properties.slice(1)];
10933
11121
  }
10934
11122
  let last = lastAccessInCallExpression(value);
10935
- if (!last) return $skip;
11123
+ if (!last)
11124
+ return $skip;
10936
11125
  let name, ref, refAssignment, { expression, type } = last;
10937
11126
  if (type === "Index")
10938
11127
  ({ ref, refAssignment } = maybeRefAssignment(expression)), refAssignment ? (name = {
@@ -10950,8 +11139,19 @@ ${js}`
10950
11139
  children: last.children,
10951
11140
  implicit: !0
10952
11141
  };
10953
- else if ({ name } = last, !name) return $skip;
10954
- return name[0] === "#" && (name = name.slice(1)), {
11142
+ else if ({ name } = last, !name)
11143
+ return $skip;
11144
+ if (name[0] === "#" && (name = name.slice(1)), !pre.length && post?.token === "?" && value.type === "Identifier") {
11145
+ let dots = { $loc, token: "..." }, paren = parenthesizeExpression({ children: ["(", value, " != null) && {", name, "}"] });
11146
+ return {
11147
+ type: "SpreadProperty",
11148
+ children: [ws, dots, paren],
11149
+ names: value.names,
11150
+ dots,
11151
+ value: paren
11152
+ };
11153
+ }
11154
+ return {
10955
11155
  type: "Property",
10956
11156
  children: [ws, name, ": ", processUnaryExpression(pre, value, post)],
10957
11157
  name,
@@ -10963,7 +11163,17 @@ ${js}`
10963
11163
  function PropertyDefinition(ctx, state2) {
10964
11164
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PropertyDefinition", PropertyDefinition$$);
10965
11165
  }
10966
- var NamedProperty$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PropertyName, (0, import_lib2.$E)(_), Colon, PostfixedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
11166
+ var NamedProperty$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PropertyName, (0, import_lib2.$EXPECT)($L6, 'NamedProperty "?"'), (0, import_lib2.$E)(_), Colon, (0, import_lib2.$E)(_), PostfixedExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
11167
+ var name = $1, exp = $6;
11168
+ let { ref, refAssignment } = maybeRefAssignment(exp), checkExp = refAssignment ? parenthesizeExpression(refAssignment) : exp, dots = { $loc, token: "..." }, paren = parenthesizeExpression({ children: [checkExp, " != null ? {", name, ": ", ref, "} : {}"] });
11169
+ return {
11170
+ type: "SpreadProperty",
11171
+ children: [dots, paren],
11172
+ names: exp.names || [],
11173
+ dots,
11174
+ value: paren
11175
+ };
11176
+ }), NamedProperty$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(PropertyName, (0, import_lib2.$E)(_), Colon, PostfixedExpression), function($skip, $loc, $0, $1, $2, $3, $4) {
10967
11177
  var name = $1, exp = $4;
10968
11178
  return {
10969
11179
  type: "Property",
@@ -10972,9 +11182,9 @@ ${js}`
10972
11182
  names: exp.names || [],
10973
11183
  value: exp
10974
11184
  };
10975
- });
11185
+ }), NamedProperty$$ = [NamedProperty$0, NamedProperty$1];
10976
11186
  function NamedProperty(ctx, state2) {
10977
- return (0, import_lib2.$EVENT)(ctx, state2, "NamedProperty", NamedProperty$0);
11187
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "NamedProperty", NamedProperty$$);
10978
11188
  }
10979
11189
  var SnugNamedProperty$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(PropertyName, Colon, MaybeNestedExpression, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$S)((0, import_lib2.$E)(_), PostfixStatement), (0, import_lib2.$Y)((0, import_lib2.$S)(Nested, NamedProperty))))), function($skip, $loc, $0, $1, $2, $3, $4) {
10980
11190
  var name = $1, colon = $2, expression = $3, post = $4;
@@ -10988,7 +11198,7 @@ ${js}`
10988
11198
  function SnugNamedProperty(ctx, state2) {
10989
11199
  return (0, import_lib2.$EVENT)(ctx, state2, "SnugNamedProperty", SnugNamedProperty$0);
10990
11200
  }
10991
- var PropertyName$0 = NumericLiteral, PropertyName$1 = ComputedPropertyName, PropertyName$2 = StringLiteral, PropertyName$3 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($L23, 'PropertyName "-"'), (0, import_lib2.$EXPECT)($R25, "PropertyName /(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"))), function($skip, $loc, $0, $1) {
11201
+ var PropertyName$0 = NumericLiteral, PropertyName$1 = ComputedPropertyName, PropertyName$2 = StringLiteral, PropertyName$3 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(IdentifierName), (0, import_lib2.$EXPECT)($L23, 'PropertyName "-"'), (0, import_lib2.$EXPECT)($R26, "PropertyName /(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"))), function($skip, $loc, $0, $1) {
10992
11202
  return {
10993
11203
  token: `"${$1}"`,
10994
11204
  $loc
@@ -11012,7 +11222,7 @@ ${js}`
11012
11222
  expression,
11013
11223
  implicit: !0
11014
11224
  };
11015
- }), ComputedPropertyName$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenBracket, (0, import_lib2.$EXPECT)($R14, "ComputedPropertyName /[+-]/"), NumericLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
11225
+ }), ComputedPropertyName$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenBracket, (0, import_lib2.$EXPECT)($R15, "ComputedPropertyName /[+-]/"), NumericLiteral, InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3, $4) {
11016
11226
  let expression = [$2, $3];
11017
11227
  return {
11018
11228
  type: "ComputedPropertyName",
@@ -11062,7 +11272,8 @@ ${js}`
11062
11272
  };
11063
11273
  }), MethodDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(GetOrSet, (0, import_lib2.$E)(_), ForbidIndentedApplication, (0, import_lib2.$E)((0, import_lib2.$S)(MemberBase, (0, import_lib2.$Q)(CallExpressionRest), (0, import_lib2.$E)(ReturnTypeSuffix))), RestoreIndentedApplication, (0, import_lib2.$E)(BracedBlock)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
11064
11274
  var kind = $1, ws = $2, content = $4, block = $6;
11065
- if (!content) return $skip;
11275
+ if (!content)
11276
+ return $skip;
11066
11277
  let [base, rest, returnType] = content, value = [base, rest];
11067
11278
  if (!rest.length) {
11068
11279
  let name2;
@@ -11070,7 +11281,8 @@ ${js}`
11070
11281
  let lastAccess2 = lastAccessInCallExpression(base);
11071
11282
  lastAccess2 && ({ name: name2 } = lastAccess2);
11072
11283
  }
11073
- if (name2 || ({ name: name2 } = base), !name2) return $skip;
11284
+ if (name2 || ({ name: name2 } = base), !name2)
11285
+ return $skip;
11074
11286
  name2[0] === "#" && (name2 = name2.slice(1));
11075
11287
  let autoReturn = !block || base.type !== "Identifier";
11076
11288
  return makeGetterMethod(name2, ws, base, returnType, block, kind, autoReturn);
@@ -11267,7 +11479,7 @@ ${js}`
11267
11479
  return "??=";
11268
11480
  }), AssignmentOpSymbol$23 = (0, import_lib2.$T)((0, import_lib2.$EXPECT)($L72, 'AssignmentOpSymbol "?="'), function(value) {
11269
11481
  return "??=";
11270
- }), AssignmentOpSymbol$24 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L3, 'AssignmentOpSymbol "="'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R26, "AssignmentOpSymbol /[=>]/"))), function(value) {
11482
+ }), AssignmentOpSymbol$24 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L3, 'AssignmentOpSymbol "="'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R27, "AssignmentOpSymbol /[=>]/"))), function(value) {
11271
11483
  return value[0];
11272
11484
  }), AssignmentOpSymbol$25 = (0, import_lib2.$T)((0, import_lib2.$S)(CoffeeWordAssignmentOp), function(value) {
11273
11485
  return value[0];
@@ -11302,7 +11514,7 @@ ${js}`
11302
11514
  function IdentifierBinaryOp(ctx, state2) {
11303
11515
  return (0, import_lib2.$EVENT)(ctx, state2, "IdentifierBinaryOp", IdentifierBinaryOp$0);
11304
11516
  }
11305
- var BinaryOp$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R27, "BinaryOp /(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])/"), _BinaryOp), function(value) {
11517
+ var BinaryOp$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R28, "BinaryOp /(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])/"), _BinaryOp), function(value) {
11306
11518
  var op = value[1];
11307
11519
  return op;
11308
11520
  });
@@ -11398,7 +11610,7 @@ ${js}`
11398
11610
  special: !0,
11399
11611
  prec: "^^"
11400
11612
  };
11401
- }), BinaryOpSymbol$36 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($R28, "BinaryOpSymbol /!\\^\\^?/"), (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L109, 'BinaryOpSymbol "xnor"'), NonIdContinue)), function($skip, $loc, $0, $1) {
11613
+ }), BinaryOpSymbol$36 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$EXPECT)($R29, "BinaryOpSymbol /!\\^\\^?/"), (0, import_lib2.$S)((0, import_lib2.$EXPECT)($L109, 'BinaryOpSymbol "xnor"'), NonIdContinue)), function($skip, $loc, $0, $1) {
11402
11614
  return {
11403
11615
  call: getHelperRef("xnor"),
11404
11616
  special: !0,
@@ -11533,16 +11745,16 @@ ${js}`
11533
11745
  function Xor(ctx, state2) {
11534
11746
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Xor", Xor$$);
11535
11747
  }
11536
- var Xnor$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R28, "Xnor /!\\^\\^?/")), Xnor$1 = (0, import_lib2.$EXPECT)($L109, 'Xnor "xnor"'), Xnor$$ = [Xnor$0, Xnor$1];
11748
+ var Xnor$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R29, "Xnor /!\\^\\^?/")), Xnor$1 = (0, import_lib2.$EXPECT)($L109, 'Xnor "xnor"'), Xnor$$ = [Xnor$0, Xnor$1];
11537
11749
  function Xnor(ctx, state2) {
11538
11750
  return (0, import_lib2.$EVENT_C)(ctx, state2, "Xnor", Xnor$$);
11539
11751
  }
11540
- var UnaryOp$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R29, "UnaryOp /(?!\\+\\+|--)[!~+-](?!\\s)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11752
+ var UnaryOp$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R30, "UnaryOp /(?!\\+\\+|--)[!~+-](?!\\s)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11541
11753
  return { $loc, token: $0 };
11542
- }), UnaryOp$1 = AwaitOp, UnaryOp$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(Delete, Void, Typeof), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R30, "UnaryOp /[:.]/")), (0, import_lib2.$E)(_)), function($skip, $loc, $0, $1, $2, $3) {
11754
+ }), UnaryOp$1 = AwaitOp, UnaryOp$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)(Delete, Void, Typeof), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R31, "UnaryOp /[:.]/")), (0, import_lib2.$E)(_)), function($skip, $loc, $0, $1, $2, $3) {
11543
11755
  var op = $1, ws = $3;
11544
11756
  return ws ? [op, ws] : [op, [" "]];
11545
- }), UnaryOp$3 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R30, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'UnaryOp " "')), (0, import_lib2.$E)(_)), function(value) {
11757
+ }), UnaryOp$3 = (0, import_lib2.$T)((0, import_lib2.$S)(Not, (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R31, "UnaryOp /[:.]/")), (0, import_lib2.$E)((0, import_lib2.$EXPECT)($L17, 'UnaryOp " "')), (0, import_lib2.$E)(_)), function(value) {
11546
11758
  return [value[0], value[3]];
11547
11759
  }), UnaryOp$$ = [UnaryOp$0, UnaryOp$1, UnaryOp$2, UnaryOp$3];
11548
11760
  function UnaryOp(ctx, state2) {
@@ -11609,7 +11821,7 @@ ${js}`
11609
11821
  function PostfixedCommaExpression(ctx, state2) {
11610
11822
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PostfixedCommaExpression", PostfixedCommaExpression$$);
11611
11823
  }
11612
- var PostfixStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R31, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement), function(value) {
11824
+ var PostfixStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R32, "PostfixStatement /(?=for|if|loop|unless|until|while)/"), _PostfixStatement), function(value) {
11613
11825
  return value[1];
11614
11826
  });
11615
11827
  function PostfixStatement(ctx, state2) {
@@ -11691,7 +11903,7 @@ ${js}`
11691
11903
  name: id.name,
11692
11904
  children: [id]
11693
11905
  };
11694
- }), LabelIdentifier$1 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R32, "LabelIdentifier /(?:loop|while|until|for|do)(?!\\p{ID_Continue})/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11906
+ }), LabelIdentifier$1 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R33, "LabelIdentifier /(?:loop|while|until|for|do)(?!\\p{ID_Continue})/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
11695
11907
  return {
11696
11908
  type: "Label",
11697
11909
  special: $0,
@@ -11757,7 +11969,7 @@ ${js}`
11757
11969
  function IfClause(ctx, state2) {
11758
11970
  return (0, import_lib2.$EVENT)(ctx, state2, "IfClause", IfClause$0);
11759
11971
  }
11760
- var IterationStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R33, "IterationStatement /(?=loop|comptime|do|for|until|while)/"), _IterationStatement), function(value) {
11972
+ var IterationStatement$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R34, "IterationStatement /(?=loop|comptime|do|for|until|while)/"), _IterationStatement), function(value) {
11761
11973
  return value[1];
11762
11974
  });
11763
11975
  function IterationStatement(ctx, state2) {
@@ -11917,7 +12129,8 @@ ${js}`
11917
12129
  }
11918
12130
  var ForStatementControlWithWhen$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForStatementControlWithReduction, (0, import_lib2.$E)(WhenCondition)), function($skip, $loc, $0, $1, $2) {
11919
12131
  var control = $1, condition = $2;
11920
- if (!condition) return control;
12132
+ if (!condition)
12133
+ return control;
11921
12134
  let expressions = [["", {
11922
12135
  type: "ContinueStatement",
11923
12136
  children: ["continue"]
@@ -12142,17 +12355,19 @@ ${js}`
12142
12355
  var SwitchStatement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Switch, ForbidNewlineBinaryOp, (0, import_lib2.$E)((0, import_lib2.$C)(EmptyCondition, Condition)), RestoreNewlineBinaryOp, CaseBlock), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
12143
12356
  var s = $1, condition = $3, caseBlock = $5;
12144
12357
  return condition ? (condition.type === "EmptyCondition" && caseBlock.clauses.forEach(({ cases }) => {
12145
- cases && cases.forEach((c) => {
12146
- let exp = c[1];
12147
- switch (exp.type) {
12148
- case "Identifier":
12149
- case "Literal":
12150
- c.splice(1, 0, "!");
12151
- break;
12152
- default:
12153
- c.splice(1, 1, "!(", exp, ")");
12154
- }
12155
- });
12358
+ if (cases)
12359
+ return cases.forEach((c) => {
12360
+ let exp = c[1];
12361
+ switch (exp.type) {
12362
+ case "Identifier":
12363
+ case "Literal": {
12364
+ c.splice(1, 0, "!");
12365
+ break;
12366
+ }
12367
+ default:
12368
+ c.splice(1, 1, "!(", exp, ")");
12369
+ }
12370
+ });
12156
12371
  }), {
12157
12372
  type: "SwitchStatement",
12158
12373
  children: [s, condition, caseBlock],
@@ -12259,7 +12474,8 @@ ${js}`
12259
12474
  }
12260
12475
  var PatternExpression$0 = BindingPattern, PatternExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(ForbidIndentedApplication, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(BindingIdentifier, (0, import_lib2.$E)(Caret))), (0, import_lib2.$P)(SingleLineBinaryOpRHS))), RestoreIndentedApplication), function($skip, $loc, $0, $1, $2, $3) {
12261
12476
  var body = $2;
12262
- if (!body) return $skip;
12477
+ if (!body)
12478
+ return $skip;
12263
12479
  let [named, rhs] = body, binding;
12264
12480
  return named && ([binding] = named), {
12265
12481
  type: "ConditionFragment",
@@ -12291,7 +12507,8 @@ ${js}`
12291
12507
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ImpliedColon", ImpliedColon$$);
12292
12508
  }
12293
12509
  var IgnoreColon$0 = (0, import_lib2.$TV)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$E)(_), Colon)), function($skip, $loc, $0, $1) {
12294
- if ($1) return $1[0];
12510
+ if ($1)
12511
+ return $1[0];
12295
12512
  });
12296
12513
  function IgnoreColon(ctx, state2) {
12297
12514
  return (0, import_lib2.$EVENT)(ctx, state2, "IgnoreColon", IgnoreColon$0);
@@ -12478,7 +12695,8 @@ ${js}`
12478
12695
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreClassImplicitCall", RestoreClassImplicitCall$0);
12479
12696
  }
12480
12697
  var ClassImplicitCallForbidden$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ClassImplicitCallForbidden ""'), function($skip, $loc, $0, $1) {
12481
- if (!state.classImplicitCallForbidden) return $skip;
12698
+ if (!state.classImplicitCallForbidden)
12699
+ return $skip;
12482
12700
  });
12483
12701
  function ClassImplicitCallForbidden(ctx, state2) {
12484
12702
  return (0, import_lib2.$EVENT)(ctx, state2, "ClassImplicitCallForbidden", ClassImplicitCallForbidden$0);
@@ -12502,7 +12720,8 @@ ${js}`
12502
12720
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreBracedApplication", RestoreBracedApplication$0);
12503
12721
  }
12504
12722
  var BracedApplicationAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'BracedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
12505
- if (config.verbose && console.log("forbidBracedApplication:", state.forbidBracedApplication), state.bracedApplicationForbidden) return $skip;
12723
+ if (config.verbose && console.log("forbidBracedApplication:", state.forbidBracedApplication), state.bracedApplicationForbidden)
12724
+ return $skip;
12506
12725
  });
12507
12726
  function BracedApplicationAllowed(ctx, state2) {
12508
12727
  return (0, import_lib2.$EVENT)(ctx, state2, "BracedApplicationAllowed", BracedApplicationAllowed$0);
@@ -12526,7 +12745,8 @@ ${js}`
12526
12745
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreIndentedApplication", RestoreIndentedApplication$0);
12527
12746
  }
12528
12747
  var IndentedApplicationAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'IndentedApplicationAllowed ""'), function($skip, $loc, $0, $1) {
12529
- if (config.verbose && console.log("forbidIndentedApplication:", state.forbidIndentedApplication), state.indentedApplicationForbidden) return $skip;
12748
+ if (config.verbose && console.log("forbidIndentedApplication:", state.forbidIndentedApplication), state.indentedApplicationForbidden)
12749
+ return $skip;
12530
12750
  });
12531
12751
  function IndentedApplicationAllowed(ctx, state2) {
12532
12752
  return (0, import_lib2.$EVENT)(ctx, state2, "IndentedApplicationAllowed", IndentedApplicationAllowed$0);
@@ -12550,7 +12770,8 @@ ${js}`
12550
12770
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreTrailingMemberProperty", RestoreTrailingMemberProperty$0);
12551
12771
  }
12552
12772
  var TrailingMemberPropertyAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'TrailingMemberPropertyAllowed ""'), function($skip, $loc, $0, $1) {
12553
- if (config.verbose && console.log("forbidTrailingMemberProperty:", state.forbidTrailingMemberProperty), state.trailingMemberPropertyForbidden) return $skip;
12773
+ if (config.verbose && console.log("forbidTrailingMemberProperty:", state.forbidTrailingMemberProperty), state.trailingMemberPropertyForbidden)
12774
+ return $skip;
12554
12775
  });
12555
12776
  function TrailingMemberPropertyAllowed(ctx, state2) {
12556
12777
  return (0, import_lib2.$EVENT)(ctx, state2, "TrailingMemberPropertyAllowed", TrailingMemberPropertyAllowed$0);
@@ -12574,7 +12795,8 @@ ${js}`
12574
12795
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreNestedBinaryOp", RestoreNestedBinaryOp$0);
12575
12796
  }
12576
12797
  var NestedBinaryOpAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'NestedBinaryOpAllowed ""'), function($skip, $loc, $0, $1) {
12577
- if (config.verbose && console.log("forbidNestedBinaryOp:", state.forbidNestedBinaryOp), state.nestedBinaryOpForbidden) return $skip;
12798
+ if (config.verbose && console.log("forbidNestedBinaryOp:", state.forbidNestedBinaryOp), state.nestedBinaryOpForbidden)
12799
+ return $skip;
12578
12800
  });
12579
12801
  function NestedBinaryOpAllowed(ctx, state2) {
12580
12802
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedBinaryOpAllowed", NestedBinaryOpAllowed$0);
@@ -12598,7 +12820,8 @@ ${js}`
12598
12820
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreNewlineBinaryOp", RestoreNewlineBinaryOp$0);
12599
12821
  }
12600
12822
  var NewlineBinaryOpAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'NewlineBinaryOpAllowed ""'), function($skip, $loc, $0, $1) {
12601
- if (config.verbose && console.log("forbidNewlineBinaryOp:", state.forbidNewlineBinaryOp), state.newlineBinaryOpForbidden) return $skip;
12823
+ if (config.verbose && console.log("forbidNewlineBinaryOp:", state.forbidNewlineBinaryOp), state.newlineBinaryOpForbidden)
12824
+ return $skip;
12602
12825
  });
12603
12826
  function NewlineBinaryOpAllowed(ctx, state2) {
12604
12827
  return (0, import_lib2.$EVENT)(ctx, state2, "NewlineBinaryOpAllowed", NewlineBinaryOpAllowed$0);
@@ -12622,7 +12845,8 @@ ${js}`
12622
12845
  return (0, import_lib2.$EVENT)(ctx, state2, "RestoreImplicitFragment", RestoreImplicitFragment$0);
12623
12846
  }
12624
12847
  var ImplicitFragmentAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ImplicitFragmentAllowed ""'), function($skip, $loc, $0, $1) {
12625
- if (config.verbose && console.log("forbidImplicitFragment:", state.forbidImplicitFragment), state.implicitFragmentForbidden) return $skip;
12848
+ if (config.verbose && console.log("forbidImplicitFragment:", state.forbidImplicitFragment), state.implicitFragmentForbidden)
12849
+ return $skip;
12626
12850
  });
12627
12851
  function ImplicitFragmentAllowed(ctx, state2) {
12628
12852
  return (0, import_lib2.$EVENT)(ctx, state2, "ImplicitFragmentAllowed", ImplicitFragmentAllowed$0);
@@ -12646,7 +12870,8 @@ ${js}`
12646
12870
  return (0, import_lib2.$EVENT)(ctx, state2, "RestorePipeline", RestorePipeline$0);
12647
12871
  }
12648
12872
  var PipelineAllowed$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'PipelineAllowed ""'), function($skip, $loc, $0, $1) {
12649
- if (config.verbose && console.log("forbidPipeline:", state.forbidPipeline), state.pipelineForbidden) return $skip;
12873
+ if (config.verbose && console.log("forbidPipeline:", state.forbidPipeline), state.pipelineForbidden)
12874
+ return $skip;
12650
12875
  });
12651
12876
  function PipelineAllowed(ctx, state2) {
12652
12877
  return (0, import_lib2.$EVENT)(ctx, state2, "PipelineAllowed", PipelineAllowed$0);
@@ -12810,7 +13035,7 @@ ${js}`
12810
13035
  var i = $1, behavior = $3, ws1 = $4, imports = $5, ws2 = $6, from = $7;
12811
13036
  let errors = [];
12812
13037
  return behavior?.error && errors.push(behavior.error), imports.specifiers.forEach((spec) => {
12813
- setOperatorBehavior(spec.binding.name, spec.behavior ?? behavior), spec.behavior?.error && errors.push(spec.behavior.error);
13038
+ if (setOperatorBehavior(spec.binding.name, spec.behavior ?? behavior), spec.behavior?.error) return errors.push(spec.behavior.error);
12814
13039
  }), {
12815
13040
  type: "ImportDeclaration",
12816
13041
  children: [i, ...errors, trimFirstSpace(ws1), imports, ws2, from],
@@ -12857,7 +13082,7 @@ ${js}`
12857
13082
  var from = $1, fws = $2, i = $3, iws = $4, behavior = $6, ows = $7, imports = $8;
12858
13083
  let errors = [];
12859
13084
  return behavior?.error && errors.push(behavior.error), imports.specifiers.forEach((spec) => {
12860
- setOperatorBehavior(spec.binding.name, spec.behavior ?? behavior), spec.behavior?.error && errors.push(spec.behavior.error);
13085
+ if (setOperatorBehavior(spec.binding.name, spec.behavior ?? behavior), spec.behavior?.error) return errors.push(spec.behavior.error);
12861
13086
  }), {
12862
13087
  type: "ImportDeclaration",
12863
13088
  children: [i, iws, ...errors, trimFirstSpace(ows), imports, fws, from],
@@ -13072,11 +13297,7 @@ ${js}`
13072
13297
  }
13073
13298
  var ModuleSpecifier$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(UnprocessedModuleSpecifier, (0, import_lib2.$E)(ImportAssertion)), function($skip, $loc, $0, $1, $2) {
13074
13299
  var module = $1, assertion = $2;
13075
- let { token } = module;
13076
- return config.rewriteTsImports && (token = token.replace(/\.([mc])?ts(['"])$/, ".$1js$2")), config.rewriteCivetImports && (token = token.replace(
13077
- /\.civet(['"])$/,
13078
- `${config.rewriteCivetImports.replace(/\$/g, "$$")}$1`
13079
- )), token !== module.token && (module = { ...module, token, input: module.token }), {
13300
+ return module = rewriteModuleSpecifier(module), {
13080
13301
  type: "ModuleSpecifier",
13081
13302
  module,
13082
13303
  assertion,
@@ -13090,7 +13311,7 @@ ${js}`
13090
13311
  function UnprocessedModuleSpecifier(ctx, state2) {
13091
13312
  return (0, import_lib2.$EVENT_C)(ctx, state2, "UnprocessedModuleSpecifier", UnprocessedModuleSpecifier$$);
13092
13313
  }
13093
- var UnquotedSpecifier$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($R34, `UnquotedSpecifier /[^;"'\\s=>]+/`), function($skip, $loc, $0, $1) {
13314
+ var UnquotedSpecifier$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($R35, `UnquotedSpecifier /[^;"'\\s=>]+/`), function($skip, $loc, $0, $1) {
13094
13315
  var spec = $0;
13095
13316
  return { $loc, token: `"${spec}"` };
13096
13317
  });
@@ -13189,9 +13410,10 @@ ${js}`
13189
13410
  }
13190
13411
  var Declaration$0 = (0, import_lib2.$TV)(ImportDeclaration, function($skip, $loc, $0, $1) {
13191
13412
  var decl = $0;
13192
- if (decl.ts || decl.module || !decl.imports || !decl.from) return $skip;
13413
+ if (decl.ts || decl.module || !decl.imports || !decl.from)
13414
+ return $skip;
13193
13415
  let { imports } = decl;
13194
- return !imports.binding && !imports.specifiers ? $skip : dynamizeImportDeclaration(decl);
13416
+ return imports.binding || imports.specifiers ? dynamizeImportDeclaration(decl) : $skip;
13195
13417
  }), Declaration$1 = HoistableDeclaration, Declaration$2 = ClassDeclaration, Declaration$3 = (0, import_lib2.$TV)(LexicalDeclaration, function($skip, $loc, $0, $1) {
13196
13418
  var d = $0;
13197
13419
  return d.thisAssignments?.length ? {
@@ -13221,11 +13443,16 @@ ${js}`
13221
13443
  splices: bindings.flatMap((b) => b.splices),
13222
13444
  thisAssignments: bindings.flatMap((b) => b.thisAssignments)
13223
13445
  };
13224
- }), LexicalDeclaration$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$C)(BindingPattern, BindingIdentifier), (0, import_lib2.$E)(TypeSuffix), __, (0, import_lib2.$C)(ConstAssignment, LetAssignment), MaybeNestedPostfixedCommaExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
13225
- var loc = $1, assign = $5;
13446
+ }), LexicalDeclaration$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Loc, (0, import_lib2.$C)(BindingPattern, BindingIdentifier), (0, import_lib2.$E)(TypeSuffix), NotDedented, (0, import_lib2.$C)(ConstAssignment, LetAssignment), MaybeNestedPostfixedCommaExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
13447
+ var loc = $1, pattern = $2, typeSuffix = $3, ws = $4, assign = $5, e = $6;
13226
13448
  return processAssignmentDeclaration(
13227
13449
  { $loc: loc, token: assign.decl },
13228
- ...$0.slice(1)
13450
+ // like InsertConst or InsertLet
13451
+ pattern,
13452
+ typeSuffix,
13453
+ ws,
13454
+ assign,
13455
+ e
13229
13456
  );
13230
13457
  }), LexicalDeclaration$$ = [LexicalDeclaration$0, LexicalDeclaration$1];
13231
13458
  function LexicalDeclaration(ctx, state2) {
@@ -13309,7 +13536,7 @@ ${js}`
13309
13536
  function VariableDeclarationList(ctx, state2) {
13310
13537
  return (0, import_lib2.$EVENT)(ctx, state2, "VariableDeclarationList", VariableDeclarationList$0);
13311
13538
  }
13312
- var NumericLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R35, "NumericLiteral /(?=[0-9.])/"), NumericLiteralKind), function($skip, $loc, $0, $1, $2) {
13539
+ var NumericLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R36, "NumericLiteral /(?=[0-9.])/"), NumericLiteralKind), function($skip, $loc, $0, $1, $2) {
13313
13540
  var token = $2;
13314
13541
  return { type: "NumericLiteral", $loc, token };
13315
13542
  });
@@ -13320,33 +13547,33 @@ ${js}`
13320
13547
  function NumericLiteralKind(ctx, state2) {
13321
13548
  return (0, import_lib2.$EVENT_C)(ctx, state2, "NumericLiteralKind", NumericLiteralKind$$);
13322
13549
  }
13323
- var DecimalBigIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R36, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
13550
+ var DecimalBigIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R37, "DecimalBigIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)n/"));
13324
13551
  function DecimalBigIntegerLiteral(ctx, state2) {
13325
13552
  return (0, import_lib2.$EVENT)(ctx, state2, "DecimalBigIntegerLiteral", DecimalBigIntegerLiteral$0);
13326
13553
  }
13327
- var DecimalLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R37, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))/")), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'DecimalLiteral "."'), ExponentPart))), function($skip, $loc, $0, $1, $2) {
13554
+ var DecimalLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R38, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))/")), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L7, 'DecimalLiteral "."'), ExponentPart))), function($skip, $loc, $0, $1, $2) {
13328
13555
  return $1 + ".";
13329
- }), DecimalLiteral$1 = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R38, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?/"), (0, import_lib2.$E)(ExponentPart))), DecimalLiteral$2 = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R39, "DecimalLiteral /(?:\\.[0-9](?:_[0-9]|[0-9])*)/"), (0, import_lib2.$E)(ExponentPart))), DecimalLiteral$$ = [DecimalLiteral$0, DecimalLiteral$1, DecimalLiteral$2];
13556
+ }), DecimalLiteral$1 = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R39, "DecimalLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?/"), (0, import_lib2.$E)(ExponentPart))), DecimalLiteral$2 = (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R40, "DecimalLiteral /(?:\\.[0-9](?:_[0-9]|[0-9])*)/"), (0, import_lib2.$E)(ExponentPart))), DecimalLiteral$$ = [DecimalLiteral$0, DecimalLiteral$1, DecimalLiteral$2];
13330
13557
  function DecimalLiteral(ctx, state2) {
13331
13558
  return (0, import_lib2.$EVENT_C)(ctx, state2, "DecimalLiteral", DecimalLiteral$$);
13332
13559
  }
13333
- var ExponentPart$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R40, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
13560
+ var ExponentPart$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R41, "ExponentPart /(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)/"));
13334
13561
  function ExponentPart(ctx, state2) {
13335
13562
  return (0, import_lib2.$EVENT)(ctx, state2, "ExponentPart", ExponentPart$0);
13336
13563
  }
13337
- var BinaryIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R41, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
13564
+ var BinaryIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R42, "BinaryIntegerLiteral /0[bB][01](?:[01]|_[01])*n?/"));
13338
13565
  function BinaryIntegerLiteral(ctx, state2) {
13339
13566
  return (0, import_lib2.$EVENT)(ctx, state2, "BinaryIntegerLiteral", BinaryIntegerLiteral$0);
13340
13567
  }
13341
- var OctalIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R42, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
13568
+ var OctalIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R43, "OctalIntegerLiteral /0[oO][0-7](?:[0-7]|_[0-7])*n?/"));
13342
13569
  function OctalIntegerLiteral(ctx, state2) {
13343
13570
  return (0, import_lib2.$EVENT)(ctx, state2, "OctalIntegerLiteral", OctalIntegerLiteral$0);
13344
13571
  }
13345
- var HexIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R43, "HexIntegerLiteral /0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/"));
13572
+ var HexIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R44, "HexIntegerLiteral /0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?/"));
13346
13573
  function HexIntegerLiteral(ctx, state2) {
13347
13574
  return (0, import_lib2.$EVENT)(ctx, state2, "HexIntegerLiteral", HexIntegerLiteral$0);
13348
13575
  }
13349
- var IntegerLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R44, "IntegerLiteral /(?=[0-9])/"), IntegerLiteralKind), function($skip, $loc, $0, $1, $2) {
13576
+ var IntegerLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R45, "IntegerLiteral /(?=[0-9])/"), IntegerLiteralKind), function($skip, $loc, $0, $1, $2) {
13350
13577
  var token = $2;
13351
13578
  return { $loc, token };
13352
13579
  });
@@ -13357,7 +13584,7 @@ ${js}`
13357
13584
  function IntegerLiteralKind(ctx, state2) {
13358
13585
  return (0, import_lib2.$EVENT_C)(ctx, state2, "IntegerLiteralKind", IntegerLiteralKind$$);
13359
13586
  }
13360
- var DecimalIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R45, "DecimalIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)/"));
13587
+ var DecimalIntegerLiteral$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R46, "DecimalIntegerLiteral /(?:0|[1-9](?:_[0-9]|[0-9])*)/"));
13361
13588
  function DecimalIntegerLiteral(ctx, state2) {
13362
13589
  return (0, import_lib2.$EVENT)(ctx, state2, "DecimalIntegerLiteral", DecimalIntegerLiteral$0);
13363
13590
  }
@@ -13379,19 +13606,19 @@ ${js}`
13379
13606
  function StringLiteral(ctx, state2) {
13380
13607
  return (0, import_lib2.$EVENT_C)(ctx, state2, "StringLiteral", StringLiteral$$);
13381
13608
  }
13382
- var DoubleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R46, 'DoubleStringCharacters /(?:\\\\.|[^"])*/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13609
+ var DoubleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R47, 'DoubleStringCharacters /(?:\\\\.|[^"])*/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13383
13610
  return { $loc, token: $0 };
13384
13611
  });
13385
13612
  function DoubleStringCharacters(ctx, state2) {
13386
13613
  return (0, import_lib2.$EVENT)(ctx, state2, "DoubleStringCharacters", DoubleStringCharacters$0);
13387
13614
  }
13388
- var SingleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R47, "SingleStringCharacters /(?:\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13615
+ var SingleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R48, "SingleStringCharacters /(?:\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13389
13616
  return { $loc, token: $0 };
13390
13617
  });
13391
13618
  function SingleStringCharacters(ctx, state2) {
13392
13619
  return (0, import_lib2.$EVENT)(ctx, state2, "SingleStringCharacters", SingleStringCharacters$0);
13393
13620
  }
13394
- var SingleLineStringLiteral$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R48, 'SingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'), DoubleQuote)), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R49, "SingleLineStringLiteral /(?:\\\\.|[^'\\n])*/"), SingleQuote))), function($skip, $loc, $0, $1) {
13621
+ var SingleLineStringLiteral$0 = (0, import_lib2.$TV)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R49, 'SingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'), DoubleQuote)), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R50, "SingleLineStringLiteral /(?:\\\\.|[^'\\n])*/"), SingleQuote))), function($skip, $loc, $0, $1) {
13395
13622
  return {
13396
13623
  type: "StringLiteral",
13397
13624
  token: $1,
@@ -13401,7 +13628,7 @@ ${js}`
13401
13628
  function SingleLineStringLiteral(ctx, state2) {
13402
13629
  return (0, import_lib2.$EVENT)(ctx, state2, "SingleLineStringLiteral", SingleLineStringLiteral$0);
13403
13630
  }
13404
- var UnclosedSingleLineStringLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R48, 'UnclosedSingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'))), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R49, "UnclosedSingleLineStringLiteral /(?:\\\\.|[^'\\n])*/")))), (0, import_lib2.$Y)(EOS)), function($skip, $loc, $0, $1, $2) {
13631
+ var UnclosedSingleLineStringLiteral$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$C)((0, import_lib2.$TEXT)((0, import_lib2.$S)(DoubleQuote, (0, import_lib2.$EXPECT)($R49, 'UnclosedSingleLineStringLiteral /(?:\\\\.|[^"\\n])*/'))), (0, import_lib2.$TEXT)((0, import_lib2.$S)(SingleQuote, (0, import_lib2.$EXPECT)($R50, "UnclosedSingleLineStringLiteral /(?:\\\\.|[^'\\n])*/")))), (0, import_lib2.$Y)(EOS)), function($skip, $loc, $0, $1, $2) {
13405
13632
  return [
13406
13633
  {
13407
13634
  type: "StringLiteral",
@@ -13425,19 +13652,19 @@ ${js}`
13425
13652
  function TripleDoubleStringContents(ctx, state2) {
13426
13653
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TripleDoubleStringContents", TripleDoubleStringContents$$);
13427
13654
  }
13428
- var CoffeeTripleDoubleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R50, 'CoffeeTripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13655
+ var CoffeeTripleDoubleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R51, 'CoffeeTripleDoubleStringCharacters /(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13429
13656
  return { $loc, token: $0 };
13430
13657
  });
13431
13658
  function CoffeeTripleDoubleStringCharacters(ctx, state2) {
13432
13659
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeTripleDoubleStringCharacters", CoffeeTripleDoubleStringCharacters$0);
13433
13660
  }
13434
- var TripleDoubleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R51, 'TripleDoubleStringCharacters /(?:"(?!"")|\\\\.|[^"])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13661
+ var TripleDoubleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R52, 'TripleDoubleStringCharacters /(?:"(?!"")|\\\\.|[^"])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13435
13662
  return { $loc, token: $0 };
13436
13663
  });
13437
13664
  function TripleDoubleStringCharacters(ctx, state2) {
13438
13665
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleDoubleStringCharacters", TripleDoubleStringCharacters$0);
13439
13666
  }
13440
- var TripleSingleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R52, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13667
+ var TripleSingleStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R53, "TripleSingleStringCharacters /(?:'(?!'')|\\\\.|[^'])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13441
13668
  return { $loc, token: $0 };
13442
13669
  });
13443
13670
  function TripleSingleStringCharacters(ctx, state2) {
@@ -13456,7 +13683,7 @@ ${js}`
13456
13683
  function CoffeeInterpolatedDoubleQuotedString(ctx, state2) {
13457
13684
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeInterpolatedDoubleQuotedString", CoffeeInterpolatedDoubleQuotedString$0);
13458
13685
  }
13459
- var CoffeeDoubleQuotedStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R53, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13686
+ var CoffeeDoubleQuotedStringCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R54, 'CoffeeDoubleQuotedStringCharacters /(?:\\\\.|#(?!\\{)|[^"#])+/'), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13460
13687
  return { $loc, token: $0 };
13461
13688
  });
13462
13689
  function CoffeeDoubleQuotedStringCharacters(ctx, state2) {
@@ -13479,7 +13706,7 @@ ${js}`
13479
13706
  function RegularExpressionClass(ctx, state2) {
13480
13707
  return (0, import_lib2.$EVENT)(ctx, state2, "RegularExpressionClass", RegularExpressionClass$0);
13481
13708
  }
13482
- var RegularExpressionClassCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R54, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13709
+ var RegularExpressionClassCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R55, "RegularExpressionClassCharacters /(?:\\\\.|[^\\]])*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13483
13710
  return { $loc, token: $0 };
13484
13711
  });
13485
13712
  function RegularExpressionClassCharacters(ctx, state2) {
@@ -13525,7 +13752,7 @@ ${js}`
13525
13752
  return { type: "Substitution", children: value[1] };
13526
13753
  }), HeregexPart$2 = (0, import_lib2.$T)((0, import_lib2.$S)(TemplateSubstitution), function(value) {
13527
13754
  return { type: "Substitution", children: value[0] };
13528
- }), HeregexPart$3 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R55, "HeregexPart /(?:\\\\.)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13755
+ }), HeregexPart$3 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R56, "HeregexPart /(?:\\\\.)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13529
13756
  let token = $0;
13530
13757
  switch ($0[1]) {
13531
13758
  case `
@@ -13542,11 +13769,11 @@ ${js}`
13542
13769
  return { $loc, token };
13543
13770
  }), HeregexPart$4 = (0, import_lib2.$TS)((0, import_lib2.$S)(HeregexComment), function($skip, $loc, $0, $1) {
13544
13771
  return { $loc, token: "" };
13545
- }), HeregexPart$5 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R56, "HeregexPart /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13772
+ }), HeregexPart$5 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R57, "HeregexPart /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13546
13773
  return { $loc, token: "" };
13547
- }), HeregexPart$6 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R57, "HeregexPart /\\/(?!\\/\\/)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13774
+ }), HeregexPart$6 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R58, "HeregexPart /\\/(?!\\/\\/)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13548
13775
  return { $loc, token: "\\/" };
13549
- }), HeregexPart$7 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R58, "HeregexPart /[^[\\/\\s#$\\\\]+|[#$]/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13776
+ }), HeregexPart$7 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R59, "HeregexPart /[^[\\/\\s#$\\\\]+|[#$]/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13550
13777
  return { $loc, token: $0 };
13551
13778
  }), HeregexPart$$ = [HeregexPart$0, HeregexPart$1, HeregexPart$2, HeregexPart$3, HeregexPart$4, HeregexPart$5, HeregexPart$6, HeregexPart$7];
13552
13779
  function HeregexPart(ctx, state2) {
@@ -13558,7 +13785,7 @@ ${js}`
13558
13785
  function HeregexComment(ctx, state2) {
13559
13786
  return (0, import_lib2.$EVENT_C)(ctx, state2, "HeregexComment", HeregexComment$$);
13560
13787
  }
13561
- var RegularExpressionBody$0 = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R59, "RegularExpressionBody /[*\\/\\r\\n]/"))), (0, import_lib2.$Q)(RegExpPart));
13788
+ var RegularExpressionBody$0 = (0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R60, "RegularExpressionBody /[*\\/\\r\\n]/"))), (0, import_lib2.$Q)(RegExpPart));
13562
13789
  function RegularExpressionBody(ctx, state2) {
13563
13790
  return (0, import_lib2.$EVENT)(ctx, state2, "RegularExpressionBody", RegularExpressionBody$0);
13564
13791
  }
@@ -13566,15 +13793,15 @@ ${js}`
13566
13793
  function RegExpPart(ctx, state2) {
13567
13794
  return (0, import_lib2.$EVENT_C)(ctx, state2, "RegExpPart", RegExpPart$$);
13568
13795
  }
13569
- var RegExpCharacter$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R60, "RegExpCharacter /(?:\\\\.|[^[\\/\\r\\n])+/"));
13796
+ var RegExpCharacter$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R61, "RegExpCharacter /(?:\\\\.|[^[\\/\\r\\n])+/"));
13570
13797
  function RegExpCharacter(ctx, state2) {
13571
13798
  return (0, import_lib2.$EVENT)(ctx, state2, "RegExpCharacter", RegExpCharacter$0);
13572
13799
  }
13573
- var RegularExpressionFlags$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R61, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
13800
+ var RegularExpressionFlags$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R62, "RegularExpressionFlags /(?:\\p{ID_Continue}|[\\u200C\\u200D$])*/"));
13574
13801
  function RegularExpressionFlags(ctx, state2) {
13575
13802
  return (0, import_lib2.$EVENT)(ctx, state2, "RegularExpressionFlags", RegularExpressionFlags$0);
13576
13803
  }
13577
- var TemplateLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R62, "TemplateLiteral /(?=[`'\"])/"), _TemplateLiteral), function(value) {
13804
+ var TemplateLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R63, "TemplateLiteral /(?=[`'\"])/"), _TemplateLiteral), function(value) {
13578
13805
  return value[1];
13579
13806
  });
13580
13807
  function TemplateLiteral(ctx, state2) {
@@ -13605,23 +13832,23 @@ ${js}`
13605
13832
  function TemplateSubstitution(ctx, state2) {
13606
13833
  return (0, import_lib2.$EVENT)(ctx, state2, "TemplateSubstitution", TemplateSubstitution$0);
13607
13834
  }
13608
- var TemplateCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R63, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13835
+ var TemplateCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R64, "TemplateCharacters /(?:\\$(?!\\{)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13609
13836
  return { $loc, token: $0 };
13610
13837
  });
13611
13838
  function TemplateCharacters(ctx, state2) {
13612
13839
  return (0, import_lib2.$EVENT)(ctx, state2, "TemplateCharacters", TemplateCharacters$0);
13613
13840
  }
13614
- var TemplateBlockCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R64, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13841
+ var TemplateBlockCharacters$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R65, "TemplateBlockCharacters /(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13615
13842
  return { $loc, token: $0 };
13616
13843
  });
13617
13844
  function TemplateBlockCharacters(ctx, state2) {
13618
13845
  return (0, import_lib2.$EVENT)(ctx, state2, "TemplateBlockCharacters", TemplateBlockCharacters$0);
13619
13846
  }
13620
- var ReservedWord$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R65, "ReservedWord /(?:on|off|yes|no)(?!\\p{ID_Continue})/")), CoffeeBooleansEnabled), ReservedWord$1 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R66, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")), CoffeeIsntEnabled), ReservedWord$2 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R67, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")), CoffeeForLoopsEnabled), ReservedWord$3 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R68, "ReservedWord /(?:of)(?!\\p{ID_Continue})/")), CoffeeOfEnabled), ReservedWord$4 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R69, "ReservedWord /(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/")), ReservedWord$$ = [ReservedWord$0, ReservedWord$1, ReservedWord$2, ReservedWord$3, ReservedWord$4];
13847
+ var ReservedWord$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R66, "ReservedWord /(?:on|off|yes|no)(?!\\p{ID_Continue})/")), CoffeeBooleansEnabled), ReservedWord$1 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R67, "ReservedWord /(?:isnt)(?!\\p{ID_Continue})/")), CoffeeIsntEnabled), ReservedWord$2 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R68, "ReservedWord /(?:by)(?!\\p{ID_Continue})/")), CoffeeForLoopsEnabled), ReservedWord$3 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R69, "ReservedWord /(?:of)(?!\\p{ID_Continue})/")), CoffeeOfEnabled), ReservedWord$4 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R70, "ReservedWord /(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})/")), ReservedWord$$ = [ReservedWord$0, ReservedWord$1, ReservedWord$2, ReservedWord$3, ReservedWord$4];
13621
13848
  function ReservedWord(ctx, state2) {
13622
13849
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ReservedWord", ReservedWord$$);
13623
13850
  }
13624
- var Comment$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R70, "Comment /(?=\\/|#)/"), _Comment), function(value) {
13851
+ var Comment$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R71, "Comment /(?=\\/|#)/"), _Comment), function(value) {
13625
13852
  return value[1];
13626
13853
  });
13627
13854
  function Comment(ctx, state2) {
@@ -13635,7 +13862,7 @@ ${js}`
13635
13862
  function SingleLineComment(ctx, state2) {
13636
13863
  return (0, import_lib2.$EVENT_C)(ctx, state2, "SingleLineComment", SingleLineComment$$);
13637
13864
  }
13638
- var JSSingleLineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R71, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13865
+ var JSSingleLineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R72, "JSSingleLineComment /\\/\\/(?!\\/)[^\\r\\n]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13639
13866
  return { type: "Comment", $loc, token: $0 };
13640
13867
  });
13641
13868
  function JSSingleLineComment(ctx, state2) {
@@ -13645,29 +13872,29 @@ ${js}`
13645
13872
  function MultiLineComment(ctx, state2) {
13646
13873
  return (0, import_lib2.$EVENT_C)(ctx, state2, "MultiLineComment", MultiLineComment$$);
13647
13874
  }
13648
- var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L141, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R72, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L141, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
13875
+ var JSMultiLineComment$0 = (0, import_lib2.$TV)((0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L140, 'JSMultiLineComment "/*"'), (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($L141, 'JSMultiLineComment "*/"')), (0, import_lib2.$EXPECT)($R73, "JSMultiLineComment /./"))), (0, import_lib2.$EXPECT)($L141, 'JSMultiLineComment "*/"'))), function($skip, $loc, $0, $1) {
13649
13876
  return { type: "Comment", $loc, token: $1 };
13650
13877
  });
13651
13878
  function JSMultiLineComment(ctx, state2) {
13652
13879
  return (0, import_lib2.$EVENT)(ctx, state2, "JSMultiLineComment", JSMultiLineComment$0);
13653
13880
  }
13654
- var CoffeeSingleLineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R73, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13881
+ var CoffeeSingleLineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R74, "CoffeeSingleLineComment /#(?!##(?!#))([^\\r\\n]*)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13655
13882
  return { type: "Comment", $loc, token: `//${$1}` };
13656
13883
  });
13657
13884
  function CoffeeSingleLineComment(ctx, state2) {
13658
13885
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeSingleLineComment", CoffeeSingleLineComment$0);
13659
13886
  }
13660
- var CoffeeMultiLineComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeHereCommentStart, (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R74, "CoffeeMultiLineComment /[^]*?###/"))), function($skip, $loc, $0, $1, $2) {
13887
+ var CoffeeMultiLineComment$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeHereCommentStart, (0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R75, "CoffeeMultiLineComment /[^]*?###/"))), function($skip, $loc, $0, $1, $2) {
13661
13888
  return $2 = $2.slice(0, $2.length - 3).replace(/\*\//g, "* /"), { type: "Comment", $loc, token: `/*${$2}*/` };
13662
13889
  });
13663
13890
  function CoffeeMultiLineComment(ctx, state2) {
13664
13891
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeMultiLineComment", CoffeeMultiLineComment$0);
13665
13892
  }
13666
- var CoffeeHereCommentStart$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R75, "CoffeeHereCommentStart /###(?!#)/"));
13893
+ var CoffeeHereCommentStart$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R76, "CoffeeHereCommentStart /###(?!#)/"));
13667
13894
  function CoffeeHereCommentStart(ctx, state2) {
13668
13895
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeHereCommentStart", CoffeeHereCommentStart$0);
13669
13896
  }
13670
- var InlineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R76, "InlineComment /\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\//"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13897
+ var InlineComment$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R77, "InlineComment /\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\//"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13671
13898
  return { $loc, token: $0 };
13672
13899
  }), InlineComment$1 = CoffeeMultiLineComment, InlineComment$$ = [InlineComment$0, InlineComment$1];
13673
13900
  function InlineComment(ctx, state2) {
@@ -13681,13 +13908,13 @@ ${js}`
13681
13908
  function TrailingComment(ctx, state2) {
13682
13909
  return (0, import_lib2.$EVENT)(ctx, state2, "TrailingComment", TrailingComment$0);
13683
13910
  }
13684
- var _$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R77, "_ /(?=[ \\t\\/\\\\#])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment))), function(value) {
13911
+ var _$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R78, "_ /(?=[ \\t\\/\\\\#])/"), (0, import_lib2.$P)((0, import_lib2.$C)(NonNewlineWhitespace, InlineComment))), function(value) {
13685
13912
  return value[1];
13686
13913
  });
13687
13914
  function _(ctx, state2) {
13688
13915
  return (0, import_lib2.$EVENT)(ctx, state2, "_", _$0);
13689
13916
  }
13690
- var NonNewlineWhitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R23, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13917
+ var NonNewlineWhitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R24, "NonNewlineWhitespace /[ \\t]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13691
13918
  return { $loc, token: $0 };
13692
13919
  }), NonNewlineWhitespace$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L142, 'NonNewlineWhitespace "\\\\\\\\"'), CoffeeLineContinuationEnabled, EOL), function(value) {
13693
13920
  return " ";
@@ -13702,13 +13929,13 @@ ${js}`
13702
13929
  function Trimmed_(ctx, state2) {
13703
13930
  return (0, import_lib2.$EVENT)(ctx, state2, "Trimmed_", Trimmed_$0);
13704
13931
  }
13705
- var __$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R78, "__ /(?=\\s|\\/|#)/"), (0, import_lib2.$Q)((0, import_lib2.$C)(Whitespace, Comment))), function(value) {
13932
+ var __$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R79, "__ /(?=\\s|\\/|#)/"), (0, import_lib2.$Q)((0, import_lib2.$C)(Whitespace, Comment))), function(value) {
13706
13933
  return value[1];
13707
13934
  }), __$1 = (0, import_lib2.$EXPECT)($L0, '__ ""'), __$$ = [__$0, __$1];
13708
13935
  function __(ctx, state2) {
13709
13936
  return (0, import_lib2.$EVENT_C)(ctx, state2, "__", __$$);
13710
13937
  }
13711
- var Whitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R56, "Whitespace /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13938
+ var Whitespace$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R57, "Whitespace /[\\s]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
13712
13939
  return { $loc, token: $0 };
13713
13940
  });
13714
13941
  function Whitespace(ctx, state2) {
@@ -13743,7 +13970,7 @@ ${js}`
13743
13970
  function SemicolonDelimiter(ctx, state2) {
13744
13971
  return (0, import_lib2.$EVENT)(ctx, state2, "SemicolonDelimiter", SemicolonDelimiter$0);
13745
13972
  }
13746
- var NonIdContinue$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R79, "NonIdContinue /(?!\\p{ID_Continue})/"));
13973
+ var NonIdContinue$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R80, "NonIdContinue /(?!\\p{ID_Continue})/"));
13747
13974
  function NonIdContinue(ctx, state2) {
13748
13975
  return (0, import_lib2.$EVENT)(ctx, state2, "NonIdContinue", NonIdContinue$0);
13749
13976
  }
@@ -13861,7 +14088,7 @@ ${js}`
13861
14088
  function CoffeeSubstitutionStart(ctx, state2) {
13862
14089
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeSubstitutionStart", CoffeeSubstitutionStart$0);
13863
14090
  }
13864
- var Colon$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L16, 'Colon ":"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R80, "Colon /[=:]/"))), function($skip, $loc, $0, $1, $2) {
14091
+ var Colon$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L16, 'Colon ":"'), (0, import_lib2.$N)((0, import_lib2.$EXPECT)($R81, "Colon /[=:]/"))), function($skip, $loc, $0, $1, $2) {
13865
14092
  return { $loc, token: $1 };
13866
14093
  });
13867
14094
  function Colon(ctx, state2) {
@@ -13911,7 +14138,7 @@ ${js}`
13911
14138
  }
13912
14139
  var Dot$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L7, 'Dot "."'), function($skip, $loc, $0, $1) {
13913
14140
  return { $loc, token: $1 };
13914
- }), Dot$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R81, "Dot /['\u2019]s/"), Trimmed_), function($skip, $loc, $0, $1, $2) {
14141
+ }), Dot$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R82, "Dot /['\u2019]s/"), Trimmed_), function($skip, $loc, $0, $1, $2) {
13915
14142
  var ws = $2;
13916
14143
  return [
13917
14144
  { $loc, token: "." },
@@ -14039,7 +14266,7 @@ ${js}`
14039
14266
  function If(ctx, state2) {
14040
14267
  return (0, import_lib2.$EVENT)(ctx, state2, "If", If$0);
14041
14268
  }
14042
- var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'Import "import"'), (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R82, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
14269
+ var Import$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L15, 'Import "import"'), (0, import_lib2.$Y)((0, import_lib2.$EXPECT)($R83, "Import /\\s/"))), function($skip, $loc, $0, $1, $2) {
14043
14270
  return { $loc, token: $1 };
14044
14271
  });
14045
14272
  function Import(ctx, state2) {
@@ -14396,7 +14623,7 @@ ${js}`
14396
14623
  function JSXImplicitFragment(ctx, state2) {
14397
14624
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXImplicitFragment", JSXImplicitFragment$0);
14398
14625
  }
14399
- var JSXTag$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R83, "JSXTag /(?=[<])/"), _JSXTag), function(value) {
14626
+ var JSXTag$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R84, "JSXTag /(?=[<])/"), _JSXTag), function(value) {
14400
14627
  return value[1];
14401
14628
  });
14402
14629
  function JSXTag(ctx, state2) {
@@ -14408,7 +14635,8 @@ ${js}`
14408
14635
  }
14409
14636
  var JSXElement$0 = JSXSelfClosingElement, JSXElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeJSXEnabled), PushJSXOpeningElement, (0, import_lib2.$E)(JSXMixedChildren), JSXOptionalClosingElement, PopJSXStack), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
14410
14637
  var open = $2, children = $3, close = $4;
14411
- if (!children) return $skip;
14638
+ if (!children)
14639
+ return $skip;
14412
14640
  let parts;
14413
14641
  return $0 = $0.slice(1), close ? parts = $0 : children.jsxChildren.length ? parts = [
14414
14642
  ...$0,
@@ -14503,13 +14731,13 @@ ${js}`
14503
14731
  function JSXElementName(ctx, state2) {
14504
14732
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXElementName", JSXElementName$$);
14505
14733
  }
14506
- var JSXIdentifierName$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R84, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
14734
+ var JSXIdentifierName$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R85, "JSXIdentifierName /(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*/"));
14507
14735
  function JSXIdentifierName(ctx, state2) {
14508
14736
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXIdentifierName", JSXIdentifierName$0);
14509
14737
  }
14510
14738
  var JSXAttributes$0 = (0, import_lib2.$TV)((0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$E)(Whitespace), JSXAttribute)), function($skip, $loc, $0, $1) {
14511
14739
  let classes = [], attrs = $0.filter((pair) => {
14512
- let [, attr] = pair;
14740
+ let attr = pair[1];
14513
14741
  return attr.type === "JSXClass" ? (classes.push(attr.class), !1) : !0;
14514
14742
  });
14515
14743
  if (classes.length) {
@@ -14523,10 +14751,10 @@ ${js}`
14523
14751
  var isBraced = isBraced2, unbrace = unbrace2, parseClass = parseClass2;
14524
14752
  let className = config.react ? "className" : "class";
14525
14753
  attrs = attrs.filter((pair) => {
14526
- let [, attr] = pair;
14754
+ let attr = pair[1];
14527
14755
  return (attr[0][0] === "class" || attr[0][0] === "className") && !attr[0][1] ? (className = attr[0][0], classes.push(attr[1][attr[1].length - 1]), !1) : !0;
14528
14756
  });
14529
- let strings = [], exprs = [];
14757
+ let [strings, exprs] = [[], []];
14530
14758
  classes.forEach((c) => {
14531
14759
  isBraced2(c) ? (exprs.push(unbrace2(c)), exprs.push(", ")) : strings.push(parseClass2(c));
14532
14760
  });
@@ -14569,7 +14797,8 @@ ${js}`
14569
14797
  type: "CallExpression",
14570
14798
  children
14571
14799
  }), last = lastAccessInCallExpression(expr);
14572
- if (!last) return $skip;
14800
+ if (!last)
14801
+ return $skip;
14573
14802
  let name;
14574
14803
  return last.type === "Index" ? [
14575
14804
  "{...{",
@@ -14587,7 +14816,8 @@ ${js}`
14587
14816
  if (expr.type === "ObjectExpression")
14588
14817
  return convertObjectToJSXAttributes(expr);
14589
14818
  let last = lastAccessInCallExpression(expr);
14590
- if (!last) return $skip;
14819
+ if (!last)
14820
+ return $skip;
14591
14821
  let name;
14592
14822
  return last.type === "Index" ? [
14593
14823
  "{...{",
@@ -14603,22 +14833,22 @@ ${js}`
14603
14833
  type: "JSXClass",
14604
14834
  class: $2
14605
14835
  };
14606
- }), JSXAttribute$7 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R85, "JSXAttribute /[!+-]/")), JSXAttributeName, (0, import_lib2.$Y)(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
14836
+ }), JSXAttribute$7 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$TEXT)((0, import_lib2.$EXPECT)($R86, "JSXAttribute /[!+-]/")), JSXAttributeName, (0, import_lib2.$Y)(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3) {
14607
14837
  var toggle = $1, id = $2;
14608
14838
  return [" ", id, "={", toggle === "+" ? "true" : "false", "}"];
14609
14839
  }), JSXAttribute$$ = [JSXAttribute$0, JSXAttribute$1, JSXAttribute$2, JSXAttribute$3, JSXAttribute$4, JSXAttribute$5, JSXAttribute$6, JSXAttribute$7];
14610
14840
  function JSXAttribute(ctx, state2) {
14611
14841
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttribute", JSXAttribute$$);
14612
14842
  }
14613
- var JSXAttributeSpace$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R86, "JSXAttributeSpace /[\\s>]|\\/>/"));
14843
+ var JSXAttributeSpace$0 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R87, "JSXAttributeSpace /[\\s>]|\\/>/"));
14614
14844
  function JSXAttributeSpace(ctx, state2) {
14615
14845
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXAttributeSpace", JSXAttributeSpace$0);
14616
14846
  }
14617
- var JSXShorthandString$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R87, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14847
+ var JSXShorthandString$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R88, "JSXShorthandString /(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14618
14848
  return quoteString($0);
14619
14849
  }), JSXShorthandString$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(TemplateLiteral), function($skip, $loc, $0, $1) {
14620
14850
  return ["{", $1, "}"];
14621
- }), JSXShorthandString$2 = StringLiteral, JSXShorthandString$3 = (0, import_lib2.$S)(OpenBrace, PostfixedExpression, (0, import_lib2.$E)(Whitespace), CloseBrace), JSXShorthandString$$ = [JSXShorthandString$0, JSXShorthandString$1, JSXShorthandString$2, JSXShorthandString$3];
14851
+ }), JSXShorthandString$2 = StringLiteral, JSXShorthandString$3 = (0, import_lib2.$S)(OpenBrace, PostfixedExpression, __, CloseBrace), JSXShorthandString$$ = [JSXShorthandString$0, JSXShorthandString$1, JSXShorthandString$2, JSXShorthandString$3];
14622
14852
  function JSXShorthandString(ctx, state2) {
14623
14853
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXShorthandString", JSXShorthandString$$);
14624
14854
  }
@@ -14633,10 +14863,10 @@ ${js}`
14633
14863
  function JSXAttributeInitializer(ctx, state2) {
14634
14864
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttributeInitializer", JSXAttributeInitializer$$);
14635
14865
  }
14636
- var JSXAttributeValue$0 = (0, import_lib2.$S)(OpenBrace, PostfixedExpression, (0, import_lib2.$E)(Whitespace), CloseBrace), JSXAttributeValue$1 = JSXElement, JSXAttributeValue$2 = JSXFragment, JSXAttributeValue$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace, (0, import_lib2.$Y)(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3, $4) {
14866
+ var JSXAttributeValue$0 = (0, import_lib2.$S)(OpenBrace, PostfixedExpression, __, CloseBrace), JSXAttributeValue$1 = JSXElement, JSXAttributeValue$2 = JSXFragment, JSXAttributeValue$3 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertInlineOpenBrace, InlineJSXAttributeValue, InsertCloseBrace, (0, import_lib2.$Y)(JSXAttributeSpace)), function($skip, $loc, $0, $1, $2, $3, $4) {
14637
14867
  var open = $1, value = $2, close = $3;
14638
14868
  return value.type === "StringLiteral" ? $skip : [open, value, close];
14639
- }), JSXAttributeValue$4 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R88, `JSXAttributeValue /"[^"]*"|'[^']*'/`)), JSXAttributeValue$$ = [JSXAttributeValue$0, JSXAttributeValue$1, JSXAttributeValue$2, JSXAttributeValue$3, JSXAttributeValue$4];
14869
+ }), JSXAttributeValue$4 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R89, `JSXAttributeValue /"[^"]*"|'[^']*'/`)), JSXAttributeValue$$ = [JSXAttributeValue$0, JSXAttributeValue$1, JSXAttributeValue$2, JSXAttributeValue$3, JSXAttributeValue$4];
14640
14870
  function JSXAttributeValue(ctx, state2) {
14641
14871
  return (0, import_lib2.$EVENT_C)(ctx, state2, "JSXAttributeValue", JSXAttributeValue$$);
14642
14872
  }
@@ -14646,7 +14876,7 @@ ${js}`
14646
14876
  function InlineJSXAttributeValue(ctx, state2) {
14647
14877
  return (0, import_lib2.$EVENT)(ctx, state2, "InlineJSXAttributeValue", InlineJSXAttributeValue$0);
14648
14878
  }
14649
- var InlineJSXBinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($R89, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
14879
+ var InlineJSXBinaryOpRHS$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)((0, import_lib2.$EXPECT)($R90, "InlineJSXBinaryOpRHS /[<>]/")), BinaryOp, InlineJSXUnaryExpression), function($skip, $loc, $0, $1, $2, $3) {
14650
14880
  var op = $2, rhs = $3;
14651
14881
  return [[], op, [], rhs];
14652
14882
  });
@@ -14660,7 +14890,7 @@ ${js}`
14660
14890
  function InlineJSXUnaryExpression(ctx, state2) {
14661
14891
  return (0, import_lib2.$EVENT)(ctx, state2, "InlineJSXUnaryExpression", InlineJSXUnaryExpression$0);
14662
14892
  }
14663
- var InlineJSXUnaryOp$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R90, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14893
+ var InlineJSXUnaryOp$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R91, "InlineJSXUnaryOp /[!~+-](?!\\s|[!~+-]*&)/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14664
14894
  return { $loc, token: $0 };
14665
14895
  });
14666
14896
  function InlineJSXUnaryOp(ctx, state2) {
@@ -14692,7 +14922,7 @@ ${js}`
14692
14922
  type: "CallExpression",
14693
14923
  children: [
14694
14924
  $1,
14695
- args,
14925
+ rewriteDynamicImportCall(args),
14696
14926
  ...rest.flat()
14697
14927
  ]
14698
14928
  });
@@ -14727,7 +14957,7 @@ ${js}`
14727
14957
  }
14728
14958
  var InlineJSXMemberExpressionRest$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(OptionalShorthand), (0, import_lib2.$Q)(InlineComment), MemberBracketContent), function($skip, $loc, $0, $1, $2, $3) {
14729
14959
  var dot = $1, comments = $2, content = $3;
14730
- return !dot && !comments.length ? content : dot ? dot.type === "Optional" && content.type === "SliceExpression" ? [...dot.children.slice(0, -1), ...comments, content] : [dot, ...comments, content] : [...comments, content];
14960
+ return dot || comments.length ? dot ? dot.type === "Optional" && content.type === "SliceExpression" ? [...dot.children.slice(0, -1), ...comments, content] : [dot, ...comments, content] : [...comments, content] : content;
14731
14961
  }), InlineJSXMemberExpressionRest$1 = PropertyAccess, InlineJSXMemberExpressionRest$2 = PropertyGlob, InlineJSXMemberExpressionRest$3 = PropertyBindExplicitArguments, InlineJSXMemberExpressionRest$4 = NonNullAssertion, InlineJSXMemberExpressionRest$$ = [InlineJSXMemberExpressionRest$0, InlineJSXMemberExpressionRest$1, InlineJSXMemberExpressionRest$2, InlineJSXMemberExpressionRest$3, InlineJSXMemberExpressionRest$4];
14732
14962
  function InlineJSXMemberExpressionRest(ctx, state2) {
14733
14963
  return (0, import_lib2.$EVENT_C)(ctx, state2, "InlineJSXMemberExpressionRest", InlineJSXMemberExpressionRest$$);
@@ -14835,13 +15065,13 @@ ${js}`
14835
15065
  function JSXComment(ctx, state2) {
14836
15066
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXComment", JSXComment$0);
14837
15067
  }
14838
- var JSXCommentContent$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R91, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15068
+ var JSXCommentContent$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R92, "JSXCommentContent /(?:-[^-]|[^-]*)*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14839
15069
  return { $loc, token: $0.replace(/\*\//g, "* /") };
14840
15070
  });
14841
15071
  function JSXCommentContent(ctx, state2) {
14842
15072
  return (0, import_lib2.$EVENT)(ctx, state2, "JSXCommentContent", JSXCommentContent$0);
14843
15073
  }
14844
- var JSXText$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R92, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15074
+ var JSXText$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R93, "JSXText /[^{}<>\\r\\n]+/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
14845
15075
  return {
14846
15076
  type: "JSXText",
14847
15077
  token: $0,
@@ -14902,7 +15132,8 @@ ${js}`
14902
15132
  return expression || $skip;
14903
15133
  }), JSXCodeChildExpression$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(JSXEOS), ImplicitNestedBlock), function($skip, $loc, $0, $1, $2) {
14904
15134
  var block = $2;
14905
- if (!block) return $skip;
15135
+ if (!block)
15136
+ return $skip;
14906
15137
  let statement = {
14907
15138
  type: "DoStatement",
14908
15139
  children: [block],
@@ -15286,11 +15517,11 @@ ${js}`
15286
15517
  function EnumProperty(ctx, state2) {
15287
15518
  return (0, import_lib2.$EVENT)(ctx, state2, "EnumProperty", EnumProperty$0);
15288
15519
  }
15289
- var TypeProperty$0 = (0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Readonly, NotDedented)), PropertyName);
15520
+ var TypeProperty$0 = (0, import_lib2.$S)((0, import_lib2.$E)(ReadonlyModifier), PropertyName);
15290
15521
  function TypeProperty(ctx, state2) {
15291
15522
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeProperty", TypeProperty$0);
15292
15523
  }
15293
- var TypeIndexSignature$0 = (0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R93, "TypeIndexSignature /[+-]?/")), Readonly, NotDedented)), OpenBracket, TypeIndex, CloseBracket, (0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R14, "TypeIndexSignature /[+-]/")), (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), QuestionMark)))));
15524
+ var TypeIndexSignature$0 = (0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R94, "TypeIndexSignature /[+-]?/")), Readonly, NotDedented)), OpenBracket, TypeIndex, CloseBracket, (0, import_lib2.$E)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R15, "TypeIndexSignature /[+-]/")), (0, import_lib2.$Y)((0, import_lib2.$S)((0, import_lib2.$E)(_), QuestionMark)))));
15294
15525
  function TypeIndexSignature(ctx, state2) {
15295
15526
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeIndexSignature", TypeIndexSignature$0);
15296
15527
  }
@@ -15383,7 +15614,7 @@ ${js}`
15383
15614
  }
15384
15615
  var TypeBinary$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(NotDedented, TypeBinaryOp, __)), TypeUnary, (0, import_lib2.$Q)((0, import_lib2.$S)(NotDedented, TypeBinaryOp, MaybeNestedTypeUnary))), function($skip, $loc, $0, $1, $2, $3) {
15385
15616
  var optionalPrefix = $1, t = $2, ops = $3;
15386
- return !ops.length && !optionalPrefix ? t : ops.length ? optionalPrefix ? [optionalPrefix, t, ops] : [t, ...ops] : [optionalPrefix, t];
15617
+ return ops.length || optionalPrefix ? ops.length ? optionalPrefix ? [optionalPrefix, t, ops] : [t, ...ops] : [optionalPrefix, t] : t;
15387
15618
  });
15388
15619
  function TypeBinary(ctx, state2) {
15389
15620
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeBinary", TypeBinary$0);
@@ -15403,14 +15634,14 @@ ${js}`
15403
15634
  }
15404
15635
  var TypeUnary$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Q)((0, import_lib2.$S)(__, TypeUnaryOp)), TypePrimary, (0, import_lib2.$Q)(TypeUnarySuffix)), function($skip, $loc, $0, $1, $2, $3) {
15405
15636
  var prefix = $1, t = $2, suffix = $3;
15406
- return !prefix.length && !suffix.length ? t : {
15637
+ return prefix.length || suffix.length ? {
15407
15638
  type: "TypeUnary",
15408
15639
  prefix,
15409
15640
  suffix,
15410
15641
  t,
15411
15642
  // omit empty prefix for trimming space
15412
15643
  children: prefix.length ? $0 : [t, suffix]
15413
- };
15644
+ } : t;
15414
15645
  });
15415
15646
  function TypeUnary(ctx, state2) {
15416
15647
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeUnary", TypeUnary$0);
@@ -15592,7 +15823,8 @@ ${js}`
15592
15823
  }
15593
15824
  var NestedTypeBulletedTuple$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$S)(InsertSpace, InsertOpenBracket), PushIndent, (0, import_lib2.$Q)(NestedTypeBullet), InsertCloseBracket, PopIndent), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
15594
15825
  var open = $1, content = $3, close = $4;
15595
- if (!content.length) return $skip;
15826
+ if (!content.length)
15827
+ return $skip;
15596
15828
  content = content.flat();
15597
15829
  let last = content[content.length - 1], children = Array.isArray(last) ? last : last?.children;
15598
15830
  return children?.at(-1).implicit && (children = children.slice(0, -1), Array.isArray(last) ? content[content.length - 1] = children : content[content.length - 1] = { ...last, children }), {
@@ -15605,7 +15837,8 @@ ${js}`
15605
15837
  }
15606
15838
  var TypeBulletedTuple$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(InsertOpenBracket, (0, import_lib2.$E)((0, import_lib2.$S)(TypeBullet, (0, import_lib2.$Q)(NestedTypeBullet))), InsertCloseBracket), function($skip, $loc, $0, $1, $2, $3) {
15607
15839
  var open = $1, content = $2, close = $3;
15608
- if (!content) return $skip;
15840
+ if (!content)
15841
+ return $skip;
15609
15842
  content = [
15610
15843
  ...trimFirstSpace(content[0]),
15611
15844
  // replace first space with bracket
@@ -15629,9 +15862,11 @@ ${js}`
15629
15862
  }
15630
15863
  var TypeBullet$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(BulletIndent, (0, import_lib2.$E)((0, import_lib2.$S)(TypeElementList, ArrayBulletDelimiter)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
15631
15864
  var bullet = $1, content = $2;
15632
- if (!content) return $skip;
15865
+ if (!content)
15866
+ return $skip;
15633
15867
  let [list, delimiter] = content;
15634
- if (!list.length) return $skip;
15868
+ if (!list.length)
15869
+ return $skip;
15635
15870
  if (list = list.slice(), list[0] = prepend(bullet, list[0]), delimiter) {
15636
15871
  let last = list.length - 1;
15637
15872
  list[last] = append(list[last], delimiter);
@@ -15651,7 +15886,7 @@ ${js}`
15651
15886
  function TypeWithPostfix(ctx, state2) {
15652
15887
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeWithPostfix", TypeWithPostfix$0);
15653
15888
  }
15654
- var TypeConditional$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($R94, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
15889
+ var TypeConditional$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$EXPECT)($R95, "TypeConditional /(?=if|unless)/"), TypeIfThenElse), function($skip, $loc, $0, $1, $2, $3) {
15655
15890
  return prepend($1, expressionizeTypeIf($3));
15656
15891
  }), TypeConditional$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(TypeCondition, NotDedented, QuestionMark, __, Type, __, Colon, __, Type), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15657
15892
  return $1.negated ? [$1, $2, $3, $4, $9, $6, $7, $8, $5] : $0;
@@ -15723,7 +15958,7 @@ ${js}`
15723
15958
  function CoffeeInterpolatedDoubleQuotedTypeLiteral(ctx, state2) {
15724
15959
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeeInterpolatedDoubleQuotedTypeLiteral", CoffeeInterpolatedDoubleQuotedTypeLiteral$0);
15725
15960
  }
15726
- var TypeLiteral$0 = TypeTemplateLiteral, TypeLiteral$1 = Literal, TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R14, "TypeLiteral /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1, $2) {
15961
+ var TypeLiteral$0 = TypeTemplateLiteral, TypeLiteral$1 = Literal, TypeLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R15, "TypeLiteral /[+-]/"), NumericLiteral), function($skip, $loc, $0, $1, $2) {
15727
15962
  var sign = $1, num = $2;
15728
15963
  return sign[0] === "+" ? num : $0;
15729
15964
  }), TypeLiteral$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L226, 'TypeLiteral "void"'), NonIdContinue), function($skip, $loc, $0, $1, $2) {
@@ -15758,9 +15993,9 @@ ${js}`
15758
15993
  function TypeBinaryOp(ctx, state2) {
15759
15994
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeBinaryOp", TypeBinaryOp$$);
15760
15995
  }
15761
- var TypeFunction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Abstract, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Async, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(New, (0, import_lib2.$E)(_))), Parameters, __, TypeFunctionArrow, (0, import_lib2.$C)(ReturnType, Loc)), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
15996
+ var TypeFunction$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Abstract, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Async, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(New, (0, import_lib2.$E)(_))), Parameters, __, TypeFunctionArrow, (0, import_lib2.$C)(ReturnType, Loc), (0, import_lib2.$N)((0, import_lib2.$S)((0, import_lib2.$E)(_), (0, import_lib2.$C)(ConstAssignment, LetAssignment)))), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8) {
15762
15997
  var abstract = $1, async = $2, new_ = $3, returnType = $7;
15763
- let children = [abstract, ...$0.slice(2)];
15998
+ let children = [abstract, ...$0.slice(2, -1)];
15764
15999
  if (abstract && !new_ && (children[1] = {
15765
16000
  type: "Error",
15766
16001
  message: "abstract function types must be constructors (abstract new)"
@@ -15830,7 +16065,7 @@ ${js}`
15830
16065
  function TypeApplicationStart(ctx, state2) {
15831
16066
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeApplicationStart", TypeApplicationStart$$);
15832
16067
  }
15833
- var ForbiddenImplicitTypeCalls$0 = ReservedBinary, ForbiddenImplicitTypeCalls$1 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R95, "ForbiddenImplicitTypeCalls /[|&<!=\\-\u21D2\u2192]/")), ForbiddenImplicitTypeCalls$2 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R96, "ForbiddenImplicitTypeCalls /(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/")), ForbiddenImplicitTypeCalls$$ = [ForbiddenImplicitTypeCalls$0, ForbiddenImplicitTypeCalls$1, ForbiddenImplicitTypeCalls$2];
16068
+ var ForbiddenImplicitTypeCalls$0 = ReservedBinary, ForbiddenImplicitTypeCalls$1 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R96, "ForbiddenImplicitTypeCalls /[|&<!=\\-\u21D2\u2192]/")), ForbiddenImplicitTypeCalls$2 = (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R97, "ForbiddenImplicitTypeCalls /(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])/")), ForbiddenImplicitTypeCalls$$ = [ForbiddenImplicitTypeCalls$0, ForbiddenImplicitTypeCalls$1, ForbiddenImplicitTypeCalls$2];
15834
16069
  function ForbiddenImplicitTypeCalls(ctx, state2) {
15835
16070
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ForbiddenImplicitTypeCalls", ForbiddenImplicitTypeCalls$$);
15836
16071
  }
@@ -15911,7 +16146,7 @@ ${js}`
15911
16146
  function TypeParameters(ctx, state2) {
15912
16147
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeParameters", TypeParameters$0);
15913
16148
  }
15914
- var TypeParameter$0 = (0, import_lib2.$S)(__, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R97, "TypeParameter /const|in|out/")), _)), Identifier, (0, import_lib2.$E)(TypeConstraint), (0, import_lib2.$E)(TypeInitializer), TypeParameterDelimiter);
16149
+ var TypeParameter$0 = (0, import_lib2.$S)(__, (0, import_lib2.$Q)((0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R98, "TypeParameter /const|in|out/")), _)), Identifier, (0, import_lib2.$E)(TypeConstraint), (0, import_lib2.$E)(TypeInitializer), TypeParameterDelimiter);
15915
16150
  function TypeParameter(ctx, state2) {
15916
16151
  return (0, import_lib2.$EVENT)(ctx, state2, "TypeParameter", TypeParameter$0);
15917
16152
  }
@@ -15935,21 +16170,21 @@ ${js}`
15935
16170
  function ThisType(ctx, state2) {
15936
16171
  return (0, import_lib2.$EVENT)(ctx, state2, "ThisType", ThisType$0);
15937
16172
  }
15938
- var Shebang$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R98, "Shebang /#![^\\r\\n]*/")), EOL);
16173
+ var Shebang$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R99, "Shebang /#![^\\r\\n]*/")), EOL);
15939
16174
  function Shebang(ctx, state2) {
15940
16175
  return (0, import_lib2.$EVENT)(ctx, state2, "Shebang", Shebang$0);
15941
16176
  }
15942
- var CivetPrologue$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R99, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R22, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine))), function(value) {
16177
+ var CivetPrologue$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R100, "CivetPrologue /[\\t ]*/"), DoubleQuote, CivetPrologueContent, DoubleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R23, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine))), function(value) {
15943
16178
  var content = value[2];
15944
16179
  return content;
15945
- }), CivetPrologue$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R99, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R22, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine))), function(value) {
16180
+ }), CivetPrologue$1 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R100, "CivetPrologue /[\\t ]*/"), SingleQuote, CivetPrologueContent, SingleQuote, SimpleStatementDelimiter, (0, import_lib2.$EXPECT)($R23, "CivetPrologue /[ \\t]*/"), (0, import_lib2.$C)(EOL, (0, import_lib2.$Y)(RestOfLine))), function(value) {
15946
16181
  var content = value[2];
15947
16182
  return content;
15948
16183
  }), CivetPrologue$$ = [CivetPrologue$0, CivetPrologue$1];
15949
16184
  function CivetPrologue(ctx, state2) {
15950
16185
  return (0, import_lib2.$EVENT_C)(ctx, state2, "CivetPrologue", CivetPrologue$$);
15951
16186
  }
15952
- var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L248, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R100, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
16187
+ var CivetPrologueContent$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($L248, 'CivetPrologueContent "civet"'), NonIdContinue, (0, import_lib2.$Q)(CivetOption), (0, import_lib2.$EXPECT)($R101, "CivetPrologueContent /[\\s]*/")), function($skip, $loc, $0, $1, $2, $3, $4) {
15953
16188
  var options = $3;
15954
16189
  return {
15955
16190
  type: "CivetPrologue",
@@ -15960,7 +16195,7 @@ ${js}`
15960
16195
  function CivetPrologueContent(ctx, state2) {
15961
16196
  return (0, import_lib2.$EVENT)(ctx, state2, "CivetPrologueContent", CivetPrologueContent$0);
15962
16197
  }
15963
- var CivetOption$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R101, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16198
+ var CivetOption$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R102, "CivetOption /\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
15964
16199
  let optionName = $2.replace(/-+([a-z]?)/g, (_2, l) => l ? l.toUpperCase() : ""), value = $3 ? $4 : $1 !== "-";
15965
16200
  switch (optionName) {
15966
16201
  case "tab":
@@ -15977,11 +16212,11 @@ ${js}`
15977
16212
  function CivetOption(ctx, state2) {
15978
16213
  return (0, import_lib2.$EVENT)(ctx, state2, "CivetOption", CivetOption$0);
15979
16214
  }
15980
- var UnknownPrologue$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R99, "UnknownPrologue /[\\t ]*/")), StringLiteral, (0, import_lib2.$TEXT)(SimpleStatementDelimiter), EOS);
16215
+ var UnknownPrologue$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R100, "UnknownPrologue /[\\t ]*/")), StringLiteral, (0, import_lib2.$TEXT)(SimpleStatementDelimiter), EOS);
15981
16216
  function UnknownPrologue(ctx, state2) {
15982
16217
  return (0, import_lib2.$EVENT)(ctx, state2, "UnknownPrologue", UnknownPrologue$0);
15983
16218
  }
15984
- var TripleSlashDirective$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R102, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), (0, import_lib2.$E)(EOS));
16219
+ var TripleSlashDirective$0 = (0, import_lib2.$S)((0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R103, "TripleSlashDirective /\\/\\/\\/[^\\r\\n]*/")), (0, import_lib2.$E)(EOS));
15985
16220
  function TripleSlashDirective(ctx, state2) {
15986
16221
  return (0, import_lib2.$EVENT)(ctx, state2, "TripleSlashDirective", TripleSlashDirective$0);
15987
16222
  }
@@ -15995,13 +16230,13 @@ ${js}`
15995
16230
  function PrologueString(ctx, state2) {
15996
16231
  return (0, import_lib2.$EVENT_C)(ctx, state2, "PrologueString", PrologueString$$);
15997
16232
  }
15998
- var EOS$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R103, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), (0, import_lib2.$P)(RestOfLine)), function(value) {
16233
+ var EOS$0 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$EXPECT)($R104, "EOS /(?=[ \\t\\r\\n\\/#]|$)/"), (0, import_lib2.$P)(RestOfLine)), function(value) {
15999
16234
  return value[1];
16000
16235
  });
16001
16236
  function EOS(ctx, state2) {
16002
16237
  return (0, import_lib2.$EVENT)(ctx, state2, "EOS", EOS$0);
16003
16238
  }
16004
- var EOL$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R104, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16239
+ var EOL$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R105, "EOL /\\r\\n|\\n|\\r|$/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16005
16240
  return { $loc, token: $0 };
16006
16241
  });
16007
16242
  function EOL(ctx, state2) {
@@ -16250,6 +16485,13 @@ ${js}`
16250
16485
  function CoffeePrototypeEnabled(ctx, state2) {
16251
16486
  return (0, import_lib2.$EVENT)(ctx, state2, "CoffeePrototypeEnabled", CoffeePrototypeEnabled$0);
16252
16487
  }
16488
+ var ESArrowFunctionEnabled$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'ESArrowFunctionEnabled ""'), function($skip, $loc, $0, $1) {
16489
+ if (!config.esArrowFunction)
16490
+ return $skip;
16491
+ });
16492
+ function ESArrowFunctionEnabled(ctx, state2) {
16493
+ return (0, import_lib2.$EVENT)(ctx, state2, "ESArrowFunctionEnabled", ESArrowFunctionEnabled$0);
16494
+ }
16253
16495
  var JSXCodeNestedEnabled$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'JSXCodeNestedEnabled ""'), function($skip, $loc, $0, $1) {
16254
16496
  if (!config.jsxCodeNested)
16255
16497
  return $skip;
@@ -16272,7 +16514,8 @@ ${js}`
16272
16514
  return (0, import_lib2.$EVENT)(ctx, state2, "ObjectIsEnabled", ObjectIsEnabled$0);
16273
16515
  }
16274
16516
  var IsBare$0 = (0, import_lib2.$TV)((0, import_lib2.$EXPECT)($L0, 'IsBare ""'), function($skip, $loc, $0, $1) {
16275
- if (config.iife || config.repl) return $skip;
16517
+ if (config.iife || config.repl)
16518
+ return $skip;
16276
16519
  });
16277
16520
  function IsBare(ctx, state2) {
16278
16521
  return (0, import_lib2.$EVENT)(ctx, state2, "IsBare", IsBare$0);
@@ -16305,6 +16548,7 @@ ${js}`
16305
16548
  globals: [],
16306
16549
  iife: !1,
16307
16550
  implicitReturns: !0,
16551
+ esArrowFunction: !1,
16308
16552
  jsxCode: !1,
16309
16553
  objectIs: !1,
16310
16554
  react: !1,
@@ -16347,13 +16591,18 @@ ${js}`
16347
16591
  config[option] = b;
16348
16592
  b && (config.objectIs = !1);
16349
16593
  }
16350
- }), Object.defineProperty(config, "jsxCode", {
16594
+ }), Object.defineProperty(config, "esCompat", {
16351
16595
  set(b) {
16352
16596
  for (let option of [
16353
- "jsxCodeNested",
16354
- "jsxCodeSameLine"
16597
+ "esArrowFunction"
16355
16598
  ])
16356
16599
  config[option] = b;
16600
+ config.implicitReturns = !b;
16601
+ }
16602
+ }), Object.defineProperty(config, "jsxCode", {
16603
+ set(b) {
16604
+ for (let option of ["jsxCodeNested", "jsxCodeSameLine"])
16605
+ config[option] = b;
16357
16606
  }
16358
16607
  }), Object.defineProperty(config, "operators", {
16359
16608
  set(o) {
@@ -16364,14 +16613,14 @@ ${js}`
16364
16613
  o.forEach((name) => {
16365
16614
  if (typeof name != "string")
16366
16615
  throw new Error("operators configuration array must contain only strings");
16367
- setOperatorBehavior(name, void 0);
16616
+ return setOperatorBehavior(name, void 0);
16368
16617
  });
16369
16618
  else
16370
16619
  for (let [name, behavior] of Object.entries(o)) {
16371
- if (typeof behavior == "string" && (behavior = behavior.trim(), behavior = behavior ? parse(behavior, {
16620
+ if (typeof behavior == "string" && (behavior = behavior.trim(), behavior ? behavior = parse(behavior, {
16372
16621
  startRule: "OperatorBehavior",
16373
16622
  filename: `operator config for ${name}`
16374
- }) : void 0), behavior && typeof behavior != "object")
16623
+ }) : behavior = void 0), behavior && typeof behavior != "object")
16375
16624
  throw new Error("operators configuration object must have string or object values");
16376
16625
  setOperatorBehavior(name, behavior);
16377
16626
  }
@@ -16385,7 +16634,8 @@ ${js}`
16385
16634
  var Init$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Shebang), Prologue), function($skip, $loc, $0, $1, $2) {
16386
16635
  var directives = $2;
16387
16636
  return directives.forEach((directive) => {
16388
- directive.type === "CivetPrologue" && Object.assign(config, directive.config);
16637
+ if (directive.type === "CivetPrologue")
16638
+ return Object.assign(config, directive.config);
16389
16639
  }), config.strict && ($0 = [...$0, `"use strict";
16390
16640
  `]), $0;
16391
16641
  });
@@ -16396,11 +16646,11 @@ ${js}`
16396
16646
  function Prologue(ctx, state2) {
16397
16647
  return (0, import_lib2.$EVENT)(ctx, state2, "Prologue", Prologue$0);
16398
16648
  }
16399
- var ProloguePrefix$0 = (0, import_lib2.$S)(Prologue, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R105, "ProloguePrefix /[^]*/")));
16649
+ var ProloguePrefix$0 = (0, import_lib2.$S)(Prologue, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R106, "ProloguePrefix /[^]*/")));
16400
16650
  function ProloguePrefix(ctx, state2) {
16401
16651
  return (0, import_lib2.$EVENT)(ctx, state2, "ProloguePrefix", ProloguePrefix$0);
16402
16652
  }
16403
- var Indent$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R22, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16653
+ var Indent$0 = (0, import_lib2.$TR)((0, import_lib2.$EXPECT)($R23, "Indent /[ \\t]*/"), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7, $8, $9) {
16404
16654
  let level = getIndentLevel($0, config.tab);
16405
16655
  return {
16406
16656
  $loc,
@@ -16485,8 +16735,8 @@ ${js}`
16485
16735
  parse: (input, options = {}) => {
16486
16736
  let { fail, validate, reset } = (0, import_lib2.Validator)(), ctx = { expectation: "", fail };
16487
16737
  if (typeof input != "string") throw new Error("Input must be a string");
16488
- let parser2 = options.startRule != null ? grammar[options.startRule] : Object.values(grammar)[0];
16489
- if (!parser2) throw new Error(`Could not find rule with name '${options.startRule}'`);
16738
+ let parser2;
16739
+ if (options.startRule !== null && options.startRule !== void 0 ? parser2 = grammar[options.startRule] : parser2 = Object.values(grammar)[0], !parser2) throw new Error(`Could not find rule with name '${options.startRule}'`);
16490
16740
  let filename2 = options.filename || "<anonymous>";
16491
16741
  return reset(), Object.assign(ctx, { ...options.events, tokenize: options.tokenize }), validate(input, parser2(ctx, {
16492
16742
  input,
@@ -16605,14 +16855,15 @@ ${js}`
16605
16855
  "unscopables"
16606
16856
  ];
16607
16857
 
16608
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\sourcemap.civet.jsx
16609
- var sourcemap_civet_exports = {};
16610
- __export(sourcemap_civet_exports, {
16858
+ // source/sourcemap.civet
16859
+ var sourcemap_exports = {};
16860
+ __export(sourcemap_exports, {
16611
16861
  SourceMap: () => SourceMap,
16612
16862
  base64Encode: () => base64Encode,
16613
16863
  decodeVLQ: () => decodeVLQ,
16614
16864
  locationTable: () => locationTable,
16615
- lookupLineColumn: () => lookupLineColumn
16865
+ lookupLineColumn: () => lookupLineColumn,
16866
+ smRegexp: () => smRegexp
16616
16867
  });
16617
16868
  function locationTable(input) {
16618
16869
  let linesRe = /([^\r\n]*)(\r\n|\r|\n|$)/y, lines = [], line = 0, pos = 0, ref;
@@ -16626,7 +16877,7 @@ ${js}`
16626
16877
  prevEnd = table[l++];
16627
16878
  return [l, pos - prevEnd];
16628
16879
  }
16629
- var EOL2 = /\r?\n|\r/, SourceMap = class {
16880
+ var EOL2 = /\r?\n|\r/, SourceMap = class _SourceMap {
16630
16881
  lines;
16631
16882
  line;
16632
16883
  colOffset;
@@ -16635,8 +16886,9 @@ ${js}`
16635
16886
  srcColumn;
16636
16887
  srcTable;
16637
16888
  source;
16638
- constructor(source1) {
16639
- this.source = source1, this.lines = [[]], this.line = 0, this.colOffset = 0, this.srcLine = 0, this.srcColumn = 0, this.srcTable = locationTable(this.source);
16889
+ sourceFileName;
16890
+ constructor(source1, sourceFileName) {
16891
+ this.source = source1, this.sourceFileName = sourceFileName, this.lines = [[]], this.line = 0, this.colOffset = 0, this.srcLine = 0, this.srcColumn = 0, this.srcTable = locationTable(this.source);
16640
16892
  }
16641
16893
  renderMappings() {
16642
16894
  let lastSourceLine = 0, lastSourceColumn = 0;
@@ -16660,11 +16912,11 @@ ${js}`
16660
16912
  return results;
16661
16913
  })().join(";");
16662
16914
  }
16663
- json(srcFileName, outFileName) {
16915
+ json(outFileName) {
16664
16916
  return {
16665
16917
  version: 3,
16666
16918
  file: outFileName,
16667
- sources: [srcFileName],
16919
+ sources: [this.sourceFileName],
16668
16920
  mappings: this.renderMappings(),
16669
16921
  names: [],
16670
16922
  sourcesContent: [this.source],
@@ -16674,8 +16926,8 @@ ${js}`
16674
16926
  };
16675
16927
  }
16676
16928
  /** Generate a comment with the source mapping URL. */
16677
- comment(srcFileName, outFileName) {
16678
- return `//# sourceMappingURL=data:application/json;base64,${base64Encode(JSON.stringify(this.json(srcFileName, outFileName)))}`;
16929
+ comment(outFileName) {
16930
+ return `//# sourceMappingURL=data:application/json;base64,${base64Encode(JSON.stringify(this.json(outFileName)))}`;
16679
16931
  }
16680
16932
  updateSourceMap(outputStr, inputPos, colOffset = 0) {
16681
16933
  let outLines = outputStr.split(EOL2), srcLine, srcCol;
@@ -16687,37 +16939,47 @@ ${js}`
16687
16939
  this.colOffset = line.length, this.srcColumn += line.length, inputPos != null ? this.lines[this.line].push([l, 0, srcLine + i, srcCol]) : l != 0 && this.lines[this.line].push([l]);
16688
16940
  }
16689
16941
  }
16942
+ /** Compose this downstream source map with an upstream source map, modifying this */
16943
+ composeUpstream(upstreamMap) {
16944
+ (typeof upstreamMap == "string" || !("lines" in upstreamMap)) && (upstreamMap = _SourceMap.parseWithLines(upstreamMap)), this.lines = _SourceMap.composeLines(upstreamMap.lines, this.lines), upstreamMap.sourcesContent && (this.source = upstreamMap.sourcesContent[0]), upstreamMap.sources && (this.sourceFileName = upstreamMap.sources[0]);
16945
+ }
16946
+ /** Compose this upstream source map with a downstream source map, modifying this */
16947
+ composeDownstream(downstreamMap) {
16948
+ (typeof downstreamMap == "string" || !("lines" in downstreamMap)) && (downstreamMap = _SourceMap.parseWithLines(downstreamMap)), this.lines = _SourceMap.composeLines(this.lines, downstreamMap.lines);
16949
+ }
16690
16950
  /**
16691
- Remap a string with compiled code and a source map to use a new source map
16692
- referencing upstream source files.
16693
- This modifies the upstream map in place.
16951
+ Remap compiled code with an inline source map to use an upstream source map.
16952
+ This modifies the provided upstream map in place.
16694
16953
  */
16695
- static remap = (codeWithSourceMap, upstreamMap, sourcePath, targetPath) => {
16954
+ static remap = (codeWithSourceMap, upstreamMap, targetPath) => {
16696
16955
  let sourceMapText, codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, (_match, sm) => (sourceMapText = sm, ""));
16697
16956
  if (sourceMapText) {
16698
- let parsed = this.parseWithLines(sourceMapText), composedLines = this.composeLines(upstreamMap.lines, parsed.lines);
16699
- upstreamMap.lines = composedLines;
16957
+ let downstreamMap = this.parseWithLines(sourceMapText);
16958
+ upstreamMap.composeDownstream(downstreamMap);
16700
16959
  }
16701
16960
  return `${codeWithoutSourceMap}
16702
- ${upstreamMap.comment(sourcePath, targetPath)}`;
16961
+ ${upstreamMap.comment(targetPath)}`;
16703
16962
  };
16704
16963
  /**
16705
16964
  Compose lines from an upstream source map with lines from a downstream source map.
16965
+ Returns lines in the downstream generated coordinate space.
16706
16966
  */
16707
- static composeLines = (upstreamMapping, lines) => lines.map((line) => line.map((entry) => {
16967
+ static composeLines = (upstreamLines, downstreamLines) => downstreamLines.map((line) => line.map((entry) => {
16708
16968
  if (entry.length === 1)
16709
16969
  return entry;
16710
- let [colDelta, sourceFileIndex, srcLine, srcCol] = entry, srcPos = remapPosition([srcLine, srcCol], upstreamMapping);
16970
+ let [colDelta, sourceFileIndex, srcLine, srcCol] = entry, srcPos = remapPosition([srcLine, srcCol], upstreamLines);
16711
16971
  if (!srcPos)
16712
16972
  return [entry[0]];
16713
16973
  let [upstreamLine, upstreamCol] = srcPos;
16714
16974
  return entry.length === 4 ? [colDelta, sourceFileIndex, upstreamLine, upstreamCol] : [colDelta, sourceFileIndex, upstreamLine, upstreamCol, entry[4]];
16715
16975
  }));
16716
16976
  /**
16717
- Parse a base64 encoded source map string into a SourceMapJSON object with lines.
16718
- */
16719
- static parseWithLines = (base64encodedJSONstr) => {
16720
- let json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8")), sourceLine = 0, sourceColumn = 0, lines = json.mappings.split(";").map((line) => line.length === 0 ? [] : line.split(",").map((entry) => {
16977
+ * Parse a possibly-base64-encoded source map
16978
+ * into a SourceMapJSON object with lines.
16979
+ */
16980
+ static parseWithLines = (json) => {
16981
+ typeof json == "string" && (json = JSON.parse(Buffer.from(json, "base64").toString("utf8")));
16982
+ let sourceLine = 0, sourceColumn = 0, lines = json.mappings.split(";").map((line) => line.length === 0 ? [] : line.split(",").map((entry) => {
16721
16983
  let result = decodeVLQ(entry);
16722
16984
  switch (result.length) {
16723
16985
  case 1:
@@ -16770,7 +17032,7 @@ ${upstreamMap.comment(sourcePath, targetPath)}`;
16770
17032
  let c = mapping.charCodeAt(i);
16771
17033
  (c & 127) != c && decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
16772
17034
  let index = vlqTable[c & 127];
16773
- if (index === 255 && decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`), i++, vlq |= (index & 31) << shift, shift += 5, !(index & 32))
17035
+ if (index === 255 && decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`), i++, vlq |= (index & 31) << shift, shift += 5, (index & 32) === 0)
16774
17036
  break;
16775
17037
  }
16776
17038
  vlq & 1 ? v = -(vlq >> 1) : v = vlq >> 1, result.push(v);
@@ -16783,15 +17045,18 @@ ${upstreamMap.comment(sourcePath, targetPath)}`;
16783
17045
  let i = 0, p = 0, l = textLine.length, lastMapping, lastMappingPosition = 0;
16784
17046
  for (; i < l; ) {
16785
17047
  let mapping = textLine[i];
16786
- if (p += mapping[0], mapping.length === 4 && (lastMapping = mapping, lastMappingPosition = p), p >= character)
17048
+ if (p += mapping[0], mapping.length === 4 && p <= character && (lastMapping = mapping, lastMappingPosition = p), p >= character)
16787
17049
  break;
16788
17050
  i++;
16789
17051
  }
16790
- if (character - lastMappingPosition == 0 && lastMapping)
16791
- return [lastMapping[2], lastMapping[3]];
17052
+ if (lastMapping)
17053
+ return [lastMapping[2], lastMapping[3] + character - lastMappingPosition];
16792
17054
  };
16793
17055
 
16794
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\state-cache.civet.jsx
17056
+ // source/main.civet
17057
+ init_browser_shim();
17058
+
17059
+ // source/state-cache.civet
16795
17060
  var StateCache = class {
16796
17061
  cache = /* @__PURE__ */ new Map();
16797
17062
  get(key) {
@@ -16814,8 +17079,7 @@ ${upstreamMap.comment(sourcePath, targetPath)}`;
16814
17079
  }
16815
17080
  };
16816
17081
 
16817
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\main.civet.jsx
16818
- var { SourceMap: SourceMap2 } = sourcemap_civet_exports;
17082
+ // source/main.civet
16819
17083
  var ParseErrors = class extends Error {
16820
17084
  name = "ParseErrors";
16821
17085
  errors;
@@ -16849,27 +17113,27 @@ ${upstreamMap.comment(sourcePath, targetPath)}`;
16849
17113
  "AllowClassImplicitCall",
16850
17114
  "AllowBracedApplication",
16851
17115
  "AllowIndentedApplication",
16852
- "AllowMultiLineImplicitObjectLiteral",
16853
17116
  "AllowNestedBinaryOp",
16854
17117
  "AllowNewlineBinaryOp",
16855
17118
  "AllowTrailingMemberProperty",
17119
+ "AllowImplicitFragment",
16856
17120
  "AllowPipeline",
16857
17121
  "ForbidClassImplicitCall",
16858
17122
  "ForbidBracedApplication",
16859
17123
  "ForbidIndentedApplication",
16860
- "ForbidMultiLineImplicitObjectLiteral",
16861
17124
  "ForbidNestedBinaryOp",
16862
17125
  "ForbidNewlineBinaryOp",
16863
17126
  "ForbidTrailingMemberProperty",
17127
+ "ForbidImplicitFragment",
16864
17128
  "ForbidPipeline",
16865
17129
  "RestoreAll",
16866
17130
  "RestoreClassImplicitCall",
16867
- "RestoreMultiLineImplicitObjectLiteral",
16868
17131
  "RestoreBracedApplication",
16869
17132
  "RestoreIndentedApplication",
16870
17133
  "RestoreTrailingMemberProperty",
16871
17134
  "RestoreNestedBinaryOp",
16872
17135
  "RestoreNewlineBinaryOp",
17136
+ "RestoreImplicitFragment",
16873
17137
  "RestorePipeline"
16874
17138
  ]);
16875
17139
  function decode(src) {
@@ -16889,7 +17153,7 @@ ${upstreamMap.comment(sourcePath, targetPath)}`;
16889
17153
  return src.toString("utf8");
16890
17154
  }
16891
17155
  function compile(src, options) {
16892
- src = decode(src), options ? options = { ...options } : options = {}, options.parseOptions = { ...options.parseOptions };
17156
+ src = decode(src), options ? options = { ...options } : options = {}, options.parseOptions = { ...options.parseOptions }, src = src.replace(smRegexp, (_match, sm) => (options.upstreamSourceMap ??= sm, ""));
16893
17157
  let filename2 = options.filename || "unknown";
16894
17158
  filename2.endsWith(".coffee") && !/^(#![^\r\n]*(\r\n|\n|\r))?\s*['"]civet/.test(src) && (options.parseOptions.coffeeCompat = !0);
16895
17159
  let { hits, trace, noCache } = options, events;
@@ -16935,20 +17199,19 @@ ${counts}`;
16935
17199
  throw new ParseErrors(options.errors);
16936
17200
  }
16937
17201
  if (options.sourceMap || options.inlineMap) {
16938
- options.sourceMap = new SourceMap2(src);
16939
- let code = generate_civet_default(ast2, options);
16940
- if (checkErrors(), options.inlineMap) {
16941
- let outputFilename = options.outputFilename ?? (options.js ? filename2 + ".jsx" : filename2 + ".tsx");
17202
+ options.sourceMap = new SourceMap(src, filename2);
17203
+ let code = generate_default(ast2, options);
17204
+ if (checkErrors(), options.upstreamSourceMap != null && options.sourceMap.composeUpstream(options.upstreamSourceMap), options.inlineMap) {
17205
+ let outputFilename = options.outputFilename ?? (options.js ? filename2 + ".jsx" : filename2 + ".tsx"), outDir = dirname(outputFilename);
17206
+ options.sourceMap.sourceFileName = relative(outDir, options.sourceMap.sourceFileName) || options.sourceMap.sourceFileName;
17207
+ let relativeOut = relative(outDir, outputFilename) || outputFilename;
16942
17208
  return `${code}
16943
- ${options.sourceMap.comment(filename2, outputFilename)}`;
17209
+ ${options.sourceMap.comment(relativeOut)}`;
16944
17210
  } else
16945
- return {
16946
- code,
16947
- sourceMap: options.sourceMap
16948
- };
17211
+ return { code, sourceMap: options.sourceMap };
16949
17212
  }
16950
- let result = generate_civet_default(ast2, options);
16951
- return options.errors?.length && (delete options.errors, options.sourceMap = new SourceMap2(src), generate_civet_default(ast2, options), checkErrors()), result;
17213
+ let result = generate_default(ast2, options);
17214
+ return options.errors?.length && (delete options.errors, options.sourceMap = new SourceMap(src, filename2), generate_default(ast2, options), checkErrors()), result;
16952
17215
  }
16953
17216
  return ast.then != null ? ast.then(rest) : rest(ast);
16954
17217
  }
@@ -16985,13 +17248,17 @@ ${options.sourceMap.comment(filename2, outputFilename)}`;
16985
17248
  return err instanceof import_lib2.ParseError || err instanceof ParseErrors;
16986
17249
  };
16987
17250
 
16988
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\browser.civet.jsx
17251
+ // source/browser.civet
16989
17252
  async function runScripts(type = "text/civet") {
16990
17253
  let scripts = window.document.querySelectorAll(`script[type=${JSON.stringify(type)}]`);
16991
- for (let i1 = 0, len3 = scripts.length; i1 < len3; i1++) {
16992
- let i = i1, script = scripts[i1];
16993
- runScript(script, `<script>${i}`);
16994
- }
17254
+ await Promise.all((() => {
17255
+ let results = [];
17256
+ for (let i1 = 0, len3 = scripts.length; i1 < len3; i1++) {
17257
+ let i = i1, script = scripts[i1];
17258
+ results.push(runScript(script, `<script>${i}`));
17259
+ }
17260
+ return results;
17261
+ })());
16995
17262
  }
16996
17263
  async function runScript(script, name = "<script>") {
16997
17264
  let options = {
@@ -17031,5 +17298,5 @@ ${options.sourceMap.comment(filename2, outputFilename)}`;
17031
17298
  return autoRunScripts([document.head, document.body]);
17032
17299
  });
17033
17300
  }
17034
- return __toCommonJS(browser_civet_exports);
17301
+ return __toCommonJS(browser_exports);
17035
17302
  })();