eddyter 1.3.63 → 1.3.64

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.
Files changed (35) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +493 -493
  3. package/dist/ImageResizer-CbtUYHip.js +199 -0
  4. package/dist/api/auth.d.ts +4 -2
  5. package/dist/assets/style.css +1 -1
  6. package/dist/{babel-B9hn44Wo.js → babel-CCPWkrf4.js} +1302 -726
  7. package/dist/components/LockedFeature/LockedFeature.d.ts +23 -0
  8. package/dist/components/LockedFeature/index.d.ts +2 -0
  9. package/dist/components/UnifiedColorPicker/UnifiedColorPicker.d.ts +14 -0
  10. package/dist/components/VideoView/index.d.ts +13 -0
  11. package/dist/constants.d.ts +3 -1
  12. package/dist/editorConfig.d.ts +2 -3
  13. package/dist/{estree-CocPn_Md.js → estree-CxUPh9wa.js} +917 -529
  14. package/dist/{html-CxCicOef.js → html-CmniStvG.js} +589 -350
  15. package/dist/{html2pdf.bundle-Bc2h6DHT.js → html2pdf.bundle-C1B1lr_T.js} +3796 -2777
  16. package/dist/{html2pdf.bundle.min-BvakEXhX.js → html2pdf.bundle.min-kPviTsNx.js} +5223 -3407
  17. package/dist/index-BL8HWCRw.js +816 -0
  18. package/dist/index-BpsoOKOs.js +274 -0
  19. package/dist/{index-C2a6-XFM.js → index-DHKx5grA.js} +4 -4
  20. package/dist/{index-DoJIKSPF.js → index-FZVNbwSO.js} +12356 -11290
  21. package/dist/index.js +3 -3
  22. package/dist/{markdown-BUjgWFLu.js → markdown-B0mEGGfQ.js} +1015 -578
  23. package/dist/nodes/UploadingVideoNode.d.ts +30 -0
  24. package/dist/nodes/VideoNode.d.ts +47 -0
  25. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +2 -1
  26. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -1
  27. package/dist/plugins/VideoPlugin.d.ts +17 -0
  28. package/dist/{postcss-CGIcwj_g.js → postcss-B0bxXf7u.js} +1065 -615
  29. package/dist/{standalone-C0qguT38.js → standalone-DmuJV5rn.js} +596 -350
  30. package/dist/types.d.ts +4 -6
  31. package/dist/{typescript-BM7wk6k-.js → typescript-DZlC_9M8.js} +1805 -1113
  32. package/dist/ui/Icons.d.ts +2 -1
  33. package/dist/utils/uploadManager.d.ts +17 -0
  34. package/package.json +151 -151
  35. package/dist/index-B0VTEqfr.js +0 -985
@@ -1,29 +1,39 @@
1
1
  var hr = Object.defineProperty, dr = (e) => {
2
2
  throw TypeError(e);
3
3
  }, mn = (e, t, r) => t in e ? hr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, mr = (e, t) => {
4
- for (var r in t) hr(e, r, { get: t[r], enumerable: !0 });
4
+ for (var r in t)
5
+ hr(e, r, { get: t[r], enumerable: !0 });
5
6
  }, Et = (e, t, r) => mn(e, typeof t != "symbol" ? t + "" : t, r), gr = (e, t, r) => t.has(e) || dr("Cannot " + r), F = (e, t, r) => (gr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), fr = (e, t, r) => t.has(e) ? dr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), gn = (e, t, r, n) => (gr(e, t, "write to private field"), t.set(e, r), r), vr = {};
6
7
  mr(vr, { languages: () => oi, options: () => ci, parsers: () => rn, printers: () => Su });
7
8
  var fn = (e, t, r, n) => {
8
- if (!(e && t == null)) return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
9
+ if (!(e && t == null))
10
+ return t.replaceAll ? t.replaceAll(r, n) : r.global ? t.replace(r, n) : t.split(r).join(n);
9
11
  }, L = fn, Cr = "string", Sr = "array", yr = "cursor", at = "indent", st = "align", br = "trim", it = "group", ut = "fill", ot = "if-break", lt = "indent-if-break", _r = "line-suffix", wr = "line-suffix-boundary", Q = "line", Ar = "label", ct = "break-parent", kr = /* @__PURE__ */ new Set([yr, at, st, br, it, ut, ot, lt, _r, wr, Q, Ar, ct]), vn = (e, t, r) => {
10
- if (!(e && t == null)) return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
12
+ if (!(e && t == null))
13
+ return Array.isArray(t) || typeof t == "string" ? t[r < 0 ? t.length + r : r] : t.at(r);
11
14
  }, de = vn;
12
15
  function Cn(e) {
13
- if (typeof e == "string") return Cr;
14
- if (Array.isArray(e)) return Sr;
15
- if (!e) return;
16
+ if (typeof e == "string")
17
+ return Cr;
18
+ if (Array.isArray(e))
19
+ return Sr;
20
+ if (!e)
21
+ return;
16
22
  let { type: t } = e;
17
- if (kr.has(t)) return t;
23
+ if (kr.has(t))
24
+ return t;
18
25
  }
19
26
  var Er = Cn, Sn = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
20
27
  function yn(e) {
21
28
  let t = e === null ? "null" : typeof e;
22
- if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
29
+ if (t !== "string" && t !== "object")
30
+ return `Unexpected doc '${t}',
23
31
  Expected it to be 'string' or 'object'.`;
24
- if (Er(e)) throw new Error("doc is valid.");
32
+ if (Er(e))
33
+ throw new Error("doc is valid.");
25
34
  let r = Object.prototype.toString.call(e);
26
- if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
35
+ if (r !== "[object Object]")
36
+ return `Unexpected doc '${r}'.`;
27
37
  let n = Sn([...kr].map((a) => `'${a}'`));
28
38
  return `Unexpected doc.type '${e.type}'.
29
39
  Expected it to be ${n}.`;
@@ -35,11 +45,13 @@ var bn = class extends Error {
35
45
  }
36
46
  }, _n = bn;
