prettier-plugin-embed 0.4.6 → 0.4.7

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