prettier-plugin-embed 0.4.9 → 0.4.11

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