37
47
  function xr(e, t) {
38
- if (typeof e == "string") return t(e);
48
+ if (typeof e == "string")
49
+ return t(e);
39
50
  let r = /* @__PURE__ */ new Map();
40
51
  return n(e);
41
52
  function n(s) {
42
- if (r.has(s)) return r.get(s);
53
+ if (r.has(s))
54
+ return r.get(s);
43
55
  let i = a(s);
44
56
  return r.set(s, i), i;
45
57
  }
@@ -106,18 +118,21 @@ function xn(e, t) {
106
118
  var me = { type: ct }, Dn = { type: Q, hard: !0 }, Tn = { type: Q, hard: !0, literal: !0 }, _ = { type: Q }, D = { type: Q, soft: !0 }, S = [Dn, me], Bn = [Tn, me];
107
119
  function Z(e, t) {
108
120
  let r = [];
109
- for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
121
+ for (let n = 0; n < t.length; n++)
122
+ n !== 0 && r.push(e), r.push(t[n]);
110
123
  return r;
111
124
  }
112
125
  var ye = "'", xt = '"';
113
126
  function Ln(e, t) {
114
127
  let r = t === !0 || t === ye ? ye : xt, n = r === ye ? xt : ye, a = 0, s = 0;
115
- for (let i of e) i === r ? a++ : i === n && s++;
128
+ for (let i of e)
129
+ i === r ? a++ : i === n && s++;
116
130
  return a > s ? n : r;
117
131
  }
118
132
  var Fn = Ln;
119
133
  function qn(e) {
120
- if (typeof e != "string") throw new TypeError("Expected a string");
134
+ if (typeof e != "string")
135
+ throw new TypeError("Expected a string");
121
136
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
122
137
  }
123
138
  var N, Nn = class {
@@ -126,12 +141,14 @@ var N, Nn = class {
126
141
  }
127
142
  getLeadingWhitespaceCount(e) {
128
143
  let t = F(this, N), r = 0;
129
- for (let n = 0; n < e.length && t.has(e.charAt(n)); n++) r++;
144
+ for (let n = 0; n < e.length && t.has(e.charAt(n)); n++)
145
+ r++;
130
146
  return r;
131
147
  }
132
148
  getTrailingWhitespaceCount(e) {
133
149
  let t = F(this, N), r = 0;
134
- for (let n = e.length - 1; n >= 0 && t.has(e.charAt(n)); n--) r++;
150
+ for (let n = e.length - 1; n >= 0 && t.has(e.charAt(n)); n--)
151
+ r++;
135
152
  return r;
136
153
  }
137
154
  getLeadingWhitespace(e) {
@@ -190,8 +207,11 @@ function Un(e) {
190
207
  var Ne = Un, Vn = /* @__PURE__ */ new Set(["sourceSpan", "startSourceSpan", "endSourceSpan", "nameSpan", "valueSpan", "keySpan", "tagDefinition", "tokens", "valueTokens", "switchValueSourceSpan", "expSourceSpan", "valueSourceSpan"]), On = /* @__PURE__ */ new Set(["if", "else if", "for", "switch", "case"]);
191
208
  function Br(e, t) {
192
209
  var r;
193
- if (e.type === "text" || e.type === "comment" || Ne(e) || e.type === "yaml" || e.type === "toml") return null;
194
- if (e.type === "attribute" && delete t.value, e.type === "docType" && delete t.value, e.type === "angularControlFlowBlock" && (r = e.parameters) != null && r.children) for (let n of t.parameters.children) On.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
210
+ if (e.type === "text" || e.type === "comment" || Ne(e) || e.type === "yaml" || e.type === "toml")
211
+ return null;
212
+ if (e.type === "attribute" && delete t.value, e.type === "docType" && delete t.value, e.type === "angularControlFlowBlock" && (r = e.parameters) != null && r.children)
213
+ for (let n of t.parameters.children)
214
+ On.has(e.name) ? delete n.expression : n.expression = n.expression.trim();
195
215
  e.type === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.type === "angularLetDeclarationInitializer" && delete t.value;
196
216
  }
197
217
  Br.ignoredProperties = Vn;
@@ -224,14 +244,16 @@ function jn(e, t, r, n) {
224
244
  return /^\s*$/u.test(s) ? "" : M(s, e, { parser: "__ng_directive", __isInHtmlAttribute: !1 }, ee);
225
245
  }
226
246
  var Gn = jn, Kn = (e, t) => {
227
- if (!(e && t == null)) return t.toReversed || !Array.isArray(t) ? t.toReversed() : [...t].reverse();
247
+ if (!(e && t == null))
248
+ return t.toReversed || !Array.isArray(t) ? t.toReversed() : [...t].reverse();
228
249
  }, Xn = Kn;
229
250
  function Jn(e) {
230
251
  return Array.isArray(e) && e.length > 0;
231
252
  }
232
253
  var pt = Jn, Dt, Tt, Bt, Lt, Ft, Yn = ((Dt = globalThis.Deno) == null ? void 0 : Dt.build.os) === "windows" || ((Bt = (Tt = globalThis.navigator) == null ? void 0 : Tt.platform) == null ? void 0 : Bt.startsWith("Win")) || ((Ft = (Lt = globalThis.process) == null ? void 0 : Lt.platform) == null ? void 0 : Ft.startsWith("win")) || !1;
233
254
  function Lr(e) {
234
- if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
255
+ if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:")
256
+ throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
235
257
  return e;
236
258
  }
237
259
  function Qn(e) {
@@ -247,21 +269,25 @@ function ea(e) {
247
269
  }
248
270
  var ta = ea, ra = (e) => String(e).split(/[/\\]/u).pop();
249
271
  function qt(e, t) {
250
- if (!t) return;
272
+ if (!t)
273
+ return;
251
274
  let r = ra(t).toLowerCase();
252
275
  return e.find(({ filenames: n }) => n?.some((a) => a.toLowerCase() === r)) ?? e.find(({ extensions: n }) => n?.some((a) => r.endsWith(a)));
253
276
  }
254
277
  function na(e, t) {
255
- if (t) return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
278
+ if (t)
279
+ return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`));
256
280
  }
257
281
  function Nt(e, t) {
258
282
  if (t) {
259
- if (String(t).startsWith("file:")) try {
260
- t = ta(t);
261
- } catch {
262
- return;
263
- }
264
- if (typeof t == "string") return e.find(({ isSupported: r }) => r?.({ filepath: t }));
283
+ if (String(t).startsWith("file:"))
284
+ try {
285
+ t = ta(t);
286
+ } catch {
287
+ return;
288
+ }
289
+ if (typeof t == "string")
290
+ return e.find(({ isSupported: r }) => r?.({ filepath: t }));
265
291
  }
266
292
  }
267
293
  function aa(e, t) {
@@ -305,7 +331,8 @@ function Nr(e) {
305
331
  function da(e, t) {
306
332
  var r, n;
307
333
  let a = s();
308
- if (a && !e.prev && (n = (r = e.parent) == null ? void 0 : r.tagDefinition) != null && n.ignoreFirstLf) return e.type === "interpolation";
334
+ if (a && !e.prev && (n = (r = e.parent) == null ? void 0 : r.tagDefinition) != null && n.ignoreFirstLf)
335
+ return e.type === "interpolation";
309
336
  return a;
310
337
  function s() {
311
338
  return Ne(e) || e.type === "angularControlFlowBlock" ? !1 : (e.type === "text" || e.type === "interpolation") && e.prev && (e.prev.type === "text" || e.prev.type === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : Y(e.parent) ? !0 : !(!e.prev && (e.parent.type === "root" || Y(e) && e.parent || U(e.parent, t) || He(e.parent, t) || !_a(e.parent.cssDisplay)) || e.prev && !ka(e.prev.cssDisplay));
@@ -360,35 +387,40 @@ function Ca(e) {
360
387
  return (t = e.children) == null ? void 0 : t.some((r) => r.type !== "text");
361
388
  }
362
389
  function Ur(e) {
363
- if (e) switch (e) {
364
- case "module":
365
- case "text/javascript":
366
- case "text/babel":
367
- case "text/jsx":
368
- case "application/javascript":
369
- return "babel";
370
- case "application/x-typescript":
371
- return "typescript";
372
- case "text/markdown":
373
- return "markdown";
374
- case "text/html":
375
- return "html";
376
- case "text/x-handlebars-template":
377
- return "glimmer";
378
- default:
379
- if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules") return "json";
380
- }
390
+ if (e)
391
+ switch (e) {
392
+ case "module":
393
+ case "text/javascript":
394
+ case "text/babel":
395
+ case "text/jsx":
396
+ case "application/javascript":
397
+ return "babel";
398
+ case "application/x-typescript":
399
+ return "typescript";
400
+ case "text/markdown":
401
+ return "markdown";
402
+ case "text/html":
403
+ return "html";
404
+ case "text/x-handlebars-template":
405
+ return "glimmer";
406
+ default:
407
+ if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules")
408
+ return "json";
409
+ }
381
410
  }
382
411
  function Sa(e, t) {
383
412
  let { name: r, attrMap: n } = e;
384
- if (r !== "script" || Object.prototype.hasOwnProperty.call(n, "src")) return;
413
+ if (r !== "script" || Object.prototype.hasOwnProperty.call(n, "src"))
414
+ return;
385
415
  let { type: a, lang: s } = e.attrMap;
386
416
  return !s && !a ? "babel" : Pe(t, { language: s }) ?? Ur(a);
387
417
  }
388
418
  function ya(e, t) {
389
- if (!dt(e, t)) return;
419
+ if (!dt(e, t))
420
+ return;
390
421
  let { attrMap: r } = e;
391
- if (Object.prototype.hasOwnProperty.call(r, "src")) return;
422
+ if (Object.prototype.hasOwnProperty.call(r, "src"))
423
+ return;
392
424
  let { type: n, lang: a } = r;
393
425
  return Pe(t, { language: a }) ?? Ur(n);
394
426
  }
@@ -397,7 +429,8 @@ function ba(e, t) {
397
429
  let { lang: r } = e.attrMap;
398
430
  return r ? Pe(t, { language: r }) : "css";
399
431
  }
400
- if (e.name === "mj-style" && t.parser === "mjml") return "css";
432
+ if (e.name === "mj-style" && t.parser === "mjml")
433
+ return "css";
401
434
  }
402
435
  function Mt(e, t) {
403
436
  return Sa(e, t) ?? ba(e, t) ?? ya(e, t);
@@ -426,28 +459,35 @@ function Y(e) {
426
459
  function xa(e, t) {
427
460
  let r = e;
428
461
  for (; r; ) {
429
- if (t(r)) return !0;
462
+ if (t(r))
463
+ return !0;
430
464
  r = r.parent;
431
465
  }
432
466
  return !1;
433
467
  }
434
468
  function Da(e, t) {
435
469
  var r;
436
- if (te(e, t)) return "block";
470
+ if (te(e, t))
471
+ return "block";
437
472
  if (((r = e.prev) == null ? void 0 : r.type) === "comment") {
438
473
  let a = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);
439
- if (a) return a[1];
474
+ if (a)
475
+ return a[1];
440
476
  }
441
477
  let n = !1;
442
- if (e.type === "element" && e.namespace === "svg") if (xa(e, (a) => a.fullName === "svg:foreignObject")) n = !0;
443
- else return e.name === "svg" ? "inline-block" : "block";
478
+ if (e.type === "element" && e.namespace === "svg")
479
+ if (xa(e, (a) => a.fullName === "svg:foreignObject"))
480
+ n = !0;
481
+ else
482
+ return e.name === "svg" ? "inline-block" : "block";
444
483
  switch (t.htmlWhitespaceSensitivity) {
445
484
  case "strict":
446
485
  return "inline";
447
486
  case "ignore":
448
487
  return "block";
449
488
  default:
450
- if (e.type === "element" && (!e.namespace || n || pe(e)) && Object.prototype.hasOwnProperty.call(It, e.name)) return It[e.name];
489
+ if (e.type === "element" && (!e.namespace || n || pe(e)) && Object.prototype.hasOwnProperty.call(It, e.name))
490
+ return It[e.name];
451
491
  }
452
492
  return sa;
453
493
  }
@@ -458,9 +498,11 @@ function Ta(e) {
458
498
  let t = Number.POSITIVE_INFINITY;
459
499
  for (let r of e.split(`
460
500
  `)) {
461
- if (r.length === 0) continue;
501
+ if (r.length === 0)
502
+ continue;
462
503
  let n = R.getLeadingWhitespaceCount(r);
463
- if (n === 0) return 0;
504
+ if (n === 0)
505
+ return 0;
464
506
  r.length !== n && n < t && (t = n);
465
507
  }
466
508
  return t === Number.POSITIVE_INFINITY ? 0 : t;
@@ -492,7 +534,8 @@ function La(e) {
492
534
  }
493
535
  function Fa(e, t) {
494
536
  let r = e.parent;
495
- if (!te(r, t)) return !1;
537
+ if (!te(r, t))
538
+ return !1;
496
539
  let n = r.fullName, a = e.fullName;
497
540
  return n === "script" && a === "setup" || n === "style" && a === "vars";
498
541
  }
@@ -505,12 +548,15 @@ function zr(e, t) {
505
548
  var jr = /\{\{(.+?)\}\}/su;
506
549
  async function qa(e, t) {
507
550
  let r = [];
508
- for (let [n, a] of e.split(jr).entries()) if (n % 2 === 0) r.push(P(a));
509
- else try {
510
- r.push(k(["{{", H([_, await M(a, t, { parser: "__ng_interpolation", __isInHtmlInterpolation: !0 })]), _, "}}"]));
511
- } catch {
512
- r.push("{{", P(a), "}}");
513
- }
551
+ for (let [n, a] of e.split(jr).entries())
552
+ if (n % 2 === 0)
553
+ r.push(P(a));
554
+ else
555
+ try {
556
+ r.push(k(["{{", H([_, await M(a, t, { parser: "__ng_interpolation", __isInHtmlInterpolation: !0 })]), _, "}}"]));
557
+ } catch {
558
+ r.push("{{", P(a), "}}");
559
+ }
514
560
  return r;
515
561
  }
516
562
  function mt({ parser: e }) {
@@ -518,19 +564,26 @@ function mt({ parser: e }) {
518
564
  }
519
565
  var Na = mt({ parser: "__ng_action" }), Ia = mt({ parser: "__ng_binding" }), Pa = mt({ parser: "__ng_directive" });
520
566
  function Ma(e, t) {
521
- if (t.parser !== "angular") return;
567
+ if (t.parser !== "angular")
568
+ return;
522
569
  let { node: r } = e, n = r.fullName;
523
- if (n.startsWith("(") && n.endsWith(")") || n.startsWith("on-")) return Na;
524
- if (n.startsWith("[") && n.endsWith("]") || /^bind(?:on)?-/u.test(n) || /^ng-(?:if|show|hide|class|style)$/u.test(n)) return Ia;
525
- if (n.startsWith("*")) return Pa;
570
+ if (n.startsWith("(") && n.endsWith(")") || n.startsWith("on-"))
571
+ return Na;
572
+ if (n.startsWith("[") && n.endsWith("]") || /^bind(?:on)?-/u.test(n) || /^ng-(?:if|show|hide|class|style)$/u.test(n))
573
+ return Ia;
574
+ if (n.startsWith("*"))
575
+ return Pa;
526
576
  let a = O(r);
527
- if (/^i18n(?:-.+)?$/u.test(n)) return () => Ie(Tr($r(r, a.trim())), !a.includes("@@"));
528
- if (jr.test(a)) return (s) => qa(a, s);
577
+ if (/^i18n(?:-.+)?$/u.test(n))
578
+ return () => Ie(Tr($r(r, a.trim())), !a.includes("@@"));
579
+ if (jr.test(a))
580
+ return (s) => qa(a, s);
529
581
  }
530
582
  var Ha = Ma;
531
583
  function Ra(e, t) {
532
584
  let { node: r } = e, n = O(r);
533
- if (r.fullName === "class" && !t.parentParser && !n.includes("{{")) return () => n.trim().split(/\s+/u).join(" ");
585
+ if (r.fullName === "class" && !t.parentParser && !n.includes("{{"))
586
+ return () => n.trim().split(/\s+/u).join(" ");
534
587
  }
535
588
  var Ua = Ra;
536
589
  function Ht(e) {
@@ -542,54 +595,70 @@ function ja(e) {
542
595
  let t = e.length, r, n, a, s, i, u = 0, o;
543
596
  function p(g) {
544
597
  let C, w = g.exec(e.substring(u));
545
- if (w) return [C] = w, u += C.length, C;
598
+ if (w)
599
+ return [C] = w, u += C.length, C;
546
600
  }
547
601
  let l = [];
548
602
  for (; ; ) {
549
603
  if (p(Oa), u >= t) {
550
- if (l.length === 0) throw new Error("Must contain one or more image candidate strings.");
604
+ if (l.length === 0)
605
+ throw new Error("Must contain one or more image candidate strings.");
551
606
  return l;
552
607
  }
553
608
  o = u, r = p(Wa), n = [], r.slice(-1) === "," ? (r = r.replace($a, ""), d()) : v();
554
609
  }
555
610
  function v() {
556
611
  for (p(Va), a = "", s = "in descriptor"; ; ) {
557
- if (i = e.charAt(u), s === "in descriptor") if (Ht(i)) a && (n.push(a), a = "", s = "after descriptor");
558
- else if (i === ",") {
559
- u += 1, a && n.push(a), d();
560
- return;
561
- } else if (i === "(") a += i, s = "in parens";
562
- else if (i === "") {
563
- a && n.push(a), d();
564
- return;
565
- } else a += i;
566
- else if (s === "in parens") if (i === ")") a += i, s = "in descriptor";
567
- else if (i === "") {
568
- n.push(a), d();
569
- return;
570
- } else a += i;
571
- else if (s === "after descriptor" && !Ht(i)) if (i === "") {
572
- d();
573
- return;
574
- } else s = "in descriptor", u -= 1;
612
+ if (i = e.charAt(u), s === "in descriptor")
613
+ if (Ht(i))
614
+ a && (n.push(a), a = "", s = "after descriptor");
615
+ else if (i === ",") {
616
+ u += 1, a && n.push(a), d();
617
+ return;
618
+ } else if (i === "(")
619
+ a += i, s = "in parens";
620
+ else if (i === "") {
621
+ a && n.push(a), d();
622
+ return;
623
+ } else
624
+ a += i;
625
+ else if (s === "in parens")
626
+ if (i === ")")
627
+ a += i, s = "in descriptor";
628
+ else if (i === "") {
629
+ n.push(a), d();
630
+ return;
631
+ } else
632
+ a += i;
633
+ else if (s === "after descriptor" && !Ht(i))
634
+ if (i === "") {
635
+ d();
636
+ return;
637
+ } else
638
+ s = "in descriptor", u -= 1;
575
639
  u += 1;
576
640
  }
577
641
  }
578
642
  function d() {
579
643
  let g = !1, C, w, E, x, c = {}, f, A, y, T, G;
580
- for (x = 0; x < n.length; x++) f = n[x], A = f[f.length - 1], y = f.substring(0, f.length - 1), T = parseInt(y, 10), G = parseFloat(y), Rt.test(y) && A === "w" ? ((C || w) && (g = !0), T === 0 ? g = !0 : C = T) : za.test(y) && A === "x" ? ((C || w || E) && (g = !0), G < 0 ? g = !0 : w = G) : Rt.test(y) && A === "h" ? ((E || w) && (g = !0), T === 0 ? g = !0 : E = T) : g = !0;
581
- if (!g) c.source = { value: r, startOffset: o }, C && (c.width = { value: C }), w && (c.density = { value: w }), E && (c.height = { value: E }), l.push(c);
582
- else throw new Error(`Invalid srcset descriptor found in "${e}" at "${f}".`);
644
+ for (x = 0; x < n.length; x++)
645
+ f = n[x], A = f[f.length - 1], y = f.substring(0, f.length - 1), T = parseInt(y, 10), G = parseFloat(y), Rt.test(y) && A === "w" ? ((C || w) && (g = !0), T === 0 ? g = !0 : C = T) : za.test(y) && A === "x" ? ((C || w || E) && (g = !0), G < 0 ? g = !0 : w = G) : Rt.test(y) && A === "h" ? ((E || w) && (g = !0), T === 0 ? g = !0 : E = T) : g = !0;
646
+ if (!g)
647
+ c.source = { value: r, startOffset: o }, C && (c.width = { value: C }), w && (c.density = { value: w }), E && (c.height = { value: E }), l.push(c);
648
+ else
649
+ throw new Error(`Invalid srcset descriptor found in "${e}" at "${f}".`);
583
650
  }
584
651
  }
585
652
  var Ga = ja;
586
653
  function Ka(e) {
587
- if (e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source")) return () => Ja(O(e.node));
654
+ if (e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"))
655
+ return () => Ja(O(e.node));
588
656
  }
589
657
  var Gr = { width: "w", height: "h", density: "x" }, Xa = Object.keys(Gr);
590
658
  function Ja(e) {
591
659
  let t = Ga(e), r = Xa.filter((l) => t.some((v) => Object.prototype.hasOwnProperty.call(v, l)));
592
- if (r.length > 1) throw new Error("Mixed descriptor in srcset is not supported");
660
+ if (r.length > 1)
661
+ throw new Error("Mixed descriptor in srcset is not supported");
593
662
  let [n] = r, a = Gr[n], s = t.map((l) => l.source.value), i = Math.max(...s.map((l) => l.length)), u = t.map((l) => l[n] ? String(l[n].value) : ""), o = u.map((l) => {
594
663
  let v = l.indexOf(".");
595
664
  return v === -1 ? l.length : v;
@@ -606,7 +675,8 @@ function Ja(e) {
606
675
  var Ya = Ka;
607
676
  function Qa(e, t) {
608
677
  let { node: r } = e, n = O(e.node).trim();
609
- if (r.fullName === "style" && !t.parentParser && !n.includes("{{")) return async (a) => Ie(await a(n, { parser: "css", __isHTMLStyleAttribute: !0 }));
678
+ if (r.fullName === "style" && !t.parentParser && !n.includes("{{"))
679
+ return async (a) => Ie(await a(n, { parser: "css", __isHTMLStyleAttribute: !0 }));
610
680
  }
611
681
  var $e = /* @__PURE__ */ new WeakMap();
612
682
  function Za(e, t) {
@@ -627,31 +697,42 @@ async function rs(e, t, r, n) {
627
697
  }
628
698
  function ns(e) {
629
699
  let t = /(.*?)\s+(in|of)\s+(.*)/su, r = /,([^,\]}]*)(?:,([^,\]}]*))?$/u, n = /^\(|\)$/gu, a = e.match(t);
630
- if (!a) return;
700
+ if (!a)
701
+ return;
631
702
  let s = {};
632
- if (s.for = a[3].trim(), !s.for) return;
703
+ if (s.for = a[3].trim(), !s.for)
704
+ return;
633
705
  let i = L(!1, a[1].trim(), n, ""), u = i.match(r);
634
706
  u ? (s.alias = i.replace(r, ""), s.iterator1 = u[1].trim(), u[2] && (s.iterator2 = u[2].trim())) : s.alias = i;
635
707
  let o = [s.alias, s.iterator1, s.iterator2];
636
- if (!o.some((p, l) => !p && (l === 0 || o.slice(l + 1).some(Boolean)))) return { left: o.filter(Boolean).join(","), operator: a[2], right: s.for };
708
+ if (!o.some((p, l) => !p && (l === 0 || o.slice(l + 1).some(Boolean))))
709
+ return { left: o.filter(Boolean).join(","), operator: a[2], right: s.for };
637
710
  }
638
711
  function as(e, t) {
639
- if (t.parser !== "vue") return;
712
+ if (t.parser !== "vue")
713
+ return;
640
714
  let { node: r } = e, n = r.fullName;
641
- if (n === "v-for") return rs;
642
- if (n === "generic" && zr(r.parent, t)) return es;
715
+ if (n === "v-for")
716
+ return rs;
717
+ if (n === "generic" && zr(r.parent, t))
718
+ return es;
643
719
  let a = O(r), s = gt(e, t);
644
- if (La(r) || Fa(r, t)) return (i) => ts(a, i, { parseWithTs: s });
645
- if (n.startsWith("@") || n.startsWith("v-on:")) return (i) => ss(a, i, { parseWithTs: s });
646
- if (n.startsWith(":") || n.startsWith(".") || n.startsWith("v-bind:")) return (i) => is(a, i, { parseWithTs: s });
647
- if (n.startsWith("v-")) return (i) => Kr(a, i, { parseWithTs: s });
720
+ if (La(r) || Fa(r, t))
721
+ return (i) => ts(a, i, { parseWithTs: s });
722
+ if (n.startsWith("@") || n.startsWith("v-on:"))
723
+ return (i) => ss(a, i, { parseWithTs: s });
724
+ if (n.startsWith(":") || n.startsWith(".") || n.startsWith("v-bind:"))
725
+ return (i) => is(a, i, { parseWithTs: s });
726
+ if (n.startsWith("v-"))
727
+ return (i) => Kr(a, i, { parseWithTs: s });
648
728
  }
649
729
  async function ss(e, t, { parseWithTs: r }) {
650
730
  var n;
651
731
  try {
652
732
  return await Kr(e, t, { parseWithTs: r });
653
733
  } catch (a) {
654
- if (((n = a.cause) == null ? void 0 : n.code) !== "BABEL_PARSER_SYNTAX_ERROR") throw a;
734
+ if (((n = a.cause) == null ? void 0 : n.code) !== "BABEL_PARSER_SYNTAX_ERROR")
735
+ throw a;
655
736
  }
656
737
  return M(e, t, { parser: r ? "__vue_ts_event_binding" : "__vue_event_binding" }, ee);
657
738
  }
@@ -665,17 +746,20 @@ var us = as;
665
746
  function os(e, t) {
666
747
  let { node: r } = e;
667
748
  if (r.value) {
668
- if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(r.valueSpan.start.offset, r.valueSpan.end.offset)) || t.parser === "lwc" && r.value.startsWith("{") && r.value.endsWith("}")) return [r.rawName, "=", r.value];
749
+ if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(r.valueSpan.start.offset, r.valueSpan.end.offset)) || t.parser === "lwc" && r.value.startsWith("{") && r.value.endsWith("}"))
750
+ return [r.rawName, "=", r.value];
669
751
  for (let n of [Ya, Qa, Ua, us, Ha]) {
670
752
  let a = n(e, t);
671
- if (a) return ls(a);
753
+ if (a)
754
+ return ls(a);
672
755
  }
673
756
  }
674
757
  }
675
758
  function ls(e) {
676
759
  return async (t, r, n, a) => {
677
760
  let s = await e(t, r, n, a);
678
- if (s) return s = xr(s, (i) => typeof i == "string" ? L(!1, i, '"', "&quot;") : i), [n.node.rawName, '="', k(s), '"'];
761
+ if (s)
762
+ return s = xr(s, (i) => typeof i == "string" ? L(!1, i, '"', "&quot;") : i), [n.node.rawName, '="', k(s), '"'];
679
763
  };
680
764
  }
681
765
  var cs = os, ps = new Proxy(() => {
@@ -702,18 +786,21 @@ function $(e, t) {
702
786
  return he(e) ? ft(e.parent, t) : Ue(e) ? vt(e.next, t) : "";
703
787
  }
704
788
  function ft(e, t) {
705
- if (Xr(e, t)) return "";
789
+ if (Xr(e, t))
790
+ return "";
706
791
  switch (e.type) {
707
792
  case "ieConditionalComment":
708
793
  return "<!";
709
794
  case "element":
710
- if (e.hasHtmComponentClosingTag) return "<//";
795
+ if (e.hasHtmComponentClosingTag)
796
+ return "<//";
711
797
  default:
712
798
  return `</${e.rawName}`;
713
799
  }
714
800
  }
715
801
  function ve(e, t) {
716
- if (Xr(e, t)) return "";
802
+ if (Xr(e, t))
803
+ return "";
717
804
  switch (e.type) {
718
805
  case "ieConditionalComment":
719
806
  case "ieConditionalEndComment":
@@ -725,7 +812,8 @@ function ve(e, t) {
725
812
  case "angularIcuExpression":
726
813
  return "}";
727
814
  case "element":
728
- if (e.isSelfClosing) return "/>";
815
+ if (e.isSelfClosing)
816
+ return "/>";
729
817
  default:
730
818
  return ">";
731
819
  }
@@ -756,7 +844,8 @@ function Ve(e) {
756
844
  function gs(e, t, r) {
757
845
  var n;
758
846
  let { node: a } = e;
759
- if (!pt(a.attrs)) return a.isSelfClosing ? " " : "";
847
+ if (!pt(a.attrs))
848
+ return a.isSelfClosing ? " " : "";
760
849
  let s = ((n = a.prev) == null ? void 0 : n.type) === "comment" && ms(a.prev.value), i = typeof s == "boolean" ? () => s : Array.isArray(s) ? (v) => s.includes(v.rawName) : () => !1, u = e.map(({ node: v }) => i(v) ? P(t.originalText.slice(fe(v), Re(v))) : r(), "attrs"), o = a.type === "element" && a.fullName === "script" && a.attrs.length === 1 && a.attrs[0].fullName === "src" && a.children.length === 0, p = t.singleAttributePerLine && a.attrs.length > 1 && !te(a, t) ? S : _, l = [H([o ? " " : _, Z(p, u)])];
761
850
  return a.firstChild && Ve(a.firstChild) || a.isSelfClosing && Ce(a.parent) || o ? l.push(a.isSelfClosing ? " " : "") : l.push(t.bracketSameLine ? a.isSelfClosing ? " " : "" : a.isSelfClosing ? _ : D), l;
762
851
  }
@@ -786,7 +875,8 @@ function vt(e, t) {
786
875
  case "docType": {
787
876
  if (e.value === "html") {
788
877
  let { filepath: n } = t;
789
- if (n && /\.html?$/u.test(n)) return Ut;
878
+ if (n && /\.html?$/u.test(n))
879
+ return Ut;
790
880
  }
791
881
  let r = fe(e);
792
882
  return t.originalText.slice(r, r + Ut.length);
@@ -794,7 +884,8 @@ function vt(e, t) {
794
884
  case "angularIcuExpression":
795
885
  return "{";
796
886
  case "element":
797
- if (e.condition) return `<!--[if ${e.condition}]><!--><${e.rawName}`;
887
+ if (e.condition)
888
+ return `<!--[if ${e.condition}]><!--><${e.rawName}`;
798
889
  default:
799
890
  return `<${e.rawName}`;
800
891
  }
@@ -804,13 +895,15 @@ function Ct(e) {
804
895
  case "ieConditionalComment":
805
896
  return "]>";
806
897
  case "element":
807
- if (e.condition) return "><!--<![endif]-->";
898
+ if (e.condition)
899
+ return "><!--<![endif]-->";
808
900
  default:
809
901
  return ">";
810
902
  }
811
903
  }
812
904
  function vs(e, t) {
813
- if (!e.endSourceSpan) return "";
905
+ if (!e.endSourceSpan)
906
+ return "";
814
907
  let r = e.startSourceSpan.end.offset;
815
908
  e.firstChild && Ve(e.firstChild) && (r -= Ct(e).length);
816
909
  let n = e.endSourceSpan.start.offset;
@@ -821,7 +914,8 @@ function Ss(e, t) {
821
914
  let { node: r } = e;
822
915
  switch (r.type) {
823
916
  case "element":
824
- if (U(r, t) || r.type === "interpolation") return;
917
+ if (U(r, t) || r.type === "interpolation")
918
+ return;
825
919
  if (!r.isSelfClosing && dt(r, t)) {
826
920
  let n = Mt(r, t);
827
921
  return n ? async (a, s) => {
@@ -833,18 +927,20 @@ function Ss(e, t) {
833
927
  case "text":
834
928
  if (U(r.parent, t)) {
835
929
  let n = Mt(r.parent, t);
836
- if (n) return async (a) => {
837
- let s = n === "markdown" ? Or(r.value.replace(/^[^\S\n]*\n/u, "")) : r.value, i = { parser: n, __embeddedInHtml: !0 };
838
- if (t.parser === "html" && n === "babel") {
839
- let u = "script", { attrMap: o } = r.parent;
840
- o && (o.type === "module" || (o.type === "text/babel" || o.type === "text/jsx") && o["data-type"] === "module") && (u = "module"), i.__babelSourceType = u;
841
- }
842
- return [me, j(r, t), await a(s, i), $(r, t)];
930
+ if (n)
931
+ return async (a) => {
932
+ let s = n === "markdown" ? Or(r.value.replace(/^[^\S\n]*\n/u, "")) : r.value, i = { parser: n, __embeddedInHtml: !0 };
933
+ if (t.parser === "html" && n === "babel") {
934
+ let u = "script", { attrMap: o } = r.parent;
935
+ o && (o.type === "module" || (o.type === "text/babel" || o.type === "text/jsx") && o["data-type"] === "module") && (u = "module"), i.__babelSourceType = u;
936
+ }
937
+ return [me, j(r, t), await a(s, i), $(r, t)];
938
+ };
939
+ } else if (r.parent.type === "interpolation")
940
+ return async (n) => {
941
+ let a = { __isInHtmlInterpolation: !0, __embeddedInHtml: !0 };
942
+ return t.parser === "angular" ? a.parser = "__ng_interpolation" : t.parser === "vue" ? a.parser = gt(e, t) ? "__vue_ts_expression" : "__vue_expression" : a.parser = "__js_expression", [H([_, await n(r.value, a)]), r.parent.next && z(r.parent.next) ? " " : _];
843
943
  };
844
- } else if (r.parent.type === "interpolation") return async (n) => {
845
- let a = { __isInHtmlInterpolation: !0, __embeddedInHtml: !0 };
846
- return t.parser === "angular" ? a.parser = "__ng_interpolation" : t.parser === "vue" ? a.parser = gt(e, t) ? "__vue_ts_expression" : "__vue_expression" : a.parser = "__js_expression", [H([_, await n(r.value, a)]), r.parent.next && z(r.parent.next) ? " " : _];
847
- };
848
944
  break;
849
945
  case "attribute":
850
946
  return cs(e, t);
@@ -865,7 +961,8 @@ function ce(e) {
865
961
  return ne = ce.prototype = e ?? /* @__PURE__ */ Object.create(null), new ce();
866
962
  }
867
963
  var bs = 10;
868
- for (let e = 0; e <= bs; e++) ce();
964
+ for (let e = 0; e <= bs; e++)
965
+ ce();
869
966
  function _s(e) {
870
967
  return ce(e);
871
968
  }
@@ -873,7 +970,8 @@ function ws(e, t = "type") {
873
970
  _s(e);
874
971
  function r(n) {
875
972
  let a = n[t], s = e[a];
876
- if (!Array.isArray(s)) throw Object.assign(new Error(`Missing visitor keys for '${a}'.`), { node: n });
973
+ if (!Array.isArray(s))
974
+ throw Object.assign(new Error(`Missing visitor keys for '${a}'.`), { node: n });
877
975
  return s;
878
976
  }
879
977
  return r;
@@ -908,17 +1006,19 @@ function _e(e, t) {
908
1006
  }
909
1007
  function St(e, t, r) {
910
1008
  let { node: n } = e;
911
- if (Ir(n)) return [me, ...e.map((s) => {
912
- let i = s.node, u = i.prev ? _e(i.prev, i) : "";
913
- return [u ? [u, be(i.prev) ? S : ""] : "", ae(s, t, r)];
914
- }, "children")];
915
- let a = n.children.map(() => /* @__PURE__ */ Symbol(""));
1009
+ if (Ir(n))
1010
+ return [me, ...e.map((s) => {
1011
+ let i = s.node, u = i.prev ? _e(i.prev, i) : "";
1012
+ return [u ? [u, be(i.prev) ? S : ""] : "", ae(s, t, r)];
1013
+ }, "children")];
1014
+ let a = n.children.map(() => Symbol(""));
916
1015
  return e.map((s, i) => {
917
1016
  let u = s.node;
918
1017
  if (q(u)) {
919
1018
  if (u.prev && q(u.prev)) {
920
1019
  let C = _e(u.prev, u);
921
- if (C) return be(u.prev) ? [S, S, ae(s, t, r)] : [C, ae(s, t, r)];
1020
+ if (C)
1021
+ return be(u.prev) ? [S, S, ae(s, t, r)] : [C, ae(s, t, r)];
922
1022
  }
923
1023
  return ae(s, t, r);
924
1024
  }
@@ -956,8 +1056,9 @@ function Us(e, t, r) {
956
1056
  }
957
1057
  function Vs(e, t, r) {
958
1058
  let { node: n } = e;
959
- if (qr(n, t)) return [j(n, t), k(Ye(e, t, r)), P(Jr(n, t)), ...Je(n, t), $(n, t)];
960
- let a = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = /* @__PURE__ */ Symbol("element-attr-group-id"), i = (l) => k([k(Ye(e, t, r), { id: s }), l, Je(n, t)]), u = (l) => a ? xn(l, { groupId: s }) : (U(n, t) || He(n, t)) && n.parent.type === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? l : H(l), o = () => a ? xe(D, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? kn(D) : D, p = () => (n.next ? z(n.next) : Ce(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : a ? xe(D, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : D;
1059
+ if (qr(n, t))
1060
+ return [j(n, t), k(Ye(e, t, r)), P(Jr(n, t)), ...Je(n, t), $(n, t)];
1061
+ let a = n.children.length === 1 && (n.firstChild.type === "interpolation" || n.firstChild.type === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), i = (l) => k([k(Ye(e, t, r), { id: s }), l, Je(n, t)]), u = (l) => a ? xn(l, { groupId: s }) : (U(n, t) || He(n, t)) && n.parent.type === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? l : H(l), o = () => a ? xe(D, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? _ : n.firstChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? kn(D) : D, p = () => (n.next ? z(n.next) : Ce(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : a ? xe(D, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? _ : (n.lastChild.type === "comment" || n.lastChild.type === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : D;
961
1062
  return n.children.length === 0 ? i(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? _ : "") : i([fa(n) ? me : "", u([o(), St(e, t, r)]), p()]);
962
1063
  }
963
1064
  function De(e) {
@@ -994,12 +1095,13 @@ var Qe = class Zr {
994
1095
  }
995
1096
  moveBy(t) {
996
1097
  let r = this.file.content, n = r.length, a = this.offset, s = this.line, i = this.col;
997
- for (; a > 0 && t < 0; ) if (a--, t++, r.charCodeAt(a) == 10) {
998
- s--;
999
- let u = r.substring(0, a - 1).lastIndexOf(`
1000
- `);
1001
- i = u > 0 ? a - u : a;
1002
- } else i--;
1098
+ for (; a > 0 && t < 0; )
1099
+ if (a--, t++, r.charCodeAt(a) == 10) {
1100
+ s--;
1101
+ let u = r.substring(0, a - 1).lastIndexOf(String.fromCharCode(10));
1102
+ i = u > 0 ? a - u : a;
1103
+ } else
1104
+ i--;
1003
1105
  for (; a < n && t > 0; ) {
1004
1106
  let u = r.charCodeAt(a);
1005
1107
  a++, t--, u == 10 ? (s++, i = 0) : i++;
@@ -1012,9 +1114,11 @@ var Qe = class Zr {
1012
1114
  a > n.length - 1 && (a = n.length - 1);
1013
1115
  let s = a, i = 0, u = 0;
1014
1116
  for (; i < t && a > 0 && (a--, i++, !(n[a] == `
1015
- ` && ++u == r)); ) ;
1117
+ ` && ++u == r)); )
1118
+ ;
1016
1119
  for (i = 0, u = 0; i < t && s < n.length - 1 && (s++, i++, !(n[s] == `
1017
- ` && ++u == r)); ) ;
1120
+ ` && ++u == r)); )
1121
+ ;
1018
1122
  return { before: n.substring(a, this.offset), after: n.substring(this.offset, s + 1) };
1019
1123
  }
1020
1124
  return null;
@@ -1048,7 +1152,8 @@ var tn = class {
1048
1152
  }
1049
1153
  }, zs = [Gs, Ks, Js, Qs, Zs, ri, ei, ti, ni, Ys];
1050
1154
  function js(e, t) {
1051
- for (let r of zs) r(e, t);
1155
+ for (let r of zs)
1156
+ r(e, t);
1052
1157
  return e;
1053
1158
  }
1054
1159
  function Gs(e) {
@@ -1066,25 +1171,29 @@ function Ks(e) {
1066
1171
  return r.type === "element" && ((n = r.prev) == null ? void 0 : n.type) === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && ((a = r.firstChild) == null ? void 0 : a.type) === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset;
1067
1172
  };
1068
1173
  e.walk((r) => {
1069
- if (r.children) for (let n = 0; n < r.children.length; n++) {
1070
- let a = r.children[n];
1071
- if (!t(a)) continue;
1072
- let s = a.prev, i = a.firstChild;
1073
- r.removeChild(s), n--;
1074
- let u = new m(s.sourceSpan.start, i.sourceSpan.end), o = new m(u.start, a.sourceSpan.end);
1075
- a.condition = s.condition, a.sourceSpan = o, a.startSourceSpan = u, a.removeChild(i);
1076
- }
1174
+ if (r.children)
1175
+ for (let n = 0; n < r.children.length; n++) {
1176
+ let a = r.children[n];
1177
+ if (!t(a))
1178
+ continue;
1179
+ let s = a.prev, i = a.firstChild;
1180
+ r.removeChild(s), n--;
1181
+ let u = new m(s.sourceSpan.start, i.sourceSpan.end), o = new m(u.start, a.sourceSpan.end);
1182
+ a.condition = s.condition, a.sourceSpan = o, a.startSourceSpan = u, a.removeChild(i);
1183
+ }
1077
1184
  });
1078
1185
  }
1079
1186
  function Xs(e, t, r) {
1080
1187
  e.walk((n) => {
1081
- if (n.children) for (let a = 0; a < n.children.length; a++) {
1082
- let s = n.children[a];
1083
- if (s.type !== "text" && !t(s)) continue;
1084
- s.type !== "text" && (s.type = "text", s.value = r(s));
1085
- let i = s.prev;
1086
- !i || i.type !== "text" || (i.value += s.value, i.sourceSpan = new m(i.sourceSpan.start, s.sourceSpan.end), n.removeChild(s), a--);
1087
- }
1188
+ if (n.children)
1189
+ for (let a = 0; a < n.children.length; a++) {
1190
+ let s = n.children[a];
1191
+ if (s.type !== "text" && !t(s))
1192
+ continue;
1193
+ s.type !== "text" && (s.type = "text", s.value = r(s));
1194
+ let i = s.prev;
1195
+ !i || i.type !== "text" || (i.value += s.value, i.sourceSpan = new m(i.sourceSpan.start, s.sourceSpan.end), n.removeChild(s), a--);
1196
+ }
1088
1197
  });
1089
1198
  }
1090
1199
  function Js(e) {
@@ -1096,48 +1205,56 @@ function Ys(e) {
1096
1205
  return r.type === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.type === "text" && !R.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && ((n = r.prev) == null ? void 0 : n.type) === "text" && ((a = r.next) == null ? void 0 : a.type) === "text";
1097
1206
  };
1098
1207
  e.walk((r) => {
1099
- if (r.children) for (let n = 0; n < r.children.length; n++) {
1100
- let a = r.children[n];
1101
- if (!t(a)) continue;
1102
- let s = a.prev, i = a.next;
1103
- s.value += `<${a.rawName}>` + a.firstChild.value + `</${a.rawName}>` + i.value, s.sourceSpan = new m(s.sourceSpan.start, i.sourceSpan.end), s.isTrailingSpaceSensitive = i.isTrailingSpaceSensitive, s.hasTrailingSpaces = i.hasTrailingSpaces, r.removeChild(a), n--, r.removeChild(i);
1104
- }
1208
+ if (r.children)
1209
+ for (let n = 0; n < r.children.length; n++) {
1210
+ let a = r.children[n];
1211
+ if (!t(a))
1212
+ continue;
1213
+ let s = a.prev, i = a.next;
1214
+ s.value += `<${a.rawName}>` + a.firstChild.value + `</${a.rawName}>` + i.value, s.sourceSpan = new m(s.sourceSpan.start, i.sourceSpan.end), s.isTrailingSpaceSensitive = i.isTrailingSpaceSensitive, s.hasTrailingSpaces = i.hasTrailingSpaces, r.removeChild(a), n--, r.removeChild(i);
1215
+ }
1105
1216
  });
1106
1217
  }
1107
1218
  function Qs(e, t) {
1108
- if (t.parser === "html") return;
1219
+ if (t.parser === "html")
1220
+ return;
1109
1221
  let r = /\{\{(.+?)\}\}/su;
1110
1222
  e.walk((n) => {
1111
- if (pa(n, t)) for (let a of n.children) {
1112
- if (a.type !== "text") continue;
1113
- let s = a.sourceSpan.start, i = null, u = a.value.split(r);
1114
- for (let o = 0; o < u.length; o++, s = i) {
1115
- let p = u[o];
1116
- if (o % 2 === 0) {
1117
- i = s.moveBy(p.length), p.length > 0 && n.insertChildBefore(a, { type: "text", value: p, sourceSpan: new m(s, i) });
1223
+ if (pa(n, t))
1224
+ for (let a of n.children) {
1225
+ if (a.type !== "text")
1118
1226
  continue;
1227
+ let s = a.sourceSpan.start, i = null, u = a.value.split(r);
1228
+ for (let o = 0; o < u.length; o++, s = i) {
1229
+ let p = u[o];
1230
+ if (o % 2 === 0) {
1231
+ i = s.moveBy(p.length), p.length > 0 && n.insertChildBefore(a, { type: "text", value: p, sourceSpan: new m(s, i) });
1232
+ continue;
1233
+ }
1234
+ i = s.moveBy(p.length + 4), n.insertChildBefore(a, { type: "interpolation", sourceSpan: new m(s, i), children: p.length === 0 ? [] : [{ type: "text", value: p, sourceSpan: new m(s.moveBy(2), i.moveBy(-2)) }] });
1119
1235
  }
1120
- i = s.moveBy(p.length + 4), n.insertChildBefore(a, { type: "interpolation", sourceSpan: new m(s, i), children: p.length === 0 ? [] : [{ type: "text", value: p, sourceSpan: new m(s.moveBy(2), i.moveBy(-2)) }] });
1236
+ n.removeChild(a);
1121
1237
  }
1122
- n.removeChild(a);
1123
- }
1124
1238
  });
1125
1239
  }
1126
1240
  function Zs(e, t) {
1127
1241
  e.walk((r) => {
1128
1242
  let n = r.$children;
1129
- if (!n) return;
1243
+ if (!n)
1244
+ return;
1130
1245
  if (n.length === 0 || n.length === 1 && n[0].type === "text" && R.trim(n[0].value).length === 0) {
1131
1246
  r.hasDanglingSpaces = n.length > 0, r.$children = [];
1132
1247
  return;
1133
1248
  }
1134
1249
  let a = ha(r, t), s = Nr(r);
1135
- if (!a) for (let i = 0; i < n.length; i++) {
1136
- let u = n[i];
1137
- if (u.type !== "text") continue;
1138
- let { leadingWhitespace: o, text: p, trailingWhitespace: l } = la(u.value), v = u.prev, d = u.next;
1139
- p ? (u.value = p, u.sourceSpan = new m(u.sourceSpan.start.moveBy(o.length), u.sourceSpan.end.moveBy(-l.length)), o && (v && (v.hasTrailingSpaces = !0), u.hasLeadingSpaces = !0), l && (u.hasTrailingSpaces = !0, d && (d.hasLeadingSpaces = !0))) : (r.removeChild(u), i--, (o || l) && (v && (v.hasTrailingSpaces = !0), d && (d.hasLeadingSpaces = !0)));
1140
- }
1250
+ if (!a)
1251
+ for (let i = 0; i < n.length; i++) {
1252
+ let u = n[i];
1253
+ if (u.type !== "text")
1254
+ continue;
1255
+ let { leadingWhitespace: o, text: p, trailingWhitespace: l } = la(u.value), v = u.prev, d = u.next;
1256
+ p ? (u.value = p, u.sourceSpan = new m(u.sourceSpan.start.moveBy(o.length), u.sourceSpan.end.moveBy(-l.length)), o && (v && (v.hasTrailingSpaces = !0), u.hasLeadingSpaces = !0), l && (u.hasTrailingSpaces = !0, d && (d.hasLeadingSpaces = !0))) : (r.removeChild(u), i--, (o || l) && (v && (v.hasTrailingSpaces = !0), d && (d.hasLeadingSpaces = !0)));
1257
+ }
1141
1258
  r.isWhitespaceSensitive = a, r.isIndentationSensitive = s;
1142
1259
  });
1143
1260
  }
@@ -1164,7 +1281,8 @@ function ni(e, t) {
1164
1281
  r.isDanglingSpaceSensitive = ga(r, t);
1165
1282
  return;
1166
1283
  }
1167
- for (let a of n) a.isLeadingSpaceSensitive = da(a, t), a.isTrailingSpaceSensitive = ma(a, t);
1284
+ for (let a of n)
1285
+ a.isLeadingSpaceSensitive = da(a, t), a.isTrailingSpaceSensitive = ma(a, t);
1168
1286
  for (let a = 0; a < n.length; a++) {
1169
1287
  let s = n[a];
1170
1288
  s.isLeadingSpaceSensitive = (a === 0 || s.prev.isTrailingSpaceSensitive) && s.isLeadingSpaceSensitive, s.isTrailingSpaceSensitive = (a === n.length - 1 || s.next.isLeadingSpaceSensitive) && s.isTrailingSpaceSensitive;
@@ -1215,10 +1333,12 @@ function si(e, t, r) {
1215
1333
  case "comment":
1216
1334
  return [j(n, t), P(t.originalText.slice(fe(n), Re(n))), $(n, t)];
1217
1335
  case "attribute": {
1218
- if (n.value === null) return n.rawName;
1336
+ if (n.value === null)
1337
+ return n.rawName;
1219
1338
  let a = Wr(n.value), s = Fn(a, '"');
1220
1339
  return [n.rawName, "=", s, P(s === '"' ? L(!1, a, '"', "&quot;") : L(!1, a, "'", "&apos;")), s];
1221
1340
  }
1341
+ case "cdata":
1222
1342
  default:
1223
1343
  throw new Rn(n, "HTML");
1224
1344
  }
@@ -1250,10 +1370,12 @@ var I;
1250
1370
  e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA";
1251
1371
  })(I || (I = {}));
1252
1372
  function Oe(e, t = !0) {
1253
- if (e[0] != ":") return [null, e];
1373
+ if (e[0] != ":")
1374
+ return [null, e];
1254
1375
  let r = e.indexOf(":", 1);
1255
1376
  if (r === -1) {
1256
- if (t) throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);
1377
+ if (t)
1378
+ throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);
1257
1379
  return [null, e];
1258
1380
  }
1259
1381
  return [e.slice(1, r), e.slice(r + 1)];
@@ -1275,7 +1397,8 @@ function Qt() {
1275
1397
  return Ee || (Ee = {}, we(W.HTML, ["iframe|srcdoc", "*|innerHTML", "*|outerHTML"]), we(W.STYLE, ["*|style"]), we(W.URL, ["*|formAction", "area|href", "area|ping", "audio|src", "a|href", "a|ping", "blockquote|cite", "body|background", "del|cite", "form|action", "img|src", "input|src", "ins|cite", "q|cite", "source|src", "track|src", "video|poster", "video|src"]), we(W.RESOURCE_URL, ["applet|code", "applet|codebase", "base|href", "embed|src", "frame|src", "head|profile", "html|manifest", "iframe|src", "link|href", "media|src", "object|codebase", "object|data", "script|src"])), Ee;
1276
1398
  }
1277
1399
  function we(e, t) {
1278
- for (let r of t) Ee[r.toLowerCase()] = e;
1400
+ for (let r of t)
1401
+ Ee[r.toLowerCase()] = e;
1279
1402
  }
1280
1403
  var pi = class {
1281
1404
  }, hi = "boolean", di = "number", mi = "string", gi = "object", fi = ["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":svg:graphics^:svg:|", ":svg:animation^:svg:|*begin,*end,*repeat", ":svg:geometry^:svg:|", ":svg:componentTransferFunction^:svg:|", ":svg:gradient^:svg:|", ":svg:textContent^:svg:graphics|", ":svg:textPositioning^:svg:textContent|", "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", "audio^media|", "br^[HTMLElement]|clear", "base^[HTMLElement]|href,target", "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", "canvas^[HTMLElement]|#height,#width", "content^[HTMLElement]|select", "dl^[HTMLElement]|!compact", "data^[HTMLElement]|value", "datalist^[HTMLElement]|", "details^[HTMLElement]|!open", "dialog^[HTMLElement]|!open,returnValue", "dir^[HTMLElement]|!compact", "div^[HTMLElement]|align", "embed^[HTMLElement]|align,height,name,src,type,width", "fieldset^[HTMLElement]|!disabled,name", "font^[HTMLElement]|color,face,size", "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", "hr^[HTMLElement]|align,color,!noShade,size,width", "head^[HTMLElement]|", "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", "html^[HTMLElement]|version", "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", "li^[HTMLElement]|type,#value", "label^[HTMLElement]|htmlFor", "legend^[HTMLElement]|align", "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", "map^[HTMLElement]|name", "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", "menu^[HTMLElement]|!compact", "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", "ins,del^[HTMLElement]|cite,dateTime", "ol^[HTMLElement]|!compact,!reversed,#start,type", "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", "optgroup^[HTMLElement]|!disabled,label", "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", "output^[HTMLElement]|defaultValue,%htmlFor,name,value", "p^[HTMLElement]|align", "param^[HTMLElement]|name,type,value,valueType", "picture^[HTMLElement]|", "pre^[HTMLElement]|#width", "progress^[HTMLElement]|#max,#value", "q,blockquote,cite^[HTMLElement]|", "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", "slot^[HTMLElement]|name", "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", "span^[HTMLElement]|", "style^[HTMLElement]|!disabled,media,type", "caption^[HTMLElement]|align", "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", "template^[HTMLElement]|", "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", "time^[HTMLElement]|dateTime", "title^[HTMLElement]|text", "track^[HTMLElement]|!default,kind,label,src,srclang", "ul^[HTMLElement]|!compact,type", "unknown^[HTMLElement]|", "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", ":svg:a^:svg:graphics|", ":svg:animate^:svg:animation|", ":svg:animateMotion^:svg:animation|", ":svg:animateTransform^:svg:animation|", ":svg:circle^:svg:geometry|", ":svg:clipPath^:svg:graphics|", ":svg:defs^:svg:graphics|", ":svg:desc^:svg:|", ":svg:discard^:svg:|", ":svg:ellipse^:svg:geometry|", ":svg:feBlend^:svg:|", ":svg:feColorMatrix^:svg:|", ":svg:feComponentTransfer^:svg:|", ":svg:feComposite^:svg:|", ":svg:feConvolveMatrix^:svg:|", ":svg:feDiffuseLighting^:svg:|", ":svg:feDisplacementMap^:svg:|", ":svg:feDistantLight^:svg:|", ":svg:feDropShadow^:svg:|", ":svg:feFlood^:svg:|", ":svg:feFuncA^:svg:componentTransferFunction|", ":svg:feFuncB^:svg:componentTransferFunction|", ":svg:feFuncG^:svg:componentTransferFunction|", ":svg:feFuncR^:svg:componentTransferFunction|", ":svg:feGaussianBlur^:svg:|", ":svg:feImage^:svg:|", ":svg:feMerge^:svg:|", ":svg:feMergeNode^:svg:|", ":svg:feMorphology^:svg:|", ":svg:feOffset^:svg:|", ":svg:fePointLight^:svg:|", ":svg:feSpecularLighting^:svg:|", ":svg:feSpotLight^:svg:|", ":svg:feTile^:svg:|", ":svg:feTurbulence^:svg:|", ":svg:filter^:svg:|", ":svg:foreignObject^:svg:graphics|", ":svg:g^:svg:graphics|", ":svg:image^:svg:graphics|decoding", ":svg:line^:svg:geometry|", ":svg:linearGradient^:svg:gradient|", ":svg:mpath^:svg:|", ":svg:marker^:svg:|", ":svg:mask^:svg:|", ":svg:metadata^:svg:|", ":svg:path^:svg:geometry|", ":svg:pattern^:svg:|", ":svg:polygon^:svg:geometry|", ":svg:polyline^:svg:geometry|", ":svg:radialGradient^:svg:gradient|", ":svg:rect^:svg:geometry|", ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", ":svg:script^:svg:|type", ":svg:set^:svg:animation|", ":svg:stop^:svg:|", ":svg:style^:svg:|!disabled,media,title,type", ":svg:switch^:svg:graphics|", ":svg:symbol^:svg:|", ":svg:tspan^:svg:textPositioning|", ":svg:text^:svg:textPositioning|", ":svg:textPath^:svg:textContent|", ":svg:title^:svg:|", ":svg:use^:svg:graphics|", ":svg:view^:svg:|#zoomAndPan", "data^[HTMLElement]|value", "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", "summary^[HTMLElement]|", "time^[HTMLElement]|dateTime", ":svg:cursor^:svg:|", ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", ":math:math^:math:|", ":math:maction^:math:|", ":math:menclose^:math:|", ":math:merror^:math:|", ":math:mfenced^:math:|", ":math:mfrac^:math:|", ":math:mi^:math:|", ":math:mmultiscripts^:math:|", ":math:mn^:math:|", ":math:mo^:math:|", ":math:mover^:math:|", ":math:mpadded^:math:|", ":math:mphantom^:math:|", ":math:mroot^:math:|", ":math:mrow^:math:|", ":math:ms^:math:|", ":math:mspace^:math:|", ":math:msqrt^:math:|", ":math:mstyle^:math:|", ":math:msub^:math:|", ":math:msubsup^:math:|", ":math:msup^:math:|", ":math:mtable^:math:|", ":math:mtd^:math:|", ":math:mtext^:math:|", ":math:mtr^:math:|", ":math:munder^:math:|", ":math:munderover^:math:|", ":math:semantics^:math:|"], nn = new Map(Object.entries({ class: "className", for: "htmlFor", formaction: "formAction", innerHtml: "innerHTML", readonly: "readOnly", tabindex: "tabIndex" })), vi = Array.from(nn).reduce((e, [t, r]) => (e.set(t, r), e), /* @__PURE__ */ new Map()), Ci = class extends pi {
@@ -1287,34 +1410,40 @@ var pi = class {
1287
1410
  });
1288
1411
  let o = u && this._schema.get(u.toLowerCase());
1289
1412
  if (o) {
1290
- for (let [p, l] of o) t.set(p, l);
1291
- for (let p of this._eventSchema.get(u.toLowerCase())) r.add(p);
1413
+ for (let [p, l] of o)
1414
+ t.set(p, l);
1415
+ for (let p of this._eventSchema.get(u.toLowerCase()))
1416
+ r.add(p);
1292
1417
  }
1293
1418
  s.forEach((p) => {
1294
- if (p.length > 0) switch (p[0]) {
1295
- case "*":
1296
- r.add(p.substring(1));
1297
- break;
1298
- case "!":
1299
- t.set(p.substring(1), hi);
1300
- break;
1301
- case "#":
1302
- t.set(p.substring(1), di);
1303
- break;
1304
- case "%":
1305
- t.set(p.substring(1), gi);
1306
- break;
1307
- default:
1308
- t.set(p, mi);
1309
- }
1419
+ if (p.length > 0)
1420
+ switch (p[0]) {
1421
+ case "*":
1422
+ r.add(p.substring(1));
1423
+ break;
1424
+ case "!":
1425
+ t.set(p.substring(1), hi);
1426
+ break;
1427
+ case "#":
1428
+ t.set(p.substring(1), di);
1429
+ break;
1430
+ case "%":
1431
+ t.set(p.substring(1), gi);
1432
+ break;
1433
+ default:
1434
+ t.set(p, mi);
1435
+ }
1310
1436
  });
1311
1437
  });
1312
1438
  }
1313
1439
  hasProperty(e, t, r) {
1314
- if (r.some((n) => n.name === Kt.name)) return !0;
1440
+ if (r.some((n) => n.name === Kt.name))
1441
+ return !0;
1315
1442
  if (e.indexOf("-") > -1) {
1316
- if (Jt(e) || Yt(e)) return !1;
1317
- if (r.some((n) => n.name === Gt.name)) return !0;
1443
+ if (Jt(e) || Yt(e))
1444
+ return !1;
1445
+ if (r.some((n) => n.name === Gt.name))
1446
+ return !0;
1318
1447
  }
1319
1448
  return (this._schema.get(e.toLowerCase()) || this._schema.get("unknown")).has(t);
1320
1449
  }
@@ -1354,11 +1483,13 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
1354
1483
  }
1355
1484
  normalizeAnimationStyleValue(e, t, r) {
1356
1485
  let n = "", a = r.toString().trim(), s = null;
1357
- if (Si(e) && r !== 0 && r !== "0") if (typeof r == "number") n = "px";
1358
- else {
1359
- let i = r.match(/^[+-]?[\d\.]+([a-z]*)$/);
1360
- i && i[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
1361
- }
1486
+ if (Si(e) && r !== 0 && r !== "0")
1487
+ if (typeof r == "number")
1488
+ n = "px";
1489
+ else {
1490
+ let i = r.match(/^[+-]?[\d\.]+([a-z]*)$/);
1491
+ i && i[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`);
1492
+ }
1362
1493
  return { error: s, value: a + n };
1363
1494
  }
1364
1495
  };
