prettier 3.0.0-alpha.1 → 3.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -17,7 +17,7 @@ MIT, ISC, BSD-2-Clause, BSD-3-Clause, Apache-2.0, 0BSD
17
17
 
18
18
  ## Bundled dependencies
19
19
 
20
- ### @angular/compiler@v12.2.16
20
+ ### @angular/compiler@v14.2.5
21
21
 
22
22
  License: MIT
23
23
  By: angular
@@ -366,7 +366,7 @@ By: Alex Bell
366
366
 
367
367
  ----------------------------------------
368
368
 
369
- ### @typescript-eslint/types@v5.38.1
369
+ ### @typescript-eslint/types@v5.39.0
370
370
 
371
371
  License: MIT
372
372
  Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
@@ -395,7 +395,7 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
395
395
 
396
396
  ----------------------------------------
397
397
 
398
- ### @typescript-eslint/typescript-estree@v5.38.1
398
+ ### @typescript-eslint/typescript-estree@v5.39.0
399
399
 
400
400
  License: BSD-2-Clause
401
401
  Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
@@ -429,7 +429,7 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
429
429
 
430
430
  ----------------------------------------
431
431
 
432
- ### @typescript-eslint/visitor-keys@v5.38.1
432
+ ### @typescript-eslint/visitor-keys@v5.39.0
433
433
 
434
434
  License: MIT
435
435
  Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
@@ -514,7 +514,7 @@ Repository: <https://github.com/acornjs/acorn-jsx>
514
514
 
515
515
  ----------------------------------------
516
516
 
517
- ### angular-estree-parser@v2.5.1
517
+ ### angular-estree-parser@v4.0.1
518
518
 
519
519
  License: MIT
520
520
  By: Ika
@@ -894,7 +894,7 @@ By: Titus Wormer
894
894
 
895
895
  ----------------------------------------
896
896
 
897
- ### ci-info@v3.4.0
897
+ ### ci-info@v3.5.0
898
898
 
899
899
  License: MIT
900
900
  By: Thomas Watson Steen
@@ -1939,7 +1939,7 @@ Repository: <git+https://github.com/mk-pmb/flatten-js.git>
1939
1939
 
1940
1940
  ----------------------------------------
1941
1941
 
1942
- ### flow-parser@v0.188.1
1942
+ ### flow-parser@v0.188.2
1943
1943
 
1944
1944
  License: MIT
1945
1945
  By: Flow Team
