@pieai/swimmer-ui-kit 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,48 +1,48 @@
1
1
  "use client";
2
2
  import { S as e, a as t, t as n } from "./LiquidGroup-RTK_Uvgw.js";
3
- import { C as r, D as i, E as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, x as D, y as O } from "./GameStageTile-F41PxXDG.js";
4
- import { c as k, f as A, h as ee, i as j, m as te, n as M, o as N, p as ne, r as re, s as P, t as ie, y as ae } from "./GameAvatar-CRJ1r8l5.js";
5
- import { createElement as oe, forwardRef as F, useCallback as I, useEffect as L, useId as R, useRef as z, useState as B } from "react";
6
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
7
- import { FloatingPortal as W, autoUpdate as G, flip as K, offset as q, safePolygon as se, shift as ce, useClick as le, useDismiss as ue, useFloating as de, useFocus as fe, useHover as pe, useInteractions as me, useRole as he } from "@floating-ui/react";
3
+ import { C as r, D as i, E as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, x as D, y as O } from "./GameStageTile-BtBb8NEw.js";
4
+ import { c as k, f as A, h as j, i as M, m as ee, n as N, o as P, p as te, r as F, s as I, t as ne, y as re } from "./GameAvatar-Cs5KVYFf.js";
5
+ import { cloneElement as ie, createElement as ae, forwardRef as oe, useCallback as L, useEffect as R, useId as z, useLayoutEffect as se, useRef as B, useState as V } from "react";
6
+ import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
+ import { FloatingFocusManager as ce, FloatingPortal as G, autoUpdate as K, flip as q, offset as J, safePolygon as Y, shift as X, useClick as le, useDismiss as Z, useFloating as Q, useFocus as ue, useHover as de, useInteractions as fe, useRole as pe } from "@floating-ui/react";
8
8
  //#region src/controls/GameListRow/GameListRow.tsx