@@ -1551,11 +1682,13 @@ var xi = class {
1551
1682
  Fe.ngsp = Di;
1552
1683
  var Ti = [/@/, /^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];
1553
1684
  function Bi(e, t) {
1554
- if (t != null && !(Array.isArray(t) && t.length == 2)) throw new Error(`Expected '${e}' to be an array, [start, end].`);
1685
+ if (t != null && !(Array.isArray(t) && t.length == 2))
1686
+ throw new Error(`Expected '${e}' to be an array, [start, end].`);
1555
1687
  if (t != null) {
1556
1688
  let r = t[0], n = t[1];
1557
1689
  Ti.forEach((a) => {
1558
- if (a.test(r) || a.test(n)) throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`);
1690
+ if (a.test(r) || a.test(n))
1691
+ throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`);
1559
1692
  });
1560
1693
  }
1561
1694
  }
@@ -1616,13 +1749,17 @@ var Ge = class {
1616
1749
  for (; this._cursor.peek() !== 0; ) {
1617
1750
  let e = this._cursor.clone();
1618
1751
  try {
1619
- if (this._attemptCharCode(60)) if (this._attemptCharCode(33)) this._attemptStr("[CDATA[") ? this._consumeCdata(e) : this._attemptStr("--") ? this._consumeComment(e) : this._attemptStrCaseInsensitive("doctype") ? this._consumeDocType(e) : this._consumeBogusComment(e);
1620
- else if (this._attemptCharCode(47)) this._consumeTagClose(e);
1621
- else {
1622
- let t = this._cursor.clone();
1623
- this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
1624
- }
1625
- else this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._attemptStr("@let") ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._attemptCharCode(64) ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(5, 8, () => this._isTextEnd(), () => this._isTagStart());
1752
+ if (this._attemptCharCode(60))
1753
+ if (this._attemptCharCode(33))
1754
+ this._attemptStr("[CDATA[") ? this._consumeCdata(e) : this._attemptStr("--") ? this._consumeComment(e) : this._attemptStrCaseInsensitive("doctype") ? this._consumeDocType(e) : this._consumeBogusComment(e);
1755
+ else if (this._attemptCharCode(47))
1756
+ this._consumeTagClose(e);
1757
+ else {
1758
+ let t = this._cursor.clone();
1759
+ this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e);
1760
+ }
1761
+ else
1762
+ this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._attemptStr("@let") ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._attemptCharCode(64) ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(5, 8, () => this._isTextEnd(), () => this._isTagStart());
1626
1763
  } catch (t) {
1627
1764
  this.handleError(t);
1628
1765
  }
@@ -1636,11 +1773,13 @@ var Ge = class {
1636
1773
  _consumeBlockStart(e) {
1637
1774
  this._beginToken(25, e);
1638
1775
  let t = this._endToken([this._getBlockName()]);
1639
- if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(b), this._attemptCharCode(41)) this._attemptCharCodeUntilFn(b);
1640
- else {
1641
- t.type = 29;
1642
- return;
1643
- }
1776
+ if (this._cursor.peek() === 40)
1777
+ if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(b), this._attemptCharCode(41))
1778
+ this._attemptCharCodeUntilFn(b);
1779
+ else {
1780
+ t.type = 29;
1781
+ return;
1782
+ }
1644
1783
  this._attemptCharCode(123) ? (this._beginToken(26), this._endToken([])) : t.type = 29;
1645
1784
  }
