prettier-plugin-embed 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +56 -0
  2. package/dist/embedded/css/language.d.ts +1 -1
  3. package/dist/embedded/es/language.d.ts +1 -1
  4. package/dist/embedded/es/options.d.ts +1 -1
  5. package/dist/embedded/glsl/language.d.ts +1 -1
  6. package/dist/embedded/graphql/language.d.ts +1 -1
  7. package/dist/embedded/html/language.d.ts +1 -1
  8. package/dist/embedded/ini/language.d.ts +1 -1
  9. package/dist/embedded/java/embedder.d.ts +12 -0
  10. package/dist/embedded/java/index.d.ts +3 -0
  11. package/dist/embedded/java/language.d.ts +9 -0
  12. package/dist/embedded/java/options.d.ts +38 -0
  13. package/dist/embedded/json/language.d.ts +1 -1
  14. package/dist/embedded/jsonata/embedder.d.ts +12 -0
  15. package/dist/embedded/jsonata/index.d.ts +3 -0
  16. package/dist/embedded/jsonata/language.d.ts +9 -0
  17. package/dist/embedded/jsonata/options.d.ts +33 -0
  18. package/dist/embedded/latex/language.d.ts +1 -1
  19. package/dist/embedded/markdown/language.d.ts +1 -1
  20. package/dist/embedded/nginx/embedder.d.ts +12 -0
  21. package/dist/embedded/nginx/index.d.ts +3 -0
  22. package/dist/embedded/nginx/language.d.ts +9 -0
  23. package/dist/embedded/nginx/options.d.ts +34 -0
  24. package/dist/embedded/noop/language.d.ts +1 -1
  25. package/dist/embedded/pegjs/embedder.d.ts +12 -0
  26. package/dist/embedded/pegjs/index.d.ts +3 -0
  27. package/dist/embedded/pegjs/language.d.ts +9 -0
  28. package/dist/embedded/pegjs/options.d.ts +36 -0
  29. package/dist/embedded/php/language.d.ts +1 -1
  30. package/dist/embedded/prisma/embedder.d.ts +12 -0
  31. package/dist/embedded/prisma/index.d.ts +3 -0
  32. package/dist/embedded/prisma/language.d.ts +9 -0
  33. package/dist/embedded/prisma/options.d.ts +33 -0
  34. package/dist/embedded/properties/language.d.ts +1 -1
  35. package/dist/embedded/pug/embedder.d.ts +12 -0
  36. package/dist/embedded/pug/index.d.ts +3 -0
  37. package/dist/embedded/pug/language.d.ts +9 -0
  38. package/dist/embedded/pug/options.d.ts +60 -0
  39. package/dist/embedded/register.d.ts +23 -17
  40. package/dist/embedded/ruby/language.d.ts +1 -1
  41. package/dist/embedded/sh/language.d.ts +1 -1
  42. package/dist/embedded/sql/language.d.ts +1 -1
  43. package/dist/embedded/toml/language.d.ts +1 -1
  44. package/dist/embedded/ts/language.d.ts +1 -1
  45. package/dist/embedded/ts/options.d.ts +1 -1
  46. package/dist/embedded/utils.d.ts +2 -2
  47. package/dist/embedded/xml/language.d.ts +1 -1
  48. package/dist/embedded/yaml/language.d.ts +1 -1
  49. package/dist/index.js +1275 -1043
  50. package/dist/options.d.ts +73 -19
  51. package/dist/types.d.ts +1 -1
  52. package/dist/utils.d.ts +1 -1
  53. package/package.json +19 -9