package/index.cjs CHANGED
@@ -485,7 +485,7 @@ var init_util_shared = __esm({
485
485
  // src/main/version.evaluate.cjs
486
486
  var require_version_evaluate = __commonJS({
487
487
  "src/main/version.evaluate.cjs"(exports2, module2) {
488
- module2.exports = "3.0.0-alpha.1";
488
+ module2.exports = "3.0.0-alpha.2";
489
489
  }
490
490
  });
491
491
 
@@ -509,7 +509,7 @@ for (const name of functionNames) {
509
509
  }
510
510
  if (true) {
511
511
  prettier.util = (init_util_shared(), __toCommonJS(util_shared_exports));
512
- prettier.doc = require("./doc.mjs");
512
+ prettier.doc = require("./doc.js");
513
513
  } else {
514
514
  Object.defineProperties(prettier, {
515
515
  util: {
package/index.mjs CHANGED
@@ -822,7 +822,7 @@ var require_lib = __commonJS({
822
822
  // src/main/version.evaluate.cjs
823
823
  var require_version_evaluate = __commonJS({
824
824
  "src/main/version.evaluate.cjs"(exports, module) {
825
- module.exports = "3.0.0-alpha.1";
825
+ module.exports = "3.0.0-alpha.2";
826
826
  }
827
827
  });
828
828
 
@@ -18950,14 +18950,22 @@ async function formatWithCursor(originalText, originalOptions) {
18950
18950
  }
18951
18951
  var prettier = {
18952
18952
  formatWithCursor,
18953
- async parse(originalText, originalOptions, massage) {
18953
+ async parse(originalText, originalOptions, devOptions) {
18954
18954
  const { text, options: options9 } = normalizeInputAndOptions(
18955
18955
  originalText,
18956
18956
  await normalize(originalOptions)
18957
18957
  );
18958
18958
  const parsed = await parse(text, options9);
18959
- if (massage) {
18960
- parsed.ast = massage_ast_default(parsed.ast, options9);
18959
+ if (devOptions) {
18960
+ if (devOptions.massage) {
18961
+ parsed.ast = massage_ast_default(parsed.ast, options9);
18962
+ }
18963
+ if (devOptions.preprocessForPrint) {
18964
+ attachComments(parsed.text, parsed.ast, options9);
18965
+ if (options9.printer.preprocess) {
18966
+ parsed.ast = await options9.printer.preprocess(parsed.ast, options9);
18967
+ }
18968
+ }
18961
18969
  }
18962
18970
  return parsed;
18963
18971
  },
@@ -21637,7 +21645,6 @@ var visitor_keys_evaluate_default = {
21637
21645
  "expressions"
21638
21646
  ],
21639
21647
  NGEmptyExpression: [],
21640
- NGQuotedExpression: [],
21641
21648
  NGMicrosyntax: [
21642
21649
  "body"
21643
21650
  ],
@@ -21978,10 +21985,6 @@ function isStringPropSafeToUnquote(node, options9) {
21978
21985
  function isSimpleNumber(numberString) {
21979
21986
  return /^(?:\d+|\d+\.\d+)$/.test(numberString);
21980
21987
  }
21981
- function isJestEachTemplateLiteral(node, parentNode) {
21982
- const jestEachTriggerRegex = /^[fx]?(?:describe|it|test)$/;
21983
- return parentNode.type === "TaggedTemplateExpression" && parentNode.quasi === node && parentNode.tag.type === "MemberExpression" && parentNode.tag.property.type === "Identifier" && parentNode.tag.property.name === "each" && (parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.name) || parentNode.tag.object.type === "MemberExpression" && parentNode.tag.object.property.type === "Identifier" && (parentNode.tag.object.property.name === "only" || parentNode.tag.object.property.name === "skip") && parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.object.name));
21984
- }
21985
21988
  function templateLiteralHasNewLines(template) {
21986
21989
  return template.quasis.some((quasi) => quasi.value.raw.includes("\n"));
21987
21990
  }
@@ -22316,7 +22319,7 @@ function printTemplateLiteral(path12, print4, options9) {
22316
22319
  node
22317
22320
  } = path12;
22318
22321
  const isTemplateLiteral = node.type === "TemplateLiteral";
22319
- if (isTemplateLiteral && isJestEachTemplateLiteral(node, path12.getParentNode())) {
22322
+ if (isTemplateLiteral && isJestEachTemplateLiteral(path12)) {
22320
22323
  const printed = printJestEachTemplateLiteral(path12, options9, print4);
22321
22324
  if (printed) {
22322
22325
  return printed;
@@ -22327,34 +22330,39 @@ function printTemplateLiteral(path12, print4, options9) {
22327
22330
  expressionsKey = "types";
22328
22331
  }
22329
22332
  const parts = [];
22330
- let expressions = path12.map(print4, expressionsKey);
22333
+ let expressionDocs = path12.map(print4, expressionsKey);
22331
22334
  const isSimple = isSimpleTemplateLiteral(node);
22332
22335
  if (isSimple) {
22333
- expressions = expressions.map((doc2) => printDocToString(doc2, {
22336
+ expressionDocs = expressionDocs.map((doc2) => printDocToString(doc2, {
22334
22337
  ...options9,
22335
22338
  printWidth: Number.POSITIVE_INFINITY
22336
22339
  }).formatted);
22337
22340
  }
22338
22341
  parts.push(lineSuffixBoundary, "`");
22339
- path12.each((childPath) => {
22340
- const i = childPath.getName();
22342
+ let previousQuasiIndentSize = 0;
22343
+ path12.each(({
22344
+ index,
22345
+ node: quasi
22346
+ }) => {
22341
22347
  parts.push(print4());
22342
- if (i < expressions.length) {
22343
- const {
22344
- tabWidth
22345
- } = options9;
22346
- const quasi = childPath.node;
22347
- const indentSize = getIndentSize(quasi.value.raw, tabWidth);
22348
- let printed = expressions[i];
22349
- if (!isSimple) {
22350
- const expression = node[expressionsKey][i];
22351
- if (hasComment(expression) || isMemberExpression(expression) || expression.type === "ConditionalExpression" || expression.type === "SequenceExpression" || expression.type === "TSAsExpression" || isBinaryish(expression)) {
22352
- printed = [indent([softline, printed]), softline];
22353
- }
22354
- }
22355
- const aligned = indentSize === 0 && quasi.value.raw.endsWith("\n") ? align(Number.NEGATIVE_INFINITY, printed) : addAlignmentToDoc(printed, indentSize, tabWidth);
22356
- parts.push(group(["${", aligned, lineSuffixBoundary, "}"]));
22348
+ if (quasi.tail) {
22349
+ return;
22357
22350
  }
22351
+ const {
22352
+ tabWidth
22353
+ } = options9;
22354
+ const text = quasi.value.raw;
22355
+ const indentSize = text.includes("\n") ? getIndentSize(text, tabWidth) : previousQuasiIndentSize;
22356
+ previousQuasiIndentSize = indentSize;
22357
+ let expressionDoc = expressionDocs[index];
22358
+ if (!isSimple) {
22359
+ const expression = node[expressionsKey][index];
22360
+ if (hasComment(expression) || isMemberExpression(expression) || expression.type === "ConditionalExpression" || expression.type === "SequenceExpression" || expression.type === "TSAsExpression" || isBinaryish(expression)) {
22361
+ expressionDoc = [indent([softline, expressionDoc]), softline];
22362
+ }
22363
+ }
22364
+ const aligned = indentSize === 0 && text.endsWith("\n") ? align(Number.NEGATIVE_INFINITY, expressionDoc) : addAlignmentToDoc(expressionDoc, indentSize, tabWidth);
22365
+ parts.push(group(["${", aligned, lineSuffixBoundary, "}"]));
22358
22366
  }, "quasis");
22359
22367
  parts.push("`");
22360
22368
  return parts;
@@ -22441,6 +22449,13 @@ function escapeTemplateCharacters(doc2, raw) {
22441
22449
  function uncookTemplateElementValue(cookedValue) {
22442
22450
  return cookedValue.replace(/([\\`]|\${)/g, "\\$1");
22443
22451
  }
22452
+ function isJestEachTemplateLiteral({
22453
+ node,
22454
+ parent
22455
+ }) {
22456
+ const jestEachTriggerRegex = /^[fx]?(?:describe|it|test)$/;
22457
+ return parent.type === "TaggedTemplateExpression" && parent.quasi === node && parent.tag.type === "MemberExpression" && parent.tag.property.type === "Identifier" && parent.tag.property.name === "each" && (parent.tag.object.type === "Identifier" && jestEachTriggerRegex.test(parent.tag.object.name) || parent.tag.object.type === "MemberExpression" && parent.tag.object.property.type === "Identifier" && (parent.tag.object.property.name === "only" || parent.tag.object.property.name === "skip") && parent.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(parent.tag.object.object.name));
22458
+ }
22444
22459
 
22445
22460
  // src/language-js/embed/markdown.js
22446
22461
  async function embedMarkdown(textToDoc2, print4, path12) {
@@ -24619,7 +24634,7 @@ function printAngular(path12, options9, print4) {
24619
24634
  case "NGRoot":
24620
24635
  return [
24621
24636
  print4("node"),
24622
- !hasComment(node.node) ? "" : " //" + getComments(node.node)[0].value.trimEnd()
24637
+ hasComment(node.node) ? " //" + getComments(node.node)[0].value.trimEnd() : ""
24623
24638
  ];
24624
24639
  case "NGPipeExpression":
24625
24640
  return printBinaryishExpression(path12, options9, print4);
@@ -24628,19 +24643,17 @@ function printAngular(path12, options9, print4) {
24628
24643
  join(
24629
24644
  [";", line],
24630
24645
  path12.map(
24631
- (childPath) => hasNgSideEffect(childPath) ? print4() : ["(", print4(), ")"],
24646
+ () => hasNgSideEffect(path12) ? print4() : ["(", print4(), ")"],
24632
24647
  "expressions"
24633
24648
  )
24634
24649
  )
24635
24650
  );
24636
24651
  case "NGEmptyExpression":
24637
24652
  return "";
24638
- case "NGQuotedExpression":
24639
- return [node.prefix, ": ", node.value.trim()];
24640
24653
  case "NGMicrosyntax":
24641
24654
  return path12.map(
24642
- (childPath, index) => [
24643
- index === 0 ? "" : isNgForOf(childPath.node, index, node) ? " " : [";", line],
24655
+ () => [
24656
+ path12.isFirst ? "" : isNgForOf(path12) ? " " : [";", line],
24644
24657
  print4()
24645
24658
  ],
24646
24659
  "body"
@@ -24653,9 +24666,8 @@ function printAngular(path12, options9, print4) {
24653
24666
  node.alias === null ? "" : [" as ", print4("alias")]
24654
24667
  ];
24655
24668
  case "NGMicrosyntaxKeyedExpression": {
24656
- const index = path12.getName();
24657
- const parentNode = path12.getParentNode();
24658
- const shouldNotPrintColon = isNgForOf(node, index, parentNode) || (index === 1 && (node.key.name === "then" || node.key.name === "else") || index === 2 && node.key.name === "else" && parentNode.body[index - 1].type === "NGMicrosyntaxKeyedExpression" && parentNode.body[index - 1].key.name === "then") && parentNode.body[0].type === "NGMicrosyntaxExpression";
24669
+ const { index, parent } = path12;
24670
+ const shouldNotPrintColon = isNgForOf(path12) || (index === 1 && (node.key.name === "then" || node.key.name === "else") || index === 2 && node.key.name === "else" && parent.body[index - 1].type === "NGMicrosyntaxKeyedExpression" && parent.body[index - 1].key.name === "then") && parent.body[0].type === "NGMicrosyntaxExpression";
24659
24671
  return [
24660
24672
  print4("key"),
24661
24673
  shouldNotPrintColon ? " " : ": ",
@@ -24674,14 +24686,12 @@ function printAngular(path12, options9, print4) {
24674
24686
  throw new unexpected_node_error_default(node, "Angular");
24675
24687
  }
24676
24688
  }
24677
- function isNgForOf(node, index, parentNode) {
24678
- return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null;
24689
+ function isNgForOf({ node, index, parent }) {
24690
+ return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parent.body[0].type === "NGMicrosyntaxLet" && parent.body[0].value === null;
24679
24691
  }
24680
24692
  function hasNgSideEffect(path12) {
24681
24693
  return hasNode(path12.node, (node) => {
24682
24694
  switch (node.type) {
24683
- case void 0:
24684
- return false;
24685
24695
  case "CallExpression":
24686
24696
  case "OptionalCallExpression":
24687
24697
  case "AssignmentExpression":
@@ -24756,6 +24766,15 @@ function printRestSpread(path12, options9, print4) {
24756
24766
  }
24757
24767
 
24758
24768
  // src/language-js/print/array.js
24769
+ function printEmptyArray(path12, openBracket, closeBracket, options9) {
24770
+ const {
24771
+ node
24772
+ } = path12;
24773
+ if (!hasComment(node, CommentCheckFlags.Dangling)) {
24774
+ return [openBracket, closeBracket];
24775
+ }
24776
+ return group([openBracket, printDanglingComments(path12, options9), softline, closeBracket]);
24777
+ }
24759
24778
  function printArray(path12, options9, print4) {
24760
24779
  const {
24761
24780
  node
@@ -24764,11 +24783,7 @@ function printArray(path12, options9, print4) {
24764
24783
  const openBracket = node.type === "TupleExpression" ? "#[" : "[";
24765
24784
  const closeBracket = "]";
24766
24785
  if (node.elements.length === 0) {
24767
- if (!hasComment(node, CommentCheckFlags.Dangling)) {
24768
- parts.push(openBracket, closeBracket);
24769
- } else {
24770
- parts.push(group([openBracket, printDanglingComments(path12, options9), softline, closeBracket]));
24771
- }
24786
+ parts.push(printEmptyArray(path12, openBracket, closeBracket, options9));
24772
24787
  } else {
24773
24788
  const lastElem = at_default(false, node.elements, -1);
24774
24789
  const canHaveTrailingComma = !(lastElem && lastElem.type === "RestElement");
@@ -25793,18 +25808,18 @@ function printTupleType(path12, options9, print4) {
25793
25808
  const { node } = path12;
25794
25809
  const typesField = node.type === "TSTupleType" ? "elementTypes" : "types";
25795
25810
  const types = node[typesField];
25796
- const isNonEmptyTuple = is_non_empty_array_default(types);
25797
- const bracketsDelimiterLine = isNonEmptyTuple ? softline : "";
25811
+ const isEmptyTuple = types.length === 0;
25812
+ const openBracket = "[";
25813
+ const closeBracket = "]";
25814
+ if (isEmptyTuple) {
25815
+ return printEmptyArray(path12, openBracket, closeBracket, options9);
25816
+ }
25798
25817
  return group([
25799
- "[",
25800
- indent([
25801
- bracketsDelimiterLine,
25802
- printArrayItems(path12, options9, typesField, print4)
25803
- ]),
25804
- ifBreak(isNonEmptyTuple && shouldPrintComma(options9, "all") ? "," : ""),
25805
- printDanglingComments(path12, options9, true),
25806
- bracketsDelimiterLine,
25807
- "]"
25818
+ openBracket,
25819
+ indent([softline, printArrayItems(path12, options9, typesField, print4)]),
25820
+ ifBreak(shouldPrintComma(options9, "all") ? "," : ""),
25821
+ softline,
25822
+ closeBracket
25808
25823
  ]);
25809
25824
  }
25810
25825
  function printIndexedAccessType(path12, options9, print4) {
@@ -32006,7 +32021,7 @@ var isSingleCharRegex = /^.$/su;
32006
32021
  function preprocess2(ast, options9) {
32007
32022
  ast = restoreUnescapedCharacter(ast, options9);
32008
32023
  ast = mergeContinuousTexts(ast);
32009
- ast = transformInlineCode(ast);
32024
+ ast = transformInlineCode(ast, options9);
32010
32025
  ast = transformIndentedCodeblockAndMarkItsParentList(ast, options9);
32011
32026
  ast = markAlignedList(ast, options9);
32012
32027
  ast = splitTextIntoSentences(ast, options9);
@@ -32025,9 +32040,9 @@ function transformImportExport(ast) {
32025
32040
  };
32026
32041
  });
32027
32042
  }
32028
- function transformInlineCode(ast) {
32043
+ function transformInlineCode(ast, options9) {
32029
32044
  return mapAst(ast, (node) => {
32030
- if (node.type !== "inlineCode") {
32045
+ if (node.type !== "inlineCode" || options9.proseWrap === "preserve") {
32031
32046
  return node;
32032
32047
  }
32033
32048
  return {
package/internal/cli.mjs CHANGED
@@ -13028,10 +13028,10 @@ async function format2(context, input, opt) {
13028
13028
  } else {
13029
13029
  const stringify4 = (obj) => JSON.stringify(obj, null, 2);
13030
13030
  const ast = stringify4(
13031
- (await prettier.__debug.parse(input, opt, true)).ast
13031
+ (await prettier.__debug.parse(input, opt, { massage: true })).ast
13032
13032
  );
13033
13033
  const past = stringify4(
13034
- (await prettier.__debug.parse(pp, opt, true)).ast
13034
+ (await prettier.__debug.parse(pp, opt, { massage: true })).ast
13035
13035
  );
13036
13036
  if (ast !== past) {
13037
13037
  const MAX_AST_SIZE = 2097152;
@@ -8831,6 +8831,12 @@ var require_vendors = __commonJS({
8831
8831
  env: "DRONE",
8832
8832
  pr: { DRONE_BUILD_EVENT: "pull_request" }
8833
8833
  },
8834
+ {
8835
+ name: "Woodpecker",
8836
+ constant: "WOODPECKER",
8837
+ env: { CI: "woodpecker" },
8838
+ pr: { CI_BUILD_EVENT: "pull_request" }
8839
+ },
8834
8840
  {
8835
8841
  name: "dsari",
8836
8842
  constant: "DSARI",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prettier",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.2",
4
4
  "description": "Prettier is an opinionated code formatter",
5
5
  "bin": "./bin/prettier.cjs",
6
6
  "repository": "prettier/prettier",
@@ -10,4 +10,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
10
10
  `):g=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),g}jsx_readString(m){let x="",g=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let C=this.input.charCodeAt(this.pos);if(C===m)break;C===38?(x+=this.input.slice(g,this.pos),x+=this.jsx_readEntity(),g=this.pos):j(C)?(x+=this.input.slice(g,this.pos),x+=this.jsx_readNewLine(!1),g=this.pos):++this.pos}return x+=this.input.slice(g,this.pos++),this.finishToken(h.string,x)}jsx_readEntity(){let m="",x=0,g,C=this.input[this.pos];C!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let V=++this.pos;for(;this.pos<this.input.length&&x++<10;){if(C=this.input[this.pos++],C===";"){m[0]==="#"?m[1]==="x"?(m=m.substr(2),Fs.test(m)&&(g=String.fromCharCode(parseInt(m,16)))):(m=m.substr(1),Ds.test(m)&&(g=String.fromCharCode(parseInt(m,10)))):g=Rs[m];break}m+=C}return g||(this.pos=V,"&")}jsx_readWord(){let m,x=this.pos;do m=this.input.charCodeAt(++this.pos);while(U(m)||m===45);return this.finishToken(f.jsxName,this.input.slice(x,this.pos))}jsx_parseIdentifier(){let m=this.startNode();return this.type===f.jsxName?m.name=this.value:this.type.keyword?m.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(m,"JSXIdentifier")}jsx_parseNamespacedName(){let m=this.start,x=this.startLoc,g=this.jsx_parseIdentifier();if(!r.allowNamespaces||!this.eat(h.colon))return g;var C=this.startNodeAt(m,x);return C.namespace=g,C.name=this.jsx_parseIdentifier(),this.finishNode(C,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===f.jsxTagEnd)return"";let m=this.start,x=this.startLoc,g=this.jsx_parseNamespacedName();for(this.type===h.dot&&g.type==="JSXNamespacedName"&&!r.allowNamespacedObjects&&this.unexpected();this.eat(h.dot);){let C=this.startNodeAt(m,x);C.object=g,C.property=this.jsx_parseIdentifier(),g=this.finishNode(C,"JSXMemberExpression")}return g}jsx_parseAttributeValue(){switch(this.type){case h.braceL:let m=this.jsx_parseExpressionContainer();return m.expression.type==="JSXEmptyExpression"&&this.raise(m.start,"JSX attributes must only be assigned a non-empty expression"),m;case f.jsxTagStart:case h.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let m=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(m,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let m=this.startNode();return this.next(),m.expression=this.type===h.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(h.braceR),this.finishNode(m,"JSXExpressionContainer")}jsx_parseAttribute(){let m=this.startNode();return this.eat(h.braceL)?(this.expect(h.ellipsis),m.argument=this.parseMaybeAssign(),this.expect(h.braceR),this.finishNode(m,"JSXSpreadAttribute")):(m.name=this.jsx_parseNamespacedName(),m.value=this.eat(h.eq)?this.jsx_parseAttributeValue():null,this.finishNode(m,"JSXAttribute"))}jsx_parseOpeningElementAt(m,x){let g=this.startNodeAt(m,x);g.attributes=[];let C=this.jsx_parseElementName();for(C&&(g.name=C);this.type!==h.slash&&this.type!==f.jsxTagEnd;)g.attributes.push(this.jsx_parseAttribute());return g.selfClosing=this.eat(h.slash),this.expect(f.jsxTagEnd),this.finishNode(g,C?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(m,x){let g=this.startNodeAt(m,x),C=this.jsx_parseElementName();return C&&(g.name=C),this.expect(f.jsxTagEnd),this.finishNode(g,C?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(m,x){let g=this.startNodeAt(m,x),C=[],V=this.jsx_parseOpeningElementAt(m,x),H=null;if(!V.selfClosing){e:for(;;)switch(this.type){case f.jsxTagStart:if(m=this.start,x=this.startLoc,this.next(),this.eat(h.slash)){H=this.jsx_parseClosingElementAt(m,x);break e}C.push(this.jsx_parseElementAt(m,x));break;case f.jsxText:C.push(this.parseExprAtom());break;case h.braceL:C.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}Ie(H.name)!==Ie(V.name)&&this.raise(H.start,"Expected corresponding JSX closing tag for <"+Ie(V.name)+">")}let _=V.name?"Element":"Fragment";return g["opening"+_]=V,g["closing"+_]=H,g.children=C,this.type===h.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(g,"JSX"+_)}jsx_parseText(){let m=this.parseLiteral(this.value);return m.type="JSXText",m}jsx_parseElement(){let m=this.start,x=this.startLoc;return this.next(),this.jsx_parseElementAt(m,x)}parseExprAtom(m){return this.type===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(m)}readToken(m){let x=this.curContext();if(x===N)return this.jsx_readToken();if(x===I||x===B){if(G(m))return this.jsx_readWord();if(m==62)return++this.pos,this.finishToken(f.jsxTagEnd);if((m===34||m===39)&&x==I)return this.jsx_readString(m)}return m===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(m)}updateContext(m){if(this.type==h.braceL){var x=this.curContext();x==I?this.context.push(v.b_expr):x==N?this.context.push(v.b_tmpl):super.updateContext(m),this.exprAllowed=!0}else if(this.type===h.slash&&m===f.jsxTagStart)this.context.length-=2,this.context.push(B),this.exprAllowed=!1;else return super.updateContext(m)}}}});var Ti=Ee(Z=>{"use strict";b();Object.defineProperty(Z,"__esModule",{value:!0});var Js=Pe(),zs=ut(),Xs;function Gs(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}function bi(r){if(r&&r.__esModule)return r;var u=Object.create(null);return r&&Object.keys(r).forEach(function(p){if(p!=="default"){var o=Object.getOwnPropertyDescriptor(r,p);Object.defineProperty(u,p,o.get?o:{enumerable:!0,get:function(){return r[p]}})}}),u.default=r,Object.freeze(u)}var yi=bi(Js),Ws=Gs(zs),Hs=bi(Xs),M={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Qs(r,u){let p=r[0],o=r[r.length-1],h={type:M.Template,value:u.slice(p.start,o.end)};return p.loc&&(h.loc={start:p.loc.start,end:o.loc.end}),p.range&&(h.start=p.range[0],h.end=o.range[1],h.range=[h.start,h.end]),h}function pt(r,u){this._acornTokTypes=r,this._tokens=[],this._curlyBrace=null,this._code=u}pt.prototype={constructor:pt,translate(r,u){let p=r.type,o=this._acornTokTypes;if(p===o.name)r.type=M.Identifier,r.value==="static"&&(r.type=M.Keyword),u.ecmaVersion>5&&(r.value==="yield"||r.value==="let")&&(r.type=M.Keyword);else if(p===o.privateId)r.type=M.PrivateIdentifier;else if(p===o.semi||p===o.comma||p===o.parenL||p===o.parenR||p===o.braceL||p===o.braceR||p===o.dot||p===o.bracketL||p===o.colon||p===o.question||p===o.bracketR||p===o.ellipsis||p===o.arrow||p===o.jsxTagStart||p===o.incDec||p===o.starstar||p===o.jsxTagEnd||p===o.prefix||p===o.questionDot||p.binop&&!p.keyword||p.isAssign)r.type=M.Punctuator,r.value=this._code.slice(r.start,r.end);else if(p===o.jsxName)r.type=M.JSXIdentifier;else if(p.label==="jsxText"||p===o.jsxAttrValueToken)r.type=M.JSXText;else if(p.keyword)p.keyword==="true"||p.keyword==="false"?r.type=M.Boolean:p.keyword==="null"?r.type=M.Null:r.type=M.Keyword;else if(p===o.num)r.type=M.Numeric,r.value=this._code.slice(r.start,r.end);else if(p===o.string)u.jsxAttrValueToken?(u.jsxAttrValueToken=!1,r.type=M.JSXText):r.type=M.String,r.value=this._code.slice(r.start,r.end);else if(p===o.regexp){r.type=M.RegularExpression;let h=r.value;r.regex={flags:h.flags,pattern:h.pattern},r.value=`/${h.pattern}/${h.flags}`}return r},onToken(r,u){let p=this,o=this._acornTokTypes,h=u.tokens,f=this._tokens;function v(){h.push(Qs(p._tokens,p._code)),p._tokens=[]}if(r.type===o.eof){this._curlyBrace&&h.push(this.translate(this._curlyBrace,u));return}if(r.type===o.backQuote){this._curlyBrace&&(h.push(this.translate(this._curlyBrace,u)),this._curlyBrace=null),f.push(r),f.length>1&&v();return}if(r.type===o.dollarBraceL){f.push(r),v();return}if(r.type===o.braceR){this._curlyBrace&&h.push(this.translate(this._curlyBrace,u)),this._curlyBrace=r;return}if(r.type===o.template||r.type===o.invalidTemplate){this._curlyBrace&&(f.push(this._curlyBrace),this._curlyBrace=null),f.push(r);return}this._curlyBrace&&(h.push(this.translate(this._curlyBrace,u)),this._curlyBrace=null),h.push(this.translate(r,u))}};var Xe=[3,5,6,7,8,9,10,11,12,13,14];function vi(){return Xe[Xe.length-1]}function Ys(){return[...Xe]}function Zs(r=5){let u=r==="latest"?vi():r;if(typeof u!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof r} instead.`);if(u>=2015&&(u-=2009),!Xe.includes(u))throw new Error("Invalid ecmaVersion.");return u}function $s(r="script"){if(r==="script"||r==="module")return r;if(r==="commonjs")return"script";throw new Error("Invalid sourceType.")}function er(r){let u=Zs(r.ecmaVersion),p=$s(r.sourceType),o=r.range===!0,h=r.loc===!0;if(u!==3&&r.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof r.allowReserved<"u"&&typeof r.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let f=u===3?r.allowReserved||"never":!1,v=r.ecmaFeatures||{},I=r.sourceType==="commonjs"||Boolean(v.globalReturn);if(p==="module"&&u<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},r,{ecmaVersion:u,sourceType:p,ranges:o,locations:h,allowReserved:f,allowReturnOutsideFunction:I})}var ae=Symbol("espree's internal state"),ct=Symbol("espree's esprimaFinishNode");function tr(r,u,p,o,h,f,v){let I;r?I="Block":v.slice(p,p+2)==="#!"?I="Hashbang":I="Line";let B={type:I,value:u};return typeof p=="number"&&(B.start=p,B.end=o,B.range=[p,o]),typeof h=="object"&&(B.loc={start:h,end:f}),B}var gi=()=>r=>{let u=Object.assign({},r.acorn.tokTypes);return r.acornJsx&&Object.assign(u,r.acornJsx.tokTypes),class extends r{constructor(o,h){(typeof o!="object"||o===null)&&(o={}),typeof h!="string"&&!(h instanceof String)&&(h=String(h));let f=o.sourceType,v=er(o),I=v.ecmaFeatures||{},B=v.tokens===!0?new pt(u,h):null,N={originalSourceType:f||v.sourceType,tokens:B?[]:null,comments:v.comment===!0?[]:null,impliedStrict:I.impliedStrict===!0&&v.ecmaVersion>=5,ecmaVersion:v.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:v.ecmaVersion,sourceType:v.sourceType,ranges:v.ranges,locations:v.locations,allowReserved:v.allowReserved,allowReturnOutsideFunction:v.allowReturnOutsideFunction,onToken:j=>{B&&B.onToken(j,N),j.type!==u.eof&&(N.lastToken=j)},onComment:(j,G,U,m,x,g)=>{if(N.comments){let C=tr(j,G,U,m,x,g,h);N.comments.push(C)}}},h),this[ae]=N}tokenize(){do this.next();while(this.type!==u.eof);this.next();let o=this[ae],h=o.tokens;return o.comments&&(h.comments=o.comments),h}finishNode(...o){let h=super.finishNode(...o);return this[ct](h)}finishNodeAt(...o){let h=super.finishNodeAt(...o);return this[ct](h)}parse(){let o=this[ae],h=super.parse();if(h.sourceType=o.originalSourceType,o.comments&&(h.comments=o.comments),o.tokens&&(h.tokens=o.tokens),h.body.length){let[f]=h.body;h.range&&(h.range[0]=f.range[0]),h.loc&&(h.loc.start=f.loc.start),h.start=f.start}return o.lastToken&&(h.range&&(h.range[1]=o.lastToken.range[1]),h.loc&&(h.loc.end=o.lastToken.loc.end),h.end=o.lastToken.end),this[ae].templateElements.forEach(f=>{let I=f.tail?1:2;f.start+=-1,f.end+=I,f.range&&(f.range[0]+=-1,f.range[1]+=I),f.loc&&(f.loc.start.column+=-1,f.loc.end.column+=I)}),h}parseTopLevel(o){return this[ae].impliedStrict&&(this.strict=!0),super.parseTopLevel(o)}raise(o,h){let f=r.acorn.getLineInfo(this.input,o),v=new SyntaxError(h);throw v.index=o,v.lineNumber=f.line,v.column=f.column+1,v}raiseRecoverable(o,h){this.raise(o,h)}unexpected(o){let h="Unexpected token";if(o!=null){if(this.pos=o,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
11
11
  `,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(h+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,h)}jsx_readString(o){let h=super.jsx_readString(o);return this.type===u.string&&(this[ae].jsxAttrValueToken=!0),h}[ct](o){return o.type==="TemplateElement"&&this[ae].templateElements.push(o),o.type.includes("Function")&&!o.generator&&(o.generator=!1),o}}},ir="9.4.0",Si={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=yi.Parser.extend(gi())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=yi.Parser.extend(Ws.default(),gi())),this._jsx},get(r){return Boolean(r&&r.ecmaFeatures&&r.ecmaFeatures.jsx)?this.jsx:this.regular}};function sr(r,u){let p=Si.get(u);return(!u||u.tokens!==!0)&&(u=Object.assign({},u,{tokens:!0})),new p(u,r).tokenize()}function rr(r,u){let p=Si.get(u);return new p(u,r).parse()}var ar=ir,nr=function(){return Hs.KEYS}(),or=void 0,ur=vi(),hr=Ys();Z.Syntax=or;Z.VisitorKeys=nr;Z.latestEcmaVersion=ur;Z.parse=rr;Z.supportedEcmaVersions=hr;Z.tokenize=sr;Z.version=ar});var dr={};ss(dr,{default:()=>fr});b();b();b();function ns(r,u){let p=new SyntaxError(r+" ("+u.loc.start.line+":"+u.loc.start.column+")");return Object.assign(p,u)}var le=ns;b();function os(...r){let u;for(let[p,o]of r.entries())try{return{result:o()}}catch(h){p===0&&(u=h)}return{error:u}}var je=os;b();b();var fe=rs(ei(),1);b();b();function ys(r){if(!r.startsWith("#!"))return"";let u=r.indexOf(`
12
12
  `);return u===-1?r:r.slice(0,u)}var ti=ys;function gs(r){let u=ti(r);u&&(r=r.slice(u.length+1));let p=(0,fe.extract)(r),{pragmas:o,comments:h}=(0,fe.parseWithComments)(p);return{shebang:u,text:r,pragmas:o,comments:h}}function ii(r){let u=Object.keys(gs(r).pragmas);return u.includes("prettier")||u.includes("format")}b();b();function bs(r){return Array.isArray(r)&&r.length>0}var de=bs;function D(r,u){let{ignoreDecorators:p}=u||{};if(!p){let o=r.declaration&&r.declaration.decorators||r.decorators;if(de(o))return D(o[0])}return r.range?r.range[0]:r.start}function K(r){return r.range?r.range[1]:r.end}function vs(r){return r=typeof r=="function"?{parse:r}:r,{astFormat:"estree",hasPragma:ii,locStart:D,locEnd:K,...r}}var Ue=vs;b();b();var Ss=(r,u,p,...o)=>{if(!(r&&u==null))return u.at?u.at(p,...o):u[p<0?u.length+p:p]},qe=Ss;b();function Ts({type:r}){return r.startsWith("TS")&&r.endsWith("Keyword")}var si=Ts;b();b();var Cs=new Set(["Block","CommentBlock","MultiLine"]),Es=r=>Cs.has(r==null?void 0:r.type),ke=Es;function ks(r){return ke(r)&&r.value[0]==="*"&&/@type\b/.test(r.value)}var ri=ks;b();function _s(r){let u=`*${r.value}*`.split(`
13
- `);return u.length>1&&u.every(p=>p.trimStart()[0]==="*")}var st=_s;b();b();b();b();var _e=null;function we(r){if(_e!==null&&typeof _e.property){let u=_e;return _e=we.prototype=null,u}return _e=we.prototype=r==null?Object.create(null):r,new we}var ws=10;for(let r=0;r<=ws;r++)we();function rt(r){return we(r)}function As(r,u="type"){rt(r);function p(o){let h=o[u],f=r[h];if(!Array.isArray(f))throw Object.assign(new Error(`Missing visitor keys for '${h}'.`),{node:o});return f}return p}var ai=As;var ni={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body","interpreter"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ExportAllDeclaration:["source","exported","assertions"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","mixins","implements","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","mixins","implements","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation","initializer"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters"],TSAsExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members","modifiers"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body","modifiers"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","parameter"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value","typeParameters"],PrivateIdentifier:[],Property:["key","value","decorators"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value","decorators"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGQuotedExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],SpreadProperty:["argument"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],BigIntTypeAnnotation:[],QualifiedTypeofIdentifier:["id","qualification"]};var Is=ai(ni),oi=Is;function at(r,u){if(!(r!==null&&typeof r=="object"))return r;if(Array.isArray(r)){for(let o=0;o<r.length;o++)r[o]=at(r[o],u);return r}let p=oi(r);for(let o=0;o<p.length;o++)r[p[o]]=at(r[p[o]],u);return u(r)||r}var me=at;b();b();function Ns(r,u){let{start:p,end:o}=r.loc;throw le(u,{loc:{start:{line:p.line,column:p.column+1},end:{line:o.line,column:o.column+1}}})}var Ae=Ns;function Ls(r){for(;r&&r.kind!==305;)r=r.parent;return r}function Vs(r){let{illegalDecorators:u}=r;if(!de(u))return;let[{expression:p}]=u,o=Ls(p),[h,f]=[p.pos,p.end].map(v=>{let{line:I,character:B}=o.getLineAndCharacterOfPosition(v);return{line:I+1,column:B}});Ae({loc:{start:h,end:f}},"Decorators are not valid here.")}function Os(r,u){r.kind!==167||r.modifiers&&!r.modifiers.some(h=>h.kind===126)||r.initializer&&u.value===null&&Ae(u,"Abstract property cannot have an initializer")}function ui(r,u){let{esTreeNodeToTSNodeMap:p,tsNodeToESTreeNodeMap:o}=u.tsParseResult;me(r,h=>{let f=p.get(h);if(!f)return;let v=o.get(f);v===h&&(Vs(f),Os(f,v))})}function Bs(r,u){if(u.parser==="typescript"&&/@|abstract/.test(u.originalText)&&ui(r,u),u.parser!=="typescript"&&u.parser!=="flow"&&u.parser!=="acorn"&&u.parser!=="espree"&&u.parser!=="meriyah"){let o=new Set;r=me(r,h=>{h.leadingComments&&h.leadingComments.some(ri)&&o.add(D(h))}),r=me(r,h=>{if(h.type==="ParenthesizedExpression"){let{expression:f}=h;if(f.type==="TypeCastExpression")return f.range=h.range,f;let v=D(h);if(!o.has(v))return f.extra={...f.extra,parenthesized:!0},f}})}if(r=me(r,o=>{switch(o.type){case"ChainExpression":return Ke(o.expression);case"LogicalExpression":if(hi(o))return nt(o);break;case"VariableDeclaration":{let h=qe(!1,o.declarations,-1);h&&h.init&&p(o,h);break}case"TSParenthesizedType":return si(o.typeAnnotation)||o.typeAnnotation.type==="TSThisType"||(o.typeAnnotation.range=[D(o),K(o)]),o.typeAnnotation;case"TSTypeParameter":if(typeof o.name=="string"){let h=D(o);o.name={type:"Identifier",name:o.name,range:[h,h+o.name.length]}}break;case"ObjectExpression":if(u.parser==="typescript"){let h=o.properties.find(f=>f.type==="Property"&&f.value.type==="TSEmptyBodyFunctionExpression");h&&Ae(h.value,"Unexpected token.")}break;case"SequenceExpression":{let h=qe(!1,o.expressions,-1);o.range=[D(o),Math.min(K(h),K(o))];break}case"TopicReference":u.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:h}=o;if(u.parser==="meriyah"&&h&&h.type==="Identifier"){let f=u.originalText.slice(D(h),K(h));(f.startsWith('"')||f.startsWith("'"))&&(o.exported={...o.exported,type:"Literal",value:o.exported.name,raw:f})}break}}}),de(r.comments)){let o=qe(!1,r.comments,-1);for(let h=r.comments.length-2;h>=0;h--){let f=r.comments[h];K(f)===D(o)&&ke(f)&&ke(o)&&st(f)&&st(o)&&(r.comments.splice(h+1,1),f.value+="*//*"+o.value,f.range=[D(f),K(o)]),o=f}}return r;function p(o,h){u.originalText[K(h)]!==";"&&(o.range=[D(o),K(h)])}}function Ke(r){switch(r.type){case"CallExpression":r.type="OptionalCallExpression",r.callee=Ke(r.callee);break;case"MemberExpression":r.type="OptionalMemberExpression",r.object=Ke(r.object);break;case"TSNonNullExpression":r.expression=Ke(r.expression);break}return r}function hi(r){return r.type==="LogicalExpression"&&r.right.type==="LogicalExpression"&&r.operator===r.right.operator}function nt(r){return hi(r)?nt({type:"LogicalExpression",operator:r.operator,left:nt({type:"LogicalExpression",operator:r.operator,left:r.left,right:r.right.left,range:[D(r.left),K(r.right.left)]}),right:r.right.right,range:[D(r),K(r)]}):r}var Je=Bs;var js={ecmaVersion:"latest",sourceType:"module",allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Us(r){let{message:u,loc:p}=r;if(!p)return r;let{line:o,column:h}=p;return le(u.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:o,column:h+1}},cause:r})}var ht,qs=()=>{if(!ht){let{Parser:r}=Pe(),u=ut();ht=r.extend(u())}return ht};function mi(r,u){let p=qs(),o=[],h=[],f=p.parse(r,{...js,sourceType:u,onComment:o,onToken:h});return f.comments=o,f.tokens=h,f}function Ks(r,u={}){let{result:p,error:o}=je(()=>mi(r,"module"),()=>mi(r,"script"));if(!p)throw Us(o);return u.originalText=r,Je(p,u)}var xi=Ue(Ks);b();var Ci={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function cr(r){let{message:u,lineNumber:p,column:o}=r;return typeof p!="number"?r:le(u,{loc:{start:{line:p,column:o}},cause:r})}function pr(r,u={}){let{parse:p}=Ti(),{result:o,error:h}=je(()=>p(r,{...Ci,sourceType:"module"}),()=>p(r,{...Ci,sourceType:"script"}));if(!o)throw cr(h);return u.originalText=r,Je(o,u)}var Ei=Ue(pr);var lr={parsers:{acorn:xi,espree:Ei}},fr=lr;return as(dr);});
13
+ `);return u.length>1&&u.every(p=>p.trimStart()[0]==="*")}var st=_s;b();b();b();b();var _e=null;function we(r){if(_e!==null&&typeof _e.property){let u=_e;return _e=we.prototype=null,u}return _e=we.prototype=r==null?Object.create(null):r,new we}var ws=10;for(let r=0;r<=ws;r++)we();function rt(r){return we(r)}function As(r,u="type"){rt(r);function p(o){let h=o[u],f=r[h];if(!Array.isArray(f))throw Object.assign(new Error(`Missing visitor keys for '${h}'.`),{node:o});return f}return p}var ai=As;var ni={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body","interpreter"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ExportAllDeclaration:["source","exported","assertions"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","mixins","implements","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","mixins","implements","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation","initializer"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters"],TSAsExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members","modifiers"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body","modifiers"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","parameter"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value","typeParameters"],PrivateIdentifier:[],Property:["key","value","decorators"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value","decorators"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],SpreadProperty:["argument"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],BigIntTypeAnnotation:[],QualifiedTypeofIdentifier:["id","qualification"]};var Is=ai(ni),oi=Is;function at(r,u){if(!(r!==null&&typeof r=="object"))return r;if(Array.isArray(r)){for(let o=0;o<r.length;o++)r[o]=at(r[o],u);return r}let p=oi(r);for(let o=0;o<p.length;o++)r[p[o]]=at(r[p[o]],u);return u(r)||r}var me=at;b();b();function Ns(r,u){let{start:p,end:o}=r.loc;throw le(u,{loc:{start:{line:p.line,column:p.column+1},end:{line:o.line,column:o.column+1}}})}var Ae=Ns;function Ls(r){for(;r&&r.kind!==305;)r=r.parent;return r}function Vs(r){let{illegalDecorators:u}=r;if(!de(u))return;let[{expression:p}]=u,o=Ls(p),[h,f]=[p.pos,p.end].map(v=>{let{line:I,character:B}=o.getLineAndCharacterOfPosition(v);return{line:I+1,column:B}});Ae({loc:{start:h,end:f}},"Decorators are not valid here.")}function Os(r,u){r.kind!==167||r.modifiers&&!r.modifiers.some(h=>h.kind===126)||r.initializer&&u.value===null&&Ae(u,"Abstract property cannot have an initializer")}function ui(r,u){let{esTreeNodeToTSNodeMap:p,tsNodeToESTreeNodeMap:o}=u.tsParseResult;me(r,h=>{let f=p.get(h);if(!f)return;let v=o.get(f);v===h&&(Vs(f),Os(f,v))})}function Bs(r,u){if(u.parser==="typescript"&&/@|abstract/.test(u.originalText)&&ui(r,u),u.parser!=="typescript"&&u.parser!=="flow"&&u.parser!=="acorn"&&u.parser!=="espree"&&u.parser!=="meriyah"){let o=new Set;r=me(r,h=>{h.leadingComments&&h.leadingComments.some(ri)&&o.add(D(h))}),r=me(r,h=>{if(h.type==="ParenthesizedExpression"){let{expression:f}=h;if(f.type==="TypeCastExpression")return f.range=h.range,f;let v=D(h);if(!o.has(v))return f.extra={...f.extra,parenthesized:!0},f}})}if(r=me(r,o=>{switch(o.type){case"ChainExpression":return Ke(o.expression);case"LogicalExpression":if(hi(o))return nt(o);break;case"VariableDeclaration":{let h=qe(!1,o.declarations,-1);h&&h.init&&p(o,h);break}case"TSParenthesizedType":return si(o.typeAnnotation)||o.typeAnnotation.type==="TSThisType"||(o.typeAnnotation.range=[D(o),K(o)]),o.typeAnnotation;case"TSTypeParameter":if(typeof o.name=="string"){let h=D(o);o.name={type:"Identifier",name:o.name,range:[h,h+o.name.length]}}break;case"ObjectExpression":if(u.parser==="typescript"){let h=o.properties.find(f=>f.type==="Property"&&f.value.type==="TSEmptyBodyFunctionExpression");h&&Ae(h.value,"Unexpected token.")}break;case"SequenceExpression":{let h=qe(!1,o.expressions,-1);o.range=[D(o),Math.min(K(h),K(o))];break}case"TopicReference":u.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:h}=o;if(u.parser==="meriyah"&&h&&h.type==="Identifier"){let f=u.originalText.slice(D(h),K(h));(f.startsWith('"')||f.startsWith("'"))&&(o.exported={...o.exported,type:"Literal",value:o.exported.name,raw:f})}break}}}),de(r.comments)){let o=qe(!1,r.comments,-1);for(let h=r.comments.length-2;h>=0;h--){let f=r.comments[h];K(f)===D(o)&&ke(f)&&ke(o)&&st(f)&&st(o)&&(r.comments.splice(h+1,1),f.value+="*//*"+o.value,f.range=[D(f),K(o)]),o=f}}return r;function p(o,h){u.originalText[K(h)]!==";"&&(o.range=[D(o),K(h)])}}function Ke(r){switch(r.type){case"CallExpression":r.type="OptionalCallExpression",r.callee=Ke(r.callee);break;case"MemberExpression":r.type="OptionalMemberExpression",r.object=Ke(r.object);break;case"TSNonNullExpression":r.expression=Ke(r.expression);break}return r}function hi(r){return r.type==="LogicalExpression"&&r.right.type==="LogicalExpression"&&r.operator===r.right.operator}function nt(r){return hi(r)?nt({type:"LogicalExpression",operator:r.operator,left:nt({type:"LogicalExpression",operator:r.operator,left:r.left,right:r.right.left,range:[D(r.left),K(r.right.left)]}),right:r.right.right,range:[D(r),K(r)]}):r}var Je=Bs;var js={ecmaVersion:"latest",sourceType:"module",allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Us(r){let{message:u,loc:p}=r;if(!p)return r;let{line:o,column:h}=p;return le(u.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:o,column:h+1}},cause:r})}var ht,qs=()=>{if(!ht){let{Parser:r}=Pe(),u=ut();ht=r.extend(u())}return ht};function mi(r,u){let p=qs(),o=[],h=[],f=p.parse(r,{...js,sourceType:u,onComment:o,onToken:h});return f.comments=o,f.tokens=h,f}function Ks(r,u={}){let{result:p,error:o}=je(()=>mi(r,"module"),()=>mi(r,"script"));if(!p)throw Us(o);return u.originalText=r,Je(p,u)}var xi=Ue(Ks);b();var Ci={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function cr(r){let{message:u,lineNumber:p,column:o}=r;return typeof p!="number"?r:le(u,{loc:{start:{line:p,column:o}},cause:r})}function pr(r,u={}){let{parse:p}=Ti(),{result:o,error:h}=je(()=>p(r,{...Ci,sourceType:"module"}),()=>p(r,{...Ci,sourceType:"script"}));if(!o)throw cr(h);return u.originalText=r,Je(o,u)}var Ei=Ue(pr);var lr={parsers:{acorn:xi,espree:Ei}},fr=lr;return as(dr);});