eddyter 1.3.64 → 1.3.65

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.
@@ -1,12 +1,9 @@
1
1
  var yt = Object.create, Me = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, Bt = Object.getOwnPropertyNames, bt = Object.getPrototypeOf, At = Object.prototype.hasOwnProperty, ju = (e) => {
2
2
  throw TypeError(e);
3
3
  }, wt = (e, u) => () => (u || e((u = { exports: {} }).exports, u), u.exports), Ve = (e, u) => {
4
- for (var t in u)
5
- Me(e, t, { get: u[t], enumerable: !0 });
4
+ for (var t in u) Me(e, t, { get: u[t], enumerable: !0 });
6
5
  }, kt = (e, u, t, r) => {
7
- if (u && typeof u == "object" || typeof u == "function")
8
- for (let n of Bt(u))
9
- !At.call(e, n) && n !== t && Me(e, n, { get: () => u[n], enumerable: !(r = vt(u, n)) || r.enumerable });
6
+ if (u && typeof u == "object" || typeof u == "function") for (let n of Bt(u)) !At.call(e, n) && n !== t && Me(e, n, { get: () => u[n], enumerable: !(r = vt(u, n)) || r.enumerable });
10
7
  return e;
11
8
  }, St = (e, u, t) => (t = e != null ? yt(bt(e)) : {}, kt(Me(t, "default", { value: e, enumerable: !0 }), e)), xt = (e, u, t) => u.has(e) || ju("Cannot " + t), Nt = (e, u, t) => u.has(e) ? ju("Cannot add the same private member more than once") : u instanceof WeakSet ? u.add(e) : u.set(e, t), De = (e, u, t) => (xt(e, u, "access private method"), t), Ot = wt((e) => {
12
9
  Object.defineProperty(e, "__esModule", { value: !0 });
@@ -18,23 +15,19 @@ var yt = Object.create, Me = Object.defineProperty, vt = Object.getOwnPropertyDe
18
15
  let o = Object.assign({ column: 0, line: -1 }, D.start), s = Object.assign({}, o, D.end), { linesAbove: c = 2, linesBelow: F = 3 } = i || {}, l = o.line, d = o.column, f = s.line, h = s.column, p = Math.max(l - (c + 1), 0), C = Math.min(a.length, f + F);
19
16
  l === -1 && (p = 0), f === -1 && (C = a.length);
20
17
  let E = f - l, m = {};
21
- if (E)
22
- for (let y = 0; y <= E; y++) {
23
- let g = y + l;
24
- if (!d)
25
- m[g] = !0;
26
- else if (y === 0) {
27
- let B = a[g - 1].length;
28
- m[g] = [d, B - d + 1];
29
- } else if (y === E)
30
- m[g] = [0, h];
31
- else {
32
- let B = a[g - y].length;
33
- m[g] = [0, B];
34
- }
18
+ if (E) for (let y = 0; y <= E; y++) {
19
+ let g = y + l;
20
+ if (!d) m[g] = !0;
21
+ else if (y === 0) {
22
+ let B = a[g - 1].length;
23
+ m[g] = [d, B - d + 1];
24
+ } else if (y === E) m[g] = [0, h];
25
+ else {
26
+ let B = a[g - y].length;
27
+ m[g] = [0, B];
35
28
  }
36
- else
37
- d === h ? d ? m[l] = [d, 0] : m[l] = !0 : m[l] = [d, h - d];
29
+ }
30
+ else d === h ? d ? m[l] = [d, 0] : m[l] = !0 : m[l] = [d, h - d];
38
31
  return { start: p, end: C, markerLines: m };
39
32
  }
40
33
  function n(D, a, i = {}) {
@@ -48,8 +41,7 @@ var yt = Object.create, Me = Object.defineProperty, vt = Object.getOwnPropertyDe
48
41
  `, o.gutter(m.replace(/\d/g, " ")), " ", M, o.marker("^").repeat(ce)].join(""), g && i.message && (B += " " + o.message(i.message));
49
42
  }
50
43
  return [o.marker(">"), o.gutter(m), p.length > 0 ? ` ${p}` : "", B].join("");
51
- } else
52
- return ` ${o.gutter(m)}${p.length > 0 ? ` ${p}` : ""}`;
44
+ } else return ` ${o.gutter(m)}${p.length > 0 ? ` ${p}` : ""}`;
53
45
  }).join(`
54
46
  `);
55
47
  return i.message && !d && (h = `${" ".repeat(f + 1)}${i.message}
@@ -59,8 +51,7 @@ ${h}`), h;
59
51
  }), _t = {};
60
52
  Ve(_t, { __debug: () => JD, check: () => qD, doc: () => ht, format: () => Et, formatWithCursor: () => mt, getSupportInfo: () => UD, util: () => Ct, version: () => mD });
61
53
  var jt = (e, u, t, r) => {
62
- if (!(e && u == null))
63
- return u.replaceAll ? u.replaceAll(t, r) : t.global ? u.replace(t, r) : u.split(t).join(r);
54
+ if (!(e && u == null)) return u.replaceAll ? u.replaceAll(t, r) : t.global ? u.replace(t, r) : u.split(t).join(r);
64
55
  }, me = jt, Tt = class {
65
56
  diff(e, u, t = {}) {
66
57
  let r;
@@ -76,13 +67,11 @@ var jt = (e, u, t, r) => {
76
67
  r(C);
77
68
  }, 0);
78
69
  return;
79
- } else
80
- return C;
70
+ } else return C;
81
71
  }, a = u.length, i = e.length, o = 1, s = a + i;
82
72
  t.maxEditLength != null && (s = Math.min(s, t.maxEditLength));
83
73
  let c = (n = t.timeout) !== null && n !== void 0 ? n : 1 / 0, F = Date.now() + c, l = [{ oldPos: -1, lastComponent: void 0 }], d = this.extractCommon(l[0], u, e, 0, t);
84
- if (l[0].oldPos + 1 >= i && d + 1 >= a)
85
- return D(this.buildValues(l[0].lastComponent, u, e));
74
+ if (l[0].oldPos + 1 >= i && d + 1 >= a) return D(this.buildValues(l[0].lastComponent, u, e));
86
75
  let f = -1 / 0, h = 1 / 0, p = () => {
87
76
  for (let C = Math.max(f, -o); C <= Math.min(h, o); C += 2) {
88
77
  let E, m = l[C - 1], y = l[C + 1];
@@ -97,26 +86,21 @@ var jt = (e, u, t, r) => {
97
86
  l[C] = void 0;
98
87
  continue;
99
88
  }
100
- if (!B || g && m.oldPos < y.oldPos ? E = this.addToPath(y, !0, !1, 0, t) : E = this.addToPath(m, !1, !0, 1, t), d = this.extractCommon(E, u, e, C, t), E.oldPos + 1 >= i && d + 1 >= a)
101
- return D(this.buildValues(E.lastComponent, u, e)) || !0;
89
+ if (!B || g && m.oldPos < y.oldPos ? E = this.addToPath(y, !0, !1, 0, t) : E = this.addToPath(m, !1, !0, 1, t), d = this.extractCommon(E, u, e, C, t), E.oldPos + 1 >= i && d + 1 >= a) return D(this.buildValues(E.lastComponent, u, e)) || !0;
102
90
  l[C] = E, E.oldPos + 1 >= i && (h = Math.min(h, C - 1)), d + 1 >= a && (f = Math.max(f, C + 1));
103
91
  }
104
92
  o++;
105
93
  };
106
- if (r)
107
- (function C() {
108
- setTimeout(function() {
109
- if (o > s || Date.now() > F)
110
- return r(void 0);
111
- p() || C();
112
- }, 0);
113
- })();
114
- else
115
- for (; o <= s && Date.now() <= F; ) {
116
- let C = p();
117
- if (C)
118
- return C;
119
- }
94
+ if (r) (function C() {
95
+ setTimeout(function() {
96
+ if (o > s || Date.now() > F) return r(void 0);
97
+ p() || C();
98
+ }, 0);
99
+ })();
100
+ else for (; o <= s && Date.now() <= F; ) {
101
+ let C = p();
102
+ if (C) return C;
103
+ }
120
104
  }
121
105
  addToPath(e, u, t, r, n) {
122
106
  let D = e.lastComponent;
@@ -124,8 +108,7 @@ var jt = (e, u, t, r) => {
124
108
  }
125
109
  extractCommon(e, u, t, r, n) {
126
110
  let D = u.length, a = t.length, i = e.oldPos, o = i - r, s = 0;
127
- for (; o + 1 < D && i + 1 < a && this.equals(t[i + 1], u[o + 1], n); )
128
- o++, i++, s++, n.oneChangePerToken && (e.lastComponent = { count: 1, previousComponent: e.lastComponent, added: !1, removed: !1 });
111
+ for (; o + 1 < D && i + 1 < a && this.equals(t[i + 1], u[o + 1], n); ) o++, i++, s++, n.oneChangePerToken && (e.lastComponent = { count: 1, previousComponent: e.lastComponent, added: !1, removed: !1 });
129
112
  return s && !n.oneChangePerToken && (e.lastComponent = { count: s, previousComponent: e.lastComponent, added: !1, removed: !1 }), e.oldPos = i, o;
130
113
  }
131
114
  equals(e, u, t) {
@@ -133,8 +116,7 @@ var jt = (e, u, t, r) => {
133
116
  }
134
117
  removeEmpty(e) {
135
118
  let u = [];
136
- for (let t = 0; t < e.length; t++)
137
- e[t] && u.push(e[t]);
119
+ for (let t = 0; t < e.length; t++) e[t] && u.push(e[t]);
138
120
  return u;
139
121
  }
140
122
  castInput(e, u) {
@@ -154,14 +136,12 @@ var jt = (e, u, t, r) => {
154
136
  }
155
137
  buildValues(e, u, t) {
156
138
  let r = [], n;
157
- for (; e; )
158
- r.push(e), n = e.previousComponent, delete e.previousComponent, e = n;
139
+ for (; e; ) r.push(e), n = e.previousComponent, delete e.previousComponent, e = n;
159
140
  r.reverse();
160
141
  let D = r.length, a = 0, i = 0, o = 0;
161
142
  for (; a < D; a++) {
162
143
  let s = r[a];
163
- if (s.removed)
164
- s.value = this.join(t.slice(o, o + s.count)), o += s.count;
144
+ if (s.removed) s.value = this.join(t.slice(o, o + s.count)), o += s.count;
165
145
  else {
166
146
  if (!s.added && this.useLongestToken) {
167
147
  let c = u.slice(i, i + s.count);
@@ -169,8 +149,7 @@ var jt = (e, u, t, r) => {
169
149
  let d = t[o + l];
170
150
  return d.length > F.length ? d : F;
171
151
  }), s.value = this.join(c);
172
- } else
173
- s.value = this.join(u.slice(i, i + s.count));
152
+ } else s.value = this.join(u.slice(i, i + s.count));
174
153
  i += s.count, s.added || (o += s.count);
175
154
  }
176
155
  }
@@ -232,38 +211,29 @@ function Rt(e) {
232
211
  `);
233
212
  }
234
213
  var Q = "string", T = "array", q = "cursor", I = "indent", P = "align", $ = "trim", w = "group", O = "fill", k = "if-break", L = "indent-if-break", R = "line-suffix", W = "line-suffix-boundary", b = "line", _ = "label", S = "break-parent", Iu = /* @__PURE__ */ new Set([q, I, P, $, w, O, k, L, R, W, b, _, S]), Wt = (e, u, t) => {
235
- if (!(e && u == null))
236
- return Array.isArray(u) || typeof u == "string" ? u[t < 0 ? u.length + t : t] : u.at(t);
214
+ if (!(e && u == null)) return Array.isArray(u) || typeof u == "string" ? u[t < 0 ? u.length + t : t] : u.at(t);
237
215
  }, v = Wt;
238
216
  function Mt(e) {
239
217
  let u = e.length;
240
218
  for (; u > 0 && (e[u - 1] === "\r" || e[u - 1] === `
241
- `); )
242
- u--;
219
+ `); ) u--;
243
220
  return u < e.length ? e.slice(0, u) : e;
244
221
  }
245
222
  function Vt(e) {
246
- if (typeof e == "string")
247
- return Q;
248
- if (Array.isArray(e))
249
- return T;
250
- if (!e)
251
- return;
223
+ if (typeof e == "string") return Q;
224
+ if (Array.isArray(e)) return T;
225
+ if (!e) return;
252
226
  let { type: u } = e;
253
- if (Iu.has(u))
254
- return u;
227
+ if (Iu.has(u)) return u;
255
228
  }
256
229
  var X = Vt, zt = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
257
230
  function qt(e) {
258
231
  let u = e === null ? "null" : typeof e;
259
- if (u !== "string" && u !== "object")
260
- return `Unexpected doc '${u}',
232
+ if (u !== "string" && u !== "object") return `Unexpected doc '${u}',
261
233
  Expected it to be 'string' or 'object'.`;
262
- if (X(e))
263
- throw new Error("doc is valid.");
234
+ if (X(e)) throw new Error("doc is valid.");
264
235
  let t = Object.prototype.toString.call(e);
265
- if (t !== "[object Object]")
266
- return `Unexpected doc '${t}'.`;
236
+ if (t !== "[object Object]") return `Unexpected doc '${t}'.`;
267
237
  let r = zt([...Iu].map((n) => `'${n}'`));
268
238
  return `Unexpected doc.type '${e.type}'.
269
239
  Expected it to be ${r}.`;
@@ -284,55 +254,47 @@ function Jt(e, u, t, r) {
284
254
  }
285
255
  t && n.push(D, ru);
286
256
  let a = X(D);
287
- if (!a)
288
- throw new te(D);
289
- if (u?.(D) !== !1)
290
- switch (a) {
291
- case T:
292
- case O: {
293
- let i = a === T ? D : D.parts;
294
- for (let o = i.length, s = o - 1; s >= 0; --s)
295
- n.push(i[s]);
296
- break;
297
- }
298
- case k:
299
- n.push(D.flatContents, D.breakContents);
300
- break;
301
- case w:
302
- if (r && D.expandedStates)
303
- for (let i = D.expandedStates.length, o = i - 1; o >= 0; --o)
304
- n.push(D.expandedStates[o]);
305
- else
306
- n.push(D.contents);
307
- break;
308
- case P:
309
- case I:
310
- case L:
311
- case _:
312
- case R:
313
- n.push(D.contents);
314
- break;
315
- case Q:
316
- case q:
317
- case $:
318
- case W:
319
- case b:
320
- case S:
321
- break;
322
- default:
323
- throw new te(D);
257
+ if (!a) throw new te(D);
258
+ if (u?.(D) !== !1) switch (a) {
259
+ case T:
260
+ case O: {
261
+ let i = a === T ? D : D.parts;
262
+ for (let o = i.length, s = o - 1; s >= 0; --s) n.push(i[s]);
263
+ break;
324
264
  }
265
+ case k:
266
+ n.push(D.flatContents, D.breakContents);
267
+ break;
268
+ case w:
269
+ if (r && D.expandedStates) for (let i = D.expandedStates.length, o = i - 1; o >= 0; --o) n.push(D.expandedStates[o]);
270
+ else n.push(D.contents);
271
+ break;
272
+ case P:
273
+ case I:
274
+ case L:
275
+ case _:
276
+ case R:
277
+ n.push(D.contents);
278
+ break;
279
+ case Q:
280
+ case q:
281
+ case $:
282
+ case W:
283
+ case b:
284
+ case S:
285
+ break;
286
+ default:
287
+ throw new te(D);
288
+ }
325
289
  }
326
290
  }
327
291
  var qe = Jt;
328
292
  function Ee(e, u) {
329
- if (typeof e == "string")
330
- return u(e);
293
+ if (typeof e == "string") return u(e);
331
294
  let t = /* @__PURE__ */ new Map();
332
295
  return r(e);
333
296
  function r(D) {
334
- if (t.has(D))
335
- return t.get(D);
297
+ if (t.has(D)) return t.get(D);
336
298
  let a = n(D);
337
299
  return t.set(D, a), a;
338
300
  }
@@ -369,16 +331,14 @@ function Ee(e, u) {
369
331
  function Ue(e, u, t) {
370
332
  let r = t, n = !1;
371
333
  function D(a) {
372
- if (n)
373
- return !1;
334
+ if (n) return !1;
374
335
  let i = u(a);
375
336
  i !== void 0 && (n = !0, r = i);
376
337
  }
377
338
  return qe(e, D), r;
378
339
  }
379
340
  function Gt(e) {
380
- if (e.type === w && e.break || e.type === b && e.hard || e.type === S)
381
- return !0;
341
+ if (e.type === w && e.break || e.type === b && e.hard || e.type === S) return !0;
382
342
  }
383
343
  function Ht(e) {
384
344
  return Ue(e, Gt, !1);
@@ -394,8 +354,7 @@ function Kt(e) {
394
354
  let u = /* @__PURE__ */ new Set(), t = [];
395
355
  function r(D) {
396
356
  if (D.type === S && nu(t), D.type === w) {
397
- if (t.push(D), u.has(D))
398
- return !1;
357
+ if (t.push(D), u.has(D)) return !1;
399
358
  u.add(D);
400
359
  }
401
360
  }
@@ -411,8 +370,7 @@ function Zt(e) {
411
370
  return Ee(e, Yt);
412
371
  }
413
372
  function Du(e) {
414
- for (e = [...e]; e.length >= 2 && v(!1, e, -2).type === b && v(!1, e, -1).type === S; )
415
- e.length -= 2;
373
+ for (e = [...e]; e.length >= 2 && v(!1, e, -2).type === b && v(!1, e, -1).type === S; ) e.length -= 2;
416
374
  if (e.length > 0) {
417
375
  let u = ae(v(!1, e, -1));
418
376
  e[e.length - 1] = u;
@@ -455,31 +413,25 @@ function Pu(e) {
455
413
  function Qt(e) {
456
414
  switch (X(e)) {
457
415
  case O:
458
- if (e.parts.every((u) => u === ""))
459
- return "";
416
+ if (e.parts.every((u) => u === "")) return "";
460
417
  break;
461
418
  case w:
462
- if (!e.contents && !e.id && !e.break && !e.expandedStates)
463
- return "";
464
- if (e.contents.type === w && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates)
465
- return e.contents;
419
+ if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
420
+ if (e.contents.type === w && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
466
421
  break;
467
422
  case P:
468
423
  case I:
469
424
  case L:
470
425
  case R:
471
- if (!e.contents)
472
- return "";
426
+ if (!e.contents) return "";
473
427
  break;
474
428
  case k:
475
- if (!e.flatContents && !e.breakContents)
476
- return "";
429
+ if (!e.flatContents && !e.breakContents) return "";
477
430
  break;
478
431
  case T: {
479
432
  let u = [];
480
433
  for (let t of e) {
481
- if (!t)
482
- continue;
434
+ if (!t) continue;
483
435
  let [r, ...n] = Array.isArray(t) ? t : [t];
484
436
  typeof r == "string" && typeof v(!1, u, -1) == "string" ? u[u.length - 1] += r : u.push(r), u.push(...n);
485
437
  }
@@ -506,8 +458,7 @@ function er(e, u = Wu) {
506
458
  `)) : t);
507
459
  }
508
460
  function ur(e) {
509
- if (e.type === b)
510
- return !0;
461
+ if (e.type === b) return !0;
511
462
  }
512
463
  function tr(e) {
513
464
  return Ue(e, ur, !1);
@@ -553,15 +504,13 @@ function je(e) {
553
504
  var fr = { type: W }, ge = { type: S }, dr = { type: $ }, Je = { type: b, hard: !0 }, Lu = { type: b, hard: !0, literal: !0 }, Ru = { type: b }, Fr = { type: b, soft: !0 }, Y = [Je, ge], Wu = [Lu, ge], K = { type: q };
554
505
  function Mu(e, u) {
555
506
  let t = [];
556
- for (let r = 0; r < u.length; r++)
557
- r !== 0 && t.push(e), t.push(u[r]);
507
+ for (let r = 0; r < u.length; r++) r !== 0 && t.push(e), t.push(u[r]);
558
508
  return t;
559
509
  }
560
510
  function Vu(e, u, t) {
561
511
  let r = e;
562
512
  if (u > 0) {
563
- for (let n = 0; n < Math.floor(u / t); ++n)
564
- r = Ce(r);
513
+ for (let n = 0; n < Math.floor(u / t); ++n) r = Ce(r);
565
514
  r = re(u % t, r), r = re(Number.NEGATIVE_INFINITY, r);
566
515
  }
567
516
  return r;
@@ -571,17 +520,14 @@ function pr(e, u) {
571
520
  }
572
521
  function j(e) {
573
522
  var u;
574
- if (!e)
575
- return "";
523
+ if (!e) return "";
576
524
  if (Array.isArray(e)) {
577
525
  let t = [];
578
- for (let r of e)
579
- if (Array.isArray(r))
580
- t.push(...j(r));
581
- else {
582
- let n = j(r);
583
- n !== "" && t.push(n);
584
- }
526
+ for (let r of e) if (Array.isArray(r)) t.push(...j(r));
527
+ else {
528
+ let n = j(r);
529
+ n !== "" && t.push(n);
530
+ }
585
531
  return t;
586
532
  }
587
533
  return e.type === k ? { ...e, breakContents: j(e.breakContents), flatContents: j(e.flatContents) } : e.type === w ? { ...e, contents: j(e.contents), expandedStates: (u = e.expandedStates) == null ? void 0 : u.map(j) } : e.type === O ? { type: "fill", parts: e.parts.map(j) } : e.contents ? { ...e, contents: j(e.contents) } : e;
@@ -591,8 +537,7 @@ function hr(e) {
591
537
  return r(j(e));
592
538
  function r(D, a, i) {
593
539
  var o, s;
594
- if (typeof D == "string")
595
- return JSON.stringify(D);
540
+ if (typeof D == "string") return JSON.stringify(D);
596
541
  if (Array.isArray(D)) {
597
542
  let c = D.map(r).filter(Boolean);
598
543
  return c.length === 1 ? c[0] : `[${c.join(", ")}]`;
@@ -601,16 +546,11 @@ function hr(e) {
601
546
  let c = ((o = i?.[a + 1]) == null ? void 0 : o.type) === S;
602
547
  return D.literal ? c ? "literalline" : "literallineWithoutBreakParent" : D.hard ? c ? "hardline" : "hardlineWithoutBreakParent" : D.soft ? "softline" : "line";
603
548
  }
604
- if (D.type === S)
605
- return ((s = i?.[a - 1]) == null ? void 0 : s.type) === b && i[a - 1].hard ? void 0 : "breakParent";
606
- if (D.type === $)
607
- return "trim";
608
- if (D.type === I)
609
- return "indent(" + r(D.contents) + ")";
610
- if (D.type === P)
611
- return D.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + r(D.contents) + ")" : D.n < 0 ? "dedent(" + r(D.contents) + ")" : D.n.type === "root" ? "markAsRoot(" + r(D.contents) + ")" : "align(" + JSON.stringify(D.n) + ", " + r(D.contents) + ")";
612
- if (D.type === k)
613
- return "ifBreak(" + r(D.breakContents) + (D.flatContents ? ", " + r(D.flatContents) : "") + (D.groupId ? (D.flatContents ? "" : ', ""') + `, { groupId: ${n(D.groupId)} }` : "") + ")";
549
+ if (D.type === S) return ((s = i?.[a - 1]) == null ? void 0 : s.type) === b && i[a - 1].hard ? void 0 : "breakParent";
550
+ if (D.type === $) return "trim";
551
+ if (D.type === I) return "indent(" + r(D.contents) + ")";
552
+ if (D.type === P) return D.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + r(D.contents) + ")" : D.n < 0 ? "dedent(" + r(D.contents) + ")" : D.n.type === "root" ? "markAsRoot(" + r(D.contents) + ")" : "align(" + JSON.stringify(D.n) + ", " + r(D.contents) + ")";
553
+ if (D.type === k) return "ifBreak(" + r(D.breakContents) + (D.flatContents ? ", " + r(D.flatContents) : "") + (D.groupId ? (D.flatContents ? "" : ', ""') + `, { groupId: ${n(D.groupId)} }` : "") + ")";
614
554
  if (D.type === L) {
615
555
  let c = [];
616
556
  D.negate && c.push("negate: true"), D.groupId && c.push(`groupId: ${n(D.groupId)}`);
@@ -623,28 +563,20 @@ function hr(e) {
623
563
  let F = c.length > 0 ? `, { ${c.join(", ")} }` : "";
624
564
  return D.expandedStates ? `conditionalGroup([${D.expandedStates.map((l) => r(l)).join(",")}]${F})` : `group(${r(D.contents)}${F})`;
625
565
  }
626
- if (D.type === O)
627
- return `fill([${D.parts.map((c) => r(c)).join(", ")}])`;
628
- if (D.type === R)
629
- return "lineSuffix(" + r(D.contents) + ")";
630
- if (D.type === W)
631
- return "lineSuffixBoundary";
632
- if (D.type === _)
633
- return `label(${JSON.stringify(D.label)}, ${r(D.contents)})`;
634
- if (D.type === q)
635
- return "cursor";
566
+ if (D.type === O) return `fill([${D.parts.map((c) => r(c)).join(", ")}])`;
567
+ if (D.type === R) return "lineSuffix(" + r(D.contents) + ")";
568
+ if (D.type === W) return "lineSuffixBoundary";
569
+ if (D.type === _) return `label(${JSON.stringify(D.label)}, ${r(D.contents)})`;
570
+ if (D.type === q) return "cursor";
636
571
  throw new Error("Unknown doc type " + D.type);
637
572
  }
638
573
  function n(D) {
639
- if (typeof D != "symbol")
640
- return JSON.stringify(String(D));
641
- if (D in u)
642
- return u[D];
574
+ if (typeof D != "symbol") return JSON.stringify(String(D));
575
+ if (D in u) return u[D];
643
576
  let a = D.description || "symbol";
644
577
  for (let i = 0; ; i++) {
645
578
  let o = a + (i > 0 ? ` #${i}` : "");
646
- if (!t.has(o))
647
- return t.add(o), u[D] = `Symbol.for(${JSON.stringify(o)})`;
579
+ if (!t.has(o)) return t.add(o), u[D] = `Symbol.for(${JSON.stringify(o)})`;
648
580
  }
649
581
  }
650
582
  }
@@ -657,10 +589,8 @@ function Er(e) {
657
589
  }
658
590
  var gr = (e) => !(mr(e) || Er(e)), yr = /[^\x20-\x7F]/u;
659
591
  function vr(e) {
660
- if (!e)
661
- return 0;
662
- if (!yr.test(e))
663
- return e.length;
592
+ if (!e) return 0;
593
+ if (!yr.test(e)) return e.length;
664
594
  e = e.replace(Cr(), " ");
665
595
  let u = 0;
666
596
  for (let t of e) {
@@ -669,7 +599,7 @@ function vr(e) {
669
599
  }
670
600
  return u;
671
601
  }
672
- var Ge = vr, A = Symbol("MODE_BREAK"), x = Symbol("MODE_FLAT"), ee = Symbol("cursor"), Te = Symbol("DOC_FILL_PRINTED_LENGTH");
602
+ var Ge = vr, A = /* @__PURE__ */ Symbol("MODE_BREAK"), x = /* @__PURE__ */ Symbol("MODE_FLAT"), ee = /* @__PURE__ */ Symbol("cursor"), Te = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
673
603
  function zu() {
674
604
  return { value: "", length: 0, queue: [] };
675
605
  }
@@ -681,20 +611,19 @@ function br(e, u, t) {
681
611
  }
682
612
  function Ie(e, u, t) {
683
613
  let r = u.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, u], n = "", D = 0, a = 0, i = 0;
684
- for (let f of r)
685
- switch (f.type) {
686
- case "indent":
687
- c(), t.useTabs ? o(1) : s(t.tabWidth);
688
- break;
689
- case "stringAlign":
690
- c(), n += f.n, D += f.n.length;
691
- break;
692
- case "numberAlign":
693
- a += 1, i += f.n;
694
- break;
695
- default:
696
- throw new Error(`Unexpected type '${f.type}'`);
697
- }
614
+ for (let f of r) switch (f.type) {
615
+ case "indent":
616
+ c(), t.useTabs ? o(1) : s(t.tabWidth);
617
+ break;
618
+ case "stringAlign":
619
+ c(), n += f.n, D += f.n.length;
620
+ break;
621
+ case "numberAlign":
622
+ a += 1, i += f.n;
623
+ break;
624
+ default:
625
+ throw new Error(`Unexpected type '${f.type}'`);
626
+ }
698
627
  return l(), { ...e, value: n, length: D, queue: r };
699
628
  function o(f) {
700
629
  n += " ".repeat(f), D += t.tabWidth * f;
@@ -717,36 +646,30 @@ function Ie(e, u, t) {
717
646
  }
718
647
  function Pe(e) {
719
648
  let u = 0, t = 0, r = e.length;
720
- e:
721
- for (; r--; ) {
722
- let n = e[r];
723
- if (n === ee) {
724
- t++;
725
- continue;
726
- }
727
- for (let D = n.length - 1; D >= 0; D--) {
728
- let a = n[D];
729
- if (a === " " || a === " ")
730
- u++;
731
- else {
732
- e[r] = n.slice(0, D + 1);
733
- break e;
734
- }
649
+ e: for (; r--; ) {
650
+ let n = e[r];
651
+ if (n === ee) {
652
+ t++;
653
+ continue;
654
+ }
655
+ for (let D = n.length - 1; D >= 0; D--) {
656
+ let a = n[D];
657
+ if (a === " " || a === " ") u++;
658
+ else {
659
+ e[r] = n.slice(0, D + 1);
660
+ break e;
735
661
  }
736
662
  }
737
- if (u > 0 || t > 0)
738
- for (e.length = r + 1; t-- > 0; )
739
- e.push(ee);
663
+ }
664
+ if (u > 0 || t > 0) for (e.length = r + 1; t-- > 0; ) e.push(ee);
740
665
  return u;
741
666
  }
742
667
  function fe(e, u, t, r, n, D) {
743
- if (t === Number.POSITIVE_INFINITY)
744
- return !0;
668
+ if (t === Number.POSITIVE_INFINITY) return !0;
745
669
  let a = u.length, i = [e], o = [];
746
670
  for (; t >= 0; ) {
747
671
  if (i.length === 0) {
748
- if (a === 0)
749
- return !0;
672
+ if (a === 0) return !0;
750
673
  i.push(u[--a]);
751
674
  continue;
752
675
  }
@@ -758,8 +681,7 @@ function fe(e, u, t, r, n, D) {
758
681
  case T:
759
682
  case O: {
760
683
  let l = F === T ? c : c.parts, d = c[Te] ?? 0;
761
- for (let f = l.length - 1; f >= d; f--)
762
- i.push({ mode: s, doc: l[f] });
684
+ for (let f = l.length - 1; f >= d; f--) i.push({ mode: s, doc: l[f] });
763
685
  break;
764
686
  }
765
687
  case I:
@@ -772,8 +694,7 @@ function fe(e, u, t, r, n, D) {
772
694
  t += Pe(o);
773
695
  break;
774
696
  case w: {
775
- if (D && c.break)
776
- return !1;
697
+ if (D && c.break) return !1;
777
698
  let l = c.break ? A : s, d = c.expandedStates && l === A ? v(!1, c.expandedStates, -1) : c.contents;
778
699
  i.push({ mode: l, doc: d });
779
700
  break;
@@ -784,16 +705,14 @@ function fe(e, u, t, r, n, D) {
784
705
  break;
785
706
  }
786
707
  case b:
787
- if (s === A || c.hard)
788
- return !0;
708
+ if (s === A || c.hard) return !0;
789
709
  c.soft || (o.push(" "), t--);
790
710
  break;
791
711
  case R:
792
712
  r = !0;
793
713
  break;
794
714
  case W:
795
- if (r)
796
- return !1;
715
+ if (r) return !1;
797
716
  break;
798
717
  }
799
718
  }
@@ -812,12 +731,10 @@ function ye(e, u) {
812
731
  break;
813
732
  }
814
733
  case T:
815
- for (let h = f.length - 1; h >= 0; h--)
816
- a.push({ ind: l, mode: d, doc: f[h] });
734
+ for (let h = f.length - 1; h >= 0; h--) a.push({ ind: l, mode: d, doc: f[h] });
817
735
  break;
818
736
  case q:
819
- if (c >= 2)
820
- throw new Error("There are too many 'cursor' in doc.");
737
+ if (c >= 2) throw new Error("There are too many 'cursor' in doc.");
821
738
  i.push(ee), c++;
822
739
  break;
823
740
  case I:
@@ -839,27 +756,23 @@ function ye(e, u) {
839
756
  case A: {
840
757
  o = !1;
841
758
  let h = { ind: l, mode: x, doc: f.contents }, p = r - D, C = s.length > 0;
842
- if (!f.break && fe(h, a, p, C, t))
843
- a.push(h);
759
+ if (!f.break && fe(h, a, p, C, t)) a.push(h);
844
760
  else if (f.expandedStates) {
845
761
  let E = v(!1, f.expandedStates, -1);
846
762
  if (f.break) {
847
763
  a.push({ ind: l, mode: A, doc: E });
848
764
  break;
849
- } else
850
- for (let m = 1; m < f.expandedStates.length + 1; m++)
851
- if (m >= f.expandedStates.length) {
852
- a.push({ ind: l, mode: A, doc: E });
853
- break;
854
- } else {
855
- let y = f.expandedStates[m], g = { ind: l, mode: x, doc: y };
856
- if (fe(g, a, p, C, t)) {
857
- a.push(g);
858
- break;
859
- }
860
- }
861
- } else
862
- a.push({ ind: l, mode: A, doc: f.contents });
765
+ } else for (let m = 1; m < f.expandedStates.length + 1; m++) if (m >= f.expandedStates.length) {
766
+ a.push({ ind: l, mode: A, doc: E });
767
+ break;
768
+ } else {
769
+ let y = f.expandedStates[m], g = { ind: l, mode: x, doc: y };
770
+ if (fe(g, a, p, C, t)) {
771
+ a.push(g);
772
+ break;
773
+ }
774
+ }
775
+ } else a.push({ ind: l, mode: A, doc: f.contents });
863
776
  break;
864
777
  }
865
778
  }
@@ -867,8 +780,7 @@ function ye(e, u) {
867
780
  break;
868
781
  case O: {
869
782
  let h = r - D, p = f[Te] ?? 0, { parts: C } = f, E = C.length - p;
870
- if (E === 0)
871
- break;
783
+ if (E === 0) break;
872
784
  let m = C[p + 0], y = C[p + 1], g = { ind: l, mode: x, doc: m }, B = { ind: l, mode: A, doc: m }, M = fe(g, [], h, s.length > 0, t, !0);
873
785
  if (E === 1) {
874
786
  M ? a.push(g) : a.push(B);
@@ -905,8 +817,7 @@ function ye(e, u) {
905
817
  case b:
906
818
  switch (d) {
907
819
  case x:
908
- if (f.hard)
909
- o = !0;
820
+ if (f.hard) o = !0;
910
821
  else {
911
822
  f.soft || (i.push(" "), D += 1);
912
823
  break;
@@ -933,8 +844,7 @@ function ye(e, u) {
933
844
  let F = i.indexOf(ee);
934
845
  if (F !== -1) {
935
846
  let l = i.indexOf(ee, F + 1);
936
- if (l === -1)
937
- return { formatted: i.filter((p) => p !== ee).join("") };
847
+ if (l === -1) return { formatted: i.filter((p) => p !== ee).join("") };
938
848
  let d = i.slice(0, F).join(""), f = i.slice(F + 1, l).join(""), h = i.slice(l + 1).join("");
939
849
  return { formatted: d + f + h, cursorNodeStart: d.length, cursorNodeText: f };
940
850
  }
@@ -942,8 +852,7 @@ function ye(e, u) {
942
852
  }
943
853
  function Ar(e, u, t = 0) {
944
854
  let r = 0;
945
- for (let n = t; n < e.length; ++n)
946
- e[n] === " " ? r = r + u - r % u : r++;
855
+ for (let n = t; n < e.length; ++n) e[n] === " " ? r = r + u - r % u : r++;
947
856
  return r;
948
857
  }
949
858
  var He = Ar, J, $e, pe, wr = class {
@@ -1013,8 +922,7 @@ var He = Ar, J, $e, pe, wr = class {
1013
922
  }
1014
923
  call(e, ...u) {
1015
924
  let { stack: t } = this, { length: r } = t, n = v(!1, t, -1);
1016
- for (let D of u)
1017
- n = n[D], t.push(D, n);
925
+ for (let D of u) n = n[D], t.push(D, n);
1018
926
  try {
1019
927
  return e(this);
1020
928
  } finally {
@@ -1031,11 +939,9 @@ var He = Ar, J, $e, pe, wr = class {
1031
939
  }
1032
940
  each(e, ...u) {
1033
941
  let { stack: t } = this, { length: r } = t, n = v(!1, t, -1);
1034
- for (let D of u)
1035
- n = n[D], t.push(D, n);
942
+ for (let D of u) n = n[D], t.push(D, n);
1036
943
  try {
1037
- for (let D = 0; D < n.length; ++D)
1038
- t.push(D, n[D]), e(this, D, n), t.length -= 2;
944
+ for (let D = 0; D < n.length; ++D) t.push(D, n[D]), e(this, D, n), t.length -= 2;
1039
945
  } finally {
1040
946
  t.length = r;
1041
947
  }
@@ -1049,32 +955,24 @@ var He = Ar, J, $e, pe, wr = class {
1049
955
  match(...e) {
1050
956
  let u = this.stack.length - 1, t = null, r = this.stack[u--];
1051
957
  for (let n of e) {
1052
- if (r === void 0)
1053
- return !1;
958
+ if (r === void 0) return !1;
1054
959
  let D = null;
1055
- if (typeof t == "number" && (D = t, t = this.stack[u--], r = this.stack[u--]), n && !n(r, t, D))
1056
- return !1;
960
+ if (typeof t == "number" && (D = t, t = this.stack[u--], r = this.stack[u--]), n && !n(r, t, D)) return !1;
1057
961
  t = this.stack[u--], r = this.stack[u--];
1058
962
  }
1059
963
  return !0;
1060
964
  }
1061
965
  findAncestor(e) {
1062
- for (let u of De(this, J, pe).call(this))
1063
- if (e(u))
1064
- return u;
966
+ for (let u of De(this, J, pe).call(this)) if (e(u)) return u;
1065
967
  }
1066
968
  hasAncestor(e) {
1067
- for (let u of De(this, J, pe).call(this))
1068
- if (e(u))
1069
- return !0;
969
+ for (let u of De(this, J, pe).call(this)) if (e(u)) return !0;
1070
970
  return !1;
1071
971
  }
1072
972
  };
1073
973
  J = /* @__PURE__ */ new WeakSet(), $e = function(e) {
1074
974
  let { stack: u } = this;
1075
- for (let t = u.length - 1; t >= 0; t -= 2)
1076
- if (!Array.isArray(u[t]) && --e < 0)
1077
- return t;
975
+ for (let t = u.length - 1; t >= 0; t -= 2) if (!Array.isArray(u[t]) && --e < 0) return t;
1078
976
  return -1;
1079
977
  }, pe = function* () {
1080
978
  let { stack: e } = this;
@@ -1093,19 +991,15 @@ function* ve(e, u) {
1093
991
  let { getVisitorKeys: t, filter: r = () => !0 } = u, n = (D) => xr(D) && r(D);
1094
992
  for (let D of t(e)) {
1095
993
  let a = e[D];
1096
- if (Array.isArray(a))
1097
- for (let i of a)
1098
- n(i) && (yield i);
1099
- else
1100
- n(a) && (yield a);
994
+ if (Array.isArray(a)) for (let i of a) n(i) && (yield i);
995
+ else n(a) && (yield a);
1101
996
  }
1102
997
  }
1103
998
  function* Nr(e, u) {
1104
999
  let t = [e];
1105
1000
  for (let r = 0; r < t.length; r++) {
1106
1001
  let n = t[r];
1107
- for (let D of ve(n, u))
1108
- yield D, t.push(D);
1002
+ for (let D of ve(n, u)) yield D, t.push(D);
1109
1003
  }
1110
1004
  }
1111
1005
  function Or(e, u) {
@@ -1114,16 +1008,13 @@ function Or(e, u) {
1114
1008
  function se(e) {
1115
1009
  return (u, t, r) => {
1116
1010
  let n = !!(r != null && r.backwards);
1117
- if (t === !1)
1118
- return !1;
1011
+ if (t === !1) return !1;
1119
1012
  let { length: D } = u, a = t;
1120
1013
  for (; a >= 0 && a < D; ) {
1121
1014
  let i = u.charAt(a);
1122
1015
  if (e instanceof RegExp) {
1123
- if (!e.test(i))
1124
- return a;
1125
- } else if (!e.includes(i))
1126
- return a;
1016
+ if (!e.test(i)) return a;
1017
+ } else if (!e.includes(i)) return a;
1127
1018
  n ? a-- : a++;
1128
1019
  }
1129
1020
  return a === -1 || a === D ? a : !1;
@@ -1132,23 +1023,18 @@ function se(e) {
1132
1023
  var _r = se(/\s/u), z = se(" "), Uu = se(",; "), Ju = se(/[^\n\r]/u);
1133
1024
  function jr(e, u, t) {
1134
1025
  let r = !!(t != null && t.backwards);
1135
- if (u === !1)
1136
- return !1;
1026
+ if (u === !1) return !1;
1137
1027
  let n = e.charAt(u);
1138
1028
  if (r) {
1139
1029
  if (e.charAt(u - 1) === "\r" && n === `
1140
- `)
1141
- return u - 2;
1030
+ `) return u - 2;
1142
1031
  if (n === `
1143
- ` || n === "\r" || n === "\u2028" || n === "\u2029")
1144
- return u - 1;
1032
+ ` || n === "\r" || n === "\u2028" || n === "\u2029") return u - 1;
1145
1033
  } else {
1146
1034
  if (n === "\r" && e.charAt(u + 1) === `
1147
- `)
1148
- return u + 2;
1035
+ `) return u + 2;
1149
1036
  if (n === `
1150
- ` || n === "\r" || n === "\u2028" || n === "\u2029")
1151
- return u + 1;
1037
+ ` || n === "\r" || n === "\u2028" || n === "\u2029") return u + 1;
1152
1038
  }
1153
1039
  return u;
1154
1040
  }
@@ -1184,11 +1070,9 @@ function oe(e, u) {
1184
1070
  }
1185
1071
  var ke = /* @__PURE__ */ new WeakMap();
1186
1072
  function Ye(e, u) {
1187
- if (ke.has(e))
1188
- return ke.get(e);
1073
+ if (ke.has(e)) return ke.get(e);
1189
1074
  let { printer: { getCommentChildNodes: t, canAttachComment: r, getVisitorKeys: n }, locStart: D, locEnd: a } = u;
1190
- if (!r)
1191
- return [];
1075
+ if (!r) return [];
1192
1076
  let i = (t?.(e, u) ?? [...ve(e, { getVisitorKeys: Be(n) })]).flatMap((o) => r(o) ? [o] : Ye(o, u));
1193
1077
  return i.sort((o, s) => D(o) - D(s) || a(o) - a(s)), ke.set(e, i), i;
1194
1078
  }
@@ -1196,8 +1080,7 @@ function Hu(e, u, t, r) {
1196
1080
  let { locStart: n, locEnd: D } = t, a = n(u), i = D(u), o = Ye(e, t), s, c, F = 0, l = o.length;
1197
1081
  for (; F < l; ) {
1198
1082
  let d = F + l >> 1, f = o[d], h = n(f), p = D(f);
1199
- if (h <= a && i <= p)
1200
- return Hu(f, u, t, f);
1083
+ if (h <= a && i <= p) return Hu(f, u, t, f);
1201
1084
  if (p <= a) {
1202
1085
  s = f, F = d + 1;
1203
1086
  continue;
@@ -1217,75 +1100,57 @@ function Hu(e, u, t, r) {
1217
1100
  var Se = () => !1;
1218
1101
  function Wr(e, u) {
1219
1102
  let { comments: t } = e;
1220
- if (delete e.comments, !Pr(t) || !u.printer.canAttachComment)
1221
- return;
1103
+ if (delete e.comments, !Pr(t) || !u.printer.canAttachComment) return;
1222
1104
  let r = [], { printer: { experimentalFeatures: { avoidAstMutation: n = !1 } = {}, handleComments: D = {} }, originalText: a } = u, { ownLine: i = Se, endOfLine: o = Se, remaining: s = Se } = D, c = t.map((F, l) => ({ ...Hu(e, F, u), comment: F, text: a, options: u, ast: e, isLastComment: t.length - 1 === l }));
1223
1105
  for (let [F, l] of c.entries()) {
1224
1106
  let { comment: d, precedingNode: f, enclosingNode: h, followingNode: p, text: C, options: E, ast: m, isLastComment: y } = l, g;
1225
- if (n ? g = [l] : (d.enclosingNode = h, d.precedingNode = f, d.followingNode = p, g = [d, C, E, m, y]), Mr(C, E, c, F))
1226
- d.placement = "ownLine", i(...g) || (p ? ie(p, d) : f ? oe(f, d) : G(h || m, d));
1227
- else if (Vr(C, E, c, F))
1228
- d.placement = "endOfLine", o(...g) || (f ? oe(f, d) : p ? ie(p, d) : G(h || m, d));
1229
- else if (d.placement = "remaining", !s(...g))
1230
- if (f && p) {
1231
- let B = r.length;
1232
- B > 0 && r[B - 1].followingNode !== p && au(r, E), r.push(l);
1233
- } else
1234
- f ? oe(f, d) : p ? ie(p, d) : G(h || m, d);
1235
- }
1236
- if (au(r, u), !n)
1237
- for (let F of t)
1238
- delete F.precedingNode, delete F.enclosingNode, delete F.followingNode;
1107
+ if (n ? g = [l] : (d.enclosingNode = h, d.precedingNode = f, d.followingNode = p, g = [d, C, E, m, y]), Mr(C, E, c, F)) d.placement = "ownLine", i(...g) || (p ? ie(p, d) : f ? oe(f, d) : G(h || m, d));
1108
+ else if (Vr(C, E, c, F)) d.placement = "endOfLine", o(...g) || (f ? oe(f, d) : p ? ie(p, d) : G(h || m, d));
1109
+ else if (d.placement = "remaining", !s(...g)) if (f && p) {
1110
+ let B = r.length;
1111
+ B > 0 && r[B - 1].followingNode !== p && au(r, E), r.push(l);
1112
+ } else f ? oe(f, d) : p ? ie(p, d) : G(h || m, d);
1113
+ }
1114
+ if (au(r, u), !n) for (let F of t) delete F.precedingNode, delete F.enclosingNode, delete F.followingNode;
1239
1115
  }
1240
1116
  var Ku = (e) => !/[\S\n\u2028\u2029]/u.test(e);
1241
1117
  function Mr(e, u, t, r) {
1242
1118
  let { comment: n, precedingNode: D } = t[r], { locStart: a, locEnd: i } = u, o = a(n);
1243
- if (D)
1244
- for (let s = r - 1; s >= 0; s--) {
1245
- let { comment: c, precedingNode: F } = t[s];
1246
- if (F !== D || !Ku(e.slice(i(c), o)))
1247
- break;
1248
- o = a(c);
1249
- }
1119
+ if (D) for (let s = r - 1; s >= 0; s--) {
1120
+ let { comment: c, precedingNode: F } = t[s];
1121
+ if (F !== D || !Ku(e.slice(i(c), o))) break;
1122
+ o = a(c);
1123
+ }
1250
1124
  return V(e, o, { backwards: !0 });
1251
1125
  }
1252
1126
  function Vr(e, u, t, r) {
1253
1127
  let { comment: n, followingNode: D } = t[r], { locStart: a, locEnd: i } = u, o = i(n);
1254
- if (D)
1255
- for (let s = r + 1; s < t.length; s++) {
1256
- let { comment: c, followingNode: F } = t[s];
1257
- if (F !== D || !Ku(e.slice(o, a(c))))
1258
- break;
1259
- o = i(c);
1260
- }
1128
+ if (D) for (let s = r + 1; s < t.length; s++) {
1129
+ let { comment: c, followingNode: F } = t[s];
1130
+ if (F !== D || !Ku(e.slice(o, a(c)))) break;
1131
+ o = i(c);
1132
+ }
1261
1133
  return V(e, o);
1262
1134
  }
1263
1135
  function au(e, u) {
1264
1136
  var t, r;
1265
1137
  let n = e.length;
1266
- if (n === 0)
1267
- return;
1138
+ if (n === 0) return;
1268
1139
  let { precedingNode: D, followingNode: a } = e[0], i = u.locStart(a), o;
1269
1140
  for (o = n; o > 0; --o) {
1270
1141
  let { comment: s, precedingNode: c, followingNode: F } = e[o - 1];
1271
1142
  Le.strictEqual(c, D), Le.strictEqual(F, a);
1272
1143
  let l = u.originalText.slice(u.locEnd(s), i);
1273
- if (((r = (t = u.printer).isGap) == null ? void 0 : r.call(t, l, u)) ?? /^[\s(]*$/u.test(l))
1274
- i = u.locStart(s);
1275
- else
1276
- break;
1144
+ if (((r = (t = u.printer).isGap) == null ? void 0 : r.call(t, l, u)) ?? /^[\s(]*$/u.test(l)) i = u.locStart(s);
1145
+ else break;
1277
1146
  }
1278
- for (let [s, { comment: c }] of e.entries())
1279
- s < o ? oe(D, c) : ie(a, c);
1280
- for (let s of [D, a])
1281
- s.comments && s.comments.length > 1 && s.comments.sort((c, F) => u.locStart(c) - u.locStart(F));
1147
+ for (let [s, { comment: c }] of e.entries()) s < o ? oe(D, c) : ie(a, c);
1148
+ for (let s of [D, a]) s.comments && s.comments.length > 1 && s.comments.sort((c, F) => u.locStart(c) - u.locStart(F));
1282
1149
  e.length = 0;
1283
1150
  }
1284
1151
  function xe(e, u, t) {
1285
1152
  let r = t.locStart(u) - 1;
1286
- for (let n = 1; n < e.length; ++n)
1287
- if (r < t.locStart(e[n]))
1288
- return n - 1;
1153
+ for (let n = 1; n < e.length; ++n) if (r < t.locStart(e[n])) return n - 1;
1289
1154
  return 0;
1290
1155
  }
1291
1156
  function zr(e, u) {
@@ -1305,8 +1170,7 @@ function qr(e, u) {
1305
1170
  if ((t = D.isBlockComment) != null && t.call(D, r)) {
1306
1171
  let c = V(a, o(r)) ? V(a, i(r), { backwards: !0 }) ? Y : Ru : " ";
1307
1172
  n.push(c);
1308
- } else
1309
- n.push(Y);
1173
+ } else n.push(Y);
1310
1174
  let s = Z(a, z(a, o(r)));
1311
1175
  return s !== !1 && V(a, s) && n.push(Y), n;
1312
1176
  }
@@ -1321,16 +1185,13 @@ function Ur(e, u, t) {
1321
1185
  }
1322
1186
  function Jr(e, u) {
1323
1187
  let t = e.node;
1324
- if (!t)
1325
- return {};
1326
- let r = u[Symbol.for("printedComments")];
1327
- if ((t.comments || []).filter((i) => !r.has(i)).length === 0)
1328
- return { leading: "", trailing: "" };
1188
+ if (!t) return {};
1189
+ let r = u[/* @__PURE__ */ Symbol.for("printedComments")];
1190
+ if ((t.comments || []).filter((i) => !r.has(i)).length === 0) return { leading: "", trailing: "" };
1329
1191
  let n = [], D = [], a;
1330
1192
  return e.each(() => {
1331
1193
  let i = e.node;
1332
- if (r != null && r.has(i))
1333
- return;
1194
+ if (r != null && r.has(i)) return;
1334
1195
  let { leading: o, trailing: s } = i;
1335
1196
  o ? n.push(qr(e, u)) : s && (a = Ur(e, u, a), D.push(a.doc));
1336
1197
  }, "comments"), { leading: n, trailing: D };
@@ -1340,10 +1201,9 @@ function Gr(e, u, t) {
1340
1201
  return !r && !n ? u : Fe(u, (D) => [r, D, n]);
1341
1202
  }
1342
1203
  function Hr(e) {
1343
- let { [Symbol.for("comments")]: u, [Symbol.for("printedComments")]: t } = e;
1204
+ let { [/* @__PURE__ */ Symbol.for("comments")]: u, [/* @__PURE__ */ Symbol.for("printedComments")]: t } = e;
1344
1205
  for (let r of u) {
1345
- if (!r.printed && !t.has(r))
1346
- throw new Error('Comment "' + r.value.trim() + '" was not printed. Please report this error!');
1206
+ if (!r.printed && !t.has(r)) throw new Error('Comment "' + r.value.trim() + '" was not printed. Please report this error!');
1347
1207
  delete r.printed;
1348
1208
  }
1349
1209
  }
@@ -1357,24 +1217,21 @@ The range will extend forwards to the end of the selected statement.`, cliCatego
1357
1217
  The range will extend backwards to the start of the first line containing the selected statement.`, cliCategory: "Editor" }, requirePragma: { category: "Special", type: "boolean", default: !1, description: "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", cliCategory: "Other" }, tabWidth: { type: "int", category: "Global", default: 2, description: "Number of spaces per indentation level.", range: { start: 0, end: 1 / 0, step: 1 } }, useTabs: { category: "Global", type: "boolean", default: !1, description: "Indent with tabs instead of spaces." }, embeddedLanguageFormatting: { category: "Global", type: "choice", default: "auto", description: "Control how Prettier formats quoted code embedded in the file.", choices: [{ value: "auto", description: "Format embedded code if Prettier can automatically identify it." }, { value: "off", description: "Never automatically format embedded code." }] } };
1358
1218
  function Qu({ plugins: e = [], showDeprecated: u = !1 } = {}) {
1359
1219
  let t = e.flatMap((n) => n.languages ?? []), r = [];
1360
- for (let n of Zr(Object.assign({}, ...e.map(({ options: D }) => D), Kr)))
1361
- !u && n.deprecated || (Array.isArray(n.choices) && (u || (n.choices = n.choices.filter((D) => !D.deprecated)), n.name === "parser" && (n.choices = [...n.choices, ...Yr(n.choices, t, e)])), n.pluginDefaults = Object.fromEntries(e.filter((D) => {
1362
- var a;
1363
- return ((a = D.defaultOptions) == null ? void 0 : a[n.name]) !== void 0;
1364
- }).map((D) => [D.name, D.defaultOptions[n.name]])), r.push(n));
1220
+ for (let n of Zr(Object.assign({}, ...e.map(({ options: D }) => D), Kr))) !u && n.deprecated || (Array.isArray(n.choices) && (u || (n.choices = n.choices.filter((D) => !D.deprecated)), n.name === "parser" && (n.choices = [...n.choices, ...Yr(n.choices, t, e)])), n.pluginDefaults = Object.fromEntries(e.filter((D) => {
1221
+ var a;
1222
+ return ((a = D.defaultOptions) == null ? void 0 : a[n.name]) !== void 0;
1223
+ }).map((D) => [D.name, D.defaultOptions[n.name]])), r.push(n));
1365
1224
  return { languages: t, options: r };
1366
1225
  }
1367
1226
  function* Yr(e, u, t) {
1368
1227
  let r = new Set(e.map((n) => n.value));
1369
- for (let n of u)
1370
- if (n.parsers) {
1371
- for (let D of n.parsers)
1372
- if (!r.has(D)) {
1373
- r.add(D);
1374
- let a = t.find((o) => o.parsers && Object.prototype.hasOwnProperty.call(o.parsers, D)), i = n.name;
1375
- a != null && a.name && (i += ` (plugin: ${a.name})`), yield { value: D, description: i };
1376
- }
1228
+ for (let n of u) if (n.parsers) {
1229
+ for (let D of n.parsers) if (!r.has(D)) {
1230
+ r.add(D);
1231
+ let a = t.find((o) => o.parsers && Object.prototype.hasOwnProperty.call(o.parsers, D)), i = n.name;
1232
+ a != null && a.name && (i += ` (plugin: ${a.name})`), yield { value: D, description: i };
1377
1233
  }
1234
+ }
1378
1235
  }
1379
1236
  function Zr(e) {
1380
1237
  let u = [];
@@ -1385,12 +1242,10 @@ function Zr(e) {
1385
1242
  return u;
1386
1243
  }
1387
1244
  var Qr = (e, u) => {
1388
- if (!(e && u == null))
1389
- return u.toReversed || !Array.isArray(u) ? u.toReversed() : [...u].reverse();
1245
+ if (!(e && u == null)) return u.toReversed || !Array.isArray(u) ? u.toReversed() : [...u].reverse();
1390
1246
  }, Xr = Qr, ou, su, lu, cu, fu, en = ((ou = globalThis.Deno) == null ? void 0 : ou.build.os) === "windows" || ((lu = (su = globalThis.navigator) == null ? void 0 : su.platform) == null ? void 0 : lu.startsWith("Win")) || ((fu = (cu = globalThis.process) == null ? void 0 : cu.platform) == null ? void 0 : fu.startsWith("win")) || !1;
1391
1247
  function Xu(e) {
1392
- if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:")
1393
- throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
1248
+ if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
1394
1249
  return e;
1395
1250
  }
1396
1251
  function un(e) {
@@ -1406,25 +1261,21 @@ function rn(e) {
1406
1261
  }
1407
1262
  var nn = rn, Dn = (e) => String(e).split(/[/\\]/u).pop();
1408
1263
  function du(e, u) {
1409
- if (!u)
1410
- return;
1264
+ if (!u) return;
1411
1265
  let t = Dn(u).toLowerCase();
1412
1266
  return e.find(({ filenames: r }) => r?.some((n) => n.toLowerCase() === t)) ?? e.find(({ extensions: r }) => r?.some((n) => t.endsWith(n)));
1413
1267
  }
1414
1268
  function an(e, u) {
1415
- if (u)
1416
- return e.find(({ name: t }) => t.toLowerCase() === u) ?? e.find(({ aliases: t }) => t?.includes(u)) ?? e.find(({ extensions: t }) => t?.includes(`.${u}`));
1269
+ if (u) return e.find(({ name: t }) => t.toLowerCase() === u) ?? e.find(({ aliases: t }) => t?.includes(u)) ?? e.find(({ extensions: t }) => t?.includes(`.${u}`));
1417
1270
  }
1418
1271
  function Fu(e, u) {
1419
1272
  if (u) {
1420
- if (String(u).startsWith("file:"))
1421
- try {
1422
- u = nn(u);
1423
- } catch {
1424
- return;
1425
- }
1426
- if (typeof u == "string")
1427
- return e.find(({ isSupported: t }) => t?.({ filepath: u }));
1273
+ if (String(u).startsWith("file:")) try {
1274
+ u = nn(u);
1275
+ } catch {
1276
+ return;
1277
+ }
1278
+ if (typeof u == "string") return e.find(({ isSupported: t }) => t?.({ filepath: u }));
1428
1279
  }
1429
1280
  }
1430
1281
  function on(e, u) {
@@ -1432,16 +1283,14 @@ function on(e, u) {
1432
1283
  return r?.parsers[0];
1433
1284
  }
1434
1285
  var sn = on, ue = { key: (e) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e) ? e : JSON.stringify(e), value(e) {
1435
- if (e === null || typeof e != "object")
1436
- return JSON.stringify(e);
1437
- if (Array.isArray(e))
1438
- return `[${e.map((t) => ue.value(t)).join(", ")}]`;
1286
+ if (e === null || typeof e != "object") return JSON.stringify(e);
1287
+ if (Array.isArray(e)) return `[${e.map((t) => ue.value(t)).join(", ")}]`;
1439
1288
  let u = Object.keys(e);
1440
1289
  return u.length === 0 ? "{}" : `{ ${u.map((t) => `${ue.key(t)}: ${ue.value(e[t])}`).join(", ")} }`;
1441
1290
  }, pair: ({ key: e, value: u }) => ue.value({ [e]: u }) }, et = new Proxy(String, { get: () => et }), N = et, ln = (e, u, { descriptor: t }) => {
1442
1291
  let r = [`${N.yellow(typeof e == "string" ? t.key(e) : t.pair(e))} is deprecated`];
1443
1292
  return u && r.push(`we now treat it as ${N.blue(typeof u == "string" ? t.key(u) : t.pair(u))}`), r.join("; ") + ".";
1444
- }, ut = Symbol.for("vnopts.VALUE_NOT_EXIST"), he = Symbol.for("vnopts.VALUE_UNCHANGED"), pu = " ".repeat(2), cn = (e, u, t) => {
1293
+ }, ut = /* @__PURE__ */ Symbol.for("vnopts.VALUE_NOT_EXIST"), he = /* @__PURE__ */ Symbol.for("vnopts.VALUE_UNCHANGED"), pu = " ".repeat(2), cn = (e, u, t) => {
1445
1294
  let { text: r, list: n } = t.normalizeExpectedResult(t.schemas[e].expected(t)), D = [];
1446
1295
  return r && D.push(hu(e, u, r, t.descriptor)), n && D.push([hu(e, u, n.title, t.descriptor)].concat(n.values.map((a) => tt(a, t.loggerPrintWidth))).join(`
1447
1296
  `)), rt(D, t.loggerPrintWidth);
@@ -1455,32 +1304,24 @@ function tt({ text: e, list: u }, t) {
1455
1304
  `)), rt(r, t);
1456
1305
  }
1457
1306
  function rt(e, u) {
1458
- if (e.length === 1)
1459
- return e[0];
1307
+ if (e.length === 1) return e[0];
1460
1308
  let [t, r] = e, [n, D] = e.map((a) => a.split(`
1461
1309
  `, 1)[0].length);
1462
1310
  return n > u && n > D ? r : t;
1463
1311
  }
1464
1312
  var Ne = [], Cu = [];
1465
1313
  function fn(e, u) {
1466
- if (e === u)
1467
- return 0;
1314
+ if (e === u) return 0;
1468
1315
  let t = e;
1469
1316
  e.length > u.length && (e = u, u = t);
1470
1317
  let r = e.length, n = u.length;
1471
- for (; r > 0 && e.charCodeAt(~-r) === u.charCodeAt(~-n); )
1472
- r--, n--;
1318
+ for (; r > 0 && e.charCodeAt(~-r) === u.charCodeAt(~-n); ) r--, n--;
1473
1319
  let D = 0;
1474
- for (; D < r && e.charCodeAt(D) === u.charCodeAt(D); )
1475
- D++;
1476
- if (r -= D, n -= D, r === 0)
1477
- return n;
1320
+ for (; D < r && e.charCodeAt(D) === u.charCodeAt(D); ) D++;
1321
+ if (r -= D, n -= D, r === 0) return n;
1478
1322
  let a, i, o, s, c = 0, F = 0;
1479
- for (; c < r; )
1480
- Cu[c] = e.charCodeAt(D + c), Ne[c] = ++c;
1481
- for (; F < n; )
1482
- for (a = u.charCodeAt(D + F), o = F++, i = F, c = 0; c < r; c++)
1483
- s = a === Cu[c] ? o : o + 1, o = Ne[c], i = Ne[c] = o > i ? s > i ? i + 1 : s : s > o ? o + 1 : s;
1323
+ for (; c < r; ) Cu[c] = e.charCodeAt(D + c), Ne[c] = ++c;
1324
+ for (; F < n; ) for (a = u.charCodeAt(D + F), o = F++, i = F, c = 0; c < r; c++) s = a === Cu[c] ? o : o + 1, o = Ne[c], i = Ne[c] = o > i ? s > i ? i + 1 : s : s > o ? o + 1 : s;
1484
1325
  return i;
1485
1326
  }
1486
1327
  var nt = (e, u, { descriptor: t, logger: r, schemas: n }) => {
@@ -1489,8 +1330,7 @@ var nt = (e, u, { descriptor: t, logger: r, schemas: n }) => {
1489
1330
  }, dn = ["default", "expected", "validate", "deprecated", "forward", "redirect", "overlap", "preprocess", "postprocess"];
1490
1331
  function Fn(e, u) {
1491
1332
  let t = new e(u), r = Object.create(t);
1492
- for (let n of dn)
1493
- n in u && (r[n] = pn(u[n], t, U.prototype[n].length));
1333
+ for (let n of dn) n in u && (r[n] = pn(u[n], t, U.prototype[n].length));
1494
1334
  return r;
1495
1335
  }
1496
1336
  var U = class {
@@ -1557,8 +1397,7 @@ var hn = class extends U {
1557
1397
  return { text: u && `an array of ${u}`, list: t && { title: "an array of the following values", values: [{ list: t }] } };
1558
1398
  }
1559
1399
  validate(e, u) {
1560
- if (!Array.isArray(e))
1561
- return !1;
1400
+ if (!Array.isArray(e)) return !1;
1562
1401
  let t = [];
1563
1402
  for (let r of e) {
1564
1403
  let n = u.normalizeValidateResult(this._valueSchema.validate(r, u), r);
@@ -1609,8 +1448,7 @@ function gn(e, u) {
1609
1448
  let t = /* @__PURE__ */ Object.create(null);
1610
1449
  for (let r of e) {
1611
1450
  let n = r[u];
1612
- if (t[n])
1613
- throw new Error(`Duplicate ${u} ${JSON.stringify(n)}`);
1451
+ if (t[n]) throw new Error(`Duplicate ${u} ${JSON.stringify(n)}`);
1614
1452
  t[n] = r;
1615
1453
  }
1616
1454
  return t;
@@ -1619,8 +1457,7 @@ function yn(e, u) {
1619
1457
  let t = /* @__PURE__ */ new Map();
1620
1458
  for (let r of e) {
1621
1459
  let n = r[u];
1622
- if (t.has(n))
1623
- throw new Error(`Duplicate ${u} ${JSON.stringify(n)}`);
1460
+ if (t.has(n)) throw new Error(`Duplicate ${u} ${JSON.stringify(n)}`);
1624
1461
  t.set(n, r);
1625
1462
  }
1626
1463
  return t;
@@ -1634,16 +1471,14 @@ function vn() {
1634
1471
  }
1635
1472
  function Bn(e, u) {
1636
1473
  let t = [], r = [];
1637
- for (let n of e)
1638
- u(n) ? t.push(n) : r.push(n);
1474
+ for (let n of e) u(n) ? t.push(n) : r.push(n);
1639
1475
  return [t, r];
1640
1476
  }
1641
1477
  function bn(e) {
1642
1478
  return e === Math.floor(e);
1643
1479
  }
1644
1480
  function An(e, u) {
1645
- if (e === u)
1646
- return 0;
1481
+ if (e === u) return 0;
1647
1482
  let t = typeof e, r = typeof u, n = ["undefined", "object", "boolean", "number", "string"];
1648
1483
  return t !== r ? n.indexOf(t) - n.indexOf(r) : t !== "string" ? Number(e) - Number(u) : e.localeCompare(u);
1649
1484
  }
@@ -1657,8 +1492,7 @@ function Eu(e) {
1657
1492
  return e === void 0 ? {} : e;
1658
1493
  }
1659
1494
  function Dt(e) {
1660
- if (typeof e == "string")
1661
- return { text: e };
1495
+ if (typeof e == "string") return { text: e };
1662
1496
  let { text: u, list: t } = e;
1663
1497
  return kn((u || t) !== void 0, "Unexpected `expected` result, there should be at least one field."), t ? { text: u, list: { title: t.title, values: t.values.map(Dt) } } : { text: u };
1664
1498
  }
@@ -1679,8 +1513,7 @@ function Bu(e, u) {
1679
1513
  return t.length === 0 ? { remain: u, redirect: t } : typeof e == "object" && "remain" in e ? { remain: e.remain, redirect: t } : { redirect: t };
1680
1514
  }
1681
1515
  function kn(e, u) {
1682
- if (!e)
1683
- throw new Error(u);
1516
+ if (!e) throw new Error(u);
1684
1517
  }
1685
1518
  var Sn = class extends U {
1686
1519
  constructor(e) {
@@ -1752,8 +1585,7 @@ var Sn = class extends U {
1752
1585
  }
1753
1586
  r();
1754
1587
  for (let n of Object.keys(this._utils.schemas)) {
1755
- if (!(n in u))
1756
- continue;
1588
+ if (!(n in u)) continue;
1757
1589
  let D = this._utils.schemas[n], a = u[n], i = D.postprocess(a, this._utils);
1758
1590
  i !== he && (this._applyValidation(i, n, D), u[n] = i);
1759
1591
  }
@@ -1768,17 +1600,14 @@ var Sn = class extends U {
1768
1600
  t.push(typeof l == "string" ? { [l]: F } : { [l.key]: l.value });
1769
1601
  }, s = ({ value: F, redirectTo: l }) => {
1770
1602
  let d = yu(a.deprecated(F, this._utils), i, !0);
1771
- if (d !== !1)
1772
- if (d === !0)
1773
- this._hasDeprecationWarned(D) || this._utils.logger.warn(this._deprecatedHandler(D, l, this._utils));
1774
- else
1775
- for (let { value: f } of d) {
1776
- let h = { key: D, value: f };
1777
- if (!this._hasDeprecationWarned(h)) {
1778
- let p = typeof l == "string" ? { key: l, value: f } : l;
1779
- this._utils.logger.warn(this._deprecatedHandler(h, p, this._utils));
1780
- }
1781
- }
1603
+ if (d !== !1) if (d === !0) this._hasDeprecationWarned(D) || this._utils.logger.warn(this._deprecatedHandler(D, l, this._utils));
1604
+ else for (let { value: f } of d) {
1605
+ let h = { key: D, value: f };
1606
+ if (!this._hasDeprecationWarned(h)) {
1607
+ let p = typeof l == "string" ? { key: l, value: f } : l;
1608
+ this._utils.logger.warn(this._deprecatedHandler(h, p, this._utils));
1609
+ }
1610
+ }
1782
1611
  };
1783
1612
  Re(a.forward(i, this._utils), i).forEach(o);
1784
1613
  let c = Bu(a.redirect(i, this._utils), i);
@@ -1786,8 +1615,7 @@ var Sn = class extends U {
1786
1615
  let F = c.remain;
1787
1616
  u[D] = D in u ? a.overlap(u[D], F, this._utils) : F, s({ value: F });
1788
1617
  }
1789
- for (let { from: F, to: l } of c.redirect)
1790
- s({ value: F, redirectTo: l });
1618
+ for (let { from: F, to: l } of c.redirect) s({ value: F, redirectTo: l });
1791
1619
  }
1792
1620
  for (let D of n) {
1793
1621
  let a = e[D];
@@ -1798,9 +1626,7 @@ var Sn = class extends U {
1798
1626
  return t;
1799
1627
  }
1800
1628
  _applyRequiredCheck(e) {
1801
- for (let u of Object.keys(this._utils.schemas))
1802
- if (this._identifyMissing(u, e) && this._identifyRequired(u))
1803
- throw this._invalidHandler(u, ut, this._utils);
1629
+ for (let u of Object.keys(this._utils.schemas)) if (this._identifyMissing(u, e) && this._identifyRequired(u)) throw this._invalidHandler(u, ut, this._utils);
1804
1630
  }
1805
1631
  _partitionOptionKeys(e) {
1806
1632
  let [u, t] = Bn(Object.keys(e).filter((r) => !this._identifyMissing(r, e)), (r) => r in this._utils.schemas);
@@ -1808,25 +1634,20 @@ var Sn = class extends U {
1808
1634
  }
1809
1635
  _applyValidation(e, u, t) {
1810
1636
  let r = gu(t.validate(e, this._utils), e);
1811
- if (r !== !0)
1812
- throw this._invalidHandler(u, r.value, this._utils);
1637
+ if (r !== !0) throw this._invalidHandler(u, r.value, this._utils);
1813
1638
  }
1814
1639
  _applyUnknownHandler(e, u, t, r) {
1815
1640
  let n = this._unknownHandler(e, u, this._utils);
1816
- if (n)
1817
- for (let D of Object.keys(n)) {
1818
- if (this._identifyMissing(D, n))
1819
- continue;
1820
- let a = n[D];
1821
- D in this._utils.schemas ? r(D, a) : t[D] = a;
1822
- }
1641
+ if (n) for (let D of Object.keys(n)) {
1642
+ if (this._identifyMissing(D, n)) continue;
1643
+ let a = n[D];
1644
+ D in this._utils.schemas ? r(D, a) : t[D] = a;
1645
+ }
1823
1646
  }
1824
1647
  _applyPostprocess(e) {
1825
1648
  let u = this._postprocess(e, this._utils);
1826
1649
  if (u !== he) {
1827
- if (u.delete)
1828
- for (let t of u.delete)
1829
- delete e[t];
1650
+ if (u.delete) for (let t of u.delete) delete e[t];
1830
1651
  if (u.override) {
1831
1652
  let { knownKeys: t, unknownKeys: r } = this._partitionOptionKeys(u.override);
1832
1653
  for (let n of t) {
@@ -1846,12 +1667,9 @@ var Sn = class extends U {
1846
1667
  }, Oe;
1847
1668
  function Pn(e, u, { logger: t = !1, isCLI: r = !1, passThrough: n = !1, FlagSchema: D, descriptor: a } = {}) {
1848
1669
  if (r) {
1849
- if (!D)
1850
- throw new Error("'FlagSchema' option is required.");
1851
- if (!a)
1852
- throw new Error("'descriptor' option is required.");
1853
- } else
1854
- a = ue;
1670
+ if (!D) throw new Error("'FlagSchema' option is required.");
1671
+ if (!a) throw new Error("'descriptor' option is required.");
1672
+ } else a = ue;
1855
1673
  let i = n ? Array.isArray(n) ? (l, d) => n.includes(l) ? { [l]: d } : void 0 : (l, d) => ({ [l]: d }) : (l, d, f) => {
1856
1674
  let { _: h, ...p } = f.schemas;
1857
1675
  return nt(l, d, { ...f, schemas: p });
@@ -1863,8 +1681,7 @@ function Pn(e, u, { logger: t = !1, isCLI: r = !1, passThrough: n = !1, FlagSche
1863
1681
  function $n(e, { isCLI: u, FlagSchema: t }) {
1864
1682
  let r = [];
1865
1683
  u && r.push(Cn.create({ name: "_" }));
1866
- for (let n of e)
1867
- r.push(Ln(n, { isCLI: u, optionInfos: e, FlagSchema: t })), n.alias && u && r.push(hn.create({ name: n.alias, sourceName: n.name }));
1684
+ for (let n of e) r.push(Ln(n, { isCLI: u, optionInfos: e, FlagSchema: t })), n.alias && u && r.push(hn.create({ name: n.alias, sourceName: n.name }));
1868
1685
  return r;
1869
1686
  }
1870
1687
  function Ln(e, { isCLI: u, optionInfos: t, FlagSchema: r }) {
@@ -1899,30 +1716,24 @@ function Ln(e, { isCLI: u, optionInfos: t, FlagSchema: r }) {
1899
1716
  }
1900
1717
  var Rn = Pn, Wn = (e, u, t) => {
1901
1718
  if (!(e && u == null)) {
1902
- if (u.findLast)
1903
- return u.findLast(t);
1719
+ if (u.findLast) return u.findLast(t);
1904
1720
  for (let r = u.length - 1; r >= 0; r--) {
1905
1721
  let n = u[r];
1906
- if (t(n, r, u))
1907
- return n;
1722
+ if (t(n, r, u)) return n;
1908
1723
  }
1909
1724
  }
1910
1725
  }, at = Wn;
1911
1726
  function it(e, u) {
1912
- if (!u)
1913
- throw new Error("parserName is required.");
1727
+ if (!u) throw new Error("parserName is required.");
1914
1728
  let t = at(!1, e, (n) => n.parsers && Object.prototype.hasOwnProperty.call(n.parsers, u));
1915
- if (t)
1916
- return t;
1729
+ if (t) return t;
1917
1730
  let r = `Couldn't resolve parser "${u}".`;
1918
1731
  throw r += " Plugins must be explicitly added to the standalone bundle.", new Zu(r);
1919
1732
  }
1920
1733
  function Mn(e, u) {
1921
- if (!u)
1922
- throw new Error("astFormat is required.");
1734
+ if (!u) throw new Error("astFormat is required.");
1923
1735
  let t = at(!1, e, (n) => n.printers && Object.prototype.hasOwnProperty.call(n.printers, u));
1924
- if (t)
1925
- return t;
1736
+ if (t) return t;
1926
1737
  let r = `Couldn't find plugin for AST format "${u}".`;
1927
1738
  throw r += " Plugins must be explicitly added to the standalone bundle.", new Zu(r);
1928
1739
  }
@@ -1942,19 +1753,15 @@ var Au = { astFormat: "estree", printer: {}, originalText: void 0, locStart: nul
1942
1753
  async function zn(e, u = {}) {
1943
1754
  var t;
1944
1755
  let r = { ...e };
1945
- if (!r.parser)
1946
- if (r.filepath) {
1947
- if (r.parser = sn(r, { physicalFile: r.filepath }), !r.parser)
1948
- throw new iu(`No parser could be inferred for file "${r.filepath}".`);
1949
- } else
1950
- throw new iu("No parser and no file path given, couldn't infer a parser.");
1756
+ if (!r.parser) if (r.filepath) {
1757
+ if (r.parser = sn(r, { physicalFile: r.filepath }), !r.parser) throw new iu(`No parser could be inferred for file "${r.filepath}".`);
1758
+ } else throw new iu("No parser and no file path given, couldn't infer a parser.");
1951
1759
  let n = Qu({ plugins: e.plugins, showDeprecated: !0 }).options, D = { ...Au, ...Object.fromEntries(n.filter((l) => l.default !== void 0).map((l) => [l.name, l.default])) }, a = it(r.plugins, r.parser), i = await ot(a, r.parser);
1952
1760
  r.astFormat = i.astFormat, r.locEnd = i.locEnd, r.locStart = i.locStart;
1953
1761
  let o = (t = a.printers) != null && t[i.astFormat] ? a : Mn(r.plugins, i.astFormat), s = await Vn(o, i.astFormat);
1954
1762
  r.printer = s;
1955
1763
  let c = o.defaultOptions ? Object.fromEntries(Object.entries(o.defaultOptions).filter(([, l]) => l !== void 0)) : {}, F = { ...D, ...c };
1956
- for (let [l, d] of Object.entries(F))
1957
- (r[l] === null || r[l] === void 0) && (r[l] = d);
1764
+ for (let [l, d] of Object.entries(F)) (r[l] === null || r[l] === void 0) && (r[l] = d);
1958
1765
  return r.parser === "json" && (r.trailingComma = "none"), Rn(r, n, { passThrough: Object.keys(Au), ...u });
1959
1766
  }
1960
1767
  var ne = zn, qn = St(Ot());
@@ -1981,32 +1788,26 @@ function Jn(e, u) {
1981
1788
  var le = Un;
1982
1789
  async function Gn(e, u, t, r, n) {
1983
1790
  let { embeddedLanguageFormatting: D, printer: { embed: a, hasPrettierIgnore: i = () => !1, getVisitorKeys: o } } = t;
1984
- if (!a || D !== "auto")
1985
- return;
1986
- if (a.length > 2)
1987
- throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");
1791
+ if (!a || D !== "auto") return;
1792
+ if (a.length > 2) throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");
1988
1793
  let s = Be(a.getVisitorKeys ?? o), c = [];
1989
1794
  d();
1990
1795
  let F = e.stack;
1991
- for (let { print: f, node: h, pathStack: p } of c)
1992
- try {
1993
- e.stack = p;
1994
- let C = await f(l, u, e, t);
1995
- C && n.set(h, C);
1996
- } catch (C) {
1997
- if (globalThis.PRETTIER_DEBUG)
1998
- throw C;
1999
- }
1796
+ for (let { print: f, node: h, pathStack: p } of c) try {
1797
+ e.stack = p;
1798
+ let C = await f(l, u, e, t);
1799
+ C && n.set(h, C);
1800
+ } catch (C) {
1801
+ if (globalThis.PRETTIER_DEBUG) throw C;
1802
+ }
2000
1803
  e.stack = F;
2001
1804
  function l(f, h) {
2002
1805
  return Hn(f, h, t, r);
2003
1806
  }
2004
1807
  function d() {
2005
1808
  let { node: f } = e;
2006
- if (f === null || typeof f != "object" || i(e))
2007
- return;
2008
- for (let p of s(f))
2009
- Array.isArray(f[p]) ? e.each(d, p) : e.call(d, p);
1809
+ if (f === null || typeof f != "object" || i(e)) return;
1810
+ for (let p of s(f)) Array.isArray(f[p]) ? e.each(d, p) : e.call(d, p);
2010
1811
  let h = a(e, t);
2011
1812
  if (h) {
2012
1813
  if (typeof h == "function") {
@@ -2022,9 +1823,8 @@ async function Hn(e, u, t, r) {
2022
1823
  return Pu(a);
2023
1824
  }
2024
1825
  function Kn(e, u) {
2025
- let { originalText: t, [Symbol.for("comments")]: r, locStart: n, locEnd: D, [Symbol.for("printedComments")]: a } = u, { node: i } = e, o = n(i), s = D(i);
2026
- for (let c of r)
2027
- n(c) >= o && D(c) <= s && a.add(c);
1826
+ let { originalText: t, [/* @__PURE__ */ Symbol.for("comments")]: r, locStart: n, locEnd: D, [/* @__PURE__ */ Symbol.for("printedComments")]: a } = u, { node: i } = e, o = n(i), s = D(i);
1827
+ for (let c of r) n(c) >= o && D(c) <= s && a.add(c);
2028
1828
  return t.slice(o, s);
2029
1829
  }
2030
1830
  var Yn = Kn;
@@ -2034,10 +1834,8 @@ async function be(e, u) {
2034
1834
  await Gn(r, a, u, be, n);
2035
1835
  let D = await wu(r, u, a, void 0, n);
2036
1836
  if (Hr(u), u.cursorOffset >= 0) {
2037
- if (u.nodeAfterCursor && !u.nodeBeforeCursor)
2038
- return [K, D];
2039
- if (u.nodeBeforeCursor && !u.nodeAfterCursor)
2040
- return [D, K];
1837
+ if (u.nodeAfterCursor && !u.nodeBeforeCursor) return [K, D];
1838
+ if (u.nodeBeforeCursor && !u.nodeAfterCursor) return [D, K];
2041
1839
  }
2042
1840
  return D;
2043
1841
  function a(o, s) {
@@ -2045,11 +1843,9 @@ async function be(e, u) {
2045
1843
  }
2046
1844
  function i(o) {
2047
1845
  let s = r.node;
2048
- if (s == null)
2049
- return "";
1846
+ if (s == null) return "";
2050
1847
  let c = s && typeof s == "object" && o === void 0;
2051
- if (c && t.has(s))
2052
- return t.get(s);
1848
+ if (c && t.has(s)) return t.get(s);
2053
1849
  let F = wu(r, u, a, o, n);
2054
1850
  return c && t.set(s, F), F;
2055
1851
  }
@@ -2072,16 +1868,14 @@ function wu(e, u, t, r, n) {
2072
1868
  }
2073
1869
  async function st(e, u) {
2074
1870
  let t = e.comments ?? [];
2075
- u[Symbol.for("comments")] = t, u[Symbol.for("printedComments")] = /* @__PURE__ */ new Set(), Wr(e, u);
1871
+ u[/* @__PURE__ */ Symbol.for("comments")] = t, u[/* @__PURE__ */ Symbol.for("printedComments")] = /* @__PURE__ */ new Set(), Wr(e, u);
2076
1872
  let { printer: { preprocess: r } } = u;
2077
1873
  return e = r ? await r(e, u) : e, { ast: e, comments: t };
2078
1874
  }
2079
1875
  function Zn(e, u) {
2080
1876
  let { cursorOffset: t, locStart: r, locEnd: n } = u, D = Be(u.printer.getVisitorKeys), a = (d) => r(d) <= t && n(d) >= t, i = e, o = [e];
2081
- for (let d of Nr(e, { getVisitorKeys: D, filter: a }))
2082
- o.push(d), i = d;
2083
- if (Or(i, { getVisitorKeys: D }))
2084
- return { cursorNode: i };
1877
+ for (let d of Nr(e, { getVisitorKeys: D, filter: a })) o.push(d), i = d;
1878
+ if (Or(i, { getVisitorKeys: D })) return { cursorNode: i };
2085
1879
  let s, c, F = -1, l = Number.POSITIVE_INFINITY;
2086
1880
  for (; o.length > 0 && (s === void 0 || c === void 0); ) {
2087
1881
  i = o.pop();
@@ -2102,31 +1896,24 @@ function Zn(e, u) {
2102
1896
  var lt = Zn;
2103
1897
  function Qn(e, u) {
2104
1898
  let { printer: { massageAstNode: t, getVisitorKeys: r } } = u;
2105
- if (!t)
2106
- return e;
1899
+ if (!t) return e;
2107
1900
  let n = Be(r), D = t.ignoredProperties ?? /* @__PURE__ */ new Set();
2108
1901
  return a(e);
2109
1902
  function a(i, o) {
2110
- if (!(i !== null && typeof i == "object"))
2111
- return i;
2112
- if (Array.isArray(i))
2113
- return i.map((l) => a(l, o)).filter(Boolean);
1903
+ if (!(i !== null && typeof i == "object")) return i;
1904
+ if (Array.isArray(i)) return i.map((l) => a(l, o)).filter(Boolean);
2114
1905
  let s = {}, c = new Set(n(i));
2115
- for (let l in i)
2116
- !Object.prototype.hasOwnProperty.call(i, l) || D.has(l) || (c.has(l) ? s[l] = a(i[l], i) : s[l] = i[l]);
1906
+ for (let l in i) !Object.prototype.hasOwnProperty.call(i, l) || D.has(l) || (c.has(l) ? s[l] = a(i[l], i) : s[l] = i[l]);
2117
1907
  let F = t(i, s, o);
2118
- if (F !== null)
2119
- return F ?? s;
1908
+ if (F !== null) return F ?? s;
2120
1909
  }
2121
1910
  }
2122
1911
  var Xn = Qn, eD = (e, u, t) => {
2123
1912
  if (!(e && u == null)) {
2124
- if (u.findLastIndex)
2125
- return u.findLastIndex(t);
1913
+ if (u.findLastIndex) return u.findLastIndex(t);
2126
1914
  for (let r = u.length - 1; r >= 0; r--) {
2127
1915
  let n = u[r];
2128
- if (t(n, r, u))
2129
- return r;
1916
+ if (t(n, r, u)) return r;
2130
1917
  }
2131
1918
  return -1;
2132
1919
  }
@@ -2141,22 +1928,15 @@ function ku(e) {
2141
1928
  }
2142
1929
  function nD(e, u, { locStart: t, locEnd: r }) {
2143
1930
  let n = e.node, D = u.node;
2144
- if (n === D)
2145
- return { startNode: n, endNode: D };
1931
+ if (n === D) return { startNode: n, endNode: D };
2146
1932
  let a = t(e.node);
2147
- for (let o of ku(u.parentNodes))
2148
- if (t(o) >= a)
2149
- D = o;
2150
- else
2151
- break;
1933
+ for (let o of ku(u.parentNodes)) if (t(o) >= a) D = o;
1934
+ else break;
2152
1935
  let i = r(u.node);
2153
1936
  for (let o of ku(e.parentNodes)) {
2154
- if (r(o) <= i)
2155
- n = o;
2156
- else
2157
- break;
2158
- if (n === D)
2159
- break;
1937
+ if (r(o) <= i) n = o;
1938
+ else break;
1939
+ if (n === D) break;
2160
1940
  }
2161
1941
  return { startNode: n, endNode: D };
2162
1942
  }
@@ -2165,11 +1945,9 @@ function We(e, u, t, r, n = [], D) {
2165
1945
  if (!(u > s || u < o || D === "rangeEnd" && u === o || D === "rangeStart" && u === s)) {
2166
1946
  for (let c of Ye(e, t)) {
2167
1947
  let F = We(c, u, t, r, [e, ...n], D);
2168
- if (F)
2169
- return F;
1948
+ if (F) return F;
2170
1949
  }
2171
- if (!r || r(e, n[0]))
2172
- return { node: e, parentNodes: n };
1950
+ if (!r || r(e, n[0])) return { node: e, parentNodes: n };
2173
1951
  }
2174
1952
  }
2175
1953
  function DD(e, u) {
@@ -2177,8 +1955,7 @@ function DD(e, u) {
2177
1955
  }
2178
1956
  var ct = /* @__PURE__ */ new Set(["JsonRoot", "ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral", "UnaryExpression", "TemplateLiteral"]), aD = /* @__PURE__ */ new Set(["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]);
2179
1957
  function Su(e, u, t) {
2180
- if (!u)
2181
- return !1;
1958
+ if (!u) return !1;
2182
1959
  switch (e.parser) {
2183
1960
  case "flow":
2184
1961
  case "hermes":
@@ -2209,24 +1986,19 @@ function iD(e, u, t) {
2209
1986
  let { rangeStart: r, rangeEnd: n, locStart: D, locEnd: a } = u;
2210
1987
  Le.ok(n > r);
2211
1988
  let i = e.slice(r, n).search(/\S/u), o = i === -1;
2212
- if (!o)
2213
- for (r += i; n > r && !/\S/u.test(e[n - 1]); --n)
2214
- ;
1989
+ if (!o) for (r += i; n > r && !/\S/u.test(e[n - 1]); --n) ;
2215
1990
  let s = We(t, r, u, (d, f) => Su(u, d, f), [], "rangeStart"), c = o ? s : We(t, n, u, (d) => Su(u, d), [], "rangeEnd");
2216
- if (!s || !c)
2217
- return { rangeStart: 0, rangeEnd: 0 };
1991
+ if (!s || !c) return { rangeStart: 0, rangeEnd: 0 };
2218
1992
  let F, l;
2219
1993
  if (tD(u)) {
2220
1994
  let d = rD(s, c);
2221
1995
  F = d, l = d;
2222
- } else
2223
- ({ startNode: F, endNode: l } = nD(s, c, u));
1996
+ } else ({ startNode: F, endNode: l } = nD(s, c, u));
2224
1997
  return { rangeStart: Math.min(D(F), D(l)), rangeEnd: Math.max(a(F), a(l)) };
2225
1998
  }
2226
- var ft = "\uFEFF", xu = Symbol("cursor");
1999
+ var ft = "\uFEFF", xu = /* @__PURE__ */ Symbol("cursor");
2227
2000
  async function dt(e, u, t = 0) {
2228
- if (!e || e.trim().length === 0)
2229
- return { formatted: "", cursorOffset: -1, comments: [] };
2001
+ if (!e || e.trim().length === 0) return { formatted: "", cursorOffset: -1, comments: [] };
2230
2002
  let { ast: r, text: n } = await le(e, u);
2231
2003
  u.cursorOffset >= 0 && (u = { ...u, ...lt(r, u) });
2232
2004
  let D = await be(r, u);
@@ -2236,33 +2008,25 @@ async function dt(e, u, t = 0) {
2236
2008
  let o = a.formatted.trim();
2237
2009
  a.cursorNodeStart !== void 0 && (a.cursorNodeStart -= a.formatted.indexOf(o), a.cursorNodeStart < 0 && (a.cursorNodeStart = 0, a.cursorNodeText = a.cursorNodeText.trimStart()), a.cursorNodeStart + a.cursorNodeText.length > o.length && (a.cursorNodeText = a.cursorNodeText.trimEnd())), a.formatted = o + ze(u.endOfLine);
2238
2010
  }
2239
- let i = u[Symbol.for("comments")];
2011
+ let i = u[/* @__PURE__ */ Symbol.for("comments")];
2240
2012
  if (u.cursorOffset >= 0) {
2241
2013
  let o, s, c, F;
2242
- if ((u.cursorNode || u.nodeBeforeCursor || u.nodeAfterCursor) && a.cursorNodeText)
2243
- if (c = a.cursorNodeStart, F = a.cursorNodeText, u.cursorNode)
2244
- o = u.locStart(u.cursorNode), s = n.slice(o, u.locEnd(u.cursorNode));
2245
- else {
2246
- if (!u.nodeBeforeCursor && !u.nodeAfterCursor)
2247
- throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");
2248
- o = u.nodeBeforeCursor ? u.locEnd(u.nodeBeforeCursor) : 0;
2249
- let C = u.nodeAfterCursor ? u.locStart(u.nodeAfterCursor) : n.length;
2250
- s = n.slice(o, C);
2251
- }
2252
- else
2253
- o = 0, s = n, c = 0, F = a.formatted;
2014
+ if ((u.cursorNode || u.nodeBeforeCursor || u.nodeAfterCursor) && a.cursorNodeText) if (c = a.cursorNodeStart, F = a.cursorNodeText, u.cursorNode) o = u.locStart(u.cursorNode), s = n.slice(o, u.locEnd(u.cursorNode));
2015
+ else {
2016
+ if (!u.nodeBeforeCursor && !u.nodeAfterCursor) throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");
2017
+ o = u.nodeBeforeCursor ? u.locEnd(u.nodeBeforeCursor) : 0;
2018
+ let C = u.nodeAfterCursor ? u.locStart(u.nodeAfterCursor) : n.length;
2019
+ s = n.slice(o, C);
2020
+ }
2021
+ else o = 0, s = n, c = 0, F = a.formatted;
2254
2022
  let l = u.cursorOffset - o;
2255
- if (s === F)
2256
- return { formatted: a.formatted, cursorOffset: c + l, comments: i };
2023
+ if (s === F) return { formatted: a.formatted, cursorOffset: c + l, comments: i };
2257
2024
  let d = s.split("");
2258
2025
  d.splice(l, 0, xu);
2259
2026
  let f = F.split(""), h = $t(d, f), p = c;
2260
- for (let C of h)
2261
- if (C.removed) {
2262
- if (C.value.includes(xu))
2263
- break;
2264
- } else
2265
- p += C.count;
2027
+ for (let C of h) if (C.removed) {
2028
+ if (C.value.includes(xu)) break;
2029
+ } else p += C.count;
2266
2030
  return { formatted: a.formatted, cursorOffset: p, comments: i };
2267
2031
  }
2268
2032
  return { formatted: a.formatted, cursorOffset: -1, comments: i };
@@ -2308,8 +2072,7 @@ async function sD(e, u) {
2308
2072
  }
2309
2073
  async function pt(e, u) {
2310
2074
  let { hasBOM: t, text: r, options: n } = Ft(e, await ne(u));
2311
- if (n.rangeStart >= n.rangeEnd && r !== "" || n.requirePragma && !await Ou(r, n) || n.checkIgnorePragma && await sD(r, n))
2312
- return { formatted: e, cursorOffset: u.cursorOffset, comments: [] };
2075
+ if (n.rangeStart >= n.rangeEnd && r !== "" || n.requirePragma && !await Ou(r, n) || n.checkIgnorePragma && await sD(r, n)) return { formatted: e, cursorOffset: u.cursorOffset, comments: [] };
2313
2076
  let D;
2314
2077
  return n.rangeStart > 0 || n.rangeEnd < r.length ? D = await oD(r, n) : (!n.requirePragma && n.insertPragma && n.printer.insertPragma && !await Ou(r, n) && (r = n.printer.insertPragma(r)), D = await dt(r, n)), t && (D.formatted = ft + D.formatted, D.cursorOffset >= 0 && D.cursorOffset++), D;
2315
2078
  }
@@ -2339,12 +2102,9 @@ Ve(ht, { builders: () => pD, printer: () => hD, utils: () => CD });
2339
2102
  var pD = { join: Mu, line: Ru, softline: Fr, hardline: Y, literalline: Wu, group: $u, conditionalGroup: or, fill: sr, lineSuffix: je, lineSuffixBoundary: fr, cursor: K, breakParent: ge, ifBreak: lr, trim: dr, indent: Ce, indentIfBreak: cr, align: re, addAlignmentToDoc: Vu, markAsRoot: ar, dedentToRoot: Dr, dedent: ir, hardlineWithoutBreakParent: Je, literallineWithoutBreakParent: Lu, label: pr, concat: (e) => e }, hD = { printDocToString: ye }, CD = { willBreak: Ht, traverseDoc: qe, findInDoc: Ue, mapDoc: Ee, removeLines: Zt, stripTrailingHardline: Pu, replaceEndOfLine: er, canBreak: tr }, mD = "3.6.2", Ct = {};
2340
2103
  Ve(Ct, { addDanglingComment: () => G, addLeadingComment: () => ie, addTrailingComment: () => oe, getAlignmentSize: () => He, getIndentSize: () => bD, getMaxContinuousCount: () => kD, getNextNonSpaceNonCommentCharacter: () => xD, getNextNonSpaceNonCommentCharacterIndex: () => RD, getPreferredQuote: () => OD, getStringWidth: () => Ge, hasNewline: () => V, hasNewlineInRange: () => jD, hasSpaces: () => ID, isNextLineEmpty: () => zD, isNextLineEmptyAfterIndex: () => tu, isPreviousLineEmpty: () => MD, makeString: () => $D, skip: () => se, skipEverythingButNewLine: () => Ju, skipInlineComment: () => Xe, skipNewline: () => Z, skipSpaces: () => z, skipToLineEnd: () => Uu, skipTrailingComment: () => eu, skipWhitespace: () => _r });
2341
2104
  function ED(e, u) {
2342
- if (u === !1)
2343
- return !1;
2105
+ if (u === !1) return !1;
2344
2106
  if (e.charAt(u) === "/" && e.charAt(u + 1) === "*") {
2345
- for (let t = u + 2; t < e.length; ++t)
2346
- if (e.charAt(t) === "*" && e.charAt(t + 1) === "/")
2347
- return t + 2;
2107
+ for (let t = u + 2; t < e.length; ++t) if (e.charAt(t) === "*" && e.charAt(t + 1) === "/") return t + 2;
2348
2108
  }
2349
2109
  return u;
2350
2110
  }
@@ -2355,15 +2115,13 @@ function gD(e, u) {
2355
2115
  var eu = gD;
2356
2116
  function yD(e, u) {
2357
2117
  let t = null, r = u;
2358
- for (; r !== t; )
2359
- t = r, r = z(e, r), r = Xe(e, r), r = eu(e, r), r = Z(e, r);
2118
+ for (; r !== t; ) t = r, r = z(e, r), r = Xe(e, r), r = eu(e, r), r = Z(e, r);
2360
2119
  return r;
2361
2120
  }
2362
2121
  var uu = yD;
2363
2122
  function vD(e, u) {
2364
2123
  let t = null, r = u;
2365
- for (; r !== t; )
2366
- t = r, r = Uu(e, r), r = Xe(e, r), r = z(e, r);
2124
+ for (; r !== t; ) t = r, r = Uu(e, r), r = Xe(e, r), r = z(e, r);
2367
2125
  return r = eu(e, r), r = Z(e, r), r !== !1 && V(e, r);
2368
2126
  }
2369
2127
  var tu = vD;
@@ -2374,8 +2132,7 @@ function BD(e, u) {
2374
2132
  }
2375
2133
  var bD = BD;
2376
2134
  function AD(e) {
2377
- if (typeof e != "string")
2378
- throw new TypeError("Expected a string");
2135
+ if (typeof e != "string") throw new TypeError("Expected a string");
2379
2136
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2380
2137
  }
2381
2138
  function wD(e, u) {
@@ -2390,16 +2147,13 @@ function SD(e, u) {
2390
2147
  var xD = SD, de = "'", _u = '"';
2391
2148
  function ND(e, u) {
2392
2149
  let t = u === !0 || u === de ? de : _u, r = t === de ? _u : de, n = 0, D = 0;
2393
- for (let a of e)
2394
- a === t ? n++ : a === r && D++;
2150
+ for (let a of e) a === t ? n++ : a === r && D++;
2395
2151
  return n > D ? r : t;
2396
2152
  }
2397
2153
  var OD = ND;
2398
2154
  function _D(e, u, t) {
2399
- for (let r = u; r < t; ++r)
2400
- if (e.charAt(r) === `
2401
- `)
2402
- return !0;
2155
+ for (let r = u; r < t; ++r) if (e.charAt(r) === `
2156
+ `) return !0;
2403
2157
  return !1;
2404
2158
  }
2405
2159
  var jD = _D;