9
- function ge({ title: e, description: t, thumbnail: n, current: r = !1, selected: i, disabled: a = !1, onSelect: o, selectLabel: s, actions: c, className: l, hue: u, ...d }) {
10
- let f = z(null), p = /* @__PURE__ */ U(V, { children: [
11
- n ? /* @__PURE__ */ H("span", {
9
+ function me({ title: e, description: t, thumbnail: n, current: r = !1, selected: i, disabled: a = !1, onSelect: o, selectLabel: s, actions: c, className: l, hue: u, ...d }) {
10
+ let f = B(null), p = /* @__PURE__ */ W(H, { children: [
11
+ n ? /* @__PURE__ */ U("span", {
12
12
  className: "game-ui-list-row-thumbnail",
13
13
  children: n
14
14
  }) : null,
15
- /* @__PURE__ */ U("span", {
15
+ /* @__PURE__ */ W("span", {
16
16
  className: "game-ui-list-row-copy",
17
- children: [/* @__PURE__ */ H("span", {
17
+ children: [/* @__PURE__ */ U("span", {
18
18
  className: "game-ui-list-row-title",
19
19
  children: e
20
- }), t ? /* @__PURE__ */ H("span", {
20
+ }), t ? /* @__PURE__ */ U("span", {
21
21
  className: "game-ui-list-row-description",
22
22
  children: t
23
23
  }) : null]
24
24
  }),
25
- r ? /* @__PURE__ */ H("span", {
25
+ r ? /* @__PURE__ */ U("span", {
26
26
  className: "game-ui-list-row-current",
27
27
  "aria-hidden": "true"
28
28
  }) : null
29
29
  ] });
30
- return /* @__PURE__ */ U("div", {
30
+ return /* @__PURE__ */ W("div", {
31
31
  ...d,
32
32
  className: ["game-ui-list-row", l].filter(Boolean).join(" "),
33
33
  "data-selected": i || void 0,
34
34
  "data-game-ui-disabled": a || void 0,
35
35
  "data-game-ui-paint": "",
36
36
  style: {
37
- ...N(u),
37
+ ...P(u),
38
38
  ...d.style
39
39
  },
40
40
  children: [
41
- /* @__PURE__ */ H(P, {
41
+ /* @__PURE__ */ U(I, {
42
42
  static: !o,
43
43
  pressTarget: f
44
44
  }),
45
- o ? /* @__PURE__ */ U("button", {
45
+ o ? /* @__PURE__ */ W("button", {
46
46
  type: "button",
47
47
  className: "game-ui-list-row-main",
48
48
  ref: f,
@@ -51,13 +51,13 @@ function ge({ title: e, description: t, thumbnail: n, current: r = !1, selected:
51
51
  "aria-label": s,
52
52
  "aria-current": r ? "true" : void 0,
53
53
  "aria-pressed": i,
54
- children: [p, /* @__PURE__ */ H(k, {})]
55
- }) : /* @__PURE__ */ U("div", {
54
+ children: [p, /* @__PURE__ */ U(k, {})]
55
+ }) : /* @__PURE__ */ W("div", {
56
56
  className: "game-ui-list-row-main",
57
57
  "aria-current": r ? "true" : void 0,
58
- children: [p, /* @__PURE__ */ H(k, {})]
58
+ children: [p, /* @__PURE__ */ U(k, {})]
59
59
  }),
60
- c ? /* @__PURE__ */ H("div", {
60
+ c ? /* @__PURE__ */ U("div", {
61
61
  className: "game-ui-list-row-actions",
62
62
  children: c
63
63
  }) : null
@@ -66,19 +66,19 @@ function ge({ title: e, description: t, thumbnail: n, current: r = !1, selected:
66
66
  }
67
67
  //#endregion
68
68
  //#region src/controls/GameOtpInput/GameOtpInput.tsx
69
- function J(e) {
69
+ function he(e) {
70
70
  return e.normalize("NFKC").replace(/[^0-9]/g, "");
71
71
  }
72
- function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i = !1, disabled: a = !1, readOnly: o = !1, getSlotLabel: s = (e, t) => `${e + 1} / ${t}`, getSlotDescription: c, className: l, "aria-describedby": u, ...d }) {
72
+ function ge({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i = !1, disabled: a = !1, readOnly: o = !1, getSlotLabel: s = (e, t) => `${e + 1} / ${t}`, getSlotDescription: c, className: l, "aria-describedby": u, ...d }) {
73
73
  if (!Number.isSafeInteger(e) || e < 1 || e > 32) throw RangeError("GameOtpInput length must be an integer from 1 to 32.");
74
- let f = R(), p = z([]), m = z(!1), [h, g] = B(null), _ = J(t).slice(0, e), v = (t) => {
74
+ let f = z(), p = B([]), m = B(!1), [h, g] = V(null), _ = he(t).slice(0, e), v = (t) => {
75
75
  let n = p.current[Math.max(0, Math.min(t, e - 1))];
76
76
  n?.focus(), n?.select();
77
77
  }, y = (t) => {
78
78
  t !== _ && (n(t), t.length === e && r?.(t));
79
79
  }, b = (t, n) => {
80
80
  if (a || o) return;
81
- let r = J(n);
81
+ let r = he(n);
82
82
  if (!r) {
83
83
  let e = p.current[t];
84
84
  e && (e.value = _[t] ?? "");
@@ -104,7 +104,7 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
104
104
  }[t.key];
105
105
  r === void 0 ? (t.key === "Backspace" || t.key === "Delete") && (t.preventDefault(), x(n, t.key === "Backspace")) : (t.preventDefault(), v(r));
106
106
  };
107
- return /* @__PURE__ */ H("div", {
107
+ return /* @__PURE__ */ U("div", {
108
108
  ...d,
109
109
  role: "group",
110
110
  "aria-describedby": u,
@@ -113,9 +113,9 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
113
113
  dir: "ltr",
114
114
  children: Array.from({ length: e }, (t, n) => {
115
115
  let r = c?.(n, e), l = r ? `${f}-${n}-description` : void 0;
116
- return /* @__PURE__ */ U("span", {
116
+ return /* @__PURE__ */ W("span", {
117
117
  className: "game-ui-otp-slot",
118
- children: [/* @__PURE__ */ H("input", {
118
+ children: [/* @__PURE__ */ U("input", {
119
119
  ref: (e) => {
120
120
  p.current[n] = e;
121
121
  },
@@ -154,7 +154,7 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
154
154
  m.current = !1, g(null), b(n, t);
155
155
  },
156
156
  "data-game-ui-paint": ""
157
- }), r ? /* @__PURE__ */ H("span", {
157
+ }), r ? /* @__PURE__ */ U("span", {
158
158
  id: l,
159
159
  className: "game-ui-sr-only",
160
160
  children: r
@@ -165,10 +165,10 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
165
165
  }
166
166
  //#endregion
167
167
  //#region src/controls/GameSelect/GameSelect.tsx
168
- var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
169
- return /* @__PURE__ */ H("span", {
168
+ var _e = oe(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
169
+ return /* @__PURE__ */ U("span", {
170
170
  className: "game-ui-select-frame",
171
- children: /* @__PURE__ */ oe("select", {
171
+ children: /* @__PURE__ */ ae("select", {
172
172
  ...i,
173
173
  ref: a,
174
174
  key: "control",
@@ -176,7 +176,7 @@ var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
176
176
  "data-invalid": t ? "true" : void 0,
177
177
  "data-game-ui-paint": "",
178
178
  style: {
179
- ...N(n),
179
+ ...P(n),
180
180
  ...r
181
181
  },
182
182
  className: [
@@ -189,13 +189,13 @@ var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
189
189
  });
190
190
  //#endregion
191
191
  //#region src/feedback/GameCallout/GameCallout.tsx
192
- function ye({ heading: e, children: t, tone: n = "info", className: r, style: i, ...a }) {
192
+ function ve({ heading: e, children: t, tone: n = "info", className: r, style: i, ...a }) {
193
193
  let o = [
194
194
  "game-ui-callout",
195
195
  `game-ui-callout--${n}`,
196
196
  r
197
197
  ].filter(Boolean).join(" ");
198
- return /* @__PURE__ */ U("div", {
198
+ return /* @__PURE__ */ W("div", {
199
199
  ...a,
200
200
  className: o,
201
201
  role: a.role ?? "note",
@@ -204,16 +204,16 @@ function ye({ heading: e, children: t, tone: n = "info", className: r, style: i,
204
204
  "data-game-ui-meaning": n !== "neutral" && n !== "danger" ? "true" : void 0,
205
205
  "data-game-ui-danger": n === "danger" ? "true" : void 0,
206
206
  style: {
207
- ...N(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
207
+ ...P(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
208
208
  ...i
209
209
  },
210
210
  children: [
211
- /* @__PURE__ */ H(P, { static: !0 }),
212
- e ? /* @__PURE__ */ H("div", {
211
+ /* @__PURE__ */ U(I, { static: !0 }),
212
+ e ? /* @__PURE__ */ U("div", {
213
213
  className: "game-ui-callout-title",
214
214
  children: e
215
215
  }) : null,
216
- /* @__PURE__ */ H("div", {
216
+ /* @__PURE__ */ U("div", {
217
217
  className: "game-ui-callout-body",
218
218
  children: t
219
219
  })
@@ -222,8 +222,8 @@ function ye({ heading: e, children: t, tone: n = "info", className: r, style: i,
222
222
  }
223
223
  //#endregion
224
224
  //#region src/feedback/GameHelpTip/GameHelpTip.tsx
225
- function be({ label: e, children: t }) {
226
- let [n, r] = B(!1), [i, a] = B(void 0), { refs: o, floatingStyles: s, context: c } = de({
225
+ function ye({ label: e, children: t }) {
226
+ let [n, r] = V(!1), [i, a] = V(void 0), { refs: o, floatingStyles: s, context: c } = Q({
227
227
  open: n,
228
228
  onOpenChange(e, t, n) {
229
229
  !e && n === "escape-key" && (t?.preventDefault(), t?.stopPropagation()), r(e);
@@ -231,29 +231,29 @@ function be({ label: e, children: t }) {
231
231
  placement: "bottom-start",
232
232
  strategy: "fixed",
233
233
  middleware: [
234
- q(8),
235
- K(),
236
- ce({ padding: 12 })
234
+ J(8),
235
+ q(),
236
+ X({ padding: 12 })
237
237
  ],
238
- whileElementsMounted: G
239
- }), l = I((e) => {
238
+ whileElementsMounted: K
239
+ }), l = L((e) => {
240
240
  o.setReference(e), a(e?.closest("dialog") ?? void 0);
241
- }, [o]), { getReferenceProps: u, getFloatingProps: d } = me([
242
- pe(c, {
241
+ }, [o]), { getReferenceProps: u, getFloatingProps: d } = fe([
242
+ de(c, {
243
243
  mouseOnly: !0,
244
244
  move: !1,
245
245
  delay: {
246
246
  open: 300,
247
247
  close: 120
248
248
  },
249
- handleClose: se()
249
+ handleClose: Y()
250
250
  }),
251
- fe(c),
252
- le(c),
253
251
  ue(c),
254
- he(c, { role: "tooltip" })
252
+ le(c),
253
+ Z(c),
254
+ pe(c, { role: "tooltip" })
255
255
  ]);
256
- return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ U("button", {
256
+ return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W("button", {
257
257
  ref: l,
258
258
  type: "button",
259
259
  className: "game-ui-help-trigger",
@@ -262,27 +262,27 @@ function be({ label: e, children: t }) {
262
262
  n && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), r(!1));
263
263
  } }),
264
264
  "data-game-ui-paint": "",
265
- children: [/* @__PURE__ */ H(P, {}), /* @__PURE__ */ U("svg", {
265
+ children: [/* @__PURE__ */ U(I, {}), /* @__PURE__ */ W("svg", {
266
266
  width: "20",
267
267
  height: "20",
268
268
  viewBox: "0 0 24 24",
269
269
  fill: "none",
270
270
  "aria-hidden": "true",
271
271
  children: [
272
- /* @__PURE__ */ H("circle", {
272
+ /* @__PURE__ */ U("circle", {
273
273
  cx: "12",
274
274
  cy: "12",
275
275
  r: "9",
276
276
  stroke: "currentColor",
277
277
  strokeWidth: "1.6"
278
278
  }),
279
- /* @__PURE__ */ H("path", {
279
+ /* @__PURE__ */ U("path", {
280
280
  d: "M9.8 8.5a2.5 2.5 0 0 1 4.7 1.2c0 1.8-2.5 1.9-2.5 3.6",
281
281
  stroke: "currentColor",
282
282
  strokeWidth: "1.6",
283
283
  strokeLinecap: "round"
284
284
  }),
285
- /* @__PURE__ */ H("circle", {
285
+ /* @__PURE__ */ U("circle", {
286
286
  cx: "12",
287
287
  cy: "16.7",
288
288
  r: "1",
@@ -290,9 +290,9 @@ function be({ label: e, children: t }) {
290
290
  })
291
291
  ]
292
292
  })]
293
- }), n && /* @__PURE__ */ H(W, {
293
+ }), n && /* @__PURE__ */ U(G, {
294
294
  root: i,
295
- children: /* @__PURE__ */ H("div", {
295
+ children: /* @__PURE__ */ U("div", {
296
296
  ref: o.setFloating,
297
297
  className: "game-ui-help-tip",
298
298
  style: s,
@@ -302,12 +302,219 @@ function be({ label: e, children: t }) {
302
302
  })] });
303
303
  }
304
304
  //#endregion
305
+ //#region src/feedback/GameHelpCard/GameHelpCard.tsx
306
+ var be = 150;
307
+ function xe({ children: e, label: t, topics: n, link: r, placement: i = "bottom", align: a = "center", openDelay: o = 200 }) {
308
+ let s = z(), [c, l] = V(!1), [u, d] = V(""), [f, p] = V(void 0), m = B(null), h = B(void 0), g = B(!1), _ = B(!1), v = (e) => {
309
+ e && d(""), l(e);
310
+ }, { refs: y, floatingStyles: b, context: x } = Q({
311
+ open: c,
312
+ onOpenChange(e, t, n) {
313
+ if (!e && n === "escape-key") {
314
+ t?.preventDefault(), t?.stopPropagation();
315
+ let e = m.current;
316
+ e && y.floating.current?.contains(document.activeElement) && (_.current = !0, e.focus(), _.current = !1);
317
+ }
318
+ v(e);
319
+ },
320
+ placement: a === "center" ? i : `${i}-${a}`,
321
+ strategy: "fixed",
322
+ middleware: [
323
+ J(8),
324
+ q(),
325
+ X({ padding: 12 })
326
+ ],
327
+ whileElementsMounted: K
328
+ }), { getReferenceProps: S, getFloatingProps: C } = fe([de(x, {
329
+ mouseOnly: !0,
330
+ move: !1,
331
+ delay: {
332
+ open: o,
333
+ close: be
334
+ },
335
+ handleClose: Y()
336
+ }), Z(x)]), w = e.props.ref, T = L((e) => {
337
+ m.current = e, y.setReference(e), p(e?.closest("dialog") ?? void 0), typeof w == "function" ? w(e) : w && (w.current = e);
338
+ }, [w, y]), E = n.find((e) => e.id === u) ?? n[0];
339
+ if (!E) return e;
340
+ let D = e.props, O = `${s}-card`, k = `${s}-tabs`, A = (e) => `${k}-${e}`, j = (e) => `${s}-panel-${e}`;
341
+ return /* @__PURE__ */ W(H, { children: [ie(e, {
342
+ ...S({
343
+ onPointerDown(e) {
344
+ h.current = e.pointerType, g.current = !0, D.onPointerDown?.(e);
345
+ },
346
+ onFocus(e) {
347
+ let t = g.current;
348
+ g.current = !1, !t && !c && !_.current && v(!0), D.onFocus?.(e);
349
+ },
350
+ onBlur(e) {
351
+ g.current = !1, D.onBlur?.(e);
352
+ },
353
+ onClick(e) {
354
+ let t = h.current === "touch";
355
+ if (h.current = void 0, t && !c) {
356
+ e.preventDefault(), e.stopPropagation(), v(!0);
357
+ return;
358
+ }
359
+ D.onClick?.(e);
360
+ },
361
+ onKeyDown(e) {
362
+ if (c && e.key === "Escape") {
363
+ e.preventDefault(), e.stopPropagation(), v(!1);
364
+ return;
365
+ }
366
+ D.onKeyDown?.(e);
367
+ }
368
+ }),
369
+ ref: T,
370
+ "aria-expanded": c,
371
+ "aria-controls": c ? O : void 0
372
+ }), c && /* @__PURE__ */ U(G, {
373
+ root: f,
374
+ children: /* @__PURE__ */ U(ce, {
375
+ context: x,
376
+ modal: !1,
377
+ initialFocus: -1,
378
+ returnFocus: !1,
379
+ order: ["reference", "content"],
380
+ children: /* @__PURE__ */ W("div", {
381
+ ref: y.setFloating,
382
+ id: O,
383
+ role: "dialog",
384
+ "aria-label": t,
385
+ className: "game-ui-help-card",
386
+ style: b,
387
+ ...C(),
388
+ children: [/* @__PURE__ */ U(we, { source: m.current }), /* @__PURE__ */ W("div", {
389
+ className: "game-ui-help-card-paint",
390
+ "data-game-ui-paint": "",
391
+ children: [/* @__PURE__ */ U(I, { static: !0 }), /* @__PURE__ */ W("div", {
392
+ className: "game-ui-help-card-content",
393
+ children: [
394
+ n.length > 1 ? /* @__PURE__ */ U(F, {
395
+ id: k,
396
+ activeId: E.id,
397
+ "aria-label": t,
398
+ tabs: n.map((e) => ({
399
+ id: e.id,
400
+ label: e.label,
401
+ panelId: j(e.id)
402
+ })),
403
+ onSelect: d
404
+ }) : null,
405
+ n.length > 1 ? n.map((e) => /* @__PURE__ */ U("div", {
406
+ id: j(e.id),
407
+ role: "tabpanel",
408
+ "aria-labelledby": A(e.id),
409
+ hidden: e.id !== E.id,
410
+ children: /* @__PURE__ */ U(Te, {
411
+ topic: e,
412
+ showMedia: e.id === E.id
413
+ })
414
+ }, e.id)) : /* @__PURE__ */ U(Te, {
415
+ topic: E,
416
+ showMedia: !0
417
+ }),
418
+ r ? /* @__PURE__ */ U("a", {
419
+ className: "game-ui-help-card-link",
420
+ href: r.href,
421
+ children: r.label
422
+ }) : null
423
+ ]
424
+ })]
425
+ })]
426
+ })
427
+ })
428
+ })] });
429
+ }
430
+ var Se = ["data-game-ui-theme", "data-game-ui-style"], Ce = [
431
+ "class",
432
+ "style",
433
+ ...Se
434
+ ];
435
+ function we({ source: e }) {
436
+ let t = B(null);
437
+ return se(() => {
438
+ let n = t.current?.parentElement;
439
+ if (!n || !e) return;
440
+ let r = (e) => e.closest("[data-game-ui-theme], [data-game-ui-style]") ?? document.documentElement, i = () => {
441
+ let t = r(e);
442
+ for (let e of Se) {
443
+ let r = t.closest(`[${e}]`)?.getAttribute(e);
444
+ r ? n.setAttribute(e, r) : n.removeAttribute(e);
445
+ }
446
+ let i = getComputedStyle(t);
447
+ for (let e of i) {
448
+ if (!e.startsWith("--game-ui-") || e === "--game-ui-droplet-radius") continue;
449
+ let t = i.getPropertyValue(e).trim();
450
+ n.style.getPropertyValue(e) !== t && n.style.setProperty(e, t);
451
+ }
452
+ }, a = new MutationObserver(i);
453
+ for (let t = r(e); t; t = t.parentElement) a.observe(t, {
454
+ attributes: !0,
455
+ attributeFilter: Ce
456
+ });
457
+ return i(), () => a.disconnect();
458
+ }, [e]), /* @__PURE__ */ U("span", {
459
+ ref: t,
460
+ hidden: !0
461
+ });
462
+ }
463
+ function Te({ topic: e, showMedia: t }) {
464
+ return /* @__PURE__ */ W(H, { children: [
465
+ /* @__PURE__ */ U("h3", {
466
+ className: "game-ui-help-card-title",
467
+ children: e.title
468
+ }),
469
+ /* @__PURE__ */ U("p", {
470
+ className: "game-ui-help-card-body",
471
+ children: e.body
472
+ }),
473
+ t && e.media ? /* @__PURE__ */ U(Ee, { media: e.media }) : null
474
+ ] });
475
+ }
476
+ function Ee({ media: e }) {
477
+ return e.kind === "image" ? /* @__PURE__ */ U("img", {
478
+ className: "game-ui-help-card-media",
479
+ src: e.src,
480
+ alt: e.alt,
481
+ width: e.width,
482
+ height: e.height,
483
+ decoding: "async",
484
+ style: { aspectRatio: `${e.width} / ${e.height}` }
485
+ }) : /* @__PURE__ */ U(De, { media: e });
486
+ }
487
+ function De({ media: e }) {
488
+ let n = t(), r = B(null);
489
+ return R(() => {
490
+ let e = r.current;
491
+ if (!(!e || n)) return e.play().catch(() => void 0), () => e.pause();
492
+ }, [n]), /* @__PURE__ */ U("video", {
493
+ ref: r,
494
+ className: "game-ui-help-card-media",
495
+ width: e.width,
496
+ height: e.height,
497
+ style: { aspectRatio: `${e.width} / ${e.height}` },
498
+ poster: e.poster,
499
+ muted: !0,
500
+ loop: !0,
501
+ playsInline: !0,
502
+ preload: "metadata",
503
+ role: "img",
504
+ "aria-label": e.alt,
505
+ children: e.sources.map((e) => /* @__PURE__ */ U("source", {
506
+ src: e.src,
507
+ type: e.type
508
+ }, e.src))
509
+ });
510
+ }
511
+ //#endregion
305
512
  //#region src/feedback/GamePrompt/GamePrompt.tsx
306
- function xe({ actionLabel: e, children: t, title: n }) {
307
- return /* @__PURE__ */ U("section", {
513
+ function Oe({ actionLabel: e, children: t, title: n }) {
514
+ return /* @__PURE__ */ W("section", {
308
515
  "aria-label": n,
309
516
  className: "game-ui-prompt",
310
- children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h3", { children: n }), /* @__PURE__ */ H("p", { children: t })] }), e ? /* @__PURE__ */ H(j, {
517
+ children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", { children: n }), /* @__PURE__ */ U("p", { children: t })] }), e ? /* @__PURE__ */ U(M, {
311
518
  variant: "primary",
312
519
  children: e
313
520
  }) : null]
@@ -315,33 +522,33 @@ function xe({ actionLabel: e, children: t, title: n }) {
315
522
  }
316
523
  //#endregion
317
524
  //#region src/containers/shared/classes.ts
318
- function Y(...e) {
525
+ function ke(...e) {
319
526
  return e.filter(Boolean).join(" ");
320
527
  }
321
528
  //#endregion
322
529
  //#region src/containers/GameCollapsiblePanel/GameCollapsiblePanel.tsx
323
- var Se = {
530
+ var Ae = {
324
531
  collapse: "Collapse",
325
532
  expand: "Expand"
326
533
  };
327
- function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels: i, onOpenChange: a, open: o, title: s, tone: c = "default", ...l }) {
328
- let u = R(), [d, f] = B(r), p = o ?? d, m = {
329
- ...Se,
534
+ function je({ actions: e, children: t, className: n, defaultOpen: r = !0, labels: i, onOpenChange: a, open: o, title: s, tone: c = "default", ...l }) {
535
+ let u = z(), [d, f] = V(r), p = o ?? d, m = {
536
+ ...Ae,
330
537
  ...i
331
538
  }, h = () => {
332
539
  let e = !p;
333
540
  o === void 0 && f(e), a?.(e);
334
541
  };
335
- return /* @__PURE__ */ U("section", {
542
+ return /* @__PURE__ */ W("section", {
336
543
  ...l,
337
- className: Y("game-ui-collapsible", n),
544
+ className: ke("game-ui-collapsible", n),
338
545
  "data-open": p,
339
546
  "data-panel-tone": c,
340
- children: [/* @__PURE__ */ U("header", {
547
+ children: [/* @__PURE__ */ W("header", {
341
548
  className: "game-ui-collapsible-header",
342
- children: [/* @__PURE__ */ H("h3", {
549
+ children: [/* @__PURE__ */ U("h3", {
343
550
  className: "game-ui-collapsible-heading",
344
- children: /* @__PURE__ */ U("button", {
551
+ children: /* @__PURE__ */ W("button", {
345
552
  "aria-controls": u,
346
553
  "aria-expanded": p,
347
554
  className: "game-ui-collapsible-toggle",
@@ -350,27 +557,27 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
350
557
  type: "button",
351
558
  "data-game-ui-paint": "",
352
559
  children: [
353
- /* @__PURE__ */ H(P, {}),
354
- /* @__PURE__ */ H("span", {
560
+ /* @__PURE__ */ U(I, {}),
561
+ /* @__PURE__ */ U("span", {
355
562
  "aria-hidden": "true",
356
563
  className: "game-ui-collapsible-chevron"
357
564
  }),
358
- /* @__PURE__ */ H("span", {
565
+ /* @__PURE__ */ U("span", {
359
566
  className: "game-ui-collapsible-title",
360
567
  children: s
361
568
  })
362
569
  ]
363
570
  })
364
- }), e ? /* @__PURE__ */ H("span", {
571
+ }), e ? /* @__PURE__ */ U("span", {
365
572
  className: "game-ui-collapsible-actions",
366
573
  children: e
367
574
  }) : null]
368
- }), /* @__PURE__ */ H("div", {
575
+ }), /* @__PURE__ */ U("div", {
369
576
  className: "game-ui-collapsible-region",
370
577
  id: u,
371
- children: /* @__PURE__ */ H("div", {
578
+ children: /* @__PURE__ */ U("div", {
372
579
  className: "game-ui-collapsible-clip",
373
- children: /* @__PURE__ */ H("div", {
580
+ children: /* @__PURE__ */ U("div", {
374
581
  className: "game-ui-collapsible-content",
375
582
  children: t
376
583
  })
@@ -380,14 +587,14 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
380
587
  }
381
588
  //#endregion
382
589
  //#region src/containers/GameWindowPanel/GameWindowPanel.tsx
383
- function we({ kind: e }) {
384
- return /* @__PURE__ */ H("svg", {
590
+ function Me({ kind: e }) {
591
+ return /* @__PURE__ */ U("svg", {
385
592
  "aria-hidden": "true",
386
593
  fill: "none",
387
594
  height: "14",
388
595
  viewBox: "0 0 14 14",
389
596
  width: "14",
390
- children: /* @__PURE__ */ H("path", {
597
+ children: /* @__PURE__ */ U("path", {
391
598
  d: {
392
599
  close: "M3 3l8 8M11 3l-8 8",
393
600
  maximize: "M3 5V3h2M9 3h2v2M11 9v2H9M5 11H3V9",
@@ -402,9 +609,9 @@ function we({ kind: e }) {
402
609
  }
403
610
  //#endregion
404
611
  //#region src/containers/GameModal/GameModal.tsx
405
- function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdrop: r = !0, footer: i, keepMounted: a = !1, onClose: o, open: s, position: c = "center", size: l = "md", title: u }) {
406
- let d = z(null), f = z(null), p = R(), [m, h] = B(!s);
407
- return L(() => {
612
+ function Ne({ children: e, className: t, closeLabel: n = "Close", closeOnBackdrop: r = !0, footer: i, keepMounted: a = !1, onClose: o, open: s, position: c = "center", size: l = "md", title: u }) {
613
+ let d = B(null), f = B(null), p = z(), [m, h] = V(!s);
614
+ return R(() => {
408
615
  let e = d.current, t = f.current;
409
616
  if (!(!e || !t)) {
410
617
  if (s) {
@@ -413,9 +620,9 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
413
620
  }
414
621
  e.open && e.close(), t.setAttribute("aria-hidden", "true"), t.setAttribute("inert", ""), h(!0);
415
622
  }
416
- }, [m, s]), /* @__PURE__ */ H("dialog", {
623
+ }, [m, s]), /* @__PURE__ */ U("dialog", {
417
624
  "aria-labelledby": p,
418
- className: Y("game-ui-modal", t),
625
+ className: ke("game-ui-modal", t),
419
626
  "data-position": c,
420
627
  "data-size": l,
421
628
  onCancel: (e) => {
@@ -425,32 +632,32 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
425
632
  r && e.target === d.current && o();
426
633
  },
427
634
  ref: d,
428
- children: /* @__PURE__ */ U("div", {
635
+ children: /* @__PURE__ */ W("div", {
429
636
  "aria-hidden": m ? !0 : void 0,
430
637
  className: "game-ui-modal-frame",
431
638
  inert: m || void 0,
432
639
  ref: f,
433
640
  children: [
434
- /* @__PURE__ */ U("header", {
641
+ /* @__PURE__ */ W("header", {
435
642
  className: "game-ui-modal-header",
436
- children: [/* @__PURE__ */ H("h2", {
643
+ children: [/* @__PURE__ */ U("h2", {
437
644
  className: "game-ui-modal-title",
438
645
  id: p,
439
646
  children: u
440
- }), /* @__PURE__ */ U("button", {
647
+ }), /* @__PURE__ */ W("button", {
441
648
  "aria-label": n,
442
649
  className: "game-ui-icon-button game-ui-window-button",
443
650
  onClick: o,
444
651
  type: "button",
445
652
  "data-game-ui-paint": "",
446
- children: [/* @__PURE__ */ H(P, {}), /* @__PURE__ */ H(we, { kind: "close" })]
653
+ children: [/* @__PURE__ */ U(I, {}), /* @__PURE__ */ U(Me, { kind: "close" })]
447
654
  })]
448
655
  }),
449
- /* @__PURE__ */ H("div", {
656
+ /* @__PURE__ */ U("div", {
450
657
  className: "game-ui-modal-body",
451
658
  children: s || a ? e : null
452
659
  }),
453
- i ? /* @__PURE__ */ H("footer", {
660
+ i ? /* @__PURE__ */ U("footer", {
454
661
  className: "game-ui-modal-footer",
455
662
  children: i
456
663
  }) : null
@@ -460,38 +667,38 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
460
667
  }
461
668
  //#endregion
462
669
  //#region src/containers/GameShell/GameShell.tsx
463
- function Ee({ assetLibrary: e, bottomBar: t, children: n, className: r, density: i = "comfortable", hud: a, layout: o = "auto", movementPad: s, overlay: c, sidePanel: l, title: u }) {
464
- return /* @__PURE__ */ U("section", {
670
+ function Pe({ assetLibrary: e, bottomBar: t, children: n, className: r, density: i = "comfortable", hud: a, layout: o = "auto", movementPad: s, overlay: c, sidePanel: l, title: u }) {
671
+ return /* @__PURE__ */ W("section", {
465
672
  "aria-label": u,
466
673
  className: ["game-ui-shell", r].filter(Boolean).join(" "),
467
674
  "data-density": i,
468
675
  "data-layout": o,
469
676
  children: [
470
- /* @__PURE__ */ H("div", {
677
+ /* @__PURE__ */ U("div", {
471
678
  className: "game-ui-shell-scene",
472
679
  children: n
473
680
  }),
474
- a ? /* @__PURE__ */ H("div", {
681
+ a ? /* @__PURE__ */ U("div", {
475
682
  className: "game-ui-shell-hud",
476
683
  children: a
477
684
  }) : null,
478
- e ? /* @__PURE__ */ H("aside", {
685
+ e ? /* @__PURE__ */ U("aside", {
479
686
  className: "game-ui-shell-library",
480
687
  children: e
481
688
  }) : null,
482
- l ? /* @__PURE__ */ H("aside", {
689
+ l ? /* @__PURE__ */ U("aside", {
483
690
  className: "game-ui-shell-side-panel",
484
691
  children: l
485
692
  }) : null,
486
- s ? /* @__PURE__ */ H("div", {
693
+ s ? /* @__PURE__ */ U("div", {
487
694
  className: "game-ui-shell-movement",
488
695
  children: s
489
696
  }) : null,
490
- t ? /* @__PURE__ */ H("div", {
697
+ t ? /* @__PURE__ */ U("div", {
491
698
  className: "game-ui-shell-bottom-bar",
492
699
  children: t
493
700
  }) : null,
494
- c ? /* @__PURE__ */ H("div", {
701
+ c ? /* @__PURE__ */ U("div", {
495
702
  className: "game-ui-shell-overlay",
496
703
  children: c
497
704
  }) : null
@@ -500,63 +707,63 @@ function Ee({ assetLibrary: e, bottomBar: t, children: n, className: r, density:
500
707
  }
501
708
  //#endregion
502
709
  //#region src/game/GameCollectibleCard/GameCollectibleCard.tsx
503
- var X = 10, De = 6;
504
- function Oe({ filled: e, total: t }) {
505
- return /* @__PURE__ */ H("span", {
710
+ var Fe = 10, Ie = 6;
711
+ function Le({ filled: e, total: t }) {
712
+ return /* @__PURE__ */ U("span", {
506
713
  className: "game-ui-collect-card-pips",
507
714
  "aria-hidden": "true",
508
- children: Array.from({ length: Math.max(0, t) }, (t, n) => /* @__PURE__ */ H("i", { "data-on": n < e ? "true" : void 0 }, n))
715
+ children: Array.from({ length: Math.max(0, t) }, (t, n) => /* @__PURE__ */ U("i", { "data-on": n < e ? "true" : void 0 }, n))
509
716
  });
510
717
  }
511
- function ke({ rarity: e }) {
512
- return e === "legendary" ? /* @__PURE__ */ U("svg", {
718
+ function Re({ rarity: e }) {
719
+ return e === "legendary" ? /* @__PURE__ */ W("svg", {
513
720
  className: "game-ui-collect-card-inlay",
514
721
  viewBox: "0 0 34 22",
515
722
  "aria-hidden": "true",
516
- children: [/* @__PURE__ */ H("path", {
723
+ children: [/* @__PURE__ */ U("path", {
517
724
  className: "game-ui-collect-card-crown",
518
725
  d: "M3 19 L5 5 L12 11 L17 2 L22 11 L29 5 L31 19 Z"
519
- }), /* @__PURE__ */ H("circle", {
726
+ }), /* @__PURE__ */ U("circle", {
520
727
  className: "game-ui-collect-card-jewel",
521
728
  cx: "17",
522
729
  cy: "14",
523
730
  r: "2.6"
524
731
  })]
525
- }) : e === "rare" ? /* @__PURE__ */ U("svg", {
732
+ }) : e === "rare" ? /* @__PURE__ */ W("svg", {
526
733
  className: "game-ui-collect-card-inlay",
527
734
  viewBox: "0 0 22 22",
528
735
  "aria-hidden": "true",
529
- children: [/* @__PURE__ */ H("path", {
736
+ children: [/* @__PURE__ */ U("path", {
530
737
  className: "game-ui-collect-card-gem",
531
738
  d: "M11 2 L19 10 L11 20 L3 10 Z"
532
- }), /* @__PURE__ */ H("path", {
739
+ }), /* @__PURE__ */ U("path", {
533
740
  className: "game-ui-collect-card-gem-light",
534
741
  d: "M11 2 L14 10 L11 20"
535
742
  })]
536
743
  }) : null;
537
744
  }
538
- function Ae() {
539
- return /* @__PURE__ */ U("svg", {
745
+ function ze() {
746
+ return /* @__PURE__ */ W("svg", {
540
747
  viewBox: "0 0 100 100",
541
748
  "aria-hidden": "true",
542
749
  children: [
543
- /* @__PURE__ */ H("circle", {
750
+ /* @__PURE__ */ U("circle", {
544
751
  className: "game-ui-collect-card-back-ring",
545
752
  cx: "50",
546
753
  cy: "50",
547
754
  r: "38"
548
755
  }),
549
- /* @__PURE__ */ H("circle", {
756
+ /* @__PURE__ */ U("circle", {
550
757
  className: "game-ui-collect-card-back-dash",
551
758
  cx: "50",
552
759
  cy: "50",
553
760
  r: "28"
554
761
  }),
555
- /* @__PURE__ */ H("path", {
762
+ /* @__PURE__ */ U("path", {
556
763
  className: "game-ui-collect-card-back-star",
557
764
  d: "M50 14 L57 43 L86 50 L57 57 L50 86 L43 57 L14 50 L43 43 Z"
558
765
  }),
559
- /* @__PURE__ */ H("circle", {
766
+ /* @__PURE__ */ U("circle", {
560
767
  className: "game-ui-collect-card-back-core",
561
768
  cx: "50",
562
769
  cy: "50",
@@ -565,13 +772,13 @@ function Ae() {
565
772
  ]
566
773
  });
567
774
  }
568
- function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art: o, pips: s, sticker: c, back: l, label: u, faceDown: d, defaultFaceDown: f = !1, onFlip: p, spotlight: m = !1, sound: h = !1, tilt: g, className: _ }) {
569
- let v = t(), [y, b] = B(f), x = d ?? y, [S, C] = B({
775
+ function Be({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art: o, pips: s, sticker: c, back: l, label: u, faceDown: d, defaultFaceDown: f = !1, onFlip: p, spotlight: m = !1, sound: h = !1, tilt: g, className: _ }) {
776
+ let v = t(), [y, b] = V(f), x = d ?? y, [S, C] = V({
570
777
  x: 50,
571
778
  y: 50,
572
779
  active: !1
573
- }), w = z(null);
574
- L(() => {
780
+ }), w = B(null);
781
+ R(() => {
575
782
  v && C({
576
783
  x: 50,
577
784
  y: 50,
@@ -580,7 +787,7 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
580
787
  }, [v]);
581
788
  let T = (e) => {
582
789
  let t = w.current;
583
- if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > De && (t.moved = !0), v) return;
790
+ if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > Ie && (t.moved = !0), v) return;
584
791
  let n = e.currentTarget.getBoundingClientRect();
585
792
  if (n.width === 0 || n.height === 0) return;
586
793
  let r = Math.min(100, Math.max(0, (e.clientX - n.left) / n.width * 100)), i = Math.min(100, Math.max(0, (e.clientY - n.top) / n.height * 100));
@@ -603,10 +810,10 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
603
810
  } : S.active ? S : D ?? S, k = {
604
811
  "--card-mx": `${O.x}%`,
605
812
  "--card-my": `${O.y}%`,
606
- "--card-rx": `${O.active ? (50 - O.y) / 50 * X : 0}deg`,
607
- "--card-ry": `${O.active ? (O.x - 50) / 50 * X : 0}deg`
813
+ "--card-rx": `${O.active ? (50 - O.y) / 50 * Fe : 0}deg`,
814
+ "--card-ry": `${O.active ? (O.x - 50) / 50 * Fe : 0}deg`
608
815
  };
609
- return /* @__PURE__ */ U("button", {
816
+ return /* @__PURE__ */ W("button", {
610
817
  type: "button",
611
818
  className: [
612
819
  "game-ui-collect-card",
@@ -641,60 +848,60 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
641
848
  let t = e.detail !== 0 && (w.current?.moved ?? !1);
642
849
  w.current = null, t || E();
643
850
  },
644
- children: [/* @__PURE__ */ U("span", {
851
+ children: [/* @__PURE__ */ W("span", {
645
852
  className: "game-ui-collect-card-face",
646
853
  "aria-hidden": "true",
647
854
  children: [
648
- c ? /* @__PURE__ */ H("span", {
855
+ c ? /* @__PURE__ */ U("span", {
649
856
  className: "game-ui-collect-card-sticker",
650
857
  children: c
651
858
  }) : null,
652
- /* @__PURE__ */ H(ke, { rarity: e }),
653
- e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null,
654
- /* @__PURE__ */ U("span", {
859
+ /* @__PURE__ */ U(Re, { rarity: e }),
860
+ e === "legendary" ? /* @__PURE__ */ U("span", { className: "game-ui-collect-card-foil" }) : null,
861
+ /* @__PURE__ */ W("span", {
655
862
  className: "game-ui-collect-card-inner",
656
863
  children: [
657
- i || a ? /* @__PURE__ */ U("span", {
864
+ i || a ? /* @__PURE__ */ W("span", {
658
865
  className: "game-ui-collect-card-band",
659
- children: [a ? /* @__PURE__ */ H("span", {
866
+ children: [a ? /* @__PURE__ */ U("span", {
660
867
  className: "game-ui-collect-card-chip",
661
868
  children: a
662
- }) : null, i ? /* @__PURE__ */ H("span", { children: i }) : null]
869
+ }) : null, i ? /* @__PURE__ */ U("span", { children: i }) : null]
663
870
  }) : null,
664
- /* @__PURE__ */ U("span", {
871
+ /* @__PURE__ */ W("span", {
665
872
  className: "game-ui-collect-card-art",
666
- children: [o, e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null]
873
+ children: [o, e === "legendary" ? /* @__PURE__ */ U("span", { className: "game-ui-collect-card-foil" }) : null]
667
874
  }),
668
- /* @__PURE__ */ H("span", {
875
+ /* @__PURE__ */ U("span", {
669
876
  className: "game-ui-collect-card-title",
670
877
  children: n
671
878
  }),
672
- r ? /* @__PURE__ */ H("span", {
879
+ r ? /* @__PURE__ */ U("span", {
673
880
  className: "game-ui-collect-card-caption",
674
881
  children: r
675
882
  }) : null,
676
- s ? /* @__PURE__ */ H(Oe, {
883
+ s ? /* @__PURE__ */ U(Le, {
677
884
  filled: s.filled,
678
885
  total: s.total
679
886
  }) : null
680
887
  ]
681
888
  }),
682
- /* @__PURE__ */ H("span", { className: "game-ui-collect-card-glare" })
889
+ /* @__PURE__ */ U("span", { className: "game-ui-collect-card-glare" })
683
890
  ]
684
- }), /* @__PURE__ */ H("span", {
891
+ }), /* @__PURE__ */ U("span", {
685
892
  className: "game-ui-collect-card-back",
686
893
  "aria-hidden": "true",
687
- children: l ?? /* @__PURE__ */ H(Ae, {})
894
+ children: l ?? /* @__PURE__ */ U(ze, {})
688
895
  })]
689
896
  });
690
897
  }
691
898
  //#endregion
692
899
  //#region src/game/GameCollectibleCard/orientation.ts
693
- function Z() {
900
+ function $() {
694
901
  return typeof window > "u" || !window.isSecureContext || !window.DeviceOrientationEvent ? null : window.DeviceOrientationEvent;
695
902
  }
696
- var Q = () => document.visibilityState === "hidden";
697
- function Me(e, t, n, r) {
903
+ var Ve = () => document.visibilityState === "hidden";
904
+ function He(e, t, n, r) {
698
905
  if (e === null || t === null || ![
699
906
  e,
700
907
  t,
@@ -708,14 +915,14 @@ function Me(e, t, n, r) {
708
915
  y: s(o * Math.cos(i) - a * Math.sin(i))
709
916
  };
710
917
  }
711
- function Ne() {
712
- let e = t(), [n, r] = B("off"), [i, a] = B(null), o = z(!1), s = z(0), c = z(!1), l = z(e);
918
+ function Ue() {
919
+ let e = t(), [n, r] = V("off"), [i, a] = V(null), o = B(!1), s = B(0), c = B(!1), l = B(e);
713
920
  l.current = e;
714
- let u = I(() => {
921
+ let u = L(() => {
715
922
  s.current++, c.current = !1;
716
923
  }, []);
717
- L(() => {
718
- o.current = !0, Z() || r("unavailable");
924
+ R(() => {
925
+ o.current = !0, $() || r("unavailable");
719
926
  let e = () => {
720
927
  document.visibilityState !== "hidden" || !c.current || (u(), r("off"), a(null));
721
928
  };
@@ -723,22 +930,22 @@ function Ne() {
723
930
  document.removeEventListener("visibilitychange", e), o.current = !1, u();
724
931
  };
725
932
  }, [u]);
726
- let d = I(() => {
727
- u(), a(null), r(Z() ? "off" : "unavailable");
933
+ let d = L(() => {
934
+ u(), a(null), r($() ? "off" : "unavailable");
728
935
  }, [u]);
729
- L(() => {
936
+ R(() => {
730
937
  e && d();
731
938
  }, [e, d]);
732
- let f = I(async () => {
733
- let e = Z();
734
- if (!o.current || c.current || l.current || Q()) return !1;
939
+ let f = L(async () => {
940
+ let e = $();
941
+ if (!o.current || c.current || l.current || Ve()) return !1;
735
942
  if (!e) return r("unavailable"), !1;
736
943
  let t = ++s.current;
737
944
  c.current = !0, r("requesting"), a(null);
738
945
  try {
739
946
  let n = e.requestPermission ? await e.requestPermission() : "granted";
740
947
  if (!o.current || t !== s.current || l.current) return !1;
741
- if (Q()) return d(), !1;
948
+ if (Ve()) return d(), !1;
742
949
  let i = n === "granted";
743
950
  return r(i ? "enabled" : "denied"), i;
744
951
  } catch {
@@ -747,7 +954,7 @@ function Ne() {
747
954
  t === s.current && (c.current = !1);
748
955
  }
749
956
  }, [d]);
750
- return L(() => {
957
+ return R(() => {
751
958
  if (n !== "enabled" || e) return;
752
959
  let t = null, r = !1, i = -Infinity, o = (e) => {
753
960
  if (document.visibilityState === "hidden" || e.beta === null || e.gamma === null || !Number.isFinite(e.beta) || !Number.isFinite(e.gamma)) return;
@@ -761,7 +968,7 @@ function Ne() {
761
968
  let r = performance.now();
762
969
  if (r - i < 50) return;
763
970
  i = r;
764
- let o = Me(e.beta, e.gamma, t, n);
971
+ let o = He(e.beta, e.gamma, t, n);
765
972
  o && a((e) => e?.x === o.x && e.y === o.y ? e : o);
766
973
  }, s = () => {
767
974
  let e = document.visibilityState !== "hidden";
@@ -780,41 +987,41 @@ function Ne() {
780
987
  }
781
988
  //#endregion
782
989
  //#region src/game/GameCollectibleCardSlot/GameCollectibleCardSlot.tsx
783
- function Pe({ label: e, className: t }) {
784
- return /* @__PURE__ */ U("div", {
990
+ function We({ label: e, className: t }) {
991
+ return /* @__PURE__ */ W("div", {
785
992
  className: ["game-ui-collect-card-slot", t].filter(Boolean).join(" "),
786
993
  role: "img",
787
994
  "aria-label": e,
788
- children: [/* @__PURE__ */ H("span", {
995
+ children: [/* @__PURE__ */ U("span", {
789
996
  "aria-hidden": "true",
790
997
  children: "?"
791
- }), /* @__PURE__ */ H("span", { children: e })]
998
+ }), /* @__PURE__ */ U("span", { children: e })]
792
999
  });
793
1000
  }
794
1001
  //#endregion
795
1002
  //#region src/game/GameFactList/GameFactList.tsx
796
- function Fe({ className: e, density: t = "comfortable", facts: n, label: r, variant: i = "facts" }) {
797
- return /* @__PURE__ */ H("section", {
1003
+ function Ge({ className: e, density: t = "comfortable", facts: n, label: r, variant: i = "facts" }) {
1004
+ return /* @__PURE__ */ U("section", {
798
1005
  "aria-label": r,
799
1006
  className: ["game-ui-fact-list", e].filter(Boolean).join(" "),
800
1007
  "data-density": t,
801
1008
  "data-variant": i,
802
- children: n.map((e) => /* @__PURE__ */ U("article", {
1009
+ children: n.map((e) => /* @__PURE__ */ W("article", {
803
1010
  className: "game-ui-fact",
804
1011
  children: [
805
- e.icon ? /* @__PURE__ */ H(E, {
1012
+ e.icon ? /* @__PURE__ */ U(E, {
806
1013
  icon: e.icon,
807
1014
  size: t === "dense" ? "sm" : "md"
808
1015
  }) : null,
809
- /* @__PURE__ */ U("span", {
1016
+ /* @__PURE__ */ W("span", {
810
1017
  className: "game-ui-fact-copy",
811
1018
  children: [
812
- /* @__PURE__ */ H("small", { children: e.label }),
813
- /* @__PURE__ */ H("strong", { children: e.value }),
814
- e.meta ? /* @__PURE__ */ H("em", { children: e.meta }) : null
1019
+ /* @__PURE__ */ U("small", { children: e.label }),
1020
+ /* @__PURE__ */ U("strong", { children: e.value }),
1021
+ e.meta ? /* @__PURE__ */ U("em", { children: e.meta }) : null
815
1022
  ]
816
1023
  }),
817
- e.tone ? /* @__PURE__ */ H(M, {
1024
+ e.tone ? /* @__PURE__ */ U(N, {
818
1025
  tone: e.tone,
819
1026
  children: i === "stats" ? e.label : e.value
820
1027
  }) : null
@@ -824,7 +1031,7 @@ function Fe({ className: e, density: t = "comfortable", facts: n, label: r, vari
824
1031
  }
825
1032
  //#endregion
826
1033
  //#region src/game/GameMovementPad/GameMovementPad.tsx
827
- var Ie = [
1034
+ var Ke = [
828
1035
  {
829
1036
  direction: "forward",
830
1037
  label: "Move forward",
@@ -849,7 +1056,7 @@ var Ie = [
849
1056
  shortcut: "S / ↓",
850
1057
  symbol: "↓"
851
1058
  }
852
- ], Le = {
1059
+ ], qe = {
853
1060
  ArrowUp: "forward",
854
1061
  w: "forward",
855
1062
  W: "forward",
@@ -864,57 +1071,57 @@ var Ie = [
864
1071
  S: "backward",
865
1072
  " ": "reset"
866
1073
  };
867
- function $({ actions: e = Ie, className: t, density: n = "comfortable", disabled: r = !1, helpText: i, label: a, layout: o = "dpad", onMove: s }) {
1074
+ function Je({ actions: e = Ke, className: t, density: n = "comfortable", disabled: r = !1, helpText: i, label: a, layout: o = "dpad", onMove: s }) {
868
1075
  let c = ["game-ui-movement-pad", t].filter(Boolean).join(" "), l = (e) => {
869
1076
  r || s?.(e);
870
1077
  };
871
- return /* @__PURE__ */ U("section", {
1078
+ return /* @__PURE__ */ W("section", {
872
1079
  "aria-label": a,
873
1080
  className: c,
874
1081
  "data-density": n,
875
1082
  "data-layout": o,
876
1083
  onKeyDown: (t) => {
877
- let n = Le[t.key];
1084
+ let n = qe[t.key];
878
1085
  if (!n) return;
879
1086
  let i = e.find((e) => e.direction === n);
880
1087
  !i || i.disabled || r || (t.preventDefault(), l(n));
881
1088
  },
882
1089
  tabIndex: 0,
883
- children: [/* @__PURE__ */ H("div", {
1090
+ children: [/* @__PURE__ */ U("div", {
884
1091
  className: "game-ui-movement-pad-grid",
885
- children: e.map((e) => /* @__PURE__ */ U(D, {
1092
+ children: e.map((e) => /* @__PURE__ */ W(D, {
886
1093
  className: "game-ui-movement-button",
887
1094
  "data-direction": e.direction,
888
1095
  disabled: r || e.disabled,
889
1096
  label: e.label,
890
1097
  onClick: () => l(e.direction),
891
- children: [e.icon ? /* @__PURE__ */ H(E, {
1098
+ children: [e.icon ? /* @__PURE__ */ U(E, {
892
1099
  icon: e.icon,
893
1100
  size: n === "dense" ? "sm" : "md"
894
- }) : /* @__PURE__ */ H("span", {
1101
+ }) : /* @__PURE__ */ U("span", {
895
1102
  "aria-hidden": "true",
896
1103
  children: e.symbol ?? e.label
897
- }), e.shortcut ? /* @__PURE__ */ H("kbd", { children: e.shortcut }) : null]
1104
+ }), e.shortcut ? /* @__PURE__ */ U("kbd", { children: e.shortcut }) : null]
898
1105
  }, e.direction))
899
- }), i ? /* @__PURE__ */ H("p", { children: i }) : null]
1106
+ }), i ? /* @__PURE__ */ U("p", { children: i }) : null]
900
1107
  });
901
1108
  }
902
1109
  //#endregion
903
1110
  //#region src/game/GameSplash/GameSplash.tsx
904
- function Re(e) {
1111
+ function Ye(e) {
905
1112
  let t = e.highlight ? e.text.indexOf(e.highlight) : -1;
906
- return !e.highlight || t < 0 ? e.text : /* @__PURE__ */ U(V, { children: [
1113
+ return !e.highlight || t < 0 ? e.text : /* @__PURE__ */ W(H, { children: [
907
1114
  e.text.slice(0, t),
908
- /* @__PURE__ */ H("mark", {
1115
+ /* @__PURE__ */ U("mark", {
909
1116
  className: "game-ui-splash-mark",
910
1117
  children: e.highlight
911
1118
  }),
912
1119
  e.text.slice(t + e.highlight.length)
913
1120
  ] });
914
1121
  }
915
- function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode: o = "opening", startLabel: s, onStart: c, autoStart: l = !1, lineSeconds: u = 2.6, className: d }) {
916
- let f = o === "transition" ? n.slice(0, 1) : n, p = t(), [m, h] = B(0);
917
- L(() => {
1122
+ function Xe({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode: o = "opening", startLabel: s, onStart: c, autoStart: l = !1, lineSeconds: u = 2.6, className: d }) {
1123
+ let f = o === "transition" ? n.slice(0, 1) : n, p = t(), [m, h] = V(0);
1124
+ R(() => {
918
1125
  if (f.length < 2 || p) return;
919
1126
  let e = window.setInterval(() => h((e) => (e + 1) % f.length), Math.max(1, u) * 1e3);
920
1127
  return () => window.clearInterval(e);
@@ -923,8 +1130,8 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
923
1130
  u,
924
1131
  p
925
1132
  ]);
926
- let g = z(!1), _ = c;
927
- L(() => {
1133
+ let g = B(!1), _ = c;
1134
+ R(() => {
928
1135
  !a || !l || g.current || !_ || (g.current = !0, _());
929
1136
  }, [
930
1137
  a,
@@ -932,7 +1139,7 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
932
1139
  _
933
1140
  ]);
934
1141
  let v = f[m % Math.max(1, f.length)], y = Math.round(Math.max(0, Math.min(1, Number.isFinite(r) ? r : 0)) * 100);
935
- return /* @__PURE__ */ H("section", {
1142
+ return /* @__PURE__ */ U("section", {
936
1143
  className: [
937
1144
  "game-ui-splash",
938
1145
  `game-ui-splash--${o}`,
@@ -941,27 +1148,27 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
941
1148
  "aria-busy": !a,
942
1149
  "aria-label": e,
943
1150
  "data-splash-ready": a,
944
- children: /* @__PURE__ */ U("div", {
1151
+ children: /* @__PURE__ */ W("div", {
945
1152
  className: "game-ui-splash-body",
946
1153
  children: [
947
- o === "opening" ? /* @__PURE__ */ H("h1", {
1154
+ o === "opening" ? /* @__PURE__ */ U("h1", {
948
1155
  className: "game-ui-splash-title",
949
1156
  children: e
950
1157
  }) : null,
951
- v ? /* @__PURE__ */ H("p", {
1158
+ v ? /* @__PURE__ */ U("p", {
952
1159
  className: "game-ui-splash-line",
953
1160
  "aria-live": "polite",
954
- children: Re(v)
1161
+ children: Ye(v)
955
1162
  }, m) : null,
956
- /* @__PURE__ */ H(T, {
1163
+ /* @__PURE__ */ U(T, {
957
1164
  className: "game-ui-splash-progress",
958
1165
  label: i,
959
1166
  value: y,
960
1167
  valueLabel: i
961
1168
  }),
962
- o === "opening" && a && !l && c ? /* @__PURE__ */ H("div", {
1169
+ o === "opening" && a && !l && c ? /* @__PURE__ */ U("div", {
963
1170
  className: "game-ui-splash-start",
964
- children: /* @__PURE__ */ H(j, {
1171
+ children: /* @__PURE__ */ U(M, {
965
1172
  variant: "primary",
966
1173
  autoFocus: !0,
967
1174
  onClick: () => c(),
@@ -974,14 +1181,14 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
974
1181
  }
975
1182
  //#endregion
976
1183
  //#region src/controls/GameMaterialSwatches/GameMaterialSwatches.tsx
977
- function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, materials: i, onMaterialChange: a, variant: o = "desktop", "data-testid": s }) {
978
- return /* @__PURE__ */ H("section", {
1184
+ function Ze({ activeMaterialId: e, className: t, disabled: n = !1, label: r, materials: i, onMaterialChange: a, variant: o = "desktop", "data-testid": s }) {
1185
+ return /* @__PURE__ */ U("section", {
979
1186
  "aria-label": r,
980
1187
  className: ["game-ui-material-swatches", t].filter(Boolean).join(" "),
981
1188
  "data-ui-hook": "material-swatches",
982
1189
  "data-variant": o,
983
1190
  "data-testid": s,
984
- children: /* @__PURE__ */ H("div", {
1191
+ children: /* @__PURE__ */ U("div", {
985
1192
  className: "game-ui-material-swatch-grid",
986
1193
  role: "listbox",
987
1194
  "aria-label": r,
@@ -990,7 +1197,7 @@ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, mat
990
1197
  "--swatch-color": t.color,
991
1198
  "--swatch-secondary-color": t.secondaryColor ?? t.color
992
1199
  };
993
- return /* @__PURE__ */ U("button", {
1200
+ return /* @__PURE__ */ W("button", {
994
1201
  "aria-describedby": t.meta ? `${t.id}-material-meta` : void 0,
995
1202
  "aria-label": t.label,
996
1203
  "aria-selected": r,
@@ -1002,21 +1209,21 @@ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, mat
1002
1209
  type: "button",
1003
1210
  "data-game-ui-paint": "",
1004
1211
  children: [
1005
- /* @__PURE__ */ H(P, {}),
1006
- /* @__PURE__ */ H("span", {
1212
+ /* @__PURE__ */ U(I, {}),
1213
+ /* @__PURE__ */ U("span", {
1007
1214
  "aria-hidden": "true",
1008
1215
  className: "game-ui-material-swatch-chip",
1009
1216
  "data-swatch-pattern": t.pattern ?? "solid",
1010
1217
  style: c
1011
1218
  }),
1012
- /* @__PURE__ */ U("span", {
1219
+ /* @__PURE__ */ W("span", {
1013
1220
  className: "game-ui-material-swatch-copy",
1014
- children: [/* @__PURE__ */ H("strong", { children: s }), t.meta ? /* @__PURE__ */ H("small", {
1221
+ children: [/* @__PURE__ */ U("strong", { children: s }), t.meta ? /* @__PURE__ */ U("small", {
1015
1222
  id: `${t.id}-material-meta`,
1016
1223
  children: t.meta
1017
1224
  }) : null]
1018
1225
  }),
1019
- /* @__PURE__ */ H(k, {})
1226
+ /* @__PURE__ */ U(k, {})
1020
1227
  ]
1021
1228
  }, t.id);
1022
1229
  })
@@ -1025,13 +1232,13 @@ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, mat
1025
1232
  }
1026
1233
  //#endregion
1027
1234
  //#region src/tokens/styles.ts
1028
- var Ve = [
1235
+ var Qe = [
1029
1236
  "candy",
1030
1237
  "pastel",
1031
1238
  "mist",
1032
1239
  "grey",
1033
1240
  "outline",
1034
1241
  "ink"
1035
- ], He = "pastel";
1242
+ ], $e = "pastel";
1036
1243
  //#endregion
1037
- export { S as FirstSessionOnboarding, O as GAME_ICON_NAMES, He as GAME_UI_DEFAULT_STYLE, Ve as GAME_UI_STYLES, s as GAME_UI_TARGETS, a as GAME_UI_THEME_CONTRACT, i as GAME_UI_TOKENS, ie as GameAvatar, M as GameBadge, j as GameButton, ye as GameCallout, r as GameCheckbox, Ce as GameCollapsiblePanel, je as GameCollectibleCard, Pe as GameCollectibleCardSlot, C as GameDialog, p as GameEmptyState, Fe as GameFactList, o as GameField, be as GameHelpTip, b as GameHistoryPanel, l as GameHudActions, E as GameIcon, D as GameIconButton, u as GameInput, c as GameLanguageMenu, ge as GameListRow, f as GameLoadingState, Be as GameMaterialSwatches, Te as GameModal, $ as GameMovementPad, _e as GameOtpInput, g as GamePanel, T as GameProgress, xe as GamePrompt, y as GameRadialMenu, m as GameSegmentedControl, ve as GameSelect, Ee as GameShell, h as GameSlider, ze as GameSplash, w as GameStageTile, re as GameTabs, v as GameTextArea, _ as GameToast, x as GameToggle, d as GameTooltip, n as LiquidGroup, ee as LiquidSurface, ae as liquidFormItem, A as playGameCardRevealSound, ne as playGameInteractionSound, te as playGameInteractionSoundForContext, e as setLiquidGooeyBudget, Ne as useGameCardOrientation };
1244
+ export { S as FirstSessionOnboarding, O as GAME_ICON_NAMES, $e as GAME_UI_DEFAULT_STYLE, Qe as GAME_UI_STYLES, s as GAME_UI_TARGETS, a as GAME_UI_THEME_CONTRACT, i as GAME_UI_TOKENS, ne as GameAvatar, N as GameBadge, M as GameButton, ve as GameCallout, r as GameCheckbox, je as GameCollapsiblePanel, Be as GameCollectibleCard, We as GameCollectibleCardSlot, C as GameDialog, p as GameEmptyState, Ge as GameFactList, o as GameField, xe as GameHelpCard, ye as GameHelpTip, b as GameHistoryPanel, l as GameHudActions, E as GameIcon, D as GameIconButton, u as GameInput, c as GameLanguageMenu, me as GameListRow, f as GameLoadingState, Ze as GameMaterialSwatches, Ne as GameModal, Je as GameMovementPad, ge as GameOtpInput, g as GamePanel, T as GameProgress, Oe as GamePrompt, y as GameRadialMenu, m as GameSegmentedControl, _e as GameSelect, Pe as GameShell, h as GameSlider, Xe as GameSplash, w as GameStageTile, F as GameTabs, v as GameTextArea, _ as GameToast, x as GameToggle, d as GameTooltip, n as LiquidGroup, j as LiquidSurface, re as liquidFormItem, A as playGameCardRevealSound, te as playGameInteractionSound, ee as playGameInteractionSoundForContext, e as setLiquidGooeyBudget, Ue as useGameCardOrientation };