jaml-ui 4.4.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/assets/jammy-seed-mascot.png +0 -0
  2. package/dist/assets/8BitDeck-B09C1jGy.png +0 -0
  3. package/dist/assets/BlindChips-Bnvhn76w.png +0 -0
  4. package/dist/assets/Boosters-Bqv_YhIn.png +0 -0
  5. package/dist/assets/Editions-B3YPqPOl.png +0 -0
  6. package/dist/assets/Enhancers-DhIlUuTX.png +0 -0
  7. package/dist/assets/Jokers-1egXSFFQ.png +0 -0
  8. package/dist/assets/Tarots-DkrFk7iW.png +0 -0
  9. package/dist/assets/Vouchers-Cdp8BeSE.png +0 -0
  10. package/dist/assets/balatro-stake-chips-BdO-bw7c.png +0 -0
  11. package/dist/assets/jammy-seed-mascot-BdoW3O33.png +0 -0
  12. package/dist/assets/m6x11plus-C8RqtTtG.ttf +0 -0
  13. package/dist/assets/stickers-B6y5vEyc.png +0 -0
  14. package/dist/assets/tags-BdxcVWR4.png +0 -0
  15. package/dist/assets.js +38 -0
  16. package/dist/assets.js.map +1 -0
  17. package/dist/chunks/JimboSwipeDeck-eog6nv7F.js +2122 -0
  18. package/dist/chunks/JimboSwipeDeck-eog6nv7F.js.map +1 -0
  19. package/dist/components/DailyRitualView.d.ts +17 -0
  20. package/dist/components/DeckStakePicker.d.ts +12 -0
  21. package/dist/components/JamlIdeToolbar.d.ts +2 -5
  22. package/dist/components/JamlIdeVisual.d.ts +2 -1
  23. package/dist/components/Jamlyzer.d.ts +14 -2
  24. package/dist/components/JamlyzerBulk.d.ts +5 -4
  25. package/dist/components/JamlyzerView.d.ts +1 -12
  26. package/dist/components/SeedCalculus.d.ts +17 -0
  27. package/dist/components/SeedLab.d.ts +21 -0
  28. package/dist/components/jamlSeedUtils.d.ts +1 -0
  29. package/dist/components/jamlyzer/JamlyzerAnteDetails.d.ts +4 -0
  30. package/dist/components/jamlyzer/JamlyzerErraticDeck.d.ts +2 -2
  31. package/dist/components/jamlyzer/JamlyzerPackSection.d.ts +1 -5
  32. package/dist/components/jamlyzer/JamlyzerPulls.d.ts +2 -2
  33. package/dist/components/jamlyzer/JamlyzerSeedCard.d.ts +21 -0
  34. package/dist/components/jamlyzer/JamlyzerTape.d.ts +10 -0
  35. package/dist/components/jamlyzer/highlight.d.ts +3 -3
  36. package/dist/decode/motelyItemDecoder.d.ts +1 -0
  37. package/dist/decode/motelySprite.d.ts +10 -13
  38. package/dist/decode/motelySpriteLut.generated.d.ts +2 -0
  39. package/dist/index.d.ts +14 -1
  40. package/dist/index.js +20029 -16982
  41. package/dist/index.js.map +1 -1
  42. package/dist/json-render/JimboJsonRenderer.d.ts +21 -0
  43. package/dist/json-render/catalog.d.ts +304 -180
  44. package/dist/json-render/index.d.ts +5 -30
  45. package/dist/json-render/registry.d.ts +2 -12
  46. package/dist/lib/daily/ritual.d.ts +43 -0
  47. package/dist/lib/jaml/{parseClauses.d.ts → jaml.d.ts} +17 -13
  48. package/dist/lib/jaml/rarity.d.ts +53 -0
  49. package/dist/lib/jaml/rarityData.generated.d.ts +727 -0
  50. package/dist/motely.js +688 -76
  51. package/dist/motely.js.map +1 -1
  52. package/dist/sprites.js +438 -0
  53. package/dist/sprites.js.map +1 -0
  54. package/dist/ui/JimboApp.d.ts +8 -6
  55. package/dist/ui/JimboBackground.d.ts +5 -13
  56. package/dist/ui/JimboButton.d.ts +1 -1
  57. package/dist/ui/JimboDock.d.ts +21 -0
  58. package/dist/ui/JimboMascot.d.ts +51 -5
  59. package/dist/ui/JimboOrbitalMenu.d.ts +81 -9
  60. package/dist/ui/JimboPanelSpinner.d.ts +14 -0
  61. package/dist/ui/JimboSeedCopyChip.d.ts +1 -2
  62. package/dist/ui/JimboShopBelt.d.ts +9 -0
  63. package/dist/ui/JimboSlider.d.ts +11 -0
  64. package/dist/ui/dockTree.d.ts +31 -0
  65. package/dist/ui/hooks.d.ts +1 -1
  66. package/dist/ui/jammySeedMascotImage.d.ts +1 -1
  67. package/dist/ui/jimbo.css +1 -1
  68. package/dist/ui/orbitalLayout.d.ts +149 -0
  69. package/dist/ui/orbitalMenuStore.d.ts +70 -0
  70. package/dist/ui/tokens.d.ts +9 -36
  71. package/dist/ui/useMotionPreference.d.ts +19 -0
  72. package/dist/ui.d.ts +18 -3
  73. package/dist/ui.js +78 -34
  74. package/dist/vocab.d.ts +26 -0
  75. package/package.json +136 -126
  76. package/README.md +0 -78
  77. package/assets/fonts/README.md +0 -14
  78. package/dist/chunks/JimboSwipeDeck-Cbe5Jdmw.js +0 -986
  79. package/dist/chunks/JimboSwipeDeck-Cbe5Jdmw.js.map +0 -1
  80. package/dist/chunks/Layer-B5y9UIAt.js +0 -19
  81. package/dist/chunks/Layer-B5y9UIAt.js.map +0 -1
  82. package/dist/chunks/motelyItemDecoder-Cb-RjvQ0.js +0 -692
  83. package/dist/chunks/motelyItemDecoder-Cb-RjvQ0.js.map +0 -1
  84. package/dist/chunks/spriteMapper-Dfr2_j0_.js +0 -501
  85. package/dist/chunks/spriteMapper-Dfr2_j0_.js.map +0 -1
  86. package/dist/components/jamlyzer/JamlyzerRail.d.ts +0 -14
  87. package/dist/core.d.ts +0 -5
  88. package/dist/core.js +0 -41
  89. package/dist/core.js.map +0 -1
  90. package/dist/json-render/builders/analyzer.d.ts +0 -23
  91. package/dist/json-render/builders/encyclopedia.d.ts +0 -14
  92. package/dist/json-render/builders/search.d.ts +0 -24
  93. package/dist/json-render/components/domain.d.ts +0 -59
  94. package/dist/json-render/components/game.d.ts +0 -18
  95. package/dist/json-render/components/layout.d.ts +0 -47
  96. package/dist/json-render/components/mascot.d.ts +0 -23
  97. package/dist/json-render/components/reference.d.ts +0 -39
  98. package/dist/json-render/engine.d.ts +0 -38
  99. package/dist/json-render/knowledge/bosses.d.ts +0 -18
  100. package/dist/json-render/knowledge/decks.d.ts +0 -22
  101. package/dist/json-render/knowledge/jokers.d.ts +0 -23
  102. package/dist/json-render/knowledge/synergies.d.ts +0 -21
  103. package/dist/lib/motely/jamlParse.d.ts +0 -4
  104. package/dist/lib/motely/runtime.d.ts +0 -1
  105. package/dist/motely.d.ts +0 -4
