prettier-plugin-embed 0.4.5 → 0.4.6

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