package/dist/index.js CHANGED
@@ -1,184 +1,187 @@
1
- import { utils as Y, builders as I } from "prettier/doc";
2
- import wt from "prettier/parser-babel";
3
- import Bt from "prettier/parser-espree";
4
- import Ut from "prettier/parser-flow";
5
- import qt from "prettier/parser-meriyah";
6
- import Ct from "prettier/parser-typescript";
7
- import { printers as Wt } from "prettier/plugins/estree.mjs";
8
- import { readFile as Gt } from "node:fs/promises";
9
- import { isAbsolute as zt, dirname as Kt, resolve as Ht, extname as Jt } from "node:path";
10
- import { Worker as Xt } from "node:worker_threads";
11
- import { resolveConfigFile as Yt } from "prettier";
12
- const { group: Qt, indent: Vt, softline: le, lineSuffixBoundary: Zt } = I, { mapDoc: en } = Y;
13
- function tn(t, n) {
14
- const { node: r } = t;
15
- let e = n();
16
- return r?.comments?.length && (e = Qt([Vt([le, e]), le])), ["${", e, Zt, "}"];
1
+ import { builders as $, utils as Bt } from "prettier/doc";
2
+ import hn from "prettier/parser-babel";
3
+ import fn from "prettier/parser-espree";
4
+ import bn from "prettier/parser-flow";
5
+ import En from "prettier/parser-meriyah";
6
+ import _n from "prettier/parser-typescript";
7
+ import { printers as yn } from "prettier/plugins/estree.mjs";
8
+ import { readFile as vn } from "node:fs/promises";
9
+ import { isAbsolute as $n, dirname as In, resolve as Dn, extname as Tn } from "node:path";
10
+ import { Worker as xn } from "node:worker_threads";
11
+ import { resolveConfigFile as Sn } from "prettier";
12
+ const { group: Ln, indent: kn, softline: he, hardline: On, lineSuffixBoundary: An } = $, { mapDoc: Mn } = Bt;
13
+ function Pn(e, t) {
14
+ const { node: n } = e;
15
+ let r = t();
16
+ return n?.comments?.length && (r = Ln([kn([he, r]), he])), ["${", r, An, "}"];
17
17
  }
18
- function S(t, n) {
19
- return t.map(
20
- (r) => tn(r, n),
18
+ function T(e, t) {
19
+ return e.map(
20
+ (n) => Pn(n, t),
21
21
  "expressions"
22
22
  );
23
23
  }
24
- function L(t, n, r) {
25
- return en(t, (s) => {
26
- if (typeof s != "string")
27
- return s;
28
- const o = [], l = s.split(n);
29
- for (let a = 0; a < l.length; a++) {
30
- let g = l[a];
31
- if (a % 2 == 0) {
32
- if (!g)
24
+ function D(e, t, n, r = !1) {
25
+ return Mn(e, (c) => {
26
+ if (typeof c != "string")
27
+ return c;
28
+ const o = [], d = c.split(t);
29
+ for (let p = 0; p < d.length; p++) {
30
+ let h = d[p];
31
+ if (p % 2 === 0) {
32
+ if (!h)
33
33
  continue;
34
- g = g.replaceAll(/([\\`]|\${)/g, "\\$1"), o.push(g);
34
+ if (h = h.replaceAll(/([\\`]|\${)/g, "\\$1"), r)
35
+ for (const a of h.split(/(\n)/))
36
+ a === `
37
+ ` ? o.push(On) : o.push(a);
38
+ else
39
+ o.push(h);
35
40
  } else {
36
- const c = Number(g);
37
- o.push(r[c]);
41
+ const a = Number(h);
42
+ o.push(n[a]);
38
43
  }
39
44
  }
40
45
  return o;
41
46
  });
42
47
  }
43
- function A(t, n, r) {
44
- if (!(n.plugins?.some(
45
- (e) => e.name?.match(
46
- new RegExp("(^|/)" + te(t) + "($|/)")
48
+ function k(e, t, n) {
49
+ if (!(t.plugins?.some(
50
+ (r) => r.name?.match(
51
+ new RegExp(`(^|/)${ie(e)}($|/)`)
47
52
  ) ?? !1
48
53
  ) ?? !1))
49
54
  throw new Error(
50
- `Cannot format embedded language identified by "${r}", because plugin "${t}" is not loaded.`
55
+ `Cannot format embedded language identified by "${n}", because plugin "${e}" is not loaded.`
51
56
  );
52
57
  }
53
- function nn(t, n, r) {
54
- if (n === r) {
55
- t.unshift(n);
58
+ function jn(e, t, n) {
59
+ if (t === n) {
60
+ e.unshift(t);
56
61
  return;
57
62
  }
58
- let e = 0, s = t.length;
59
- for (; e < s; ) {
60
- const o = e + s >>> 1;
61
- if (t[o] === r) {
62
- t.push(n);
63
+ let r = 0, s = e.length;
64
+ for (; r < s; ) {
65
+ const c = r + s >>> 1;
66
+ if (e[c] === n) {
67
+ e.push(t);
63
68
  return;
64
69
  }
65
- t[o] < n ? e = o + 1 : s = o;
70
+ e[c] < t ? r = c + 1 : s = c;
66
71
  }
67
- t.splice(e, 0, n);
72
+ e.splice(r, 0, t);
68
73
  }
69
- const Q = (() => {
70
- const t = [...Array(26).keys()].map((n) => String.fromCharCode(n + 97)).concat([...Array(10).keys()].map((n) => `${n}`));
74
+ const ne = (() => {
75
+ const e = [...Array(26).keys()].map((t) => String.fromCharCode(t + 97)).concat([...Array(10).keys()].map((t) => `${t}`));
71
76
  return () => {
72
- let r = "";
73
- for (let e = 0; e < 16; ++e)
74
- r += t[parseInt((Math.random() * t.length).toFixed(0), 10) % t.length];
75
- return r;
77
+ let n = "";
78
+ for (let r = 0; r < 16; ++r)
79
+ n += e[parseInt((Math.random() * e.length).toFixed(0), 10) % e.length];
80
+ return n;
76
81
  };
77
82
  })();
78
- function x(t = "p", n = "") {
79
- const r = Q(), e = Q(), s = te(t), o = te(n), l = (g) => `${t}${r}${g}${e}${n}`, a = new RegExp(
80
- `${s}${r}(\\d+)${e}${o}`,
83
+ function x(e = "p", t = "") {
84
+ const n = ne(), r = ne(), s = ie(e), c = ie(t), o = (p) => `${e}${n}${p}${r}${t}`, d = new RegExp(
85
+ `${s}${n}(\\d+)${r}${c}`,
81
86
  "ig"
82
87
  );
83
88
  return {
84
- createPlaceholder: l,
85
- placeholderRegex: a
89
+ createPlaceholder: o,
90
+ placeholderRegex: d
86
91
  };
87
92
  }
88
- function te(t) {
89
- return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
93
+ function ie(e) {
94
+ return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
90
95
  }
91
- function T(t) {
92
- return `${t}Identifiers`;
96
+ function I(e) {
97
+ return `${e}Identifiers`;
93
98
  }
94
- function rn(t) {
95
- return `${t}Plugin`;
99
+ function Nn(e) {
100
+ return `${e}Plugin`;
96
101
  }
97
- function O(t) {
98
- return `${t}Parser`;
102
+ function A(e) {
103
+ return `${e}Parser`;
99
104
  }
100
- const { line: ue, group: P, indent: ge, softline: me } = I, sn = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
101
- e = {
102
- ...e,
103
- ...o
104
- };
105
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x("@p"), c = l.quasis.map(
106
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
107
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
108
- d.length,
105
+ const { line: fe, group: M, indent: be, softline: Ee } = $, Rn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
106
+ const o = {
107
+ ...r,
108
+ ...c
109
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x("@p"), a = d.quasis.map(
110
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
111
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
112
+ l.length,
109
113
  -u.length || void 0
110
- ), E = S(r, n), b = await t(y, {
111
- ...e,
112
- parser: e.embeddedCssParser ?? "scss"
113
- }), i = L(b, g, E);
114
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
115
- return P([
114
+ ), b = T(n, t), y = await e(E, {
115
+ ...o,
116
+ parser: o.embeddedCssParser ?? "scss"
117
+ }), i = D(y, h, b);
118
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
119
+ return M([
116
120
  "`",
117
- d,
118
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [P(i)] : ge([P(i)]),
121
+ l,
122
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [M(i)] : be([M(i)]),
119
123
  u,
120
124
  "`"
121
125
  ]);
122
- const h = d.length ? ue : me, v = u.length ? ue : me;
123
- return P([
126
+ const f = l.length ? fe : Ee, v = u.length ? fe : Ee;
127
+ return M([
124
128
  "`",
125
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, P(i)] : ge([h, P(i)]),
129
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, M(i)] : be([f, M(i)]),
126
130
  v,
127
131
  "`"
128
132
  ]);
129
- }, ne = "embeddedCss", on = ["css"], an = ["css", "less", "scss"], cn = T(ne), dn = O(ne), ln = {
130
- [cn]: {
133
+ }, ae = "embeddedCss", Fn = ["css"], wn = ["css", "less", "scss"], Bn = I(ae), Un = A(ae), Wn = {
134
+ [Bn]: {
131
135
  category: "Embed",
132
136
  type: "string",
133
137
  array: !0,
134
- default: [{ value: [...on] }],
138
+ default: [{ value: [...Fn] }],
135
139
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language."
136
140
  },
137
- [dn]: {
141
+ [Un]: {
138
142
  category: "Embed",
139
143
  type: "choice",
140
144
  default: "scss",
141
145
  description: "The parser used to parse the embedded CSS language.",
142
- choices: an.map((t) => ({
143
- value: t,
144
- description: `Use the "${t}" parser.`
146
+ choices: wn.map((e) => ({
147
+ value: e,
148
+ description: `Use the "${e}" parser.`
145
149
  }))
146
150
  }
147
- }, un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151
+ }, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
148
152
  __proto__: null,
149
- embedder: sn,
150
- language: ne,
151
- options: ln
152
- }, Symbol.toStringTag, { value: "Module" })), { line: pe, group: M, indent: he, softline: fe } = I, gn = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
153
- e = {
154
- ...e,
155
- ...o
156
- };
157
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
158
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
159
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
160
- d.length,
153
+ embedder: Rn,
154
+ language: ae,
155
+ options: Wn
156
+ }, Symbol.toStringTag, { value: "Module" })), { line: _e, group: P, indent: ye, softline: ve } = $, Gn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
157
+ const o = {
158
+ ...r,
159
+ ...c
160
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
161
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
162
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
163
+ l.length,
161
164
  -u.length || void 0
162
- ), E = S(r, n), b = await t(y, {
163
- ...e,
164
- parser: e.embeddedEsParser ?? "babel"
165
- }), i = L(b, g, E);
166
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
167
- return M([
165
+ ), b = T(n, t), y = await e(E, {
166
+ ...o,
167
+ parser: o.embeddedEsParser ?? "babel"
168
+ }), i = D(y, h, b);
169
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
170
+ return P([
168
171
  "`",
169
- d,
170
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [M(i)] : he([M(i)]),
172
+ l,
173
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [P(i)] : ye([P(i)]),
171
174
  u,
172
175
  "`"
173
176
  ]);
174
- const h = d.length ? pe : fe, v = u.length ? pe : fe;
175
- return M([
177
+ const f = l.length ? _e : ve, v = u.length ? _e : ve;
178
+ return P([
176
179
  "`",
177
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, M(i)] : he([h, M(i)]),
180
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, P(i)] : ye([f, P(i)]),
178
181
  v,
179
182
  "`"
180
183
  ]);
181
- }, re = "embeddedEs", mn = [
184
+ }, ce = "embeddedEs", Cn = [
182
185
  "js",
183
186
  "jsx",
184
187
  "es",
@@ -187,324 +190,414 @@ const { line: ue, group: P, indent: ge, softline: me } = I, sn = async (t, n, r,
187
190
  "cjs",
188
191
  "pac",
189
192
  "javascript"
190
- ], pn = [
193
+ ], zn = [
191
194
  "babel",
192
195
  "babel-flow",
193
196
  "acorn",
194
197
  "espree",
195
198
  "flow",
196
199
  "meriyah"
197
- ], hn = T(re), fn = O(re), bn = {
198
- [hn]: {
200
+ ], Kn = I(ce), Jn = A(ce), Hn = {
201
+ [Kn]: {
199
202
  category: "Embed",
200
203
  type: "string",
201
204
  array: !0,
202
- default: [{ value: [...mn] }],
205
+ default: [{ value: [...Cn] }],
203
206
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
204
207
  },
205
- [fn]: {
208
+ [Jn]: {
206
209
  category: "Embed",
207
210
  type: "choice",
208
211
  default: "babel",
209
212
  description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
210
- choices: pn.map((t) => ({
211
- value: t,
212
- description: `Use the "${t}" parser.`
213
+ choices: zn.map((e) => ({
214
+ value: e,
215
+ description: `Use the "${e}" parser.`
213
216
  }))
214
217
  }
215
- }, En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
218
+ }, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
216
219
  __proto__: null,
217
- embedder: gn,
218
- language: re,
219
- options: bn
220
- }, Symbol.toStringTag, { value: "Module" })), { line: be, group: N, indent: Ee, softline: ye } = I, yn = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
221
- A("prettier-plugin-glsl", e, s), e = {
222
- ...e,
223
- ...o
224
- };
225
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
226
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
227
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
228
- d.length,
220
+ embedder: Gn,
221
+ language: ce,
222
+ options: Hn
223
+ }, Symbol.toStringTag, { value: "Module" })), { line: $e, group: j, indent: Ie, softline: De } = $, Yn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
224
+ k("prettier-plugin-glsl", r, s);
225
+ const o = {
226
+ ...r,
227
+ ...c
228
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
229
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
230
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
231
+ l.length,
229
232
  -u.length || void 0
230
- ), E = S(r, n), b = await t(y, {
231
- ...e,
233
+ ), b = T(n, t), y = await e(E, {
234
+ ...o,
232
235
  parser: "glsl-parser"
233
- }), i = L(b, g, E);
234
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
235
- return N([
236
+ }), i = D(y, h, b);
237
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
238
+ return j([
236
239
  "`",
237
- d,
238
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [N(i)] : Ee([N(i)]),
240
+ l,
241
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [j(i)] : Ie([j(i)]),
239
242
  u,
240
243
  "`"
241
244
  ]);
242
- const h = d.length ? be : ye, v = u.length ? be : ye;
243
- return N([
245
+ const f = l.length ? $e : De, v = u.length ? $e : De;
246
+ return j([
244
247
  "`",
245
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, N(i)] : Ee([h, N(i)]),
248
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, j(i)] : Ie([f, j(i)]),
246
249
  v,
247
250
  "`"
248
251
  ]);
249
- }, ft = "embeddedGlsl", _n = ["glsl", "shader"], vn = T(ft), $n = {
250
- [vn]: {
252
+ }, Ut = "embeddedGlsl", Qn = ["glsl", "shader"], Vn = I(Ut), Zn = {
253
+ [Vn]: {
251
254
  category: "Embed",
252
255
  type: "string",
253
256
  array: !0,
254
- default: [{ value: [..._n] }],
257
+ default: [{ value: [...Qn] }],
255
258
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
256
259
  }
257
- }, Dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
260
+ }, eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
258
261
  __proto__: null,
259
- embedder: yn,
260
- language: ft,
261
- options: $n
262
- }, Symbol.toStringTag, { value: "Module" })), { line: _e, group: R, indent: ve, softline: $e } = I, In = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
263
- e = {
264
- ...e,
265
- ...o
266
- };
267
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
268
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
269
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
270
- d.length,
262
+ embedder: Yn,
263
+ language: Ut,
264
+ options: Zn
265
+ }, Symbol.toStringTag, { value: "Module" })), { line: Te, group: N, indent: xe, softline: Se } = $, to = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
266
+ const o = {
267
+ ...r,
268
+ ...c
269
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
270
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
271
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
272
+ l.length,
271
273
  -u.length || void 0
272
- ), E = S(r, n), b = await t(y, {
273
- ...e,
274
+ ), b = T(n, t), y = await e(E, {
275
+ ...o,
274
276
  parser: "graphql"
275
- }), i = L(b, g, E);
276
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
277
- return R([
277
+ }), i = D(y, h, b);
278
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
279
+ return N([
278
280
  "`",
279
- d,
280
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [R(i)] : ve([R(i)]),
281
+ l,
282
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [N(i)] : xe([N(i)]),
281
283
  u,
282
284
  "`"
283
285
  ]);
284
- const h = d.length ? _e : $e, v = u.length ? _e : $e;
285
- return R([
286
+ const f = l.length ? Te : Se, v = u.length ? Te : Se;
287
+ return N([
286
288
  "`",
287
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, R(i)] : ve([h, R(i)]),
289
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, N(i)] : xe([f, N(i)]),
288
290
  v,
289
291
  "`"
290
292
  ]);
291
- }, bt = "embeddedGraphql", Tn = ["graphql", "gql"], Sn = T(bt), xn = {
292
- [Sn]: {
293
+ }, Wt = "embeddedGraphql", no = ["graphql", "gql"], oo = I(Wt), so = {
294
+ [oo]: {
293
295
  category: "Embed",
294
296
  type: "string",
295
297
  array: !0,
296
- default: [{ value: [...Tn] }],
298
+ default: [{ value: [...no] }],
297
299
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language."
298
300
  }
299
- }, Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
301
+ }, ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
300
302
  __proto__: null,
301
- embedder: In,
302
- language: bt,
303
- options: xn
304
- }, Symbol.toStringTag, { value: "Module" })), { line: De, group: F, indent: Ie, softline: Te } = I, { mapDoc: kn } = Y, An = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
305
- e = {
306
- ...e,
307
- ...o
308
- };
309
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
310
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
311
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
312
- d.length,
303
+ embedder: to,
304
+ language: Wt,
305
+ options: so
306
+ }, Symbol.toStringTag, { value: "Module" })), { line: Le, group: R, indent: ke, softline: Oe } = $, { mapDoc: io } = Bt, ao = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
307
+ const o = {
308
+ ...r,
309
+ ...c
310
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
311
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
312
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
313
+ l.length,
313
314
  -u.length || void 0
314
- ), E = S(r, n), b = await t(y, {
315
- ...e,
316
- parser: e.embeddedHtmlParser ?? "html"
317
- }), i = kn(b, (p) => {
318
- if (typeof p != "string")
319
- return p;
320
- const m = [], f = p.split(g);
321
- for (let $ = 0; $ < f.length; $++) {
322
- let _ = f[$];
323
- if ($ % 2 == 0) {
324
- if (!_)
315
+ ), b = T(n, t), y = await e(E, {
316
+ ...o,
317
+ parser: o.embeddedHtmlParser ?? "html"
318
+ }), i = io(y, (m) => {
319
+ if (typeof m != "string")
320
+ return m;
321
+ const g = [], _ = m.split(h);
322
+ for (let S = 0; S < _.length; S++) {
323
+ let L = _[S];
324
+ if (S % 2 === 0) {
325
+ if (!L)
325
326
  continue;
326
- _ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), e.__embeddedInHtml && (_ = _.replaceAll(/<\/(?=script\b)/gi, "<\\/")), m.push(_);
327
+ L = L.replaceAll(/([\\`]|\${)/g, "\\$1"), o.__embeddedInHtml && (L = L.replaceAll(/<\/(?=script\b)/gi, "<\\/")), g.push(L);
327
328
  } else {
328
- const D = Number(_);
329
- m.push(E[D]);
329
+ const O = Number(L);
330
+ g.push(b[O]);
330
331
  }
331
332
  }
332
- return m;
333
+ return g;
333
334
  });
334
- if (e.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
335
- e.htmlWhitespaceSensitivity === "css" || e.preserveEmbeddedExteriorWhitespaces?.includes(s))
336
- return F([
335
+ if (o.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
336
+ o.htmlWhitespaceSensitivity === "css" || o.preserveEmbeddedExteriorWhitespaces?.includes(s))
337
+ return R([
337
338
  "`",
338
- d,
339
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [F(i)] : Ie([F(i)]),
339
+ l,
340
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [R(i)] : ke([R(i)]),
340
341
  u,
341
342
  "`"
342
343
  ]);
343
- const h = d.length ? De : Te, v = u.length ? De : Te;
344
- return F([
344
+ const f = l.length ? Le : Oe, v = u.length ? Le : Oe;
345
+ return R([
345
346
  "`",
346
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, F(i)] : Ie([h, F(i)]),
347
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, R(i)] : ke([f, R(i)]),
347
348
  v,
348
349
  "`"
349
350
  ]);
350
- }, se = "embeddedHtml", On = ["html", "xhtml"], Pn = ["html", "vue", "angular", "lwc"], Mn = T(se), Nn = O(se), Rn = {
351
- [Mn]: {
351
+ }, de = "embeddedHtml", co = ["html", "xhtml"], lo = ["html", "vue", "angular", "lwc"], uo = I(de), po = A(de), go = {
352
+ [uo]: {
352
353
  category: "Embed",
353
354
  type: "string",
354
355
  array: !0,
355
- default: [{ value: [...On] }],
356
+ default: [{ value: [...co] }],
356
357
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language."
357
358
  },
358
- [Nn]: {
359
+ [po]: {
359
360
  category: "Embed",
360
361
  type: "choice",
361
362
  default: "html",
362
363
  description: "The parser used to parse the embedded HTML language.",
363
- choices: Pn.map((t) => ({
364
- value: t,
365
- description: `Use the "${t}" parser.`
364
+ choices: lo.map((e) => ({
365
+ value: e,
366
+ description: `Use the "${e}" parser.`
366
367
  }))
367
368
  }
368
- }, Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
369
+ }, mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
369
370
  __proto__: null,
370
- embedder: An,
371
- language: se,
372
- options: Rn
373
- }, Symbol.toStringTag, { value: "Module" })), { line: Se, group: j, indent: xe, softline: Le } = I, jn = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
374
- A("prettier-plugin-ini", e, s), e = {
375
- ...e,
376
- ...o
377
- };
378
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
379
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
380
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
381
- d.length,
371
+ embedder: ao,
372
+ language: de,
373
+ options: go
374
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ae, group: F, indent: Me, softline: Pe } = $, ho = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
375
+ k("prettier-plugin-ini", r, s);
376
+ const o = {
377
+ ...r,
378
+ ...c
379
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
380
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
381
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
382
+ l.length,
382
383
  -u.length || void 0
383
- ), E = S(r, n), b = await t(y, {
384
- ...e,
384
+ ), b = T(n, t), y = await e(E, {
385
+ ...o,
385
386
  parser: "ini"
386
- }), i = L(b, g, E);
387
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
388
- return j([
387
+ }), i = D(y, h, b);
388
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
389
+ return F([
389
390
  "`",
390
- d,
391
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [j(i)] : xe([j(i)]),
391
+ l,
392
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [F(i)] : Me([F(i)]),
392
393
  u,
393
394
  "`"
394
395
  ]);
395
- const h = d.length ? Se : Le, v = u.length ? Se : Le;
396
- return j([
396
+ const f = l.length ? Ae : Pe, v = u.length ? Ae : Pe;
397
+ return F([
397
398
  "`",
398
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, j(i)] : xe([h, j(i)]),
399
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, F(i)] : Me([f, F(i)]),
399
400
  v,
400
401
  "`"
401
402
  ]);
402
- }, Et = "embeddedIni", wn = ["ini", "cfg", "pro"], Bn = T(Et), Un = {
403
- [Bn]: {
403
+ }, qt = "embeddedIni", fo = ["ini", "cfg", "pro"], bo = I(qt), Eo = {
404
+ [bo]: {
404
405
  category: "Embed",
405
406
  type: "string",
406
407
  array: !0,
407
- default: [{ value: [...wn] }],
408
+ default: [{ value: [...fo] }],
408
409
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
409
410
  }
410
- }, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
411
+ }, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
411
412
  __proto__: null,
412
- embedder: jn,
413
- language: Et,
414
- options: Un
415
- }, Symbol.toStringTag, { value: "Module" })), { line: ke, group: w, indent: Ae, softline: Oe } = I, Cn = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
416
- e = {
417
- ...e,
418
- ...o
419
- };
420
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = Wn(), c = l.quasis.map(
421
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
422
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
423
- d.length,
413
+ embedder: ho,
414
+ language: qt,
415
+ options: Eo
416
+ }, Symbol.toStringTag, { value: "Module" })), { group: w, line: je, softline: Ne, indent: Re } = $, yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
417
+ k("prettier-plugin-java", r, s);
418
+ const o = {
419
+ ...r,
420
+ ...c
421
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
422
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
423
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
424
+ l.length,
424
425
  -u.length || void 0
425
- ), E = S(r, n), b = await t(y, {
426
- ...e,
427
- parser: e.embeddedJsonParser ?? "json"
428
- }), i = L(b, g, E);
429
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
426
+ ), b = T(n, t), y = await e(E, {
427
+ ...o,
428
+ parser: "java"
429
+ }), i = D(
430
+ y,
431
+ h,
432
+ b,
433
+ !0
434
+ );
435
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
430
436
  return w([
431
437
  "`",
432
- d,
433
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [w(i)] : Ae([w(i)]),
438
+ l,
439
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [w(i)] : Re([w(i)]),
434
440
  u,
435
441
  "`"
436
442
  ]);
437
- const h = d.length ? ke : Oe, v = u.length ? ke : Oe;
443
+ const f = l.length ? je : Ne, v = u.length ? je : Ne;
438
444
  return w([
439
445
  "`",
440
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, w(i)] : Ae([h, w(i)]),
446
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, w(i)] : Re([f, w(i)]),
447
+ v,
448
+ "`"
449
+ ]);
450
+ }, Gt = "embeddedJava", vo = ["java"], $o = I(Gt), Io = {
451
+ [$o]: {
452
+ category: "Embed",
453
+ type: "string",
454
+ array: !0,
455
+ default: [{ value: [...vo] }],
456
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
457
+ }
458
+ }, Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
459
+ __proto__: null,
460
+ embedder: yo,
461
+ language: Gt,
462
+ options: Io
463
+ }, Symbol.toStringTag, { value: "Module" })), { line: Fe, group: B, indent: we, softline: Be } = $, To = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
464
+ const o = {
465
+ ...r,
466
+ ...c
467
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = xo(), a = d.quasis.map(
468
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
469
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
470
+ l.length,
471
+ -u.length || void 0
472
+ ), b = T(n, t), y = await e(E, {
473
+ ...o,
474
+ parser: o.embeddedJsonParser ?? "json"
475
+ }), i = D(y, h, b);
476
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
477
+ return B([
478
+ "`",
479
+ l,
480
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [B(i)] : we([B(i)]),
481
+ u,
482
+ "`"
483
+ ]);
484
+ const f = l.length ? Fe : Be, v = u.length ? Fe : Be;
485
+ return B([
486
+ "`",
487
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, B(i)] : we([f, B(i)]),
441
488
  v,
442
489
  "`"
443
490
  ]);
444
491
  };
445
- function Wn() {
446
- const t = Q(), n = Q(), r = (s) => `'0${t}${s}${n}'`, e = new RegExp(
447
- `["']?0${t}(\\d+)${n}['"]?`,
492
+ function xo() {
493
+ const e = ne(), t = ne(), n = (s) => `'0${e}${s}${t}'`, r = new RegExp(
494
+ `["']?0${e}(\\d+)${t}['"]?`,
448
495
  "ig"
449
496
  );
450
497
  return {
451
- createPlaceholder: r,
452
- placeholderRegex: e
498
+ createPlaceholder: n,
499
+ placeholderRegex: r
453
500
  };
454
501
  }
455
- const oe = "embeddedJson", Gn = ["json", "jsonl"], zn = ["json", "json5", "jsonc", "json-stringify"], Kn = O(oe), Hn = T(oe), Jn = {
456
- [Hn]: {
502
+ const le = "embeddedJson", So = ["json", "jsonl"], Lo = ["json", "json5", "jsonc", "json-stringify"], ko = A(le), Oo = I(le), Ao = {
503
+ [Oo]: {
457
504
  category: "Embed",
458
505
  type: "string",
459
506
  array: !0,
460
- default: [{ value: [...Gn] }],
507
+ default: [{ value: [...So] }],
461
508
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language."
462
509
  },
463
- [Kn]: {
510
+ [ko]: {
464
511
  category: "Embed",
465
512
  type: "choice",
466
513
  default: "json",
467
514
  description: "The parser used to parse the embedded JSON language.",
468
- choices: zn.map((t) => ({
469
- value: t,
470
- description: `Use the "${t}" parser.`
515
+ choices: Lo.map((e) => ({
516
+ value: e,
517
+ description: `Use the "${e}" parser.`
471
518
  }))
472
519
  }
473
- }, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
520
+ }, Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
474
521
  __proto__: null,
475
- embedder: Cn,
476
- language: oe,
477
- options: Jn
478
- }, Symbol.toStringTag, { value: "Module" })), { line: Pe, group: B, indent: Me, softline: Ne } = I, Yn = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
479
- A("prettier-plugin-latex", e, s), e = {
480
- ...e,
481
- ...o
482
- };
483
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
484
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
485
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
486
- d.length,
522
+ embedder: To,
523
+ language: le,
524
+ options: Ao
525
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ue, group: U, indent: We, softline: qe } = $, Po = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
526
+ k(
527
+ "@stedi/prettier-plugin-jsonata",
528
+ r,
529
+ s
530
+ );
531
+ const o = {
532
+ ...r,
533
+ ...c
534
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x("$p"), a = d.quasis.map(
535
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
536
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
537
+ l.length,
538
+ -u.length || void 0
539
+ ), b = T(n, t), y = await e(E, {
540
+ ...o,
541
+ parser: "JSONata"
542
+ }), i = D(y, h, b);
543
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
544
+ return U([
545
+ "`",
546
+ l,
547
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [U(i)] : We([U(i)]),
548
+ u,
549
+ "`"
550
+ ]);
551
+ const f = l.length ? Ue : qe, v = u.length ? Ue : qe;
552
+ return U([
553
+ "`",
554
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, U(i)] : We([f, U(i)]),
555
+ v,
556
+ "`"
557
+ ]);
558
+ }, Ct = "embeddedJsonata", jo = ["jsonata"], No = I(Ct), Ro = {
559
+ [No]: {
560
+ category: "Embed",
561
+ type: "string",
562
+ array: !0,
563
+ default: [{ value: [...jo] }],
564
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
565
+ }
566
+ }, Fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
567
+ __proto__: null,
568
+ embedder: Po,
569
+ language: Ct,
570
+ options: Ro
571
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ge, group: W, indent: Ce, softline: ze } = $, wo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
572
+ k("prettier-plugin-latex", r, s);
573
+ const o = {
574
+ ...r,
575
+ ...c
576
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
577
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
578
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
579
+ l.length,
487
580
  -u.length || void 0
488
- ), E = S(r, n), b = await t(y, {
489
- ...e,
581
+ ), b = T(n, t), y = await e(E, {
582
+ ...o,
490
583
  parser: "latex-parser"
491
- }), i = L(b, g, E);
492
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
493
- return B([
584
+ }), i = D(y, h, b);
585
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
586
+ return W([
494
587
  "`",
495
- d,
496
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [B(i)] : Me([B(i)]),
588
+ l,
589
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [W(i)] : Ce([W(i)]),
497
590
  u,
498
591
  "`"
499
592
  ]);
500
- const h = d.length ? Pe : Ne, v = u.length ? Pe : Ne;
501
- return B([
593
+ const f = l.length ? Ge : ze, v = u.length ? Ge : ze;
594
+ return W([
502
595
  "`",
503
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, B(i)] : Me([h, B(i)]),
596
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, W(i)] : Ce([f, W(i)]),
504
597
  v,
505
598
  "`"
506
599
  ]);
507
- }, yt = "embeddedLatex", Qn = [
600
+ }, zt = "embeddedLatex", Bo = [
508
601
  "latex",
509
602
  "tex",
510
603
  "aux",
@@ -513,614 +606,746 @@ const oe = "embeddedJson", Gn = ["json", "jsonl"], zn = ["json", "json5", "jsonc
513
606
  "bib",
514
607
  "toc",
515
608
  "sty"
516
- ], Vn = T(yt), Zn = {
517
- [Vn]: {
609
+ ], Uo = I(zt), Wo = {
610
+ [Uo]: {
518
611
  category: "Embed",
519
612
  type: "string",
520
613
  array: !0,
521
- default: [{ value: [...Qn] }],
614
+ default: [{ value: [...Bo] }],
522
615
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
523
616
  }
524
- }, er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
617
+ }, qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
525
618
  __proto__: null,
526
- embedder: Yn,
527
- language: yt,
528
- options: Zn
529
- }, Symbol.toStringTag, { value: "Module" })), { line: Re, group: U, indent: Fe, softline: je } = I, tr = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
530
- e = {
531
- ...e,
532
- ...o
533
- };
534
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
535
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
536
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
537
- d.length,
619
+ embedder: wo,
620
+ language: zt,
621
+ options: Wo
622
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ke, group: q, indent: Je, softline: He } = $, Go = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
623
+ const o = {
624
+ ...r,
625
+ ...c
626
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
627
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
628
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
629
+ l.length,
538
630
  -u.length || void 0
539
- ), E = S(r, n), b = await t(y, {
540
- ...e,
541
- parser: e.embeddedMarkdownParser ?? "markdown",
631
+ ), b = T(n, t), y = await e(E, {
632
+ ...o,
633
+ parser: o.embeddedMarkdownParser ?? "markdown",
542
634
  __inJsTemplate: !0
543
- }), i = L(b, g, E);
544
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
545
- return U([
635
+ }), i = D(y, h, b);
636
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
637
+ return q([
546
638
  "`",
547
- d,
548
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [U(i)] : Fe([U(i)]),
639
+ l,
640
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [q(i)] : Je([q(i)]),
549
641
  u,
550
642
  "`"
551
643
  ]);
552
- const h = d.length ? Re : je, v = u.length ? Re : je;
553
- return U([
644
+ const f = l.length ? Ke : He, v = u.length ? Ke : He;
645
+ return q([
554
646
  "`",
555
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, U(i)] : Fe([h, U(i)]),
647
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, q(i)] : Je([f, q(i)]),
556
648
  v,
557
649
  "`"
558
650
  ]);
559
- }, ie = "embeddedMarkdown", nr = ["md", "markdown"], rr = ["markdown", "mdx", "remark"], sr = T(ie), or = O(ie), ir = {
560
- [sr]: {
651
+ }, ue = "embeddedMarkdown", Co = ["md", "markdown"], zo = ["markdown", "mdx", "remark"], Ko = I(ue), Jo = A(ue), Ho = {
652
+ [Ko]: {
561
653
  category: "Embed",
562
654
  type: "string",
563
655
  array: !0,
564
- default: [{ value: [...nr] }],
656
+ default: [{ value: [...Co] }],
565
657
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language."
566
658
  },
567
- [or]: {
659
+ [Jo]: {
568
660
  category: "Embed",
569
661
  type: "choice",
570
662
  default: "markdown",
571
663
  description: "The parser used to parse the embedded Markdown language.",
572
- choices: rr.map((t) => ({
573
- value: t,
574
- description: `Use the "${t}" parser.`
664
+ choices: zo.map((e) => ({
665
+ value: e,
666
+ description: `Use the "${e}" parser.`
575
667
  }))
576
668
  }
577
- }, ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
669
+ }, Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
578
670
  __proto__: null,
579
- embedder: tr,
580
- language: ie,
581
- options: ir
582
- }, Symbol.toStringTag, { value: "Module" })), ae = "embeddedNoop", cr = T(ae), dr = {
583
- [cr]: {
671
+ embedder: Go,
672
+ language: ue,
673
+ options: Ho
674
+ }, Symbol.toStringTag, { value: "Module" })), { line: Xe, group: G, indent: Ye, softline: Qe } = $, Yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
675
+ k("prettier-plugin-nginx", r, s);
676
+ const o = {
677
+ ...r,
678
+ ...c
679
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
680
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
681
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
682
+ l.length,
683
+ -u.length || void 0
684
+ ), b = T(n, t), y = await e(E, {
685
+ ...o,
686
+ parser: "nginx"
687
+ }), i = D(y, h, b);
688
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
689
+ return G([
690
+ "`",
691
+ l,
692
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [G(i)] : Ye([G(i)]),
693
+ u,
694
+ "`"
695
+ ]);
696
+ const f = l.length ? Xe : Qe, v = u.length ? Xe : Qe;
697
+ return G([
698
+ "`",
699
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, G(i)] : Ye([f, G(i)]),
700
+ v,
701
+ "`"
702
+ ]);
703
+ }, Kt = "embeddedNginx", Qo = ["nginx"], Vo = I(Kt), Zo = {
704
+ [Vo]: {
705
+ category: "Embed",
706
+ type: "string",
707
+ array: !0,
708
+ default: [{ value: [...Qo] }],
709
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
710
+ }
711
+ }, es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
712
+ __proto__: null,
713
+ embedder: Yo,
714
+ language: Kt,
715
+ options: Zo
716
+ }, Symbol.toStringTag, { value: "Module" })), pe = "embeddedNoop", ts = I(pe), ns = {
717
+ [ts]: {
584
718
  category: "Embed",
585
719
  type: "string",
586
720
  array: !0,
587
721
  default: [{ value: [] }],
588
722
  description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
589
723
  }
590
- }, lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
724
+ }, os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
591
725
  __proto__: null,
