@rexeus/typeweaver 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +30 -10
  2. package/dist/{acorn-CJ4HNU11.js → acorn-TNAGPKCR.js} +1076 -998
  3. package/dist/acorn-ZFAHQIG7.js +3131 -0
  4. package/dist/angular-3KXBV3WD.js +3030 -0
  5. package/dist/angular-WMVKTHFF.js +3031 -0
  6. package/dist/babel-5QZSVJOE.js +7297 -0
  7. package/dist/babel-V7SGJWS6.js +7296 -0
  8. package/dist/chunk-4ST7XK4F.js +34641 -0
  9. package/dist/chunk-K3NQKI34.js +10 -0
  10. package/dist/chunk-MLKGABMK.js +9 -0
  11. package/dist/cli-GOSMI5D3.js +34642 -0
  12. package/dist/cli.cjs +116222 -0
  13. package/dist/cli.d.cts +2 -0
  14. package/dist/cli.d.ts +2 -0
  15. package/dist/cli.js +2 -0
  16. package/dist/entry.js +31 -0
  17. package/dist/estree-QSPT5I7I.js +4612 -0
  18. package/dist/estree-Y36AM62I.js +4613 -0
  19. package/dist/flow-7LH7X5GA.js +27547 -0
  20. package/dist/flow-WHVBWPDR.js +27546 -0
  21. package/dist/{glimmer-DiXjs4DB.js → glimmer-BHRIPYOK.js} +1317 -1051
  22. package/dist/glimmer-CBYXJR5M.js +2895 -0
  23. package/dist/{graphql-DLJHmbDb.js → graphql-7EJJJFHU.js} +343 -307
  24. package/dist/graphql-KKVSZXX7.js +1267 -0
  25. package/dist/html-M3WOAMIJ.js +2927 -0
  26. package/dist/html-YM5TKPVB.js +2926 -0
  27. package/dist/index.cjs +116228 -0
  28. package/dist/index.d.cts +2 -0
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +2 -16
  31. package/dist/markdown-FIK6SNTF.js +3551 -0
  32. package/dist/markdown-X6DQGEVV.js +3552 -0
  33. package/dist/meriyah-FBUICA5T.js +2684 -0
  34. package/dist/meriyah-GWPOVAHY.js +2685 -0
  35. package/dist/postcss-N2W7KQ6Q.js +5081 -0
  36. package/dist/{postcss-DUOVol6C.js → postcss-ODV7XV5T.js} +1779 -1641
  37. package/dist/tsx-loader-3QUDYASH.js +4 -0
  38. package/dist/typescript-BG63TNYD.js +13203 -0
  39. package/dist/typescript-IYJMK2NE.js +13204 -0
  40. package/dist/yaml-5FEMTYXO.js +4225 -0
  41. package/dist/{yaml-Bd8DkW_K.js → yaml-DV3ZI4ZT.js} +1140 -1058
  42. package/package.json +33 -33
  43. package/dist/angular-wXs0C_R2.js +0 -2626
  44. package/dist/babel-DNmSIBHM.js +0 -7201
  45. package/dist/cli-D5DHO8r6.js +0 -20691
  46. package/dist/estree-BfVT8G2n.js +0 -4301
  47. package/dist/flow-DgzFy9Js.js +0 -27138
  48. package/dist/html-BwjSBi_v.js +0 -2677
  49. package/dist/markdown-DWIPYE8e.js +0 -3363
  50. package/dist/meriyah-CbAY3E55.js +0 -2603
  51. package/dist/run-cli-with-tsx.js +0 -18
  52. package/dist/typescript-DDNbhgng.js +0 -12972