1646
1785
  _consumeBlockEnd(e) {
@@ -1652,12 +1791,17 @@ var Ge = class {
1652
1791
  let e = this._cursor.clone(), t = null, r = 0;
1653
1792
  for (; this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null; ) {
1654
1793
  let n = this._cursor.peek();
1655
- if (n === 92) this._cursor.advance();
1656
- else if (n === t) t = null;
1657
- else if (t === null && ze(n)) t = n;
1658
- else if (n === 40 && t === null) r++;
1794
+ if (n === 92)
1795
+ this._cursor.advance();
1796
+ else if (n === t)
1797
+ t = null;
1798
+ else if (t === null && ze(n))
1799
+ t = n;
1800
+ else if (n === 40 && t === null)
1801
+ r++;
1659
1802
  else if (n === 41 && t === null) {
1660
- if (r === 0) break;
1803
+ if (r === 0)
1804
+ break;
1661
1805
  r > 0 && r--;
1662
1806
  }
1663
1807
  this._cursor.advance();
@@ -1666,7 +1810,8 @@ var Ge = class {
1666
1810
  }
1667
1811
  }
1668
1812
  _consumeLetDeclaration(e) {
1669
- if (this._beginToken(30, e), De(this._cursor.peek())) this._attemptCharCodeUntilFn(b);
1813
+ if (this._beginToken(30, e), De(this._cursor.peek()))
1814
+ this._attemptCharCodeUntilFn(b);
1670
1815
  else {
1671
1816
  let r = this._endToken([this._cursor.getChars(e)]);
1672
1817
  r.type = 33;
@@ -1687,17 +1832,22 @@ var Ge = class {
1687
1832
  let e = this._cursor.clone();
1688
1833
  for (this._beginToken(31, e); this._cursor.peek() !== 0; ) {
1689
1834
  let t = this._cursor.peek();
1690
- if (t === 59) break;
1835
+ if (t === 59)
1836
+ break;
1691
1837
  ze(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), !1) : r === t)), this._cursor.advance();
1692
1838
  }
1693
1839
  this._endToken([this._cursor.getChars(e)]);
1694
1840
  }
1695
1841
  _tokenizeExpansionForm() {
1696
- if (this.isExpansionFormStart()) return this._consumeExpansionFormStart(), !0;
1697
- if (Ui(this._cursor.peek()) && this._isInExpansionForm()) return this._consumeExpansionCaseStart(), !0;
1842
+ if (this.isExpansionFormStart())
1843
+ return this._consumeExpansionFormStart(), !0;
1844
+ if (Ui(this._cursor.peek()) && this._isInExpansionForm())
1845
+ return this._consumeExpansionCaseStart(), !0;
1698
1846
  if (this._cursor.peek() === 125) {
1699
- if (this._isInExpansionCase()) return this._consumeExpansionCaseEnd(), !0;
1700
- if (this._isInExpansionForm()) return this._consumeExpansionFormEnd(), !0;
1847
+ if (this._isInExpansionCase())
1848
+ return this._consumeExpansionCaseEnd(), !0;
1849
+ if (this._isInExpansionForm())
1850
+ return this._consumeExpansionFormEnd(), !0;
1701
1851
  }
1702
1852
  return !1;
1703
1853
  }
@@ -1705,8 +1855,10 @@ var Ge = class {
1705
1855
  this._currentTokenStart = t, this._currentTokenType = e;
1706
1856
  }
1707
1857
  _endToken(e, t) {
1708
- if (this._currentTokenStart === null) throw new je("Programming error - attempted to end a token when there was no start to the token", this._currentTokenType, this._cursor.getSpan(t));
1709
- if (this._currentTokenType === null) throw new je("Programming error - attempted to end a token which has no token type", null, this._cursor.getSpan(this._currentTokenStart));
1858
+ if (this._currentTokenStart === null)
1859
+ throw new je("Programming error - attempted to end a token when there was no start to the token", this._currentTokenType, this._cursor.getSpan(t));
1860
+ if (this._currentTokenType === null)
1861
+ throw new je("Programming error - attempted to end a token which has no token type", null, this._cursor.getSpan(this._currentTokenStart));
1710
1862
  let r = { type: this._currentTokenType, parts: e, sourceSpan: (t ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints) };
1711
1863
  return this.tokens.push(r), this._currentTokenStart = null, this._currentTokenType = null, r;
1712
1864
  }
@@ -1716,8 +1868,10 @@ var Ge = class {
1716
1868
  return this._currentTokenStart = null, this._currentTokenType = null, new Ge(r);
1717
1869
  }
1718
1870
  handleError(e) {
1719
- if (e instanceof _t && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof Ge) this.errors.push(e.error);
1720
- else throw e;
1871
+ if (e instanceof _t && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof Ge)
1872
+ this.errors.push(e.error);
1873
+ else
1874
+ throw e;
1721
1875
  }
1722
1876
  _attemptCharCode(e) {
1723
1877
  return this._cursor.peek() === e ? (this._cursor.advance(), !0) : !1;
@@ -1727,36 +1881,47 @@ var Ge = class {
1727
1881
  }
1728
1882
  _requireCharCode(e) {
1729
1883
  let t = this._cursor.clone();
1730
- if (!this._attemptCharCode(e)) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
1884
+ if (!this._attemptCharCode(e))
1885
+ throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
1731
1886
  }
1732
1887
  _attemptStr(e) {
1733
1888
  let t = e.length;
1734
- if (this._cursor.charsLeft() < t) return !1;
1889
+ if (this._cursor.charsLeft() < t)
1890
+ return !1;
1735
1891
  let r = this._cursor.clone();
1736
- for (let n = 0; n < t; n++) if (!this._attemptCharCode(e.charCodeAt(n))) return this._cursor = r, !1;
1892
+ for (let n = 0; n < t; n++)
1893
+ if (!this._attemptCharCode(e.charCodeAt(n)))
1894
+ return this._cursor = r, !1;
1737
1895
  return !0;
1738
1896
  }
1739
1897
  _attemptStrCaseInsensitive(e) {
1740
- for (let t = 0; t < e.length; t++) if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t))) return !1;
1898
+ for (let t = 0; t < e.length; t++)
1899
+ if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))
1900
+ return !1;
1741
1901
  return !0;