592
- language: ae,
593
- options: dr
594
- }, Symbol.toStringTag, { value: "Module" })), { line: we, group: q, indent: Be, softline: Ue } = I, ur = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
595
- A("@prettier/plugin-php", e, s), e = {
596
- ...e,
597
- ...o
598
- };
599
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x("$p"), c = l.quasis.map(
600
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
601
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
602
- d.length,
726
+ language: pe,
727
+ options: ns
728
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ve, group: C, indent: Ze, softline: et } = $, ss = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
729
+ k("prettier-plugin-pegjs", r, s);
730
+ const o = {
731
+ ...r,
732
+ ...c
733
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
734
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
735
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
736
+ l.length,
603
737
  -u.length || void 0
604
- ), E = S(r, n), b = await t(y, {
605
- ...e,
738
+ ), b = T(n, t), y = await e(E, {
739
+ ...o,
740
+ parser: "pegjs-parser"
741
+ }), i = D(y, h, b);
742
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
743
+ return C([
744
+ "`",
745
+ l,
746
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [C(i)] : Ze([C(i)]),
747
+ u,
748
+ "`"
749
+ ]);
750
+ const f = l.length ? Ve : et, v = u.length ? Ve : et;
751
+ return C([
752
+ "`",
753
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, C(i)] : Ze([f, C(i)]),
754
+ v,
755
+ "`"
756
+ ]);
757
+ }, Jt = "embeddedPegjs", rs = ["pegjs", "peggy", "peg"], is = I(Jt), as = {
758
+ [is]: {
759
+ category: "Embed",
760
+ type: "string",
761
+ array: !0,
762
+ default: [{ value: [...rs] }],
763
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
764
+ }
765
+ }, cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
766
+ __proto__: null,
767
+ embedder: ss,
768
+ language: Jt,
769
+ options: as
770
+ }, Symbol.toStringTag, { value: "Module" })), { line: tt, group: z, indent: nt, softline: ot } = $, ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
771
+ k("@prettier/plugin-php", r, s);
772
+ const o = {
773
+ ...r,
774
+ ...c
775
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x("$p"), a = d.quasis.map(
776
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
777
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
778
+ l.length,
779
+ -u.length || void 0
780
+ ), b = T(n, t), y = await e(E, {
781
+ ...o,
606
782
  parser: "php"
607
- }), i = L(b, g, E);
608
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
609
- return q([
783
+ }), i = D(y, h, b);
784
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
785
+ return z([
610
786
  "`",
611
- d,
612
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [q(i)] : Be([q(i)]),
787
+ l,
788
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [z(i)] : nt([z(i)]),
613
789
  u,
614
790
  "`"
615
791
  ]);
616
- const h = d.length ? we : Ue, v = u.length ? we : Ue;
617
- return q([
792
+ const f = l.length ? tt : ot, v = u.length ? tt : ot;
793
+ return z([
618
794
  "`",
619
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, q(i)] : Be([h, q(i)]),
795
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, z(i)] : nt([f, z(i)]),
620
796
  v,
621
797
  "`"
622
798
  ]);
623
- }, _t = "embeddedPhp", gr = ["php", "php5"], mr = T(_t), pr = {
624
- [mr]: {
799
+ }, Ht = "embeddedPhp", ls = ["php", "php5"], us = I(Ht), ps = {
800
+ [us]: {
625
801
  category: "Embed",
626
802
  type: "string",
627
803
  array: !0,
628
- default: [{ value: [...gr] }],
804
+ default: [{ value: [...ls] }],
629
805
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
630
806
  }
631
- }, hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
807
+ }, gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
632
808
  __proto__: null,