@@ -0,0 +1,4612 @@
1
+ import "./chunk-MLKGABMK.js";
2
+
3
+ // ../../node_modules/.pnpm/prettier@3.7.4/node_modules/prettier/plugins/estree.mjs
4
+ var Ba = Object.defineProperty;
5
+ var jn = (e, t) => {
6
+ for (var r in t) Ba(e, r, { get: t[r], enumerable: true });
7
+ };
8
+ var Ta = {};
9
+ jn(Ta, { languages: () => CD, options: () => Aa, printers: () => dD });
10
+ var Qs = [{ name: "JavaScript", type: "programming", aceMode: "javascript", extensions: [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib", ".start.frag", ".end.frag", ".wxs"], filenames: ["Jakefile", "start.frag", "end.frag"], tmScope: "source.js", aliases: ["js", "node"], codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell", "zx"], parsers: ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], vscodeLanguageIds: ["javascript", "mongo"], linguistLanguageId: 183 }, { name: "Flow", type: "programming", aceMode: "javascript", extensions: [".js.flow"], filenames: [], tmScope: "source.js", aliases: [], codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], parsers: ["flow", "babel-flow"], vscodeLanguageIds: ["javascript"], linguistLanguageId: 183 }, { name: "JSX", type: "programming", aceMode: "javascript", extensions: [".jsx"], filenames: void 0, tmScope: "source.js.jsx", aliases: void 0, codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", interpreters: void 0, parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], vscodeLanguageIds: ["javascriptreact"], group: "JavaScript", linguistLanguageId: 183 }, { name: "TypeScript", type: "programming", aceMode: "typescript", extensions: [".ts", ".cts", ".mts"], tmScope: "source.ts", aliases: ["ts"], codemirrorMode: "javascript", codemirrorMimeType: "application/typescript", interpreters: ["bun", "deno", "ts-node", "tsx"], parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescript"], linguistLanguageId: 378 }, { name: "TSX", type: "programming", aceMode: "tsx", extensions: [".tsx"], tmScope: "source.tsx", codemirrorMode: "jsx", codemirrorMimeType: "text/typescript-jsx", group: "TypeScript", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescriptreact"], linguistLanguageId: 94901924 }];
11
+ var Hs = {};
12
+ jn(Hs, { canAttachComment: () => Pi, embed: () => Co, features: () => DD, getVisitorKeys: () => Mr, handleComments: () => Ji, hasPrettierIgnore: () => nr, insertPragma: () => Lo, isBlockComment: () => ce, isGap: () => Gi, massageAstNode: () => Bi, print: () => Ys, printComment: () => wo, printPrettierIgnored: () => Ys, willPrintOwnComments: () => Wi });
13
+ var Wt = (e, t) => (r, n, ...s) => r | 1 && n == null ? void 0 : (t.call(n) ?? n[e]).apply(n, s);
14
+ var ba = String.prototype.replaceAll ?? function(e, t) {
15
+ return e.global ? this.replace(e, t) : this.split(e).join(t);
16
+ };
17
+ var Pa = Wt("replaceAll", function() {
18
+ if (typeof this == "string") return ba;
19
+ });
20
+ var W = Pa;
21
+ function ka(e) {
22
+ return this[e < 0 ? this.length + e : e];
23
+ }
24
+ var Ia = Wt("at", function() {
25
+ if (Array.isArray(this) || typeof this == "string") return ka;
26
+ });
27
+ var N = Ia;
28
+ function La(e) {
29
+ return e !== null && typeof e == "object";
30
+ }
31
+ var Lr = La;
32
+ function* Oa(e, t) {
33
+ let { getVisitorKeys: r, filter: n = () => true } = t, s = (i) => Lr(i) && n(i);
34
+ for (let i of r(e)) {
35
+ let o = e[i];
36
+ if (Array.isArray(o)) for (let u of o) s(u) && (yield u);
37
+ else s(o) && (yield o);
38
+ }
39
+ }
40
+ function* wa(e, t) {
41
+ let r = [e];
42
+ for (let n = 0; n < r.length; n++) {
43
+ let s = r[n];
44
+ for (let i of Oa(s, t)) yield i, r.push(i);
45
+ }
46
+ }
47
+ function zs(e, { getVisitorKeys: t, predicate: r }) {
48
+ for (let n of wa(e, { getVisitorKeys: t })) if (r(n)) return true;
49
+ return false;
50
+ }
51
+ var Zs = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
52
+ function vn(e) {
53
+ return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
54
+ }
55
+ function Rn(e) {
56
+ return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e >= 94192 && e <= 94198 || e >= 94208 && e <= 101589 || e >= 101631 && e <= 101662 || e >= 101760 && e <= 101874 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128728 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129674 || e >= 129678 && e <= 129734 || e === 129736 || e >= 129741 && e <= 129756 || e >= 129759 && e <= 129770 || e >= 129775 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
57
+ }
58
+ var ei = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07";
59
+ var _a = /[^\x20-\x7F]/u;
60
+ var Ma = new Set(ei);
61
+ function Na(e) {
62
+ if (!e) return 0;
63
+ if (!_a.test(e)) return e.length;
64
+ e = e.replace(Zs(), (r) => Ma.has(r) ? " " : " ");
65
+ let t = 0;
66
+ for (let r of e) {
67
+ let n = r.codePointAt(0);
68
+ n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || n >= 65024 && n <= 65039 || (t += vn(n) || Rn(n) ? 2 : 1);
69
+ }
70
+ return t;
71
+ }
72
+ var ot = Na;
73
+ function Or(e) {
74
+ return (t, r, n) => {
75
+ let s = !!n?.backwards;
76
+ if (r === false) return false;
77
+ let { length: i } = t, o = r;
78
+ for (; o >= 0 && o < i; ) {
79
+ let u = t.charAt(o);
80
+ if (e instanceof RegExp) {
81
+ if (!e.test(u)) return o;
82
+ } else if (!e.includes(u)) return o;
83
+ s ? o-- : o++;
84
+ }
85
+ return o === -1 || o === i ? o : false;
86
+ };
87
+ }
88
+ var JD = Or(/\s/u);
89
+ var ze = Or(" ");
90
+ var ti = Or(",; ");
91
+ var ri = Or(/[^\n\r]/u);
92
+ var ni = (e) => e === `
93
+ ` || e === "\r" || e === "\u2028" || e === "\u2029";
94
+ function ja(e, t, r) {
95
+ let n = !!r?.backwards;
96
+ if (t === false) return false;
97
+ let s = e.charAt(t);
98
+ if (n) {
99
+ if (e.charAt(t - 1) === "\r" && s === `
100
+ `) return t - 2;
101
+ if (ni(s)) return t - 1;
102
+ } else {
103
+ if (s === "\r" && e.charAt(t + 1) === `
104
+ `) return t + 2;
105
+ if (ni(s)) return t + 1;
106
+ }
107
+ return t;
108
+ }
109
+ var Ze = ja;
110
+ function va(e, t, r = {}) {
111
+ let n = ze(e, r.backwards ? t - 1 : t, r), s = Ze(e, n, r);
112
+ return n !== s;
113
+ }
114
+ var Z = va;
115
+ function Ra(e, t) {
116
+ if (t === false) return false;
117
+ if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
118
+ for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
119
+ }
120
+ return t;
121
+ }
122
+ var qt = Ra;
123
+ function Ja(e, t) {
124
+ return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ri(e, t) : t;
125
+ }
126
+ var Ut = Ja;
127
+ function Ga(e, t) {
128
+ let r = null, n = t;
129
+ for (; n !== r; ) r = n, n = ti(e, n), n = qt(e, n), n = ze(e, n);
130
+ return n = Ut(e, n), n = Ze(e, n), n !== false && Z(e, n);
131
+ }
132
+ var Yt = Ga;
133
+ function Wa(e) {
134
+ return Array.isArray(e) && e.length > 0;
135
+ }
136
+ var R = Wa;
137
+ var qa = () => {
138
+ };
139
+ var Le = qa;
140
+ var si = Object.freeze({ character: "'", codePoint: 39 });
141
+ var ii = Object.freeze({ character: '"', codePoint: 34 });
142
+ var Ua = Object.freeze({ preferred: si, alternate: ii });
143
+ var Ya = Object.freeze({ preferred: ii, alternate: si });
144
+ function Ha(e, t) {
145
+ let { preferred: r, alternate: n } = t === true || t === "'" ? Ua : Ya, { length: s } = e, i = 0, o = 0;
146
+ for (let u = 0; u < s; u++) {
147
+ let p = e.charCodeAt(u);
148
+ p === r.codePoint ? i++ : p === n.codePoint && o++;
149
+ }
150
+ return (i > o ? n : r).character;
151
+ }
152
+ var wr = Ha;
153
+ var Xa = /\\(["'\\])|(["'])/gu;
154
+ function Va(e, t) {
155
+ let r = t === '"' ? "'" : '"', n = W(0, e, Xa, (s, i, o) => i ? i === r ? r : s : o === t ? "\\" + o : o);
156
+ return t + n + t;
157
+ }
158
+ var oi = Va;
159
+ function $a(e, t) {
160
+ Le(/^(?<quote>["']).*\k<quote>$/su.test(e));
161
+ let r = e.slice(1, -1), n = t.parser === "json" || t.parser === "jsonc" || t.parser === "json5" && t.quoteProps === "preserve" && !t.singleQuote ? '"' : t.__isInHtmlAttribute ? "'" : wr(r, t.singleQuote);
162
+ return e.charAt(0) === n ? e : oi(r, n);
163
+ }
164
+ var ut = $a;
165
+ var ui = (e) => Number.isInteger(e) && e >= 0;
166
+ function w(e) {
167
+ let t = e.range?.[0] ?? e.start, r = (e.declaration?.decorators ?? e.decorators)?.[0];
168
+ return r ? Math.min(w(r), t) : t;
169
+ }
170
+ function I(e) {
171
+ return e.range?.[1] ?? e.end;
172
+ }
173
+ function bt(e, t) {
174
+ let r = w(e);
175
+ return ui(r) && r === w(t);
176
+ }
177
+ function Ka(e, t) {
178
+ let r = I(e);
179
+ return ui(r) && r === I(t);
180
+ }
181
+ function ai(e, t) {
182
+ return bt(e, t) && Ka(e, t);
183
+ }
184
+ var Dr = null;
185
+ function fr(e) {
186
+ if (Dr !== null && typeof Dr.property) {
187
+ let t = Dr;
188
+ return Dr = fr.prototype = null, t;
189
+ }
190
+ return Dr = fr.prototype = e ?? /* @__PURE__ */ Object.create(null), new fr();
191
+ }
192
+ var Qa = 10;
193
+ for (let e = 0; e <= Qa; e++) fr();
194
+ function Gn(e) {
195
+ return fr(e);
196
+ }
197
+ function za(e, t = "type") {
198
+ Gn(e);
199
+ function r(n) {
200
+ let s = n[t], i = e[s];
201
+ if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: n });
202
+ return i;
203
+ }
204
+ return r;
205
+ }
206
+ var _r = za;
207
+ var a = [["decorators", "key", "typeAnnotation", "value"], [], ["elementType"], ["expression"], ["expression", "typeAnnotation"], ["left", "right"], ["argument"], ["directives", "body"], ["label"], ["callee", "typeArguments", "arguments"], ["body"], ["decorators", "id", "typeParameters", "superClass", "superTypeArguments", "mixins", "implements", "body", "superTypeParameters"], ["id", "typeParameters"], ["decorators", "key", "typeParameters", "params", "returnType", "body"], ["decorators", "variance", "key", "typeAnnotation", "value"], ["name", "typeAnnotation"], ["test", "consequent", "alternate"], ["checkType", "extendsType", "trueType", "falseType"], ["value"], ["id", "body"], ["declaration", "specifiers", "source", "attributes"], ["id"], ["id", "typeParameters", "extends", "body"], ["typeAnnotation"], ["id", "typeParameters", "right"], ["body", "test"], ["members"], ["id", "init"], ["exported"], ["left", "right", "body"], ["id", "typeParameters", "params", "predicate", "returnType", "body"], ["id", "params", "body", "typeParameters", "returnType"], ["key", "value"], ["local"], ["objectType", "indexType"], ["typeParameter"], ["types"], ["node"], ["object", "property"], ["argument", "cases"], ["pattern", "body", "guard"], ["literal"], ["decorators", "key", "value"], ["expressions"], ["qualification", "id"], ["decorators", "key", "typeAnnotation"], ["typeParameters", "params", "returnType"], ["expression", "typeArguments"], ["params"], ["parameterName", "typeAnnotation"]];
208
+ var pi = { AccessorProperty: a[0], AnyTypeAnnotation: a[1], ArgumentPlaceholder: a[1], ArrayExpression: ["elements"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrayTypeAnnotation: a[2], ArrowFunctionExpression: ["typeParameters", "params", "predicate", "returnType", "body"], AsConstExpression: a[3], AsExpression: a[4], AssignmentExpression: a[5], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], AwaitExpression: a[6], BigIntLiteral: a[1], BigIntLiteralTypeAnnotation: a[1], BigIntTypeAnnotation: a[1], BinaryExpression: a[5], BindExpression: ["object", "callee"], BlockStatement: a[7], BooleanLiteral: a[1], BooleanLiteralTypeAnnotation: a[1], BooleanTypeAnnotation: a[1], BreakStatement: a[8], CallExpression: a[9], CatchClause: ["param", "body"], ChainExpression: a[3], ClassAccessorProperty: a[0], ClassBody: a[10], ClassDeclaration: a[11], ClassExpression: a[11], ClassImplements: a[12], ClassMethod: a[13], ClassPrivateMethod: a[13], ClassPrivateProperty: a[14], ClassProperty: a[14], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: a[15], ConditionalExpression: a[16], ConditionalTypeAnnotation: a[17], ContinueStatement: a[8], DebuggerStatement: a[1], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclaredPredicate: a[18], DeclareEnum: a[19], DeclareExportAllDeclaration: ["source", "attributes"], DeclareExportDeclaration: a[20], DeclareFunction: ["id", "predicate"], DeclareHook: a[21], DeclareInterface: a[22], DeclareModule: a[19], DeclareModuleExports: a[23], DeclareNamespace: a[19], DeclareOpaqueType: ["id", "typeParameters", "supertype", "lowerBound", "upperBound"], DeclareTypeAlias: a[24], DeclareVariable: a[21], Decorator: a[3], Directive: a[18], DirectiveLiteral: a[1], DoExpression: a[10], DoWhileStatement: a[25], EmptyStatement: a[1], EmptyTypeAnnotation: a[1], EnumBigIntBody: a[26], EnumBigIntMember: a[27], EnumBooleanBody: a[26], EnumBooleanMember: a[27], EnumDeclaration: a[19], EnumDefaultedMember: a[21], EnumNumberBody: a[26], EnumNumberMember: a[27], EnumStringBody: a[26], EnumStringMember: a[27], EnumSymbolBody: a[26], ExistsTypeAnnotation: a[1], ExperimentalRestProperty: a[6], ExperimentalSpreadProperty: a[6], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportDefaultSpecifier: a[28], ExportNamedDeclaration: a[20], ExportNamespaceSpecifier: a[28], ExportSpecifier: ["local", "exported"], ExpressionStatement: a[3], File: ["program"], ForInStatement: a[29], ForOfStatement: a[29], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: a[30], FunctionExpression: a[30], FunctionTypeAnnotation: ["typeParameters", "this", "params", "rest", "returnType"], FunctionTypeParam: a[15], GenericTypeAnnotation: a[12], HookDeclaration: a[31], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], Identifier: ["typeAnnotation", "decorators"], IfStatement: a[16], ImportAttribute: a[32], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: a[33], ImportExpression: ["source", "options"], ImportNamespaceSpecifier: a[33], ImportSpecifier: ["imported", "local"], IndexedAccessType: a[34], InferredPredicate: a[1], InferTypeAnnotation: a[35], InterfaceDeclaration: a[22], InterfaceExtends: a[12], InterfaceTypeAnnotation: ["extends", "body"], InterpreterDirective: a[1], IntersectionTypeAnnotation: a[36], JsExpressionRoot: a[37], JsonRoot: a[37], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXClosingFragment: a[1], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: a[1], JSXExpressionContainer: a[3], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXIdentifier: a[1], JSXMemberExpression: a[38], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "typeArguments", "attributes"], JSXOpeningFragment: a[1], JSXSpreadAttribute: a[6], JSXSpreadChild: a[3], JSXText: a[1], KeyofTypeAnnotation: a[6], LabeledStatement: ["label", "body"], Literal: a[1], LogicalExpression: a[5], MatchArrayPattern: ["elements", "rest"], MatchAsPattern: ["pattern", "target"], MatchBindingPattern: a[21], MatchExpression: a[39], MatchExpressionCase: a[40], MatchIdentifierPattern: a[21], MatchLiteralPattern: a[41], MatchMemberPattern: ["base", "property"], MatchObjectPattern: ["properties", "rest"], MatchObjectPatternProperty: ["key", "pattern"], MatchOrPattern: ["patterns"], MatchRestPattern: a[6], MatchStatement: a[39], MatchStatementCase: a[40], MatchUnaryPattern: a[6], MatchWildcardPattern: a[1], MemberExpression: a[38], MetaProperty: ["meta", "property"], MethodDefinition: a[42], MixedTypeAnnotation: a[1], ModuleExpression: a[10], NeverTypeAnnotation: a[1], NewExpression: a[9], NGChainedExpression: a[43], NGEmptyExpression: a[1], NGMicrosyntax: a[10], NGMicrosyntaxAs: ["key", "alias"], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKey: a[1], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: a[32], NGPipeExpression: ["left", "right", "arguments"], NGRoot: a[37], NullableTypeAnnotation: a[23], NullLiteral: a[1], NullLiteralTypeAnnotation: a[1], NumberLiteralTypeAnnotation: a[1], NumberTypeAnnotation: a[1], NumericLiteral: a[1], ObjectExpression: ["properties"], ObjectMethod: a[13], ObjectPattern: ["decorators", "properties", "typeAnnotation"], ObjectProperty: a[42], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeCallProperty: a[18], ObjectTypeIndexer: ["variance", "id", "key", "value"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: a[6], OpaqueType: ["id", "typeParameters", "supertype", "impltype", "lowerBound", "upperBound"], OptionalCallExpression: a[9], OptionalIndexedAccessType: a[34], OptionalMemberExpression: a[38], ParenthesizedExpression: a[3], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: a[1], PipelineTopicExpression: a[3], Placeholder: a[1], PrivateIdentifier: a[1], PrivateName: a[21], Program: a[7], Property: a[32], PropertyDefinition: a[14], QualifiedTypeIdentifier: a[44], QualifiedTypeofIdentifier: a[44], RegExpLiteral: a[1], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: a[6], SatisfiesExpression: a[4], SequenceExpression: a[43], SpreadElement: a[6], StaticBlock: a[10], StringLiteral: a[1], StringLiteralTypeAnnotation: a[1], StringTypeAnnotation: a[1], Super: a[1], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], SymbolTypeAnnotation: a[1], TaggedTemplateExpression: ["tag", "typeArguments", "quasi"], TemplateElement: a[1], TemplateLiteral: ["quasis", "expressions"], ThisExpression: a[1], ThisTypeAnnotation: a[1], ThrowStatement: a[6], TopicReference: a[1], TryStatement: ["block", "handler", "finalizer"], TSAbstractAccessorProperty: a[45], TSAbstractKeyword: a[1], TSAbstractMethodDefinition: a[32], TSAbstractPropertyDefinition: a[45], TSAnyKeyword: a[1], TSArrayType: a[2], TSAsExpression: a[4], TSAsyncKeyword: a[1], TSBigIntKeyword: a[1], TSBooleanKeyword: a[1], TSCallSignatureDeclaration: a[46], TSClassImplements: a[47], TSConditionalType: a[17], TSConstructorType: a[46], TSConstructSignatureDeclaration: a[46], TSDeclareFunction: a[31], TSDeclareKeyword: a[1], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSEnumBody: a[26], TSEnumDeclaration: a[19], TSEnumMember: ["id", "initializer"], TSExportAssignment: a[3], TSExportKeyword: a[1], TSExternalModuleReference: a[3], TSFunctionType: a[46], TSImportEqualsDeclaration: ["id", "moduleReference"], TSImportType: ["options", "qualifier", "typeArguments", "source"], TSIndexedAccessType: a[34], TSIndexSignature: ["parameters", "typeAnnotation"], TSInferType: a[35], TSInstantiationExpression: a[47], TSInterfaceBody: a[10], TSInterfaceDeclaration: a[22], TSInterfaceHeritage: a[47], TSIntersectionType: a[36], TSIntrinsicKeyword: a[1], TSJSDocAllType: a[1], TSJSDocNonNullableType: a[23], TSJSDocNullableType: a[23], TSJSDocUnknownType: a[1], TSLiteralType: a[41], TSMappedType: ["key", "constraint", "nameType", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "params", "returnType"], TSModuleBlock: a[10], TSModuleDeclaration: a[19], TSNamedTupleMember: ["label", "elementType"], TSNamespaceExportDeclaration: a[21], TSNeverKeyword: a[1], TSNonNullExpression: a[3], TSNullKeyword: a[1], TSNumberKeyword: a[1], TSObjectKeyword: a[1], TSOptionalType: a[23], TSParameterProperty: ["parameter", "decorators"], TSParenthesizedType: a[23], TSPrivateKeyword: a[1], TSPropertySignature: ["key", "typeAnnotation"], TSProtectedKeyword: a[1], TSPublicKeyword: a[1], TSQualifiedName: a[5], TSReadonlyKeyword: a[1], TSRestType: a[23], TSSatisfiesExpression: a[4], TSStaticKeyword: a[1], TSStringKeyword: a[1], TSSymbolKeyword: a[1], TSTemplateLiteralType: ["quasis", "types"], TSThisType: a[1], TSTupleType: ["elementTypes"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSTypeAnnotation: a[23], TSTypeAssertion: a[4], TSTypeLiteral: a[26], TSTypeOperator: a[23], TSTypeParameter: ["name", "constraint", "default"], TSTypeParameterDeclaration: a[48], TSTypeParameterInstantiation: a[48], TSTypePredicate: a[49], TSTypeQuery: ["exprName", "typeArguments"], TSTypeReference: ["typeName", "typeArguments"], TSUndefinedKeyword: a[1], TSUnionType: a[36], TSUnknownKeyword: a[1], TSVoidKeyword: a[1], TupleTypeAnnotation: ["types", "elementTypes"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeAlias: a[24], TypeAnnotation: a[23], TypeCastExpression: a[4], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeOperator: a[23], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: a[48], TypeParameterInstantiation: a[48], TypePredicate: a[49], UnaryExpression: a[6], UndefinedTypeAnnotation: a[1], UnionTypeAnnotation: a[36], UnknownTypeAnnotation: a[1], UpdateExpression: a[6], V8IntrinsicIdentifier: a[1], VariableDeclaration: ["declarations"], VariableDeclarator: a[27], Variance: a[1], VoidPattern: a[1], VoidTypeAnnotation: a[1], WhileStatement: a[25], WithStatement: ["object", "body"], YieldExpression: a[6] };
209
+ var Za = _r(pi);
210
+ var Mr = Za;
211
+ function ep(e) {
212
+ let t = new Set(e);
213
+ return (r) => t.has(r?.type);
214
+ }
215
+ var k = ep;
216
+ function tp(e) {
217
+ return e.extra?.raw ?? e.raw;
218
+ }
219
+ var pe = tp;
220
+ var rp = k(["Block", "CommentBlock", "MultiLine"]);
221
+ var ce = rp;
222
+ var np = k(["AnyTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "BooleanTypeAnnotation", "BigIntTypeAnnotation", "SymbolTypeAnnotation", "StringTypeAnnotation", "NeverTypeAnnotation", "UndefinedTypeAnnotation", "UnknownTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation"]);
223
+ var Nr = np;
224
+ var sp = k(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose", "Hashbang", "InterpreterDirective"]);
225
+ var At = sp;
226
+ function ip(e, t) {
227
+ let r = t.split(".");
228
+ for (let n = r.length - 1; n >= 0; n--) {
229
+ let s = r[n];
230
+ if (n === 0) return e.type === "Identifier" && e.name === s;
231
+ if (n === 1 && e.type === "MetaProperty" && e.property.type === "Identifier" && e.property.name === s) {
232
+ e = e.meta;
233
+ continue;
234
+ }
235
+ if (e.type === "MemberExpression" && !e.optional && !e.computed && e.property.type === "Identifier" && e.property.name === s) {
236
+ e = e.object;
237
+ continue;
238
+ }
239
+ return false;
240
+ }
241
+ }
242
+ function op(e, t) {
243
+ return t.some((r) => ip(e, r));
244
+ }
245
+ var Pt = op;
246
+ function up({ type: e }) {
247
+ return e.startsWith("TS") && e.endsWith("Keyword");
248
+ }
249
+ var jr = up;
250
+ function ap({ node: e, parent: t }) {
251
+ return e?.type !== "EmptyStatement" ? false : t.type === "IfStatement" ? t.consequent === e || t.alternate === e : t.type === "DoWhileStatement" || t.type === "ForInStatement" || t.type === "ForOfStatement" || t.type === "ForStatement" || t.type === "LabeledStatement" || t.type === "WithStatement" || t.type === "WhileStatement" ? t.body === e : false;
252
+ }
253
+ var kt = ap;
254
+ function Er(e, t) {
255
+ return t(e) || zs(e, { getVisitorKeys: Mr, predicate: t });
256
+ }
257
+ function Xt(e) {
258
+ return e.type === "AssignmentExpression" || e.type === "BinaryExpression" || e.type === "LogicalExpression" || e.type === "NGPipeExpression" || e.type === "ConditionalExpression" || M(e) || J(e) || e.type === "SequenceExpression" || e.type === "TaggedTemplateExpression" || e.type === "BindExpression" || e.type === "UpdateExpression" && !e.prefix || Ae(e) || e.type === "TSNonNullExpression" || e.type === "ChainExpression";
259
+ }
260
+ function mi(e) {
261
+ return e.expressions ? e.expressions[0] : e.left ?? e.test ?? e.callee ?? e.object ?? e.tag ?? e.argument ?? e.expression;
262
+ }
263
+ function Rr(e) {
264
+ if (e.expressions) return ["expressions", 0];
265
+ if (e.left) return ["left"];
266
+ if (e.test) return ["test"];
267
+ if (e.object) return ["object"];
268
+ if (e.callee) return ["callee"];
269
+ if (e.tag) return ["tag"];
270
+ if (e.argument) return ["argument"];
271
+ if (e.expression) return ["expression"];
272
+ throw new Error("Unexpected node has no left side.");
273
+ }
274
+ var Di = k(["ExportDefaultDeclaration", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "DeclareExportAllDeclaration"]);
275
+ var q = k(["ArrayExpression"]);
276
+ var se = k(["ObjectExpression"]);
277
+ function fi(e) {
278
+ return e.type === "LogicalExpression" && e.operator === "??";
279
+ }
280
+ function Ce(e) {
281
+ return e.type === "NumericLiteral" || e.type === "Literal" && typeof e.value == "number";
282
+ }
283
+ function yi(e) {
284
+ return e.type === "BooleanLiteral" || e.type === "Literal" && typeof e.value == "boolean";
285
+ }
286
+ function Hn(e) {
287
+ return e.type === "UnaryExpression" && (e.operator === "+" || e.operator === "-") && Ce(e.argument);
288
+ }
289
+ function V(e) {
290
+ return !!(e && (e.type === "StringLiteral" || e.type === "Literal" && typeof e.value == "string"));
291
+ }
292
+ function Xn(e) {
293
+ return e.type === "RegExpLiteral" || e.type === "Literal" && !!e.regex;
294
+ }
295
+ var Jr = k(["Literal", "BooleanLiteral", "BigIntLiteral", "DirectiveLiteral", "NullLiteral", "NumericLiteral", "RegExpLiteral", "StringLiteral"]);
296
+ var pp = k(["Identifier", "ThisExpression", "Super", "PrivateName", "PrivateIdentifier"]);
297
+ var Je = k(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]);
298
+ var Ht = k(["FunctionExpression", "ArrowFunctionExpression"]);
299
+ function cp(e) {
300
+ return e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && e.body.type === "BlockStatement";
301
+ }
302
+ function Wn(e) {
303
+ return M(e) && e.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(e.callee.name);
304
+ }
305
+ var H = k(["JSXElement", "JSXFragment"]);
306
+ function mt(e) {
307
+ return e.method && e.kind === "init" || e.kind === "get" || e.kind === "set";
308
+ }
309
+ function Gr(e) {
310
+ return (e.type === "ObjectTypeProperty" || e.type === "ObjectTypeInternalSlot") && !e.static && !e.method && e.kind !== "get" && e.kind !== "set" && e.value.type === "FunctionTypeAnnotation";
311
+ }
312
+ function Ei(e) {
313
+ return (e.type === "TypeAnnotation" || e.type === "TSTypeAnnotation") && e.typeAnnotation.type === "FunctionTypeAnnotation" && !e.static && !bt(e, e.typeAnnotation);
314
+ }
315
+ var Te = k(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
316
+ function Tt(e) {
317
+ return J(e) || e.type === "BindExpression" && !!e.object;
318
+ }
319
+ var lp = k(["TSThisType", "NullLiteralTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType"]);
320
+ function Vt(e) {
321
+ return jr(e) || Nr(e) || lp(e) || e.type === "GenericTypeAnnotation" && !e.typeParameters || e.type === "TSTypeReference" && !e.typeArguments;
322
+ }
323
+ function mp(e) {
324
+ return e.type === "Identifier" && (e.name === "beforeEach" || e.name === "beforeAll" || e.name === "afterEach" || e.name === "afterAll");
325
+ }
326
+ var Dp = ["it", "it.only", "it.skip", "describe", "describe.only", "describe.skip", "test", "test.only", "test.skip", "test.fixme", "test.step", "test.describe", "test.describe.only", "test.describe.skip", "test.describe.fixme", "test.describe.parallel", "test.describe.parallel.only", "test.describe.serial", "test.describe.serial.only", "skip", "xit", "xdescribe", "xtest", "fit", "fdescribe", "ftest"];
327
+ function fp(e) {
328
+ return Pt(e, Dp);
329
+ }
330
+ function It(e, t) {
331
+ if (e?.type !== "CallExpression" || e.optional) return false;
332
+ let r = le(e);
333
+ if (r.length === 1) {
334
+ if (Wn(e) && It(t)) return Ht(r[0]);
335
+ if (mp(e.callee)) return Wn(r[0]);
336
+ } else if ((r.length === 2 || r.length === 3) && (r[0].type === "TemplateLiteral" || V(r[0])) && fp(e.callee)) return r[2] && !Ce(r[2]) ? false : (r.length === 2 ? Ht(r[1]) : cp(r[1]) && K(r[1]).length <= 1) || Wn(r[1]);
337
+ return false;
338
+ }
339
+ var Fi = (e) => (t) => (t?.type === "ChainExpression" && (t = t.expression), e(t));
340
+ var M = Fi(k(["CallExpression", "OptionalCallExpression"]));
341
+ var J = Fi(k(["MemberExpression", "OptionalMemberExpression"]));
342
+ function Vn(e, t = 5) {
343
+ return di(e, t) <= t;
344
+ }
345
+ function di(e, t) {
346
+ let r = 0;
347
+ for (let n in e) {
348
+ let s = e[n];
349
+ if (Lr(s) && typeof s.type == "string" && (r++, r += di(s, t - r)), r > t) return r;
350
+ }
351
+ return r;
352
+ }
353
+ var yp = 0.25;
354
+ function Fr(e, t) {
355
+ let { printWidth: r } = t;
356
+ if (T(e)) return false;
357
+ let n = r * yp;
358
+ if (e.type === "ThisExpression" || e.type === "Identifier" && e.name.length <= n || Hn(e) && !T(e.argument)) return true;
359
+ let s = e.type === "Literal" && "regex" in e && e.regex.pattern || e.type === "RegExpLiteral" && e.pattern;
360
+ return s ? s.length <= n : V(e) ? ut(pe(e), t).length <= n : e.type === "TemplateLiteral" ? e.expressions.length === 0 && e.quasis[0].value.raw.length <= n && !e.quasis[0].value.raw.includes(`
361
+ `) : e.type === "UnaryExpression" ? Fr(e.argument, { printWidth: r }) : e.type === "CallExpression" && e.arguments.length === 0 && e.callee.type === "Identifier" ? e.callee.name.length <= n - 2 : Jr(e);
362
+ }
363
+ function Ee(e, t) {
364
+ return H(t) ? Ot(t) : T(t, x.Leading, (r) => Z(e, I(r)));
365
+ }
366
+ function ci(e) {
367
+ return e.quasis.some((t) => t.value.raw.includes(`
368
+ `));
369
+ }
370
+ function Wr(e, t) {
371
+ return (e.type === "TemplateLiteral" && ci(e) || e.type === "TaggedTemplateExpression" && ci(e.quasi)) && !Z(t, w(e), { backwards: true });
372
+ }
373
+ function qr(e) {
374
+ if (!T(e)) return false;
375
+ let t = N(0, et(e, x.Dangling), -1);
376
+ return t && !ce(t);
377
+ }
378
+ function Ci(e) {
379
+ if (e.length <= 1) return false;
380
+ let t = 0;
381
+ for (let r of e) if (Ht(r)) {
382
+ if (t += 1, t > 1) return true;
383
+ } else if (M(r)) {
384
+ for (let n of le(r)) if (Ht(n)) return true;
385
+ }
386
+ return false;
387
+ }
388
+ function Ur(e) {
389
+ let { node: t, parent: r, key: n } = e;
390
+ return n === "callee" && M(t) && M(r) && r.arguments.length > 0 && t.arguments.length > r.arguments.length;
391
+ }
392
+ var Ep = /* @__PURE__ */ new Set(["!", "-", "+", "~"]);
393
+ function Re(e, t = 2) {
394
+ if (t <= 0) return false;
395
+ if (e.type === "ChainExpression" || e.type === "TSNonNullExpression") return Re(e.expression, t);
396
+ let r = (n) => Re(n, t - 1);
397
+ if (Xn(e)) return ot(e.pattern ?? e.regex.pattern) <= 5;
398
+ if (Jr(e) || pp(e) || e.type === "ArgumentPlaceholder") return true;
399
+ if (e.type === "TemplateLiteral") return e.quasis.every((n) => !n.value.raw.includes(`
400
+ `)) && e.expressions.every(r);
401
+ if (se(e)) return e.properties.every((n) => !n.computed && (n.shorthand || n.value && r(n.value)));
402
+ if (q(e)) return e.elements.every((n) => n === null || r(n));
403
+ if (Dt(e)) {
404
+ if (e.type === "ImportExpression" || Re(e.callee, t)) {
405
+ let n = le(e);
406
+ return n.length <= t && n.every(r);
407
+ }
408
+ return false;
409
+ }
410
+ return J(e) ? Re(e.object, t) && Re(e.property, t) : e.type === "UnaryExpression" && Ep.has(e.operator) || e.type === "UpdateExpression" ? Re(e.argument, t) : false;
411
+ }
412
+ function ie(e, t = "es5") {
413
+ return e.trailingComma === "es5" && t === "es5" || e.trailingComma === "all" && (t === "all" || t === "es5");
414
+ }
415
+ function ye(e, t) {
416
+ switch (e.type) {
417
+ case "BinaryExpression":
418
+ case "LogicalExpression":
419
+ case "AssignmentExpression":
420
+ case "NGPipeExpression":
421
+ return ye(e.left, t);
422
+ case "MemberExpression":
423
+ case "OptionalMemberExpression":
424
+ return ye(e.object, t);
425
+ case "TaggedTemplateExpression":
426
+ return e.tag.type === "FunctionExpression" ? false : ye(e.tag, t);
427
+ case "CallExpression":
428
+ case "OptionalCallExpression":
429
+ return e.callee.type === "FunctionExpression" ? false : ye(e.callee, t);
430
+ case "ConditionalExpression":
431
+ return ye(e.test, t);
432
+ case "UpdateExpression":
433
+ return !e.prefix && ye(e.argument, t);
434
+ case "BindExpression":
435
+ return e.object && ye(e.object, t);
436
+ case "SequenceExpression":
437
+ return ye(e.expressions[0], t);
438
+ case "ChainExpression":
439
+ case "TSSatisfiesExpression":
440
+ case "TSAsExpression":
441
+ case "TSNonNullExpression":
442
+ case "AsExpression":
443
+ case "AsConstExpression":
444
+ case "SatisfiesExpression":
445
+ return ye(e.expression, t);
446
+ default:
447
+ return t(e);
448
+ }
449
+ }
450
+ var li = { "==": true, "!=": true, "===": true, "!==": true };
451
+ var vr = { "*": true, "/": true, "%": true };
452
+ var Yn = { ">>": true, ">>>": true, "<<": true };
453
+ function dr(e, t) {
454
+ return !(yr(t) !== yr(e) || e === "**" || li[e] && li[t] || t === "%" && vr[e] || e === "%" && vr[t] || t !== e && vr[t] && vr[e] || Yn[e] && Yn[t]);
455
+ }
456
+ var Fp = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((e, t) => e.map((r) => [r, t])));
457
+ function yr(e) {
458
+ return Fp.get(e);
459
+ }
460
+ function Ai(e) {
461
+ return !!Yn[e] || e === "|" || e === "^" || e === "&";
462
+ }
463
+ function Ti(e) {
464
+ if (e.rest) return true;
465
+ let t = K(e);
466
+ return N(0, t, -1)?.type === "RestElement";
467
+ }
468
+ var qn = /* @__PURE__ */ new WeakMap();
469
+ function K(e) {
470
+ if (qn.has(e)) return qn.get(e);
471
+ let t = [];
472
+ return e.this && t.push(e.this), t.push(...e.params), e.rest && t.push(e.rest), qn.set(e, t), t;
473
+ }
474
+ function xi(e, t) {
475
+ let { node: r } = e, n = 0, s = () => t(e, n++);
476
+ r.this && e.call(s, "this"), e.each(s, "params"), r.rest && e.call(s, "rest");
477
+ }
478
+ var Un = /* @__PURE__ */ new WeakMap();
479
+ function le(e) {
480
+ if (Un.has(e)) return Un.get(e);
481
+ if (e.type === "ChainExpression") return le(e.expression);
482
+ let t;
483
+ return e.type === "ImportExpression" || e.type === "TSImportType" ? (t = [e.source], e.options && t.push(e.options)) : e.type === "TSExternalModuleReference" ? t = [e.expression] : t = e.arguments, Un.set(e, t), t;
484
+ }
485
+ function $t(e, t) {
486
+ let { node: r } = e;
487
+ if (r.type === "ChainExpression") return e.call(() => $t(e, t), "expression");
488
+ r.type === "ImportExpression" || r.type === "TSImportType" ? (e.call(() => t(e, 0), "source"), r.options && e.call(() => t(e, 1), "options")) : r.type === "TSExternalModuleReference" ? e.call(() => t(e, 0), "expression") : e.each(t, "arguments");
489
+ }
490
+ function $n(e, t) {
491
+ let r = [];
492
+ if (e.type === "ChainExpression" && (e = e.expression, r.push("expression")), e.type === "ImportExpression" || e.type === "TSImportType") {
493
+ if (t === 0 || t === (e.options ? -2 : -1)) return [...r, "source"];
494
+ if (e.options && (t === 1 || t === -1)) return [...r, "options"];
495
+ throw new RangeError("Invalid argument index");
496
+ } else if (e.type === "TSExternalModuleReference") {
497
+ if (t === 0 || t === -1) return [...r, "expression"];
498
+ } else if (t < 0 && (t = e.arguments.length + t), t >= 0 && t < e.arguments.length) return [...r, "arguments", t];
499
+ throw new RangeError("Invalid argument index");
500
+ }
501
+ function Lt(e) {
502
+ return e.value.trim() === "prettier-ignore" && !e.unignore;
503
+ }
504
+ function Ot(e) {
505
+ return e?.prettierIgnore || T(e, x.PrettierIgnore);
506
+ }
507
+ var x = { Leading: 2, Trailing: 4, Dangling: 8, Block: 16, Line: 32, PrettierIgnore: 64, First: 128, Last: 256 };
508
+ var gi = (e, t) => {
509
+ if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & x.Leading && !r.leading || e & x.Trailing && !r.trailing || e & x.Dangling && (r.leading || r.trailing) || e & x.Block && !ce(r) || e & x.Line && !At(r) || e & x.First && n !== 0 || e & x.Last && n !== s.length - 1 || e & x.PrettierIgnore && !Lt(r) || t && !t(r));
510
+ };
511
+ function T(e, t, r) {
512
+ if (!R(e?.comments)) return false;
513
+ let n = gi(t, r);
514
+ return n ? e.comments.some(n) : true;
515
+ }
516
+ function et(e, t, r) {
517
+ if (!Array.isArray(e?.comments)) return [];
518
+ let n = gi(t, r);
519
+ return n ? e.comments.filter(n) : e.comments;
520
+ }
521
+ var oe = (e, { originalText: t }) => Yt(t, I(e));
522
+ function Dt(e) {
523
+ return M(e) || e.type === "NewExpression" || e.type === "ImportExpression";
524
+ }
525
+ function Oe(e) {
526
+ return e && (e.type === "ObjectProperty" || e.type === "Property" && !mt(e));
527
+ }
528
+ var Ae = k(["TSAsExpression", "TSSatisfiesExpression", "AsExpression", "AsConstExpression", "SatisfiesExpression"]);
529
+ var Se = k(["TSUnionType", "UnionTypeAnnotation"]);
530
+ var xt = k(["TSIntersectionType", "IntersectionTypeAnnotation"]);
531
+ var Ue = k(["TSConditionalType", "ConditionalTypeAnnotation"]);
532
+ var hi = (e) => e?.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const";
533
+ var Cr = k(["TSTypeAliasDeclaration", "TypeAlias"]);
534
+ function Yr({ key: e, parent: t }) {
535
+ return !(e === "types" && Se(t) || e === "types" && xt(t));
536
+ }
537
+ var dp = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]);
538
+ var Kt = (e) => {
539
+ for (let t of e.quasis) delete t.value;
540
+ };
541
+ function Si(e, t, r) {
542
+ if (e.type === "Program" && delete t.sourceType, (e.type === "BigIntLiteral" || e.type === "Literal") && e.bigint && (t.bigint = e.bigint.toLowerCase()), e.type === "EmptyStatement" && !kt({ node: e, parent: r }) || e.type === "JSXText" || e.type === "JSXExpressionContainer" && (e.expression.type === "Literal" || e.expression.type === "StringLiteral") && e.expression.value === " ") return null;
543
+ if ((e.type === "Property" || e.type === "ObjectProperty" || e.type === "MethodDefinition" || e.type === "ClassProperty" || e.type === "ClassMethod" || e.type === "PropertyDefinition" || e.type === "TSDeclareMethod" || e.type === "TSPropertySignature" || e.type === "ObjectTypeProperty" || e.type === "ImportAttribute") && e.key && !e.computed) {
544
+ let { key: s } = e;
545
+ V(s) || Ce(s) ? t.key = String(s.value) : s.type === "Identifier" && (t.key = s.name);
546
+ }
547
+ if (e.type === "JSXElement" && e.openingElement.name.name === "style" && e.openingElement.attributes.some((s) => s.type === "JSXAttribute" && s.name.name === "jsx")) for (let { type: s, expression: i } of t.children) s === "JSXExpressionContainer" && i.type === "TemplateLiteral" && Kt(i);
548
+ e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && Kt(t.value.expression), e.type === "JSXAttribute" && e.value?.type === "Literal" && /["']|&quot;|&apos;/u.test(e.value.value) && (t.value.value = W(0, e.value.value, /["']|&quot;|&apos;/gu, '"'));
549
+ let n = e.expression || e.callee;
550
+ if (e.type === "Decorator" && n.type === "CallExpression" && n.callee.name === "Component" && n.arguments.length === 1) {
551
+ let s = e.expression.arguments[0].properties;
552
+ for (let [i, o] of t.expression.arguments[0].properties.entries()) switch (s[i].key.name) {
553
+ case "styles":
554
+ q(o.value) && Kt(o.value.elements[0]);
555
+ break;
556
+ case "template":
557
+ o.value.type === "TemplateLiteral" && Kt(o.value);
558
+ break;
559
+ }
560
+ }
561
+ e.type === "TaggedTemplateExpression" && (e.tag.type === "MemberExpression" || e.tag.type === "Identifier" && (e.tag.name === "gql" || e.tag.name === "graphql" || e.tag.name === "css" || e.tag.name === "md" || e.tag.name === "markdown" || e.tag.name === "html") || e.tag.type === "CallExpression") && Kt(t.quasi), e.type === "TemplateLiteral" && Kt(t), e.type === "ChainExpression" && e.expression.type === "TSNonNullExpression" && (t.type = "TSNonNullExpression", t.expression.type = "ChainExpression");
562
+ }
563
+ Si.ignoredProperties = dp;
564
+ var Bi = Si;
565
+ var Cp = k(["File", "TemplateElement", "TSEmptyBodyFunctionExpression", "ChainExpression"]);
566
+ var Ap = (e, [t]) => t?.type === "ComponentParameter" && t.shorthand && t.name === e && t.local !== t.name || t?.type === "MatchObjectPatternProperty" && t.shorthand && t.key === e && t.value !== t.key || t?.type === "ObjectProperty" && t.shorthand && t.key === e && t.value !== t.key || t?.type === "Property" && t.shorthand && t.key === e && !mt(t) && t.value !== t.key;
567
+ var Tp = (e, [t]) => !!(e.type === "FunctionExpression" && t.type === "MethodDefinition" && t.value === e && K(e).length === 0 && !e.returnType && !R(e.typeParameters) && e.body);
568
+ var bi = (e, [t]) => t?.typeAnnotation === e && hi(t);
569
+ var xp = (e, [t, ...r]) => bi(e, [t]) || t?.typeName === e && bi(t, r);
570
+ function gp(e, t) {
571
+ return Cp(e) || Ap(e, t) || Tp(e, t) ? false : e.type === "EmptyStatement" ? kt({ node: e, parent: t[0] }) : !(xp(e, t) || e.type === "TSTypeAnnotation" && t[0].type === "TSPropertySignature");
572
+ }
573
+ var Pi = gp;
574
+ function hp(e) {
575
+ let t = e.type || e.kind || "(unknown type)", r = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || "");
576
+ return r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "");
577
+ }
578
+ function Kn(e, t) {
579
+ (e.comments ?? (e.comments = [])).push(t), t.printed = false, t.nodeDescription = hp(e);
580
+ }
581
+ function te(e, t) {
582
+ t.leading = true, t.trailing = false, Kn(e, t);
583
+ }
584
+ function we(e, t, r) {
585
+ t.leading = false, t.trailing = false, r && (t.marker = r), Kn(e, t);
586
+ }
587
+ function $(e, t) {
588
+ t.leading = false, t.trailing = true, Kn(e, t);
589
+ }
590
+ function Sp(e, t) {
591
+ let r = null, n = t;
592
+ for (; n !== r; ) r = n, n = ze(e, n), n = qt(e, n), n = Ut(e, n), n = Ze(e, n);
593
+ return n;
594
+ }
595
+ var at = Sp;
596
+ function Bp(e, t) {
597
+ let r = at(e, t);
598
+ return r === false ? "" : e.charAt(r);
599
+ }
600
+ var _e = Bp;
601
+ function bp(e, t, r) {
602
+ for (let n = t; n < r; ++n) if (e.charAt(n) === `
603
+ `) return true;
604
+ return false;
605
+ }
606
+ var ue = bp;
607
+ var Qn = /* @__PURE__ */ new WeakMap();
608
+ function Pp(e) {
609
+ return Qn.has(e) || Qn.set(e, ce(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), Qn.get(e);
610
+ }
611
+ var Hr = Pp;
612
+ var Zn = (e, t) => At(e) || !ue(t, w(e), I(e));
613
+ function kp(e) {
614
+ return [ji, Ii, _i, Jp, wp, es, ts, ki, Li, Yp, Wp, qp, ns, Ni, Hp, Oi, Mi, rs, _p, Zp, vi, ss].some((t) => t(e));
615
+ }
616
+ function Ip(e) {
617
+ return [Op, _i, Ii, Ni, es, ts, ki, Li, Mi, Gp, Up, ns, $p, rs, Qp, zp, ec, vi, rc, tc, ss].some((t) => t(e));
618
+ }
619
+ function Lp(e) {
620
+ return [ji, es, ts, Rp, Oi, ns, vp, jp, rs, Kp, ss].some((t) => t(e));
621
+ }
622
+ function wt(e, t) {
623
+ let r = (e.body || e.properties).find(({ type: n }) => n !== "EmptyStatement");
624
+ r ? te(r, t) : we(e, t);
625
+ }
626
+ function zn(e, t) {
627
+ e.type === "BlockStatement" ? wt(e, t) : te(e, t);
628
+ }
629
+ function Op({ comment: e, followingNode: t }) {
630
+ return t && Hr(e) ? (te(t, e), true) : false;
631
+ }
632
+ function es({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
633
+ if (r?.type !== "IfStatement" || !n) return false;
634
+ if (_e(s, I(e)) === ")") return $(t, e), true;
635
+ if (n.type === "BlockStatement" && n === r.consequent && w(e) >= I(t) && I(e) <= w(n)) return te(n, e), true;
636
+ if (t === r.consequent && n === r.alternate) {
637
+ let o = at(s, I(r.consequent));
638
+ if (n.type === "BlockStatement" && w(e) >= o && I(e) <= w(n)) return te(n, e), true;
639
+ if (w(e) < o || r.alternate.type === "BlockStatement") return t.type === "BlockStatement" ? ($(t, e), true) : Zn(e, s) && !ue(s, w(t), w(e)) ? ($(t, e), true) : (we(r, e), true);
640
+ }
641
+ return n.type === "BlockStatement" ? (wt(n, e), true) : n.type === "IfStatement" ? (zn(n.consequent, e), true) : r.consequent === n ? (te(n, e), true) : false;
642
+ }
643
+ function ts({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
644
+ return r?.type !== "WhileStatement" || !n ? false : _e(s, I(e)) === ")" ? ($(t, e), true) : n.type === "BlockStatement" ? (wt(n, e), true) : r.body === n ? (te(n, e), true) : false;
645
+ }
646
+ function ki({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
647
+ return r?.type !== "TryStatement" && r?.type !== "CatchClause" || !n ? false : r.type === "CatchClause" && t ? ($(t, e), true) : n.type === "BlockStatement" ? (wt(n, e), true) : n.type === "TryStatement" ? (zn(n.finalizer, e), true) : n.type === "CatchClause" ? (zn(n.body, e), true) : false;
648
+ }
649
+ function wp({ comment: e, enclosingNode: t, followingNode: r }) {
650
+ return J(t) && r?.type === "Identifier" ? (te(t, e), true) : false;
651
+ }
652
+ function _p({ comment: e, enclosingNode: t, followingNode: r, options: n }) {
653
+ return !n.experimentalTernaries || !(t?.type === "ConditionalExpression" || Ue(t)) ? false : r?.type === "ConditionalExpression" || Ue(r) ? (we(t, e), true) : false;
654
+ }
655
+ function Ii({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s, options: i }) {
656
+ let o = t && !ue(s, I(t), w(e));
657
+ return (!t || !o) && (r?.type === "ConditionalExpression" || Ue(r)) && n ? i.experimentalTernaries && r.alternate === n && !(ce(e) && !ue(i.originalText, w(e), I(e))) ? (we(r, e), true) : (te(n, e), true) : false;
658
+ }
659
+ var Mp = k(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]);
660
+ function Li({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
661
+ if (Mp(r)) {
662
+ if (R(r.decorators) && n?.type !== "Decorator") return $(N(0, r.decorators, -1), e), true;
663
+ if (r.body && n === r.body) return wt(r.body, e), true;
664
+ if (n) {
665
+ if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return $(t, e), true;
666
+ for (let s of ["implements", "extends", "mixins"]) if (r[s] && n === r[s][0]) return t && (t === r.id || t === r.typeParameters || t === r.superClass) ? $(t, e) : we(r, e, s), true;
667
+ }
668
+ }
669
+ return false;
670
+ }
671
+ var Np = k(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "TSParameterProperty"]);
672
+ function Oi({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
673
+ return r && t && _e(n, I(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && _e(n, I(t)) !== ":" ? ($(t, e), true) : t?.type === "Decorator" && Np(r) && (At(e) || e.placement === "ownLine") ? ($(t, e), true) : false;
674
+ }
675
+ var wi = k(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]);
676
+ function jp({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
677
+ return _e(n, I(e)) !== "(" ? false : t && wi(r) ? ($(t, e), true) : false;
678
+ }
679
+ function vp({ comment: e, enclosingNode: t, text: r }) {
680
+ if (t?.type !== "ArrowFunctionExpression") return false;
681
+ let n = at(r, I(e));
682
+ return n !== false && r.slice(n, n + 2) === "=>" ? (we(t, e), true) : false;
683
+ }
684
+ function Rp({ comment: e, enclosingNode: t, text: r }) {
685
+ return _e(r, I(e)) !== ")" ? false : t && (Ri(t) && K(t).length === 0 || Dt(t) && le(t).length === 0) ? (we(t, e), true) : (t?.type === "MethodDefinition" || t?.type === "TSAbstractMethodDefinition") && K(t.value).length === 0 ? (we(t.value, e), true) : false;
686
+ }
687
+ function Jp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
688
+ return t?.type === "ComponentTypeParameter" && (r?.type === "DeclareComponent" || r?.type === "ComponentTypeAnnotation") && n?.type !== "ComponentTypeParameter" ? ($(t, e), true) : (t?.type === "ComponentParameter" || t?.type === "RestElement") && r?.type === "ComponentDeclaration" && _e(s, I(e)) === ")" ? ($(t, e), true) : false;
689
+ }
690
+ function _i({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
691
+ return t?.type === "FunctionTypeParam" && r?.type === "FunctionTypeAnnotation" && n?.type !== "FunctionTypeParam" ? ($(t, e), true) : (t?.type === "Identifier" || t?.type === "AssignmentPattern" || t?.type === "ObjectPattern" || t?.type === "ArrayPattern" || t?.type === "RestElement" || t?.type === "TSParameterProperty") && Ri(r) && _e(s, I(e)) === ")" ? ($(t, e), true) : !ce(e) && n?.type === "BlockStatement" && wi(r) && (r.type === "MethodDefinition" ? r.value.body : r.body) === n && at(s, I(e)) === w(n) ? (wt(n, e), true) : false;
692
+ }
693
+ function Mi({ comment: e, enclosingNode: t }) {
694
+ return t?.type === "LabeledStatement" ? (te(t, e), true) : false;
695
+ }
696
+ function rs({ comment: e, enclosingNode: t }) {
697
+ return (t?.type === "ContinueStatement" || t?.type === "BreakStatement") && !t.label ? ($(t, e), true) : false;
698
+ }
699
+ function Gp({ comment: e, precedingNode: t, enclosingNode: r }) {
700
+ return M(r) && t && r.callee === t && r.arguments.length > 0 ? (te(r.arguments[0], e), true) : false;
701
+ }
702
+ function Wp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
703
+ return Se(r) ? (Lt(e) && (n.prettierIgnore = true, e.unignore = true), t ? ($(t, e), true) : false) : (Se(n) && Lt(e) && (n.types[0].prettierIgnore = true, e.unignore = true), false);
704
+ }
705
+ function qp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
706
+ return r && r.type === "MatchOrPattern" ? (Lt(e) && (n.prettierIgnore = true, e.unignore = true), t ? ($(t, e), true) : false) : (n && n.type === "MatchOrPattern" && Lt(e) && (n.types[0].prettierIgnore = true, e.unignore = true), false);
707
+ }
708
+ function Up({ comment: e, enclosingNode: t }) {
709
+ return Oe(t) ? (te(t, e), true) : false;
710
+ }
711
+ function ns({ comment: e, enclosingNode: t, ast: r, isLastComment: n }) {
712
+ return r?.body?.length === 0 ? (n ? we(r, e) : te(r, e), true) : t?.type === "Program" && t.body.length === 0 && !R(t.directives) ? (n ? we(t, e) : te(t, e), true) : false;
713
+ }
714
+ function Yp({ comment: e, enclosingNode: t, followingNode: r }) {
715
+ return (t?.type === "ForInStatement" || t?.type === "ForOfStatement") && r !== t.body ? (te(t, e), true) : false;
716
+ }
717
+ function Ni({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
718
+ if (r?.type === "ImportSpecifier" || r?.type === "ExportSpecifier") return te(r, e), true;
719
+ let s = t?.type === "ImportSpecifier" && r?.type === "ImportDeclaration", i = t?.type === "ExportSpecifier" && r?.type === "ExportNamedDeclaration";
720
+ return (s || i) && Z(n, I(e)) ? ($(t, e), true) : false;
721
+ }
722
+ function Hp({ comment: e, enclosingNode: t }) {
723
+ return t?.type === "AssignmentPattern" ? (te(t, e), true) : false;
724
+ }
725
+ var Xp = k(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]);
726
+ var Vp = k(["ObjectExpression", "ArrayExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]);
727
+ function $p({ comment: e, enclosingNode: t, followingNode: r }) {
728
+ return Xp(t) && r && (Vp(r) || ce(e)) ? (te(r, e), true) : false;
729
+ }
730
+ function Kp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n, text: s }) {
731
+ return !n && (t?.type === "TSMethodSignature" || t?.type === "TSDeclareFunction" || t?.type === "TSAbstractMethodDefinition") && (!r || r !== t.returnType) && _e(s, I(e)) === ";" ? ($(t, e), true) : false;
732
+ }
733
+ function ji({ comment: e, enclosingNode: t, followingNode: r }) {
734
+ if (Lt(e) && t?.type === "TSMappedType" && r === t.key) return t.prettierIgnore = true, e.unignore = true, true;
735
+ }
736
+ function vi({ comment: e, precedingNode: t, enclosingNode: r }) {
737
+ if (r?.type === "TSMappedType" && !t) return we(r, e), true;
738
+ }
739
+ function Qp({ comment: e, enclosingNode: t, followingNode: r }) {
740
+ return !t || t.type !== "SwitchCase" || t.test || !r || r !== t.consequent[0] ? false : (r.type === "BlockStatement" && At(e) ? wt(r, e) : we(t, e), true);
741
+ }
742
+ function zp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
743
+ return Se(t) && ((r.type === "TSArrayType" || r.type === "ArrayTypeAnnotation") && !n || xt(r)) ? ($(N(0, t.types, -1), e), true) : false;
744
+ }
745
+ function Zp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n }) {
746
+ if ((t?.type === "ObjectPattern" || t?.type === "ArrayPattern") && n?.type === "TSTypeAnnotation") return r ? $(r, e) : we(t, e), true;
747
+ }
748
+ function ec({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
749
+ return !n && r?.type === "UnaryExpression" && (t?.type === "LogicalExpression" || t?.type === "BinaryExpression") && ue(s, w(r.argument), w(t.right)) && Zn(e, s) && !ue(s, w(t.right), w(e)) ? ($(t.right, e), true) : false;
750
+ }
751
+ function tc({ enclosingNode: e, followingNode: t, comment: r }) {
752
+ if (e && (e.type === "TSPropertySignature" || e.type === "ObjectTypeProperty") && (Se(t) || xt(t))) return te(t, r), true;
753
+ }
754
+ function ss({ enclosingNode: e, precedingNode: t, followingNode: r, comment: n, text: s }) {
755
+ if (Ae(e) && t === e.expression && !Zn(n, s)) return r ? te(r, n) : $(e, n), true;
756
+ }
757
+ function rc({ comment: e, enclosingNode: t, followingNode: r, precedingNode: n }) {
758
+ return t && r && n && t.type === "ArrowFunctionExpression" && t.returnType === n && (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") ? (te(r, e), true) : false;
759
+ }
760
+ var Ri = k(["ArrowFunctionExpression", "FunctionExpression", "FunctionDeclaration", "ObjectMethod", "ClassMethod", "TSDeclareFunction", "TSCallSignatureDeclaration", "TSConstructSignatureDeclaration", "TSMethodSignature", "TSConstructorType", "TSFunctionType", "TSDeclareMethod"]);
761
+ var nc = { endOfLine: Ip, ownLine: kp, remaining: Lp };
762
+ var Ji = nc;
763
+ function sc(e, { parser: t }) {
764
+ if (t === "flow" || t === "hermes" || t === "babel-flow") return e = W(0, e, /[\s(]/gu, ""), e === "" || e === "/*" || e === "/*::";
765
+ }
766
+ var Gi = sc;
767
+ var ic = k(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]);
768
+ function oc(e) {
769
+ let { key: t, parent: r } = e;
770
+ if (t === "types" && Se(r) || t === "argument" && r.type === "JSXSpreadAttribute" || t === "expression" && r.type === "JSXSpreadChild" || t === "superClass" && (r.type === "ClassDeclaration" || r.type === "ClassExpression") || (t === "id" || t === "typeParameters") && ic(r) || t === "patterns" && r.type === "MatchOrPattern") return true;
771
+ let { node: n } = e;
772
+ return Ot(n) ? false : Se(n) ? Yr(e) : !!H(n);
773
+ }
774
+ var Wi = oc;
775
+ var Ye = "string";
776
+ var Be = "array";
777
+ var tt = "cursor";
778
+ var He = "indent";
779
+ var Xe = "align";
780
+ var rt = "trim";
781
+ var Fe = "group";
782
+ var Me = "fill";
783
+ var be = "if-break";
784
+ var Ve = "indent-if-break";
785
+ var $e = "line-suffix";
786
+ var Ge = "line-suffix-boundary";
787
+ var me = "line";
788
+ var Pe = "label";
789
+ var Ne = "break-parent";
790
+ var Xr = /* @__PURE__ */ new Set([tt, He, Xe, rt, Fe, Me, be, Ve, $e, Ge, me, Pe, Ne]);
791
+ function uc(e) {
792
+ if (typeof e == "string") return Ye;
793
+ if (Array.isArray(e)) return Be;
794
+ if (!e) return;
795
+ let { type: t } = e;
796
+ if (Xr.has(t)) return t;
797
+ }
798
+ var We = uc;
799
+ var ac = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
800
+ function pc(e) {
801
+ let t = e === null ? "null" : typeof e;
802
+ if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
803
+ Expected it to be 'string' or 'object'.`;
804
+ if (We(e)) throw new Error("doc is valid.");
805
+ let r = Object.prototype.toString.call(e);
806
+ if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
807
+ let n = ac([...Xr].map((s) => `'${s}'`));
808
+ return `Unexpected doc.type '${e.type}'.
809
+ Expected it to be ${n}.`;
810
+ }
811
+ var is = class extends Error {
812
+ name = "InvalidDocError";
813
+ constructor(t) {
814
+ super(pc(t)), this.doc = t;
815
+ }
816
+ };
817
+ var gt = is;
818
+ var qi = {};
819
+ function cc(e, t, r, n) {
820
+ let s = [e];
821
+ for (; s.length > 0; ) {
822
+ let i = s.pop();
823
+ if (i === qi) {
824
+ r(s.pop());
825
+ continue;
826
+ }
827
+ r && s.push(i, qi);
828
+ let o = We(i);
829
+ if (!o) throw new gt(i);
830
+ if (t?.(i) !== false) switch (o) {
831
+ case Be:
832
+ case Me: {
833
+ let u = o === Be ? i : i.parts;
834
+ for (let p = u.length, c = p - 1; c >= 0; --c) s.push(u[c]);
835
+ break;
836
+ }
837
+ case be:
838
+ s.push(i.flatContents, i.breakContents);
839
+ break;
840
+ case Fe:
841
+ if (n && i.expandedStates) for (let u = i.expandedStates.length, p = u - 1; p >= 0; --p) s.push(i.expandedStates[p]);
842
+ else s.push(i.contents);
843
+ break;
844
+ case Xe:
845
+ case He:
846
+ case Ve:
847
+ case Pe:
848
+ case $e:
849
+ s.push(i.contents);
850
+ break;
851
+ case Ye:
852
+ case tt:
853
+ case rt:
854
+ case Ge:
855
+ case me:
856
+ case Ne:
857
+ break;
858
+ default:
859
+ throw new gt(i);
860
+ }
861
+ }
862
+ }
863
+ var Vr = cc;
864
+ function ft(e, t) {
865
+ if (typeof e == "string") return t(e);
866
+ let r = /* @__PURE__ */ new Map();
867
+ return n(e);
868
+ function n(i) {
869
+ if (r.has(i)) return r.get(i);
870
+ let o = s(i);
871
+ return r.set(i, o), o;
872
+ }
873
+ function s(i) {
874
+ switch (We(i)) {
875
+ case Be:
876
+ return t(i.map(n));
877
+ case Me:
878
+ return t({ ...i, parts: i.parts.map(n) });
879
+ case be:
880
+ return t({ ...i, breakContents: n(i.breakContents), flatContents: n(i.flatContents) });
881
+ case Fe: {
882
+ let { expandedStates: o, contents: u } = i;
883
+ return o ? (o = o.map(n), u = o[0]) : u = n(u), t({ ...i, contents: u, expandedStates: o });
884
+ }
885
+ case Xe:
886
+ case He:
887
+ case Ve:
888
+ case Pe:
889
+ case $e:
890
+ return t({ ...i, contents: n(i.contents) });
891
+ case Ye:
892
+ case tt:
893
+ case rt:
894
+ case Ge:
895
+ case me:
896
+ case Ne:
897
+ return t(i);
898
+ default:
899
+ throw new gt(i);
900
+ }
901
+ }
902
+ }
903
+ function Yi(e, t, r) {
904
+ let n = r, s = false;
905
+ function i(o) {
906
+ if (s) return false;
907
+ let u = t(o);
908
+ u !== void 0 && (s = true, n = u);
909
+ }
910
+ return Vr(e, i), n;
911
+ }
912
+ function lc(e) {
913
+ if (e.type === Fe && e.break || e.type === me && e.hard || e.type === Ne) return true;
914
+ }
915
+ function ne(e) {
916
+ return Yi(e, lc, false);
917
+ }
918
+ function Ui(e) {
919
+ if (e.length > 0) {
920
+ let t = N(0, e, -1);
921
+ !t.expandedStates && !t.break && (t.break = "propagated");
922
+ }
923
+ return null;
924
+ }
925
+ function Hi(e) {
926
+ let t = /* @__PURE__ */ new Set(), r = [];
927
+ function n(i) {
928
+ if (i.type === Ne && Ui(r), i.type === Fe) {
929
+ if (r.push(i), t.has(i)) return false;
930
+ t.add(i);
931
+ }
932
+ }
933
+ function s(i) {
934
+ i.type === Fe && r.pop().break && Ui(r);
935
+ }
936
+ Vr(e, n, s, true);
937
+ }
938
+ function mc(e) {
939
+ return e.type === me && !e.hard ? e.soft ? "" : " " : e.type === be ? e.flatContents : e;
940
+ }
941
+ function _t(e) {
942
+ return ft(e, mc);
943
+ }
944
+ function Dc(e) {
945
+ switch (We(e)) {
946
+ case Me:
947
+ if (e.parts.every((t) => t === "")) return "";
948
+ break;
949
+ case Fe:
950
+ if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
951
+ if (e.contents.type === Fe && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
952
+ break;
953
+ case Xe:
954
+ case He:
955
+ case Ve:
956
+ case $e:
957
+ if (!e.contents) return "";
958
+ break;
959
+ case be:
960
+ if (!e.flatContents && !e.breakContents) return "";
961
+ break;
962
+ case Be: {
963
+ let t = [];
964
+ for (let r of e) {
965
+ if (!r) continue;
966
+ let [n, ...s] = Array.isArray(r) ? r : [r];
967
+ typeof n == "string" && typeof N(0, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...s);
968
+ }
969
+ return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
970
+ }
971
+ case Ye:
972
+ case tt:
973
+ case rt:
974
+ case Ge:
975
+ case me:
976
+ case Pe:
977
+ case Ne:
978
+ break;
979
+ default:
980
+ throw new gt(e);
981
+ }
982
+ return e;
983
+ }
984
+ function Qt(e) {
985
+ return ft(e, (t) => Dc(t));
986
+ }
987
+ function qe(e, t = $r) {
988
+ return ft(e, (r) => typeof r == "string" ? L(t, r.split(`
989
+ `)) : r);
990
+ }
991
+ function fc(e) {
992
+ if (e.type === me) return true;
993
+ }
994
+ function Xi(e) {
995
+ return Yi(e, fc, false);
996
+ }
997
+ function Ar(e, t) {
998
+ return e.type === Pe ? { ...e, contents: t(e.contents) } : t(e);
999
+ }
1000
+ function Vi(e) {
1001
+ let t = true;
1002
+ return Vr(e, (r) => {
1003
+ switch (We(r)) {
1004
+ case Ye:
1005
+ if (r === "") break;
1006
+ case rt:
1007
+ case Ge:
1008
+ case me:
1009
+ case Ne:
1010
+ return t = false, false;
1011
+ }
1012
+ }), t;
1013
+ }
1014
+ var de = Le;
1015
+ var Kr = Le;
1016
+ var $i = Le;
1017
+ var Ki = Le;
1018
+ function m(e) {
1019
+ return de(e), { type: He, contents: e };
1020
+ }
1021
+ function xe(e, t) {
1022
+ return Ki(e), de(t), { type: Xe, contents: t, n: e };
1023
+ }
1024
+ function Qi(e) {
1025
+ return xe(Number.NEGATIVE_INFINITY, e);
1026
+ }
1027
+ function Qr(e) {
1028
+ return xe(-1, e);
1029
+ }
1030
+ function zi(e, t, r) {
1031
+ de(e);
1032
+ let n = e;
1033
+ if (t > 0) {
1034
+ for (let s = 0; s < Math.floor(t / r); ++s) n = m(n);
1035
+ n = xe(t % r, n), n = xe(Number.NEGATIVE_INFINITY, n);
1036
+ }
1037
+ return n;
1038
+ }
1039
+ var ke = { type: Ne };
1040
+ var Tr = { type: tt };
1041
+ function zr(e) {
1042
+ return $i(e), { type: Me, parts: e };
1043
+ }
1044
+ function l(e, t = {}) {
1045
+ return de(e), Kr(t.expandedStates, true), { type: Fe, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
1046
+ }
1047
+ function nt(e, t) {
1048
+ return l(e[0], { ...t, expandedStates: e });
1049
+ }
1050
+ function P(e, t = "", r = {}) {
1051
+ return de(e), t !== "" && de(t), { type: be, breakContents: e, flatContents: t, groupId: r.groupId };
1052
+ }
1053
+ function yt(e, t) {
1054
+ return de(e), { type: Ve, contents: e, groupId: t.groupId, negate: t.negate };
1055
+ }
1056
+ function L(e, t) {
1057
+ de(e), Kr(t);
1058
+ let r = [];
1059
+ for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
1060
+ return r;
1061
+ }
1062
+ function pt(e, t) {
1063
+ return de(t), e ? { type: Pe, label: e, contents: t } : t;
1064
+ }
1065
+ var A = { type: me };
1066
+ var f = { type: me, soft: true };
1067
+ var os = { type: me, hard: true };
1068
+ var E = [os, ke];
1069
+ var yc = { type: me, hard: true, literal: true };
1070
+ var $r = [yc, ke];
1071
+ function us(e) {
1072
+ return de(e), { type: $e, contents: e };
1073
+ }
1074
+ var je = { type: Ge };
1075
+ var Ec = "cr";
1076
+ var Fc = "crlf";
1077
+ var dc = "\r";
1078
+ var Cc = `\r
1079
+ `;
1080
+ var Ac = `
1081
+ `;
1082
+ var Tc = Ac;
1083
+ function Zi(e) {
1084
+ return e === Ec ? dc : e === Fc ? Cc : Tc;
1085
+ }
1086
+ var xc = { type: 0 };
1087
+ var gc = { type: 1 };
1088
+ var as = { value: "", length: 0, queue: [], get root() {
1089
+ return as;
1090
+ } };
1091
+ function eo(e, t, r) {
1092
+ let n = t.type === 1 ? e.queue.slice(0, -1) : [...e.queue, t], s = "", i = 0, o = 0, u = 0;
1093
+ for (let d of n) switch (d.type) {
1094
+ case 0:
1095
+ y(), r.useTabs ? p(1) : c(r.tabWidth);
1096
+ break;
1097
+ case 3: {
1098
+ let { string: b } = d;
1099
+ y(), s += b, i += b.length;
1100
+ break;
1101
+ }
1102
+ case 2: {
1103
+ let { width: b } = d;
1104
+ o += 1, u += b;
1105
+ break;
1106
+ }
1107
+ default:
1108
+ throw new Error(`Unexpected indent comment '${d.type}'.`);
1109
+ }
1110
+ return F(), { ...e, value: s, length: i, queue: n };
1111
+ function p(d) {
1112
+ s += " ".repeat(d), i += r.tabWidth * d;
1113
+ }
1114
+ function c(d) {
1115
+ s += " ".repeat(d), i += d;
1116
+ }
1117
+ function y() {
1118
+ r.useTabs ? D() : F();
1119
+ }
1120
+ function D() {
1121
+ o > 0 && p(o), C();
1122
+ }
1123
+ function F() {
1124
+ u > 0 && c(u), C();
1125
+ }
1126
+ function C() {
1127
+ o = 0, u = 0;
1128
+ }
1129
+ }
1130
+ function to(e, t, r) {
1131
+ if (!t) return e;
1132
+ if (t.type === "root") return { ...e, root: e };
1133
+ if (t === Number.NEGATIVE_INFINITY) return e.root;
1134
+ let n;
1135
+ return typeof t == "number" ? t < 0 ? n = gc : n = { type: 2, width: t } : n = { type: 3, string: t }, eo(e, n, r);
1136
+ }
1137
+ function ro(e, t) {
1138
+ return eo(e, xc, t);
1139
+ }
1140
+ function hc(e) {
1141
+ let t = 0;
1142
+ for (let r = e.length - 1; r >= 0; r--) {
1143
+ let n = e[r];
1144
+ if (n === " " || n === " ") t++;
1145
+ else break;
1146
+ }
1147
+ return t;
1148
+ }
1149
+ function ps(e) {
1150
+ let t = hc(e);
1151
+ return { text: t === 0 ? e : e.slice(0, e.length - t), count: t };
1152
+ }
1153
+ var ve = /* @__PURE__ */ Symbol("MODE_BREAK");
1154
+ var ct = /* @__PURE__ */ Symbol("MODE_FLAT");
1155
+ var cs = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
1156
+ function Zr(e, t, r, n, s, i) {
1157
+ if (r === Number.POSITIVE_INFINITY) return true;
1158
+ let o = t.length, u = false, p = [e], c = "";
1159
+ for (; r >= 0; ) {
1160
+ if (p.length === 0) {
1161
+ if (o === 0) return true;
1162
+ p.push(t[--o]);
1163
+ continue;
1164
+ }
1165
+ let { mode: y, doc: D } = p.pop(), F = We(D);
1166
+ switch (F) {
1167
+ case Ye:
1168
+ D && (u && (c += " ", r -= 1, u = false), c += D, r -= ot(D));
1169
+ break;
1170
+ case Be:
1171
+ case Me: {
1172
+ let C = F === Be ? D : D.parts, d = D[cs] ?? 0;
1173
+ for (let b = C.length - 1; b >= d; b--) p.push({ mode: y, doc: C[b] });
1174
+ break;
1175
+ }
1176
+ case He:
1177
+ case Xe:
1178
+ case Ve:
1179
+ case Pe:
1180
+ p.push({ mode: y, doc: D.contents });
1181
+ break;
1182
+ case rt: {
1183
+ let { text: C, count: d } = ps(c);
1184
+ c = C, r += d;
1185
+ break;
1186
+ }
1187
+ case Fe: {
1188
+ if (i && D.break) return false;
1189
+ let C = D.break ? ve : y, d = D.expandedStates && C === ve ? N(0, D.expandedStates, -1) : D.contents;
1190
+ p.push({ mode: C, doc: d });
1191
+ break;
1192
+ }
1193
+ case be: {
1194
+ let d = (D.groupId ? s[D.groupId] || ct : y) === ve ? D.breakContents : D.flatContents;
1195
+ d && p.push({ mode: y, doc: d });
1196
+ break;
1197
+ }
1198
+ case me:
1199
+ if (y === ve || D.hard) return true;
1200
+ D.soft || (u = true);
1201
+ break;
1202
+ case $e:
1203
+ n = true;
1204
+ break;
1205
+ case Ge:
1206
+ if (n) return false;
1207
+ break;
1208
+ }
1209
+ }
1210
+ return false;
1211
+ }
1212
+ function ls(e, t) {
1213
+ let r = /* @__PURE__ */ Object.create(null), n = t.printWidth, s = Zi(t.endOfLine), i = 0, o = [{ indent: as, mode: ve, doc: e }], u = "", p = false, c = [], y = [], D = [], F = [], C = 0;
1214
+ for (Hi(e); o.length > 0; ) {
1215
+ let { indent: h, mode: g, doc: S } = o.pop();
1216
+ switch (We(S)) {
1217
+ case Ye: {
1218
+ let j = s !== `
1219
+ ` ? W(0, S, `
1220
+ `, s) : S;
1221
+ j && (u += j, o.length > 0 && (i += ot(j)));
1222
+ break;
1223
+ }
1224
+ case Be:
1225
+ for (let j = S.length - 1; j >= 0; j--) o.push({ indent: h, mode: g, doc: S[j] });
1226
+ break;
1227
+ case tt:
1228
+ if (y.length >= 2) throw new Error("There are too many 'cursor' in doc.");
1229
+ y.push(C + u.length);
1230
+ break;
1231
+ case He:
1232
+ o.push({ indent: ro(h, t), mode: g, doc: S.contents });
1233
+ break;
1234
+ case Xe:
1235
+ o.push({ indent: to(h, S.n, t), mode: g, doc: S.contents });
1236
+ break;
1237
+ case rt:
1238
+ O();
1239
+ break;
1240
+ case Fe:
1241
+ switch (g) {
1242
+ case ct:
1243
+ if (!p) {
1244
+ o.push({ indent: h, mode: S.break ? ve : ct, doc: S.contents });
1245
+ break;
1246
+ }
1247
+ case ve: {
1248
+ p = false;
1249
+ let j = { indent: h, mode: ct, doc: S.contents }, U = n - i, fe = c.length > 0;
1250
+ if (!S.break && Zr(j, o, U, fe, r)) o.push(j);
1251
+ else if (S.expandedStates) {
1252
+ let Y = N(0, S.expandedStates, -1);
1253
+ if (S.break) {
1254
+ o.push({ indent: h, mode: ve, doc: Y });
1255
+ break;
1256
+ } else for (let z = 1; z < S.expandedStates.length + 1; z++) if (z >= S.expandedStates.length) {
1257
+ o.push({ indent: h, mode: ve, doc: Y });
1258
+ break;
1259
+ } else {
1260
+ let ee = S.expandedStates[z], Ie = { indent: h, mode: ct, doc: ee };
1261
+ if (Zr(Ie, o, U, fe, r)) {
1262
+ o.push(Ie);
1263
+ break;
1264
+ }
1265
+ }
1266
+ } else o.push({ indent: h, mode: ve, doc: S.contents });
1267
+ break;
1268
+ }
1269
+ }
1270
+ S.id && (r[S.id] = N(0, o, -1).mode);
1271
+ break;
1272
+ case Me: {
1273
+ let j = n - i, U = S[cs] ?? 0, { parts: fe } = S, Y = fe.length - U;
1274
+ if (Y === 0) break;
1275
+ let z = fe[U + 0], ee = fe[U + 1], Ie = { indent: h, mode: ct, doc: z }, st = { indent: h, mode: ve, doc: z }, _ = Zr(Ie, [], j, c.length > 0, r, true);
1276
+ if (Y === 1) {
1277
+ _ ? o.push(Ie) : o.push(st);
1278
+ break;
1279
+ }
1280
+ let re = { indent: h, mode: ct, doc: ee }, ae = { indent: h, mode: ve, doc: ee };
1281
+ if (Y === 2) {
1282
+ _ ? o.push(re, Ie) : o.push(ae, st);
1283
+ break;
1284
+ }
1285
+ let it = fe[U + 2], Bt = { indent: h, mode: g, doc: { ...S, [cs]: U + 2 } }, Pr = Zr({ indent: h, mode: ct, doc: [z, ee, it] }, [], j, c.length > 0, r, true);
1286
+ o.push(Bt), Pr ? o.push(re, Ie) : _ ? o.push(ae, Ie) : o.push(ae, st);
1287
+ break;
1288
+ }
1289
+ case be:
1290
+ case Ve: {
1291
+ let j = S.groupId ? r[S.groupId] : g;
1292
+ if (j === ve) {
1293
+ let U = S.type === be ? S.breakContents : S.negate ? S.contents : m(S.contents);
1294
+ U && o.push({ indent: h, mode: g, doc: U });
1295
+ }
1296
+ if (j === ct) {
1297
+ let U = S.type === be ? S.flatContents : S.negate ? m(S.contents) : S.contents;
1298
+ U && o.push({ indent: h, mode: g, doc: U });
1299
+ }
1300
+ break;
1301
+ }
1302
+ case $e:
1303
+ c.push({ indent: h, mode: g, doc: S.contents });
1304
+ break;
1305
+ case Ge:
1306
+ c.length > 0 && o.push({ indent: h, mode: g, doc: os });
1307
+ break;
1308
+ case me:
1309
+ switch (g) {
1310
+ case ct:
1311
+ if (S.hard) p = true;
1312
+ else {
1313
+ S.soft || (u += " ", i += 1);
1314
+ break;
1315
+ }
1316
+ case ve:
1317
+ if (c.length > 0) {
1318
+ o.push({ indent: h, mode: g, doc: S }, ...c.reverse()), c.length = 0;
1319
+ break;
1320
+ }
1321
+ S.literal ? (u += s, i = 0, h.root && (h.root.value && (u += h.root.value), i = h.root.length)) : (O(), u += s + h.value, i = h.length);
1322
+ break;
1323
+ }
1324
+ break;
1325
+ case Pe:
1326
+ o.push({ indent: h, mode: g, doc: S.contents });
1327
+ break;
1328
+ case Ne:
1329
+ break;
1330
+ default:
1331
+ throw new gt(S);
1332
+ }
1333
+ o.length === 0 && c.length > 0 && (o.push(...c.reverse()), c.length = 0);
1334
+ }
1335
+ let d = D.join("") + u, b = [...F, ...y];
1336
+ if (b.length !== 2) return { formatted: d };
1337
+ let B = b[0];
1338
+ return { formatted: d, cursorNodeStart: B, cursorNodeText: d.slice(B, N(0, b, -1)) };
1339
+ function O() {
1340
+ let { text: h, count: g } = ps(u);
1341
+ h && (D.push(h), C += h.length), u = "", i -= g, y.length > 0 && (F.push(...y.map((S) => Math.min(S, C))), y.length = 0);
1342
+ }
1343
+ }
1344
+ function Sc(e, t, r = 0) {
1345
+ let n = 0;
1346
+ for (let s = r; s < e.length; ++s) e[s] === " " ? n = n + t - n % t : n++;
1347
+ return n;
1348
+ }
1349
+ var no = Sc;
1350
+ function Bc(e, t) {
1351
+ let r = e.lastIndexOf(`
1352
+ `);
1353
+ return r === -1 ? 0 : no(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
1354
+ }
1355
+ var so = Bc;
1356
+ function en(e, t, r) {
1357
+ let { node: n } = e;
1358
+ if (n.type === "TemplateLiteral" && kc(e)) {
1359
+ let c = bc(e, t, r);
1360
+ if (c) return c;
1361
+ }
1362
+ let i = "expressions";
1363
+ n.type === "TSTemplateLiteralType" && (i = "types");
1364
+ let o = [], u = e.map(r, i);
1365
+ o.push(je, "`");
1366
+ let p = 0;
1367
+ return e.each(({ index: c, node: y }) => {
1368
+ if (o.push(r()), y.tail) return;
1369
+ let { tabWidth: D } = t, F = y.value.raw, C = F.includes(`
1370
+ `) ? so(F, D) : p;
1371
+ p = C;
1372
+ let d = u[c], b = n[i][c], B = ue(t.originalText, I(y), w(n.quasis[c + 1]));
1373
+ if (!B) {
1374
+ let h = ls(d, { ...t, printWidth: Number.POSITIVE_INFINITY }).formatted;
1375
+ h.includes(`
1376
+ `) ? B = true : d = h;
1377
+ }
1378
+ B && (T(b) || b.type === "Identifier" || J(b) || b.type === "ConditionalExpression" || b.type === "SequenceExpression" || Ae(b) || Te(b)) && (d = [m([f, d]), f]);
1379
+ let O = C === 0 && F.endsWith(`
1380
+ `) ? xe(Number.NEGATIVE_INFINITY, d) : zi(d, C, D);
1381
+ o.push(l(["${", O, je, "}"]));
1382
+ }, "quasis"), o.push("`"), o;
1383
+ }
1384
+ function io(e, t, r) {
1385
+ let n = r("quasi"), { node: s } = e, i = "", o = et(s.quasi, x.Leading)[0];
1386
+ return o && (ue(t.originalText, I(s.typeArguments ?? s.tag), w(o)) ? i = f : i = " "), pt(n.label && { tagged: true, ...n.label }, [r("tag"), r("typeArguments"), i, je, n]);
1387
+ }
1388
+ function bc(e, t, r) {
1389
+ let { node: n } = e, s = n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);
1390
+ if (s.length > 1 || s.some((i) => i.length > 0)) {
1391
+ t.__inJestEach = true;
1392
+ let i = e.map(r, "expressions");
1393
+ t.__inJestEach = false;
1394
+ let o = i.map((D) => "${" + ls(D, { ...t, printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" }).formatted + "}"), u = [{ hasLineBreak: false, cells: [] }];
1395
+ for (let D = 1; D < n.quasis.length; D++) {
1396
+ let F = N(0, u, -1), C = o[D - 1];
1397
+ F.cells.push(C), C.includes(`
1398
+ `) && (F.hasLineBreak = true), n.quasis[D].value.raw.includes(`
1399
+ `) && u.push({ hasLineBreak: false, cells: [] });
1400
+ }
1401
+ let p = Math.max(s.length, ...u.map((D) => D.cells.length)), c = Array.from({ length: p }).fill(0), y = [{ cells: s }, ...u.filter((D) => D.cells.length > 0)];
1402
+ for (let { cells: D } of y.filter((F) => !F.hasLineBreak)) for (let [F, C] of D.entries()) c[F] = Math.max(c[F], ot(C));
1403
+ return [je, "`", m([E, L(E, y.map((D) => L(" | ", D.cells.map((F, C) => D.hasLineBreak ? F : F + " ".repeat(c[C] - ot(F))))))]), E, "`"];
1404
+ }
1405
+ }
1406
+ function Pc(e, t) {
1407
+ let { node: r } = e, n = t();
1408
+ return T(r) && (n = l([m([f, n]), f])), ["${", n, je, "}"];
1409
+ }
1410
+ function zt(e, t) {
1411
+ return e.map(() => Pc(e, t), "expressions");
1412
+ }
1413
+ function tn(e, t) {
1414
+ return ft(e, (r) => typeof r == "string" ? t ? W(0, r, /(\\*)`/gu, "$1$1\\`") : ms(r) : r);
1415
+ }
1416
+ function ms(e) {
1417
+ return W(0, e, /([\\`]|\$\{)/gu, "\\$1");
1418
+ }
1419
+ function kc({ node: e, parent: t }) {
1420
+ let r = /^[fx]?(?:describe|it|test)$/u;
1421
+ return t.type === "TaggedTemplateExpression" && t.quasi === e && t.tag.type === "MemberExpression" && t.tag.property.type === "Identifier" && t.tag.property.name === "each" && (t.tag.object.type === "Identifier" && r.test(t.tag.object.name) || t.tag.object.type === "MemberExpression" && t.tag.object.property.type === "Identifier" && (t.tag.object.property.name === "only" || t.tag.object.property.name === "skip") && t.tag.object.object.type === "Identifier" && r.test(t.tag.object.object.name));
1422
+ }
1423
+ var fs = [(e, t) => e.type === "ObjectExpression" && t === "properties", (e, t) => e.type === "CallExpression" && e.callee.type === "Identifier" && e.callee.name === "Component" && t === "arguments", (e, t) => e.type === "Decorator" && t === "expression"];
1424
+ function oo(e) {
1425
+ let t = (n) => n.type === "TemplateLiteral", r = (n, s) => Oe(n) && !n.computed && n.key.type === "Identifier" && n.key.name === "styles" && s === "value";
1426
+ return e.match(t, (n, s) => q(n) && s === "elements", r, ...fs) || e.match(t, r, ...fs);
1427
+ }
1428
+ function ys(e) {
1429
+ return e.match((t) => t.type === "TemplateLiteral", (t, r) => Oe(t) && !t.computed && t.key.type === "Identifier" && t.key.name === "template" && r === "value", ...fs);
1430
+ }
1431
+ function Ds(e, t) {
1432
+ return T(e, x.Block | x.Leading, ({ value: r }) => r === ` ${t} `);
1433
+ }
1434
+ function rn({ node: e, parent: t }, r) {
1435
+ return Ds(e, r) || Ic(t) && Ds(t, r) || t.type === "ExpressionStatement" && Ds(t, r);
1436
+ }
1437
+ function Ic(e) {
1438
+ return e.type === "AsConstExpression" || e.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const";
1439
+ }
1440
+ async function ao(e, t, r) {
1441
+ let { node: n } = r, s = "";
1442
+ for (let [p, c] of n.quasis.entries()) {
1443
+ let { raw: y } = c.value;
1444
+ p > 0 && (s += "@prettier-placeholder-" + (p - 1) + "-id"), s += y;
1445
+ }
1446
+ let i = await e(s, { parser: "scss" }), o = zt(r, t), u = Lc(i, o);
1447
+ if (!u) throw new Error("Couldn't insert all the expressions");
1448
+ return ["`", m([E, u]), f, "`"];
1449
+ }
1450
+ function Lc(e, t) {
1451
+ if (!R(t)) return e;
1452
+ let r = 0, n = ft(Qt(e), (s) => typeof s != "string" || !s.includes("@prettier-placeholder") ? s : s.split(/@prettier-placeholder-(\d+)-id/u).map((i, o) => o % 2 === 0 ? qe(i) : (r++, t[i])));
1453
+ return t.length === r ? n : null;
1454
+ }
1455
+ function Oc(e) {
1456
+ return e.match(void 0, (t, r) => r === "quasi" && t.type === "TaggedTemplateExpression" && Pt(t.tag, ["css", "css.global", "css.resolve"])) || e.match(void 0, (t, r) => r === "expression" && t.type === "JSXExpressionContainer", (t, r) => r === "children" && t.type === "JSXElement" && t.openingElement.name.type === "JSXIdentifier" && t.openingElement.name.name === "style" && t.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.type === "JSXIdentifier" && n.name.name === "jsx"));
1457
+ }
1458
+ function nn(e) {
1459
+ return e.type === "Identifier" && e.name === "styled";
1460
+ }
1461
+ function uo(e) {
1462
+ return /^[A-Z]/u.test(e.object.name) && e.property.name === "extend";
1463
+ }
1464
+ function wc({ parent: e }) {
1465
+ if (!e || e.type !== "TaggedTemplateExpression") return false;
1466
+ let t = e.tag.type === "ParenthesizedExpression" ? e.tag.expression : e.tag;
1467
+ switch (t.type) {
1468
+ case "MemberExpression":
1469
+ return nn(t.object) || uo(t);
1470
+ case "CallExpression":
1471
+ return nn(t.callee) || t.callee.type === "MemberExpression" && (t.callee.object.type === "MemberExpression" && (nn(t.callee.object.object) || uo(t.callee.object)) || t.callee.object.type === "CallExpression" && nn(t.callee.object.callee));
1472
+ case "Identifier":
1473
+ return t.name === "css";
1474
+ default:
1475
+ return false;
1476
+ }
1477
+ }
1478
+ function _c({ parent: e, grandparent: t }) {
1479
+ return t?.type === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
1480
+ }
1481
+ var po = (e) => Oc(e) || wc(e) || _c(e) || oo(e);
1482
+ async function co(e, t, r) {
1483
+ let { node: n } = r, s = n.quasis.length, i = zt(r, t), o = [];
1484
+ for (let u = 0; u < s; u++) {
1485
+ let p = n.quasis[u], c = u === 0, y = u === s - 1, D = p.value.cooked, F = D.split(`
1486
+ `), C = F.length, d = i[u], b = C > 2 && F[0].trim() === "" && F[1].trim() === "", B = C > 2 && F[C - 1].trim() === "" && F[C - 2].trim() === "", O = F.every((g) => /^\s*(?:#[^\n\r]*)?$/u.test(g));
1487
+ if (!y && /#[^\n\r]*$/u.test(F[C - 1])) return null;
1488
+ let h = null;
1489
+ O ? h = Mc(F) : h = await e(D, { parser: "graphql" }), h ? (h = tn(h, false), !c && b && o.push(""), o.push(h), !y && B && o.push("")) : !c && !y && b && o.push(""), d && o.push(d);
1490
+ }
1491
+ return ["`", m([E, L(E, o)]), E, "`"];
1492
+ }
1493
+ function Mc(e) {
1494
+ let t = [], r = false, n = e.map((s) => s.trim());
1495
+ for (let [s, i] of n.entries()) i !== "" && (n[s - 1] === "" && r ? t.push([E, i]) : t.push(i), r = true);
1496
+ return t.length === 0 ? null : L(E, t);
1497
+ }
1498
+ function lo({ node: e, parent: t }) {
1499
+ return rn({ node: e, parent: t }, "GraphQL") || t && (t.type === "TaggedTemplateExpression" && (t.tag.type === "MemberExpression" && t.tag.object.name === "graphql" && t.tag.property.name === "experimental" || t.tag.type === "Identifier" && (t.tag.name === "gql" || t.tag.name === "graphql")) || t.type === "CallExpression" && t.callee.type === "Identifier" && t.callee.name === "graphql");
1500
+ }
1501
+ var Es = 0;
1502
+ async function mo(e, t, r, n, s) {
1503
+ let { node: i } = n, o = Es;
1504
+ Es = Es + 1 >>> 0;
1505
+ let u = (O) => `PRETTIER_HTML_PLACEHOLDER_${O}_${o}_IN_JS`, p = i.quasis.map((O, h, g) => h === g.length - 1 ? O.value.cooked : O.value.cooked + u(h)).join(""), c = zt(n, r), y = new RegExp(u("(\\d+)"), "gu"), D = 0, F = await t(p, { parser: e, __onHtmlRoot(O) {
1506
+ D = O.children.length;
1507
+ } }), C = ft(F, (O) => {
1508
+ if (typeof O != "string") return O;
1509
+ let h = [], g = O.split(y);
1510
+ for (let S = 0; S < g.length; S++) {
1511
+ let j = g[S];
1512
+ if (S % 2 === 0) {
1513
+ j && (j = ms(j), s.__embeddedInHtml && (j = W(0, j, /<\/(?=script\b)/giu, "<\\/")), h.push(j));
1514
+ continue;
1515
+ }
1516
+ let U = Number(j);
1517
+ h.push(c[U]);
1518
+ }
1519
+ return h;
1520
+ }), d = /^\s/u.test(p) ? " " : "", b = /\s$/u.test(p) ? " " : "", B = s.htmlWhitespaceSensitivity === "ignore" ? E : d && b ? A : null;
1521
+ return B ? l(["`", m([B, l(C)]), B, "`"]) : pt({ hug: false }, l(["`", d, D > 1 ? m(l(C)) : l(C), b, "`"]));
1522
+ }
1523
+ function Do(e) {
1524
+ return rn(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi");
1525
+ }
1526
+ var fo = mo.bind(void 0, "html");
1527
+ var yo = mo.bind(void 0, "angular");
1528
+ async function Eo(e, t, r) {
1529
+ let { node: n } = r, s = W(0, n.quasis[0].value.raw, /((?:\\\\)*)\\`/gu, (p, c) => "\\".repeat(c.length / 2) + "`"), i = Nc(s), o = i !== "";
1530
+ o && (s = W(0, s, new RegExp(`^${i}`, "gmu"), ""));
1531
+ let u = tn(await e(s, { parser: "markdown", __inJsTemplate: true }), true);
1532
+ return ["`", o ? m([f, u]) : [$r, Qi(u)], f, "`"];
1533
+ }
1534
+ function Nc(e) {
1535
+ let t = e.match(/^([^\S\n]*)\S/mu);
1536
+ return t === null ? "" : t[1];
1537
+ }
1538
+ function Fo({ node: e, parent: t }) {
1539
+ return t?.type === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown");
1540
+ }
1541
+ var jc = [{ test: po, print: ao }, { test: lo, print: co }, { test: Do, print: fo }, { test: ys, print: yo }, { test: Fo, print: Eo }].map(({ test: e, print: t }) => ({ test: e, print: Rc(t) }));
1542
+ function vc(e) {
1543
+ let { node: t } = e;
1544
+ if (t.type !== "TemplateLiteral" || Jc(t)) return;
1545
+ let r = jc.find(({ test: n }) => n(e));
1546
+ if (r) return t.quasis.length === 1 && t.quasis[0].value.raw.trim() === "" ? "``" : r.print;
1547
+ }
1548
+ function Rc(e) {
1549
+ return async (...t) => {
1550
+ let r = await e(...t);
1551
+ return r && pt({ embed: true, ...r.label }, r);
1552
+ };
1553
+ }
1554
+ function Jc({ quasis: e }) {
1555
+ return e.some(({ value: { cooked: t } }) => t === null);
1556
+ }
1557
+ var Co = vc;
1558
+ var Gc = /\*\/$/;
1559
+ var Wc = /^\/\*\*?/;
1560
+ var go = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
1561
+ var qc = /(^|\s+)\/\/([^\n\r]*)/g;
1562
+ var Ao = /^(\r?\n)+/;
1563
+ var Uc = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g;
1564
+ var To = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g;
1565
+ var Yc = /(\r?\n|^) *\* ?/g;
1566
+ var ho = [];
1567
+ function So(e) {
1568
+ let t = e.match(go);
1569
+ return t ? t[0].trimStart() : "";
1570
+ }
1571
+ function Bo(e) {
1572
+ let r = e.match(go)?.[0];
1573
+ return r == null ? e : e.slice(r.length);
1574
+ }
1575
+ function bo(e) {
1576
+ e = W(0, e.replace(Wc, "").replace(Gc, ""), Yc, "$1");
1577
+ let r = "";
1578
+ for (; r !== e; ) r = e, e = W(0, e, Uc, `
1579
+ $1 $2
1580
+ `);
1581
+ e = e.replace(Ao, "").trimEnd();
1582
+ let n = /* @__PURE__ */ Object.create(null), s = W(0, e, To, "").replace(Ao, "").trimEnd(), i;
1583
+ for (; i = To.exec(e); ) {
1584
+ let o = W(0, i[2], qc, "");
1585
+ if (typeof n[i[1]] == "string" || Array.isArray(n[i[1]])) {
1586
+ let u = n[i[1]];
1587
+ n[i[1]] = [...ho, ...Array.isArray(u) ? u : [u], o];
1588
+ } else n[i[1]] = o;
1589
+ }
1590
+ return { comments: s, pragmas: n };
1591
+ }
1592
+ function Po({ comments: e = "", pragmas: t = {} }) {
1593
+ let o = Object.keys(t), u = o.flatMap((c) => xo(c, t[c])).map((c) => ` * ${c}
1594
+ `).join("");
1595
+ if (!e) {
1596
+ if (o.length === 0) return "";
1597
+ if (o.length === 1 && !Array.isArray(t[o[0]])) {
1598
+ let c = t[o[0]];
1599
+ return `/** ${xo(o[0], c)[0]} */`;
1600
+ }
1601
+ }
1602
+ let p = e.split(`
1603
+ `).map((c) => ` * ${c}`).join(`
1604
+ `) + `
1605
+ `;
1606
+ return `/**
1607
+ ` + (e ? p : "") + (e && o.length > 0 ? ` *
1608
+ ` : "") + u + " */";
1609
+ }
1610
+ function xo(e, t) {
1611
+ return [...ho, ...Array.isArray(t) ? t : [t]].map((r) => `@${e} ${r}`.trim());
1612
+ }
1613
+ var ko = "format";
1614
+ function Hc(e) {
1615
+ if (!e.startsWith("#!")) return "";
1616
+ let t = e.indexOf(`
1617
+ `);
1618
+ return t === -1 ? e : e.slice(0, t);
1619
+ }
1620
+ var Io = Hc;
1621
+ function Xc(e) {
1622
+ let t = Io(e);
1623
+ t && (e = e.slice(t.length + 1));
1624
+ let r = So(e), { pragmas: n, comments: s } = bo(r);
1625
+ return { shebang: t, text: e, pragmas: n, comments: s };
1626
+ }
1627
+ function Lo(e) {
1628
+ let { shebang: t, text: r, pragmas: n, comments: s } = Xc(e), i = Bo(r), o = Po({ pragmas: { [ko]: "", ...n }, comments: s.trimStart() });
1629
+ return (t ? `${t}
1630
+ ` : "") + o + (i.startsWith(`
1631
+ `) ? `
1632
+ ` : `
1633
+
1634
+ `) + i;
1635
+ }
1636
+ function Vc(e) {
1637
+ if (!ce(e)) return false;
1638
+ let t = `*${e.value}*`.split(`
1639
+ `);
1640
+ return t.length > 1 && t.every((r) => r.trimStart()[0] === "*");
1641
+ }
1642
+ var Fs = /* @__PURE__ */ new WeakMap();
1643
+ function $c(e) {
1644
+ return Fs.has(e) || Fs.set(e, Vc(e)), Fs.get(e);
1645
+ }
1646
+ var Oo = $c;
1647
+ function wo(e, t) {
1648
+ let r = e.node;
1649
+ if (At(r)) return t.originalText.slice(w(r), I(r)).trimEnd();
1650
+ if (Oo(r)) return Kc(r);
1651
+ if (ce(r)) return ["/*", qe(r.value), "*/"];
1652
+ throw new Error("Not a comment: " + JSON.stringify(r));
1653
+ }
1654
+ function Kc(e) {
1655
+ let t = e.value.split(`
1656
+ `);
1657
+ return ["/*", L(E, t.map((r, n) => n === 0 ? r.trimEnd() : " " + (n < t.length - 1 ? r.trim() : r.trimStart()))), "*/"];
1658
+ }
1659
+ function ds(e, t) {
1660
+ if (e.isRoot) return false;
1661
+ let { node: r, key: n, parent: s } = e;
1662
+ if (t.__isInHtmlInterpolation && !t.bracketSpacing && el(r) && xr(e)) return true;
1663
+ if (Qc(r)) return false;
1664
+ if (r.type === "Identifier") {
1665
+ if (r.extra?.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name) || n === "left" && (r.name === "async" && !s.await || r.name === "let") && s.type === "ForOfStatement") return true;
1666
+ if (r.name === "let") {
1667
+ let i = e.findAncestor((o) => o.type === "ForOfStatement")?.left;
1668
+ if (i && ye(i, (o) => o === r)) return true;
1669
+ }
1670
+ if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) {
1671
+ let i = e.findAncestor((u) => u.type === "ExpressionStatement" || u.type === "ForStatement" || u.type === "ForInStatement"), o = i ? i.type === "ExpressionStatement" ? i.expression : i.type === "ForStatement" ? i.init : i.left : void 0;
1672
+ if (o && ye(o, (u) => u === r)) return true;
1673
+ }
1674
+ if (n === "expression") switch (r.name) {
1675
+ case "await":
1676
+ case "interface":
1677
+ case "module":
1678
+ case "using":
1679
+ case "yield":
1680
+ case "let":
1681
+ case "component":
1682
+ case "hook":
1683
+ case "type": {
1684
+ let i = e.findAncestor((o) => !Ae(o));
1685
+ if (i !== s && i.type === "ExpressionStatement") return true;
1686
+ }
1687
+ }
1688
+ return false;
1689
+ }
1690
+ if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") {
1691
+ let i = e.findAncestor((o) => o.type === "ExpressionStatement")?.expression;
1692
+ if (i && ye(i, (o) => o === r)) return true;
1693
+ }
1694
+ if (r.type === "ObjectExpression") {
1695
+ let i = e.findAncestor((o) => o.type === "ArrowFunctionExpression")?.body;
1696
+ if (i && i.type !== "SequenceExpression" && i.type !== "AssignmentExpression" && ye(i, (o) => o === r)) return true;
1697
+ }
1698
+ switch (s.type) {
1699
+ case "ParenthesizedExpression":
1700
+ return false;
1701
+ case "ClassDeclaration":
1702
+ case "ClassExpression":
1703
+ if (n === "superClass" && (r.type === "ArrowFunctionExpression" || r.type === "AssignmentExpression" || r.type === "AwaitExpression" || r.type === "BinaryExpression" || r.type === "ConditionalExpression" || r.type === "LogicalExpression" || r.type === "NewExpression" || r.type === "ObjectExpression" || r.type === "SequenceExpression" || r.type === "TaggedTemplateExpression" || r.type === "UnaryExpression" || r.type === "UpdateExpression" || r.type === "YieldExpression" || r.type === "TSNonNullExpression" || r.type === "ClassExpression" && R(r.decorators))) return true;
1704
+ break;
1705
+ case "ExportDefaultDeclaration":
1706
+ return _o(e, t) || r.type === "SequenceExpression";
1707
+ case "Decorator":
1708
+ if (n === "expression" && !rl(r)) return true;
1709
+ break;
1710
+ case "TypeAnnotation":
1711
+ if (e.match(void 0, void 0, (i, o) => o === "returnType" && i.type === "ArrowFunctionExpression") && Zc(r)) return true;
1712
+ break;
1713
+ case "BinaryExpression":
1714
+ if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return true;
1715
+ break;
1716
+ case "VariableDeclarator":
1717
+ if (n === "init" && e.match(void 0, void 0, (i, o) => o === "declarations" && i.type === "VariableDeclaration", (i, o) => o === "left" && i.type === "ForInStatement")) return true;
1718
+ break;
1719
+ }
1720
+ switch (r.type) {
1721
+ case "UpdateExpression":
1722
+ if (s.type === "UnaryExpression") return r.prefix && (r.operator === "++" && s.operator === "+" || r.operator === "--" && s.operator === "-");
1723
+ case "UnaryExpression":
1724
+ switch (s.type) {
1725
+ case "UnaryExpression":
1726
+ return r.operator === s.operator && (r.operator === "+" || r.operator === "-");
1727
+ case "BindExpression":
1728
+ return true;
1729
+ case "MemberExpression":
1730
+ case "OptionalMemberExpression":
1731
+ return n === "object";
1732
+ case "TaggedTemplateExpression":
1733
+ return true;
1734
+ case "NewExpression":
1735
+ case "CallExpression":
1736
+ case "OptionalCallExpression":
1737
+ return n === "callee";
1738
+ case "BinaryExpression":
1739
+ return n === "left" && s.operator === "**";
1740
+ case "TSNonNullExpression":
1741
+ return true;
1742
+ default:
1743
+ return false;
1744
+ }
1745
+ case "BinaryExpression":
1746
+ if (s.type === "UpdateExpression" || r.operator === "in" && zc(e)) return true;
1747
+ if (r.operator === "|>" && r.extra?.parenthesized) {
1748
+ let i = e.grandparent;
1749
+ if (i.type === "BinaryExpression" && i.operator === "|>") return true;
1750
+ }
1751
+ case "TSTypeAssertion":
1752
+ case "TSAsExpression":
1753
+ case "TSSatisfiesExpression":
1754
+ case "AsExpression":
1755
+ case "AsConstExpression":
1756
+ case "SatisfiesExpression":
1757
+ case "LogicalExpression":
1758
+ switch (s.type) {
1759
+ case "TSAsExpression":
1760
+ case "TSSatisfiesExpression":
1761
+ case "AsExpression":
1762
+ case "AsConstExpression":
1763
+ case "SatisfiesExpression":
1764
+ return !Ae(r);
1765
+ case "ConditionalExpression":
1766
+ return Ae(r) || fi(r);
1767
+ case "CallExpression":
1768
+ case "NewExpression":
1769
+ case "OptionalCallExpression":
1770
+ return n === "callee";
1771
+ case "ClassExpression":
1772
+ case "ClassDeclaration":
1773
+ return n === "superClass";
1774
+ case "TSTypeAssertion":
1775
+ case "TaggedTemplateExpression":
1776
+ case "UnaryExpression":
1777
+ case "JSXSpreadAttribute":
1778
+ case "SpreadElement":
1779
+ case "BindExpression":
1780
+ case "AwaitExpression":
1781
+ case "TSNonNullExpression":
1782
+ case "UpdateExpression":
1783
+ return true;
1784
+ case "MemberExpression":
1785
+ case "OptionalMemberExpression":
1786
+ return n === "object";
1787
+ case "AssignmentExpression":
1788
+ case "AssignmentPattern":
1789
+ return n === "left" && (r.type === "TSTypeAssertion" || Ae(r));
1790
+ case "LogicalExpression":
1791
+ if (r.type === "LogicalExpression") return s.operator !== r.operator;
1792
+ case "BinaryExpression": {
1793
+ let { operator: i, type: o } = r;
1794
+ if (!i && o !== "TSTypeAssertion") return true;
1795
+ let u = yr(i), p = s.operator, c = yr(p);
1796
+ return !!(c > u || n === "right" && c === u || c === u && !dr(p, i) || c < u && i === "%" && (p === "+" || p === "-") || Ai(p));
1797
+ }
1798
+ default:
1799
+ return false;
1800
+ }
1801
+ case "SequenceExpression":
1802
+ return s.type !== "ForStatement";
1803
+ case "YieldExpression":
1804
+ if (s.type === "AwaitExpression" || s.type === "TSTypeAssertion") return true;
1805
+ case "AwaitExpression":
1806
+ switch (s.type) {
1807
+ case "TaggedTemplateExpression":
1808
+ case "UnaryExpression":
1809
+ case "LogicalExpression":
1810
+ case "SpreadElement":
1811
+ case "TSAsExpression":
1812
+ case "TSSatisfiesExpression":
1813
+ case "TSNonNullExpression":
1814
+ case "AsExpression":
1815
+ case "AsConstExpression":
1816
+ case "SatisfiesExpression":
1817
+ case "BindExpression":
1818
+ return true;
1819
+ case "MemberExpression":
1820
+ case "OptionalMemberExpression":
1821
+ return n === "object";
1822
+ case "NewExpression":
1823
+ case "CallExpression":
1824
+ case "OptionalCallExpression":
1825
+ return n === "callee";
1826
+ case "ConditionalExpression":
1827
+ return n === "test";
1828
+ case "BinaryExpression":
1829
+ return !(!r.argument && s.operator === "|>");
1830
+ default:
1831
+ return false;
1832
+ }
1833
+ case "TSFunctionType":
1834
+ if (e.match((i) => i.type === "TSFunctionType", (i, o) => o === "typeAnnotation" && i.type === "TSTypeAnnotation", (i, o) => o === "returnType" && i.type === "ArrowFunctionExpression")) return true;
1835
+ case "TSConditionalType":
1836
+ case "TSConstructorType":
1837
+ case "ConditionalTypeAnnotation":
1838
+ if (n === "extendsType" && Ue(r) && s.type === r.type || n === "checkType" && Ue(s)) return true;
1839
+ if (n === "extendsType" && s.type === "TSConditionalType") {
1840
+ let { typeAnnotation: i } = r.returnType || r.typeAnnotation;
1841
+ if (i.type === "TSTypePredicate" && i.typeAnnotation && (i = i.typeAnnotation.typeAnnotation), i.type === "TSInferType" && i.typeParameter.constraint) return true;
1842
+ }
1843
+ case "TSUnionType":
1844
+ case "TSIntersectionType":
1845
+ if (Se(s) || xt(s)) return true;
1846
+ case "TSInferType":
1847
+ if (r.type === "TSInferType") {
1848
+ if (s.type === "TSRestType") return false;
1849
+ if (n === "types" && (s.type === "TSUnionType" || s.type === "TSIntersectionType") && r.typeParameter.type === "TSTypeParameter" && r.typeParameter.constraint) return true;
1850
+ }
1851
+ case "TSTypeOperator":
1852
+ return s.type === "TSArrayType" || s.type === "TSOptionalType" || s.type === "TSRestType" || n === "objectType" && s.type === "TSIndexedAccessType" || s.type === "TSTypeOperator" || s.type === "TSTypeAnnotation" && e.grandparent.type.startsWith("TSJSDoc");
1853
+ case "TSTypeQuery":
1854
+ return n === "objectType" && s.type === "TSIndexedAccessType" || n === "elementType" && s.type === "TSArrayType";
1855
+ case "TypeOperator":
1856
+ return s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || s.type === "TypeOperator";
1857
+ case "TypeofTypeAnnotation":
1858
+ return n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || n === "elementType" && s.type === "ArrayTypeAnnotation";
1859
+ case "ArrayTypeAnnotation":
1860
+ return s.type === "NullableTypeAnnotation";
1861
+ case "IntersectionTypeAnnotation":
1862
+ case "UnionTypeAnnotation":
1863
+ return s.type === "TypeOperator" || s.type === "KeyofTypeAnnotation" || s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || s.type === "IntersectionTypeAnnotation" || s.type === "UnionTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1864
+ case "InferTypeAnnotation":
1865
+ case "NullableTypeAnnotation":
1866
+ return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1867
+ case "ComponentTypeAnnotation":
1868
+ case "FunctionTypeAnnotation": {
1869
+ if (r.type === "ComponentTypeAnnotation" && (r.rendersType === null || r.rendersType === void 0)) return false;
1870
+ if (e.match(void 0, (o, u) => u === "typeAnnotation" && o.type === "TypeAnnotation", (o, u) => u === "returnType" && o.type === "ArrowFunctionExpression") || e.match(void 0, (o, u) => u === "typeAnnotation" && o.type === "TypePredicate", (o, u) => u === "typeAnnotation" && o.type === "TypeAnnotation", (o, u) => u === "returnType" && o.type === "ArrowFunctionExpression")) return true;
1871
+ let i = s.type === "NullableTypeAnnotation" ? e.grandparent : s;
1872
+ return i.type === "UnionTypeAnnotation" || i.type === "IntersectionTypeAnnotation" || i.type === "ArrayTypeAnnotation" || n === "objectType" && (i.type === "IndexedAccessType" || i.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && r.returnType?.type === "InferTypeAnnotation" && r.returnType?.typeParameter.bound || i.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && K(r).some((o) => o.typeAnnotation?.type === "NullableTypeAnnotation");
1873
+ }
1874
+ case "OptionalIndexedAccessType":
1875
+ return n === "objectType" && s.type === "IndexedAccessType";
1876
+ case "StringLiteral":
1877
+ case "NumericLiteral":
1878
+ case "Literal":
1879
+ if (typeof r.value == "string" && s.type === "ExpressionStatement" && typeof s.directive != "string") {
1880
+ let i = e.grandparent;
1881
+ return i.type === "Program" || i.type === "BlockStatement";
1882
+ }
1883
+ return n === "object" && J(s) && Ce(r);
1884
+ case "AssignmentExpression":
1885
+ return !((n === "init" || n === "update") && s.type === "ForStatement" || n === "expression" && r.left.type !== "ObjectPattern" && s.type === "ExpressionStatement" || n === "key" && s.type === "TSPropertySignature" || s.type === "AssignmentExpression" || n === "expressions" && s.type === "SequenceExpression" && e.match(void 0, void 0, (i, o) => (o === "init" || o === "update") && i.type === "ForStatement") || n === "value" && s.type === "Property" && e.match(void 0, void 0, (i, o) => o === "properties" && i.type === "ObjectPattern") || s.type === "NGChainedExpression" || n === "node" && s.type === "JsExpressionRoot");
1886
+ case "ConditionalExpression":
1887
+ switch (s.type) {
1888
+ case "TaggedTemplateExpression":
1889
+ case "UnaryExpression":
1890
+ case "SpreadElement":
1891
+ case "BinaryExpression":
1892
+ case "LogicalExpression":
1893
+ case "NGPipeExpression":
1894
+ case "ExportDefaultDeclaration":
1895
+ case "AwaitExpression":
1896
+ case "JSXSpreadAttribute":
1897
+ case "TSTypeAssertion":
1898
+ case "TypeCastExpression":
1899
+ case "TSAsExpression":
1900
+ case "TSSatisfiesExpression":
1901
+ case "AsExpression":
1902
+ case "AsConstExpression":
1903
+ case "SatisfiesExpression":
1904
+ case "TSNonNullExpression":
1905
+ return true;
1906
+ case "NewExpression":
1907
+ case "CallExpression":
1908
+ case "OptionalCallExpression":
1909
+ return n === "callee";
1910
+ case "ConditionalExpression":
1911
+ return t.experimentalTernaries ? false : n === "test";
1912
+ case "MemberExpression":
1913
+ case "OptionalMemberExpression":
1914
+ return n === "object";
1915
+ default:
1916
+ return false;
1917
+ }
1918
+ case "FunctionExpression":
1919
+ switch (s.type) {
1920
+ case "NewExpression":
1921
+ case "CallExpression":
1922
+ case "OptionalCallExpression":
1923
+ return n === "callee";
1924
+ case "TaggedTemplateExpression":
1925
+ return true;
1926
+ default:
1927
+ return false;
1928
+ }
1929
+ case "ArrowFunctionExpression":
1930
+ switch (s.type) {
1931
+ case "BinaryExpression":
1932
+ return s.operator !== "|>" || r.extra?.parenthesized;
1933
+ case "NewExpression":
1934
+ case "CallExpression":
1935
+ case "OptionalCallExpression":
1936
+ return n === "callee";
1937
+ case "MemberExpression":
1938
+ case "OptionalMemberExpression":
1939
+ return n === "object";
1940
+ case "TSAsExpression":
1941
+ case "TSSatisfiesExpression":
1942
+ case "AsExpression":
1943
+ case "AsConstExpression":
1944
+ case "SatisfiesExpression":
1945
+ case "TSNonNullExpression":
1946
+ case "BindExpression":
1947
+ case "TaggedTemplateExpression":
1948
+ case "UnaryExpression":
1949
+ case "LogicalExpression":
1950
+ case "AwaitExpression":
1951
+ case "TSTypeAssertion":
1952
+ case "MatchExpressionCase":
1953
+ return true;
1954
+ case "TSInstantiationExpression":
1955
+ return n === "expression";
1956
+ case "ConditionalExpression":
1957
+ return n === "test";
1958
+ default:
1959
+ return false;
1960
+ }
1961
+ case "ClassExpression":
1962
+ switch (s.type) {
1963
+ case "NewExpression":
1964
+ return n === "callee";
1965
+ default:
1966
+ return false;
1967
+ }
1968
+ case "OptionalMemberExpression":
1969
+ case "OptionalCallExpression":
1970
+ case "CallExpression":
1971
+ case "MemberExpression":
1972
+ if (tl(e)) return true;
1973
+ case "TaggedTemplateExpression":
1974
+ case "TSNonNullExpression":
1975
+ if (n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression")) {
1976
+ let i = r;
1977
+ for (; i; ) switch (i.type) {
1978
+ case "CallExpression":
1979
+ case "OptionalCallExpression":
1980
+ return true;
1981
+ case "MemberExpression":
1982
+ case "OptionalMemberExpression":
1983
+ case "BindExpression":
1984
+ i = i.object;
1985
+ break;
1986
+ case "TaggedTemplateExpression":
1987
+ i = i.tag;
1988
+ break;
1989
+ case "TSNonNullExpression":
1990
+ i = i.expression;
1991
+ break;
1992
+ default:
1993
+ return false;
1994
+ }
1995
+ }
1996
+ return false;
1997
+ case "BindExpression":
1998
+ return n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression") || n === "object" && J(s);
1999
+ case "NGPipeExpression":
2000
+ return !(s.type === "NGRoot" || s.type === "NGMicrosyntaxExpression" || s.type === "ObjectProperty" && !r.extra?.parenthesized || q(s) || n === "arguments" && M(s) || n === "right" && s.type === "NGPipeExpression" || n === "property" && s.type === "MemberExpression" || s.type === "AssignmentExpression");
2001
+ case "JSXFragment":
2002
+ case "JSXElement":
2003
+ return n === "callee" || n === "left" && s.type === "BinaryExpression" && s.operator === "<" || !q(s) && s.type !== "ArrowFunctionExpression" && s.type !== "AssignmentExpression" && s.type !== "AssignmentPattern" && s.type !== "BinaryExpression" && s.type !== "NewExpression" && s.type !== "ConditionalExpression" && s.type !== "ExpressionStatement" && s.type !== "JsExpressionRoot" && s.type !== "JSXAttribute" && s.type !== "JSXElement" && s.type !== "JSXExpressionContainer" && s.type !== "JSXFragment" && s.type !== "LogicalExpression" && !M(s) && !Oe(s) && s.type !== "ReturnStatement" && s.type !== "ThrowStatement" && s.type !== "TypeCastExpression" && s.type !== "VariableDeclarator" && s.type !== "YieldExpression" && s.type !== "MatchExpressionCase";
2004
+ case "TSInstantiationExpression":
2005
+ return n === "object" && J(s);
2006
+ case "MatchOrPattern":
2007
+ return s.type === "MatchAsPattern";
2008
+ }
2009
+ return false;
2010
+ }
2011
+ var Qc = k(["BlockStatement", "BreakStatement", "ComponentDeclaration", "ClassBody", "ClassDeclaration", "ClassMethod", "ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ContinueStatement", "DebuggerStatement", "DeclareComponent", "DeclareClass", "DeclareExportAllDeclaration", "DeclareExportDeclaration", "DeclareFunction", "DeclareHook", "DeclareInterface", "DeclareModule", "DeclareModuleExports", "DeclareNamespace", "DeclareVariable", "DeclareEnum", "DoWhileStatement", "EnumDeclaration", "ExportAllDeclaration", "ExportDefaultDeclaration", "ExportNamedDeclaration", "ExpressionStatement", "ForInStatement", "ForOfStatement", "ForStatement", "FunctionDeclaration", "HookDeclaration", "IfStatement", "ImportDeclaration", "InterfaceDeclaration", "LabeledStatement", "MethodDefinition", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "TSDeclareFunction", "TSEnumDeclaration", "TSImportEqualsDeclaration", "TSInterfaceDeclaration", "TSModuleDeclaration", "TSNamespaceExportDeclaration", "TypeAlias", "VariableDeclaration", "WhileStatement", "WithStatement"]);
2012
+ function zc(e) {
2013
+ let t = 0, { node: r } = e;
2014
+ for (; r; ) {
2015
+ let n = e.getParentNode(t++);
2016
+ if (n?.type === "ForStatement" && n.init === r) return true;
2017
+ r = n;
2018
+ }
2019
+ return false;
2020
+ }
2021
+ function Zc(e) {
2022
+ return Er(e, (t) => t.type === "ObjectTypeAnnotation" && Er(t, (r) => r.type === "FunctionTypeAnnotation"));
2023
+ }
2024
+ function el(e) {
2025
+ return se(e);
2026
+ }
2027
+ function xr(e) {
2028
+ let { parent: t, key: r } = e;
2029
+ switch (t.type) {
2030
+ case "NGPipeExpression":
2031
+ if (r === "arguments" && e.isLast) return e.callParent(xr);
2032
+ break;
2033
+ case "ObjectProperty":
2034
+ if (r === "value") return e.callParent(() => e.key === "properties" && e.isLast);
2035
+ break;
2036
+ case "BinaryExpression":
2037
+ case "LogicalExpression":
2038
+ if (r === "right") return e.callParent(xr);
2039
+ break;
2040
+ case "ConditionalExpression":
2041
+ if (r === "alternate") return e.callParent(xr);
2042
+ break;
2043
+ case "UnaryExpression":
2044
+ if (t.prefix) return e.callParent(xr);
2045
+ break;
2046
+ }
2047
+ return false;
2048
+ }
2049
+ function _o(e, t) {
2050
+ let { node: r, parent: n } = e;
2051
+ return r.type === "FunctionExpression" || r.type === "ClassExpression" ? n.type === "ExportDefaultDeclaration" || !ds(e, t) : !Xt(r) || n.type !== "ExportDefaultDeclaration" && ds(e, t) ? false : e.call(() => _o(e, t), ...Rr(r));
2052
+ }
2053
+ function tl(e) {
2054
+ return !!(e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && (t.type === "CallExpression" || t.type === "NewExpression")) || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression") || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "ChainExpression") && (e.match(void 0, void 0, (t, r) => r === "callee" && (t.type === "CallExpression" && !t.optional || t.type === "NewExpression") || r === "object" && t.type === "MemberExpression" && !t.optional) || e.match(void 0, void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression")) || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression"));
2055
+ }
2056
+ function Cs(e) {
2057
+ return e.type === "Identifier" ? true : J(e) ? !e.computed && !e.optional && e.property.type === "Identifier" && Cs(e.object) : false;
2058
+ }
2059
+ function rl(e) {
2060
+ return e.type === "ChainExpression" && (e = e.expression), Cs(e) || M(e) && !e.optional && Cs(e.callee);
2061
+ }
2062
+ var ge = ds;
2063
+ function nl(e, t) {
2064
+ let r = t - 1;
2065
+ r = ze(e, r, { backwards: true }), r = Ze(e, r, { backwards: true }), r = ze(e, r, { backwards: true });
2066
+ let n = Ze(e, r, { backwards: true });
2067
+ return r !== n;
2068
+ }
2069
+ var Mo = nl;
2070
+ var sl = () => true;
2071
+ function As(e, t) {
2072
+ let r = e.node;
2073
+ return r.printed = true, t.printer.printComment(e, t);
2074
+ }
2075
+ function il(e, t) {
2076
+ let r = e.node, n = [As(e, t)], { printer: s, originalText: i, locStart: o, locEnd: u } = t;
2077
+ if (s.isBlockComment?.(r)) {
2078
+ let y = Z(i, u(r)) ? Z(i, o(r), { backwards: true }) ? E : A : " ";
2079
+ n.push(y);
2080
+ } else n.push(E);
2081
+ let c = Ze(i, ze(i, u(r)));
2082
+ return c !== false && Z(i, c) && n.push(E), n;
2083
+ }
2084
+ function ol(e, t, r) {
2085
+ let n = e.node, s = As(e, t), { printer: i, originalText: o, locStart: u } = t, p = i.isBlockComment?.(n);
2086
+ if (r?.hasLineSuffix && !r?.isBlock || Z(o, u(n), { backwards: true })) {
2087
+ let c = Mo(o, u(n));
2088
+ return { doc: us([E, c ? E : "", s]), isBlock: p, hasLineSuffix: true };
2089
+ }
2090
+ return !p || r?.hasLineSuffix ? { doc: [us([" ", s]), ke], isBlock: p, hasLineSuffix: true } : { doc: [" ", s], isBlock: p, hasLineSuffix: false };
2091
+ }
2092
+ function v(e, t, r = {}) {
2093
+ let { node: n } = e;
2094
+ if (!R(n?.comments)) return "";
2095
+ let { indent: s = false, marker: i, filter: o = sl } = r, u = [];
2096
+ if (e.each(({ node: c }) => {
2097
+ c.leading || c.trailing || c.marker !== i || !o(c) || u.push(As(e, t));
2098
+ }, "comments"), u.length === 0) return "";
2099
+ let p = L(E, u);
2100
+ return s ? m([E, p]) : p;
2101
+ }
2102
+ function Mt(e, t) {
2103
+ let r = e.node;
2104
+ if (!r) return {};
2105
+ let n = t[/* @__PURE__ */ Symbol.for("printedComments")];
2106
+ if ((r.comments || []).filter((p) => !n.has(p)).length === 0) return { leading: "", trailing: "" };
2107
+ let i = [], o = [], u;
2108
+ return e.each(() => {
2109
+ let p = e.node;
2110
+ if (n?.has(p)) return;
2111
+ let { leading: c, trailing: y } = p;
2112
+ c ? i.push(il(e, t)) : y && (u = ol(e, t, u), o.push(u.doc));
2113
+ }, "comments"), { leading: i, trailing: o };
2114
+ }
2115
+ function De(e, t, r) {
2116
+ let { leading: n, trailing: s } = Mt(e, r);
2117
+ return !n && !s ? t : Ar(t, (i) => [n, i, s]);
2118
+ }
2119
+ var Et = class extends Error {
2120
+ name = "ArgExpansionBailout";
2121
+ };
2122
+ function Ke(e, t, r, n, s) {
2123
+ let i = e.node, o = K(i), u = s && i.typeParameters ? r("typeParameters") : "";
2124
+ if (o.length === 0) return [u, "(", v(e, t, { filter: (d) => _e(t.originalText, I(d)) === ")" }), ")"];
2125
+ let { parent: p } = e, c = It(p), y = No(i), D = [];
2126
+ if (xi(e, (d, b) => {
2127
+ let B = b === o.length - 1;
2128
+ B && i.rest && D.push("..."), D.push(r()), !B && (D.push(","), c || y ? D.push(" ") : oe(o[b], t) ? D.push(E, E) : D.push(A));
2129
+ }), n && !al(e)) {
2130
+ if (ne(u) || ne(D)) throw new Et();
2131
+ return l([_t(u), "(", _t(D), ")"]);
2132
+ }
2133
+ let F = o.every((d) => !R(d.decorators));
2134
+ return y && F ? [u, "(", ...D, ")"] : c ? [u, "(", ...D, ")"] : (Gr(p) || Ei(p) || p.type === "TypeAlias" || p.type === "UnionTypeAnnotation" || p.type === "IntersectionTypeAnnotation" || p.type === "FunctionTypeAnnotation" && p.returnType === i) && o.length === 1 && o[0].name === null && i.this !== o[0] && o[0].typeAnnotation && i.typeParameters === null && Vt(o[0].typeAnnotation) && !i.rest ? t.arrowParens === "always" || i.type === "HookTypeAnnotation" ? ["(", ...D, ")"] : D : [u, "(", m([f, ...D]), P(!Ti(i) && ie(t, "all") ? "," : ""), f, ")"];
2135
+ }
2136
+ function No(e) {
2137
+ if (!e) return false;
2138
+ let t = K(e);
2139
+ if (t.length !== 1) return false;
2140
+ let [r] = t;
2141
+ return !T(r) && (r.type === "ObjectPattern" || r.type === "ArrayPattern" || r.type === "Identifier" && r.typeAnnotation && (r.typeAnnotation.type === "TypeAnnotation" || r.typeAnnotation.type === "TSTypeAnnotation") && Je(r.typeAnnotation.typeAnnotation) || r.type === "FunctionTypeParam" && Je(r.typeAnnotation) && r !== e.rest || r.type === "AssignmentPattern" && (r.left.type === "ObjectPattern" || r.left.type === "ArrayPattern") && (r.right.type === "Identifier" || se(r.right) && r.right.properties.length === 0 || q(r.right) && r.right.elements.length === 0));
2142
+ }
2143
+ function ul(e) {
2144
+ let t;
2145
+ return e.returnType ? (t = e.returnType, t.typeAnnotation && (t = t.typeAnnotation)) : e.typeAnnotation && (t = e.typeAnnotation), t;
2146
+ }
2147
+ function lt(e, t) {
2148
+ let r = ul(e);
2149
+ if (!r) return false;
2150
+ let n = e.typeParameters?.params;
2151
+ if (n) {
2152
+ if (n.length > 1) return false;
2153
+ if (n.length === 1) {
2154
+ let s = n[0];
2155
+ if (s.constraint || s.default) return false;
2156
+ }
2157
+ }
2158
+ return K(e).length === 1 && (Je(r) || ne(t));
2159
+ }
2160
+ function al(e) {
2161
+ return e.match((t) => t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement", (t, r) => {
2162
+ if (t.type === "CallExpression" && r === "arguments" && t.arguments.length === 1 && t.callee.type === "CallExpression") {
2163
+ let n = t.callee.callee;
2164
+ return n.type === "Identifier" || n.type === "MemberExpression" && !n.computed && n.object.type === "Identifier" && n.property.type === "Identifier";
2165
+ }
2166
+ return false;
2167
+ }, (t, r) => t.type === "VariableDeclarator" && r === "init" || t.type === "ExportDefaultDeclaration" && r === "declaration" || t.type === "TSExportAssignment" && r === "expression" || t.type === "AssignmentExpression" && r === "right" && t.left.type === "MemberExpression" && t.left.object.type === "Identifier" && t.left.object.name === "module" && t.left.property.type === "Identifier" && t.left.property.name === "exports", (t) => t.type !== "VariableDeclaration" || t.kind === "const" && t.declarations.length === 1);
2168
+ }
2169
+ function jo(e) {
2170
+ let t = K(e);
2171
+ return t.length > 1 && t.some((r) => r.type === "TSParameterProperty");
2172
+ }
2173
+ function Nt(e, t) {
2174
+ return (t === "params" || t === "this" || t === "rest") && No(e);
2175
+ }
2176
+ function X(e) {
2177
+ let { node: t } = e;
2178
+ return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : M(t) || J(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?";
2179
+ }
2180
+ function sn(e) {
2181
+ return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : "";
2182
+ }
2183
+ var pl = k(["DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "DeclareVariable", "DeclareExportDeclaration", "DeclareExportAllDeclaration", "DeclareOpaqueType", "DeclareTypeAlias", "DeclareEnum", "DeclareInterface"]);
2184
+ function Q(e) {
2185
+ let { node: t } = e;
2186
+ return t.declare || pl(t) && e.parent.type !== "DeclareExportDeclaration" ? "declare " : "";
2187
+ }
2188
+ var cl = k(["TSAbstractMethodDefinition", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
2189
+ function Zt({ node: e }) {
2190
+ return e.abstract || cl(e) ? "abstract " : "";
2191
+ }
2192
+ function Ft(e, t, r) {
2193
+ return e.type === "EmptyStatement" ? T(e, x.Leading) ? [" ", t] : t : e.type === "BlockStatement" || r ? [" ", t] : m([A, t]);
2194
+ }
2195
+ function jt(e) {
2196
+ return e.accessibility ? e.accessibility + " " : "";
2197
+ }
2198
+ var ll = /^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/;
2199
+ var ml = (e) => ll.test(e);
2200
+ var vo = ml;
2201
+ function Dl(e) {
2202
+ return e.length === 1 ? e : e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u, "$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u, "$1").replace(/^([+-])?\./u, "$10.").replace(/(\.\d+?)0+(?=e|$)/u, "$1").replace(/\.(?=e|$)/u, "");
2203
+ }
2204
+ var dt = Dl;
2205
+ var fl = 0;
2206
+ function on(e, t, r) {
2207
+ let { node: n, parent: s, grandparent: i, key: o } = e, u = o !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), p = n.operator === "|>" && e.root.extra?.__isUsingHackPipeline, c = Ts(e, t, r, false, u);
2208
+ if (u) return c;
2209
+ if (p) return l(c);
2210
+ if (o === "callee" && (M(s) || s.type === "NewExpression") || s.type === "UnaryExpression" || J(s) && !s.computed) return l([m([f, ...c]), f]);
2211
+ let y = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && i.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && i.type === "NGMicrosyntax" && i.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && i.type !== "ReturnStatement" && i.type !== "ThrowStatement" && !M(i) && i.type !== "NewExpression" || s.type === "TemplateLiteral" || El(e), D = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Oe(s), F = Te(n.left) && dr(n.operator, n.left.operator);
2212
+ if (y || er(n) && !F || !er(n) && D) return l(c);
2213
+ if (c.length === 0) return "";
2214
+ let C = H(n.right), d = c.findIndex((S) => typeof S != "string" && !Array.isArray(S) && S.type === Fe), b = c.slice(0, d === -1 ? 1 : d + 1), B = c.slice(b.length, C ? -1 : void 0), O = /* @__PURE__ */ Symbol("logicalChain-" + ++fl), h = l([...b, m(B)], { id: O });
2215
+ if (!C) return h;
2216
+ let g = N(0, c, -1);
2217
+ return l([h, yt(g, { groupId: O })]);
2218
+ }
2219
+ function Ts(e, t, r, n, s) {
2220
+ let { node: i } = e;
2221
+ if (!Te(i)) return [l(r())];
2222
+ let o = [];
2223
+ dr(i.operator, i.left.operator) ? o = e.call(() => Ts(e, t, r, true, s), "left") : o.push(l(r("left")));
2224
+ let u = er(i), p = i.right.type === "ChainExpression" ? i.right.expression : i.right, c = (i.operator === "|>" || i.type === "NGPipeExpression" || yl(e, t)) && !Ee(t.originalText, p), D = !T(p, x.Leading, Hr) && Ee(t.originalText, p), F = i.type === "NGPipeExpression" ? "|" : i.operator, C = i.type === "NGPipeExpression" && i.arguments.length > 0 ? l(m([f, ": ", L([A, ": "], e.map(() => xe(2, l(r())), "arguments"))])) : "", d;
2225
+ if (u) d = [F, Ee(t.originalText, p) ? m([A, r("right"), C]) : [" ", r("right"), C]];
2226
+ else {
2227
+ let g = F === "|>" && e.root.extra?.__isUsingHackPipeline ? e.call(() => Ts(e, t, r, true, s), "right") : r("right");
2228
+ if (t.experimentalOperatorPosition === "start") {
2229
+ let S = "";
2230
+ if (D) switch (We(g)) {
2231
+ case Be:
2232
+ S = g.splice(0, 1)[0];
2233
+ break;
2234
+ case Pe:
2235
+ S = g.contents.splice(0, 1)[0];
2236
+ break;
2237
+ }
2238
+ d = [A, S, F, " ", g, C];
2239
+ } else d = [c ? A : "", F, c ? " " : A, g, C];
2240
+ }
2241
+ let { parent: b } = e, B = T(i.left, x.Trailing | x.Line);
2242
+ if ((B || !(s && i.type === "LogicalExpression") && b.type !== i.type && i.left.type !== i.type && i.right.type !== i.type) && (d = l(d, { shouldBreak: B })), t.experimentalOperatorPosition === "start" ? o.push(u || D ? " " : "", d) : o.push(c ? "" : " ", d), n && T(i)) {
2243
+ let h = Qt(De(e, o, t));
2244
+ return h.type === Me ? h.parts : Array.isArray(h) ? h : [h];
2245
+ }
2246
+ return o;
2247
+ }
2248
+ function er(e) {
2249
+ return e.type !== "LogicalExpression" ? false : !!(se(e.right) && e.right.properties.length > 0 || q(e.right) && e.right.elements.length > 0 || H(e.right));
2250
+ }
2251
+ var Ro = (e) => e.type === "BinaryExpression" && e.operator === "|";
2252
+ function yl(e, t) {
2253
+ return (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression") && Ro(e.node) && !e.hasAncestor((r) => !Ro(r) && r.type !== "JsExpressionRoot");
2254
+ }
2255
+ function El(e) {
2256
+ if (e.key !== "arguments") return false;
2257
+ let { parent: t } = e;
2258
+ if (!(M(t) && !t.optional && t.arguments.length === 1)) return false;
2259
+ let { callee: r } = t;
2260
+ return r.type === "Identifier" && r.name === "Boolean";
2261
+ }
2262
+ function un(e, t, r) {
2263
+ let { node: n } = e, { parent: s } = e, i = s.type !== "TypeParameterInstantiation" && (!Ue(s) || !t.experimentalTernaries) && s.type !== "TSTypeParameterInstantiation" && s.type !== "GenericTypeAnnotation" && s.type !== "TSTypeReference" && s.type !== "TSTypeAssertion" && s.type !== "TupleTypeAnnotation" && s.type !== "TSTupleType" && !(s.type === "FunctionTypeParam" && !s.name && e.grandparent.this !== s) && !((Cr(s) || s.type === "VariableDeclarator") && Ee(t.originalText, n)) && !(Cr(s) && T(s.id, x.Trailing | x.Line)), o = xs(n), u = e.map(() => {
2264
+ let C = r();
2265
+ return o || (C = xe(2, C)), De(e, C, t);
2266
+ }, "types"), p = "", c = "";
2267
+ if (Yr(e) && ({ leading: p, trailing: c } = Mt(e, t)), o) return [p, L(" | ", u), c];
2268
+ let y = i && !Ee(t.originalText, n), D = [P([y ? A : "", "| "]), L([A, "| "], u)];
2269
+ if (ge(e, t)) return [p, l([m(D), f]), c];
2270
+ let F = [p, l(D)];
2271
+ return (s.type === "TupleTypeAnnotation" || s.type === "TSTupleType") && s[s.type === "TupleTypeAnnotation" && s.types ? "types" : "elementTypes"].length > 1 ? [l([m([P(["(", f]), F]), f, P(")")]), c] : [l(i ? m(F) : F), c];
2272
+ }
2273
+ var Fl = k(["VoidTypeAnnotation", "TSVoidKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword"]);
2274
+ var dl = k(["ObjectTypeAnnotation", "TSTypeLiteral", "GenericTypeAnnotation", "TSTypeReference"]);
2275
+ function xs(e) {
2276
+ let { types: t } = e;
2277
+ if (t.some((n) => T(n))) return false;
2278
+ let r = t.find((n) => dl(n));
2279
+ return r ? t.every((n) => n === r || Fl(n)) : false;
2280
+ }
2281
+ function Jo(e) {
2282
+ return Vt(e) || Je(e) ? true : Se(e) ? xs(e) : false;
2283
+ }
2284
+ var Cl = /* @__PURE__ */ new WeakSet();
2285
+ function G(e, t, r = "typeAnnotation") {
2286
+ let { node: { [r]: n } } = e;
2287
+ if (!n) return "";
2288
+ let s = false;
2289
+ if (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") {
2290
+ let i = e.call(Go, r);
2291
+ (i === "=>" || i === ":" && T(n, x.Leading)) && (s = true), Cl.add(n);
2292
+ }
2293
+ return s ? [" ", t(r)] : t(r);
2294
+ }
2295
+ var Go = (e) => e.match((t) => t.type === "TSTypeAnnotation", (t, r) => (r === "returnType" || r === "typeAnnotation") && (t.type === "TSFunctionType" || t.type === "TSConstructorType")) ? "=>" : e.match((t) => t.type === "TSTypeAnnotation", (t, r) => r === "typeAnnotation" && (t.type === "TSJSDocNullableType" || t.type === "TSJSDocNonNullableType" || t.type === "TSTypePredicate")) || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareFunction") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareHook") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "bound" && t.type === "TypeParameter" && t.usesExtendsBound) ? "" : ":";
2296
+ function an(e, t, r) {
2297
+ let n = Go(e);
2298
+ return n ? [n, " ", r("typeAnnotation")] : r("typeAnnotation");
2299
+ }
2300
+ function Al(e, t, r, n) {
2301
+ let { node: s } = e, i = s.inexact ? "..." : "";
2302
+ return T(s, x.Dangling) ? l([r, i, v(e, t, { indent: true }), f, n]) : [r, i, n];
2303
+ }
2304
+ function tr(e, t, r) {
2305
+ let { node: n } = e, s = [], i = "[", o = "]", u = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", p = n[u];
2306
+ if (p.length === 0) s.push(Al(e, t, i, o));
2307
+ else {
2308
+ let c = N(0, p, -1), y = c?.type !== "RestElement" && !n.inexact, D = c === null, F = /* @__PURE__ */ Symbol("array"), C = !t.__inJestEach && p.length > 1 && p.every((B, O, h) => {
2309
+ let g = B?.type;
2310
+ if (!q(B) && !se(B)) return false;
2311
+ let S = h[O + 1];
2312
+ if (S && g !== S.type) return false;
2313
+ let j = q(B) ? "elements" : "properties";
2314
+ return B[j] && B[j].length > 1;
2315
+ }), d = gs(n, t), b = y ? D ? "," : ie(t) ? d ? P(",", "", { groupId: F }) : P(",") : "" : "";
2316
+ s.push(l([i, m([f, d ? xl(e, t, r, b) : [Tl(e, t, r, u, n.inexact), b], v(e, t)]), f, o], { shouldBreak: C, id: F }));
2317
+ }
2318
+ return s.push(X(e), G(e, r)), s;
2319
+ }
2320
+ function gs(e, t) {
2321
+ return q(e) && e.elements.length > 0 && e.elements.every((r) => r && (Ce(r) || Hn(r) && !T(r.argument)) && !T(r, x.Trailing | x.Line, (n) => !Z(t.originalText, w(n), { backwards: true })));
2322
+ }
2323
+ function Wo({ node: e }, { originalText: t }) {
2324
+ let r = I(e);
2325
+ if (r === w(e)) return false;
2326
+ let { length: n } = t;
2327
+ for (; r < n && t[r] !== ","; ) r = qt(t, Ut(t, r + 1));
2328
+ return Yt(t, r);
2329
+ }
2330
+ function Tl(e, t, r, n, s) {
2331
+ let i = [];
2332
+ return e.each(({ node: o, isLast: u }) => {
2333
+ i.push(o ? l(r()) : ""), (!u || s) && i.push([",", A, o && Wo(e, t) ? f : ""]);
2334
+ }, n), s && i.push("..."), i;
2335
+ }
2336
+ function xl(e, t, r, n) {
2337
+ let s = [];
2338
+ return e.each(({ isLast: i, next: o }) => {
2339
+ s.push([r(), i ? n : ","]), i || s.push(Wo(e, t) ? [E, E] : T(o, x.Leading | x.Line) ? E : A);
2340
+ }, "elements"), zr(s);
2341
+ }
2342
+ function gl(e, t, r) {
2343
+ let { node: n } = e, s = le(n);
2344
+ if (s.length === 0) return ["(", v(e, t), ")"];
2345
+ let i = s.length - 1;
2346
+ if (Bl(s)) {
2347
+ let D = ["("];
2348
+ return $t(e, (F, C) => {
2349
+ D.push(r()), C !== i && D.push(", ");
2350
+ }), D.push(")"), D;
2351
+ }
2352
+ let o = false, u = [];
2353
+ $t(e, ({ node: D }, F) => {
2354
+ let C = r();
2355
+ F === i || (oe(D, t) ? (o = true, C = [C, ",", E, E]) : C = [C, ",", A]), u.push(C);
2356
+ });
2357
+ let p = !t.parser.startsWith("__ng_") && n.type !== "ImportExpression" && n.type !== "TSImportType" && n.type !== "TSExternalModuleReference" && ie(t, "all") ? "," : "";
2358
+ function c() {
2359
+ return l(["(", m([A, ...u]), p, A, ")"], { shouldBreak: true });
2360
+ }
2361
+ if (o || e.parent.type !== "Decorator" && Ci(s)) return c();
2362
+ if (Sl(s)) {
2363
+ let D = u.slice(1);
2364
+ if (D.some(ne)) return c();
2365
+ let F;
2366
+ try {
2367
+ F = r($n(n, 0), { expandFirstArg: true });
2368
+ } catch (C) {
2369
+ if (C instanceof Et) return c();
2370
+ throw C;
2371
+ }
2372
+ return ne(F) ? [ke, nt([["(", l(F, { shouldBreak: true }), ", ", ...D, ")"], c()])] : nt([["(", F, ", ", ...D, ")"], ["(", l(F, { shouldBreak: true }), ", ", ...D, ")"], c()]);
2373
+ }
2374
+ if (hl(s, u, t)) {
2375
+ let D = u.slice(0, -1);
2376
+ if (D.some(ne)) return c();
2377
+ let F;
2378
+ try {
2379
+ F = r($n(n, -1), { expandLastArg: true });
2380
+ } catch (C) {
2381
+ if (C instanceof Et) return c();
2382
+ throw C;
2383
+ }
2384
+ return ne(F) ? [ke, nt([["(", ...D, l(F, { shouldBreak: true }), ")"], c()])] : nt([["(", ...D, F, ")"], ["(", ...D, l(F, { shouldBreak: true }), ")"], c()]);
2385
+ }
2386
+ let y = ["(", m([f, ...u]), P(p), f, ")"];
2387
+ return Ur(e) ? y : l(y, { shouldBreak: u.some(ne) || o });
2388
+ }
2389
+ function gr(e, t = false) {
2390
+ return se(e) && (e.properties.length > 0 || T(e)) || q(e) && (e.elements.length > 0 || T(e)) || e.type === "TSTypeAssertion" && gr(e.expression) || Ae(e) && gr(e.expression) || e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && (!e.returnType || !e.returnType.typeAnnotation || e.returnType.typeAnnotation.type !== "TSTypeReference" || bl(e.body)) && (e.body.type === "BlockStatement" || e.body.type === "ArrowFunctionExpression" && gr(e.body, true) || se(e.body) || q(e.body) || !t && (M(e.body) || e.body.type === "ConditionalExpression") || H(e.body)) || e.type === "DoExpression" || e.type === "ModuleExpression";
2391
+ }
2392
+ function hl(e, t, r) {
2393
+ let n = N(0, e, -1);
2394
+ if (e.length === 1) {
2395
+ let i = N(0, t, -1);
2396
+ if (i.label?.embed && i.label?.hug !== false) return true;
2397
+ }
2398
+ let s = N(0, e, -2);
2399
+ return !T(n, x.Leading) && !T(n, x.Trailing) && gr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !q(n)) && !(e.length > 1 && gs(n, r));
2400
+ }
2401
+ function Sl(e) {
2402
+ if (e.length !== 2) return false;
2403
+ let [t, r] = e;
2404
+ return t.type === "ModuleExpression" && Pl(r) ? true : !T(t) && (t.type === "FunctionExpression" || t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement") && r.type !== "FunctionExpression" && r.type !== "ArrowFunctionExpression" && r.type !== "ConditionalExpression" && Uo(r) && !gr(r);
2405
+ }
2406
+ function Uo(e) {
2407
+ if (e.type === "ParenthesizedExpression") return Uo(e.expression);
2408
+ if (Ae(e) || e.type === "TypeCastExpression") {
2409
+ let { typeAnnotation: t } = e;
2410
+ if (t.type === "TypeAnnotation" && (t = t.typeAnnotation), t.type === "TSArrayType" && (t = t.elementType, t.type === "TSArrayType" && (t = t.elementType)), t.type === "GenericTypeAnnotation" || t.type === "TSTypeReference") {
2411
+ let r = t.type === "GenericTypeAnnotation" ? t.typeParameters : t.typeArguments;
2412
+ r?.params.length === 1 && (t = r.params[0]);
2413
+ }
2414
+ return Vt(t) && Re(e.expression, 1);
2415
+ }
2416
+ return Dt(e) && le(e).length > 1 ? false : Te(e) ? Re(e.left, 1) && Re(e.right, 1) : Xn(e) || Re(e);
2417
+ }
2418
+ function Bl(e) {
2419
+ return e.length === 2 ? qo(e, 0) : e.length === 3 ? e[0].type === "Identifier" && qo(e, 1) : false;
2420
+ }
2421
+ function qo(e, t) {
2422
+ let r = e[t], n = e[t + 1];
2423
+ return r.type === "ArrowFunctionExpression" && K(r).length === 0 && r.body.type === "BlockStatement" && n.type === "ArrayExpression" && !e.some((s) => T(s));
2424
+ }
2425
+ function bl(e) {
2426
+ return e.type === "BlockStatement" && (e.body.some((t) => t.type !== "EmptyStatement") || T(e, x.Dangling));
2427
+ }
2428
+ function Pl(e) {
2429
+ if (!(e.type === "ObjectExpression" && e.properties.length === 1)) return false;
2430
+ let [t] = e.properties;
2431
+ return Oe(t) ? !t.computed && (t.key.type === "Identifier" && t.key.name === "type" || V(t.key) && t.key.value === "type") && V(t.value) && t.value.value === "module" : false;
2432
+ }
2433
+ var hr = gl;
2434
+ function Yo(e, t, r) {
2435
+ return [r("object"), l(m([f, hs(e, t, r)]))];
2436
+ }
2437
+ function hs(e, t, r) {
2438
+ return ["::", r("callee")];
2439
+ }
2440
+ var kl = (e) => ((e.type === "ChainExpression" || e.type === "TSNonNullExpression") && (e = e.expression), M(e) && le(e).length > 0);
2441
+ function Il(e) {
2442
+ let { node: t, ancestors: r } = e;
2443
+ for (let n of r) {
2444
+ if (!(J(n) && n.object === t || n.type === "TSNonNullExpression" && n.expression === t)) return n.type === "NewExpression" && n.callee === t;
2445
+ t = n;
2446
+ }
2447
+ return false;
2448
+ }
2449
+ function Ho(e, t, r) {
2450
+ let n = r("object"), s = Ss(e, t, r), { node: i } = e, o = e.findAncestor((c) => !(J(c) || c.type === "TSNonNullExpression")), u = e.findAncestor((c) => !(c.type === "ChainExpression" || c.type === "TSNonNullExpression")), p = o.type === "BindExpression" || o.type === "AssignmentExpression" && o.left.type !== "Identifier" || Il(e) || i.computed || i.object.type === "Identifier" && i.property.type === "Identifier" && !J(u) || (u.type === "AssignmentExpression" || u.type === "VariableDeclarator") && (kl(i.object) || n.label?.memberChain);
2451
+ return pt(n.label, [n, p ? s : l(m([f, s]))]);
2452
+ }
2453
+ function Ss(e, t, r) {
2454
+ let n = r("property"), { node: s } = e, i = X(e);
2455
+ return s.computed ? !s.property || Ce(s.property) ? [i, "[", n, "]"] : l([i, "[", m([f, n]), f, "]"]) : [i, ".", n];
2456
+ }
2457
+ function Xo(e, t, r) {
2458
+ if (e.node.type === "ChainExpression") return e.call(() => Xo(e, t, r), "expression");
2459
+ let n = (e.parent.type === "ChainExpression" ? e.grandparent : e.parent).type === "ExpressionStatement", s = [];
2460
+ function i(_) {
2461
+ let { originalText: re } = t, ae = at(re, I(_));
2462
+ return re.charAt(ae) === ")" ? ae !== false && Yt(re, ae + 1) : oe(_, t);
2463
+ }
2464
+ function o() {
2465
+ let { node: _ } = e;
2466
+ if (_.type === "ChainExpression") return e.call(o, "expression");
2467
+ if (M(_) && (Tt(_.callee) || M(_.callee))) {
2468
+ let re = i(_);
2469
+ s.unshift({ node: _, hasTrailingEmptyLine: re, printed: [De(e, [X(e), r("typeArguments"), hr(e, t, r)], t), re ? E : ""] }), e.call(o, "callee");
2470
+ } else Tt(_) ? (s.unshift({ node: _, needsParens: ge(e, t), printed: De(e, J(_) ? Ss(e, t, r) : hs(e, t, r), t) }), e.call(o, "object")) : _.type === "TSNonNullExpression" ? (s.unshift({ node: _, printed: De(e, "!", t) }), e.call(o, "expression")) : s.unshift({ node: _, printed: r() });
2471
+ }
2472
+ let { node: u } = e;
2473
+ s.unshift({ node: u, printed: [X(e), r("typeArguments"), hr(e, t, r)] }), u.callee && e.call(o, "callee");
2474
+ let p = [], c = [s[0]], y = 1;
2475
+ for (; y < s.length && (s[y].node.type === "TSNonNullExpression" || M(s[y].node) || J(s[y].node) && s[y].node.computed && Ce(s[y].node.property)); ++y) c.push(s[y]);
2476
+ if (!M(s[0].node)) for (; y + 1 < s.length && (Tt(s[y].node) && Tt(s[y + 1].node)); ++y) c.push(s[y]);
2477
+ p.push(c), c = [];
2478
+ let D = false;
2479
+ for (; y < s.length; ++y) {
2480
+ if (D && Tt(s[y].node)) {
2481
+ if (s[y].node.computed && Ce(s[y].node.property)) {
2482
+ c.push(s[y]);
2483
+ continue;
2484
+ }
2485
+ p.push(c), c = [], D = false;
2486
+ }
2487
+ (M(s[y].node) || s[y].node.type === "ImportExpression") && (D = true), c.push(s[y]), T(s[y].node, x.Trailing) && (p.push(c), c = [], D = false);
2488
+ }
2489
+ c.length > 0 && p.push(c);
2490
+ function F(_) {
2491
+ return /^[A-Z]|^[$_]+$/u.test(_);
2492
+ }
2493
+ function C(_) {
2494
+ return _.length <= t.tabWidth;
2495
+ }
2496
+ function d(_) {
2497
+ let re = _[1][0]?.node.computed;
2498
+ if (_[0].length === 1) {
2499
+ let it = _[0][0].node;
2500
+ return it.type === "ThisExpression" || it.type === "Identifier" && (F(it.name) || n && C(it.name) || re);
2501
+ }
2502
+ let ae = N(0, _[0], -1).node;
2503
+ return J(ae) && ae.property.type === "Identifier" && (F(ae.property.name) || re);
2504
+ }
2505
+ let b = p.length >= 2 && !T(p[1][0].node) && d(p);
2506
+ function B(_) {
2507
+ let re = _.map((ae) => ae.printed);
2508
+ return _.length > 0 && N(0, _, -1).needsParens ? ["(", ...re, ")"] : re;
2509
+ }
2510
+ function O(_) {
2511
+ return _.length === 0 ? "" : m([E, L(E, _.map(B))]);
2512
+ }
2513
+ let h = p.map(B), g = h, S = b ? 3 : 2, j = p.flat(), U = j.slice(1, -1).some((_) => T(_.node, x.Leading)) || j.slice(0, -1).some((_) => T(_.node, x.Trailing)) || p[S] && T(p[S][0].node, x.Leading);
2514
+ if (p.length <= S && !U && !p.some((_) => N(0, _, -1).hasTrailingEmptyLine)) return Ur(e) ? g : l(g);
2515
+ let fe = N(0, p[b ? 1 : 0], -1).node, Y = !M(fe) && i(fe), z = [B(p[0]), b ? p.slice(1, 2).map(B) : "", Y ? E : "", O(p.slice(b ? 2 : 1))], ee = s.map(({ node: _ }) => _).filter(M);
2516
+ function Ie() {
2517
+ let _ = N(0, N(0, p, -1), -1).node, re = N(0, h, -1);
2518
+ return M(_) && ne(re) && ee.slice(0, -1).some((ae) => ae.arguments.some(Ht));
2519
+ }
2520
+ let st;
2521
+ return U || ee.length > 2 && ee.some((_) => !_.arguments.every((re) => Re(re))) || h.slice(0, -1).some(ne) || Ie() ? st = l(z) : st = [ne(g) || Y ? ke : "", nt([g, z])], pt({ memberChain: true }, st);
2522
+ }
2523
+ var Vo = Xo;
2524
+ function vt(e, t, r) {
2525
+ let { node: n } = e, s = n.type === "NewExpression", i = X(e), o = le(n), u = n.type !== "TSImportType" && n.typeArguments ? r("typeArguments") : "", p = o.length === 1 && Wr(o[0], t.originalText);
2526
+ if (p || Ol(e) || wl(e) || It(n, e.parent)) {
2527
+ let D = [];
2528
+ if ($t(e, () => {
2529
+ D.push(r());
2530
+ }), !(p && D[0].label?.embed)) return [s ? "new " : "", $o(e, r), i, u, "(", L(", ", D), ")"];
2531
+ }
2532
+ let c = n.type === "ImportExpression" || n.type === "TSImportType" || n.type === "TSExternalModuleReference";
2533
+ if (!c && !s && Tt(n.callee) && !e.call(() => ge(e, t), "callee", ...n.callee.type === "ChainExpression" ? ["expression"] : [])) return Vo(e, t, r);
2534
+ let y = [s ? "new " : "", $o(e, r), i, u, hr(e, t, r)];
2535
+ return c || M(n.callee) ? l(y) : y;
2536
+ }
2537
+ function $o(e, t) {
2538
+ let { node: r } = e;
2539
+ return r.type === "ImportExpression" ? `import${r.phase ? `.${r.phase}` : ""}` : r.type === "TSImportType" ? "import" : r.type === "TSExternalModuleReference" ? "require" : t("callee");
2540
+ }
2541
+ var Ll = ["require", "require.resolve", "require.resolve.paths", "import.meta.resolve"];
2542
+ function Ol(e) {
2543
+ let { node: t } = e;
2544
+ if (!(t.type === "ImportExpression" || t.type === "TSImportType" || t.type === "TSExternalModuleReference" || t.type === "CallExpression" && !t.optional && Pt(t.callee, Ll))) return false;
2545
+ let r = le(t);
2546
+ return r.length === 1 && V(r[0]) && !T(r[0]);
2547
+ }
2548
+ function wl(e) {
2549
+ let { node: t } = e;
2550
+ if (t.type !== "CallExpression" || t.optional || t.callee.type !== "Identifier") return false;
2551
+ let r = le(t);
2552
+ return t.callee.name === "require" ? (r.length === 1 && V(r[0]) || r.length > 1) && !T(r[0]) : t.callee.name === "define" && e.parent.type === "ExpressionStatement" ? r.length === 1 || r.length === 2 && r[0].type === "ArrayExpression" || r.length === 3 && V(r[0]) && r[1].type === "ArrayExpression" : false;
2553
+ }
2554
+ function ht(e, t, r, n, s, i) {
2555
+ let o = _l(e, t, r, n, i), u = i ? r(i, { assignmentLayout: o }) : "";
2556
+ switch (o) {
2557
+ case "break-after-operator":
2558
+ return l([l(n), s, l(m([A, u]))]);
2559
+ case "never-break-after-operator":
2560
+ return l([l(n), s, " ", u]);
2561
+ case "fluid": {
2562
+ let p = /* @__PURE__ */ Symbol("assignment");
2563
+ return l([l(n), s, l(m(A), { id: p }), je, yt(u, { groupId: p })]);
2564
+ }
2565
+ case "break-lhs":
2566
+ return l([n, s, " ", l(u)]);
2567
+ case "chain":
2568
+ return [l(n), s, A, u];
2569
+ case "chain-tail":
2570
+ return [l(n), s, m([A, u])];
2571
+ case "chain-tail-arrow-chain":
2572
+ return [l(n), s, u];
2573
+ case "only-left":
2574
+ return n;
2575
+ }
2576
+ }
2577
+ function zo(e, t, r) {
2578
+ let { node: n } = e;
2579
+ return ht(e, t, r, r("left"), [" ", n.operator], "right");
2580
+ }
2581
+ function Zo(e, t, r) {
2582
+ return ht(e, t, r, r("id"), " =", "init");
2583
+ }
2584
+ function _l(e, t, r, n, s) {
2585
+ let { node: i } = e, o = i[s];
2586
+ if (!o) return "only-left";
2587
+ let u = !pn(o);
2588
+ if (e.match(pn, eu, (F) => !u || F.type !== "ExpressionStatement" && F.type !== "VariableDeclaration")) return u ? o.type === "ArrowFunctionExpression" && o.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain";
2589
+ if (!u && pn(o.right) || Ee(t.originalText, o)) return "break-after-operator";
2590
+ if (i.type === "ImportAttribute" || o.type === "CallExpression" && o.callee.name === "require" || t.parser === "json5" || t.parser === "jsonc" || t.parser === "json") return "never-break-after-operator";
2591
+ let y = Xi(n);
2592
+ if (Nl(i) || Rl(i) || Bs(i) && y) return "break-lhs";
2593
+ let D = Jl(i, n, t);
2594
+ return e.call(() => Ml(e, t, r, D), s) ? "break-after-operator" : jl(i) ? "break-lhs" : !y && (D || o.type === "TemplateLiteral" || o.type === "TaggedTemplateExpression" || yi(o) || Ce(o) || o.type === "ClassExpression") ? "never-break-after-operator" : "fluid";
2595
+ }
2596
+ function Ml(e, t, r, n) {
2597
+ let s = e.node;
2598
+ if (Te(s) && !er(s)) return true;
2599
+ switch (s.type) {
2600
+ case "StringLiteralTypeAnnotation":
2601
+ case "SequenceExpression":
2602
+ return true;
2603
+ case "TSConditionalType":
2604
+ case "ConditionalTypeAnnotation":
2605
+ if (!t.experimentalTernaries && !ql(s)) break;
2606
+ return true;
2607
+ case "ConditionalExpression": {
2608
+ if (!t.experimentalTernaries) {
2609
+ let { test: c } = s;
2610
+ return Te(c) && !er(c);
2611
+ }
2612
+ let { consequent: u, alternate: p } = s;
2613
+ return u.type === "ConditionalExpression" || p.type === "ConditionalExpression";
2614
+ }
2615
+ case "ClassExpression":
2616
+ return R(s.decorators);
2617
+ }
2618
+ if (n) return false;
2619
+ let i = s, o = [];
2620
+ for (; ; ) if (i.type === "UnaryExpression" || i.type === "AwaitExpression" || i.type === "YieldExpression" && i.argument !== null) i = i.argument, o.push("argument");
2621
+ else if (i.type === "TSNonNullExpression") i = i.expression, o.push("expression");
2622
+ else break;
2623
+ return !!(V(i) || e.call(() => tu(e, t, r), ...o));
2624
+ }
2625
+ function Nl(e) {
2626
+ if (eu(e)) {
2627
+ let t = e.left || e.id;
2628
+ return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => Oe(r) && (!r.shorthand || r.value?.type === "AssignmentPattern"));
2629
+ }
2630
+ return false;
2631
+ }
2632
+ function pn(e) {
2633
+ return e.type === "AssignmentExpression";
2634
+ }
2635
+ function eu(e) {
2636
+ return pn(e) || e.type === "VariableDeclarator";
2637
+ }
2638
+ function jl(e) {
2639
+ let t = vl(e);
2640
+ if (R(t)) {
2641
+ let r = e.type === "TSTypeAliasDeclaration" ? "constraint" : "bound";
2642
+ if (t.length > 1 && t.some((n) => n[r] || n.default)) return true;
2643
+ }
2644
+ return false;
2645
+ }
2646
+ function vl(e) {
2647
+ if (Cr(e)) return e.typeParameters?.params;
2648
+ }
2649
+ function Rl(e) {
2650
+ if (e.type !== "VariableDeclarator") return false;
2651
+ let { typeAnnotation: t } = e.id;
2652
+ if (!t || !t.typeAnnotation) return false;
2653
+ let r = Ko(t.typeAnnotation);
2654
+ return R(r) && r.length > 1 && r.some((n) => R(Ko(n)) || n.type === "TSConditionalType");
2655
+ }
2656
+ function Bs(e) {
2657
+ return e.type === "VariableDeclarator" && e.init?.type === "ArrowFunctionExpression";
2658
+ }
2659
+ function Ko(e) {
2660
+ let t;
2661
+ switch (e.type) {
2662
+ case "GenericTypeAnnotation":
2663
+ t = e.typeParameters;
2664
+ break;
2665
+ case "TSTypeReference":
2666
+ t = e.typeArguments;
2667
+ break;
2668
+ }
2669
+ return t?.params;
2670
+ }
2671
+ function tu(e, t, r, n = false) {
2672
+ let { node: s } = e, i = () => tu(e, t, r, true);
2673
+ if (s.type === "ChainExpression" || s.type === "TSNonNullExpression") return e.call(i, "expression");
2674
+ if (M(s)) {
2675
+ if (vt(e, t, r).label?.memberChain) return false;
2676
+ let u = le(s);
2677
+ return !(u.length === 0 || u.length === 1 && Fr(u[0], t)) || Gl(s, r) ? false : e.call(i, "callee");
2678
+ }
2679
+ return J(s) ? e.call(i, "object") : n && (s.type === "Identifier" || s.type === "ThisExpression");
2680
+ }
2681
+ function Jl(e, t, r) {
2682
+ return Oe(e) ? (t = Qt(t), typeof t == "string" && ot(t) < r.tabWidth + 3) : false;
2683
+ }
2684
+ function Gl(e, t) {
2685
+ let r = Wl(e);
2686
+ if (R(r)) {
2687
+ if (r.length > 1) return true;
2688
+ if (r.length === 1) {
2689
+ let s = r[0];
2690
+ if (Se(s) || xt(s) || s.type === "TSTypeLiteral" || s.type === "ObjectTypeAnnotation") return true;
2691
+ }
2692
+ let n = e.typeParameters ? "typeParameters" : "typeArguments";
2693
+ if (ne(t(n))) return true;
2694
+ }
2695
+ return false;
2696
+ }
2697
+ function Wl(e) {
2698
+ return (e.typeParameters ?? e.typeArguments)?.params;
2699
+ }
2700
+ function Qo(e) {
2701
+ switch (e.type) {
2702
+ case "FunctionTypeAnnotation":
2703
+ case "GenericTypeAnnotation":
2704
+ case "TSFunctionType":
2705
+ return !!e.typeParameters;
2706
+ case "TSTypeReference":
2707
+ return !!e.typeArguments;
2708
+ default:
2709
+ return false;
2710
+ }
2711
+ }
2712
+ function ql(e) {
2713
+ return Qo(e.checkType) || Qo(e.extendsType);
2714
+ }
2715
+ var cn = /* @__PURE__ */ new WeakMap();
2716
+ function nu(e) {
2717
+ return /^(?:\d+|\d+\.\d+)$/u.test(e);
2718
+ }
2719
+ function ru(e, t) {
2720
+ return t.parser === "json" || t.parser === "jsonc" || !V(e.key) || ut(pe(e.key), t).slice(1, -1) !== e.key.value ? false : !!(vo(e.key.value) && !(t.parser === "babel-ts" && e.type === "ClassProperty" || (t.parser === "typescript" || t.parser === "oxc-ts") && e.type === "PropertyDefinition") || nu(e.key.value) && String(Number(e.key.value)) === e.key.value && e.type !== "ImportAttribute" && (t.parser === "babel" || t.parser === "acorn" || t.parser === "oxc" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree"));
2721
+ }
2722
+ function Ul(e, t) {
2723
+ let { key: r } = e.node;
2724
+ return (r.type === "Identifier" || Ce(r) && nu(dt(pe(r))) && String(r.value) === dt(pe(r)) && !(t.parser === "typescript" || t.parser === "babel-ts" || t.parser === "oxc-ts")) && (t.parser === "json" || t.parser === "jsonc" || t.quoteProps === "consistent" && cn.get(e.parent));
2725
+ }
2726
+ function Ct(e, t, r) {
2727
+ let { node: n } = e;
2728
+ if (n.computed) return ["[", r("key"), "]"];
2729
+ let { parent: s } = e, { key: i } = n;
2730
+ if (t.quoteProps === "consistent" && !cn.has(s)) {
2731
+ let o = e.siblings.some((u) => !u.computed && V(u.key) && !ru(u, t));
2732
+ cn.set(s, o);
2733
+ }
2734
+ if (Ul(e, t)) {
2735
+ let o = ut(JSON.stringify(i.type === "Identifier" ? i.name : i.value.toString()), t);
2736
+ return e.call(() => De(e, o, t), "key");
2737
+ }
2738
+ return ru(n, t) && (t.quoteProps === "as-needed" || t.quoteProps === "consistent" && !cn.get(s)) ? e.call(() => De(e, /^\d/u.test(i.value) ? dt(i.value) : i.value, t), "key") : r("key");
2739
+ }
2740
+ function ln(e, t, r) {
2741
+ let { node: n } = e;
2742
+ return n.shorthand ? r("value") : ht(e, t, r, Ct(e, t, r), ":", "value");
2743
+ }
2744
+ var Yl = ({ node: e, key: t, parent: r }) => t === "value" && e.type === "FunctionExpression" && (r.type === "ObjectMethod" || r.type === "ClassMethod" || r.type === "ClassPrivateMethod" || r.type === "MethodDefinition" || r.type === "TSAbstractMethodDefinition" || r.type === "TSDeclareMethod" || r.type === "Property" && mt(r));
2745
+ function mn(e, t, r, n) {
2746
+ if (Yl(e)) return Dn(e, t, r);
2747
+ let { node: s } = e, i = false;
2748
+ if ((s.type === "FunctionDeclaration" || s.type === "FunctionExpression") && n?.expandLastArg) {
2749
+ let { parent: y } = e;
2750
+ M(y) && (le(y).length > 1 || K(s).every((D) => D.type === "Identifier" && !D.typeAnnotation)) && (i = true);
2751
+ }
2752
+ let o = [Q(e), s.async ? "async " : "", `function${s.generator ? "*" : ""} `, s.id ? r("id") : ""], u = Ke(e, t, r, i), p = rr(e, r), c = lt(s, p);
2753
+ return o.push(r("typeParameters"), l([c ? l(u) : u, p]), s.body ? " " : "", r("body")), t.semi && (s.declare || !s.body) && o.push(";"), o;
2754
+ }
2755
+ function Sr(e, t, r) {
2756
+ let { node: n } = e, { kind: s } = n, i = n.value || n, o = [];
2757
+ return !s || s === "init" || s === "method" || s === "constructor" ? i.async && o.push("async ") : (Le(s === "get" || s === "set"), o.push(s, " ")), i.generator && o.push("*"), o.push(Ct(e, t, r), n.optional ? "?" : "", n === i ? Dn(e, t, r) : r("value")), o;
2758
+ }
2759
+ function Dn(e, t, r) {
2760
+ let { node: n } = e, s = Ke(e, t, r), i = rr(e, r), o = jo(n), u = lt(n, i), p = [r("typeParameters"), l([o ? l(s, { shouldBreak: true }) : u ? l(s) : s, i])];
2761
+ return n.body ? p.push(" ", r("body")) : p.push(t.semi ? ";" : ""), p;
2762
+ }
2763
+ function Hl(e) {
2764
+ let t = K(e);
2765
+ return t.length === 1 && !e.typeParameters && !T(e, x.Dangling) && t[0].type === "Identifier" && !t[0].typeAnnotation && !T(t[0]) && !t[0].optional && !e.predicate && !e.returnType;
2766
+ }
2767
+ function fn(e, t) {
2768
+ if (t.arrowParens === "always") return false;
2769
+ if (t.arrowParens === "avoid") {
2770
+ let { node: r } = e;
2771
+ return Hl(r);
2772
+ }
2773
+ return false;
2774
+ }
2775
+ function rr(e, t) {
2776
+ let { node: r } = e, s = [G(e, t, "returnType")];
2777
+ return r.predicate && s.push(t("predicate")), s;
2778
+ }
2779
+ function su(e, t, r) {
2780
+ let { node: n } = e, s = [];
2781
+ if (n.argument) {
2782
+ let u = r("argument");
2783
+ Xl(t, n.argument) ? u = ["(", m([E, u]), E, ")"] : (Te(n.argument) || t.experimentalTernaries && n.argument.type === "ConditionalExpression" && (n.argument.consequent.type === "ConditionalExpression" || n.argument.alternate.type === "ConditionalExpression")) && (u = l([P("("), m([f, u]), f, P(")")])), s.push(" ", u);
2784
+ }
2785
+ let i = T(n, x.Dangling), o = t.semi && i && T(n, x.Last | x.Line);
2786
+ return o && s.push(";"), i && s.push(" ", v(e, t)), !o && t.semi && s.push(";"), s;
2787
+ }
2788
+ function iu(e, t, r) {
2789
+ return ["return", su(e, t, r)];
2790
+ }
2791
+ function ou(e, t, r) {
2792
+ return ["throw", su(e, t, r)];
2793
+ }
2794
+ function Xl(e, t) {
2795
+ if (Ee(e.originalText, t) || T(t, x.Leading, (r) => ue(e.originalText, w(r), I(r))) && !H(t)) return true;
2796
+ if (Xt(t)) {
2797
+ let r = t, n;
2798
+ for (; n = mi(r); ) if (r = n, Ee(e.originalText, r)) return true;
2799
+ }
2800
+ return false;
2801
+ }
2802
+ function uu(e, t) {
2803
+ if (t.semi || Ps(e, t) || Is(e, t) || ks(e, t)) return false;
2804
+ let { node: r, key: n, parent: s } = e;
2805
+ return !!(r.type === "ExpressionStatement" && (n === "body" && (s.type === "Program" || s.type === "BlockStatement" || s.type === "StaticBlock" || s.type === "TSModuleBlock") || n === "consequent" && s.type === "SwitchCase") && e.call(() => au(e, t), "expression"));
2806
+ }
2807
+ function au(e, t) {
2808
+ let { node: r } = e;
2809
+ switch (r.type) {
2810
+ case "ParenthesizedExpression":
2811
+ case "TypeCastExpression":
2812
+ case "ArrayExpression":
2813
+ case "ArrayPattern":
2814
+ case "TemplateLiteral":
2815
+ case "TemplateElement":
2816
+ case "RegExpLiteral":
2817
+ return true;
2818
+ case "ArrowFunctionExpression":
2819
+ if (!fn(e, t)) return true;
2820
+ break;
2821
+ case "UnaryExpression": {
2822
+ let { prefix: n, operator: s } = r;
2823
+ if (n && (s === "+" || s === "-")) return true;
2824
+ break;
2825
+ }
2826
+ case "BindExpression":
2827
+ if (!r.object) return true;
2828
+ break;
2829
+ case "Literal":
2830
+ if (r.regex) return true;
2831
+ break;
2832
+ default:
2833
+ if (H(r)) return true;
2834
+ }
2835
+ return ge(e, t) ? true : Xt(r) ? e.call(() => au(e, t), ...Rr(r)) : false;
2836
+ }
2837
+ var bs = ({ node: e, parent: t }) => e.type === "ExpressionStatement" && t.type === "Program" && t.body.length === 1 && (Array.isArray(t.directives) && t.directives.length === 0 || !t.directives);
2838
+ function Ps(e, t) {
2839
+ return (t.parentParser === "markdown" || t.parentParser === "mdx") && bs(e) && H(e.node.expression);
2840
+ }
2841
+ function ks(e, t) {
2842
+ return t.__isHtmlInlineEventHandler && bs(e);
2843
+ }
2844
+ function Is(e, t) {
2845
+ return (t.parser === "__vue_event_binding" || t.parser === "__vue_ts_event_binding") && bs(e);
2846
+ }
2847
+ var Ls = class extends Error {
2848
+ name = "UnexpectedNodeError";
2849
+ constructor(t, r, n = "type") {
2850
+ super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t;
2851
+ }
2852
+ };
2853
+ var Qe = Ls;
2854
+ function Os(e) {
2855
+ if (typeof e != "string") throw new TypeError("Expected a string");
2856
+ return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2857
+ }
2858
+ var ws = class {
2859
+ #e;
2860
+ constructor(t) {
2861
+ this.#e = new Set(t);
2862
+ }
2863
+ getLeadingWhitespaceCount(t) {
2864
+ let r = this.#e, n = 0;
2865
+ for (let s = 0; s < t.length && r.has(t.charAt(s)); s++) n++;
2866
+ return n;
2867
+ }
2868
+ getTrailingWhitespaceCount(t) {
2869
+ let r = this.#e, n = 0;
2870
+ for (let s = t.length - 1; s >= 0 && r.has(t.charAt(s)); s--) n++;
2871
+ return n;
2872
+ }
2873
+ getLeadingWhitespace(t) {
2874
+ let r = this.getLeadingWhitespaceCount(t);
2875
+ return t.slice(0, r);
2876
+ }
2877
+ getTrailingWhitespace(t) {
2878
+ let r = this.getTrailingWhitespaceCount(t);
2879
+ return t.slice(t.length - r);
2880
+ }
2881
+ hasLeadingWhitespace(t) {
2882
+ return this.#e.has(t.charAt(0));
2883
+ }
2884
+ hasTrailingWhitespace(t) {
2885
+ return this.#e.has(N(0, t, -1));
2886
+ }
2887
+ trimStart(t) {
2888
+ let r = this.getLeadingWhitespaceCount(t);
2889
+ return t.slice(r);
2890
+ }
2891
+ trimEnd(t) {
2892
+ let r = this.getTrailingWhitespaceCount(t);
2893
+ return t.slice(0, t.length - r);
2894
+ }
2895
+ trim(t) {
2896
+ return this.trimEnd(this.trimStart(t));
2897
+ }
2898
+ split(t, r = false) {
2899
+ let n = `[${Os([...this.#e].join(""))}]+`, s = new RegExp(r ? `(${n})` : n, "u");
2900
+ return t.split(s);
2901
+ }
2902
+ hasWhitespaceCharacter(t) {
2903
+ let r = this.#e;
2904
+ return Array.prototype.some.call(t, (n) => r.has(n));
2905
+ }
2906
+ hasNonWhitespaceCharacter(t) {
2907
+ let r = this.#e;
2908
+ return Array.prototype.some.call(t, (n) => !r.has(n));
2909
+ }
2910
+ isWhitespaceOnly(t) {
2911
+ let r = this.#e;
2912
+ return Array.prototype.every.call(t, (n) => r.has(n));
2913
+ }
2914
+ #t(t) {
2915
+ let r = Number.POSITIVE_INFINITY;
2916
+ for (let n of t.split(`
2917
+ `)) {
2918
+ if (n.length === 0) continue;
2919
+ let s = this.getLeadingWhitespaceCount(n);
2920
+ if (s === 0) return 0;
2921
+ n.length !== s && s < r && (r = s);
2922
+ }
2923
+ return r === Number.POSITIVE_INFINITY ? 0 : r;
2924
+ }
2925
+ dedentString(t) {
2926
+ let r = this.#t(t);
2927
+ return r === 0 ? t : t.split(`
2928
+ `).map((n) => n.slice(r)).join(`
2929
+ `);
2930
+ }
2931
+ };
2932
+ var pu = ws;
2933
+ var yn = new pu(`
2934
+ \r `);
2935
+ var _s = (e) => e === "" || e === A || e === E || e === f;
2936
+ function Vl(e, t, r) {
2937
+ let { node: n } = e;
2938
+ if (n.type === "JSXElement" && pm(n)) return [r("openingElement"), r("closingElement")];
2939
+ let s = n.type === "JSXElement" ? r("openingElement") : r("openingFragment"), i = n.type === "JSXElement" ? r("closingElement") : r("closingFragment");
2940
+ if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) return [s, ...e.map(r, "children"), i];
2941
+ n.children = n.children.map((g) => cm(g) ? { type: "JSXText", value: " ", raw: " " } : g);
2942
+ let o = n.children.some(H), u = n.children.filter((g) => g.type === "JSXExpressionContainer").length > 1, p = n.type === "JSXElement" && n.openingElement.attributes.length > 1, c = ne(s) || o || p || u, y = e.parent.rootMarker === "mdx", D = t.singleQuote ? "{' '}" : '{" "}', F = y ? A : P([D, f], " "), C = n.openingElement?.name?.name === "fbt", d = $l(e, t, r, F, C), b = n.children.some((g) => Br(g));
2943
+ for (let g = d.length - 2; g >= 0; g--) {
2944
+ let S = d[g] === "" && d[g + 1] === "", j = d[g] === E && d[g + 1] === "" && d[g + 2] === E, U = (d[g] === f || d[g] === E) && d[g + 1] === "" && d[g + 2] === F, fe = d[g] === F && d[g + 1] === "" && (d[g + 2] === f || d[g + 2] === E), Y = d[g] === F && d[g + 1] === "" && d[g + 2] === F, z = d[g] === f && d[g + 1] === "" && d[g + 2] === E || d[g] === E && d[g + 1] === "" && d[g + 2] === f;
2945
+ j && b || S || U || Y || z ? d.splice(g, 2) : fe && d.splice(g + 1, 2);
2946
+ }
2947
+ for (; d.length > 0 && _s(N(0, d, -1)); ) d.pop();
2948
+ for (; d.length > 1 && _s(d[0]) && _s(d[1]); ) d.shift(), d.shift();
2949
+ let B = [""];
2950
+ for (let [g, S] of d.entries()) {
2951
+ if (S === F) {
2952
+ if (g === 1 && Vi(d[g - 1])) {
2953
+ if (d.length === 2) {
2954
+ B.push([B.pop(), D]);
2955
+ continue;
2956
+ }
2957
+ B.push([D, E], "");
2958
+ continue;
2959
+ } else if (g === d.length - 1) {
2960
+ B.push([B.pop(), D]);
2961
+ continue;
2962
+ } else if (d[g - 1] === "" && d[g - 2] === E) {
2963
+ B.push([B.pop(), D]);
2964
+ continue;
2965
+ }
2966
+ }
2967
+ g % 2 === 0 ? B.push([B.pop(), S]) : B.push(S, ""), ne(S) && (c = true);
2968
+ }
2969
+ let O = b ? zr(B) : l(B, { shouldBreak: true });
2970
+ if (t.cursorNode?.type === "JSXText" && n.children.includes(t.cursorNode) ? O = [Tr, O, Tr] : t.nodeBeforeCursor?.type === "JSXText" && n.children.includes(t.nodeBeforeCursor) ? O = [Tr, O] : t.nodeAfterCursor?.type === "JSXText" && n.children.includes(t.nodeAfterCursor) && (O = [O, Tr]), y) return O;
2971
+ let h = l([s, m([E, O]), E, i]);
2972
+ return c ? h : nt([l([s, ...d, i]), h]);
2973
+ }
2974
+ function $l(e, t, r, n, s) {
2975
+ let i = "", o = [i];
2976
+ function u(c) {
2977
+ i = c, o.push([o.pop(), c]);
2978
+ }
2979
+ function p(c) {
2980
+ c !== "" && (i = c, o.push(c, ""));
2981
+ }
2982
+ return e.each(({ node: c, next: y }) => {
2983
+ if (c.type === "JSXText") {
2984
+ let D = pe(c);
2985
+ if (Br(c)) {
2986
+ let F = yn.split(D, true);
2987
+ F[0] === "" && (F.shift(), /\n/u.test(F[0]) ? p(lu(s, F[1], c, y)) : p(n), F.shift());
2988
+ let C;
2989
+ if (N(0, F, -1) === "" && (F.pop(), C = F.pop()), F.length === 0) return;
2990
+ for (let [d, b] of F.entries()) d % 2 === 1 ? p(A) : u(b);
2991
+ C !== void 0 ? /\n/u.test(C) ? p(lu(s, i, c, y)) : p(n) : p(cu(s, i, c, y));
2992
+ } else /\n/u.test(D) ? D.match(/\n/gu).length > 1 && p(E) : p(n);
2993
+ } else {
2994
+ let D = r();
2995
+ if (u(D), y && Br(y)) {
2996
+ let C = yn.trim(pe(y)), [d] = yn.split(C);
2997
+ p(cu(s, d, c, y));
2998
+ } else p(E);
2999
+ }
3000
+ }, "children"), o;
3001
+ }
3002
+ function cu(e, t, r, n) {
3003
+ return e ? "" : r.type === "JSXElement" && !r.closingElement || n?.type === "JSXElement" && !n.closingElement ? t.length === 1 ? f : E : f;
3004
+ }
3005
+ function lu(e, t, r, n) {
3006
+ return e ? E : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || n?.type === "JSXElement" && !n.closingElement ? E : f : E;
3007
+ }
3008
+ var Kl = k(["ArrayExpression", "JSXAttribute", "JSXElement", "JSXExpressionContainer", "JSXFragment", "ExpressionStatement", "NewExpression", "CallExpression", "OptionalCallExpression", "ConditionalExpression", "JsExpressionRoot", "MatchExpressionCase"]);
3009
+ function Ql(e, t, r) {
3010
+ let { parent: n } = e;
3011
+ if (Kl(n)) return t;
3012
+ let s = zl(e), i = ge(e, r);
3013
+ return l([i ? "" : P("("), m([f, t]), f, i ? "" : P(")")], { shouldBreak: s });
3014
+ }
3015
+ function zl(e) {
3016
+ return e.match(void 0, (t, r) => r === "body" && t.type === "ArrowFunctionExpression", (t, r) => r === "arguments" && M(t)) && (e.match(void 0, void 0, void 0, (t, r) => r === "expression" && t.type === "JSXExpressionContainer") || e.match(void 0, void 0, void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "expression" && t.type === "JSXExpressionContainer"));
3017
+ }
3018
+ function Zl(e, t, r) {
3019
+ let { node: n } = e, s = [r("name")];
3020
+ if (n.value) {
3021
+ let i;
3022
+ if (V(n.value)) {
3023
+ let o = pe(n.value), u = W(0, W(0, o.slice(1, -1), "&apos;", "'"), "&quot;", '"'), p = wr(u, t.jsxSingleQuote);
3024
+ u = p === '"' ? W(0, u, '"', "&quot;") : W(0, u, "'", "&apos;"), i = e.call(() => De(e, qe(p + u + p), t), "value");
3025
+ } else i = r("value");
3026
+ s.push("=", i);
3027
+ }
3028
+ return s;
3029
+ }
3030
+ function em(e, t, r) {
3031
+ let { node: n } = e, s = (i, o) => i.type === "JSXEmptyExpression" || !T(i) && (q(i) || se(i) || i.type === "ArrowFunctionExpression" || i.type === "AwaitExpression" && (s(i.argument, i) || i.argument.type === "JSXElement") || M(i) || i.type === "ChainExpression" && M(i.expression) || i.type === "FunctionExpression" || i.type === "TemplateLiteral" || i.type === "TaggedTemplateExpression" || i.type === "DoExpression" || H(o) && (i.type === "ConditionalExpression" || Te(i)));
3032
+ return s(n.expression, e.parent) ? l(["{", r("expression"), je, "}"]) : l(["{", m([f, r("expression")]), f, je, "}"]);
3033
+ }
3034
+ function tm(e, t, r) {
3035
+ let { node: n } = e, s = T(n.name) || T(n.typeArguments);
3036
+ if (n.selfClosing && n.attributes.length === 0 && !s) return ["<", r("name"), r("typeArguments"), " />"];
3037
+ if (n.attributes?.length === 1 && V(n.attributes[0].value) && !n.attributes[0].value.value.includes(`
3038
+ `) && !s && !T(n.attributes[0])) return l(["<", r("name"), r("typeArguments"), " ", ...e.map(r, "attributes"), n.selfClosing ? " />" : ">"]);
3039
+ let i = n.attributes?.some((u) => V(u.value) && u.value.value.includes(`
3040
+ `)), o = t.singleAttributePerLine && n.attributes.length > 1 ? E : A;
3041
+ return l(["<", r("name"), r("typeArguments"), m(e.map(() => [o, r()], "attributes")), ...rm(n, t, s)], { shouldBreak: i });
3042
+ }
3043
+ function rm(e, t, r) {
3044
+ return e.selfClosing ? [A, "/>"] : nm(e, t, r) ? [">"] : [f, ">"];
3045
+ }
3046
+ function nm(e, t, r) {
3047
+ let n = e.attributes.length > 0 && T(N(0, e.attributes, -1), x.Trailing);
3048
+ return e.attributes.length === 0 && !r || (t.bracketSameLine || t.jsxBracketSameLine) && (!r || e.attributes.length > 0) && !n;
3049
+ }
3050
+ function sm(e, t, r) {
3051
+ let { node: n } = e, s = ["</"], i = r("name");
3052
+ return T(n.name, x.Leading | x.Line) ? s.push(m([E, i]), E) : T(n.name, x.Leading | x.Block) ? s.push(" ", i) : s.push(i), s.push(">"), s;
3053
+ }
3054
+ function im(e, t) {
3055
+ let { node: r } = e, n = T(r), s = T(r, x.Line), i = r.type === "JSXOpeningFragment";
3056
+ return [i ? "<" : "</", m([s ? E : n && !i ? " " : "", v(e, t)]), s ? E : "", ">"];
3057
+ }
3058
+ function om(e, t, r) {
3059
+ let n = De(e, Vl(e, t, r), t);
3060
+ return Ql(e, n, t);
3061
+ }
3062
+ function um(e, t) {
3063
+ let { node: r } = e, n = T(r, x.Line);
3064
+ return [v(e, t, { indent: n }), n ? E : ""];
3065
+ }
3066
+ function am(e, t, r) {
3067
+ let { node: n } = e;
3068
+ return ["{", e.call(({ node: s }) => {
3069
+ let i = ["...", r()];
3070
+ return T(s) ? [m([f, De(e, i, t)]), f] : i;
3071
+ }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"];
3072
+ }
3073
+ function mu(e, t, r) {
3074
+ let { node: n } = e;
3075
+ if (n.type.startsWith("JSX")) switch (n.type) {
3076
+ case "JSXAttribute":
3077
+ return Zl(e, t, r);
3078
+ case "JSXIdentifier":
3079
+ return n.name;
3080
+ case "JSXNamespacedName":
3081
+ return L(":", [r("namespace"), r("name")]);
3082
+ case "JSXMemberExpression":
3083
+ return L(".", [r("object"), r("property")]);
3084
+ case "JSXSpreadAttribute":
3085
+ case "JSXSpreadChild":
3086
+ return am(e, t, r);
3087
+ case "JSXExpressionContainer":
3088
+ return em(e, t, r);
3089
+ case "JSXFragment":
3090
+ case "JSXElement":
3091
+ return om(e, t, r);
3092
+ case "JSXOpeningElement":
3093
+ return tm(e, t, r);
3094
+ case "JSXClosingElement":
3095
+ return sm(e, t, r);
3096
+ case "JSXOpeningFragment":
3097
+ case "JSXClosingFragment":
3098
+ return im(e, t);
3099
+ case "JSXEmptyExpression":
3100
+ return um(e, t);
3101
+ case "JSXText":
3102
+ throw new Error("JSXText should be handled by JSXElement");
3103
+ default:
3104
+ throw new Qe(n, "JSX");
3105
+ }
3106
+ }
3107
+ function pm(e) {
3108
+ if (e.children.length === 0) return true;
3109
+ if (e.children.length > 1) return false;
3110
+ let t = e.children[0];
3111
+ return t.type === "JSXText" && !Br(t);
3112
+ }
3113
+ function Br(e) {
3114
+ return e.type === "JSXText" && (yn.hasNonWhitespaceCharacter(pe(e)) || !/\n/u.test(pe(e)));
3115
+ }
3116
+ function cm(e) {
3117
+ return e.type === "JSXExpressionContainer" && V(e.expression) && e.expression.value === " " && !T(e.expression);
3118
+ }
3119
+ function Du(e) {
3120
+ let { node: t, parent: r } = e;
3121
+ if (!H(t) || !H(r)) return false;
3122
+ let { index: n, siblings: s } = e, i;
3123
+ for (let o = n; o > 0; o--) {
3124
+ let u = s[o - 1];
3125
+ if (!(u.type === "JSXText" && !Br(u))) {
3126
+ i = u;
3127
+ break;
3128
+ }
3129
+ }
3130
+ return i?.type === "JSXExpressionContainer" && i.expression.type === "JSXEmptyExpression" && Ot(i.expression);
3131
+ }
3132
+ function lm(e) {
3133
+ return Ot(e.node) || Du(e);
3134
+ }
3135
+ var nr = lm;
3136
+ function yu(e, t, r) {
3137
+ let { node: n } = e;
3138
+ if (n.type.startsWith("NG")) switch (n.type) {
3139
+ case "NGRoot":
3140
+ return r("node");
3141
+ case "NGPipeExpression":
3142
+ return on(e, t, r);
3143
+ case "NGChainedExpression":
3144
+ return l(L([";", A], e.map(() => fm(e) ? r() : ["(", r(), ")"], "expressions")));
3145
+ case "NGEmptyExpression":
3146
+ return "";
3147
+ case "NGMicrosyntax":
3148
+ return e.map(() => [e.isFirst ? "" : fu(e) ? " " : [";", A], r()], "body");
3149
+ case "NGMicrosyntaxKey":
3150
+ return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name) ? n.name : JSON.stringify(n.name);
3151
+ case "NGMicrosyntaxExpression":
3152
+ return [r("expression"), n.alias === null ? "" : [" as ", r("alias")]];
3153
+ case "NGMicrosyntaxKeyedExpression": {
3154
+ let { index: s, parent: i } = e, o = fu(e) || mm(e) || (s === 1 && (n.key.name === "then" || n.key.name === "else" || n.key.name === "as") || s === 2 && (n.key.name === "else" && i.body[s - 1].type === "NGMicrosyntaxKeyedExpression" && i.body[s - 1].key.name === "then" || n.key.name === "track")) && i.body[0].type === "NGMicrosyntaxExpression";
3155
+ return [r("key"), o ? " " : ": ", r("expression")];
3156
+ }
3157
+ case "NGMicrosyntaxLet":
3158
+ return ["let ", r("key"), n.value === null ? "" : [" = ", r("value")]];
3159
+ case "NGMicrosyntaxAs":
3160
+ return [r("key"), " as ", r("alias")];
3161
+ default:
3162
+ throw new Qe(n, "Angular");
3163
+ }
3164
+ }
3165
+ function fu({ node: e, index: t }) {
3166
+ return e.type === "NGMicrosyntaxKeyedExpression" && e.key.name === "of" && t === 1;
3167
+ }
3168
+ function mm(e) {
3169
+ let { node: t } = e;
3170
+ return e.parent.body[1].key.name === "of" && t.type === "NGMicrosyntaxKeyedExpression" && t.key.name === "track" && t.key.type === "NGMicrosyntaxKey";
3171
+ }
3172
+ var Dm = k(["CallExpression", "OptionalCallExpression", "AssignmentExpression"]);
3173
+ function fm({ node: e }) {
3174
+ return Er(e, Dm);
3175
+ }
3176
+ function Ms(e, t, r) {
3177
+ let { node: n } = e;
3178
+ return l([L(A, e.map(r, "decorators")), du(n, t) ? E : A]);
3179
+ }
3180
+ function Eu(e, t, r) {
3181
+ return Cu(e.node) ? [L(E, e.map(r, "declaration", "decorators")), E] : "";
3182
+ }
3183
+ function Fu(e, t, r) {
3184
+ let { node: n, parent: s } = e, { decorators: i } = n;
3185
+ if (!R(i) || Cu(s) || nr(e)) return "";
3186
+ let o = n.type === "ClassExpression" || n.type === "ClassDeclaration" || du(n, t);
3187
+ return [e.key === "declaration" && Di(s) ? E : o ? ke : "", L(A, e.map(r, "decorators")), A];
3188
+ }
3189
+ function du(e, t) {
3190
+ return e.decorators.some((r) => Z(t.originalText, I(r)));
3191
+ }
3192
+ function Cu(e) {
3193
+ if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return false;
3194
+ let t = e.declaration?.decorators;
3195
+ return R(t) && bt(e, t[0]);
3196
+ }
3197
+ var Ns = /* @__PURE__ */ new WeakMap();
3198
+ function Au(e) {
3199
+ return Ns.has(e) || Ns.set(e, e.type === "ConditionalExpression" && !ye(e, (t) => t.type === "ObjectExpression")), Ns.get(e);
3200
+ }
3201
+ var ym = (e) => e.type === "SequenceExpression";
3202
+ function Tu(e, t, r, n = {}) {
3203
+ let s = [], i, o = [], u = false, p = !n.expandLastArg && e.node.body.type === "ArrowFunctionExpression", c;
3204
+ (function O() {
3205
+ let { node: h } = e, g = Em(e, t, r, n);
3206
+ if (s.length === 0) s.push(g);
3207
+ else {
3208
+ let { leading: S, trailing: j } = Mt(e, t);
3209
+ s.push([S, g]), o.unshift(j);
3210
+ }
3211
+ p && (u || (u = h.returnType && K(h).length > 0 || h.typeParameters || K(h).some((S) => S.type !== "Identifier"))), !p || h.body.type !== "ArrowFunctionExpression" ? (i = r("body", n), c = h.body) : e.call(O, "body");
3212
+ })();
3213
+ let y = !Ee(t.originalText, c) && (ym(c) || Fm(c, i, t) || !u && Au(c)), D = e.key === "callee" && Dt(e.parent), F = /* @__PURE__ */ Symbol("arrow-chain"), C = dm(e, n, { signatureDocs: s, shouldBreak: u }), d = false, b = false, B = false;
3214
+ return p && (D || n.assignmentLayout) && (b = true, B = !T(e.node, x.Leading & x.Line), d = n.assignmentLayout === "chain-tail-arrow-chain" || D && !y), i = Cm(e, t, n, { bodyDoc: i, bodyComments: o, functionBody: c, shouldPutBodyOnSameLine: y }), l([l(b ? m([B ? f : "", C]) : C, { shouldBreak: d, id: F }), " =>", p ? yt(i, { groupId: F }) : l(i), p && D ? P(f, "", { groupId: F }) : ""]);
3215
+ }
3216
+ function Em(e, t, r, n) {
3217
+ let { node: s } = e, i = [];
3218
+ if (s.async && i.push("async "), fn(e, t)) i.push(r(["params", 0]));
3219
+ else {
3220
+ let u = n.expandLastArg || n.expandFirstArg, p = rr(e, r);
3221
+ if (u) {
3222
+ if (ne(p)) throw new Et();
3223
+ p = l(_t(p));
3224
+ }
3225
+ i.push(l([Ke(e, t, r, u, true), p]));
3226
+ }
3227
+ let o = v(e, t, { filter(u) {
3228
+ let p = at(t.originalText, I(u));
3229
+ return p !== false && t.originalText.slice(p, p + 2) === "=>";
3230
+ } });
3231
+ return o && i.push(" ", o), i;
3232
+ }
3233
+ function Fm(e, t, r) {
3234
+ return q(e) || se(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || H(e) || t.label?.hug !== false && (t.label?.embed || Wr(e, r.originalText));
3235
+ }
3236
+ function dm(e, t, { signatureDocs: r, shouldBreak: n }) {
3237
+ if (r.length === 1) return r[0];
3238
+ let { parent: s, key: i } = e;
3239
+ return i !== "callee" && Dt(s) || Te(s) ? l([r[0], " =>", m([A, L([" =>", A], r.slice(1))])], { shouldBreak: n }) : i === "callee" && Dt(s) || t.assignmentLayout ? l(L([" =>", A], r), { shouldBreak: n }) : l(m(L([" =>", A], r)), { shouldBreak: n });
3240
+ }
3241
+ function Cm(e, t, r, { bodyDoc: n, bodyComments: s, functionBody: i, shouldPutBodyOnSameLine: o }) {
3242
+ let { node: u, parent: p } = e, c = r.expandLastArg && ie(t, "all") ? P(",") : "", y = (r.expandLastArg || p.type === "JSXExpressionContainer") && !T(u) ? f : "";
3243
+ return o && Au(i) ? [" ", l([P("", "("), m([f, n]), P("", ")"), c, y]), s] : o ? [" ", n, s] : [m([A, n, s]), c, y];
3244
+ }
3245
+ var Am = Array.prototype.findLast ?? function(e) {
3246
+ for (let t = this.length - 1; t >= 0; t--) {
3247
+ let r = this[t];
3248
+ if (e(r, t, this)) return r;
3249
+ }
3250
+ };
3251
+ var Tm = Wt("findLast", function() {
3252
+ if (Array.isArray(this)) return Am;
3253
+ });
3254
+ var xu = Tm;
3255
+ function br(e, t, r, n) {
3256
+ let { node: s } = e, i = [], o = xu(0, s[n], (u) => u.type !== "EmptyStatement");
3257
+ return e.each(({ node: u }) => {
3258
+ u.type !== "EmptyStatement" && (i.push(r()), u !== o && (i.push(E), oe(u, t) && i.push(E)));
3259
+ }, n), i;
3260
+ }
3261
+ function En(e, t, r) {
3262
+ let n = xm(e, t, r), { node: s, parent: i } = e;
3263
+ if (s.type === "Program" && i?.type !== "ModuleExpression") return n ? [n, E] : "";
3264
+ let o = [];
3265
+ if (s.type === "StaticBlock" && o.push("static "), o.push("{"), n) o.push(m([E, n]), E);
3266
+ else {
3267
+ let u = e.grandparent;
3268
+ i.type === "ArrowFunctionExpression" || i.type === "FunctionExpression" || i.type === "FunctionDeclaration" || i.type === "ComponentDeclaration" || i.type === "HookDeclaration" || i.type === "ObjectMethod" || i.type === "ClassMethod" || i.type === "ClassPrivateMethod" || i.type === "ForStatement" || i.type === "WhileStatement" || i.type === "DoWhileStatement" || i.type === "DoExpression" || i.type === "ModuleExpression" || i.type === "CatchClause" && !u.finalizer || i.type === "TSModuleDeclaration" || i.type === "MatchStatementCase" || s.type === "StaticBlock" || o.push(E);
3269
+ }
3270
+ return o.push("}"), o;
3271
+ }
3272
+ function xm(e, t, r) {
3273
+ let { node: n } = e, s = R(n.directives), i = n.body.some((p) => p.type !== "EmptyStatement"), o = T(n, x.Dangling);
3274
+ if (!s && !i && !o) return "";
3275
+ let u = [];
3276
+ return s && (u.push(br(e, t, r, "directives")), (i || o) && (u.push(E), oe(N(0, n.directives, -1), t) && u.push(E))), i && u.push(br(e, t, r, "body")), o && u.push(v(e, t)), u;
3277
+ }
3278
+ function gm(e) {
3279
+ let t = /* @__PURE__ */ new WeakMap();
3280
+ return function(r) {
3281
+ return t.has(r) || t.set(r, Symbol(e)), t.get(r);
3282
+ };
3283
+ }
3284
+ var gu = gm;
3285
+ function Rt(e, t, r) {
3286
+ let { node: n } = e, s = [], i = n.type === "ObjectTypeAnnotation", o = !Su(e), u = o ? A : E, p = T(n, x.Dangling), [c, y] = i && n.exact ? ["{|", "|}"] : "{}", D;
3287
+ if (hm(e, ({ node: F, next: C, isLast: d }) => {
3288
+ if (D ?? (D = F), s.push(r()), o && i) {
3289
+ let { parent: b } = e;
3290
+ b.inexact || !d ? s.push(",") : ie(t) && s.push(P(","));
3291
+ }
3292
+ !o && (Sm({ node: F, next: C }, t) || bu({ node: F, next: C }, t)) && s.push(";"), d || (s.push(u), oe(F, t) && s.push(E));
3293
+ }), p && s.push(v(e, t)), n.type === "ObjectTypeAnnotation" && n.inexact) {
3294
+ let F;
3295
+ T(n, x.Dangling) ? F = [T(n, x.Line) || Z(t.originalText, I(N(0, et(n), -1))) ? E : A, "..."] : F = [D ? A : "", "..."], s.push(F);
3296
+ }
3297
+ if (o) {
3298
+ let F = p || t.objectWrap === "preserve" && D && ue(t.originalText, w(n), w(D)), C;
3299
+ if (s.length === 0) C = c + y;
3300
+ else {
3301
+ let d = t.bracketSpacing ? A : f;
3302
+ C = [c, m([d, ...s]), d, y];
3303
+ }
3304
+ return e.match(void 0, (d, b) => b === "typeAnnotation", (d, b) => b === "typeAnnotation", Nt) || e.match(void 0, (d, b) => d.type === "FunctionTypeParam" && b === "typeAnnotation", Nt) ? C : l(C, { shouldBreak: F });
3305
+ }
3306
+ return [c, s.length > 0 ? [m([E, s]), E] : "", y];
3307
+ }
3308
+ function Su(e) {
3309
+ let { node: t } = e;
3310
+ if (t.type === "ObjectTypeAnnotation") {
3311
+ let { key: r, parent: n } = e;
3312
+ return r === "body" && (n.type === "InterfaceDeclaration" || n.type === "DeclareInterface" || n.type === "DeclareClass");
3313
+ }
3314
+ return t.type === "ClassBody" || t.type === "TSInterfaceBody";
3315
+ }
3316
+ function hm(e, t) {
3317
+ let { node: r } = e;
3318
+ if (r.type === "ClassBody" || r.type === "TSInterfaceBody") {
3319
+ e.each(t, "body");
3320
+ return;
3321
+ }
3322
+ if (r.type === "TSTypeLiteral") {
3323
+ e.each(t, "members");
3324
+ return;
3325
+ }
3326
+ if (r.type === "ObjectTypeAnnotation") {
3327
+ let n = ["properties", "indexers", "callProperties", "internalSlots"].flatMap((s) => e.map(({ node: i, index: o }) => ({ node: i, loc: w(i), selector: [s, o] }), s)).sort((s, i) => s.loc - i.loc);
3328
+ for (let [s, { node: i, selector: o }] of n.entries()) e.call(() => t({ node: i, next: n[s + 1]?.node, isLast: s === n.length - 1 }), ...o);
3329
+ }
3330
+ }
3331
+ function he(e, t) {
3332
+ let { parent: r } = e;
3333
+ return e.callParent(Su) ? t.semi || r.type === "ObjectTypeAnnotation" ? ";" : "" : r.type === "TSTypeLiteral" ? e.isLast ? t.semi ? P(";") : "" : t.semi || bu({ node: e.node, next: e.next }, t) ? ";" : P("", ";") : "";
3334
+ }
3335
+ var hu = k(["ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
3336
+ var Bu = (e) => {
3337
+ if (e.computed || e.typeAnnotation) return false;
3338
+ let { type: t, name: r } = e.key;
3339
+ return t === "Identifier" && (r === "static" || r === "get" || r === "set");
3340
+ };
3341
+ function Sm({ node: e, next: t }, r) {
3342
+ if (r.semi || !hu(e)) return false;
3343
+ if (!e.value && Bu(e)) return true;
3344
+ if (!t || t.static || t.accessibility || t.readonly) return false;
3345
+ if (!t.computed) {
3346
+ let n = t.key?.name;
3347
+ if (n === "in" || n === "instanceof") return true;
3348
+ }
3349
+ if (hu(t) && t.variance && !t.static && !t.declare) return true;
3350
+ switch (t.type) {
3351
+ case "ClassProperty":
3352
+ case "PropertyDefinition":
3353
+ case "TSAbstractPropertyDefinition":
3354
+ return t.computed;
3355
+ case "MethodDefinition":
3356
+ case "TSAbstractMethodDefinition":
3357
+ case "ClassMethod":
3358
+ case "ClassPrivateMethod": {
3359
+ if ((t.value ? t.value.async : t.async) || t.kind === "get" || t.kind === "set") return false;
3360
+ let s = t.value ? t.value.generator : t.generator;
3361
+ return !!(t.computed || s);
3362
+ }
3363
+ case "TSIndexSignature":
3364
+ return true;
3365
+ }
3366
+ return false;
3367
+ }
3368
+ var Bm = k(["TSPropertySignature"]);
3369
+ function bu({ node: e, next: t }, r) {
3370
+ if (r.semi || !Bm(e)) return false;
3371
+ if (Bu(e)) return true;
3372
+ if (!t) return false;
3373
+ switch (t.type) {
3374
+ case "TSCallSignatureDeclaration":
3375
+ return true;
3376
+ }
3377
+ return false;
3378
+ }
3379
+ var bm = gu("heritageGroup");
3380
+ var Pm = k(["TSInterfaceDeclaration", "DeclareInterface", "InterfaceDeclaration", "InterfaceTypeAnnotation"]);
3381
+ function sr(e, t, r) {
3382
+ let { node: n } = e, s = Pm(n), i = [Q(e), Zt(e), s ? "interface" : "class"], o = ku(e), u = [], p = [];
3383
+ if (n.type !== "InterfaceTypeAnnotation") {
3384
+ n.id && u.push(" ");
3385
+ for (let y of ["id", "typeParameters"]) if (n[y]) {
3386
+ let { leading: D, trailing: F } = e.call(() => Mt(e, t), y);
3387
+ u.push(D, r(y), m(F));
3388
+ }
3389
+ }
3390
+ if (n.superClass) {
3391
+ let y = [Lm(e, t, r), r(n.superTypeArguments ? "superTypeArguments" : "superTypeParameters")], D = e.call(() => ["extends ", De(e, y, t)], "superClass");
3392
+ o ? p.push(A, l(D)) : p.push(" ", D);
3393
+ } else p.push(vs(e, t, r, "extends"));
3394
+ p.push(vs(e, t, r, "mixins"), vs(e, t, r, "implements"));
3395
+ let c;
3396
+ return o ? (c = bm(n), i.push(l([...u, m(p)], { id: c }))) : i.push(...u, ...p), !s && o && km(n.body) ? i.push(P(E, " ", { groupId: c })) : i.push(" "), i.push(r("body")), i;
3397
+ }
3398
+ function km(e) {
3399
+ return e.type === "ObjectTypeAnnotation" ? ["properties", "indexers", "callProperties", "internalSlots"].some((t) => R(e[t])) : R(e.body);
3400
+ }
3401
+ function Pu(e) {
3402
+ let t = e.superClass ? 1 : 0;
3403
+ for (let r of ["extends", "mixins", "implements"]) if (Array.isArray(e[r]) && (t += e[r].length), t > 1) return true;
3404
+ return t > 1;
3405
+ }
3406
+ function Im(e) {
3407
+ let { node: t } = e;
3408
+ if (T(t.id, x.Trailing) || T(t.typeParameters, x.Trailing) || T(t.superClass) || Pu(t)) return true;
3409
+ if (t.superClass) return e.parent.type === "AssignmentExpression" ? false : !(t.superTypeArguments ?? t.superTypeParameters) && J(t.superClass);
3410
+ let r = t.extends?.[0] ?? t.mixins?.[0] ?? t.implements?.[0];
3411
+ return r ? r.type === "InterfaceExtends" && r.id.type === "QualifiedTypeIdentifier" && !r.typeParameters || (r.type === "TSClassImplements" || r.type === "TSInterfaceHeritage") && J(r.expression) && !r.typeArguments : false;
3412
+ }
3413
+ var js = /* @__PURE__ */ new WeakMap();
3414
+ function ku(e) {
3415
+ let { node: t } = e;
3416
+ return js.has(t) || js.set(t, Im(e)), js.get(t);
3417
+ }
3418
+ function vs(e, t, r, n) {
3419
+ let { node: s } = e;
3420
+ if (!R(s[n])) return "";
3421
+ let i = v(e, t, { marker: n }), o = L([",", A], e.map(r, n));
3422
+ if (!Pu(s)) {
3423
+ let u = [`${n} `, i, o];
3424
+ return ku(e) ? [A, l(u)] : [" ", u];
3425
+ }
3426
+ return [A, i, i && E, n, l(m([A, o]))];
3427
+ }
3428
+ function Lm(e, t, r) {
3429
+ let n = r("superClass"), { parent: s } = e;
3430
+ return s.type === "AssignmentExpression" ? l(P(["(", m([f, n]), f, ")"], n)) : n;
3431
+ }
3432
+ function Fn(e, t, r) {
3433
+ let { node: n } = e, s = [];
3434
+ return R(n.decorators) && s.push(Ms(e, t, r)), s.push(jt(n)), n.static && s.push("static "), s.push(Zt(e)), n.override && s.push("override "), s.push(Sr(e, t, r)), s;
3435
+ }
3436
+ function dn(e, t, r) {
3437
+ let { node: n } = e, s = [];
3438
+ R(n.decorators) && s.push(Ms(e, t, r)), s.push(Q(e), jt(n)), n.static && s.push("static "), s.push(Zt(e)), n.override && s.push("override "), n.readonly && s.push("readonly "), n.variance && s.push(r("variance")), (n.type === "ClassAccessorProperty" || n.type === "AccessorProperty" || n.type === "TSAbstractAccessorProperty") && s.push("accessor "), s.push(Ct(e, t, r), X(e), sn(e), G(e, r));
3439
+ let i = n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty";
3440
+ return [ht(e, t, r, s, " =", i ? void 0 : "value"), t.semi ? ";" : ""];
3441
+ }
3442
+ var Om = k(["TSAsExpression", "TSTypeAssertion", "TSNonNullExpression", "TSInstantiationExpression", "TSSatisfiesExpression"]);
3443
+ function Rs(e) {
3444
+ return Om(e) ? Rs(e.expression) : e;
3445
+ }
3446
+ var Iu = k(["FunctionExpression", "ArrowFunctionExpression"]);
3447
+ function Lu(e) {
3448
+ return e.type === "MemberExpression" || e.type === "OptionalMemberExpression" || e.type === "Identifier" && e.name !== "undefined";
3449
+ }
3450
+ function wm(e, t) {
3451
+ if (Is(e, t)) {
3452
+ let r = Rs(e.node.expression);
3453
+ return Iu(r) || Lu(r);
3454
+ }
3455
+ return !(!t.semi || Ps(e, t) || ks(e, t));
3456
+ }
3457
+ function Ou(e, t, r) {
3458
+ return [r("expression"), wm(e, t) ? ";" : ""];
3459
+ }
3460
+ function wu(e, t, r) {
3461
+ if (t.__isVueBindings || t.__isVueForBindingLeft) {
3462
+ let n = e.map(r, "program", "body", 0, "params");
3463
+ if (n.length === 1) return n[0];
3464
+ let s = L([",", A], n);
3465
+ return t.__isVueForBindingLeft ? ["(", m([f, l(s)]), f, ")"] : s;
3466
+ }
3467
+ if (t.__isEmbeddedTypescriptGenericParameters) {
3468
+ let n = e.map(r, "program", "body", 0, "typeParameters", "params");
3469
+ return L([",", A], n);
3470
+ }
3471
+ }
3472
+ function Nu(e, t) {
3473
+ let { node: r } = e;
3474
+ switch (r.type) {
3475
+ case "RegExpLiteral":
3476
+ return _u(r);
3477
+ case "BigIntLiteral":
3478
+ return Cn(r.extra.raw);
3479
+ case "NumericLiteral":
3480
+ return dt(r.extra.raw);
3481
+ case "StringLiteral":
3482
+ return qe(ut(r.extra.raw, t));
3483
+ case "NullLiteral":
3484
+ return "null";
3485
+ case "BooleanLiteral":
3486
+ return String(r.value);
3487
+ case "DirectiveLiteral":
3488
+ return Mu(r.extra.raw, t);
3489
+ case "Literal": {
3490
+ if (r.regex) return _u(r.regex);
3491
+ if (r.bigint) return Cn(r.raw);
3492
+ let { value: n } = r;
3493
+ return typeof n == "number" ? dt(r.raw) : typeof n == "string" ? _m(e) ? Mu(r.raw, t) : qe(ut(r.raw, t)) : String(n);
3494
+ }
3495
+ }
3496
+ }
3497
+ function _m(e) {
3498
+ if (e.key !== "expression") return;
3499
+ let { parent: t } = e;
3500
+ return t.type === "ExpressionStatement" && typeof t.directive == "string";
3501
+ }
3502
+ function Cn(e) {
3503
+ return e.toLowerCase();
3504
+ }
3505
+ function _u({ pattern: e, flags: t }) {
3506
+ return t = [...t].sort().join(""), `/${e}/${t}`;
3507
+ }
3508
+ var Mm = "use strict";
3509
+ function Mu(e, t) {
3510
+ let r = e.slice(1, -1);
3511
+ if (r === Mm || !(r.includes('"') || r.includes("'"))) {
3512
+ let n = t.singleQuote ? "'" : '"';
3513
+ return n + r + n;
3514
+ }
3515
+ return e;
3516
+ }
3517
+ function Nm(e, t, r) {
3518
+ let n = e.originalText.slice(t, r);
3519
+ for (let s of e[/* @__PURE__ */ Symbol.for("comments")]) {
3520
+ let i = w(s);
3521
+ if (i > r) break;
3522
+ let o = I(s);
3523
+ if (o < t) continue;
3524
+ let u = i - t, p = o - t;
3525
+ n = n.slice(0, u) + W(0, n.slice(u, p), /[^\n]/gu, " ") + n.slice(p);
3526
+ }
3527
+ return n;
3528
+ }
3529
+ var Jt = Nm;
3530
+ var ju = k(["ImportDeclaration", "ExportDefaultDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "DeclareExportDeclaration", "DeclareExportAllDeclaration"]);
3531
+ var jm = k(["EnumBooleanBody", "EnumNumberBody", "EnumBigIntBody", "EnumStringBody", "EnumSymbolBody"]);
3532
+ function ir(e, t, r) {
3533
+ let { node: n, parent: s } = e, i = jm(n), o = n.type === "TSEnumBody" || i, u = ju(n), p = i && n.hasUnknownMembers, c = o ? "members" : u ? "attributes" : "properties", y = n[c], D = o || n.type === "ObjectPattern" && s.type !== "FunctionDeclaration" && s.type !== "FunctionExpression" && s.type !== "ArrowFunctionExpression" && s.type !== "ObjectMethod" && s.type !== "ClassMethod" && s.type !== "ClassPrivateMethod" && s.type !== "AssignmentPattern" && s.type !== "CatchClause" && n.properties.some((B) => B.value && (B.value.type === "ObjectPattern" || B.value.type === "ArrayPattern")) || n.type !== "ObjectPattern" && t.objectWrap === "preserve" && y.length > 0 && vm(n, y[0], t), F = [], C = e.map(({ node: B }) => {
3534
+ let O = [...F, l(r())];
3535
+ return F = [",", A], oe(B, t) && F.push(E), O;
3536
+ }, c);
3537
+ if (p) {
3538
+ let B;
3539
+ if (T(n, x.Dangling)) {
3540
+ let O = T(n, x.Line);
3541
+ B = [v(e, t), O || Z(t.originalText, I(N(0, et(n), -1))) ? E : A, "..."];
3542
+ } else B = ["..."];
3543
+ C.push([...F, ...B]);
3544
+ }
3545
+ let d = !(p || N(0, y, -1)?.type === "RestElement"), b;
3546
+ if (C.length === 0) {
3547
+ if (!T(n, x.Dangling)) return ["{}", G(e, r)];
3548
+ b = l(["{", v(e, t, { indent: true }), f, "}", X(e), G(e, r)]);
3549
+ } else {
3550
+ let B = t.bracketSpacing ? A : f;
3551
+ b = ["{", m([B, ...C]), P(d && ie(t) ? "," : ""), B, "}", X(e), G(e, r)];
3552
+ }
3553
+ return e.match((B) => B.type === "ObjectPattern" && !R(B.decorators), Nt) || Je(n) && (e.match(void 0, (B, O) => O === "typeAnnotation", (B, O) => O === "typeAnnotation", Nt) || e.match(void 0, (B, O) => B.type === "FunctionTypeParam" && O === "typeAnnotation", Nt)) || !D && e.match((B) => B.type === "ObjectPattern", (B) => B.type === "AssignmentExpression" || B.type === "VariableDeclarator") ? b : l(b, { shouldBreak: D });
3554
+ }
3555
+ function vm(e, t, r) {
3556
+ let n = r.originalText, s = w(e), i = w(t);
3557
+ if (ju(e)) {
3558
+ let o = w(e), u = Jt(r, o, i);
3559
+ s = o + u.lastIndexOf("{");
3560
+ }
3561
+ return ue(n, s, i);
3562
+ }
3563
+ function vu(e, t, r) {
3564
+ let { node: n } = e;
3565
+ return ["import", n.phase ? ` ${n.phase}` : "", Gs(n), Gu(e, t, r), Ju(e, t, r), qu(e, t, r), t.semi ? ";" : ""];
3566
+ }
3567
+ var Ru = (e) => e.type === "ExportDefaultDeclaration" || e.type === "DeclareExportDeclaration" && e.default;
3568
+ function An(e, t, r) {
3569
+ let { node: n } = e, s = [Eu(e, t, r), Q(e), "export", Ru(n) ? " default" : ""], { declaration: i, exported: o } = n;
3570
+ return T(n, x.Dangling) && (s.push(" ", v(e, t)), qr(n) && s.push(E)), i ? s.push(" ", r("declaration")) : (s.push(Gm(n)), n.type === "ExportAllDeclaration" || n.type === "DeclareExportAllDeclaration" ? (s.push(" *"), o && s.push(" as ", r("exported"))) : s.push(Gu(e, t, r)), s.push(Ju(e, t, r), qu(e, t, r))), s.push(Jm(n, t)), s;
3571
+ }
3572
+ var Rm = k(["ClassDeclaration", "ComponentDeclaration", "FunctionDeclaration", "TSInterfaceDeclaration", "DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "HookDeclaration", "TSDeclareFunction", "EnumDeclaration"]);
3573
+ function Jm(e, t) {
3574
+ return t.semi && (!e.declaration || Ru(e) && !Rm(e.declaration)) ? ";" : "";
3575
+ }
3576
+ function Js(e, t = true) {
3577
+ return e && e !== "value" ? `${t ? " " : ""}${e}${t ? "" : " "}` : "";
3578
+ }
3579
+ function Gs(e, t) {
3580
+ return Js(e.importKind, t);
3581
+ }
3582
+ function Gm(e) {
3583
+ return Js(e.exportKind);
3584
+ }
3585
+ function Ju(e, t, r) {
3586
+ let { node: n } = e;
3587
+ return n.source ? [Wu(n, t) ? " from" : "", " ", r("source")] : "";
3588
+ }
3589
+ function Gu(e, t, r) {
3590
+ let { node: n } = e;
3591
+ if (!Wu(n, t)) return "";
3592
+ let s = [" "];
3593
+ if (R(n.specifiers)) {
3594
+ let i = [], o = [];
3595
+ e.each(() => {
3596
+ let u = e.node.type;
3597
+ if (u === "ExportNamespaceSpecifier" || u === "ExportDefaultSpecifier" || u === "ImportNamespaceSpecifier" || u === "ImportDefaultSpecifier") i.push(r());
3598
+ else if (u === "ExportSpecifier" || u === "ImportSpecifier") o.push(r());
3599
+ else throw new Qe(n, "specifier");
3600
+ }, "specifiers"), s.push(L(", ", i)), o.length > 0 && (i.length > 0 && s.push(", "), o.length > 1 || i.length > 0 || n.specifiers.some((p) => T(p)) ? s.push(l(["{", m([t.bracketSpacing ? A : f, L([",", A], o)]), P(ie(t) ? "," : ""), t.bracketSpacing ? A : f, "}"])) : s.push(["{", t.bracketSpacing ? " " : "", ...o, t.bracketSpacing ? " " : "", "}"]));
3601
+ } else s.push("{}");
3602
+ return s;
3603
+ }
3604
+ function Wu(e, t) {
3605
+ return e.type !== "ImportDeclaration" || R(e.specifiers) || e.importKind === "type" ? true : Jt(t, w(e), w(e.source)).trimEnd().endsWith("from");
3606
+ }
3607
+ function Wm(e, t) {
3608
+ if (e.extra?.deprecatedAssertSyntax) return "assert";
3609
+ let r = Jt(t, I(e.source), e.attributes?.[0] ? w(e.attributes[0]) : I(e)).trimStart();
3610
+ return r.startsWith("assert") ? "assert" : r.startsWith("with") || R(e.attributes) ? "with" : void 0;
3611
+ }
3612
+ var qm = (e) => {
3613
+ let { attributes: t } = e;
3614
+ if (t.length !== 1) return false;
3615
+ let [r] = t, { type: n, key: s, value: i } = r;
3616
+ return n === "ImportAttribute" && (s.type === "Identifier" && s.name === "type" || V(s) && s.value === "type") && V(i) && !T(r) && !T(s) && !T(i);
3617
+ };
3618
+ function qu(e, t, r) {
3619
+ let { node: n } = e;
3620
+ if (!n.source) return "";
3621
+ let s = Wm(n, t);
3622
+ if (!s) return "";
3623
+ let i = ir(e, t, r);
3624
+ return qm(n) && (i = _t(i)), [` ${s} `, i];
3625
+ }
3626
+ function Uu(e, t, r) {
3627
+ let { node: n } = e, { type: s } = n, i = s.startsWith("Import"), o = i ? "imported" : "local", u = i ? "local" : "exported", p = n[o], c = n[u], y = "", D = "";
3628
+ return s === "ExportNamespaceSpecifier" || s === "ImportNamespaceSpecifier" ? y = "*" : p && (y = r(o)), c && !Um(n) && (D = r(u)), [Js(s === "ImportSpecifier" ? n.importKind : n.exportKind, false), y, y && D ? " as " : "", D];
3629
+ }
3630
+ function Um(e) {
3631
+ if (e.type !== "ImportSpecifier" && e.type !== "ExportSpecifier") return false;
3632
+ let { local: t, [e.type === "ImportSpecifier" ? "imported" : "exported"]: r } = e;
3633
+ if (t.type !== r.type || !ai(t, r)) return false;
3634
+ if (V(t)) return t.value === r.value && pe(t) === pe(r);
3635
+ switch (t.type) {
3636
+ case "Identifier":
3637
+ return t.name === r.name;
3638
+ default:
3639
+ return false;
3640
+ }
3641
+ }
3642
+ function or(e, t) {
3643
+ return ["...", t("argument"), G(e, t)];
3644
+ }
3645
+ function Ym(e) {
3646
+ let t = [e];
3647
+ for (let r = 0; r < t.length; r++) {
3648
+ let n = t[r];
3649
+ for (let s of ["test", "consequent", "alternate"]) {
3650
+ let i = n[s];
3651
+ if (H(i)) return true;
3652
+ i.type === "ConditionalExpression" && t.push(i);
3653
+ }
3654
+ }
3655
+ return false;
3656
+ }
3657
+ function Hm(e, t, r) {
3658
+ let { node: n } = e, s = n.type === "ConditionalExpression", i = s ? "alternate" : "falseType", { parent: o } = e, u = s ? r("test") : [r("checkType"), " ", "extends", " ", r("extendsType")];
3659
+ return o.type === n.type && o[i] === n ? xe(2, u) : u;
3660
+ }
3661
+ var Xm = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3662
+ function Vm(e) {
3663
+ let { node: t } = e;
3664
+ if (t.type !== "ConditionalExpression") return false;
3665
+ let r, n = t;
3666
+ for (let s = 0; !r; s++) {
3667
+ let i = e.getParentNode(s);
3668
+ if (i.type === "ChainExpression" && i.expression === n || M(i) && i.callee === n || J(i) && i.object === n || i.type === "TSNonNullExpression" && i.expression === n) {
3669
+ n = i;
3670
+ continue;
3671
+ }
3672
+ i.type === "NewExpression" && i.callee === n || Ae(i) && i.expression === n ? (r = e.getParentNode(s + 1), n = i) : r = i;
3673
+ }
3674
+ return n === t ? false : r[Xm.get(r.type)] === n;
3675
+ }
3676
+ function Yu(e, t, r) {
3677
+ let { node: n } = e, s = n.type === "ConditionalExpression", i = s ? "consequent" : "trueType", o = s ? "alternate" : "falseType", u = s ? ["test"] : ["checkType", "extendsType"], p = n[i], c = n[o], y = [], D = false, { parent: F } = e, C = F.type === n.type && u.some((Y) => F[Y] === n), d = F.type === n.type && !C, b, B, O = 0;
3678
+ do
3679
+ B = b || n, b = e.getParentNode(O), O++;
3680
+ while (b && b.type === n.type && u.every((Y) => b[Y] !== B));
3681
+ let h = b || F, g = B;
3682
+ if (s && (H(n[u[0]]) || H(p) || H(c) || Ym(g))) {
3683
+ D = true, d = true;
3684
+ let Y = (ee) => [P("("), m([f, ee]), f, P(")")], z = (ee) => ee.type === "NullLiteral" || ee.type === "Literal" && ee.value === null || ee.type === "Identifier" && ee.name === "undefined";
3685
+ y.push(" ? ", z(p) ? r(i) : Y(r(i)), " : ", c.type === n.type || z(c) ? r(o) : Y(r(o)));
3686
+ } else {
3687
+ let Y = (ee) => t.useTabs ? m(r(ee)) : xe(2, r(ee)), z = [A, "? ", p.type === n.type ? P("", "(") : "", Y(i), p.type === n.type ? P("", ")") : "", A, ": ", Y(o)];
3688
+ y.push(F.type !== n.type || F[o] === n || C ? z : t.useTabs ? Qr(m(z)) : xe(Math.max(0, t.tabWidth - 2), z));
3689
+ }
3690
+ let S = (Y) => F === h ? l(Y) : Y, j = !D && (J(F) || F.type === "NGPipeExpression" && F.left === n) && !F.computed, U = Vm(e), fe = S([Hm(e, t, r), d ? y : m(y), s && j && !U ? f : ""]);
3691
+ return C || U ? l([m([f, fe]), f]) : fe;
3692
+ }
3693
+ function $m(e, t) {
3694
+ return (J(t) || t.type === "NGPipeExpression" && t.left === e) && !t.computed;
3695
+ }
3696
+ function Km(e, t, r, n) {
3697
+ return [...e.map((i) => et(i)), et(t), et(r)].flat().some((i) => ce(i) && ue(n.originalText, w(i), I(i)));
3698
+ }
3699
+ var Qm = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3700
+ function zm(e) {
3701
+ let { node: t } = e;
3702
+ if (t.type !== "ConditionalExpression") return false;
3703
+ let r, n = t;
3704
+ for (let s = 0; !r; s++) {
3705
+ let i = e.getParentNode(s);
3706
+ if (i.type === "ChainExpression" && i.expression === n || M(i) && i.callee === n || J(i) && i.object === n || i.type === "TSNonNullExpression" && i.expression === n) {
3707
+ n = i;
3708
+ continue;
3709
+ }
3710
+ i.type === "NewExpression" && i.callee === n || Ae(i) && i.expression === n ? (r = e.getParentNode(s + 1), n = i) : r = i;
3711
+ }
3712
+ return n === t ? false : r[Qm.get(r.type)] === n;
3713
+ }
3714
+ var Ws = (e) => [P("("), m([f, e]), f, P(")")];
3715
+ function ur(e, t, r, n) {
3716
+ if (!t.experimentalTernaries) return Yu(e, t, r);
3717
+ let { node: s } = e, i = s.type === "ConditionalExpression", o = Ue(s), u = i ? "consequent" : "trueType", p = i ? "alternate" : "falseType", c = i ? ["test"] : ["checkType", "extendsType"], y = s[u], D = s[p], F = c.map((mr) => s[mr]), { parent: C } = e, d = C.type === s.type, b = d && c.some((mr) => C[mr] === s), B = d && C[p] === s, O = y.type === s.type, h = D.type === s.type, g = h || B, S = t.tabWidth > 2 || t.useTabs, j, U, fe = 0;
3718
+ do
3719
+ U = j || s, j = e.getParentNode(fe), fe++;
3720
+ while (j && j.type === s.type && c.every((mr) => j[mr] !== U));
3721
+ let Y = j || C, z = n && n.assignmentLayout && n.assignmentLayout !== "break-after-operator" && (C.type === "AssignmentExpression" || C.type === "VariableDeclarator" || C.type === "ClassProperty" || C.type === "PropertyDefinition" || C.type === "ClassPrivateProperty" || C.type === "ObjectProperty" || C.type === "Property"), ee = (C.type === "ReturnStatement" || C.type === "ThrowStatement") && !(O || h), Ie = i && Y.type === "JSXExpressionContainer" && e.grandparent.type !== "JSXAttribute", st = zm(e), _ = $m(s, C), re = o && ge(e, t), ae = S ? t.useTabs ? " " : " ".repeat(t.tabWidth - 1) : "", it = Km(F, y, D, t) || O || h, Bt = !g && !d && !o && (Ie ? y.type === "NullLiteral" || y.type === "Literal" && y.value === null : Fr(y, t) && Vn(s.test, 3)), Mn = g || B || o && !d || d && i && Vn(s.test, 1) || Bt, Pr = [];
3722
+ !O && T(y, x.Dangling) && e.call(() => {
3723
+ Pr.push(v(e, t), E);
3724
+ }, "consequent");
3725
+ let cr = [];
3726
+ T(s.test, x.Dangling) && e.call(() => {
3727
+ cr.push(v(e, t));
3728
+ }, "test"), !h && T(D, x.Dangling) && e.call(() => {
3729
+ cr.push(v(e, t));
3730
+ }, "alternate"), T(s, x.Dangling) && cr.push(v(e, t));
3731
+ let Vs = /* @__PURE__ */ Symbol("test"), xa = /* @__PURE__ */ Symbol("consequent"), kr = /* @__PURE__ */ Symbol("test-and-consequent"), ga = i ? [Ws(r("test")), s.test.type === "ConditionalExpression" ? ke : ""] : [r("checkType"), " ", "extends", " ", Ue(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ws(r("extendsType")))], $s = l([ga, " ?"], { id: Vs }), ha = r(u), Ir = m([O || Ie && (H(y) || d || g) ? E : A, Pr, ha]), Sa = Mn ? l([$s, g ? Ir : P(Ir, l(Ir, { id: xa }), { groupId: Vs })], { id: kr }) : [$s, Ir], Nn = r(p), Ks = Bt ? P(Nn, Qr(Ws(Nn)), { groupId: kr }) : Nn, lr = [Sa, cr.length > 0 ? [m([E, cr]), E] : h ? E : Bt ? P(A, " ", { groupId: kr }) : A, ":", h ? " " : S ? Mn ? P(ae, P(g || Bt ? " " : ae, " "), { groupId: kr }) : P(ae, " ") : " ", h ? Ks : l([m(Ks), Ie && !Bt ? f : ""]), _ && !st ? f : "", it ? ke : ""];
3732
+ return z && !it ? l(m([f, l(lr)])) : z || ee ? l(m(lr)) : st || o && b ? l([m([f, lr]), re ? f : ""]) : C === Y ? l(lr) : lr;
3733
+ }
3734
+ function Hu(e, t, r, n) {
3735
+ let { node: s } = e;
3736
+ if (Jr(s)) return Nu(e, t);
3737
+ switch (s.type) {
3738
+ case "JsExpressionRoot":
3739
+ return r("node");
3740
+ case "JsonRoot":
3741
+ return [v(e, t), r("node"), E];
3742
+ case "File":
3743
+ return wu(e, t, r) ?? r("program");
3744
+ case "ExpressionStatement":
3745
+ return Ou(e, t, r);
3746
+ case "ChainExpression":
3747
+ return r("expression");
3748
+ case "ParenthesizedExpression":
3749
+ return !T(s.expression) && (se(s.expression) || q(s.expression)) ? ["(", r("expression"), ")"] : l(["(", m([f, r("expression")]), f, ")"]);
3750
+ case "AssignmentExpression":
3751
+ return zo(e, t, r);
3752
+ case "VariableDeclarator":
3753
+ return Zo(e, t, r);
3754
+ case "BinaryExpression":
3755
+ case "LogicalExpression":
3756
+ return on(e, t, r);
3757
+ case "AssignmentPattern":
3758
+ return [r("left"), " = ", r("right")];
3759
+ case "OptionalMemberExpression":
3760
+ case "MemberExpression":
3761
+ return Ho(e, t, r);
3762
+ case "MetaProperty":
3763
+ return [r("meta"), ".", r("property")];
3764
+ case "BindExpression":
3765
+ return Yo(e, t, r);
3766
+ case "Identifier":
3767
+ return [s.name, X(e), sn(e), G(e, r)];
3768
+ case "V8IntrinsicIdentifier":
3769
+ return ["%", s.name];
3770
+ case "SpreadElement":
3771
+ return or(e, r);
3772
+ case "RestElement":
3773
+ return or(e, r);
3774
+ case "FunctionDeclaration":
3775
+ case "FunctionExpression":
3776
+ return mn(e, t, r, n);
3777
+ case "ArrowFunctionExpression":
3778
+ return Tu(e, t, r, n);
3779
+ case "YieldExpression":
3780
+ return [`yield${s.delegate ? "*" : ""}`, s.argument ? [" ", r("argument")] : ""];
3781
+ case "AwaitExpression": {
3782
+ let i = ["await"];
3783
+ if (s.argument) {
3784
+ i.push(" ", r("argument"));
3785
+ let { parent: o } = e;
3786
+ if (M(o) && o.callee === s || J(o) && o.object === s) {
3787
+ i = [m([f, ...i]), f];
3788
+ let u = e.findAncestor((p) => p.type === "AwaitExpression" || p.type === "BlockStatement");
3789
+ if (u?.type !== "AwaitExpression" || !ye(u.argument, (p) => p === s)) return l(i);
3790
+ }
3791
+ }
3792
+ return i;
3793
+ }
3794
+ case "ExportDefaultDeclaration":
3795
+ case "ExportNamedDeclaration":
3796
+ case "ExportAllDeclaration":
3797
+ return An(e, t, r);
3798
+ case "ImportDeclaration":
3799
+ return vu(e, t, r);
3800
+ case "ImportSpecifier":
3801
+ case "ExportSpecifier":
3802
+ case "ImportNamespaceSpecifier":
3803
+ case "ExportNamespaceSpecifier":
3804
+ case "ImportDefaultSpecifier":
3805
+ case "ExportDefaultSpecifier":
3806
+ return Uu(e, t, r);
3807
+ case "ImportAttribute":
3808
+ return ln(e, t, r);
3809
+ case "Program":
3810
+ case "BlockStatement":
3811
+ case "StaticBlock":
3812
+ return En(e, t, r);
3813
+ case "ClassBody":
3814
+ return Rt(e, t, r);
3815
+ case "ThrowStatement":
3816
+ return ou(e, t, r);
3817
+ case "ReturnStatement":
3818
+ return iu(e, t, r);
3819
+ case "NewExpression":
3820
+ case "ImportExpression":
3821
+ case "OptionalCallExpression":
3822
+ case "CallExpression":
3823
+ return vt(e, t, r);
3824
+ case "ObjectExpression":
3825
+ case "ObjectPattern":
3826
+ return ir(e, t, r);
3827
+ case "Property":
3828
+ return mt(s) ? Sr(e, t, r) : ln(e, t, r);
3829
+ case "ObjectProperty":
3830
+ return ln(e, t, r);
3831
+ case "ObjectMethod":
3832
+ return Sr(e, t, r);
3833
+ case "Decorator":
3834
+ return ["@", r("expression")];
3835
+ case "ArrayExpression":
3836
+ case "ArrayPattern":
3837
+ return tr(e, t, r);
3838
+ case "SequenceExpression": {
3839
+ let { parent: i } = e;
3840
+ if (i.type === "ExpressionStatement" || i.type === "ForStatement") {
3841
+ let u = [];
3842
+ return e.each(({ isFirst: p }) => {
3843
+ p ? u.push(r()) : u.push(",", m([A, r()]));
3844
+ }, "expressions"), l(u);
3845
+ }
3846
+ let o = L([",", A], e.map(r, "expressions"));
3847
+ return (i.type === "ReturnStatement" || i.type === "ThrowStatement") && e.key === "argument" || i.type === "ArrowFunctionExpression" && e.key === "body" ? l(P([m([f, o]), f], o)) : l(o);
3848
+ }
3849
+ case "ThisExpression":
3850
+ return "this";
3851
+ case "Super":
3852
+ return "super";
3853
+ case "Directive":
3854
+ return [r("value"), t.semi ? ";" : ""];
3855
+ case "UnaryExpression": {
3856
+ let i = [s.operator];
3857
+ return /[a-z]$/u.test(s.operator) && i.push(" "), T(s.argument) ? i.push(l(["(", m([f, r("argument")]), f, ")"])) : i.push(r("argument")), i;
3858
+ }
3859
+ case "UpdateExpression":
3860
+ return [s.prefix ? s.operator : "", r("argument"), s.prefix ? "" : s.operator];
3861
+ case "ConditionalExpression":
3862
+ return ur(e, t, r, n);
3863
+ case "VariableDeclaration": {
3864
+ let i = e.map(r, "declarations"), o = e.parent, u = o.type === "ForStatement" || o.type === "ForInStatement" || o.type === "ForOfStatement", p = s.declarations.some((y) => y.init), c;
3865
+ return i.length === 1 && !T(s.declarations[0]) ? c = i[0] : i.length > 0 && (c = m(i[0])), l([Q(e), s.kind, c ? [" ", c] : "", m(i.slice(1).map((y) => [",", p && !u ? E : A, y])), t.semi && !(u && o.body !== s) ? ";" : ""]);
3866
+ }
3867
+ case "WithStatement":
3868
+ return l(["with (", r("object"), ")", Ft(s.body, r("body"))]);
3869
+ case "IfStatement": {
3870
+ let i = Ft(s.consequent, r("consequent")), u = [l(["if (", l([m([f, r("test")]), f]), ")", i])];
3871
+ if (s.alternate) {
3872
+ let p = T(s.consequent, x.Trailing | x.Line) || qr(s), c = s.consequent.type === "BlockStatement" && !p;
3873
+ u.push(c ? " " : E), T(s, x.Dangling) && u.push(v(e, t), p ? E : " "), u.push("else", l(Ft(s.alternate, r("alternate"), s.alternate.type === "IfStatement")));
3874
+ }
3875
+ return u;
3876
+ }
3877
+ case "ForStatement": {
3878
+ let i = Ft(s.body, r("body")), o = v(e, t), u = o ? [o, f] : "";
3879
+ return !s.init && !s.test && !s.update ? [u, l(["for (;;)", i])] : [u, l(["for (", l([m([f, r("init"), ";", A, r("test"), ";", s.update ? [A, r("update")] : P("", A)]), f]), ")", i])];
3880
+ }
3881
+ case "WhileStatement":
3882
+ return l(["while (", l([m([f, r("test")]), f]), ")", Ft(s.body, r("body"))]);
3883
+ case "ForInStatement":
3884
+ return l(["for (", r("left"), " in ", r("right"), ")", Ft(s.body, r("body"))]);
3885
+ case "ForOfStatement":
3886
+ return l(["for", s.await ? " await" : "", " (", r("left"), " of ", r("right"), ")", Ft(s.body, r("body"))]);
3887
+ case "DoWhileStatement": {
3888
+ let i = Ft(s.body, r("body"));
3889
+ return [l(["do", i]), s.body.type === "BlockStatement" ? " " : E, "while (", l([m([f, r("test")]), f]), ")", t.semi ? ";" : ""];
3890
+ }
3891
+ case "DoExpression":
3892
+ return [s.async ? "async " : "", "do ", r("body")];
3893
+ case "BreakStatement":
3894
+ case "ContinueStatement":
3895
+ return [s.type === "BreakStatement" ? "break" : "continue", s.label ? [" ", r("label")] : "", t.semi ? ";" : ""];
3896
+ case "LabeledStatement":
3897
+ return [r("label"), `:${s.body.type === "EmptyStatement" && !T(s.body, x.Leading) ? "" : " "}`, r("body")];
3898
+ case "TryStatement":
3899
+ return ["try ", r("block"), s.handler ? [" ", r("handler")] : "", s.finalizer ? [" finally ", r("finalizer")] : ""];
3900
+ case "CatchClause":
3901
+ if (s.param) {
3902
+ let i = T(s.param, (u) => !ce(u) || u.leading && Z(t.originalText, I(u)) || u.trailing && Z(t.originalText, w(u), { backwards: true })), o = r("param");
3903
+ return ["catch ", i ? ["(", m([f, o]), f, ") "] : ["(", o, ") "], r("body")];
3904
+ }
3905
+ return ["catch ", r("body")];
3906
+ case "SwitchStatement":
3907
+ return [l(["switch (", m([f, r("discriminant")]), f, ")"]), " {", s.cases.length > 0 ? m([E, L(E, e.map(({ node: i, isLast: o }) => [r(), !o && oe(i, t) ? E : ""], "cases"))]) : "", E, "}"];
3908
+ case "SwitchCase": {
3909
+ let i = [];
3910
+ s.test ? i.push("case ", r("test"), ":") : i.push("default:"), T(s, x.Dangling) && i.push(" ", v(e, t));
3911
+ let o = s.consequent.filter((u) => u.type !== "EmptyStatement");
3912
+ if (o.length > 0) {
3913
+ let u = br(e, t, r, "consequent");
3914
+ i.push(o.length === 1 && o[0].type === "BlockStatement" ? [" ", u] : m([E, u]));
3915
+ }
3916
+ return i;
3917
+ }
3918
+ case "DebuggerStatement":
3919
+ return ["debugger", t.semi ? ";" : ""];
3920
+ case "ClassDeclaration":
3921
+ case "ClassExpression":
3922
+ return sr(e, t, r);
3923
+ case "ClassMethod":
3924
+ case "ClassPrivateMethod":
3925
+ case "MethodDefinition":
3926
+ return Fn(e, t, r);
3927
+ case "ClassProperty":
3928
+ case "PropertyDefinition":
3929
+ case "ClassPrivateProperty":
3930
+ case "ClassAccessorProperty":
3931
+ case "AccessorProperty":
3932
+ return dn(e, t, r);
3933
+ case "TemplateElement":
3934
+ return qe(s.value.raw);
3935
+ case "TemplateLiteral":
3936
+ return en(e, t, r);
3937
+ case "TaggedTemplateExpression":
3938
+ return io(e, t, r);
3939
+ case "PrivateIdentifier":
3940
+ return ["#", s.name];
3941
+ case "PrivateName":
3942
+ return ["#", r("id")];
3943
+ case "TopicReference":
3944
+ return "%";
3945
+ case "ArgumentPlaceholder":
3946
+ return "?";
3947
+ case "ModuleExpression":
3948
+ return ["module ", r("body")];
3949
+ case "VoidPattern":
3950
+ return "void";
3951
+ case "EmptyStatement":
3952
+ if (kt(e)) return ";";
3953
+ case "InterpreterDirective":
3954
+ default:
3955
+ throw new Qe(s, "ESTree");
3956
+ }
3957
+ }
3958
+ function Tn(e) {
3959
+ return [e("elementType"), "[]"];
3960
+ }
3961
+ var Zm = k(["SatisfiesExpression", "TSSatisfiesExpression"]);
3962
+ function xn(e, t, r) {
3963
+ let { parent: n, node: s, key: i } = e, u = s.type === "AsConstExpression" ? "const" : r("typeAnnotation"), p = [r("expression"), " ", Zm(s) ? "satisfies" : "as", " ", u];
3964
+ return i === "callee" && M(n) || i === "object" && J(n) ? l([m([f, ...p]), f]) : p;
3965
+ }
3966
+ function Xu(e, t, r) {
3967
+ let { node: n } = e, s = [Q(e), "component"];
3968
+ n.id && s.push(" ", r("id")), s.push(r("typeParameters"));
3969
+ let i = eD(e, t, r);
3970
+ return n.rendersType ? s.push(l([i, " ", r("rendersType")])) : s.push(l([i])), n.body && s.push(" ", r("body")), t.semi && n.type === "DeclareComponent" && s.push(";"), s;
3971
+ }
3972
+ function eD(e, t, r) {
3973
+ let { node: n } = e, s = n.params;
3974
+ if (n.rest && (s = [...s, n.rest]), s.length === 0) return ["(", v(e, t, { filter: (o) => _e(t.originalText, I(o)) === ")" }), ")"];
3975
+ let i = [];
3976
+ return rD(e, (o, u) => {
3977
+ let p = u === s.length - 1;
3978
+ p && n.rest && i.push("..."), i.push(r()), !p && (i.push(","), oe(s[u], t) ? i.push(E, E) : i.push(A));
3979
+ }), ["(", m([f, ...i]), P(ie(t, "all") && !tD(n, s) ? "," : ""), f, ")"];
3980
+ }
3981
+ function tD(e, t) {
3982
+ return e.rest || N(0, t, -1)?.type === "RestElement";
3983
+ }
3984
+ function rD(e, t) {
3985
+ let { node: r } = e, n = 0, s = (i) => t(i, n++);
3986
+ e.each(s, "params"), r.rest && e.call(s, "rest");
3987
+ }
3988
+ function Vu(e, t, r) {
3989
+ let { node: n } = e;
3990
+ return n.shorthand ? r("local") : [r("name"), " as ", r("local")];
3991
+ }
3992
+ function $u(e, t, r) {
3993
+ let { node: n } = e, s = [];
3994
+ return n.name && s.push(r("name"), n.optional ? "?: " : ": "), s.push(r("typeAnnotation")), s;
3995
+ }
3996
+ function qs(e, t, r) {
3997
+ return ir(e, t, r);
3998
+ }
3999
+ function Ku(e, t, r) {
4000
+ let { node: n } = e;
4001
+ return [n.type === "EnumSymbolBody" || n.explicitType ? `of ${n.type.slice(4, -4).toLowerCase()} ` : "", qs(e, t, r)];
4002
+ }
4003
+ function gn(e, t) {
4004
+ let { node: r } = e, n = t("id");
4005
+ r.computed && (n = ["[", n, "]"]);
4006
+ let s = "";
4007
+ return r.initializer && (s = t("initializer")), r.init && (s = t("init")), s ? [n, " = ", s] : n;
4008
+ }
4009
+ function hn(e, t) {
4010
+ let { node: r } = e;
4011
+ return [Q(e), r.const ? "const " : "", "enum ", t("id"), " ", t("body")];
4012
+ }
4013
+ function Sn(e, t, r) {
4014
+ let { node: n } = e, s = [Zt(e)];
4015
+ (n.type === "TSConstructorType" || n.type === "TSConstructSignatureDeclaration") && s.push("new ");
4016
+ let i = Ke(e, t, r, false, true), o = [];
4017
+ return n.type === "FunctionTypeAnnotation" ? o.push(nD(e) ? " => " : ": ", r("returnType")) : o.push(G(e, r, "returnType")), lt(n, o) && (i = l(i)), s.push(i, o), [l(s), n.type === "TSConstructSignatureDeclaration" || n.type === "TSCallSignatureDeclaration" ? he(e, t) : ""];
4018
+ }
4019
+ function nD(e) {
4020
+ let { node: t, parent: r } = e;
4021
+ return t.type === "FunctionTypeAnnotation" && (Gr(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && bt(r, t) || r.type === "ObjectTypeCallProperty" || e.getParentNode(2)?.type === "DeclareFunction"));
4022
+ }
4023
+ function zu(e, t, r) {
4024
+ let { node: n } = e, s = ["hook"];
4025
+ n.id && s.push(" ", r("id"));
4026
+ let i = Ke(e, t, r, false, true), o = rr(e, r), u = lt(n, o);
4027
+ return s.push(l([u ? l(i) : i, o]), n.body ? " " : "", r("body")), s;
4028
+ }
4029
+ function Zu(e, t, r) {
4030
+ let { node: n } = e, s = [Q(e), "hook"];
4031
+ return n.id && s.push(" ", r("id")), t.semi && s.push(";"), s;
4032
+ }
4033
+ function Qu(e) {
4034
+ let { node: t } = e;
4035
+ return t.type === "HookTypeAnnotation" && e.getParentNode(2)?.type === "DeclareHook";
4036
+ }
4037
+ function ea(e, t, r) {
4038
+ let { node: n } = e, s = Ke(e, t, r, false, true), i = [Qu(e) ? ": " : " => ", r("returnType")];
4039
+ return l([Qu(e) ? "" : "hook ", lt(n, i) ? l(s) : s, i]);
4040
+ }
4041
+ function Bn(e, t, r) {
4042
+ return [r("objectType"), X(e), "[", r("indexType"), "]"];
4043
+ }
4044
+ function bn(e, t, r) {
4045
+ return ["infer ", r("typeParameter")];
4046
+ }
4047
+ function Pn(e, t, r) {
4048
+ let n = false;
4049
+ return l(e.map(({ isFirst: s, previous: i, node: o, index: u }) => {
4050
+ let p = r();
4051
+ if (s) return p;
4052
+ let c = Je(o), y = Je(i);
4053
+ return y && c ? [" & ", n ? m(p) : p] : !y && !c || Ee(t.originalText, o) ? t.experimentalOperatorPosition === "start" ? m([A, "& ", p]) : m([" &", A, p]) : (u > 1 && (n = true), [" & ", u > 1 ? m(p) : p]);
4054
+ }, "types"));
4055
+ }
4056
+ function sD(e) {
4057
+ switch (e) {
4058
+ case null:
4059
+ return "";
4060
+ case "PlusOptional":
4061
+ return "+?";
4062
+ case "MinusOptional":
4063
+ return "-?";
4064
+ case "Optional":
4065
+ return "?";
4066
+ }
4067
+ }
4068
+ function ra(e, t, r) {
4069
+ let { node: n } = e;
4070
+ return [l([n.variance ? r("variance") : "", "[", m([r("keyTparam"), " in ", r("sourceType")]), "]", sD(n.optional), ": ", r("propType")]), he(e, t)];
4071
+ }
4072
+ function ta(e, t) {
4073
+ return e === "+" || e === "-" ? e + t : t;
4074
+ }
4075
+ function na(e, t, r) {
4076
+ let { node: n } = e, s = false;
4077
+ if (t.objectWrap === "preserve") {
4078
+ let i = w(n), o = Jt(t, i + 1, w(n.key)), u = i + 1 + o.search(/\S/u);
4079
+ ue(t.originalText, i, u) && (s = true);
4080
+ }
4081
+ return l(["{", m([t.bracketSpacing ? A : f, T(n, x.Dangling) ? l([v(e, t), E]) : "", l([n.readonly ? [ta(n.readonly, "readonly"), " "] : "", "[", r("key"), " in ", r("constraint"), n.nameType ? [" as ", r("nameType")] : "", "]", n.optional ? ta(n.optional, "?") : "", n.typeAnnotation ? ": " : "", r("typeAnnotation")]), t.semi ? P(";") : ""]), t.bracketSpacing ? A : f, "}"], { shouldBreak: s });
4082
+ }
4083
+ function sa(e, t, r) {
4084
+ let { node: n } = e;
4085
+ return [l(["match (", m([f, r("argument")]), f, ")"]), " {", n.cases.length > 0 ? m([E, L(E, e.map(({ node: s, isLast: i }) => [r(), !i && oe(s, t) ? E : ""], "cases"))]) : "", E, "}"];
4086
+ }
4087
+ function ia(e, t, r) {
4088
+ let { node: n } = e, s = T(n, x.Dangling) ? [" ", v(e, t)] : [], i = n.type === "MatchStatementCase" ? [" ", r("body")] : m([A, r("body"), ","]);
4089
+ return [r("pattern"), n.guard ? l([m([A, "if (", r("guard"), ")"])]) : "", l([" =>", s, i])];
4090
+ }
4091
+ function oa(e, t, r) {
4092
+ let { node: n } = e;
4093
+ switch (n.type) {
4094
+ case "MatchOrPattern":
4095
+ return uD(e, t, r);
4096
+ case "MatchAsPattern":
4097
+ return [r("pattern"), " as ", r("target")];
4098
+ case "MatchWildcardPattern":
4099
+ return ["_"];
4100
+ case "MatchLiteralPattern":
4101
+ return r("literal");
4102
+ case "MatchUnaryPattern":
4103
+ return [n.operator, r("argument")];
4104
+ case "MatchIdentifierPattern":
4105
+ return r("id");
4106
+ case "MatchMemberPattern": {
4107
+ let s = n.property.type === "Identifier" ? [".", r("property")] : ["[", m([f, r("property")]), f, "]"];
4108
+ return l([r("base"), s]);
4109
+ }
4110
+ case "MatchBindingPattern":
4111
+ return [n.kind, " ", r("id")];
4112
+ case "MatchObjectPattern": {
4113
+ let s = e.map(r, "properties");
4114
+ return n.rest && s.push(r("rest")), l(["{", m([f, L([",", A], s)]), n.rest ? "" : P(","), f, "}"]);
4115
+ }
4116
+ case "MatchArrayPattern": {
4117
+ let s = e.map(r, "elements");
4118
+ return n.rest && s.push(r("rest")), l(["[", m([f, L([",", A], s)]), n.rest ? "" : P(","), f, "]"]);
4119
+ }
4120
+ case "MatchObjectPatternProperty":
4121
+ return n.shorthand ? r("pattern") : l([r("key"), ":", m([A, r("pattern")])]);
4122
+ case "MatchRestPattern": {
4123
+ let s = ["..."];
4124
+ return n.argument && s.push(r("argument")), s;
4125
+ }
4126
+ }
4127
+ }
4128
+ var ua = k(["MatchWildcardPattern", "MatchLiteralPattern", "MatchUnaryPattern", "MatchIdentifierPattern"]);
4129
+ function iD(e) {
4130
+ let { patterns: t } = e;
4131
+ if (t.some((n) => T(n))) return false;
4132
+ let r = t.find((n) => n.type === "MatchObjectPattern");
4133
+ return r ? t.every((n) => n === r || ua(n)) : false;
4134
+ }
4135
+ function oD(e) {
4136
+ return ua(e) || e.type === "MatchObjectPattern" ? true : e.type === "MatchOrPattern" ? iD(e) : false;
4137
+ }
4138
+ function uD(e, t, r) {
4139
+ let { node: n } = e, { parent: s } = e, i = s.type !== "MatchStatementCase" && s.type !== "MatchExpressionCase" && s.type !== "MatchArrayPattern" && s.type !== "MatchObjectPatternProperty" && !Ee(t.originalText, n), o = oD(n), u = e.map(() => {
4140
+ let c = r();
4141
+ return o || (c = xe(2, c)), De(e, c, t);
4142
+ }, "patterns");
4143
+ if (o) return L(" | ", u);
4144
+ let p = [P(["| "]), L([A, "| "], u)];
4145
+ return ge(e, t) ? l([m([P([f]), p]), f]) : s.type === "MatchArrayPattern" && s.elements.length > 1 ? l([m([P(["(", f]), p]), f, P(")")]) : l(i ? m(p) : p);
4146
+ }
4147
+ function aa(e, t, r) {
4148
+ let { node: n } = e, s = [Q(e), "opaque type ", r("id"), r("typeParameters")];
4149
+ if (n.supertype && s.push(": ", r("supertype")), n.lowerBound || n.upperBound) {
4150
+ let i = [];
4151
+ n.lowerBound && i.push(m([A, "super ", r("lowerBound")])), n.upperBound && i.push(m([A, "extends ", r("upperBound")])), s.push(l(i));
4152
+ }
4153
+ return n.impltype && s.push(" = ", r("impltype")), s.push(t.semi ? ";" : ""), s;
4154
+ }
4155
+ function kn(e, t, r) {
4156
+ let { node: n } = e;
4157
+ return ["...", ...n.type === "TupleTypeSpreadElement" && n.label ? [r("label"), ": "] : [], r("typeAnnotation")];
4158
+ }
4159
+ function In(e, t, r) {
4160
+ let { node: n } = e;
4161
+ return [n.variance ? r("variance") : "", r("label"), n.optional ? "?" : "", ": ", r("elementType")];
4162
+ }
4163
+ function Ln(e, t, r) {
4164
+ let { node: n } = e, s = [Q(e), "type ", r("id"), r("typeParameters")], i = n.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right";
4165
+ return [ht(e, t, r, s, " =", i), t.semi ? ";" : ""];
4166
+ }
4167
+ function aD(e, t, r) {
4168
+ let { node: n } = e;
4169
+ return K(n).length === 1 && n.type.startsWith("TS") && !n[r][0].constraint && e.parent.type === "ArrowFunctionExpression" && !(t.filepath && /\.ts$/u.test(t.filepath));
4170
+ }
4171
+ function Gt(e, t, r, n) {
4172
+ let { node: s } = e;
4173
+ if (!s[n]) return "";
4174
+ if (!Array.isArray(s[n])) return r(n);
4175
+ let i = It(e.grandparent), o = e.match((c) => !(c[n].length === 1 && Je(c[n][0])), void 0, (c, y) => y === "typeAnnotation", (c) => c.type === "Identifier", Bs);
4176
+ if (s[n].length === 0 || !o && (i || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || Jo(s[n][0])))) return ["<", L(", ", e.map(r, n)), pD(e, t), ">"];
4177
+ let p = s.type === "TSTypeParameterInstantiation" ? "" : aD(e, t, n) ? "," : ie(t) ? P(",") : "";
4178
+ return l(["<", m([f, L([",", A], e.map(r, n))]), p, f, ">"]);
4179
+ }
4180
+ function pD(e, t) {
4181
+ let { node: r } = e;
4182
+ if (!T(r, x.Dangling)) return "";
4183
+ let n = !T(r, x.Line), s = v(e, t, { indent: !n });
4184
+ return n ? s : [s, E];
4185
+ }
4186
+ function On(e, t, r) {
4187
+ let { node: n } = e, s = [n.const ? "const " : ""], i = n.type === "TSTypeParameter" ? r("name") : n.name;
4188
+ if (n.variance && s.push(r("variance")), n.in && s.push("in "), n.out && s.push("out "), s.push(i), n.bound && (n.usesExtendsBound && s.push(" extends "), s.push(G(e, r, "bound"))), n.constraint) {
4189
+ let o = /* @__PURE__ */ Symbol("constraint");
4190
+ s.push(" extends", l(m(A), { id: o }), je, yt(r("constraint"), { groupId: o }));
4191
+ }
4192
+ if (n.default) {
4193
+ let o = /* @__PURE__ */ Symbol("default");
4194
+ s.push(" =", l(m(A), { id: o }), je, yt(r("default"), { groupId: o }));
4195
+ }
4196
+ return l(s);
4197
+ }
4198
+ function wn(e, t) {
4199
+ let { node: r } = e;
4200
+ return [r.type === "TSTypePredicate" && r.asserts ? "asserts " : r.type === "TypePredicate" && r.kind ? `${r.kind} ` : "", t("parameterName"), r.typeAnnotation ? [" is ", G(e, t)] : ""];
4201
+ }
4202
+ function _n({ node: e }, t) {
4203
+ let r = e.type === "TSTypeQuery" ? "exprName" : "argument";
4204
+ return ["typeof ", t(r), t("typeArguments")];
4205
+ }
4206
+ function pa(e, t, r) {
4207
+ let { node: n } = e;
4208
+ if (Nr(n)) return n.type.slice(0, -14).toLowerCase();
4209
+ switch (n.type) {
4210
+ case "ComponentDeclaration":
4211
+ case "DeclareComponent":
4212
+ case "ComponentTypeAnnotation":
4213
+ return Xu(e, t, r);
4214
+ case "ComponentParameter":
4215
+ return Vu(e, t, r);
4216
+ case "ComponentTypeParameter":
4217
+ return $u(e, t, r);
4218
+ case "HookDeclaration":
4219
+ return zu(e, t, r);
4220
+ case "DeclareHook":
4221
+ return Zu(e, t, r);
4222
+ case "HookTypeAnnotation":
4223
+ return ea(e, t, r);
4224
+ case "DeclareFunction":
4225
+ return [Q(e), "function ", r("id"), r("predicate"), t.semi ? ";" : ""];
4226
+ case "DeclareModule":
4227
+ return ["declare module ", r("id"), " ", r("body")];
4228
+ case "DeclareModuleExports":
4229
+ return ["declare module.exports", G(e, r), t.semi ? ";" : ""];
4230
+ case "DeclareNamespace":
4231
+ return ["declare namespace ", r("id"), " ", r("body")];
4232
+ case "DeclareVariable":
4233
+ return [Q(e), n.kind ?? "var", " ", r("id"), t.semi ? ";" : ""];
4234
+ case "DeclareExportDeclaration":
4235
+ case "DeclareExportAllDeclaration":
4236
+ return An(e, t, r);
4237
+ case "DeclareOpaqueType":
4238
+ case "OpaqueType":
4239
+ return aa(e, t, r);
4240
+ case "DeclareTypeAlias":
4241
+ case "TypeAlias":
4242
+ return Ln(e, t, r);
4243
+ case "IntersectionTypeAnnotation":
4244
+ return Pn(e, t, r);
4245
+ case "UnionTypeAnnotation":
4246
+ return un(e, t, r);
4247
+ case "ConditionalTypeAnnotation":
4248
+ return ur(e, t, r);
4249
+ case "InferTypeAnnotation":
4250
+ return bn(e, t, r);
4251
+ case "FunctionTypeAnnotation":
4252
+ return Sn(e, t, r);
4253
+ case "TupleTypeAnnotation":
4254
+ return tr(e, t, r);
4255
+ case "TupleTypeLabeledElement":
4256
+ return In(e, t, r);
4257
+ case "TupleTypeSpreadElement":
4258
+ return kn(e, t, r);
4259
+ case "GenericTypeAnnotation":
4260
+ return [r("id"), Gt(e, t, r, "typeParameters")];
4261
+ case "IndexedAccessType":
4262
+ case "OptionalIndexedAccessType":
4263
+ return Bn(e, t, r);
4264
+ case "TypeAnnotation":
4265
+ return an(e, t, r);
4266
+ case "TypeParameter":
4267
+ return On(e, t, r);
4268
+ case "TypeofTypeAnnotation":
4269
+ return _n(e, r);
4270
+ case "ExistsTypeAnnotation":
4271
+ return "*";
4272
+ case "ArrayTypeAnnotation":
4273
+ return Tn(r);
4274
+ case "DeclareEnum":
4275
+ case "EnumDeclaration":
4276
+ return hn(e, r);
4277
+ case "EnumBooleanBody":
4278
+ case "EnumNumberBody":
4279
+ case "EnumBigIntBody":
4280
+ case "EnumStringBody":
4281
+ case "EnumSymbolBody":
4282
+ return Ku(e, t, r);
4283
+ case "EnumBooleanMember":
4284
+ case "EnumNumberMember":
4285
+ case "EnumBigIntMember":
4286
+ case "EnumStringMember":
4287
+ case "EnumDefaultedMember":
4288
+ return gn(e, r);
4289
+ case "FunctionTypeParam": {
4290
+ let s = n.name ? r("name") : e.parent.this === n ? "this" : "";
4291
+ return [s, X(e), s ? ": " : "", r("typeAnnotation")];
4292
+ }
4293
+ case "DeclareClass":
4294
+ case "DeclareInterface":
4295
+ case "InterfaceDeclaration":
4296
+ case "InterfaceTypeAnnotation":
4297
+ return sr(e, t, r);
4298
+ case "ObjectTypeAnnotation":
4299
+ return Rt(e, t, r);
4300
+ case "ClassImplements":
4301
+ case "InterfaceExtends":
4302
+ return [r("id"), r("typeParameters")];
4303
+ case "NullableTypeAnnotation":
4304
+ return ["?", r("typeAnnotation")];
4305
+ case "Variance": {
4306
+ let { kind: s } = n;
4307
+ return Le(s === "plus" || s === "minus"), s === "plus" ? "+" : "-";
4308
+ }
4309
+ case "KeyofTypeAnnotation":
4310
+ return ["keyof ", r("argument")];
4311
+ case "ObjectTypeCallProperty":
4312
+ return [n.static ? "static " : "", r("value"), he(e, t)];
4313
+ case "ObjectTypeMappedTypeProperty":
4314
+ return ra(e, t, r);
4315
+ case "ObjectTypeIndexer":
4316
+ return [n.static ? "static " : "", n.variance ? r("variance") : "", "[", r("id"), n.id ? ": " : "", r("key"), "]: ", r("value"), he(e, t)];
4317
+ case "ObjectTypeProperty": {
4318
+ let s = "";
4319
+ return n.proto ? s = "proto " : n.static && (s = "static "), [s, n.kind !== "init" ? n.kind + " " : "", n.variance ? r("variance") : "", Ct(e, t, r), X(e), mt(n) ? "" : ": ", r("value"), he(e, t)];
4320
+ }
4321
+ case "ObjectTypeInternalSlot":
4322
+ return [n.static ? "static " : "", "[[", r("id"), "]]", X(e), n.method ? "" : ": ", r("value"), he(e, t)];
4323
+ case "ObjectTypeSpreadProperty":
4324
+ return or(e, r);
4325
+ case "QualifiedTypeofIdentifier":
4326
+ case "QualifiedTypeIdentifier":
4327
+ return [r("qualification"), ".", r("id")];
4328
+ case "NullLiteralTypeAnnotation":
4329
+ return "null";
4330
+ case "BooleanLiteralTypeAnnotation":
4331
+ return String(n.value);
4332
+ case "StringLiteralTypeAnnotation":
4333
+ return qe(ut(pe(n), t));
4334
+ case "NumberLiteralTypeAnnotation":
4335
+ return dt(pe(n));
4336
+ case "BigIntLiteralTypeAnnotation":
4337
+ return Cn(pe(n));
4338
+ case "TypeCastExpression":
4339
+ return ["(", r("expression"), G(e, r), ")"];
4340
+ case "TypePredicate":
4341
+ return wn(e, r);
4342
+ case "TypeOperator":
4343
+ return [n.operator, " ", r("typeAnnotation")];
4344
+ case "TypeParameterDeclaration":
4345
+ case "TypeParameterInstantiation":
4346
+ return Gt(e, t, r, "params");
4347
+ case "InferredPredicate":
4348
+ case "DeclaredPredicate":
4349
+ return [e.key === "predicate" && e.parent.type !== "DeclareFunction" && !e.parent.returnType ? ": " : " ", "%checks", ...n.type === "DeclaredPredicate" ? ["(", r("value"), ")"] : []];
4350
+ case "AsExpression":
4351
+ case "AsConstExpression":
4352
+ case "SatisfiesExpression":
4353
+ return xn(e, t, r);
4354
+ case "MatchExpression":
4355
+ case "MatchStatement":
4356
+ return sa(e, t, r);
4357
+ case "MatchExpressionCase":
4358
+ case "MatchStatementCase":
4359
+ return ia(e, t, r);
4360
+ case "MatchOrPattern":
4361
+ case "MatchAsPattern":
4362
+ case "MatchWildcardPattern":
4363
+ case "MatchLiteralPattern":
4364
+ case "MatchUnaryPattern":
4365
+ case "MatchIdentifierPattern":
4366
+ case "MatchMemberPattern":
4367
+ case "MatchBindingPattern":
4368
+ case "MatchObjectPattern":
4369
+ case "MatchObjectPatternProperty":
4370
+ case "MatchRestPattern":
4371
+ case "MatchArrayPattern":
4372
+ return oa(e, t, r);
4373
+ }
4374
+ }
4375
+ function ca(e, t, r) {
4376
+ let { node: n } = e, s = n.parameters.length > 1 ? P(ie(t) ? "," : "") : "", i = l([m([f, L([", ", f], e.map(r, "parameters"))]), s, f]);
4377
+ return [e.key === "body" && e.parent.type === "ClassBody" && n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? i : "", "]", G(e, r), he(e, t)];
4378
+ }
4379
+ function Us(e, t, r) {
4380
+ let { node: n } = e;
4381
+ return [n.postfix ? "" : r, G(e, t), n.postfix ? r : ""];
4382
+ }
4383
+ function la(e, t, r) {
4384
+ let { node: n } = e, s = [], i = n.kind && n.kind !== "method" ? `${n.kind} ` : "";
4385
+ s.push(jt(n), i, n.computed ? "[" : "", r("key"), n.computed ? "]" : "", X(e));
4386
+ let o = Ke(e, t, r, false, true), u = G(e, r, "returnType"), p = lt(n, u);
4387
+ return s.push(p ? l(o) : o), n.returnType && s.push(l(u)), [l(s), he(e, t)];
4388
+ }
4389
+ function ma(e, t, r) {
4390
+ let { node: n } = e;
4391
+ return [Q(e), n.kind === "global" ? "" : `${n.kind} `, r("id"), n.body ? [" ", l(r("body"))] : t.semi ? ";" : ""];
4392
+ }
4393
+ function Da(e, t, r) {
4394
+ let { node: n } = e, s = !(q(n.expression) || se(n.expression)), i = l(["<", m([f, r("typeAnnotation")]), f, ">"]), o = [P("("), m([f, r("expression")]), f, P(")")];
4395
+ return s ? nt([[i, r("expression")], [i, l(o, { shouldBreak: true })], [i, r("expression")]]) : l([i, r("expression")]);
4396
+ }
4397
+ function fa(e, t, r) {
4398
+ let { node: n } = e;
4399
+ if (n.type.startsWith("TS")) {
4400
+ if (jr(n)) return n.type.slice(2, -7).toLowerCase();
4401
+ switch (n.type) {
4402
+ case "TSThisType":
4403
+ return "this";
4404
+ case "TSTypeAssertion":
4405
+ return Da(e, t, r);
4406
+ case "TSDeclareFunction":
4407
+ return mn(e, t, r);
4408
+ case "TSExportAssignment":
4409
+ return ["export = ", r("expression"), t.semi ? ";" : ""];
4410
+ case "TSModuleBlock":
4411
+ return En(e, t, r);
4412
+ case "TSInterfaceBody":
4413
+ case "TSTypeLiteral":
4414
+ return Rt(e, t, r);
4415
+ case "TSTypeAliasDeclaration":
4416
+ return Ln(e, t, r);
4417
+ case "TSQualifiedName":
4418
+ return [r("left"), ".", r("right")];
4419
+ case "TSAbstractMethodDefinition":
4420
+ case "TSDeclareMethod":
4421
+ return Fn(e, t, r);
4422
+ case "TSAbstractAccessorProperty":
4423
+ case "TSAbstractPropertyDefinition":
4424
+ return dn(e, t, r);
4425
+ case "TSInterfaceHeritage":
4426
+ case "TSClassImplements":
4427
+ case "TSInstantiationExpression":
4428
+ return [r("expression"), r("typeArguments")];
4429
+ case "TSTemplateLiteralType":
4430
+ return en(e, t, r);
4431
+ case "TSNamedTupleMember":
4432
+ return In(e, t, r);
4433
+ case "TSRestType":
4434
+ return kn(e, t, r);
4435
+ case "TSOptionalType":
4436
+ return [r("typeAnnotation"), "?"];
4437
+ case "TSInterfaceDeclaration":
4438
+ return sr(e, t, r);
4439
+ case "TSTypeParameterDeclaration":
4440
+ case "TSTypeParameterInstantiation":
4441
+ return Gt(e, t, r, "params");
4442
+ case "TSTypeParameter":
4443
+ return On(e, t, r);
4444
+ case "TSAsExpression":
4445
+ case "TSSatisfiesExpression":
4446
+ return xn(e, t, r);
4447
+ case "TSArrayType":
4448
+ return Tn(r);
4449
+ case "TSPropertySignature":
4450
+ return [n.readonly ? "readonly " : "", Ct(e, t, r), X(e), G(e, r), he(e, t)];
4451
+ case "TSParameterProperty":
4452
+ return [jt(n), n.static ? "static " : "", n.override ? "override " : "", n.readonly ? "readonly " : "", r("parameter")];
4453
+ case "TSTypeQuery":
4454
+ return _n(e, r);
4455
+ case "TSIndexSignature":
4456
+ return ca(e, t, r);
4457
+ case "TSTypePredicate":
4458
+ return wn(e, r);
4459
+ case "TSNonNullExpression":
4460
+ return [r("expression"), "!"];
4461
+ case "TSImportType":
4462
+ return [vt(e, t, r), n.qualifier ? [".", r("qualifier")] : "", Gt(e, t, r, "typeArguments")];
4463
+ case "TSLiteralType":
4464
+ return r("literal");
4465
+ case "TSIndexedAccessType":
4466
+ return Bn(e, t, r);
4467
+ case "TSTypeOperator":
4468
+ return [n.operator, " ", r("typeAnnotation")];
4469
+ case "TSMappedType":
4470
+ return na(e, t, r);
4471
+ case "TSMethodSignature":
4472
+ return la(e, t, r);
4473
+ case "TSNamespaceExportDeclaration":
4474
+ return ["export as namespace ", r("id"), t.semi ? ";" : ""];
4475
+ case "TSEnumDeclaration":
4476
+ return hn(e, r);
4477
+ case "TSEnumBody":
4478
+ return qs(e, t, r);
4479
+ case "TSEnumMember":
4480
+ return gn(e, r);
4481
+ case "TSImportEqualsDeclaration":
4482
+ return ["import ", Gs(n, false), r("id"), " = ", r("moduleReference"), t.semi ? ";" : ""];
4483
+ case "TSExternalModuleReference":
4484
+ return vt(e, t, r);
4485
+ case "TSModuleDeclaration":
4486
+ return ma(e, t, r);
4487
+ case "TSConditionalType":
4488
+ return ur(e, t, r);
4489
+ case "TSInferType":
4490
+ return bn(e, t, r);
4491
+ case "TSIntersectionType":
4492
+ return Pn(e, t, r);
4493
+ case "TSUnionType":
4494
+ return un(e, t, r);
4495
+ case "TSFunctionType":
4496
+ case "TSCallSignatureDeclaration":
4497
+ case "TSConstructorType":
4498
+ case "TSConstructSignatureDeclaration":
4499
+ return Sn(e, t, r);
4500
+ case "TSTupleType":
4501
+ return tr(e, t, r);
4502
+ case "TSTypeReference":
4503
+ return [r("typeName"), Gt(e, t, r, "typeArguments")];
4504
+ case "TSTypeAnnotation":
4505
+ return an(e, t, r);
4506
+ case "TSEmptyBodyFunctionExpression":
4507
+ return Dn(e, t, r);
4508
+ case "TSJSDocAllType":
4509
+ return "*";
4510
+ case "TSJSDocUnknownType":
4511
+ return "?";
4512
+ case "TSJSDocNullableType":
4513
+ return Us(e, r, "?");
4514
+ case "TSJSDocNonNullableType":
4515
+ return Us(e, r, "!");
4516
+ case "TSParenthesizedType":
4517
+ default:
4518
+ throw new Qe(n, "TypeScript");
4519
+ }
4520
+ }
4521
+ }
4522
+ function cD(e, t, r, n) {
4523
+ for (let s of [yu, mu, pa, fa, Hu]) {
4524
+ let i = s(e, t, r, n);
4525
+ if (i !== void 0) return i;
4526
+ }
4527
+ }
4528
+ var lD = k(["ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "ClassPrivateProperty", "MethodDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod"]);
4529
+ function mD(e, t, r, n) {
4530
+ e.isRoot && t.__onHtmlBindingRoot?.(e.node, t);
4531
+ let { node: s } = e, i = nr(e) ? t.originalText.slice(w(s), I(s)) : cD(e, t, r, n);
4532
+ if (!i) return "";
4533
+ if (lD(s)) return i;
4534
+ let o = R(s.decorators), u = Fu(e, t, r), p = s.type === "ClassExpression";
4535
+ if (o && !p) return Ar(i, (D) => l([u, D]));
4536
+ let c = ge(e, t), y = uu(e, t);
4537
+ return !u && !c && !y ? i : Ar(i, (D) => [y ? ";" : "", c ? "(" : "", c && p && o ? [m([A, u, D]), A] : [u, D], c ? ")" : ""]);
4538
+ }
4539
+ var Ys = mD;
4540
+ var DD = { experimental_avoidAstMutation: true };
4541
+ var ya = [{ name: "JSON.stringify", type: "data", aceMode: "json", extensions: [".importmap"], filenames: ["package.json", "package-lock.json", "composer.json"], tmScope: "source.json", aliases: ["geojson", "jsonl", "sarif", "topojson"], codemirrorMode: "javascript", codemirrorMimeType: "application/json", parsers: ["json-stringify"], vscodeLanguageIds: ["json"], linguistLanguageId: 174 }, { name: "JSON", type: "data", aceMode: "json", extensions: [".json", ".4DForm", ".4DProject", ".avsc", ".geojson", ".gltf", ".har", ".ice", ".JSON-tmLanguage", ".json.example", ".mcmeta", ".sarif", ".tact", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest", ".yy", ".yyp"], filenames: [".all-contributorsrc", ".arcconfig", ".auto-changelog", ".c8rc", ".htmlhintrc", ".imgbotconfig", ".nycrc", ".tern-config", ".tern-project", ".watchmanconfig", ".babelrc", ".jscsrc", ".jshintrc", ".jslintrc", ".swcrc"], tmScope: "source.json", aliases: ["geojson", "jsonl", "sarif", "topojson"], codemirrorMode: "javascript", codemirrorMimeType: "application/json", parsers: ["json"], vscodeLanguageIds: ["json"], linguistLanguageId: 174 }, { name: "JSON with Comments", type: "data", aceMode: "javascript", extensions: [".jsonc", ".code-snippets", ".code-workspace", ".sublime-build", ".sublime-color-scheme", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"], filenames: [], tmScope: "source.json.comments", aliases: ["jsonc"], codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", group: "JSON", parsers: ["jsonc"], vscodeLanguageIds: ["jsonc"], linguistLanguageId: 423 }, { name: "JSON5", type: "data", aceMode: "json5", extensions: [".json5"], tmScope: "source.js", codemirrorMode: "javascript", codemirrorMimeType: "application/json", parsers: ["json5"], vscodeLanguageIds: ["json5"], linguistLanguageId: 175 }];
4542
+ var Xs = {};
4543
+ jn(Xs, { getVisitorKeys: () => Fa, massageAstNode: () => Ca, print: () => yD });
4544
+ var ar = [[]];
4545
+ var Ea = { JsonRoot: ["node"], ArrayExpression: ["elements"], ObjectExpression: ["properties"], ObjectProperty: ["key", "value"], UnaryExpression: ["argument"], NullLiteral: ar[0], BooleanLiteral: ar[0], StringLiteral: ar[0], NumericLiteral: ar[0], Identifier: ar[0], TemplateLiteral: ["quasis"], TemplateElement: ar[0] };
4546
+ var fD = _r(Ea);
4547
+ var Fa = fD;
4548
+ function yD(e, t, r) {
4549
+ let { node: n } = e;
4550
+ switch (n.type) {
4551
+ case "JsonRoot":
4552
+ return [r("node"), E];
4553
+ case "ArrayExpression": {
4554
+ if (n.elements.length === 0) return "[]";
4555
+ let s = e.map(() => e.node === null ? "null" : r(), "elements");
4556
+ return ["[", m([E, L([",", E], s)]), E, "]"];
4557
+ }
4558
+ case "ObjectExpression":
4559
+ return n.properties.length === 0 ? "{}" : ["{", m([E, L([",", E], e.map(r, "properties"))]), E, "}"];
4560
+ case "ObjectProperty":
4561
+ return [r("key"), ": ", r("value")];
4562
+ case "UnaryExpression":
4563
+ return [n.operator === "+" ? "" : n.operator, r("argument")];
4564
+ case "NullLiteral":
4565
+ return "null";
4566
+ case "BooleanLiteral":
4567
+ return n.value ? "true" : "false";
4568
+ case "StringLiteral":
4569
+ return JSON.stringify(n.value);
4570
+ case "NumericLiteral":
4571
+ return da(e) ? JSON.stringify(String(n.value)) : JSON.stringify(n.value);
4572
+ case "Identifier":
4573
+ return da(e) ? JSON.stringify(n.name) : n.name;
4574
+ case "TemplateLiteral":
4575
+ return r(["quasis", 0]);
4576
+ case "TemplateElement":
4577
+ return JSON.stringify(n.value.cooked);
4578
+ default:
4579
+ throw new Qe(n, "JSON");
4580
+ }
4581
+ }
4582
+ function da(e) {
4583
+ return e.key === "key" && e.parent.type === "ObjectProperty";
4584
+ }
4585
+ var ED = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]);
4586
+ function Ca(e, t) {
4587
+ let { type: r } = e;
4588
+ if (r === "ObjectProperty") {
4589
+ let { key: n } = e;
4590
+ n.type === "Identifier" ? t.key = { type: "StringLiteral", value: n.name } : n.type === "NumericLiteral" && (t.key = { type: "StringLiteral", value: String(n.value) });
4591
+ return;
4592
+ }
4593
+ if (r === "UnaryExpression" && e.operator === "+") return t.argument;
4594
+ if (r === "ArrayExpression") {
4595
+ for (let [n, s] of e.elements.entries()) s === null && t.elements.splice(n, 0, { type: "NullLiteral" });
4596
+ return;
4597
+ }
4598
+ if (r === "TemplateLiteral") return { type: "StringLiteral", value: e.quasis[0].value.cooked };
4599
+ }
4600
+ Ca.ignoredProperties = ED;
4601
+ var pr = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, objectWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap object literals.", choices: [{ value: "preserve", description: "Keep as multi-line, if there is a newline between the opening brace and first property." }, { value: "collapse", description: "Fit to a single line when possible." }] }, singleQuote: { category: "Common", type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { category: "Common", type: "boolean", default: false, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { category: "Common", type: "boolean", default: false, description: "Enforce single attribute per line in HTML, Vue and JSX." } };
4602
+ var St = "JavaScript";
4603
+ var FD = { arrowParens: { category: St, type: "choice", default: "always", description: "Include parentheses around a sole arrow function parameter.", choices: [{ value: "always", description: "Always include parens. Example: `(x) => x`" }, { value: "avoid", description: "Omit parens when possible. Example: `x => x`" }] }, bracketSameLine: pr.bracketSameLine, objectWrap: pr.objectWrap, bracketSpacing: pr.bracketSpacing, jsxBracketSameLine: { category: St, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { category: St, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, experimentalOperatorPosition: { category: St, type: "choice", default: "end", description: "Where to print operators when binary expressions wrap lines.", choices: [{ value: "start", description: "Print operators at the start of new lines." }, { value: "end", description: "Print operators at the end of previous lines." }] }, experimentalTernaries: { category: St, type: "boolean", default: false, description: "Use curious ternaries, with the question mark after the condition.", oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." }, singleQuote: pr.singleQuote, jsxSingleQuote: { category: St, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { category: St, type: "choice", default: "as-needed", description: "Change when properties in objects are quoted.", choices: [{ value: "as-needed", description: "Only add quotes around object properties where required." }, { value: "consistent", description: "If at least one property in an object requires quotes, quote all properties." }, { value: "preserve", description: "Respect the input use of quotes in object properties." }] }, trailingComma: { category: St, type: "choice", default: "all", description: "Print trailing commas wherever possible when multi-line.", choices: [{ value: "all", description: "Trailing commas wherever possible (including function arguments)." }, { value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, { value: "none", description: "No trailing commas." }] }, singleAttributePerLine: pr.singleAttributePerLine };
4604
+ var Aa = FD;
4605
+ var dD = { estree: Hs, "estree-json": Xs };
4606
+ var CD = [...Qs, ...ya];
4607
+ export {
4608
+ Ta as default,
4609
+ CD as languages,
4610
+ Aa as options,
4611
+ dD as printers
4612
+ };