1742
1902
  }
1743
1903
  _requireStr(e) {
1744
1904
  let t = this._cursor.clone();
1745
- if (!this._attemptStr(e)) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
1905
+ if (!this._attemptStr(e))
1906
+ throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
1746
1907
  }
1747
1908
  _requireStrCaseInsensitive(e) {
1748
1909
  let t = this._cursor.clone();
1749
- if (!this._attemptStrCaseInsensitive(e)) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
1910
+ if (!this._attemptStrCaseInsensitive(e))
1911
+ throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(t));
1750
1912
  }
1751
1913
  _attemptCharCodeUntilFn(e) {
1752
- for (; !e(this._cursor.peek()); ) this._cursor.advance();
1914
+ for (; !e(this._cursor.peek()); )
1915
+ this._cursor.advance();
1753
1916
  }
1754
1917
  _requireCharCodeUntilFn(e, t) {
1755
1918
  let r = this._cursor.clone();
1756
- if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(r));
1919
+ if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t)
1920
+ throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(r));
1757
1921
  }
1758
1922
  _attemptUntilChar(e) {
1759
- for (; this._cursor.peek() !== e; ) this._cursor.advance();
1923
+ for (; this._cursor.peek() !== e; )
1924
+ this._cursor.advance();
1760
1925
  }
