jaml-ui 4.1.1 → 4.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { JIMBO_ANIMATIONS as ga, JimboColorOption as pa, withAlpha as ya } from "./ui.js";
2
- import { jsxs as E, jsx as A, Fragment as Ve } from "react/jsx-runtime";
3
- import { useRef as Ae, useState as re, useEffect as ft, useCallback as ht, useMemo as $, Fragment as wn } from "react";
2
+ import { jsxs as b, jsx as A, Fragment as Ve } from "react/jsx-runtime";
3
+ import { useRef as Ae, useState as re, useEffect as ft, useCallback as ht, useMemo as q, Fragment as wn } from "react";
4
4
  import { f as T, b as vs, d as kt, e as Is, h as vt, C as Bs, E as Sn, a as Pt, R as Lt, c as jn, g as mt, S as Tn, T as ws, V as It, r as Te } from "./chunks/spriteMapper-BiDkbZrD.js";
5
5
  import { L as X } from "./chunks/Layer-B5y9UIAt.js";
6
6
  import { decodeMotelyItem as Pe, decodeMotelyItemToJamlCard as Mn } from "./motely.js";
@@ -17,7 +17,7 @@ function sn(n) {
17
17
  function rn(n, e, t, s, r) {
18
18
  if (!t || !s || !(s != null && s.pos)) return 0;
19
19
  const i = t.width / s.columns, a = t.height / s.rows, o = n.style;
20
- if (s.order === 0 && (n.width = i, n.height = a, o.width = `${i}px`, o.height = `${a}px`), o.imageRendering = "pixelated", e.imageSmoothingEnabled = !0, e.save(), s.animated && r) {
20
+ if (s.order === 0 && (n.width = i, n.height = a, o.width = "", o.height = ""), o.imageRendering = "pixelated", e.imageSmoothingEnabled = !0, e.save(), s.animated && r) {
21
21
  const l = r, c = Math.sin(l / 1e3) * 3, f = Math.sin(l / 1500) * 1.5;
22
22
  e.globalAlpha = 0.65 + (Math.sin(l / 2e3) + 1) * 0.075, e.translate(f, c);
23
23
  }
@@ -38,104 +38,104 @@ function Js({
38
38
  invert: e = !1,
39
39
  hoverTilt: t = !1
40
40
  }) {
41
- const s = Ae(null), r = Ae(null), i = Ae(/* @__PURE__ */ new Map()), [a, o] = re(3 / 4), [, l] = re(0), c = Ae(null), f = Ae({ rx: 0, ry: 0, rz: 0 }), u = Ae({ rx: 0, ry: 0, rz: 0 }), g = n == null ? void 0 : n.some((C) => C.animated);
41
+ const s = Ae(null), r = Ae(null), i = Ae(/* @__PURE__ */ new Map()), [a, o] = re(3 / 4), [, l] = re(0), c = Ae(null), f = Ae({ rx: 0, ry: 0, rz: 0 }), u = Ae({ rx: 0, ry: 0, rz: 0 }), m = n == null ? void 0 : n.some((E) => E.animated);
42
42
  ft(() => {
43
- let C = !1;
44
- const Q = i.current;
43
+ let E = !1;
44
+ const p = i.current;
45
45
  return (async () => {
46
- const B = Array.from(new Set(Object.values(T).map((k) => k.src))), I = await Promise.all(B.map((k) => sn(k)));
47
- C || (I.forEach((k, S) => {
48
- k && Q.set(B[S], k);
49
- }), l((k) => k + 1));
46
+ const B = Array.from(new Set(Object.values(T).map((v) => v.src))), I = await Promise.all(B.map((v) => sn(v)));
47
+ E || (I.forEach((v, S) => {
48
+ v && p.set(B[S], v);
49
+ }), l((v) => v + 1));
50
50
  })().catch((B) => console.error("[JamlCardRenderer]", B)), () => {
51
- C = !0, Q.clear();
51
+ E = !0, p.clear();
52
52
  };
53
53
  }, []), ft(() => {
54
- const C = s.current;
55
- if (!C || !n || n.length === 0) return;
56
- const Q = C.getContext("2d");
57
- if (!Q) return;
58
- let v = !1, B = null, I;
59
- const k = (S) => {
60
- Q.clearRect(0, 0, C.width, C.height), [...n].sort((j, J) => j.order - J.order).forEach((j) => {
54
+ const E = s.current;
55
+ if (!E || !n || n.length === 0) return;
56
+ const p = E.getContext("2d");
57
+ if (!p) return;
58
+ let k = !1, B = null, I;
59
+ const v = (S) => {
60
+ p.clearRect(0, 0, E.width, E.height), [...n].sort((j, J) => j.order - J.order).forEach((j) => {
61
61
  const J = i.current.get(j.source);
62
62
  if (J) {
63
- const R = rn(C, Q, J, j, g ? S : void 0);
63
+ const R = rn(E, p, J, j, m ? S : void 0);
64
64
  j.order === 0 && o(R);
65
65
  return;
66
66
  }
67
67
  sn(j.source).then((R) => {
68
- if (!(v || !R)) {
69
- if (i.current.set(j.source, R), !g) {
70
- const H = rn(C, Q, R, j);
68
+ if (!(k || !R)) {
69
+ if (i.current.set(j.source, R), !m) {
70
+ const H = rn(E, p, R, j);
71
71
  j.order === 0 && o(H);
72
72
  }
73
73
  l((H) => H + 1);
74
74
  }
75
75
  });
76
- }), C.style.filter = e ? "invert(0.94)" : "none";
76
+ }), E.style.filter = e ? "invert(0.94)" : "none";
77
77
  };
78
- if (g) {
78
+ if (m) {
79
79
  const S = (j) => {
80
- v || (I === void 0 && (I = j), k(j - I), B = requestAnimationFrame(S));
80
+ k || (I === void 0 && (I = j), v(j - I), B = requestAnimationFrame(S));
81
81
  };
82
82
  B = requestAnimationFrame(S);
83
83
  } else
84
- k();
84
+ v();
85
85
  return () => {
86
- v = !0, B !== null && cancelAnimationFrame(B);
86
+ k = !0, B !== null && cancelAnimationFrame(B);
87
87
  };
88
- }, [n, e, g]);
88
+ }, [n, e, m]);
89
89
  const h = ht(() => {
90
90
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
91
- }, []), p = ht(() => {
92
- const C = s.current;
93
- if (!C) return;
94
- const Q = u.current;
95
- C.style.transform = `rotateX(${Q.rx}deg) rotateY(${Q.ry}deg) rotateZ(${Q.rz}deg)`;
91
+ }, []), y = ht(() => {
92
+ const E = s.current;
93
+ if (!E) return;
94
+ const p = u.current;
95
+ E.style.transform = `rotateX(${p.rx}deg) rotateY(${p.ry}deg) rotateZ(${p.rz}deg)`;
96
96
  }, []), d = ht(
97
- (C, Q) => {
97
+ (E, p) => {
98
98
  h();
99
- let v = performance.now();
99
+ let k = performance.now();
100
100
  const B = (I) => {
101
- const k = Math.min(0.05, (I - v) / 1e3);
102
- v = I;
103
- const S = f.current, j = u.current, J = 1 - Math.exp(-C * k);
104
- if (j.rx += (S.rx - j.rx) * J, j.ry += (S.ry - j.ry) * J, j.rz += (S.rz - j.rz) * J, p(), Math.abs(S.rx - j.rx) < 0.02 && Math.abs(S.ry - j.ry) < 0.02 && Math.abs(S.rz - j.rz) < 0.02) {
105
- j.rx = S.rx, j.ry = S.ry, j.rz = S.rz, p(), c.current = null, Q == null || Q();
101
+ const v = Math.min(0.05, (I - k) / 1e3);
102
+ k = I;
103
+ const S = f.current, j = u.current, J = 1 - Math.exp(-E * v);
104
+ if (j.rx += (S.rx - j.rx) * J, j.ry += (S.ry - j.ry) * J, j.rz += (S.rz - j.rz) * J, y(), Math.abs(S.rx - j.rx) < 0.02 && Math.abs(S.ry - j.ry) < 0.02 && Math.abs(S.rz - j.rz) < 0.02) {
105
+ j.rx = S.rx, j.ry = S.ry, j.rz = S.rz, y(), c.current = null, p == null || p();
106
106
  return;
107
107
  }
108
108
  c.current = requestAnimationFrame(B);
109
109
  };
110
110
  c.current = requestAnimationFrame(B);
111
111
  },
112
- [h, p]
112
+ [h, y]
113
113
  );
114
114
  return ft(() => () => h(), [h]), {
115
115
  canvasRef: s,
116
116
  containerRef: r,
117
117
  ratio: a,
118
118
  handlers: {
119
- onPointerEnter: t ? (C) => {
120
- var Q;
121
- !t || C.pointerType === "touch" || ((Q = r.current) == null || Q.setAttribute("data-hovered", "true"), d(22));
119
+ onPointerEnter: t ? (E) => {
120
+ var p;
121
+ !t || E.pointerType === "touch" || ((p = r.current) == null || p.setAttribute("data-hovered", "true"), d(22));
122
122
  } : void 0,
123
123
  onPointerLeave: t ? () => {
124
- var C;
125
- t && ((C = r.current) == null || C.setAttribute("data-hovered", "false"), f.current = { rx: 0, ry: 0, rz: 0 }, d(14, () => {
126
- const Q = s.current;
127
- Q && (Q.style.transform = "");
124
+ var E;
125
+ t && ((E = r.current) == null || E.setAttribute("data-hovered", "false"), f.current = { rx: 0, ry: 0, rz: 0 }, d(14, () => {
126
+ const p = s.current;
127
+ p && (p.style.transform = "");
128
128
  }));
129
129
  } : void 0,
130
- onPointerMove: t ? (C) => {
131
- var I, k;
132
- if (!t || C.pointerType === "touch") return;
133
- const Q = C.currentTarget.getBoundingClientRect(), v = Math.max(-1, Math.min(1, ((C.clientX - Q.left) / Q.width - 0.5) * 2)), B = Math.max(-1, Math.min(1, ((C.clientY - Q.top) / Q.height - 0.5) * 2));
130
+ onPointerMove: t ? (E) => {
131
+ var I, v;
132
+ if (!t || E.pointerType === "touch") return;
133
+ const p = E.currentTarget.getBoundingClientRect(), k = Math.max(-1, Math.min(1, ((E.clientX - p.left) / p.width - 0.5) * 2)), B = Math.max(-1, Math.min(1, ((E.clientY - p.top) / p.height - 0.5) * 2));
134
134
  f.current = {
135
135
  rx: B * -10,
136
- ry: v * 12,
137
- rz: v * B * -1.2
138
- }, (I = r.current) == null || I.style.setProperty("--j-card-glare-x", `${(v + 1) * 50}%`), (k = r.current) == null || k.style.setProperty("--j-card-glare-y", `${(1 - B) * 50}%`), d(22);
136
+ ry: k * 12,
137
+ rz: k * B * -1.2
138
+ }, (I = r.current) == null || I.style.setProperty("--j-card-glare-x", `${(k + 1) * 50}%`), (v = r.current) == null || v.style.setProperty("--j-card-glare-y", `${(1 - B) * 50}%`), d(22);
139
139
  } : void 0
140
140
  }
141
141
  };
@@ -146,7 +146,7 @@ function tt({ layers: n, invert: e = !1, className: t = "", hoverTilt: s = !1 })
146
146
  invert: e,
147
147
  hoverTilt: s
148
148
  });
149
- return /* @__PURE__ */ E(
149
+ return /* @__PURE__ */ b(
150
150
  "div",
151
151
  {
152
152
  ref: i,
@@ -308,40 +308,40 @@ function Ki(n, e = 1) {
308
308
  } : s ?? { kind: "unknown", label: t };
309
309
  }
310
310
  function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
311
- const { name: r, edition: i, isEternal: a, isPerishable: o, isRental: l, rank: c, suit: f, enhancements: u, seal: g, scale: h = 1 } = n, p = [];
311
+ const { name: r, edition: i, isEternal: a, isPerishable: o, isRental: l, rank: c, suit: f, enhancements: u, seal: m, scale: h = 1 } = n, y = [];
312
312
  if (e === "joker") {
313
- const d = kt.find((b) => b.name === r);
314
- d && p.push(new X({ ...d, source: T.jokers.src, order: 0, columns: T.jokers.columns, rows: T.jokers.rows }));
315
- const m = Is.find((b) => b.name === r);
316
- m && p.push(new X({ ...m, source: T.jokers.src, order: 1, columns: T.jokers.columns, rows: T.jokers.rows }));
313
+ const d = kt.find((C) => C.name === r);
314
+ d && y.push(new X({ ...d, source: T.jokers.src, order: 0, columns: T.jokers.columns, rows: T.jokers.rows }));
315
+ const g = Is.find((C) => C.name === r);
316
+ g && y.push(new X({ ...g, source: T.jokers.src, order: 1, columns: T.jokers.columns, rows: T.jokers.rows }));
317
317
  } else if (e === "consumable") {
318
- const d = vt.find((b) => b.name === r);
319
- d && p.push(new X({ ...d, order: 0, source: T.tarots.src, rows: T.tarots.rows, columns: T.tarots.columns }));
320
- const m = Bs.find((b) => b.name === r);
321
- m && p.push(
318
+ const d = vt.find((C) => C.name === r);
319
+ d && y.push(new X({ ...d, order: 0, source: T.tarots.src, rows: T.tarots.rows, columns: T.tarots.columns }));
320
+ const g = Bs.find((C) => C.name === r);
321
+ g && y.push(
322
322
  new X({
323
- ...m,
323
+ ...g,
324
324
  order: 1,
325
325
  source: T.enhancers.src,
326
326
  rows: T.enhancers.rows,
327
327
  columns: T.enhancers.columns,
328
- animated: m.animated
328
+ animated: g.animated
329
329
  })
330
330
  );
331
331
  } else {
332
332
  const d = c && f ? { rank: c, suit: f } : Bt(r);
333
333
  if (d) {
334
- const m = (u ?? []).map((b) => Sn[b]).find((b) => !!b) ?? { x: 1, y: 0 };
335
- p.push(
334
+ const g = (u ?? []).map((C) => Sn[C]).find((C) => !!C) ?? { x: 1, y: 0 };
335
+ y.push(
336
336
  new X({
337
- pos: m,
337
+ pos: g,
338
338
  name: "background",
339
339
  order: 0,
340
340
  source: T.enhancers.src,
341
341
  rows: T.enhancers.rows,
342
342
  columns: T.enhancers.columns
343
343
  })
344
- ), p.push(
344
+ ), y.push(
345
345
  new X({
346
346
  pos: { x: Lt[d.rank] ?? 0, y: Pt[d.suit] ?? 0 },
347
347
  name: r,
@@ -355,7 +355,7 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
355
355
  }
356
356
  if (i) {
357
357
  const d = jn[i];
358
- d !== void 0 && p.push(
358
+ d !== void 0 && y.push(
359
359
  new X({
360
360
  pos: { x: d, y: 0 },
361
361
  name: i,
@@ -366,7 +366,7 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
366
366
  })
367
367
  );
368
368
  }
369
- if (a && p.push(
369
+ if (a && y.push(
370
370
  new X({
371
371
  pos: mt.Eternal,
372
372
  name: "Eternal",
@@ -375,7 +375,7 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
375
375
  rows: T.stickers.rows,
376
376
  columns: T.stickers.columns
377
377
  })
378
- ), o && p.push(
378
+ ), o && y.push(
379
379
  new X({
380
380
  pos: mt.Perishable,
381
381
  name: "Perishable",
@@ -384,7 +384,7 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
384
384
  rows: T.stickers.rows,
385
385
  columns: T.stickers.columns
386
386
  })
387
- ), l && p.push(
387
+ ), l && y.push(
388
388
  new X({
389
389
  pos: mt.Rental,
390
390
  name: "Rental",
@@ -393,12 +393,12 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
393
393
  rows: T.stickers.rows,
394
394
  columns: T.stickers.columns
395
395
  })
396
- ), g) {
397
- const d = Tn[g];
398
- d && p.push(
396
+ ), m) {
397
+ const d = Tn[m];
398
+ d && y.push(
399
399
  new X({
400
400
  pos: d,
401
- name: g,
401
+ name: m,
402
402
  order: 6,
403
403
  source: T.enhancers.src,
404
404
  rows: T.enhancers.rows,
@@ -406,7 +406,7 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
406
406
  })
407
407
  );
408
408
  }
409
- return /* @__PURE__ */ A("div", { className: `j-game-card ${t}`.trim(), style: { "--j-card-width": `${71 * h}px` }, children: /* @__PURE__ */ A(tt, { invert: i === "Negative", layers: p, hoverTilt: s }) });
409
+ return /* @__PURE__ */ A("div", { className: `j-game-card ${t}`.trim(), style: { "--j-card-width": `${71 * h}px` }, children: /* @__PURE__ */ A(tt, { invert: i === "Negative", layers: y, hoverTilt: s }) });
410
410
  }
411
411
  function On({ voucherName: n, scale: e = 1, className: t = "", hoverTilt: s = !1 }) {
412
412
  const r = It.find((a) => a.name === n);
@@ -506,20 +506,20 @@ function xs({
506
506
  size: o = 71,
507
507
  style: l
508
508
  }) {
509
- const c = (!e || !n) && t ? Ds(t) : null, f = e ?? (c == null ? void 0 : c.rank), u = n ?? (c == null ? void 0 : c.suit), g = f ? Lt[f] : void 0, h = u ? Pt[u] : void 0;
510
- if (g === void 0 || h === void 0)
509
+ const c = (!e || !n) && t ? Ds(t) : null, f = e ?? (c == null ? void 0 : c.rank), u = n ?? (c == null ? void 0 : c.suit), m = f ? Lt[f] : void 0, h = u ? Pt[u] : void 0;
510
+ if (m === void 0 || h === void 0)
511
511
  return console.warn(`Invalid card: ${f} of ${u}`), null;
512
- const p = o / ie, d = o * (Be / ie), m = -g * ie, b = -h * Be, y = { x: 1, y: 0 }, C = s ? Sn[s] ?? y : y, Q = r ? Tn[r] ?? null : null, v = i ? jn[i] : void 0, B = i === ln.Negative, I = B ? "invert(0.94)" : "none", k = Te("enhancers"), S = Te("deck"), j = Te("editions"), J = {
512
+ const y = o / ie, d = o * (Be / ie), g = -m * ie, C = -h * Be, Q = { x: 1, y: 0 }, E = s ? Sn[s] ?? Q : Q, p = r ? Tn[r] ?? null : null, k = i ? jn[i] : void 0, B = i === ln.Negative, I = B ? "invert(0.94)" : "none", v = Te("enhancers"), S = Te("deck"), j = Te("editions"), J = {
513
513
  position: "absolute",
514
514
  top: 0,
515
515
  left: 0,
516
516
  width: ie,
517
517
  height: Be,
518
- transform: `scale(${p})`,
518
+ transform: `scale(${y})`,
519
519
  transformOrigin: "top left",
520
520
  backgroundRepeat: "no-repeat"
521
521
  };
522
- return /* @__PURE__ */ E(
522
+ return /* @__PURE__ */ b(
523
523
  "div",
524
524
  {
525
525
  className: a,
@@ -541,8 +541,8 @@ function xs({
541
541
  style: {
542
542
  ...J,
543
543
  zIndex: 0,
544
- backgroundImage: `url(${k})`,
545
- backgroundPosition: `${-C.x * ie}px ${-C.y * Be}px`
544
+ backgroundImage: `url(${v})`,
545
+ backgroundPosition: `${-E.x * ie}px ${-E.y * Be}px`
546
546
  }
547
547
  }
548
548
  ),
@@ -553,12 +553,12 @@ function xs({
553
553
  ...J,
554
554
  zIndex: 1,
555
555
  backgroundImage: `url(${S})`,
556
- backgroundPosition: `${m}px ${b}px`,
556
+ backgroundPosition: `${g}px ${C}px`,
557
557
  filter: I
558
558
  }
559
559
  }
560
560
  ),
561
- i && i !== ln.Negative && v !== void 0 && /* @__PURE__ */ A(
561
+ i && i !== ln.Negative && k !== void 0 && /* @__PURE__ */ A(
562
562
  "div",
563
563
  {
564
564
  style: {
@@ -567,18 +567,18 @@ function xs({
567
567
  mixBlendMode: "screen",
568
568
  opacity: 0.6,
569
569
  backgroundImage: `url(${j})`,
570
- backgroundPosition: `${-v * ie}px 0px`
570
+ backgroundPosition: `${-k * ie}px 0px`
571
571
  }
572
572
  }
573
573
  ),
574
- Q && /* @__PURE__ */ A(
574
+ p && /* @__PURE__ */ A(
575
575
  "div",
576
576
  {
577
577
  style: {
578
578
  ...J,
579
579
  zIndex: 3,
580
- backgroundImage: `url(${k})`,
581
- backgroundPosition: `${-Q.x * ie}px ${-Q.y * Be}px`
580
+ backgroundImage: `url(${v})`,
581
+ backgroundPosition: `${-p.x * ie}px ${-p.y * Be}px`
582
582
  }
583
583
  }
584
584
  ),
@@ -599,7 +599,7 @@ function xs({
599
599
  }
600
600
  );
601
601
  }
602
- const zt = Symbol.for("yaml.alias"), wt = Symbol.for("yaml.document"), se = Symbol.for("yaml.map"), Jn = Symbol.for("yaml.pair"), q = Symbol.for("yaml.scalar"), be = Symbol.for("yaml.seq"), W = Symbol.for("yaml.node.type"), Ee = (n) => !!n && typeof n == "object" && n[W] === zt, nt = (n) => !!n && typeof n == "object" && n[W] === wt, Le = (n) => !!n && typeof n == "object" && n[W] === se, z = (n) => !!n && typeof n == "object" && n[W] === Jn, O = (n) => !!n && typeof n == "object" && n[W] === q, ze = (n) => !!n && typeof n == "object" && n[W] === be;
602
+ const zt = Symbol.for("yaml.alias"), wt = Symbol.for("yaml.document"), se = Symbol.for("yaml.map"), Jn = Symbol.for("yaml.pair"), $ = Symbol.for("yaml.scalar"), be = Symbol.for("yaml.seq"), W = Symbol.for("yaml.node.type"), Ee = (n) => !!n && typeof n == "object" && n[W] === zt, nt = (n) => !!n && typeof n == "object" && n[W] === wt, Le = (n) => !!n && typeof n == "object" && n[W] === se, z = (n) => !!n && typeof n == "object" && n[W] === Jn, O = (n) => !!n && typeof n == "object" && n[W] === $, ze = (n) => !!n && typeof n == "object" && n[W] === be;
603
603
  function P(n) {
604
604
  if (n && typeof n == "object")
605
605
  switch (n[W]) {
@@ -614,7 +614,7 @@ function L(n) {
614
614
  switch (n[W]) {
615
615
  case zt:
616
616
  case se:
617
- case q:
617
+ case $:
618
618
  case be:
619
619
  return !0;
620
620
  }
@@ -1017,7 +1017,7 @@ function We(n, e, t) {
1017
1017
  const Hn = (n) => !n || typeof n != "function" && typeof n != "object";
1018
1018
  class M extends Rt {
1019
1019
  constructor(e) {
1020
- super(q), this.value = e;
1020
+ super($), this.value = e;
1021
1021
  }
1022
1022
  toJSON(e, t) {
1023
1023
  return t != null && t.keep ? this.value : V(this.value, e, t);
@@ -1045,12 +1045,12 @@ function Ks(n, e, t) {
1045
1045
  });
1046
1046
  }
1047
1047
  function Oe(n, e, t) {
1048
- var u, g, h;
1048
+ var u, m, h;
1049
1049
  if (nt(n) && (n = n.contents), L(n))
1050
1050
  return n;
1051
1051
  if (z(n)) {
1052
- const p = (g = (u = t.schema[se]).createNode) == null ? void 0 : g.call(u, t.schema, null, t);
1053
- return p.items.push(n), p;
1052
+ const y = (m = (u = t.schema[se]).createNode) == null ? void 0 : m.call(u, t.schema, null, t);
1053
+ return y.items.push(n), y;
1054
1054
  }
1055
1055
  (n instanceof String || n instanceof Number || n instanceof Boolean || typeof BigInt < "u" && n instanceof BigInt) && (n = n.valueOf());
1056
1056
  const { aliasDuplicateObjects: s, onAnchor: r, onTagObj: i, schema: a, sourceObjects: o } = t;
@@ -1064,8 +1064,8 @@ function Oe(n, e, t) {
1064
1064
  let c = Ks(n, e, a.tags);
1065
1065
  if (!c) {
1066
1066
  if (n && typeof n.toJSON == "function" && (n = n.toJSON()), !n || typeof n != "object") {
1067
- const p = new M(n);
1068
- return l && (l.node = p), p;
1067
+ const y = new M(n);
1068
+ return l && (l.node = y), y;
1069
1069
  }
1070
1070
  c = n instanceof Map ? a[se] : Symbol.iterator in Object(n) ? a[be] : a[se];
1071
1071
  }
@@ -1207,11 +1207,11 @@ function st(n, e, t = "flow", { indentAtStart: s, lineWidth: r = 80, minContentW
1207
1207
  const c = [], f = {};
1208
1208
  let u = r - e.length;
1209
1209
  typeof s == "number" && (s > r - Math.max(2, i) ? c.push(0) : u = r - s);
1210
- let g, h, p = !1, d = -1, m = -1, b = -1;
1210
+ let m, h, y = !1, d = -1, g = -1, C = -1;
1211
1211
  t === St && (d = cn(n, d, e.length), d !== -1 && (u = d + l));
1212
- for (let C; C = n[d += 1]; ) {
1213
- if (t === Ue && C === "\\") {
1214
- switch (m = d, n[d + 1]) {
1212
+ for (let E; E = n[d += 1]; ) {
1213
+ if (t === Ue && E === "\\") {
1214
+ switch (g = d, n[d + 1]) {
1215
1215
  case "x":
1216
1216
  d += 3;
1217
1217
  break;
@@ -1224,44 +1224,44 @@ function st(n, e, t = "flow", { indentAtStart: s, lineWidth: r = 80, minContentW
1224
1224
  default:
1225
1225
  d += 1;
1226
1226
  }
1227
- b = d;
1227
+ C = d;
1228
1228
  }
1229
- if (C === `
1229
+ if (E === `
1230
1230
  `)
1231
- t === St && (d = cn(n, d, e.length)), u = d + e.length + l, g = void 0;
1231
+ t === St && (d = cn(n, d, e.length)), u = d + e.length + l, m = void 0;
1232
1232
  else {
1233
- if (C === " " && h && h !== " " && h !== `
1233
+ if (E === " " && h && h !== " " && h !== `
1234
1234
  ` && h !== " ") {
1235
- const Q = n[d + 1];
1236
- Q && Q !== " " && Q !== `
1237
- ` && Q !== " " && (g = d);
1235
+ const p = n[d + 1];
1236
+ p && p !== " " && p !== `
1237
+ ` && p !== " " && (m = d);
1238
1238
  }
1239
1239
  if (d >= u)
1240
- if (g)
1241
- c.push(g), u = g + l, g = void 0;
1240
+ if (m)
1241
+ c.push(m), u = m + l, m = void 0;
1242
1242
  else if (t === Ue) {
1243
1243
  for (; h === " " || h === " "; )
1244
- h = C, C = n[d += 1], p = !0;
1245
- const Q = d > b + 1 ? d - 2 : m - 1;
1246
- if (f[Q])
1244
+ h = E, E = n[d += 1], y = !0;
1245
+ const p = d > C + 1 ? d - 2 : g - 1;
1246
+ if (f[p])
1247
1247
  return n;
1248
- c.push(Q), f[Q] = !0, u = Q + l, g = void 0;
1248
+ c.push(p), f[p] = !0, u = p + l, m = void 0;
1249
1249
  } else
1250
- p = !0;
1250
+ y = !0;
1251
1251
  }
1252
- h = C;
1252
+ h = E;
1253
1253
  }
1254
- if (p && o && o(), c.length === 0)
1254
+ if (y && o && o(), c.length === 0)
1255
1255
  return n;
1256
1256
  a && a();
1257
- let y = n.slice(0, c[0]);
1258
- for (let C = 0; C < c.length; ++C) {
1259
- const Q = c[C], v = c[C + 1] || n.length;
1260
- Q === 0 ? y = `
1261
- ${e}${n.slice(0, v)}` : (t === Ue && f[Q] && (y += `${n[Q]}\\`), y += `
1262
- ${e}${n.slice(Q + 1, v)}`);
1257
+ let Q = n.slice(0, c[0]);
1258
+ for (let E = 0; E < c.length; ++E) {
1259
+ const p = c[E], k = c[E + 1] || n.length;
1260
+ p === 0 ? Q = `
1261
+ ${e}${n.slice(0, k)}` : (t === Ue && f[p] && (Q += `${n[p]}\\`), Q += `
1262
+ ${e}${n.slice(p + 1, k)}`);
1263
1263
  }
1264
- return y;
1264
+ return Q;
1265
1265
  }
1266
1266
  function cn(n, e, t) {
1267
1267
  let s = e, r = e + 1, i = n[r];
@@ -1396,47 +1396,47 @@ function Fe({ comment: n, type: e, value: t }, s, r, i) {
1396
1396
  return f ? `|
1397
1397
  ` : `>
1398
1398
  `;
1399
- let u, g;
1400
- for (g = t.length; g > 0; --g) {
1401
- const v = t[g - 1];
1402
- if (v !== `
1403
- ` && v !== " " && v !== " ")
1399
+ let u, m;
1400
+ for (m = t.length; m > 0; --m) {
1401
+ const k = t[m - 1];
1402
+ if (k !== `
1403
+ ` && k !== " " && k !== " ")
1404
1404
  break;
1405
1405
  }
1406
- let h = t.substring(g);
1407
- const p = h.indexOf(`
1406
+ let h = t.substring(m);
1407
+ const y = h.indexOf(`
1408
1408
  `);
1409
- p === -1 ? u = "-" : t === h || p !== h.length - 1 ? (u = "+", i && i()) : u = "", h && (t = t.slice(0, -h.length), h[h.length - 1] === `
1409
+ y === -1 ? u = "-" : t === h || y !== h.length - 1 ? (u = "+", i && i()) : u = "", h && (t = t.slice(0, -h.length), h[h.length - 1] === `
1410
1410
  ` && (h = h.slice(0, -1)), h = h.replace(Tt, `$&${c}`));
1411
- let d = !1, m, b = -1;
1412
- for (m = 0; m < t.length; ++m) {
1413
- const v = t[m];
1414
- if (v === " ")
1411
+ let d = !1, g, C = -1;
1412
+ for (g = 0; g < t.length; ++g) {
1413
+ const k = t[g];
1414
+ if (k === " ")
1415
1415
  d = !0;
1416
- else if (v === `
1416
+ else if (k === `
1417
1417
  `)
1418
- b = m;
1418
+ C = g;
1419
1419
  else
1420
1420
  break;
1421
1421
  }
1422
- let y = t.substring(0, b < m ? b + 1 : m);
1423
- y && (t = t.substring(y.length), y = y.replace(/\n+/g, `$&${c}`));
1424
- let Q = (d ? c ? "2" : "1" : "") + u;
1425
- if (n && (Q += " " + o(n.replace(/ ?[\r\n]+/g, " ")), r && r()), !f) {
1426
- const v = t.replace(/\n+/g, `
1422
+ let Q = t.substring(0, C < g ? C + 1 : g);
1423
+ Q && (t = t.substring(Q.length), Q = Q.replace(/\n+/g, `$&${c}`));
1424
+ let p = (d ? c ? "2" : "1" : "") + u;
1425
+ if (n && (p += " " + o(n.replace(/ ?[\r\n]+/g, " ")), r && r()), !f) {
1426
+ const k = t.replace(/\n+/g, `
1427
1427
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
1428
1428
  let B = !1;
1429
1429
  const I = rt(s, !0);
1430
1430
  a !== "folded" && e !== M.BLOCK_FOLDED && (I.onOverflow = () => {
1431
1431
  B = !0;
1432
1432
  });
1433
- const k = st(`${y}${v}${h}`, c, St, I);
1433
+ const v = st(`${Q}${k}${h}`, c, St, I);
1434
1434
  if (!B)
1435
- return `>${Q}
1436
- ${c}${k}`;
1435
+ return `>${p}
1436
+ ${c}${v}`;
1437
1437
  }
1438
- return t = t.replace(/\n+/g, `$&${c}`), `|${Q}
1439
- ${c}${y}${t}${h}`;
1438
+ return t = t.replace(/\n+/g, `$&${c}`), `|${p}
1439
+ ${c}${Q}${t}${h}`;
1440
1440
  }
1441
1441
  function _s(n, e, t, s) {
1442
1442
  const { type: r, value: i } = n, { actualString: a, implicitKey: o, indent: l, indentStep: c, inFlow: f } = e;
@@ -1458,11 +1458,11 @@ function _s(n, e, t, s) {
1458
1458
  const u = i.replace(/\n+/g, `$&
1459
1459
  ${l}`);
1460
1460
  if (a) {
1461
- const g = (d) => {
1462
- var m;
1463
- return d.default && d.tag !== "tag:yaml.org,2002:str" && ((m = d.test) == null ? void 0 : m.test(u));
1464
- }, { compat: h, tags: p } = e.doc.schema;
1465
- if (p.some(g) || h != null && h.some(g))
1461
+ const m = (d) => {
1462
+ var g;
1463
+ return d.default && d.tag !== "tag:yaml.org,2002:str" && ((g = d.test) == null ? void 0 : g.test(u));
1464
+ }, { compat: h, tags: y } = e.doc.schema;
1465
+ if (y.some(m) || h != null && h.some(m))
1466
1466
  return me(i, e);
1467
1467
  }
1468
1468
  return o ? u : st(u, l, xn, rt(e, !1));
@@ -1488,9 +1488,9 @@ function Dt(n, e, t, s) {
1488
1488
  };
1489
1489
  let c = l(o);
1490
1490
  if (c === null) {
1491
- const { defaultKeyType: f, defaultStringType: u } = e.options, g = r && f || u;
1492
- if (c = l(g), c === null)
1493
- throw new Error(`Unsupported default string type ${g}`);
1491
+ const { defaultKeyType: f, defaultStringType: u } = e.options, m = r && f || u;
1492
+ if (c = l(m), c === null)
1493
+ throw new Error(`Unsupported default string type ${m}`);
1494
1494
  }
1495
1495
  return c;
1496
1496
  }
@@ -1593,66 +1593,66 @@ ${e.indent}${o}` : o;
1593
1593
  }
1594
1594
  function nr({ key: n, value: e }, t, s, r) {
1595
1595
  const { allNullValues: i, doc: a, indent: o, indentStep: l, options: { commentString: c, indentSeq: f, simpleKeys: u } } = t;
1596
- let g = L(n) && n.comment || null;
1596
+ let m = L(n) && n.comment || null;
1597
1597
  if (u) {
1598
- if (g)
1598
+ if (m)
1599
1599
  throw new Error("With simple keys, key nodes cannot have comments");
1600
1600
  if (P(n) || !L(n) && typeof n == "object") {
1601
1601
  const I = "With simple keys, collection cannot be used as a key value";
1602
1602
  throw new Error(I);
1603
1603
  }
1604
1604
  }
1605
- let h = !u && (!n || g && e == null && !t.inFlow || P(n) || (O(n) ? n.type === M.BLOCK_FOLDED || n.type === M.BLOCK_LITERAL : typeof n == "object"));
1605
+ let h = !u && (!n || m && e == null && !t.inFlow || P(n) || (O(n) ? n.type === M.BLOCK_FOLDED || n.type === M.BLOCK_LITERAL : typeof n == "object"));
1606
1606
  t = Object.assign({}, t, {
1607
1607
  allNullValues: !1,
1608
1608
  implicitKey: !h && (u || !i),
1609
1609
  indent: o + l
1610
1610
  });
1611
- let p = !1, d = !1, m = ye(n, t, () => p = !0, () => d = !0);
1612
- if (!h && !t.inFlow && m.length > 1024) {
1611
+ let y = !1, d = !1, g = ye(n, t, () => y = !0, () => d = !0);
1612
+ if (!h && !t.inFlow && g.length > 1024) {
1613
1613
  if (u)
1614
1614
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1615
1615
  h = !0;
1616
1616
  }
1617
1617
  if (t.inFlow) {
1618
1618
  if (i || e == null)
1619
- return p && s && s(), m === "" ? "?" : h ? `? ${m}` : m;
1619
+ return y && s && s(), g === "" ? "?" : h ? `? ${g}` : g;
1620
1620
  } else if (i && !u || e == null && h)
1621
- return m = `? ${m}`, g && !p ? m += oe(m, t.indent, c(g)) : d && r && r(), m;
1622
- p && (g = null), h ? (g && (m += oe(m, t.indent, c(g))), m = `? ${m}
1623
- ${o}:`) : (m = `${m}:`, g && (m += oe(m, t.indent, c(g))));
1624
- let b, y, C;
1625
- L(e) ? (b = !!e.spaceBefore, y = e.commentBefore, C = e.comment) : (b = !1, y = null, C = null, e && typeof e == "object" && (e = a.createNode(e))), t.implicitKey = !1, !h && !g && O(e) && (t.indentAtStart = m.length + 1), d = !1, !f && l.length >= 2 && !t.inFlow && !h && ze(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1626
- let Q = !1;
1627
- const v = ye(e, t, () => Q = !0, () => d = !0);
1621
+ return g = `? ${g}`, m && !y ? g += oe(g, t.indent, c(m)) : d && r && r(), g;
1622
+ y && (m = null), h ? (m && (g += oe(g, t.indent, c(m))), g = `? ${g}
1623
+ ${o}:`) : (g = `${g}:`, m && (g += oe(g, t.indent, c(m))));
1624
+ let C, Q, E;
1625
+ L(e) ? (C = !!e.spaceBefore, Q = e.commentBefore, E = e.comment) : (C = !1, Q = null, E = null, e && typeof e == "object" && (e = a.createNode(e))), t.implicitKey = !1, !h && !m && O(e) && (t.indentAtStart = g.length + 1), d = !1, !f && l.length >= 2 && !t.inFlow && !h && ze(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1626
+ let p = !1;
1627
+ const k = ye(e, t, () => p = !0, () => d = !0);
1628
1628
  let B = " ";
1629
- if (g || b || y) {
1630
- if (B = b ? `
1631
- ` : "", y) {
1632
- const I = c(y);
1629
+ if (m || C || Q) {
1630
+ if (B = C ? `
1631
+ ` : "", Q) {
1632
+ const I = c(Q);
1633
1633
  B += `
1634
1634
  ${ee(I, t.indent)}`;
1635
1635
  }
1636
- v === "" && !t.inFlow ? B === `
1637
- ` && C && (B = `
1636
+ k === "" && !t.inFlow ? B === `
1637
+ ` && E && (B = `
1638
1638
 
1639
1639
  `) : B += `
1640
1640
  ${t.indent}`;
1641
1641
  } else if (!h && P(e)) {
1642
- const I = v[0], k = v.indexOf(`
1643
- `), S = k !== -1, j = t.inFlow ?? e.flow ?? e.items.length === 0;
1642
+ const I = k[0], v = k.indexOf(`
1643
+ `), S = v !== -1, j = t.inFlow ?? e.flow ?? e.items.length === 0;
1644
1644
  if (S || !j) {
1645
1645
  let J = !1;
1646
1646
  if (S && (I === "&" || I === "!")) {
1647
- let R = v.indexOf(" ");
1648
- I === "&" && R !== -1 && R < k && v[R + 1] === "!" && (R = v.indexOf(" ", R + 1)), (R === -1 || k < R) && (J = !0);
1647
+ let R = k.indexOf(" ");
1648
+ I === "&" && R !== -1 && R < v && k[R + 1] === "!" && (R = k.indexOf(" ", R + 1)), (R === -1 || v < R) && (J = !0);
1649
1649
  }
1650
1650
  J || (B = `
1651
1651
  ${t.indent}`);
1652
1652
  }
1653
- } else (v === "" || v[0] === `
1653
+ } else (k === "" || k[0] === `
1654
1654
  `) && (B = "");
1655
- return m += B + v, t.inFlow ? Q && s && s() : C && !Q ? m += oe(m, t.indent, c(C)) : d && r && r(), m;
1655
+ return g += B + k, t.inFlow ? p && s && s() : E && !p ? g += oe(g, t.indent, c(E)) : d && r && r(), g;
1656
1656
  }
1657
1657
  function Zn(n, e) {
1658
1658
  (n === "debug" || n === "warn") && console.warn(e);
@@ -1764,27 +1764,27 @@ function Wn(n, e, t) {
1764
1764
  function ir({ comment: n, items: e }, t, { blockItemPrefix: s, flowChars: r, itemIndent: i, onChompKeep: a, onComment: o }) {
1765
1765
  const { indent: l, options: { commentString: c } } = t, f = Object.assign({}, t, { indent: i, type: null });
1766
1766
  let u = !1;
1767
- const g = [];
1768
- for (let p = 0; p < e.length; ++p) {
1769
- const d = e[p];
1770
- let m = null;
1767
+ const m = [];
1768
+ for (let y = 0; y < e.length; ++y) {
1769
+ const d = e[y];
1770
+ let g = null;
1771
1771
  if (L(d))
1772
- !u && d.spaceBefore && g.push(""), qe(t, g, d.commentBefore, u), d.comment && (m = d.comment);
1772
+ !u && d.spaceBefore && m.push(""), qe(t, m, d.commentBefore, u), d.comment && (g = d.comment);
1773
1773
  else if (z(d)) {
1774
- const y = L(d.key) ? d.key : null;
1775
- y && (!u && y.spaceBefore && g.push(""), qe(t, g, y.commentBefore, u));
1774
+ const Q = L(d.key) ? d.key : null;
1775
+ Q && (!u && Q.spaceBefore && m.push(""), qe(t, m, Q.commentBefore, u));
1776
1776
  }
1777
1777
  u = !1;
1778
- let b = ye(d, f, () => m = null, () => u = !0);
1779
- m && (b += oe(b, i, c(m))), u && m && (u = !1), g.push(s + b);
1778
+ let C = ye(d, f, () => g = null, () => u = !0);
1779
+ g && (C += oe(C, i, c(g))), u && g && (u = !1), m.push(s + C);
1780
1780
  }
1781
1781
  let h;
1782
- if (g.length === 0)
1782
+ if (m.length === 0)
1783
1783
  h = r.start + r.end;
1784
1784
  else {
1785
- h = g[0];
1786
- for (let p = 1; p < g.length; ++p) {
1787
- const d = g[p];
1785
+ h = m[0];
1786
+ for (let y = 1; y < m.length; ++y) {
1787
+ const d = m[y];
1788
1788
  h += d ? `
1789
1789
  ${l}${d}` : `
1790
1790
  `;
@@ -1803,39 +1803,39 @@ function ar({ items: n }, e, { flowChars: t, itemIndent: s }) {
1803
1803
  });
1804
1804
  let c = !1, f = 0;
1805
1805
  const u = [];
1806
- for (let p = 0; p < n.length; ++p) {
1807
- const d = n[p];
1808
- let m = null;
1806
+ for (let y = 0; y < n.length; ++y) {
1807
+ const d = n[y];
1808
+ let g = null;
1809
1809
  if (L(d))
1810
- d.spaceBefore && u.push(""), qe(e, u, d.commentBefore, !1), d.comment && (m = d.comment);
1810
+ d.spaceBefore && u.push(""), qe(e, u, d.commentBefore, !1), d.comment && (g = d.comment);
1811
1811
  else if (z(d)) {
1812
- const y = L(d.key) ? d.key : null;
1813
- y && (y.spaceBefore && u.push(""), qe(e, u, y.commentBefore, !1), y.comment && (c = !0));
1814
- const C = L(d.value) ? d.value : null;
1815
- C ? (C.comment && (m = C.comment), C.commentBefore && (c = !0)) : d.value == null && (y != null && y.comment) && (m = y.comment);
1812
+ const Q = L(d.key) ? d.key : null;
1813
+ Q && (Q.spaceBefore && u.push(""), qe(e, u, Q.commentBefore, !1), Q.comment && (c = !0));
1814
+ const E = L(d.value) ? d.value : null;
1815
+ E ? (E.comment && (g = E.comment), E.commentBefore && (c = !0)) : d.value == null && (Q != null && Q.comment) && (g = Q.comment);
1816
1816
  }
1817
- m && (c = !0);
1818
- let b = ye(d, l, () => m = null);
1819
- c || (c = u.length > f || b.includes(`
1820
- `)), p < n.length - 1 ? b += "," : e.options.trailingComma && (e.options.lineWidth > 0 && (c || (c = u.reduce((y, C) => y + C.length + 2, 2) + (b.length + 2) > e.options.lineWidth)), c && (b += ",")), m && (b += oe(b, s, o(m))), u.push(b), f = u.length;
1817
+ g && (c = !0);
1818
+ let C = ye(d, l, () => g = null);
1819
+ c || (c = u.length > f || C.includes(`
1820
+ `)), y < n.length - 1 ? C += "," : e.options.trailingComma && (e.options.lineWidth > 0 && (c || (c = u.reduce((Q, E) => Q + E.length + 2, 2) + (C.length + 2) > e.options.lineWidth)), c && (C += ",")), g && (C += oe(C, s, o(g))), u.push(C), f = u.length;
1821
1821
  }
1822
- const { start: g, end: h } = t;
1822
+ const { start: m, end: h } = t;
1823
1823
  if (u.length === 0)
1824
- return g + h;
1824
+ return m + h;
1825
1825
  if (!c) {
1826
- const p = u.reduce((d, m) => d + m.length + 2, 2);
1827
- c = e.options.lineWidth > 0 && p > e.options.lineWidth;
1826
+ const y = u.reduce((d, g) => d + g.length + 2, 2);
1827
+ c = e.options.lineWidth > 0 && y > e.options.lineWidth;
1828
1828
  }
1829
1829
  if (c) {
1830
- let p = g;
1830
+ let y = m;
1831
1831
  for (const d of u)
1832
- p += d ? `
1832
+ y += d ? `
1833
1833
  ${i}${r}${d}` : `
1834
1834
  `;
1835
- return `${p}
1835
+ return `${y}
1836
1836
  ${r}${h}`;
1837
1837
  } else
1838
- return `${g}${a}${u.join(" ")}${a}${h}`;
1838
+ return `${m}${a}${u.join(" ")}${a}${h}`;
1839
1839
  }
1840
1840
  function qe({ indent: n, options: { commentString: e } }, t, s, r) {
1841
1841
  if (s && r && (s = s.replace(/^\n+/, "")), s) {
@@ -2249,8 +2249,8 @@ const Xe = ({ value: n }) => JSON.stringify(n), lr = [
2249
2249
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
2250
2250
  if (e ?? (e = M.BLOCK_LITERAL), e !== M.QUOTE_DOUBLE) {
2251
2251
  const l = Math.max(s.options.lineWidth - s.indent.length, s.options.minContentWidth), c = Math.ceil(o.length / l), f = new Array(c);
2252
- for (let u = 0, g = 0; u < c; ++u, g += l)
2253
- f[u] = o.substr(g, l);
2252
+ for (let u = 0, m = 0; u < c; ++u, m += l)
2253
+ f[u] = o.substr(m, l);
2254
2254
  o = f.join(e === M.BLOCK_LITERAL ? `
2255
2255
  ` : " ");
2256
2256
  }
@@ -2657,7 +2657,7 @@ function pt(n, e, t) {
2657
2657
  const Cr = (n, e) => n.key < e.key ? -1 : n.key > e.key ? 1 : 0;
2658
2658
  class Kt {
2659
2659
  constructor({ compat: e, customTags: t, merge: s, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
2660
- this.compat = Array.isArray(e) ? pt(e, "compat") : e ? pt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? yr : {}, this.tags = pt(t, this.name, s), this.toStringOptions = o ?? null, Object.defineProperty(this, se, { value: ke }), Object.defineProperty(this, q, { value: at }), Object.defineProperty(this, be, { value: ve }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Cr : null;
2660
+ this.compat = Array.isArray(e) ? pt(e, "compat") : e ? pt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? yr : {}, this.tags = pt(t, this.name, s), this.toStringOptions = o ?? null, Object.defineProperty(this, se, { value: ke }), Object.defineProperty(this, $, { value: at }), Object.defineProperty(this, be, { value: ve }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Cr : null;
2661
2661
  }
2662
2662
  clone() {
2663
2663
  const e = Object.create(Kt.prototype, Object.getOwnPropertyDescriptors(this));
@@ -2768,14 +2768,14 @@ class dt {
2768
2768
  if (typeof t == "function")
2769
2769
  e = t.call({ "": e }, "", e), r = t;
2770
2770
  else if (Array.isArray(t)) {
2771
- const m = (y) => typeof y == "number" || y instanceof String || y instanceof Number, b = t.filter(m).map(String);
2772
- b.length > 0 && (t = t.concat(b)), r = t;
2771
+ const g = (Q) => typeof Q == "number" || Q instanceof String || Q instanceof Number, C = t.filter(g).map(String);
2772
+ C.length > 0 && (t = t.concat(C)), r = t;
2773
2773
  } else s === void 0 && t && (s = t, t = void 0);
2774
- const { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: l, onTagObj: c, tag: f } = s ?? {}, { onAnchor: u, setAnchors: g, sourceObjects: h } = Us(
2774
+ const { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: l, onTagObj: c, tag: f } = s ?? {}, { onAnchor: u, setAnchors: m, sourceObjects: h } = Us(
2775
2775
  this,
2776
2776
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2777
2777
  a || "a"
2778
- ), p = {
2778
+ ), y = {
2779
2779
  aliasDuplicateObjects: i ?? !0,
2780
2780
  keepUndefined: l ?? !1,
2781
2781
  onAnchor: u,
@@ -2783,8 +2783,8 @@ class dt {
2783
2783
  replacer: r,
2784
2784
  schema: this.schema,
2785
2785
  sourceObjects: h
2786
- }, d = Oe(e, f, p);
2787
- return o && P(d) && (d.flow = !0), g(), d;
2786
+ }, d = Oe(e, f, y);
2787
+ return o && P(d) && (d.flow = !0), m(), d;
2788
2788
  }
2789
2789
  /**
2790
2790
  * Convert a key and a value into a `Pair` using the current schema,
@@ -2967,52 +2967,52 @@ ${c}
2967
2967
  }
2968
2968
  };
2969
2969
  function Ce(n, { flow: e, indicator: t, next: s, offset: r, onError: i, parentIndent: a, startOnNewline: o }) {
2970
- let l = !1, c = o, f = o, u = "", g = "", h = !1, p = !1, d = null, m = null, b = null, y = null, C = null, Q = null, v = null;
2971
- for (const k of n)
2972
- switch (p && (k.type !== "space" && k.type !== "newline" && k.type !== "comma" && i(k.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), p = !1), d && (c && k.type !== "comment" && k.type !== "newline" && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), d = null), k.type) {
2970
+ let l = !1, c = o, f = o, u = "", m = "", h = !1, y = !1, d = null, g = null, C = null, Q = null, E = null, p = null, k = null;
2971
+ for (const v of n)
2972
+ switch (y && (v.type !== "space" && v.type !== "newline" && v.type !== "comma" && i(v.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), d && (c && v.type !== "comment" && v.type !== "newline" && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), d = null), v.type) {
2973
2973
  case "space":
2974
- !e && (t !== "doc-start" || (s == null ? void 0 : s.type) !== "flow-collection") && k.source.includes(" ") && (d = k), f = !0;
2974
+ !e && (t !== "doc-start" || (s == null ? void 0 : s.type) !== "flow-collection") && v.source.includes(" ") && (d = v), f = !0;
2975
2975
  break;
2976
2976
  case "comment": {
2977
- f || i(k, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2978
- const S = k.source.substring(1) || " ";
2979
- u ? u += g + S : u = S, g = "", c = !1;
2977
+ f || i(v, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2978
+ const S = v.source.substring(1) || " ";
2979
+ u ? u += m + S : u = S, m = "", c = !1;
2980
2980
  break;
2981
2981
  }
2982
2982
  case "newline":
2983
- c ? u ? u += k.source : (!Q || t !== "seq-item-ind") && (l = !0) : g += k.source, c = !0, h = !0, (m || b) && (y = k), f = !0;
2983
+ c ? u ? u += v.source : (!p || t !== "seq-item-ind") && (l = !0) : m += v.source, c = !0, h = !0, (g || C) && (Q = v), f = !0;
2984
2984
  break;
2985
2985
  case "anchor":
2986
- m && i(k, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), k.source.endsWith(":") && i(k.offset + k.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), m = k, v ?? (v = k.offset), c = !1, f = !1, p = !0;
2986
+ g && i(v, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), v.source.endsWith(":") && i(v.offset + v.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), g = v, k ?? (k = v.offset), c = !1, f = !1, y = !0;
2987
2987
  break;
2988
2988
  case "tag": {
2989
- b && i(k, "MULTIPLE_TAGS", "A node can have at most one tag"), b = k, v ?? (v = k.offset), c = !1, f = !1, p = !0;
2989
+ C && i(v, "MULTIPLE_TAGS", "A node can have at most one tag"), C = v, k ?? (k = v.offset), c = !1, f = !1, y = !0;
2990
2990
  break;
2991
2991
  }
2992
2992
  case t:
2993
- (m || b) && i(k, "BAD_PROP_ORDER", `Anchors and tags must be after the ${k.source} indicator`), Q && i(k, "UNEXPECTED_TOKEN", `Unexpected ${k.source} in ${e ?? "collection"}`), Q = k, c = t === "seq-item-ind" || t === "explicit-key-ind", f = !1;
2993
+ (g || C) && i(v, "BAD_PROP_ORDER", `Anchors and tags must be after the ${v.source} indicator`), p && i(v, "UNEXPECTED_TOKEN", `Unexpected ${v.source} in ${e ?? "collection"}`), p = v, c = t === "seq-item-ind" || t === "explicit-key-ind", f = !1;
2994
2994
  break;
2995
2995
  case "comma":
2996
2996
  if (e) {
2997
- C && i(k, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), C = k, c = !1, f = !1;
2997
+ E && i(v, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), E = v, c = !1, f = !1;
2998
2998
  break;
2999
2999
  }
3000
3000
  // else fallthrough
3001
3001
  default:
3002
- i(k, "UNEXPECTED_TOKEN", `Unexpected ${k.type} token`), c = !1, f = !1;
3002
+ i(v, "UNEXPECTED_TOKEN", `Unexpected ${v.type} token`), c = !1, f = !1;
3003
3003
  }
3004
3004
  const B = n[n.length - 1], I = B ? B.offset + B.source.length : r;
3005
- return p && s && s.type !== "space" && s.type !== "newline" && s.type !== "comma" && (s.type !== "scalar" || s.source !== "") && i(s.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), d && (c && d.indent <= a || (s == null ? void 0 : s.type) === "block-map" || (s == null ? void 0 : s.type) === "block-seq") && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
3006
- comma: C,
3007
- found: Q,
3005
+ return y && s && s.type !== "space" && s.type !== "newline" && s.type !== "comma" && (s.type !== "scalar" || s.source !== "") && i(s.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), d && (c && d.indent <= a || (s == null ? void 0 : s.type) === "block-map" || (s == null ? void 0 : s.type) === "block-seq") && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
3006
+ comma: E,
3007
+ found: p,
3008
3008
  spaceBefore: l,
3009
3009
  comment: u,
3010
3010
  hasNewline: h,
3011
- anchor: m,
3012
- tag: b,
3013
- newlineAfterProp: y,
3011
+ anchor: g,
3012
+ tag: C,
3013
+ newlineAfterProp: Q,
3014
3014
  end: I,
3015
- start: v ?? I
3015
+ start: k ?? I
3016
3016
  };
3017
3017
  }
3018
3018
  function Je(n) {
@@ -3070,44 +3070,44 @@ function Qr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3070
3070
  t.atRoot && (t.atRoot = !1);
3071
3071
  let l = s.offset, c = null;
3072
3072
  for (const u of s.items) {
3073
- const { start: g, key: h, sep: p, value: d } = u, m = Ce(g, {
3073
+ const { start: m, key: h, sep: y, value: d } = u, g = Ce(m, {
3074
3074
  indicator: "explicit-key-ind",
3075
- next: h ?? (p == null ? void 0 : p[0]),
3075
+ next: h ?? (y == null ? void 0 : y[0]),
3076
3076
  offset: l,
3077
3077
  onError: r,
3078
3078
  parentIndent: s.indent,
3079
3079
  startOnNewline: !0
3080
- }), b = !m.found;
3081
- if (b) {
3082
- if (h && (h.type === "block-seq" ? r(l, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in h && h.indent !== s.indent && r(l, "BAD_INDENT", mn)), !m.anchor && !m.tag && !p) {
3083
- c = m.end, m.comment && (o.comment ? o.comment += `
3084
- ` + m.comment : o.comment = m.comment);
3080
+ }), C = !g.found;
3081
+ if (C) {
3082
+ if (h && (h.type === "block-seq" ? r(l, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in h && h.indent !== s.indent && r(l, "BAD_INDENT", mn)), !g.anchor && !g.tag && !y) {
3083
+ c = g.end, g.comment && (o.comment ? o.comment += `
3084
+ ` + g.comment : o.comment = g.comment);
3085
3085
  continue;
3086
3086
  }
3087
- (m.newlineAfterProp || Je(h)) && r(h ?? g[g.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
3088
- } else ((f = m.found) == null ? void 0 : f.indent) !== s.indent && r(l, "BAD_INDENT", mn);
3087
+ (g.newlineAfterProp || Je(h)) && r(h ?? m[m.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
3088
+ } else ((f = g.found) == null ? void 0 : f.indent) !== s.indent && r(l, "BAD_INDENT", mn);
3089
3089
  t.atKey = !0;
3090
- const y = m.end, C = h ? n(t, h, m, r) : e(t, y, g, null, m, r);
3091
- t.schema.compat && Mt(s.indent, h, r), t.atKey = !1, As(t, o.items, C) && r(y, "DUPLICATE_KEY", "Map keys must be unique");
3092
- const Q = Ce(p ?? [], {
3090
+ const Q = g.end, E = h ? n(t, h, g, r) : e(t, Q, m, null, g, r);
3091
+ t.schema.compat && Mt(s.indent, h, r), t.atKey = !1, As(t, o.items, E) && r(Q, "DUPLICATE_KEY", "Map keys must be unique");
3092
+ const p = Ce(y ?? [], {
3093
3093
  indicator: "map-value-ind",
3094
3094
  next: d,
3095
- offset: C.range[2],
3095
+ offset: E.range[2],
3096
3096
  onError: r,
3097
3097
  parentIndent: s.indent,
3098
3098
  startOnNewline: !h || h.type === "block-scalar"
3099
3099
  });
3100
- if (l = Q.end, Q.found) {
3101
- b && ((d == null ? void 0 : d.type) === "block-map" && !Q.hasNewline && r(l, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && m.start < Q.found.offset - 1024 && r(C.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
3102
- const v = d ? n(t, d, Q, r) : e(t, l, p, null, Q, r);
3103
- t.schema.compat && Mt(s.indent, d, r), l = v.range[2];
3104
- const B = new x(C, v);
3100
+ if (l = p.end, p.found) {
3101
+ C && ((d == null ? void 0 : d.type) === "block-map" && !p.hasNewline && r(l, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && g.start < p.found.offset - 1024 && r(E.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
3102
+ const k = d ? n(t, d, p, r) : e(t, l, y, null, p, r);
3103
+ t.schema.compat && Mt(s.indent, d, r), l = k.range[2];
3104
+ const B = new x(E, k);
3105
3105
  t.options.keepSourceTokens && (B.srcToken = u), o.items.push(B);
3106
3106
  } else {
3107
- b && r(C.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), Q.comment && (C.comment ? C.comment += `
3108
- ` + Q.comment : C.comment = Q.comment);
3109
- const v = new x(C);
3110
- t.options.keepSourceTokens && (v.srcToken = u), o.items.push(v);
3107
+ C && r(E.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), p.comment && (E.comment ? E.comment += `
3108
+ ` + p.comment : E.comment = p.comment);
3109
+ const k = new x(E);
3110
+ t.options.keepSourceTokens && (k.srcToken = u), o.items.push(k);
3111
3111
  }
3112
3112
  }
3113
3113
  return c && c < l && r(c, "IMPOSSIBLE", "Map comment with trailing content"), o.range = [s.offset, l, c ?? l], o;
@@ -3117,7 +3117,7 @@ function kr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3117
3117
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
3118
3118
  let l = s.offset, c = null;
3119
3119
  for (const { start: f, value: u } of s.items) {
3120
- const g = Ce(f, {
3120
+ const m = Ce(f, {
3121
3121
  indicator: "seq-item-ind",
3122
3122
  next: u,
3123
3123
  offset: l,
@@ -3125,14 +3125,14 @@ function kr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3125
3125
  parentIndent: s.indent,
3126
3126
  startOnNewline: !0
3127
3127
  });
3128
- if (!g.found)
3129
- if (g.anchor || g.tag || u)
3130
- (u == null ? void 0 : u.type) === "block-seq" ? r(g.end, "BAD_INDENT", "All sequence items must start at the same column") : r(l, "MISSING_CHAR", "Sequence item without - indicator");
3128
+ if (!m.found)
3129
+ if (m.anchor || m.tag || u)
3130
+ (u == null ? void 0 : u.type) === "block-seq" ? r(m.end, "BAD_INDENT", "All sequence items must start at the same column") : r(l, "MISSING_CHAR", "Sequence item without - indicator");
3131
3131
  else {
3132
- c = g.end, g.comment && (o.comment = g.comment);
3132
+ c = m.end, m.comment && (o.comment = m.comment);
3133
3133
  continue;
3134
3134
  }
3135
- const h = u ? n(t, u, g, r) : e(t, g.end, f, null, g, r);
3135
+ const h = u ? n(t, u, m, r) : e(t, m.end, f, null, m, r);
3136
3136
  t.schema.compat && Mt(s.indent, u, r), l = h.range[2], o.items.push(h);
3137
3137
  }
3138
3138
  return o.range = [s.offset, l, c ?? l], o;
@@ -3166,64 +3166,64 @@ function He(n, e, t, s) {
3166
3166
  }
3167
3167
  const yt = "Block collections are not allowed within flow collections", Ct = (n) => n && (n.type === "block-map" || n.type === "block-seq");
3168
3168
  function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3169
- var m;
3169
+ var g;
3170
3170
  const a = s.start.source === "{", o = a ? "flow map" : "flow sequence", l = (i == null ? void 0 : i.nodeClass) ?? (a ? Y : ce), c = new l(t.schema);
3171
3171
  c.flow = !0;
3172
3172
  const f = t.atRoot;
3173
3173
  f && (t.atRoot = !1), t.atKey && (t.atKey = !1);
3174
3174
  let u = s.offset + s.start.source.length;
3175
- for (let b = 0; b < s.items.length; ++b) {
3176
- const y = s.items[b], { start: C, key: Q, sep: v, value: B } = y, I = Ce(C, {
3175
+ for (let C = 0; C < s.items.length; ++C) {
3176
+ const Q = s.items[C], { start: E, key: p, sep: k, value: B } = Q, I = Ce(E, {
3177
3177
  flow: o,
3178
3178
  indicator: "explicit-key-ind",
3179
- next: Q ?? (v == null ? void 0 : v[0]),
3179
+ next: p ?? (k == null ? void 0 : k[0]),
3180
3180
  offset: u,
3181
3181
  onError: r,
3182
3182
  parentIndent: s.indent,
3183
3183
  startOnNewline: !1
3184
3184
  });
3185
3185
  if (!I.found) {
3186
- if (!I.anchor && !I.tag && !v && !B) {
3187
- b === 0 && I.comma ? r(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`) : b < s.items.length - 1 && r(I.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${o}`), I.comment && (c.comment ? c.comment += `
3186
+ if (!I.anchor && !I.tag && !k && !B) {
3187
+ C === 0 && I.comma ? r(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`) : C < s.items.length - 1 && r(I.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${o}`), I.comment && (c.comment ? c.comment += `
3188
3188
  ` + I.comment : c.comment = I.comment), u = I.end;
3189
3189
  continue;
3190
3190
  }
3191
- !a && t.options.strict && Je(Q) && r(
3192
- Q,
3191
+ !a && t.options.strict && Je(p) && r(
3192
+ p,
3193
3193
  // checked by containsNewline()
3194
3194
  "MULTILINE_IMPLICIT_KEY",
3195
3195
  "Implicit keys of flow sequence pairs need to be on a single line"
3196
3196
  );
3197
3197
  }
3198
- if (b === 0)
3198
+ if (C === 0)
3199
3199
  I.comma && r(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`);
3200
3200
  else if (I.comma || r(I.start, "MISSING_CHAR", `Missing , between ${o} items`), I.comment) {
3201
- let k = "";
3202
- e: for (const S of C)
3201
+ let v = "";
3202
+ e: for (const S of E)
3203
3203
  switch (S.type) {
3204
3204
  case "comma":
3205
3205
  case "space":
3206
3206
  break;
3207
3207
  case "comment":
3208
- k = S.source.substring(1);
3208
+ v = S.source.substring(1);
3209
3209
  break e;
3210
3210
  default:
3211
3211
  break e;
3212
3212
  }
3213
- if (k) {
3213
+ if (v) {
3214
3214
  let S = c.items[c.items.length - 1];
3215
3215
  z(S) && (S = S.value ?? S.key), S.comment ? S.comment += `
3216
- ` + k : S.comment = k, I.comment = I.comment.substring(k.length + 1);
3216
+ ` + v : S.comment = v, I.comment = I.comment.substring(v.length + 1);
3217
3217
  }
3218
3218
  }
3219
- if (!a && !v && !I.found) {
3220
- const k = B ? n(t, B, I, r) : e(t, I.end, v, null, I, r);
3221
- c.items.push(k), u = k.range[2], Ct(B) && r(k.range, "BLOCK_IN_FLOW", yt);
3219
+ if (!a && !k && !I.found) {
3220
+ const v = B ? n(t, B, I, r) : e(t, I.end, k, null, I, r);
3221
+ c.items.push(v), u = v.range[2], Ct(B) && r(v.range, "BLOCK_IN_FLOW", yt);
3222
3222
  } else {
3223
3223
  t.atKey = !0;
3224
- const k = I.end, S = Q ? n(t, Q, I, r) : e(t, k, C, null, I, r);
3225
- Ct(Q) && r(S.range, "BLOCK_IN_FLOW", yt), t.atKey = !1;
3226
- const j = Ce(v ?? [], {
3224
+ const v = I.end, S = p ? n(t, p, I, r) : e(t, v, E, null, I, r);
3225
+ Ct(p) && r(S.range, "BLOCK_IN_FLOW", yt), t.atKey = !1;
3226
+ const j = Ce(k ?? [], {
3227
3227
  flow: o,
3228
3228
  indicator: "map-value-ind",
3229
3229
  next: B,
@@ -3234,8 +3234,8 @@ function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3234
3234
  });
3235
3235
  if (j.found) {
3236
3236
  if (!a && !I.found && t.options.strict) {
3237
- if (v)
3238
- for (const H of v) {
3237
+ if (k)
3238
+ for (const H of k) {
3239
3239
  if (H === j.found)
3240
3240
  break;
3241
3241
  if (H.type === "newline") {
@@ -3245,14 +3245,14 @@ function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3245
3245
  }
3246
3246
  I.start < j.found.offset - 1024 && r(j.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
3247
3247
  }
3248
- } else B && ("source" in B && ((m = B.source) == null ? void 0 : m[0]) === ":" ? r(B, "MISSING_CHAR", `Missing space after : in ${o}`) : r(j.start, "MISSING_CHAR", `Missing , or : between ${o} items`));
3249
- const J = B ? n(t, B, j, r) : j.found ? e(t, j.end, v, null, j, r) : null;
3248
+ } else B && ("source" in B && ((g = B.source) == null ? void 0 : g[0]) === ":" ? r(B, "MISSING_CHAR", `Missing space after : in ${o}`) : r(j.start, "MISSING_CHAR", `Missing , or : between ${o} items`));
3249
+ const J = B ? n(t, B, j, r) : j.found ? e(t, j.end, k, null, j, r) : null;
3250
3250
  J ? Ct(B) && r(J.range, "BLOCK_IN_FLOW", yt) : j.comment && (S.comment ? S.comment += `
3251
3251
  ` + j.comment : S.comment = j.comment);
3252
3252
  const R = new x(S, J);
3253
- if (t.options.keepSourceTokens && (R.srcToken = y), a) {
3253
+ if (t.options.keepSourceTokens && (R.srcToken = Q), a) {
3254
3254
  const H = c;
3255
- As(t, H.items, S) && r(k, "DUPLICATE_KEY", "Map keys must be unique"), H.items.push(R);
3255
+ As(t, H.items, S) && r(v, "DUPLICATE_KEY", "Map keys must be unique"), H.items.push(R);
3256
3256
  } else {
3257
3257
  const H = new Y(t.schema);
3258
3258
  H.flow = !0, H.items.push(R);
@@ -3262,18 +3262,18 @@ function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3262
3262
  u = J ? J.range[2] : j.end;
3263
3263
  }
3264
3264
  }
3265
- const g = a ? "}" : "]", [h, ...p] = s.end;
3265
+ const m = a ? "}" : "]", [h, ...y] = s.end;
3266
3266
  let d = u;
3267
- if ((h == null ? void 0 : h.source) === g)
3267
+ if ((h == null ? void 0 : h.source) === m)
3268
3268
  d = h.offset + h.source.length;
3269
3269
  else {
3270
- const b = o[0].toUpperCase() + o.substring(1), y = f ? `${b} must end with a ${g}` : `${b} in block collection must be sufficiently indented and end with a ${g}`;
3271
- r(u, f ? "MISSING_CHAR" : "BAD_INDENT", y), h && h.source.length !== 1 && p.unshift(h);
3270
+ const C = o[0].toUpperCase() + o.substring(1), Q = f ? `${C} must end with a ${m}` : `${C} in block collection must be sufficiently indented and end with a ${m}`;
3271
+ r(u, f ? "MISSING_CHAR" : "BAD_INDENT", Q), h && h.source.length !== 1 && y.unshift(h);
3272
3272
  }
3273
- if (p.length > 0) {
3274
- const b = He(p, d, t.options.strict, r);
3275
- b.comment && (c.comment ? c.comment += `
3276
- ` + b.comment : c.comment = b.comment), c.range = [s.offset, d, b.offset];
3273
+ if (y.length > 0) {
3274
+ const C = He(y, d, t.options.strict, r);
3275
+ C.comment && (c.comment ? c.comment += `
3276
+ ` + C.comment : c.comment = C.comment), c.range = [s.offset, d, C.offset];
3277
3277
  } else
3278
3278
  c.range = [s.offset, d, d];
3279
3279
  return c;
@@ -3283,11 +3283,11 @@ function bt(n, e, t, s, r, i) {
3283
3283
  return r === "!" || r === o.tagName ? (a.tag = o.tagName, a) : (r && (a.tag = r), a);
3284
3284
  }
3285
3285
  function Ir(n, e, t, s, r) {
3286
- var g;
3286
+ var m;
3287
3287
  const i = s.tag, a = i ? e.directives.tagName(i.source, (h) => r(i, "TAG_RESOLVE_FAILED", h)) : null;
3288
3288
  if (t.type === "block-seq") {
3289
- const { anchor: h, newlineAfterProp: p } = s, d = h && i ? h.offset > i.offset ? h : i : h ?? i;
3290
- d && (!p || p.offset < d.offset) && r(d, "MISSING_CHAR", "Missing newline after block sequence props");
3289
+ const { anchor: h, newlineAfterProp: y } = s, d = h && i ? h.offset > i.offset ? h : i : h ?? i;
3290
+ d && (!y || y.offset < d.offset) && r(d, "MISSING_CHAR", "Missing newline after block sequence props");
3291
3291
  }
3292
3292
  const o = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
3293
3293
  if (!i || !a || a === "!" || a === Y.tagName && o === "map" || a === ce.tagName && o === "seq")
@@ -3300,7 +3300,7 @@ function Ir(n, e, t, s, r) {
3300
3300
  else
3301
3301
  return h ? r(i, "BAD_COLLECTION_TYPE", `${h.tag} used for ${o} collection, but expects ${h.collection ?? "scalar"}`, !0) : r(i, "TAG_RESOLVE_FAILED", `Unresolved tag: ${a}`, !0), bt(n, e, t, r, a);
3302
3302
  }
3303
- const c = bt(n, e, t, r, a, l), f = ((g = l.resolve) == null ? void 0 : g.call(l, c, (h) => r(i, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, u = L(f) ? f : new M(f);
3303
+ const c = bt(n, e, t, r, a, l), f = ((m = l.resolve) == null ? void 0 : m.call(l, c, (h) => r(i, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, u = L(f) ? f : new M(f);
3304
3304
  return u.range = c.range, u.tag = a, l != null && l.format && (u.format = l.format), u;
3305
3305
  }
3306
3306
  function Br(n, e, t) {
@@ -3310,8 +3310,8 @@ function Br(n, e, t) {
3310
3310
  const i = r.mode === ">" ? M.BLOCK_FOLDED : M.BLOCK_LITERAL, a = e.source ? Sr(e.source) : [];
3311
3311
  let o = a.length;
3312
3312
  for (let d = a.length - 1; d >= 0; --d) {
3313
- const m = a[d][1];
3314
- if (m === "" || m === "\r")
3313
+ const g = a[d][1];
3314
+ if (g === "" || g === "\r")
3315
3315
  o = d;
3316
3316
  else
3317
3317
  break;
@@ -3319,44 +3319,44 @@ function Br(n, e, t) {
3319
3319
  if (o === 0) {
3320
3320
  const d = r.chomp === "+" && a.length > 0 ? `
3321
3321
  `.repeat(Math.max(1, a.length - 1)) : "";
3322
- let m = s + r.length;
3323
- return e.source && (m += e.source.length), { value: d, type: i, comment: r.comment, range: [s, m, m] };
3322
+ let g = s + r.length;
3323
+ return e.source && (g += e.source.length), { value: d, type: i, comment: r.comment, range: [s, g, g] };
3324
3324
  }
3325
3325
  let l = e.indent + r.indent, c = e.offset + r.length, f = 0;
3326
3326
  for (let d = 0; d < o; ++d) {
3327
- const [m, b] = a[d];
3328
- if (b === "" || b === "\r")
3329
- r.indent === 0 && m.length > l && (l = m.length);
3327
+ const [g, C] = a[d];
3328
+ if (C === "" || C === "\r")
3329
+ r.indent === 0 && g.length > l && (l = g.length);
3330
3330
  else {
3331
- m.length < l && t(c + m.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), r.indent === 0 && (l = m.length), f = d, l === 0 && !n.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
3331
+ g.length < l && t(c + g.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), r.indent === 0 && (l = g.length), f = d, l === 0 && !n.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
3332
3332
  break;
3333
3333
  }
3334
- c += m.length + b.length + 1;
3334
+ c += g.length + C.length + 1;
3335
3335
  }
3336
3336
  for (let d = a.length - 1; d >= o; --d)
3337
3337
  a[d][0].length > l && (o = d + 1);
3338
- let u = "", g = "", h = !1;
3338
+ let u = "", m = "", h = !1;
3339
3339
  for (let d = 0; d < f; ++d)
3340
3340
  u += a[d][0].slice(l) + `
3341
3341
  `;
3342
3342
  for (let d = f; d < o; ++d) {
3343
- let [m, b] = a[d];
3344
- c += m.length + b.length + 1;
3345
- const y = b[b.length - 1] === "\r";
3346
- if (y && (b = b.slice(0, -1)), b && m.length < l) {
3347
- const Q = `Block scalar lines must not be less indented than their ${r.indent ? "explicit indentation indicator" : "first line"}`;
3348
- t(c - b.length - (y ? 2 : 1), "BAD_INDENT", Q), m = "";
3343
+ let [g, C] = a[d];
3344
+ c += g.length + C.length + 1;
3345
+ const Q = C[C.length - 1] === "\r";
3346
+ if (Q && (C = C.slice(0, -1)), C && g.length < l) {
3347
+ const p = `Block scalar lines must not be less indented than their ${r.indent ? "explicit indentation indicator" : "first line"}`;
3348
+ t(c - C.length - (Q ? 2 : 1), "BAD_INDENT", p), g = "";
3349
3349
  }
3350
- i === M.BLOCK_LITERAL ? (u += g + m.slice(l) + b, g = `
3351
- `) : m.length > l || b[0] === " " ? (g === " " ? g = `
3352
- ` : !h && g === `
3353
- ` && (g = `
3350
+ i === M.BLOCK_LITERAL ? (u += m + g.slice(l) + C, m = `
3351
+ `) : g.length > l || C[0] === " " ? (m === " " ? m = `
3352
+ ` : !h && m === `
3353
+ ` && (m = `
3354
3354
 
3355
- `), u += g + m.slice(l) + b, g = `
3356
- `, h = !0) : b === "" ? g === `
3355
+ `), u += m + g.slice(l) + C, m = `
3356
+ `, h = !0) : C === "" ? m === `
3357
3357
  ` ? u += `
3358
- ` : g = `
3359
- ` : (u += g + b, g = " ", h = !1);
3358
+ ` : m = `
3359
+ ` : (u += m + C, m = " ", h = !1);
3360
3360
  }
3361
3361
  switch (r.chomp) {
3362
3362
  case "-":
@@ -3373,27 +3373,27 @@ function Br(n, e, t) {
3373
3373
  u += `
3374
3374
  `;
3375
3375
  }
3376
- const p = s + r.length + e.source.length;
3377
- return { value: u, type: i, comment: r.comment, range: [s, p, p] };
3376
+ const y = s + r.length + e.source.length;
3377
+ return { value: u, type: i, comment: r.comment, range: [s, y, y] };
3378
3378
  }
3379
3379
  function wr({ offset: n, props: e }, t, s) {
3380
3380
  if (e[0].type !== "block-scalar-header")
3381
3381
  return s(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
3382
3382
  const { source: r } = e[0], i = r[0];
3383
3383
  let a = 0, o = "", l = -1;
3384
- for (let g = 1; g < r.length; ++g) {
3385
- const h = r[g];
3384
+ for (let m = 1; m < r.length; ++m) {
3385
+ const h = r[m];
3386
3386
  if (!o && (h === "-" || h === "+"))
3387
3387
  o = h;
3388
3388
  else {
3389
- const p = Number(h);
3390
- !a && p ? a = p : l === -1 && (l = n + g);
3389
+ const y = Number(h);
3390
+ !a && y ? a = y : l === -1 && (l = n + m);
3391
3391
  }
3392
3392
  }
3393
3393
  l !== -1 && s(l, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${r}`);
3394
3394
  let c = !1, f = "", u = r.length;
3395
- for (let g = 1; g < e.length; ++g) {
3396
- const h = e[g];
3395
+ for (let m = 1; m < e.length; ++m) {
3396
+ const h = e[m];
3397
3397
  switch (h.type) {
3398
3398
  case "space":
3399
3399
  c = !0;
@@ -3409,8 +3409,8 @@ function wr({ offset: n, props: e }, t, s) {
3409
3409
  break;
3410
3410
  /* istanbul ignore next should not happen */
3411
3411
  default: {
3412
- const p = `Unexpected token in block scalar header: ${h.type}`;
3413
- s(h, "UNEXPECTED_TOKEN", p);
3412
+ const y = `Unexpected token in block scalar header: ${h.type}`;
3413
+ s(h, "UNEXPECTED_TOKEN", y);
3414
3414
  const d = h.source;
3415
3415
  d && typeof d == "string" && (u += d.length);
3416
3416
  }
@@ -3427,7 +3427,7 @@ function Sr(n) {
3427
3427
  function jr(n, e, t) {
3428
3428
  const { offset: s, type: r, source: i, end: a } = n;
3429
3429
  let o, l;
3430
- const c = (g, h, p) => t(s + g, h, p);
3430
+ const c = (m, h, y) => t(s + m, h, y);
3431
3431
  switch (r) {
3432
3432
  case "scalar":
3433
3433
  o = M.PLAIN, l = Tr(i, c);
@@ -3603,21 +3603,21 @@ function Pr(n, e, t, s) {
3603
3603
  function us(n, e, t, s) {
3604
3604
  const { value: r, type: i, comment: a, range: o } = e.type === "block-scalar" ? Br(n, e, s) : jr(e, n.options.strict, s), l = t ? n.directives.tagName(t.source, (u) => s(t, "TAG_RESOLVE_FAILED", u)) : null;
3605
3605
  let c;
3606
- n.options.stringKeys && n.atKey ? c = n.schema[q] : l ? c = Lr(n.schema, r, l, t, s) : e.type === "scalar" ? c = zr(n, r, e, s) : c = n.schema[q];
3606
+ n.options.stringKeys && n.atKey ? c = n.schema[$] : l ? c = Lr(n.schema, r, l, t, s) : e.type === "scalar" ? c = zr(n, r, e, s) : c = n.schema[$];
3607
3607
  let f;
3608
3608
  try {
3609
- const u = c.resolve(r, (g) => s(t ?? e, "TAG_RESOLVE_FAILED", g), n.options);
3609
+ const u = c.resolve(r, (m) => s(t ?? e, "TAG_RESOLVE_FAILED", m), n.options);
3610
3610
  f = O(u) ? u : new M(u);
3611
3611
  } catch (u) {
3612
- const g = u instanceof Error ? u.message : String(u);
3613
- s(t ?? e, "TAG_RESOLVE_FAILED", g), f = new M(r);
3612
+ const m = u instanceof Error ? u.message : String(u);
3613
+ s(t ?? e, "TAG_RESOLVE_FAILED", m), f = new M(r);
3614
3614
  }
3615
3615
  return f.range = o, f.source = r, i && (f.type = i), l && (f.tag = l), c.format && (f.format = c.format), a && (f.comment = a), f;
3616
3616
  }
3617
3617
  function Lr(n, e, t, s, r) {
3618
3618
  var o;
3619
3619
  if (t === "!")
3620
- return n[q];
3620
+ return n[$];
3621
3621
  const i = [];
3622
3622
  for (const l of n.tags)
3623
3623
  if (!l.collection && l.tag === t)
@@ -3629,18 +3629,18 @@ function Lr(n, e, t, s, r) {
3629
3629
  if ((o = l.test) != null && o.test(e))
3630
3630
  return l;
3631
3631
  const a = n.knownTags[t];
3632
- return a && !a.collection ? (n.tags.push(Object.assign({}, a, { default: !1, test: void 0 })), a) : (r(s, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), n[q]);
3632
+ return a && !a.collection ? (n.tags.push(Object.assign({}, a, { default: !1, test: void 0 })), a) : (r(s, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), n[$]);
3633
3633
  }
3634
3634
  function zr({ atKey: n, directives: e, schema: t }, s, r, i) {
3635
3635
  const a = t.tags.find((o) => {
3636
3636
  var l;
3637
3637
  return (o.default === !0 || n && o.default === "key") && ((l = o.test) == null ? void 0 : l.test(s));
3638
- }) || t[q];
3638
+ }) || t[$];
3639
3639
  if (t.compat) {
3640
3640
  const o = t.compat.find((l) => {
3641
3641
  var c;
3642
3642
  return l.default && ((c = l.test) == null ? void 0 : c.test(s));
3643
- }) ?? t[q];
3643
+ }) ?? t[$];
3644
3644
  if (a.tag !== o.tag) {
3645
3645
  const l = e.tagString(a.tag), c = e.tagString(o.tag), f = `Value may be parsed as either ${l} or ${c}`;
3646
3646
  i(r, "TAG_RESOLVE_FAILED", f, !0);
@@ -3687,8 +3687,8 @@ function fs(n, e, t, s) {
3687
3687
  try {
3688
3688
  c = Ir(Hr, n, e, t, s), o && (c.anchor = o.source.substring(1));
3689
3689
  } catch (u) {
3690
- const g = u instanceof Error ? u.message : String(u);
3691
- s(e, "RESOURCE_EXHAUSTION", g);
3690
+ const m = u instanceof Error ? u.message : String(u);
3691
+ s(e, "RESOURCE_EXHAUSTION", m);
3692
3692
  }
3693
3693
  break;
3694
3694
  default: {
@@ -3729,8 +3729,8 @@ function xr(n, e, { offset: t, start: s, value: r, end: i }, a) {
3729
3729
  startOnNewline: !0
3730
3730
  });
3731
3731
  f.found && (l.directives.docStart = !0, r && (r.type === "block-map" || r.type === "block-seq") && !f.hasNewline && a(f.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), l.contents = r ? fs(c, r, f, a) : qt(c, f.end, s, null, f, a);
3732
- const u = l.contents.range[2], g = He(i, u, !1, a);
3733
- return g.comment && (l.comment = g.comment), l.range = [t, u, g.offset], l;
3732
+ const u = l.contents.range[2], m = He(i, u, !1, a);
3733
+ return m.comment && (l.comment = m.comment), l.range = [t, u, m.offset], l;
3734
3734
  }
3735
3735
  function we(n) {
3736
3736
  if (typeof n == "number")
@@ -5197,7 +5197,7 @@ function li(n) {
5197
5197
  return Ie(js[n]);
5198
5198
  }
5199
5199
  function ut({ item: n, scale: e = 0.85, highlight: t }) {
5200
- const s = $(() => Mn(n, e), [n, e]);
5200
+ const s = q(() => Mn(n, e), [n, e]);
5201
5201
  return s ? /* @__PURE__ */ A("div", { className: t || void 0, children: /* @__PURE__ */ A(Nn, { type: s.type, card: s.card, hoverTilt: !0 }) }) : /* @__PURE__ */ A("div", { className: `j-game-card j-game-card--unknown ${t || ""}`.trim(), children: "?" });
5202
5202
  }
5203
5203
  function $t(n) {
@@ -5236,10 +5236,10 @@ function Ai({
5236
5236
  ante: e,
5237
5237
  matches: t
5238
5238
  }) {
5239
- return /* @__PURE__ */ E("div", { className: "j-inner-panel", style: { marginBottom: "var(--j-space-md)" }, children: [
5240
- /* @__PURE__ */ E("div", { className: "j-flex", style: { alignItems: "center", gap: "var(--j-space-md)", marginBottom: "var(--j-space-sm)" }, children: [
5239
+ return /* @__PURE__ */ b("div", { className: "j-inner-panel", style: { marginBottom: "var(--j-space-md)" }, children: [
5240
+ /* @__PURE__ */ b("div", { className: "j-flex", style: { alignItems: "center", gap: "var(--j-space-md)", marginBottom: "var(--j-space-sm)" }, children: [
5241
5241
  /* @__PURE__ */ A("span", { className: "j-text j-text--body", children: ai(n.pack) }),
5242
- /* @__PURE__ */ E("span", { className: "j-badge j-badge--blue j-badge--sm", children: [
5242
+ /* @__PURE__ */ b("span", { className: "j-badge j-badge--blue j-badge--sm", children: [
5243
5243
  n.items.length,
5244
5244
  " cards"
5245
5245
  ] })
@@ -5266,16 +5266,16 @@ function di({
5266
5266
  { title: "Uncommon Tag Jokers", items: t.uncommonTagJokers },
5267
5267
  { title: "Legendary Jokers", items: t.legendaryJokers }
5268
5268
  ].filter((r) => r.items.length > 0);
5269
- return s.length === 0 && t.voucherSequence.length === 0 ? null : /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5269
+ return s.length === 0 && t.voucherSequence.length === 0 ? null : /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5270
5270
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Pulls" }),
5271
- s.map((r) => /* @__PURE__ */ E("div", { className: "j-inner-panel", children: [
5271
+ s.map((r) => /* @__PURE__ */ b("div", { className: "j-inner-panel", children: [
5272
5272
  /* @__PURE__ */ A("div", { className: "j-text j-text--label j-text--grey", style: { marginBottom: "var(--j-space-sm)" }, children: r.title }),
5273
5273
  /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: r.items.map((i, a) => {
5274
5274
  const o = Pe(i), l = o ? _($t(o.category), o.displayName, n.ante, e) : void 0;
5275
5275
  return /* @__PURE__ */ A(ut, { item: i, highlight: l }, a);
5276
5276
  }) })
5277
5277
  ] }, r.title)),
5278
- t.voucherSequence.length > 0 && /* @__PURE__ */ E("div", { className: "j-inner-panel", children: [
5278
+ t.voucherSequence.length > 0 && /* @__PURE__ */ b("div", { className: "j-inner-panel", children: [
5279
5279
  /* @__PURE__ */ A("div", { className: "j-text j-text--label j-text--grey", style: { marginBottom: "var(--j-space-sm)" }, children: "Voucher Sequence" }),
5280
5280
  /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: t.voucherSequence.map((r, i) => {
5281
5281
  const a = Ot(r), o = _("voucher", a, n.ante, e);
@@ -5299,13 +5299,13 @@ function ui({ events: n }) {
5299
5299
  { key: "omenGlobe", label: "Omen Globe", values: n.omenGlobe },
5300
5300
  { key: "theWheel", label: "The Wheel", values: n.theWheel }
5301
5301
  ].filter((t) => t.values && t.values.length > 0);
5302
- return e.length === 0 ? null : /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5302
+ return e.length === 0 ? null : /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5303
5303
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Event Rolls" }),
5304
- /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: e.map((t) => /* @__PURE__ */ E("div", { className: "j-inner-panel", style: { minWidth: 120 }, children: [
5304
+ /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: e.map((t) => /* @__PURE__ */ b("div", { className: "j-inner-panel", style: { minWidth: 120 }, children: [
5305
5305
  /* @__PURE__ */ A("div", { className: "j-text j-text--label j-text--grey", children: t.label }),
5306
- /* @__PURE__ */ E("div", { className: "j-text j-text--body", children: [
5306
+ /* @__PURE__ */ b("div", { className: "j-text j-text--body", children: [
5307
5307
  t.values.slice(0, 8).map((s, r) => /* @__PURE__ */ A("span", { className: "j-badge j-badge--grey j-badge--sm", style: { marginRight: "var(--j-space-xs)" }, children: String(s) }, r)),
5308
- t.values.length > 8 && /* @__PURE__ */ E("span", { className: "j-text j-text--micro j-text--grey", children: [
5308
+ t.values.length > 8 && /* @__PURE__ */ b("span", { className: "j-text j-text--micro j-text--grey", children: [
5309
5309
  "+",
5310
5310
  t.values.length - 8
5311
5311
  ] })
@@ -5317,7 +5317,7 @@ function fi({
5317
5317
  cards: n,
5318
5318
  matches: e
5319
5319
  }) {
5320
- return n.length === 0 ? null : /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5320
+ return n.length === 0 ? null : /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5321
5321
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Erratic Deck" }),
5322
5322
  /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: n.map((t, s) => {
5323
5323
  var i;
@@ -5340,131 +5340,148 @@ function fi({
5340
5340
  }) })
5341
5341
  ] });
5342
5342
  }
5343
- function hi({ result: n, deck: e, stake: t, jamlText: s, clauses: r, tallies: i, onHoverClause: a }) {
5344
- const [o, l] = re(() => {
5345
- var y;
5346
- return ((y = n.antes[0]) == null ? void 0 : y.ante) ?? 0;
5347
- }), [c, f] = re(null), u = $(() => r || (s ? ys(s).all : []), [r, s]), g = $(() => u.filter((y) => y.kind === "should"), [u]), h = $(() => ci(u), [u]), p = $(() => {
5348
- if (!c) return h;
5349
- const y = /* @__PURE__ */ new Map();
5350
- return h.forEach((C, Q) => {
5351
- const v = C.filter((B) => B === c);
5352
- v.length > 0 && y.set(Q, v);
5353
- }), y;
5354
- }, [h, c]), d = $(() => n.antes.map((y) => y.ante).sort((y, C) => y - C), [n.antes]), m = $(
5355
- () => n.antes.find((y) => y.ante === o) ?? n.antes[0],
5356
- [n.antes, o]
5357
- ), b = (y) => {
5358
- f(y), a == null || a(y);
5343
+ function hi({
5344
+ result: n,
5345
+ deck: e,
5346
+ stake: t,
5347
+ maxAnte: s,
5348
+ jamlText: r,
5349
+ clauses: i,
5350
+ tallies: a,
5351
+ onHoverClause: o
5352
+ }) {
5353
+ const l = s ?? 39, [c, f] = re(() => {
5354
+ var p;
5355
+ return ((p = n.antes[0]) == null ? void 0 : p.ante) ?? 0;
5356
+ }), [u, m] = re(null), h = q(() => i || (r ? ys(r).all : []), [i, r]), y = q(() => h.filter((p) => p.kind === "should"), [h]), d = q(() => ci(h), [h]), g = q(() => {
5357
+ if (!u) return d;
5358
+ const p = /* @__PURE__ */ new Map();
5359
+ return d.forEach((k, B) => {
5360
+ const I = k.filter((v) => v === u);
5361
+ I.length > 0 && p.set(B, I);
5362
+ }), p;
5363
+ }, [d, u]);
5364
+ q(
5365
+ () => new Set(n.antes.map((p) => p.ante)),
5366
+ [n.antes]
5367
+ );
5368
+ const C = q(
5369
+ () => Array.from({ length: l + 1 }, (p, k) => k),
5370
+ [l]
5371
+ ), Q = q(
5372
+ () => n.antes.find((p) => p.ante === c) ?? n.antes[0],
5373
+ [n.antes, c]
5374
+ ), E = (p) => {
5375
+ m(p), o == null || o(p);
5359
5376
  };
5360
- return m ? /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-lg)" }, children: [
5361
- /* @__PURE__ */ E("div", { className: "j-flex", style: { gap: "var(--j-space-md)", alignItems: "flex-start" }, children: [
5362
- /* @__PURE__ */ E("div", { className: "j-ante-scroll", style: { display: "flex", flexDirection: "column", gap: "var(--j-space-sm)", maxHeight: 420, overflowY: "auto", minWidth: 72 }, children: [
5363
- u.length > 0 && /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-sm)", padding: "var(--j-space-md)" }, children: [
5377
+ return Q ? /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-lg)" }, children: [
5378
+ /* @__PURE__ */ b("div", { className: "j-flex", style: { gap: "var(--j-space-md)", alignItems: "flex-start" }, children: [
5379
+ /* @__PURE__ */ b("div", { className: "j-ante-scroll", style: { display: "flex", flexDirection: "column", gap: "var(--j-space-sm)", maxHeight: 420, overflowY: "auto", minWidth: 72 }, children: [
5380
+ h.length > 0 && /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-sm)", padding: "var(--j-space-md)" }, children: [
5364
5381
  /* @__PURE__ */ A("div", { className: "j-text j-text--label j-text--upper j-text--gold", children: "Clauses" }),
5365
- g.map((y, C) => /* @__PURE__ */ A(
5382
+ y.map((p, k) => /* @__PURE__ */ A(
5366
5383
  "button",
5367
5384
  {
5368
5385
  className: "j-btn j-btn--xs",
5369
- onMouseEnter: () => b(y),
5370
- onMouseLeave: () => b(null),
5386
+ onMouseEnter: () => E(p),
5387
+ onMouseLeave: () => E(null),
5371
5388
  style: { width: "100%" },
5372
- children: /* @__PURE__ */ E("span", { className: `j-btn__face j-text j-text--micro ${i && C < i.length && i[C] > 0 ? "j-text--green" : "j-text--grey"}`.trim(), children: [
5373
- i && C < i.length ? `${i[C]} · ` : "",
5374
- y.label
5389
+ children: /* @__PURE__ */ b("span", { className: `j-btn__face j-text j-text--micro ${a && k < a.length && a[k] > 0 ? "j-text--green" : "j-text--grey"}`.trim(), children: [
5390
+ a && k < a.length ? `${a[k]} · ` : "",
5391
+ p.label
5375
5392
  ] })
5376
5393
  },
5377
- C
5394
+ k
5378
5395
  )),
5379
- u.filter((y) => y.kind !== "should").map((y, C) => /* @__PURE__ */ A(
5396
+ h.filter((p) => p.kind !== "should").map((p, k) => /* @__PURE__ */ A(
5380
5397
  "button",
5381
5398
  {
5382
5399
  className: "j-btn j-btn--xs",
5383
- onMouseEnter: () => b(y),
5384
- onMouseLeave: () => b(null),
5400
+ onMouseEnter: () => E(p),
5401
+ onMouseLeave: () => E(null),
5385
5402
  style: { width: "100%" },
5386
- children: /* @__PURE__ */ E("span", { className: `j-btn__face j-text j-text--micro ${y.kind === "must" ? "j-text--red" : "j-text--grey"}`.trim(), children: [
5387
- y.kind === "must" ? "MUST " : "NOT ",
5388
- y.label
5403
+ children: /* @__PURE__ */ b("span", { className: `j-btn__face j-text j-text--micro ${p.kind === "must" ? "j-text--red" : "j-text--grey"}`.trim(), children: [
5404
+ p.kind === "must" ? "MUST " : "NOT ",
5405
+ p.label
5389
5406
  ] })
5390
5407
  },
5391
- `other-${C}`
5408
+ `other-${k}`
5392
5409
  ))
5393
5410
  ] }),
5394
- d.map((y) => /* @__PURE__ */ A(
5411
+ C.map((p) => /* @__PURE__ */ A(
5395
5412
  "button",
5396
5413
  {
5397
5414
  className: "j-btn j-btn--xs",
5398
- "data-pressed": y === o,
5399
- onClick: () => l(y),
5415
+ "data-pressed": p === c,
5416
+ onClick: () => f(p),
5400
5417
  style: { width: "100%" },
5401
- children: /* @__PURE__ */ E("span", { className: "j-btn__face j-text j-text--label j-text--upper", children: [
5418
+ children: /* @__PURE__ */ b("span", { className: "j-btn__face j-text j-text--label j-text--upper", children: [
5402
5419
  "Ante ",
5403
- y
5420
+ p
5404
5421
  ] })
5405
5422
  },
5406
- y
5423
+ p
5407
5424
  ))
5408
5425
  ] }),
5409
- /* @__PURE__ */ E("div", { className: "j-flex-1 j-flex-col", style: { gap: "var(--j-space-lg)", minWidth: 0 }, children: [
5410
- /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-sm)" }, children: [
5411
- /* @__PURE__ */ E("div", { className: "j-text j-text--xl j-text--gold", children: [
5426
+ /* @__PURE__ */ b("div", { className: "j-flex-1 j-flex-col", style: { gap: "var(--j-space-lg)", minWidth: 0 }, children: [
5427
+ /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-sm)" }, children: [
5428
+ /* @__PURE__ */ b("div", { className: "j-text j-text--xl j-text--gold", children: [
5412
5429
  "Seed: ",
5413
5430
  n.seed
5414
5431
  ] }),
5415
- /* @__PURE__ */ E("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-md)" }, children: [
5416
- /* @__PURE__ */ E("span", { className: "j-text j-text--body j-text--grey", children: [
5432
+ /* @__PURE__ */ b("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-md)" }, children: [
5433
+ /* @__PURE__ */ b("span", { className: "j-text j-text--body j-text--grey", children: [
5417
5434
  "Score: ",
5418
5435
  /* @__PURE__ */ A("span", { className: "j-text--gold", children: n.score })
5419
5436
  ] }),
5420
- e !== void 0 && /* @__PURE__ */ E("span", { className: "j-text j-text--body j-text--grey", children: [
5437
+ e !== void 0 && /* @__PURE__ */ b("span", { className: "j-text j-text--body j-text--grey", children: [
5421
5438
  "Deck: ",
5422
5439
  /* @__PURE__ */ A("span", { className: "j-text--white", children: oi(e) })
5423
5440
  ] }),
5424
- t !== void 0 && /* @__PURE__ */ E("span", { className: "j-text j-text--body j-text--grey", children: [
5441
+ t !== void 0 && /* @__PURE__ */ b("span", { className: "j-text j-text--body j-text--grey", children: [
5425
5442
  "Stake: ",
5426
5443
  /* @__PURE__ */ A("span", { className: "j-text--white", children: li(t) })
5427
5444
  ] })
5428
5445
  ] })
5429
5446
  ] }),
5430
- /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5447
+ /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5431
5448
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Blinds" }),
5432
- /* @__PURE__ */ E("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-md)", alignItems: "center" }, children: [
5433
- /* @__PURE__ */ E("div", { className: `j-inner-panel j-flex ${_("tag", Ye(m.smallBlindTag), m.ante, p) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5449
+ /* @__PURE__ */ b("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-md)", alignItems: "center" }, children: [
5450
+ /* @__PURE__ */ b("div", { className: `j-inner-panel j-flex ${_("tag", Ye(Q.smallBlindTag), Q.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5434
5451
  /* @__PURE__ */ A("span", { className: "j-text j-text--label j-text--grey", children: "SMALL" }),
5435
- /* @__PURE__ */ A(on, { tagName: Ye(m.smallBlindTag), scale: 0.75 })
5452
+ /* @__PURE__ */ A(on, { tagName: Ye(Q.smallBlindTag), scale: 0.75 })
5436
5453
  ] }),
5437
- /* @__PURE__ */ E("div", { className: `j-inner-panel j-flex ${_("tag", Ye(m.bigBlindTag), m.ante, p) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5454
+ /* @__PURE__ */ b("div", { className: `j-inner-panel j-flex ${_("tag", Ye(Q.bigBlindTag), Q.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5438
5455
  /* @__PURE__ */ A("span", { className: "j-text j-text--label j-text--grey", children: "BIG" }),
5439
- /* @__PURE__ */ A(on, { tagName: Ye(m.bigBlindTag), scale: 0.75 })
5456
+ /* @__PURE__ */ A(on, { tagName: Ye(Q.bigBlindTag), scale: 0.75 })
5440
5457
  ] }),
5441
- /* @__PURE__ */ E("div", { className: `j-inner-panel j-flex ${_("boss", bn(m.boss), m.ante, p) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5458
+ /* @__PURE__ */ b("div", { className: `j-inner-panel j-flex ${_("boss", bn(Q.boss), Q.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5442
5459
  /* @__PURE__ */ A("span", { className: "j-text j-text--label j-text--grey", children: "BOSS" }),
5443
- /* @__PURE__ */ A(Hs, { bossName: bn(m.boss), scale: 0.75 })
5460
+ /* @__PURE__ */ A(Hs, { bossName: bn(Q.boss), scale: 0.75 })
5444
5461
  ] })
5445
5462
  ] })
5446
5463
  ] }),
5447
- /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5464
+ /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5448
5465
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Voucher" }),
5449
- /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: /* @__PURE__ */ A("div", { className: _("voucher", Ot(m.voucher), m.ante, p) || void 0, children: /* @__PURE__ */ A(On, { voucherName: Ot(m.voucher), scale: 0.9 }) }) })
5466
+ /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: /* @__PURE__ */ A("div", { className: _("voucher", Ot(Q.voucher), Q.ante, g) || void 0, children: /* @__PURE__ */ A(On, { voucherName: Ot(Q.voucher), scale: 0.9 }) }) })
5450
5467
  ] }),
5451
- /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5468
+ /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5452
5469
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Shop" }),
5453
- /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: m.shopItems.map((y, C) => {
5454
- const Q = Pe(y), v = Q ? _($t(Q.category), Q.displayName, m.ante, p) : void 0;
5455
- return /* @__PURE__ */ A(ut, { item: y, highlight: v }, C);
5470
+ /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: Q.shopItems.map((p, k) => {
5471
+ const B = Pe(p), I = B ? _($t(B.category), B.displayName, Q.ante, g) : void 0;
5472
+ return /* @__PURE__ */ A(ut, { item: p, highlight: I }, k);
5456
5473
  }) })
5457
5474
  ] }),
5458
- m.packs.length > 0 && /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5475
+ Q.packs.length > 0 && /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5459
5476
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Packs" }),
5460
- m.packs.map((y, C) => /* @__PURE__ */ A(Ai, { pack: y, ante: m.ante, matches: p }, C))
5477
+ Q.packs.map((p, k) => /* @__PURE__ */ A(Ai, { pack: p, ante: Q.ante, matches: g }, k))
5461
5478
  ] }),
5462
- /* @__PURE__ */ A(di, { ante: m, matches: p })
5479
+ /* @__PURE__ */ A(di, { ante: Q, matches: g })
5463
5480
  ] })
5464
5481
  ] }),
5465
- n.erraticDeck && n.erraticDeck.length > 0 && /* @__PURE__ */ A(fi, { cards: n.erraticDeck, matches: p }),
5482
+ n.erraticDeck && n.erraticDeck.length > 0 && /* @__PURE__ */ A(fi, { cards: n.erraticDeck, matches: g }),
5466
5483
  /* @__PURE__ */ A(ui, { events: n.events })
5467
- ] }) : /* @__PURE__ */ E("div", { className: "j-panel j-text j-text--grey", children: [
5484
+ ] }) : /* @__PURE__ */ b("div", { className: "j-panel j-text j-text--grey", children: [
5468
5485
  "No ante data available for seed ",
5469
5486
  n.seed,
5470
5487
  "."
@@ -5501,21 +5518,21 @@ function gi(n, e) {
5501
5518
  return t;
5502
5519
  }
5503
5520
  function ta({ results: n, jamlText: e, clauses: t, tallies: s, deck: r, stake: i }) {
5504
- const [a, o] = re(null), l = $(() => t || (e ? ys(e).all : []), [t, e]), c = $(() => l.filter((f) => f.kind === "should"), [l]);
5505
- return n.length === 0 ? /* @__PURE__ */ A("div", { className: "j-panel j-text j-text--grey", children: "No seeds to analyze." }) : /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-lg)" }, children: [
5521
+ const [a, o] = re(null), l = q(() => t || (e ? ys(e).all : []), [t, e]), c = q(() => l.filter((f) => f.kind === "should"), [l]);
5522
+ return n.length === 0 ? /* @__PURE__ */ A("div", { className: "j-panel j-text j-text--grey", children: "No seeds to analyze." }) : /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-lg)" }, children: [
5506
5523
  /* @__PURE__ */ A("div", { className: "j-text j-text--xl j-text--gold", children: "Bulk Seed Analysis" }),
5507
- /* @__PURE__ */ E("div", { className: "j-text j-text--body j-text--grey", children: [
5524
+ /* @__PURE__ */ b("div", { className: "j-text j-text--body j-text--grey", children: [
5508
5525
  n.length,
5509
5526
  " seed",
5510
5527
  n.length === 1 ? "" : "s",
5511
5528
  " analyzed"
5512
5529
  ] }),
5513
5530
  n.map((f, u) => {
5514
- const g = gi(f, l), h = a === f.seed, p = s && u < s.length ? s[u] : void 0;
5515
- return /* @__PURE__ */ E("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5516
- /* @__PURE__ */ E("div", { className: "j-flex", style: { alignItems: "center", gap: "var(--j-space-md)", flexWrap: "wrap" }, children: [
5531
+ const m = gi(f, l), h = a === f.seed, y = s && u < s.length ? s[u] : void 0;
5532
+ return /* @__PURE__ */ b("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5533
+ /* @__PURE__ */ b("div", { className: "j-flex", style: { alignItems: "center", gap: "var(--j-space-md)", flexWrap: "wrap" }, children: [
5517
5534
  /* @__PURE__ */ A("div", { className: "j-text j-text--lg j-text--white", children: f.seed }),
5518
- /* @__PURE__ */ E("div", { className: "j-badge j-badge--gold j-badge--md", children: [
5535
+ /* @__PURE__ */ b("div", { className: "j-badge j-badge--gold j-badge--md", children: [
5519
5536
  "Score: ",
5520
5537
  f.score
5521
5538
  ] }),
@@ -5528,35 +5545,35 @@ function ta({ results: n, jamlText: e, clauses: t, tallies: s, deck: r, stake: i
5528
5545
  }
5529
5546
  )
5530
5547
  ] }),
5531
- c.length > 0 && /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-md)", flexWrap: "wrap" }, children: c.map((d, m) => {
5532
- const b = g.get(d) ?? [], y = p && m < p.length ? p[m] : void 0;
5533
- return /* @__PURE__ */ E("div", { className: "j-inner-panel", style: { minWidth: 140 }, children: [
5534
- /* @__PURE__ */ E("div", { className: "j-text j-text--label j-text--grey", style: { marginBottom: "var(--j-space-sm)" }, children: [
5548
+ c.length > 0 && /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-md)", flexWrap: "wrap" }, children: c.map((d, g) => {
5549
+ const C = m.get(d) ?? [], Q = y && g < y.length ? y[g] : void 0;
5550
+ return /* @__PURE__ */ b("div", { className: "j-inner-panel", style: { minWidth: 140 }, children: [
5551
+ /* @__PURE__ */ b("div", { className: "j-text j-text--label j-text--grey", style: { marginBottom: "var(--j-space-sm)" }, children: [
5535
5552
  d.label,
5536
- y !== void 0 && /* @__PURE__ */ E("span", { className: "j-text--green", children: [
5553
+ Q !== void 0 && /* @__PURE__ */ b("span", { className: "j-text--green", children: [
5537
5554
  " (",
5538
- y,
5555
+ Q,
5539
5556
  ")"
5540
5557
  ] })
5541
5558
  ] }),
5542
- /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: b.length > 0 ? b.map((C) => /* @__PURE__ */ E("span", { className: "j-badge j-badge--green j-badge--sm", children: [
5559
+ /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: C.length > 0 ? C.map((E) => /* @__PURE__ */ b("span", { className: "j-badge j-badge--green j-badge--sm", children: [
5543
5560
  "Ante ",
5544
- C
5545
- ] }, C)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5546
- ] }, m);
5561
+ E
5562
+ ] }, E)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5563
+ ] }, g);
5547
5564
  }) }),
5548
- l.filter((d) => d.kind !== "should").length > 0 && /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-md)", flexWrap: "wrap" }, children: l.filter((d) => d.kind !== "should").map((d, m) => {
5549
- const b = g.get(d) ?? [], y = d.kind === "must" ? "red" : "grey";
5550
- return /* @__PURE__ */ E("div", { className: "j-inner-panel", style: { minWidth: 140 }, children: [
5551
- /* @__PURE__ */ E("div", { className: `j-text j-text--label j-text--${d.kind === "must" ? "red" : "grey"}`, style: { marginBottom: "var(--j-space-sm)" }, children: [
5565
+ l.filter((d) => d.kind !== "should").length > 0 && /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-md)", flexWrap: "wrap" }, children: l.filter((d) => d.kind !== "should").map((d, g) => {
5566
+ const C = m.get(d) ?? [], Q = d.kind === "must" ? "red" : "grey";
5567
+ return /* @__PURE__ */ b("div", { className: "j-inner-panel", style: { minWidth: 140 }, children: [
5568
+ /* @__PURE__ */ b("div", { className: `j-text j-text--label j-text--${d.kind === "must" ? "red" : "grey"}`, style: { marginBottom: "var(--j-space-sm)" }, children: [
5552
5569
  d.kind === "must" ? "MUST " : "NOT ",
5553
5570
  d.label
5554
5571
  ] }),
5555
- /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: b.length > 0 ? b.map((C) => /* @__PURE__ */ E("span", { className: `j-badge j-badge--${y} j-badge--sm`, children: [
5572
+ /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: C.length > 0 ? C.map((E) => /* @__PURE__ */ b("span", { className: `j-badge j-badge--${Q} j-badge--sm`, children: [
5556
5573
  "Ante ",
5557
- C
5558
- ] }, C)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5559
- ] }, `other-${m}`);
5574
+ E
5575
+ ] }, E)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5576
+ ] }, `other-${g}`);
5560
5577
  }) }),
5561
5578
  h && /* @__PURE__ */ A("div", { style: { marginTop: "var(--j-space-md)" }, children: /* @__PURE__ */ A(
5562
5579
  hi,
@@ -5565,7 +5582,7 @@ function ta({ results: n, jamlText: e, clauses: t, tallies: s, deck: r, stake: i
5565
5582
  deck: r,
5566
5583
  stake: i,
5567
5584
  clauses: l,
5568
- tallies: p ? [...p] : void 0
5585
+ tallies: y ? [...y] : void 0
5569
5586
  }
5570
5587
  ) })
5571
5588
  ] }, f.seed);
@@ -5602,7 +5619,7 @@ const En = {
5602
5619
  }, yi = 142, Ci = 190, Qn = 7, kn = 5, vn = 5, In = 3;
5603
5620
  function na({ deck: n, stake: e, size: t = 50, className: s = "", style: r }) {
5604
5621
  const i = (n || "erratic").toLowerCase().replace(/\s*deck$/, "").trim(), a = En[i] ?? En.erratic, o = e ? pi[e.toLowerCase().replace(/\s*stake$/, "").trim()] : null, l = t / yi, c = Ci * l;
5605
- return /* @__PURE__ */ E(
5622
+ return /* @__PURE__ */ b(
5606
5623
  "div",
5607
5624
  {
5608
5625
  className: s,
@@ -5764,7 +5781,7 @@ const ia = {
5764
5781
  variant: t = "default",
5765
5782
  className: s = "",
5766
5783
  children: r
5767
- }) => /* @__PURE__ */ E(
5784
+ }) => /* @__PURE__ */ b(
5768
5785
  "div",
5769
5786
  {
5770
5787
  className: s,
@@ -5857,7 +5874,7 @@ const ia = {
5857
5874
  accent: "var(--j-text-md)",
5858
5875
  error: "var(--j-text-sm)"
5859
5876
  };
5860
- return /* @__PURE__ */ E(
5877
+ return /* @__PURE__ */ b(
5861
5878
  "span",
5862
5879
  {
5863
5880
  className: t,
@@ -5927,8 +5944,8 @@ const ia = {
5927
5944
  className: i = ""
5928
5945
  }) => {
5929
5946
  const a = n === "running" ? "var(--j-blue)" : n === "completed" ? "var(--j-green)" : n === "error" ? "var(--j-red)" : "var(--j-grey)", o = n === "idle" ? "Ready" : n === "running" ? "Searching..." : n === "completed" ? "Done" : "Error";
5930
- return /* @__PURE__ */ A(G, { className: i, variant: "accent", children: /* @__PURE__ */ E(U, { gap: 8, children: [
5931
- /* @__PURE__ */ E(
5947
+ return /* @__PURE__ */ A(G, { className: i, variant: "accent", children: /* @__PURE__ */ b(U, { gap: 8, children: [
5948
+ /* @__PURE__ */ b(
5932
5949
  "div",
5933
5950
  {
5934
5951
  style: {
@@ -5963,7 +5980,7 @@ const ia = {
5963
5980
  ]
5964
5981
  }
5965
5982
  ),
5966
- /* @__PURE__ */ E(
5983
+ /* @__PURE__ */ b(
5967
5984
  "div",
5968
5985
  {
5969
5986
  style: {
@@ -5972,19 +5989,19 @@ const ia = {
5972
5989
  gap: 12
5973
5990
  },
5974
5991
  children: [
5975
- e !== void 0 && /* @__PURE__ */ E("div", { children: [
5992
+ e !== void 0 && /* @__PURE__ */ b("div", { children: [
5976
5993
  /* @__PURE__ */ A(w, { body: "Searched", variant: "muted" }),
5977
5994
  /* @__PURE__ */ A(w, { body: e, variant: "title" })
5978
5995
  ] }),
5979
- t !== void 0 && /* @__PURE__ */ E("div", { children: [
5996
+ t !== void 0 && /* @__PURE__ */ b("div", { children: [
5980
5997
  /* @__PURE__ */ A(w, { body: "Matches", variant: "muted" }),
5981
5998
  /* @__PURE__ */ A(w, { body: String(t), variant: "title" })
5982
5999
  ] }),
5983
- s !== void 0 && /* @__PURE__ */ E("div", { children: [
6000
+ s !== void 0 && /* @__PURE__ */ b("div", { children: [
5984
6001
  /* @__PURE__ */ A(w, { body: "Speed", variant: "muted" }),
5985
6002
  /* @__PURE__ */ A(w, { body: `${s.toLocaleString()}/s`, variant: "title" })
5986
6003
  ] }),
5987
- r && /* @__PURE__ */ E("div", { children: [
6004
+ r && /* @__PURE__ */ b("div", { children: [
5988
6005
  /* @__PURE__ */ A(w, { body: "Time", variant: "muted" }),
5989
6006
  /* @__PURE__ */ A(w, { body: r, variant: "title" })
5990
6007
  ] })
@@ -5998,7 +6015,7 @@ const ia = {
5998
6015
  className: t = ""
5999
6016
  }) => {
6000
6017
  const [s, r] = re(!1);
6001
- return s ? null : /* @__PURE__ */ E(
6018
+ return s ? null : /* @__PURE__ */ b(
6002
6019
  "div",
6003
6020
  {
6004
6021
  className: t,
@@ -6013,7 +6030,7 @@ const ia = {
6013
6030
  gap: 12
6014
6031
  },
6015
6032
  children: [
6016
- /* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
6033
+ /* @__PURE__ */ b("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
6017
6034
  /* @__PURE__ */ A("span", { style: { color: "var(--j-red)", fontSize: "var(--j-text-lg)" }, children: "⚠" }),
6018
6035
  /* @__PURE__ */ A(w, { body: n, variant: "error" })
6019
6036
  ] }),
@@ -6040,7 +6057,7 @@ const ia = {
6040
6057
  }, vi = ({
6041
6058
  text: n = "Loading...",
6042
6059
  className: e = ""
6043
- }) => /* @__PURE__ */ E(
6060
+ }) => /* @__PURE__ */ b(
6044
6061
  "div",
6045
6062
  {
6046
6063
  className: e,
@@ -6102,8 +6119,8 @@ const ia = {
6102
6119
  onMouseLeave: (l) => {
6103
6120
  a && (l.currentTarget.style.borderColor = "var(--j-panel-edge)", l.currentTarget.style.transform = "translateY(0)", l.currentTarget.style.boxShadow = "none");
6104
6121
  },
6105
- children: /* @__PURE__ */ E(U, { gap: 8, children: [
6106
- /* @__PURE__ */ E(
6122
+ children: /* @__PURE__ */ b(U, { gap: 8, children: [
6123
+ /* @__PURE__ */ b(
6107
6124
  "div",
6108
6125
  {
6109
6126
  style: {
@@ -6112,8 +6129,8 @@ const ia = {
6112
6129
  justifyContent: "space-between"
6113
6130
  },
6114
6131
  children: [
6115
- /* @__PURE__ */ E("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
6116
- t !== void 0 && /* @__PURE__ */ E(
6132
+ /* @__PURE__ */ b("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
6133
+ t !== void 0 && /* @__PURE__ */ b(
6117
6134
  "span",
6118
6135
  {
6119
6136
  style: {
@@ -6147,7 +6164,7 @@ const ia = {
6147
6164
  className: r = ""
6148
6165
  }) => {
6149
6166
  const [i, a] = re(0), o = Math.ceil((t ?? n.length) / s) - 1, l = i * s, c = n.slice(l, l + s);
6150
- return /* @__PURE__ */ E(U, { gap: 12, className: r, children: [
6167
+ return /* @__PURE__ */ b(U, { gap: 12, className: r, children: [
6151
6168
  c.map((f, u) => /* @__PURE__ */ A(
6152
6169
  Es,
6153
6170
  {
@@ -6158,7 +6175,7 @@ const ia = {
6158
6175
  },
6159
6176
  f
6160
6177
  )),
6161
- o > 0 && /* @__PURE__ */ E(
6178
+ o > 0 && /* @__PURE__ */ b(
6162
6179
  "div",
6163
6180
  {
6164
6181
  style: {
@@ -6233,7 +6250,7 @@ const ia = {
6233
6250
  Polychrome: "purple",
6234
6251
  Negative: "red"
6235
6252
  };
6236
- return /* @__PURE__ */ E("div", { className: s, style: { display: "flex", alignItems: "center", gap: 6 }, children: [
6253
+ return /* @__PURE__ */ b("div", { className: s, style: { display: "flex", alignItems: "center", gap: 6 }, children: [
6237
6254
  /* @__PURE__ */ A(N, { label: n, tone: r[t ?? ""] || "grey" }),
6238
6255
  e && /* @__PURE__ */ A(N, { label: e, tone: i[e] || "grey" })
6239
6256
  ] });
@@ -6307,7 +6324,7 @@ const ia = {
6307
6324
  const [i, a] = re(!1), o = () => {
6308
6325
  t && t.length > 0 && a((c) => !c);
6309
6326
  };
6310
- return /* @__PURE__ */ E(
6327
+ return /* @__PURE__ */ b(
6311
6328
  "div",
6312
6329
  {
6313
6330
  className: `${r} ${n === "happy" ? "jammy-bounce" : n === "surprised" ? "jammy-shake" : "jammy-idle"}`.trim(),
@@ -7271,8 +7288,8 @@ const zi = ({
7271
7288
  Retrigger: "orange",
7272
7289
  Utility: "grey"
7273
7290
  }, i = e ? Mi(n) : [];
7274
- return /* @__PURE__ */ A(G, { className: t, children: /* @__PURE__ */ E(U, { gap: 8, children: [
7275
- /* @__PURE__ */ E(
7291
+ return /* @__PURE__ */ A(G, { className: t, children: /* @__PURE__ */ b(U, { gap: 8, children: [
7292
+ /* @__PURE__ */ b(
7276
7293
  "div",
7277
7294
  {
7278
7295
  style: {
@@ -7284,7 +7301,7 @@ const zi = ({
7284
7301
  },
7285
7302
  children: [
7286
7303
  /* @__PURE__ */ A(w, { body: s.name, variant: "title" }),
7287
- /* @__PURE__ */ E("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
7304
+ /* @__PURE__ */ b("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
7288
7305
  /* @__PURE__ */ A(
7289
7306
  N,
7290
7307
  {
@@ -7297,7 +7314,7 @@ const zi = ({
7297
7314
  ]
7298
7315
  }
7299
7316
  ),
7300
- /* @__PURE__ */ E("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: [
7317
+ /* @__PURE__ */ b("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: [
7301
7318
  /* @__PURE__ */ A(N, { label: s.category, tone: r[s.category] }),
7302
7319
  /* @__PURE__ */ A(N, { label: s.jamlKey, tone: "grey" })
7303
7320
  ] }),
@@ -7305,7 +7322,7 @@ const zi = ({
7305
7322
  /* @__PURE__ */ A(Z, {}),
7306
7323
  /* @__PURE__ */ A(w, { body: "Strategy", variant: "accent" }),
7307
7324
  /* @__PURE__ */ A(w, { body: s.strategy, variant: "muted" }),
7308
- i.length > 0 && /* @__PURE__ */ E(Ve, { children: [
7325
+ i.length > 0 && /* @__PURE__ */ b(Ve, { children: [
7309
7326
  /* @__PURE__ */ A(Z, {}),
7310
7327
  /* @__PURE__ */ A(w, { body: "Synergies", variant: "accent" }),
7311
7328
  /* @__PURE__ */ A("div", { style: { display: "flex", flexWrap: "wrap", gap: 6 }, children: i.map((a) => /* @__PURE__ */ A(N, { label: a.name, tone: "purple" }, a.name)) })
@@ -7324,8 +7341,8 @@ const zi = ({
7324
7341
  Hard: "red",
7325
7342
  Legendary: "gold"
7326
7343
  };
7327
- return /* @__PURE__ */ A(G, { className: e, variant: "accent", children: /* @__PURE__ */ E(U, { gap: 10, children: [
7328
- /* @__PURE__ */ E(
7344
+ return /* @__PURE__ */ A(G, { className: e, variant: "accent", children: /* @__PURE__ */ b(U, { gap: 10, children: [
7345
+ /* @__PURE__ */ b(
7329
7346
  "div",
7330
7347
  {
7331
7348
  style: {
@@ -7348,8 +7365,8 @@ const zi = ({
7348
7365
  /* @__PURE__ */ A(w, { body: t.math, variant: "muted" }),
7349
7366
  /* @__PURE__ */ A(Z, {}),
7350
7367
  /* @__PURE__ */ A(w, { body: "Setup Steps", variant: "accent" }),
7351
- /* @__PURE__ */ A(U, { gap: 6, children: t.setup.map((r, i) => /* @__PURE__ */ E("div", { style: { display: "flex", gap: 8, alignItems: "flex-start" }, children: [
7352
- /* @__PURE__ */ E("span", { style: { color: "var(--j-gold)", fontWeight: 700, minWidth: 20 }, children: [
7368
+ /* @__PURE__ */ A(U, { gap: 6, children: t.setup.map((r, i) => /* @__PURE__ */ b("div", { style: { display: "flex", gap: 8, alignItems: "flex-start" }, children: [
7369
+ /* @__PURE__ */ b("span", { style: { color: "var(--j-gold)", fontWeight: 700, minWidth: 20 }, children: [
7353
7370
  i + 1,
7354
7371
  "."
7355
7372
  ] }),
@@ -7378,8 +7395,8 @@ const zi = ({
7378
7395
  Scaler: "purple",
7379
7396
  Economic: "gold"
7380
7397
  };
7381
- return /* @__PURE__ */ A(G, { className: e, children: /* @__PURE__ */ E(U, { gap: 8, children: [
7382
- /* @__PURE__ */ E(
7398
+ return /* @__PURE__ */ A(G, { className: e, children: /* @__PURE__ */ b(U, { gap: 8, children: [
7399
+ /* @__PURE__ */ b(
7383
7400
  "div",
7384
7401
  {
7385
7402
  style: {
@@ -7391,7 +7408,7 @@ const zi = ({
7391
7408
  },
7392
7409
  children: [
7393
7410
  /* @__PURE__ */ A(w, { body: t.name, variant: "title" }),
7394
- /* @__PURE__ */ E("div", { style: { display: "flex", gap: 6 }, children: [
7411
+ /* @__PURE__ */ b("div", { style: { display: "flex", gap: 6 }, children: [
7395
7412
  /* @__PURE__ */ A(N, { label: t.category, tone: r[t.category] }),
7396
7413
  /* @__PURE__ */ A(N, { label: t.threatLevel, tone: s[t.threatLevel] })
7397
7414
  ] })
@@ -7432,8 +7449,8 @@ const zi = ({
7432
7449
  Medium: "orange",
7433
7450
  Hard: "red"
7434
7451
  };
7435
- return /* @__PURE__ */ A(G, { className: e, children: /* @__PURE__ */ E(U, { gap: 8, children: [
7436
- /* @__PURE__ */ E(
7452
+ return /* @__PURE__ */ A(G, { className: e, children: /* @__PURE__ */ b(U, { gap: 8, children: [
7453
+ /* @__PURE__ */ b(
7437
7454
  "div",
7438
7455
  {
7439
7456
  style: {
@@ -7471,8 +7488,8 @@ const zi = ({
7471
7488
  Hard: "red",
7472
7489
  Expert: "purple"
7473
7490
  };
7474
- return /* @__PURE__ */ A(G, { className: e, children: /* @__PURE__ */ E(U, { gap: 8, children: [
7475
- /* @__PURE__ */ E(
7491
+ return /* @__PURE__ */ A(G, { className: e, children: /* @__PURE__ */ b(U, { gap: 8, children: [
7492
+ /* @__PURE__ */ b(
7476
7493
  "div",
7477
7494
  {
7478
7495
  style: {
@@ -7501,22 +7518,22 @@ const zi = ({
7501
7518
  const t = n.map((a) => et(a)).filter((a) => a !== void 0), r = ks(n.join(" ")).filter(
7502
7519
  (a) => a.jokers.some((o) => n.map((l) => l.toLowerCase()).includes(o.toLowerCase()))
7503
7520
  ), i = /* @__PURE__ */ new Set();
7504
- return r.forEach((a) => a.bossCounters.forEach((o) => i.add(o))), /* @__PURE__ */ A(G, { className: e, variant: "accent", children: /* @__PURE__ */ E(U, { gap: 12, children: [
7521
+ return r.forEach((a) => a.bossCounters.forEach((o) => i.add(o))), /* @__PURE__ */ A(G, { className: e, variant: "accent", children: /* @__PURE__ */ b(U, { gap: 12, children: [
7505
7522
  /* @__PURE__ */ A(w, { body: `Strategy Advisor (${t.length} jokers)`, variant: "title" }),
7506
- t.length > 0 && /* @__PURE__ */ E(Ve, { children: [
7523
+ t.length > 0 && /* @__PURE__ */ b(Ve, { children: [
7507
7524
  /* @__PURE__ */ A(w, { body: "Detected Jokers", variant: "accent" }),
7508
7525
  /* @__PURE__ */ A("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: t.map((a) => /* @__PURE__ */ A(N, { label: a.name, tone: "blue" }, a.name)) })
7509
7526
  ] }),
7510
- r.length > 0 && /* @__PURE__ */ E(Ve, { children: [
7527
+ r.length > 0 && /* @__PURE__ */ b(Ve, { children: [
7511
7528
  /* @__PURE__ */ A(Z, {}),
7512
7529
  /* @__PURE__ */ A(w, { body: "Recommended Strategies", variant: "accent" }),
7513
- /* @__PURE__ */ A(U, { gap: 8, children: r.slice(0, 3).map((a) => /* @__PURE__ */ E("div", { children: [
7530
+ /* @__PURE__ */ A(U, { gap: 8, children: r.slice(0, 3).map((a) => /* @__PURE__ */ b("div", { children: [
7514
7531
  /* @__PURE__ */ A(w, { body: a.name, variant: "body" }),
7515
7532
  /* @__PURE__ */ A(w, { body: a.description, variant: "muted" }),
7516
7533
  /* @__PURE__ */ A("div", { style: { display: "flex", gap: 4, flexWrap: "wrap", marginTop: 4 }, children: a.jokers.map((o) => /* @__PURE__ */ A(N, { label: o, tone: "purple" }, o)) })
7517
7534
  ] }, a.name)) })
7518
7535
  ] }),
7519
- i.size > 0 && /* @__PURE__ */ E(Ve, { children: [
7536
+ i.size > 0 && /* @__PURE__ */ b(Ve, { children: [
7520
7537
  /* @__PURE__ */ A(Z, {}),
7521
7538
  /* @__PURE__ */ A(w, { body: "Boss Blind Warnings", variant: "accent" }),
7522
7539
  /* @__PURE__ */ A("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: Array.from(i).map((a) => /* @__PURE__ */ A(N, { label: a, tone: "red" }, a)) })