prettier-plugin-embed 0.7.2 → 0.8.0

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,154 +1,175 @@
1
1
  import { builders as e, utils as t } from "prettier/doc";
2
- import { createRequire as n } from "node:module";
3
- import r from "node:path";
4
- import { pathToFileURL as i } from "node:url";
5
- import a from "prettier/parser-babel";
6
- import o from "prettier/parser-espree";
7
- import s from "prettier/parser-flow";
8
- import c from "prettier/parser-meriyah";
9
- import l from "prettier/parser-typescript";
10
- import { printers as u } from "prettier/plugins/estree.mjs";
11
- import { resolveConfigFile as d } from "prettier";
2
+ import n from "prettier/parser-babel";
3
+ import r from "prettier/parser-espree";
4
+ import i from "prettier/parser-flow";
5
+ import a from "prettier/parser-meriyah";
6
+ import o from "prettier/parser-typescript";
7
+ import { printers as s } from "prettier/plugins/estree.mjs";
12
8
  //#region \0rolldown/runtime.js
13
- var f = Object.defineProperty, p = (e, t) => {
9
+ var c = Object.defineProperty, l = (e, t) => {
14
10
  let n = {};
15
- for (var r in e) f(n, r, {
11
+ for (var r in e) c(n, r, {
16
12
  get: e[r],
17
13
  enumerable: !0
18
14
  });
19
- return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
20
- };
21
- //#endregion
22
- //#region node_modules/.pnpm/dedent@1.7.2/node_modules/dedent/dist/dedent.mjs
23
- function m(e, t) {
24
- var n = Object.keys(e);
25
- if (Object.getOwnPropertySymbols) {
26
- var r = Object.getOwnPropertySymbols(e);
27
- t && (r = r.filter(function(t) {
28
- return Object.getOwnPropertyDescriptor(e, t).enumerable;
29
- })), n.push.apply(n, r);
30
- }
31
- return n;
32
- }
33
- function h(e) {
34
- for (var t = 1; t < arguments.length; t++) {
35
- var n = arguments[t] == null ? {} : arguments[t];
36
- t % 2 ? m(Object(n), !0).forEach(function(t) {
37
- ee(e, t, n[t]);
38
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : m(Object(n)).forEach(function(t) {
39
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
40
- });
41
- }
42
- return e;
43
- }
44
- function ee(e, t, n) {
45
- return t = te(t), t in e ? Object.defineProperty(e, t, {
46
- value: n,
47
- enumerable: !0,
48
- configurable: !0,
49
- writable: !0
50
- }) : e[t] = n, e;
51
- }
52
- function te(e) {
53
- var t = ne(e, "string");
54
- return typeof t == "symbol" ? t : String(t);
15
+ return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
16
+ }, { group: u, indent: d, line: f, softline: p, lineSuffixBoundary: m, addAlignmentToDoc: h, align: g, hardline: _, dedentToRoot: v, markAsRoot: ee, literalline: te, trim: ne, label: re } = e, { mapDoc: ie, replaceEndOfLine: ae, traverseDoc: oe, willBreak: se } = t, ce = Symbol("embedded-expression"), le = Symbol("embedded-expressions"), ue = /^[\t ]*/, de = /^[\t ]*(?=\S)/gm, fe = /\r?\n[\t ]*$/, pe = /\n[\t ]*$/, me = /([\\`]|\${)/g, he = /<\/(?=script\b)/gi, ge = /[-[\]{}()*+?.,\\^$|#\s]/g;
17
+ function _e(e) {
18
+ if (typeof e == "string") return !1;
19
+ let t = !1;
20
+ return oe(e, (e) => {
21
+ if (t) return !1;
22
+ e && typeof e == "object" && !Array.isArray(e) && (t = !!(e.type === "line" && e.literal || e.type === "align" && e.n === -Infinity));
23
+ }, void 0, !0), t;
55
24
  }
56
- function ne(e, t) {
57
- if (typeof e != "object" || !e) return e;
58
- var n = e[Symbol.toPrimitive];
59
- if (n !== void 0) {
60
- var r = n.call(e, t || "default");
61
- if (typeof r != "object") return r;
62
- throw TypeError("@@toPrimitive must return a primitive value.");
63
- }
64
- return (t === "string" ? String : Number)(e);
65
- }
66
- var re = ie({});
67
- function ie(e) {
68
- return t.withOptions = (t) => ie(h(h({}, e), t)), t;
69
- function t(t, ...n) {
70
- let r = typeof t == "string" ? [t] : t.raw, { alignValues: i = !1, escapeSpecialCharacters: a = Array.isArray(t), trimWhitespace: o = !0 } = e, s = "";
71
- for (let e = 0; e < r.length; e++) {
72
- let t = r[e];
73
- if (a && (t = t.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{")), s += t, e < n.length) {
74
- let t = i ? ae(n[e], s) : n[e];
75
- s += t;
76
- }
25
+ function ve(e) {
26
+ if (!e || typeof e != "object" || Array.isArray(e) || e.type !== "label" || e.label !== le) return e;
27
+ let t = /* @__PURE__ */ new WeakMap();
28
+ function n(e, n) {
29
+ if (typeof e != "object" || !e) return e;
30
+ let i = t.get(n);
31
+ i || (i = /* @__PURE__ */ new Map(), t.set(n, i));
32
+ let a = i.get(e);
33
+ if (a !== void 0) return a;
34
+ let o = r(e, n);
35
+ return i.set(e, o), o;
36
+ }
37
+ function r(e, t) {
38
+ if (Array.isArray(e)) return e.map((e) => n(e, t));
39
+ if (e.type === "label" && e.label === ce) {
40
+ let n = e.contents, r = 0, i;
41
+ for (let e = t.root; e; e = e.parent) r++, i = e.indentation;
42
+ if (r === 0) return n;
43
+ for (let e = t.indentation; e && e !== i; e = e.parent) n = {
44
+ ...e.doc,
45
+ contents: n
46
+ };
47
+ for (; r-- > 0;) n = v(n);
48
+ return n;
77
49
  }
78
- let c = s.split("\n"), l = null;
79
- for (let e of c) {
80
- let t = e.match(/^(\s+)\S+/);
81
- if (t) {
82
- let e = t[1].length;
83
- l = l ? Math.min(l, e) : e;
84
- }
50
+ if (e.type === "fill") return {
51
+ ...e,
52
+ parts: e.parts.map((e) => n(e, t))
53
+ };
54
+ if (e.type === "if-break") return {
55
+ ...e,
56
+ breakContents: n(e.breakContents, t),
57
+ flatContents: n(e.flatContents, t)
58
+ };
59
+ if (e.type === "group" && e.expandedStates) {
60
+ let r = e.expandedStates.map((e) => n(e, t));
61
+ return {
62
+ ...e,
63
+ contents: r[0],
64
+ expandedStates: r
65
+ };
85
66
  }
86
- if (l !== null) {
87
- let e = l;
88
- s = c.map((t) => t[0] === " " || t[0] === " " ? t.slice(e) : t).join("\n");
67
+ if (e.type === "indent-if-break") {
68
+ let r = e;
69
+ return {
70
+ ...r,
71
+ contents: n(r.contents, {
72
+ ...t,
73
+ indentation: {
74
+ doc: r,
75
+ parent: t.indentation
76
+ }
77
+ })
78
+ };
89
79
  }
90
- return o && (s = s.trim()), a && (s = s.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\v/g, "\v").replace(/\\b/g, "\b").replace(/\\f/g, "\f").replace(/\\0/g, "\0").replace(/\\x([\da-fA-F]{2})/g, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g, (e, t) => String.fromCodePoint(parseInt(t, 16))).replace(/\\u([\da-fA-F]{4})/g, (e, t) => String.fromCharCode(parseInt(t, 16)))), typeof Bun < "u" && (s = s.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g, (e, t, n) => {
91
- let r = t ?? n ?? "";
92
- return String.fromCodePoint(parseInt(r, 16));
93
- })), s;
94
- }
95
- }
96
- function ae(e, t) {
97
- if (typeof e != "string" || !e.includes("\n")) return e;
98
- let n = t.slice(t.lastIndexOf("\n") + 1).match(/^(\s+)/);
99
- if (n) {
100
- let t = n[1];
101
- return e.replace(/\n/g, `\n${t}`);
80
+ if ("contents" in e) {
81
+ let r = t;
82
+ return e.type === "align" && typeof e.n == "object" ? r = {
83
+ ...t,
84
+ root: {
85
+ indentation: t.indentation,
86
+ parent: t.root
87
+ }
88
+ } : e.type === "align" && e.n === -Infinity ? r = {
89
+ indentation: t.root?.indentation,
90
+ root: t.root?.parent
91
+ } : (e.type === "align" || e.type === "indent") && (r = {
92
+ ...t,
93
+ indentation: {
94
+ doc: e,
95
+ parent: t.indentation
96
+ }
97
+ }), {
98
+ ...e,
99
+ contents: n(e.contents, r)
100
+ };
101
+ }
102
+ return e;
102
103
  }
103
- return e;
104
+ return n(e.contents, { root: {} });
104
105
  }
105
- //#endregion
106
- //#region src/embedded/utils.ts
107
- var { group: g, indent: _, line: oe, softline: v, lineSuffixBoundary: se, addAlignmentToDoc: ce, align: le, hardline: ue } = e, { mapDoc: de, replaceEndOfLine: fe } = t;
108
- function y(e, t) {
109
- let n = e.quasis.map((e, n, { length: r }) => n === r - 1 ? e.value.cooked : e.value.cooked + t(n)).join(""), r = n.match(/^\s+/)?.[0] ?? "", i = n.match(/\s+$/)?.[0] ?? "";
110
- return {
111
- trimmedText: n.slice(r.length, -i.length || void 0),
112
- leadingWhitespaces: r,
113
- trailingWhitespaces: i
106
+ function y(e, t, n = !1) {
107
+ let r = e.quasis.map((e, n, { length: r }) => n === r - 1 ? e.value.cooked : e.value.cooked + t(n)).join(""), i = r.length - r.trimStart().length, a = Math.max(i, r.trimEnd().length), o = r.slice(0, i), s = r.slice(a), c = r.slice(i, a), l = r.matchAll(de), u = l.next().value?.[0] ?? "";
108
+ for (; u;) {
109
+ let e = l.next().value?.[0];
110
+ if (e === void 0) break;
111
+ let t = 0;
112
+ for (; t < u.length && u[t] === e[t];) t++;
113
+ u = u.slice(0, t);
114
+ }
115
+ let d = u ? RegExp(`(\\r?\\n)${u}`, "g") : void 0;
116
+ if (c) {
117
+ let e = (o.includes("\n") ? o.slice(o.lastIndexOf("\n") + 1) : "").slice(u.length);
118
+ o = o.slice(0, o.length - e.length), c = e + (d ? c.replace(d, "$1") : c);
119
+ }
120
+ return n && s.includes("\n") && (c += d ? s.replace(d, "$1") : s, s = fe.exec(s)?.[0] ?? ""), {
121
+ text: c,
122
+ leadingWhitespaces: o,
123
+ trailingWhitespaces: s
114
124
  };
115
125
  }
116
126
  function b(e, t, n, r, i, a = !1) {
117
- let o = a || t.preserveEmbeddedExteriorWhitespaces?.includes(n), s = t.noEmbeddedMultiLineIndentation?.includes(n), c = g(e);
118
- if (o) return g([
127
+ let o = t.preserveEmbeddedExteriorWhitespaces?.includes(n), s = t.noEmbeddedMultiLineIndentation?.includes(n);
128
+ if (!o && a && (!r || !i)) return u([
119
129
  "`",
120
- r,
121
- s ? c : _([c]),
122
- i,
130
+ r ? " " : "",
131
+ s ? v(u(e)) : u(e),
132
+ i ? " " : "",
123
133
  "`"
124
134
  ]);
125
- let l = r.length ? oe : v, u = i.length ? oe : v;
126
- return g([
135
+ let c = ee(u(ve(e)));
136
+ if (o) {
137
+ let e = r.includes("\n"), t = r.slice(r.lastIndexOf("\n") + 1);
138
+ return u([
139
+ "`",
140
+ ae(r),
141
+ v(g(e ? t : "", c)),
142
+ ae(i),
143
+ "`"
144
+ ]);
145
+ }
146
+ let l = r.length ? f : p, m = i.length ? f : p;
147
+ return u([
127
148
  "`",
128
- s ? [l, c] : _([l, c]),
129
- u,
149
+ s ? v([l, c]) : d([l, c]),
150
+ m,
130
151
  "`"
131
- ]);
152
+ ], { shouldBreak: se(e) });
132
153
  }
133
- function pe(e, t) {
154
+ function ye(e, t) {
134
155
  let n = 0;
135
156
  for (let r of e) r === " " ? n = n + t - n % t : n++;
136
157
  return n;
137
158
  }
138
- function me(e, t) {
139
- let n = e.lastIndexOf("\n"), r = e.slice(n + 1), i = /^[\t ]*/.exec(r)[0];
140
- return pe(i, t);
159
+ function be(e, t) {
160
+ let n = e.lastIndexOf("\n"), r = e.slice(n + 1), i = ue.exec(r)[0];
161
+ return ye(i, t);
141
162
  }
142
- function he(e, t, n) {
163
+ function xe(e, t, n) {
143
164
  let r = t, i = e.quasis[r].value.raw;
144
165
  if (i.includes("\n")) return {
145
- indentSize: me(i, n),
166
+ indentSize: be(i, n),
146
167
  previousQuasiText: i
147
168
  };
148
169
  for (; r-- > 0;) {
149
170
  let t = e.quasis[r].value.raw;
150
171
  if (t.includes("\n")) return {
151
- indentSize: me(t, n),
172
+ indentSize: be(t, n),
152
173
  previousQuasiText: i
153
174
  };
154
175
  }
@@ -157,68 +178,82 @@ function he(e, t, n) {
157
178
  previousQuasiText: i
158
179
  };
159
180
  }
160
- function ge(e, t, n, r, i, a = !0, o) {
181
+ function Se(e, t, n, r, i, a = !0, o) {
161
182
  let { node: s } = e, c = t();
162
- if (s?.comments?.length && (c = g([_([v, c]), v])), !a) return g([
183
+ if (s?.comments?.length && (c = u([d([p, c]), p])), !a) return u([
163
184
  "${",
164
185
  c,
165
- se,
186
+ m,
166
187
  "}"
167
188
  ]);
168
- let { indentSize: l, previousQuasiText: u } = o === void 0 ? he(n, r, i) : {
189
+ let { indentSize: l, previousQuasiText: f } = o === void 0 ? xe(n, r, i) : {
169
190
  indentSize: o,
170
191
  previousQuasiText: n.quasis[r].value.raw
171
- }, d = c;
172
- return d = l === 0 && u.endsWith("\n") ? le(-Infinity, d) : ce(d, l, i), g([
192
+ }, _ = c;
193
+ return _ = l === 0 && f.endsWith("\n") ? g(-Infinity, _) : h(_, l, i), u([
173
194
  "${",
174
- d,
175
- se,
195
+ _,
196
+ m,
176
197
  "}"
177
198
  ]);
178
199
  }
179
- function x(e, t, n, r = !0) {
200
+ function Ce(e, t, n, r = !0) {
180
201
  let i = n?.tabWidth ?? 2, a = e.node, o = 0;
181
202
  return e.map((e, n) => {
182
203
  if (r) {
183
204
  let e = a.quasis[n].value.raw;
184
- e.includes("\n") && (o = me(e, i));
205
+ e.includes("\n") && (o = be(e, i));
185
206
  }
186
- return ge(e, t, a, n, i, r, o);
207
+ return Se(e, t, a, n, i, r, o);
187
208
  }, "expressions");
188
209
  }
189
- function S(e, t, n, r = !1, i, a, o = !1) {
190
- let s = n.length ? /* @__PURE__ */ new Set() : void 0, c = de(e, (e) => {
210
+ function x(e, t, n, { lineBreakBeforeExpressions: r, interpolationTabWidth: i, escapeClosingScript: a = !1 } = {}) {
211
+ let o = !1, s = n.map((e) => _e(e) ? (o = !0, re(ce, e)) : e), c = n.length ? /* @__PURE__ */ new Set() : void 0, l = ie(e, (e) => {
191
212
  if (typeof e != "string") return e;
192
- let c = [], l = e.split(t), u = "";
193
- for (let e = 0; e < l.length; e++) {
194
- let t = l[e];
213
+ if (!n.length) return we(e, a);
214
+ let o = e.split(t);
215
+ if (o.length === 1) return we(e, a);
216
+ let l = [], u = "";
217
+ for (let e = 0; e < o.length; e++) {
218
+ let t = o[e];
195
219
  if (e % 2 == 0) {
196
- if (e === 0 || t.includes("\n")) {
220
+ if (i !== void 0 && (e === 0 || t.includes("\n"))) {
197
221
  let e = t.slice(t.lastIndexOf("\n") + 1);
198
- u = /^[\t ]*/.exec(e)[0];
222
+ u = ue.exec(e)[0];
199
223
  }
200
224
  if (!t) continue;
201
- if (t = t.replaceAll(/([\\`]|\${)/g, "\\$1"), o && (t = t.replaceAll(/<\/(?=script\b)/gi, "<\\/")), r === "literalline") c.push(fe(t));
202
- else if (r === "hardline") for (let e of t.split(/(\n)/)) e === "\n" ? c.push(ue) : c.push(e);
203
- else c.push(t);
225
+ let n = we(t, a);
226
+ if (Array.isArray(n)) for (let e of n) l.push(e);
227
+ else l.push(n);
204
228
  } else {
205
- let r = Number(t);
206
- s?.add(r);
207
- let o = l[e - 1];
208
- if (i?.has(r) && !/\n[\t ]*$/.test(o)) {
209
- let e = c.at(-1);
210
- typeof e == "string" && (c[c.length - 1] = e.replace(/[\t ]+$/, "")), c.push(ue), a !== void 0 && c.push(u);
229
+ let n = Number(t);
230
+ c?.add(n);
231
+ let a = o[e - 1];
232
+ if (r?.has(n) && !pe.test(a)) {
233
+ let e = l.at(-1);
234
+ if (typeof e == "string") {
235
+ let t = e.length;
236
+ for (; e[t - 1] === " " || e[t - 1] === " ";) t--;
237
+ l[l.length - 1] = e.slice(0, t);
238
+ }
239
+ l.push(_), i !== void 0 && l.push(u);
211
240
  }
212
- let d = n[r];
213
- c.push(a === void 0 ? d : le(pe(u, a), d));
241
+ let d = s[n];
242
+ l.push(i === void 0 ? d : g(ye(u, i), d));
214
243
  }
215
244
  }
216
- return c;
245
+ return l;
217
246
  });
218
- if (n.some((e, t) => !s.has(t))) throw Error("The embedded formatter changed an expression placeholder.");
219
- return c;
247
+ if (n.some((e, t) => !c.has(t))) throw Error("The embedded formatter changed an expression placeholder.");
248
+ return o ? re(le, l) : l;
220
249
  }
221
- function _e(e, t, n) {
250
+ function we(e, t) {
251
+ if (e = e.replace(me, "\\$1"), t && (e = e.replace(he, "<\\/")), !e.includes("\n")) return e;
252
+ let n = e.split("\n"), r = [n[0]];
253
+ for (let e = 1; e < n.length; e++) e > 1 && n[e - 1] === "" && r.push(ne), r.push(te, n[e]);
254
+ return r;
255
+ }
256
+ function Te(e, t, n) {
222
257
  if (t === n) {
223
258
  e.unshift(t);
224
259
  return;
@@ -234,151 +269,148 @@ function _e(e, t, n) {
234
269
  }
235
270
  e.splice(r, 0, t);
236
271
  }
237
- var ve = (() => {
238
- let e = [...Array(26).keys()].map((e) => String.fromCharCode(e + 97)).concat([...Array(10).keys()].map((e) => `${e}`));
239
- return () => {
240
- let t = "";
241
- for (let n = 0; n < 16; ++n) t += e[Number.parseInt((Math.random() * e.length).toFixed(0), 10) % e.length];
242
- return t;
243
- };
244
- })();
245
- function C(e = "p", t = "") {
246
- let n = ve(), r = ve(), i = ye(e), a = ye(t);
272
+ var Ee = "abcdefghijklmnopqrstuvwxyz0123456789";
273
+ function De() {
274
+ let e = "";
275
+ for (let t = 0; t < 16; t++) e += Ee[Math.floor(Math.random() * 36)];
276
+ return e;
277
+ }
278
+ function Oe(e = "p", t = "") {
279
+ let n = De(), r = De(), i = ke(e), a = ke(t);
247
280
  return {
248
281
  createPlaceholder: (i) => `${e}${n}${i}${r}${t}`,
249
282
  placeholderRegex: RegExp(`${i}${n}(\\d+)${r}${a}`, "ig")
250
283
  };
251
284
  }
252
- function ye(e) {
253
- return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
285
+ function ke(e) {
286
+ return e.replace(ge, "\\$&");
254
287
  }
255
- function w(e) {
288
+ function S(e) {
256
289
  return `${e}Identifiers`;
257
290
  }
258
- function T(e) {
291
+ function C(e) {
259
292
  return `${e}Comments`;
260
293
  }
261
- function E(e) {
294
+ function w(e) {
262
295
  return `${e}Tags`;
263
296
  }
264
- function be(e) {
297
+ function Ae(e) {
265
298
  return `${e}Plugin`;
266
299
  }
267
- function D(e) {
300
+ function T(e) {
268
301
  return `${e}Parser`;
269
302
  }
270
- var O = "9ff2b366e8ca4c97b9aed1a29b5b94ed";
303
+ var E = "9ff2b366e8ca4c97b9aed1a29b5b94ed";
271
304
  //#endregion
272
305
  //#region src/embedded/create-embedder.ts
273
- function k({ parser: e, parserOption: t, parserOptions: n, markup: r = !1, newlineHandling: i = !1, dedentContent: a = !1, placeholderPrefix: o = "p", transformDoc: s }) {
274
- return async (c, l, u, d, { commentOrTag: f, embeddedOverrideOptions: p }) => {
275
- let m = {
276
- ...d,
277
- ...p
278
- }, { createPlaceholder: h, placeholderRegex: ee } = C(o), { trimmedText: te, leadingWhitespaces: ne, trailingWhitespaces: ie } = y(u.node, h), ae = x(u, l, m, !1), g = t ? m[t] : void 0, _ = await c(a ? re(te) : te, {
279
- ...m,
306
+ function D({ parser: e, parserOption: t, parserOptions: n, markup: r = !1, preserveTrailingWhitespace: i = !1, placeholderPrefix: a = "p", transformDoc: o }) {
307
+ return async (s, c, l, u, { commentOrTag: d, embeddedOverrideOptions: f }) => {
308
+ let p = {
309
+ ...u,
310
+ ...f
311
+ }, { createPlaceholder: m, placeholderRegex: h } = Oe(a), { text: g, leadingWhitespaces: _, trailingWhitespaces: v } = y(l.node, m, i), ee = Ce(l, c, p, !1), te = t ? p[t] : void 0, ne = await s(g, {
312
+ ...p,
280
313
  ...n,
281
- parser: g ?? e
314
+ parser: te ?? e
282
315
  });
283
- return b(S(s ? s(_) : _, ee, ae, i, void 0, m.tabWidth, !!m.__embeddedInHtml), m, f, ne, ie, r && (m.htmlWhitespaceSensitivity === "strict" || m.htmlWhitespaceSensitivity === "css"));
316
+ return b(x(o ? o(ne) : ne, h, ee, {
317
+ interpolationTabWidth: p.tabWidth,
318
+ escapeClosingScript: !!p.__embeddedInHtml
319
+ }), p, d, _, v, r && (p.htmlWhitespaceSensitivity === "strict" || p.htmlWhitespaceSensitivity === "css"));
284
320
  };
285
321
  }
286
322
  //#endregion
287
323
  //#region src/embedded/astro/embedder.ts
288
- var xe = k({
324
+ var je = D({
289
325
  parser: "astro",
290
326
  markup: !0
291
- }), Se = "embeddedAstro", Ce = ["astro"], we = T(Se), Te = E(Se), Ee = {
292
- [we]: {
327
+ }), Me = "embeddedAstro", Ne = ["astro"], Pe = C(Me), Fe = w(Me), Ie = {
328
+ [Pe]: {
293
329
  category: "Embed",
294
330
  type: "string",
295
331
  array: !0,
296
- default: [{ value: [...Ce] }],
332
+ default: [{ value: [...Ne] }],
297
333
  description: "Block comments that identify embedded Astro in template literals. Requires the `prettier-plugin-astro` plugin."
298
334
  },
299
- [Te]: {
335
+ [Fe]: {
300
336
  category: "Embed",
301
337
  type: "string",
302
338
  array: !0,
303
- default: [{ value: [...Ce] }],
339
+ default: [{ value: [...Ne] }],
304
340
  description: "Tags that identify embedded Astro in template literals. Requires the `prettier-plugin-astro` plugin."
305
341
  }
306
- }, De = /* @__PURE__ */ p({
307
- embedder: () => xe,
308
- language: () => Se,
309
- options: () => Ee
310
- }), Oe = k({
342
+ }, Le = /* @__PURE__ */ l({
343
+ embedder: () => je,
344
+ language: () => Me,
345
+ options: () => Ie
346
+ }), Re = D({
311
347
  parser: "scss",
312
348
  parserOption: "embeddedCssParser",
313
- placeholderPrefix: "@prettier-placeholder",
314
- newlineHandling: "literalline"
315
- }), A = "embeddedCss", ke = ["css"], Ae = [
349
+ placeholderPrefix: "@prettier-placeholder"
350
+ }), O = "embeddedCss", ze = ["css"], Be = [
316
351
  "css",
317
352
  "less",
318
353
  "scss"
319
- ], je = w(A), Me = T(A), Ne = E(A), Pe = D(A), Fe = {
320
- [je]: {
354
+ ], Ve = S(O), He = C(O), Ue = w(O), We = T(O), Ge = {
355
+ [Ve]: {
321
356
  category: "Embed",
322
357
  type: "string",
323
358
  array: !0,
324
- default: [{ value: [...ke] }],
359
+ default: [{ value: [...ze] }],
325
360
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.",
326
- deprecated: `Please use \`${Me}\` or \`${Ne}\`.`
361
+ deprecated: `Please use \`${He}\` or \`${Ue}\`.`
327
362
  },
328
- [Me]: {
363
+ [He]: {
329
364
  category: "Embed",
330
365
  type: "string",
331
366
  array: !0,
332
- default: [{ value: [O] }],
367
+ default: [{ value: [E] }],
333
368
  description: "Block comments that make their subsequent template literals be identified as embedded CSS language."
334
369
  },
335
- [Ne]: {
370
+ [Ue]: {
336
371
  category: "Embed",
337
372
  type: "string",
338
373
  array: !0,
339
- default: [{ value: [O] }],
374
+ default: [{ value: [E] }],
340
375
  description: "Tags that make their subsequent template literals be identified as embedded CSS language."
341
376
  },
342
- [Pe]: {
377
+ [We]: {
343
378
  category: "Embed",
344
379
  type: "choice",
345
380
  default: "scss",
346
381
  description: "The parser used to parse the embedded CSS language.",
347
- choices: Ae.map((e) => ({
382
+ choices: Be.map((e) => ({
348
383
  value: e,
349
384
  description: `Use the "${e}" parser.`
350
385
  }))
351
386
  }
352
- }, Ie = /* @__PURE__ */ p({
353
- embedder: () => Oe,
354
- language: () => A,
355
- options: () => Fe
356
- }), Le = k({
357
- parser: "dockerfile",
358
- newlineHandling: "hardline"
359
- }), Re = "embeddedDockerfile", ze = ["dockerfile", "containerfile"], Be = T(Re), Ve = E(Re), He = {
360
- [Be]: {
387
+ }, Ke = /* @__PURE__ */ l({
388
+ embedder: () => Re,
389
+ language: () => O,
390
+ options: () => Ge
391
+ }), qe = D({ parser: "dockerfile" }), Je = "embeddedDockerfile", Ye = ["dockerfile", "containerfile"], Xe = C(Je), Ze = w(Je), Qe = {
392
+ [Xe]: {
361
393
  category: "Embed",
362
394
  type: "string",
363
395
  array: !0,
364
- default: [{ value: [...ze] }],
396
+ default: [{ value: [...Ye] }],
365
397
  description: "Block comments that identify embedded Dockerfile in template literals. Requires the `prettier-plugin-sh` plugin."
366
398
  },
367
- [Ve]: {
399
+ [Ze]: {
368
400
  category: "Embed",
369
401
  type: "string",
370
402
  array: !0,
371
- default: [{ value: [...ze] }],
403
+ default: [{ value: [...Ye] }],
372
404
  description: "Tags that identify embedded Dockerfile in template literals. Requires the `prettier-plugin-sh` plugin."
373
405
  }
374
- }, Ue = /* @__PURE__ */ p({
375
- embedder: () => Le,
376
- language: () => Re,
377
- options: () => He
378
- }), We = k({
406
+ }, $e = /* @__PURE__ */ l({
407
+ embedder: () => qe,
408
+ language: () => Je,
409
+ options: () => Qe
410
+ }), et = D({
379
411
  parser: "babel",
380
412
  parserOption: "embeddedEsParser"
381
- }), j = "embeddedEs", Ge = [
413
+ }), k = "embeddedEs", tt = [
382
414
  "js",
383
415
  "jsx",
384
416
  "es",
@@ -387,336 +419,328 @@ var xe = k({
387
419
  "cjs",
388
420
  "pac",
389
421
  "javascript"
390
- ], Ke = [
422
+ ], nt = [
391
423
  "babel",
392
424
  "babel-flow",
393
425
  "acorn",
394
426
  "espree",
395
427
  "flow",
396
428
  "meriyah"
397
- ], qe = w(j), Je = T(j), Ye = E(j), Xe = D(j), Ze = {
398
- [qe]: {
429
+ ], rt = S(k), it = C(k), at = w(k), ot = T(k), st = {
430
+ [rt]: {
399
431
  category: "Embed",
400
432
  type: "string",
401
433
  array: !0,
402
- default: [{ value: [...Ge] }],
434
+ default: [{ value: [...tt] }],
403
435
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.",
404
- deprecated: `Please use \`${Je}\` or \`${Ye}\`.`
436
+ deprecated: `Please use \`${it}\` or \`${at}\`.`
405
437
  },
406
- [Je]: {
438
+ [it]: {
407
439
  category: "Embed",
408
440
  type: "string",
409
441
  array: !0,
410
- default: [{ value: [O] }],
442
+ default: [{ value: [E] }],
411
443
  description: "Block comments that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
412
444
  },
413
- [Ye]: {
445
+ [at]: {
414
446
  category: "Embed",
415
447
  type: "string",
416
448
  array: !0,
417
- default: [{ value: [O] }],
449
+ default: [{ value: [E] }],
418
450
  description: "Tags that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
419
451
  },
420
- [Xe]: {
452
+ [ot]: {
421
453
  category: "Embed",
422
454
  type: "choice",
423
455
  default: "babel",
424
456
  description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
425
- choices: Ke.map((e) => ({
457
+ choices: nt.map((e) => ({
426
458
  value: e,
427
459
  description: `Use the "${e}" parser.`
428
460
  }))
429
461
  }
430
- }, Qe = /* @__PURE__ */ p({
431
- embedder: () => We,
432
- language: () => j,
433
- options: () => Ze
434
- }), $e = k({ parser: "gherkin" }), et = "embeddedGherkin", tt = ["gherkin", "feature"], nt = T(et), rt = E(et), it = {
435
- [nt]: {
462
+ }, ct = /* @__PURE__ */ l({
463
+ embedder: () => et,
464
+ language: () => k,
465
+ options: () => st
466
+ }), lt = D({ parser: "gherkin" }), ut = "embeddedGherkin", dt = ["gherkin", "feature"], ft = C(ut), pt = w(ut), mt = {
467
+ [ft]: {
436
468
  category: "Embed",
437
469
  type: "string",
438
470
  array: !0,
439
- default: [{ value: [...tt] }],
471
+ default: [{ value: [...dt] }],
440
472
  description: "Block comments that identify embedded Gherkin in template literals. Requires the `prettier-plugin-gherkin` plugin."
441
473
  },
442
- [rt]: {
474
+ [pt]: {
443
475
  category: "Embed",
444
476
  type: "string",
445
477
  array: !0,
446
- default: [{ value: [...tt] }],
478
+ default: [{ value: [...dt] }],
447
479
  description: "Tags that identify embedded Gherkin in template literals. Requires the `prettier-plugin-gherkin` plugin."
448
480
  }
449
- }, at = /* @__PURE__ */ p({
450
- embedder: () => $e,
451
- language: () => et,
452
- options: () => it
453
- }), ot = k({ parser: "glsl-parser" }), st = "embeddedGlsl", ct = ["glsl", "shader"], lt = w(st), ut = T(st), dt = E(st), ft = {
454
- [lt]: {
481
+ }, ht = /* @__PURE__ */ l({
482
+ embedder: () => lt,
483
+ language: () => ut,
484
+ options: () => mt
485
+ }), gt = D({ parser: "glsl-parser" }), _t = "embeddedGlsl", vt = ["glsl", "shader"], yt = S(_t), bt = C(_t), xt = w(_t), St = {
486
+ [yt]: {
455
487
  category: "Embed",
456
488
  type: "string",
457
489
  array: !0,
458
- default: [{ value: [...ct] }],
490
+ default: [{ value: [...vt] }],
459
491
  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.",
460
- deprecated: `Please use \`${ut}\` or \`${dt}\`.`
492
+ deprecated: `Please use \`${bt}\` or \`${xt}\`.`
461
493
  },
462
- [ut]: {
494
+ [bt]: {
463
495
  category: "Embed",
464
496
  type: "string",
465
497
  array: !0,
466
- default: [{ value: [O] }],
498
+ default: [{ value: [E] }],
467
499
  description: "Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
468
500
  },
469
- [dt]: {
501
+ [xt]: {
470
502
  category: "Embed",
471
503
  type: "string",
472
504
  array: !0,
473
- default: [{ value: [O] }],
505
+ default: [{ value: [E] }],
474
506
  description: "Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
475
507
  }
476
- }, pt = /* @__PURE__ */ p({
477
- embedder: () => ot,
478
- language: () => st,
479
- options: () => ft
480
- }), mt = k({
508
+ }, Ct = /* @__PURE__ */ l({
509
+ embedder: () => gt,
510
+ language: () => _t,
511
+ options: () => St
512
+ }), wt = D({
481
513
  parser: "go-template",
482
514
  markup: !0
483
- }), ht = "embeddedGoTemplate", gt = ["goTemplate", "gotmpl"], _t = T(ht), vt = E(ht), yt = {
484
- [_t]: {
515
+ }), Tt = "embeddedGoTemplate", Et = ["goTemplate", "gotmpl"], Dt = C(Tt), Ot = w(Tt), kt = {
516
+ [Dt]: {
485
517
  category: "Embed",
486
518
  type: "string",
487
519
  array: !0,
488
- default: [{ value: [...gt] }],
520
+ default: [{ value: [...Et] }],
489
521
  description: "Block comments that identify embedded Go Template in template literals. Requires the `@htnabe/prettier-plugin-go-template` plugin."
490
522
  },
491
- [vt]: {
523
+ [Ot]: {
492
524
  category: "Embed",
493
525
  type: "string",
494
526
  array: !0,
495
- default: [{ value: [...gt] }],
527
+ default: [{ value: [...Et] }],
496
528
  description: "Tags that identify embedded Go Template in template literals. Requires the `@htnabe/prettier-plugin-go-template` plugin."
497
529
  }
498
- }, bt = /* @__PURE__ */ p({
499
- embedder: () => mt,
500
- language: () => ht,
501
- options: () => yt
502
- }), xt = k({ parser: "graphql" }), St = "embeddedGraphql", Ct = ["graphql", "gql"], wt = w(St), Tt = T(St), Et = E(St), Dt = {
503
- [wt]: {
530
+ }, At = /* @__PURE__ */ l({
531
+ embedder: () => wt,
532
+ language: () => Tt,
533
+ options: () => kt
534
+ }), jt = D({ parser: "graphql" }), A = "embeddedGraphql", Mt = ["graphql", "gql"], Nt = S(A), Pt = C(A), Ft = w(A), It = {
535
+ [Nt]: {
504
536
  category: "Embed",
505
537
  type: "string",
506
538
  array: !0,
507
- default: [{ value: [...Ct] }],
539
+ default: [{ value: [...Mt] }],
508
540
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.",
509
- deprecated: `Please use \`${Tt}\` or \`${Et}\`.`
541
+ deprecated: `Please use \`${Pt}\` or \`${Ft}\`.`
510
542
  },
511
- [Tt]: {
543
+ [Pt]: {
512
544
  category: "Embed",
513
545
  type: "string",
514
546
  array: !0,
515
- default: [{ value: [O] }],
547
+ default: [{ value: [E] }],
516
548
  description: "Block comments that make their subsequent template literals be identified as embedded GraphQL language."
517
549
  },
518
- [Et]: {
550
+ [Ft]: {
519
551
  category: "Embed",
520
552
  type: "string",
521
553
  array: !0,
522
- default: [{ value: [O] }],
554
+ default: [{ value: [E] }],
523
555
  description: "Tags that make their subsequent template literals be identified as embedded GraphQL language."
524
556
  }
525
- }, Ot = /* @__PURE__ */ p({
526
- embedder: () => xt,
527
- language: () => St,
528
- options: () => Dt
529
- }), kt = k({
557
+ }, Lt = /* @__PURE__ */ l({
558
+ embedder: () => jt,
559
+ language: () => A,
560
+ options: () => It
561
+ }), Rt = D({
530
562
  parser: "handlebars",
531
563
  markup: !0
532
- }), At = "embeddedHandlebars", jt = ["handlebars", "hbs"], Mt = T(At), Nt = E(At), Pt = {
533
- [Mt]: {
564
+ }), zt = "embeddedHandlebars", Bt = ["handlebars", "hbs"], Vt = C(zt), Ht = w(zt), Ut = {
565
+ [Vt]: {
534
566
  category: "Embed",
535
567
  type: "string",
536
568
  array: !0,
537
- default: [{ value: [...jt] }],
569
+ default: [{ value: [...Bt] }],
538
570
  description: "Block comments that identify embedded Handlebars in template literals. Requires the `@poliklot/prettier-plugin-handlebars` plugin."
539
571
  },
540
- [Nt]: {
572
+ [Ht]: {
541
573
  category: "Embed",
542
574
  type: "string",
543
575
  array: !0,
544
- default: [{ value: [...jt] }],
576
+ default: [{ value: [...Bt] }],
545
577
  description: "Tags that identify embedded Handlebars in template literals. Requires the `@poliklot/prettier-plugin-handlebars` plugin."
546
578
  }
547
- }, Ft = /* @__PURE__ */ p({
548
- embedder: () => kt,
549
- language: () => At,
550
- options: () => Pt
551
- }), It = k({
579
+ }, Wt = /* @__PURE__ */ l({
580
+ embedder: () => Rt,
581
+ language: () => zt,
582
+ options: () => Ut
583
+ }), Gt = D({
552
584
  parser: "html",
553
585
  parserOption: "embeddedHtmlParser",
554
586
  markup: !0
555
- }), M = "embeddedHtml", Lt = ["html", "xhtml"], Rt = [
587
+ }), j = "embeddedHtml", Kt = ["html", "xhtml"], qt = [
556
588
  "html",
557
589
  "vue",
558
590
  "angular",
559
591
  "lwc"
560
- ], zt = w(M), Bt = T(M), Vt = E(M), Ht = D(M), Ut = {
561
- [zt]: {
592
+ ], Jt = S(j), Yt = C(j), Xt = w(j), Zt = T(j), Qt = {
593
+ [Jt]: {
562
594
  category: "Embed",
563
595
  type: "string",
564
596
  array: !0,
565
- default: [{ value: [...Lt] }],
597
+ default: [{ value: [...Kt] }],
566
598
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.",
567
- deprecated: `Please use \`${Bt}\` or \`${Vt}\`.`
599
+ deprecated: `Please use \`${Yt}\` or \`${Xt}\`.`
568
600
  },
569
- [Bt]: {
601
+ [Yt]: {
570
602
  category: "Embed",
571
603
  type: "string",
572
604
  array: !0,
573
- default: [{ value: [O] }],
605
+ default: [{ value: [E] }],
574
606
  description: "Block comments that make their subsequent template literals be identified as embedded HTML language."
575
607
  },
576
- [Vt]: {
608
+ [Xt]: {
577
609
  category: "Embed",
578
610
  type: "string",
579
611
  array: !0,
580
- default: [{ value: [O] }],
612
+ default: [{ value: [E] }],
581
613
  description: "Tags that make their subsequent template literals be identified as embedded HTML language."
582
614
  },
583
- [Ht]: {
615
+ [Zt]: {
584
616
  category: "Embed",
585
617
  type: "choice",
586
618
  default: "html",
587
619
  description: "The parser used to parse the embedded HTML language.",
588
- choices: Rt.map((e) => ({
620
+ choices: qt.map((e) => ({
589
621
  value: e,
590
622
  description: `Use the "${e}" parser.`
591
623
  }))
592
624
  }
593
- }, Wt = /* @__PURE__ */ p({
594
- embedder: () => It,
595
- language: () => M,
596
- options: () => Ut
597
- }), Gt = k({
598
- parser: "hugo-post",
599
- newlineHandling: "hardline",
600
- dedentContent: !0
601
- }), Kt = "embeddedHugo", qt = ["hugo", "hugoPost"], Jt = T(Kt), Yt = E(Kt), Xt = {
602
- [Jt]: {
625
+ }, $t = /* @__PURE__ */ l({
626
+ embedder: () => Gt,
627
+ language: () => j,
628
+ options: () => Qt
629
+ }), en = D({ parser: "hugo-post" }), tn = "embeddedHugo", nn = ["hugo", "hugoPost"], rn = C(tn), an = w(tn), on = {
630
+ [rn]: {
603
631
  category: "Embed",
604
632
  type: "string",
605
633
  array: !0,
606
- default: [{ value: [...qt] }],
634
+ default: [{ value: [...nn] }],
607
635
  description: "Block comments that identify embedded Hugo in template literals. Requires the `@htnabe/prettier-plugin-hugo-post` plugin."
608
636
  },
609
- [Yt]: {
637
+ [an]: {
610
638
  category: "Embed",
611
639
  type: "string",
612
640
  array: !0,
613
- default: [{ value: [...qt] }],
641
+ default: [{ value: [...nn] }],
614
642
  description: "Tags that identify embedded Hugo in template literals. Requires the `@htnabe/prettier-plugin-hugo-post` plugin."
615
643
  }
616
- }, Zt = /* @__PURE__ */ p({
617
- embedder: () => Gt,
618
- language: () => Kt,
619
- options: () => Xt
620
- }), Qt = k({ parser: "ini" }), N = "embeddedIni", $t = [
644
+ }, sn = /* @__PURE__ */ l({
645
+ embedder: () => en,
646
+ language: () => tn,
647
+ options: () => on
648
+ }), cn = D({ parser: "ini" }), M = "embeddedIni", ln = [
621
649
  "ini",
622
650
  "cfg",
623
651
  "pro"
624
- ], en = w(N), tn = T(N), nn = E(N), rn = {
625
- [en]: {
652
+ ], un = S(M), dn = C(M), fn = w(M), pn = {
653
+ [un]: {
626
654
  category: "Embed",
627
655
  type: "string",
628
656
  array: !0,
629
- default: [{ value: [...$t] }],
657
+ default: [{ value: [...ln] }],
630
658
  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.",
631
- deprecated: `Please use \`${tn}\` or \`${nn}\`.`
659
+ deprecated: `Please use \`${dn}\` or \`${fn}\`.`
632
660
  },
633
- [tn]: {
661
+ [dn]: {
634
662
  category: "Embed",
635
663
  type: "string",
636
664
  array: !0,
637
- default: [{ value: [O] }],
665
+ default: [{ value: [E] }],
638
666
  description: "Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
639
667
  },
640
- [nn]: {
668
+ [fn]: {
641
669
  category: "Embed",
642
670
  type: "string",
643
671
  array: !0,
644
- default: [{ value: [O] }],
672
+ default: [{ value: [E] }],
645
673
  description: "Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
646
674
  }
647
- }, an = /* @__PURE__ */ p({
648
- embedder: () => Qt,
649
- language: () => N,
650
- options: () => rn
651
- }), on = k({
652
- parser: "java",
653
- newlineHandling: "hardline"
654
- }), P = "embeddedJava", sn = ["java"], cn = w(P), ln = T(P), un = E(P), dn = {
655
- [cn]: {
675
+ }, mn = /* @__PURE__ */ l({
676
+ embedder: () => cn,
677
+ language: () => M,
678
+ options: () => pn
679
+ }), hn = D({ parser: "java" }), N = "embeddedJava", gn = ["java"], _n = S(N), vn = C(N), yn = w(N), bn = {
680
+ [_n]: {
656
681
  category: "Embed",
657
682
  type: "string",
658
683
  array: !0,
659
- default: [{ value: [...sn] }],
684
+ default: [{ value: [...gn] }],
660
685
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.",
661
- deprecated: `Please use \`${ln}\` or \`${un}\`.`
686
+ deprecated: `Please use \`${vn}\` or \`${yn}\`.`
662
687
  },
663
- [ln]: {
688
+ [vn]: {
664
689
  category: "Embed",
665
690
  type: "string",
666
691
  array: !0,
667
- default: [{ value: [O] }],
692
+ default: [{ value: [E] }],
668
693
  description: "Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
669
694
  },
670
- [un]: {
695
+ [yn]: {
671
696
  category: "Embed",
672
697
  type: "string",
673
698
  array: !0,
674
- default: [{ value: [O] }],
699
+ default: [{ value: [E] }],
675
700
  description: "Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
676
701
  }
677
- }, fn = /* @__PURE__ */ p({
678
- embedder: () => on,
679
- language: () => P,
680
- options: () => dn
681
- }), pn = k({
702
+ }, xn = /* @__PURE__ */ l({
703
+ embedder: () => hn,
704
+ language: () => N,
705
+ options: () => bn
706
+ }), Sn = D({
682
707
  parser: "jinja-template",
683
- markup: !0,
684
- dedentContent: !0
685
- }), mn = "embeddedJinja", hn = [
708
+ markup: !0
709
+ }), Cn = "embeddedJinja", wn = [
686
710
  "jinja",
687
711
  "jinja2",
688
712
  "j2"
689
- ], gn = T(mn), _n = E(mn), vn = {
690
- [gn]: {
713
+ ], Tn = C(Cn), En = w(Cn), Dn = {
714
+ [Tn]: {
691
715
  category: "Embed",
692
716
  type: "string",
693
717
  array: !0,
694
- default: [{ value: [...hn] }],
718
+ default: [{ value: [...wn] }],
695
719
  description: "Block comments that identify embedded Jinja in template literals. Requires the `prettier-plugin-jinja-template` plugin."
696
720
  },
697
- [_n]: {
721
+ [En]: {
698
722
  category: "Embed",
699
723
  type: "string",
700
724
  array: !0,
701
- default: [{ value: [...hn] }],
725
+ default: [{ value: [...wn] }],
702
726
  description: "Tags that identify embedded Jinja in template literals. Requires the `prettier-plugin-jinja-template` plugin."
703
727
  }
704
- }, yn = /* @__PURE__ */ p({
705
- embedder: () => pn,
706
- language: () => mn,
707
- options: () => vn
708
- }), bn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
728
+ }, On = /* @__PURE__ */ l({
729
+ embedder: () => Sn,
730
+ language: () => Cn,
731
+ options: () => Dn
732
+ }), kn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
709
733
  let o = {
710
734
  ...r,
711
735
  ...a
712
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = xn(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = x(n, t);
713
- return b(S(await e(u, {
736
+ }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = An(), { text: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = Ce(n, t);
737
+ return b(x(await e(u, {
714
738
  ...o,
715
739
  parser: o.embeddedJsonParser ?? "json"
716
740
  }), l, p), o, i, d, f);
717
741
  };
718
- function xn() {
719
- let e = ve(), t = ve();
742
+ function An() {
743
+ let e = De(), t = De();
720
744
  return {
721
745
  createPlaceholder: (n) => `'0${e}${n}${t}'`,
722
746
  placeholderRegex: RegExp(`["']?0${e}(\\d+)${t}['"]?`, "ig")
@@ -724,101 +748,101 @@ function xn() {
724
748
  }
725
749
  //#endregion
726
750
  //#region src/embedded/json/language.ts
727
- var F = "embeddedJson", Sn = ["json", "jsonl"], Cn = [
751
+ var P = "embeddedJson", jn = ["json", "jsonl"], Mn = [
728
752
  "json",
729
753
  "json5",
730
754
  "jsonc",
731
755
  "json-stringify"
732
- ], wn = w(F), Tn = T(F), En = E(F), Dn = D(F), On = {
733
- [wn]: {
756
+ ], Nn = S(P), Pn = C(P), Fn = w(P), In = T(P), Ln = {
757
+ [Nn]: {
734
758
  category: "Embed",
735
759
  type: "string",
736
760
  array: !0,
737
- default: [{ value: [...Sn] }],
761
+ default: [{ value: [...jn] }],
738
762
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.",
739
- deprecated: `Please use \`${Tn}\` or \`${En}\`.`
763
+ deprecated: `Please use \`${Pn}\` or \`${Fn}\`.`
740
764
  },
741
- [Tn]: {
765
+ [Pn]: {
742
766
  category: "Embed",
743
767
  type: "string",
744
768
  array: !0,
745
- default: [{ value: [O] }],
769
+ default: [{ value: [E] }],
746
770
  description: "Block comments that make their subsequent template literals be identified as embedded JSON language."
747
771
  },
748
- [En]: {
772
+ [Fn]: {
749
773
  category: "Embed",
750
774
  type: "string",
751
775
  array: !0,
752
- default: [{ value: [O] }],
776
+ default: [{ value: [E] }],
753
777
  description: "Tags that make their subsequent template literals be identified as embedded JSON language."
754
778
  },
755
- [Dn]: {
779
+ [In]: {
756
780
  category: "Embed",
757
781
  type: "choice",
758
782
  default: "json",
759
783
  description: "The parser used to parse the embedded JSON language.",
760
- choices: Cn.map((e) => ({
784
+ choices: Mn.map((e) => ({
761
785
  value: e,
762
786
  description: `Use the "${e}" parser.`
763
787
  }))
764
788
  }
765
- }, kn = /* @__PURE__ */ p({
766
- embedder: () => bn,
767
- language: () => F,
768
- options: () => On
769
- }), An = k({
789
+ }, Rn = /* @__PURE__ */ l({
790
+ embedder: () => kn,
791
+ language: () => P,
792
+ options: () => Ln
793
+ }), zn = D({
770
794
  parser: "JSONata",
771
795
  placeholderPrefix: "$p"
772
- }), I = "embeddedJsonata", jn = ["jsonata"], Mn = w(I), Nn = T(I), Pn = E(I), Fn = {
773
- [Mn]: {
796
+ }), F = "embeddedJsonata", Bn = ["jsonata"], Vn = S(F), Hn = C(F), Un = w(F), Wn = {
797
+ [Vn]: {
774
798
  category: "Embed",
775
799
  type: "string",
776
800
  array: !0,
777
- default: [{ value: [...jn] }],
801
+ default: [{ value: [...Bn] }],
778
802
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.",
779
- deprecated: `Please use \`${Nn}\` or \`${Pn}\`.`
803
+ deprecated: `Please use \`${Hn}\` or \`${Un}\`.`
780
804
  },
781
- [Nn]: {
805
+ [Hn]: {
782
806
  category: "Embed",
783
807
  type: "string",
784
808
  array: !0,
785
- default: [{ value: [O] }],
809
+ default: [{ value: [E] }],
786
810
  description: "Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
787
811
  },
788
- [Pn]: {
812
+ [Un]: {
789
813
  category: "Embed",
790
814
  type: "string",
791
815
  array: !0,
792
- default: [{ value: [O] }],
816
+ default: [{ value: [E] }],
793
817
  description: "Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
794
818
  }
795
- }, In = /* @__PURE__ */ p({
796
- embedder: () => An,
797
- language: () => I,
798
- options: () => Fn
799
- }), Ln = k({
819
+ }, Gn = /* @__PURE__ */ l({
820
+ embedder: () => zn,
821
+ language: () => F,
822
+ options: () => Wn
823
+ }), Kn = D({
800
824
  parser: "jte",
801
825
  markup: !0
802
- }), Rn = "embeddedJte", zn = ["jte"], Bn = T(Rn), Vn = E(Rn), Hn = {
803
- [Bn]: {
826
+ }), qn = "embeddedJte", Jn = ["jte"], Yn = C(qn), Xn = w(qn), Zn = {
827
+ [Yn]: {
804
828
  category: "Embed",
805
829
  type: "string",
806
830
  array: !0,
807
- default: [{ value: [...zn] }],
831
+ default: [{ value: [...Jn] }],
808
832
  description: "Block comments that identify embedded JTE in template literals. Requires the `prettier-plugin-jte` plugin."
809
833
  },
810
- [Vn]: {
834
+ [Xn]: {
811
835
  category: "Embed",
812
836
  type: "string",
813
837
  array: !0,
814
- default: [{ value: [...zn] }],
838
+ default: [{ value: [...Jn] }],
815
839
  description: "Tags that identify embedded JTE in template literals. Requires the `prettier-plugin-jte` plugin."
816
840
  }
817
- }, Un = /* @__PURE__ */ p({
818
- embedder: () => Ln,
819
- language: () => Rn,
820
- options: () => Hn
821
- }), Wn = k({ parser: "latex-parser" }), L = "embeddedLatex", Gn = [
841
+ }, Qn = /* @__PURE__ */ l({
842
+ embedder: () => Kn,
843
+ language: () => qn,
844
+ options: () => Zn
845
+ }), $n = D({ parser: "latex-parser" }), I = "embeddedLatex", er = [
822
846
  "latex",
823
847
  "tex",
824
848
  "aux",
@@ -827,537 +851,500 @@ var F = "embeddedJson", Sn = ["json", "jsonl"], Cn = [
827
851
  "bib",
828
852
  "toc",
829
853
  "sty"
830
- ], Kn = w(L), qn = T(L), Jn = E(L), Yn = {
831
- [Kn]: {
854
+ ], tr = S(I), nr = C(I), rr = w(I), ir = {
855
+ [tr]: {
832
856
  category: "Embed",
833
857
  type: "string",
834
858
  array: !0,
835
- default: [{ value: [...Gn] }],
859
+ default: [{ value: [...er] }],
836
860
  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.",
837
- deprecated: `Please use \`${qn}\` or \`${Jn}\`.`
861
+ deprecated: `Please use \`${nr}\` or \`${rr}\`.`
838
862
  },
839
- [qn]: {
863
+ [nr]: {
840
864
  category: "Embed",
841
865
  type: "string",
842
866
  array: !0,
843
- default: [{ value: [O] }],
867
+ default: [{ value: [E] }],
844
868
  description: "Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
845
869
  },
846
- [Jn]: {
870
+ [rr]: {
847
871
  category: "Embed",
848
872
  type: "string",
849
873
  array: !0,
850
- default: [{ value: [O] }],
874
+ default: [{ value: [E] }],
851
875
  description: "Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
852
876
  }
853
- }, Xn = /* @__PURE__ */ p({
854
- embedder: () => Wn,
855
- language: () => L,
856
- options: () => Yn
857
- }), Zn = k({
877
+ }, ar = /* @__PURE__ */ l({
878
+ embedder: () => $n,
879
+ language: () => I,
880
+ options: () => ir
881
+ }), or = D({
858
882
  parser: "liquid-html",
859
883
  markup: !0
860
- }), Qn = "embeddedLiquid", $n = ["liquid"], er = T(Qn), tr = E(Qn), nr = {
861
- [er]: {
884
+ }), sr = "embeddedLiquid", cr = ["liquid"], lr = C(sr), ur = w(sr), dr = {
885
+ [lr]: {
862
886
  category: "Embed",
863
887
  type: "string",
864
888
  array: !0,
865
- default: [{ value: [...$n] }],
889
+ default: [{ value: [...cr] }],
866
890
  description: "Block comments that identify embedded Liquid in template literals. Requires the `@shopify/prettier-plugin-liquid` plugin."
867
891
  },
868
- [tr]: {
892
+ [ur]: {
869
893
  category: "Embed",
870
894
  type: "string",
871
895
  array: !0,
872
- default: [{ value: [...$n] }],
896
+ default: [{ value: [...cr] }],
873
897
  description: "Tags that identify embedded Liquid in template literals. Requires the `@shopify/prettier-plugin-liquid` plugin."
874
898
  }
875
- }, rr = /* @__PURE__ */ p({
876
- embedder: () => Zn,
877
- language: () => Qn,
878
- options: () => nr
879
- }), { line: ir, group: R, indent: ar, softline: or, dedentToRoot: sr, literalline: cr } = e, lr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
880
- let o = {
881
- ...r,
882
- ...a
883
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = C(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = x(n, t), m = S(await e(re(u), {
884
- ...o,
885
- parser: o.embeddedMarkdownParser ?? "markdown",
886
- __inJsTemplate: !0
887
- }), l, p, "hardline");
888
- if (o.preserveEmbeddedExteriorWhitespaces?.includes(i)) return R([
889
- "`",
890
- d,
891
- o.noEmbeddedMultiLineIndentation?.includes(i) ? sr(R(m)) : ar([R(m)]),
892
- f,
893
- "`"
894
- ]);
895
- let h = d.length ? ir : or, ee = f.length ? ir : or;
896
- return o.noEmbeddedMultiLineIndentation?.includes(i) ? [
897
- "`",
898
- cr,
899
- sr(m),
900
- or,
901
- "`"
902
- ] : R([
903
- "`",
904
- ar([h, R(m)]),
905
- ee,
906
- "`"
907
- ]);
908
- }, z = "embeddedMarkdown", ur = ["md", "markdown"], dr = [
899
+ }, fr = /* @__PURE__ */ l({
900
+ embedder: () => or,
901
+ language: () => sr,
902
+ options: () => dr
903
+ }), pr = D({
904
+ parser: "markdown",
905
+ parserOption: "embeddedMarkdownParser",
906
+ parserOptions: { __inJsTemplate: !0 }
907
+ }), L = "embeddedMarkdown", mr = ["md", "markdown"], hr = [
909
908
  "markdown",
910
909
  "mdx",
911
910
  "remark"
912
- ], fr = w(z), pr = T(z), mr = E(z), hr = D(z), gr = {
913
- [fr]: {
911
+ ], gr = S(L), _r = C(L), vr = w(L), yr = T(L), br = {
912
+ [gr]: {
914
913
  category: "Embed",
915
914
  type: "string",
916
915
  array: !0,
917
- default: [{ value: [...ur] }],
916
+ default: [{ value: [...mr] }],
918
917
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.",
919
- deprecated: `Please use \`${pr}\` or \`${mr}\`.`
918
+ deprecated: `Please use \`${_r}\` or \`${vr}\`.`
920
919
  },
921
- [pr]: {
920
+ [_r]: {
922
921
  category: "Embed",
923
922
  type: "string",
924
923
  array: !0,
925
- default: [{ value: [O] }],
924
+ default: [{ value: [E] }],
926
925
  description: "Block comments that make their subsequent template literals be identified as embedded Markdown language."
927
926
  },
928
- [mr]: {
927
+ [vr]: {
929
928
  category: "Embed",
930
929
  type: "string",
931
930
  array: !0,
932
- default: [{ value: [O] }],
931
+ default: [{ value: [E] }],
933
932
  description: "Tags that make their subsequent template literals be identified as embedded Markdown language."
934
933
  },
935
- [hr]: {
934
+ [yr]: {
936
935
  category: "Embed",
937
936
  type: "choice",
938
937
  default: "markdown",
939
938
  description: "The parser used to parse the embedded Markdown language.",
940
- choices: dr.map((e) => ({
939
+ choices: hr.map((e) => ({
941
940
  value: e,
942
941
  description: `Use the "${e}" parser.`
943
942
  }))
944
943
  }
945
- }, _r = /* @__PURE__ */ p({
946
- embedder: () => lr,
947
- language: () => z,
948
- options: () => gr
949
- }), vr = k({
944
+ }, xr = /* @__PURE__ */ l({
945
+ embedder: () => pr,
946
+ language: () => L,
947
+ options: () => br
948
+ }), Sr = D({
950
949
  parser: "marko",
951
950
  markup: !0
952
- }), yr = "embeddedMarko", br = ["marko"], xr = T(yr), Sr = E(yr), Cr = {
953
- [xr]: {
951
+ }), Cr = "embeddedMarko", wr = ["marko"], Tr = C(Cr), Er = w(Cr), Dr = {
952
+ [Tr]: {
954
953
  category: "Embed",
955
954
  type: "string",
956
955
  array: !0,
957
- default: [{ value: [...br] }],
956
+ default: [{ value: [...wr] }],
958
957
  description: "Block comments that identify embedded Marko in template literals. Requires the `prettier-plugin-marko` plugin."
959
958
  },
960
- [Sr]: {
959
+ [Er]: {
961
960
  category: "Embed",
962
961
  type: "string",
963
962
  array: !0,
964
- default: [{ value: [...br] }],
963
+ default: [{ value: [...wr] }],
965
964
  description: "Tags that identify embedded Marko in template literals. Requires the `prettier-plugin-marko` plugin."
966
965
  }
967
- }, wr = /* @__PURE__ */ p({
968
- embedder: () => vr,
969
- language: () => yr,
970
- options: () => Cr
971
- }), Tr = k({
966
+ }, Or = /* @__PURE__ */ l({
967
+ embedder: () => Sr,
968
+ language: () => Cr,
969
+ options: () => Dr
970
+ }), kr = D({
972
971
  parser: "motoko-tt-parse",
973
- transformDoc: Er
972
+ transformDoc: Ar
974
973
  });
975
- function Er(e) {
974
+ function Ar(e) {
976
975
  if (!Array.isArray(e)) return e;
977
976
  let t = e.at(-1);
978
977
  return t && !Array.isArray(t) && typeof t == "object" && t.type === "line" && t.hard && t.literal ? e.slice(0, -1) : e;
979
978
  }
980
979
  //#endregion
981
980
  //#region src/embedded/motoko/language.ts
982
- var Dr = "embeddedMotoko", Or = ["motoko", "mo"], kr = T(Dr), Ar = E(Dr), jr = {
983
- [kr]: {
981
+ var jr = "embeddedMotoko", Mr = ["motoko", "mo"], Nr = C(jr), Pr = w(jr), Fr = {
982
+ [Nr]: {
984
983
  category: "Embed",
985
984
  type: "string",
986
985
  array: !0,
987
- default: [{ value: [...Or] }],
986
+ default: [{ value: [...Mr] }],
988
987
  description: "Block comments that identify embedded Motoko in template literals. Requires the `prettier-plugin-motoko` plugin."
989
988
  },
990
- [Ar]: {
989
+ [Pr]: {
991
990
  category: "Embed",
992
991
  type: "string",
993
992
  array: !0,
994
- default: [{ value: [...Or] }],
993
+ default: [{ value: [...Mr] }],
995
994
  description: "Tags that identify embedded Motoko in template literals. Requires the `prettier-plugin-motoko` plugin."
996
995
  }
997
- }, Mr = /* @__PURE__ */ p({
998
- embedder: () => Tr,
999
- language: () => Dr,
1000
- options: () => jr
1001
- }), Nr = k({
996
+ }, Ir = /* @__PURE__ */ l({
997
+ embedder: () => kr,
998
+ language: () => jr,
999
+ options: () => Fr
1000
+ }), Lr = D({
1002
1001
  parser: "mustache",
1003
1002
  markup: !0
1004
- }), Pr = "embeddedMustache", Fr = ["mustache"], Ir = T(Pr), Lr = E(Pr), Rr = {
1005
- [Ir]: {
1003
+ }), Rr = "embeddedMustache", zr = ["mustache"], Br = C(Rr), Vr = w(Rr), Hr = {
1004
+ [Br]: {
1006
1005
  category: "Embed",
1007
1006
  type: "string",
1008
1007
  array: !0,
1009
- default: [{ value: [...Fr] }],
1008
+ default: [{ value: [...zr] }],
1010
1009
  description: "Block comments that identify embedded Mustache in template literals. Requires the `prettier-plugin-mustache` plugin."
1011
1010
  },
1012
- [Lr]: {
1011
+ [Vr]: {
1013
1012
  category: "Embed",
1014
1013
  type: "string",
1015
1014
  array: !0,
1016
- default: [{ value: [...Fr] }],
1015
+ default: [{ value: [...zr] }],
1017
1016
  description: "Tags that identify embedded Mustache in template literals. Requires the `prettier-plugin-mustache` plugin."
1018
1017
  }
1019
- }, zr = /* @__PURE__ */ p({
1020
- embedder: () => Nr,
1021
- language: () => Pr,
1022
- options: () => Rr
1023
- }), Br = k({ parser: "nginx" }), B = "embeddedNginx", Vr = ["nginx"], Hr = w(B), Ur = T(B), Wr = E(B), Gr = {
1024
- [Hr]: {
1018
+ }, Ur = /* @__PURE__ */ l({
1019
+ embedder: () => Lr,
1020
+ language: () => Rr,
1021
+ options: () => Hr
1022
+ }), Wr = D({ parser: "nginx" }), R = "embeddedNginx", Gr = ["nginx"], Kr = S(R), qr = C(R), Jr = w(R), Yr = {
1023
+ [Kr]: {
1025
1024
  category: "Embed",
1026
1025
  type: "string",
1027
1026
  array: !0,
1028
- default: [{ value: [...Vr] }],
1027
+ default: [{ value: [...Gr] }],
1029
1028
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.",
1030
- deprecated: `Please use \`${Ur}\` or \`${Wr}\`.`
1029
+ deprecated: `Please use \`${qr}\` or \`${Jr}\`.`
1031
1030
  },
1032
- [Ur]: {
1031
+ [qr]: {
1033
1032
  category: "Embed",
1034
1033
  type: "string",
1035
1034
  array: !0,
1036
- default: [{ value: [O] }],
1035
+ default: [{ value: [E] }],
1037
1036
  description: "Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
1038
1037
  },
1039
- [Wr]: {
1038
+ [Jr]: {
1040
1039
  category: "Embed",
1041
1040
  type: "string",
1042
1041
  array: !0,
1043
- default: [{ value: [O] }],
1042
+ default: [{ value: [E] }],
1044
1043
  description: "Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
1045
1044
  }
1046
- }, Kr = /* @__PURE__ */ p({
1047
- embedder: () => Br,
1048
- language: () => B,
1049
- options: () => Gr
1050
- }), V = "embeddedNoop", qr = w(V), Jr = T(V), Yr = E(V), Xr = {
1051
- [qr]: {
1045
+ }, Xr = /* @__PURE__ */ l({
1046
+ embedder: () => Wr,
1047
+ language: () => R,
1048
+ options: () => Yr
1049
+ }), z = "embeddedNoop", Zr = S(z), Qr = C(z), $r = w(z), ei = {
1050
+ [Zr]: {
1052
1051
  category: "Embed",
1053
1052
  type: "string",
1054
1053
  array: !0,
1055
1054
  default: [{ value: [] }],
1056
1055
  description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.",
1057
- deprecated: `Please use \`${Jr}\` or \`${Yr}\`.`
1056
+ deprecated: `Please use \`${Qr}\` or \`${$r}\`.`
1058
1057
  },
1059
- [Jr]: {
1058
+ [Qr]: {
1060
1059
  category: "Embed",
1061
1060
  type: "string",
1062
1061
  array: !0,
1063
- default: [{ value: [O] }],
1062
+ default: [{ value: [E] }],
1064
1063
  description: "Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
1065
1064
  },
1066
- [Yr]: {
1065
+ [$r]: {
1067
1066
  category: "Embed",
1068
1067
  type: "string",
1069
1068
  array: !0,
1070
- default: [{ value: [O] }],
1069
+ default: [{ value: [E] }],
1071
1070
  description: "Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
1072
1071
  }
1073
- }, Zr = /* @__PURE__ */ p({
1074
- language: () => V,
1075
- options: () => Xr
1076
- }), Qr = k({
1072
+ }, ti = /* @__PURE__ */ l({
1073
+ language: () => z,
1074
+ options: () => ei
1075
+ }), ni = D({
1077
1076
  parser: "nunjucks",
1078
1077
  markup: !0
1079
- }), $r = "embeddedNunjucks", ei = ["nunjucks", "njk"], ti = T($r), ni = E($r), ri = {
1080
- [ti]: {
1078
+ }), ri = "embeddedNunjucks", ii = ["nunjucks", "njk"], ai = C(ri), oi = w(ri), si = {
1079
+ [ai]: {
1081
1080
  category: "Embed",
1082
1081
  type: "string",
1083
1082
  array: !0,
1084
- default: [{ value: [...ei] }],
1083
+ default: [{ value: [...ii] }],
1085
1084
  description: "Block comments that identify embedded Nunjucks in template literals. Requires the `prettier-plugin-nunjucks` plugin."
1086
1085
  },
1087
- [ni]: {
1086
+ [oi]: {
1088
1087
  category: "Embed",
1089
1088
  type: "string",
1090
1089
  array: !0,
1091
- default: [{ value: [...ei] }],
1090
+ default: [{ value: [...ii] }],
1092
1091
  description: "Tags that identify embedded Nunjucks in template literals. Requires the `prettier-plugin-nunjucks` plugin."
1093
1092
  }
1094
- }, ii = /* @__PURE__ */ p({
1095
- embedder: () => Qr,
1096
- language: () => $r,
1097
- options: () => ri
1098
- }), ai = k({ parser: "pegjs-parser" }), H = "embeddedPegjs", oi = [
1093
+ }, ci = /* @__PURE__ */ l({
1094
+ embedder: () => ni,
1095
+ language: () => ri,
1096
+ options: () => si
1097
+ }), li = D({ parser: "pegjs-parser" }), B = "embeddedPegjs", ui = [
1099
1098
  "pegjs",
1100
1099
  "peggy",
1101
1100
  "peg"
1102
- ], si = w(H), ci = T(H), li = E(H), ui = {
1103
- [si]: {
1101
+ ], di = S(B), fi = C(B), pi = w(B), mi = {
1102
+ [di]: {
1104
1103
  category: "Embed",
1105
1104
  type: "string",
1106
1105
  array: !0,
1107
- default: [{ value: [...oi] }],
1106
+ default: [{ value: [...ui] }],
1108
1107
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.",
1109
- deprecated: `Please use \`${ci}\` or \`${li}\`.`
1108
+ deprecated: `Please use \`${fi}\` or \`${pi}\`.`
1110
1109
  },
1111
- [ci]: {
1110
+ [fi]: {
1112
1111
  category: "Embed",
1113
1112
  type: "string",
1114
1113
  array: !0,
1115
- default: [{ value: [O] }],
1114
+ default: [{ value: [E] }],
1116
1115
  description: "Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
1117
1116
  },
1118
- [li]: {
1117
+ [pi]: {
1119
1118
  category: "Embed",
1120
1119
  type: "string",
1121
1120
  array: !0,
1122
- default: [{ value: [O] }],
1121
+ default: [{ value: [E] }],
1123
1122
  description: "Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
1124
1123
  }
1125
- }, di = /* @__PURE__ */ p({
1126
- embedder: () => ai,
1127
- language: () => H,
1128
- options: () => ui
1129
- }), fi = k({
1124
+ }, hi = /* @__PURE__ */ l({
1125
+ embedder: () => li,
1126
+ language: () => B,
1127
+ options: () => mi
1128
+ }), gi = D({
1130
1129
  parser: "php",
1131
1130
  placeholderPrefix: "$p"
1132
- }), U = "embeddedPhp", pi = ["php", "php5"], mi = w(U), hi = T(U), gi = E(U), _i = {
1133
- [mi]: {
1131
+ }), V = "embeddedPhp", _i = ["php", "php5"], vi = S(V), yi = C(V), bi = w(V), xi = {
1132
+ [vi]: {
1134
1133
  category: "Embed",
1135
1134
  type: "string",
1136
1135
  array: !0,
1137
- default: [{ value: [...pi] }],
1136
+ default: [{ value: [..._i] }],
1138
1137
  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.",
1139
- deprecated: `Please use \`${hi}\` or \`${gi}\`.`
1138
+ deprecated: `Please use \`${yi}\` or \`${bi}\`.`
1140
1139
  },
1141
- [hi]: {
1140
+ [yi]: {
1142
1141
  category: "Embed",
1143
1142
  type: "string",
1144
1143
  array: !0,
1145
- default: [{ value: [O] }],
1144
+ default: [{ value: [E] }],
1146
1145
  description: "Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
1147
1146
  },
1148
- [gi]: {
1147
+ [bi]: {
1149
1148
  category: "Embed",
1150
1149
  type: "string",
1151
1150
  array: !0,
1152
- default: [{ value: [O] }],
1151
+ default: [{ value: [E] }],
1153
1152
  description: "Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
1154
1153
  }
1155
- }, vi = /* @__PURE__ */ p({
1156
- embedder: () => fi,
1157
- language: () => U,
1158
- options: () => _i
1159
- }), yi = k({
1160
- parser: "powershell",
1161
- newlineHandling: "hardline"
1162
- }), bi = "embeddedPowerShell", xi = ["powershell", "ps1"], Si = T(bi), Ci = E(bi), wi = {
1163
- [Si]: {
1154
+ }, Si = /* @__PURE__ */ l({
1155
+ embedder: () => gi,
1156
+ language: () => V,
1157
+ options: () => xi
1158
+ }), Ci = D({ parser: "powershell" }), wi = "embeddedPowerShell", Ti = ["powershell", "ps1"], Ei = C(wi), Di = w(wi), Oi = {
1159
+ [Ei]: {
1164
1160
  category: "Embed",
1165
1161
  type: "string",
1166
1162
  array: !0,
1167
- default: [{ value: [...xi] }],
1163
+ default: [{ value: [...Ti] }],
1168
1164
  description: "Block comments that identify embedded PowerShell in template literals. Requires the `prettier-plugin-powershell` plugin."
1169
1165
  },
1170
- [Ci]: {
1166
+ [Di]: {
1171
1167
  category: "Embed",
1172
1168
  type: "string",
1173
1169
  array: !0,
1174
- default: [{ value: [...xi] }],
1170
+ default: [{ value: [...Ti] }],
1175
1171
  description: "Tags that identify embedded PowerShell in template literals. Requires the `prettier-plugin-powershell` plugin."
1176
1172
  }
1177
- }, Ti = /* @__PURE__ */ p({
1178
- embedder: () => yi,
1179
- language: () => bi,
1180
- options: () => wi
1181
- }), Ei = k({
1182
- parser: "prisma-parse",
1183
- newlineHandling: "hardline"
1184
- }), W = "embeddedPrisma", Di = ["prisma"], Oi = w(W), ki = T(W), Ai = E(W), ji = {
1185
- [Oi]: {
1173
+ }, ki = /* @__PURE__ */ l({
1174
+ embedder: () => Ci,
1175
+ language: () => wi,
1176
+ options: () => Oi
1177
+ }), Ai = D({ parser: "prisma-parse" }), H = "embeddedPrisma", ji = ["prisma"], Mi = S(H), Ni = C(H), Pi = w(H), Fi = {
1178
+ [Mi]: {
1186
1179
  category: "Embed",
1187
1180
  type: "string",
1188
1181
  array: !0,
1189
- default: [{ value: [...Di] }],
1182
+ default: [{ value: [...ji] }],
1190
1183
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.",
1191
- deprecated: `Please use \`${ki}\` or \`${Ai}\`.`
1184
+ deprecated: `Please use \`${Ni}\` or \`${Pi}\`.`
1192
1185
  },
1193
- [ki]: {
1186
+ [Ni]: {
1194
1187
  category: "Embed",
1195
1188
  type: "string",
1196
1189
  array: !0,
1197
- default: [{ value: [O] }],
1190
+ default: [{ value: [E] }],
1198
1191
  description: "Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
1199
1192
  },
1200
- [Ai]: {
1193
+ [Pi]: {
1201
1194
  category: "Embed",
1202
1195
  type: "string",
1203
1196
  array: !0,
1204
- default: [{ value: [O] }],
1197
+ default: [{ value: [E] }],
1205
1198
  description: "Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
1206
1199
  }
1207
- }, Mi = /* @__PURE__ */ p({
1208
- embedder: () => Ei,
1209
- language: () => W,
1210
- options: () => ji
1211
- }), Ni = k({ parser: "dot-properties" }), G = "embeddedProperties", Pi = ["properties"], Fi = w(G), Ii = T(G), Li = E(G), Ri = {
1212
- [Fi]: {
1200
+ }, Ii = /* @__PURE__ */ l({
1201
+ embedder: () => Ai,
1202
+ language: () => H,
1203
+ options: () => Fi
1204
+ }), Li = D({ parser: "dot-properties" }), U = "embeddedProperties", Ri = ["properties"], zi = S(U), Bi = C(U), Vi = w(U), Hi = {
1205
+ [zi]: {
1213
1206
  category: "Embed",
1214
1207
  type: "string",
1215
1208
  array: !0,
1216
- default: [{ value: [...Pi] }],
1209
+ default: [{ value: [...Ri] }],
1217
1210
  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.",
1218
- deprecated: `Please use \`${Ii}\` or \`${Li}\`.`
1211
+ deprecated: `Please use \`${Bi}\` or \`${Vi}\`.`
1219
1212
  },
1220
- [Ii]: {
1213
+ [Bi]: {
1221
1214
  category: "Embed",
1222
1215
  type: "string",
1223
1216
  array: !0,
1224
- default: [{ value: [O] }],
1217
+ default: [{ value: [E] }],
1225
1218
  description: "Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
1226
1219
  },
1227
- [Li]: {
1220
+ [Vi]: {
1228
1221
  category: "Embed",
1229
1222
  type: "string",
1230
1223
  array: !0,
1231
- default: [{ value: [O] }],
1224
+ default: [{ value: [E] }],
1232
1225
  description: "Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
1233
1226
  }
1234
- }, zi = /* @__PURE__ */ p({
1235
- embedder: () => Ni,
1236
- language: () => G,
1237
- options: () => Ri
1238
- }), Bi = k({
1239
- parser: "pug",
1240
- newlineHandling: "hardline"
1241
- }), Vi = "embeddedPug", Hi = ["pug", "jade"], Ui = w(Vi), Wi = T(Vi), Gi = E(Vi), Ki = {
1242
- [Ui]: {
1227
+ }, Ui = /* @__PURE__ */ l({
1228
+ embedder: () => Li,
1229
+ language: () => U,
1230
+ options: () => Hi
1231
+ }), Wi = D({ parser: "pug" }), W = "embeddedPug", Gi = ["pug", "jade"], Ki = S(W), qi = C(W), Ji = w(W), Yi = {
1232
+ [Ki]: {
1243
1233
  category: "Embed",
1244
1234
  type: "string",
1245
1235
  array: !0,
1246
- default: [{ value: [...Hi] }],
1236
+ default: [{ value: [...Gi] }],
1247
1237
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.",
1248
- deprecated: `Please use \`${Wi}\` or \`${Gi}\`.`
1238
+ deprecated: `Please use \`${qi}\` or \`${Ji}\`.`
1249
1239
  },
1250
- [Wi]: {
1240
+ [qi]: {
1251
1241
  category: "Embed",
1252
1242
  type: "string",
1253
1243
  array: !0,
1254
- default: [{ value: [O] }],
1244
+ default: [{ value: [E] }],
1255
1245
  description: "Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
1256
1246
  },
1257
- [Gi]: {
1247
+ [Ji]: {
1258
1248
  category: "Embed",
1259
1249
  type: "string",
1260
1250
  array: !0,
1261
- default: [{ value: [O] }],
1251
+ default: [{ value: [E] }],
1262
1252
  description: "Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
1263
1253
  }
1264
- }, qi = /* @__PURE__ */ p({
1265
- embedder: () => Bi,
1266
- language: () => Vi,
1267
- options: () => Ki
1268
- }), Ji = k({
1254
+ }, Xi = /* @__PURE__ */ l({
1255
+ embedder: () => Wi,
1256
+ language: () => W,
1257
+ options: () => Yi
1258
+ }), Zi = D({
1269
1259
  parser: "ruby",
1270
1260
  parserOption: "embeddedRubyParser"
1271
- }), K = "embeddedRuby", Yi = ["ruby"], Xi = [
1261
+ }), G = "embeddedRuby", Qi = ["ruby"], $i = [
1272
1262
  "ruby",
1273
1263
  "rbs",
1274
1264
  "haml"
1275
- ], Zi = w(K), Qi = T(K), $i = E(K), ea = D(K), ta = {
1276
- [Zi]: {
1265
+ ], ea = S(G), ta = C(G), na = w(G), ra = T(G), ia = {
1266
+ [ea]: {
1277
1267
  category: "Embed",
1278
1268
  type: "string",
1279
1269
  array: !0,
1280
- default: [{ value: [...Yi] }],
1270
+ default: [{ value: [...Qi] }],
1281
1271
  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.",
1282
- deprecated: `Please use \`${Qi}\` or \`${$i}\`.`
1272
+ deprecated: `Please use \`${ta}\` or \`${na}\`.`
1283
1273
  },
1284
- [Qi]: {
1274
+ [ta]: {
1285
1275
  category: "Embed",
1286
1276
  type: "string",
1287
1277
  array: !0,
1288
- default: [{ value: [O] }],
1278
+ default: [{ value: [E] }],
1289
1279
  description: "Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
1290
1280
  },
1291
- [$i]: {
1281
+ [na]: {
1292
1282
  category: "Embed",
1293
1283
  type: "string",
1294
1284
  array: !0,
1295
- default: [{ value: [O] }],
1285
+ default: [{ value: [E] }],
1296
1286
  description: "Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
1297
1287
  },
1298
- [ea]: {
1288
+ [ra]: {
1299
1289
  category: "Embed",
1300
1290
  type: "choice",
1301
1291
  default: "ruby",
1302
1292
  description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
1303
- choices: Xi.map((e) => ({
1293
+ choices: $i.map((e) => ({
1304
1294
  value: e,
1305
1295
  description: `Use the "${e}" parser.`
1306
1296
  }))
1307
1297
  }
1308
- }, na = /* @__PURE__ */ p({
1309
- embedder: () => Ji,
1310
- language: () => K,
1311
- options: () => ta
1312
- }), ra = k({
1313
- parser: "sh",
1314
- newlineHandling: "hardline"
1315
- }), ia = "embeddedSh", aa = ["sh"], oa = w(ia), sa = T(ia), ca = E(ia), la = {
1316
- [oa]: {
1298
+ }, aa = /* @__PURE__ */ l({
1299
+ embedder: () => Zi,
1300
+ language: () => G,
1301
+ options: () => ia
1302
+ }), oa = D({ parser: "sh" }), sa = "embeddedSh", ca = ["sh"], la = S(sa), ua = C(sa), da = w(sa), fa = {
1303
+ [la]: {
1317
1304
  category: "Embed",
1318
1305
  type: "string",
1319
1306
  array: !0,
1320
- default: [{ value: [...aa] }],
1307
+ default: [{ value: [...ca] }],
1321
1308
  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.",
1322
- deprecated: `Please use \`${sa}\` or \`${ca}\`.`
1309
+ deprecated: `Please use \`${ua}\` or \`${da}\`.`
1323
1310
  },
1324
- [sa]: {
1311
+ [ua]: {
1325
1312
  category: "Embed",
1326
1313
  type: "string",
1327
1314
  array: !0,
1328
- default: [{ value: [O] }],
1315
+ default: [{ value: [E] }],
1329
1316
  description: "Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
1330
1317
  },
1331
- [ca]: {
1318
+ [da]: {
1332
1319
  category: "Embed",
1333
1320
  type: "string",
1334
1321
  array: !0,
1335
- default: [{ value: [O] }],
1322
+ default: [{ value: [E] }],
1336
1323
  description: "Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
1337
1324
  }
1338
- }, ua = /* @__PURE__ */ p({
1339
- embedder: () => ra,
1340
- language: () => ia,
1341
- options: () => la
1342
- }), q = "embeddedSolidity", da = k({
1325
+ }, pa = /* @__PURE__ */ l({
1326
+ embedder: () => oa,
1327
+ language: () => sa,
1328
+ options: () => fa
1329
+ }), K = "embeddedSolidity", ma = D({
1343
1330
  parser: "slang",
1344
- parserOption: `${q}Parser`
1345
- }), fa = ["solidity", "sol"], pa = T(q), ma = E(q), ha = `${q}Parser`, ga = {
1346
- [pa]: {
1331
+ parserOption: `${K}Parser`
1332
+ }), ha = ["solidity", "sol"], ga = C(K), _a = w(K), va = `${K}Parser`, ya = {
1333
+ [ga]: {
1347
1334
  category: "Embed",
1348
1335
  type: "string",
1349
1336
  array: !0,
1350
- default: [{ value: [...fa] }],
1337
+ default: [{ value: [...ha] }],
1351
1338
  description: "Block comments that identify embedded Solidity in template literals. Requires the `prettier-plugin-solidity` plugin."
1352
1339
  },
1353
- [ma]: {
1340
+ [_a]: {
1354
1341
  category: "Embed",
1355
1342
  type: "string",
1356
1343
  array: !0,
1357
- default: [{ value: [...fa] }],
1344
+ default: [{ value: [...ha] }],
1358
1345
  description: "Tags that identify embedded Solidity in template literals. Requires the `prettier-plugin-solidity` plugin."
1359
1346
  },
1360
- [ha]: {
1347
+ [va]: {
1361
1348
  category: "Embed",
1362
1349
  type: "choice",
1363
1350
  default: "slang",
@@ -1377,221 +1364,222 @@ var Dr = "embeddedMotoko", Or = ["motoko", "mo"], kr = T(Dr), Ar = E(Dr), jr = {
1377
1364
  }
1378
1365
  ]
1379
1366
  }
1380
- }, _a = /* @__PURE__ */ p({
1381
- embedder: () => da,
1382
- language: () => q,
1383
- options: () => ga
1384
- }), va = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1367
+ }, ba = /* @__PURE__ */ l({
1368
+ embedder: () => ma,
1369
+ language: () => K,
1370
+ options: () => ya
1371
+ }), xa = /\n[\t ]*$/, Sa = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1385
1372
  let o = {
1386
1373
  ...r,
1387
1374
  ...a
1388
- }, s = o.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: c } = n, { createPlaceholder: l, placeholderRegex: u } = C(), { trimmedText: d, leadingWhitespaces: f, trailingWhitespaces: p } = y(c, l), m = x(n, t, o, !1), h;
1389
- if (s === "prettier-plugin-sql-cst") h = S(await e(d, {
1375
+ }, s = o.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: c } = n, { createPlaceholder: l, placeholderRegex: u } = Oe(), { text: d, leadingWhitespaces: f, trailingWhitespaces: p } = y(c, l), m = Ce(n, t, o, !1), h;
1376
+ if (s === "prettier-plugin-sql-cst") h = x(await e(d, {
1390
1377
  ...o,
1391
1378
  parser: o.embeddedSqlParser ?? "sqlite"
1392
1379
  }), u, m);
1393
1380
  else {
1394
- let t = new Set(c.quasis.slice(0, -1).flatMap((e, t) => /\n[\t ]*$/.test(e.value.raw) ? [t] : []));
1395
- h = S(await e(re(d), {
1381
+ let t = /* @__PURE__ */ new Set();
1382
+ for (let e = 0; e < c.expressions.length; e++) xa.test(c.quasis[e].value.raw) && t.add(e);
1383
+ h = x(await e(d, {
1396
1384
  ...o,
1397
1385
  parser: "sql"
1398
- }), u, m, "hardline", t, o.tabWidth ?? 2);
1386
+ }), u, m, {
1387
+ lineBreakBeforeExpressions: t,
1388
+ interpolationTabWidth: o.tabWidth ?? 2
1389
+ });
1399
1390
  }
1400
1391
  return b(h, o, i, f, p);
1401
- }, J = "embeddedSql", ya = ["sql"], ba = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], xa = [
1392
+ }, q = "embeddedSql", Ca = ["sql"], wa = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Ta = [
1402
1393
  "sqlite",
1403
1394
  "bigquery",
1404
1395
  "mysql",
1405
1396
  "mariadb",
1406
1397
  "postgresql"
1407
- ], Sa = w(J), Ca = T(J), wa = E(J), Ta = be(J), Ea = D(J), Da = {
1408
- [Sa]: {
1398
+ ], Ea = S(q), Da = C(q), Oa = w(q), ka = Ae(q), Aa = T(q), ja = {
1399
+ [Ea]: {
1409
1400
  category: "Embed",
1410
1401
  type: "string",
1411
1402
  array: !0,
1412
- default: [{ value: [...ya] }],
1403
+ default: [{ value: [...Ca] }],
1413
1404
  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.",
1414
- deprecated: `Please use \`${Ca}\` or \`${wa}\`.`
1405
+ deprecated: `Please use \`${Da}\` or \`${Oa}\`.`
1415
1406
  },
1416
- [Ca]: {
1407
+ [Da]: {
1417
1408
  category: "Embed",
1418
1409
  type: "string",
1419
1410
  array: !0,
1420
- default: [{ value: [O] }],
1411
+ default: [{ value: [E] }],
1421
1412
  description: "Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
1422
1413
  },
1423
- [wa]: {
1414
+ [Oa]: {
1424
1415
  category: "Embed",
1425
1416
  type: "string",
1426
1417
  array: !0,
1427
- default: [{ value: [O] }],
1418
+ default: [{ value: [E] }],
1428
1419
  description: "Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
1429
1420
  },
1430
- [Ta]: {
1421
+ [ka]: {
1431
1422
  category: "Embed",
1432
1423
  type: "choice",
1433
1424
  default: "prettier-plugin-sql",
1434
1425
  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.",
1435
- choices: ba.map((e) => ({
1426
+ choices: wa.map((e) => ({
1436
1427
  value: e,
1437
1428
  description: `Use the "${e}" plugin.`
1438
1429
  }))
1439
1430
  },
1440
- [Ea]: {
1431
+ [Aa]: {
1441
1432
  category: "Embed",
1442
1433
  type: "choice",
1443
1434
  default: "sqlite",
1444
1435
  description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
1445
- choices: xa.map((e) => ({
1436
+ choices: Ta.map((e) => ({
1446
1437
  value: e,
1447
1438
  description: `Use the "${e}" parser.`
1448
1439
  }))
1449
1440
  }
1450
- }, Oa = /* @__PURE__ */ p({
1451
- embedder: () => va,
1452
- language: () => J,
1453
- options: () => Da
1454
- }), ka = k({
1441
+ }, Ma = /* @__PURE__ */ l({
1442
+ embedder: () => Sa,
1443
+ language: () => q,
1444
+ options: () => ja
1445
+ }), Na = D({
1455
1446
  parser: "svelte",
1456
1447
  markup: !0
1457
- }), Aa = "embeddedSvelte", ja = ["svelte"], Ma = T(Aa), Na = E(Aa), Pa = {
1458
- [Ma]: {
1448
+ }), Pa = "embeddedSvelte", Fa = ["svelte"], Ia = C(Pa), La = w(Pa), Ra = {
1449
+ [Ia]: {
1459
1450
  category: "Embed",
1460
1451
  type: "string",
1461
1452
  array: !0,
1462
- default: [{ value: [...ja] }],
1453
+ default: [{ value: [...Fa] }],
1463
1454
  description: "Block comments that identify embedded Svelte in template literals. Requires the `prettier-plugin-svelte` plugin."
1464
1455
  },
1465
- [Na]: {
1456
+ [La]: {
1466
1457
  category: "Embed",
1467
1458
  type: "string",
1468
1459
  array: !0,
1469
- default: [{ value: [...ja] }],
1460
+ default: [{ value: [...Fa] }],
1470
1461
  description: "Tags that identify embedded Svelte in template literals. Requires the `prettier-plugin-svelte` plugin."
1471
1462
  }
1472
- }, Fa = /* @__PURE__ */ p({
1473
- embedder: () => ka,
1474
- language: () => Aa,
1475
- options: () => Pa
1476
- }), Ia = k({
1477
- parser: "toml",
1478
- newlineHandling: "hardline"
1479
- }), La = "embeddedToml", Ra = ["toml"], za = w(La), Ba = T(La), Va = E(La), Ha = {
1480
- [za]: {
1463
+ }, za = /* @__PURE__ */ l({
1464
+ embedder: () => Na,
1465
+ language: () => Pa,
1466
+ options: () => Ra
1467
+ }), Ba = D({ parser: "toml" }), Va = "embeddedToml", Ha = ["toml"], Ua = S(Va), Wa = C(Va), Ga = w(Va), Ka = {
1468
+ [Ua]: {
1481
1469
  category: "Embed",
1482
1470
  type: "string",
1483
1471
  array: !0,
1484
- default: [{ value: [...Ra] }],
1472
+ default: [{ value: [...Ha] }],
1485
1473
  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.",
1486
- deprecated: `Please use \`${Ba}\` or \`${Va}\`.`
1474
+ deprecated: `Please use \`${Wa}\` or \`${Ga}\`.`
1487
1475
  },
1488
- [Ba]: {
1476
+ [Wa]: {
1489
1477
  category: "Embed",
1490
1478
  type: "string",
1491
1479
  array: !0,
1492
- default: [{ value: [O] }],
1480
+ default: [{ value: [E] }],
1493
1481
  description: "Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
1494
1482
  },
1495
- [Va]: {
1483
+ [Ga]: {
1496
1484
  category: "Embed",
1497
1485
  type: "string",
1498
1486
  array: !0,
1499
- default: [{ value: [O] }],
1487
+ default: [{ value: [E] }],
1500
1488
  description: "Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
1501
1489
  }
1502
- }, Ua = /* @__PURE__ */ p({
1503
- embedder: () => Ia,
1504
- language: () => La,
1505
- options: () => Ha
1506
- }), Wa = k({
1490
+ }, qa = /* @__PURE__ */ l({
1491
+ embedder: () => Ba,
1492
+ language: () => Va,
1493
+ options: () => Ka
1494
+ }), Ja = D({
1507
1495
  parser: "typescript",
1508
1496
  parserOption: "embeddedTsParser",
1509
1497
  parserOptions: { filepath: void 0 }
1510
- }), Y = "embeddedTs", Ga = [
1498
+ }), J = "embeddedTs", Ya = [
1511
1499
  "ts",
1512
1500
  "tsx",
1513
1501
  "cts",
1514
1502
  "mts",
1515
1503
  "typescript"
1516
- ], Ka = ["typescript", "babel-ts"], qa = w(Y), Ja = T(Y), Ya = E(Y), Xa = D(Y), Za = {
1517
- [qa]: {
1504
+ ], Xa = ["typescript", "babel-ts"], Za = S(J), Qa = C(J), $a = w(J), eo = T(J), to = {
1505
+ [Za]: {
1518
1506
  category: "Embed",
1519
1507
  type: "string",
1520
1508
  array: !0,
1521
- default: [{ value: [...Ga] }],
1509
+ default: [{ value: [...Ya] }],
1522
1510
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.",
1523
- deprecated: `Please use \`${Ja}\` or \`${Ya}\`.`
1511
+ deprecated: `Please use \`${Qa}\` or \`${$a}\`.`
1524
1512
  },
1525
- [Ja]: {
1513
+ [Qa]: {
1526
1514
  category: "Embed",
1527
1515
  type: "string",
1528
1516
  array: !0,
1529
- default: [{ value: [O] }],
1517
+ default: [{ value: [E] }],
1530
1518
  description: "Block comments that make their subsequent template literals be identified as embedded TypeScript language."
1531
1519
  },
1532
- [Ya]: {
1520
+ [$a]: {
1533
1521
  category: "Embed",
1534
1522
  type: "string",
1535
1523
  array: !0,
1536
- default: [{ value: [O] }],
1524
+ default: [{ value: [E] }],
1537
1525
  description: "Tags that make their subsequent template literals be identified as embedded TypeScript language."
1538
1526
  },
1539
- [Xa]: {
1527
+ [eo]: {
1540
1528
  category: "Embed",
1541
1529
  type: "choice",
1542
1530
  default: "typescript",
1543
1531
  description: "The parser used to parse the embedded TypeScript language.",
1544
- choices: Ka.map((e) => ({
1532
+ choices: Xa.map((e) => ({
1545
1533
  value: e,
1546
1534
  description: `Use the "${e}" parser.`
1547
1535
  }))
1548
1536
  }
1549
- }, Qa = /* @__PURE__ */ p({
1550
- embedder: () => Wa,
1551
- language: () => Y,
1552
- options: () => Za
1553
- }), X = "embeddedXml", { softline: $a } = e, eo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1537
+ }, no = /* @__PURE__ */ l({
1538
+ embedder: () => Ja,
1539
+ language: () => J,
1540
+ options: () => to
1541
+ }), Y = "embeddedXml", { softline: ro } = e, io = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1554
1542
  let o = {
1555
1543
  ...r,
1556
1544
  ...a
1557
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = C(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = x(n, t), m = [], h = 0;
1545
+ }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = Oe(), { text: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = Ce(n, t), m = [], h = 0;
1558
1546
  for (; h !== void 0;) {
1559
1547
  let t = u.slice(h);
1560
1548
  if (t.length === 0) break;
1561
- h > 0 && o.xmlWhitespaceSensitivity !== "strict" && m.push($a), o.__embeddedXmlFragmentRecoverIndex?.splice(0, o.__embeddedXmlFragmentRecoverIndex.length);
1549
+ h > 0 && o.xmlWhitespaceSensitivity !== "strict" && m.push(ro), o.__embeddedXmlFragmentRecoverIndex?.splice(0, o.__embeddedXmlFragmentRecoverIndex.length);
1562
1550
  let n = await e(t, {
1563
1551
  ...o,
1564
- parser: X
1552
+ parser: Y
1565
1553
  }), [r, i] = o.__embeddedXmlFragmentRecoverIndex ?? [];
1566
1554
  r === void 0 ? h = void 0 : i === void 0 ? h += r : (n = t.slice(r, i + 1), h += i + 1), m.push(n);
1567
1555
  }
1568
- return b(S(m, l, p), o, i, d, f, o.xmlWhitespaceSensitivity === "strict");
1569
- }, to = [
1556
+ return b(x(m, l, p), o, i, d, f, o.xmlWhitespaceSensitivity === "strict");
1557
+ }, ao = [
1570
1558
  "xml",
1571
1559
  "opml",
1572
1560
  "rss",
1573
1561
  "svg"
1574
- ], no = w(X), ro = T(X), io = E(X), ao = {
1575
- [no]: {
1562
+ ], oo = S(Y), so = C(Y), co = w(Y), lo = {
1563
+ [oo]: {
1576
1564
  category: "Embed",
1577
1565
  type: "string",
1578
1566
  array: !0,
1579
- default: [{ value: [...to] }],
1567
+ default: [{ value: [...ao] }],
1580
1568
  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.",
1581
- deprecated: `Please use \`${ro}\` or \`${io}\`.`
1569
+ deprecated: `Please use \`${so}\` or \`${co}\`.`
1582
1570
  },
1583
- [ro]: {
1571
+ [so]: {
1584
1572
  category: "Embed",
1585
1573
  type: "string",
1586
1574
  array: !0,
1587
- default: [{ value: [O] }],
1575
+ default: [{ value: [E] }],
1588
1576
  description: "Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
1589
1577
  },
1590
- [io]: {
1578
+ [co]: {
1591
1579
  category: "Embed",
1592
1580
  type: "string",
1593
1581
  array: !0,
1594
- default: [{ value: [O] }],
1582
+ default: [{ value: [E] }],
1595
1583
  description: "Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
1596
1584
  },
1597
1585
  __embeddedXmlFragmentRecoverIndex: {
@@ -1604,15 +1592,15 @@ var Dr = "embeddedMotoko", Or = ["motoko", "mo"], kr = T(Dr), Ar = E(Dr), jr = {
1604
1592
  };
1605
1593
  //#endregion
1606
1594
  //#region src/embedded/xml/parser.ts
1607
- function oo(e, t) {
1595
+ function uo(e, t) {
1608
1596
  if (t && Number.isFinite(t.line) && Number.isFinite(t.column)) return e.split("\n").slice(0, t.line - 1).reduce((e, t) => e + t.length + 1, 0) + t.column - 1;
1609
1597
  }
1610
- async function Z(e, t, n) {
1598
+ async function X(e, t, n) {
1611
1599
  try {
1612
1600
  return await n.parse(e, t);
1613
1601
  } catch (r) {
1614
1602
  if (!(r instanceof Error)) throw r;
1615
- let { loc: i } = r, a = oo(e, i?.start), o = oo(e, i?.end), s = t, c = (...e) => s.__embeddedXmlFragmentRecoverIndex?.splice(0, s.__embeddedXmlFragmentRecoverIndex.length, ...e), l = "Expecting token of type --> OPEN <-- but found --> ";
1603
+ let { loc: i } = r, a = uo(e, i?.start), o = uo(e, i?.end), s = t, c = (...e) => s.__embeddedXmlFragmentRecoverIndex?.splice(0, s.__embeddedXmlFragmentRecoverIndex.length, ...e), l = "Expecting token of type --> OPEN <-- but found --> ";
1616
1604
  if (r.message.startsWith(`${l}'' <--`)) {
1617
1605
  let r = await n.parse(`${e}<prettier-embed-fragment />`, t);
1618
1606
  return r.children ? delete r.children.element : r.element = null, r.location = {
@@ -1620,39 +1608,48 @@ async function Z(e, t, n) {
1620
1608
  endOffset: e.length - 1
1621
1609
  }, r;
1622
1610
  }
1623
- if (a !== void 0 && a > 0 && (r.message.startsWith("Expecting token of type --> EOF <--") || r.message.startsWith("Redundant input, expecting EOF but found: "))) return c(a), Z(e.slice(0, a), t, n);
1624
- if (a !== void 0 && o !== void 0 && r.message.startsWith(l)) return c(a, o), Z("", t, n);
1611
+ if (a !== void 0 && a > 0 && (r.message.startsWith("Expecting token of type --> EOF <--") || r.message.startsWith("Redundant input, expecting EOF but found: "))) return c(a), X(e.slice(0, a), t, n);
1612
+ if (a !== void 0 && o !== void 0 && r.message.startsWith(l)) return c(a, o), X("", t, n);
1625
1613
  throw r;
1626
1614
  }
1627
1615
  }
1628
- function so(e) {
1616
+ function fo(e) {
1629
1617
  if (typeof e == "object" && e && "parsers" in e) return e.parsers?.xml;
1630
1618
  }
1631
- function co(e) {
1632
- let t = so(typeof e == "object" && e && "default" in e ? e.default : e);
1619
+ function po(e) {
1620
+ let t = fo(typeof e == "object" && e && "default" in e ? e.default : e);
1633
1621
  if (!t) throw Error("The XML plugin must provide the \"xml\" parser.");
1634
1622
  return t;
1635
1623
  }
1636
- async function lo(e, t = () => import("@prettier/plugin-xml"), a = import.meta.url) {
1624
+ async function mo(e, t = () => import("@prettier/plugin-xml"), n = import.meta.url) {
1637
1625
  try {
1638
- return co(await t());
1626
+ return po(await t());
1639
1627
  } catch (t) {
1640
- for (let t of [a, e ? r.resolve(e) : `${process.cwd()}/package.json`]) try {
1641
- let e = n(t).resolve("@prettier/plugin-xml");
1642
- return co(await import(i(e).href));
1643
- } catch {}
1628
+ if (typeof process < "u" && process.versions?.node) {
1629
+ let [{ createRequire: t }, r, { pathToFileURL: i }] = await Promise.all([
1630
+ import("node:module"),
1631
+ import("node:path"),
1632
+ import("node:url")
1633
+ ]);
1634
+ for (let a of [n, e ? r.resolve(e) : `${process.cwd()}/package.json`]) try {
1635
+ return po(await import(
1636
+ /* @vite-ignore */
1637
+ i(t(a).resolve("@prettier/plugin-xml")).href
1638
+ ));
1639
+ } catch {}
1640
+ }
1644
1641
  throw Error("Formatting embedded XML requires the consumer to install and load \"@prettier/plugin-xml\".", { cause: t });
1645
1642
  }
1646
1643
  }
1647
- async function uo(e, t, n = lo) {
1644
+ async function ho(e, t, n = mo) {
1648
1645
  for (let n = (t.plugins?.length ?? 0) - 1; n >= 0; n--) {
1649
- let r = so(t.plugins[n]);
1650
- if (r) return Z(e, t, r);
1646
+ let r = fo(t.plugins[n]);
1647
+ if (r) return X(e, t, r);
1651
1648
  }
1652
- return Z(e, t, await n(t.filepath));
1649
+ return X(e, t, await n(t.filepath));
1653
1650
  }
1654
- var fo = {
1655
- parse: uo,
1651
+ var go = {
1652
+ parse: ho,
1656
1653
  astFormat: "xml",
1657
1654
  locStart(e) {
1658
1655
  return e.location?.startOffset ?? 0;
@@ -1660,33 +1657,33 @@ var fo = {
1660
1657
  locEnd(e) {
1661
1658
  return e.location?.endOffset ?? NaN;
1662
1659
  }
1663
- }, po = /* @__PURE__ */ p({
1664
- embedder: () => eo,
1665
- language: () => X,
1666
- loadXmlParser: () => lo,
1667
- options: () => ao,
1668
- parseWithXmlPlugin: () => Z,
1669
- parseXml: () => uo,
1670
- parser: () => fo
1671
- }), Q = "embeddedXQuery", mo = k({
1660
+ }, _o = /* @__PURE__ */ l({
1661
+ embedder: () => io,
1662
+ language: () => Y,
1663
+ loadXmlParser: () => mo,
1664
+ options: () => lo,
1665
+ parseWithXmlPlugin: () => X,
1666
+ parseXml: () => ho,
1667
+ parser: () => go
1668
+ }), Z = "embeddedXQuery", vo = D({
1672
1669
  parser: "xquery",
1673
- parserOption: `${Q}Parser`
1674
- }), ho = ["xquery", "xq"], go = T(Q), _o = E(Q), vo = `${Q}Parser`, yo = {
1675
- [go]: {
1670
+ parserOption: `${Z}Parser`
1671
+ }), yo = ["xquery", "xq"], bo = C(Z), xo = w(Z), So = `${Z}Parser`, Co = {
1672
+ [bo]: {
1676
1673
  category: "Embed",
1677
1674
  type: "string",
1678
1675
  array: !0,
1679
- default: [{ value: [...ho] }],
1676
+ default: [{ value: [...yo] }],
1680
1677
  description: "Block comments that identify embedded XQuery in template literals. Requires the `prettier-plugin-xquery` plugin."
1681
1678
  },
1682
- [_o]: {
1679
+ [xo]: {
1683
1680
  category: "Embed",
1684
1681
  type: "string",
1685
1682
  array: !0,
1686
- default: [{ value: [...ho] }],
1683
+ default: [{ value: [...yo] }],
1687
1684
  description: "Tags that identify embedded XQuery in template literals. Requires the `prettier-plugin-xquery` plugin."
1688
1685
  },
1689
- [vo]: {
1686
+ [So]: {
1690
1687
  category: "Embed",
1691
1688
  type: "choice",
1692
1689
  default: "xquery",
@@ -1699,96 +1696,92 @@ var fo = {
1699
1696
  description: "Use the `xquery4` parser."
1700
1697
  }]
1701
1698
  }
1702
- }, bo = /* @__PURE__ */ p({
1703
- embedder: () => mo,
1704
- language: () => Q,
1705
- options: () => yo
1706
- }), xo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1707
- let o = {
1708
- ...r,
1709
- ...a
1710
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = C(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = d.slice(d.lastIndexOf("\n") + 1), m = x(n, t);
1711
- return b(S(await e(p ? u.replace(RegExp(`(\\r?\\n)${ye(p)}`, "g"), "$1") : u, {
1712
- ...o,
1713
- parser: "yaml"
1714
- }), l, m), o, i, d, f);
1715
- }, So = "embeddedYaml", Co = ["yaml", "yml"], wo = w(So), To = T(So), Eo = E(So), Do = {
1716
- [wo]: {
1699
+ }, wo = /* @__PURE__ */ l({
1700
+ embedder: () => vo,
1701
+ language: () => Z,
1702
+ options: () => Co
1703
+ }), To = D({
1704
+ parser: "yaml",
1705
+ parserOptions: { useTabs: !1 },
1706
+ preserveTrailingWhitespace: !0,
1707
+ transformDoc: (e) => t.mapDoc(e, (e) => e && typeof e == "object" && !Array.isArray(e) && e.type === "align" && e.n === -Infinity && Array.isArray(e.contents) && e.contents.length === 2 && typeof e.contents[0] == "object" && !Array.isArray(e.contents[0]) && e.contents[0]?.type === "line" && e.contents[0].hard && typeof e.contents[1] == "object" && !Array.isArray(e.contents[1]) && e.contents[1]?.type === "break-parent" ? "" : e)
1708
+ }), Eo = "embeddedYaml", Do = ["yaml", "yml"], Oo = S(Eo), ko = C(Eo), Ao = w(Eo), jo = {
1709
+ [Oo]: {
1717
1710
  category: "Embed",
1718
1711
  type: "string",
1719
1712
  array: !0,
1720
- default: [{ value: [...Co] }],
1713
+ default: [{ value: [...Do] }],
1721
1714
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.",
1722
- deprecated: `Please use \`${To}\` or \`${Eo}\`.`
1715
+ deprecated: `Please use \`${ko}\` or \`${Ao}\`.`
1723
1716
  },
1724
- [To]: {
1717
+ [ko]: {
1725
1718
  category: "Embed",
1726
1719
  type: "string",
1727
1720
  array: !0,
1728
- default: [{ value: [O] }],
1721
+ default: [{ value: [E] }],
1729
1722
  description: "Block comments that make their subsequent template literals be identified as embedded YAML language."
1730
1723
  },
1731
- [Eo]: {
1724
+ [Ao]: {
1732
1725
  category: "Embed",
1733
1726
  type: "string",
1734
1727
  array: !0,
1735
- default: [{ value: [O] }],
1728
+ default: [{ value: [E] }],
1736
1729
  description: "Tags that make their subsequent template literals be identified as embedded YAML language."
1737
1730
  }
1738
- }, Oo = /* @__PURE__ */ p({
1739
- embedder: () => xo,
1740
- language: () => So,
1741
- options: () => Do
1742
- }), ko = [], Ao = {}, jo = {}, Mo = {}, No = /* #__PURE__ */ Object.assign({
1743
- "./astro/index.ts": De,
1744
- "./css/index.ts": Ie,
1745
- "./dockerfile/index.ts": Ue,
1746
- "./es/index.ts": Qe,
1747
- "./gherkin/index.ts": at,
1748
- "./glsl/index.ts": pt,
1749
- "./go-template/index.ts": bt,
1750
- "./graphql/index.ts": Ot,
1751
- "./handlebars/index.ts": Ft,
1752
- "./html/index.ts": Wt,
1753
- "./hugo/index.ts": Zt,
1754
- "./ini/index.ts": an,
1755
- "./java/index.ts": fn,
1756
- "./jinja/index.ts": yn,
1757
- "./json/index.ts": kn,
1758
- "./jsonata/index.ts": In,
1759
- "./jte/index.ts": Un,
1760
- "./latex/index.ts": Xn,
1761
- "./liquid/index.ts": rr,
1762
- "./markdown/index.ts": _r,
1763
- "./marko/index.ts": wr,
1764
- "./motoko/index.ts": Mr,
1765
- "./mustache/index.ts": zr,
1766
- "./nginx/index.ts": Kr,
1767
- "./noop/index.ts": Zr,
1768
- "./nunjucks/index.ts": ii,
1769
- "./pegjs/index.ts": di,
1770
- "./php/index.ts": vi,
1771
- "./powershell/index.ts": Ti,
1772
- "./prisma/index.ts": Mi,
1773
- "./properties/index.ts": zi,
1774
- "./pug/index.ts": qi,
1775
- "./ruby/index.ts": na,
1776
- "./sh/index.ts": ua,
1777
- "./solidity/index.ts": _a,
1778
- "./sql/index.ts": Oa,
1779
- "./svelte/index.ts": Fa,
1780
- "./toml/index.ts": Ua,
1781
- "./ts/index.ts": Qa,
1782
- "./xml/index.ts": po,
1783
- "./xquery/index.ts": bo,
1784
- "./yaml/index.ts": Oo
1731
+ }, Mo = /* @__PURE__ */ l({
1732
+ embedder: () => To,
1733
+ language: () => Eo,
1734
+ options: () => jo
1735
+ }), Q = [], No = {}, Po = {}, Fo = {}, Io = /* #__PURE__ */ Object.assign({
1736
+ "./astro/index.ts": Le,
1737
+ "./css/index.ts": Ke,
1738
+ "./dockerfile/index.ts": $e,
1739
+ "./es/index.ts": ct,
1740
+ "./gherkin/index.ts": ht,
1741
+ "./glsl/index.ts": Ct,
1742
+ "./go-template/index.ts": At,
1743
+ "./graphql/index.ts": Lt,
1744
+ "./handlebars/index.ts": Wt,
1745
+ "./html/index.ts": $t,
1746
+ "./hugo/index.ts": sn,
1747
+ "./ini/index.ts": mn,
1748
+ "./java/index.ts": xn,
1749
+ "./jinja/index.ts": On,
1750
+ "./json/index.ts": Rn,
1751
+ "./jsonata/index.ts": Gn,
1752
+ "./jte/index.ts": Qn,
1753
+ "./latex/index.ts": ar,
1754
+ "./liquid/index.ts": fr,
1755
+ "./markdown/index.ts": xr,
1756
+ "./marko/index.ts": Or,
1757
+ "./motoko/index.ts": Ir,
1758
+ "./mustache/index.ts": Ur,
1759
+ "./nginx/index.ts": Xr,
1760
+ "./noop/index.ts": ti,
1761
+ "./nunjucks/index.ts": ci,
1762
+ "./pegjs/index.ts": hi,
1763
+ "./php/index.ts": Si,
1764
+ "./powershell/index.ts": ki,
1765
+ "./prisma/index.ts": Ii,
1766
+ "./properties/index.ts": Ui,
1767
+ "./pug/index.ts": Xi,
1768
+ "./ruby/index.ts": aa,
1769
+ "./sh/index.ts": pa,
1770
+ "./solidity/index.ts": ba,
1771
+ "./sql/index.ts": Ma,
1772
+ "./svelte/index.ts": za,
1773
+ "./toml/index.ts": qa,
1774
+ "./ts/index.ts": no,
1775
+ "./xml/index.ts": _o,
1776
+ "./xquery/index.ts": wo,
1777
+ "./yaml/index.ts": Mo
1785
1778
  });
1786
- for (let { language: e, parser: t, embedder: n, options: r } of Object.values(No)) _e(ko, e, V), t && (Ao[e] = t), n && (jo[e] = n), Object.assign(Mo, r);
1779
+ for (let { language: e, parser: t, embedder: n, options: r } of Object.values(Io)) Te(Q, e, z), t && (No[e] = t), n && (Po[e] = n), Object.assign(Fo, r);
1787
1780
  //#endregion
1788
1781
  //#region src/options.ts
1789
- var Po = "noEmbeddedIdentificationByComment", Fo = "noEmbeddedIdentificationByTag", Io = "preserveEmbeddedExteriorWhitespaces", Lo = "noEmbeddedMultiLineIndentation", Ro = "embeddedOverrides", zo = {
1790
- ...Mo,
1791
- [Po]: {
1782
+ var Lo = "noEmbeddedIdentificationByComment", Ro = "noEmbeddedIdentificationByTag", zo = "preserveEmbeddedExteriorWhitespaces", Bo = "noEmbeddedMultiLineIndentation", Vo = "embeddedOverrides", Ho = {
1783
+ ...Fo,
1784
+ [Lo]: {
1792
1785
  category: "Embed",
1793
1786
  type: "string",
1794
1787
  array: !0,
@@ -1796,7 +1789,7 @@ var Po = "noEmbeddedIdentificationByComment", Fo = "noEmbeddedIdentificationByTa
1796
1789
  description: "Turns off `` /* comment */ `...` `` comment-based embedded language identification for the specified identifiers.",
1797
1790
  deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
1798
1791
  },
1799
- [Fo]: {
1792
+ [Ro]: {
1800
1793
  category: "Embed",
1801
1794
  type: "string",
1802
1795
  array: !0,
@@ -1804,53 +1797,53 @@ var Po = "noEmbeddedIdentificationByComment", Fo = "noEmbeddedIdentificationByTa
1804
1797
  description: "Turns off `` tag`...` `` tag-based embedded language identification for the specified identifiers.",
1805
1798
  deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
1806
1799
  },
1807
- [Io]: {
1800
+ [zo]: {
1808
1801
  category: "Embed",
1809
1802
  type: "string",
1810
1803
  array: !0,
1811
1804
  default: [{ value: [] }],
1812
1805
  description: "Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags."
1813
1806
  },
1814
- [Lo]: {
1807
+ [Bo]: {
1815
1808
  category: "Embed",
1816
1809
  type: "string",
1817
1810
  array: !0,
1818
1811
  default: [{ value: [] }],
1819
1812
  description: "Turns off auto indentation in the formatting results for the specified comments or tags when they are formatted to span multi lines."
1820
1813
  },
1821
- [Ro]: {
1814
+ [Vo]: {
1822
1815
  category: "Embed",
1823
1816
  type: "string",
1824
1817
  array: !1,
1825
1818
  default: void 0,
1826
1819
  description: "Option overrides for the specified comments or tags. It should either be a stringified JSON or an absolute filepath to the option overrides file."
1827
1820
  }
1828
- }, Bo = {
1829
- ...a.parsers,
1821
+ }, Uo = {
1822
+ ...n.parsers,
1823
+ ...r.parsers,
1824
+ ...i.parsers,
1830
1825
  ...o.parsers,
1831
- ...s.parsers,
1832
- ...l.parsers,
1833
- ...c.parsers,
1834
- ...Ao
1835
- }, Vo = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, Ho = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Uo = { parse: (e) => {
1826
+ ...a.parsers,
1827
+ ...No
1828
+ }, Wo = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, Go = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Ko = { parse: (e) => {
1836
1829
  e = String(e);
1837
1830
  try {
1838
1831
  return JSON.parse(e);
1839
1832
  } catch {
1840
- return JSON.parse(e.replace(Vo, "$1").replace(Ho, "$1"));
1833
+ return JSON.parse(e.replace(Wo, "$1").replace(Go, "$1"));
1841
1834
  }
1842
- } }, { label: Wo } = e;
1843
- async function Go(e) {
1835
+ } }, { label: qo } = e;
1836
+ async function Jo(e) {
1844
1837
  try {
1845
1838
  let { readFile: t } = await import("node:fs/promises"), n = await t(e, { encoding: "utf-8" });
1846
- return Uo.parse(n);
1839
+ return Ko.parse(n);
1847
1840
  } catch {}
1848
1841
  }
1849
- var Ko = /* @__PURE__ */ new URL("./import-module-worker.js", import.meta.url);
1850
- async function qo(e) {
1842
+ var Yo = /* @__PURE__ */ new URL("./import-module-worker.js", import.meta.url);
1843
+ async function Xo(e) {
1851
1844
  let { Worker: t } = await import("node:worker_threads");
1852
1845
  return new Promise((n) => {
1853
- let r = new t(Ko, { workerData: { absolutePath: e } });
1846
+ let r = new t(Yo, { workerData: { absolutePath: e } });
1854
1847
  r.once("message", (e) => {
1855
1848
  r.terminate(), e.error && console.error(e.error), n(e.overrides);
1856
1849
  }), r.once("error", (e) => {
@@ -1860,15 +1853,18 @@ async function qo(e) {
1860
1853
  });
1861
1854
  });
1862
1855
  }
1863
- async function Jo(e, t) {
1856
+ async function Zo(e, t) {
1864
1857
  let { isAbsolute: n, dirname: r, resolve: i } = await import("node:path");
1865
1858
  if (n(e)) return e;
1866
- let a = await d(t);
1867
- return i(typeof a == "string" ? r(a) : process.env.PWD ?? process.cwd(), e);
1859
+ let { resolveConfigFile: a } = await import(
1860
+ /* @vite-ignore */
1861
+ "prettier"
1862
+ ), o = await a(t);
1863
+ return i(typeof o == "string" ? r(o) : process.env.PWD ?? process.cwd(), e);
1868
1864
  }
1869
- var Yo = async (e, t) => {
1865
+ var Qo = async (e, t) => {
1870
1866
  try {
1871
- return Uo.parse(e);
1867
+ return Ko.parse(e);
1872
1868
  } catch {}
1873
1869
  let n;
1874
1870
  try {
@@ -1877,39 +1873,39 @@ var Yo = async (e, t) => {
1877
1873
  console.error("Failed to parse embeddedOverrides as a json object");
1878
1874
  return;
1879
1875
  }
1880
- let r = () => Jo(e, t);
1876
+ let r = () => Zo(e, t);
1881
1877
  if (n === ".json" || n === ".jsonc") {
1882
- let e = await r(), t = await Go(e);
1878
+ let e = await r(), t = await Jo(e);
1883
1879
  if (t !== void 0) return t;
1884
1880
  console.error(`Failed to parse the json file: ${e}`);
1885
1881
  } else if (n === ".mjs" || n === ".cjs" || n === ".js") {
1886
- let e = await r(), t = await qo(e);
1882
+ let e = await r(), t = await Xo(e);
1887
1883
  if (t !== void 0) return t;
1888
1884
  console.error(`Failed to parse the js module file: ${e}`);
1889
1885
  } else if (n === ".mts" || n === ".cts" || n === ".ts") {
1890
- let e = await r(), t = await qo(e);
1886
+ let e = await r(), t = await Xo(e);
1891
1887
  if (t !== void 0) return t;
1892
1888
  console.error(`Failed to parse the ts module file: ${e}`);
1893
1889
  } else {
1894
1890
  if (n === "") {
1895
- let e = await Go(await r());
1891
+ let e = await Jo(await r());
1896
1892
  if (e !== void 0) return e;
1897
1893
  }
1898
1894
  console.error("Failed to parse embeddedOverrides as a json object");
1899
1895
  }
1900
- }, Xo = /* @__PURE__ */ new WeakMap();
1901
- async function Zo(e, { commentOrTag: t, kind: n }) {
1896
+ }, $o = /* @__PURE__ */ new WeakMap();
1897
+ async function es(e, { commentOrTag: t, kind: n }) {
1902
1898
  if (e.embeddedOverrides === void 0) return;
1903
- let r = Xo.get(e);
1904
- r === void 0 && (r = Yo(e.embeddedOverrides, e.filepath), Xo.set(e, r));
1899
+ let r = $o.get(e);
1900
+ r === void 0 && (r = Qo(e.embeddedOverrides, e.filepath), $o.set(e, r));
1905
1901
  let i = await r;
1906
1902
  if (i !== void 0) for (let { [`${n}s`]: e, identifiers: r, options: a } of i) {
1907
1903
  let n = e ?? [];
1908
1904
  if (n.length === 0 && r?.includes(t) || n.includes(t)) return a;
1909
1905
  }
1910
1906
  }
1911
- function* Qo(e) {
1912
- yield e, e.type === "CallExpression" && (yield* Qo(e.callee));
1907
+ function* ts(e) {
1908
+ yield e, e.type === "CallExpression" && (yield* ts(e.callee));
1913
1909
  }
1914
1910
  function $(e) {
1915
1911
  if (e.type === "Identifier") return e.name;
@@ -1926,7 +1922,7 @@ function $(e) {
1926
1922
  }
1927
1923
  if (e.type === "ChainExpression") return $(e.expression);
1928
1924
  }
1929
- function $o(e, t) {
1925
+ function ns(e, t) {
1930
1926
  let n = /^\/(.*)\/([dgimsuvy]*)$/.exec(t);
1931
1927
  if (!n) return !1;
1932
1928
  try {
@@ -1936,7 +1932,7 @@ function $o(e, t) {
1936
1932
  return !1;
1937
1933
  }
1938
1934
  }
1939
- var es = (() => {
1935
+ var rs = (() => {
1940
1936
  let e = /* @__PURE__ */ new Set([
1941
1937
  "start",
1942
1938
  "end",
@@ -1947,7 +1943,7 @@ var es = (() => {
1947
1943
  "decorators"
1948
1944
  ]);
1949
1945
  return (t, n, r, i) => {
1950
- if (/^\/.*\/[dgimsuvy]*$/.test(n)) return $o(t, n);
1946
+ if (/^\/.*\/[dgimsuvy]*$/.test(n)) return ns(t, n);
1951
1947
  let a = i?.get(n);
1952
1948
  try {
1953
1949
  let e = i?.has(n) ? a : r(`${n}\`\``);
@@ -1959,11 +1955,11 @@ var es = (() => {
1959
1955
  if (i?.set(n, a), !a || (a.type === "File" && (a = a.program), a.type !== "Program" || a.body[0]?.type !== "ExpressionStatement")) return !1;
1960
1956
  let o = a.body[0]?.expression;
1961
1957
  if (o?.type !== "TaggedTemplateExpression") return !1;
1962
- for (let n of Qo(t)) if (cs(n, o.tag, e)) return !0;
1958
+ for (let n of ts(t)) if (ds(n, o.tag, e)) return !0;
1963
1959
  return !1;
1964
1960
  };
1965
1961
  })();
1966
- function ts({ node: e, parent: t }) {
1962
+ function is({ node: e, parent: t }) {
1967
1963
  let n = e.comments ?? t?.comments;
1968
1964
  if (!n) return;
1969
1965
  let r = n[n.length - 1];
@@ -1975,32 +1971,32 @@ function ts({ node: e, parent: t }) {
1975
1971
  let i = r.value;
1976
1972
  if (i.length > 1 && i.startsWith(" ") && i.endsWith(" ")) return i.slice(1, -1);
1977
1973
  }
1978
- function ns({ parent: e }) {
1974
+ function as({ parent: e }) {
1979
1975
  if (e?.type === "TaggedTemplateExpression") return e.tag.type === "Identifier" ? e.tag.name : e.tag;
1980
1976
  }
1981
- function rs(e, t) {
1977
+ function os(e, t) {
1982
1978
  return e.noEmbeddedIdentificationByComment?.includes(t) ?? !1 ? function* (e) {} : function* (t) {
1983
- let n = e[T(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1984
- n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[w(t)] ?? [] : yield* n;
1979
+ let n = e[C(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1980
+ n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[S(t)] ?? [] : yield* n;
1985
1981
  };
1986
1982
  }
1987
- function is(e, t) {
1983
+ function ss(e, t) {
1988
1984
  return typeof t == "string" ? e.noEmbeddedIdentificationByTag?.includes(t) ?? !1 ? function* (e) {} : function* (t) {
1989
- let n = e[E(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1990
- n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[w(t)] ?? [] : yield* n;
1985
+ let n = e[w(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1986
+ n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[S(t)] ?? [] : yield* n;
1991
1987
  } : function* (t) {
1992
- let n = e[E(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1988
+ let n = e[w(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1993
1989
  if (n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed") {
1994
1990
  let { noEmbeddedIdentificationByTag: n } = e;
1995
- for (let r of e[w(t)] ?? []) n?.includes(r) || (yield r);
1991
+ for (let r of e[S(t)] ?? []) n?.includes(r) || (yield r);
1996
1992
  } else yield* n;
1997
1993
  };
1998
1994
  }
1999
- function as(e, t, n, r, i) {
2000
- let a = jo[t];
1995
+ function cs(e, t, n, r, i) {
1996
+ let a = Po[t];
2001
1997
  if (!a) return null;
2002
1998
  if (e.quasis.length === 1 && e.quasis[0]?.value.raw.trim() === "") return "``";
2003
- let o = Zo(i, {
1999
+ let o = es(i, {
2004
2000
  commentOrTag: n,
2005
2001
  kind: r
2006
2002
  });
@@ -2010,76 +2006,76 @@ function as(e, t, n, r, i) {
2010
2006
  kind: r,
2011
2007
  embeddedOverrideOptions: await o
2012
2008
  });
2013
- return Wo({
2009
+ return qo({
2014
2010
  embed: !0,
2015
2011
  ...t.label
2016
2012
  }, t);
2017
2013
  };
2018
2014
  }
2019
- function os(e, t, n) {
2020
- return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? ss(e, t, n) : typeof e == "object" && cs(e, t, n);
2015
+ function ls(e, t, n) {
2016
+ return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? us(e, t, n) : typeof e == "object" && ds(e, t, n);
2021
2017
  }
2022
- function ss(e, t, n) {
2018
+ function us(e, t, n) {
2023
2019
  let r = e.length;
2024
2020
  if (r !== t.length) return !1;
2025
- for (let i = 0; i < r; i++) if (!os(e[i], t[i], n)) return !1;
2021
+ for (let i = 0; i < r; i++) if (!ls(e[i], t[i], n)) return !1;
2026
2022
  return !0;
2027
2023
  }
2028
- function cs(e, t, n) {
2029
- for (let r of Object.keys(e)) if (!n?.has(r) && !(Object.hasOwn(t, r) && os(e[r], t[r], n))) return !1;
2024
+ function ds(e, t, n) {
2025
+ for (let r of Object.keys(e)) if (!n?.has(r) && !(Object.hasOwn(t, r) && ls(e[r], t[r], n))) return !1;
2030
2026
  return !0;
2031
2027
  }
2032
2028
  //#endregion
2033
2029
  //#region src/printers.ts
2034
- var { estree: ls } = u, { embed: us } = ls, ds = /* @__PURE__ */ new WeakMap(), fs = (e, t) => {
2030
+ var { estree: fs } = s, { embed: ps } = fs, ms = /* @__PURE__ */ new WeakMap(), hs = (e, t) => {
2035
2031
  let { node: n } = e;
2036
2032
  if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: e } }) => e === null)) return null;
2037
- let r = ts(e);
2033
+ let r = is(e);
2038
2034
  if (typeof r == "string") {
2039
- let i = rs(t, r);
2040
- for (let e of ko) {
2035
+ let i = os(t, r);
2036
+ for (let e of Q) {
2041
2037
  let a = !1;
2042
2038
  for (let t of i(e)) if (r === t) {
2043
2039
  a = !0;
2044
2040
  break;
2045
2041
  }
2046
- if (a) return as(n, e, r, "comment", t);
2042
+ if (a) return cs(n, e, r, "comment", t);
2047
2043
  }
2048
- return us?.(e, t) ?? null;
2044
+ return ps?.(e, t) ?? null;
2049
2045
  }
2050
- let i = ns(e);
2046
+ let i = as(e);
2051
2047
  if (typeof i == "string") {
2052
- let r = is(t, i);
2053
- for (let e of ko) {
2048
+ let r = ss(t, i);
2049
+ for (let e of Q) {
2054
2050
  let a;
2055
- for (let t of r(e)) if (i === t || $o({
2051
+ for (let t of r(e)) if (i === t || ns({
2056
2052
  type: "Identifier",
2057
2053
  name: i
2058
2054
  }, t)) {
2059
2055
  a = t;
2060
2056
  break;
2061
2057
  }
2062
- if (a !== void 0) return as(n, e, a, "tag", t);
2058
+ if (a !== void 0) return cs(n, e, a, "tag", t);
2063
2059
  }
2064
- return us?.(e, t) ?? null;
2060
+ return ps?.(e, t) ?? null;
2065
2061
  }
2066
2062
  if (i !== void 0) {
2067
- let e = ds.get(t);
2068
- e || (e = /* @__PURE__ */ new Map(), ds.set(t, e));
2069
- let r = (e) => Bo[t.parser].parse(e, t), a = is(t);
2070
- for (let o of ko) {
2063
+ let e = ms.get(t);
2064
+ e || (e = /* @__PURE__ */ new Map(), ms.set(t, e));
2065
+ let r = (e) => Uo[t.parser].parse(e, t), a = ss(t);
2066
+ for (let o of Q) {
2071
2067
  let s;
2072
- for (let t of a(o)) if (es(i, t, r, e)) {
2068
+ for (let t of a(o)) if (rs(i, t, r, e)) {
2073
2069
  s = t;
2074
2070
  break;
2075
2071
  }
2076
- if (s !== void 0) return as(n, o, s, "tag", t);
2072
+ if (s !== void 0) return cs(n, o, s, "tag", t);
2077
2073
  }
2078
2074
  }
2079
- return us?.(e, t) ?? null;
2080
- }, ps = { estree: {
2081
- ...ls,
2082
- embed: fs
2075
+ return ps?.(e, t) ?? null;
2076
+ }, gs = { estree: {
2077
+ ...fs,
2078
+ embed: hs
2083
2079
  } };
2084
2080
  //#endregion
2085
- export { zo as options, Bo as parsers, ps as printers };
2081
+ export { Ho as options, Uo as parsers, gs as printers };