1761
1926
  _readChar() {
1762
1927
  let e = String.fromCodePoint(this._cursor.peek());
@@ -1782,12 +1947,14 @@ var Ge = class {
1782
1947
  }
1783
1948
  } else {
1784
1949
  let r = this._cursor.clone();
1785
- if (this._attemptCharCodeUntilFn(Ri), this._cursor.peek() != 59) this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
1950
+ if (this._attemptCharCodeUntilFn(Ri), this._cursor.peek() != 59)
1951
+ this._beginToken(e, t), this._cursor = r, this._endToken(["&"]);
1786
1952
  else {
1787
1953
  let n = this._cursor.getChars(r);
1788
1954
  this._cursor.advance();
1789
1955
  let a = Fe[n];
1790
- if (!a) throw this._createError(rr(n), this._cursor.getSpan(t));
1956
+ if (!a)
1957
+ throw this._createError(rr(n), this._cursor.getSpan(t));
1791
1958
  this._endToken([a, `&${n};`]);
1792
1959
  }
1793
1960
  }
@@ -1797,7 +1964,8 @@ var Ge = class {
1797
1964
  let r = [];
1798
1965
  for (; ; ) {
1799
1966
  let n = this._cursor.clone(), a = t();
1800
- if (this._cursor = n, a) break;
1967
+ if (this._cursor = n, a)
1968
+ break;
1801
1969
  e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(6), this._beginToken(6)) : r.push(this._readChar());
1802
1970
  }
1803
1971
  this._endToken([this._processCarriageReturns(r.join(""))]);
@@ -1816,7 +1984,8 @@ var Ge = class {
1816
1984
  }
1817
1985
  _consumePrefixAndName() {
1818
1986
  let e = this._cursor.clone(), t = "";
1819
- for (; this._cursor.peek() !== 58 && !Mi(this._cursor.peek()); ) this._cursor.advance();
1987
+ for (; this._cursor.peek() !== 58 && !Mi(this._cursor.peek()); )
1988
+ this._cursor.advance();
1820
1989
  let r;
1821
1990
  this._cursor.peek() === 58 ? (t = this._cursor.getChars(e), this._cursor.advance(), r = this._cursor.clone()) : r = e, this._requireCharCodeUntilFn(nr, t === "" ? 0 : 1);
1822
1991
  let n = this._cursor.getChars(r);
@@ -1825,14 +1994,16 @@ var Ge = class {
1825
1994
  _consumeTagOpen(e) {
1826
1995
  let t, r, n, a = [];
1827
1996
  try {
1828
- if (!Te(this._cursor.peek())) throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(e));
1997
+ if (!Te(this._cursor.peek()))
1998
+ throw this._createError(X(this._cursor.peek()), this._cursor.getSpan(e));
1829
1999
  for (n = this._consumeTagOpenStart(e), r = n.parts[0], t = n.parts[1], this._attemptCharCodeUntilFn(b); this._cursor.peek() !== 47 && this._cursor.peek() !== 62 && this._cursor.peek() !== 60 && this._cursor.peek() !== 0; ) {
1830
2000
  let [i, u] = this._consumeAttributeName();
1831
2001
  if (this._attemptCharCodeUntilFn(b), this._attemptCharCode(61)) {
1832
2002
  this._attemptCharCodeUntilFn(b);
1833
2003
  let o = this._consumeAttributeValue();
1834
2004
  a.push({ prefix: i, name: u, value: o });
1835
- } else a.push({ prefix: i, name: u });
2005
+ } else
2006
+ a.push({ prefix: i, name: u });
1836
2007
  this._attemptCharCodeUntilFn(b);
1837
2008
  }
1838
2009
  this._consumeTagOpenEnd();
@@ -1843,7 +2014,8 @@ var Ge = class {
1843
2014
  }
1844
2015
  throw i;
1845
2016
  }
1846
- if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === 2) return;
2017
+ if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === 2)
2018
+ return;
1847
2019
  let s = this._getTagContentType(t, r, this._fullNameStack.length > 0, a);
1848
2020
  this._handleFullNameStackForTagOpen(r, t), s === I.RAW_TEXT ? this._consumeRawTextWithTagClose(r, t, !1) : s === I.ESCAPABLE_RAW_TEXT && this._consumeRawTextWithTagClose(r, t, !0);
1849
2021
  }
@@ -1857,7 +2029,8 @@ var Ge = class {
1857
2029
  }