633
- embedder: ur,
634
- language: _t,
635
- options: pr
636
- }, Symbol.toStringTag, { value: "Module" })), { line: qe, group: C, indent: Ce, softline: We } = I, fr = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
637
- A("prettier-plugin-properties", e, s), e = {
638
- ...e,
639
- ...o
640
- };
641
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
642
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
643
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
644
- d.length,
809
+ embedder: ds,
810
+ language: Ht,
811
+ options: ps
812
+ }, Symbol.toStringTag, { value: "Module" })), { line: st, group: K, indent: rt, softline: it } = $, ms = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
813
+ k("prettier-plugin-prisma", r, s);
814
+ const o = {
815
+ ...r,
816
+ ...c
817
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
818
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
819
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
820
+ l.length,
821
+ -u.length || void 0
822
+ ), b = T(n, t), y = await e(E, {
823
+ ...o,
824
+ parser: "prisma-parse"
825
+ }), i = D(y, h, b);
826
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
827
+ return K([
828
+ "`",
829
+ l,
830
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [K(i)] : rt([K(i)]),
831
+ u,
832
+ "`"
833
+ ]);
834
+ const f = l.length ? st : it, v = u.length ? st : it;
835
+ return K([
836
+ "`",
837
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, K(i)] : rt([f, K(i)]),
838
+ v,
839
+ "`"
840
+ ]);
841
+ }, Xt = "embeddedPrisma", hs = ["prisma"], fs = I(Xt), bs = {
842
+ [fs]: {
843
+ category: "Embed",
844
+ type: "string",
845
+ array: !0,
846
+ default: [{ value: [...hs] }],
847
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
848
+ }
849
+ }, Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
850
+ __proto__: null,
851
+ embedder: ms,
852
+ language: Xt,
853
+ options: bs
854
+ }, Symbol.toStringTag, { value: "Module" })), { line: at, group: J, indent: ct, softline: dt } = $, _s = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
855
+ k("prettier-plugin-properties", r, s);
856
+ const o = {
857
+ ...r,
858
+ ...c
859
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
860
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
861
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
862
+ l.length,
645
863
  -u.length || void 0
646
- ), E = S(r, n), b = await t(y, {
647
- ...e,
864
+ ), b = T(n, t), y = await e(E, {
865
+ ...o,
648
866
  parser: "dot-properties"
649
- }), i = L(b, g, E);
650
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
651
- return C([
867
+ }), i = D(y, h, b);
868
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
869
+ return J([
652
870
  "`",
653
- d,
654
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [C(i)] : Ce([C(i)]),
871
+ l,
872
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [J(i)] : ct([J(i)]),
655
873
  u,
656
874
  "`"
657
875
  ]);
658
- const h = d.length ? qe : We, v = u.length ? qe : We;
659
- return C([
876
+ const f = l.length ? at : dt, v = u.length ? at : dt;
877
+ return J([
660
878
  "`",
661
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, C(i)] : Ce([h, C(i)]),
879
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, J(i)] : ct([f, J(i)]),
662
880
  v,
663
881
  "`"
664
882
  ]);
665
- }, vt = "embeddedProperties", br = ["properties"], Er = T(vt), yr = {
666
- [Er]: {
883
+ }, Yt = "embeddedProperties", ys = ["properties"], vs = I(Yt), $s = {
884
+ [vs]: {
667
885
  category: "Embed",
668
886
  type: "string",
669
887
  array: !0,
670
- default: [{ value: [...br] }],
888
+ default: [{ value: [...ys] }],
671
889
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
672
890
  }
673
- }, _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
891
+ }, Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
674
892
  __proto__: null,
675
- embedder: fr,
676
- language: vt,
677
- options: yr
678
- }, Symbol.toStringTag, { value: "Module" })), { line: Ge, group: W, indent: ze, softline: Ke } = I, vr = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
679
- A("@prettier/plugin-ruby", e, s), e = {
680
- ...e,
681
- ...o
682
- };
683
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
684
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
685
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
686
- d.length,
893
+ embedder: _s,
894
+ language: Yt,
895
+ options: $s
896
+ }, Symbol.toStringTag, { value: "Module" })), { group: H, line: lt, softline: ut, indent: pt } = $, Ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
897
+ k("@prettier/plugin-pug", r, s);
898
+ const o = {
899
+ ...r,
900
+ ...c
901
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
902
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
903
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
904
+ l.length,
687
905
  -u.length || void 0
688
- ), E = S(r, n), b = await t(y, {
689
- ...e,
690
- parser: e.embeddedRubyParser ?? "ruby"
691
- }), i = L(b, g, E);
692
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
693
- return W([
906
+ ), b = T(n, t), y = await e(E, {
907
+ ...o,
908
+ parser: "pug"
909
+ }), i = D(
910
+ y,
911
+ h,
912
+ b,
913
+ !0
914
+ );
915
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
916
+ return H([
694
917
  "`",
695
- d,
696
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [W(i)] : ze([W(i)]),
918
+ l,
919
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [H(i)] : pt([H(i)]),
697
920
  u,
698
921
  "`"
699
922
  ]);
700
- const h = d.length ? Ge : Ke, v = u.length ? Ge : Ke;
701
- return W([
923
+ const f = l.length ? lt : ut, v = u.length ? lt : ut;
924
+ return H([
702
925
  "`",
703
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, W(i)] : ze([h, W(i)]),
926
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, H(i)] : pt([f, H(i)]),
704
927
  v,
705
928
  "`"
706
929
  ]);
707
- }, $t = "embeddedRuby", $r = ["ruby"], Dr = ["ruby", "rbs", "haml"], Ir = "embeddedRubyParser", Tr = T($t), Sr = {
708
- [Tr]: {
930
+ }, Qt = "embeddedPug", Ts = ["pug", "jade"], xs = I(Qt), Ss = {
931
+ [xs]: {
709
932
  category: "Embed",
710
933
  type: "string",
711
934
  array: !0,
712
- default: [{ value: [...$r] }],
935
+ default: [{ value: [...Ts] }],
936
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
937
+ }
938
+ }, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
939
+ __proto__: null,
940
+ embedder: Ds,
941
+ language: Qt,
942
+ options: Ss
943
+ }, Symbol.toStringTag, { value: "Module" })), { line: gt, group: X, indent: mt, softline: ht } = $, ks = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
944
+ k("@prettier/plugin-ruby", r, s);
945
+ const o = {
946
+ ...r,
947
+ ...c
948
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
949
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
950
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
951
+ l.length,
952
+ -u.length || void 0
953
+ ), b = T(n, t), y = await e(E, {
954
+ ...o,
955
+ parser: o.embeddedRubyParser ?? "ruby"
956
+ }), i = D(y, h, b);
957
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
958
+ return X([
959
+ "`",
960
+ l,
961
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [X(i)] : mt([X(i)]),
962
+ u,
963
+ "`"
964
+ ]);
965
+ const f = l.length ? gt : ht, v = u.length ? gt : ht;
966
+ return X([
967
+ "`",
968
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, X(i)] : mt([f, X(i)]),
969
+ v,
970
+ "`"
971
+ ]);
972
+ }, Vt = "embeddedRuby", Os = ["ruby"], As = ["ruby", "rbs", "haml"], Ms = "embeddedRubyParser", Ps = I(Vt), js = {
973
+ [Ps]: {
974
+ category: "Embed",
975
+ type: "string",
976
+ array: !0,
977
+ default: [{ value: [...Os] }],
713
978
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
714
979
  },
715
- [Ir]: {
980
+ [Ms]: {
716
981
  category: "Embed",
717
982
  type: "choice",
718
983
  default: "ruby",
719
984
  description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
720
- choices: Dr.map((t) => ({
721
- value: t,
722
- description: `Use the "${t}" parser.`
985
+ choices: As.map((e) => ({
986
+ value: e,
987
+ description: `Use the "${e}" parser.`
723
988
  }))
724
989
  }
725
- }, xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
990
+ }, Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
726
991
  __proto__: null,
727
- embedder: vr,
728
- language: $t,
729
- options: Sr
730
- }, Symbol.toStringTag, { value: "Module" })), { hardline: Lr, group: G, line: He, softline: Je, indent: Xe } = I, { mapDoc: kr } = Y, Ar = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
731
- e = {
732
- ...e,
733
- ...o
734
- };
735
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
736
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
737
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
738
- d.length,
992
+ embedder: ks,
993
+ language: Vt,
994
+ options: js
995
+ }, Symbol.toStringTag, { value: "Module" })), { group: Y, line: ft, softline: bt, indent: Et } = $, Rs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
996
+ k("prettier-plugin-sh", r, s);
997
+ const o = {
998
+ ...r,
999
+ ...c
1000
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1001
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1002
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1003
+ l.length,
739
1004
  -u.length || void 0
740
- ), E = S(r, n), b = await t(y, {
741
- ...e,
1005
+ ), b = T(n, t), y = await e(E, {
1006
+ ...o,
742
1007
  parser: "sh"
743
- }), i = kr(b, (p) => {
744
- if (typeof p != "string")
745
- return p;
746
- const m = [], f = p.split(g);
747
- for (let $ = 0; $ < f.length; $++) {
748
- let _ = f[$];
749
- if ($ % 2 == 0) {
750
- if (!_)
751
- continue;
752
- _ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), _.split(/(\n)/).forEach((D) => D === `
753
- ` ? m.push(Lr) : m.push(D));
754
- } else {
755
- const D = Number(_);
756
- m.push(E[D]);
757
- }
758
- }
759
- return m;
760
- });
761
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
762
- return G([
1008
+ }), i = D(
1009
+ y,
1010
+ h,
1011
+ b,
1012
+ !0
1013
+ );
1014
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1015
+ return Y([
763
1016
  "`",
764
- d,
765
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [G(i)] : Xe([G(i)]),
1017
+ l,
1018
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [Y(i)] : Et([Y(i)]),
766
1019
  u,
767
1020
  "`"
768
1021
  ]);
769
- const h = d.length ? He : Je, v = u.length ? He : Je;
770
- return G([
1022
+ const f = l.length ? ft : bt, v = u.length ? ft : bt;
1023
+ return Y([
771
1024
  "`",
772
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, G(i)] : Xe([h, G(i)]),
1025
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Y(i)] : Et([f, Y(i)]),
773
1026
  v,
774
1027
  "`"
775
1028
  ]);
776
- }, Dt = "embeddedSh", Or = ["sh"], Pr = T(Dt), Mr = {
777
- [Pr]: {
1029
+ }, Zt = "embeddedSh", Fs = ["sh"], ws = I(Zt), Bs = {
1030
+ [ws]: {
778
1031
  category: "Embed",
779
1032
  type: "string",
780
1033
  array: !0,
781
- default: [{ value: [...Or] }],
1034
+ default: [{ value: [...Fs] }],
782
1035
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
783
1036
  }
784
- }, Nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1037
+ }, Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
785
1038
  __proto__: null,
786
- embedder: Ar,
787
- language: Dt,
788
- options: Mr
1039
+ embedder: Rs,
1040
+ language: Zt,
1041
+ options: Bs
789
1042
  }, Symbol.toStringTag, { value: "Module" }));
