@restura/core 0.1.0-alpha.6 → 0.1.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4396 @@
1
+ import {
2
+ __publicField,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-TL4KRYOF.mjs";
6
+
7
+ // ../../node_modules/.pnpm/prettier@3.3.3/node_modules/prettier/plugins/estree.mjs
8
+ var Wa = Object.defineProperty;
9
+ var Js = (e) => {
10
+ throw TypeError(e);
11
+ };
12
+ var Ar = (e, t) => {
13
+ for (var r in t) Wa(e, r, { get: t[r], enumerable: true });
14
+ };
15
+ var qs = (e, t, r) => t.has(e) || Js("Cannot " + r);
16
+ var pt = (e, t, r) => (qs(e, t, "read from private field"), r ? r.call(e) : t.get(e));
17
+ var Ws = (e, t, r) => t.has(e) ? Js("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
18
+ var Gs = (e, t, r, n) => (qs(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
19
+ var _s = {};
20
+ Ar(_s, { languages: () => nm, options: () => va, printers: () => rm });
21
+ var Us = [{ linguistLanguageId: 183, name: "JavaScript", type: "programming", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", color: "#f1e05a", aliases: ["js", "node"], extensions: [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib", ".wxs"], filenames: ["Jakefile"], 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", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", color: "#f1e05a", aliases: [], extensions: [".js.flow"], filenames: [], interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], parsers: ["flow", "babel-flow"], vscodeLanguageIds: ["javascript"] }, { linguistLanguageId: 183, name: "JSX", type: "programming", tmScope: "source.js.jsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", color: void 0, aliases: void 0, extensions: [".jsx"], filenames: void 0, interpreters: void 0, parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], vscodeLanguageIds: ["javascriptreact"], group: "JavaScript" }, { linguistLanguageId: 378, name: "TypeScript", type: "programming", color: "#3178c6", aliases: ["ts"], interpreters: ["deno", "ts-node"], extensions: [".ts", ".cts", ".mts"], tmScope: "source.ts", aceMode: "typescript", codemirrorMode: "javascript", codemirrorMimeType: "application/typescript", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescript"] }, { linguistLanguageId: 94901924, name: "TSX", type: "programming", color: "#3178c6", group: "TypeScript", extensions: [".tsx"], tmScope: "source.tsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescriptreact"] }];
22
+ var ws = {};
23
+ Ar(ws, { canAttachComment: () => fp, embed: () => Qu, experimentalFeatures: () => Kl, getCommentChildNodes: () => Ep, getVisitorKeys: () => gr, handleComments: () => Kn, insertPragma: () => pi, isBlockComment: () => re, isGap: () => Fp, massageAstNode: () => Cu, print: () => Ia, printComment: () => Pu, willPrintOwnComments: () => zn });
24
+ var Ga = (e, t, r, n) => {
25
+ if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
26
+ };
27
+ var N = Ga;
28
+ var Ua = (e, t, r) => {
29
+ if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
30
+ };
31
+ var O = Ua;
32
+ function Na(e) {
33
+ return e !== null && typeof e == "object";
34
+ }
35
+ var Ns = Na;
36
+ function* Xa(e, t) {
37
+ let { getVisitorKeys: r, filter: n = () => true } = t, s = (u) => Ns(u) && n(u);
38
+ for (let u of r(e)) {
39
+ let i = e[u];
40
+ if (Array.isArray(i)) for (let a of i) s(a) && (yield a);
41
+ else s(i) && (yield i);
42
+ }
43
+ }
44
+ function* Ya(e, t) {
45
+ let r = [e];
46
+ for (let n = 0; n < r.length; n++) {
47
+ let s = r[n];
48
+ for (let u of Xa(s, t)) yield u, r.push(u);
49
+ }
50
+ }
51
+ function Xs(e, { getVisitorKeys: t, predicate: r }) {
52
+ for (let n of Ya(e, { getVisitorKeys: t })) if (r(n)) return true;
53
+ return false;
54
+ }
55
+ var Ys = () => /[#*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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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-\uDED7\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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\uDD3D\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\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]|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\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;
56
+ function Hs(e) {
57
+ return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
58
+ }
59
+ function Vs(e) {
60
+ 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 >= 9800 && e <= 9811 || e === 9855 || 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 <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && 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 === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || 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 === 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 <= 128727 || 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 <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
61
+ }
62
+ var $s = (e) => !(Hs(e) || Vs(e));
63
+ var Ha = /[^\x20-\x7F]/u;
64
+ function Va(e) {
65
+ if (!e) return 0;
66
+ if (!Ha.test(e)) return e.length;
67
+ e = e.replace(Ys(), " ");
68
+ let t = 0;
69
+ for (let r of e) {
70
+ let n = r.codePointAt(0);
71
+ n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || (t += $s(n) ? 1 : 2);
72
+ }
73
+ return t;
74
+ }
75
+ var et = Va;
76
+ function Tr(e) {
77
+ return (t, r, n) => {
78
+ let s = !!(n != null && n.backwards);
79
+ if (r === false) return false;
80
+ let { length: u } = t, i = r;
81
+ for (; i >= 0 && i < u; ) {
82
+ let a = t.charAt(i);
83
+ if (e instanceof RegExp) {
84
+ if (!e.test(a)) return i;
85
+ } else if (!e.includes(a)) return i;
86
+ s ? i-- : i++;
87
+ }
88
+ return i === -1 || i === u ? i : false;
89
+ };
90
+ }
91
+ var dm = Tr(/\s/u);
92
+ var Ge = Tr(" ");
93
+ var Ks = Tr(",; ");
94
+ var zs = Tr(/[^\n\r]/u);
95
+ function $a(e, t, r) {
96
+ let n = !!(r != null && r.backwards);
97
+ if (t === false) return false;
98
+ let s = e.charAt(t);
99
+ if (n) {
100
+ if (e.charAt(t - 1) === "\r" && s === `
101
+ `) return t - 2;
102
+ if (s === `
103
+ ` || s === "\r" || s === "\u2028" || s === "\u2029") return t - 1;
104
+ } else {
105
+ if (s === "\r" && e.charAt(t + 1) === `
106
+ `) return t + 2;
107
+ if (s === `
108
+ ` || s === "\r" || s === "\u2028" || s === "\u2029") return t + 1;
109
+ }
110
+ return t;
111
+ }
112
+ var Ue = $a;
113
+ function Ka(e, t, r = {}) {
114
+ let n = Ge(e, r.backwards ? t - 1 : t, r), s = Ue(e, n, r);
115
+ return n !== s;
116
+ }
117
+ var te = Ka;
118
+ function za(e, t) {
119
+ if (t === false) return false;
120
+ if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
121
+ for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
122
+ }
123
+ return t;
124
+ }
125
+ var Lt = za;
126
+ function Qa(e, t) {
127
+ return t === false ? false : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? zs(e, t) : t;
128
+ }
129
+ var wt = Qa;
130
+ function Za(e, t) {
131
+ let r = null, n = t;
132
+ for (; n !== r; ) r = n, n = Ks(e, n), n = Lt(e, n), n = Ge(e, n);
133
+ return n = wt(e, n), n = Ue(e, n), n !== false && te(e, n);
134
+ }
135
+ var Ot = Za;
136
+ function eo(e) {
137
+ return Array.isArray(e) && e.length > 0;
138
+ }
139
+ var w = eo;
140
+ var dr = "'";
141
+ var Qs = '"';
142
+ function to(e, t) {
143
+ let r = t === true || t === dr ? dr : Qs, n = r === dr ? Qs : dr, s = 0, u = 0;
144
+ for (let i of e) i === r ? s++ : i === n && u++;
145
+ return s > u ? n : r;
146
+ }
147
+ var xr = to;
148
+ function ro(e, t, r) {
149
+ let n = t === '"' ? "'" : '"', u = N(false, e, new RegExp(`\\\\(.)|(["'])`, "gsu"), (i, a, o) => a === n ? a : o === t ? "\\" + o : o || (r && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a) ? a : "\\" + a));
150
+ return t + u + t;
151
+ }
152
+ var Zs = ro;
153
+ function no(e, t) {
154
+ let r = e.slice(1, -1), n = t.parser === "json" || t.parser === "jsonc" || t.parser === "json5" && t.quoteProps === "preserve" && !t.singleQuote ? '"' : t.__isInHtmlAttribute ? "'" : xr(r, t.singleQuote);
155
+ return Zs(r, n, !(t.parser === "css" || t.parser === "less" || t.parser === "scss" || t.__embeddedInHtml));
156
+ }
157
+ var tt = no;
158
+ function R(e) {
159
+ var _a2, _b;
160
+ var n, s, u;
161
+ let t = (_a2 = (n = e.range) == null ? void 0 : n[0]) != null ? _a2 : e.start, r = (u = (_b = (s = e.declaration) == null ? void 0 : s.decorators) != null ? _b : e.decorators) == null ? void 0 : u[0];
162
+ return r ? Math.min(R(r), t) : t;
163
+ }
164
+ function k(e) {
165
+ var _a2;
166
+ var t;
167
+ return (_a2 = (t = e.range) == null ? void 0 : t[1]) != null ? _a2 : e.end;
168
+ }
169
+ function ht(e, t) {
170
+ let r = R(e);
171
+ return Number.isInteger(r) && r === R(t);
172
+ }
173
+ function so(e, t) {
174
+ let r = k(e);
175
+ return Number.isInteger(r) && r === k(t);
176
+ }
177
+ function eu(e, t) {
178
+ return ht(e, t) && so(e, t);
179
+ }
180
+ var Qt = null;
181
+ function Zt(e) {
182
+ if (Qt !== null && typeof Qt.property) {
183
+ let t = Qt;
184
+ return Qt = Zt.prototype = null, t;
185
+ }
186
+ return Qt = Zt.prototype = e != null ? e : /* @__PURE__ */ Object.create(null), new Zt();
187
+ }
188
+ var uo = 10;
189
+ for (let e = 0; e <= uo; e++) Zt();
190
+ function In(e) {
191
+ return Zt(e);
192
+ }
193
+ function io(e, t = "type") {
194
+ In(e);
195
+ function r(n) {
196
+ let s = n[t], u = e[s];
197
+ if (!Array.isArray(u)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: n });
198
+ return u;
199
+ }
200
+ return r;
201
+ }
202
+ var hr = io;
203
+ var tu = { ArrayExpression: ["elements"], AssignmentExpression: ["left", "right"], BinaryExpression: ["left", "right"], InterpreterDirective: [], Directive: ["value"], DirectiveLiteral: [], BlockStatement: ["directives", "body"], BreakStatement: ["label"], CallExpression: ["callee", "arguments", "typeParameters", "typeArguments"], CatchClause: ["param", "body"], ConditionalExpression: ["test", "consequent", "alternate"], ContinueStatement: ["label"], DebuggerStatement: [], DoWhileStatement: ["test", "body"], EmptyStatement: [], ExpressionStatement: ["expression"], File: ["program"], ForInStatement: ["left", "right", "body"], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: ["id", "params", "body", "returnType", "typeParameters", "predicate"], FunctionExpression: ["id", "params", "body", "returnType", "typeParameters"], Identifier: ["typeAnnotation", "decorators"], IfStatement: ["test", "consequent", "alternate"], LabeledStatement: ["label", "body"], StringLiteral: [], NumericLiteral: [], NullLiteral: [], BooleanLiteral: [], RegExpLiteral: [], LogicalExpression: ["left", "right"], MemberExpression: ["object", "property"], NewExpression: ["callee", "arguments", "typeParameters", "typeArguments"], Program: ["directives", "body"], ObjectExpression: ["properties"], ObjectMethod: ["key", "params", "body", "decorators", "returnType", "typeParameters"], ObjectProperty: ["key", "value", "decorators"], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: ["argument"], SequenceExpression: ["expressions"], ParenthesizedExpression: ["expression"], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], ThisExpression: [], ThrowStatement: ["argument"], TryStatement: ["block", "handler", "finalizer"], UnaryExpression: ["argument"], UpdateExpression: ["argument"], VariableDeclaration: ["declarations"], VariableDeclarator: ["id", "init"], WhileStatement: ["test", "body"], WithStatement: ["object", "body"], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrowFunctionExpression: ["params", "body", "returnType", "typeParameters", "predicate"], ClassBody: ["body"], ClassExpression: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators", "superTypeArguments"], ClassDeclaration: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators", "superTypeArguments"], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportNamedDeclaration: ["declaration", "specifiers", "source", "attributes"], ExportSpecifier: ["local", "exported"], ForOfStatement: ["left", "right", "body"], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: ["local"], ImportNamespaceSpecifier: ["local"], ImportSpecifier: ["local", "imported"], ImportExpression: ["source", "options", "attributes"], MetaProperty: ["meta", "property"], ClassMethod: ["key", "params", "body", "decorators", "returnType", "typeParameters"], ObjectPattern: ["properties", "typeAnnotation", "decorators"], SpreadElement: ["argument"], Super: [], TaggedTemplateExpression: ["tag", "quasi", "typeParameters", "typeArguments"], TemplateElement: [], TemplateLiteral: ["quasis", "expressions"], YieldExpression: ["argument"], AwaitExpression: ["argument"], Import: [], BigIntLiteral: [], ExportNamespaceSpecifier: ["exported"], OptionalMemberExpression: ["object", "property"], OptionalCallExpression: ["callee", "arguments", "typeParameters", "typeArguments"], ClassProperty: ["key", "value", "typeAnnotation", "decorators", "variance"], ClassAccessorProperty: ["key", "value", "typeAnnotation", "decorators"], ClassPrivateProperty: ["key", "value", "decorators", "typeAnnotation", "variance"], ClassPrivateMethod: ["key", "params", "body", "decorators", "returnType", "typeParameters"], PrivateName: ["id"], StaticBlock: ["body"], AnyTypeAnnotation: [], ArrayTypeAnnotation: ["elementType"], BooleanTypeAnnotation: [], BooleanLiteralTypeAnnotation: [], NullLiteralTypeAnnotation: [], ClassImplements: ["id", "typeParameters"], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareFunction: ["id", "predicate"], DeclareInterface: ["id", "typeParameters", "extends", "body"], DeclareModule: ["id", "body"], DeclareModuleExports: ["typeAnnotation"], DeclareTypeAlias: ["id", "typeParameters", "right"], DeclareOpaqueType: ["id", "typeParameters", "supertype"], DeclareVariable: ["id"], DeclareExportDeclaration: ["declaration", "specifiers", "source"], DeclareExportAllDeclaration: ["source"], DeclaredPredicate: ["value"], ExistsTypeAnnotation: [], FunctionTypeAnnotation: ["typeParameters", "params", "rest", "returnType", "this"], FunctionTypeParam: ["name", "typeAnnotation"], GenericTypeAnnotation: ["id", "typeParameters"], InferredPredicate: [], InterfaceExtends: ["id", "typeParameters"], InterfaceDeclaration: ["id", "typeParameters", "extends", "body"], InterfaceTypeAnnotation: ["extends", "body"], IntersectionTypeAnnotation: ["types"], MixedTypeAnnotation: [], EmptyTypeAnnotation: [], NullableTypeAnnotation: ["typeAnnotation"], NumberLiteralTypeAnnotation: [], NumberTypeAnnotation: [], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeCallProperty: ["value"], ObjectTypeIndexer: ["id", "key", "value", "variance"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: ["argument"], OpaqueType: ["id", "typeParameters", "supertype", "impltype"], QualifiedTypeIdentifier: ["id", "qualification"], StringLiteralTypeAnnotation: [], StringTypeAnnotation: [], SymbolTypeAnnotation: [], ThisTypeAnnotation: [], TupleTypeAnnotation: ["types", "elementTypes"], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeAlias: ["id", "typeParameters", "right"], TypeAnnotation: ["typeAnnotation"], TypeCastExpression: ["expression", "typeAnnotation"], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: ["params"], TypeParameterInstantiation: ["params"], UnionTypeAnnotation: ["types"], Variance: [], VoidTypeAnnotation: [], EnumDeclaration: ["id", "body"], EnumBooleanBody: ["members"], EnumNumberBody: ["members"], EnumStringBody: ["members"], EnumSymbolBody: ["members"], EnumBooleanMember: ["id", "init"], EnumNumberMember: ["id", "init"], EnumStringMember: ["id", "init"], EnumDefaultedMember: ["id"], IndexedAccessType: ["objectType", "indexType"], OptionalIndexedAccessType: ["objectType", "indexType"], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: [], JSXExpressionContainer: ["expression"], JSXSpreadChild: ["expression"], JSXIdentifier: [], JSXMemberExpression: ["object", "property"], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "attributes", "typeArguments", "typeParameters"], JSXSpreadAttribute: ["argument"], JSXText: [], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXOpeningFragment: [], JSXClosingFragment: [], Noop: [], Placeholder: [], V8IntrinsicIdentifier: [], ArgumentPlaceholder: [], BindExpression: ["object", "callee"], ImportAttribute: ["key", "value"], Decorator: ["expression"], DoExpression: ["body"], ExportDefaultSpecifier: ["exported"], RecordExpression: ["properties"], TupleExpression: ["elements"], DecimalLiteral: [], ModuleExpression: ["body"], TopicReference: [], PipelineTopicExpression: ["expression"], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: [], TSParameterProperty: ["parameter", "decorators"], TSDeclareFunction: ["id", "typeParameters", "params", "returnType", "body"], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSQualifiedName: ["left", "right"], TSCallSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSPropertySignature: ["key", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSIndexSignature: ["parameters", "typeAnnotation"], TSAnyKeyword: [], TSBooleanKeyword: [], TSBigIntKeyword: [], TSIntrinsicKeyword: [], TSNeverKeyword: [], TSNullKeyword: [], TSNumberKeyword: [], TSObjectKeyword: [], TSStringKeyword: [], TSSymbolKeyword: [], TSUndefinedKeyword: [], TSUnknownKeyword: [], TSVoidKeyword: [], TSThisType: [], TSFunctionType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructorType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSTypeReference: ["typeName", "typeParameters", "typeArguments"], TSTypePredicate: ["parameterName", "typeAnnotation"], TSTypeQuery: ["exprName", "typeParameters", "typeArguments"], TSTypeLiteral: ["members"], TSArrayType: ["elementType"], TSTupleType: ["elementTypes"], TSOptionalType: ["typeAnnotation"], TSRestType: ["typeAnnotation"], TSNamedTupleMember: ["label", "elementType"], TSUnionType: ["types"], TSIntersectionType: ["types"], TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"], TSInferType: ["typeParameter"], TSParenthesizedType: ["typeAnnotation"], TSTypeOperator: ["typeAnnotation"], TSIndexedAccessType: ["objectType", "indexType"], TSMappedType: ["typeParameter", "typeAnnotation", "nameType"], TSLiteralType: ["literal"], TSExpressionWithTypeArguments: ["expression", "typeParameters"], TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"], TSInterfaceBody: ["body"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSInstantiationExpression: ["expression", "typeParameters", "typeArguments"], TSAsExpression: ["expression", "typeAnnotation"], TSSatisfiesExpression: ["expression", "typeAnnotation"], TSTypeAssertion: ["typeAnnotation", "expression"], TSEnumDeclaration: ["id", "members"], TSEnumMember: ["id", "initializer"], TSModuleDeclaration: ["id", "body"], TSModuleBlock: ["body"], TSImportType: ["argument", "qualifier", "typeParameters", "typeArguments"], TSImportEqualsDeclaration: ["id", "moduleReference"], TSExternalModuleReference: ["expression"], TSNonNullExpression: ["expression"], TSExportAssignment: ["expression"], TSNamespaceExportDeclaration: ["id"], TSTypeAnnotation: ["typeAnnotation"], TSTypeParameterInstantiation: ["params"], TSTypeParameterDeclaration: ["params"], TSTypeParameter: ["constraint", "default", "name"], ChainExpression: ["expression"], ExperimentalRestProperty: ["argument"], ExperimentalSpreadProperty: ["argument"], Literal: [], MethodDefinition: ["decorators", "key", "value"], PrivateIdentifier: [], Property: ["key", "value"], PropertyDefinition: ["decorators", "key", "typeAnnotation", "value", "variance"], AccessorProperty: ["decorators", "key", "typeAnnotation", "value"], TSAbstractAccessorProperty: ["decorators", "key", "typeAnnotation"], TSAbstractKeyword: [], TSAbstractMethodDefinition: ["key", "value"], TSAbstractPropertyDefinition: ["decorators", "key", "typeAnnotation"], TSAsyncKeyword: [], TSClassImplements: ["expression", "typeArguments", "typeParameters"], TSDeclareKeyword: [], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSEnumBody: ["members"], TSExportKeyword: [], TSInterfaceHeritage: ["expression", "typeArguments", "typeParameters"], TSPrivateKeyword: [], TSProtectedKeyword: [], TSPublicKeyword: [], TSReadonlyKeyword: [], TSStaticKeyword: [], TSTemplateLiteralType: ["quasis", "types"], AsConstExpression: ["expression"], AsExpression: ["expression", "typeAnnotation"], BigIntLiteralTypeAnnotation: [], BigIntTypeAnnotation: [], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: ["name", "typeAnnotation"], ConditionalTypeAnnotation: ["checkType", "extendsType", "trueType", "falseType"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclareEnum: ["id", "body"], DeclareHook: ["id"], DeclareNamespace: ["id", "body"], EnumBigIntBody: ["members"], EnumBigIntMember: ["id", "init"], HookDeclaration: ["id", "params", "body", "typeParameters", "returnType"], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], InferTypeAnnotation: ["typeParameter"], KeyofTypeAnnotation: ["argument"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], QualifiedTypeofIdentifier: ["qualification", "id"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeOperator: ["typeAnnotation"], TypePredicate: ["parameterName", "typeAnnotation", "asserts"], NGRoot: ["node"], NGPipeExpression: ["left", "right", "arguments"], NGChainedExpression: ["expressions"], NGEmptyExpression: [], NGMicrosyntax: ["body"], NGMicrosyntaxKey: [], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: ["key", "value"], NGMicrosyntaxAs: ["key", "alias"], JsExpressionRoot: ["node"], JsonRoot: ["node"], TSJSDocAllType: [], TSJSDocUnknownType: [], TSJSDocNullableType: ["typeAnnotation"], TSJSDocNonNullableType: ["typeAnnotation"], NeverTypeAnnotation: [], UndefinedTypeAnnotation: [], UnknownTypeAnnotation: [], SatisfiesExpression: ["expression", "typeAnnotation"] };
204
+ var ao = hr(tu);
205
+ var gr = ao;
206
+ function oo(e) {
207
+ let t = new Set(e);
208
+ return (r) => t.has(r == null ? void 0 : r.type);
209
+ }
210
+ var v = oo;
211
+ var po = v(["Block", "CommentBlock", "MultiLine"]);
212
+ var re = po;
213
+ var co = v(["AnyTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "BooleanTypeAnnotation", "BigIntTypeAnnotation", "SymbolTypeAnnotation", "StringTypeAnnotation", "NeverTypeAnnotation", "UndefinedTypeAnnotation", "UnknownTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation"]);
214
+ var Sr = co;
215
+ function lo(e, t) {
216
+ let r = t.split(".");
217
+ for (let n = r.length - 1; n >= 0; n--) {
218
+ let s = r[n];
219
+ if (n === 0) return e.type === "Identifier" && e.name === s;
220
+ if (e.type !== "MemberExpression" || e.optional || e.computed || e.property.type !== "Identifier" || e.property.name !== s) return false;
221
+ e = e.object;
222
+ }
223
+ }
224
+ function mo(e, t) {
225
+ return t.some((r) => lo(e, r));
226
+ }
227
+ var ru = mo;
228
+ function yo({ type: e }) {
229
+ return e.startsWith("TS") && e.endsWith("Keyword");
230
+ }
231
+ var Br = yo;
232
+ function tr(e, t) {
233
+ return t(e) || Xs(e, { getVisitorKeys: gr, predicate: t });
234
+ }
235
+ function jt(e) {
236
+ return e.type === "AssignmentExpression" || e.type === "BinaryExpression" || e.type === "LogicalExpression" || e.type === "NGPipeExpression" || e.type === "ConditionalExpression" || L(e) || q(e) || e.type === "SequenceExpression" || e.type === "TaggedTemplateExpression" || e.type === "BindExpression" || e.type === "UpdateExpression" && !e.prefix || Te(e) || e.type === "TSNonNullExpression" || e.type === "ChainExpression";
237
+ }
238
+ function uu(e) {
239
+ var _a2, _b, _c2, _d, _e2, _f;
240
+ return e.expressions ? e.expressions[0] : (_f = (_e2 = (_d = (_c2 = (_b = (_a2 = e.left) != null ? _a2 : e.test) != null ? _b : e.callee) != null ? _c2 : e.object) != null ? _d : e.tag) != null ? _e2 : e.argument) != null ? _f : e.expression;
241
+ }
242
+ function Pr(e) {
243
+ if (e.expressions) return ["expressions", 0];
244
+ if (e.left) return ["left"];
245
+ if (e.test) return ["test"];
246
+ if (e.object) return ["object"];
247
+ if (e.callee) return ["callee"];
248
+ if (e.tag) return ["tag"];
249
+ if (e.argument) return ["argument"];
250
+ if (e.expression) return ["expression"];
251
+ throw new Error("Unexpected node has no left side.");
252
+ }
253
+ var vt = v(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose", "Hashbang", "InterpreterDirective"]);
254
+ var iu = v(["ExportDefaultDeclaration", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration", "DeclareExportAllDeclaration"]);
255
+ var U = v(["ArrayExpression", "TupleExpression"]);
256
+ var se = v(["ObjectExpression", "RecordExpression"]);
257
+ function au(e) {
258
+ return e.type === "LogicalExpression" && e.operator === "??";
259
+ }
260
+ function Ce(e) {
261
+ return e.type === "NumericLiteral" || e.type === "Literal" && typeof e.value == "number";
262
+ }
263
+ function jn(e) {
264
+ return e.type === "UnaryExpression" && (e.operator === "+" || e.operator === "-") && Ce(e.argument);
265
+ }
266
+ function Q(e) {
267
+ return !!(e && (e.type === "StringLiteral" || e.type === "Literal" && typeof e.value == "string"));
268
+ }
269
+ function vn(e) {
270
+ return e.type === "RegExpLiteral" || e.type === "Literal" && !!e.regex;
271
+ }
272
+ var kr = v(["Literal", "BooleanLiteral", "BigIntLiteral", "DecimalLiteral", "DirectiveLiteral", "NullLiteral", "NumericLiteral", "RegExpLiteral", "StringLiteral"]);
273
+ var Do = v(["Identifier", "ThisExpression", "Super", "PrivateName", "PrivateIdentifier", "Import"]);
274
+ var we = v(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]);
275
+ var _t = v(["FunctionExpression", "ArrowFunctionExpression"]);
276
+ function fo(e) {
277
+ return e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && e.body.type === "BlockStatement";
278
+ }
279
+ function Ln(e) {
280
+ return L(e) && e.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(e.callee.name);
281
+ }
282
+ var X = v(["JSXElement", "JSXFragment"]);
283
+ function gt(e) {
284
+ return e.method && e.kind === "init" || e.kind === "get" || e.kind === "set";
285
+ }
286
+ function Ir(e) {
287
+ return (e.type === "ObjectTypeProperty" || e.type === "ObjectTypeInternalSlot") && !e.static && !e.method && e.kind !== "get" && e.kind !== "set" && e.value.type === "FunctionTypeAnnotation";
288
+ }
289
+ function ou(e) {
290
+ return (e.type === "TypeAnnotation" || e.type === "TSTypeAnnotation") && e.typeAnnotation.type === "FunctionTypeAnnotation" && !e.static && !ht(e, e.typeAnnotation);
291
+ }
292
+ var De = v(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
293
+ function Ft(e) {
294
+ return q(e) || e.type === "BindExpression" && !!e.object;
295
+ }
296
+ var Eo = v(["TSThisType", "NullLiteralTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType"]);
297
+ function Mt(e) {
298
+ return Br(e) || Sr(e) || Eo(e) || (e.type === "GenericTypeAnnotation" || e.type === "TSTypeReference") && !e.typeParameters && !e.typeArguments;
299
+ }
300
+ function Fo(e) {
301
+ return e.type === "Identifier" && (e.name === "beforeEach" || e.name === "beforeAll" || e.name === "afterEach" || e.name === "afterAll");
302
+ }
303
+ var Co = ["it", "it.only", "it.skip", "describe", "describe.only", "describe.skip", "test", "test.only", "test.skip", "test.step", "test.describe", "test.describe.only", "test.describe.parallel", "test.describe.parallel.only", "test.describe.serial", "test.describe.serial.only", "skip", "xit", "xdescribe", "xtest", "fit", "fdescribe", "ftest"];
304
+ function Ao(e) {
305
+ return ru(e, Co);
306
+ }
307
+ function St(e, t) {
308
+ if ((e == null ? void 0 : e.type) !== "CallExpression" || e.optional) return false;
309
+ let r = oe(e);
310
+ if (r.length === 1) {
311
+ if (Ln(e) && St(t)) return _t(r[0]);
312
+ if (Fo(e.callee)) return Ln(r[0]);
313
+ } else if ((r.length === 2 || r.length === 3) && (r[0].type === "TemplateLiteral" || Q(r[0])) && Ao(e.callee)) return r[2] && !Ce(r[2]) ? false : (r.length === 2 ? _t(r[1]) : fo(r[1]) && K(r[1]).length <= 1) || Ln(r[1]);
314
+ return false;
315
+ }
316
+ var pu = (e) => (t) => ((t == null ? void 0 : t.type) === "ChainExpression" && (t = t.expression), e(t));
317
+ var L = pu(v(["CallExpression", "OptionalCallExpression"]));
318
+ var q = pu(v(["MemberExpression", "OptionalMemberExpression"]));
319
+ function Mn(e, t = 5) {
320
+ return cu(e, t) <= t;
321
+ }
322
+ function cu(e, t) {
323
+ let r = 0;
324
+ for (let n in e) {
325
+ let s = e[n];
326
+ if (s && typeof s == "object" && typeof s.type == "string" && (r++, r += cu(s, t - r)), r > t) return r;
327
+ }
328
+ return r;
329
+ }
330
+ var To = 0.25;
331
+ function rr(e, t) {
332
+ let { printWidth: r } = t;
333
+ if (d(e)) return false;
334
+ let n = r * To;
335
+ if (e.type === "ThisExpression" || e.type === "Identifier" && e.name.length <= n || jn(e) && !d(e.argument)) return true;
336
+ let s = e.type === "Literal" && "regex" in e && e.regex.pattern || e.type === "RegExpLiteral" && e.pattern;
337
+ return s ? s.length <= n : Q(e) ? tt(fe(e), t).length <= n : e.type === "TemplateLiteral" ? e.expressions.length === 0 && e.quasis[0].value.raw.length <= n && !e.quasis[0].value.raw.includes(`
338
+ `) : e.type === "UnaryExpression" ? rr(e.argument, { printWidth: r }) : e.type === "CallExpression" && e.arguments.length === 0 && e.callee.type === "Identifier" ? e.callee.name.length <= n - 2 : kr(e);
339
+ }
340
+ function Oe(e, t) {
341
+ return X(t) ? Bt(t) : d(t, g.Leading, (r) => te(e, k(r)));
342
+ }
343
+ function nu(e) {
344
+ return e.quasis.some((t) => t.value.raw.includes(`
345
+ `));
346
+ }
347
+ function Lr(e, t) {
348
+ return (e.type === "TemplateLiteral" && nu(e) || e.type === "TaggedTemplateExpression" && nu(e.quasi)) && !te(t, R(e), { backwards: true });
349
+ }
350
+ function wr(e) {
351
+ if (!d(e)) return false;
352
+ let t = O(false, ct(e, g.Dangling), -1);
353
+ return t && !re(t);
354
+ }
355
+ function lu(e) {
356
+ if (e.length <= 1) return false;
357
+ let t = 0;
358
+ for (let r of e) if (_t(r)) {
359
+ if (t += 1, t > 1) return true;
360
+ } else if (L(r)) {
361
+ for (let n of oe(r)) if (_t(n)) return true;
362
+ }
363
+ return false;
364
+ }
365
+ function Or(e) {
366
+ let { node: t, parent: r, key: n } = e;
367
+ return n === "callee" && L(t) && L(r) && r.arguments.length > 0 && t.arguments.length > r.arguments.length;
368
+ }
369
+ var xo = /* @__PURE__ */ new Set(["!", "-", "+", "~"]);
370
+ function be(e, t = 2) {
371
+ var _a2;
372
+ if (t <= 0) return false;
373
+ if (e.type === "ChainExpression" || e.type === "TSNonNullExpression") return be(e.expression, t);
374
+ let r = (n) => be(n, t - 1);
375
+ if (vn(e)) return et((_a2 = e.pattern) != null ? _a2 : e.regex.pattern) <= 5;
376
+ if (kr(e) || Do(e) || e.type === "ArgumentPlaceholder") return true;
377
+ if (e.type === "TemplateLiteral") return e.quasis.every((n) => !n.value.raw.includes(`
378
+ `)) && e.expressions.every(r);
379
+ if (se(e)) return e.properties.every((n) => !n.computed && (n.shorthand || n.value && r(n.value)));
380
+ if (U(e)) return e.elements.every((n) => n === null || r(n));
381
+ if (lt(e)) {
382
+ if (e.type === "ImportExpression" || be(e.callee, t)) {
383
+ let n = oe(e);
384
+ return n.length <= t && n.every(r);
385
+ }
386
+ return false;
387
+ }
388
+ return q(e) ? be(e.object, t) && be(e.property, t) : e.type === "UnaryExpression" && xo.has(e.operator) || e.type === "UpdateExpression" ? be(e.argument, t) : false;
389
+ }
390
+ function fe(e) {
391
+ var _a2;
392
+ var t;
393
+ return (_a2 = (t = e.extra) == null ? void 0 : t.raw) != null ? _a2 : e.raw;
394
+ }
395
+ function mu(e) {
396
+ return e;
397
+ }
398
+ function ae(e, t = "es5") {
399
+ return e.trailingComma === "es5" && t === "es5" || e.trailingComma === "all" && (t === "all" || t === "es5");
400
+ }
401
+ function ie(e, t) {
402
+ switch (e.type) {
403
+ case "BinaryExpression":
404
+ case "LogicalExpression":
405
+ case "AssignmentExpression":
406
+ case "NGPipeExpression":
407
+ return ie(e.left, t);
408
+ case "MemberExpression":
409
+ case "OptionalMemberExpression":
410
+ return ie(e.object, t);
411
+ case "TaggedTemplateExpression":
412
+ return e.tag.type === "FunctionExpression" ? false : ie(e.tag, t);
413
+ case "CallExpression":
414
+ case "OptionalCallExpression":
415
+ return e.callee.type === "FunctionExpression" ? false : ie(e.callee, t);
416
+ case "ConditionalExpression":
417
+ return ie(e.test, t);
418
+ case "UpdateExpression":
419
+ return !e.prefix && ie(e.argument, t);
420
+ case "BindExpression":
421
+ return e.object && ie(e.object, t);
422
+ case "SequenceExpression":
423
+ return ie(e.expressions[0], t);
424
+ case "ChainExpression":
425
+ case "TSSatisfiesExpression":
426
+ case "TSAsExpression":
427
+ case "TSNonNullExpression":
428
+ case "AsExpression":
429
+ case "AsConstExpression":
430
+ case "SatisfiesExpression":
431
+ return ie(e.expression, t);
432
+ default:
433
+ return t(e);
434
+ }
435
+ }
436
+ var su = { "==": true, "!=": true, "===": true, "!==": true };
437
+ var br = { "*": true, "/": true, "%": true };
438
+ var _n = { ">>": true, ">>>": true, "<<": true };
439
+ function nr(e, t) {
440
+ return !(er(t) !== er(e) || e === "**" || su[e] && su[t] || t === "%" && br[e] || e === "%" && br[t] || t !== e && br[t] && br[e] || _n[e] && _n[t]);
441
+ }
442
+ var ho = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((e, t) => e.map((r) => [r, t])));
443
+ function er(e) {
444
+ return ho.get(e);
445
+ }
446
+ function yu(e) {
447
+ return !!_n[e] || e === "|" || e === "^" || e === "&";
448
+ }
449
+ function Du(e) {
450
+ var r;
451
+ if (e.rest) return true;
452
+ let t = K(e);
453
+ return ((r = O(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
454
+ }
455
+ var wn = /* @__PURE__ */ new WeakMap();
456
+ function K(e) {
457
+ if (wn.has(e)) return wn.get(e);
458
+ let t = [];
459
+ return e.this && t.push(e.this), Array.isArray(e.parameters) ? t.push(...e.parameters) : Array.isArray(e.params) && t.push(...e.params), e.rest && t.push(e.rest), wn.set(e, t), t;
460
+ }
461
+ function fu(e, t) {
462
+ let { node: r } = e, n = 0, s = (u) => t(u, n++);
463
+ r.this && e.call(s, "this"), Array.isArray(r.parameters) ? e.each(s, "parameters") : Array.isArray(r.params) && e.each(s, "params"), r.rest && e.call(s, "rest");
464
+ }
465
+ var On = /* @__PURE__ */ new WeakMap();
466
+ function oe(e) {
467
+ if (On.has(e)) return On.get(e);
468
+ if (e.type === "ChainExpression") return oe(e.expression);
469
+ let t = e.arguments;
470
+ return e.type === "ImportExpression" && (t = [e.source], e.attributes && t.push(e.attributes), e.options && t.push(e.options)), On.set(e, t), t;
471
+ }
472
+ function Rt(e, t) {
473
+ let { node: r } = e;
474
+ if (r.type === "ChainExpression") return e.call(() => Rt(e, t), "expression");
475
+ r.type === "ImportExpression" ? (e.call((n) => t(n, 0), "source"), r.attributes && e.call((n) => t(n, 1), "attributes"), r.options && e.call((n) => t(n, 1), "options")) : e.each(t, "arguments");
476
+ }
477
+ function Rn(e, t) {
478
+ let r = [];
479
+ if (e.type === "ChainExpression" && (e = e.expression, r.push("expression")), e.type === "ImportExpression") {
480
+ if (t === 0 || t === (e.attributes || e.options ? -2 : -1)) return [...r, "source"];
481
+ if (e.attributes && (t === 1 || t === -1)) return [...r, "attributes"];
482
+ if (e.options && (t === 1 || t === -1)) return [...r, "options"];
483
+ throw new RangeError("Invalid argument index");
484
+ }
485
+ if (t < 0 && (t = e.arguments.length + t), t < 0 || t >= e.arguments.length) throw new RangeError("Invalid argument index");
486
+ return [...r, "arguments", t];
487
+ }
488
+ function sr(e) {
489
+ return e.value.trim() === "prettier-ignore" && !e.unignore;
490
+ }
491
+ function Bt(e) {
492
+ return (e == null ? void 0 : e.prettierIgnore) || d(e, g.PrettierIgnore);
493
+ }
494
+ var g = { Leading: 2, Trailing: 4, Dangling: 8, Block: 16, Line: 32, PrettierIgnore: 64, First: 128, Last: 256 };
495
+ var Eu = (e, t) => {
496
+ if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & g.Leading && !r.leading || e & g.Trailing && !r.trailing || e & g.Dangling && (r.leading || r.trailing) || e & g.Block && !re(r) || e & g.Line && !vt(r) || e & g.First && n !== 0 || e & g.Last && n !== s.length - 1 || e & g.PrettierIgnore && !sr(r) || t && !t(r));
497
+ };
498
+ function d(e, t, r) {
499
+ if (!w(e == null ? void 0 : e.comments)) return false;
500
+ let n = Eu(t, r);
501
+ return n ? e.comments.some(n) : true;
502
+ }
503
+ function ct(e, t, r) {
504
+ if (!Array.isArray(e == null ? void 0 : e.comments)) return [];
505
+ let n = Eu(t, r);
506
+ return n ? e.comments.filter(n) : e.comments;
507
+ }
508
+ var pe = (e, { originalText: t }) => Ot(t, k(e));
509
+ function lt(e) {
510
+ return L(e) || e.type === "NewExpression" || e.type === "ImportExpression";
511
+ }
512
+ function Ae(e) {
513
+ return e && (e.type === "ObjectProperty" || e.type === "Property" && !gt(e));
514
+ }
515
+ var Te = v(["TSAsExpression", "TSSatisfiesExpression", "AsExpression", "AsConstExpression", "SatisfiesExpression"]);
516
+ var Ne = v(["UnionTypeAnnotation", "TSUnionType"]);
517
+ var _r = v(["IntersectionTypeAnnotation", "TSIntersectionType"]);
518
+ var go = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]);
519
+ var Jt = (e) => {
520
+ for (let t of e.quasis) delete t.value;
521
+ };
522
+ function Fu(e, t, r) {
523
+ var s, u;
524
+ if (e.type === "Program" && delete t.sourceType, (e.type === "BigIntLiteral" || e.type === "BigIntLiteralTypeAnnotation") && e.value && (t.value = e.value.toLowerCase()), (e.type === "BigIntLiteral" || e.type === "Literal") && e.bigint && (t.bigint = e.bigint.toLowerCase()), e.type === "DecimalLiteral" && (t.value = Number(e.value)), e.type === "Literal" && t.decimal && (t.decimal = Number(e.decimal)), e.type === "EmptyStatement" || e.type === "JSXText" || e.type === "JSXExpressionContainer" && (e.expression.type === "Literal" || e.expression.type === "StringLiteral") && e.expression.value === " ") return null;
525
+ 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) {
526
+ let { key: i } = e;
527
+ Q(i) || Ce(i) ? t.key = String(i.value) : i.type === "Identifier" && (t.key = i.name);
528
+ }
529
+ if (e.type === "JSXElement" && e.openingElement.name.name === "style" && e.openingElement.attributes.some((i) => i.type === "JSXAttribute" && i.name.name === "jsx")) for (let { type: i, expression: a } of t.children) i === "JSXExpressionContainer" && a.type === "TemplateLiteral" && Jt(a);
530
+ e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && Jt(t.value.expression), e.type === "JSXAttribute" && ((s = e.value) == null ? void 0 : s.type) === "Literal" && /["']|&quot;|&apos;/u.test(e.value.value) && (t.value.value = N(false, e.value.value, /["']|&quot;|&apos;/gu, '"'));
531
+ let n = e.expression || e.callee;
532
+ if (e.type === "Decorator" && n.type === "CallExpression" && n.callee.name === "Component" && n.arguments.length === 1) {
533
+ let i = e.expression.arguments[0].properties;
534
+ for (let [a, o] of t.expression.arguments[0].properties.entries()) switch (i[a].key.name) {
535
+ case "styles":
536
+ U(o.value) && Jt(o.value.elements[0]);
537
+ break;
538
+ case "template":
539
+ o.value.type === "TemplateLiteral" && Jt(o.value);
540
+ break;
541
+ }
542
+ }
543
+ 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") && Jt(t.quasi), e.type === "TemplateLiteral" && ((u = e.leadingComments) != null && u.some((a) => re(a) && ["GraphQL", "HTML"].some((o) => a.value === ` ${o} `)) || r.type === "CallExpression" && r.callee.name === "graphql" || !e.leadingComments) && Jt(t), e.type === "ChainExpression" && e.expression.type === "TSNonNullExpression" && (t.type = "TSNonNullExpression", t.expression.type = "ChainExpression"), e.type === "TSMappedType" && (delete t.key, delete t.constraint), e.type === "TSEnumDeclaration" && delete t.body;
544
+ }
545
+ Fu.ignoredProperties = go;
546
+ var Cu = Fu;
547
+ var rt = "string";
548
+ var _e = "array";
549
+ var nt = "cursor";
550
+ var Xe = "indent";
551
+ var Ye = "align";
552
+ var st = "trim";
553
+ var le = "group";
554
+ var Pe = "fill";
555
+ var xe = "if-break";
556
+ var He = "indent-if-break";
557
+ var Ve = "line-suffix";
558
+ var $e = "line-suffix-boundary";
559
+ var me = "line";
560
+ var je = "label";
561
+ var ve = "break-parent";
562
+ var jr = /* @__PURE__ */ new Set([nt, Xe, Ye, st, le, Pe, xe, He, Ve, $e, me, je, ve]);
563
+ function So(e) {
564
+ if (typeof e == "string") return rt;
565
+ if (Array.isArray(e)) return _e;
566
+ if (!e) return;
567
+ let { type: t } = e;
568
+ if (jr.has(t)) return t;
569
+ }
570
+ var ut = So;
571
+ var Bo = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
572
+ function bo(e) {
573
+ let t = e === null ? "null" : typeof e;
574
+ if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
575
+ Expected it to be 'string' or 'object'.`;
576
+ if (ut(e)) throw new Error("doc is valid.");
577
+ let r = Object.prototype.toString.call(e);
578
+ if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
579
+ let n = Bo([...jr].map((s) => `'${s}'`));
580
+ return `Unexpected doc.type '${e.type}'.
581
+ Expected it to be ${n}.`;
582
+ }
583
+ var Jn = class extends Error {
584
+ constructor(t) {
585
+ super(bo(t));
586
+ __publicField(this, "name", "InvalidDocError");
587
+ this.doc = t;
588
+ }
589
+ };
590
+ var Ct = Jn;
591
+ var Au = {};
592
+ function Po(e, t, r, n) {
593
+ let s = [e];
594
+ for (; s.length > 0; ) {
595
+ let u = s.pop();
596
+ if (u === Au) {
597
+ r(s.pop());
598
+ continue;
599
+ }
600
+ r && s.push(u, Au);
601
+ let i = ut(u);
602
+ if (!i) throw new Ct(u);
603
+ if ((t == null ? void 0 : t(u)) !== false) switch (i) {
604
+ case _e:
605
+ case Pe: {
606
+ let a = i === _e ? u : u.parts;
607
+ for (let o = a.length, c = o - 1; c >= 0; --c) s.push(a[c]);
608
+ break;
609
+ }
610
+ case xe:
611
+ s.push(u.flatContents, u.breakContents);
612
+ break;
613
+ case le:
614
+ if (n && u.expandedStates) for (let a = u.expandedStates.length, o = a - 1; o >= 0; --o) s.push(u.expandedStates[o]);
615
+ else s.push(u.contents);
616
+ break;
617
+ case Ye:
618
+ case Xe:
619
+ case He:
620
+ case je:
621
+ case Ve:
622
+ s.push(u.contents);
623
+ break;
624
+ case rt:
625
+ case nt:
626
+ case st:
627
+ case $e:
628
+ case me:
629
+ case ve:
630
+ break;
631
+ default:
632
+ throw new Ct(u);
633
+ }
634
+ }
635
+ }
636
+ var qn = Po;
637
+ var Tu = () => {
638
+ };
639
+ var Ke = Tu;
640
+ var vr = Tu;
641
+ function f(e) {
642
+ return Ke(e), { type: Xe, contents: e };
643
+ }
644
+ function he(e, t) {
645
+ return Ke(t), { type: Ye, contents: t, n: e };
646
+ }
647
+ function l(e, t = {}) {
648
+ return Ke(e), vr(t.expandedStates, true), { type: le, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
649
+ }
650
+ function du(e) {
651
+ return he(Number.NEGATIVE_INFINITY, e);
652
+ }
653
+ function Mr(e) {
654
+ return he(-1, e);
655
+ }
656
+ function ze(e, t) {
657
+ return l(e[0], __spreadProps(__spreadValues({}, t), { expandedStates: e }));
658
+ }
659
+ function qt(e) {
660
+ return vr(e), { type: Pe, parts: e };
661
+ }
662
+ function b(e, t = "", r = {}) {
663
+ return Ke(e), t !== "" && Ke(t), { type: xe, breakContents: e, flatContents: t, groupId: r.groupId };
664
+ }
665
+ function At(e, t) {
666
+ return Ke(e), { type: He, contents: e, groupId: t.groupId, negate: t.negate };
667
+ }
668
+ function Wn(e) {
669
+ return Ke(e), { type: Ve, contents: e };
670
+ }
671
+ var ke = { type: $e };
672
+ var Ee = { type: ve };
673
+ var Gn = { type: me, hard: true };
674
+ var ko = { type: me, hard: true, literal: true };
675
+ var x = { type: me };
676
+ var E = { type: me, soft: true };
677
+ var F = [Gn, Ee];
678
+ var Rr = [ko, Ee];
679
+ var Un = { type: nt };
680
+ function P(e, t) {
681
+ Ke(e), vr(t);
682
+ let r = [];
683
+ for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
684
+ return r;
685
+ }
686
+ function xu(e, t, r) {
687
+ Ke(e);
688
+ let n = e;
689
+ if (t > 0) {
690
+ for (let s = 0; s < Math.floor(t / r); ++s) n = f(n);
691
+ n = he(t % r, n), n = he(Number.NEGATIVE_INFINITY, n);
692
+ }
693
+ return n;
694
+ }
695
+ function it(e, t) {
696
+ return Ke(t), e ? { type: je, label: e, contents: t } : t;
697
+ }
698
+ function mt(e, t) {
699
+ if (typeof e == "string") return t(e);
700
+ let r = /* @__PURE__ */ new Map();
701
+ return n(e);
702
+ function n(u) {
703
+ if (r.has(u)) return r.get(u);
704
+ let i = s(u);
705
+ return r.set(u, i), i;
706
+ }
707
+ function s(u) {
708
+ switch (ut(u)) {
709
+ case _e:
710
+ return t(u.map(n));
711
+ case Pe:
712
+ return t(__spreadProps(__spreadValues({}, u), { parts: u.parts.map(n) }));
713
+ case xe:
714
+ return t(__spreadProps(__spreadValues({}, u), { breakContents: n(u.breakContents), flatContents: n(u.flatContents) }));
715
+ case le: {
716
+ let { expandedStates: i, contents: a } = u;
717
+ return i ? (i = i.map(n), a = i[0]) : a = n(a), t(__spreadProps(__spreadValues({}, u), { contents: a, expandedStates: i }));
718
+ }
719
+ case Ye:
720
+ case Xe:
721
+ case He:
722
+ case je:
723
+ case Ve:
724
+ return t(__spreadProps(__spreadValues({}, u), { contents: n(u.contents) }));
725
+ case rt:
726
+ case nt:
727
+ case st:
728
+ case $e:
729
+ case me:
730
+ case ve:
731
+ return t(u);
732
+ default:
733
+ throw new Ct(u);
734
+ }
735
+ }
736
+ }
737
+ function gu(e, t, r) {
738
+ let n = r, s = false;
739
+ function u(i) {
740
+ if (s) return false;
741
+ let a = t(i);
742
+ a !== void 0 && (s = true, n = a);
743
+ }
744
+ return qn(e, u), n;
745
+ }
746
+ function Io(e) {
747
+ if (e.type === le && e.break || e.type === me && e.hard || e.type === ve) return true;
748
+ }
749
+ function ne(e) {
750
+ return gu(e, Io, false);
751
+ }
752
+ function hu(e) {
753
+ if (e.length > 0) {
754
+ let t = O(false, e, -1);
755
+ !t.expandedStates && !t.break && (t.break = "propagated");
756
+ }
757
+ return null;
758
+ }
759
+ function Su(e) {
760
+ let t = /* @__PURE__ */ new Set(), r = [];
761
+ function n(u) {
762
+ if (u.type === ve && hu(r), u.type === le) {
763
+ if (r.push(u), t.has(u)) return false;
764
+ t.add(u);
765
+ }
766
+ }
767
+ function s(u) {
768
+ u.type === le && r.pop().break && hu(r);
769
+ }
770
+ qn(e, n, s, true);
771
+ }
772
+ function Lo(e) {
773
+ return e.type === me && !e.hard ? e.soft ? "" : " " : e.type === xe ? e.flatContents : e;
774
+ }
775
+ function ur(e) {
776
+ return mt(e, Lo);
777
+ }
778
+ function wo(e) {
779
+ switch (ut(e)) {
780
+ case Pe:
781
+ if (e.parts.every((t) => t === "")) return "";
782
+ break;
783
+ case le:
784
+ if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
785
+ if (e.contents.type === le && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
786
+ break;
787
+ case Ye:
788
+ case Xe:
789
+ case He:
790
+ case Ve:
791
+ if (!e.contents) return "";
792
+ break;
793
+ case xe:
794
+ if (!e.flatContents && !e.breakContents) return "";
795
+ break;
796
+ case _e: {
797
+ let t = [];
798
+ for (let r of e) {
799
+ if (!r) continue;
800
+ let [n, ...s] = Array.isArray(r) ? r : [r];
801
+ typeof n == "string" && typeof O(false, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...s);
802
+ }
803
+ return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
804
+ }
805
+ case rt:
806
+ case nt:
807
+ case st:
808
+ case $e:
809
+ case me:
810
+ case je:
811
+ case ve:
812
+ break;
813
+ default:
814
+ throw new Ct(e);
815
+ }
816
+ return e;
817
+ }
818
+ function Wt(e) {
819
+ return mt(e, (t) => wo(t));
820
+ }
821
+ function Ie(e, t = Rr) {
822
+ return mt(e, (r) => typeof r == "string" ? P(t, r.split(`
823
+ `)) : r);
824
+ }
825
+ function Oo(e) {
826
+ if (e.type === me) return true;
827
+ }
828
+ function Bu(e) {
829
+ return gu(e, Oo, false);
830
+ }
831
+ function ir(e, t) {
832
+ return e.type === je ? __spreadProps(__spreadValues({}, e), { contents: t(e.contents) }) : t(e);
833
+ }
834
+ function _o(e) {
835
+ let t = `*${e.value}*`.split(`
836
+ `);
837
+ return t.length > 1 && t.every((r) => r.trimStart()[0] === "*");
838
+ }
839
+ var bu = _o;
840
+ function Pu(e, t) {
841
+ let r = e.node;
842
+ if (vt(r)) return t.originalText.slice(R(r), k(r)).trimEnd();
843
+ if (re(r)) return bu(r) ? jo(r) : ["/*", Ie(r.value), "*/"];
844
+ throw new Error("Not a comment: " + JSON.stringify(r));
845
+ }
846
+ function jo(e) {
847
+ let t = e.value.split(`
848
+ `);
849
+ return ["/*", P(F, t.map((r, n) => n === 0 ? r.trimEnd() : " " + (n < t.length - 1 ? r.trim() : r.trimStart()))), "*/"];
850
+ }
851
+ var Kn = {};
852
+ Ar(Kn, { endOfLine: () => Go, ownLine: () => Wo, remaining: () => Uo });
853
+ function vo(e) {
854
+ 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 || "");
855
+ return r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "");
856
+ }
857
+ function Nn(e, t) {
858
+ var _a2;
859
+ ((_a2 = e.comments) != null ? _a2 : e.comments = []).push(t), t.printed = false, t.nodeDescription = vo(e);
860
+ }
861
+ function ce(e, t) {
862
+ t.leading = true, t.trailing = false, Nn(e, t);
863
+ }
864
+ function Le(e, t, r) {
865
+ t.leading = false, t.trailing = false, r && (t.marker = r), Nn(e, t);
866
+ }
867
+ function z(e, t) {
868
+ t.leading = false, t.trailing = true, Nn(e, t);
869
+ }
870
+ function Mo(e, t) {
871
+ let r = null, n = t;
872
+ for (; n !== r; ) r = n, n = Ge(e, n), n = Lt(e, n), n = wt(e, n), n = Ue(e, n);
873
+ return n;
874
+ }
875
+ var yt = Mo;
876
+ function Ro(e, t) {
877
+ let r = yt(e, t);
878
+ return r === false ? "" : e.charAt(r);
879
+ }
880
+ var ge = Ro;
881
+ function Jo(e, t, r) {
882
+ for (let n = t; n < r; ++n) if (e.charAt(n) === `
883
+ `) return true;
884
+ return false;
885
+ }
886
+ var de = Jo;
887
+ function qo(e) {
888
+ return re(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value);
889
+ }
890
+ var ku = qo;
891
+ function Wo(e) {
892
+ return [Mu, Lu, _u, ep, Xo, Yn, Hn, Iu, wu, sp, rp, $n, vu, up, Ou, ju, Vn, Yo, yp].some((t) => t(e));
893
+ }
894
+ function Go(e) {
895
+ return [No, _u, Lu, vu, Yn, Hn, Iu, wu, ju, tp, np, $n, op, Vn, lp, mp].some((t) => t(e));
896
+ }
897
+ function Uo(e) {
898
+ return [Mu, Yn, Hn, Ho, Zo, Ou, $n, Qo, zo, cp, Vn, pp].some((t) => t(e));
899
+ }
900
+ function bt(e, t) {
901
+ let r = (e.body || e.properties).find(({ type: n }) => n !== "EmptyStatement");
902
+ r ? ce(r, t) : Le(e, t);
903
+ }
904
+ function Xn(e, t) {
905
+ e.type === "BlockStatement" ? bt(e, t) : ce(e, t);
906
+ }
907
+ function No({ comment: e, followingNode: t }) {
908
+ return t && ku(e) ? (ce(t, e), true) : false;
909
+ }
910
+ function Yn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
911
+ if ((r == null ? void 0 : r.type) !== "IfStatement" || !n) return false;
912
+ if (ge(s, k(e)) === ")") return z(t, e), true;
913
+ if (t === r.consequent && n === r.alternate) {
914
+ if (t.type === "BlockStatement") z(t, e);
915
+ else {
916
+ let i = vt(e) || e.loc.start.line === e.loc.end.line, a = e.loc.start.line === t.loc.start.line;
917
+ i && a ? z(t, e) : Le(r, e);
918
+ }
919
+ return true;
920
+ }
921
+ return n.type === "BlockStatement" ? (bt(n, e), true) : n.type === "IfStatement" ? (Xn(n.consequent, e), true) : r.consequent === n ? (ce(n, e), true) : false;
922
+ }
923
+ function Hn({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
924
+ return (r == null ? void 0 : r.type) !== "WhileStatement" || !n ? false : ge(s, k(e)) === ")" ? (z(t, e), true) : n.type === "BlockStatement" ? (bt(n, e), true) : r.body === n ? (ce(n, e), true) : false;
925
+ }
926
+ function Iu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
927
+ return (r == null ? void 0 : r.type) !== "TryStatement" && (r == null ? void 0 : r.type) !== "CatchClause" || !n ? false : r.type === "CatchClause" && t ? (z(t, e), true) : n.type === "BlockStatement" ? (bt(n, e), true) : n.type === "TryStatement" ? (Xn(n.finalizer, e), true) : n.type === "CatchClause" ? (Xn(n.body, e), true) : false;
928
+ }
929
+ function Xo({ comment: e, enclosingNode: t, followingNode: r }) {
930
+ return q(t) && (r == null ? void 0 : r.type) === "Identifier" ? (ce(t, e), true) : false;
931
+ }
932
+ function Yo({ comment: e, enclosingNode: t, followingNode: r, options: n }) {
933
+ return !n.experimentalTernaries || !((t == null ? void 0 : t.type) === "ConditionalExpression" || (t == null ? void 0 : t.type) === "ConditionalTypeAnnotation" || (t == null ? void 0 : t.type) === "TSConditionalType") ? false : (r == null ? void 0 : r.type) === "ConditionalExpression" || (r == null ? void 0 : r.type) === "ConditionalTypeAnnotation" || (r == null ? void 0 : r.type) === "TSConditionalType" ? (Le(t, e), true) : false;
934
+ }
935
+ function Lu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s, options: u }) {
936
+ let i = t && !de(s, k(t), R(e));
937
+ return (!t || !i) && ((r == null ? void 0 : r.type) === "ConditionalExpression" || (r == null ? void 0 : r.type) === "ConditionalTypeAnnotation" || (r == null ? void 0 : r.type) === "TSConditionalType") && n ? u.experimentalTernaries && r.alternate === n && !(re(e) && !de(u.originalText, R(e), k(e))) ? (Le(r, e), true) : (ce(n, e), true) : false;
938
+ }
939
+ function Ho({ comment: e, precedingNode: t, enclosingNode: r }) {
940
+ return Ae(r) && r.shorthand && r.key === t && r.value.type === "AssignmentPattern" ? (z(r.value.left, e), true) : false;
941
+ }
942
+ var Vo = /* @__PURE__ */ new Set(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]);
943
+ function wu({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
944
+ if (Vo.has(r == null ? void 0 : r.type)) {
945
+ if (w(r.decorators) && (n == null ? void 0 : n.type) !== "Decorator") return z(O(false, r.decorators, -1), e), true;
946
+ if (r.body && n === r.body) return bt(r.body, e), true;
947
+ if (n) {
948
+ if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return z(t, e), true;
949
+ 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) ? z(t, e) : Le(r, e, s), true;
950
+ }
951
+ }
952
+ return false;
953
+ }
954
+ var $o = /* @__PURE__ */ new Set(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty"]);
955
+ function Ou({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
956
+ return r && t && ge(n, k(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && ge(n, k(t)) !== ":" ? (z(t, e), true) : (t == null ? void 0 : t.type) === "Decorator" && $o.has(r == null ? void 0 : r.type) ? (z(t, e), true) : false;
957
+ }
958
+ var Ko = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]);
959
+ function zo({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
960
+ return ge(n, k(e)) !== "(" ? false : t && Ko.has(r == null ? void 0 : r.type) ? (z(t, e), true) : false;
961
+ }
962
+ function Qo({ comment: e, enclosingNode: t, text: r }) {
963
+ if ((t == null ? void 0 : t.type) !== "ArrowFunctionExpression") return false;
964
+ let n = yt(r, k(e));
965
+ return n !== false && r.slice(n, n + 2) === "=>" ? (Le(t, e), true) : false;
966
+ }
967
+ function Zo({ comment: e, enclosingNode: t, text: r }) {
968
+ return ge(r, k(e)) !== ")" ? false : t && (Ru(t) && K(t).length === 0 || lt(t) && oe(t).length === 0) ? (Le(t, e), true) : ((t == null ? void 0 : t.type) === "MethodDefinition" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && K(t.value).length === 0 ? (Le(t.value, e), true) : false;
969
+ }
970
+ function ep({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
971
+ return (t == null ? void 0 : t.type) === "ComponentTypeParameter" && ((r == null ? void 0 : r.type) === "DeclareComponent" || (r == null ? void 0 : r.type) === "ComponentTypeAnnotation") && (n == null ? void 0 : n.type) !== "ComponentTypeParameter" ? (z(t, e), true) : ((t == null ? void 0 : t.type) === "ComponentParameter" || (t == null ? void 0 : t.type) === "RestElement") && (r == null ? void 0 : r.type) === "ComponentDeclaration" && ge(s, k(e)) === ")" ? (z(t, e), true) : false;
972
+ }
973
+ function _u({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) {
974
+ return (t == null ? void 0 : t.type) === "FunctionTypeParam" && (r == null ? void 0 : r.type) === "FunctionTypeAnnotation" && (n == null ? void 0 : n.type) !== "FunctionTypeParam" ? (z(t, e), true) : ((t == null ? void 0 : t.type) === "Identifier" || (t == null ? void 0 : t.type) === "AssignmentPattern" || (t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern" || (t == null ? void 0 : t.type) === "RestElement" || (t == null ? void 0 : t.type) === "TSParameterProperty") && Ru(r) && ge(s, k(e)) === ")" ? (z(t, e), true) : !re(e) && ((r == null ? void 0 : r.type) === "FunctionDeclaration" || (r == null ? void 0 : r.type) === "FunctionExpression" || (r == null ? void 0 : r.type) === "ObjectMethod") && (n == null ? void 0 : n.type) === "BlockStatement" && r.body === n && yt(s, k(e)) === R(n) ? (bt(n, e), true) : false;
975
+ }
976
+ function ju({ comment: e, enclosingNode: t }) {
977
+ return (t == null ? void 0 : t.type) === "LabeledStatement" ? (ce(t, e), true) : false;
978
+ }
979
+ function Vn({ comment: e, enclosingNode: t }) {
980
+ return ((t == null ? void 0 : t.type) === "ContinueStatement" || (t == null ? void 0 : t.type) === "BreakStatement") && !t.label ? (z(t, e), true) : false;
981
+ }
982
+ function tp({ comment: e, precedingNode: t, enclosingNode: r }) {
983
+ return L(r) && t && r.callee === t && r.arguments.length > 0 ? (ce(r.arguments[0], e), true) : false;
984
+ }
985
+ function rp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
986
+ return Ne(r) ? (sr(e) && (n.prettierIgnore = true, e.unignore = true), t ? (z(t, e), true) : false) : (Ne(n) && sr(e) && (n.types[0].prettierIgnore = true, e.unignore = true), false);
987
+ }
988
+ function np({ comment: e, enclosingNode: t }) {
989
+ return Ae(t) ? (ce(t, e), true) : false;
990
+ }
991
+ function $n({ comment: e, enclosingNode: t, ast: r, isLastComment: n }) {
992
+ var s;
993
+ return ((s = r == null ? void 0 : r.body) == null ? void 0 : s.length) === 0 ? (n ? Le(r, e) : ce(r, e), true) : (t == null ? void 0 : t.type) === "Program" && t.body.length === 0 && !w(t.directives) ? (n ? Le(t, e) : ce(t, e), true) : false;
994
+ }
995
+ function sp({ comment: e, enclosingNode: t }) {
996
+ return (t == null ? void 0 : t.type) === "ForInStatement" || (t == null ? void 0 : t.type) === "ForOfStatement" ? (ce(t, e), true) : false;
997
+ }
998
+ function vu({ comment: e, precedingNode: t, enclosingNode: r, text: n }) {
999
+ if ((r == null ? void 0 : r.type) === "ImportSpecifier" || (r == null ? void 0 : r.type) === "ExportSpecifier") return ce(r, e), true;
1000
+ let s = (t == null ? void 0 : t.type) === "ImportSpecifier" && (r == null ? void 0 : r.type) === "ImportDeclaration", u = (t == null ? void 0 : t.type) === "ExportSpecifier" && (r == null ? void 0 : r.type) === "ExportNamedDeclaration";
1001
+ return (s || u) && te(n, k(e)) ? (z(t, e), true) : false;
1002
+ }
1003
+ function up({ comment: e, enclosingNode: t }) {
1004
+ return (t == null ? void 0 : t.type) === "AssignmentPattern" ? (ce(t, e), true) : false;
1005
+ }
1006
+ var ip = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]);
1007
+ var ap = /* @__PURE__ */ new Set(["ObjectExpression", "RecordExpression", "ArrayExpression", "TupleExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]);
1008
+ function op({ comment: e, enclosingNode: t, followingNode: r }) {
1009
+ return ip.has(t == null ? void 0 : t.type) && r && (ap.has(r.type) || re(e)) ? (ce(r, e), true) : false;
1010
+ }
1011
+ function pp({ comment: e, enclosingNode: t, followingNode: r, text: n }) {
1012
+ return !r && ((t == null ? void 0 : t.type) === "TSMethodSignature" || (t == null ? void 0 : t.type) === "TSDeclareFunction" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && ge(n, k(e)) === ";" ? (z(t, e), true) : false;
1013
+ }
1014
+ function Mu({ comment: e, enclosingNode: t, followingNode: r }) {
1015
+ if (sr(e) && (t == null ? void 0 : t.type) === "TSMappedType" && (r == null ? void 0 : r.type) === "TSTypeParameter" && r.constraint) return t.prettierIgnore = true, e.unignore = true, true;
1016
+ }
1017
+ function cp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
1018
+ return (r == null ? void 0 : r.type) !== "TSMappedType" ? false : (n == null ? void 0 : n.type) === "TSTypeParameter" && n.name ? (ce(n.name, e), true) : (t == null ? void 0 : t.type) === "TSTypeParameter" && t.constraint ? (z(t.constraint, e), true) : false;
1019
+ }
1020
+ function lp({ comment: e, enclosingNode: t, followingNode: r }) {
1021
+ return !t || t.type !== "SwitchCase" || t.test || !r || r !== t.consequent[0] ? false : (r.type === "BlockStatement" && vt(e) ? bt(r, e) : Le(t, e), true);
1022
+ }
1023
+ function mp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) {
1024
+ return Ne(t) && ((r.type === "TSArrayType" || r.type === "ArrayTypeAnnotation") && !n || _r(r)) ? (z(O(false, t.types, -1), e), true) : false;
1025
+ }
1026
+ function yp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n }) {
1027
+ if (((t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern") && (n == null ? void 0 : n.type) === "TSTypeAnnotation") return r ? z(r, e) : Le(t, e), true;
1028
+ }
1029
+ var Ru = v(["ArrowFunctionExpression", "FunctionExpression", "FunctionDeclaration", "ObjectMethod", "ClassMethod", "TSDeclareFunction", "TSCallSignatureDeclaration", "TSConstructSignatureDeclaration", "TSMethodSignature", "TSConstructorType", "TSFunctionType", "TSDeclareMethod"]);
1030
+ var Dp = /* @__PURE__ */ new Set(["EmptyStatement", "TemplateElement", "Import", "TSEmptyBodyFunctionExpression", "ChainExpression"]);
1031
+ function fp(e) {
1032
+ return !Dp.has(e.type);
1033
+ }
1034
+ function Ep(e, t) {
1035
+ var r;
1036
+ if ((t.parser === "typescript" || t.parser === "flow" || t.parser === "acorn" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree") && e.type === "MethodDefinition" && ((r = e.value) == null ? void 0 : r.type) === "FunctionExpression" && K(e.value).length === 0 && !e.value.returnType && !w(e.value.typeParameters) && e.value.body) return [...e.decorators || [], e.key, e.value.body];
1037
+ }
1038
+ function zn(e) {
1039
+ let { node: t, parent: r } = e;
1040
+ return (X(t) || r && (r.type === "JSXSpreadAttribute" || r.type === "JSXSpreadChild" || Ne(r) || (r.type === "ClassDeclaration" || r.type === "ClassExpression") && r.superClass === t)) && (!Bt(t) || Ne(r));
1041
+ }
1042
+ function Fp(e, { parser: t }) {
1043
+ if (t === "flow" || t === "babel-flow") return e = N(false, e, /[\s(]/gu, ""), e === "" || e === "/*" || e === "/*::";
1044
+ }
1045
+ function Ju(e) {
1046
+ switch (e) {
1047
+ case "cr":
1048
+ return "\r";
1049
+ case "crlf":
1050
+ return `\r
1051
+ `;
1052
+ default:
1053
+ return `
1054
+ `;
1055
+ }
1056
+ }
1057
+ var Se = Symbol("MODE_BREAK");
1058
+ var at = Symbol("MODE_FLAT");
1059
+ var ar = Symbol("cursor");
1060
+ function qu() {
1061
+ return { value: "", length: 0, queue: [] };
1062
+ }
1063
+ function Cp(e, t) {
1064
+ return Qn(e, { type: "indent" }, t);
1065
+ }
1066
+ function Ap(e, t, r) {
1067
+ return t === Number.NEGATIVE_INFINITY ? e.root || qu() : t < 0 ? Qn(e, { type: "dedent" }, r) : t ? t.type === "root" ? __spreadProps(__spreadValues({}, e), { root: e }) : Qn(e, { type: typeof t == "string" ? "stringAlign" : "numberAlign", n: t }, r) : e;
1068
+ }
1069
+ function Qn(e, t, r) {
1070
+ let n = t.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, t], s = "", u = 0, i = 0, a = 0;
1071
+ for (let p of n) switch (p.type) {
1072
+ case "indent":
1073
+ m(), r.useTabs ? o(1) : c(r.tabWidth);
1074
+ break;
1075
+ case "stringAlign":
1076
+ m(), s += p.n, u += p.n.length;
1077
+ break;
1078
+ case "numberAlign":
1079
+ i += 1, a += p.n;
1080
+ break;
1081
+ default:
1082
+ throw new Error(`Unexpected type '${p.type}'`);
1083
+ }
1084
+ return y(), __spreadProps(__spreadValues({}, e), { value: s, length: u, queue: n });
1085
+ function o(p) {
1086
+ s += " ".repeat(p), u += r.tabWidth * p;
1087
+ }
1088
+ function c(p) {
1089
+ s += " ".repeat(p), u += p;
1090
+ }
1091
+ function m() {
1092
+ r.useTabs ? D() : y();
1093
+ }
1094
+ function D() {
1095
+ i > 0 && o(i), C();
1096
+ }
1097
+ function y() {
1098
+ a > 0 && c(a), C();
1099
+ }
1100
+ function C() {
1101
+ i = 0, a = 0;
1102
+ }
1103
+ }
1104
+ function Zn(e) {
1105
+ let t = 0, r = 0, n = e.length;
1106
+ e: for (; n--; ) {
1107
+ let s = e[n];
1108
+ if (s === ar) {
1109
+ r++;
1110
+ continue;
1111
+ }
1112
+ for (let u = s.length - 1; u >= 0; u--) {
1113
+ let i = s[u];
1114
+ if (i === " " || i === " ") t++;
1115
+ else {
1116
+ e[n] = s.slice(0, u + 1);
1117
+ break e;
1118
+ }
1119
+ }
1120
+ }
1121
+ if (t > 0 || r > 0) for (e.length = n + 1; r-- > 0; ) e.push(ar);
1122
+ return t;
1123
+ }
1124
+ function Jr(e, t, r, n, s, u) {
1125
+ if (r === Number.POSITIVE_INFINITY) return true;
1126
+ let i = t.length, a = [e], o = [];
1127
+ for (; r >= 0; ) {
1128
+ if (a.length === 0) {
1129
+ if (i === 0) return true;
1130
+ a.push(t[--i]);
1131
+ continue;
1132
+ }
1133
+ let { mode: c, doc: m } = a.pop(), D = ut(m);
1134
+ switch (D) {
1135
+ case rt:
1136
+ o.push(m), r -= et(m);
1137
+ break;
1138
+ case _e:
1139
+ case Pe: {
1140
+ let y = D === _e ? m : m.parts;
1141
+ for (let C = y.length - 1; C >= 0; C--) a.push({ mode: c, doc: y[C] });
1142
+ break;
1143
+ }
1144
+ case Xe:
1145
+ case Ye:
1146
+ case He:
1147
+ case je:
1148
+ a.push({ mode: c, doc: m.contents });
1149
+ break;
1150
+ case st:
1151
+ r += Zn(o);
1152
+ break;
1153
+ case le: {
1154
+ if (u && m.break) return false;
1155
+ let y = m.break ? Se : c, C = m.expandedStates && y === Se ? O(false, m.expandedStates, -1) : m.contents;
1156
+ a.push({ mode: y, doc: C });
1157
+ break;
1158
+ }
1159
+ case xe: {
1160
+ let C = (m.groupId ? s[m.groupId] || at : c) === Se ? m.breakContents : m.flatContents;
1161
+ C && a.push({ mode: c, doc: C });
1162
+ break;
1163
+ }
1164
+ case me:
1165
+ if (c === Se || m.hard) return true;
1166
+ m.soft || (o.push(" "), r--);
1167
+ break;
1168
+ case Ve:
1169
+ n = true;
1170
+ break;
1171
+ case $e:
1172
+ if (n) return false;
1173
+ break;
1174
+ }
1175
+ }
1176
+ return false;
1177
+ }
1178
+ function es(e, t) {
1179
+ let r = {}, n = t.printWidth, s = Ju(t.endOfLine), u = 0, i = [{ ind: qu(), mode: Se, doc: e }], a = [], o = false, c = [], m = 0;
1180
+ for (Su(e); i.length > 0; ) {
1181
+ let { ind: y, mode: C, doc: p } = i.pop();
1182
+ switch (ut(p)) {
1183
+ case rt: {
1184
+ let A = s !== `
1185
+ ` ? N(false, p, `
1186
+ `, s) : p;
1187
+ a.push(A), i.length > 0 && (u += et(A));
1188
+ break;
1189
+ }
1190
+ case _e:
1191
+ for (let A = p.length - 1; A >= 0; A--) i.push({ ind: y, mode: C, doc: p[A] });
1192
+ break;
1193
+ case nt:
1194
+ if (m >= 2) throw new Error("There are too many 'cursor' in doc.");
1195
+ a.push(ar), m++;
1196
+ break;
1197
+ case Xe:
1198
+ i.push({ ind: Cp(y, t), mode: C, doc: p.contents });
1199
+ break;
1200
+ case Ye:
1201
+ i.push({ ind: Ap(y, p.n, t), mode: C, doc: p.contents });
1202
+ break;
1203
+ case st:
1204
+ u -= Zn(a);
1205
+ break;
1206
+ case le:
1207
+ switch (C) {
1208
+ case at:
1209
+ if (!o) {
1210
+ i.push({ ind: y, mode: p.break ? Se : at, doc: p.contents });
1211
+ break;
1212
+ }
1213
+ case Se: {
1214
+ o = false;
1215
+ let A = { ind: y, mode: at, doc: p.contents }, T = n - u, S = c.length > 0;
1216
+ if (!p.break && Jr(A, i, T, S, r)) i.push(A);
1217
+ else if (p.expandedStates) {
1218
+ let B = O(false, p.expandedStates, -1);
1219
+ if (p.break) {
1220
+ i.push({ ind: y, mode: Se, doc: B });
1221
+ break;
1222
+ } else for (let _ = 1; _ < p.expandedStates.length + 1; _++) if (_ >= p.expandedStates.length) {
1223
+ i.push({ ind: y, mode: Se, doc: B });
1224
+ break;
1225
+ } else {
1226
+ let J = p.expandedStates[_], j = { ind: y, mode: at, doc: J };
1227
+ if (Jr(j, i, T, S, r)) {
1228
+ i.push(j);
1229
+ break;
1230
+ }
1231
+ }
1232
+ } else i.push({ ind: y, mode: Se, doc: p.contents });
1233
+ break;
1234
+ }
1235
+ }
1236
+ p.id && (r[p.id] = O(false, i, -1).mode);
1237
+ break;
1238
+ case Pe: {
1239
+ let A = n - u, { parts: T } = p;
1240
+ if (T.length === 0) break;
1241
+ let [S, B] = T, _ = { ind: y, mode: at, doc: S }, J = { ind: y, mode: Se, doc: S }, j = Jr(_, [], A, c.length > 0, r, true);
1242
+ if (T.length === 1) {
1243
+ j ? i.push(_) : i.push(J);
1244
+ break;
1245
+ }
1246
+ let h = { ind: y, mode: at, doc: B }, W = { ind: y, mode: Se, doc: B };
1247
+ if (T.length === 2) {
1248
+ j ? i.push(h, _) : i.push(W, J);
1249
+ break;
1250
+ }
1251
+ T.splice(0, 2);
1252
+ let Fe = { ind: y, mode: C, doc: qt(T) }, H = T[0];
1253
+ Jr({ ind: y, mode: at, doc: [S, B, H] }, [], A, c.length > 0, r, true) ? i.push(Fe, h, _) : j ? i.push(Fe, W, _) : i.push(Fe, W, J);
1254
+ break;
1255
+ }
1256
+ case xe:
1257
+ case He: {
1258
+ let A = p.groupId ? r[p.groupId] : C;
1259
+ if (A === Se) {
1260
+ let T = p.type === xe ? p.breakContents : p.negate ? p.contents : f(p.contents);
1261
+ T && i.push({ ind: y, mode: C, doc: T });
1262
+ }
1263
+ if (A === at) {
1264
+ let T = p.type === xe ? p.flatContents : p.negate ? f(p.contents) : p.contents;
1265
+ T && i.push({ ind: y, mode: C, doc: T });
1266
+ }
1267
+ break;
1268
+ }
1269
+ case Ve:
1270
+ c.push({ ind: y, mode: C, doc: p.contents });
1271
+ break;
1272
+ case $e:
1273
+ c.length > 0 && i.push({ ind: y, mode: C, doc: Gn });
1274
+ break;
1275
+ case me:
1276
+ switch (C) {
1277
+ case at:
1278
+ if (p.hard) o = true;
1279
+ else {
1280
+ p.soft || (a.push(" "), u += 1);
1281
+ break;
1282
+ }
1283
+ case Se:
1284
+ if (c.length > 0) {
1285
+ i.push({ ind: y, mode: C, doc: p }, ...c.reverse()), c.length = 0;
1286
+ break;
1287
+ }
1288
+ p.literal ? y.root ? (a.push(s, y.root.value), u = y.root.length) : (a.push(s), u = 0) : (u -= Zn(a), a.push(s + y.value), u = y.length);
1289
+ break;
1290
+ }
1291
+ break;
1292
+ case je:
1293
+ i.push({ ind: y, mode: C, doc: p.contents });
1294
+ break;
1295
+ case ve:
1296
+ break;
1297
+ default:
1298
+ throw new Ct(p);
1299
+ }
1300
+ i.length === 0 && c.length > 0 && (i.push(...c.reverse()), c.length = 0);
1301
+ }
1302
+ let D = a.indexOf(ar);
1303
+ if (D !== -1) {
1304
+ let y = a.indexOf(ar, D + 1), C = a.slice(0, D).join(""), p = a.slice(D + 1, y).join(""), A = a.slice(y + 1).join("");
1305
+ return { formatted: C + p + A, cursorNodeStart: C.length, cursorNodeText: p };
1306
+ }
1307
+ return { formatted: a.join("") };
1308
+ }
1309
+ function Tp(e, t, r = 0) {
1310
+ let n = 0;
1311
+ for (let s = r; s < e.length; ++s) e[s] === " " ? n = n + t - n % t : n++;
1312
+ return n;
1313
+ }
1314
+ var Wu = Tp;
1315
+ function dp(e, t) {
1316
+ let r = e.lastIndexOf(`
1317
+ `);
1318
+ return r === -1 ? 0 : Wu(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
1319
+ }
1320
+ var Gu = dp;
1321
+ function qr(e, t, r) {
1322
+ let { node: n } = e;
1323
+ if (n.type === "TemplateLiteral" && gp(e)) {
1324
+ let c = xp(e, r, t);
1325
+ if (c) return c;
1326
+ }
1327
+ let u = "expressions";
1328
+ n.type === "TSTemplateLiteralType" && (u = "types");
1329
+ let i = [], a = e.map(t, u);
1330
+ i.push(ke, "`");
1331
+ let o = 0;
1332
+ return e.each(({ index: c, node: m }) => {
1333
+ if (i.push(t()), m.tail) return;
1334
+ let { tabWidth: D } = r, y = m.value.raw, C = y.includes(`
1335
+ `) ? Gu(y, D) : o;
1336
+ o = C;
1337
+ let p = a[c], A = n[u][c], T = de(r.originalText, k(m), R(n.quasis[c + 1]));
1338
+ if (!T) {
1339
+ let B = es(p, __spreadProps(__spreadValues({}, r), { printWidth: Number.POSITIVE_INFINITY })).formatted;
1340
+ B.includes(`
1341
+ `) ? T = true : p = B;
1342
+ }
1343
+ T && (d(A) || A.type === "Identifier" || q(A) || A.type === "ConditionalExpression" || A.type === "SequenceExpression" || Te(A) || De(A)) && (p = [f([E, p]), E]);
1344
+ let S = C === 0 && y.endsWith(`
1345
+ `) ? he(Number.NEGATIVE_INFINITY, p) : xu(p, C, D);
1346
+ i.push(l(["${", S, ke, "}"]));
1347
+ }, "quasis"), i.push("`"), i;
1348
+ }
1349
+ function Uu(e, t) {
1350
+ let r = t("quasi");
1351
+ return it(r.label && __spreadValues({ tagged: true }, r.label), [t("tag"), t(e.node.typeArguments ? "typeArguments" : "typeParameters"), ke, r]);
1352
+ }
1353
+ function xp(e, t, r) {
1354
+ let { node: n } = e, s = n.quasis[0].value.raw.trim().split(/\s*\|\s*/u);
1355
+ if (s.length > 1 || s.some((u) => u.length > 0)) {
1356
+ t.__inJestEach = true;
1357
+ let u = e.map(r, "expressions");
1358
+ t.__inJestEach = false;
1359
+ let i = [], a = u.map((y) => "${" + es(y, __spreadProps(__spreadValues({}, t), { printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" })).formatted + "}"), o = [{ hasLineBreak: false, cells: [] }];
1360
+ for (let y = 1; y < n.quasis.length; y++) {
1361
+ let C = O(false, o, -1), p = a[y - 1];
1362
+ C.cells.push(p), p.includes(`
1363
+ `) && (C.hasLineBreak = true), n.quasis[y].value.raw.includes(`
1364
+ `) && o.push({ hasLineBreak: false, cells: [] });
1365
+ }
1366
+ let c = Math.max(s.length, ...o.map((y) => y.cells.length)), m = Array.from({ length: c }).fill(0), D = [{ cells: s }, ...o.filter((y) => y.cells.length > 0)];
1367
+ for (let { cells: y } of D.filter((C) => !C.hasLineBreak)) for (let [C, p] of y.entries()) m[C] = Math.max(m[C], et(p));
1368
+ return i.push(ke, "`", f([F, P(F, D.map((y) => P(" | ", y.cells.map((C, p) => y.hasLineBreak ? C : C + " ".repeat(m[p] - et(C))))))]), F, "`"), i;
1369
+ }
1370
+ }
1371
+ function hp(e, t) {
1372
+ let { node: r } = e, n = t();
1373
+ return d(r) && (n = l([f([E, n]), E])), ["${", n, ke, "}"];
1374
+ }
1375
+ function Gt(e, t) {
1376
+ return e.map((r) => hp(r, t), "expressions");
1377
+ }
1378
+ function Wr(e, t) {
1379
+ return mt(e, (r) => typeof r == "string" ? t ? N(false, r, /(\\*)`/gu, "$1$1\\`") : ts(r) : r);
1380
+ }
1381
+ function ts(e) {
1382
+ return N(false, e, /([\\`]|\$\{)/gu, String.raw`\$1`);
1383
+ }
1384
+ function gp({ node: e, parent: t }) {
1385
+ let r = /^[fx]?(?:describe|it|test)$/u;
1386
+ 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));
1387
+ }
1388
+ var ns = [(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"];
1389
+ function Nu(e) {
1390
+ let t = (n) => n.type === "TemplateLiteral", r = (n, s) => Ae(n) && !n.computed && n.key.type === "Identifier" && n.key.name === "styles" && s === "value";
1391
+ return e.match(t, (n, s) => U(n) && s === "elements", r, ...ns) || e.match(t, r, ...ns);
1392
+ }
1393
+ function Xu(e) {
1394
+ return e.match((t) => t.type === "TemplateLiteral", (t, r) => Ae(t) && !t.computed && t.key.type === "Identifier" && t.key.name === "template" && r === "value", ...ns);
1395
+ }
1396
+ function rs(e, t) {
1397
+ return d(e, g.Block | g.Leading, ({ value: r }) => r === ` ${t} `);
1398
+ }
1399
+ function Gr({ node: e, parent: t }, r) {
1400
+ return rs(e, r) || Sp(t) && rs(t, r) || t.type === "ExpressionStatement" && rs(t, r);
1401
+ }
1402
+ function Sp(e) {
1403
+ return e.type === "AsConstExpression" || e.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const";
1404
+ }
1405
+ async function Bp(e, t, r) {
1406
+ let { node: n } = r, s = n.quasis.map((m) => m.value.raw), u = 0, i = s.reduce((m, D, y) => y === 0 ? D : m + "@prettier-placeholder-" + u++ + "-id" + D, ""), a = await e(i, { parser: "scss" }), o = Gt(r, t), c = bp(a, o);
1407
+ if (!c) throw new Error("Couldn't insert all the expressions");
1408
+ return ["`", f([F, c]), E, "`"];
1409
+ }
1410
+ function bp(e, t) {
1411
+ if (!w(t)) return e;
1412
+ let r = 0, n = mt(Wt(e), (s) => typeof s != "string" || !s.includes("@prettier-placeholder") ? s : s.split(/@prettier-placeholder-(\d+)-id/u).map((u, i) => i % 2 === 0 ? Ie(u) : (r++, t[u])));
1413
+ return t.length === r ? n : null;
1414
+ }
1415
+ function Pp({ node: e, parent: t, grandparent: r }) {
1416
+ return r && e.quasis && t.type === "JSXExpressionContainer" && r.type === "JSXElement" && r.openingElement.name.name === "style" && r.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.name === "jsx") || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "css" || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "MemberExpression" && t.tag.object.name === "css" && (t.tag.property.name === "global" || t.tag.property.name === "resolve");
1417
+ }
1418
+ function Ur(e) {
1419
+ return e.type === "Identifier" && e.name === "styled";
1420
+ }
1421
+ function Yu(e) {
1422
+ return /^[A-Z]/u.test(e.object.name) && e.property.name === "extend";
1423
+ }
1424
+ function kp({ parent: e }) {
1425
+ if (!e || e.type !== "TaggedTemplateExpression") return false;
1426
+ let t = e.tag.type === "ParenthesizedExpression" ? e.tag.expression : e.tag;
1427
+ switch (t.type) {
1428
+ case "MemberExpression":
1429
+ return Ur(t.object) || Yu(t);
1430
+ case "CallExpression":
1431
+ return Ur(t.callee) || t.callee.type === "MemberExpression" && (t.callee.object.type === "MemberExpression" && (Ur(t.callee.object.object) || Yu(t.callee.object)) || t.callee.object.type === "CallExpression" && Ur(t.callee.object.callee));
1432
+ case "Identifier":
1433
+ return t.name === "css";
1434
+ default:
1435
+ return false;
1436
+ }
1437
+ }
1438
+ function Ip({ parent: e, grandparent: t }) {
1439
+ return (t == null ? void 0 : t.type) === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
1440
+ }
1441
+ function Lp(e) {
1442
+ if (Pp(e) || kp(e) || Ip(e) || Nu(e)) return Bp;
1443
+ }
1444
+ var Hu = Lp;
1445
+ async function wp(e, t, r) {
1446
+ let { node: n } = r, s = n.quasis.length, u = Gt(r, t), i = [];
1447
+ for (let a = 0; a < s; a++) {
1448
+ let o = n.quasis[a], c = a === 0, m = a === s - 1, D = o.value.cooked, y = D.split(`
1449
+ `), C = y.length, p = u[a], A = C > 2 && y[0].trim() === "" && y[1].trim() === "", T = C > 2 && y[C - 1].trim() === "" && y[C - 2].trim() === "", S = y.every((_) => /^\s*(?:#[^\n\r]*)?$/u.test(_));
1450
+ if (!m && /#[^\n\r]*$/u.test(y[C - 1])) return null;
1451
+ let B = null;
1452
+ S ? B = Op(y) : B = await e(D, { parser: "graphql" }), B ? (B = Wr(B, false), !c && A && i.push(""), i.push(B), !m && T && i.push("")) : !c && !m && A && i.push(""), p && i.push(p);
1453
+ }
1454
+ return ["`", f([F, P(F, i)]), F, "`"];
1455
+ }
1456
+ function Op(e) {
1457
+ let t = [], r = false, n = e.map((s) => s.trim());
1458
+ for (let [s, u] of n.entries()) u !== "" && (n[s - 1] === "" && r ? t.push([F, u]) : t.push(u), r = true);
1459
+ return t.length === 0 ? null : P(F, t);
1460
+ }
1461
+ function _p({ node: e, parent: t }) {
1462
+ return Gr({ 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");
1463
+ }
1464
+ function jp(e) {
1465
+ if (_p(e)) return wp;
1466
+ }
1467
+ var Vu = jp;
1468
+ var ss = 0;
1469
+ async function $u(e, t, r, n, s) {
1470
+ let { node: u } = n, i = ss;
1471
+ ss = ss + 1 >>> 0;
1472
+ let a = (S) => `PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`, o = u.quasis.map((S, B, _) => B === _.length - 1 ? S.value.cooked : S.value.cooked + a(B)).join(""), c = Gt(n, r), m = new RegExp(a(String.raw`(\d+)`), "gu"), D = 0, y = await t(o, { parser: e, __onHtmlRoot(S) {
1473
+ D = S.children.length;
1474
+ } }), C = mt(y, (S) => {
1475
+ if (typeof S != "string") return S;
1476
+ let B = [], _ = S.split(m);
1477
+ for (let J = 0; J < _.length; J++) {
1478
+ let j = _[J];
1479
+ if (J % 2 === 0) {
1480
+ j && (j = ts(j), s.__embeddedInHtml && (j = N(false, j, /<\/(?=script\b)/giu, String.raw`<\/`)), B.push(j));
1481
+ continue;
1482
+ }
1483
+ let h = Number(j);
1484
+ B.push(c[h]);
1485
+ }
1486
+ return B;
1487
+ }), p = /^\s/u.test(o) ? " " : "", A = /\s$/u.test(o) ? " " : "", T = s.htmlWhitespaceSensitivity === "ignore" ? F : p && A ? x : null;
1488
+ return T ? l(["`", f([T, l(C)]), T, "`"]) : it({ hug: false }, l(["`", p, D > 1 ? f(l(C)) : l(C), A, "`"]));
1489
+ }
1490
+ function vp(e) {
1491
+ return Gr(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi");
1492
+ }
1493
+ var Mp = $u.bind(void 0, "html");
1494
+ var Rp = $u.bind(void 0, "angular");
1495
+ function Jp(e) {
1496
+ if (vp(e)) return Mp;
1497
+ if (Xu(e)) return Rp;
1498
+ }
1499
+ var Ku = Jp;
1500
+ async function qp(e, t, r) {
1501
+ let { node: n } = r, s = N(false, n.quasis[0].value.raw, /((?:\\\\)*)\\`/gu, (o, c) => "\\".repeat(c.length / 2) + "`"), u = Wp(s), i = u !== "";
1502
+ i && (s = N(false, s, new RegExp(`^${u}`, "gmu"), ""));
1503
+ let a = Wr(await e(s, { parser: "markdown", __inJsTemplate: true }), true);
1504
+ return ["`", i ? f([E, a]) : [Rr, du(a)], E, "`"];
1505
+ }
1506
+ function Wp(e) {
1507
+ let t = e.match(/^([^\S\n]*)\S/mu);
1508
+ return t === null ? "" : t[1];
1509
+ }
1510
+ function Gp(e) {
1511
+ if (Up(e)) return qp;
1512
+ }
1513
+ function Up({ node: e, parent: t }) {
1514
+ return (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown");
1515
+ }
1516
+ var zu = Gp;
1517
+ function Np(e) {
1518
+ let { node: t } = e;
1519
+ if (t.type !== "TemplateLiteral" || Xp(t)) return;
1520
+ let r;
1521
+ for (let n of [Hu, Vu, Ku, zu]) if (r = n(e), !!r) return t.quasis.length === 1 && t.quasis[0].value.raw.trim() === "" ? "``" : async (...s) => {
1522
+ let u = await r(...s);
1523
+ return u && it(__spreadValues({ embed: true }, u.label), u);
1524
+ };
1525
+ }
1526
+ function Xp({ quasis: e }) {
1527
+ return e.some(({ value: { cooked: t } }) => t === null);
1528
+ }
1529
+ var Qu = Np;
1530
+ var Yp = /\*\/$/;
1531
+ var Hp = /^\/\*\*?/;
1532
+ var ri = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
1533
+ var Vp = /(^|\s+)\/\/([^\n\r]*)/g;
1534
+ var Zu = /^(\r?\n)+/;
1535
+ var $p = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g;
1536
+ var ei = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g;
1537
+ var Kp = /(\r?\n|^) *\* ?/g;
1538
+ var ni = [];
1539
+ function si(e) {
1540
+ let t = e.match(ri);
1541
+ return t ? t[0].trimStart() : "";
1542
+ }
1543
+ function ui(e) {
1544
+ let t = e.match(ri), r = t == null ? void 0 : t[0];
1545
+ return r == null ? e : e.slice(r.length);
1546
+ }
1547
+ function ii(e) {
1548
+ let t = `
1549
+ `;
1550
+ e = N(false, e.replace(Hp, "").replace(Yp, ""), Kp, "$1");
1551
+ let r = "";
1552
+ for (; r !== e; ) r = e, e = N(false, e, $p, `${t}$1 $2${t}`);
1553
+ e = e.replace(Zu, "").trimEnd();
1554
+ let n = /* @__PURE__ */ Object.create(null), s = N(false, e, ei, "").replace(Zu, "").trimEnd(), u;
1555
+ for (; u = ei.exec(e); ) {
1556
+ let i = N(false, u[2], Vp, "");
1557
+ if (typeof n[u[1]] == "string" || Array.isArray(n[u[1]])) {
1558
+ let a = n[u[1]];
1559
+ n[u[1]] = [...ni, ...Array.isArray(a) ? a : [a], i];
1560
+ } else n[u[1]] = i;
1561
+ }
1562
+ return { comments: s, pragmas: n };
1563
+ }
1564
+ function ai({ comments: e = "", pragmas: t = {} }) {
1565
+ let r = `
1566
+ `, n = "/**", s = " *", u = " */", i = Object.keys(t), a = i.flatMap((c) => ti(c, t[c])).map((c) => `${s} ${c}${r}`).join("");
1567
+ if (!e) {
1568
+ if (i.length === 0) return "";
1569
+ if (i.length === 1 && !Array.isArray(t[i[0]])) {
1570
+ let c = t[i[0]];
1571
+ return `${n} ${ti(i[0], c)[0]}${u}`;
1572
+ }
1573
+ }
1574
+ let o = e.split(r).map((c) => `${s} ${c}`).join(r) + r;
1575
+ return n + r + (e ? o : "") + (e && i.length > 0 ? s + r : "") + a + u;
1576
+ }
1577
+ function ti(e, t) {
1578
+ return [...ni, ...Array.isArray(t) ? t : [t]].map((r) => `@${e} ${r}`.trim());
1579
+ }
1580
+ function zp(e) {
1581
+ if (!e.startsWith("#!")) return "";
1582
+ let t = e.indexOf(`
1583
+ `);
1584
+ return t === -1 ? e : e.slice(0, t);
1585
+ }
1586
+ var oi = zp;
1587
+ function Qp(e) {
1588
+ let t = oi(e);
1589
+ t && (e = e.slice(t.length + 1));
1590
+ let r = si(e), { pragmas: n, comments: s } = ii(r);
1591
+ return { shebang: t, text: e, pragmas: n, comments: s };
1592
+ }
1593
+ function pi(e) {
1594
+ let { shebang: t, text: r, pragmas: n, comments: s } = Qp(e), u = ui(r), i = ai({ pragmas: __spreadValues({ format: "" }, n), comments: s.trimStart() });
1595
+ return (t ? `${t}
1596
+ ` : "") + i + (u.startsWith(`
1597
+ `) ? `
1598
+ ` : `
1599
+
1600
+ `) + u;
1601
+ }
1602
+ function Zp(e, t) {
1603
+ let { originalText: r, [Symbol.for("comments")]: n, locStart: s, locEnd: u, [Symbol.for("printedComments")]: i } = t, { node: a } = e, o = s(a), c = u(a);
1604
+ for (let m of n) s(m) >= o && u(m) <= c && i.add(m);
1605
+ return r.slice(o, c);
1606
+ }
1607
+ var ci = Zp;
1608
+ function us(e, t) {
1609
+ var u, i, a, o, c, m, D, y, C;
1610
+ if (e.isRoot) return false;
1611
+ let { node: r, key: n, parent: s } = e;
1612
+ if (t.__isInHtmlInterpolation && !t.bracketSpacing && nc(r) && or(e)) return true;
1613
+ if (ec(r)) return false;
1614
+ if (r.type === "Identifier") {
1615
+ if ((u = r.extra) != null && u.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;
1616
+ if (r.name === "let") {
1617
+ let p = (i = e.findAncestor((A) => A.type === "ForOfStatement")) == null ? void 0 : i.left;
1618
+ if (p && ie(p, (A) => A === r)) return true;
1619
+ }
1620
+ if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) {
1621
+ let p = e.findAncestor((T) => T.type === "ExpressionStatement" || T.type === "ForStatement" || T.type === "ForInStatement"), A = p ? p.type === "ExpressionStatement" ? p.expression : p.type === "ForStatement" ? p.init : p.left : void 0;
1622
+ if (A && ie(A, (T) => T === r)) return true;
1623
+ }
1624
+ if (n === "expression") switch (r.name) {
1625
+ case "await":
1626
+ case "interface":
1627
+ case "module":
1628
+ case "using":
1629
+ case "yield":
1630
+ case "let":
1631
+ case "component":
1632
+ case "hook":
1633
+ case "type": {
1634
+ let p = e.findAncestor((A) => !Te(A));
1635
+ if (p !== s && p.type === "ExpressionStatement") return true;
1636
+ }
1637
+ }
1638
+ return false;
1639
+ }
1640
+ if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") {
1641
+ let p = (a = e.findAncestor((A) => A.type === "ExpressionStatement")) == null ? void 0 : a.expression;
1642
+ if (p && ie(p, (A) => A === r)) return true;
1643
+ }
1644
+ if (r.type === "ObjectExpression") {
1645
+ let p = (o = e.findAncestor((A) => A.type === "ArrowFunctionExpression")) == null ? void 0 : o.body;
1646
+ if (p && p.type !== "SequenceExpression" && p.type !== "AssignmentExpression" && ie(p, (A) => A === r)) return true;
1647
+ }
1648
+ switch (s.type) {
1649
+ case "ParenthesizedExpression":
1650
+ return false;
1651
+ case "ClassDeclaration":
1652
+ case "ClassExpression":
1653
+ 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" && w(r.decorators))) return true;
1654
+ break;
1655
+ case "ExportDefaultDeclaration":
1656
+ return li(e, t) || r.type === "SequenceExpression";
1657
+ case "Decorator":
1658
+ if (n === "expression" && !uc(r)) return true;
1659
+ break;
1660
+ case "TypeAnnotation":
1661
+ if (e.match(void 0, void 0, (p, A) => A === "returnType" && p.type === "ArrowFunctionExpression") && rc(r)) return true;
1662
+ break;
1663
+ case "BinaryExpression":
1664
+ if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return true;
1665
+ break;
1666
+ case "VariableDeclarator":
1667
+ if (n === "init" && e.match(void 0, void 0, (p, A) => A === "declarations" && p.type === "VariableDeclaration", (p, A) => A === "left" && p.type === "ForInStatement")) return true;
1668
+ break;
1669
+ }
1670
+ switch (r.type) {
1671
+ case "UpdateExpression":
1672
+ if (s.type === "UnaryExpression") return r.prefix && (r.operator === "++" && s.operator === "+" || r.operator === "--" && s.operator === "-");
1673
+ case "UnaryExpression":
1674
+ switch (s.type) {
1675
+ case "UnaryExpression":
1676
+ return r.operator === s.operator && (r.operator === "+" || r.operator === "-");
1677
+ case "BindExpression":
1678
+ return true;
1679
+ case "MemberExpression":
1680
+ case "OptionalMemberExpression":
1681
+ return n === "object";
1682
+ case "TaggedTemplateExpression":
1683
+ return true;
1684
+ case "NewExpression":
1685
+ case "CallExpression":
1686
+ case "OptionalCallExpression":
1687
+ return n === "callee";
1688
+ case "BinaryExpression":
1689
+ return n === "left" && s.operator === "**";
1690
+ case "TSNonNullExpression":
1691
+ return true;
1692
+ default:
1693
+ return false;
1694
+ }
1695
+ case "BinaryExpression":
1696
+ if (s.type === "UpdateExpression" || r.operator === "in" && tc(e)) return true;
1697
+ if (r.operator === "|>" && ((c = r.extra) != null && c.parenthesized)) {
1698
+ let p = e.grandparent;
1699
+ if (p.type === "BinaryExpression" && p.operator === "|>") return true;
1700
+ }
1701
+ case "TSTypeAssertion":
1702
+ case "TSAsExpression":
1703
+ case "TSSatisfiesExpression":
1704
+ case "AsExpression":
1705
+ case "AsConstExpression":
1706
+ case "SatisfiesExpression":
1707
+ case "LogicalExpression":
1708
+ switch (s.type) {
1709
+ case "TSAsExpression":
1710
+ case "TSSatisfiesExpression":
1711
+ case "AsExpression":
1712
+ case "AsConstExpression":
1713
+ case "SatisfiesExpression":
1714
+ return !Te(r);
1715
+ case "ConditionalExpression":
1716
+ return Te(r) || au(r);
1717
+ case "CallExpression":
1718
+ case "NewExpression":
1719
+ case "OptionalCallExpression":
1720
+ return n === "callee";
1721
+ case "ClassExpression":
1722
+ case "ClassDeclaration":
1723
+ return n === "superClass";
1724
+ case "TSTypeAssertion":
1725
+ case "TaggedTemplateExpression":
1726
+ case "UnaryExpression":
1727
+ case "JSXSpreadAttribute":
1728
+ case "SpreadElement":
1729
+ case "BindExpression":
1730
+ case "AwaitExpression":
1731
+ case "TSNonNullExpression":
1732
+ case "UpdateExpression":
1733
+ return true;
1734
+ case "MemberExpression":
1735
+ case "OptionalMemberExpression":
1736
+ return n === "object";
1737
+ case "AssignmentExpression":
1738
+ case "AssignmentPattern":
1739
+ return n === "left" && (r.type === "TSTypeAssertion" || Te(r));
1740
+ case "LogicalExpression":
1741
+ if (r.type === "LogicalExpression") return s.operator !== r.operator;
1742
+ case "BinaryExpression": {
1743
+ let { operator: p, type: A } = r;
1744
+ if (!p && A !== "TSTypeAssertion") return true;
1745
+ let T = er(p), S = s.operator, B = er(S);
1746
+ return B > T || n === "right" && B === T || B === T && !nr(S, p) ? true : B < T && p === "%" ? S === "+" || S === "-" : !!yu(S);
1747
+ }
1748
+ default:
1749
+ return false;
1750
+ }
1751
+ case "SequenceExpression":
1752
+ switch (s.type) {
1753
+ case "ReturnStatement":
1754
+ return false;
1755
+ case "ForStatement":
1756
+ return false;
1757
+ case "ExpressionStatement":
1758
+ return n !== "expression";
1759
+ case "ArrowFunctionExpression":
1760
+ return n !== "body";
1761
+ default:
1762
+ return true;
1763
+ }
1764
+ case "YieldExpression":
1765
+ if (s.type === "AwaitExpression" || s.type === "TSTypeAssertion") return true;
1766
+ case "AwaitExpression":
1767
+ switch (s.type) {
1768
+ case "TaggedTemplateExpression":
1769
+ case "UnaryExpression":
1770
+ case "LogicalExpression":
1771
+ case "SpreadElement":
1772
+ case "TSAsExpression":
1773
+ case "TSSatisfiesExpression":
1774
+ case "TSNonNullExpression":
1775
+ case "AsExpression":
1776
+ case "AsConstExpression":
1777
+ case "SatisfiesExpression":
1778
+ case "BindExpression":
1779
+ return true;
1780
+ case "MemberExpression":
1781
+ case "OptionalMemberExpression":
1782
+ return n === "object";
1783
+ case "NewExpression":
1784
+ case "CallExpression":
1785
+ case "OptionalCallExpression":
1786
+ return n === "callee";
1787
+ case "ConditionalExpression":
1788
+ return n === "test";
1789
+ case "BinaryExpression":
1790
+ return !(!r.argument && s.operator === "|>");
1791
+ default:
1792
+ return false;
1793
+ }
1794
+ case "TSFunctionType":
1795
+ if (e.match((p) => p.type === "TSFunctionType", (p, A) => A === "typeAnnotation" && p.type === "TSTypeAnnotation", (p, A) => A === "returnType" && p.type === "ArrowFunctionExpression")) return true;
1796
+ case "TSConditionalType":
1797
+ case "TSConstructorType":
1798
+ if (n === "extendsType" && s.type === "TSConditionalType") {
1799
+ if (r.type === "TSConditionalType") return true;
1800
+ let { typeAnnotation: p } = r.returnType || r.typeAnnotation;
1801
+ if (p.type === "TSTypePredicate" && p.typeAnnotation && (p = p.typeAnnotation.typeAnnotation), p.type === "TSInferType" && p.typeParameter.constraint) return true;
1802
+ }
1803
+ if (n === "checkType" && s.type === "TSConditionalType") return true;
1804
+ case "TSUnionType":
1805
+ case "TSIntersectionType":
1806
+ if ((s.type === "TSUnionType" || s.type === "TSIntersectionType") && s.types.length > 1 && (!r.types || r.types.length > 1)) return true;
1807
+ case "TSInferType":
1808
+ if (r.type === "TSInferType") {
1809
+ if (s.type === "TSRestType") return false;
1810
+ if (n === "types" && (s.type === "TSUnionType" || s.type === "TSIntersectionType") && r.typeParameter.type === "TSTypeParameter" && r.typeParameter.constraint) return true;
1811
+ }
1812
+ case "TSTypeOperator":
1813
+ 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");
1814
+ case "TSTypeQuery":
1815
+ return n === "objectType" && s.type === "TSIndexedAccessType" || n === "elementType" && s.type === "TSArrayType";
1816
+ case "TypeOperator":
1817
+ return s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || s.type === "TypeOperator";
1818
+ case "TypeofTypeAnnotation":
1819
+ return n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || n === "elementType" && s.type === "ArrayTypeAnnotation";
1820
+ case "ArrayTypeAnnotation":
1821
+ return s.type === "NullableTypeAnnotation";
1822
+ case "IntersectionTypeAnnotation":
1823
+ case "UnionTypeAnnotation":
1824
+ return s.type === "TypeOperator" || s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || s.type === "IntersectionTypeAnnotation" || s.type === "UnionTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1825
+ case "InferTypeAnnotation":
1826
+ case "NullableTypeAnnotation":
1827
+ return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
1828
+ case "ComponentTypeAnnotation":
1829
+ case "FunctionTypeAnnotation": {
1830
+ if (r.type === "ComponentTypeAnnotation" && (r.rendersType === null || r.rendersType === void 0)) return false;
1831
+ if (e.match(void 0, (A, T) => T === "typeAnnotation" && A.type === "TypeAnnotation", (A, T) => T === "returnType" && A.type === "ArrowFunctionExpression") || e.match(void 0, (A, T) => T === "typeAnnotation" && A.type === "TypePredicate", (A, T) => T === "typeAnnotation" && A.type === "TypeAnnotation", (A, T) => T === "returnType" && A.type === "ArrowFunctionExpression")) return true;
1832
+ let p = s.type === "NullableTypeAnnotation" ? e.grandparent : s;
1833
+ return p.type === "UnionTypeAnnotation" || p.type === "IntersectionTypeAnnotation" || p.type === "ArrayTypeAnnotation" || n === "objectType" && (p.type === "IndexedAccessType" || p.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && ((m = r.returnType) == null ? void 0 : m.type) === "InferTypeAnnotation" && ((D = r.returnType) == null ? void 0 : D.typeParameter.bound) || p.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && K(r).some((A) => {
1834
+ var T;
1835
+ return ((T = A.typeAnnotation) == null ? void 0 : T.type) === "NullableTypeAnnotation";
1836
+ });
1837
+ }
1838
+ case "ConditionalTypeAnnotation":
1839
+ if (n === "extendsType" && s.type === "ConditionalTypeAnnotation" && r.type === "ConditionalTypeAnnotation" || n === "checkType" && s.type === "ConditionalTypeAnnotation") return true;
1840
+ case "OptionalIndexedAccessType":
1841
+ return n === "objectType" && s.type === "IndexedAccessType";
1842
+ case "StringLiteral":
1843
+ case "NumericLiteral":
1844
+ case "Literal":
1845
+ if (typeof r.value == "string" && s.type === "ExpressionStatement" && !s.directive) {
1846
+ let p = e.grandparent;
1847
+ return p.type === "Program" || p.type === "BlockStatement";
1848
+ }
1849
+ return n === "object" && s.type === "MemberExpression" && typeof r.value == "number";
1850
+ case "AssignmentExpression": {
1851
+ let p = e.grandparent;
1852
+ return n === "body" && s.type === "ArrowFunctionExpression" ? true : n === "key" && (s.type === "ClassProperty" || s.type === "PropertyDefinition") && s.computed || (n === "init" || n === "update") && s.type === "ForStatement" ? false : s.type === "ExpressionStatement" ? r.left.type === "ObjectPattern" : !(n === "key" && s.type === "TSPropertySignature" || s.type === "AssignmentExpression" || s.type === "SequenceExpression" && p.type === "ForStatement" && (p.init === s || p.update === s) || n === "value" && s.type === "Property" && p.type === "ObjectPattern" && p.properties.includes(s) || s.type === "NGChainedExpression");
1853
+ }
1854
+ case "ConditionalExpression":
1855
+ switch (s.type) {
1856
+ case "TaggedTemplateExpression":
1857
+ case "UnaryExpression":
1858
+ case "SpreadElement":
1859
+ case "BinaryExpression":
1860
+ case "LogicalExpression":
1861
+ case "NGPipeExpression":
1862
+ case "ExportDefaultDeclaration":
1863
+ case "AwaitExpression":
1864
+ case "JSXSpreadAttribute":
1865
+ case "TSTypeAssertion":
1866
+ case "TypeCastExpression":
1867
+ case "TSAsExpression":
1868
+ case "TSSatisfiesExpression":
1869
+ case "AsExpression":
1870
+ case "AsConstExpression":
1871
+ case "SatisfiesExpression":
1872
+ case "TSNonNullExpression":
1873
+ return true;
1874
+ case "NewExpression":
1875
+ case "CallExpression":
1876
+ case "OptionalCallExpression":
1877
+ return n === "callee";
1878
+ case "ConditionalExpression":
1879
+ return t.experimentalTernaries ? false : n === "test";
1880
+ case "MemberExpression":
1881
+ case "OptionalMemberExpression":
1882
+ return n === "object";
1883
+ default:
1884
+ return false;
1885
+ }
1886
+ case "FunctionExpression":
1887
+ switch (s.type) {
1888
+ case "NewExpression":
1889
+ case "CallExpression":
1890
+ case "OptionalCallExpression":
1891
+ return n === "callee";
1892
+ case "TaggedTemplateExpression":
1893
+ return true;
1894
+ default:
1895
+ return false;
1896
+ }
1897
+ case "ArrowFunctionExpression":
1898
+ switch (s.type) {
1899
+ case "BinaryExpression":
1900
+ return s.operator !== "|>" || ((y = r.extra) == null ? void 0 : y.parenthesized);
1901
+ case "NewExpression":
1902
+ case "CallExpression":
1903
+ case "OptionalCallExpression":
1904
+ return n === "callee";
1905
+ case "MemberExpression":
1906
+ case "OptionalMemberExpression":
1907
+ return n === "object";
1908
+ case "TSAsExpression":
1909
+ case "TSSatisfiesExpression":
1910
+ case "AsExpression":
1911
+ case "AsConstExpression":
1912
+ case "SatisfiesExpression":
1913
+ case "TSNonNullExpression":
1914
+ case "BindExpression":
1915
+ case "TaggedTemplateExpression":
1916
+ case "UnaryExpression":
1917
+ case "LogicalExpression":
1918
+ case "AwaitExpression":
1919
+ case "TSTypeAssertion":
1920
+ return true;
1921
+ case "ConditionalExpression":
1922
+ return n === "test";
1923
+ default:
1924
+ return false;
1925
+ }
1926
+ case "ClassExpression":
1927
+ switch (s.type) {
1928
+ case "NewExpression":
1929
+ return n === "callee";
1930
+ default:
1931
+ return false;
1932
+ }
1933
+ case "OptionalMemberExpression":
1934
+ case "OptionalCallExpression":
1935
+ case "CallExpression":
1936
+ case "MemberExpression":
1937
+ if (sc(e)) return true;
1938
+ case "TaggedTemplateExpression":
1939
+ case "TSNonNullExpression":
1940
+ if (n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression")) {
1941
+ let p = r;
1942
+ for (; p; ) switch (p.type) {
1943
+ case "CallExpression":
1944
+ case "OptionalCallExpression":
1945
+ return true;
1946
+ case "MemberExpression":
1947
+ case "OptionalMemberExpression":
1948
+ case "BindExpression":
1949
+ p = p.object;
1950
+ break;
1951
+ case "TaggedTemplateExpression":
1952
+ p = p.tag;
1953
+ break;
1954
+ case "TSNonNullExpression":
1955
+ p = p.expression;
1956
+ break;
1957
+ default:
1958
+ return false;
1959
+ }
1960
+ }
1961
+ return false;
1962
+ case "BindExpression":
1963
+ return n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression") || n === "object" && q(s);
1964
+ case "NGPipeExpression":
1965
+ return !(s.type === "NGRoot" || s.type === "NGMicrosyntaxExpression" || s.type === "ObjectProperty" && !((C = r.extra) != null && C.parenthesized) || U(s) || n === "arguments" && L(s) || n === "right" && s.type === "NGPipeExpression" || n === "property" && s.type === "MemberExpression" || s.type === "AssignmentExpression");
1966
+ case "JSXFragment":
1967
+ case "JSXElement":
1968
+ return n === "callee" || n === "left" && s.type === "BinaryExpression" && s.operator === "<" || !U(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" && !L(s) && !Ae(s) && s.type !== "ReturnStatement" && s.type !== "ThrowStatement" && s.type !== "TypeCastExpression" && s.type !== "VariableDeclarator" && s.type !== "YieldExpression";
1969
+ case "TSInstantiationExpression":
1970
+ return n === "object" && q(s);
1971
+ }
1972
+ return false;
1973
+ }
1974
+ var ec = v(["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"]);
1975
+ function tc(e) {
1976
+ let t = 0, { node: r } = e;
1977
+ for (; r; ) {
1978
+ let n = e.getParentNode(t++);
1979
+ if ((n == null ? void 0 : n.type) === "ForStatement" && n.init === r) return true;
1980
+ r = n;
1981
+ }
1982
+ return false;
1983
+ }
1984
+ function rc(e) {
1985
+ return tr(e, (t) => t.type === "ObjectTypeAnnotation" && tr(t, (r) => r.type === "FunctionTypeAnnotation"));
1986
+ }
1987
+ function nc(e) {
1988
+ return se(e);
1989
+ }
1990
+ function or(e) {
1991
+ let { parent: t, key: r } = e;
1992
+ switch (t.type) {
1993
+ case "NGPipeExpression":
1994
+ if (r === "arguments" && e.isLast) return e.callParent(or);
1995
+ break;
1996
+ case "ObjectProperty":
1997
+ if (r === "value") return e.callParent(() => e.key === "properties" && e.isLast);
1998
+ break;
1999
+ case "BinaryExpression":
2000
+ case "LogicalExpression":
2001
+ if (r === "right") return e.callParent(or);
2002
+ break;
2003
+ case "ConditionalExpression":
2004
+ if (r === "alternate") return e.callParent(or);
2005
+ break;
2006
+ case "UnaryExpression":
2007
+ if (t.prefix) return e.callParent(or);
2008
+ break;
2009
+ }
2010
+ return false;
2011
+ }
2012
+ function li(e, t) {
2013
+ let { node: r, parent: n } = e;
2014
+ return r.type === "FunctionExpression" || r.type === "ClassExpression" ? n.type === "ExportDefaultDeclaration" || !us(e, t) : !jt(r) || n.type !== "ExportDefaultDeclaration" && us(e, t) ? false : e.call(() => li(e, t), ...Pr(r));
2015
+ }
2016
+ function sc(e) {
2017
+ let { node: t, parent: r, grandparent: n, key: s } = e;
2018
+ return !!((t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression") && (s === "object" && r.type === "MemberExpression" || s === "callee" && (r.type === "CallExpression" || r.type === "NewExpression") || r.type === "TSNonNullExpression" && n.type === "MemberExpression" && n.object === r) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "ChainExpression") && (e.match(void 0, void 0, (u, i) => i === "callee" && (u.type === "CallExpression" && !u.optional || u.type === "NewExpression") || i === "object" && u.type === "MemberExpression" && !u.optional) || e.match(void 0, void 0, (u, i) => i === "expression" && u.type === "TSNonNullExpression", (u, i) => i === "object" && u.type === "MemberExpression")) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "TSNonNullExpression", (u, i) => i === "expression" && u.type === "ChainExpression", (u, i) => i === "object" && u.type === "MemberExpression"));
2019
+ }
2020
+ function is(e) {
2021
+ return e.type === "Identifier" ? true : q(e) ? !e.computed && !e.optional && e.property.type === "Identifier" && is(e.object) : false;
2022
+ }
2023
+ function uc(e) {
2024
+ return e.type === "ChainExpression" && (e = e.expression), is(e) || L(e) && !e.optional && is(e.callee);
2025
+ }
2026
+ var Be = us;
2027
+ function ic(e, t) {
2028
+ let r = t - 1;
2029
+ r = Ge(e, r, { backwards: true }), r = Ue(e, r, { backwards: true }), r = Ge(e, r, { backwards: true });
2030
+ let n = Ue(e, r, { backwards: true });
2031
+ return r !== n;
2032
+ }
2033
+ var mi = ic;
2034
+ var ac = () => true;
2035
+ function as(e, t) {
2036
+ let r = e.node;
2037
+ return r.printed = true, t.printer.printComment(e, t);
2038
+ }
2039
+ function oc(e, t) {
2040
+ var m;
2041
+ let r = e.node, n = [as(e, t)], { printer: s, originalText: u, locStart: i, locEnd: a } = t;
2042
+ if ((m = s.isBlockComment) == null ? void 0 : m.call(s, r)) {
2043
+ let D = te(u, a(r)) ? te(u, i(r), { backwards: true }) ? F : x : " ";
2044
+ n.push(D);
2045
+ } else n.push(F);
2046
+ let c = Ue(u, Ge(u, a(r)));
2047
+ return c !== false && te(u, c) && n.push(F), n;
2048
+ }
2049
+ function pc(e, t, r) {
2050
+ var c;
2051
+ let n = e.node, s = as(e, t), { printer: u, originalText: i, locStart: a } = t, o = (c = u.isBlockComment) == null ? void 0 : c.call(u, n);
2052
+ if (r != null && r.hasLineSuffix && !(r != null && r.isBlock) || te(i, a(n), { backwards: true })) {
2053
+ let m = mi(i, a(n));
2054
+ return { doc: Wn([F, m ? F : "", s]), isBlock: o, hasLineSuffix: true };
2055
+ }
2056
+ return !o || r != null && r.hasLineSuffix ? { doc: [Wn([" ", s]), Ee], isBlock: o, hasLineSuffix: true } : { doc: [" ", s], isBlock: o, hasLineSuffix: false };
2057
+ }
2058
+ function M(e, t, r = {}) {
2059
+ let { node: n } = e;
2060
+ if (!w(n == null ? void 0 : n.comments)) return "";
2061
+ let { indent: s = false, marker: u, filter: i = ac } = r, a = [];
2062
+ if (e.each(({ node: c }) => {
2063
+ c.leading || c.trailing || c.marker !== u || !i(c) || a.push(as(e, t));
2064
+ }, "comments"), a.length === 0) return "";
2065
+ let o = P(F, a);
2066
+ return s ? f([F, o]) : o;
2067
+ }
2068
+ function os(e, t) {
2069
+ let r = e.node;
2070
+ if (!r) return {};
2071
+ let n = t[Symbol.for("printedComments")];
2072
+ if ((r.comments || []).filter((o) => !n.has(o)).length === 0) return { leading: "", trailing: "" };
2073
+ let u = [], i = [], a;
2074
+ return e.each(() => {
2075
+ let o = e.node;
2076
+ if (n != null && n.has(o)) return;
2077
+ let { leading: c, trailing: m } = o;
2078
+ c ? u.push(oc(e, t)) : m && (a = pc(e, t, a), i.push(a.doc));
2079
+ }, "comments"), { leading: u, trailing: i };
2080
+ }
2081
+ function ye(e, t, r) {
2082
+ let { leading: n, trailing: s } = os(e, r);
2083
+ return !n && !s ? t : ir(t, (u) => [n, u, s]);
2084
+ }
2085
+ var ps = class extends Error {
2086
+ constructor(t, r, n = "type") {
2087
+ super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);
2088
+ __publicField(this, "name", "UnexpectedNodeError");
2089
+ this.node = t;
2090
+ }
2091
+ };
2092
+ var Me = ps;
2093
+ function cs(e) {
2094
+ if (typeof e != "string") throw new TypeError("Expected a string");
2095
+ return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2096
+ }
2097
+ var Re;
2098
+ var ls = class {
2099
+ constructor(t) {
2100
+ Ws(this, Re);
2101
+ Gs(this, Re, new Set(t));
2102
+ }
2103
+ getLeadingWhitespaceCount(t) {
2104
+ let r = pt(this, Re), n = 0;
2105
+ for (let s = 0; s < t.length && r.has(t.charAt(s)); s++) n++;
2106
+ return n;
2107
+ }
2108
+ getTrailingWhitespaceCount(t) {
2109
+ let r = pt(this, Re), n = 0;
2110
+ for (let s = t.length - 1; s >= 0 && r.has(t.charAt(s)); s--) n++;
2111
+ return n;
2112
+ }
2113
+ getLeadingWhitespace(t) {
2114
+ let r = this.getLeadingWhitespaceCount(t);
2115
+ return t.slice(0, r);
2116
+ }
2117
+ getTrailingWhitespace(t) {
2118
+ let r = this.getTrailingWhitespaceCount(t);
2119
+ return t.slice(t.length - r);
2120
+ }
2121
+ hasLeadingWhitespace(t) {
2122
+ return pt(this, Re).has(t.charAt(0));
2123
+ }
2124
+ hasTrailingWhitespace(t) {
2125
+ return pt(this, Re).has(O(false, t, -1));
2126
+ }
2127
+ trimStart(t) {
2128
+ let r = this.getLeadingWhitespaceCount(t);
2129
+ return t.slice(r);
2130
+ }
2131
+ trimEnd(t) {
2132
+ let r = this.getTrailingWhitespaceCount(t);
2133
+ return t.slice(0, t.length - r);
2134
+ }
2135
+ trim(t) {
2136
+ return this.trimEnd(this.trimStart(t));
2137
+ }
2138
+ split(t, r = false) {
2139
+ let n = `[${cs([...pt(this, Re)].join(""))}]+`, s = new RegExp(r ? `(${n})` : n, "u");
2140
+ return t.split(s);
2141
+ }
2142
+ hasWhitespaceCharacter(t) {
2143
+ let r = pt(this, Re);
2144
+ return Array.prototype.some.call(t, (n) => r.has(n));
2145
+ }
2146
+ hasNonWhitespaceCharacter(t) {
2147
+ let r = pt(this, Re);
2148
+ return Array.prototype.some.call(t, (n) => !r.has(n));
2149
+ }
2150
+ isWhitespaceOnly(t) {
2151
+ let r = pt(this, Re);
2152
+ return Array.prototype.every.call(t, (n) => r.has(n));
2153
+ }
2154
+ };
2155
+ Re = /* @__PURE__ */ new WeakMap();
2156
+ var yi = ls;
2157
+ var Nr = new yi(`
2158
+ \r `);
2159
+ var ms = (e) => e === "" || e === x || e === F || e === E;
2160
+ function cc(e, t, r) {
2161
+ var _, J, j;
2162
+ let { node: n } = e;
2163
+ if (n.type === "JSXElement" && gc(n)) return [r("openingElement"), r("closingElement")];
2164
+ let s = n.type === "JSXElement" ? r("openingElement") : r("openingFragment"), u = n.type === "JSXElement" ? r("closingElement") : r("closingFragment");
2165
+ 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"), u];
2166
+ n.children = n.children.map((h) => Sc(h) ? { type: "JSXText", value: " ", raw: " " } : h);
2167
+ let i = n.children.some(X), a = n.children.filter((h) => h.type === "JSXExpressionContainer").length > 1, o = n.type === "JSXElement" && n.openingElement.attributes.length > 1, c = ne(s) || i || o || a, m = e.parent.rootMarker === "mdx", D = t.singleQuote ? "{' '}" : '{" "}', y = m ? " " : b([D, E], " "), C = ((J = (_ = n.openingElement) == null ? void 0 : _.name) == null ? void 0 : J.name) === "fbt", p = lc(e, t, r, y, C), A = n.children.some((h) => pr(h));
2168
+ for (let h = p.length - 2; h >= 0; h--) {
2169
+ let W = p[h] === "" && p[h + 1] === "", Fe = p[h] === F && p[h + 1] === "" && p[h + 2] === F, H = (p[h] === E || p[h] === F) && p[h + 1] === "" && p[h + 2] === y, ue = p[h] === y && p[h + 1] === "" && (p[h + 2] === E || p[h + 2] === F), Z = p[h] === y && p[h + 1] === "" && p[h + 2] === y, It = p[h] === E && p[h + 1] === "" && p[h + 2] === F || p[h] === F && p[h + 1] === "" && p[h + 2] === E;
2170
+ Fe && A || W || H || Z || It ? p.splice(h, 2) : ue && p.splice(h + 1, 2);
2171
+ }
2172
+ for (; p.length > 0 && ms(O(false, p, -1)); ) p.pop();
2173
+ for (; p.length > 1 && ms(p[0]) && ms(p[1]); ) p.shift(), p.shift();
2174
+ let T = [];
2175
+ for (let [h, W] of p.entries()) {
2176
+ if (W === y) {
2177
+ if (h === 1 && p[h - 1] === "") {
2178
+ if (p.length === 2) {
2179
+ T.push(D);
2180
+ continue;
2181
+ }
2182
+ T.push([D, F]);
2183
+ continue;
2184
+ } else if (h === p.length - 1) {
2185
+ T.push(D);
2186
+ continue;
2187
+ } else if (p[h - 1] === "" && p[h - 2] === F) {
2188
+ T.push(D);
2189
+ continue;
2190
+ }
2191
+ }
2192
+ T.push(W), ne(W) && (c = true);
2193
+ }
2194
+ let S = A ? qt(T) : l(T, { shouldBreak: true });
2195
+ if (((j = t.cursorNode) == null ? void 0 : j.type) === "JSXText" && n.children.includes(t.cursorNode) && (S = [Un, S, Un]), m) return S;
2196
+ let B = l([s, f([F, S]), F, u]);
2197
+ return c ? B : ze([l([s, ...p, u]), B]);
2198
+ }
2199
+ function lc(e, t, r, n, s) {
2200
+ let u = [];
2201
+ return e.each(({ node: i, next: a }) => {
2202
+ if (i.type === "JSXText") {
2203
+ let o = fe(i);
2204
+ if (pr(i)) {
2205
+ let c = Nr.split(o, true);
2206
+ c[0] === "" && (u.push(""), c.shift(), /\n/u.test(c[0]) ? u.push(fi(s, c[1], i, a)) : u.push(n), c.shift());
2207
+ let m;
2208
+ if (O(false, c, -1) === "" && (c.pop(), m = c.pop()), c.length === 0) return;
2209
+ for (let [D, y] of c.entries()) D % 2 === 1 ? u.push(x) : u.push(y);
2210
+ m !== void 0 ? /\n/u.test(m) ? u.push(fi(s, O(false, u, -1), i, a)) : u.push(n) : u.push(Di(s, O(false, u, -1), i, a));
2211
+ } else /\n/u.test(o) ? o.match(/\n/gu).length > 1 && u.push("", F) : u.push("", n);
2212
+ } else {
2213
+ let o = r();
2214
+ if (u.push(o), a && pr(a)) {
2215
+ let m = Nr.trim(fe(a)), [D] = Nr.split(m);
2216
+ u.push(Di(s, D, i, a));
2217
+ } else u.push(F);
2218
+ }
2219
+ }, "children"), u;
2220
+ }
2221
+ function Di(e, t, r, n) {
2222
+ return e ? "" : r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? t.length === 1 ? E : F : E;
2223
+ }
2224
+ function fi(e, t, r, n) {
2225
+ return e ? F : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? F : E : F;
2226
+ }
2227
+ var mc = /* @__PURE__ */ new Set(["ArrayExpression", "TupleExpression", "JSXAttribute", "JSXElement", "JSXExpressionContainer", "JSXFragment", "ExpressionStatement", "CallExpression", "OptionalCallExpression", "ConditionalExpression", "JsExpressionRoot"]);
2228
+ function yc(e, t, r) {
2229
+ let { parent: n } = e;
2230
+ if (mc.has(n.type)) return t;
2231
+ let s = e.match(void 0, (i) => i.type === "ArrowFunctionExpression", L, (i) => i.type === "JSXExpressionContainer"), u = Be(e, r);
2232
+ return l([u ? "" : b("("), f([E, t]), E, u ? "" : b(")")], { shouldBreak: s });
2233
+ }
2234
+ function Dc(e, t, r) {
2235
+ let { node: n } = e, s = [];
2236
+ if (s.push(r("name")), n.value) {
2237
+ let u;
2238
+ if (Q(n.value)) {
2239
+ let i = fe(n.value), a = N(false, N(false, i.slice(1, -1), "&apos;", "'"), "&quot;", '"'), o = xr(a, t.jsxSingleQuote);
2240
+ a = o === '"' ? N(false, a, '"', "&quot;") : N(false, a, "'", "&apos;"), u = e.call(() => ye(e, Ie(o + a + o), t), "value");
2241
+ } else u = r("value");
2242
+ s.push("=", u);
2243
+ }
2244
+ return s;
2245
+ }
2246
+ function fc(e, t, r) {
2247
+ let { node: n } = e, s = (u, i) => u.type === "JSXEmptyExpression" || !d(u) && (U(u) || se(u) || u.type === "ArrowFunctionExpression" || u.type === "AwaitExpression" && (s(u.argument, u) || u.argument.type === "JSXElement") || L(u) || u.type === "ChainExpression" && L(u.expression) || u.type === "FunctionExpression" || u.type === "TemplateLiteral" || u.type === "TaggedTemplateExpression" || u.type === "DoExpression" || X(i) && (u.type === "ConditionalExpression" || De(u)));
2248
+ return s(n.expression, e.parent) ? l(["{", r("expression"), ke, "}"]) : l(["{", f([E, r("expression")]), E, ke, "}"]);
2249
+ }
2250
+ function Ec(e, t, r) {
2251
+ var a, o;
2252
+ let { node: n } = e, s = d(n.name) || d(n.typeParameters) || d(n.typeArguments);
2253
+ if (n.selfClosing && n.attributes.length === 0 && !s) return ["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " />"];
2254
+ if (((a = n.attributes) == null ? void 0 : a.length) === 1 && Q(n.attributes[0].value) && !n.attributes[0].value.value.includes(`
2255
+ `) && !s && !d(n.attributes[0])) return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " ", ...e.map(r, "attributes"), n.selfClosing ? " />" : ">"]);
2256
+ let u = (o = n.attributes) == null ? void 0 : o.some((c) => Q(c.value) && c.value.value.includes(`
2257
+ `)), i = t.singleAttributePerLine && n.attributes.length > 1 ? F : x;
2258
+ return l(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), f(e.map(() => [i, r()], "attributes")), ...Fc(n, t, s)], { shouldBreak: u });
2259
+ }
2260
+ function Fc(e, t, r) {
2261
+ return e.selfClosing ? [x, "/>"] : Cc(e, t, r) ? [">"] : [E, ">"];
2262
+ }
2263
+ function Cc(e, t, r) {
2264
+ let n = e.attributes.length > 0 && d(O(false, e.attributes, -1), g.Trailing);
2265
+ return e.attributes.length === 0 && !r || (t.bracketSameLine || t.jsxBracketSameLine) && (!r || e.attributes.length > 0) && !n;
2266
+ }
2267
+ function Ac(e, t, r) {
2268
+ let { node: n } = e, s = [];
2269
+ s.push("</");
2270
+ let u = r("name");
2271
+ return d(n.name, g.Leading | g.Line) ? s.push(f([F, u]), F) : d(n.name, g.Leading | g.Block) ? s.push(" ", u) : s.push(u), s.push(">"), s;
2272
+ }
2273
+ function Tc(e, t) {
2274
+ let { node: r } = e, n = d(r), s = d(r, g.Line), u = r.type === "JSXOpeningFragment";
2275
+ return [u ? "<" : "</", f([s ? F : n && !u ? " " : "", M(e, t)]), s ? F : "", ">"];
2276
+ }
2277
+ function dc(e, t, r) {
2278
+ let n = ye(e, cc(e, t, r), t);
2279
+ return yc(e, n, t);
2280
+ }
2281
+ function xc(e, t) {
2282
+ let { node: r } = e, n = d(r, g.Line);
2283
+ return [M(e, t, { indent: n }), n ? F : ""];
2284
+ }
2285
+ function hc(e, t, r) {
2286
+ let { node: n } = e;
2287
+ return ["{", e.call(({ node: s }) => {
2288
+ let u = ["...", r()];
2289
+ return !d(s) || !zn(e) ? u : [f([E, ye(e, u, t)]), E];
2290
+ }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"];
2291
+ }
2292
+ function Ei(e, t, r) {
2293
+ let { node: n } = e;
2294
+ if (n.type.startsWith("JSX")) switch (n.type) {
2295
+ case "JSXAttribute":
2296
+ return Dc(e, t, r);
2297
+ case "JSXIdentifier":
2298
+ return n.name;
2299
+ case "JSXNamespacedName":
2300
+ return P(":", [r("namespace"), r("name")]);
2301
+ case "JSXMemberExpression":
2302
+ return P(".", [r("object"), r("property")]);
2303
+ case "JSXSpreadAttribute":
2304
+ case "JSXSpreadChild":
2305
+ return hc(e, t, r);
2306
+ case "JSXExpressionContainer":
2307
+ return fc(e, t, r);
2308
+ case "JSXFragment":
2309
+ case "JSXElement":
2310
+ return dc(e, t, r);
2311
+ case "JSXOpeningElement":
2312
+ return Ec(e, t, r);
2313
+ case "JSXClosingElement":
2314
+ return Ac(e, t, r);
2315
+ case "JSXOpeningFragment":
2316
+ case "JSXClosingFragment":
2317
+ return Tc(e, t);
2318
+ case "JSXEmptyExpression":
2319
+ return xc(e, t);
2320
+ case "JSXText":
2321
+ throw new Error("JSXText should be handled by JSXElement");
2322
+ default:
2323
+ throw new Me(n, "JSX");
2324
+ }
2325
+ }
2326
+ function gc(e) {
2327
+ if (e.children.length === 0) return true;
2328
+ if (e.children.length > 1) return false;
2329
+ let t = e.children[0];
2330
+ return t.type === "JSXText" && !pr(t);
2331
+ }
2332
+ function pr(e) {
2333
+ return e.type === "JSXText" && (Nr.hasNonWhitespaceCharacter(fe(e)) || !/\n/u.test(fe(e)));
2334
+ }
2335
+ function Sc(e) {
2336
+ return e.type === "JSXExpressionContainer" && Q(e.expression) && e.expression.value === " " && !d(e.expression);
2337
+ }
2338
+ function Fi(e) {
2339
+ let { node: t, parent: r } = e;
2340
+ if (!X(t) || !X(r)) return false;
2341
+ let { index: n, siblings: s } = e, u;
2342
+ for (let i = n; i > 0; i--) {
2343
+ let a = s[i - 1];
2344
+ if (!(a.type === "JSXText" && !pr(a))) {
2345
+ u = a;
2346
+ break;
2347
+ }
2348
+ }
2349
+ return (u == null ? void 0 : u.type) === "JSXExpressionContainer" && u.expression.type === "JSXEmptyExpression" && Bt(u.expression);
2350
+ }
2351
+ function Bc(e) {
2352
+ return Bt(e.node) || Fi(e);
2353
+ }
2354
+ var Xr = Bc;
2355
+ var bc = 0;
2356
+ function Yr(e, t, r) {
2357
+ var J;
2358
+ let { node: n, parent: s, grandparent: u, key: i } = e, a = i !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), o = n.operator === "|>" && ((J = e.root.extra) == null ? void 0 : J.__isUsingHackPipeline), c = ys(e, r, t, false, a);
2359
+ if (a) return c;
2360
+ if (o) return l(c);
2361
+ if (L(s) && s.callee === n || s.type === "UnaryExpression" || q(s) && !s.computed) return l([f([E, ...c]), E]);
2362
+ let m = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && u.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && u.type === "NGMicrosyntax" && u.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && u.type !== "ReturnStatement" && u.type !== "ThrowStatement" && !L(u) || s.type === "TemplateLiteral", D = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Ae(s), y = De(n.left) && nr(n.operator, n.left.operator);
2363
+ if (m || Ut(n) && !y || !Ut(n) && D) return l(c);
2364
+ if (c.length === 0) return "";
2365
+ let C = X(n.right), p = c.findIndex((j) => typeof j != "string" && !Array.isArray(j) && j.type === le), A = c.slice(0, p === -1 ? 1 : p + 1), T = c.slice(A.length, C ? -1 : void 0), S = Symbol("logicalChain-" + ++bc), B = l([...A, f(T)], { id: S });
2366
+ if (!C) return B;
2367
+ let _ = O(false, c, -1);
2368
+ return l([B, At(_, { groupId: S })]);
2369
+ }
2370
+ function ys(e, t, r, n, s) {
2371
+ var A;
2372
+ let { node: u } = e;
2373
+ if (!De(u)) return [l(t())];
2374
+ let i = [];
2375
+ nr(u.operator, u.left.operator) ? i = e.call((T) => ys(T, t, r, true, s), "left") : i.push(l(t("left")));
2376
+ let a = Ut(u), o = (u.operator === "|>" || u.type === "NGPipeExpression" || Pc(e, r)) && !Oe(r.originalText, u.right), c = u.type === "NGPipeExpression" ? "|" : u.operator, m = u.type === "NGPipeExpression" && u.arguments.length > 0 ? l(f([E, ": ", P([x, ": "], e.map(() => he(2, l(t())), "arguments"))])) : "", D;
2377
+ if (a) D = [c, " ", t("right"), m];
2378
+ else {
2379
+ let S = c === "|>" && ((A = e.root.extra) == null ? void 0 : A.__isUsingHackPipeline) ? e.call((B) => ys(B, t, r, true, s), "right") : t("right");
2380
+ D = [o ? x : "", c, o ? " " : x, S, m];
2381
+ }
2382
+ let { parent: y } = e, C = d(u.left, g.Trailing | g.Line), p = C || !(s && u.type === "LogicalExpression") && y.type !== u.type && u.left.type !== u.type && u.right.type !== u.type;
2383
+ if (i.push(o ? "" : " ", p ? l(D, { shouldBreak: C }) : D), n && d(u)) {
2384
+ let T = Wt(ye(e, i, r));
2385
+ return T.type === Pe ? T.parts : Array.isArray(T) ? T : [T];
2386
+ }
2387
+ return i;
2388
+ }
2389
+ function Ut(e) {
2390
+ return e.type !== "LogicalExpression" ? false : !!(se(e.right) && e.right.properties.length > 0 || U(e.right) && e.right.elements.length > 0 || X(e.right));
2391
+ }
2392
+ var Ci = (e) => e.type === "BinaryExpression" && e.operator === "|";
2393
+ function Pc(e, t) {
2394
+ return (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression") && Ci(e.node) && !e.hasAncestor((r) => !Ci(r) && r.type !== "JsExpressionRoot");
2395
+ }
2396
+ function Ti(e, t, r) {
2397
+ let { node: n } = e;
2398
+ if (n.type.startsWith("NG")) switch (n.type) {
2399
+ case "NGRoot":
2400
+ return [r("node"), d(n.node) ? " //" + ct(n.node)[0].value.trimEnd() : ""];
2401
+ case "NGPipeExpression":
2402
+ return Yr(e, t, r);
2403
+ case "NGChainedExpression":
2404
+ return l(P([";", x], e.map(() => Ic(e) ? r() : ["(", r(), ")"], "expressions")));
2405
+ case "NGEmptyExpression":
2406
+ return "";
2407
+ case "NGMicrosyntax":
2408
+ return e.map(() => [e.isFirst ? "" : Ai(e) ? " " : [";", x], r()], "body");
2409
+ case "NGMicrosyntaxKey":
2410
+ return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name) ? n.name : JSON.stringify(n.name);
2411
+ case "NGMicrosyntaxExpression":
2412
+ return [r("expression"), n.alias === null ? "" : [" as ", r("alias")]];
2413
+ case "NGMicrosyntaxKeyedExpression": {
2414
+ let { index: s, parent: u } = e, i = Ai(e) || (s === 1 && (n.key.name === "then" || n.key.name === "else" || n.key.name === "as") || (s === 2 || s === 3) && (n.key.name === "else" && u.body[s - 1].type === "NGMicrosyntaxKeyedExpression" && u.body[s - 1].key.name === "then" || n.key.name === "track")) && u.body[0].type === "NGMicrosyntaxExpression";
2415
+ return [r("key"), i ? " " : ": ", r("expression")];
2416
+ }
2417
+ case "NGMicrosyntaxLet":
2418
+ return ["let ", r("key"), n.value === null ? "" : [" = ", r("value")]];
2419
+ case "NGMicrosyntaxAs":
2420
+ return [r("key"), " as ", r("alias")];
2421
+ default:
2422
+ throw new Me(n, "Angular");
2423
+ }
2424
+ }
2425
+ function Ai({ node: e, index: t }) {
2426
+ return e.type === "NGMicrosyntaxKeyedExpression" && e.key.name === "of" && t === 1;
2427
+ }
2428
+ var kc = v(["CallExpression", "OptionalCallExpression", "AssignmentExpression"]);
2429
+ function Ic({ node: e }) {
2430
+ return tr(e, kc);
2431
+ }
2432
+ function Ds(e, t, r) {
2433
+ let { node: n } = e;
2434
+ return l([P(x, e.map(r, "decorators")), hi(n, t) ? F : x]);
2435
+ }
2436
+ function di(e, t, r) {
2437
+ return gi(e.node) ? [P(F, e.map(r, "declaration", "decorators")), F] : "";
2438
+ }
2439
+ function xi(e, t, r) {
2440
+ let { node: n, parent: s } = e, { decorators: u } = n;
2441
+ if (!w(u) || gi(s) || Xr(e)) return "";
2442
+ let i = n.type === "ClassExpression" || n.type === "ClassDeclaration" || hi(n, t);
2443
+ return [e.key === "declaration" && iu(s) ? F : i ? Ee : "", P(x, e.map(r, "decorators")), x];
2444
+ }
2445
+ function hi(e, t) {
2446
+ return e.decorators.some((r) => te(t.originalText, k(r)));
2447
+ }
2448
+ function gi(e) {
2449
+ var r;
2450
+ if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return false;
2451
+ let t = (r = e.declaration) == null ? void 0 : r.decorators;
2452
+ return w(t) && ht(e, t[0]);
2453
+ }
2454
+ var Dt = class extends Error {
2455
+ constructor() {
2456
+ super(...arguments);
2457
+ __publicField(this, "name", "ArgExpansionBailout");
2458
+ }
2459
+ };
2460
+ function Lc(e, t, r) {
2461
+ let { node: n } = e, s = oe(n);
2462
+ if (s.length === 0) return ["(", M(e, t), ")"];
2463
+ let u = s.length - 1;
2464
+ if (_c(s)) {
2465
+ let y = ["("];
2466
+ return Rt(e, (C, p) => {
2467
+ y.push(r()), p !== u && y.push(", ");
2468
+ }), y.push(")"), y;
2469
+ }
2470
+ let i = false, a = [];
2471
+ Rt(e, ({ node: y }, C) => {
2472
+ let p = r();
2473
+ C === u || (pe(y, t) ? (i = true, p = [p, ",", F, F]) : p = [p, ",", x]), a.push(p);
2474
+ });
2475
+ let o = n.type === "ImportExpression" || n.callee.type === "Import", c = !t.parser.startsWith("__ng_") && !o && ae(t, "all") ? "," : "";
2476
+ function m() {
2477
+ return l(["(", f([x, ...a]), c, x, ")"], { shouldBreak: true });
2478
+ }
2479
+ if (i || e.parent.type !== "Decorator" && lu(s)) return m();
2480
+ if (Oc(s)) {
2481
+ let y = a.slice(1);
2482
+ if (y.some(ne)) return m();
2483
+ let C;
2484
+ try {
2485
+ C = r(Rn(n, 0), { expandFirstArg: true });
2486
+ } catch (p) {
2487
+ if (p instanceof Dt) return m();
2488
+ throw p;
2489
+ }
2490
+ return ne(C) ? [Ee, ze([["(", l(C, { shouldBreak: true }), ", ", ...y, ")"], m()])] : ze([["(", C, ", ", ...y, ")"], ["(", l(C, { shouldBreak: true }), ", ", ...y, ")"], m()]);
2491
+ }
2492
+ if (wc(s, a, t)) {
2493
+ let y = a.slice(0, -1);
2494
+ if (y.some(ne)) return m();
2495
+ let C;
2496
+ try {
2497
+ C = r(Rn(n, -1), { expandLastArg: true });
2498
+ } catch (p) {
2499
+ if (p instanceof Dt) return m();
2500
+ throw p;
2501
+ }
2502
+ return ne(C) ? [Ee, ze([["(", ...y, l(C, { shouldBreak: true }), ")"], m()])] : ze([["(", ...y, C, ")"], ["(", ...y, l(C, { shouldBreak: true }), ")"], m()]);
2503
+ }
2504
+ let D = ["(", f([E, ...a]), b(c), E, ")"];
2505
+ return Or(e) ? D : l(D, { shouldBreak: a.some(ne) || i });
2506
+ }
2507
+ function cr(e, t = false) {
2508
+ return se(e) && (e.properties.length > 0 || d(e)) || U(e) && (e.elements.length > 0 || d(e)) || e.type === "TSTypeAssertion" && cr(e.expression) || Te(e) && cr(e.expression) || e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && (!e.returnType || !e.returnType.typeAnnotation || e.returnType.typeAnnotation.type !== "TSTypeReference" || jc(e.body)) && (e.body.type === "BlockStatement" || e.body.type === "ArrowFunctionExpression" && cr(e.body, true) || se(e.body) || U(e.body) || !t && (L(e.body) || e.body.type === "ConditionalExpression") || X(e.body)) || e.type === "DoExpression" || e.type === "ModuleExpression";
2509
+ }
2510
+ function wc(e, t, r) {
2511
+ var u, i;
2512
+ let n = O(false, e, -1);
2513
+ if (e.length === 1) {
2514
+ let a = O(false, t, -1);
2515
+ if ((u = a.label) != null && u.embed && ((i = a.label) == null ? void 0 : i.hug) !== false) return true;
2516
+ }
2517
+ let s = O(false, e, -2);
2518
+ return !d(n, g.Leading) && !d(n, g.Trailing) && cr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !U(n)) && !(e.length > 1 && fs(n, r));
2519
+ }
2520
+ function Oc(e) {
2521
+ if (e.length !== 2) return false;
2522
+ let [t, r] = e;
2523
+ return t.type === "ModuleExpression" && vc(r) ? true : !d(t) && (t.type === "FunctionExpression" || t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement") && r.type !== "FunctionExpression" && r.type !== "ArrowFunctionExpression" && r.type !== "ConditionalExpression" && Bi(r) && !cr(r);
2524
+ }
2525
+ function Bi(e) {
2526
+ var _a2;
2527
+ if (e.type === "ParenthesizedExpression") return Bi(e.expression);
2528
+ if (Te(e) || e.type === "TypeCastExpression") {
2529
+ let { typeAnnotation: t } = e;
2530
+ 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") {
2531
+ let r = (_a2 = t.typeArguments) != null ? _a2 : t.typeParameters;
2532
+ (r == null ? void 0 : r.params.length) === 1 && (t = r.params[0]);
2533
+ }
2534
+ return Mt(t) && be(e.expression, 1);
2535
+ }
2536
+ return lt(e) && oe(e).length > 1 ? false : De(e) ? be(e.left, 1) && be(e.right, 1) : vn(e) || be(e);
2537
+ }
2538
+ function _c(e) {
2539
+ return e.length === 2 ? Si(e, 0) : e.length === 3 ? e[0].type === "Identifier" && Si(e, 1) : false;
2540
+ }
2541
+ function Si(e, t) {
2542
+ let r = e[t], n = e[t + 1];
2543
+ return r.type === "ArrowFunctionExpression" && K(r).length === 0 && r.body.type === "BlockStatement" && n.type === "ArrayExpression" && !e.some((s) => d(s));
2544
+ }
2545
+ function jc(e) {
2546
+ return e.type === "BlockStatement" && (e.body.some((t) => t.type !== "EmptyStatement") || d(e, g.Dangling));
2547
+ }
2548
+ function vc(e) {
2549
+ return e.type === "ObjectExpression" && e.properties.length === 1 && Ae(e.properties[0]) && e.properties[0].key.type === "Identifier" && e.properties[0].key.name === "type" && Q(e.properties[0].value) && e.properties[0].value.value === "module";
2550
+ }
2551
+ var lr = Lc;
2552
+ var Mc = (e) => ((e.type === "ChainExpression" || e.type === "TSNonNullExpression") && (e = e.expression), L(e) && oe(e).length > 0);
2553
+ function bi(e, t, r) {
2554
+ var c;
2555
+ let n = r("object"), s = Es(e, t, r), { node: u } = e, i = e.findAncestor((m) => !(q(m) || m.type === "TSNonNullExpression")), a = e.findAncestor((m) => !(m.type === "ChainExpression" || m.type === "TSNonNullExpression")), o = i && (i.type === "NewExpression" || i.type === "BindExpression" || i.type === "AssignmentExpression" && i.left.type !== "Identifier") || u.computed || u.object.type === "Identifier" && u.property.type === "Identifier" && !q(a) || (a.type === "AssignmentExpression" || a.type === "VariableDeclarator") && (Mc(u.object) || ((c = n.label) == null ? void 0 : c.memberChain));
2556
+ return it(n.label, [n, o ? s : l(f([E, s]))]);
2557
+ }
2558
+ function Es(e, t, r) {
2559
+ let n = r("property"), { node: s } = e, u = V(e);
2560
+ return s.computed ? !s.property || Ce(s.property) ? [u, "[", n, "]"] : l([u, "[", f([E, n]), E, "]"]) : [u, ".", n];
2561
+ }
2562
+ function Pi(e, t, r) {
2563
+ if (e.node.type === "ChainExpression") return e.call(() => Pi(e, t, r), "expression");
2564
+ let { parent: n } = e, s = !n || n.type === "ExpressionStatement", u = [];
2565
+ function i(I) {
2566
+ let { originalText: G } = t, ee = yt(G, k(I));
2567
+ return G.charAt(ee) === ")" ? ee !== false && Ot(G, ee + 1) : pe(I, t);
2568
+ }
2569
+ function a(I) {
2570
+ let { node: G } = I;
2571
+ if (G.type === "ChainExpression") return I.call(() => a(I), "expression");
2572
+ if (L(G) && (Ft(G.callee) || L(G.callee))) {
2573
+ let ee = i(G);
2574
+ u.unshift({ node: G, hasTrailingEmptyLine: ee, printed: [ye(I, [V(I), Qe(I, t, r), lr(I, t, r)], t), ee ? F : ""] }), I.call((qe) => a(qe), "callee");
2575
+ } else Ft(G) ? (u.unshift({ node: G, needsParens: Be(I, t), printed: ye(I, q(G) ? Es(I, t, r) : Hr(I, t, r), t) }), I.call((ee) => a(ee), "object")) : G.type === "TSNonNullExpression" ? (u.unshift({ node: G, printed: ye(I, "!", t) }), I.call((ee) => a(ee), "expression")) : u.unshift({ node: G, printed: r() });
2576
+ }
2577
+ let { node: o } = e;
2578
+ u.unshift({ node: o, printed: [V(e), Qe(e, t, r), lr(e, t, r)] }), o.callee && e.call((I) => a(I), "callee");
2579
+ let c = [], m = [u[0]], D = 1;
2580
+ for (; D < u.length && (u[D].node.type === "TSNonNullExpression" || L(u[D].node) || q(u[D].node) && u[D].node.computed && Ce(u[D].node.property)); ++D) m.push(u[D]);
2581
+ if (!L(u[0].node)) for (; D + 1 < u.length && (Ft(u[D].node) && Ft(u[D + 1].node)); ++D) m.push(u[D]);
2582
+ c.push(m), m = [];
2583
+ let y = false;
2584
+ for (; D < u.length; ++D) {
2585
+ if (y && Ft(u[D].node)) {
2586
+ if (u[D].node.computed && Ce(u[D].node.property)) {
2587
+ m.push(u[D]);
2588
+ continue;
2589
+ }
2590
+ c.push(m), m = [], y = false;
2591
+ }
2592
+ (L(u[D].node) || u[D].node.type === "ImportExpression") && (y = true), m.push(u[D]), d(u[D].node, g.Trailing) && (c.push(m), m = [], y = false);
2593
+ }
2594
+ m.length > 0 && c.push(m);
2595
+ function C(I) {
2596
+ return /^[A-Z]|^[$_]+$/u.test(I);
2597
+ }
2598
+ function p(I) {
2599
+ return I.length <= t.tabWidth;
2600
+ }
2601
+ function A(I) {
2602
+ var qe;
2603
+ let G = (qe = I[1][0]) == null ? void 0 : qe.node.computed;
2604
+ if (I[0].length === 1) {
2605
+ let xt = I[0][0].node;
2606
+ return xt.type === "ThisExpression" || xt.type === "Identifier" && (C(xt.name) || s && p(xt.name) || G);
2607
+ }
2608
+ let ee = O(false, I[0], -1).node;
2609
+ return q(ee) && ee.property.type === "Identifier" && (C(ee.property.name) || G);
2610
+ }
2611
+ let T = c.length >= 2 && !d(c[1][0].node) && A(c);
2612
+ function S(I) {
2613
+ let G = I.map((ee) => ee.printed);
2614
+ return I.length > 0 && O(false, I, -1).needsParens ? ["(", ...G, ")"] : G;
2615
+ }
2616
+ function B(I) {
2617
+ return I.length === 0 ? "" : f([F, P(F, I.map(S))]);
2618
+ }
2619
+ let _ = c.map(S), J = _, j = T ? 3 : 2, h = c.flat(), W = h.slice(1, -1).some((I) => d(I.node, g.Leading)) || h.slice(0, -1).some((I) => d(I.node, g.Trailing)) || c[j] && d(c[j][0].node, g.Leading);
2620
+ if (c.length <= j && !W && !c.some((I) => O(false, I, -1).hasTrailingEmptyLine)) return Or(e) ? J : l(J);
2621
+ let Fe = O(false, c[T ? 1 : 0], -1).node, H = !L(Fe) && i(Fe), ue = [S(c[0]), T ? c.slice(1, 2).map(S) : "", H ? F : "", B(c.slice(T ? 2 : 1))], Z = u.map(({ node: I }) => I).filter(L);
2622
+ function It() {
2623
+ let I = O(false, O(false, c, -1), -1).node, G = O(false, _, -1);
2624
+ return L(I) && ne(G) && Z.slice(0, -1).some((ee) => ee.arguments.some(_t));
2625
+ }
2626
+ let $t;
2627
+ return W || Z.length > 2 && Z.some((I) => !I.arguments.every((G) => be(G))) || _.slice(0, -1).some(ne) || It() ? $t = l(ue) : $t = [ne(J) || H ? Ee : "", ze([J, ue])], it({ memberChain: true }, $t);
2628
+ }
2629
+ var ki = Pi;
2630
+ function Vr(e, t, r) {
2631
+ var m;
2632
+ let { node: n } = e, s = n.type === "NewExpression", u = n.type === "ImportExpression", i = V(e), a = oe(n), o = a.length === 1 && Lr(a[0], t.originalText);
2633
+ if (o || Rc(e) || St(n, e.parent)) {
2634
+ let D = [];
2635
+ if (Rt(e, () => {
2636
+ D.push(r());
2637
+ }), !(o && ((m = D[0].label) != null && m.embed))) return [s ? "new " : "", Ii(e, r), i, Qe(e, t, r), "(", P(", ", D), ")"];
2638
+ }
2639
+ if (!u && !s && Ft(n.callee) && !e.call((D) => Be(D, t), "callee", ...n.callee.type === "ChainExpression" ? ["expression"] : [])) return ki(e, t, r);
2640
+ let c = [s ? "new " : "", Ii(e, r), i, Qe(e, t, r), lr(e, t, r)];
2641
+ return u || L(n.callee) ? l(c) : c;
2642
+ }
2643
+ function Ii(e, t) {
2644
+ let { node: r } = e;
2645
+ return r.type === "ImportExpression" ? `import${r.phase ? `.${r.phase}` : ""}` : t("callee");
2646
+ }
2647
+ function Rc(e) {
2648
+ let { node: t } = e;
2649
+ if (t.type !== "CallExpression" || t.optional || t.callee.type !== "Identifier") return false;
2650
+ let r = oe(t);
2651
+ return t.callee.name === "require" ? r.length === 1 && Q(r[0]) || r.length > 1 : t.callee.name === "define" && e.parent.type === "ExpressionStatement" ? r.length === 1 || r.length === 2 && r[0].type === "ArrayExpression" || r.length === 3 && Q(r[0]) && r[1].type === "ArrayExpression" : false;
2652
+ }
2653
+ function Tt(e, t, r, n, s, u) {
2654
+ let i = Jc(e, t, r, n, u), a = u ? r(u, { assignmentLayout: i }) : "";
2655
+ switch (i) {
2656
+ case "break-after-operator":
2657
+ return l([l(n), s, l(f([x, a]))]);
2658
+ case "never-break-after-operator":
2659
+ return l([l(n), s, " ", a]);
2660
+ case "fluid": {
2661
+ let o = Symbol("assignment");
2662
+ return l([l(n), s, l(f(x), { id: o }), ke, At(a, { groupId: o })]);
2663
+ }
2664
+ case "break-lhs":
2665
+ return l([n, s, " ", l(a)]);
2666
+ case "chain":
2667
+ return [l(n), s, x, a];
2668
+ case "chain-tail":
2669
+ return [l(n), s, f([x, a])];
2670
+ case "chain-tail-arrow-chain":
2671
+ return [l(n), s, a];
2672
+ case "only-left":
2673
+ return n;
2674
+ }
2675
+ }
2676
+ function wi(e, t, r) {
2677
+ let { node: n } = e;
2678
+ return Tt(e, t, r, r("left"), [" ", n.operator], "right");
2679
+ }
2680
+ function Oi(e, t, r) {
2681
+ return Tt(e, t, r, r("id"), " =", "init");
2682
+ }
2683
+ function Jc(e, t, r, n, s) {
2684
+ let { node: u } = e, i = u[s];
2685
+ if (!i) return "only-left";
2686
+ let a = !$r(i);
2687
+ if (e.match($r, _i, (y) => !a || y.type !== "ExpressionStatement" && y.type !== "VariableDeclaration")) return a ? i.type === "ArrowFunctionExpression" && i.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain";
2688
+ if (!a && $r(i.right) || Oe(t.originalText, i)) return "break-after-operator";
2689
+ if (u.type === "ImportAttribute" || i.type === "CallExpression" && i.callee.name === "require" || t.parser === "json5" || t.parser === "jsonc" || t.parser === "json") return "never-break-after-operator";
2690
+ let m = Bu(n);
2691
+ if (Wc(u) || Xc(u) || Fs(u) && m) return "break-lhs";
2692
+ let D = Hc(u, n, t);
2693
+ return e.call(() => qc(e, t, r, D), s) ? "break-after-operator" : Gc(u) ? "break-lhs" : !m && (D || i.type === "TemplateLiteral" || i.type === "TaggedTemplateExpression" || i.type === "BooleanLiteral" || Ce(i) || i.type === "ClassExpression") ? "never-break-after-operator" : "fluid";
2694
+ }
2695
+ function qc(e, t, r, n) {
2696
+ let s = e.node;
2697
+ if (De(s) && !Ut(s)) return true;
2698
+ switch (s.type) {
2699
+ case "StringLiteralTypeAnnotation":
2700
+ case "SequenceExpression":
2701
+ return true;
2702
+ case "TSConditionalType":
2703
+ case "ConditionalTypeAnnotation":
2704
+ if (!t.experimentalTernaries && !Kc(s)) break;
2705
+ return true;
2706
+ case "ConditionalExpression": {
2707
+ if (!t.experimentalTernaries) {
2708
+ let { test: c } = s;
2709
+ return De(c) && !Ut(c);
2710
+ }
2711
+ let { consequent: a, alternate: o } = s;
2712
+ return a.type === "ConditionalExpression" || o.type === "ConditionalExpression";
2713
+ }
2714
+ case "ClassExpression":
2715
+ return w(s.decorators);
2716
+ }
2717
+ if (n) return false;
2718
+ let u = s, i = [];
2719
+ for (; ; ) if (u.type === "UnaryExpression" || u.type === "AwaitExpression" || u.type === "YieldExpression" && u.argument !== null) u = u.argument, i.push("argument");
2720
+ else if (u.type === "TSNonNullExpression") u = u.expression, i.push("expression");
2721
+ else break;
2722
+ return !!(Q(u) || e.call(() => ji(e, t, r), ...i));
2723
+ }
2724
+ function Wc(e) {
2725
+ if (_i(e)) {
2726
+ let t = e.left || e.id;
2727
+ return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => {
2728
+ var n;
2729
+ return Ae(r) && (!r.shorthand || ((n = r.value) == null ? void 0 : n.type) === "AssignmentPattern");
2730
+ });
2731
+ }
2732
+ return false;
2733
+ }
2734
+ function $r(e) {
2735
+ return e.type === "AssignmentExpression";
2736
+ }
2737
+ function _i(e) {
2738
+ return $r(e) || e.type === "VariableDeclarator";
2739
+ }
2740
+ function Gc(e) {
2741
+ let t = Nc(e);
2742
+ if (w(t)) {
2743
+ let r = e.type === "TSTypeAliasDeclaration" ? "constraint" : "bound";
2744
+ if (t.length > 1 && t.some((n) => n[r] || n.default)) return true;
2745
+ }
2746
+ return false;
2747
+ }
2748
+ var Uc = v(["TSTypeAliasDeclaration", "TypeAlias"]);
2749
+ function Nc(e) {
2750
+ var t;
2751
+ if (Uc(e)) return (t = e.typeParameters) == null ? void 0 : t.params;
2752
+ }
2753
+ function Xc(e) {
2754
+ if (e.type !== "VariableDeclarator") return false;
2755
+ let { typeAnnotation: t } = e.id;
2756
+ if (!t || !t.typeAnnotation) return false;
2757
+ let r = Li(t.typeAnnotation);
2758
+ return w(r) && r.length > 1 && r.some((n) => w(Li(n)) || n.type === "TSConditionalType");
2759
+ }
2760
+ function Fs(e) {
2761
+ var t;
2762
+ return e.type === "VariableDeclarator" && ((t = e.init) == null ? void 0 : t.type) === "ArrowFunctionExpression";
2763
+ }
2764
+ var Yc = v(["TSTypeReference", "GenericTypeAnnotation"]);
2765
+ function Li(e) {
2766
+ var _a2;
2767
+ var t;
2768
+ if (Yc(e)) return (t = (_a2 = e.typeArguments) != null ? _a2 : e.typeParameters) == null ? void 0 : t.params;
2769
+ }
2770
+ function ji(e, t, r, n = false) {
2771
+ var i;
2772
+ let { node: s } = e, u = () => ji(e, t, r, true);
2773
+ if (s.type === "ChainExpression" || s.type === "TSNonNullExpression") return e.call(u, "expression");
2774
+ if (L(s)) {
2775
+ if ((i = Vr(e, t, r).label) != null && i.memberChain) return false;
2776
+ let o = oe(s);
2777
+ return !(o.length === 0 || o.length === 1 && rr(o[0], t)) || Vc(s, r) ? false : e.call(u, "callee");
2778
+ }
2779
+ return q(s) ? e.call(u, "object") : n && (s.type === "Identifier" || s.type === "ThisExpression");
2780
+ }
2781
+ function Hc(e, t, r) {
2782
+ return Ae(e) ? (t = Wt(t), typeof t == "string" && et(t) < r.tabWidth + 3) : false;
2783
+ }
2784
+ function Vc(e, t) {
2785
+ let r = $c(e);
2786
+ if (w(r)) {
2787
+ if (r.length > 1) return true;
2788
+ if (r.length === 1) {
2789
+ let s = r[0];
2790
+ if (Ne(s) || _r(s) || s.type === "TSTypeLiteral" || s.type === "ObjectTypeAnnotation") return true;
2791
+ }
2792
+ let n = e.typeParameters ? "typeParameters" : "typeArguments";
2793
+ if (ne(t(n))) return true;
2794
+ }
2795
+ return false;
2796
+ }
2797
+ function $c(e) {
2798
+ var _a2;
2799
+ var t;
2800
+ return (t = (_a2 = e.typeParameters) != null ? _a2 : e.typeArguments) == null ? void 0 : t.params;
2801
+ }
2802
+ function Kc(e) {
2803
+ function t(r) {
2804
+ var _a2;
2805
+ switch (r.type) {
2806
+ case "FunctionTypeAnnotation":
2807
+ case "GenericTypeAnnotation":
2808
+ case "TSFunctionType":
2809
+ return !!r.typeParameters;
2810
+ case "TSTypeReference":
2811
+ return !!((_a2 = r.typeArguments) != null ? _a2 : r.typeParameters);
2812
+ default:
2813
+ return false;
2814
+ }
2815
+ }
2816
+ return t(e.checkType) || t(e.extendsType);
2817
+ }
2818
+ function Je(e, t, r, n, s) {
2819
+ let u = e.node, i = K(u), a = s ? Qe(e, r, t) : "";
2820
+ if (i.length === 0) return [a, "(", M(e, r, { filter: (p) => ge(r.originalText, k(p)) === ")" }), ")"];
2821
+ let { parent: o } = e, c = St(o), m = Cs(u), D = [];
2822
+ if (fu(e, (p, A) => {
2823
+ let T = A === i.length - 1;
2824
+ T && u.rest && D.push("..."), D.push(t()), !T && (D.push(","), c || m ? D.push(" ") : pe(i[A], r) ? D.push(F, F) : D.push(x));
2825
+ }), n && !Qc(e)) {
2826
+ if (ne(a) || ne(D)) throw new Dt();
2827
+ return l([ur(a), "(", ur(D), ")"]);
2828
+ }
2829
+ let y = i.every((p) => !w(p.decorators));
2830
+ return m && y ? [a, "(", ...D, ")"] : c ? [a, "(", ...D, ")"] : (Ir(o) || ou(o) || o.type === "TypeAlias" || o.type === "UnionTypeAnnotation" || o.type === "IntersectionTypeAnnotation" || o.type === "FunctionTypeAnnotation" && o.returnType === u) && i.length === 1 && i[0].name === null && u.this !== i[0] && i[0].typeAnnotation && u.typeParameters === null && Mt(i[0].typeAnnotation) && !u.rest ? r.arrowParens === "always" || u.type === "HookTypeAnnotation" ? ["(", ...D, ")"] : D : [a, "(", f([E, ...D]), b(!Du(u) && ae(r, "all") ? "," : ""), E, ")"];
2831
+ }
2832
+ function Cs(e) {
2833
+ if (!e) return false;
2834
+ let t = K(e);
2835
+ if (t.length !== 1) return false;
2836
+ let [r] = t;
2837
+ return !d(r) && (r.type === "ObjectPattern" || r.type === "ArrayPattern" || r.type === "Identifier" && r.typeAnnotation && (r.typeAnnotation.type === "TypeAnnotation" || r.typeAnnotation.type === "TSTypeAnnotation") && we(r.typeAnnotation.typeAnnotation) || r.type === "FunctionTypeParam" && we(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 || U(r.right) && r.right.elements.length === 0));
2838
+ }
2839
+ function zc(e) {
2840
+ let t;
2841
+ return e.returnType ? (t = e.returnType, t.typeAnnotation && (t = t.typeAnnotation)) : e.typeAnnotation && (t = e.typeAnnotation), t;
2842
+ }
2843
+ function ot(e, t) {
2844
+ var s;
2845
+ let r = zc(e);
2846
+ if (!r) return false;
2847
+ let n = (s = e.typeParameters) == null ? void 0 : s.params;
2848
+ if (n) {
2849
+ if (n.length > 1) return false;
2850
+ if (n.length === 1) {
2851
+ let u = n[0];
2852
+ if (u.constraint || u.default) return false;
2853
+ }
2854
+ }
2855
+ return K(e).length === 1 && (we(r) || ne(t));
2856
+ }
2857
+ function Qc(e) {
2858
+ return e.match((t) => t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement", (t, r) => {
2859
+ if (t.type === "CallExpression" && r === "arguments" && t.arguments.length === 1 && t.callee.type === "CallExpression") {
2860
+ let n = t.callee.callee;
2861
+ return n.type === "Identifier" || n.type === "MemberExpression" && !n.computed && n.object.type === "Identifier" && n.property.type === "Identifier";
2862
+ }
2863
+ return false;
2864
+ }, (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);
2865
+ }
2866
+ function vi(e) {
2867
+ let t = K(e);
2868
+ return t.length > 1 && t.some((r) => r.type === "TSParameterProperty");
2869
+ }
2870
+ var Zc = v(["VoidTypeAnnotation", "TSVoidKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword"]);
2871
+ var el = v(["ObjectTypeAnnotation", "TSTypeLiteral", "GenericTypeAnnotation", "TSTypeReference"]);
2872
+ function tl(e) {
2873
+ let { types: t } = e;
2874
+ if (t.some((n) => d(n))) return false;
2875
+ let r = t.find((n) => el(n));
2876
+ return r ? t.every((n) => n === r || Zc(n)) : false;
2877
+ }
2878
+ function As(e) {
2879
+ return Mt(e) || we(e) ? true : Ne(e) ? tl(e) : false;
2880
+ }
2881
+ function Mi(e, t, r) {
2882
+ let n = t.semi ? ";" : "", { node: s } = e, u = [$(e), "opaque type ", r("id"), r("typeParameters")];
2883
+ return s.supertype && u.push(": ", r("supertype")), s.impltype && u.push(" = ", r("impltype")), u.push(n), u;
2884
+ }
2885
+ function Kr(e, t, r) {
2886
+ let n = t.semi ? ";" : "", { node: s } = e, u = [$(e)];
2887
+ u.push("type ", r("id"), r("typeParameters"));
2888
+ let i = s.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right";
2889
+ return [Tt(e, t, r, u, " =", i), n];
2890
+ }
2891
+ function zr(e, t, r) {
2892
+ let n = false;
2893
+ return l(e.map(({ isFirst: s, previous: u, node: i, index: a }) => {
2894
+ let o = r();
2895
+ if (s) return o;
2896
+ let c = we(i), m = we(u);
2897
+ return m && c ? [" & ", n ? f(o) : o] : !m && !c ? f([" &", x, o]) : (a > 1 && (n = true), [" & ", a > 1 ? f(o) : o]);
2898
+ }, "types"));
2899
+ }
2900
+ function Qr(e, t, r) {
2901
+ let { node: n } = e, { parent: s } = e, u = s.type !== "TypeParameterInstantiation" && (s.type !== "TSConditionalType" || !t.experimentalTernaries) && (s.type !== "ConditionalTypeAnnotation" || !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) && !((s.type === "TypeAlias" || s.type === "VariableDeclarator" || s.type === "TSTypeAliasDeclaration") && Oe(t.originalText, n)), i = As(n), a = e.map((m) => {
2902
+ let D = r();
2903
+ return i || (D = he(2, D)), ye(m, D, t);
2904
+ }, "types");
2905
+ if (i) return P(" | ", a);
2906
+ let o = u && !Oe(t.originalText, n), c = [b([o ? x : "", "| "]), P([x, "| "], a)];
2907
+ return Be(e, t) ? l([f(c), E]) : (s.type === "TupleTypeAnnotation" || s.type === "TSTupleType") && s[s.type === "TupleTypeAnnotation" && s.types ? "types" : "elementTypes"].length > 1 ? l([f([b(["(", E]), c]), E, b(")")]) : l(u ? f(c) : c);
2908
+ }
2909
+ function rl(e) {
2910
+ var n;
2911
+ let { node: t, parent: r } = e;
2912
+ return t.type === "FunctionTypeAnnotation" && (Ir(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && ht(r, t) || r.type === "ObjectTypeCallProperty" || ((n = e.getParentNode(2)) == null ? void 0 : n.type) === "DeclareFunction"));
2913
+ }
2914
+ function Zr(e, t, r) {
2915
+ let { node: n } = e, s = [Nt(e)];
2916
+ (n.type === "TSConstructorType" || n.type === "TSConstructSignatureDeclaration") && s.push("new ");
2917
+ let u = Je(e, r, t, false, true), i = [];
2918
+ return n.type === "FunctionTypeAnnotation" ? i.push(rl(e) ? " => " : ": ", r("returnType")) : i.push(Y(e, r, n.returnType ? "returnType" : "typeAnnotation")), ot(n, i) && (u = l(u)), s.push(u, i), l(s);
2919
+ }
2920
+ function en(e, t, r) {
2921
+ return [r("objectType"), V(e), "[", r("indexType"), "]"];
2922
+ }
2923
+ function tn(e, t, r) {
2924
+ return ["infer ", r("typeParameter")];
2925
+ }
2926
+ function Ts(e, t, r) {
2927
+ let { node: n } = e;
2928
+ return [n.postfix ? "" : r, Y(e, t), n.postfix ? r : ""];
2929
+ }
2930
+ function rn(e, t, r) {
2931
+ let { node: n } = e;
2932
+ return ["...", ...n.type === "TupleTypeSpreadElement" && n.label ? [r("label"), ": "] : [], r("typeAnnotation")];
2933
+ }
2934
+ function nn(e, t, r) {
2935
+ let { node: n } = e;
2936
+ return [n.variance ? r("variance") : "", r("label"), n.optional ? "?" : "", ": ", r("elementType")];
2937
+ }
2938
+ var nl = /* @__PURE__ */ new WeakSet();
2939
+ function Y(e, t, r = "typeAnnotation") {
2940
+ let { node: { [r]: n } } = e;
2941
+ if (!n) return "";
2942
+ let s = false;
2943
+ if (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") {
2944
+ let u = e.call(Ri, r);
2945
+ (u === "=>" || u === ":" && d(n, g.Leading)) && (s = true), nl.add(n);
2946
+ }
2947
+ return s ? [" ", t(r)] : t(r);
2948
+ }
2949
+ var Ri = (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) ? "" : ":";
2950
+ function sn(e, t, r) {
2951
+ let n = Ri(e);
2952
+ return n ? [n, " ", r("typeAnnotation")] : r("typeAnnotation");
2953
+ }
2954
+ function un(e) {
2955
+ return [e("elementType"), "[]"];
2956
+ }
2957
+ function an({ node: e }, t) {
2958
+ let r = e.type === "TSTypeQuery" ? "exprName" : "argument", n = e.type === "TypeofTypeAnnotation" || e.typeArguments ? "typeArguments" : "typeParameters";
2959
+ return ["typeof ", t(r), t(n)];
2960
+ }
2961
+ function on(e, t) {
2962
+ let { node: r } = e;
2963
+ return [r.type === "TSTypePredicate" && r.asserts ? "asserts " : r.type === "TypePredicate" && r.kind ? `${r.kind} ` : "", t("parameterName"), r.typeAnnotation ? [" is ", Y(e, t)] : ""];
2964
+ }
2965
+ function V(e) {
2966
+ let { node: t } = e;
2967
+ return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : L(t) || q(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?";
2968
+ }
2969
+ function pn(e) {
2970
+ return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : "";
2971
+ }
2972
+ var sl = /* @__PURE__ */ new Set(["DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "DeclareVariable", "DeclareExportDeclaration", "DeclareExportAllDeclaration", "DeclareOpaqueType", "DeclareTypeAlias", "DeclareEnum", "DeclareInterface"]);
2973
+ function $(e) {
2974
+ let { node: t } = e;
2975
+ return t.declare || sl.has(t.type) && e.parent.type !== "DeclareExportDeclaration" ? "declare " : "";
2976
+ }
2977
+ var ul = /* @__PURE__ */ new Set(["TSAbstractMethodDefinition", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
2978
+ function Nt({ node: e }) {
2979
+ return e.abstract || ul.has(e.type) ? "abstract " : "";
2980
+ }
2981
+ function Qe(e, t, r) {
2982
+ let n = e.node;
2983
+ return n.typeArguments ? r("typeArguments") : n.typeParameters ? r("typeParameters") : "";
2984
+ }
2985
+ function Hr(e, t, r) {
2986
+ return ["::", r("callee")];
2987
+ }
2988
+ function ft(e, t, r) {
2989
+ return e.type === "EmptyStatement" ? ";" : e.type === "BlockStatement" || r ? [" ", t] : f([x, t]);
2990
+ }
2991
+ function cn(e, t) {
2992
+ return ["...", t("argument"), Y(e, t)];
2993
+ }
2994
+ function Xt(e) {
2995
+ return e.accessibility ? e.accessibility + " " : "";
2996
+ }
2997
+ function il(e, t, r, n) {
2998
+ let { node: s } = e, u = s.inexact ? "..." : "";
2999
+ return d(s, g.Dangling) ? l([r, u, M(e, t, { indent: true }), E, n]) : [r, u, n];
3000
+ }
3001
+ function Yt(e, t, r) {
3002
+ let { node: n } = e, s = [], u = n.type === "TupleExpression" ? "#[" : "[", i = "]", a = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", o = n[a];
3003
+ if (o.length === 0) s.push(il(e, t, u, i));
3004
+ else {
3005
+ let c = O(false, o, -1), m = (c == null ? void 0 : c.type) !== "RestElement" && !n.inexact, D = c === null, y = Symbol("array"), C = !t.__inJestEach && o.length > 1 && o.every((T, S, B) => {
3006
+ let _ = T == null ? void 0 : T.type;
3007
+ if (!U(T) && !se(T)) return false;
3008
+ let J = B[S + 1];
3009
+ if (J && _ !== J.type) return false;
3010
+ let j = U(T) ? "elements" : "properties";
3011
+ return T[j] && T[j].length > 1;
3012
+ }), p = fs(n, t), A = m ? D ? "," : ae(t) ? p ? b(",", "", { groupId: y }) : b(",") : "" : "";
3013
+ s.push(l([u, f([E, p ? ol(e, t, r, A) : [al(e, t, a, n.inexact, r), A], M(e, t)]), E, i], { shouldBreak: C, id: y }));
3014
+ }
3015
+ return s.push(V(e), Y(e, r)), s;
3016
+ }
3017
+ function fs(e, t) {
3018
+ return U(e) && e.elements.length > 1 && e.elements.every((r) => r && (Ce(r) || jn(r) && !d(r.argument)) && !d(r, g.Trailing | g.Line, (n) => !te(t.originalText, R(n), { backwards: true })));
3019
+ }
3020
+ function Ji({ node: e }, { originalText: t }) {
3021
+ let r = (s) => Lt(t, wt(t, s)), n = (s) => t[s] === "," ? s : n(r(s + 1));
3022
+ return Ot(t, n(k(e)));
3023
+ }
3024
+ function al(e, t, r, n, s) {
3025
+ let u = [];
3026
+ return e.each(({ node: i, isLast: a }) => {
3027
+ u.push(i ? l(s()) : ""), (!a || n) && u.push([",", x, i && Ji(e, t) ? E : ""]);
3028
+ }, r), n && u.push("..."), u;
3029
+ }
3030
+ function ol(e, t, r, n) {
3031
+ let s = [];
3032
+ return e.each(({ isLast: u, next: i }) => {
3033
+ s.push([r(), u ? n : ","]), u || s.push(Ji(e, t) ? [F, F] : d(i, g.Leading | g.Line) ? F : x);
3034
+ }, "elements"), qt(s);
3035
+ }
3036
+ var qi = new Proxy(() => {
3037
+ }, { get: () => qi });
3038
+ var ln = qi;
3039
+ var pl = /^[\$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]*$/;
3040
+ var cl = (e) => pl.test(e);
3041
+ var Wi = cl;
3042
+ function ll(e) {
3043
+ 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, "");
3044
+ }
3045
+ var Ze = ll;
3046
+ var mn = /* @__PURE__ */ new WeakMap();
3047
+ function Ui(e) {
3048
+ return /^(?:\d+|\d+\.\d+)$/u.test(e);
3049
+ }
3050
+ function Gi(e, t) {
3051
+ return t.parser === "json" || t.parser === "jsonc" || !Q(e.key) || tt(fe(e.key), t).slice(1, -1) !== e.key.value ? false : !!(Wi(e.key.value) && !(t.parser === "babel-ts" && e.type === "ClassProperty" || t.parser === "typescript" && e.type === "PropertyDefinition") || Ui(e.key.value) && String(Number(e.key.value)) === e.key.value && e.type !== "ImportAttribute" && (t.parser === "babel" || t.parser === "acorn" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree"));
3052
+ }
3053
+ function ml(e, t) {
3054
+ let { key: r } = e.node;
3055
+ return (r.type === "Identifier" || Ce(r) && Ui(Ze(fe(r))) && String(r.value) === Ze(fe(r)) && !(t.parser === "typescript" || t.parser === "babel-ts")) && (t.parser === "json" || t.parser === "jsonc" || t.quoteProps === "consistent" && mn.get(e.parent));
3056
+ }
3057
+ function Et(e, t, r) {
3058
+ let { node: n } = e;
3059
+ if (n.computed) return ["[", r("key"), "]"];
3060
+ let { parent: s } = e, { key: u } = n;
3061
+ if (t.quoteProps === "consistent" && !mn.has(s)) {
3062
+ let i = e.siblings.some((a) => !a.computed && Q(a.key) && !Gi(a, t));
3063
+ mn.set(s, i);
3064
+ }
3065
+ if (ml(e, t)) {
3066
+ let i = tt(JSON.stringify(u.type === "Identifier" ? u.name : u.value.toString()), t);
3067
+ return e.call((a) => ye(a, i, t), "key");
3068
+ }
3069
+ return Gi(n, t) && (t.quoteProps === "as-needed" || t.quoteProps === "consistent" && !mn.get(s)) ? e.call((i) => ye(i, /^\d/u.test(u.value) ? Ze(u.value) : u.value, t), "key") : r("key");
3070
+ }
3071
+ function yn(e, t, r) {
3072
+ let { node: n } = e;
3073
+ return n.shorthand ? r("value") : Tt(e, t, r, Et(e, t, r), ":", "value");
3074
+ }
3075
+ 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" && gt(r));
3076
+ function Dn(e, t, r, n) {
3077
+ if (yl(e)) return fn(e, r, t);
3078
+ let { node: s } = e, u = false;
3079
+ if ((s.type === "FunctionDeclaration" || s.type === "FunctionExpression") && (n != null && n.expandLastArg)) {
3080
+ let { parent: m } = e;
3081
+ L(m) && (oe(m).length > 1 || K(s).every((D) => D.type === "Identifier" && !D.typeAnnotation)) && (u = true);
3082
+ }
3083
+ let i = [$(e), s.async ? "async " : "", `function${s.generator ? "*" : ""} `, s.id ? t("id") : ""], a = Je(e, t, r, u), o = Ht(e, t), c = ot(s, o);
3084
+ return i.push(Qe(e, r, t), l([c ? l(a) : a, o]), s.body ? " " : "", t("body")), r.semi && (s.declare || !s.body) && i.push(";"), i;
3085
+ }
3086
+ function mr(e, t, r) {
3087
+ let { node: n } = e, { kind: s } = n, u = n.value || n, i = [];
3088
+ return !s || s === "init" || s === "method" || s === "constructor" ? u.async && i.push("async ") : (ln.ok(s === "get" || s === "set"), i.push(s, " ")), u.generator && i.push("*"), i.push(Et(e, t, r), n.optional || n.key.optional ? "?" : "", n === u ? fn(e, t, r) : r("value")), i;
3089
+ }
3090
+ function fn(e, t, r) {
3091
+ let { node: n } = e, s = Je(e, r, t), u = Ht(e, r), i = vi(n), a = ot(n, u), o = [Qe(e, t, r), l([i ? l(s, { shouldBreak: true }) : a ? l(s) : s, u])];
3092
+ return n.body ? o.push(" ", r("body")) : o.push(t.semi ? ";" : ""), o;
3093
+ }
3094
+ function Dl(e) {
3095
+ let t = K(e);
3096
+ return t.length === 1 && !e.typeParameters && !d(e, g.Dangling) && t[0].type === "Identifier" && !t[0].typeAnnotation && !d(t[0]) && !t[0].optional && !e.predicate && !e.returnType;
3097
+ }
3098
+ function En(e, t) {
3099
+ if (t.arrowParens === "always") return false;
3100
+ if (t.arrowParens === "avoid") {
3101
+ let { node: r } = e;
3102
+ return Dl(r);
3103
+ }
3104
+ return false;
3105
+ }
3106
+ function Ht(e, t) {
3107
+ let { node: r } = e, s = [Y(e, t, "returnType")];
3108
+ return r.predicate && s.push(t("predicate")), s;
3109
+ }
3110
+ function Ni(e, t, r) {
3111
+ let { node: n } = e, s = t.semi ? ";" : "", u = [];
3112
+ if (n.argument) {
3113
+ let o = r("argument");
3114
+ fl(t, n.argument) ? o = ["(", f([F, o]), F, ")"] : (De(n.argument) || n.argument.type === "SequenceExpression" || t.experimentalTernaries && n.argument.type === "ConditionalExpression" && (n.argument.consequent.type === "ConditionalExpression" || n.argument.alternate.type === "ConditionalExpression")) && (o = l([b("("), f([E, o]), E, b(")")])), u.push(" ", o);
3115
+ }
3116
+ let i = d(n, g.Dangling), a = s && i && d(n, g.Last | g.Line);
3117
+ return a && u.push(s), i && u.push(" ", M(e, t)), a || u.push(s), u;
3118
+ }
3119
+ function Xi(e, t, r) {
3120
+ return ["return", Ni(e, t, r)];
3121
+ }
3122
+ function Yi(e, t, r) {
3123
+ return ["throw", Ni(e, t, r)];
3124
+ }
3125
+ function fl(e, t) {
3126
+ if (Oe(e.originalText, t) || d(t, g.Leading, (r) => de(e.originalText, R(r), k(r))) && !X(t)) return true;
3127
+ if (jt(t)) {
3128
+ let r = t, n;
3129
+ for (; n = uu(r); ) if (r = n, Oe(e.originalText, r)) return true;
3130
+ }
3131
+ return false;
3132
+ }
3133
+ var ds = /* @__PURE__ */ new WeakMap();
3134
+ function Hi(e) {
3135
+ return ds.has(e) || ds.set(e, e.type === "ConditionalExpression" && !ie(e, (t) => t.type === "ObjectExpression")), ds.get(e);
3136
+ }
3137
+ var Vi = (e) => e.type === "SequenceExpression";
3138
+ function $i(e, t, r, n = {}) {
3139
+ let s = [], u, i = [], a = false, o = !n.expandLastArg && e.node.body.type === "ArrowFunctionExpression", c;
3140
+ (function T() {
3141
+ let { node: S } = e, B = El(e, t, r, n);
3142
+ if (s.length === 0) s.push(B);
3143
+ else {
3144
+ let { leading: _, trailing: J } = os(e, t);
3145
+ s.push([_, B]), i.unshift(J);
3146
+ }
3147
+ o && (a || (a = S.returnType && K(S).length > 0 || S.typeParameters || K(S).some((_) => _.type !== "Identifier"))), !o || S.body.type !== "ArrowFunctionExpression" ? (u = r("body", n), c = S.body) : e.call(T, "body");
3148
+ })();
3149
+ let m = !Oe(t.originalText, c) && (Vi(c) || Fl(c, u, t) || !a && Hi(c)), D = e.key === "callee" && lt(e.parent), y = Symbol("arrow-chain"), C = Cl(e, n, { signatureDocs: s, shouldBreak: a }), p, A = false;
3150
+ return o && (D || n.assignmentLayout) && (A = true, p = n.assignmentLayout === "chain-tail-arrow-chain" || D && !m), u = Al(e, t, n, { bodyDoc: u, bodyComments: i, functionBody: c, shouldPutBodyOnSameLine: m }), l([l(A ? f([E, C]) : C, { shouldBreak: p, id: y }), " =>", o ? At(u, { groupId: y }) : l(u), o && D ? b(E, "", { groupId: y }) : ""]);
3151
+ }
3152
+ function El(e, t, r, n) {
3153
+ let { node: s } = e, u = [];
3154
+ if (s.async && u.push("async "), En(e, t)) u.push(r(["params", 0]));
3155
+ else {
3156
+ let a = n.expandLastArg || n.expandFirstArg, o = Ht(e, r);
3157
+ if (a) {
3158
+ if (ne(o)) throw new Dt();
3159
+ o = l(ur(o));
3160
+ }
3161
+ u.push(l([Je(e, r, t, a, true), o]));
3162
+ }
3163
+ let i = M(e, t, { filter(a) {
3164
+ let o = yt(t.originalText, k(a));
3165
+ return o !== false && t.originalText.slice(o, o + 2) === "=>";
3166
+ } });
3167
+ return i && u.push(" ", i), u;
3168
+ }
3169
+ function Fl(e, t, r) {
3170
+ var n, s;
3171
+ return U(e) || se(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || X(e) || ((n = t.label) == null ? void 0 : n.hug) !== false && (((s = t.label) == null ? void 0 : s.embed) || Lr(e, r.originalText));
3172
+ }
3173
+ function Cl(e, t, { signatureDocs: r, shouldBreak: n }) {
3174
+ if (r.length === 1) return r[0];
3175
+ let { parent: s, key: u } = e;
3176
+ return u !== "callee" && lt(s) || De(s) ? l([r[0], " =>", f([x, P([" =>", x], r.slice(1))])], { shouldBreak: n }) : u === "callee" && lt(s) || t.assignmentLayout ? l(P([" =>", x], r), { shouldBreak: n }) : l(f(P([" =>", x], r)), { shouldBreak: n });
3177
+ }
3178
+ function Al(e, t, r, { bodyDoc: n, bodyComments: s, functionBody: u, shouldPutBodyOnSameLine: i }) {
3179
+ let { node: a, parent: o } = e, c = r.expandLastArg && ae(t, "all") ? b(",") : "", m = (r.expandLastArg || o.type === "JSXExpressionContainer") && !d(a) ? E : "";
3180
+ return i && Hi(u) ? [" ", l([b("", "("), f([E, n]), b("", ")"), c, m]), s] : (Vi(u) && (n = l(["(", f([E, n]), E, ")"])), i ? [" ", n, s] : [f([x, n, s]), c, m]);
3181
+ }
3182
+ var Tl = (e, t, r) => {
3183
+ if (!(e && t == null)) {
3184
+ if (t.findLast) return t.findLast(r);
3185
+ for (let n = t.length - 1; n >= 0; n--) {
3186
+ let s = t[n];
3187
+ if (r(s, n, t)) return s;
3188
+ }
3189
+ }
3190
+ };
3191
+ var Ki = Tl;
3192
+ function yr(e, t, r, n) {
3193
+ let { node: s } = e, u = [], i = Ki(false, s[n], (a) => a.type !== "EmptyStatement");
3194
+ return e.each(({ node: a }) => {
3195
+ a.type !== "EmptyStatement" && (u.push(r()), a !== i && (u.push(F), pe(a, t) && u.push(F)));
3196
+ }, n), u;
3197
+ }
3198
+ function Fn(e, t, r) {
3199
+ let n = dl(e, t, r), { node: s, parent: u } = e;
3200
+ if (s.type === "Program" && (u == null ? void 0 : u.type) !== "ModuleExpression") return n ? [n, F] : "";
3201
+ let i = [];
3202
+ if (s.type === "StaticBlock" && i.push("static "), i.push("{"), n) i.push(f([F, n]), F);
3203
+ else {
3204
+ let a = e.grandparent;
3205
+ u.type === "ArrowFunctionExpression" || u.type === "FunctionExpression" || u.type === "FunctionDeclaration" || u.type === "ComponentDeclaration" || u.type === "HookDeclaration" || u.type === "ObjectMethod" || u.type === "ClassMethod" || u.type === "ClassPrivateMethod" || u.type === "ForStatement" || u.type === "WhileStatement" || u.type === "DoWhileStatement" || u.type === "DoExpression" || u.type === "ModuleExpression" || u.type === "CatchClause" && !a.finalizer || u.type === "TSModuleDeclaration" || s.type === "StaticBlock" || i.push(F);
3206
+ }
3207
+ return i.push("}"), i;
3208
+ }
3209
+ function dl(e, t, r) {
3210
+ let { node: n } = e, s = w(n.directives), u = n.body.some((o) => o.type !== "EmptyStatement"), i = d(n, g.Dangling);
3211
+ if (!s && !u && !i) return "";
3212
+ let a = [];
3213
+ return s && (a.push(yr(e, t, r, "directives")), (u || i) && (a.push(F), pe(O(false, n.directives, -1), t) && a.push(F))), u && a.push(yr(e, t, r, "body")), i && a.push(M(e, t)), a;
3214
+ }
3215
+ function xl(e) {
3216
+ let t = /* @__PURE__ */ new WeakMap();
3217
+ return function(r) {
3218
+ return t.has(r) || t.set(r, Symbol(e)), t.get(r);
3219
+ };
3220
+ }
3221
+ var Cn = xl;
3222
+ function hl(e) {
3223
+ switch (e) {
3224
+ case null:
3225
+ return "";
3226
+ case "PlusOptional":
3227
+ return "+?";
3228
+ case "MinusOptional":
3229
+ return "-?";
3230
+ case "Optional":
3231
+ return "?";
3232
+ }
3233
+ }
3234
+ function zi(e, t, r) {
3235
+ let { node: n } = e;
3236
+ return l([n.variance ? r("variance") : "", "[", f([r("keyTparam"), " in ", r("sourceType")]), "]", hl(n.optional), ": ", r("propType")]);
3237
+ }
3238
+ function xs(e, t) {
3239
+ return e === "+" || e === "-" ? e + t : t;
3240
+ }
3241
+ function Qi(e, t, r) {
3242
+ let { node: n } = e, s = de(t.originalText, R(n), R(n.typeParameter));
3243
+ return l(["{", f([t.bracketSpacing ? x : E, l([r("typeParameter"), n.optional ? xs(n.optional, "?") : "", n.typeAnnotation ? ": " : "", r("typeAnnotation")]), t.semi ? b(";") : ""]), M(e, t), t.bracketSpacing ? x : E, "}"], { shouldBreak: s });
3244
+ }
3245
+ var Dr = Cn("typeParameters");
3246
+ function gl(e, t, r) {
3247
+ let { node: n } = e;
3248
+ return K(n).length === 1 && n.type.startsWith("TS") && !n[r][0].constraint && e.parent.type === "ArrowFunctionExpression" && !(t.filepath && /\.ts$/u.test(t.filepath));
3249
+ }
3250
+ function Pt(e, t, r, n) {
3251
+ let { node: s } = e;
3252
+ if (!s[n]) return "";
3253
+ if (!Array.isArray(s[n])) return r(n);
3254
+ let u = St(e.grandparent), i = e.match((c) => !(c[n].length === 1 && we(c[n][0])), void 0, (c, m) => m === "typeAnnotation", (c) => c.type === "Identifier", Fs);
3255
+ if (s[n].length === 0 || !i && (u || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || As(s[n][0])))) return ["<", P(", ", e.map(r, n)), Sl(e, t), ">"];
3256
+ let o = s.type === "TSTypeParameterInstantiation" ? "" : gl(e, t, n) ? "," : ae(t) ? b(",") : "";
3257
+ return l(["<", f([E, P([",", x], e.map(r, n))]), o, E, ">"], { id: Dr(s) });
3258
+ }
3259
+ function Sl(e, t) {
3260
+ let { node: r } = e;
3261
+ if (!d(r, g.Dangling)) return "";
3262
+ let n = !d(r, g.Line), s = M(e, t, { indent: !n });
3263
+ return n ? s : [s, F];
3264
+ }
3265
+ function An(e, t, r) {
3266
+ let { node: n, parent: s } = e, u = [n.type === "TSTypeParameter" && n.const ? "const " : ""], i = n.type === "TSTypeParameter" ? r("name") : n.name;
3267
+ if (s.type === "TSMappedType") return s.readonly && u.push(xs(s.readonly, "readonly"), " "), u.push("[", i), n.constraint && u.push(" in ", r("constraint")), s.nameType && u.push(" as ", e.callParent(() => r("nameType"))), u.push("]"), u;
3268
+ if (n.variance && u.push(r("variance")), n.in && u.push("in "), n.out && u.push("out "), u.push(i), n.bound && (n.usesExtendsBound && u.push(" extends "), u.push(Y(e, r, "bound"))), n.constraint) {
3269
+ let a = Symbol("constraint");
3270
+ u.push(" extends", l(f(x), { id: a }), ke, At(r("constraint"), { groupId: a }));
3271
+ }
3272
+ return n.default && u.push(" = ", r("default")), l(u);
3273
+ }
3274
+ var Zi = v(["ClassProperty", "PropertyDefinition", "ClassPrivateProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractPropertyDefinition", "TSAbstractAccessorProperty"]);
3275
+ function Tn(e, t, r) {
3276
+ let { node: n } = e, s = [$(e), Nt(e), "class"], u = d(n.id, g.Trailing) || d(n.typeParameters, g.Trailing) || d(n.superClass) || w(n.extends) || w(n.mixins) || w(n.implements), i = [], a = [];
3277
+ if (n.id && i.push(" ", r("id")), i.push(r("typeParameters")), n.superClass) {
3278
+ let o = [bl(e, t, r), r(n.superTypeArguments ? "superTypeArguments" : "superTypeParameters")], c = e.call((m) => ["extends ", ye(m, o, t)], "superClass");
3279
+ u ? a.push(x, l(c)) : a.push(" ", c);
3280
+ } else a.push(hs(e, t, r, "extends"));
3281
+ if (a.push(hs(e, t, r, "mixins"), hs(e, t, r, "implements")), u) {
3282
+ let o;
3283
+ ta(n) ? o = [...i, f(a)] : o = f([...i, a]), s.push(l(o, { id: ea(n) }));
3284
+ } else s.push(...i, ...a);
3285
+ return s.push(" ", r("body")), s;
3286
+ }
3287
+ var ea = Cn("heritageGroup");
3288
+ function gs(e) {
3289
+ return b(F, "", { groupId: ea(e) });
3290
+ }
3291
+ function Bl(e) {
3292
+ return ["extends", "mixins", "implements"].reduce((t, r) => t + (Array.isArray(e[r]) ? e[r].length : 0), e.superClass ? 1 : 0) > 1;
3293
+ }
3294
+ function ta(e) {
3295
+ return e.typeParameters && !d(e.typeParameters, g.Trailing | g.Line) && !Bl(e);
3296
+ }
3297
+ function hs(e, t, r, n) {
3298
+ let { node: s } = e;
3299
+ if (!w(s[n])) return "";
3300
+ let u = M(e, t, { marker: n });
3301
+ return [ta(s) ? b(" ", x, { groupId: Dr(s.typeParameters) }) : x, u, u && F, n, l(f([x, P([",", x], e.map(r, n))]))];
3302
+ }
3303
+ function bl(e, t, r) {
3304
+ let n = r("superClass"), { parent: s } = e;
3305
+ return s.type === "AssignmentExpression" ? l(b(["(", f([E, n]), E, ")"], n)) : n;
3306
+ }
3307
+ function dn(e, t, r) {
3308
+ let { node: n } = e, s = [];
3309
+ return w(n.decorators) && s.push(Ds(e, t, r)), s.push(Xt(n)), n.static && s.push("static "), s.push(Nt(e)), n.override && s.push("override "), s.push(mr(e, t, r)), s;
3310
+ }
3311
+ function xn(e, t, r) {
3312
+ let { node: n } = e, s = [], u = t.semi ? ";" : "";
3313
+ w(n.decorators) && s.push(Ds(e, t, r)), s.push(Xt(n), $(e)), n.static && s.push("static "), s.push(Nt(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(Et(e, t, r), V(e), pn(e), Y(e, r));
3314
+ let i = n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty";
3315
+ return [Tt(e, t, r, s, " =", i ? void 0 : "value"), u];
3316
+ }
3317
+ function ra(e, t, r) {
3318
+ let { node: n } = e, s = [];
3319
+ return e.each(({ node: u, next: i, isLast: a }) => {
3320
+ s.push(r()), !t.semi && Zi(u) && Pl(u, i) && s.push(";"), a || (s.push(F), pe(u, t) && s.push(F));
3321
+ }, "body"), d(n, g.Dangling) && s.push(M(e, t)), [w(n.body) ? gs(e.parent) : "", "{", s.length > 0 ? [f([F, s]), F] : "", "}"];
3322
+ }
3323
+ function Pl(e, t) {
3324
+ var s;
3325
+ let { type: r, name: n } = e.key;
3326
+ if (!e.computed && r === "Identifier" && (n === "static" || n === "get" || n === "set") && !e.value && !e.typeAnnotation) return true;
3327
+ if (!t || t.static || t.accessibility || t.readonly) return false;
3328
+ if (!t.computed) {
3329
+ let u = (s = t.key) == null ? void 0 : s.name;
3330
+ if (u === "in" || u === "instanceof") return true;
3331
+ }
3332
+ if (Zi(t) && t.variance && !t.static && !t.declare) return true;
3333
+ switch (t.type) {
3334
+ case "ClassProperty":
3335
+ case "PropertyDefinition":
3336
+ case "TSAbstractPropertyDefinition":
3337
+ return t.computed;
3338
+ case "MethodDefinition":
3339
+ case "TSAbstractMethodDefinition":
3340
+ case "ClassMethod":
3341
+ case "ClassPrivateMethod": {
3342
+ if ((t.value ? t.value.async : t.async) || t.kind === "get" || t.kind === "set") return false;
3343
+ let i = t.value ? t.value.generator : t.generator;
3344
+ return !!(t.computed || i);
3345
+ }
3346
+ case "TSIndexSignature":
3347
+ return true;
3348
+ }
3349
+ return false;
3350
+ }
3351
+ function na(e, t) {
3352
+ if (t.semi || Ss(e, t) || bs(e, t)) return false;
3353
+ let { node: r, key: n, parent: s } = e;
3354
+ 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(() => sa(e, t), "expression"));
3355
+ }
3356
+ function sa(e, t) {
3357
+ let { node: r } = e;
3358
+ switch (r.type) {
3359
+ case "ParenthesizedExpression":
3360
+ case "TypeCastExpression":
3361
+ case "ArrayExpression":
3362
+ case "ArrayPattern":
3363
+ case "TemplateLiteral":
3364
+ case "TemplateElement":
3365
+ case "RegExpLiteral":
3366
+ return true;
3367
+ case "ArrowFunctionExpression":
3368
+ if (!En(e, t)) return true;
3369
+ break;
3370
+ case "UnaryExpression": {
3371
+ let { prefix: n, operator: s } = r;
3372
+ if (n && (s === "+" || s === "-")) return true;
3373
+ break;
3374
+ }
3375
+ case "BindExpression":
3376
+ if (!r.object) return true;
3377
+ break;
3378
+ case "Literal":
3379
+ if (r.regex) return true;
3380
+ break;
3381
+ default:
3382
+ if (X(r)) return true;
3383
+ }
3384
+ return Be(e, t) ? true : jt(r) ? e.call(() => sa(e, t), ...Pr(r)) : false;
3385
+ }
3386
+ function Ss({ node: e, parent: t }, r) {
3387
+ return (r.parentParser === "markdown" || r.parentParser === "mdx") && e.type === "ExpressionStatement" && X(e.expression) && t.type === "Program" && t.body.length === 1;
3388
+ }
3389
+ function Bs(e) {
3390
+ switch (e.type) {
3391
+ case "MemberExpression":
3392
+ switch (e.property.type) {
3393
+ case "Identifier":
3394
+ case "NumericLiteral":
3395
+ case "StringLiteral":
3396
+ return Bs(e.object);
3397
+ }
3398
+ return false;
3399
+ case "Identifier":
3400
+ return true;
3401
+ default:
3402
+ return false;
3403
+ }
3404
+ }
3405
+ function bs({ node: e, parent: t }, r) {
3406
+ return (r.parser === "__vue_event_binding" || r.parser === "__vue_ts_event_binding") && e.type === "ExpressionStatement" && t.type === "Program" && t.body.length === 1;
3407
+ }
3408
+ function ua(e, t, r) {
3409
+ let n = [r("expression")];
3410
+ return bs(e, t) ? Bs(e.node.expression) && n.push(";") : Ss(e, t) || t.semi && n.push(";"), n;
3411
+ }
3412
+ function ia(e, t, r) {
3413
+ if (t.__isVueBindings || t.__isVueForBindingLeft) {
3414
+ let n = e.map(r, "program", "body", 0, "params");
3415
+ if (n.length === 1) return n[0];
3416
+ let s = P([",", x], n);
3417
+ return t.__isVueForBindingLeft ? ["(", f([E, l(s)]), E, ")"] : s;
3418
+ }
3419
+ if (t.__isEmbeddedTypescriptGenericParameters) {
3420
+ let n = e.map(r, "program", "body", 0, "typeParameters", "params");
3421
+ return P([",", x], n);
3422
+ }
3423
+ }
3424
+ function pa(e, t) {
3425
+ let { node: r } = e;
3426
+ switch (r.type) {
3427
+ case "RegExpLiteral":
3428
+ return aa(r);
3429
+ case "BigIntLiteral":
3430
+ return hn(r.extra.raw);
3431
+ case "NumericLiteral":
3432
+ return Ze(r.extra.raw);
3433
+ case "StringLiteral":
3434
+ return Ie(tt(r.extra.raw, t));
3435
+ case "NullLiteral":
3436
+ return "null";
3437
+ case "BooleanLiteral":
3438
+ return String(r.value);
3439
+ case "DecimalLiteral":
3440
+ return Ze(r.value) + "m";
3441
+ case "DirectiveLiteral":
3442
+ return oa(r.extra.raw, t);
3443
+ case "Literal": {
3444
+ if (r.regex) return aa(r.regex);
3445
+ if (r.bigint) return hn(r.raw);
3446
+ if (r.decimal) return Ze(r.decimal) + "m";
3447
+ let { value: n } = r;
3448
+ return typeof n == "number" ? Ze(r.raw) : typeof n == "string" ? kl(e) ? oa(r.raw, t) : Ie(tt(r.raw, t)) : String(n);
3449
+ }
3450
+ }
3451
+ }
3452
+ function kl(e) {
3453
+ if (e.key !== "expression") return;
3454
+ let { parent: t } = e;
3455
+ return t.type === "ExpressionStatement" && t.directive;
3456
+ }
3457
+ function hn(e) {
3458
+ return e.toLowerCase();
3459
+ }
3460
+ function aa({ pattern: e, flags: t }) {
3461
+ return t = [...t].sort().join(""), `/${e}/${t}`;
3462
+ }
3463
+ function oa(e, t) {
3464
+ let r = e.slice(1, -1);
3465
+ if (r.includes('"') || r.includes("'")) return e;
3466
+ let n = t.singleQuote ? "'" : '"';
3467
+ return n + r + n;
3468
+ }
3469
+ function Il(e, t, r) {
3470
+ let n = e.originalText.slice(t, r);
3471
+ for (let s of e[Symbol.for("comments")]) {
3472
+ let u = R(s);
3473
+ if (u > r) break;
3474
+ let i = k(s);
3475
+ if (i < t) continue;
3476
+ let a = i - u;
3477
+ n = n.slice(0, u - t) + " ".repeat(a) + n.slice(i - t);
3478
+ }
3479
+ return n;
3480
+ }
3481
+ var fr = Il;
3482
+ function ca(e, t, r) {
3483
+ let { node: n } = e;
3484
+ return ["import", n.module ? " module" : "", n.phase ? ` ${n.phase}` : "", ks(n), ya(e, t, r), ma(e, t, r), fa(e, t, r), t.semi ? ";" : ""];
3485
+ }
3486
+ var la = (e) => e.type === "ExportDefaultDeclaration" || e.type === "DeclareExportDeclaration" && e.default;
3487
+ function gn(e, t, r) {
3488
+ let { node: n } = e, s = [di(e, t, r), $(e), "export", la(n) ? " default" : ""], { declaration: u, exported: i } = n;
3489
+ return d(n, g.Dangling) && (s.push(" ", M(e, t)), wr(n) && s.push(F)), u ? s.push(" ", r("declaration")) : (s.push(Ol(n)), n.type === "ExportAllDeclaration" || n.type === "DeclareExportAllDeclaration" ? (s.push(" *"), i && s.push(" as ", r("exported"))) : s.push(ya(e, t, r)), s.push(ma(e, t, r), fa(e, t, r))), s.push(wl(n, t)), s;
3490
+ }
3491
+ var Ll = v(["ClassDeclaration", "ComponentDeclaration", "FunctionDeclaration", "TSInterfaceDeclaration", "DeclareClass", "DeclareComponent", "DeclareFunction", "DeclareHook", "HookDeclaration", "TSDeclareFunction", "EnumDeclaration"]);
3492
+ function wl(e, t) {
3493
+ return t.semi && (!e.declaration || la(e) && !Ll(e.declaration)) ? ";" : "";
3494
+ }
3495
+ function Ps(e, t = true) {
3496
+ return e && e !== "value" ? `${t ? " " : ""}${e}${t ? "" : " "}` : "";
3497
+ }
3498
+ function ks(e, t) {
3499
+ return Ps(e.importKind, t);
3500
+ }
3501
+ function Ol(e) {
3502
+ return Ps(e.exportKind);
3503
+ }
3504
+ function ma(e, t, r) {
3505
+ let { node: n } = e;
3506
+ if (!n.source) return "";
3507
+ let s = [];
3508
+ return Da(n, t) && s.push(" from"), s.push(" ", r("source")), s;
3509
+ }
3510
+ function ya(e, t, r) {
3511
+ let { node: n } = e;
3512
+ if (!Da(n, t)) return "";
3513
+ let s = [" "];
3514
+ if (w(n.specifiers)) {
3515
+ let u = [], i = [];
3516
+ e.each(() => {
3517
+ let a = e.node.type;
3518
+ if (a === "ExportNamespaceSpecifier" || a === "ExportDefaultSpecifier" || a === "ImportNamespaceSpecifier" || a === "ImportDefaultSpecifier") u.push(r());
3519
+ else if (a === "ExportSpecifier" || a === "ImportSpecifier") i.push(r());
3520
+ else throw new Me(n, "specifier");
3521
+ }, "specifiers"), s.push(P(", ", u)), i.length > 0 && (u.length > 0 && s.push(", "), i.length > 1 || u.length > 0 || n.specifiers.some((o) => d(o)) ? s.push(l(["{", f([t.bracketSpacing ? x : E, P([",", x], i)]), b(ae(t) ? "," : ""), t.bracketSpacing ? x : E, "}"])) : s.push(["{", t.bracketSpacing ? " " : "", ...i, t.bracketSpacing ? " " : "", "}"]));
3522
+ } else s.push("{}");
3523
+ return s;
3524
+ }
3525
+ function Da(e, t) {
3526
+ return e.type !== "ImportDeclaration" || w(e.specifiers) || e.importKind === "type" ? true : fr(t, R(e), R(e.source)).trimEnd().endsWith("from");
3527
+ }
3528
+ function _l(e, t) {
3529
+ var n, s;
3530
+ if ((n = e.extra) != null && n.deprecatedAssertSyntax) return "assert";
3531
+ let r = fr(t, k(e.source), (s = e.attributes) != null && s[0] ? R(e.attributes[0]) : k(e)).trimStart();
3532
+ return r.startsWith("assert") ? "assert" : r.startsWith("with") || w(e.attributes) ? "with" : void 0;
3533
+ }
3534
+ function fa(e, t, r) {
3535
+ let { node: n } = e;
3536
+ if (!n.source) return "";
3537
+ let s = _l(n, t);
3538
+ if (!s) return "";
3539
+ let u = [` ${s} {`];
3540
+ return w(n.attributes) && (t.bracketSpacing && u.push(" "), u.push(P(", ", e.map(r, "attributes"))), t.bracketSpacing && u.push(" ")), u.push("}"), u;
3541
+ }
3542
+ function Ea(e, t, r) {
3543
+ let { node: n } = e, { type: s } = n, u = s.startsWith("Import"), i = u ? "imported" : "local", a = u ? "local" : "exported", o = n[i], c = n[a], m = "", D = "";
3544
+ return s === "ExportNamespaceSpecifier" || s === "ImportNamespaceSpecifier" ? m = "*" : o && (m = r(i)), c && !jl(n) && (D = r(a)), [Ps(s === "ImportSpecifier" ? n.importKind : n.exportKind, false), m, m && D ? " as " : "", D];
3545
+ }
3546
+ function jl(e) {
3547
+ if (e.type !== "ImportSpecifier" && e.type !== "ExportSpecifier") return false;
3548
+ let { local: t, [e.type === "ImportSpecifier" ? "imported" : "exported"]: r } = e;
3549
+ if (t.type !== r.type || !eu(t, r)) return false;
3550
+ if (Q(t)) return t.value === r.value && fe(t) === fe(r);
3551
+ switch (t.type) {
3552
+ case "Identifier":
3553
+ return t.name === r.name;
3554
+ default:
3555
+ return false;
3556
+ }
3557
+ }
3558
+ function dt(e, t, r) {
3559
+ var j;
3560
+ let n = t.semi ? ";" : "", { node: s } = e, u = s.type === "ObjectTypeAnnotation", i = s.type === "TSEnumDeclaration" || s.type === "EnumBooleanBody" || s.type === "EnumNumberBody" || s.type === "EnumBigIntBody" || s.type === "EnumStringBody" || s.type === "EnumSymbolBody", a = [s.type === "TSTypeLiteral" || i ? "members" : s.type === "TSInterfaceBody" ? "body" : "properties"];
3561
+ u && a.push("indexers", "callProperties", "internalSlots");
3562
+ let o = a.flatMap((h) => e.map(({ node: W }) => ({ node: W, printed: r(), loc: R(W) }), h));
3563
+ a.length > 1 && o.sort((h, W) => h.loc - W.loc);
3564
+ let { parent: c, key: m } = e, D = u && m === "body" && (c.type === "InterfaceDeclaration" || c.type === "DeclareInterface" || c.type === "DeclareClass"), y = s.type === "TSInterfaceBody" || i || D || s.type === "ObjectPattern" && c.type !== "FunctionDeclaration" && c.type !== "FunctionExpression" && c.type !== "ArrowFunctionExpression" && c.type !== "ObjectMethod" && c.type !== "ClassMethod" && c.type !== "ClassPrivateMethod" && c.type !== "AssignmentPattern" && c.type !== "CatchClause" && s.properties.some((h) => h.value && (h.value.type === "ObjectPattern" || h.value.type === "ArrayPattern")) || s.type !== "ObjectPattern" && o.length > 0 && de(t.originalText, R(s), o[0].loc), C = D ? ";" : s.type === "TSInterfaceBody" || s.type === "TSTypeLiteral" ? b(n, ";") : ",", p = s.type === "RecordExpression" ? "#{" : s.exact ? "{|" : "{", A = s.exact ? "|}" : "}", T = [], S = o.map((h) => {
3565
+ let W = [...T, l(h.printed)];
3566
+ return T = [C, x], (h.node.type === "TSPropertySignature" || h.node.type === "TSMethodSignature" || h.node.type === "TSConstructSignatureDeclaration" || h.node.type === "TSCallSignatureDeclaration") && d(h.node, g.PrettierIgnore) && T.shift(), pe(h.node, t) && T.push(F), W;
3567
+ });
3568
+ if (s.inexact || s.hasUnknownMembers) {
3569
+ let h;
3570
+ if (d(s, g.Dangling)) {
3571
+ let W = d(s, g.Line);
3572
+ h = [M(e, t), W || te(t.originalText, k(O(false, ct(s), -1))) ? F : x, "..."];
3573
+ } else h = ["..."];
3574
+ S.push([...T, ...h]);
3575
+ }
3576
+ let B = (j = O(false, o, -1)) == null ? void 0 : j.node, _ = !(s.inexact || s.hasUnknownMembers || B && (B.type === "RestElement" || (B.type === "TSPropertySignature" || B.type === "TSCallSignatureDeclaration" || B.type === "TSMethodSignature" || B.type === "TSConstructSignatureDeclaration") && d(B, g.PrettierIgnore))), J;
3577
+ if (S.length === 0) {
3578
+ if (!d(s, g.Dangling)) return [p, A, Y(e, r)];
3579
+ J = l([p, M(e, t, { indent: true }), E, A, V(e), Y(e, r)]);
3580
+ } else J = [D && w(s.properties) ? gs(c) : "", p, f([t.bracketSpacing ? x : E, ...S]), b(_ && (C !== "," || ae(t)) ? C : ""), t.bracketSpacing ? x : E, A, V(e), Y(e, r)];
3581
+ return e.match((h) => h.type === "ObjectPattern" && !w(h.decorators), Is) || we(s) && (e.match(void 0, (h, W) => W === "typeAnnotation", (h, W) => W === "typeAnnotation", Is) || e.match(void 0, (h, W) => h.type === "FunctionTypeParam" && W === "typeAnnotation", Is)) || !y && e.match((h) => h.type === "ObjectPattern", (h) => h.type === "AssignmentExpression" || h.type === "VariableDeclarator") ? J : l(J, { shouldBreak: y });
3582
+ }
3583
+ function Is(e, t) {
3584
+ return (t === "params" || t === "parameters" || t === "this" || t === "rest") && Cs(e);
3585
+ }
3586
+ function vl(e) {
3587
+ let t = [e];
3588
+ for (let r = 0; r < t.length; r++) {
3589
+ let n = t[r];
3590
+ for (let s of ["test", "consequent", "alternate"]) {
3591
+ let u = n[s];
3592
+ if (X(u)) return true;
3593
+ u.type === "ConditionalExpression" && t.push(u);
3594
+ }
3595
+ }
3596
+ return false;
3597
+ }
3598
+ function Ml(e, t, r) {
3599
+ let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "alternate" : "falseType", { parent: i } = e, a = s ? r("test") : [r("checkType"), " ", "extends", " ", r("extendsType")];
3600
+ return i.type === n.type && i[u] === n ? he(2, a) : a;
3601
+ }
3602
+ var Rl = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3603
+ function Jl(e) {
3604
+ let { node: t } = e;
3605
+ if (t.type !== "ConditionalExpression") return false;
3606
+ let r, n = t;
3607
+ for (let s = 0; !r; s++) {
3608
+ let u = e.getParentNode(s);
3609
+ if (u.type === "ChainExpression" && u.expression === n || L(u) && u.callee === n || q(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
3610
+ n = u;
3611
+ continue;
3612
+ }
3613
+ u.type === "NewExpression" && u.callee === n || Te(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
3614
+ }
3615
+ return n === t ? false : r[Rl.get(r.type)] === n;
3616
+ }
3617
+ function Fa(e, t, r) {
3618
+ let { node: n } = e, s = n.type === "ConditionalExpression", u = s ? "consequent" : "trueType", i = s ? "alternate" : "falseType", a = s ? ["test"] : ["checkType", "extendsType"], o = n[u], c = n[i], m = [], D = false, { parent: y } = e, C = y.type === n.type && a.some((H) => y[H] === n), p = y.type === n.type && !C, A, T, S = 0;
3619
+ do
3620
+ T = A || n, A = e.getParentNode(S), S++;
3621
+ while (A && A.type === n.type && a.every((H) => A[H] !== T));
3622
+ let B = A || y, _ = T;
3623
+ if (s && (X(n[a[0]]) || X(o) || X(c) || vl(_))) {
3624
+ D = true, p = true;
3625
+ let H = (Z) => [b("("), f([E, Z]), E, b(")")], ue = (Z) => Z.type === "NullLiteral" || Z.type === "Literal" && Z.value === null || Z.type === "Identifier" && Z.name === "undefined";
3626
+ m.push(" ? ", ue(o) ? r(u) : H(r(u)), " : ", c.type === n.type || ue(c) ? r(i) : H(r(i)));
3627
+ } else {
3628
+ let H = (Z) => t.useTabs ? f(r(Z)) : he(2, r(Z)), ue = [x, "? ", o.type === n.type ? b("", "(") : "", H(u), o.type === n.type ? b("", ")") : "", x, ": ", H(i)];
3629
+ m.push(y.type !== n.type || y[i] === n || C ? ue : t.useTabs ? Mr(f(ue)) : he(Math.max(0, t.tabWidth - 2), ue));
3630
+ }
3631
+ let J = [u, i, ...a].some((H) => d(n[H], (ue) => re(ue) && de(t.originalText, R(ue), k(ue)))), j = (H) => y === B ? l(H, { shouldBreak: J }) : J ? [H, Ee] : H, h = !D && (q(y) || y.type === "NGPipeExpression" && y.left === n) && !y.computed, W = Jl(e), Fe = j([Ml(e, t, r), p ? m : f(m), s && h && !W ? E : ""]);
3632
+ return C || W ? l([f([E, Fe]), E]) : Fe;
3633
+ }
3634
+ function ql(e, t) {
3635
+ return (q(t) || t.type === "NGPipeExpression" && t.left === e) && !t.computed;
3636
+ }
3637
+ function Wl(e, t, r, n) {
3638
+ return [...e.map((u) => ct(u)), ct(t), ct(r)].flat().some((u) => re(u) && de(n.originalText, R(u), k(u)));
3639
+ }
3640
+ var Gl = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"], ["AwaitExpression", "argument"]]);
3641
+ function Ul(e) {
3642
+ let { node: t } = e;
3643
+ if (t.type !== "ConditionalExpression") return false;
3644
+ let r, n = t;
3645
+ for (let s = 0; !r; s++) {
3646
+ let u = e.getParentNode(s);
3647
+ if (u.type === "ChainExpression" && u.expression === n || L(u) && u.callee === n || q(u) && u.object === n || u.type === "TSNonNullExpression" && u.expression === n) {
3648
+ n = u;
3649
+ continue;
3650
+ }
3651
+ u.type === "NewExpression" && u.callee === n || Te(u) && u.expression === n ? (r = e.getParentNode(s + 1), n = u) : r = u;
3652
+ }
3653
+ return n === t ? false : r[Gl.get(r.type)] === n;
3654
+ }
3655
+ var Ls = (e) => [b("("), f([E, e]), E, b(")")];
3656
+ function Vt(e, t, r, n) {
3657
+ if (!t.experimentalTernaries) return Fa(e, t, r);
3658
+ let { node: s } = e, u = s.type === "ConditionalExpression", i = s.type === "TSConditionalType" || s.type === "ConditionalTypeAnnotation", a = u ? "consequent" : "trueType", o = u ? "alternate" : "falseType", c = u ? ["test"] : ["checkType", "extendsType"], m = s[a], D = s[o], y = c.map((We) => s[We]), { parent: C } = e, p = C.type === s.type, A = p && c.some((We) => C[We] === s), T = p && C[o] === s, S = m.type === s.type, B = D.type === s.type, _ = B || T, J = t.tabWidth > 2 || t.useTabs, j, h, W = 0;
3659
+ do
3660
+ h = j || s, j = e.getParentNode(W), W++;
3661
+ while (j && j.type === s.type && c.every((We) => j[We] !== h));
3662
+ let Fe = j || C, H = 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"), ue = (C.type === "ReturnStatement" || C.type === "ThrowStatement") && !(S || B), Z = u && Fe.type === "JSXExpressionContainer" && e.grandparent.type !== "JSXAttribute", It = Ul(e), $t = ql(s, C), I = i && Be(e, t), G = J ? t.useTabs ? " " : " ".repeat(t.tabWidth - 1) : "", ee = Wl(y, m, D, t) || S || B, qe = !_ && !p && !i && (Z ? m.type === "NullLiteral" || m.type === "Literal" && m.value === null : rr(m, t) && Mn(s.test, 3)), xt = _ || T || i && !p || p && u && Mn(s.test, 1) || qe, js = [];
3663
+ !S && d(m, g.Dangling) && e.call((We) => {
3664
+ js.push(M(We, t), F);
3665
+ }, "consequent");
3666
+ let Kt = [];
3667
+ d(s.test, g.Dangling) && e.call((We) => {
3668
+ Kt.push(M(We, t));
3669
+ }, "test"), !B && d(D, g.Dangling) && e.call((We) => {
3670
+ Kt.push(M(We, t));
3671
+ }, "alternate"), d(s, g.Dangling) && Kt.push(M(e, t));
3672
+ let vs = Symbol("test"), Ma = Symbol("consequent"), Fr = Symbol("test-and-consequent"), Ra = u ? [Ls(r("test")), s.test.type === "ConditionalExpression" ? Ee : ""] : [r("checkType"), " ", "extends", " ", s.extendsType.type === "TSConditionalType" || s.extendsType.type === "ConditionalTypeAnnotation" || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ls(r("extendsType")))], Ms = l([Ra, " ?"], { id: vs }), Ja = r(a), Cr = f([S || Z && (X(m) || p || _) ? F : x, js, Ja]), qa = xt ? l([Ms, _ ? Cr : b(Cr, l(Cr, { id: Ma }), { groupId: vs })], { id: Fr }) : [Ms, Cr], kn = r(o), Rs = qe ? b(kn, Mr(Ls(kn)), { groupId: Fr }) : kn, zt = [qa, Kt.length > 0 ? [f([F, Kt]), F] : B ? F : qe ? b(x, " ", { groupId: Fr }) : x, ":", B ? " " : J ? xt ? b(G, b(_ || qe ? " " : G, " "), { groupId: Fr }) : b(G, " ") : " ", B ? Rs : l([f(Rs), Z && !qe ? E : ""]), $t && !It ? E : "", ee ? Ee : ""];
3673
+ return H && !ee ? l(f([E, l(zt)])) : H || ue ? l(f(zt)) : It || i && A ? l([f([E, zt]), I ? E : ""]) : C === Fe ? l(zt) : zt;
3674
+ }
3675
+ function Ca(e, t, r, n) {
3676
+ var _a2;
3677
+ let { node: s } = e;
3678
+ if (kr(s)) return pa(e, t);
3679
+ let u = t.semi ? ";" : "", i = [];
3680
+ switch (s.type) {
3681
+ case "JsExpressionRoot":
3682
+ return r("node");
3683
+ case "JsonRoot":
3684
+ return [r("node"), F];
3685
+ case "File":
3686
+ return (_a2 = ia(e, t, r)) != null ? _a2 : r("program");
3687
+ case "EmptyStatement":
3688
+ return "";
3689
+ case "ExpressionStatement":
3690
+ return ua(e, t, r);
3691
+ case "ChainExpression":
3692
+ return r("expression");
3693
+ case "ParenthesizedExpression":
3694
+ return !d(s.expression) && (se(s.expression) || U(s.expression)) ? ["(", r("expression"), ")"] : l(["(", f([E, r("expression")]), E, ")"]);
3695
+ case "AssignmentExpression":
3696
+ return wi(e, t, r);
3697
+ case "VariableDeclarator":
3698
+ return Oi(e, t, r);
3699
+ case "BinaryExpression":
3700
+ case "LogicalExpression":
3701
+ return Yr(e, t, r);
3702
+ case "AssignmentPattern":
3703
+ return [r("left"), " = ", r("right")];
3704
+ case "OptionalMemberExpression":
3705
+ case "MemberExpression":
3706
+ return bi(e, t, r);
3707
+ case "MetaProperty":
3708
+ return [r("meta"), ".", r("property")];
3709
+ case "BindExpression":
3710
+ return s.object && i.push(r("object")), i.push(l(f([E, Hr(e, t, r)]))), i;
3711
+ case "Identifier":
3712
+ return [s.name, V(e), pn(e), Y(e, r)];
3713
+ case "V8IntrinsicIdentifier":
3714
+ return ["%", s.name];
3715
+ case "SpreadElement":
3716
+ case "SpreadElementPattern":
3717
+ case "SpreadPropertyPattern":
3718
+ case "RestElement":
3719
+ return cn(e, r);
3720
+ case "FunctionDeclaration":
3721
+ case "FunctionExpression":
3722
+ return Dn(e, r, t, n);
3723
+ case "ArrowFunctionExpression":
3724
+ return $i(e, t, r, n);
3725
+ case "YieldExpression":
3726
+ return i.push("yield"), s.delegate && i.push("*"), s.argument && i.push(" ", r("argument")), i;
3727
+ case "AwaitExpression":
3728
+ if (i.push("await"), s.argument) {
3729
+ i.push(" ", r("argument"));
3730
+ let { parent: a } = e;
3731
+ if (L(a) && a.callee === s || q(a) && a.object === s) {
3732
+ i = [f([E, ...i]), E];
3733
+ let o = e.findAncestor((c) => c.type === "AwaitExpression" || c.type === "BlockStatement");
3734
+ if ((o == null ? void 0 : o.type) !== "AwaitExpression" || !ie(o.argument, (c) => c === s)) return l(i);
3735
+ }
3736
+ }
3737
+ return i;
3738
+ case "ExportDefaultDeclaration":
3739
+ case "ExportNamedDeclaration":
3740
+ case "ExportAllDeclaration":
3741
+ return gn(e, t, r);
3742
+ case "ImportDeclaration":
3743
+ return ca(e, t, r);
3744
+ case "ImportSpecifier":
3745
+ case "ExportSpecifier":
3746
+ case "ImportNamespaceSpecifier":
3747
+ case "ExportNamespaceSpecifier":
3748
+ case "ImportDefaultSpecifier":
3749
+ case "ExportDefaultSpecifier":
3750
+ return Ea(e, t, r);
3751
+ case "ImportAttribute":
3752
+ return yn(e, t, r);
3753
+ case "Import":
3754
+ return "import";
3755
+ case "Program":
3756
+ case "BlockStatement":
3757
+ case "StaticBlock":
3758
+ return Fn(e, t, r);
3759
+ case "ClassBody":
3760
+ return ra(e, t, r);
3761
+ case "ThrowStatement":
3762
+ return Yi(e, t, r);
3763
+ case "ReturnStatement":
3764
+ return Xi(e, t, r);
3765
+ case "NewExpression":
3766
+ case "ImportExpression":
3767
+ case "OptionalCallExpression":
3768
+ case "CallExpression":
3769
+ return Vr(e, t, r);
3770
+ case "ObjectExpression":
3771
+ case "ObjectPattern":
3772
+ case "RecordExpression":
3773
+ return dt(e, t, r);
3774
+ case "Property":
3775
+ return gt(s) ? mr(e, t, r) : yn(e, t, r);
3776
+ case "ObjectProperty":
3777
+ return yn(e, t, r);
3778
+ case "ObjectMethod":
3779
+ return mr(e, t, r);
3780
+ case "Decorator":
3781
+ return ["@", r("expression")];
3782
+ case "ArrayExpression":
3783
+ case "ArrayPattern":
3784
+ case "TupleExpression":
3785
+ return Yt(e, t, r);
3786
+ case "SequenceExpression": {
3787
+ let { parent: a } = e;
3788
+ if (a.type === "ExpressionStatement" || a.type === "ForStatement") {
3789
+ let o = [];
3790
+ return e.each(({ isFirst: c }) => {
3791
+ c ? o.push(r()) : o.push(",", f([x, r()]));
3792
+ }, "expressions"), l(o);
3793
+ }
3794
+ return l(P([",", x], e.map(r, "expressions")));
3795
+ }
3796
+ case "ThisExpression":
3797
+ return "this";
3798
+ case "Super":
3799
+ return "super";
3800
+ case "Directive":
3801
+ return [r("value"), u];
3802
+ case "UnaryExpression":
3803
+ return i.push(s.operator), /[a-z]$/u.test(s.operator) && i.push(" "), d(s.argument) ? i.push(l(["(", f([E, r("argument")]), E, ")"])) : i.push(r("argument")), i;
3804
+ case "UpdateExpression":
3805
+ return [s.prefix ? s.operator : "", r("argument"), s.prefix ? "" : s.operator];
3806
+ case "ConditionalExpression":
3807
+ return Vt(e, t, r, n);
3808
+ case "VariableDeclaration": {
3809
+ let a = e.map(r, "declarations"), o = e.parent, c = o.type === "ForStatement" || o.type === "ForInStatement" || o.type === "ForOfStatement", m = s.declarations.some((y) => y.init), D;
3810
+ return a.length === 1 && !d(s.declarations[0]) ? D = a[0] : a.length > 0 && (D = f(a[0])), i = [$(e), s.kind, D ? [" ", D] : "", f(a.slice(1).map((y) => [",", m && !c ? F : x, y]))], c && o.body !== s || i.push(u), l(i);
3811
+ }
3812
+ case "WithStatement":
3813
+ return l(["with (", r("object"), ")", ft(s.body, r("body"))]);
3814
+ case "IfStatement": {
3815
+ let a = ft(s.consequent, r("consequent")), o = l(["if (", l([f([E, r("test")]), E]), ")", a]);
3816
+ if (i.push(o), s.alternate) {
3817
+ let c = d(s.consequent, g.Trailing | g.Line) || wr(s), m = s.consequent.type === "BlockStatement" && !c;
3818
+ i.push(m ? " " : F), d(s, g.Dangling) && i.push(M(e, t), c ? F : " "), i.push("else", l(ft(s.alternate, r("alternate"), s.alternate.type === "IfStatement")));
3819
+ }
3820
+ return i;
3821
+ }
3822
+ case "ForStatement": {
3823
+ let a = ft(s.body, r("body")), o = M(e, t), c = o ? [o, E] : "";
3824
+ return !s.init && !s.test && !s.update ? [c, l(["for (;;)", a])] : [c, l(["for (", l([f([E, r("init"), ";", x, r("test"), ";", x, r("update")]), E]), ")", a])];
3825
+ }
3826
+ case "WhileStatement":
3827
+ return l(["while (", l([f([E, r("test")]), E]), ")", ft(s.body, r("body"))]);
3828
+ case "ForInStatement":
3829
+ return l(["for (", r("left"), " in ", r("right"), ")", ft(s.body, r("body"))]);
3830
+ case "ForOfStatement":
3831
+ return l(["for", s.await ? " await" : "", " (", r("left"), " of ", r("right"), ")", ft(s.body, r("body"))]);
3832
+ case "DoWhileStatement": {
3833
+ let a = ft(s.body, r("body"));
3834
+ return i = [l(["do", a])], s.body.type === "BlockStatement" ? i.push(" ") : i.push(F), i.push("while (", l([f([E, r("test")]), E]), ")", u), i;
3835
+ }
3836
+ case "DoExpression":
3837
+ return [s.async ? "async " : "", "do ", r("body")];
3838
+ case "BreakStatement":
3839
+ case "ContinueStatement":
3840
+ return i.push(s.type === "BreakStatement" ? "break" : "continue"), s.label && i.push(" ", r("label")), i.push(u), i;
3841
+ case "LabeledStatement":
3842
+ return s.body.type === "EmptyStatement" ? [r("label"), ":;"] : [r("label"), ": ", r("body")];
3843
+ case "TryStatement":
3844
+ return ["try ", r("block"), s.handler ? [" ", r("handler")] : "", s.finalizer ? [" finally ", r("finalizer")] : ""];
3845
+ case "CatchClause":
3846
+ if (s.param) {
3847
+ let a = d(s.param, (c) => !re(c) || c.leading && te(t.originalText, k(c)) || c.trailing && te(t.originalText, R(c), { backwards: true })), o = r("param");
3848
+ return ["catch ", a ? ["(", f([E, o]), E, ") "] : ["(", o, ") "], r("body")];
3849
+ }
3850
+ return ["catch ", r("body")];
3851
+ case "SwitchStatement":
3852
+ return [l(["switch (", f([E, r("discriminant")]), E, ")"]), " {", s.cases.length > 0 ? f([F, P(F, e.map(({ node: a, isLast: o }) => [r(), !o && pe(a, t) ? F : ""], "cases"))]) : "", F, "}"];
3853
+ case "SwitchCase": {
3854
+ s.test ? i.push("case ", r("test"), ":") : i.push("default:"), d(s, g.Dangling) && i.push(" ", M(e, t));
3855
+ let a = s.consequent.filter((o) => o.type !== "EmptyStatement");
3856
+ if (a.length > 0) {
3857
+ let o = yr(e, t, r, "consequent");
3858
+ i.push(a.length === 1 && a[0].type === "BlockStatement" ? [" ", o] : f([F, o]));
3859
+ }
3860
+ return i;
3861
+ }
3862
+ case "DebuggerStatement":
3863
+ return ["debugger", u];
3864
+ case "ClassDeclaration":
3865
+ case "ClassExpression":
3866
+ return Tn(e, t, r);
3867
+ case "ClassMethod":
3868
+ case "ClassPrivateMethod":
3869
+ case "MethodDefinition":
3870
+ return dn(e, t, r);
3871
+ case "ClassProperty":
3872
+ case "PropertyDefinition":
3873
+ case "ClassPrivateProperty":
3874
+ case "ClassAccessorProperty":
3875
+ case "AccessorProperty":
3876
+ return xn(e, t, r);
3877
+ case "TemplateElement":
3878
+ return Ie(s.value.raw);
3879
+ case "TemplateLiteral":
3880
+ return qr(e, r, t);
3881
+ case "TaggedTemplateExpression":
3882
+ return Uu(e, r);
3883
+ case "PrivateIdentifier":
3884
+ return ["#", s.name];
3885
+ case "PrivateName":
3886
+ return ["#", r("id")];
3887
+ case "TopicReference":
3888
+ return "%";
3889
+ case "ArgumentPlaceholder":
3890
+ return "?";
3891
+ case "ModuleExpression":
3892
+ return ["module ", r("body")];
3893
+ case "InterpreterDirective":
3894
+ default:
3895
+ throw new Me(s, "ESTree");
3896
+ }
3897
+ }
3898
+ function Sn(e, t, r) {
3899
+ let { parent: n, node: s, key: u } = e, i = [r("expression")];
3900
+ switch (s.type) {
3901
+ case "AsConstExpression":
3902
+ i.push(" as const");
3903
+ break;
3904
+ case "AsExpression":
3905
+ case "TSAsExpression":
3906
+ i.push(" as ", r("typeAnnotation"));
3907
+ break;
3908
+ case "SatisfiesExpression":
3909
+ case "TSSatisfiesExpression":
3910
+ i.push(" satisfies ", r("typeAnnotation"));
3911
+ break;
3912
+ }
3913
+ return u === "callee" && L(n) || u === "object" && q(n) ? l([f([E, ...i]), E]) : i;
3914
+ }
3915
+ function Aa(e, t, r) {
3916
+ let { node: n } = e, s = [$(e), "component"];
3917
+ n.id && s.push(" ", r("id")), s.push(r("typeParameters"));
3918
+ let u = Nl(e, r, t);
3919
+ return n.rendersType ? s.push(l([u, " ", r("rendersType")])) : s.push(l([u])), n.body && s.push(" ", r("body")), t.semi && n.type === "DeclareComponent" && s.push(";"), s;
3920
+ }
3921
+ function Nl(e, t, r) {
3922
+ let { node: n } = e, s = n.params;
3923
+ if (n.rest && (s = [...s, n.rest]), s.length === 0) return ["(", M(e, r, { filter: (i) => ge(r.originalText, k(i)) === ")" }), ")"];
3924
+ let u = [];
3925
+ return Yl(e, (i, a) => {
3926
+ let o = a === s.length - 1;
3927
+ o && n.rest && u.push("..."), u.push(t()), !o && (u.push(","), pe(s[a], r) ? u.push(F, F) : u.push(x));
3928
+ }), ["(", f([E, ...u]), b(ae(r, "all") && !Xl(n, s) ? "," : ""), E, ")"];
3929
+ }
3930
+ function Xl(e, t) {
3931
+ var r;
3932
+ return e.rest || ((r = O(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
3933
+ }
3934
+ function Yl(e, t) {
3935
+ let { node: r } = e, n = 0, s = (u) => t(u, n++);
3936
+ e.each(s, "params"), r.rest && e.call(s, "rest");
3937
+ }
3938
+ function Ta(e, t, r) {
3939
+ let { node: n } = e;
3940
+ return n.shorthand ? r("local") : [r("name"), " as ", r("local")];
3941
+ }
3942
+ function da(e, t, r) {
3943
+ let { node: n } = e, s = [];
3944
+ return n.name && s.push(r("name"), n.optional ? "?: " : ": "), s.push(r("typeAnnotation")), s;
3945
+ }
3946
+ function xa(e, t, r) {
3947
+ return dt(e, r, t);
3948
+ }
3949
+ function Bn(e, t) {
3950
+ let { node: r } = e, n = t("id");
3951
+ r.computed && (n = ["[", n, "]"]);
3952
+ let s = "";
3953
+ return r.initializer && (s = t("initializer")), r.init && (s = t("init")), s ? [n, " = ", s] : n;
3954
+ }
3955
+ function ha(e, t, r) {
3956
+ let { node: n } = e, s;
3957
+ if (n.type === "EnumSymbolBody" || n.explicitType) switch (n.type) {
3958
+ case "EnumBooleanBody":
3959
+ s = "boolean";
3960
+ break;
3961
+ case "EnumNumberBody":
3962
+ s = "number";
3963
+ break;
3964
+ case "EnumBigIntBody":
3965
+ s = "bigint";
3966
+ break;
3967
+ case "EnumStringBody":
3968
+ s = "string";
3969
+ break;
3970
+ case "EnumSymbolBody":
3971
+ s = "symbol";
3972
+ break;
3973
+ }
3974
+ return [s ? `of ${s} ` : "", xa(e, t, r)];
3975
+ }
3976
+ function bn(e, t, r) {
3977
+ let { node: n } = e;
3978
+ return [$(e), n.const ? "const " : "", "enum ", t("id"), " ", n.type === "TSEnumDeclaration" ? xa(e, t, r) : t("body")];
3979
+ }
3980
+ function Sa(e, t, r) {
3981
+ let { node: n } = e, s = ["hook"];
3982
+ n.id && s.push(" ", r("id"));
3983
+ let u = Je(e, r, t, false, true), i = Ht(e, r), a = ot(n, i);
3984
+ return s.push(l([a ? l(u) : u, i]), n.body ? " " : "", r("body")), s;
3985
+ }
3986
+ function Ba(e, t, r) {
3987
+ let { node: n } = e, s = [$(e), "hook"];
3988
+ return n.id && s.push(" ", r("id")), t.semi && s.push(";"), s;
3989
+ }
3990
+ function ga(e) {
3991
+ var r;
3992
+ let { node: t } = e;
3993
+ return t.type === "HookTypeAnnotation" && ((r = e.getParentNode(2)) == null ? void 0 : r.type) === "DeclareHook";
3994
+ }
3995
+ function ba(e, t, r) {
3996
+ let { node: n } = e, s = [];
3997
+ s.push(ga(e) ? "" : "hook ");
3998
+ let u = Je(e, r, t, false, true), i = [];
3999
+ return i.push(ga(e) ? ": " : " => ", r("returnType")), ot(n, i) && (u = l(u)), s.push(u, i), l(s);
4000
+ }
4001
+ function Pn(e, t, r) {
4002
+ let { node: n } = e, s = [$(e), "interface"], u = [], i = [];
4003
+ n.type !== "InterfaceTypeAnnotation" && u.push(" ", r("id"), r("typeParameters"));
4004
+ let a = n.typeParameters && !d(n.typeParameters, g.Trailing | g.Line);
4005
+ return w(n.extends) && i.push(a ? b(" ", x, { groupId: Dr(n.typeParameters) }) : x, "extends ", (n.extends.length === 1 ? mu : f)(P([",", x], e.map(r, "extends")))), d(n.id, g.Trailing) || w(n.extends) ? a ? s.push(l([...u, f(i)])) : s.push(l(f([...u, ...i]))) : s.push(...u, ...i), s.push(" ", r("body")), l(s);
4006
+ }
4007
+ function Pa(e, t, r) {
4008
+ var _a2, _b, _c2;
4009
+ let { node: n } = e;
4010
+ if (Sr(n)) return n.type.slice(0, -14).toLowerCase();
4011
+ let s = t.semi ? ";" : "";
4012
+ switch (n.type) {
4013
+ case "ComponentDeclaration":
4014
+ case "DeclareComponent":
4015
+ case "ComponentTypeAnnotation":
4016
+ return Aa(e, t, r);
4017
+ case "ComponentParameter":
4018
+ return Ta(e, t, r);
4019
+ case "ComponentTypeParameter":
4020
+ return da(e, t, r);
4021
+ case "HookDeclaration":
4022
+ return Sa(e, t, r);
4023
+ case "DeclareHook":
4024
+ return Ba(e, t, r);
4025
+ case "HookTypeAnnotation":
4026
+ return ba(e, t, r);
4027
+ case "DeclareClass":
4028
+ return Tn(e, t, r);
4029
+ case "DeclareFunction":
4030
+ return [$(e), "function ", r("id"), r("predicate"), s];
4031
+ case "DeclareModule":
4032
+ return ["declare module ", r("id"), " ", r("body")];
4033
+ case "DeclareModuleExports":
4034
+ return ["declare module.exports", Y(e, r), s];
4035
+ case "DeclareNamespace":
4036
+ return ["declare namespace ", r("id"), " ", r("body")];
4037
+ case "DeclareVariable":
4038
+ return [$(e), (_a2 = n.kind) != null ? _a2 : "var", " ", r("id"), s];
4039
+ case "DeclareExportDeclaration":
4040
+ case "DeclareExportAllDeclaration":
4041
+ return gn(e, t, r);
4042
+ case "DeclareOpaqueType":
4043
+ case "OpaqueType":
4044
+ return Mi(e, t, r);
4045
+ case "DeclareTypeAlias":
4046
+ case "TypeAlias":
4047
+ return Kr(e, t, r);
4048
+ case "IntersectionTypeAnnotation":
4049
+ return zr(e, t, r);
4050
+ case "UnionTypeAnnotation":
4051
+ return Qr(e, t, r);
4052
+ case "ConditionalTypeAnnotation":
4053
+ return Vt(e, t, r);
4054
+ case "InferTypeAnnotation":
4055
+ return tn(e, t, r);
4056
+ case "FunctionTypeAnnotation":
4057
+ return Zr(e, t, r);
4058
+ case "TupleTypeAnnotation":
4059
+ return Yt(e, t, r);
4060
+ case "TupleTypeLabeledElement":
4061
+ return nn(e, t, r);
4062
+ case "TupleTypeSpreadElement":
4063
+ return rn(e, t, r);
4064
+ case "GenericTypeAnnotation":
4065
+ return [r("id"), Pt(e, t, r, "typeParameters")];
4066
+ case "IndexedAccessType":
4067
+ case "OptionalIndexedAccessType":
4068
+ return en(e, t, r);
4069
+ case "TypeAnnotation":
4070
+ return sn(e, t, r);
4071
+ case "TypeParameter":
4072
+ return An(e, t, r);
4073
+ case "TypeofTypeAnnotation":
4074
+ return an(e, r);
4075
+ case "ExistsTypeAnnotation":
4076
+ return "*";
4077
+ case "ArrayTypeAnnotation":
4078
+ return un(r);
4079
+ case "DeclareEnum":
4080
+ case "EnumDeclaration":
4081
+ return bn(e, r, t);
4082
+ case "EnumBooleanBody":
4083
+ case "EnumNumberBody":
4084
+ case "EnumBigIntBody":
4085
+ case "EnumStringBody":
4086
+ case "EnumSymbolBody":
4087
+ return ha(e, r, t);
4088
+ case "EnumBooleanMember":
4089
+ case "EnumNumberMember":
4090
+ case "EnumBigIntMember":
4091
+ case "EnumStringMember":
4092
+ case "EnumDefaultedMember":
4093
+ return Bn(e, r);
4094
+ case "FunctionTypeParam": {
4095
+ let u = n.name ? r("name") : e.parent.this === n ? "this" : "";
4096
+ return [u, V(e), u ? ": " : "", r("typeAnnotation")];
4097
+ }
4098
+ case "DeclareInterface":
4099
+ case "InterfaceDeclaration":
4100
+ case "InterfaceTypeAnnotation":
4101
+ return Pn(e, t, r);
4102
+ case "ClassImplements":
4103
+ case "InterfaceExtends":
4104
+ return [r("id"), r("typeParameters")];
4105
+ case "NullableTypeAnnotation":
4106
+ return ["?", r("typeAnnotation")];
4107
+ case "Variance": {
4108
+ let { kind: u } = n;
4109
+ return ln.ok(u === "plus" || u === "minus"), u === "plus" ? "+" : "-";
4110
+ }
4111
+ case "KeyofTypeAnnotation":
4112
+ return ["keyof ", r("argument")];
4113
+ case "ObjectTypeCallProperty":
4114
+ return [n.static ? "static " : "", r("value")];
4115
+ case "ObjectTypeMappedTypeProperty":
4116
+ return zi(e, t, r);
4117
+ case "ObjectTypeIndexer":
4118
+ return [n.static ? "static " : "", n.variance ? r("variance") : "", "[", r("id"), n.id ? ": " : "", r("key"), "]: ", r("value")];
4119
+ case "ObjectTypeProperty": {
4120
+ let u = "";
4121
+ return n.proto ? u = "proto " : n.static && (u = "static "), [u, n.kind !== "init" ? n.kind + " " : "", n.variance ? r("variance") : "", Et(e, t, r), V(e), gt(n) ? "" : ": ", r("value")];
4122
+ }
4123
+ case "ObjectTypeAnnotation":
4124
+ return dt(e, t, r);
4125
+ case "ObjectTypeInternalSlot":
4126
+ return [n.static ? "static " : "", "[[", r("id"), "]]", V(e), n.method ? "" : ": ", r("value")];
4127
+ case "ObjectTypeSpreadProperty":
4128
+ return cn(e, r);
4129
+ case "QualifiedTypeofIdentifier":
4130
+ case "QualifiedTypeIdentifier":
4131
+ return [r("qualification"), ".", r("id")];
4132
+ case "NullLiteralTypeAnnotation":
4133
+ return "null";
4134
+ case "BooleanLiteralTypeAnnotation":
4135
+ return String(n.value);
4136
+ case "StringLiteralTypeAnnotation":
4137
+ return Ie(tt(fe(n), t));
4138
+ case "NumberLiteralTypeAnnotation":
4139
+ return Ze((_b = n.raw) != null ? _b : n.extra.raw);
4140
+ case "BigIntLiteralTypeAnnotation":
4141
+ return hn((_c2 = n.raw) != null ? _c2 : n.extra.raw);
4142
+ case "TypeCastExpression":
4143
+ return ["(", r("expression"), Y(e, r), ")"];
4144
+ case "TypePredicate":
4145
+ return on(e, r);
4146
+ case "TypeOperator":
4147
+ return [n.operator, " ", r("typeAnnotation")];
4148
+ case "TypeParameterDeclaration":
4149
+ case "TypeParameterInstantiation":
4150
+ return Pt(e, t, r, "params");
4151
+ case "InferredPredicate":
4152
+ case "DeclaredPredicate":
4153
+ return [e.key === "predicate" && e.parent.type !== "DeclareFunction" && !e.parent.returnType ? ": " : " ", "%checks", ...n.type === "DeclaredPredicate" ? ["(", r("value"), ")"] : []];
4154
+ case "AsExpression":
4155
+ case "AsConstExpression":
4156
+ case "SatisfiesExpression":
4157
+ return Sn(e, t, r);
4158
+ }
4159
+ }
4160
+ function ka(e, t, r) {
4161
+ var _a2;
4162
+ var i;
4163
+ let { node: n } = e;
4164
+ if (!n.type.startsWith("TS")) return;
4165
+ if (Br(n)) return n.type.slice(2, -7).toLowerCase();
4166
+ let s = t.semi ? ";" : "", u = [];
4167
+ switch (n.type) {
4168
+ case "TSThisType":
4169
+ return "this";
4170
+ case "TSTypeAssertion": {
4171
+ let a = !(U(n.expression) || se(n.expression)), o = l(["<", f([E, r("typeAnnotation")]), E, ">"]), c = [b("("), f([E, r("expression")]), E, b(")")];
4172
+ return a ? ze([[o, r("expression")], [o, l(c, { shouldBreak: true })], [o, r("expression")]]) : l([o, r("expression")]);
4173
+ }
4174
+ case "TSDeclareFunction":
4175
+ return Dn(e, r, t);
4176
+ case "TSExportAssignment":
4177
+ return ["export = ", r("expression"), s];
4178
+ case "TSModuleBlock":
4179
+ return Fn(e, t, r);
4180
+ case "TSInterfaceBody":
4181
+ case "TSTypeLiteral":
4182
+ return dt(e, t, r);
4183
+ case "TSTypeAliasDeclaration":
4184
+ return Kr(e, t, r);
4185
+ case "TSQualifiedName":
4186
+ return [r("left"), ".", r("right")];
4187
+ case "TSAbstractMethodDefinition":
4188
+ case "TSDeclareMethod":
4189
+ return dn(e, t, r);
4190
+ case "TSAbstractAccessorProperty":
4191
+ case "TSAbstractPropertyDefinition":
4192
+ return xn(e, t, r);
4193
+ case "TSInterfaceHeritage":
4194
+ case "TSClassImplements":
4195
+ case "TSExpressionWithTypeArguments":
4196
+ case "TSInstantiationExpression":
4197
+ return [r("expression"), r(n.typeArguments ? "typeArguments" : "typeParameters")];
4198
+ case "TSTemplateLiteralType":
4199
+ return qr(e, r, t);
4200
+ case "TSNamedTupleMember":
4201
+ return nn(e, t, r);
4202
+ case "TSRestType":
4203
+ return rn(e, t, r);
4204
+ case "TSOptionalType":
4205
+ return [r("typeAnnotation"), "?"];
4206
+ case "TSInterfaceDeclaration":
4207
+ return Pn(e, t, r);
4208
+ case "TSTypeParameterDeclaration":
4209
+ case "TSTypeParameterInstantiation":
4210
+ return Pt(e, t, r, "params");
4211
+ case "TSTypeParameter":
4212
+ return An(e, t, r);
4213
+ case "TSAsExpression":
4214
+ case "TSSatisfiesExpression":
4215
+ return Sn(e, t, r);
4216
+ case "TSArrayType":
4217
+ return un(r);
4218
+ case "TSPropertySignature":
4219
+ return [n.readonly ? "readonly " : "", Et(e, t, r), V(e), Y(e, r)];
4220
+ case "TSParameterProperty":
4221
+ return [Xt(n), n.static ? "static " : "", n.override ? "override " : "", n.readonly ? "readonly " : "", r("parameter")];
4222
+ case "TSTypeQuery":
4223
+ return an(e, r);
4224
+ case "TSIndexSignature": {
4225
+ let a = n.parameters.length > 1 ? b(ae(t) ? "," : "") : "", o = l([f([E, P([", ", E], e.map(r, "parameters"))]), a, E]), c = e.parent.type === "ClassBody" && e.key === "body";
4226
+ return [c && n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? o : "", "]", Y(e, r), c ? s : ""];
4227
+ }
4228
+ case "TSTypePredicate":
4229
+ return on(e, r);
4230
+ case "TSNonNullExpression":
4231
+ return [r("expression"), "!"];
4232
+ case "TSImportType":
4233
+ return [n.isTypeOf ? "typeof " : "", "import(", r("argument"), ")", n.qualifier ? [".", r("qualifier")] : "", Pt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
4234
+ case "TSLiteralType":
4235
+ return r("literal");
4236
+ case "TSIndexedAccessType":
4237
+ return en(e, t, r);
4238
+ case "TSTypeOperator":
4239
+ return [n.operator, " ", r("typeAnnotation")];
4240
+ case "TSMappedType":
4241
+ return Qi(e, t, r);
4242
+ case "TSMethodSignature": {
4243
+ let a = n.kind && n.kind !== "method" ? `${n.kind} ` : "";
4244
+ u.push(Xt(n), a, n.computed ? "[" : "", r("key"), n.computed ? "]" : "", V(e));
4245
+ let o = Je(e, r, t, false, true), c = n.returnType ? "returnType" : "typeAnnotation", m = n[c], D = m ? Y(e, r, c) : "", y = ot(n, D);
4246
+ return u.push(y ? l(o) : o), m && u.push(l(D)), l(u);
4247
+ }
4248
+ case "TSNamespaceExportDeclaration":
4249
+ return ["export as namespace ", r("id"), t.semi ? ";" : ""];
4250
+ case "TSEnumDeclaration":
4251
+ return bn(e, r, t);
4252
+ case "TSEnumMember":
4253
+ return Bn(e, r);
4254
+ case "TSImportEqualsDeclaration":
4255
+ return [n.isExport ? "export " : "", "import ", ks(n, false), r("id"), " = ", r("moduleReference"), t.semi ? ";" : ""];
4256
+ case "TSExternalModuleReference":
4257
+ return ["require(", r("expression"), ")"];
4258
+ case "TSModuleDeclaration": {
4259
+ let { parent: a } = e, o = a.type === "TSModuleDeclaration", c = ((i = n.body) == null ? void 0 : i.type) === "TSModuleDeclaration";
4260
+ if (o) u.push(".");
4261
+ else if (u.push($(e)), !(n.kind === "global" || n.global)) {
4262
+ let D = (_a2 = n.kind) != null ? _a2 : Q(n.id) || fr(t, R(n), R(n.id)).trim().endsWith("module") ? "module" : "namespace";
4263
+ u.push(D, " ");
4264
+ }
4265
+ return u.push(r("id")), c ? u.push(r("body")) : n.body ? u.push(" ", l(r("body"))) : u.push(s), u;
4266
+ }
4267
+ case "TSConditionalType":
4268
+ return Vt(e, t, r);
4269
+ case "TSInferType":
4270
+ return tn(e, t, r);
4271
+ case "TSIntersectionType":
4272
+ return zr(e, t, r);
4273
+ case "TSUnionType":
4274
+ return Qr(e, t, r);
4275
+ case "TSFunctionType":
4276
+ case "TSCallSignatureDeclaration":
4277
+ case "TSConstructorType":
4278
+ case "TSConstructSignatureDeclaration":
4279
+ return Zr(e, t, r);
4280
+ case "TSTupleType":
4281
+ return Yt(e, t, r);
4282
+ case "TSTypeReference":
4283
+ return [r("typeName"), Pt(e, t, r, n.typeArguments ? "typeArguments" : "typeParameters")];
4284
+ case "TSTypeAnnotation":
4285
+ return sn(e, t, r);
4286
+ case "TSEmptyBodyFunctionExpression":
4287
+ return fn(e, t, r);
4288
+ case "TSJSDocAllType":
4289
+ return "*";
4290
+ case "TSJSDocUnknownType":
4291
+ return "?";
4292
+ case "TSJSDocNullableType":
4293
+ return Ts(e, r, "?");
4294
+ case "TSJSDocNonNullableType":
4295
+ return Ts(e, r, "!");
4296
+ case "TSParenthesizedType":
4297
+ default:
4298
+ throw new Me(n, "TypeScript");
4299
+ }
4300
+ }
4301
+ function Hl(e, t, r, n) {
4302
+ if (Xr(e)) return ci(e, t);
4303
+ for (let s of [Ti, Ei, Pa, ka, Ca]) {
4304
+ let u = s(e, t, r, n);
4305
+ if (u !== void 0) return u;
4306
+ }
4307
+ }
4308
+ var Vl = v(["ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "ClassPrivateProperty", "MethodDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod"]);
4309
+ function $l(e, t, r, n) {
4310
+ var D;
4311
+ e.isRoot && ((D = t.__onHtmlBindingRoot) == null || D.call(t, e.node, t));
4312
+ let s = Hl(e, t, r, n);
4313
+ if (!s) return "";
4314
+ let { node: u } = e;
4315
+ if (Vl(u)) return s;
4316
+ let i = w(u.decorators), a = xi(e, t, r), o = u.type === "ClassExpression";
4317
+ if (i && !o) return ir(s, (y) => l([a, y]));
4318
+ let c = Be(e, t), m = na(e, t);
4319
+ return !a && !c && !m ? s : ir(s, (y) => [m ? ";" : "", c ? "(" : "", c && o && i ? [f([x, a, y]), x] : [a, y], c ? ")" : ""]);
4320
+ }
4321
+ var Ia = $l;
4322
+ var Kl = { avoidAstMutation: true };
4323
+ var La = [{ linguistLanguageId: 174, name: "JSON.stringify", type: "data", color: "#292929", tmScope: "source.json", aceMode: "json", codemirrorMode: "javascript", codemirrorMimeType: "application/json", aliases: ["geojson", "jsonl", "topojson"], extensions: [".importmap"], filenames: ["package.json", "package-lock.json", "composer.json"], parsers: ["json-stringify"], vscodeLanguageIds: ["json"] }, { linguistLanguageId: 174, name: "JSON", type: "data", color: "#292929", tmScope: "source.json", aceMode: "json", codemirrorMode: "javascript", codemirrorMimeType: "application/json", aliases: ["geojson", "jsonl", "topojson"], extensions: [".json", ".4DForm", ".4DProject", ".avsc", ".geojson", ".gltf", ".har", ".ice", ".JSON-tmLanguage", ".mcmeta", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest", ".yy", ".yyp"], filenames: [".all-contributorsrc", ".arcconfig", ".auto-changelog", ".c8rc", ".htmlhintrc", ".imgbotconfig", ".nycrc", ".tern-config", ".tern-project", ".watchmanconfig", "Pipfile.lock", "composer.lock", "flake.lock", "mcmod.info", ".babelrc", ".jscsrc", ".jshintrc", ".jslintrc", ".swcrc"], parsers: ["json"], vscodeLanguageIds: ["json"] }, { linguistLanguageId: 423, name: "JSON with Comments", type: "data", color: "#292929", group: "JSON", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", aliases: ["jsonc"], extensions: [".jsonc", ".code-snippets", ".code-workspace", ".sublime-build", ".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: [], parsers: ["jsonc"], vscodeLanguageIds: ["jsonc"] }, { linguistLanguageId: 175, name: "JSON5", type: "data", color: "#267CB9", extensions: [".json5"], tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "application/json", parsers: ["json5"], vscodeLanguageIds: ["json5"] }];
4324
+ var Os = {};
4325
+ Ar(Os, { getVisitorKeys: () => Oa, massageAstNode: () => ja, print: () => Zl });
4326
+ var zl = { JsonRoot: ["node"], ArrayExpression: ["elements"], ObjectExpression: ["properties"], ObjectProperty: ["key", "value"], UnaryExpression: ["argument"], NullLiteral: [], BooleanLiteral: [], StringLiteral: [], NumericLiteral: [], Identifier: [], TemplateLiteral: ["quasis"], TemplateElement: [] };
4327
+ var wa = zl;
4328
+ var Ql = hr(wa);
4329
+ var Oa = Ql;
4330
+ function Zl(e, t, r) {
4331
+ let { node: n } = e;
4332
+ switch (n.type) {
4333
+ case "JsonRoot":
4334
+ return [r("node"), F];
4335
+ case "ArrayExpression": {
4336
+ if (n.elements.length === 0) return "[]";
4337
+ let s = e.map(() => e.node === null ? "null" : r(), "elements");
4338
+ return ["[", f([F, P([",", F], s)]), F, "]"];
4339
+ }
4340
+ case "ObjectExpression":
4341
+ return n.properties.length === 0 ? "{}" : ["{", f([F, P([",", F], e.map(r, "properties"))]), F, "}"];
4342
+ case "ObjectProperty":
4343
+ return [r("key"), ": ", r("value")];
4344
+ case "UnaryExpression":
4345
+ return [n.operator === "+" ? "" : n.operator, r("argument")];
4346
+ case "NullLiteral":
4347
+ return "null";
4348
+ case "BooleanLiteral":
4349
+ return n.value ? "true" : "false";
4350
+ case "StringLiteral":
4351
+ return JSON.stringify(n.value);
4352
+ case "NumericLiteral":
4353
+ return _a(e) ? JSON.stringify(String(n.value)) : JSON.stringify(n.value);
4354
+ case "Identifier":
4355
+ return _a(e) ? JSON.stringify(n.name) : n.name;
4356
+ case "TemplateLiteral":
4357
+ return r(["quasis", 0]);
4358
+ case "TemplateElement":
4359
+ return JSON.stringify(n.value.cooked);
4360
+ default:
4361
+ throw new Me(n, "JSON");
4362
+ }
4363
+ }
4364
+ function _a(e) {
4365
+ return e.key === "key" && e.parent.type === "ObjectProperty";
4366
+ }
4367
+ var em = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]);
4368
+ function ja(e, t) {
4369
+ let { type: r } = e;
4370
+ if (r === "ObjectProperty") {
4371
+ let { key: n } = e;
4372
+ n.type === "Identifier" ? t.key = { type: "StringLiteral", value: n.name } : n.type === "NumericLiteral" && (t.key = { type: "StringLiteral", value: String(n.value) });
4373
+ return;
4374
+ }
4375
+ if (r === "UnaryExpression" && e.operator === "+") return t.argument;
4376
+ if (r === "ArrayExpression") {
4377
+ for (let [n, s] of e.elements.entries()) s === null && t.elements.splice(n, 0, { type: "NullLiteral" });
4378
+ return;
4379
+ }
4380
+ if (r === "TemplateLiteral") return { type: "StringLiteral", value: e.quasis[0].value.cooked };
4381
+ }
4382
+ ja.ignoredProperties = em;
4383
+ var Er = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, 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." } };
4384
+ var kt = "JavaScript";
4385
+ var tm = { arrowParens: { category: kt, 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: Er.bracketSameLine, bracketSpacing: Er.bracketSpacing, jsxBracketSameLine: { category: kt, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { category: kt, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, experimentalTernaries: { category: kt, 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: Er.singleQuote, jsxSingleQuote: { category: kt, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { category: kt, 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: kt, 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: Er.singleAttributePerLine };
4386
+ var va = tm;
4387
+ var rm = { estree: ws, "estree-json": Os };
4388
+ var nm = [...Us, ...La];
4389
+ var $d = _s;
4390
+ export {
4391
+ $d as default,
4392
+ nm as languages,
4393
+ va as options,
4394
+ rm as printers
4395
+ };
4396
+ //# sourceMappingURL=estree-67ZCSSSI.mjs.map