1858
2030
  _consumeAttributeName() {
1859
2031
  let e = this._cursor.peek();
1860
- if (e === 39 || e === 34) throw this._createError(X(e), this._cursor.getSpan());
2032
+ if (e === 39 || e === 34)
2033
+ throw this._createError(X(e), this._cursor.getSpan());
1861
2034
  this._beginToken(14);
1862
2035
  let t = this._consumePrefixAndName();
1863
2036
  return this._endToken(t), t;
@@ -1883,7 +2056,8 @@ var Ge = class {
1883
2056
  this._beginToken(e), this._requireCharCode(62), this._endToken([]);
1884
2057
  }
1885
2058
  _consumeTagClose(e) {
1886
- if (this._beginToken(3, e), this._attemptCharCodeUntilFn(b), this._allowHtmComponentClosingTags && this._attemptCharCode(47)) this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([]);
2059
+ if (this._beginToken(3, e), this._attemptCharCodeUntilFn(b), this._allowHtmComponentClosingTags && this._attemptCharCode(47))
2060
+ this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([]);
1887
2061
  else {
1888
2062
  let [t, r] = this._consumePrefixAndName();
1889
2063
  this._attemptCharCodeUntilFn(b), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r);
@@ -1892,7 +2066,8 @@ var Ge = class {
1892
2066
  _consumeExpansionFormStart() {
1893
2067
  this._beginToken(20), this._requireCharCode(123), this._endToken([]), this._expansionCaseStack.push(20), this._beginToken(7);
1894
2068
  let e = this._readUntil(44), t = this._processCarriageReturns(e);
1895
- if (this._i18nNormalizeLineEndingsInICUs) this._endToken([t]);
2069
+ if (this._i18nNormalizeLineEndingsInICUs)
2070
+ this._endToken([t]);
1896
2071
  else {
1897
2072
  let n = this._endToken([e]);
1898
2073
  t !== e && this.nonNormalizedIcuExpressions.push(n);
@@ -1933,10 +2108,12 @@ var Ge = class {
1933
2108
  this._cursor = u, n.push(this._getProcessedChars(a, u)), this._endToken(n);
1934
2109
  return;
1935
2110
  }
1936
- if (s === null) if (this._attemptStr(this._interpolationConfig.end)) {
1937
- n.push(this._getProcessedChars(a, u)), n.push(this._interpolationConfig.end), this._endToken(n);
1938
- return;
1939
- } else this._attemptStr("//") && (i = !0);
2111
+ if (s === null)
2112
+ if (this._attemptStr(this._interpolationConfig.end)) {
2113
+ n.push(this._getProcessedChars(a, u)), n.push(this._interpolationConfig.end), this._endToken(n);
2114
+ return;
2115
+ } else
2116
+ this._attemptStr("//") && (i = !0);
1940
2117
  let o = this._cursor.peek();
1941
2118
  this._cursor.advance(), o === 92 ? this._cursor.advance() : o === s ? s = null : !i && s === null && ze(o) && (s = o);
1942
2119
  }
@@ -1953,14 +2130,16 @@ var Ge = class {
1953
2130
  let e = this._cursor.clone();
1954
2131
  e.advance();
1955
2132
  let t = e.peek();
1956
- if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33) return !0;
2133
+ if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33)
2134
+ return !0;
1957
2135
  }
1958
2136
  return !1;
1959
2137
  }
1960
2138
  _isBlockStart() {
1961
2139
  if (this._tokenizeBlocks && this._cursor.peek() === 64) {
1962
2140
  let e = this._cursor.clone();
1963
- if (e.advance(), sr(e.peek())) return !0;
2141
+ if (e.advance(), sr(e.peek()))
2142
+ return !0;
1964
2143
  }
1965
2144
  return !1;
1966
2145
  }
@@ -1978,7 +2157,8 @@ var Ge = class {
1978
2157
  return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 20;
1979
2158
  }
1980
2159
  isExpansionFormStart() {
1981
- if (this._cursor.peek() !== 123) return !1;
2160
+ if (this._cursor.peek() !== 123)
2161
+ return !1;
1982
2162
  if (this._interpolationConfig) {
1983
2163
  let e = this._cursor.clone(), t = this._attemptStr(this._interpolationConfig.start);
1984
2164
  return this._cursor = e, !t;
@@ -2039,7 +2219,8 @@ var on = class et {
2039
2219
  let n = t.state;
2040
2220
  this.state = { peek: n.peek, offset: n.offset, line: n.line, column: n.column };
2041
2221
  } else {
2042
- if (!r) throw new Error("Programming error: the range argument must be provided with a file argument.");
2222
+ if (!r)
2223
+ throw new Error("Programming error: the range argument must be provided with a file argument.");
2043
2224
  this.file = t, this.input = t.content, this.end = r.endPos, this.state = { peek: -1, offset: r.startPos, line: r.startLine, column: r.startCol };
2044
2225
  }
2045
2226
  }
@@ -2064,7 +2245,9 @@ var on = class et {
2064
2245
  getSpan(t, r) {
2065
2246
  t = t || this;
2066
2247
  let n = t;
2067
- if (r) for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1; ) n === t && (t = t.clone()), t.advance();
2248
+ if (r)
2249
+ for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1; )
2250
+ n === t && (t = t.clone()), t.advance();
2068
2251
  let a = this.locationFromCursor(t), s = this.locationFromCursor(this), i = n !== t ? this.locationFromCursor(n) : a;
2069
2252
  return new m(a, s, i);
2070
2253
  }
@@ -2075,7 +2258,8 @@ var on = class et {
2075
2258
  return this.input.charCodeAt(t);
2076
2259
  }
2077
2260
  advanceState(t) {
2078
- if (t.offset >= this.end) throw this.state = t, new _t('Unexpected character "EOF"', this);
2261
+ if (t.offset >= this.end)
2262
+ throw this.state = t, new _t('Unexpected character "EOF"', this);
2079
2263
  let r = this.charAt(t.offset);
2080
2264
  r === 10 ? (t.line++, t.column = 0) : bt(r) || t.column++, t.offset++, this.updatePeek(t);
2081
2265
  }
@@ -2100,39 +2284,52 @@ var on = class et {
2100
2284
  }
2101
2285
  getChars(t) {
2102
2286
  let r = t.clone(), n = "";
2103
- for (; r.internalState.offset < this.internalState.offset; ) n += String.fromCodePoint(r.peek()), r.advance();
2287
+ for (; r.internalState.offset < this.internalState.offset; )
2288
+ n += String.fromCodePoint(r.peek()), r.advance();
2104
2289
  return n;
2105
2290
  }
2106
2291
  processEscapeSequence() {
2107
2292
  let t = () => this.internalState.peek;
2108
- if (t() === 92) if (this.internalState = { ...this.state }, this.advanceState(this.internalState), t() === 110) this.state.peek = 10;
2109
- else if (t() === 114) this.state.peek = 13;
2110
- else if (t() === 118) this.state.peek = 11;
2111
- else if (t() === 116) this.state.peek = 9;
2112
- else if (t() === 98) this.state.peek = 8;
2113
- else if (t() === 102) this.state.peek = 12;
2114
- else if (t() === 117) if (this.advanceState(this.internalState), t() === 123) {
2115
- this.advanceState(this.internalState);
2116
- let r = this.clone(), n = 0;
2117
- for (; t() !== 125; ) this.advanceState(this.internalState), n++;
2118
- this.state.peek = this.decodeHexDigits(r, n);
2119
- } else {
2120
- let r = this.clone();
2121
- this.advanceState(this.internalState), this.advanceState(this.internalState), this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 4);
2122
- }
2123
- else if (t() === 120) {
2124
- this.advanceState(this.internalState);
2125
- let r = this.clone();
2126
- this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
2127
- } else if (Vt(t())) {
2128
- let r = "", n = 0, a = this.clone();
2129
- for (; Vt(t()) && n < 3; ) a = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++;
2130
- this.state.peek = parseInt(r, 8), this.internalState = a.internalState;
2131
- } else bt(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
2293
+ if (t() === 92)
2294
+ if (this.internalState = { ...this.state }, this.advanceState(this.internalState), t() === 110)
2295
+ this.state.peek = 10;
2296
+ else if (t() === 114)
2297
+ this.state.peek = 13;
2298
+ else if (t() === 118)
2299
+ this.state.peek = 11;
2300
+ else if (t() === 116)
2301
+ this.state.peek = 9;
2302
+ else if (t() === 98)
2303
+ this.state.peek = 8;
2304
+ else if (t() === 102)
2305
+ this.state.peek = 12;
2306
+ else if (t() === 117)
2307
+ if (this.advanceState(this.internalState), t() === 123) {
2308
+ this.advanceState(this.internalState);
2309
+ let r = this.clone(), n = 0;
2310
+ for (; t() !== 125; )
2311
+ this.advanceState(this.internalState), n++;
2312
+ this.state.peek = this.decodeHexDigits(r, n);
2313
+ } else {
2314
+ let r = this.clone();
2315
+ this.advanceState(this.internalState), this.advanceState(this.internalState), this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 4);
2316
+ }
2317
+ else if (t() === 120) {
2318
+ this.advanceState(this.internalState);
2319
+ let r = this.clone();
2320
+ this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2);
2321
+ } else if (Vt(t())) {
2322
+ let r = "", n = 0, a = this.clone();
2323
+ for (; Vt(t()) && n < 3; )
2324
+ a = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++;
2325
+ this.state.peek = parseInt(r, 8), this.internalState = a.internalState;
2326
+ } else
2327
+ bt(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek;
2132
2328
  }
2133
2329
  decodeHexDigits(t, r) {
2134
2330
  let n = this.input.slice(t.internalState.offset, t.internalState.offset + r), a = parseInt(n, 16);
2135
- if (isNaN(a)) throw t.state = t.internalState, new _t("Invalid hexadecimal escape sequence", t);
2331
+ if (isNaN(a))
2332
+ throw t.state = t.internalState, new _t("Invalid hexadecimal escape sequence", t);
2136
2333
  return a;
2137
2334
  }