790
- function Ye(t, n) {
791
- var r = Object.keys(t);
1043
+ function _t(e, t) {
1044
+ var n = Object.keys(e);
792
1045
  if (Object.getOwnPropertySymbols) {
793
- var e = Object.getOwnPropertySymbols(t);
794
- n && (e = e.filter(function(s) {
795
- return Object.getOwnPropertyDescriptor(t, s).enumerable;
796
- })), r.push.apply(r, e);
1046
+ var r = Object.getOwnPropertySymbols(e);
1047
+ t && (r = r.filter(function(s) {
1048
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
1049
+ })), n.push.apply(n, r);
797
1050
  }
798
- return r;
1051
+ return n;
799
1052
  }
800
- function Qe(t) {
801
- for (var n = 1; n < arguments.length; n++) {
802
- var r = arguments[n] != null ? arguments[n] : {};
803
- n % 2 ? Ye(Object(r), !0).forEach(function(e) {
804
- Rr(t, e, r[e]);
805
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ye(Object(r)).forEach(function(e) {
806
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
1053
+ function yt(e) {
1054
+ for (var t = 1; t < arguments.length; t++) {
1055
+ var n = arguments[t] != null ? arguments[t] : {};
1056
+ t % 2 ? _t(Object(n), !0).forEach(function(r) {
1057
+ Ws(e, r, n[r]);
1058
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _t(Object(n)).forEach(function(r) {
1059
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
807
1060
  });
808
1061
  }
809
- return t;
1062
+ return e;
810
1063
  }
811
- function Rr(t, n, r) {
812
- return n = Fr(n), n in t ? Object.defineProperty(t, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = r, t;
1064
+ function Ws(e, t, n) {
1065
+ return t = qs(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
813
1066
  }
814
- function Fr(t) {
815
- var n = jr(t, "string");
816
- return typeof n == "symbol" ? n : String(n);
1067
+ function qs(e) {
1068
+ var t = Gs(e, "string");
1069
+ return typeof t == "symbol" ? t : String(t);
817
1070
  }
818
- function jr(t, n) {
819
- if (typeof t != "object" || t === null)
820
- return t;
821
- var r = t[Symbol.toPrimitive];
822
- if (r !== void 0) {
823
- var e = r.call(t, n || "default");
824
- if (typeof e != "object")
825
- return e;
1071
+ function Gs(e, t) {
1072
+ if (typeof e != "object" || e === null)
1073
+ return e;
1074
+ var n = e[Symbol.toPrimitive];
1075
+ if (n !== void 0) {
1076
+ var r = n.call(e, t || "default");
1077
+ if (typeof r != "object")
1078
+ return r;
826
1079
  throw new TypeError("@@toPrimitive must return a primitive value.");
827
1080
  }
828
- return (n === "string" ? String : Number)(t);
1081
+ return (t === "string" ? String : Number)(e);
829
1082
  }
830
- const wr = It({});
831
- function It(t) {
832
- return n.withOptions = (r) => It(Qe(Qe({}, t), r)), n;
833
- function n(r, ...e) {
834
- const s = typeof r == "string" ? [r] : r.raw, {
835
- escapeSpecialCharacters: o = Array.isArray(r)
836
- } = t;
837
- let l = "";
838
- for (let c = 0; c < s.length; c++) {
839
- let d = s[c];
840
- o && (d = d.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), l += d, c < e.length && (l += e[c]);
1083
+ const Cs = en({});
1084
+ function en(e) {
1085
+ return t.withOptions = (n) => en(yt(yt({}, e), n)), t;
1086
+ function t(n, ...r) {
1087
+ const s = typeof n == "string" ? [n] : n.raw, {
1088
+ escapeSpecialCharacters: c = Array.isArray(n)
1089
+ } = e;
1090
+ let o = "";
1091
+ for (let h = 0; h < s.length; h++) {
1092
+ let a = s[h];
1093
+ c && (a = a.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), o += a, h < r.length && (o += r[h]);
841
1094
  }
842
- const a = l.split(`
1095
+ const d = o.split(`
843
1096
  `);
844
- let g = null;
845
- for (const c of a) {
846
- const d = c.match(/^(\s+)\S+/);
847
- if (d) {
848
- const u = d[1].length;
849
- g ? g = Math.min(g, u) : g = u;
1097
+ let p = null;
1098
+ for (const h of d) {
1099
+ const a = h.match(/^(\s+)\S+/);
1100
+ if (a) {
1101
+ const l = a[1].length;
1102
+ p ? p = Math.min(p, l) : p = l;
850
1103
  }
851
1104
  }
852
- if (g !== null) {
853
- const c = g;
854
- l = a.map((d) => d[0] === " " || d[0] === " " ? d.slice(c) : d).join(`
1105
+ if (p !== null) {
1106
+ const h = p;
1107
+ o = d.map((a) => a[0] === " " || a[0] === " " ? a.slice(h) : a).join(`
855
1108
  `);
856
1109
  }
857
- return l.trim().replace(/\\n/g, `
1110
+ return o.trim().replace(/\\n/g, `
858
1111
  `);
859
1112
  }
860
1113
  }
861
- const { hardline: Br, group: z, line: Ve, softline: Ze, indent: et } = I, { mapDoc: Ur } = Y, qr = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
862
- e = {
863
- ...e,
864
- ...o
865
- };
866
- const l = e.embeddedSqlPlugin ?? "prettier-plugin-sql";
867
- A(l, e, s);
868
- const { node: a } = r, { createPlaceholder: g, placeholderRegex: c } = x(), d = a.quasis.map(
869
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + g(m)
870
- ).join(""), u = d.match(/^\s+/)?.[0] ?? "", y = d.match(/\s+$/)?.[0] ?? "", E = d.slice(
1114
+ const { group: Q, line: vt, softline: $t, indent: It } = $, zs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1115
+ const o = {
1116
+ ...r,
1117
+ ...c
1118
+ }, d = o.embeddedSqlPlugin ?? "prettier-plugin-sql";
1119
+ k(d, o, s);
1120
+ const { node: p } = n, { createPlaceholder: h, placeholderRegex: a } = x(), l = p.quasis.map(
1121
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + h(g)
1122
+ ).join(""), u = l.match(/^\s+/)?.[0] ?? "", E = l.match(/\s+$/)?.[0] ?? "", b = l.slice(
871
1123
  u.length,
872
- -y.length || void 0
873
- ), b = S(r, n);
1124
+ -E.length || void 0
1125
+ ), y = T(n, t);
874
1126
  let i;
875
- if (l === "prettier-plugin-sql-cst") {
876
- const p = await t(E, {
877
- ...e,
878
- parser: e.embeddedSqlParser ?? "sqlite"
1127
+ if (d === "prettier-plugin-sql-cst") {
1128
+ const m = await e(b, {
1129
+ ...o,
1130
+ parser: o.embeddedSqlParser ?? "sqlite"
879
1131
  });
880
- i = L(p, c, b);
1132
+ i = D(m, a, y);
881
1133
  } else {
882
- const p = await t(wr(E), {
883
- ...e,
1134
+ const m = await e(Cs(b), {
1135
+ ...o,
884
1136
  parser: "sql"
885
1137
  });
886
- i = Ur(p, (m) => {
887
- if (typeof m != "string")
888
- return m;
889
- const f = [], $ = m.split(c);
890
- for (let _ = 0; _ < $.length; _++) {
891
- let D = $[_];
892
- if (_ % 2 == 0) {
893
- if (!D)
894
- continue;
895
- D = D.replaceAll(/([\\`]|\${)/g, "\\$1"), D.split(/(\n)/).forEach(
896
- (k) => k === `
897
- ` ? f.push(Br) : f.push(k)
898
- );
899
- } else {
900
- const k = Number(D);
901
- f.push(b[k]);
902
- }
903
- }
904
- return f;
905
- });
1138
+ i = D(
1139
+ m,
1140
+ a,
1141
+ y,
1142
+ !0
1143
+ );
906
1144
  }
907
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
908
- return z([
1145
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1146
+ return Q([
909
1147
  "`",
910
1148
  u,
911
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [z(i)] : et([z(i)]),
912
- y,
1149
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [Q(i)] : It([Q(i)]),
1150
+ E,
913
1151
  "`"
914
1152
  ]);
915
- const h = u.length ? Ve : Ze, v = y.length ? Ve : Ze;
916
- return z([
1153
+ const f = u.length ? vt : $t, v = E.length ? vt : $t;
1154
+ return Q([
917
1155
  "`",
918
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, z(i)] : et([h, z(i)]),
1156
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Q(i)] : It([f, Q(i)]),
919
1157
  v,
920
1158
  "`"
921
1159
  ]);
922
- }, Z = "embeddedSql", Cr = ["sql"], Wr = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Gr = [
1160
+ }, se = "embeddedSql", Ks = ["sql"], Js = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Hs = [
923
1161
  "sqlite",
924
1162
  "bigquery",
925
1163
  "mysql",
926
1164
  "mariadb",
927
1165
  "postgresql"
928
- ], zr = T(Z), Kr = rn(Z), Hr = O(Z), Jr = {
929
- [zr]: {
1166
+ ], Xs = I(se), Ys = Nn(se), Qs = A(se), Vs = {
1167
+ [Xs]: {
930
1168
  category: "Embed",
931
1169
  type: "string",
932
1170
  array: !0,
933
- default: [{ value: [...Cr] }],
1171
+ default: [{ value: [...Ks] }],
934
1172
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
935
1173
  },
936
- [Kr]: {
1174
+ [Ys]: {
937
1175
  category: "Embed",
938
1176
  type: "choice",
939
1177
  default: "prettier-plugin-sql",
940
1178
  description: "The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
941
- choices: Wr.map((t) => ({
942
- value: t,
943
- description: `Use the "${t}" plugin.`
1179
+ choices: Js.map((e) => ({
1180
+ value: e,
1181
+ description: `Use the "${e}" plugin.`
944
1182
  }))
945
1183
  },
946
- [Hr]: {
1184
+ [Qs]: {
947
1185
  category: "Embed",
948
1186
  type: "choice",
949
1187
  default: "sqlite",
950
1188
  description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
951
- choices: Gr.map((t) => ({
952
- value: t,
953
- description: `Use the "${t}" parser.`
1189
+ choices: Hs.map((e) => ({
1190
+ value: e,
1191
+ description: `Use the "${e}" parser.`
954
1192
  }))
955
1193
  }
956
- }, Xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1194
+ }, Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
957
1195
  __proto__: null,
958
- embedder: qr,
959
- language: Z,
960
- options: Jr
961
- }, Symbol.toStringTag, { value: "Module" })), { line: tt, group: K, indent: nt, softline: rt, hardline: Yr } = I, { mapDoc: Qr } = Y, Vr = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
962
- A("prettier-plugin-toml", e, s), e = {
963
- ...e,
964
- ...o
965
- };
966
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
967
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
968
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
969
- d.length,
1196
+ embedder: zs,
1197
+ language: se,
1198
+ options: Vs
1199
+ }, Symbol.toStringTag, { value: "Module" })), { line: Dt, group: V, indent: Tt, softline: xt } = $, er = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1200
+ k("prettier-plugin-toml", r, s);
1201
+ const o = {
1202
+ ...r,
1203
+ ...c
1204
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1205
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1206
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1207
+ l.length,
970
1208
  -u.length || void 0
971
- ), E = S(r, n), b = await t(y, {
972
- ...e,
1209
+ ), b = T(n, t), y = await e(E, {
1210
+ ...o,
973
1211
  parser: "toml"
974
- }), i = Qr(b, (p) => {
975
- if (typeof p != "string")
976
- return p;
977
- const m = [], f = p.split(g);
978
- for (let $ = 0; $ < f.length; $++) {
979
- let _ = f[$];
980
- if ($ % 2 == 0) {
981
- if (!_)
982
- continue;
983
- _ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), _.split(/(\n)/).forEach((D) => D === `
984
- ` ? m.push(Yr) : m.push(D));
985
- } else {
986
- const D = Number(_);
987
- m.push(E[D]);
988
- }
989
- }
990
- return m;
991
- });
992
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
993
- return K([
1212
+ }), i = D(
1213
+ y,
1214
+ h,
1215
+ b,
1216
+ !0
1217
+ );
1218
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1219
+ return V([
994
1220
  "`",
995
- d,
996
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [K(i)] : nt([K(i)]),
1221
+ l,
1222
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [V(i)] : Tt([V(i)]),
997
1223
  u,
998
1224
  "`"
999
1225
  ]);
1000
- const h = d.length ? tt : rt, v = u.length ? tt : rt;
1001
- return K([
1226
+ const f = l.length ? Dt : xt, v = u.length ? Dt : xt;
1227
+ return V([
1002
1228
  "`",
1003
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, K(i)] : nt([h, K(i)]),
1229
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, V(i)] : Tt([f, V(i)]),
1004
1230
  v,
1005
1231
  "`"
1006
1232
  ]);
1007
- }, Tt = "embeddedToml", Zr = ["toml"], es = T(Tt), ts = {
1008
- [es]: {
1233
+ }, tn = "embeddedToml", tr = ["toml"], nr = I(tn), or = {
1234
+ [nr]: {
1009
1235
  category: "Embed",
1010
1236
  type: "string",
1011
1237
  array: !0,
1012
- default: [{ value: [...Zr] }],
1238
+ default: [{ value: [...tr] }],
1013
1239
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
1014
1240
  }
1015
- }, ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1241
+ }, sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1016
1242
  __proto__: null,
1017
- embedder: Vr,
1018
- language: Tt,
1019
- options: ts
1020
- }, Symbol.toStringTag, { value: "Module" })), { line: st, group: H, indent: ot, softline: it } = I, rs = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
1021
- e = {
1022
- ...e,
1023
- ...o
1024
- };
1025
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
1026
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
1027
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
1028
- d.length,
1243
+ embedder: er,
1244
+ language: tn,
1245
+ options: or
1246
+ }, Symbol.toStringTag, { value: "Module" })), { line: St, group: Z, indent: Lt, softline: kt } = $, rr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1247
+ const o = {
1248
+ ...r,
1249
+ ...c
1250
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1251
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1252
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1253
+ l.length,
1029
1254
  -u.length || void 0
1030
- ), E = S(r, n), b = await t(y, {
1031
- ...e,
1032
- parser: e.embeddedTsParser ?? "typescript",
1255
+ ), b = T(n, t), y = await e(E, {
1256
+ ...o,
1257
+ parser: o.embeddedTsParser ?? "typescript",
1033
1258
  // set filepath to undefined to enable jsx auto detection:
1034
1259
  // https://github.com/prettier/prettier/blob/427a84d24203e2d54160cde153a1e6a6390fe65a/src/language-js/parse/typescript.js#L49-L53
1035
1260
  filepath: void 0
1036
- }), i = L(b, g, E);
1037
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
1038
- return H([
1261
+ }), i = D(y, h, b);
1262
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1263
+ return Z([
1039
1264
  "`",
1040
- d,
1041
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [H(i)] : ot([H(i)]),
1265
+ l,
1266
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [Z(i)] : Lt([Z(i)]),
1042
1267
  u,
1043
1268
  "`"
1044
1269
  ]);
1045
- const h = d.length ? st : it, v = u.length ? st : it;
1046
- return H([
1270
+ const f = l.length ? St : kt, v = u.length ? St : kt;
1271
+ return Z([
1047
1272
  "`",
1048
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, H(i)] : ot([h, H(i)]),
1273
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Z(i)] : Lt([f, Z(i)]),
1049
1274
  v,
1050
1275
  "`"
1051
1276
  ]);
1052
- }, ce = "embeddedTs", ss = ["ts", "tsx", "cts", "mts", "typescript"], os = ["typescript", "babel-ts"], is = O(ce), as = T(ce), cs = {
1053
- [as]: {
1277
+ }, ge = "embeddedTs", ir = ["ts", "tsx", "cts", "mts", "typescript"], ar = ["typescript", "babel-ts"], cr = A(ge), dr = I(ge), lr = {
1278
+ [dr]: {
1054
1279
  category: "Embed",
1055
1280
  type: "string",
1056
1281
  array: !0,
1057
- default: [{ value: [...ss] }],
1282
+ default: [{ value: [...ir] }],
1058
1283
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language."
1059
1284
  },
1060
- [is]: {
1285
+ [cr]: {
1061
1286
  category: "Embed",
1062
1287
  type: "choice",
1063
1288
  default: "typescript",
1064
1289
  description: "The parser used to parse the embedded TypeScript language.",
1065
- choices: os.map((t) => ({
1066
- value: t,
1067
- description: `Use the "${t}" parser.`
1290
+ choices: ar.map((e) => ({
1291
+ value: e,
1292
+ description: `Use the "${e}" parser.`
1068
1293
  }))
1069
1294
  }
1070
- }, ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1295
+ }, ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1071
1296
  __proto__: null,
1072
- embedder: rs,
1073
- language: ce,
1074
- options: cs
1075
- }, Symbol.toStringTag, { value: "Module" })), de = "embeddedXml", { line: at, group: J, indent: ct, softline: ee } = I, ls = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
1076
- A("@prettier/plugin-xml", e, s), e = {
1077
- ...e,
1078
- ...o
1079
- };
1080
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
1081
- (m, f, { length: $ }) => f === $ - 1 ? m.value.cooked : m.value.cooked + a(f)
1082
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
1083
- d.length,
1297
+ embedder: rr,
1298
+ language: ge,
1299
+ options: lr
1300
+ }, Symbol.toStringTag, { value: "Module" })), me = "embeddedXml", { line: Ot, group: ee, indent: At, softline: re } = $, pr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1301
+ k("@prettier/plugin-xml", r, s);
1302
+ const o = {
1303
+ ...r,
1304
+ ...c
1305
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1306
+ (g, _, { length: S }) => _ === S - 1 ? g.value.cooked : g.value.cooked + p(_)
1307
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1308
+ l.length,
1084
1309
  -u.length || void 0
1085
- ), E = S(r, n), b = [];
1310
+ ), b = T(n, t), y = [];
1086
1311
  let i = 0;
1087
1312
  for (; i !== void 0; ) {
1088
- const m = y.slice(i);
1089
- if (m.length === 0)
1313
+ const g = E.slice(i);
1314
+ if (g.length === 0)
1090
1315
  break;
1091
- i > 0 && e.xmlWhitespaceSensitivity !== "strict" && b.push(ee), e.__embeddedXmlFragmentRecoverIndex?.splice(
1316
+ i > 0 && o.xmlWhitespaceSensitivity !== "strict" && y.push(re), o.__embeddedXmlFragmentRecoverIndex?.splice(
1092
1317
  0,
1093
- e.__embeddedXmlFragmentRecoverIndex.length
1318
+ o.__embeddedXmlFragmentRecoverIndex.length
1094
1319
  );
1095
- let f = await t(m, {
1096
- ...e,
1097
- parser: de
1320
+ let _ = await e(g, {
1321
+ ...o,
1322
+ parser: me
1098
1323
  });
1099
- const [$, _] = e.__embeddedXmlFragmentRecoverIndex ?? [];
1100
- $ === void 0 ? i = void 0 : _ === void 0 ? i += $ : (f = m.slice($, _ + 1), i += _ + 1), b.push(f);
1324
+ const [S, L] = o.__embeddedXmlFragmentRecoverIndex ?? [];
1325
+ S === void 0 ? i = void 0 : L === void 0 ? i += S : (_ = g.slice(S, L + 1), i += L + 1), y.push(_);
1101
1326
  }
1102
- const h = L(b, g, E);
1103
- if (e.xmlWhitespaceSensitivity === "strict" || e.preserveEmbeddedExteriorWhitespaces?.includes(s))
1104
- return J([
1327
+ const f = D(y, h, b);
1328
+ if (o.xmlWhitespaceSensitivity === "strict" || o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1329
+ return ee([
1105
1330
  "`",
1106
- d,
1107
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [J(h)] : ct([J(h)]),
1331
+ l,
1332
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [ee(f)] : At([ee(f)]),
1108
1333
  u,
1109
1334
  "`"
1110
1335
  ]);
1111
- const v = d.length ? at : ee, p = u.length ? at : ee;
1112
- return J([
1336
+ const v = l.length ? Ot : re, m = u.length ? Ot : re;
1337
+ return ee([
1113
1338
  "`",
1114
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [v, J(h)] : ct([v, J(h)]),
1115
- p,
1339
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [v, ee(f)] : At([v, ee(f)]),
1340
+ m,
1116
1341
  "`"
1117
1342
  ]);
1118
- }, us = ["xml", "opml", "rss", "svg"], gs = T(de), ms = {
1119
- [gs]: {
1343
+ }, gr = ["xml", "opml", "rss", "svg"], mr = I(me), hr = {
1344
+ [mr]: {
1120
1345
  category: "Embed",
1121
1346
  type: "string",
1122
1347
  array: !0,
1123
- default: [{ value: [...us] }],
1348
+ default: [{ value: [...gr] }],
1124
1349
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
1125
1350
  },
1126
1351
  /**
@@ -1134,240 +1359,244 @@ const { hardline: Br, group: z, line: Ve, softline: Ze, indent: et } = I, { mapD
1134
1359
  description: "This option is read only and is used internally as a workaround to support xml fragments"
1135
1360
  }
1136
1361
  };
1137
- function ps(t) {
1138
- const n = {
1362
+ function fr(e) {
1363
+ const t = {
1139
1364
  loc: {
1140
1365
  start: {
1141
- line: t.line,
1142
- column: t.column
1366
+ line: e.line,
1367
+ column: e.column
1143
1368
  },
1144
1369
  end: {
1145
- line: t.line,
1146
- column: t.column + t.length
1370
+ line: e.line,
1371
+ column: e.column + e.length
1147
1372
  }
1148
1373
  }
1149
- }, r = new SyntaxError(
1150
- `${t.message} (${n.loc.start.line}:${n.loc.start.column})`,
1374
+ }, n = new SyntaxError(
1375
+ `${e.message} (${t.loc.start.line}:${t.loc.start.column})`,
1151
1376
  {
1152
- cause: t
1377
+ cause: e
1153
1378
  }
1154
1379
  );
1155
- return Object.assign(r, n), r;
1380
+ return Object.assign(n, t), n;
1156
1381
  }
1157
- function dt(t) {
1158
- const n = {
1382
+ function Mt(e) {
1383
+ const t = {
1159
1384
  loc: {
1160
1385
  start: {
1161
- line: t.token.startLine ?? NaN,
1162
- column: t.token.startColumn ?? NaN
1386
+ line: e.token.startLine ?? NaN,
1387
+ column: e.token.startColumn ?? NaN
1163
1388
  },
1164
1389
  end: {
1165
- line: t.token.endLine ?? NaN,
1166
- column: t.token.endColumn ?? NaN
1390
+ line: e.token.endLine ?? NaN,
1391
+ column: e.token.endColumn ?? NaN
1167
1392
  }
1168
1393
  }
1169
- }, r = new SyntaxError(
1170
- `${t.message} (${n.loc.start.line}:${n.loc.start.column})`,
1394
+ }, n = new SyntaxError(
1395
+ `${e.message} (${t.loc.start.line}:${t.loc.start.column})`,
1171
1396
  {
1172
- cause: t
1397
+ cause: e
1173
1398
  }
1174
1399
  );
1175
- return Object.assign(r, n), r;
1400
+ return Object.assign(n, t), n;
1176
1401
  }
1177
- const hs = {
1178
- async parse(t, n) {
1179
- const { parse: r } = await import("@xml-tools/parser"), { lexErrors: e, parseErrors: s, cst: o } = r(t);
1180
- if (e.length > 0) {
1181
- const l = e[0];
1182
- throw ps(l);
1402
+ const br = {
1403
+ async parse(e, t) {
1404
+ const { parse: n } = await import("@xml-tools/parser"), { lexErrors: r, parseErrors: s, cst: c } = n(e);
1405
+ if (r.length > 0) {
1406
+ const o = r[0];
1407
+ throw fr(o);
1183
1408
  }
1184
1409
  if (s.length > 0) {
1185
- let l = !1;
1186
- for (const a of s) {
1410
+ let o = !1;
1411
+ for (const d of s) {
1187
1412
  if (!["MismatchedTokenException", "NotAllInputParsedException"].includes(
1188
- a.name
1413
+ d.name
1189
1414
  ))
1190
- throw dt(a);
1191
- if (a.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
1192
- l = !0;
1415
+ throw Mt(d);
1416
+ if (d.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
1417
+ o = !0;
1193
1418
  continue;
1194
1419
  }
1195
1420
  if (/Expecting token of type --> EOF <-- but found --> '[\s\S]+' <--/.test(
1196
- a.message
1197
- ) || /Redundant input, expecting EOF but found: /.test(a.message)) {
1198
- n.__embeddedXmlFragmentRecoverIndex?.splice(
1421
+ d.message
1422
+ ) || /Redundant input, expecting EOF but found: /.test(d.message)) {
1423
+ t.__embeddedXmlFragmentRecoverIndex?.splice(
1199
1424
  0,
1200
- n.__embeddedXmlFragmentRecoverIndex.length,
1201
- a.token.startOffset
1425
+ t.__embeddedXmlFragmentRecoverIndex.length,
1426
+ d.token.startOffset
1202
1427
  );
1203
1428
  break;
1204
1429
  }
1205
1430
  if (/Expecting token of type --> OPEN <-- but found --> '[\s\S]+' <--/.test(
1206
- a.message
1431
+ d.message
1207
1432
  )) {
1208
- if (a.token.endOffset === void 0 || Number.isNaN(a.token.endOffset))
1433
+ if (d.token.endOffset === void 0 || Number.isNaN(d.token.endOffset))
1209
1434
  break;
1210
- n.__embeddedXmlFragmentRecoverIndex?.splice(
1435
+ t.__embeddedXmlFragmentRecoverIndex?.splice(
1211
1436
  0,
1212
- n.__embeddedXmlFragmentRecoverIndex.length,
1213
- a.token.startOffset,
1214
- a.token.endOffset
1215
- ), l = !0;
1437
+ t.__embeddedXmlFragmentRecoverIndex.length,
1438
+ d.token.startOffset,
1439
+ d.token.endOffset
1440
+ ), o = !0;
1216
1441
  break;
1217
1442
  }
1218
- throw dt(a);
1443
+ throw Mt(d);
1219
1444
  }
1220
- l && St(o);
1445
+ o && nn(c);
1221
1446
  }
1222
- return o;
1447
+ return c;
1223
1448
  },
1224
1449
  astFormat: "xml",
1225
- locStart(t) {
1226
- return t.location.startOffset;
1450
+ locStart(e) {
1451
+ return e.location.startOffset;
1227
1452
  },
1228
- locEnd(t) {
1229
- return t.location.endOffset ?? NaN;
1453
+ locEnd(e) {
1454
+ return e.location.endOffset ?? NaN;
1230
1455
  }
1231
1456
  };
1232
- function St(t) {
1233
- const n = t.children;
1234
- for (const r in n) {
1235
- const e = n[r] ?? [];
1236
- for (let s = e.length - 1; s >= 0; --s) {
1237
- const o = e[s];
1238
- if (fs(o)) {
1239
- if (Object.keys(o.children).length === 0) {
1240
- e.splice(s, 1), e.length === 0 && delete n[r];
1457
+ function nn(e) {
1458
+ const t = e.children;
1459
+ for (const n in t) {
1460
+ const r = t[n] ?? [];
1461
+ for (let s = r.length - 1; s >= 0; --s) {
1462
+ const c = r[s];
1463
+ if (Er(c)) {
1464
+ if (Object.keys(c.children).length === 0) {
1465
+ r.splice(s, 1), r.length === 0 && delete t[n];
1241
1466
  continue;
1242
1467
  }
1243
- St(o);
1468
+ nn(c);
1244
1469
  }
1245
1470
  }
1246
1471
  }
1247
1472
  }
1248
- function fs(t) {
1249
- return "name" in t && "children" in t && "location" in t;
1473
+ function Er(e) {
1474
+ return "name" in e && "children" in e && "location" in e;
1250
1475
  }
1251
- const bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1476
+ const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1252
1477
  __proto__: null,
1253
- embedder: ls,
1254
- language: de,
1255
- options: ms,
1256
- parser: hs
1257
- }, Symbol.toStringTag, { value: "Module" })), { line: lt, group: X, indent: ut, softline: gt } = I, Es = async (t, n, r, e, { identifier: s, embeddedOverrideOptions: o }) => {
1258
- e = {
1259
- ...e,
1260
- ...o
1261
- };
1262
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = x(), c = l.quasis.map(
1263
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
1264
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
1265
- d.length,
1478
+ embedder: pr,
1479
+ language: me,
1480
+ options: hr,
1481
+ parser: br
1482
+ }, Symbol.toStringTag, { value: "Module" })), { line: Pt, group: te, indent: jt, softline: Nt } = $, yr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1483
+ const o = {
1484
+ ...r,
1485
+ ...c
1486
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1487
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1488
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1489
+ l.length,
1266
1490
  -u.length || void 0
1267
- ), E = S(r, n), b = await t(y, {
1268
- ...e,
1491
+ ), b = T(n, t), y = await e(E, {
1492
+ ...o,
1269
1493
  parser: "yaml"
1270
- }), i = L(b, g, E);
1271
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(s))
1272
- return X([
1494
+ }), i = D(y, h, b);
1495
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1496
+ return te([
1273
1497
  "`",
1274
- d,
1275
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [X(i)] : ut([X(i)]),
1498
+ l,
1499
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [te(i)] : jt([te(i)]),
1276
1500
  u,
1277
1501
  "`"
1278
1502
  ]);
1279
- const h = d.length ? lt : gt, v = u.length ? lt : gt;
1280
- return X([
1503
+ const f = l.length ? Pt : Nt, v = u.length ? Pt : Nt;
1504
+ return te([
1281
1505
  "`",
1282
- e.noEmbeddedMultiLineIndentation?.includes(s) ? [h, X(i)] : ut([h, X(i)]),
1506
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, te(i)] : jt([f, te(i)]),
1283
1507
  v,
1284
1508
  "`"
1285
1509
  ]);
1286
- }, xt = "embeddedYaml", ys = ["yaml", "yml"], _s = T(xt), vs = {
1287
- [_s]: {
1510
+ }, on = "embeddedYaml", vr = ["yaml", "yml"], $r = I(on), Ir = {
1511
+ [$r]: {
1288
1512
  category: "Embed",
1289
1513
  type: "string",
1290
1514
  array: !0,
1291
- default: [{ value: [...ys] }],
1515
+ default: [{ value: [...vr] }],
1292
1516
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language."
1293
1517
  }
1294
- }, $s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1518
+ }, Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1295
1519
  __proto__: null,
1296
- embedder: Es,
1297
- language: xt,
1298
- options: vs
1299
- }, Symbol.toStringTag, { value: "Module" })), Lt = [], kt = {}, At = {}, Ot = {}, Ds = /* @__PURE__ */ Object.assign({
1300
- "./css/index.ts": un,
1301
- "./es/index.ts": En,
1302
- "./glsl/index.ts": Dn,
1303
- "./graphql/index.ts": Ln,
1304
- "./html/index.ts": Fn,
1305
- "./ini/index.ts": qn,
1306
- "./json/index.ts": Xn,
1307
- "./latex/index.ts": er,
1308
- "./markdown/index.ts": ar,
1309
- "./noop/index.ts": lr,
1310
- "./php/index.ts": hr,
1311
- "./properties/index.ts": _r,
1312
- "./ruby/index.ts": xr,
1313
- "./sh/index.ts": Nr,
1314
- "./sql/index.ts": Xr,
1315
- "./toml/index.ts": ns,
1316
- "./ts/index.ts": ds,
1317
- "./xml/index.ts": bs,
1318
- "./yaml/index.ts": $s
1319
- });
1320
- Object.values(Ds).forEach(({ language: t, parser: n, embedder: r, options: e }) => {
1321
- nn(Lt, t, ae), n && (kt[t] = n), r && (At[t] = r), Object.assign(Ot, e);
1520
+ embedder: yr,
1521
+ language: on,
1522
+ options: Ir
1523
+ }, Symbol.toStringTag, { value: "Module" })), sn = [], rn = {}, an = {}, cn = {}, Tr = /* @__PURE__ */ Object.assign({
1524
+ "./css/index.ts": qn,
1525
+ "./es/index.ts": Xn,
1526
+ "./glsl/index.ts": eo,
1527
+ "./graphql/index.ts": ro,
1528
+ "./html/index.ts": mo,
1529
+ "./ini/index.ts": _o,
1530
+ "./java/index.ts": Do,
1531
+ "./json/index.ts": Mo,
1532
+ "./jsonata/index.ts": Fo,
1533
+ "./latex/index.ts": qo,
1534
+ "./markdown/index.ts": Xo,
1535
+ "./nginx/index.ts": es,
1536
+ "./noop/index.ts": os,
1537
+ "./pegjs/index.ts": cs,
1538
+ "./php/index.ts": gs,
1539
+ "./prisma/index.ts": Es,
1540
+ "./properties/index.ts": Is,
1541
+ "./pug/index.ts": Ls,
1542
+ "./ruby/index.ts": Ns,
1543
+ "./sh/index.ts": Us,
1544
+ "./sql/index.ts": Zs,
1545
+ "./toml/index.ts": sr,
1546
+ "./ts/index.ts": ur,
1547
+ "./xml/index.ts": _r,
1548
+ "./yaml/index.ts": Dr
1322
1549
  });
1323
- const Is = "noEmbeddedIdentificationByComment", Ts = "noEmbeddedIdentificationByTag", Ss = "preserveEmbeddedExteriorWhitespaces", xs = "noEmbeddedMultiLineIndentation", Ls = "embeddedOverrides", ro = {
1324
- ...Ot,
1325
- [Is]: {
1550
+ for (const { language: e, parser: t, embedder: n, options: r } of Object.values(Tr))
1551
+ jn(sn, e, pe), t && (rn[e] = t), n && (an[e] = n), Object.assign(cn, r);
1552
+ const xr = "noEmbeddedIdentificationByComment", Sr = "noEmbeddedIdentificationByTag", Lr = "preserveEmbeddedExteriorWhitespaces", kr = "noEmbeddedMultiLineIndentation", Or = "embeddedOverrides", ri = {
1553
+ ...cn,
1554
+ [xr]: {
1326
1555
  category: "Embed",
1327
1556
  type: "string",
1328
1557
  array: !0,
1329
1558
  default: [{ value: [] }],
1330
1559
  description: "Turns off `` /* identifier */ `...` `` comment-based embedded language identification for the specified identifiers."
1331
1560
  },
1332
- [Ts]: {
1561
+ [Sr]: {
1333
1562
  category: "Embed",
1334
1563
  type: "string",
1335
1564
  array: !0,
1336
1565
  default: [{ value: [] }],
1337
1566
  description: "Turns off `` identifier`...` `` tag-based embedded language identification for the specified identifiers."
1338
1567
  },
1339
- [Ss]: {
1568
+ [Lr]: {
1340
1569
  category: "Embed",
1341
1570
  type: "string",
1342
1571
  array: !0,
1343
1572
  default: [{ value: [] }],
1344
1573
  description: "Preserves leading and trailing whitespaces in the formatting results for the specified identifiers."
1345
1574
  },
1346
- [xs]: {
1575
+ [kr]: {
1347
1576
  category: "Embed",
1348
1577
  type: "string",
1349
1578
  array: !0,
1350
1579
  default: [{ value: [] }],
1351
1580
  description: "Turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines."
1352
1581
  },
1353
- [Ls]: {
1582
+ [Or]: {
1354
1583
  category: "Embed",
1355
1584
  type: "string",
1356
1585
  array: !1,
1357
1586
  default: void 0,
1358
1587
  description: "Option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file."
1359
1588
  }
1360
- }, mt = {
1589
+ }, Rt = {
1361
1590
  // parsers from internal
1362
- ...wt.parsers,
1363
- ...Bt.parsers,
1364
- ...Ut.parsers,
1365
- ...Ct.parsers,
1366
- ...qt.parsers,
1591
+ ...hn.parsers,
1592
+ ...fn.parsers,
1593
+ ...bn.parsers,
1594
+ ..._n.parsers,
1595
+ ...En.parsers,
1367
1596
  // parsers from this plugin
1368
- ...kt
1597
+ ...rn
1369
1598
  };
1370
- var ks = {
1599
+ var Ar = {
1371
1600
  isEqual: !0,
1372
1601
  isMatchingKey: !0,
1373
1602
  isPromise: !0,
@@ -1376,40 +1605,40 @@ var ks = {
1376
1605
  onCacheChange: !0,
1377
1606
  onCacheHit: !0,
1378
1607
  transformKey: !0
1379
- }, As = Array.prototype.slice;
1380
- function V(t) {
1381
- var n = t.length;
1382
- return n ? n === 1 ? [t[0]] : n === 2 ? [t[0], t[1]] : n === 3 ? [t[0], t[1], t[2]] : As.call(t, 0) : [];
1608
+ }, Mr = Array.prototype.slice;
1609
+ function oe(e) {
1610
+ var t = e.length;
1611
+ return t ? t === 1 ? [e[0]] : t === 2 ? [e[0], e[1]] : t === 3 ? [e[0], e[1], e[2]] : Mr.call(e, 0) : [];
1383
1612
  }
1384
- function Os(t) {
1385
- var n = {};
1386
- for (var r in t)
1387
- ks[r] || (n[r] = t[r]);
1388
- return n;
1613
+ function Pr(e) {
1614
+ var t = {};
1615
+ for (var n in e)
1616
+ Ar[n] || (t[n] = e[n]);
1617
+ return t;
1389
1618
  }
1390
- function Ps(t) {
1391
- return typeof t == "function" && t.isMemoized;
1619
+ function jr(e) {
1620
+ return typeof e == "function" && e.isMemoized;
1392
1621
  }
1393
- function Ms(t, n) {
1394
- return t === n || t !== t && n !== n;
1622
+ function Nr(e, t) {
1623
+ return e === t || e !== e && t !== t;
1395
1624
  }
1396
- function pt(t, n) {
1397
- var r = {};
1398
- for (var e in t)
1399
- r[e] = t[e];
1400
- for (var e in n)
1401
- r[e] = n[e];
1402
- return r;
1625
+ function Ft(e, t) {
1626
+ var n = {};
1627
+ for (var r in e)
1628
+ n[r] = e[r];
1629
+ for (var r in t)
1630
+ n[r] = t[r];
1631
+ return n;
1403
1632
  }
1404
- var Ns = (
1633
+ var Rr = (
1405
1634
  /** @class */
1406
1635
  function() {
1407
- function t(n) {
1408
- this.keys = [], this.values = [], this.options = n;
1409
- var r = typeof n.isMatchingKey == "function";
1410
- r ? this.getKeyIndex = this._getKeyIndexFromMatchingKey : n.maxSize > 1 ? this.getKeyIndex = this._getKeyIndexForMany : this.getKeyIndex = this._getKeyIndexForSingle, this.canTransformKey = typeof n.transformKey == "function", this.shouldCloneArguments = this.canTransformKey || r, this.shouldUpdateOnAdd = typeof n.onCacheAdd == "function", this.shouldUpdateOnChange = typeof n.onCacheChange == "function", this.shouldUpdateOnHit = typeof n.onCacheHit == "function";
1636
+ function e(t) {
1637
+ this.keys = [], this.values = [], this.options = t;
1638
+ var n = typeof t.isMatchingKey == "function";
1639
+ n ? this.getKeyIndex = this._getKeyIndexFromMatchingKey : t.maxSize > 1 ? this.getKeyIndex = this._getKeyIndexForMany : this.getKeyIndex = this._getKeyIndexForSingle, this.canTransformKey = typeof t.transformKey == "function", this.shouldCloneArguments = this.canTransformKey || n, this.shouldUpdateOnAdd = typeof t.onCacheAdd == "function", this.shouldUpdateOnChange = typeof t.onCacheChange == "function", this.shouldUpdateOnHit = typeof t.onCacheHit == "function";
1411
1640
  }
1412
- return Object.defineProperty(t.prototype, "size", {
1641
+ return Object.defineProperty(e.prototype, "size", {
1413
1642
  /**
1414
1643
  * The number of cached [key,value] results.
1415
1644
  */
@@ -1418,7 +1647,7 @@ var Ns = (
1418
1647
  },
1419
1648
  enumerable: !1,
1420
1649
  configurable: !0
1421
- }), Object.defineProperty(t.prototype, "snapshot", {
1650
+ }), Object.defineProperty(e.prototype, "snapshot", {
1422
1651
  /**
1423
1652
  * A copy of the cache at a moment in time. This is useful
1424
1653
  * to compare changes over time, since the cache mutates
@@ -1426,198 +1655,201 @@ var Ns = (
1426
1655
  */
1427
1656
  get: function() {
1428
1657
  return {
1429
- keys: V(this.keys),
1658
+ keys: oe(this.keys),
1430
1659
  size: this.size,
1431
- values: V(this.values)
1660
+ values: oe(this.values)
1432
1661
  };
1433
1662
  },
1434
1663
  enumerable: !1,
1435
1664
  configurable: !0
1436
- }), t.prototype._getKeyIndexFromMatchingKey = function(n) {
1437
- var r = this.options, e = r.isMatchingKey, s = r.maxSize, o = this.keys, l = o.length;
1438
- if (!l)
1665
+ }), e.prototype._getKeyIndexFromMatchingKey = function(t) {
1666
+ var n = this.options, r = n.isMatchingKey, s = n.maxSize, c = this.keys, o = c.length;
1667
+ if (!o)
1439
1668
  return -1;
1440
- if (e(o[0], n))
1669
+ if (r(c[0], t))
1441
1670
  return 0;
1442
1671
  if (s > 1) {
1443
- for (var a = 1; a < l; a++)
1444
- if (e(o[a], n))
1445
- return a;
1672
+ for (var d = 1; d < o; d++)
1673
+ if (r(c[d], t))
1674
+ return d;
1446
1675
  }
1447
1676
  return -1;
1448
- }, t.prototype._getKeyIndexForMany = function(n) {
1449
- var r = this.options.isEqual, e = this.keys, s = e.length;
1677
+ }, e.prototype._getKeyIndexForMany = function(t) {
1678
+ var n = this.options.isEqual, r = this.keys, s = r.length;
1450
1679
  if (!s)
1451
1680
  return -1;
1452
1681
  if (s === 1)
1453
- return this._getKeyIndexForSingle(n);
1454
- var o = n.length, l, a;
1455
- if (o > 1) {
1456
- for (var g = 0; g < s; g++)
1457
- if (l = e[g], l.length === o) {
1458
- for (a = 0; a < o && r(l[a], n[a]); a++)
1682
+ return this._getKeyIndexForSingle(t);
1683
+ var c = t.length, o, d;
1684
+ if (c > 1) {
1685
+ for (var p = 0; p < s; p++)
1686
+ if (o = r[p], o.length === c) {
1687
+ for (d = 0; d < c && n(o[d], t[d]); d++)
1459
1688
  ;
1460
- if (a === o)
1461
- return g;
1689
+ if (d === c)
1690
+ return p;
1462
1691
  }
1463
1692
  } else
1464
- for (var g = 0; g < s; g++)
1465
- if (l = e[g], l.length === o && r(l[0], n[0]))
1466
- return g;
1693
+ for (var p = 0; p < s; p++)
1694
+ if (o = r[p], o.length === c && n(o[0], t[0]))
1695
+ return p;
1467
1696
  return -1;
1468
- }, t.prototype._getKeyIndexForSingle = function(n) {
1469
- var r = this.keys;
1470
- if (!r.length)
1697
+ }, e.prototype._getKeyIndexForSingle = function(t) {
1698
+ var n = this.keys;
1699
+ if (!n.length)
1471
1700
  return -1;
1472
- var e = r[0], s = e.length;
1473
- if (n.length !== s)
1701
+ var r = n[0], s = r.length;
1702
+ if (t.length !== s)
1474
1703
  return -1;
1475
- var o = this.options.isEqual;
1704
+ var c = this.options.isEqual;
1476
1705
  if (s > 1) {
1477
- for (var l = 0; l < s; l++)
1478
- if (!o(e[l], n[l]))
1706
+ for (var o = 0; o < s; o++)
1707
+ if (!c(r[o], t[o]))
1479
1708
  return -1;
1480
1709
  return 0;
1481
1710
  }
1482
- return o(e[0], n[0]) ? 0 : -1;
1483
- }, t.prototype.orderByLru = function(n, r, e) {
1484
- for (var s = this.keys, o = this.values, l = s.length, a = e; a--; )
1485
- s[a + 1] = s[a], o[a + 1] = o[a];
1486
- s[0] = n, o[0] = r;
1487
- var g = this.options.maxSize;
1488
- l === g && e === l ? (s.pop(), o.pop()) : e >= g && (s.length = o.length = g);
1489
- }, t.prototype.updateAsyncCache = function(n) {
1490
- var r = this, e = this.options, s = e.onCacheChange, o = e.onCacheHit, l = this.keys[0], a = this.values[0];
1491
- this.values[0] = a.then(function(g) {
1492
- return r.shouldUpdateOnHit && o(r, r.options, n), r.shouldUpdateOnChange && s(r, r.options, n), g;
1493
- }, function(g) {
1494
- var c = r.getKeyIndex(l);
1495
- throw c !== -1 && (r.keys.splice(c, 1), r.values.splice(c, 1)), g;
1711
+ return c(r[0], t[0]) ? 0 : -1;
1712
+ }, e.prototype.orderByLru = function(t, n, r) {
1713
+ for (var s = this.keys, c = this.values, o = s.length, d = r; d--; )
1714
+ s[d + 1] = s[d], c[d + 1] = c[d];
1715
+ s[0] = t, c[0] = n;
1716
+ var p = this.options.maxSize;
1717
+ o === p && r === o ? (s.pop(), c.pop()) : r >= p && (s.length = c.length = p);
1718
+ }, e.prototype.updateAsyncCache = function(t) {
1719
+ var n = this, r = this.options, s = r.onCacheChange, c = r.onCacheHit, o = this.keys[0], d = this.values[0];
1720
+ this.values[0] = d.then(function(p) {
1721
+ return n.shouldUpdateOnHit && c(n, n.options, t), n.shouldUpdateOnChange && s(n, n.options, t), p;
1722
+ }, function(p) {
1723
+ var h = n.getKeyIndex(o);
1724
+ throw h !== -1 && (n.keys.splice(h, 1), n.values.splice(h, 1)), p;
1496
1725
  });
1497
- }, t;
1726
+ }, e;
1498
1727
  }()
1499
1728
  );
1500
- function Pt(t, n) {
1501
- if (n === void 0 && (n = {}), Ps(t))
1502
- return Pt(t.fn, pt(t.options, n));
1503
- if (typeof t != "function")
1729
+ function dn(e, t) {
1730
+ if (t === void 0 && (t = {}), jr(e))
1731
+ return dn(e.fn, Ft(e.options, t));
1732
+ if (typeof e != "function")
1504
1733
  throw new TypeError("You must pass a function to `memoize`.");
1505
- var r = n.isEqual, e = r === void 0 ? Ms : r, s = n.isMatchingKey, o = n.isPromise, l = o === void 0 ? !1 : o, a = n.maxSize, g = a === void 0 ? 1 : a, c = n.onCacheAdd, d = n.onCacheChange, u = n.onCacheHit, y = n.transformKey, E = pt({
1506
- isEqual: e,
1734
+ var n = t.isEqual, r = n === void 0 ? Nr : n, s = t.isMatchingKey, c = t.isPromise, o = c === void 0 ? !1 : c, d = t.maxSize, p = d === void 0 ? 1 : d, h = t.onCacheAdd, a = t.onCacheChange, l = t.onCacheHit, u = t.transformKey, E = Ft({
1735
+ isEqual: r,
1507
1736
  isMatchingKey: s,
1508
- isPromise: l,
1509
- maxSize: g,
1510
- onCacheAdd: c,
1511
- onCacheChange: d,
1512
- onCacheHit: u,
1513
- transformKey: y
1514
- }, Os(n)), b = new Ns(E), i = b.keys, h = b.values, v = b.canTransformKey, p = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, f = b.shouldUpdateOnChange, $ = b.shouldUpdateOnHit, _ = function() {
1515
- var D = p ? V(arguments) : arguments;
1516
- v && (D = y(D));
1517
- var k = i.length ? b.getKeyIndex(D) : -1;
1518
- if (k !== -1)
1519
- $ && u(b, E, _), k && (b.orderByLru(i[k], h[k], k), f && d(b, E, _));
1737
+ isPromise: o,
1738
+ maxSize: p,
1739
+ onCacheAdd: h,
1740
+ onCacheChange: a,
1741
+ onCacheHit: l,
1742
+ transformKey: u
1743
+ }, Pr(t)), b = new Rr(E), y = b.keys, i = b.values, f = b.canTransformKey, v = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, g = b.shouldUpdateOnChange, _ = b.shouldUpdateOnHit, S = function() {
1744
+ var L = v ? oe(arguments) : arguments;
1745
+ f && (L = u(L));
1746
+ var O = y.length ? b.getKeyIndex(L) : -1;
1747
+ if (O !== -1)
1748
+ _ && l(b, E, S), O && (b.orderByLru(y[O], i[O], O), g && a(b, E, S));
1520
1749
  else {
1521
- var Ft = t.apply(this, arguments), jt = p ? D : V(arguments);
1522
- b.orderByLru(jt, Ft, i.length), l && b.updateAsyncCache(_), m && c(b, E, _), f && d(b, E, _);
1750
+ var gn = e.apply(this, arguments), mn = v ? L : oe(arguments);
1751
+ b.orderByLru(mn, gn, y.length), o && b.updateAsyncCache(S), m && h(b, E, S), g && a(b, E, S);
1523
1752
  }
1524
- return h[0];
1753
+ return i[0];
1525
1754
  };
1526
- return _.cache = b, _.fn = t, _.isMemoized = !0, _.options = E, _;
1755
+ return S.cache = b, S.fn = e, S.isMemoized = !0, S.options = E, S;
1527
1756
  }
1528
- async function ht(t) {
1757
+ async function wt(e) {
1529
1758
  try {
1530
- const n = await Gt(t, { encoding: "utf-8" });
1531
- return JSON.parse(n);
1759
+ const t = await vn(e, { encoding: "utf-8" });
1760
+ return JSON.parse(t);
1532
1761
  } catch {
1533
1762
  }
1534
1763
  }
1535
- const Rs = /* @__PURE__ */ new URL(
1536
- "data:text/javascript," + encodeURIComponent('import{pathToFileURL as r}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:o})=>{try{const e=await import(r(o).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')
1764
+ const Fr = /* @__PURE__ */ new URL(
1765
+ `data:text/javascript,${encodeURIComponent('import{pathToFileURL as r}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:o})=>{try{const e=await import(r(o).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')}`
1537
1766
  );
1538
- async function Fs(t) {
1539
- return new Promise((n) => {
1540
- const r = new Xt(Rs, {
1767
+ async function wr(e) {
1768
+ return new Promise((t) => {
1769
+ const n = new xn(Fr, {
1541
1770
  workerData: {
1542
- absolutePath: t
1771
+ absolutePath: e
1543
1772
  }
1544
1773
  });
1545
- r.once("message", (e) => {
1546
- n(e);
1547
- }), r.once("error", (e) => {
1548
- console.error(e), n(void 0);
1774
+ n.once("message", (r) => {
1775
+ t(r);
1776
+ }), n.once("error", (r) => {
1777
+ console.error(r), t(void 0);
1549
1778
  });
1550
1779
  });
1551
1780
  }
1552
- async function js(t) {
1781
+ async function Br(e) {
1553
1782
  console.error(
1554
1783
  "Ts module type embeddedOverrides has not been implemented yet."
1555
1784
  );
1556
1785
  }
1557
- const ws = Pt(
1558
- async (t, n) => {
1559
- if (zt(t))
1560
- return t;
1561
- const r = await Yt(n);
1562
- let e;
1563
- return typeof r != "string" ? e = process.env.PWD ?? process.cwd() : e = Kt(r), Ht(e, t);
1786
+ const Ur = dn(
1787
+ async (e, t) => {
1788
+ if ($n(e))
1789
+ return e;
1790
+ const n = await Sn(t);
1791
+ let r;
1792
+ return typeof n != "string" ? r = process.env.PWD ?? process.cwd() : r = In(n), Dn(r, e);
1564
1793
  }
1565
- ), Bs = async (t, n) => {
1566
- const r = ws(
1567
- t,
1568
- n
1569
- ), e = Jt(t);
1570
- if (e === ".json") {
1571
- const s = await r, o = await ht(s);
1572
- if (o !== void 0)
1573
- return o;
1794
+ ), Wr = async (e, t) => {
1795
+ const n = Ur(
1796
+ e,
1797
+ t
1798
+ ), r = Tn(e);
1799
+ if (r === ".json") {
1800
+ const s = await n, c = await wt(s);
1801
+ if (c !== void 0)
1802
+ return c;
1574
1803
  console.error(`Failed to parse the json file: ${s}`);
1575
1804
  return;
1576
- } else if (e === ".mjs" || e === ".cjs" || e === ".js") {
1577
- const s = await r, o = await Fs(s);
1578
- if (o !== void 0)
1579
- return o;
1805
+ }
1806
+ if (r === ".mjs" || r === ".cjs" || r === ".js") {
1807
+ const s = await n, c = await wr(s);
1808
+ if (c !== void 0)
1809
+ return c;
1580
1810
  console.error(`Failed to parse the js module file: ${s}`);
1581
1811
  return;
1582
- } else if (e === ".mts" || e === ".cts" || e === ".ts") {
1583
- const s = await r, o = await js();
1584
- if (o !== void 0)
1585
- return o;
1812
+ }
1813
+ if (r === ".mts" || r === ".cts" || r === ".ts") {
1814
+ const s = await n, c = await Br();
1815
+ if (c !== void 0)
1816
+ return c;
1586
1817
  console.error(`Failed to parse the ts module file: ${s}`);
1587
1818
  return;
1588
- } else if (e === "") {
1589
- const s = await r, o = await ht(s);
1590
- if (o !== void 0)
1591
- return o;
1819
+ }
1820
+ if (r === "") {
1821
+ const s = await n, c = await wt(s);
1822
+ if (c !== void 0)
1823
+ return c;
1592
1824
  }
1593
1825
  try {
1594
- return JSON.parse(t);
1826
+ return JSON.parse(e);
1595
1827
  } catch {
1596
1828
  console.error("Failed to parse embeddedOverrides as a json object");
1597
1829
  }
1598
- }, Us = async (t, n, r) => {
1599
- if (t === void 0)
1830
+ }, qr = async (e, t, n) => {
1831
+ if (e === void 0)
1600
1832
  return;
1601
- const e = await Bs(
1602
- t,
1603
- r
1833
+ const r = await Wr(
1834
+ e,
1835
+ n
1604
1836
  );
1605
- if (e !== void 0)
1837
+ if (r !== void 0)
1606
1838
  try {
1607
- for (const { identifiers: s, options: o } of e)
1608
- if (s.includes(n))
1609
- return o;
1839
+ for (const { identifiers: s, options: c } of r)
1840
+ if (s.includes(t))
1841
+ return c;
1610
1842
  } catch {
1611
1843
  console.error("Error parsing embedded override options.");
1612
1844
  }
1613
1845
  };
1614
- function qs({ node: t, parent: n }, r, e) {
1615
- if (r.length === 0 || t.type !== "TemplateLiteral")
1846
+ function Gr({ node: e, parent: t }, n, r) {
1847
+ if (n.length === 0 || e.type !== "TemplateLiteral")
1616
1848
  return;
1617
- const s = t.comments ?? n?.comments;
1849
+ const s = e.comments ?? t?.comments;
1618
1850
  if (!s)
1619
1851
  return;
1620
- const o = s[s.length - 1];
1852
+ const c = s[s.length - 1];
1621
1853
  if (![
1622
1854
  "MultiLine",
1623
1855
  // meriyah
@@ -1625,18 +1857,18 @@ function qs({ node: t, parent: n }, r, e) {
1625
1857
  // typescript, acorn, espree, flow
1626
1858
  "CommentBlock"
1627
1859
  // babel, babel-flow, babel-ts
1628
- ].includes(o.type) || !o.leading)
1860
+ ].includes(c.type) || !c.leading)
1629
1861
  return;
1630
- const l = e.noEmbeddedIdentificationByComment ?? [];
1631
- for (const a of r)
1632
- if (!l.includes(a) && ` ${a} ` === o.value)
1633
- return a;
1862
+ const o = r.noEmbeddedIdentificationByComment ?? [];
1863
+ for (const d of n)
1864
+ if (!o.includes(d) && ` ${d} ` === c.value)
1865
+ return d;
1634
1866
  }
1635
- function Cs({ node: t, parent: n }, r, e) {
1636
- if (r.length === 0 || t.type !== "TemplateLiteral" || n?.type !== "TaggedTemplateExpression")
1867
+ function Cr({ node: e, parent: t }, n, r) {
1868
+ if (n.length === 0 || e.type !== "TemplateLiteral" || t?.type !== "TaggedTemplateExpression")
1637
1869
  return;
1638
- e.parser;
1639
- const s = e.parser in mt, o = e.noEmbeddedIdentificationByTag ?? [], l = /* @__PURE__ */ new Set([
1870
+ r.parser;
1871
+ const s = r.parser in Rt, c = r.noEmbeddedIdentificationByTag ?? [], o = /* @__PURE__ */ new Set([
1640
1872
  "start",
1641
1873
  "end",
1642
1874
  "loc",
@@ -1645,90 +1877,90 @@ function Cs({ node: t, parent: n }, r, e) {
1645
1877
  "typeAnnotation",
1646
1878
  "decorators"
1647
1879
  ]);
1648
- for (const a of r)
1649
- if (!o.includes(a))
1650
- if (Ws(a)) {
1651
- if (n.tag.type === "Identifier" && n.tag.name === a)
1652
- return a;
1880
+ for (const d of n)
1881
+ if (!c.includes(d))
1882
+ if (zr(d)) {
1883
+ if (t.tag.type === "Identifier" && t.tag.name === d)
1884
+ return d;
1653
1885
  } else {
1654
1886
  if (!s)
1655
1887
  return;
1656
- let g;
1888
+ let p;
1657
1889
  try {
1658
- const d = mt[e.parser].parse(
1659
- `${a}\`\``,
1660
- e
1890
+ const a = Rt[r.parser].parse(
1891
+ `${d}\`\``,
1892
+ r
1661
1893
  );
1662
- if (d instanceof Promise)
1894
+ if (a instanceof Promise)
1663
1895
  throw new TypeError(
1664
1896
  "Async parse function hasn't been supported yet."
1665
1897
  );
1666
- g = d;
1898
+ p = a;
1667
1899
  } catch {
1668
1900
  continue;
1669
1901
  }
1670
- if (g.type === "File" && (g = g.program), !(g.type === "Program" && g.body[0]?.type === "ExpressionStatement"))
1902
+ if (p.type === "File" && (p = p.program), !(p.type === "Program" && p.body[0]?.type === "ExpressionStatement"))
1671
1903
  continue;
1672
- const c = g.body[0]?.expression;
1673
- if (c?.type !== "TaggedTemplateExpression")
1904
+ const h = p.body[0]?.expression;
1905
+ if (h?.type !== "TaggedTemplateExpression")
1674
1906
  continue;
1675
- if (n.tag, c.tag, Nt(n.tag, c.tag, l))
1676
- return a;
1907
+ if (t.tag, h.tag, un(t.tag, h.tag, o))
1908
+ return d;
1677
1909
  }
1678
1910
  }
1679
- function Ws(t) {
1680
- return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(t);
1911
+ function zr(e) {
1912
+ return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(e);
1681
1913
  }
1682
- function Mt(t, n, r = /* @__PURE__ */ new Set()) {
1683
- return Object.is(t, n) ? !0 : Array.isArray(t) ? Gs(t, n, r) : typeof t == "object" ? Nt(
1914
+ function ln(e, t, n = /* @__PURE__ */ new Set()) {
1915
+ return Object.is(e, t) ? !0 : Array.isArray(e) ? Kr(e, t, n) : typeof e == "object" ? un(
1916
+ e,
1684
1917
  t,
1685
- n,
1686
- r
1918
+ n
1687
1919
  ) : !1;
1688
1920
  }
1689
- function Gs(t, n, r = /* @__PURE__ */ new Set()) {
1690
- const e = t.length;
1691
- if (e != n.length)
1921
+ function Kr(e, t, n = /* @__PURE__ */ new Set()) {
1922
+ const r = e.length;
1923
+ if (r !== t.length)
1692
1924
  return !1;
1693
- for (let s = 0; s < e; s++)
1694
- if (!Mt(t[s], n[s], r))
1925
+ for (let s = 0; s < r; s++)
1926
+ if (!ln(e[s], t[s], n))
1695
1927
  return !1;
1696
1928
  return !0;
1697
1929
  }
1698
- function Nt(t, n, r = /* @__PURE__ */ new Set()) {
1699
- for (const e of Object.keys(t))
1700
- if (!r.has(e) && !(Object.prototype.hasOwnProperty.call(n, e) && Mt(t[e], n[e], r)))
1930
+ function un(e, t, n = /* @__PURE__ */ new Set()) {
1931
+ for (const r of Object.keys(e))
1932
+ if (!n.has(r) && !(Object.prototype.hasOwnProperty.call(t, r) && ln(e[r], t[r], n)))
1701
1933
  return !1;
1702
1934
  return !0;
1703
1935
  }
1704
- const { estree: Rt } = Wt, zs = function(t, n) {
1705
- const { node: r } = t;
1706
- if (r.type !== "TemplateLiteral" || r.quasis.some(({ value: { cooked: e } }) => e === null))
1936
+ const { estree: pn } = yn, Jr = (e, t) => {
1937
+ const { node: n } = e;
1938
+ if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: r } }) => r === null))
1707
1939
  return null;
1708
- for (const e of Lt) {
1709
- const s = n[T(e)];
1940
+ for (const r of sn) {
1941
+ const s = t[I(r)];
1710
1942
  if (!s)
1711
1943
  continue;
1712
- const o = qs(t, s, n) ?? Cs(t, s, n);
1713
- if (o === void 0)
1944
+ const c = Gr(e, s, t) ?? Cr(e, s, t);
1945
+ if (c === void 0)
1714
1946
  continue;
1715
- const l = At[e];
1716
- if (!l)
1947
+ const o = an[r];
1948
+ if (!o)
1717
1949
  return null;
1718
- const a = t.node;
1719
- return a.quasis.length === 1 && a.quasis[0]?.value.raw.trim() === "" ? "``" : async (g, c, d, u) => {
1720
- const y = await Us(
1721
- u.embeddedOverrides,
1722
- o,
1723
- u.filepath
1950
+ const d = e.node;
1951
+ return d.quasis.length === 1 && d.quasis[0]?.value.raw.trim() === "" ? "``" : async (p, h, a, l) => {
1952
+ const u = await qr(
1953
+ l.embeddedOverrides,
1954
+ c,
1955
+ l.filepath
1724
1956
  );
1725
1957
  try {
1726
- const E = await l(g, c, d, u, {
1727
- identifier: o,
1958
+ const E = await o(p, h, a, l, {
1959
+ identifier: c,
1728
1960
  identifiers: s,
1729
- embeddedOverrideOptions: y
1961
+ embeddedOverrideOptions: u
1730
1962
  });
1731
- return I.label(
1963
+ return $.label(
1732
1964
  { embed: !0, ...E.label },
1733
1965
  E
1734
1966
  );
@@ -1737,20 +1969,20 @@ const { estree: Rt } = Wt, zs = function(t, n) {
1737
1969
  }
1738
1970
  };
1739
1971
  }
1740
- return Rt.embed?.(t, n) ?? null;
1741
- }, so = {
1972
+ return pn.embed?.(e, t) ?? null;
1973
+ }, ii = {
1742
1974
  estree: {
1743
- ...Rt,
1744
- embed: zs
1975
+ ...pn,
1976
+ embed: Jr
1745
1977
  }
1746
1978
  };
1747
1979
  export {
1748
- At as embeddedEmbedders,
1749
- Lt as embeddedLanguages,
1750
- Ot as embeddedOptions,
1751
- kt as embeddedParsers,
1752
- T as makeIdentifiersOptionName,
1753
- ro as options,
1754
- mt as parsers,
1755
- so as printers
1980
+ an as embeddedEmbedders,
1981
+ sn as embeddedLanguages,
1982
+ cn as embeddedOptions,
1983
+ rn as embeddedParsers,
1984
+ I as makeIdentifiersOptionName,
1985
+ ri as options,
1986
+ Rt as parsers,
1987
+ ii as printers
1756
1988
  };