prettier-plugin-embed 0.4.10 → 0.4.12

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