2138
2335
  }, _t = class {
@@ -2166,8 +2363,10 @@ var on = class et {
2166
2363
  this.tokens = t, this.getTagDefinition = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = a, this.isTagNameCaseSensitive = s, this._index = -1, this._containerStack = [], this.rootNodes = [], this.errors = [], this._advance();
2167
2364
  }
2168
2365
  build() {
2169
- for (; this._peek.type !== 34; ) this._peek.type === 0 || this._peek.type === 4 ? this._consumeStartTag(this._advance()) : this._peek.type === 3 ? (this._closeVoidElement(), this._consumeEndTag(this._advance())) : this._peek.type === 12 ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === 10 ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === 5 || this._peek.type === 7 || this._peek.type === 6 ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === 20 ? this._consumeExpansion(this._advance()) : this._peek.type === 25 ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === 27 ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === 29 ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === 30 ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === 18 ? this._consumeDocType(this._advance()) : this._peek.type === 33 ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._advance();
2170
- for (let t of this._containerStack) t instanceof K && this.errors.push(B.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
2366
+ for (; this._peek.type !== 34; )
2367
+ this._peek.type === 0 || this._peek.type === 4 ? this._consumeStartTag(this._advance()) : this._peek.type === 3 ? (this._closeVoidElement(), this._consumeEndTag(this._advance())) : this._peek.type === 12 ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === 10 ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === 5 || this._peek.type === 7 || this._peek.type === 6 ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === 20 ? this._consumeExpansion(this._advance()) : this._peek.type === 25 ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === 27 ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === 29 ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === 30 ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === 18 ? this._consumeDocType(this._advance()) : this._peek.type === 33 ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._advance();
2368
+ for (let t of this._containerStack)
2369
+ t instanceof K && this.errors.push(B.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
2171
2370
  }
2172
2371
  _advance() {
2173
2372
  let t = this._peek;
@@ -2192,7 +2391,8 @@ var on = class et {
2192
2391
  let r = this._advance(), n = this._advance(), a = [];
2193
2392
  for (; this._peek.type === 21; ) {
2194
2393
  let i = this._parseExpansionCase();
2195
- if (!i) return;
2394
+ if (!i)
2395
+ return;
2196
2396
  a.push(i);
2197
2397
  }
2198
2398
  if (this._peek.type !== 24) {
@@ -2204,25 +2404,35 @@ var on = class et {
2204
2404
  }
2205
2405
  _parseExpansionCase() {
2206
2406
  let t = this._advance();
2207
- if (this._peek.type !== 22) return this.errors.push(B.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
2407
+ if (this._peek.type !== 22)
2408
+ return this.errors.push(B.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
2208
2409
  let r = this._advance(), n = this._collectExpansionExpTokens(r);
2209
- if (!n) return null;
2410
+ if (!n)
2411
+ return null;
2210
2412
  let a = this._advance();
2211
2413
  n.push({ type: 34, parts: [], sourceSpan: a.sourceSpan });
2212
2414
  let s = new cn(n, this.getTagDefinition, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive);
2213
- if (s.build(), s.errors.length > 0) return this.errors = this.errors.concat(s.errors), null;
2415
+ if (s.build(), s.errors.length > 0)
2416
+ return this.errors = this.errors.concat(s.errors), null;
2214
2417
  let i = new m(t.sourceSpan.start, a.sourceSpan.end, t.sourceSpan.fullStart), u = new m(r.sourceSpan.start, a.sourceSpan.end, r.sourceSpan.fullStart);
2215
2418
  return new wi(t.parts[0], s.rootNodes, i, t.sourceSpan, u);
2216
2419
  }
2217
2420
  _collectExpansionExpTokens(t) {
2218
2421
  let r = [], n = [22];
2219
2422
  for (; ; ) {
2220
- if ((this._peek.type === 20 || this._peek.type === 22) && n.push(this._peek.type), this._peek.type === 23) if (ur(n, 22)) {
2221
- if (n.pop(), n.length === 0) return r;
2222
- } else return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
2223
- if (this._peek.type === 24) if (ur(n, 20)) n.pop();
2224
- else return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
2225
- if (this._peek.type === 34) return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
2423
+ if ((this._peek.type === 20 || this._peek.type === 22) && n.push(this._peek.type), this._peek.type === 23)
2424
+ if (ur(n, 22)) {
2425
+ if (n.pop(), n.length === 0)
2426
+ return r;
2427
+ } else
2428
+ return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
2429
+ if (this._peek.type === 24)
2430
+ if (ur(n, 20))
2431
+ n.pop();
2432
+ else
2433
+ return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
2434
+ if (this._peek.type === 34)
2435
+ return this.errors.push(B.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
2226
2436
  r.push(this._advance());
2227
2437
  }
2228
2438
  }
@@ -2242,7 +2452,8 @@ var on = class et {
2242
2452
  let s = this._getContainer();
2243
2453
  s != null && s.children.length === 0 && this.getTagDefinition(s.name).ignoreFirstLf && (a = a.substring(1), r[0] = { type: t.type, sourceSpan: t.sourceSpan, parts: [a] });
2244
2454
  }
2245
- for (; this._peek.type === 8 || this._peek.type === 5 || this._peek.type === 9; ) t = this._advance(), r.push(t), t.type === 8 ? a += t.parts.join("").replace(/&([^;]+);/g, or) : t.type === 9 ? a += t.parts[0] : a += t.parts.join("");
2455
+ for (; this._peek.type === 8 || this._peek.type === 5 || this._peek.type === 9; )
2456
+ t = this._advance(), r.push(t), t.type === 8 ? a += t.parts.join("").replace(/&([^;]+);/g, or) : t.type === 9 ? a += t.parts[0] : a += t.parts.join("");
2246
2457
  if (a.length > 0) {
2247
2458
  let s = t.sourceSpan;
2248
2459
  this._addToParent(new yi(a, new m(n.start, s.end, n.fullStart, n.details), r));
@@ -2254,13 +2465,15 @@ var on = class et {
2254
2465
  }
2255
2466
  _consumeStartTag(t) {
2256
2467
  let [r, n] = t.parts, a = [];
2257
- for (; this._peek.type === 14; ) a.push(this._consumeAttr(this._advance()));
2468
+ for (; this._peek.type === 14; )
2469
+ a.push(this._consumeAttr(this._advance()));
2258
2470
  let s = this._getElementFullName(r, n, this._getClosestParentElement()), i = !1;
2259
2471
  if (this._peek.type === 2) {
2260
2472
  this._advance(), i = !0;
2261
2473
  let g = this.getTagDefinition(s);
2262
2474
  this.canSelfClose || g.canSelfClose || ke(s) !== null || g.isVoid || this.errors.push(B.create(s, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
2263
- } else this._peek.type === 1 && (this._advance(), i = !1);
2475
+ } else
2476
+ this._peek.type === 1 && (this._advance(), i = !1);
2264
2477
  let u = this._peek.sourceSpan.fullStart, o = new m(t.sourceSpan.start, u, t.sourceSpan.fullStart), p = new m(t.sourceSpan.start, u, t.sourceSpan.fullStart), l = new m(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), v = new V(s, a, [], o, p, void 0, l), d = this._getContainer();
2265
2478
  this._pushContainer(v, d instanceof V && this.getTagDefinition(d.name).isClosedByChild(v.name)), i ? this._popContainer(s, V, o) : t.type === 4 && (this._popContainer(s, V, null), this.errors.push(B.create(s, o, `Opening tag "${s}" not terminated.`)));
2266
2479
  }
@@ -2269,7 +2482,8 @@ var on = class et {
2269
2482
  }
2270
2483
  _consumeEndTag(t) {
2271
2484
  let r = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t.parts[0], t.parts[1], this._getClosestParentElement());
2272
- if (r && this.getTagDefinition(r).isVoid) this.errors.push(B.create(r, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
2485
+ if (r && this.getTagDefinition(r).isVoid)
2486
+ this.errors.push(B.create(r, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
2273
2487
  else if (!this._popContainer(r, V, t.sourceSpan)) {
2274
2488
  let n = `Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
2275
2489
  this.errors.push(B.create(r, t.sourceSpan, n));
@@ -2279,7 +2493,8 @@ var on = class et {
2279
2493
  let a = !1;
2280
2494
  for (let s = this._containerStack.length - 1; s >= 0; s--) {
2281
2495
  let i = this._containerStack[s];
2282
- if (ke(i.name) ? i.name === t : (t == null || i.name.toLowerCase() === t.toLowerCase()) && i instanceof r) return i.endSourceSpan = n, i.sourceSpan.end = n !== null ? n.end : i.sourceSpan.end, this._containerStack.splice(s, this._containerStack.length - s), !a;
2496
+ if (ke(i.name) ? i.name === t : (t == null || i.name.toLowerCase() === t.toLowerCase()) && i instanceof r)
2497
+ return i.endSourceSpan = n, i.sourceSpan.end = n !== null ? n.end : i.sourceSpan.end, this._containerStack.splice(s, this._containerStack.length - s), !a;
2283
2498
  (i instanceof K || i instanceof V && !this.getTagDefinition(i.name).closedByParent) && (a = !0);
2284
2499
  }
2285
2500
  return !1;
@@ -2288,10 +2503,11 @@ var on = class et {
2288
2503
  let r = Le(t.parts[0], t.parts[1]), n = t.sourceSpan.end, a;
2289
2504
  this._peek.type === 15 && (a = this._advance());
2290
2505
  let s = "", i = [], u, o;
2291
- if (this._peek.type === 16) for (u = this._peek.sourceSpan, o = this._peek.sourceSpan.end; this._peek.type === 16 || this._peek.type === 17 || this._peek.type === 9; ) {
2292
- let l = this._advance();
2293
- i.push(l), l.type === 17 ? s += l.parts.join("").replace(/&([^;]+);/g, or) : l.type === 9 ? s += l.parts[0] : s += l.parts.join(""), o = n = l.sourceSpan.end;
2294
- }
2506
+ if (this._peek.type === 16)
2507
+ for (u = this._peek.sourceSpan, o = this._peek.sourceSpan.end; this._peek.type === 16 || this._peek.type === 17 || this._peek.type === 9; ) {
2508
+ let l = this._advance();
2509
+ i.push(l), l.type === 17 ? s += l.parts.join("").replace(/&([^;]+);/g, or) : l.type === 9 ? s += l.parts[0] : s += l.parts.join(""), o = n = l.sourceSpan.end;
2510
+ }
2295
2511
  this._peek.type === 15 && (o = n = this._advance().sourceSpan.end);
2296
2512
  let p = u && o && new m(a?.sourceSpan.start ?? u.start, o, a?.sourceSpan.fullStart ?? u.fullStart);
2297
2513
  return new Ai(r, s, new m(t.sourceSpan.start, n, t.sourceSpan.fullStart), t.sourceSpan, p, i.length > 0 ? i : void 0, void 0);
@@ -2323,11 +2539,13 @@ var on = class et {
2323
2539
  if (this._peek.type !== 31) {
2324
2540
  this.errors.push(B.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`));
2325
2541
  return;
2326
- } else n = this._advance();
2542
+ } else
2543
+ n = this._advance();
2327
2544
  if (this._peek.type !== 32) {
2328
2545
  this.errors.push(B.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));
2329
2546
  return;
2330
- } else a = this._advance();
2547
+ } else
2548
+ a = this._advance();
2331
2549
  let s = a.sourceSpan.fullStart, i = new m(t.sourceSpan.start, s, t.sourceSpan.fullStart), u = t.sourceSpan.toString().lastIndexOf(r), o = t.sourceSpan.start.moveBy(u), p = new m(o, t.sourceSpan.end), l = new tr(r, n.parts[0], i, p, n.sourceSpan);
2332
2550
  this._addToParent(l);
2333
2551
  }
@@ -2343,7 +2561,9 @@ var on = class et {
2343
2561
  return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
2344
2562
  }
2345
2563
  _getClosestParentElement() {
2346
- for (let t = this._containerStack.length - 1; t > -1; t--) if (this._containerStack[t] instanceof V) return this._containerStack[t];
2564
+ for (let t = this._containerStack.length - 1; t > -1; t--)
2565
+ if (this._containerStack[t] instanceof V)
2566
+ return this._containerStack[t];
2347
2567
  return null;
2348
2568
  }
2349
2569
  _addToParent(t) {
@@ -2383,29 +2603,35 @@ function Xi(e, t) {
2383
2603
  var Ji = Xi, ie = 3;
2384
2604
  function Yi(e) {
2385
2605
  let t = e.slice(0, ie);
2386
- if (t !== "---" && t !== "+++") return;
2606
+ if (t !== "---" && t !== "+++")
2607
+ return;
2387
2608
  let r = e.indexOf(`
2388
2609
  `, ie);
2389
- if (r === -1) return;
2610
+ if (r === -1)
2611
+ return;
2390
2612
  let n = e.slice(ie, r).trim(), a = e.indexOf(`
2391
2613
  ${t}`, r), s = n;
2392
2614
  if (s || (s = t === "+++" ? "toml" : "yaml"), a === -1 && t === "---" && s === "yaml" && (a = e.indexOf(`
2393
- ...`, r)), a === -1) return;
2615
+ ...`, r)), a === -1)
2616
+ return;
2394
2617
  let i = a + 1 + ie, u = e.charAt(i + 1);
2395
- if (!/\s?/u.test(u)) return;
2618
+ if (!/\s?/u.test(u))
2619
+ return;
2396
2620
  let o = e.slice(0, i);
2397
2621
  return { type: "front-matter", language: s, explicitLanguage: n, value: e.slice(r + 1, a), startDelimiter: t, endDelimiter: o.slice(-ie), raw: o };
2398
2622
  }
2399
2623
  function Qi(e) {
2400
2624
  let t = Yi(e);
2401
- if (!t) return { content: e };
2625
+ if (!t)
2626
+ return { content: e };
2402
2627
  let { raw: r } = t;
2403
2628
  return { frontMatter: t, content: L(!1, r, /[^\n]/gu, " ") + e.slice(r.length) };
2404
2629
  }
2405
2630
  var Zi = Qi, Ae = { attrs: !0, children: !0, cases: !0, expression: !0 }, cr = /* @__PURE__ */ new Set(["parent"]), J, rt, nt, eu = class ue {
2406
2631
  constructor(t = {}) {
2407
2632
  fr(this, J), Et(this, "type"), Et(this, "parent");
2408
- for (let r of /* @__PURE__ */ new Set([...cr, ...Object.keys(t)])) this.setProperty(r, t[r]);
2633
+ for (let r of /* @__PURE__ */ new Set([...cr, ...Object.keys(t)]))
2634
+ this.setProperty(r, t[r]);
2409
2635
  }
2410
2636
  setProperty(t, r) {
2411
2637
  if (this[t] !== r) {
@@ -2425,13 +2651,17 @@ var Zi = Qi, Ae = { attrs: !0, children: !0, cases: !0, expression: !0 }, cr = /
2425
2651
  r !== a && (r || (r = new ue({ parent: this.parent })), r.setProperty(n, s));
2426
2652
  }
2427
2653
  }
2428
- if (r) for (let n in this) n in Ae || (r[n] = this[n]);
2654
+ if (r)
2655
+ for (let n in this)
2656
+ n in Ae || (r[n] = this[n]);
2429
2657
  return t(r || this);
2430
2658
  }
2431
2659
  walk(t) {
2432
2660
  for (let r in Ae) {
2433
2661
  let n = this[r];
2434
- if (n) for (let a = 0; a < n.length; a++) n[a].walk(t);
2662
+ if (n)
2663
+ for (let a = 0; a < n.length; a++)
2664
+ n[a].walk(t);
2435
2665
  }
2436
2666
  t(this);
2437
2667
  }
@@ -2498,10 +2728,12 @@ function ru(e, t) {
2498
2728
  }
2499
2729
  var nu = [{ regex: /^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su, parse: su }, { regex: /^\[if([^\]]*)\]><!$/u, parse: iu }, { regex: /^<!\s*\[endif\]$/u, parse: uu }];
2500
2730
  function au(e, t) {
2501
- if (e.value) for (let { regex: r, parse: n } of nu) {
2502
- let a = e.value.match(r);
2503
- if (a) return n(e, t, a);
2504
- }
2731
+ if (e.value)
2732
+ for (let { regex: r, parse: n } of nu) {
2733
+ let a = e.value.match(r);
2734
+ if (a)
2735
+ return n(e, t, a);
2736
+ }
2505
2737
  return null;
2506
2738
  }
2507
2739
  function su(e, t, r) {
@@ -2528,7 +2760,8 @@ function lu(e) {
2528
2760
  delete e.parameters;
2529
2761
  return;
2530
2762
  }
2531
- for (let t of e.parameters) t.type = "angularControlFlowBlockParameter";
2763
+ for (let t of e.parameters)
2764
+ t.type = "angularControlFlowBlockParameter";
2532
2765
  e.parameters = { type: "angularControlFlowBlockParameters", children: e.parameters, sourceSpan: new m(e.parameters[0].sourceSpan.start, de(!1, e.parameters, -1).sourceSpan.end) };
2533
2766
  }
2534
2767
  }
@@ -2541,11 +2774,13 @@ function pu(e) {
2541
2774
  function pn(e, t, r) {
2542
2775
  let { name: n, canSelfClose: a = !0, normalizeTagName: s = !1, normalizeAttributeName: i = !1, allowHtmComponentClosingTags: u = !1, isTagNameCaseSensitive: o = !1, shouldParseAsRawText: p } = t, { rootNodes: l, errors: v } = lr(e, { canSelfClose: a, allowHtmComponentClosingTags: u, isTagNameCaseSensitive: o, getTagContentType: p ? (...c) => p(...c) ? I.RAW_TEXT : void 0 : void 0, tokenizeAngularBlocks: n === "angular" ? !0 : void 0, tokenizeAngularLetDeclaration: n === "angular" ? !0 : void 0 });
2543
2776
  if (n === "vue") {
2544
- if (l.some((y) => y.type === "docType" && y.value === "html" || y.type === "element" && y.name.toLowerCase() === "html")) return pn(e, wt, r);
2777
+ if (l.some((y) => y.type === "docType" && y.value === "html" || y.type === "element" && y.name.toLowerCase() === "html"))
2778
+ return pn(e, wt, r);
2545
2779
  let c, f = () => c ?? (c = lr(e, { canSelfClose: a, allowHtmComponentClosingTags: u, isTagNameCaseSensitive: o })), A = (y) => f().rootNodes.find(({ startSourceSpan: T }) => T && T.start.offset === y.startSourceSpan.start.offset) ?? y;
2546
2780
  for (let [y, T] of l.entries()) {
2547
2781
  let { endSourceSpan: G, startSourceSpan: dn } = T;
2548
- if (G === null) v = f().errors, l[y] = A(T);
2782
+ if (G === null)
2783
+ v = f().errors, l[y] = A(T);
2549
2784
  else if (hu(T, r)) {
2550
2785
  let At = f().errors.find((kt) => kt.span.start.offset > dn.start.offset && kt.span.start.offset < G.end.offset);
2551
2786
  At && pr(At), l[y] = A(T);
@@ -2560,7 +2795,8 @@ function pn(e, t, r) {
2560
2795
  switch (c.type) {
2561
2796
  case "element":
2562
2797
  d(c);
2563
- for (let f of c.attrs) d(f), f.valueSpan ? (f.value = f.valueSpan.toString(), /["']/u.test(f.value[0]) && (f.value = f.value.slice(1, -1))) : f.value = null;
2798
+ for (let f of c.attrs)
2799
+ d(f), f.valueSpan ? (f.value = f.valueSpan.toString(), /["']/u.test(f.value[0]) && (f.value = f.value.slice(1, -1))) : f.value = null;
2564
2800
  break;
2565
2801
  case "comment":
2566
2802
  c.value = c.sourceSpan.toString().slice(4, -3);
@@ -2573,7 +2809,9 @@ function pn(e, t, r) {
2573
2809
  let A = c.toLowerCase();
2574
2810
  return f(A) ? A : c;
2575
2811
  }, w = (c) => {
2576
- if (c.type === "element" && (s && (!c.namespace || c.namespace === c.tagDefinition.implicitNamespacePrefix || pe(c)) && (c.name = C(c.name, (f) => ou.has(f))), i)) for (let f of c.attrs) f.namespace || (f.name = C(f.name, (A) => Xe.has(c.name) && (Xe.get("*").has(A) || Xe.get(c.name).has(A))));
2812
+ if (c.type === "element" && (s && (!c.namespace || c.namespace === c.tagDefinition.implicitNamespacePrefix || pe(c)) && (c.name = C(c.name, (f) => ou.has(f))), i))
2813
+ for (let f of c.attrs)
2814
+ f.namespace || (f.name = C(f.name, (A) => Xe.has(c.name) && (Xe.get("*").has(A) || Xe.get(c.name).has(A))));
2577
2815
  }, E = (c) => {
2578
2816
  c.sourceSpan && c.endSourceSpan && (c.sourceSpan = new m(c.sourceSpan.start, c.endSourceSpan.end));
2579
2817
  }, x = (c) => {
@@ -2595,7 +2833,8 @@ function pn(e, t, r) {
2595
2833
  }
2596
2834
  function hu(e, t) {
2597
2835
  var r;
2598
- if (e.type !== "element" || e.name !== "template") return !1;
2836
+ if (e.type !== "element" || e.name !== "template")
2837
+ return !1;
2599
2838
  let n = (r = e.attrs.find((a) => a.name === "lang")) == null ? void 0 : r.value;
2600
2839
  return !n || Pe(t, { language: n }) === "html";
2601
2840
  }