prettier-plugin-embed 0.4.14 → 0.4.15

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