@@ -0,0 +1,2122 @@
1
+ import { jsx as a, jsxs as _, Fragment as Xe } from "react/jsx-runtime";
2
+ import z, { useState as T, useRef as J, useEffect as W, useId as He, useCallback as Q, useLayoutEffect as Ae, useSyncExternalStore as Ze, useMemo as Pe, Children as Ve } from "react";
3
+ import { resolveJamlAssetUrl as qe } from "../assets.js";
4
+ import { JOKERS as Qe, JOKER_FACES as et, TAROTS_AND_PLANETS as tt, CONSUMABLE_FACES as nt, VOUCHERS as rt, BOSSES as ot, TAGS as at, BOOSTER_PACKS as it } from "../sprites.js";
5
+ const $ = z.forwardRef(
6
+ function({ as: t = "div", children: n, ...r }, o) {
7
+ return /* @__PURE__ */ a(t, { ref: o, ...r, children: n });
8
+ }
9
+ ), Cn = z.forwardRef(
10
+ function({ children: t, ...n }, r) {
11
+ return /* @__PURE__ */ a("canvas", { ref: r, ...n, children: t });
12
+ }
13
+ ), st = {
14
+ red: "j-section-header__tag--red",
15
+ orange: "j-section-header__tag--orange",
16
+ blue: "j-section-header__tag--blue",
17
+ green: "j-section-header__tag--green",
18
+ purple: "j-section-header__tag--purple",
19
+ gold: "j-section-header__tag--gold",
20
+ grey: "j-section-header__tag--grey"
21
+ }, lt = {
22
+ red: "j-section-header__rule--red",
23
+ orange: "j-section-header__rule--orange",
24
+ blue: "j-section-header__rule--blue",
25
+ green: "j-section-header__rule--green",
26
+ purple: "j-section-header__rule--purple",
27
+ gold: "j-section-header__rule--gold",
28
+ grey: "j-section-header__rule--grey"
29
+ };
30
+ function ct({
31
+ label: e,
32
+ tone: t = "blue",
33
+ className: n,
34
+ ...r
35
+ }) {
36
+ const o = ["j-section-header", n].filter(Boolean).join(" ");
37
+ return /* @__PURE__ */ _("div", { className: o, ...r, children: [
38
+ /* @__PURE__ */ a("span", { className: `j-section-header__tag ${st[t]}`, children: e }),
39
+ /* @__PURE__ */ a("span", { className: `j-section-header__rule ${lt[t]}`, "aria-hidden": !0 })
40
+ ] });
41
+ }
42
+ function Ln({
43
+ title: e,
44
+ tone: t = "blue",
45
+ body: n,
46
+ className: r,
47
+ children: o,
48
+ ...i
49
+ }) {
50
+ const s = ["j-panel", r].filter(Boolean).join(" "), u = n ?? !!e;
51
+ return /* @__PURE__ */ _("div", { className: s, ...i, children: [
52
+ e != null && e !== !1 ? /* @__PURE__ */ a(ct, { label: e, tone: t }) : null,
53
+ u ? /* @__PURE__ */ a("div", { className: "j-panel__body", children: o }) : o
54
+ ] });
55
+ }
56
+ const ut = {
57
+ micro: "j-text--micro",
58
+ xs: "j-text--xs",
59
+ sm: "j-text--sm",
60
+ md: "j-text--md",
61
+ lg: "j-text--lg",
62
+ xl: "j-text--xl",
63
+ display: "j-text--display"
64
+ }, dt = {
65
+ white: "j-text--white",
66
+ grey: "j-text--grey",
67
+ gold: "j-text--gold",
68
+ red: "j-text--red",
69
+ blue: "j-text--blue",
70
+ green: "j-text--green",
71
+ orange: "j-text--orange",
72
+ purple: "j-text--purple"
73
+ };
74
+ function K({ size: e = "md", tone: t = "white", className: n, children: r, ...o }) {
75
+ const i = ["j-text", ut[e], dt[t], n].filter(Boolean).join(" ");
76
+ return /* @__PURE__ */ a("span", { className: i, ...o, children: r });
77
+ }
78
+ const pt = {
79
+ "j-stack": {
80
+ gap: {
81
+ xs: "j-stack--gap-xs",
82
+ sm: "j-stack--gap-sm",
83
+ md: "j-stack--gap-md",
84
+ lg: "j-stack--gap-lg",
85
+ xl: "j-stack--gap-xl"
86
+ },
87
+ align: {
88
+ start: "j-stack--align-start",
89
+ center: "j-stack--align-center",
90
+ end: "j-stack--align-end",
91
+ stretch: "j-stack--align-stretch"
92
+ },
93
+ justify: {
94
+ start: "j-stack--justify-start",
95
+ center: "j-stack--justify-center",
96
+ end: "j-stack--justify-end",
97
+ between: "j-stack--justify-between"
98
+ }
99
+ },
100
+ "j-row": {
101
+ gap: {
102
+ xs: "j-row--gap-xs",
103
+ sm: "j-row--gap-sm",
104
+ md: "j-row--gap-md",
105
+ lg: "j-row--gap-lg",
106
+ xl: "j-row--gap-xl"
107
+ },
108
+ align: {
109
+ start: "j-row--align-start",
110
+ center: "j-row--align-center",
111
+ end: "j-row--align-end",
112
+ stretch: "j-row--align-stretch"
113
+ },
114
+ justify: {
115
+ start: "j-row--justify-start",
116
+ center: "j-row--justify-center",
117
+ end: "j-row--justify-end",
118
+ between: "j-row--justify-between"
119
+ }
120
+ }
121
+ };
122
+ function Te(e, { gap: t = "md", align: n, justify: r }, o, i) {
123
+ const s = pt[e];
124
+ return [
125
+ e,
126
+ s.gap[t],
127
+ n && s.align[n],
128
+ r && s.justify[r],
129
+ i,
130
+ o
131
+ ].filter(Boolean).join(" ");
132
+ }
133
+ function An({
134
+ gap: e,
135
+ align: t,
136
+ justify: n,
137
+ className: r,
138
+ children: o,
139
+ ...i
140
+ }) {
141
+ return /* @__PURE__ */ a("div", { className: Te("j-stack", { gap: e, align: t, justify: n }, r), ...i, children: o });
142
+ }
143
+ function ft({
144
+ gap: e,
145
+ align: t = "center",
146
+ justify: n,
147
+ wrap: r,
148
+ className: o,
149
+ children: i,
150
+ ...s
151
+ }) {
152
+ return /* @__PURE__ */ a(
153
+ "div",
154
+ {
155
+ className: Te(
156
+ "j-row",
157
+ { gap: e, align: t, justify: n },
158
+ o,
159
+ r ? "j-row--wrap" : void 0
160
+ ),
161
+ ...s,
162
+ children: i
163
+ }
164
+ );
165
+ }
166
+ var Re = {
167
+ color: void 0,
168
+ size: void 0,
169
+ className: void 0,
170
+ style: void 0,
171
+ attr: void 0
172
+ }, je = z.createContext && /* @__PURE__ */ z.createContext(Re), mt = ["attr", "size", "title"];
173
+ function ht(e, t) {
174
+ if (e == null) return {};
175
+ var n, r, o = gt(e, t);
176
+ if (Object.getOwnPropertySymbols) {
177
+ var i = Object.getOwnPropertySymbols(e);
178
+ for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
179
+ }
180
+ return o;
181
+ }
182
+ function gt(e, t) {
183
+ if (e == null) return {};
184
+ var n = {};
185
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
186
+ if (t.indexOf(r) !== -1) continue;
187
+ n[r] = e[r];
188
+ }
189
+ return n;
190
+ }
191
+ function se() {
192
+ return se = Object.assign ? Object.assign.bind() : function(e) {
193
+ for (var t = 1; t < arguments.length; t++) {
194
+ var n = arguments[t];
195
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
196
+ }
197
+ return e;
198
+ }, se.apply(null, arguments);
199
+ }
200
+ function ve(e, t) {
201
+ var n = Object.keys(e);
202
+ if (Object.getOwnPropertySymbols) {
203
+ var r = Object.getOwnPropertySymbols(e);
204
+ t && (r = r.filter(function(o) {
205
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
206
+ })), n.push.apply(n, r);
207
+ }
208
+ return n;
209
+ }
210
+ function le(e) {
211
+ for (var t = 1; t < arguments.length; t++) {
212
+ var n = arguments[t] != null ? arguments[t] : {};
213
+ t % 2 ? ve(Object(n), !0).forEach(function(r) {
214
+ bt(e, r, n[r]);
215
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ve(Object(n)).forEach(function(r) {
216
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
217
+ });
218
+ }
219
+ return e;
220
+ }
221
+ function bt(e, t, n) {
222
+ return (t = jt(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
223
+ }
224
+ function jt(e) {
225
+ var t = vt(e, "string");
226
+ return typeof t == "symbol" ? t : t + "";
227
+ }
228
+ function vt(e, t) {
229
+ if (typeof e != "object" || !e) return e;
230
+ var n = e[Symbol.toPrimitive];
231
+ if (n !== void 0) {
232
+ var r = n.call(e, t);
233
+ if (typeof r != "object") return r;
234
+ throw new TypeError("@@toPrimitive must return a primitive value.");
235
+ }
236
+ return (t === "string" ? String : Number)(e);
237
+ }
238
+ function Be(e) {
239
+ return e && e.map((t, n) => /* @__PURE__ */ z.createElement(t.tag, le({
240
+ key: n
241
+ }, t.attr), Be(t.child)));
242
+ }
243
+ function I(e) {
244
+ return (t) => /* @__PURE__ */ z.createElement(_t, se({
245
+ attr: le({}, e.attr)
246
+ }, t), Be(e.child));
247
+ }
248
+ function _t(e) {
249
+ var t = (n) => {
250
+ var r = e.attr, o = e.size, i = e.title, s = ht(e, mt), u = o || n.size || "1em", p;
251
+ return n.className && (p = n.className), e.className && (p = (p ? p + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", se({
252
+ stroke: "currentColor",
253
+ fill: "currentColor",
254
+ strokeWidth: "0"
255
+ }, n.attr, r, s, {
256
+ className: p,
257
+ style: le(le({
258
+ color: e.color || n.color
259
+ }, n.style), e.style),
260
+ height: u,
261
+ width: u,
262
+ xmlns: "http://www.w3.org/2000/svg"
263
+ }), i && /* @__PURE__ */ z.createElement("title", null, i), e.children);
264
+ };
265
+ return je !== void 0 ? /* @__PURE__ */ z.createElement(je.Consumer, null, (n) => t(n)) : t(Re);
266
+ }
267
+ function Me(e) {
268
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "line", attr: { x1: "18", y1: "6", x2: "6", y2: "18" }, child: [] }, { tag: "line", attr: { x1: "6", y1: "6", x2: "18", y2: "18" }, child: [] }] })(e);
269
+ }
270
+ function Pn(e) {
271
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }, child: [] }] })(e);
272
+ }
273
+ function Tn(e) {
274
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(e);
275
+ }
276
+ function yt(e) {
277
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "1 4 1 10 7 10" }, child: [] }, { tag: "path", attr: { d: "M3.51 15a9 9 0 1 0 2.13-9.36L1 10" }, child: [] }] })(e);
278
+ }
279
+ function Rn(e) {
280
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "5 3 19 12 5 21 5 3" }, child: [] }] })(e);
281
+ }
282
+ function xt(e) {
283
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "5 9 2 12 5 15" }, child: [] }, { tag: "polyline", attr: { points: "9 5 12 2 15 5" }, child: [] }, { tag: "polyline", attr: { points: "15 19 12 22 9 19" }, child: [] }, { tag: "polyline", attr: { points: "19 9 22 12 19 15" }, child: [] }, { tag: "line", attr: { x1: "2", y1: "12", x2: "22", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "2", x2: "12", y2: "22" }, child: [] }] })(e);
284
+ }
285
+ function kt(e) {
286
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "4 14 10 14 10 20" }, child: [] }, { tag: "polyline", attr: { points: "20 10 14 10 14 4" }, child: [] }, { tag: "line", attr: { x1: "14", y1: "10", x2: "21", y2: "3" }, child: [] }, { tag: "line", attr: { x1: "3", y1: "21", x2: "10", y2: "14" }, child: [] }] })(e);
287
+ }
288
+ function St(e) {
289
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "15 3 21 3 21 9" }, child: [] }, { tag: "polyline", attr: { points: "9 21 3 21 3 15" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "3", x2: "14", y2: "10" }, child: [] }, { tag: "line", attr: { x1: "3", y1: "21", x2: "10", y2: "14" }, child: [] }] })(e);
290
+ }
291
+ function Bn(e) {
292
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, child: [] }, { tag: "polyline", attr: { points: "7 10 12 15 17 10" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "15", x2: "12", y2: "3" }, child: [] }] })(e);
293
+ }
294
+ function wt(e) {
295
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "rect", attr: { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, child: [] }, { tag: "path", attr: { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, child: [] }] })(e);
296
+ }
297
+ function Mn(e) {
298
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "16 18 22 12 16 6" }, child: [] }, { tag: "polyline", attr: { points: "8 6 2 12 8 18" }, child: [] }] })(e);
299
+ }
300
+ function Nt(e) {
301
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "9 18 15 12 9 6" }, child: [] }] })(e);
302
+ }
303
+ function Et(e) {
304
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "15 18 9 12 15 6" }, child: [] }] })(e);
305
+ }
306
+ function Oe(e) {
307
+ return I({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "20 6 9 17 4 12" }, child: [] }] })(e);
308
+ }
309
+ const Ct = {
310
+ xs: "j-btn--xs",
311
+ sm: "j-btn--sm",
312
+ md: "j-btn--md",
313
+ lg: "j-btn--lg"
314
+ }, Lt = {
315
+ orange: "j-btn--orange",
316
+ red: "j-btn--red",
317
+ blue: "j-btn--blue",
318
+ green: "j-btn--green",
319
+ purple: "j-btn--purple",
320
+ grey: "j-btn--grey"
321
+ };
322
+ function Y({
323
+ size: e = "md",
324
+ tone: t = "orange",
325
+ fullWidth: n = !1,
326
+ label: r,
327
+ className: o,
328
+ children: i,
329
+ disabled: s,
330
+ ...u
331
+ }) {
332
+ const p = [
333
+ "j-btn",
334
+ Ct[e],
335
+ Lt[t],
336
+ n ? "j-btn--full" : "",
337
+ s ? "j-btn--disabled" : "",
338
+ o
339
+ ].filter(Boolean).join(" ");
340
+ return /* @__PURE__ */ a("button", { className: p, disabled: s, ...u, children: /* @__PURE__ */ a("span", { className: "j-btn__face", children: r ?? i }) });
341
+ }
342
+ function On({
343
+ value: e,
344
+ placeholder: t = "--------",
345
+ disabled: n = !1,
346
+ copiedLabel: r = "Copied!",
347
+ copiedDurationMs: o = 2e3,
348
+ onCopy: i,
349
+ className: s = "",
350
+ style: u
351
+ }) {
352
+ const [p, j] = T(!1), l = J(null), c = e.trim(), f = !n && c.length > 0;
353
+ W(
354
+ () => () => {
355
+ l.current && clearTimeout(l.current);
356
+ },
357
+ []
358
+ );
359
+ const y = async () => {
360
+ var k;
361
+ if (f) {
362
+ try {
363
+ typeof navigator < "u" && ((k = navigator.clipboard) != null && k.writeText) && await navigator.clipboard.writeText(c);
364
+ } catch {
365
+ }
366
+ j(!0), i == null || i(c), l.current && clearTimeout(l.current), l.current = setTimeout(() => j(!1), o);
367
+ }
368
+ }, x = ["j-seed-copy", p ? "j-seed-copy--copied" : "", s].filter(Boolean).join(" ");
369
+ return /* @__PURE__ */ _(
370
+ Y,
371
+ {
372
+ className: x,
373
+ style: u,
374
+ onClick: y,
375
+ disabled: !f,
376
+ fullWidth: !0,
377
+ "aria-label": f ? `Copy seed ${c}` : "Seed unavailable",
378
+ children: [
379
+ /* @__PURE__ */ a("span", { className: "j-seed-copy__icon", "aria-hidden": !0, children: p ? /* @__PURE__ */ a(Oe, { size: 18 }) : /* @__PURE__ */ a(wt, { size: 18 }) }),
380
+ /* @__PURE__ */ a("span", { className: "j-seed-copy__text", children: p ? r : c || t })
381
+ ]
382
+ }
383
+ );
384
+ }
385
+ function In({ className: e, children: t, ...n }) {
386
+ const r = ["j-inner-panel", e].filter(Boolean).join(" ");
387
+ return /* @__PURE__ */ a("div", { className: r, ...n, children: t });
388
+ }
389
+ function Dn({ open: e, onClose: t, title: n, className: r, children: o }) {
390
+ const i = He();
391
+ return W(() => {
392
+ if (!e || !t) return;
393
+ const s = (u) => {
394
+ u.key === "Escape" && t();
395
+ };
396
+ return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
397
+ }, [e, t]), e ? /* @__PURE__ */ a("div", { className: "j-modal-overlay", onClick: t, children: /* @__PURE__ */ _(
398
+ "div",
399
+ {
400
+ className: ["j-modal", "j-panel", r].filter(Boolean).join(" "),
401
+ role: "dialog",
402
+ "aria-modal": "true",
403
+ "aria-labelledby": n ? i : void 0,
404
+ onClick: (s) => s.stopPropagation(),
405
+ children: [
406
+ n && /* @__PURE__ */ a("h2", { id: i, className: "j-modal__title", children: n }),
407
+ /* @__PURE__ */ a("div", { className: "j-panel__body", children: o })
408
+ ]
409
+ }
410
+ ) }) : null;
411
+ }
412
+ function Jn({
413
+ value: e,
414
+ label: t,
415
+ onPrev: n,
416
+ onNext: r,
417
+ canPrev: o = !0,
418
+ canNext: i = !0,
419
+ className: s = ""
420
+ }) {
421
+ return /* @__PURE__ */ _("div", { className: `j-spinner-wrap ${s}`, children: [
422
+ t && /* @__PURE__ */ a("div", { className: "j-spinner__label", children: /* @__PURE__ */ a(K, { size: "sm", tone: "white", children: t }) }),
423
+ /* @__PURE__ */ _("div", { className: "j-spinner", children: [
424
+ /* @__PURE__ */ a(
425
+ Y,
426
+ {
427
+ tone: "red",
428
+ size: "sm",
429
+ onClick: n,
430
+ disabled: !o,
431
+ "aria-label": `Previous ${t ?? "value"}`,
432
+ children: "<"
433
+ }
434
+ ),
435
+ /* @__PURE__ */ a("div", { className: "j-spinner__value", children: /* @__PURE__ */ a(K, { size: "sm", tone: "white", children: e }) }),
436
+ /* @__PURE__ */ a(
437
+ Y,
438
+ {
439
+ tone: "red",
440
+ size: "sm",
441
+ onClick: r,
442
+ disabled: !i,
443
+ "aria-label": `Next ${t ?? "value"}`,
444
+ children: ">"
445
+ }
446
+ )
447
+ ] })
448
+ ] });
449
+ }
450
+ const At = {
451
+ RED: "#fe5148",
452
+ BLUE: "#0093ff",
453
+ GREEN: "#429f79",
454
+ ORANGE: "#ff9800",
455
+ GOLD: "#e4b643",
456
+ PURPLE: "#9e74ce",
457
+ PLANET: "#00a7ca",
458
+ SPECTRAL: "#2e76fd",
459
+ DARK_RED: "#a02721",
460
+ DARK_BLUE: "#0057a1",
461
+ DARK_ORANGE: "#a05b00",
462
+ DARK_GREEN: "#215f46",
463
+ DARK_GREY: "#3a5055",
464
+ DARKEST: "#1e2b2d",
465
+ GREY: "#a8bcbf",
466
+ TEAL_GREY: "#404c4e",
467
+ SURFACE: "#3a5055",
468
+ SURFACE_INSET: "#2a3a3f",
469
+ PANEL_EDGE: "#1e2e32",
470
+ INNER_BORDER: "#334461",
471
+ BORDER_SILVER: "#b9c2d2",
472
+ BORDER_SOUTH: "#777e89",
473
+ GREEN_TEXT: "#35bd86",
474
+ WHITE: "#ffffff",
475
+ BLACK: "#000000",
476
+ /** Same decision as GOLD — kept so CodeMirror / old callers don't grow a second gold. */
477
+ GOLD_TEXT: "#e4b643"
478
+ };
479
+ function Fn(e, t) {
480
+ const n = e.replace("#", ""), r = parseInt(n.slice(0, 2), 16), o = parseInt(n.slice(2, 4), 16), i = parseInt(n.slice(4, 6), 16);
481
+ return `rgba(${r}, ${o}, ${i}, ${t})`;
482
+ }
483
+ const $n = {
484
+ JUICE_UP_SCALE: 1.05,
485
+ JUICE_EASING: "cubic-bezier(0.16, 1, 0.3, 1)",
486
+ SWAY_AMOUNT: 1.5,
487
+ SWAY_DURATION: 4e3
488
+ }, Z = At, Pt = {
489
+ xs: 22,
490
+ sm: 26,
491
+ md: 30
492
+ }, Tt = {
493
+ default: { rest: Z.DARKEST, hover: Z.DARK_GREY, border: Z.PANEL_EDGE },
494
+ destructive: { rest: Z.RED, hover: Z.ORANGE, border: Z.BLACK }
495
+ };
496
+ function te({
497
+ onClick: e,
498
+ onMouseDown: t,
499
+ onTouchStart: n,
500
+ title: r,
501
+ "aria-label": o,
502
+ disabled: i = !1,
503
+ size: s = "md",
504
+ tone: u = "default",
505
+ children: p
506
+ }) {
507
+ const [j, l] = T(!1), c = Pt[s], f = Tt[u], y = u === "destructive" ? 2 : 1, x = u === "destructive" ? `inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 ${Z.BLACK}` : void 0;
508
+ return /* @__PURE__ */ a(
509
+ "button",
510
+ {
511
+ "aria-label": o ?? r,
512
+ disabled: i,
513
+ onClick: (k) => !i && (e == null ? void 0 : e(k)),
514
+ onMouseDown: t,
515
+ onTouchStart: n,
516
+ onMouseEnter: () => l(!0),
517
+ onMouseLeave: () => l(!1),
518
+ style: {
519
+ width: c,
520
+ height: c,
521
+ display: "inline-grid",
522
+ placeItems: "center",
523
+ background: j && !i ? f.hover : f.rest,
524
+ color: Z.WHITE,
525
+ border: `${y}px solid ${f.border}`,
526
+ borderRadius: 4,
527
+ boxShadow: x,
528
+ cursor: i ? "not-allowed" : "pointer",
529
+ opacity: i ? 0.55 : 1,
530
+ padding: 0,
531
+ fontSize: 14,
532
+ lineHeight: 1,
533
+ transition: "background 80ms ease"
534
+ },
535
+ title: r,
536
+ type: "button",
537
+ children: p
538
+ }
539
+ );
540
+ }
541
+ const Rt = 280, Bt = 260;
542
+ function zn({ children: e, className: t, onNearEnd: n, snap: r = !1 }) {
543
+ const o = J(null), i = J(null), [s, u] = T(!1), p = Q(() => {
544
+ const c = o.current;
545
+ !c || !n || c.scrollWidth - (c.scrollLeft + c.clientWidth) <= Rt && n();
546
+ }, [n]);
547
+ W(() => {
548
+ const c = o.current;
549
+ if (!c) return;
550
+ const f = (y) => {
551
+ if (c.scrollWidth <= c.clientWidth) return;
552
+ const x = Math.abs(y.deltaY) > Math.abs(y.deltaX) ? y.deltaY : y.deltaX;
553
+ x !== 0 && (c.scrollLeft += x, y.preventDefault(), p());
554
+ };
555
+ return c.addEventListener("wheel", f, { passive: !1 }), () => c.removeEventListener("wheel", f);
556
+ }, [p]);
557
+ const j = (c) => {
558
+ var f;
559
+ (f = o.current) == null || f.scrollBy({ left: c * Bt, behavior: "smooth" }), c > 0 && p();
560
+ }, l = [
561
+ "j-shop-belt",
562
+ "j-shop-belt--grab",
563
+ r ? "j-shop-belt--snap" : "",
564
+ s ? "j-shop-belt--grabbing" : "",
565
+ t
566
+ ].filter(Boolean).join(" ");
567
+ return /* @__PURE__ */ _($, { className: "j-shop-belt-wrap", children: [
568
+ /* @__PURE__ */ a(te, { size: "sm", "aria-label": "Scroll left", onClick: () => j(-1), children: /* @__PURE__ */ a(Et, {}) }),
569
+ /* @__PURE__ */ a(
570
+ $,
571
+ {
572
+ ref: o,
573
+ className: l,
574
+ onScroll: p,
575
+ onPointerDown: (c) => {
576
+ c.button === 0 && (i.current = { id: c.pointerId, x: c.clientX, left: c.currentTarget.scrollLeft }, c.currentTarget.setPointerCapture(c.pointerId), u(!0));
577
+ },
578
+ onPointerMove: (c) => {
579
+ const f = i.current;
580
+ !f || f.id !== c.pointerId || (c.currentTarget.scrollLeft = f.left - (c.clientX - f.x));
581
+ },
582
+ onPointerUp: (c) => {
583
+ var f;
584
+ ((f = i.current) == null ? void 0 : f.id) === c.pointerId && (c.currentTarget.hasPointerCapture(c.pointerId) && c.currentTarget.releasePointerCapture(c.pointerId), i.current = null, u(!1), p());
585
+ },
586
+ onPointerCancel: () => {
587
+ i.current = null, u(!1);
588
+ },
589
+ children: e
590
+ }
591
+ ),
592
+ /* @__PURE__ */ a(te, { size: "sm", "aria-label": "Scroll right", onClick: () => j(1), children: /* @__PURE__ */ a(Nt, {}) })
593
+ ] });
594
+ }
595
+ const Mt = {
596
+ sm: "j-badge--sm",
597
+ md: "j-badge--md"
598
+ }, Ot = {
599
+ dark: "j-badge--dark",
600
+ blue: "j-badge--blue",
601
+ red: "j-badge--red",
602
+ green: "j-badge--green",
603
+ grey: "j-badge--grey",
604
+ orange: "j-badge--orange",
605
+ purple: "j-badge--purple"
606
+ };
607
+ function Un({ size: e = "sm", tone: t = "dark", className: n, children: r, ...o }) {
608
+ const i = ["j-badge", Mt[e], Ot[t], n].filter(Boolean).join(" ");
609
+ return /* @__PURE__ */ a("span", { className: i, ...o, children: r });
610
+ }
611
+ function Wn({ children: e, ...t }) {
612
+ return /* @__PURE__ */ a("span", { ...t, children: e });
613
+ }
614
+ function Gn({ children: e, ...t }) {
615
+ return /* @__PURE__ */ a("a", { ...t, children: e });
616
+ }
617
+ function Kn({ className: e, ref: t, ...n }) {
618
+ const r = ["j-text-input", e].filter(Boolean).join(" ");
619
+ return /* @__PURE__ */ a("input", { ref: t, className: r, ...n });
620
+ }
621
+ function Yn({
622
+ onPrev: e,
623
+ onNext: t,
624
+ canPrev: n = !0,
625
+ canNext: r = !0,
626
+ prevLabel: o = "Previous",
627
+ nextLabel: i = "Next",
628
+ children: s,
629
+ className: u = "",
630
+ style: p
631
+ }) {
632
+ return /* @__PURE__ */ _("div", { className: `j-flank ${u}`, style: p, children: [
633
+ /* @__PURE__ */ a(_e, { direction: "left", onClick: e, disabled: !n, "aria-label": o }),
634
+ /* @__PURE__ */ a("div", { className: "j-flank__content", children: s }),
635
+ /* @__PURE__ */ a(_e, { direction: "right", onClick: t, disabled: !r, "aria-label": i })
636
+ ] });
637
+ }
638
+ function _e({
639
+ direction: e,
640
+ onClick: t,
641
+ disabled: n,
642
+ "aria-label": r
643
+ }) {
644
+ const [o, i] = z.useState(!1);
645
+ return /* @__PURE__ */ a(
646
+ "button",
647
+ {
648
+ type: "button",
649
+ className: "j-flank__btn",
650
+ "data-pressed": o && !n,
651
+ onClick: t,
652
+ disabled: n,
653
+ "aria-label": r,
654
+ title: r,
655
+ onMouseDown: () => !n && i(!0),
656
+ onMouseUp: () => i(!1),
657
+ onMouseLeave: () => i(!1),
658
+ onTouchStart: () => !n && i(!0),
659
+ onTouchEnd: () => i(!1),
660
+ children: /* @__PURE__ */ a(It, { direction: e })
661
+ }
662
+ );
663
+ }
664
+ function It({ direction: e }) {
665
+ return /* @__PURE__ */ a("svg", { width: 28, height: 28, viewBox: "0 0 28 28", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ a("polyline", { points: e === "left" ? "18,4 8,14 18,24" : "10,4 20,14 10,24" }) });
666
+ }
667
+ function Xn({
668
+ label: e,
669
+ title: t,
670
+ description: n,
671
+ media: r,
672
+ onPrev: o,
673
+ onNext: i,
674
+ canPrev: s = !0,
675
+ canNext: u = !0,
676
+ className: p = ""
677
+ }) {
678
+ return /* @__PURE__ */ _("div", { className: ["j-panel-spinner", p].filter(Boolean).join(" "), children: [
679
+ e ? /* @__PURE__ */ a("div", { className: "j-panel-spinner__label", children: /* @__PURE__ */ a(K, { size: "sm", tone: "white", children: e }) }) : null,
680
+ /* @__PURE__ */ _("div", { className: "j-panel-spinner__row", children: [
681
+ /* @__PURE__ */ a(
682
+ Y,
683
+ {
684
+ tone: "red",
685
+ size: "sm",
686
+ className: "j-panel-spinner__arrow j-panel-spinner__arrow--left",
687
+ onClick: o,
688
+ disabled: !s,
689
+ "aria-label": `Previous ${e ?? t}`,
690
+ children: "<"
691
+ }
692
+ ),
693
+ /* @__PURE__ */ _("div", { className: "j-panel-spinner__panel", children: [
694
+ r ? /* @__PURE__ */ a("div", { className: "j-panel-spinner__media", children: r }) : null,
695
+ /* @__PURE__ */ a("div", { className: "j-panel-spinner__title", children: /* @__PURE__ */ a(K, { size: "md", tone: "white", children: t }) }),
696
+ n ? /* @__PURE__ */ a("div", { className: "j-panel-spinner__description", children: /* @__PURE__ */ a(K, { size: "xs", tone: "grey", children: n }) }) : null
697
+ ] }),
698
+ /* @__PURE__ */ a(
699
+ Y,
700
+ {
701
+ tone: "red",
702
+ size: "sm",
703
+ className: "j-panel-spinner__arrow j-panel-spinner__arrow--right",
704
+ onClick: i,
705
+ disabled: !u,
706
+ "aria-label": `Next ${e ?? t}`,
707
+ children: ">"
708
+ }
709
+ )
710
+ ] })
711
+ ] });
712
+ }
713
+ const Dt = {
714
+ Jokers: { cols: 10, rows: 16, assetKey: "jokers" },
715
+ Tarots: { cols: 10, rows: 6, assetKey: "tarots" },
716
+ Vouchers: { cols: 9, rows: 4, assetKey: "vouchers" },
717
+ Boosters: { cols: 4, rows: 9, assetKey: "boosters" },
718
+ BlindChips: { cols: 21, rows: 31, assetKey: "blinds" },
719
+ tags: { cols: 6, rows: 5, assetKey: "tags" },
720
+ Enhancers: { cols: 7, rows: 5, assetKey: "enhancers" },
721
+ Editions: { cols: 5, rows: 1, assetKey: "editions" },
722
+ Stakes: { cols: 5, rows: 2, assetKey: "stakes" },
723
+ Decks: { cols: 13, rows: 4, assetKey: "deck" }
724
+ }, fe = (e) => e.toLowerCase().replace(/\s+/g, ""), Jt = (e) => e.replace(/^(Joker|Tarot|Planet|Voucher|Pack|Edition|Tag) [|:] /i, "").trim(), ce = /* @__PURE__ */ new Map();
725
+ function V(e, t) {
726
+ for (const n of e) {
727
+ if (!n.name || !n.pos) continue;
728
+ const r = fe(n.name);
729
+ ce.has(r) || ce.set(r, { pos: n.pos, type: t });
730
+ }
731
+ }
732
+ V(Qe, "Jokers");
733
+ V(et, "Jokers");
734
+ V(tt, "Tarots");
735
+ V(nt ?? [], "Tarots");
736
+ V(rt, "Vouchers");
737
+ V(ot, "BlindChips");
738
+ V(at, "tags");
739
+ V(it ?? [], "Boosters");
740
+ const Ft = {
741
+ Jokers: { x: 9, y: 9 },
742
+ // grey card back (legendary face row)
743
+ Tarots: { x: 4, y: 2 },
744
+ // blank consumable
745
+ Vouchers: { x: 8, y: 2 },
746
+ // mystery voucher
747
+ Boosters: { x: 0, y: 5 },
748
+ // grey empty pack
749
+ tags: { x: 3, y: 4 },
750
+ // grey ? tag
751
+ BlindChips: { x: 0, y: 30 }
752
+ // grey ? blind
753
+ };
754
+ function $t(e) {
755
+ return { pos: Ft[e] ?? { x: 0, y: 0 }, type: e };
756
+ }
757
+ function zt(e) {
758
+ return ce.get(fe(Jt(e))) ?? ce.get(fe(e)) ?? null;
759
+ }
760
+ function Ut(e, t = "Jokers") {
761
+ return zt(e) ?? $t(t);
762
+ }
763
+ const Wt = /* @__PURE__ */ new Set(["Jokers", "Tarots", "Vouchers", "Boosters"]);
764
+ function Hn({ name: e, sheet: t, width: n, className: r, style: o }) {
765
+ const { pos: i, type: s } = Ut(e, t), u = Dt[s], p = Wt.has(s) ? Math.round(n * (95 / 71)) : n;
766
+ return /* @__PURE__ */ a(
767
+ "div",
768
+ {
769
+ className: r,
770
+ style: {
771
+ position: "relative",
772
+ display: "inline-block",
773
+ width: n,
774
+ height: p,
775
+ overflow: "hidden",
776
+ imageRendering: "pixelated",
777
+ ...o
778
+ },
779
+ title: e,
780
+ children: /* @__PURE__ */ a(
781
+ "div",
782
+ {
783
+ style: {
784
+ position: "absolute",
785
+ inset: 0,
786
+ backgroundImage: `url(${qe(u.assetKey)})`,
787
+ backgroundSize: `${u.cols * 100}% ${u.rows * 100}%`,
788
+ backgroundPosition: `${i.x / (u.cols - 1) * 100}% ${i.y / (u.rows - 1) * 100}%`,
789
+ backgroundRepeat: "no-repeat"
790
+ }
791
+ }
792
+ )
793
+ }
794
+ );
795
+ }
796
+ function Zn({ className: e, children: t, ...n }) {
797
+ return /* @__PURE__ */ a("div", { className: ["j-picker", e].filter(Boolean).join(" "), ...n, children: t });
798
+ }
799
+ function Vn({ className: e, children: t, ...n }) {
800
+ return /* @__PURE__ */ a("div", { className: ["j-picker__section", e].filter(Boolean).join(" "), ...n, children: t });
801
+ }
802
+ function qn({ className: e, children: t, ...n }) {
803
+ return /* @__PURE__ */ a("div", { className: ["j-picker__search", e].filter(Boolean).join(" "), ...n, children: t });
804
+ }
805
+ function Qn({ className: e, children: t, ...n }) {
806
+ return /* @__PURE__ */ a("div", { className: ["j-picker__hint", e].filter(Boolean).join(" "), ...n, children: t });
807
+ }
808
+ function er({ legendary: e, className: t, children: n, ...r }) {
809
+ const o = ["j-picker__grid", e ? "j-picker__grid--legendary" : "", t].filter(Boolean).join(" ");
810
+ return /* @__PURE__ */ a("div", { className: o, ...r, children: n });
811
+ }
812
+ function tr({ muted: e, className: t, children: n, ...r }) {
813
+ const o = ["j-picker__item", t].filter(Boolean).join(" ");
814
+ return /* @__PURE__ */ a("button", { type: "button", className: o, "data-muted": e, ...r, children: n });
815
+ }
816
+ function nr({ className: e, children: t, ...n }) {
817
+ return /* @__PURE__ */ a("div", { className: ["j-picker__pair", e].filter(Boolean).join(" "), ...n, children: t });
818
+ }
819
+ function rr({ className: e, children: t, ...n }) {
820
+ return /* @__PURE__ */ a("div", { className: ["j-picker__empty", e].filter(Boolean).join(" "), ...n, children: t });
821
+ }
822
+ function or({ tabs: e, activeTab: t, onTabChange: n }) {
823
+ return /* @__PURE__ */ a("div", { className: "j-tabs", children: e.map((r) => {
824
+ const o = r.id === t;
825
+ return /* @__PURE__ */ _("div", { className: "j-tab", children: [
826
+ /* @__PURE__ */ a("div", { className: "j-tab__indicator", "data-active": o, children: /* @__PURE__ */ a("svg", { width: "10", height: "8", viewBox: "0 0 10 8", children: /* @__PURE__ */ a("path", { d: "M5 8 L0 0 L10 0 Z" }) }) }),
827
+ /* @__PURE__ */ a(
828
+ Y,
829
+ {
830
+ size: "sm",
831
+ tone: "red",
832
+ label: r.label,
833
+ onClick: () => n(r.id)
834
+ }
835
+ )
836
+ ] }, r.id);
837
+ }) });
838
+ }
839
+ function ar({ active: e, className: t, children: n, ...r }) {
840
+ const o = ["j-list-item", t].filter(Boolean).join(" ");
841
+ return /* @__PURE__ */ a("button", { type: "button", className: o, "data-active": e, ...r, children: n });
842
+ }
843
+ const ye = "data-j-motion", me = "jimbo-motion", xe = "(prefers-reduced-motion: reduce)";
844
+ function Gt(e) {
845
+ const t = document.documentElement;
846
+ e === "auto" ? t.removeAttribute(ye) : t.setAttribute(ye, e);
847
+ }
848
+ function Kt() {
849
+ try {
850
+ const e = window.localStorage.getItem(me);
851
+ if (e === "full" || e === "reduced") return e;
852
+ } catch {
853
+ }
854
+ return "auto";
855
+ }
856
+ function ir() {
857
+ const [e, t] = T(
858
+ () => typeof document > "u" ? "auto" : Kt()
859
+ ), [n, r] = T(
860
+ () => typeof window > "u" ? !1 : window.matchMedia(xe).matches
861
+ );
862
+ W(() => {
863
+ Gt(e);
864
+ }, [e]), W(() => {
865
+ const s = window.matchMedia(xe), u = () => r(s.matches);
866
+ return s.addEventListener("change", u), () => s.removeEventListener("change", u);
867
+ }, []);
868
+ const o = Q((s) => {
869
+ t(s);
870
+ try {
871
+ s === "auto" ? window.localStorage.removeItem(me) : window.localStorage.setItem(me, s);
872
+ } catch {
873
+ }
874
+ }, []);
875
+ return { setting: e, setSetting: o, osPrefersReduced: n, effectiveReducedMotion: e === "reduced" ? !0 : e === "full" ? !1 : n };
876
+ }
877
+ const D = {
878
+ primary: [1, 0.2, 0.2],
879
+ // red
880
+ secondary: [0, 0.5, 1],
881
+ // blue
882
+ dark: [0.05, 0.08, 0.1],
883
+ // near-black
884
+ speed: 1,
885
+ spinRotation: -2,
886
+ spinAmount: 0.35,
887
+ pixelFilter: 740 * 0.33,
888
+ contrast: 4.5,
889
+ lighting: 0.5,
890
+ transitionMs: 800
891
+ };
892
+ function ee(e, t) {
893
+ if (!e) return t;
894
+ if (Array.isArray(e)) return [e[0], e[1], e[2]];
895
+ let n = e.trim().replace(/^#/, "");
896
+ if (n.length === 3 && (n = n.split("").map((o) => o + o).join("")), n.length !== 6) return t;
897
+ const r = parseInt(n, 16);
898
+ return Number.isNaN(r) ? t : [(r >> 16 & 255) / 255, (r >> 8 & 255) / 255, (r & 255) / 255];
899
+ }
900
+ function Yt(e = {}) {
901
+ const t = J(null), n = J(e);
902
+ return Ae(() => {
903
+ n.current = e;
904
+ }), W(() => {
905
+ const r = t.current;
906
+ if (!r) return;
907
+ const o = r.getContext("webgl");
908
+ if (!o) return;
909
+ const i = `
910
+ attribute vec2 position;
911
+ void main() {
912
+ gl_Position = vec4(position, 0.0, 1.0);
913
+ }
914
+ `, s = `
915
+ precision mediump float;
916
+
917
+ uniform float u_time;
918
+ uniform vec2 u_resolution;
919
+ uniform vec3 u_color1;
920
+ uniform vec3 u_color2;
921
+ uniform vec3 u_color3;
922
+ uniform float u_spinRotation;
923
+ uniform float u_spinSpeed;
924
+ uniform float u_spinAmount;
925
+ uniform float u_pixelFilter;
926
+ uniform float u_contrast;
927
+ uniform float u_lighting;
928
+
929
+ void main() {
930
+ vec2 screenSize = u_resolution;
931
+ float pixel_size = length(screenSize.xy) / max(1.0, u_pixelFilter);
932
+ vec2 uv = (floor(gl_FragCoord.xy*(1.0/pixel_size))*pixel_size - 0.5*screenSize.xy)/length(screenSize.xy);
933
+ float uv_len = length(uv);
934
+
935
+ float speed = (u_spinRotation * 0.2) + 302.2;
936
+ float new_pixel_angle = atan(uv.y, uv.x) + speed - 20.0*(u_spinAmount*uv_len + (1.0 - u_spinAmount));
937
+
938
+ vec2 mid = (screenSize.xy/length(screenSize.xy))/2.0;
939
+ uv = (vec2((uv_len * cos(new_pixel_angle) + mid.x), (uv_len * sin(new_pixel_angle) + mid.y)) - mid);
940
+
941
+ uv *= 30.0;
942
+ speed = u_time * u_spinSpeed;
943
+ vec2 uv2 = vec2(uv.x, uv.y);
944
+
945
+ for(int i=0; i < 5; i++) {
946
+ uv2 += sin(max(uv.x, uv.y)) + uv;
947
+ uv += 0.5*vec2(cos(5.1123314 + 0.353*uv2.y + speed*0.131121), sin(uv2.x - 0.113*speed));
948
+ uv -= 1.0*cos(uv.x + uv.y) - 1.0*sin(uv.x*0.711 - uv.y);
949
+ }
950
+
951
+ float contrast_mod = (0.25*u_contrast + 0.5*u_spinAmount + 1.2);
952
+ float paint_res = min(2.0, max(0.0, length(uv)*(0.035)*contrast_mod));
953
+ float c1p = max(0.0, 1.0 - contrast_mod*abs(1.0 - paint_res));
954
+ float c2p = max(0.0, 1.0 - contrast_mod*abs(paint_res));
955
+ float c3p = 1.0 - min(1.0, c1p + c2p);
956
+ float light = (u_lighting - 0.2)*max(c1p*5.0 - 4.0, 0.0) + u_lighting*max(c2p*5.0 - 4.0, 0.0);
957
+
958
+ vec3 base = (0.3/u_contrast)*u_color1 + (1.0 - 0.3/u_contrast)*(u_color1*c1p + u_color2*c2p + c3p*u_color3) + vec3(light);
959
+ gl_FragColor = vec4(base, 1.0);
960
+ }
961
+ `, u = (B, ne) => {
962
+ const O = o.createShader(B);
963
+ return O ? (o.shaderSource(O, ne), o.compileShader(O), o.getShaderParameter(O, o.COMPILE_STATUS) ? O : (console.error("[JimboBackground] shader compile error:", o.getShaderInfoLog(O)), o.deleteShader(O), null)) : null;
964
+ }, p = u(o.VERTEX_SHADER, i), j = u(o.FRAGMENT_SHADER, s);
965
+ if (!p || !j) return;
966
+ const l = o.createProgram();
967
+ if (!l) return;
968
+ if (o.attachShader(l, p), o.attachShader(l, j), o.linkProgram(l), !o.getProgramParameter(l, o.LINK_STATUS)) {
969
+ console.error("[JimboBackground] program link error:", o.getProgramInfoLog(l));
970
+ return;
971
+ }
972
+ o.useProgram(l);
973
+ const c = o.createBuffer();
974
+ o.bindBuffer(o.ARRAY_BUFFER, c), o.bufferData(
975
+ o.ARRAY_BUFFER,
976
+ new Float32Array([
977
+ -1,
978
+ -1,
979
+ 1,
980
+ -1,
981
+ -1,
982
+ 1,
983
+ -1,
984
+ 1,
985
+ 1,
986
+ -1,
987
+ 1,
988
+ 1
989
+ ]),
990
+ o.STATIC_DRAW
991
+ );
992
+ const f = o.getAttribLocation(l, "position");
993
+ o.enableVertexAttribArray(f), o.vertexAttribPointer(f, 2, o.FLOAT, !1, 0, 0);
994
+ const y = o.getUniformLocation(l, "u_time"), x = o.getUniformLocation(l, "u_resolution"), k = o.getUniformLocation(l, "u_color1"), b = o.getUniformLocation(l, "u_color2"), d = o.getUniformLocation(l, "u_color3"), g = o.getUniformLocation(l, "u_spinRotation"), h = o.getUniformLocation(l, "u_spinSpeed"), m = o.getUniformLocation(l, "u_spinAmount"), v = o.getUniformLocation(l, "u_pixelFilter"), S = o.getUniformLocation(l, "u_contrast"), E = o.getUniformLocation(l, "u_lighting"), M = (B) => ({
995
+ spinRotation: B.spinRotation ?? D.spinRotation,
996
+ spinSpeed: 4.5 * (B.speed ?? D.speed),
997
+ spinAmount: B.spinAmount ?? D.spinAmount,
998
+ pixelFilter: B.pixelFilter ?? D.pixelFilter,
999
+ contrast: B.contrast ?? D.contrast,
1000
+ lighting: B.lighting ?? D.lighting
1001
+ }), R = n.current, w = [
1002
+ ee(R.primary, D.primary),
1003
+ ee(R.secondary, D.secondary),
1004
+ ee(R.dark, D.dark)
1005
+ ], P = M(R), N = performance.now();
1006
+ let L = N, C = 0;
1007
+ const U = () => {
1008
+ const B = performance.now(), ne = Math.max(0, B - L);
1009
+ L = B;
1010
+ const O = n.current, ae = [
1011
+ ee(O.primary, D.primary),
1012
+ ee(O.secondary, D.secondary),
1013
+ ee(O.dark, D.dark)
1014
+ ], A = M(O), X = Math.max(1, O.transitionMs ?? D.transitionMs), q = 1 - Math.exp(-ne / X);
1015
+ for (let G = 0; G < 3; G++)
1016
+ for (let re = 0; re < 3; re++)
1017
+ w[G][re] += (ae[G][re] - w[G][re]) * q;
1018
+ const H = (G) => {
1019
+ P[G] += (A[G] - P[G]) * q;
1020
+ };
1021
+ H("spinRotation"), H("spinSpeed"), H("spinAmount"), H("pixelFilter"), H("contrast"), H("lighting");
1022
+ const ge = r.clientWidth, be = r.clientHeight;
1023
+ (r.width !== ge || r.height !== be) && (r.width = ge, r.height = be, o.viewport(0, 0, o.drawingBufferWidth, o.drawingBufferHeight)), o.uniform1f(y, (B - N) / 1e3), o.uniform2f(x, r.width, r.height), o.uniform3f(k, w[0][0], w[0][1], w[0][2]), o.uniform3f(b, w[1][0], w[1][1], w[1][2]), o.uniform3f(d, w[2][0], w[2][1], w[2][2]), o.uniform1f(g, P.spinRotation), o.uniform1f(h, P.spinSpeed), o.uniform1f(m, P.spinAmount), o.uniform1f(v, P.pixelFilter), o.uniform1f(S, P.contrast), o.uniform1f(E, P.lighting), o.drawArrays(o.TRIANGLES, 0, 6), C = requestAnimationFrame(U);
1024
+ };
1025
+ return C = requestAnimationFrame(U), () => {
1026
+ cancelAnimationFrame(C), o.deleteProgram(l), o.deleteShader(p), o.deleteShader(j), o.deleteBuffer(c);
1027
+ };
1028
+ }, []), t;
1029
+ }
1030
+ function sr(e, t, n) {
1031
+ const [r, o] = T(null), [i, s] = T(null), [u, p] = T(null), j = Q(
1032
+ (b, d, g) => {
1033
+ const h = "touches" in b ? b.touches[0] : b, m = b.currentTarget.getBoundingClientRect();
1034
+ s({
1035
+ clause: d,
1036
+ fromZone: g,
1037
+ x: h.clientX,
1038
+ y: h.clientY,
1039
+ offX: h.clientX - m.left,
1040
+ offY: h.clientY - m.top
1041
+ }), p(null);
1042
+ },
1043
+ []
1044
+ ), l = J(r), c = J(i), f = J(u), y = J(e), x = J(t);
1045
+ Ae(() => {
1046
+ l.current = r, c.current = i, f.current = u, y.current = e, x.current = t;
1047
+ });
1048
+ const k = r !== null || i !== null;
1049
+ return W(() => {
1050
+ if (!k) return;
1051
+ const b = (g) => {
1052
+ var M;
1053
+ const h = "touches" in g ? g : null, m = h ? h.touches[0] : g;
1054
+ if (!m) return;
1055
+ let v = l.current;
1056
+ if (!v && c.current) {
1057
+ const R = m.clientX - c.current.x, w = m.clientY - c.current.y;
1058
+ if (Math.hypot(R, w) < 8) return;
1059
+ v = {
1060
+ ...c.current,
1061
+ x: m.clientX,
1062
+ y: m.clientY
1063
+ }, s(null), o(v);
1064
+ } else v && (v = { ...v, x: m.clientX, y: m.clientY }, o(v));
1065
+ if (!v) return;
1066
+ h != null && h.cancelable && h.preventDefault();
1067
+ const S = ((M = n.current) == null ? void 0 : M.querySelectorAll("[data-zone]")) ?? [];
1068
+ let E = null;
1069
+ for (const R of S) {
1070
+ const w = R.getBoundingClientRect();
1071
+ if (m.clientX >= w.left && m.clientX <= w.right && m.clientY >= w.top && m.clientY <= w.bottom) {
1072
+ E = R.getAttribute("data-zone");
1073
+ break;
1074
+ }
1075
+ }
1076
+ p(E);
1077
+ }, d = () => {
1078
+ const g = l.current, h = f.current;
1079
+ if (g && h && h !== g.fromZone) {
1080
+ const m = h, v = y.current;
1081
+ x.current({
1082
+ ...v,
1083
+ [g.fromZone]: v[g.fromZone].filter((S) => S.id !== g.clause.id),
1084
+ [m]: [...v[m], { ...g.clause }]
1085
+ });
1086
+ }
1087
+ s(null), o(null), p(null);
1088
+ };
1089
+ return window.addEventListener("mousemove", b), window.addEventListener("mouseup", d), window.addEventListener("touchmove", b, { passive: !1 }), window.addEventListener("touchend", d), () => {
1090
+ window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", d), window.removeEventListener("touchmove", b), window.removeEventListener("touchend", d);
1091
+ };
1092
+ }, [k, n]), {
1093
+ drag: r,
1094
+ hoverZone: u,
1095
+ onDragStart: j
1096
+ };
1097
+ }
1098
+ const Xt = {
1099
+ xs: "j-inline-edit--xs",
1100
+ sm: "j-inline-edit--sm",
1101
+ md: "j-inline-edit--md",
1102
+ lg: "j-inline-edit--lg"
1103
+ }, Ht = {
1104
+ white: "j-inline-edit--white",
1105
+ gold: "j-inline-edit--gold",
1106
+ grey: "j-inline-edit--grey"
1107
+ }, lr = z.forwardRef(
1108
+ function({ size: t = "md", tone: n = "white", dim: r = !1, className: o = "", ...i }, s) {
1109
+ const u = [
1110
+ "j-inline-edit",
1111
+ Xt[t],
1112
+ Ht[n],
1113
+ r ? "j-inline-edit--dim" : null,
1114
+ o || null
1115
+ ].filter(Boolean).join(" ");
1116
+ return /* @__PURE__ */ a("input", { ref: s, type: "text", className: u, ...i });
1117
+ }
1118
+ );
1119
+ function cr({
1120
+ className: e,
1121
+ minHeight: t = 320,
1122
+ style: n,
1123
+ ref: r,
1124
+ ...o
1125
+ }) {
1126
+ const i = ["j-code-surface", e].filter(Boolean).join(" "), s = {
1127
+ "--j-code-surface-min-height": `${t}px`,
1128
+ ...n
1129
+ };
1130
+ return /* @__PURE__ */ a("div", { ref: r, className: i, style: s, ...o });
1131
+ }
1132
+ const Zt = {
1133
+ blue: "j-outer-tab--blue",
1134
+ red: "j-outer-tab--red",
1135
+ orange: "j-outer-tab--orange",
1136
+ green: "j-outer-tab--green",
1137
+ purple: "j-outer-tab--purple",
1138
+ gold: "j-outer-tab--gold"
1139
+ };
1140
+ function Vt({
1141
+ label: e,
1142
+ tone: t,
1143
+ active: n = !1,
1144
+ fullscreen: r = !1,
1145
+ onToggleFullscreen: o,
1146
+ className: i,
1147
+ children: s,
1148
+ ...u
1149
+ }) {
1150
+ const p = [
1151
+ "j-outer-tab",
1152
+ t ? Zt[t] : "",
1153
+ n ? "j-outer-tab--active" : "",
1154
+ i
1155
+ ].filter(Boolean).join(" ");
1156
+ return /* @__PURE__ */ _("div", { className: p, ...u, children: [
1157
+ /* @__PURE__ */ a("span", { className: "j-outer-tab__grip", "aria-hidden": !0, children: /* @__PURE__ */ a(xt, {}) }),
1158
+ /* @__PURE__ */ a("span", { className: "j-outer-tab__label", children: e }),
1159
+ /* @__PURE__ */ a("span", { className: "j-outer-tab__space", children: s }),
1160
+ o ? /* @__PURE__ */ a(
1161
+ "button",
1162
+ {
1163
+ type: "button",
1164
+ className: "j-outer-tab__fs",
1165
+ "aria-label": r ? "Restore pane" : "Fullscreen pane",
1166
+ onClick: (j) => {
1167
+ j.stopPropagation(), o();
1168
+ },
1169
+ children: r ? /* @__PURE__ */ a(kt, {}) : /* @__PURE__ */ a(St, {})
1170
+ }
1171
+ ) : null
1172
+ ] });
1173
+ }
1174
+ let qt = 0;
1175
+ function ke(e) {
1176
+ return `${e}${++qt}-${Date.now().toString(36)}`;
1177
+ }
1178
+ function Qt(e) {
1179
+ return {
1180
+ type: "split",
1181
+ id: "s-root",
1182
+ dir: "column",
1183
+ ratio: 0.34,
1184
+ children: [
1185
+ {
1186
+ type: "split",
1187
+ id: "s-entry",
1188
+ dir: "row",
1189
+ ratio: 0.55,
1190
+ children: [
1191
+ { type: "group", id: "g-filter", panes: [e.filter], active: e.filter },
1192
+ { type: "group", id: "g-search", panes: [e.search], active: e.search }
1193
+ ]
1194
+ },
1195
+ {
1196
+ type: "group",
1197
+ id: "g-results",
1198
+ panes: [e.results, e.jamlyze],
1199
+ active: e.results
1200
+ }
1201
+ ]
1202
+ };
1203
+ }
1204
+ function Ie(e, t) {
1205
+ if (e.type === "group") {
1206
+ if (!e.panes.includes(t)) return e;
1207
+ const r = e.panes.filter((i) => i !== t), o = e.active === t ? r[0] ?? null : e.active;
1208
+ return { ...e, panes: r, active: o };
1209
+ }
1210
+ const n = e.children.map((r) => Ie(r, t)).filter((r) => !(r.type === "group" && r.panes.length === 0));
1211
+ return n.length === 1 ? n[0] : { ...e, children: n };
1212
+ }
1213
+ function he(e, t, n) {
1214
+ return e.type === "group" ? e.id === t ? n(e) : e : { ...e, children: e.children.map((r) => he(r, t, n)) };
1215
+ }
1216
+ function De(e, t, n, r) {
1217
+ if (r === "center") return e;
1218
+ if (e.type === "group") {
1219
+ if (e.id !== t) return e;
1220
+ const o = { type: "group", id: ke("g"), panes: [n], active: n }, i = r === "left" || r === "right" ? "row" : "column", s = r === "left" || r === "top" ? [o, e] : [e, o];
1221
+ return { type: "split", id: ke("s"), dir: i, ratio: 0.5, children: s };
1222
+ }
1223
+ return { ...e, children: e.children.map((o) => De(o, t, n, r)) };
1224
+ }
1225
+ function Je(e, t = []) {
1226
+ return e.type === "group" ? (t.push(e), t) : (e.children.forEach((n) => Je(n, t)), t);
1227
+ }
1228
+ function en(e, t) {
1229
+ return e.type === "group" ? e.panes.includes(t) ? { ...e, active: t } : e : { ...e, children: e.children.map((n) => en(n, t)) };
1230
+ }
1231
+ function tn(e, t) {
1232
+ const n = Je(e);
1233
+ if (!n.length) return !1;
1234
+ const r = n.flatMap((o) => o.panes);
1235
+ return r.length > 0 && r.every((o) => t.includes(o)) && n.every((o) => o.panes.length > 0);
1236
+ }
1237
+ function nn(e, t, n) {
1238
+ try {
1239
+ const r = localStorage.getItem(e);
1240
+ if (!r) return t;
1241
+ const o = JSON.parse(r);
1242
+ return tn(o, n) ? o : t;
1243
+ } catch {
1244
+ return t;
1245
+ }
1246
+ }
1247
+ function rn(e, t) {
1248
+ try {
1249
+ localStorage.setItem(e, JSON.stringify(t));
1250
+ } catch {
1251
+ }
1252
+ }
1253
+ function ur({
1254
+ panes: e,
1255
+ pyramid: t,
1256
+ storageKey: n,
1257
+ className: r
1258
+ }) {
1259
+ const o = Object.keys(e), i = t && o.includes(t.filter) ? Qt(t) : {
1260
+ type: "group",
1261
+ id: "g-all",
1262
+ panes: o,
1263
+ active: o[0] ?? null
1264
+ }, [s, u] = T(
1265
+ () => n && typeof localStorage < "u" ? nn(n, i, o) : i
1266
+ ), [p, j] = T(null), [l, c] = T(null);
1267
+ W(() => {
1268
+ n && rn(n, s);
1269
+ }, [n, s]);
1270
+ const f = (d) => {
1271
+ if (d.target.closest(".j-dock-tabs")) return "center";
1272
+ const h = d.currentTarget.getBoundingClientRect(), m = (d.clientX - h.left) / h.width, v = (d.clientY - h.top) / h.height;
1273
+ return m < 0.25 ? "left" : m > 0.75 ? "right" : v < 0.25 ? "top" : v > 0.75 ? "bottom" : "center";
1274
+ }, y = (d, g, h) => {
1275
+ e[d] && (g.panes.length === 1 && g.panes[0] === d || u((m) => {
1276
+ const v = Ie(m, d);
1277
+ return h === "center" ? he(v, g.id, (S) => ({
1278
+ ...S,
1279
+ panes: [...S.panes, d],
1280
+ active: d
1281
+ })) : De(v, g.id, d, h);
1282
+ }));
1283
+ }, x = (d, g) => {
1284
+ const h = e[d];
1285
+ return h ? /* @__PURE__ */ a(
1286
+ Vt,
1287
+ {
1288
+ label: h.label,
1289
+ tone: h.tone,
1290
+ active: g,
1291
+ fullscreen: l === d,
1292
+ onToggleFullscreen: () => c((m) => m === d ? null : d),
1293
+ draggable: !0,
1294
+ onDragStart: (m) => m.dataTransfer.setData("text/plain", d)
1295
+ },
1296
+ d
1297
+ ) : null;
1298
+ }, k = (d) => {
1299
+ const g = p && p.groupId === d.id ? p.zone : null, h = g && g !== "center" ? ` j-dock-pane--drop-${g}` : "";
1300
+ return /* @__PURE__ */ _(
1301
+ $,
1302
+ {
1303
+ className: `j-dock-pane${h}`,
1304
+ onDragOver: (m) => {
1305
+ m.preventDefault();
1306
+ const v = f(m);
1307
+ j(
1308
+ (S) => S && S.groupId === d.id && S.zone === v ? S : { groupId: d.id, zone: v }
1309
+ );
1310
+ },
1311
+ onDragLeave: () => j((m) => m && m.groupId === d.id ? null : m),
1312
+ onDrop: (m) => {
1313
+ m.preventDefault();
1314
+ const v = m.dataTransfer.getData("text/plain"), S = f(m);
1315
+ j(null), y(v, d, S);
1316
+ },
1317
+ children: [
1318
+ /* @__PURE__ */ a(
1319
+ $,
1320
+ {
1321
+ className: `j-dock-tabs${g === "center" ? " j-dock-tabs--drop" : ""}`,
1322
+ children: d.panes.map((m) => /* @__PURE__ */ a(
1323
+ $,
1324
+ {
1325
+ onClick: () => u((v) => he(v, d.id, (S) => ({ ...S, active: m }))),
1326
+ children: x(m, d.active === m)
1327
+ },
1328
+ m
1329
+ ))
1330
+ }
1331
+ ),
1332
+ /* @__PURE__ */ a($, { className: "j-dock-body", children: d.active && e[d.active] ? e[d.active].content : null })
1333
+ ]
1334
+ },
1335
+ d.id
1336
+ );
1337
+ }, b = (d) => {
1338
+ if (d.type === "group") return k(d);
1339
+ const [g, h] = d.children;
1340
+ return /* @__PURE__ */ _(
1341
+ $,
1342
+ {
1343
+ className: `j-dock-split j-dock-split--${d.dir}`,
1344
+ style: {
1345
+ "--j-dock-a": `${d.ratio}fr`,
1346
+ "--j-dock-b": `${1 - d.ratio}fr`
1347
+ },
1348
+ children: [
1349
+ b(g),
1350
+ /* @__PURE__ */ a($, { className: `j-dock-gutter j-dock-gutter--${d.dir}` }),
1351
+ b(h)
1352
+ ]
1353
+ },
1354
+ d.id
1355
+ );
1356
+ };
1357
+ return l && e[l] ? /* @__PURE__ */ _($, { className: `j-dock j-dock--fs ${r ?? ""}`.trim(), children: [
1358
+ /* @__PURE__ */ a($, { className: "j-dock-tabs", children: x(l, !0) }),
1359
+ /* @__PURE__ */ a($, { className: "j-dock-body", children: e[l].content })
1360
+ ] }) : /* @__PURE__ */ a($, { className: `j-dock ${r ?? ""}`.trim(), children: b(s) });
1361
+ }
1362
+ const on = {
1363
+ idle: "j-status-pill--idle",
1364
+ running: "j-status-pill--running",
1365
+ ok: "j-status-pill--ok",
1366
+ error: "j-status-pill--error",
1367
+ paused: "j-status-pill--paused"
1368
+ };
1369
+ function an({ status: e = "idle", label: t, className: n, children: r, ...o }) {
1370
+ const i = ["j-status-pill", on[e], n].filter(Boolean).join(" ");
1371
+ return /* @__PURE__ */ _("span", { className: i, ...o, children: [
1372
+ /* @__PURE__ */ a("span", { className: "j-status-pill__dot", "aria-hidden": !0 }),
1373
+ t ?? r ?? e
1374
+ ] });
1375
+ }
1376
+ const dr = z.forwardRef(
1377
+ function({ onValueChange: t, className: n, value: r, min: o = 0, max: i = 100, style: s, ...u }, p) {
1378
+ const j = Number(r ?? 0), l = Number(o), c = Number(i), f = c > l ? Math.min(100, Math.max(0, (j - l) / (c - l) * 100)) : 0, y = ["j-slider", n].filter(Boolean).join(" ");
1379
+ return /* @__PURE__ */ a(
1380
+ "input",
1381
+ {
1382
+ ref: p,
1383
+ type: "range",
1384
+ className: y,
1385
+ value: r,
1386
+ min: o,
1387
+ max: i,
1388
+ style: { ...s ?? {}, "--j-slider-fill": `${f}%` },
1389
+ onChange: (x) => t == null ? void 0 : t(Number(x.currentTarget.value)),
1390
+ ...u
1391
+ }
1392
+ );
1393
+ }
1394
+ );
1395
+ function pr({ className: e, style: t, ...n }) {
1396
+ const r = ["j-textarea", e].filter(Boolean).join(" ");
1397
+ return /* @__PURE__ */ a("textarea", { className: r, style: t, ...n });
1398
+ }
1399
+ function fr(e = {}) {
1400
+ const t = Yt(e);
1401
+ return /* @__PURE__ */ a("canvas", { ref: t, className: "j-background-canvas", "aria-hidden": !0 });
1402
+ }
1403
+ function mr({
1404
+ variant: e = "embed",
1405
+ scroll: t = !0,
1406
+ footer: n,
1407
+ className: r,
1408
+ children: o,
1409
+ ...i
1410
+ }) {
1411
+ if (e === "page") {
1412
+ const p = ["j-page", "j-page--full", r].filter(Boolean).join(" ");
1413
+ return /* @__PURE__ */ _("div", { className: p, ...i, children: [
1414
+ /* @__PURE__ */ a("div", { className: "j-page__main", children: o }),
1415
+ n ? /* @__PURE__ */ a("div", { className: "j-page__footer", children: n }) : null
1416
+ ] });
1417
+ }
1418
+ if (e === "phone") {
1419
+ const p = ["j-phone", r].filter(Boolean).join(" ");
1420
+ return /* @__PURE__ */ _("div", { className: p, ...i, children: [
1421
+ /* @__PURE__ */ a("div", { className: t ? "j-phone__scroll" : "j-phone__content", children: o }),
1422
+ n ? /* @__PURE__ */ a("div", { className: "j-phone__footer", children: n }) : null
1423
+ ] });
1424
+ }
1425
+ const s = ["j-app", r].filter(Boolean).join(" ");
1426
+ return /* @__PURE__ */ _("div", { className: s, ...i, children: [
1427
+ /* @__PURE__ */ a("div", { className: t ? "j-app__scroll" : "j-app__content", children: o }),
1428
+ n ? /* @__PURE__ */ a("div", { className: "j-app__footer", children: n }) : null
1429
+ ] });
1430
+ }
1431
+ function hr({ className: e, children: t, ...n }) {
1432
+ const r = ["j-inset", e].filter(Boolean).join(" ");
1433
+ return /* @__PURE__ */ a("div", { className: r, ...n, children: t });
1434
+ }
1435
+ function gr({ title: e, sub: t, className: n, ...r }) {
1436
+ const o = ["j-wordmark", n].filter(Boolean).join(" ");
1437
+ return /* @__PURE__ */ _("div", { className: o, ...r, children: [
1438
+ /* @__PURE__ */ a("div", { className: "j-wordmark__title", children: e }),
1439
+ t != null && t !== !1 ? /* @__PURE__ */ a("div", { className: "j-wordmark__sub", children: t }) : null
1440
+ ] });
1441
+ }
1442
+ const sn = {
1443
+ xs: "var(--j-space-xs)",
1444
+ sm: "var(--j-space-sm)",
1445
+ md: "var(--j-space-md)",
1446
+ lg: "var(--j-space-lg)",
1447
+ xl: "var(--j-space-xl)"
1448
+ };
1449
+ function br({ columns: e = 3, minColWidth: t, gap: n = "md", style: r, ...o }) {
1450
+ const i = t ? `repeat(auto-fit, minmax(${t}px, 1fr))` : `repeat(${e}, minmax(0, 1fr))`;
1451
+ return /* @__PURE__ */ a(
1452
+ "div",
1453
+ {
1454
+ style: {
1455
+ ...r,
1456
+ display: "grid",
1457
+ gridTemplateColumns: i,
1458
+ gap: sn[n],
1459
+ width: "100%"
1460
+ },
1461
+ ...o
1462
+ }
1463
+ );
1464
+ }
1465
+ function jr({ size: e = 16, style: t, ...n }) {
1466
+ return /* @__PURE__ */ a("div", { "aria-hidden": !0, style: { ...t, height: e, width: "100%" }, ...n });
1467
+ }
1468
+ function vr({ vert: e = !1, className: t, ...n }) {
1469
+ const r = ["j-divider", e ? "j-divider--vert" : "", t].filter(Boolean).join(" ");
1470
+ return /* @__PURE__ */ a("hr", { className: r, ...n });
1471
+ }
1472
+ function _r({ title: e, onDismiss: t, className: n, children: r, ...o }) {
1473
+ const [i, s] = T(!1);
1474
+ if (i) return null;
1475
+ const u = ["j-error-block", n].filter(Boolean).join(" ");
1476
+ return /* @__PURE__ */ a("div", { className: u, role: "alert", ...o, children: /* @__PURE__ */ _(ft, { justify: "between", align: "center", children: [
1477
+ /* @__PURE__ */ _("div", { children: [
1478
+ e != null && /* @__PURE__ */ a("div", { className: "j-error-block__title", children: e }),
1479
+ r
1480
+ ] }),
1481
+ t && /* @__PURE__ */ a(
1482
+ te,
1483
+ {
1484
+ size: "sm",
1485
+ tone: "destructive",
1486
+ "aria-label": "Dismiss error",
1487
+ onClick: () => {
1488
+ s(!0), t();
1489
+ },
1490
+ children: /* @__PURE__ */ a(Me, {})
1491
+ }
1492
+ )
1493
+ ] }) });
1494
+ }
1495
+ const Fe = 2 * Math.PI, Se = Math.PI / 2, F = 16, $e = 10, ze = 148, ue = 4, de = 6, Ue = 22, We = 8;
1496
+ function Ge(e, t) {
1497
+ return Math.min(200, Math.max(56, 32 + (t ? 15 : 0) + e.length * 6.6));
1498
+ }
1499
+ function ln(e, t) {
1500
+ return e + $e + Math.hypot(t, F);
1501
+ }
1502
+ function cn(e, t, n, r, o, i, s) {
1503
+ if (e.length === 0) return [];
1504
+ const u = Math.max(0, i) / 2;
1505
+ return e.map((p, j) => {
1506
+ const l = r + j * o, c = Math.cos(l) * t, f = Math.sin(l) * n, y = Math.hypot(c, f), { label: x, hasToggleDot: k } = s(p), b = ln(u, Ge(x, k) / 2);
1507
+ if (y < 1e-4) return { item: p, x: b, y: 0 };
1508
+ const d = Math.max(1, b / y);
1509
+ return { item: p, x: c * d, y: f * d };
1510
+ });
1511
+ }
1512
+ function un(e, t, n, r, o) {
1513
+ if (e.length === 0) return [];
1514
+ const i = t / 2, s = n / 2, u = -s + F, p = Math.min(s - F, r - F - de), j = Math.ceil(e.length / 2), l = e.length - j, c = 2 * F + de, f = (k, b) => {
1515
+ if (b <= 1) return u;
1516
+ const d = p - u, h = c * (b - 1) <= d ? c : d / (b - 1);
1517
+ return p - k * h;
1518
+ };
1519
+ let y = 0, x = 0;
1520
+ return e.map((k, b) => {
1521
+ const d = b < j ? -1 : 1, g = d < 0 ? f(y++, j) : f(x++, l), { label: h, hasToggleDot: m } = o(k), v = Ge(h, m) / 2;
1522
+ return { item: k, x: d * Math.max(0, i - v - ue), y: g };
1523
+ });
1524
+ }
1525
+ function dn(e) {
1526
+ if (!Number.isFinite(e) || e <= 0) return 2;
1527
+ const t = e / 2, n = -t + F, o = t - F - ue - Ue - F - F - de, i = 2 * F + de;
1528
+ return 2 * Math.max(1, Math.floor((o - n) / i) + 1);
1529
+ }
1530
+ function pn(e, t, n) {
1531
+ const r = e <= 1 ? Math.round(2 * t * 1.05) : Math.round(2 * t * Math.sin(Fe / e / 2) * 1.28);
1532
+ return Math.max(ze, Math.min(r, n - 16));
1533
+ }
1534
+ function fn(e, t, n) {
1535
+ return Math.max(84, n + t * 3, e / 2 + 42);
1536
+ }
1537
+ function yr(e, t) {
1538
+ return Math.max(0, Math.min(e, t) / 2 - F - We);
1539
+ }
1540
+ function mn(e, t, n) {
1541
+ return n == null || !Number.isFinite(n) || n <= 0 ? e : Math.max(t / 2 + $e, Math.min(e, n));
1542
+ }
1543
+ const Ke = (e) => typeof e.active == "boolean", we = (e) => ({
1544
+ label: e.label,
1545
+ hasToggleDot: Ke(e)
1546
+ });
1547
+ function hn({
1548
+ items: e,
1549
+ onAction: t,
1550
+ onNavigate: n,
1551
+ onBack: r,
1552
+ currentMenu: o = "main",
1553
+ closing: i = !1,
1554
+ mascotSize: s = 96,
1555
+ radius: u = 90,
1556
+ radiusY: p,
1557
+ boxHeight: j,
1558
+ translateY: l = 0,
1559
+ breadcrumb: c,
1560
+ showPageControls: f = !1,
1561
+ onPagePrev: y,
1562
+ onPageNext: x,
1563
+ center: k,
1564
+ className: b,
1565
+ "aria-label": d = "Orbital menu"
1566
+ }) {
1567
+ const g = J(null), [h, m] = T(375);
1568
+ if (W(() => {
1569
+ const A = g.current;
1570
+ if (!A) return;
1571
+ const X = () => m(Math.max(1, A.clientWidth));
1572
+ X();
1573
+ const q = new ResizeObserver(X);
1574
+ return q.observe(A), () => q.disconnect();
1575
+ }, []), e.length === 0)
1576
+ return k ? /* @__PURE__ */ a(
1577
+ "div",
1578
+ {
1579
+ ref: g,
1580
+ className: ["j-orbital-menu", b].filter(Boolean).join(" "),
1581
+ style: { transform: `translateY(${l}px)` },
1582
+ children: /* @__PURE__ */ a("div", { className: "j-orbital-menu__center", children: k })
1583
+ }
1584
+ ) : null;
1585
+ const v = u, S = p ?? u, E = e.find((A) => A.south) ?? null, M = e.filter((A) => !A.south), R = M.length + (E ? 1 : 0), w = Fe / R, P = E ? Se + w : Se, N = j != null && Number.isFinite(j) && j > 0, L = N ? Math.max(ze, h - ue * 2) : pn(R, v, h), C = N ? j / 2 - F - ue : S + We, U = Math.min(96, Math.max(56, Math.floor(L * 0.5))), B = C - Ue, ne = (f && E ? B : C) - F, O = N && j != null ? un(M, h, j, ne, we) : cn(M, v, S, P, w, s, we), ae = (A) => (X) => {
1586
+ X.stopPropagation(), A.south ? r == null || r() : A.submenu ? n == null || n(A.submenu) : A.action && (t == null || t(A.action, A));
1587
+ };
1588
+ return /* @__PURE__ */ _(
1589
+ "div",
1590
+ {
1591
+ ref: g,
1592
+ className: ["j-orbital-menu", b].filter(Boolean).join(" "),
1593
+ style: { transform: `translateY(${l}px)` },
1594
+ children: [
1595
+ k ? /* @__PURE__ */ a("div", { className: "j-orbital-menu__center", children: k }) : null,
1596
+ /* @__PURE__ */ _("div", { className: "j-orbital-menu__anchor", role: "menu", "aria-label": d, children: [
1597
+ c ? /* @__PURE__ */ a(oe, { x: 0, y: C - 46, hiding: i, interactive: !1, children: c }) : null,
1598
+ O.map(({ item: A, x: X, y: q }, H) => /* @__PURE__ */ a(
1599
+ oe,
1600
+ {
1601
+ x: X,
1602
+ y: q,
1603
+ hiding: i,
1604
+ dim: A.dim,
1605
+ children: /* @__PURE__ */ a(gn, { item: A, onClick: ae(A) })
1606
+ },
1607
+ `${o}-${A.label}-${H}`
1608
+ )),
1609
+ E ? /* @__PURE__ */ a(oe, { x: 0, y: C, hiding: i, children: /* @__PURE__ */ a(
1610
+ Y,
1611
+ {
1612
+ tone: E.tone ?? "orange",
1613
+ size: "sm",
1614
+ fullWidth: !0,
1615
+ className: "j-orbital-btn j-orbital-btn--south",
1616
+ style: { width: L },
1617
+ title: E.tooltip ?? E.label,
1618
+ onClick: ae(E),
1619
+ role: "menuitem",
1620
+ children: E.label
1621
+ }
1622
+ ) }) : null,
1623
+ E && f ? /* @__PURE__ */ _(Xe, { children: [
1624
+ /* @__PURE__ */ a(oe, { x: -(L / 2) + U / 2, y: B, hiding: i, children: /* @__PURE__ */ a(Ne, { label: "<", title: "Previous page", width: U, onClick: y }) }),
1625
+ /* @__PURE__ */ a(oe, { x: L / 2 - U / 2, y: B, hiding: i, children: /* @__PURE__ */ a(Ne, { label: ">", title: "Next page", width: U, onClick: x }) })
1626
+ ] }) : null
1627
+ ] })
1628
+ ]
1629
+ }
1630
+ );
1631
+ }
1632
+ function oe({
1633
+ x: e,
1634
+ y: t,
1635
+ hiding: n,
1636
+ dim: r,
1637
+ interactive: o = !0,
1638
+ children: i
1639
+ }) {
1640
+ return /* @__PURE__ */ a(
1641
+ "div",
1642
+ {
1643
+ className: "j-orbital-pill",
1644
+ "data-hiding": n ? "true" : "false",
1645
+ "data-dim": r ? "true" : void 0,
1646
+ "data-static": o ? void 0 : "true",
1647
+ style: {
1648
+ "--j-orbit-x": `${n ? 0 : e}px`,
1649
+ "--j-orbit-y": `${n ? 0 : t}px`
1650
+ },
1651
+ children: i
1652
+ }
1653
+ );
1654
+ }
1655
+ function gn({
1656
+ item: e,
1657
+ onClick: t
1658
+ }) {
1659
+ if (e.badge)
1660
+ return /* @__PURE__ */ a(an, { status: e.badge.status, label: e.badge.label, title: e.tooltip });
1661
+ const n = Ke(e);
1662
+ return /* @__PURE__ */ _(
1663
+ Y,
1664
+ {
1665
+ tone: e.tone ?? (n ? "orange" : "red"),
1666
+ size: "sm",
1667
+ className: "j-orbital-btn",
1668
+ disabled: e.disabled,
1669
+ title: e.tooltip ?? e.label,
1670
+ "aria-label": n ? `${e.label} (${e.active ? "on" : "off"})` : e.label,
1671
+ "aria-pressed": n ? e.active : void 0,
1672
+ role: "menuitem",
1673
+ onClick: t,
1674
+ children: [
1675
+ n ? /* @__PURE__ */ a("span", { className: "j-orbital-dot", "data-on": e.active ? "true" : "false", "aria-hidden": !0 }) : null,
1676
+ /* @__PURE__ */ a("span", { children: e.label }),
1677
+ e.icon ? /* @__PURE__ */ a("span", { className: "j-orbital-glyph", "aria-hidden": !0, children: e.icon }) : typeof e.count == "number" ? /* @__PURE__ */ a("span", { className: "j-orbital-count", "data-any": e.count > 0 ? "true" : "false", children: e.count }) : null
1678
+ ]
1679
+ }
1680
+ );
1681
+ }
1682
+ function Ne({
1683
+ label: e,
1684
+ title: t,
1685
+ width: n,
1686
+ onClick: r
1687
+ }) {
1688
+ return /* @__PURE__ */ a(
1689
+ Y,
1690
+ {
1691
+ tone: "blue",
1692
+ size: "sm",
1693
+ className: "j-orbital-btn",
1694
+ style: { width: n },
1695
+ title: t,
1696
+ "aria-label": t,
1697
+ onClick: (o) => {
1698
+ o.stopPropagation(), r == null || r();
1699
+ },
1700
+ children: e
1701
+ }
1702
+ );
1703
+ }
1704
+ const Ee = 200, bn = 320, ie = { stack: [], page: 0, breadcrumb: [], closing: !1 };
1705
+ function Ye() {
1706
+ let e = ie, t = -1, n = 0, r = null;
1707
+ const o = /* @__PURE__ */ new Set(), i = () => o.forEach((l) => l()), s = (l) => {
1708
+ e = { ...e, ...l }, i();
1709
+ }, u = () => {
1710
+ r !== null && (clearTimeout(r), r = null);
1711
+ }, p = (l, c) => {
1712
+ u(), r = setTimeout(() => {
1713
+ r = null, l();
1714
+ }, c);
1715
+ }, j = () => {
1716
+ u(), s({ closing: !0 }), p(() => s({ ...ie }), bn);
1717
+ };
1718
+ return {
1719
+ subscribe: (l) => (o.add(l), () => o.delete(l)),
1720
+ getState: () => e,
1721
+ open: (l = "main") => {
1722
+ e.stack.length === 1 && e.stack[0] === l && e.page === 0 || (u(), s({ stack: [l], page: 0, breadcrumb: [], closing: !1 }));
1723
+ },
1724
+ close: j,
1725
+ back: () => {
1726
+ if (e.stack.length <= 1) {
1727
+ s({ breadcrumb: [] }), j();
1728
+ return;
1729
+ }
1730
+ u(), s({ breadcrumb: e.breadcrumb.slice(0, -1), closing: !0 }), p(
1731
+ () => s({ stack: e.stack.slice(0, -1), page: 0, closing: !1 }),
1732
+ Ee
1733
+ );
1734
+ },
1735
+ navigateTo: (l) => {
1736
+ u(), s({ breadcrumb: [...e.breadcrumb, l], closing: !0 }), p(
1737
+ () => s({ stack: [...e.stack, l], page: 0, closing: !1 }),
1738
+ Ee
1739
+ );
1740
+ },
1741
+ nextPage: (l) => {
1742
+ const c = Math.max(1, l);
1743
+ s({ page: c <= 1 ? 0 : (e.page + 1) % c });
1744
+ },
1745
+ prevPage: (l) => {
1746
+ const c = Math.max(1, l);
1747
+ s({ page: c <= 1 ? 0 : (e.page - 1 + c) % c });
1748
+ },
1749
+ reset: () => {
1750
+ u(), t = -1, n = 0, s({ ...ie });
1751
+ },
1752
+ signalIncomingResults: ({ count: l, topScore: c }) => {
1753
+ let f = !1;
1754
+ l > 0 && c !== void 0 && c > t && (f = e.stack.length > 1), l > 0 && l > n && (f = f || e.stack.length > 0), t = l > 0 && c !== void 0 ? c : -1, n = l, f && j();
1755
+ }
1756
+ };
1757
+ }
1758
+ const jn = Ye();
1759
+ function vn({
1760
+ root: e = "main",
1761
+ store: t = jn
1762
+ } = {}) {
1763
+ const n = Ze(t.subscribe, t.getState, () => ie), r = Q(() => t.open(e), [t, e]), o = Q(() => {
1764
+ const { stack: i, closing: s } = t.getState();
1765
+ i.length === 0 && !s ? t.open(e) : t.close();
1766
+ }, [t, e]);
1767
+ return Pe(
1768
+ () => ({
1769
+ ...n,
1770
+ currentMenu: n.stack.at(-1) ?? e,
1771
+ isOpen: n.stack.length > 0,
1772
+ isClosing: n.closing && n.stack.length > 0,
1773
+ canGoBack: n.stack.length > 1,
1774
+ open: r,
1775
+ close: t.close,
1776
+ back: t.back,
1777
+ navigateTo: t.navigateTo,
1778
+ nextPage: t.nextPage,
1779
+ prevPage: t.prevPage,
1780
+ toggle: o
1781
+ }),
1782
+ [n, e, r, o, t]
1783
+ );
1784
+ }
1785
+ const _n = new URL("../assets/jammy-seed-mascot-BdoW3O33.png", import.meta.url).href, yn = _n;
1786
+ function xn(e) {
1787
+ return (t) => {
1788
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
1789
+ };
1790
+ }
1791
+ const Ce = 14;
1792
+ function kn(e) {
1793
+ return e == null || !Number.isFinite(e) || e <= 0 ? Ce : Math.max(2, Math.min(Ce, dn(e)));
1794
+ }
1795
+ function xr({
1796
+ mood: e = "idle",
1797
+ size: t = 96,
1798
+ menuItems: n,
1799
+ getMenuItems: r,
1800
+ onMenuAction: o,
1801
+ maxOrbitRadius: i,
1802
+ orbitBoxHeight: s,
1803
+ orbitBoxWidth: u,
1804
+ baseOrbitRadius: p = 90,
1805
+ menuHidden: j = !1,
1806
+ closeLabel: l = "Close",
1807
+ orbitalStore: c,
1808
+ renderImage: f,
1809
+ className: y = "",
1810
+ ...x
1811
+ }) {
1812
+ const [k] = T(Ye), b = vn({ store: c ?? k }), d = Pe(
1813
+ () => r ?? (n ? () => n : null),
1814
+ [r, n]
1815
+ ), g = d != null && !j, h = () => {
1816
+ g && b.toggle();
1817
+ }, m = e === "happy" ? "jammy-happy" : e === "surprised" ? "jammy-shake" : "jammy-idle", v = g && (b.isOpen || b.isClosing), S = v && d ? d(b.stack) : [], E = kn(s), M = Math.max(1, Math.ceil(S.length / E)), R = Math.min(Math.max(0, b.page), M - 1), w = S.slice(R * E, (R + 1) * E), P = {
1818
+ label: b.canGoBack ? "Back" : l,
1819
+ south: !0
1820
+ }, N = v ? [...w, P] : [], L = mn(
1821
+ fn(t, w.length, p),
1822
+ t,
1823
+ i
1824
+ ), C = /* @__PURE__ */ a(
1825
+ "div",
1826
+ {
1827
+ role: g ? "button" : void 0,
1828
+ tabIndex: g ? 0 : void 0,
1829
+ onClick: h,
1830
+ onKeyDown: g ? xn(h) : void 0,
1831
+ "aria-label": "Jammy mascot",
1832
+ "aria-expanded": g ? b.isOpen : void 0,
1833
+ className: g ? "j-mascot__hit j-mascot__hit--interactive" : "j-mascot__hit",
1834
+ children: f ? f({ size: t }) : /* @__PURE__ */ a("img", { src: yn, alt: "Jammy", draggable: !1, className: "j-mascot__img" })
1835
+ }
1836
+ );
1837
+ return /* @__PURE__ */ _(
1838
+ "div",
1839
+ {
1840
+ className: ["j-mascot", m, y].filter(Boolean).join(" "),
1841
+ style: { "--j-mascot-size": `${t}px` },
1842
+ ...x,
1843
+ children: [
1844
+ C,
1845
+ v ? /* @__PURE__ */ a(
1846
+ "div",
1847
+ {
1848
+ className: "j-mascot__orbit",
1849
+ style: {
1850
+ "--j-orbit-w": u != null ? `${u}px` : void 0,
1851
+ "--j-orbit-h": s != null ? `${s}px` : void 0
1852
+ },
1853
+ children: /* @__PURE__ */ a(
1854
+ hn,
1855
+ {
1856
+ items: N,
1857
+ currentMenu: b.currentMenu,
1858
+ closing: b.isClosing,
1859
+ mascotSize: t,
1860
+ radius: L,
1861
+ boxHeight: s,
1862
+ showPageControls: S.length > E,
1863
+ onPagePrev: () => b.prevPage(M),
1864
+ onPageNext: () => b.nextPage(M),
1865
+ breadcrumb: b.breadcrumb.length > 0 ? /* @__PURE__ */ a(K, { size: "xs", tone: "grey", children: b.breadcrumb.join(" / ") }) : null,
1866
+ onNavigate: b.navigateTo,
1867
+ onBack: b.back,
1868
+ onAction: (U, B) => {
1869
+ o == null || o(U, B), b.close();
1870
+ }
1871
+ }
1872
+ )
1873
+ }
1874
+ ) : null
1875
+ ]
1876
+ }
1877
+ );
1878
+ }
1879
+ const Le = 3, pe = 220;
1880
+ function kr({
1881
+ children: e,
1882
+ onDecide: t,
1883
+ width: n = 300,
1884
+ height: r = 420,
1885
+ threshold: o = 90
1886
+ }) {
1887
+ const i = Ve.toArray(e), [s, u] = T(0), [p, j] = T(0), [l, c] = T(!1), [f, y] = T(null), [x, k] = T([]), b = J(0), d = J(null);
1888
+ W(
1889
+ () => () => {
1890
+ d.current && clearTimeout(d.current);
1891
+ },
1892
+ []
1893
+ );
1894
+ const g = i.length - s, h = Q(
1895
+ (N) => {
1896
+ if (f || s >= i.length) return;
1897
+ const L = s;
1898
+ y(N), c(!1), t == null || t(L, N), d.current = setTimeout(() => {
1899
+ k((C) => [...C, { index: L, direction: N }]), u(L + 1), y(null), j(0);
1900
+ }, pe);
1901
+ },
1902
+ [i.length, s, f, t]
1903
+ ), m = Q(() => {
1904
+ if (f || x.length === 0) return;
1905
+ const N = x[x.length - 1];
1906
+ k((L) => L.slice(0, -1)), u(N.index), j(0);
1907
+ }, [f, x]), v = (N) => {
1908
+ f || (N.currentTarget.setPointerCapture(N.pointerId), b.current = N.clientX, c(!0));
1909
+ }, S = (N) => {
1910
+ !l || f || j(N.clientX - b.current);
1911
+ }, E = () => {
1912
+ !l || f || (c(!1), Math.abs(p) >= o ? h(p > 0 ? "keep" : "pass") : j(0));
1913
+ }, M = (N) => {
1914
+ N.key === "ArrowRight" && h("keep"), N.key === "ArrowLeft" && h("pass"), N.key === "Backspace" && m();
1915
+ }, R = f ? f === "keep" ? n * 2 : -n * 2 : p, w = Math.max(-14, Math.min(14, R * 0.05)), P = Math.abs(p) >= o ? p > 0 ? "keep" : "pass" : null;
1916
+ return /* @__PURE__ */ _(
1917
+ "div",
1918
+ {
1919
+ style: {
1920
+ display: "grid",
1921
+ gridTemplateRows: `${r}px auto auto`,
1922
+ gap: 14,
1923
+ justifyItems: "center"
1924
+ },
1925
+ children: [
1926
+ /* @__PURE__ */ _(
1927
+ "div",
1928
+ {
1929
+ role: "group",
1930
+ "aria-label": "Seed triage deck",
1931
+ tabIndex: 0,
1932
+ onKeyDown: M,
1933
+ style: {
1934
+ position: "relative",
1935
+ width: n,
1936
+ height: r,
1937
+ touchAction: "none",
1938
+ outline: "none"
1939
+ },
1940
+ children: [
1941
+ g === 0 ? /* @__PURE__ */ a("div", { style: { position: "absolute", inset: 0, display: "grid", placeItems: "center" }, children: /* @__PURE__ */ a(K, { size: "sm", tone: "grey", children: "No seeds left" }) }) : null,
1942
+ i.slice(s, s + Le).map((N, L) => {
1943
+ const C = L === 0, U = C ? `translate3d(${R}px, 0, 0) rotate(${w}deg)` : `translate3d(0, ${L * 9}px, 0) scale(${1 - L * 0.045})`;
1944
+ return /* @__PURE__ */ _(
1945
+ "div",
1946
+ {
1947
+ onPointerDown: C ? v : void 0,
1948
+ onPointerMove: C ? S : void 0,
1949
+ onPointerUp: C ? E : void 0,
1950
+ onPointerCancel: C ? E : void 0,
1951
+ style: {
1952
+ position: "absolute",
1953
+ inset: 0,
1954
+ zIndex: Le - L,
1955
+ transform: U,
1956
+ transition: l && C ? "none" : `transform ${pe}ms ease-out, opacity ${pe}ms ease-out`,
1957
+ opacity: C && f ? 0 : 1,
1958
+ cursor: C ? l ? "grabbing" : "grab" : "default",
1959
+ overflow: "hidden"
1960
+ },
1961
+ children: [
1962
+ N,
1963
+ C && P ? /* @__PURE__ */ a(
1964
+ "div",
1965
+ {
1966
+ style: {
1967
+ position: "absolute",
1968
+ top: 14,
1969
+ left: P === "keep" ? 14 : void 0,
1970
+ right: P === "pass" ? 14 : void 0,
1971
+ padding: "4px 10px",
1972
+ borderRadius: 4,
1973
+ border: `2px solid ${P === "keep" ? "#3fa34d" : "#c0392b"}`,
1974
+ transform: `rotate(${P === "keep" ? -8 : 8}deg)`,
1975
+ pointerEvents: "none"
1976
+ },
1977
+ children: /* @__PURE__ */ a(K, { size: "xs", tone: P === "keep" ? "green" : "red", children: P === "keep" ? "Keep" : "Pass" })
1978
+ }
1979
+ ) : null
1980
+ ]
1981
+ },
1982
+ s + L
1983
+ );
1984
+ })
1985
+ ]
1986
+ }
1987
+ ),
1988
+ /* @__PURE__ */ _("div", { style: { display: "grid", gridAutoFlow: "column", gap: 16, alignItems: "center" }, children: [
1989
+ /* @__PURE__ */ a(
1990
+ te,
1991
+ {
1992
+ "aria-label": "Pass",
1993
+ title: "Pass (left arrow)",
1994
+ tone: "destructive",
1995
+ onClick: () => h("pass"),
1996
+ disabled: g === 0,
1997
+ children: /* @__PURE__ */ a(Me, {})
1998
+ }
1999
+ ),
2000
+ /* @__PURE__ */ a(
2001
+ te,
2002
+ {
2003
+ "aria-label": "Undo",
2004
+ title: "Undo (backspace)",
2005
+ size: "sm",
2006
+ onClick: m,
2007
+ disabled: x.length === 0,
2008
+ children: /* @__PURE__ */ a(yt, {})
2009
+ }
2010
+ ),
2011
+ /* @__PURE__ */ a(
2012
+ te,
2013
+ {
2014
+ "aria-label": "Keep",
2015
+ title: "Keep (right arrow)",
2016
+ onClick: () => h("keep"),
2017
+ disabled: g === 0,
2018
+ children: /* @__PURE__ */ a(Oe, {})
2019
+ }
2020
+ )
2021
+ ] }),
2022
+ /* @__PURE__ */ _(K, { size: "micro", tone: "grey", children: [
2023
+ g,
2024
+ " of ",
2025
+ i.length,
2026
+ " left"
2027
+ ] })
2028
+ ]
2029
+ }
2030
+ );
2031
+ }
2032
+ export {
2033
+ $e as $,
2034
+ de as A,
2035
+ Zn as B,
2036
+ rr as C,
2037
+ er as D,
2038
+ Qn as E,
2039
+ Fe as F,
2040
+ tr as G,
2041
+ nr as H,
2042
+ qn as I,
2043
+ $n as J,
2044
+ Vn as K,
2045
+ ft as L,
2046
+ ct as M,
2047
+ On as N,
2048
+ zn as O,
2049
+ dr as P,
2050
+ jr as Q,
2051
+ Jn as R,
2052
+ Hn as S,
2053
+ An as T,
2054
+ an as U,
2055
+ kr as V,
2056
+ or as W,
2057
+ K as X,
2058
+ pr as Y,
2059
+ Kn as Z,
2060
+ gr as _,
2061
+ mr as a,
2062
+ ze as a0,
2063
+ bn as a1,
2064
+ Ee as a2,
2065
+ Ue as a3,
2066
+ F as a4,
2067
+ Se as a5,
2068
+ ue as a6,
2069
+ We as a7,
2070
+ dn as a8,
2071
+ mn as a9,
2072
+ Ye as aa,
2073
+ Qt as ab,
2074
+ en as ac,
2075
+ Ge as ad,
2076
+ jn as ae,
2077
+ un as af,
2078
+ cn as ag,
2079
+ yr as ah,
2080
+ ln as ai,
2081
+ fn as aj,
2082
+ pn as ak,
2083
+ vn as al,
2084
+ ir as am,
2085
+ Fn as an,
2086
+ I as ao,
2087
+ Pn as ap,
2088
+ Oe as aq,
2089
+ Bn as ar,
2090
+ Tn as as,
2091
+ Me as at,
2092
+ Rn as au,
2093
+ Mn as av,
2094
+ wt as aw,
2095
+ sr as ax,
2096
+ fr as b,
2097
+ Un as c,
2098
+ $ as d,
2099
+ Y as e,
2100
+ Cn as f,
2101
+ cr as g,
2102
+ At as h,
2103
+ vr as i,
2104
+ ur as j,
2105
+ _r as k,
2106
+ Yn as l,
2107
+ br as m,
2108
+ te as n,
2109
+ Wn as o,
2110
+ lr as p,
2111
+ In as q,
2112
+ hr as r,
2113
+ Gn as s,
2114
+ ar as t,
2115
+ xr as u,
2116
+ Dn as v,
2117
+ hn as w,
2118
+ Vt as x,
2119
+ Ln as y,
2120
+ Xn as z
2121
+ };
2122
+ //# sourceMappingURL=JimboSwipeDeck-eog6nv7F.js.map