@rexeus/typeweaver 0.0.1

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