fansunited-frontend-components 1.1.1 → 1.3.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 (54) hide show
  1. package/BattleOfFans.js +427 -404
  2. package/Betslip.js +2 -2
  3. package/ChanceGame.js +1 -1
  4. package/ClassicQuizPlay.js +2 -2
  5. package/CollectLead.js +1 -1
  6. package/CompetitionStatistics.js +1 -1
  7. package/CompetitorCard.js +1 -1
  8. package/Discussion.js +1 -1
  9. package/EitherOrPlay.js +2 -2
  10. package/EventCard.js +1 -1
  11. package/EventGamePlay.js +2 -2
  12. package/Leaderboard.js +1 -1
  13. package/List.js +4 -4
  14. package/MatchQuizPlay.js +2 -2
  15. package/Odds.js +1 -1
  16. package/PersonalityQuizPlay.js +2 -2
  17. package/PickThePair.js +1 -1
  18. package/PlayerOfTheMatch.js +805 -857
  19. package/PollVote.js +2 -2
  20. package/Predictor.js +1576 -1569
  21. package/ProfileStats.d.ts +4 -0
  22. package/ProfileStats.d.ts.map +1 -0
  23. package/ProfileStats.js +2781 -0
  24. package/README.md +101 -2
  25. package/Standings.js +1 -1
  26. package/TopX.js +722 -715
  27. package/chunks/index-CLJiQKNv.js +4 -0
  28. package/chunks/index-D6-V3WrE.js +4 -0
  29. package/chunks/index-Dt38wFLo.js +4 -0
  30. package/chunks/index-Ehvd1Qmz.js +4 -0
  31. package/chunks/index-QtarvzAb.js +4 -0
  32. package/chunks/index-kffkFNES.js +4 -0
  33. package/chunks/{main-P2WNvBZE.js → main-8Yt_jn04.js} +402 -392
  34. package/chunks/{main-DdL0UekL.js → main-BnuQygIM.js} +1853 -1783
  35. package/chunks/main-BpGmqCTf.js +2142 -0
  36. package/chunks/main-C0PSUCR_.js +3027 -0
  37. package/chunks/{main-LEE8n2cG.js → main-CfdOHNHz.js} +1268 -1203
  38. package/chunks/{main-D_QDfmAw.js → main-PpLP-LeG.js} +1797 -1753
  39. package/chunks/{main-C7X4dM_P.js → main-p1Qbq-Fw.js} +1532 -1483
  40. package/chunks/{withVersionStamp-CzdDF1rG.js → withVersionStamp-BOktiTgW.js} +1 -1
  41. package/components.d.ts +2 -1
  42. package/components.d.ts.map +1 -1
  43. package/index.d.ts +1 -0
  44. package/index.d.ts.map +1 -1
  45. package/index.js +11 -9
  46. package/package.json +6 -2
  47. package/chunks/index-BNl8scz6.js +0 -4
  48. package/chunks/index-CSa2JU4m.js +0 -4
  49. package/chunks/index-Cd1dg0KI.js +0 -4
  50. package/chunks/index-Cei2fzi7.js +0 -4
  51. package/chunks/index-Cxb4wEJU.js +0 -4
  52. package/chunks/index-w1LGN5dz.js +0 -4
  53. package/chunks/main-07vzblS8.js +0 -2091
  54. package/chunks/main-DmBfwyb4.js +0 -2992
package/BattleOfFans.js CHANGED
@@ -1,13 +1,13 @@
1
- import { jsx as a, Fragment as Ot, jsxs as b } from "@emotion/react/jsx-runtime";
2
- import { space as dt, radius as ut, LeadForm as zn, Notification as An, WidgetPortal as Vn } from "fansunited-frontend-core/ui/emotion";
3
- import dn, { useState as A, useRef as un, useEffect as ht, useMemo as q, useCallback as qt } from "react";
1
+ import { jsx as l, Fragment as Pt, jsxs as b } from "@emotion/react/jsx-runtime";
2
+ import { space as dt, radius as ut, LeadForm as An, BrandedArea as Vn, Notification as _n, WidgetPortal as Hn } from "fansunited-frontend-core/ui/emotion";
3
+ import un, { useState as A, useRef as pn, useEffect as gt, useMemo as q, useCallback as Ut } from "react";
4
4
  import { useTranslation as bt } from "react-i18next";
5
- import { useDisableCache as _n, extractSdkError as vt, getSportsApiCredentials as Hn, hexColor as pn, fetchSearchEntitiesByIds as jn, contrastRatio as gt, standsOut as Ft, cdnAssets as Gn, initialsOf as qn, useIsRtl as Pt, useIntlLocale as mn, useIsMobile as Un, useColors as Yn, stripHtmlTags as Xn } from "fansunited-frontend-core";
6
- import { a as fn, u as Kn, O as Jn } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
5
+ import { useDisableCache as jn, extractSdkError as $t, getSportsApiCredentials as Gn, hexColor as mn, fetchSearchEntitiesByIds as qn, contrastRatio as ht, standsOut as Et, cdnAssets as Un, initialsOf as Yn, useIsRtl as Tt, useIntlLocale as fn, useIsMobile as Xn, useColors as Kn, stripHtmlTags as Jn } from "fansunited-frontend-core";
6
+ import { a as gn, u as Qn, O as Zn } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
7
7
  import { keyframes as rt, css as d } from "@emotion/react";
8
- import { EmojiEventsIcon as Qn, CheckIcon as Zn, LockOutlinedIcon as te } from "fansunited-frontend-core/ui/icons";
8
+ import { EmojiEventsIcon as te, CheckIcon as ne, LockOutlinedIcon as ee } from "fansunited-frontend-core/ui/icons";
9
9
  import "fansunited-sdk-esm/enums";
10
- import { w as ne } from "./chunks/withVersionStamp-CzdDF1rG.js";
10
+ import { w as oe } from "./chunks/withVersionStamp-BOktiTgW.js";
11
11
  const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
12
12
  fontPrimary: "var(--fu-ucrc-font-primary)",
13
13
  fontSecondary: "var(--fu-ucrc-font-secondary)",
@@ -42,7 +42,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
42
42
  winnerLogo: "drop-shadow(0 8px 14px rgba(0,0,0,0.35))",
43
43
  winnerHeadshot: "0 10px 22px -10px rgba(0,0,0,0.5)",
44
44
  trophy: "0 4px 10px -3px rgba(0,0,0,0.45)"
45
- }, ee = "@media (prefers-reduced-motion: reduce)", tt = {
45
+ }, re = "@media (prefers-reduced-motion: reduce)", tt = {
46
46
  pad: 24,
47
47
  arenaBar: 238,
48
48
  arenaFill: 324,
@@ -102,18 +102,18 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
102
102
  trophy: 28,
103
103
  trophyRing: 2,
104
104
  slant: 3
105
- }, $t = 76, I = ([t, n]) => ({
105
+ }, Ct = 76, I = ([t, n]) => ({
106
106
  fontSize: s(t),
107
107
  lineHeight: n / t
108
- }), Ct = rt({
108
+ }), wt = rt({
109
109
  "0%, 100%": { opacity: 1 },
110
110
  "50%": { opacity: 0.45 }
111
- }), Ut = {
111
+ }), Yt = {
112
112
  margin: 0,
113
113
  fontFamily: i.fontPrimary,
114
114
  fontWeight: 700,
115
115
  letterSpacing: "-0.01em"
116
- }, Yt = (t, n) => ({
116
+ }, Xt = (t, n) => ({
117
117
  root: d({
118
118
  fontSize: "1em",
119
119
  boxSizing: "border-box",
@@ -129,7 +129,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
129
129
  boxShadow: `0 1px 2px 0 ${i.shadow}, 0 2px 4px 0 ${i.shadow}`,
130
130
  "--bof-tint": "10%",
131
131
  ".dark &": { "--bof-tint": "26%" },
132
- [ee]: {
132
+ [re]: {
133
133
  "& *, & *::before, & *::after": {
134
134
  animation: "none !important",
135
135
  transition: "none !important"
@@ -159,7 +159,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
159
159
  }),
160
160
  // Title and open subtitle can be poll (CMS) text, in any language.
161
161
  title: d({
162
- ...Ut,
162
+ ...Yt,
163
163
  unicodeBidi: "plaintext",
164
164
  ...I(n ? [22, 28] : [28, 34])
165
165
  }),
@@ -205,7 +205,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
205
205
  arenaSkeleton: d({
206
206
  borderRadius: i.radiusMd,
207
207
  backgroundColor: i.inner,
208
- animation: `${Ct} 1.5s ease-in-out infinite`
208
+ animation: `${wt} 1.5s ease-in-out infinite`
209
209
  }),
210
210
  resultsSkeleton: d({
211
211
  height: s(t.pctBar[1] + (n ? 8 : 10) + t.bar),
@@ -223,14 +223,14 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
223
223
  height: s(t.bar),
224
224
  borderRadius: i.radiusFull,
225
225
  backgroundColor: i.track,
226
- animation: `${Ct} 1.5s ease-in-out infinite`
226
+ animation: `${wt} 1.5s ease-in-out infinite`
227
227
  }),
228
228
  titleSkeleton: d({
229
229
  width: s(n ? 170 : 220),
230
230
  height: s(n ? 28 : 34),
231
231
  borderRadius: i.radiusSm,
232
232
  backgroundColor: i.inner,
233
- animation: `${Ct} 1.5s ease-in-out infinite`
233
+ animation: `${wt} 1.5s ease-in-out infinite`
234
234
  }),
235
235
  message: d({
236
236
  display: "flex",
@@ -244,7 +244,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
244
244
  padding: i.spaceLg,
245
245
  boxSizing: "border-box"
246
246
  }),
247
- messageTitle: d({ ...Ut, ...I([18, 24]) }),
247
+ messageTitle: d({ ...Yt, ...I([18, 24]) }),
248
248
  messageText: d({ margin: 0, color: i.dim, ...I([14, 20]) }),
249
249
  retry: d({
250
250
  marginTop: s(8, 15),
@@ -263,7 +263,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
263
263
  outlineOffset: "2px"
264
264
  }
265
265
  })
266
- }), Xt = (t) => ({
266
+ }), Kt = (t) => ({
267
267
  root: d(
268
268
  t ? {
269
269
  width: "100%",
@@ -325,30 +325,30 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
325
325
  fontSize: s(20),
326
326
  color: i.dim
327
327
  })
328
- }), y = { d: Yt(tt, !1), m: Yt(nt, !0) }, Y = { d: Xt(!1), m: Xt(!0) }, oe = "battle-of-fans", re = "voting_ends_at", ie = "voting_starts_at", Kt = 5 * 6e4, se = 15e3, Jt = { team: "team", player: "player" }, ae = (t) => {
328
+ }), y = { d: Xt(tt, !1), m: Xt(nt, !0) }, Y = { d: Kt(!1), m: Kt(!0) }, ie = "battle-of-fans", se = "voting_ends_at", ae = "voting_starts_at", Jt = 5 * 6e4, le = 15e3, Qt = { team: "team", player: "player" }, ce = (t) => {
329
329
  var r;
330
330
  const n = (((r = t.context) == null ? void 0 : r.tags) ?? []).filter(
331
- (o) => !!(o != null && o.id) && !!Jt[(o.type ?? "").toLowerCase()]
331
+ (o) => !!(o != null && o.id) && !!Qt[(o.type ?? "").toLowerCase()]
332
332
  ), e = t.options ?? [];
333
333
  return n.length !== e.length && console.warn(
334
334
  `BattleOfFans: poll ${t.id} has ${e.length} options and ${n.length} team/player tags; using the first ${Math.min(n.length, e.length)}.`
335
- ), e.slice(0, n.length).map((o, l) => ({
335
+ ), e.slice(0, n.length).map((o, a) => ({
336
336
  optionId: o.id,
337
- entityId: n[l].id,
338
- kind: Jt[n[l].type.toLowerCase()],
337
+ entityId: n[a].id,
338
+ kind: Qt[n[a].type.toLowerCase()],
339
339
  title: o.title ?? ""
340
340
  }));
341
- }, le = (t) => t.split("-")[0].toUpperCase(), ce = (t, n) => {
342
- var o, l;
341
+ }, de = (t) => t.split("-")[0].toUpperCase(), ue = (t, n) => {
342
+ var o, a;
343
343
  if (!t) return null;
344
- const e = le(n);
345
- return (((l = (o = t.translations) == null ? void 0 : o.find(
344
+ const e = de(n);
345
+ return (((a = (o = t.translations) == null ? void 0 : o.find(
346
346
  (u) => {
347
347
  var m;
348
348
  return ((m = u.language) == null ? void 0 : m.toUpperCase()) === e;
349
349
  }
350
- )) == null ? void 0 : l.name) ?? t.name ?? "").trim() || null;
351
- }, de = (t, n) => {
350
+ )) == null ? void 0 : a.name) ?? t.name ?? "").trim() || null;
351
+ }, pe = (t, n) => {
352
352
  var e, r;
353
353
  return ((r = (e = t == null ? void 0 : t.assets) == null ? void 0 : e.find((o) => o.key === (n === "team" ? "LOGO" : "HEADSHOT"))) == null ? void 0 : r.value) ?? null;
354
354
  }, hn = (t) => {
@@ -357,7 +357,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
357
357
  var o;
358
358
  return ((o = r.relationship) == null ? void 0 : o.toUpperCase()) === "TEAM";
359
359
  })) == null ? void 0 : e.related_id) ?? null;
360
- }, ue = (t, n) => {
360
+ }, me = (t, n) => {
361
361
  var r;
362
362
  const e = (r = t == null ? void 0 : t.metadata) == null ? void 0 : r.branding;
363
363
  return [
@@ -365,33 +365,33 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
365
365
  e == null ? void 0 : e.secondary_color,
366
366
  e == null ? void 0 : e.tertiary_color
367
367
  ].map((o) => n(o)).filter((o) => !!o);
368
- }, pe = (t, n, e, r) => t.map((o) => {
369
- const l = n.get(o.entityId), u = o.kind === "player" ? n.get(hn(l) ?? "") : l;
368
+ }, fe = (t, n, e, r) => t.map((o) => {
369
+ const a = n.get(o.entityId), u = o.kind === "player" ? n.get(hn(a) ?? "") : a;
370
370
  return {
371
371
  ...o,
372
- name: ce(l, e) ?? o.title,
373
- image: de(l, o.kind),
374
- brand: ue(u, r)
372
+ name: ue(a, e) ?? o.title,
373
+ image: pe(a, o.kind),
374
+ brand: me(u, r)
375
375
  };
376
- }), me = (t) => {
376
+ }), ge = (t) => {
377
377
  const n = t.reduce((u, m) => u + Math.max(0, m), 0);
378
378
  if (n === 0) return t.map(() => 0);
379
379
  const e = t.map((u) => Math.max(0, u) / n * 100), r = e.map(Math.floor);
380
380
  let o = 100 - r.reduce((u, m) => u + m, 0);
381
- const l = e.map((u, m) => ({ i: m, rest: u - Math.floor(u) })).sort((u, m) => m.rest - u.rest || u.i - m.i);
382
- for (const { i: u } of l) {
381
+ const a = e.map((u, m) => ({ i: m, rest: u - Math.floor(u) })).sort((u, m) => m.rest - u.rest || u.i - m.i);
382
+ for (const { i: u } of a) {
383
383
  if (o <= 0) break;
384
384
  r[u] += 1, o -= 1;
385
385
  }
386
386
  return r;
387
- }, fe = (t) => {
387
+ }, he = (t) => {
388
388
  const n = Math.max(...t);
389
389
  return n > 0 && t.filter((r) => r === n).length === 1 ? t.indexOf(n) : null;
390
- }, Qt = (t) => {
390
+ }, Zt = (t) => {
391
391
  if (!t) return null;
392
392
  const n = Date.parse(t);
393
393
  return Number.isNaN(n) ? null : n;
394
- }, Zt = (t, n) => {
394
+ }, tn = (t, n) => {
395
395
  const e = Math.max(0, Math.floor((t - n) / 1e3));
396
396
  return {
397
397
  days: Math.floor(e / 86400),
@@ -399,13 +399,13 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
399
399
  minutes: Math.floor(e % 3600 / 60),
400
400
  seconds: e % 60
401
401
  };
402
- }, he = [401, 403, 404], ge = async (t, n, e, r) => {
403
- const o = /* @__PURE__ */ new Map(), l = Hn(t);
404
- if (!l) return o;
402
+ }, be = [401, 403, 404], ye = async (t, n, e, r) => {
403
+ const o = /* @__PURE__ */ new Map(), a = Gn(t);
404
+ if (!a) return o;
405
405
  const u = async (c) => {
406
406
  if (!c.length) return;
407
- (await jn(
408
- l,
407
+ (await qn(
408
+ a,
409
409
  c,
410
410
  {
411
411
  signal: e,
@@ -417,47 +417,47 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
417
417
  await u(n.map((c) => c.entityId));
418
418
  const m = n.filter((c) => c.kind === "player").map((c) => hn(o.get(c.entityId))).filter((c) => !!c && !o.has(c));
419
419
  return await u(m), o;
420
- }, be = (t) => {
420
+ }, xe = (t) => {
421
421
  var n;
422
422
  return t != null && t.id ? ((n = t.optionIds) == null ? void 0 : n[0]) ?? t.optionId ?? null : null;
423
- }, ye = (t) => {
423
+ }, ke = (t) => {
424
424
  var st, H;
425
- const { entityId: n, sdk: e, language: r, userIsLoggedIn: o } = t, l = _n(), [u, m] = A("loading"), [c, f] = A(null), [p, h] = A(0), [F, B] = A(!1), [X, T] = A(!1), [U, $] = A(null), S = un(t.callbacks);
426
- S.current = t.callbacks, ht(() => {
425
+ const { entityId: n, sdk: e, language: r, userIsLoggedIn: o } = t, a = jn(), [u, m] = A("loading"), [c, f] = A(null), [p, g] = A(0), [F, B] = A(!1), [X, T] = A(!1), [U, $] = A(null), S = pn(t.callbacks);
426
+ S.current = t.callbacks, gt(() => {
427
427
  const C = new AbortController();
428
428
  let x = !1;
429
429
  return m("loading"), T(!1), (async () => {
430
430
  let v;
431
431
  try {
432
- v = await e.voting.getPollById(n, l);
432
+ v = await e.voting.getPollById(n, a);
433
433
  } catch (P) {
434
434
  if (x) return;
435
435
  m(
436
- vt(P, e).code === 404 ? "notFound" : "error"
436
+ $t(P, e).code === 404 ? "notFound" : "error"
437
437
  );
438
438
  return;
439
439
  }
440
- const w = v != null && v.id && (v.type ?? "").toLowerCase() === oe ? ae(v) : [];
440
+ const w = v != null && v.id && (v.type ?? "").toLowerCase() === ie ? ce(v) : [];
441
441
  if (w.length < 2) {
442
442
  x || m("notFound");
443
443
  return;
444
444
  }
445
445
  const D = v.authRequirement === "REGISTERED" && !o ? Promise.resolve(null) : e.voting.getMyPollVote(n).catch((P) => {
446
- if (he.includes(vt(P, e).code))
446
+ if (be.includes($t(P, e).code))
447
447
  return null;
448
448
  throw P;
449
449
  });
450
450
  try {
451
451
  const [P, et] = await Promise.all([
452
452
  D,
453
- ge(e, w, C.signal, l)
453
+ ye(e, w, C.signal, a)
454
454
  ]);
455
455
  if (x) return;
456
456
  f({
457
457
  poll: v,
458
458
  refs: w,
459
459
  entities: et,
460
- votedOptionId: be(P)
460
+ votedOptionId: xe(P)
461
461
  }), m("ready");
462
462
  } catch {
463
463
  x || m("error");
@@ -465,9 +465,9 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
465
465
  })(), () => {
466
466
  x = !0, C.abort();
467
467
  };
468
- }, [n, e, l, o, p]);
468
+ }, [n, e, a, o, p]);
469
469
  const it = q(
470
- () => c ? pe(c.refs, c.entities, r, pn) : [],
470
+ () => c ? fe(c.refs, c.entities, r, mn) : [],
471
471
  [c, r]
472
472
  ), E = q(
473
473
  () => c ? c.refs.map(
@@ -477,7 +477,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
477
477
  }
478
478
  ) : [],
479
479
  [c]
480
- ), z = qt(
480
+ ), z = Ut(
481
481
  async (C) => {
482
482
  var x, M;
483
483
  if (!(!c || F || c.votedOptionId)) {
@@ -498,7 +498,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
498
498
  }
499
499
  ), (M = (x = S.current) == null ? void 0 : x.onFinish) == null || M.call(x, v);
500
500
  } catch (v) {
501
- const { code: w, message: N } = vt(v, e);
501
+ const { code: w, message: N } = $t(v, e);
502
502
  w === 401 || w === 403 ? T(!0) : $(N);
503
503
  } finally {
504
504
  B(!1);
@@ -506,31 +506,31 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
506
506
  }
507
507
  },
508
508
  [n, e, c, F]
509
- ), L = qt(() => {
510
- e.voting.getPollById(n, l).then(
509
+ ), L = Ut(() => {
510
+ e.voting.getPollById(n, a).then(
511
511
  (C) => f(
512
512
  (x) => x && (C != null && C.id) ? { ...x, poll: C } : x
513
513
  )
514
514
  ).catch(() => {
515
515
  });
516
- }, [n, e, l]), O = (c == null ? void 0 : c.poll) ?? null;
516
+ }, [n, e, a]), O = (c == null ? void 0 : c.poll) ?? null;
517
517
  return {
518
518
  status: u,
519
519
  poll: O,
520
520
  sides: it,
521
521
  votes: E,
522
522
  votedOptionId: (c == null ? void 0 : c.votedOptionId) ?? null,
523
- startMs: Qt((st = O == null ? void 0 : O.customFields) == null ? void 0 : st[ie]),
524
- endMs: Qt((H = O == null ? void 0 : O.customFields) == null ? void 0 : H[re]),
523
+ startMs: Zt((st = O == null ? void 0 : O.customFields) == null ? void 0 : st[ae]),
524
+ endMs: Zt((H = O == null ? void 0 : O.customFields) == null ? void 0 : H[se]),
525
525
  signInRequired: X || (O == null ? void 0 : O.authRequirement) === "REGISTERED" && !o,
526
526
  submitting: F,
527
527
  voteError: U,
528
528
  clearVoteError: () => $(null),
529
529
  vote: z,
530
- retry: () => h((C) => C + 1),
530
+ retry: () => g((C) => C + 1),
531
531
  refresh: L
532
532
  };
533
- }, xe = (t) => {
533
+ }, Se = (t) => {
534
534
  const { t: n } = bt("common");
535
535
  return q(
536
536
  () => (e, r) => {
@@ -539,95 +539,95 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
539
539
  },
540
540
  [t, n]
541
541
  );
542
- }, ke = (t) => {
542
+ }, Ie = (t) => {
543
543
  const [n, e] = A(() => Date.now()), r = t !== null && n >= t;
544
- return ht(() => {
544
+ return gt(() => {
545
545
  if (t === null || r) return;
546
546
  const o = setInterval(() => e(Date.now()), 1e3);
547
547
  return () => clearInterval(o);
548
548
  }, [t, r]), n;
549
- }, tn = (t) => {
550
- const n = pn(t);
549
+ }, nn = (t) => {
550
+ const n = mn(t);
551
551
  if (!n) return null;
552
552
  const [e, r, o] = [1, 3, 5].map(
553
553
  (c) => parseInt(n.slice(c, c + 2), 16) / 255
554
- ), l = Math.max(e, r, o), u = l - Math.min(e, r, o);
555
- return u < 0.12 ? null : ((l === e ? (r - o) / u % 6 : l === r ? (o - e) / u + 2 : (e - r) / u + 4) * 60 + 360) % 360;
554
+ ), a = Math.max(e, r, o), u = a - Math.min(e, r, o);
555
+ return u < 0.12 ? null : ((a === e ? (r - o) / u % 6 : a === r ? (o - e) / u + 2 : (e - r) / u + 4) * 60 + 360) % 360;
556
556
  }, Q = (t, n) => {
557
- if (!Ft(t, n)) return !0;
558
- const e = tn(t), r = tn(n);
559
- if (e === null || r === null) return (gt(t, n) ?? 1) < 2;
557
+ if (!Et(t, n)) return !0;
558
+ const e = nn(t), r = nn(n);
559
+ if (e === null || r === null) return (ht(t, n) ?? 1) < 2;
560
560
  const o = Math.abs(e - r);
561
561
  return Math.min(o, 360 - o) < 35;
562
- }, Se = (t, n) => {
562
+ }, ve = (t, n) => {
563
563
  const e = [n.primary, n.text, ...n.extras], r = t.map(
564
- (l) => l.filter((u) => Ft(u, n.surface))
564
+ (a) => a.filter((u) => Et(u, n.surface))
565
565
  ), o = r.map(
566
- (l, u) => l[0] ?? e[u % e.length]
566
+ (a, u) => a[0] ?? e[u % e.length]
567
567
  );
568
- for (let l = 1; l < o.length; l += 1) {
569
- const u = o.slice(0, l);
570
- if (!u.some((p) => Q(p, o[l]))) continue;
571
- const m = r[l].slice(1).find((p) => !u.some((h) => Q(h, p)));
568
+ for (let a = 1; a < o.length; a += 1) {
569
+ const u = o.slice(0, a);
570
+ if (!u.some((p) => Q(p, o[a]))) continue;
571
+ const m = r[a].slice(1).find((p) => !u.some((g) => Q(g, p)));
572
572
  if (m) {
573
- o[l] = m;
573
+ o[a] = m;
574
574
  continue;
575
575
  }
576
576
  let c = !1;
577
- for (let p = 0; p < l && !c; p += 1) {
578
- if (!Q(o[p], o[l])) continue;
579
- const h = r[p].slice(1).find(
580
- (F) => o.slice(0, l + 1).every((B, X) => X === p || !Q(B, F))
577
+ for (let p = 0; p < a && !c; p += 1) {
578
+ if (!Q(o[p], o[a])) continue;
579
+ const g = r[p].slice(1).find(
580
+ (F) => o.slice(0, a + 1).every((B, X) => X === p || !Q(B, F))
581
581
  );
582
- h && (o[p] = h), c = !o.slice(0, l).some((F) => Q(F, o[l]));
582
+ g && (o[p] = g), c = !o.slice(0, a).some((F) => Q(F, o[a]));
583
583
  }
584
584
  if (c) continue;
585
- const f = e.find((p) => !u.some((h) => Q(h, p)));
586
- f && u.some((p) => !Ft(p, o[l])) && (o[l] = f);
585
+ const f = e.find((p) => !u.some((g) => Q(g, p)));
586
+ f && u.some((p) => !Et(p, o[a])) && (o[a] = f);
587
587
  }
588
588
  return o;
589
- }, gn = (t, n) => {
590
- if ((gt(n.onPrimary, t) ?? 21) >= 4.5)
589
+ }, bn = (t, n) => {
590
+ if ((ht(n.onPrimary, t) ?? 21) >= 4.5)
591
591
  return n.onPrimary;
592
592
  const e = [n.onPrimary, n.text, n.surface];
593
593
  let r = e[0], o = -1;
594
- for (const l of e) {
595
- const u = gt(l, t) ?? -1;
596
- u > o && (r = l, o = u);
594
+ for (const a of e) {
595
+ const u = ht(a, t) ?? -1;
596
+ u > o && (r = a, o = u);
597
597
  }
598
598
  return r;
599
- }, Ie = (t, n, e = 3) => (gt(t, n.surface) ?? 21) >= e ? t : n.text, ve = (t, n) => Se(t, n).map((e) => ({
599
+ }, $e = (t, n, e = 3) => (ht(t, n.surface) ?? 21) >= e ? t : n.text, Ce = (t, n) => ve(t, n).map((e) => ({
600
600
  fill: e,
601
- on: gn(e, n),
602
- ink: Ie(e, n)
603
- })), $e = (t, n, e) => Math.max(n, Math.min(e, t)), Ce = (t, n) => {
601
+ on: bn(e, n),
602
+ ink: $e(e, n)
603
+ })), we = (t, n, e) => Math.max(n, Math.min(e, t)), We = (t, n) => {
604
604
  const e = t.length, r = 100 / e;
605
605
  if (t.every((c) => c === 0)) return t.map(() => r);
606
- const o = r * (n || e > 2 ? 0.8 : 0.6), l = t.map((c) => Math.max(c, o)), u = l.reduce((c, f) => c + f, 0) - 100, m = l.reduce((c, f) => c + (f - o), 0);
607
- return l.map((c) => m > 0 ? c - (c - o) / m * u : r);
608
- }, we = (t, n, e, r) => {
609
- const o = t.length, l = e ? $e(t[n], r ? 60 : 56, r ? 68 : 74) : 64, u = 100 - l, c = t.filter((f, p) => p !== n).reduce((f, p) => f + p, 0);
610
- return t.map((f, p) => p === n ? l : !e || c === 0 ? u / (o - 1) : f / c * u);
611
- }, We = (t) => {
606
+ const o = r * (n || e > 2 ? 0.8 : 0.6), a = t.map((c) => Math.max(c, o)), u = a.reduce((c, f) => c + f, 0) - 100, m = a.reduce((c, f) => c + (f - o), 0);
607
+ return a.map((c) => m > 0 ? c - (c - o) / m * u : r);
608
+ }, Re = (t, n, e, r) => {
609
+ const o = t.length, a = e ? we(t[n], r ? 60 : 56, r ? 68 : 74) : 64, u = 100 - a, c = t.filter((f, p) => p !== n).reduce((f, p) => f + p, 0);
610
+ return t.map((f, p) => p === n ? a : !e || c === 0 ? u / (o - 1) : f / c * u);
611
+ }, Fe = (t) => {
612
612
  const n = [];
613
613
  let e = 0;
614
614
  for (let r = 0; r < t.length - 1; r += 1)
615
615
  e += t[r], n.push(e);
616
616
  return n;
617
- }, Re = (t) => `${Math.round(t * 100) / 100}%`, Fe = (t, n, e, r) => {
618
- const o = (h) => Re(r ? 100 - h : h), l = n === 0 ? null : t[n - 1], u = n === t.length ? null : t[n], m = o(l === null ? 0 : l + e), c = o(l === null ? 0 : l - e), f = o(u === null ? 100 : u + e), p = o(u === null ? 100 : u - e);
617
+ }, Ee = (t) => `${Math.round(t * 100) / 100}%`, Oe = (t, n, e, r) => {
618
+ const o = (g) => Ee(r ? 100 - g : g), a = n === 0 ? null : t[n - 1], u = n === t.length ? null : t[n], m = o(a === null ? 0 : a + e), c = o(a === null ? 0 : a - e), f = o(u === null ? 100 : u + e), p = o(u === null ? 100 : u - e);
619
619
  return `polygon(${m} 0, ${f} 0, ${p} 100%, ${c} 100%)`;
620
- }, pt = "cubic-bezier(.2,.8,.2,1)", Ee = rt({ from: { clipPath: "var(--bof-from)" } }), Et = rt({ from: { opacity: 0, transform: "translateY(10px)" } }), Oe = rt({ to: { transform: "rotate(360deg)" } }), bn = rt({
620
+ }, pt = "cubic-bezier(.2,.8,.2,1)", Pe = rt({ from: { clipPath: "var(--bof-from)" } }), Ot = rt({ from: { opacity: 0, transform: "translateY(10px)" } }), Te = rt({ to: { transform: "rotate(360deg)" } }), yn = rt({
621
621
  "0%": { transform: "scale(.92)", opacity: 0 },
622
622
  "60%": { transform: "scale(1.03)" },
623
623
  "100%": { transform: "scale(1)", opacity: 1 }
624
- }), V = { fontFamily: i.fontPrimary, fontWeight: 700 }, wt = ([t, n]) => ({
624
+ }), V = { fontFamily: i.fontPrimary, fontWeight: 700 }, Wt = ([t, n]) => ({
625
625
  fontSize: `min(${s(t)}, 30cqi)`,
626
626
  lineHeight: n / t
627
- }), nn = (t) => ({
627
+ }), en = (t) => ({
628
628
  paddingInlineStart: `calc(${s(t)} + var(--bof-pad-start, 0%))`,
629
629
  paddingInlineEnd: `calc(${s(t)} + var(--bof-pad-end, 0%))`
630
- }), Wt = { overflowWrap: "anywhere", maxWidth: "100%" }, Rt = ([t, n]) => ({
630
+ }), Rt = { overflowWrap: "anywhere", maxWidth: "100%" }, Ft = ([t, n]) => ({
631
631
  fontSize: `min(${s(t)}, 18cqi)`,
632
632
  lineHeight: n / t
633
633
  }), mt = { unicodeBidi: "plaintext" }, ft = {
@@ -635,7 +635,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
635
635
  WebkitLineClamp: 2,
636
636
  WebkitBoxOrient: "vertical",
637
637
  overflow: "hidden"
638
- }, en = (t, n) => ({
638
+ }, on = (t, n) => ({
639
639
  boxSizing: "border-box",
640
640
  height: s(t, n),
641
641
  padding: `0 min(${s(20, n)}, 6cqi)`,
@@ -657,8 +657,8 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
657
657
  outline: `2px solid ${i.focus}`,
658
658
  outlineOffset: "2px"
659
659
  }
660
- }), yn = (t, n, e) => ({
661
- vote: d(en(t, n), e, {
660
+ }), xn = (t, n, e) => ({
661
+ vote: d(on(t, n), e, {
662
662
  backgroundColor: i.fill,
663
663
  color: i.on,
664
664
  cursor: "pointer",
@@ -671,22 +671,22 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
671
671
  "&:active:not(:disabled)": { transform: "translateY(0)" },
672
672
  "&:disabled": { cursor: "default", opacity: 0.7 }
673
673
  }),
674
- thanks: d(en(t, n), e, {
674
+ thanks: d(on(t, n), e, {
675
675
  padding: `0 ${s(12, n)}`,
676
676
  border: `2px solid ${i.ink}`,
677
677
  backgroundColor: i.surface,
678
678
  color: i.ink,
679
- animation: `${bn} .35s ease-out`
679
+ animation: `${yn} .35s ease-out`
680
680
  }),
681
681
  icon: d({ fontSize: "1.25em", flexShrink: 0 })
682
- }), Pe = (t) => {
683
- const n = (l) => ({
682
+ }), Le = (t) => {
683
+ const n = (a) => ({
684
684
  display: "block",
685
- width: `min(${s(l)}, 100%)`,
685
+ width: `min(${s(a)}, 100%)`,
686
686
  height: "auto",
687
687
  aspectRatio: "1",
688
688
  flexShrink: 0
689
- }), e = (l, u) => d(n(l), {
689
+ }), e = (a, u) => d(n(a), {
690
690
  boxSizing: "border-box",
691
691
  borderRadius: "50%",
692
692
  overflow: "hidden",
@@ -699,21 +699,21 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
699
699
  objectFit: "cover",
700
700
  objectPosition: "top"
701
701
  }
702
- }), r = (l) => d({
702
+ }), r = (a) => d({
703
703
  flexShrink: 0,
704
- width: `min(${s(l, l * 0.36)}, 100%)`,
704
+ width: `min(${s(a, a * 0.36)}, 100%)`,
705
705
  aspectRatio: "1",
706
706
  boxSizing: "border-box",
707
707
  borderRadius: "50%",
708
708
  display: "flex",
709
709
  alignItems: "center",
710
710
  justifyContent: "center",
711
- fontSize: s(l * 0.36),
711
+ fontSize: s(a * 0.36),
712
712
  ...V,
713
713
  color: i.text,
714
714
  backgroundColor: i.surface,
715
715
  border: `${i.borderSize} solid ${i.border}`
716
- }), o = (l, u) => d(n(l), { objectFit: "contain", filter: u });
716
+ }), o = (a, u) => d(n(a), { objectFit: "contain", filter: u });
717
717
  return {
718
718
  side: {
719
719
  logo: o(t.img, ot.logo),
@@ -739,12 +739,12 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
739
739
  initials: r(44)
740
740
  }
741
741
  };
742
- }, Te = [
742
+ }, Me = [
743
743
  "top-left",
744
744
  "top-right",
745
745
  "bottom-left",
746
746
  "bottom-right"
747
- ], xn = (t) => {
747
+ ], kn = (t) => {
748
748
  const n = {
749
749
  position: "absolute",
750
750
  width: s(t.trophy),
@@ -759,35 +759,35 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
759
759
  alignItems: "center",
760
760
  justifyContent: "center",
761
761
  fontSize: "1em",
762
- animation: `${bn} .5s .55s ease-out both`
763
- }, e = (o, l) => {
764
- const [u, m] = o.split("-"), c = l ? m === "left" ? "right" : "left" : m;
762
+ animation: `${yn} .5s .55s ease-out both`
763
+ }, e = (o, a) => {
764
+ const [u, m] = o.split("-"), c = a ? m === "left" ? "right" : "left" : m;
765
765
  return d(n, { [u]: s(-4), [c]: s(-4) });
766
766
  }, r = {};
767
- for (const o of Te)
767
+ for (const o of Me)
768
768
  r[`${o}|ltr`] = e(o, !1), r[`${o}|rtl`] = e(o, !0);
769
769
  return { at: r, icon: d({ fontSize: s(t.trophy * 0.5) }) };
770
- }, on = (t, n) => {
771
- const e = (l) => d({
770
+ }, rn = (t, n) => {
771
+ const e = (a) => d({
772
772
  position: "relative",
773
- height: s(l),
773
+ height: s(a),
774
774
  display: "flex",
775
775
  overflow: "hidden",
776
776
  borderRadius: i.radiusMd,
777
777
  backgroundColor: i.inner
778
- }), r = (l) => d({
778
+ }), r = (a) => d({
779
779
  position: "relative",
780
780
  zIndex: 1,
781
781
  minWidth: 0,
782
782
  boxSizing: "border-box",
783
783
  containerType: "inline-size",
784
784
  paddingBlock: s(t.colPad[0]),
785
- ...nn(t.colPad[1]),
785
+ ...en(t.colPad[1]),
786
786
  display: "flex",
787
787
  flexDirection: "column",
788
788
  alignItems: "center",
789
789
  justifyContent: "center",
790
- gap: s(l),
790
+ gap: s(a),
791
791
  transition: `flex-basis .6s ${pt}`
792
792
  }), o = n ? { width: "100%" } : { minWidth: `min(${s(180, t.btnFont)}, 100%)`, maxWidth: "100%" };
793
793
  return {
@@ -811,7 +811,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
811
811
  position: "absolute",
812
812
  inset: 0,
813
813
  backgroundColor: i.fill,
814
- animation: `${Ee} .9s ${pt} both`
814
+ animation: `${Pe} .9s ${pt} both`
815
815
  }),
816
816
  column: r(t.colGap),
817
817
  columnFill: r(10),
@@ -832,16 +832,16 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
832
832
  ),
833
833
  name: d({
834
834
  ...V,
835
- ...Rt(t.name),
835
+ ...Ft(t.name),
836
836
  ...mt,
837
837
  ...ft,
838
- ...Wt,
838
+ ...Rt,
839
839
  textAlign: "center",
840
840
  textWrap: "balance"
841
841
  }),
842
842
  pct: d({
843
843
  ...V,
844
- ...wt(t.pctFill),
844
+ ...Wt(t.pctFill),
845
845
  color: i.ink,
846
846
  fontVariantNumeric: "tabular-nums"
847
847
  }),
@@ -859,7 +859,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
859
859
  display: "flex",
860
860
  justifyContent: "center"
861
861
  }),
862
- ...yn(t.btnH, t.btnFont, o),
862
+ ...xn(t.btnH, t.btnFont, o),
863
863
  // Winner panel
864
864
  winColumn: d({
865
865
  position: "relative",
@@ -868,7 +868,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
868
868
  boxSizing: "border-box",
869
869
  containerType: "inline-size",
870
870
  paddingBlock: s(n ? 12 : 24),
871
- ...nn(n ? 12 : 24),
871
+ ...en(n ? 12 : 24),
872
872
  transition: `flex-basis .6s ${pt}`,
873
873
  display: "flex",
874
874
  alignItems: "center",
@@ -883,7 +883,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
883
883
  textAlign: n ? "center" : "start",
884
884
  color: i.on,
885
885
  minWidth: 0,
886
- animation: `${Et} .6s .25s ease-out both`
886
+ animation: `${Ot} .6s .25s ease-out both`
887
887
  }),
888
888
  winWrap: d({
889
889
  position: "relative",
@@ -903,7 +903,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
903
903
  pointerEvents: "none",
904
904
  background: `repeating-conic-gradient(from 0deg, color-mix(in srgb, ${i.on} 12%, transparent) 0deg 9deg, transparent 9deg 18deg), radial-gradient(circle closest-side, color-mix(in srgb, ${i.on} 24%, transparent) 0%, transparent 72%)`,
905
905
  maskImage: "radial-gradient(circle closest-side, #000 28%, transparent 100%)",
906
- animation: `${Oe} 80s linear infinite`
906
+ animation: `${Te} 80s linear infinite`
907
907
  }),
908
908
  winText: d({
909
909
  minWidth: 0,
@@ -919,10 +919,10 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
919
919
  }),
920
920
  winName: d({
921
921
  ...V,
922
- ...Rt(t.winName),
922
+ ...Ft(t.winName),
923
923
  ...mt,
924
924
  ...ft,
925
- ...Wt,
925
+ ...Rt,
926
926
  letterSpacing: "-0.01em",
927
927
  textWrap: "balance"
928
928
  }),
@@ -942,7 +942,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
942
942
  ),
943
943
  winPct: d({
944
944
  ...V,
945
- ...wt(t.winPct),
945
+ ...Wt(t.winPct),
946
946
  fontVariantNumeric: "tabular-nums"
947
947
  }),
948
948
  ofVotes: d({ fontWeight: 500, ...I([14, 20]) }),
@@ -954,7 +954,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
954
954
  gap: s(6),
955
955
  textAlign: "center",
956
956
  minWidth: 0,
957
- animation: `${Et} .6s .4s ease-out both`
957
+ animation: `${Ot} .6s .4s ease-out both`
958
958
  }),
959
959
  loserSlot: d({
960
960
  width: "100%",
@@ -966,22 +966,22 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
966
966
  }),
967
967
  loserName: d({
968
968
  ...V,
969
- ...Rt(t.loserName),
969
+ ...Ft(t.loserName),
970
970
  ...mt,
971
971
  ...ft,
972
- ...Wt,
972
+ ...Rt,
973
973
  paddingTop: s(2),
974
974
  textWrap: "balance"
975
975
  }),
976
976
  loserPct: d({
977
977
  ...V,
978
- ...wt(t.loserPct),
978
+ ...Wt(t.loserPct),
979
979
  fontVariantNumeric: "tabular-nums"
980
980
  }),
981
- img: Pe(t),
982
- trophy: xn(t)
981
+ img: Le(t),
982
+ trophy: kn(t)
983
983
  };
984
- }, Le = () => ({
984
+ }, Ne = () => ({
985
985
  shell: d({
986
986
  display: "flex",
987
987
  flexDirection: "column",
@@ -993,7 +993,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
993
993
  }),
994
994
  row: d({
995
995
  position: "relative",
996
- height: s($t),
996
+ height: s(Ct),
997
997
  boxSizing: "border-box",
998
998
  padding: `0 ${s(12)}`,
999
999
  display: "flex",
@@ -1003,7 +1003,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1003
1003
  }),
1004
1004
  rowNeutral: d({
1005
1005
  position: "relative",
1006
- height: s($t),
1006
+ height: s(Ct),
1007
1007
  boxSizing: "border-box",
1008
1008
  padding: `0 ${s(12)}`,
1009
1009
  display: "flex",
@@ -1012,7 +1012,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1012
1012
  }),
1013
1013
  rowWinner: d({
1014
1014
  position: "relative",
1015
- height: s($t),
1015
+ height: s(Ct),
1016
1016
  boxSizing: "border-box",
1017
1017
  padding: `0 ${s(12)}`,
1018
1018
  display: "flex",
@@ -1020,7 +1020,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1020
1020
  gap: s(12),
1021
1021
  backgroundColor: i.fill,
1022
1022
  color: i.on,
1023
- animation: `${Et} .6s ease-out both`
1023
+ animation: `${Ot} .6s ease-out both`
1024
1024
  }),
1025
1025
  greyed: d({ filter: "grayscale(1) opacity(0.7)", display: "flex" }),
1026
1026
  imgWrap: d({ position: "relative", display: "flex", flexShrink: 0 }),
@@ -1046,86 +1046,86 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1046
1046
  flexShrink: 0
1047
1047
  }),
1048
1048
  action: d({ width: s(104), flexShrink: 0, display: "flex" }),
1049
- ...yn(40, 14, { width: "100%" }),
1050
- trophy: xn({ trophy: 22, trophyRing: 2 })
1051
- }), g = { d: on(tt, !1), m: on(nt, !0) }, R = Le(), Z = ({ side: t, layout: n, variant: e, language: r }) => {
1052
- const [o, l] = A(null), u = t.image && o !== t.image ? t.image : null;
1053
- return t.kind === "player" ? /* @__PURE__ */ a("div", { css: g[n].img[e].headshot, "aria-hidden": "true", children: /* @__PURE__ */ a(
1049
+ ...xn(40, 14, { width: "100%" }),
1050
+ trophy: kn({ trophy: 22, trophyRing: 2 })
1051
+ }), h = { d: rn(tt, !1), m: rn(nt, !0) }, R = Ne(), Z = ({ side: t, layout: n, variant: e, language: r }) => {
1052
+ const [o, a] = A(null), u = t.image && o !== t.image ? t.image : null;
1053
+ return t.kind === "player" ? /* @__PURE__ */ l("div", { css: h[n].img[e].headshot, "aria-hidden": "true", children: /* @__PURE__ */ l(
1054
1054
  "img",
1055
1055
  {
1056
- src: u ?? Gn.playerPlaceholder,
1056
+ src: u ?? Un.playerPlaceholder,
1057
1057
  alt: "",
1058
1058
  loading: "lazy",
1059
1059
  decoding: "async",
1060
- onError: () => u && l(u)
1060
+ onError: () => u && a(u)
1061
1061
  }
1062
- ) }) : u ? /* @__PURE__ */ a(
1062
+ ) }) : u ? /* @__PURE__ */ l(
1063
1063
  "img",
1064
1064
  {
1065
- css: g[n].img[e].logo,
1065
+ css: h[n].img[e].logo,
1066
1066
  src: u,
1067
1067
  alt: "",
1068
1068
  loading: "lazy",
1069
1069
  decoding: "async",
1070
- onError: () => l(u)
1070
+ onError: () => a(u)
1071
1071
  }
1072
- ) : /* @__PURE__ */ a("div", { css: g[n].img[e].initials, "aria-hidden": "true", children: qn(t.name, r) });
1073
- }, kn = ({ position: t, layout: n, row: e }) => {
1074
- const r = `${t}|${Pt() ? "rtl" : "ltr"}`;
1075
- return /* @__PURE__ */ a(
1072
+ ) : /* @__PURE__ */ l("div", { css: h[n].img[e].initials, "aria-hidden": "true", children: Yn(t.name, r) });
1073
+ }, Sn = ({ position: t, layout: n, row: e }) => {
1074
+ const r = `${t}|${Tt() ? "rtl" : "ltr"}`;
1075
+ return /* @__PURE__ */ l(
1076
1076
  "div",
1077
1077
  {
1078
- css: e ? R.trophy.at[r] : g[n].trophy.at[r],
1078
+ css: e ? R.trophy.at[r] : h[n].trophy.at[r],
1079
1079
  "aria-hidden": "true",
1080
- children: /* @__PURE__ */ a(
1081
- Qn,
1080
+ children: /* @__PURE__ */ l(
1081
+ te,
1082
1082
  {
1083
- css: e ? R.trophy.icon : g[n].trophy.icon
1083
+ css: e ? R.trophy.icon : h[n].trophy.icon
1084
1084
  }
1085
1085
  )
1086
1086
  }
1087
1087
  );
1088
- }, Me = (t) => {
1088
+ }, De = (t) => {
1089
1089
  if (t != null && t.onClick) return t.onClick;
1090
1090
  const n = t == null ? void 0 : t.url;
1091
1091
  if (n)
1092
1092
  return () => {
1093
1093
  ((t == null ? void 0 : t.target) ?? "_self") === "_blank" ? window.open(n, "_blank") : window.location.href = n;
1094
1094
  };
1095
- }, Sn = ({
1095
+ }, In = ({
1096
1096
  state: t,
1097
1097
  layout: n,
1098
1098
  row: e,
1099
1099
  labels: r,
1100
1100
  signInCTA: o,
1101
- onVote: l
1101
+ onVote: a
1102
1102
  }) => {
1103
1103
  if (t === "signIn") {
1104
- if (o != null && o.component) return /* @__PURE__ */ a(Ot, { children: o.component });
1105
- const u = Me(o);
1106
- return /* @__PURE__ */ a(
1104
+ if (o != null && o.component) return /* @__PURE__ */ l(Pt, { children: o.component });
1105
+ const u = De(o);
1106
+ return /* @__PURE__ */ l(
1107
1107
  "button",
1108
1108
  {
1109
1109
  type: "button",
1110
- css: e ? R.vote : g[n].vote,
1110
+ css: e ? R.vote : h[n].vote,
1111
1111
  disabled: !u,
1112
1112
  onClick: u,
1113
- children: /* @__PURE__ */ a("span", { children: (o == null ? void 0 : o.defaultLabel) || r.signIn })
1113
+ children: /* @__PURE__ */ l("span", { children: (o == null ? void 0 : o.defaultLabel) || r.signIn })
1114
1114
  }
1115
1115
  );
1116
1116
  }
1117
- return t === "chosen" ? /* @__PURE__ */ b("div", { css: e ? R.thanks : g[n].thanks, role: "status", children: [
1118
- /* @__PURE__ */ a(Zn, { css: g.d.icon }),
1119
- /* @__PURE__ */ a("span", { children: r.thankYou })
1120
- ] }) : t === "locked" ? null : /* @__PURE__ */ a(
1117
+ return t === "chosen" ? /* @__PURE__ */ b("div", { css: e ? R.thanks : h[n].thanks, role: "status", children: [
1118
+ /* @__PURE__ */ l(ne, { css: h.d.icon }),
1119
+ /* @__PURE__ */ l("span", { children: r.thankYou })
1120
+ ] }) : t === "locked" ? null : /* @__PURE__ */ l(
1121
1121
  "button",
1122
1122
  {
1123
1123
  type: "button",
1124
- css: e ? R.vote : g[n].vote,
1124
+ css: e ? R.vote : h[n].vote,
1125
1125
  "aria-label": r.voteFor,
1126
1126
  disabled: t === "submitting" || t === "upcoming",
1127
- onClick: l,
1128
- children: /* @__PURE__ */ a("span", { children: r.vote })
1127
+ onClick: a,
1128
+ children: /* @__PURE__ */ l("span", { children: r.vote })
1129
1129
  }
1130
1130
  );
1131
1131
  }, _ = (t, n) => ({
@@ -1133,18 +1133,18 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1133
1133
  "--bof-on": t.on,
1134
1134
  "--bof-ink": t.ink,
1135
1135
  ...n ? { "--bof-from": n } : {}
1136
- }), Tt = (t, n) => ({
1136
+ }), Lt = (t, n) => ({
1137
1137
  ..._(t.colours[n]),
1138
1138
  flex: `0 0 ${t.widths[n]}%`,
1139
1139
  "--bof-pad-start": n > 0 ? `${t.slant}%` : "0%",
1140
1140
  "--bof-pad-end": n < t.sides.length - 1 ? `${t.slant}%` : "0%"
1141
- }), In = (t, n) => ({
1141
+ }), vn = (t, n) => ({
1142
1142
  vote: t.label("vote"),
1143
1143
  voteFor: t.label("voteFor", { name: n.name }),
1144
1144
  thankYou: t.label("thankYou"),
1145
1145
  signIn: t.label("signIn")
1146
- }), Ne = ({ view: t }) => /* @__PURE__ */ a("div", { css: R.shell, role: "group", "aria-label": t.splitLabel ?? void 0, children: t.sides.map((n, e) => {
1147
- const r = t.winner === e, o = t.winner !== null && !r, l = /* @__PURE__ */ a(
1146
+ }), Be = ({ view: t }) => /* @__PURE__ */ l("div", { css: R.shell, role: "group", "aria-label": t.splitLabel ?? void 0, children: t.sides.map((n, e) => {
1147
+ const r = t.winner === e, o = t.winner !== null && !r, a = /* @__PURE__ */ l(
1148
1148
  Z,
1149
1149
  {
1150
1150
  side: n,
@@ -1160,18 +1160,18 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1160
1160
  style: _(t.colours[e]),
1161
1161
  children: [
1162
1162
  /* @__PURE__ */ b("div", { css: R.imgWrap, children: [
1163
- o ? /* @__PURE__ */ a("div", { css: R.greyed, children: l }) : l,
1164
- r && t.showTrophy && /* @__PURE__ */ a(kn, { position: t.trophyPosition, layout: "m", row: !0 })
1163
+ o ? /* @__PURE__ */ l("div", { css: R.greyed, children: a }) : a,
1164
+ r && t.showTrophy && /* @__PURE__ */ l(Sn, { position: t.trophyPosition, layout: "m", row: !0 })
1165
1165
  ] }),
1166
- /* @__PURE__ */ a("div", { css: R.name, children: n.name }),
1167
- t.fill && t.percents[e] !== null && /* @__PURE__ */ a("div", { css: r ? R.pctOn : R.pct, children: t.percents[e] }),
1168
- !t.ended && /* @__PURE__ */ a("div", { css: R.action, children: /* @__PURE__ */ a(
1169
- Sn,
1166
+ /* @__PURE__ */ l("div", { css: R.name, children: n.name }),
1167
+ t.fill && t.percents[e] !== null && /* @__PURE__ */ l("div", { css: r ? R.pctOn : R.pct, children: t.percents[e] }),
1168
+ !t.ended && /* @__PURE__ */ l("div", { css: R.action, children: /* @__PURE__ */ l(
1169
+ In,
1170
1170
  {
1171
1171
  state: t.actions[e],
1172
1172
  layout: "m",
1173
1173
  row: !0,
1174
- labels: In(t, n),
1174
+ labels: vn(t, n),
1175
1175
  signInCTA: t.signInCTA,
1176
1176
  onVote: () => t.onVote(e)
1177
1177
  }
@@ -1180,15 +1180,15 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1180
1180
  },
1181
1181
  n.optionId
1182
1182
  );
1183
- }) }), De = ({
1183
+ }) }), ze = ({
1184
1184
  view: t,
1185
1185
  index: n
1186
1186
  }) => {
1187
1187
  const e = t.sides[n];
1188
- return /* @__PURE__ */ a("div", { css: g[t.layout].winColumn, style: Tt(t, n), children: /* @__PURE__ */ b("div", { css: g[t.layout].winContent, children: [
1189
- /* @__PURE__ */ b("div", { css: g[t.layout].winWrap, children: [
1190
- /* @__PURE__ */ a("div", { css: g[t.layout].rays, "aria-hidden": "true" }),
1191
- /* @__PURE__ */ a(
1188
+ return /* @__PURE__ */ l("div", { css: h[t.layout].winColumn, style: Lt(t, n), children: /* @__PURE__ */ b("div", { css: h[t.layout].winContent, children: [
1189
+ /* @__PURE__ */ b("div", { css: h[t.layout].winWrap, children: [
1190
+ /* @__PURE__ */ l("div", { css: h[t.layout].rays, "aria-hidden": "true" }),
1191
+ /* @__PURE__ */ l(
1192
1192
  Z,
1193
1193
  {
1194
1194
  side: e,
@@ -1197,8 +1197,8 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1197
1197
  language: t.language
1198
1198
  }
1199
1199
  ),
1200
- t.showTrophy && /* @__PURE__ */ a(
1201
- kn,
1200
+ t.showTrophy && /* @__PURE__ */ l(
1201
+ Sn,
1202
1202
  {
1203
1203
  position: t.trophyPosition,
1204
1204
  layout: t.layout,
@@ -1206,22 +1206,22 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1206
1206
  }
1207
1207
  )
1208
1208
  ] }),
1209
- /* @__PURE__ */ b("div", { css: g[t.layout].winText, children: [
1210
- /* @__PURE__ */ a("div", { css: g[t.layout].eyebrow, children: t.label("winner") }),
1211
- /* @__PURE__ */ a("div", { css: g[t.layout].winName, children: e.name }),
1212
- t.fill && t.percents[n] !== null && /* @__PURE__ */ b("div", { css: g[t.layout].winPctRow, children: [
1213
- /* @__PURE__ */ a("span", { css: g[t.layout].winPct, children: t.percents[n] }),
1214
- /* @__PURE__ */ a("span", { css: g[t.layout].ofVotes, children: t.label("ofTheVotes") })
1209
+ /* @__PURE__ */ b("div", { css: h[t.layout].winText, children: [
1210
+ /* @__PURE__ */ l("div", { css: h[t.layout].eyebrow, children: t.label("winner") }),
1211
+ /* @__PURE__ */ l("div", { css: h[t.layout].winName, children: e.name }),
1212
+ t.fill && t.percents[n] !== null && /* @__PURE__ */ b("div", { css: h[t.layout].winPctRow, children: [
1213
+ /* @__PURE__ */ l("span", { css: h[t.layout].winPct, children: t.percents[n] }),
1214
+ /* @__PURE__ */ l("span", { css: h[t.layout].ofVotes, children: t.label("ofTheVotes") })
1215
1215
  ] })
1216
1216
  ] })
1217
1217
  ] }) });
1218
- }, Be = ({
1218
+ }, Ae = ({
1219
1219
  view: t,
1220
1220
  index: n
1221
1221
  }) => {
1222
1222
  const e = t.sides[n];
1223
- return /* @__PURE__ */ a("div", { css: g[t.layout].winColumn, style: Tt(t, n), children: /* @__PURE__ */ b("div", { css: g[t.layout].loserContent, children: [
1224
- /* @__PURE__ */ a("div", { css: g[t.layout].loserSlot, children: /* @__PURE__ */ a(
1223
+ return /* @__PURE__ */ l("div", { css: h[t.layout].winColumn, style: Lt(t, n), children: /* @__PURE__ */ b("div", { css: h[t.layout].loserContent, children: [
1224
+ /* @__PURE__ */ l("div", { css: h[t.layout].loserSlot, children: /* @__PURE__ */ l(
1225
1225
  Z,
1226
1226
  {
1227
1227
  side: e,
@@ -1230,10 +1230,10 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1230
1230
  language: t.language
1231
1231
  }
1232
1232
  ) }),
1233
- /* @__PURE__ */ a("div", { css: g[t.layout].loserName, children: e.name }),
1234
- t.fill && t.percents[n] !== null && /* @__PURE__ */ a("div", { css: g[t.layout].loserPct, children: t.percents[n] })
1233
+ /* @__PURE__ */ l("div", { css: h[t.layout].loserName, children: e.name }),
1234
+ t.fill && t.percents[n] !== null && /* @__PURE__ */ l("div", { css: h[t.layout].loserPct, children: t.percents[n] })
1235
1235
  ] }) });
1236
- }, ze = ({
1236
+ }, Ve = ({
1237
1237
  view: t,
1238
1238
  index: n
1239
1239
  }) => {
@@ -1241,10 +1241,10 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1241
1241
  return /* @__PURE__ */ b(
1242
1242
  "div",
1243
1243
  {
1244
- css: t.fill ? g[t.layout].columnFill : g[t.layout].column,
1245
- style: Tt(t, n),
1244
+ css: t.fill ? h[t.layout].columnFill : h[t.layout].column,
1245
+ style: Lt(t, n),
1246
1246
  children: [
1247
- /* @__PURE__ */ a("div", { css: g[t.layout].imgSlot, children: /* @__PURE__ */ a(
1247
+ /* @__PURE__ */ l("div", { css: h[t.layout].imgSlot, children: /* @__PURE__ */ l(
1248
1248
  Z,
1249
1249
  {
1250
1250
  side: e,
@@ -1253,19 +1253,19 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1253
1253
  language: t.language
1254
1254
  }
1255
1255
  ) }),
1256
- /* @__PURE__ */ a("div", { css: g[t.layout].nameBox, children: /* @__PURE__ */ a("div", { css: g[t.layout].name, children: e.name }) }),
1257
- t.fill && t.percents[n] !== null && /* @__PURE__ */ a("div", { css: g[t.layout].pct, children: t.percents[n] }),
1258
- !t.ended && /* @__PURE__ */ a(
1256
+ /* @__PURE__ */ l("div", { css: h[t.layout].nameBox, children: /* @__PURE__ */ l("div", { css: h[t.layout].name, children: e.name }) }),
1257
+ t.fill && t.percents[n] !== null && /* @__PURE__ */ l("div", { css: h[t.layout].pct, children: t.percents[n] }),
1258
+ !t.ended && /* @__PURE__ */ l(
1259
1259
  "div",
1260
1260
  {
1261
- css: t.fill ? g[t.layout].actionFill : g[t.layout].action,
1262
- children: /* @__PURE__ */ a(
1263
- Sn,
1261
+ css: t.fill ? h[t.layout].actionFill : h[t.layout].action,
1262
+ children: /* @__PURE__ */ l(
1263
+ In,
1264
1264
  {
1265
1265
  state: t.actions[n],
1266
1266
  layout: t.layout,
1267
1267
  row: !1,
1268
- labels: In(t, e),
1268
+ labels: vn(t, e),
1269
1269
  signInCTA: t.signInCTA,
1270
1270
  onVote: () => t.onVote(n)
1271
1271
  }
@@ -1275,20 +1275,20 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1275
1275
  ]
1276
1276
  }
1277
1277
  );
1278
- }, Ae = ({ view: t }) => {
1279
- if (t.rows) return /* @__PURE__ */ a(Ne, { view: t });
1278
+ }, _e = ({ view: t }) => {
1279
+ if (t.rows) return /* @__PURE__ */ l(Be, { view: t });
1280
1280
  const n = t.winner;
1281
1281
  return /* @__PURE__ */ b(
1282
1282
  "div",
1283
1283
  {
1284
- css: t.fill ? g[t.layout].fill : g[t.layout].bar,
1284
+ css: t.fill ? h[t.layout].fill : h[t.layout].bar,
1285
1285
  role: "group",
1286
1286
  "aria-label": t.splitLabel ?? void 0,
1287
1287
  children: [
1288
- n !== null ? /* @__PURE__ */ a(
1288
+ n !== null ? /* @__PURE__ */ l(
1289
1289
  "div",
1290
1290
  {
1291
- css: g[t.layout].layerWinner,
1291
+ css: h[t.layout].layerWinner,
1292
1292
  "aria-hidden": "true",
1293
1293
  style: {
1294
1294
  ..._(t.colours[n], t.evenClips[n]),
@@ -1296,23 +1296,23 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1296
1296
  }
1297
1297
  },
1298
1298
  "winner"
1299
- ) : t.sides.map((e, r) => /* @__PURE__ */ a(
1299
+ ) : t.sides.map((e, r) => /* @__PURE__ */ l(
1300
1300
  "div",
1301
1301
  {
1302
- css: t.lit[r] ? g[t.layout].layer : g[t.layout].layerNeutral,
1302
+ css: t.lit[r] ? h[t.layout].layer : h[t.layout].layerNeutral,
1303
1303
  "aria-hidden": "true",
1304
1304
  style: { ..._(t.colours[r]), clipPath: t.clips[r] }
1305
1305
  },
1306
1306
  e.optionId
1307
1307
  )),
1308
1308
  t.sides.map(
1309
- (e, r) => n === null ? /* @__PURE__ */ a(ze, { view: t, index: r }, e.optionId) : r === n ? /* @__PURE__ */ a(De, { view: t, index: r }, e.optionId) : /* @__PURE__ */ a(Be, { view: t, index: r }, e.optionId)
1309
+ (e, r) => n === null ? /* @__PURE__ */ l(Ve, { view: t, index: r }, e.optionId) : r === n ? /* @__PURE__ */ l(ze, { view: t, index: r }, e.optionId) : /* @__PURE__ */ l(Ae, { view: t, index: r }, e.optionId)
1310
1310
  )
1311
1311
  ]
1312
1312
  }
1313
1313
  );
1314
- }, Ve = ({ layout: t, label: n, caption: e, left: r }) => {
1315
- const o = mn(), l = q(
1314
+ }, He = ({ layout: t, label: n, caption: e, left: r }) => {
1315
+ const o = fn(), a = q(
1316
1316
  () => new Intl.NumberFormat(o, {
1317
1317
  minimumIntegerDigits: 2,
1318
1318
  useGrouping: !1
@@ -1325,42 +1325,42 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1325
1325
  { value: r.seconds, caption: n("seconds") }
1326
1326
  ];
1327
1327
  return /* @__PURE__ */ b("div", { css: Y[t].root, children: [
1328
- /* @__PURE__ */ a("div", { css: Y[t].label, children: e }),
1329
- /* @__PURE__ */ a("div", { css: Y[t].units, children: u.map((m, c) => /* @__PURE__ */ b(dn.Fragment, { children: [
1330
- t === "d" && c > 0 && /* @__PURE__ */ a("div", { css: Y.d.colon, "aria-hidden": "true", children: ":" }),
1328
+ /* @__PURE__ */ l("div", { css: Y[t].label, children: e }),
1329
+ /* @__PURE__ */ l("div", { css: Y[t].units, children: u.map((m, c) => /* @__PURE__ */ b(un.Fragment, { children: [
1330
+ t === "d" && c > 0 && /* @__PURE__ */ l("div", { css: Y.d.colon, "aria-hidden": "true", children: ":" }),
1331
1331
  /* @__PURE__ */ b("div", { css: Y[t].unit, children: [
1332
- /* @__PURE__ */ a("div", { css: Y[t].value, children: l.format(m.value) }),
1333
- /* @__PURE__ */ a("div", { css: Y[t].caption, children: m.caption })
1332
+ /* @__PURE__ */ l("div", { css: Y[t].value, children: a.format(m.value) }),
1333
+ /* @__PURE__ */ l("div", { css: Y[t].caption, children: m.caption })
1334
1334
  ] })
1335
1335
  ] }, c)) })
1336
1336
  ] });
1337
- }, _e = ({
1337
+ }, je = ({
1338
1338
  layout: t,
1339
1339
  label: n,
1340
1340
  title: e,
1341
1341
  openSubtitle: r,
1342
1342
  ended: o,
1343
- draw: l,
1343
+ draw: a,
1344
1344
  upcoming: u,
1345
1345
  left: m
1346
1346
  }) => {
1347
1347
  const c = [
1348
1348
  { key: "open", text: r, on: !o },
1349
- { key: "ended", text: n("endedSubtitle"), on: o && !l },
1350
- { key: "draw", text: n("drawSubtitle"), on: o && l }
1351
- ], f = o ? /* @__PURE__ */ a("div", { css: y[t].pill, children: n("votingEnded") }) : m ? /* @__PURE__ */ a(
1352
- Ve,
1349
+ { key: "ended", text: n("endedSubtitle"), on: o && !a },
1350
+ { key: "draw", text: n("drawSubtitle"), on: o && a }
1351
+ ], f = o ? /* @__PURE__ */ l("div", { css: y[t].pill, children: n("votingEnded") }) : m ? /* @__PURE__ */ l(
1352
+ He,
1353
1353
  {
1354
1354
  layout: t,
1355
1355
  label: n,
1356
1356
  caption: n(u ? "votingStartsIn" : "votingEndsIn"),
1357
1357
  left: m
1358
1358
  }
1359
- ) : u ? /* @__PURE__ */ a("div", { css: y[t].pill, children: n("votingStartsSoon") }) : null;
1359
+ ) : u ? /* @__PURE__ */ l("div", { css: y[t].pill, children: n("votingStartsSoon") }) : null;
1360
1360
  return /* @__PURE__ */ b("div", { css: y[t].header, children: [
1361
1361
  /* @__PURE__ */ b("div", { css: y[t].titles, children: [
1362
- /* @__PURE__ */ a("h2", { css: y[t].title, children: e }),
1363
- /* @__PURE__ */ a("div", { css: y[t].subtitles, children: c.map((p) => /* @__PURE__ */ a(
1362
+ /* @__PURE__ */ l("h2", { css: y[t].title, children: e }),
1363
+ /* @__PURE__ */ l("div", { css: y[t].subtitles, children: c.map((p) => /* @__PURE__ */ l(
1364
1364
  "p",
1365
1365
  {
1366
1366
  css: p.on ? y[t].subtitle : y[t].subtitleHidden,
@@ -1370,9 +1370,9 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1370
1370
  p.key
1371
1371
  )) })
1372
1372
  ] }),
1373
- t === "m" ? f && /* @__PURE__ */ a("div", { css: y.m.status, children: f }) : f
1373
+ t === "m" ? f && /* @__PURE__ */ l("div", { css: y.m.status, children: f }) : f
1374
1374
  ] });
1375
- }, rn = (t) => ({
1375
+ }, sn = (t) => ({
1376
1376
  fontSize: "1em",
1377
1377
  display: "flex",
1378
1378
  flexDirection: "column",
@@ -1380,16 +1380,16 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1380
1380
  gap: t ? i.spaceMd : i.spaceLg,
1381
1381
  padding: t ? i.spaceMd : `${s(32)} ${i.spaceLg}`,
1382
1382
  borderRadius: i.radiusMd
1383
- }), sn = (t) => d({
1383
+ }), an = (t) => d({
1384
1384
  flexShrink: 0,
1385
1385
  width: "2px",
1386
1386
  height: s(32),
1387
1387
  backgroundColor: i.border,
1388
1388
  transform: `skewX(${t ? 14 : -14}deg)`
1389
- }), an = (t) => ({
1390
- panel: d(rn(t), { backgroundColor: i.inner }),
1389
+ }), ln = (t) => ({
1390
+ panel: d(sn(t), { backgroundColor: i.inner }),
1391
1391
  // "after": the panel takes the picked side's tint.
1392
- panelPicked: d(rn(t), { backgroundColor: i.tint }),
1392
+ panelPicked: d(sn(t), { backgroundColor: i.tint }),
1393
1393
  intro: d({
1394
1394
  display: "flex",
1395
1395
  flexDirection: "column",
@@ -1451,10 +1451,10 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1451
1451
  backgroundColor: i.surface,
1452
1452
  border: `${i.borderSize} solid ${i.border}`
1453
1453
  })
1454
- }), j = { d: an(!1), m: an(!0) }, He = { ltr: sn(!1), rtl: sn(!0) }, je = (t) => {
1455
- var h;
1456
- const { layout: n, poll: e, sides: r, colours: o, picked: l } = t, { t: u } = bt("common"), m = Pt(), c = l !== null ? r[l] : null, f = e.labels, p = c ? /* @__PURE__ */ b("div", { css: j[n].pick, children: [
1457
- /* @__PURE__ */ a(
1454
+ }), j = { d: ln(!1), m: ln(!0) }, Ge = { ltr: an(!1), rtl: an(!0) }, qe = (t) => {
1455
+ var g;
1456
+ const { layout: n, poll: e, sides: r, colours: o, picked: a } = t, { t: u } = bt("common"), m = Tt(), c = a !== null ? r[a] : null, f = e.labels, p = c ? /* @__PURE__ */ b("div", { css: j[n].pick, children: [
1457
+ /* @__PURE__ */ l(
1458
1458
  Z,
1459
1459
  {
1460
1460
  side: c,
@@ -1463,10 +1463,10 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1463
1463
  language: t.language
1464
1464
  }
1465
1465
  ),
1466
- /* @__PURE__ */ a("p", { css: j[n].pickName, children: c.name })
1467
- ] }) : /* @__PURE__ */ a("div", { css: j[n].sides, "aria-hidden": "true", children: r.map((F, B) => /* @__PURE__ */ b(dn.Fragment, { children: [
1468
- B > 0 && /* @__PURE__ */ a("span", { css: He[m ? "rtl" : "ltr"] }),
1469
- /* @__PURE__ */ a("span", { style: _(o[B]), children: /* @__PURE__ */ a(
1466
+ /* @__PURE__ */ l("p", { css: j[n].pickName, children: c.name })
1467
+ ] }) : /* @__PURE__ */ l("div", { css: j[n].sides, "aria-hidden": "true", children: r.map((F, B) => /* @__PURE__ */ b(un.Fragment, { children: [
1468
+ B > 0 && /* @__PURE__ */ l("span", { css: Ge[m ? "rtl" : "ltr"] }),
1469
+ /* @__PURE__ */ l("span", { style: _(o[B]), children: /* @__PURE__ */ l(
1470
1470
  Z,
1471
1471
  {
1472
1472
  side: F,
@@ -1480,22 +1480,22 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1480
1480
  "div",
1481
1481
  {
1482
1482
  css: c ? j[n].panelPicked : j[n].panel,
1483
- style: l !== null ? {
1484
- ..._(o[l]),
1485
- "--fu-ucrc-primary-on-primary": o[l].on
1483
+ style: a !== null ? {
1484
+ ..._(o[a]),
1485
+ "--fu-ucrc-primary-on-primary": o[a].on
1486
1486
  } : void 0,
1487
1487
  children: [
1488
1488
  /* @__PURE__ */ b("div", { css: j[n].intro, children: [
1489
1489
  p,
1490
- /* @__PURE__ */ a("h3", { css: j[n].title, children: (f == null ? void 0 : f.leadTitle) || u("leads.header.title") }),
1491
- /* @__PURE__ */ a("p", { css: j[n].description, children: (f == null ? void 0 : f.leadDescription) || u("leads.header.description") })
1490
+ /* @__PURE__ */ l("h3", { css: j[n].title, children: (f == null ? void 0 : f.leadTitle) || u("leads.header.title") }),
1491
+ /* @__PURE__ */ l("p", { css: j[n].description, children: (f == null ? void 0 : f.leadDescription) || u("leads.header.description") })
1492
1492
  ] }),
1493
- /* @__PURE__ */ a("div", { css: j[n].form, children: /* @__PURE__ */ a(
1494
- zn,
1493
+ /* @__PURE__ */ l("div", { css: j[n].form, children: /* @__PURE__ */ l(
1494
+ An,
1495
1495
  {
1496
1496
  sdk: t.sdk,
1497
- brandingColors: c ? { primaryColor: o[l].fill } : void 0,
1498
- brandingUrls: (h = e.branding) == null ? void 0 : h.urls,
1497
+ brandingColors: c ? { primaryColor: o[a].fill } : void 0,
1498
+ brandingUrls: (g = e.branding) == null ? void 0 : g.urls,
1499
1499
  fields: t.leads.fields,
1500
1500
  campaignId: t.leads.campaignId,
1501
1501
  campaignName: t.leads.campaignName,
@@ -1518,17 +1518,17 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1518
1518
  ]
1519
1519
  }
1520
1520
  );
1521
- }, ln = (t) => {
1521
+ }, cn = (t) => {
1522
1522
  const n = {
1523
1523
  flex: 1,
1524
1524
  fontFamily: i.fontPrimary,
1525
1525
  fontWeight: 700,
1526
1526
  fontVariantNumeric: "tabular-nums",
1527
1527
  ...I(t.pctBar)
1528
- }, e = (l) => d({
1528
+ }, e = (a) => d({
1529
1529
  minWidth: s(t.bar),
1530
1530
  backgroundColor: i.fill,
1531
- borderRadius: l,
1531
+ borderRadius: a,
1532
1532
  transition: "flex-grow .6s cubic-bezier(.2,.8,.2,1)"
1533
1533
  }), r = i.radiusFull, o = s(3);
1534
1534
  return {
@@ -1581,130 +1581,135 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1581
1581
  backgroundColor: i.track
1582
1582
  })
1583
1583
  };
1584
- }, W = { d: ln(tt), m: ln(nt) }, Ge = ({
1584
+ }, W = { d: cn(tt), m: cn(nt) }, Ue = ({
1585
1585
  layout: t,
1586
1586
  label: n,
1587
1587
  colours: e,
1588
1588
  shares: r,
1589
1589
  percents: o,
1590
- ended: l,
1590
+ ended: a,
1591
1591
  splitLabel: u
1592
1592
  }) => {
1593
1593
  if (o.some((p) => p === null))
1594
1594
  return /* @__PURE__ */ b("div", { css: W[t].root, children: [
1595
1595
  /* @__PURE__ */ b("div", { css: W[t].lock, children: [
1596
- /* @__PURE__ */ a(te, { css: W[t].lockIcon }),
1597
- /* @__PURE__ */ a("span", { children: n("voteToSeeResults") })
1596
+ /* @__PURE__ */ l(ee, { css: W[t].lockIcon }),
1597
+ /* @__PURE__ */ l("span", { children: n("voteToSeeResults") })
1598
1598
  ] }),
1599
- /* @__PURE__ */ a("div", { css: W[t].track, "aria-hidden": "true" })
1599
+ /* @__PURE__ */ l("div", { css: W[t].track, "aria-hidden": "true" })
1600
1600
  ] });
1601
1601
  const m = r.length, c = r.every((p) => p === 0) ? r.map(() => 1) : r, f = m - 1;
1602
1602
  return /* @__PURE__ */ b("div", { css: W[t].root, children: [
1603
1603
  m === 2 ? /* @__PURE__ */ b("div", { css: W[t].labels, children: [
1604
- /* @__PURE__ */ a("div", { css: W[t].pct, style: _(e[0]), children: o[0] }),
1605
- l && /* @__PURE__ */ a("div", { css: W[t].caption, children: n("finalResult") }),
1606
- /* @__PURE__ */ a("div", { css: W[t].pctEnd, style: _(e[1]), children: o[1] })
1607
- ] }) : /* @__PURE__ */ a("div", { css: W[t].labels, children: o.map((p, h) => /* @__PURE__ */ a(
1604
+ /* @__PURE__ */ l("div", { css: W[t].pct, style: _(e[0]), children: o[0] }),
1605
+ a && /* @__PURE__ */ l("div", { css: W[t].caption, children: n("finalResult") }),
1606
+ /* @__PURE__ */ l("div", { css: W[t].pctEnd, style: _(e[1]), children: o[1] })
1607
+ ] }) : /* @__PURE__ */ l("div", { css: W[t].labels, children: o.map((p, g) => /* @__PURE__ */ l(
1608
1608
  "div",
1609
1609
  {
1610
1610
  css: W[t].cell,
1611
- style: { ..._(e[h]), flex: `${c[h]} 1 0%` },
1611
+ style: { ..._(e[g]), flex: `${c[g]} 1 0%` },
1612
1612
  children: p
1613
1613
  },
1614
- h
1614
+ g
1615
1615
  )) }),
1616
- /* @__PURE__ */ a(
1616
+ /* @__PURE__ */ l(
1617
1617
  "div",
1618
1618
  {
1619
1619
  css: W[t].bar,
1620
1620
  role: "img",
1621
1621
  "aria-label": u ?? void 0,
1622
- children: e.map((p, h) => /* @__PURE__ */ a(
1622
+ children: e.map((p, g) => /* @__PURE__ */ l(
1623
1623
  "div",
1624
1624
  {
1625
- css: h === 0 ? W[t].segFirst : h === f ? W[t].segLast : W[t].segMid,
1626
- style: { ..._(p), flex: `${c[h]} 1 0%` }
1625
+ css: g === 0 ? W[t].segFirst : g === f ? W[t].segLast : W[t].segMid,
1626
+ style: { ..._(p), flex: `${c[g]} 1 0%` }
1627
1627
  },
1628
- h
1628
+ g
1629
1629
  ))
1630
1630
  }
1631
1631
  )
1632
1632
  ] });
1633
- }, qe = { d: s(90), m: s(120) }, vn = { d: s(tt.arenaFill), m: s(nt.arenaFill) }, Ue = { d: s(tt.arenaBar), m: s(nt.arenaBar) }, Ye = ({ layout: t, fill: n, odds: e }) => /* @__PURE__ */ b("div", { css: y[t].root, "aria-busy": "true", children: [
1633
+ }, Ye = { d: s(90), m: s(120) }, $n = { d: s(tt.arenaFill), m: s(nt.arenaFill) }, Xe = { d: s(tt.arenaBar), m: s(nt.arenaBar) }, Ke = ({ layout: t, fill: n, odds: e, banner: r }) => /* @__PURE__ */ b("div", { css: y[t].root, "aria-busy": "true", children: [
1634
+ r,
1634
1635
  /* @__PURE__ */ b("div", { css: y[t].body, children: [
1635
- /* @__PURE__ */ a("div", { css: y[t].header, style: { minHeight: qe[t] }, children: /* @__PURE__ */ a("div", { css: y[t].titleSkeleton }) }),
1636
- n ? /* @__PURE__ */ a(
1636
+ /* @__PURE__ */ l("div", { css: y[t].header, style: { minHeight: Ye[t] }, children: /* @__PURE__ */ l("div", { css: y[t].titleSkeleton }) }),
1637
+ n ? /* @__PURE__ */ l(
1637
1638
  "div",
1638
1639
  {
1639
1640
  css: y[t].arenaSkeleton,
1640
- style: { height: vn[t] }
1641
+ style: { height: $n[t] }
1641
1642
  }
1642
- ) : /* @__PURE__ */ b(Ot, { children: [
1643
- /* @__PURE__ */ a(
1643
+ ) : /* @__PURE__ */ b(Pt, { children: [
1644
+ /* @__PURE__ */ l(
1644
1645
  "div",
1645
1646
  {
1646
1647
  css: y[t].arenaSkeleton,
1647
- style: { height: Ue[t] }
1648
+ style: { height: Xe[t] }
1648
1649
  }
1649
1650
  ),
1650
- /* @__PURE__ */ a("div", { css: y[t].resultsSkeleton, children: /* @__PURE__ */ a("div", { css: y[t].barSkeleton }) })
1651
+ /* @__PURE__ */ l("div", { css: y[t].resultsSkeleton, children: /* @__PURE__ */ l("div", { css: y[t].barSkeleton }) })
1651
1652
  ] })
1652
1653
  ] }),
1653
- e && /* @__PURE__ */ a("div", { css: y[t].oddsSlot, children: /* @__PURE__ */ a(fn, { size: t === "m" ? "dense" : "default" }) })
1654
- ] }), Xe = ({
1654
+ e && /* @__PURE__ */ l("div", { css: y[t].oddsSlot, children: /* @__PURE__ */ l(gn, { size: t === "m" ? "dense" : "default" }) })
1655
+ ] }), Je = ({
1655
1656
  layout: t,
1656
1657
  label: n,
1657
1658
  kind: e,
1658
- onRetry: r
1659
+ onRetry: r,
1660
+ banner: o
1659
1661
  }) => {
1660
- const { t: o } = bt("common"), l = e === "notFound" ? n("notAvailableTitle") : o("common.error.title"), u = e === "notFound" ? n("notAvailableMessage") : o("common.error.message");
1661
- return /* @__PURE__ */ a("div", { css: y[t].root, children: /* @__PURE__ */ b("div", { css: y[t].body, children: [
1662
- /* @__PURE__ */ a("div", { css: y[t].header, children: /* @__PURE__ */ a("h2", { css: y[t].title, children: n("title") }) }),
1663
- /* @__PURE__ */ b(
1664
- "div",
1665
- {
1666
- css: y[t].message,
1667
- style: { minHeight: vn[t] },
1668
- role: "alert",
1669
- children: [
1670
- /* @__PURE__ */ a("h3", { css: y[t].messageTitle, children: l }),
1671
- /* @__PURE__ */ a("p", { css: y[t].messageText, children: u }),
1672
- e === "error" && /* @__PURE__ */ a("button", { type: "button", css: y[t].retry, onClick: r, children: o("common.retry") })
1673
- ]
1674
- }
1675
- )
1676
- ] }) });
1677
- }, cn = (t, n, e) => {
1678
- const r = We(t);
1679
- return t.map((o, l) => Fe(r, l, n, e));
1680
- }, Ke = (t) => {
1681
- var zt, At, Vt, _t, Ht, jt, Gt;
1662
+ const { t: a } = bt("common"), u = e === "notFound" ? n("notAvailableTitle") : a("common.error.title"), m = e === "notFound" ? n("notAvailableMessage") : a("common.error.message");
1663
+ return /* @__PURE__ */ b("div", { css: y[t].root, children: [
1664
+ o,
1665
+ /* @__PURE__ */ b("div", { css: y[t].body, children: [
1666
+ /* @__PURE__ */ l("div", { css: y[t].header, children: /* @__PURE__ */ l("h2", { css: y[t].title, children: n("title") }) }),
1667
+ /* @__PURE__ */ b(
1668
+ "div",
1669
+ {
1670
+ css: y[t].message,
1671
+ style: { minHeight: $n[t] },
1672
+ role: "alert",
1673
+ children: [
1674
+ /* @__PURE__ */ l("h3", { css: y[t].messageTitle, children: u }),
1675
+ /* @__PURE__ */ l("p", { css: y[t].messageText, children: m }),
1676
+ e === "error" && /* @__PURE__ */ l("button", { type: "button", css: y[t].retry, onClick: r, children: a("common.retry") })
1677
+ ]
1678
+ }
1679
+ )
1680
+ ] })
1681
+ ] });
1682
+ }, dn = (t, n, e) => {
1683
+ const r = Fe(t);
1684
+ return t.map((o, a) => Oe(r, a, n, e));
1685
+ }, Qe = (t) => {
1686
+ var At, Vt, _t, Ht, jt, Gt, qt;
1682
1687
  const {
1683
1688
  sdk: n,
1684
1689
  language: e,
1685
1690
  progressDisplay: r = "bar",
1686
1691
  showResultsBeforeVote: o = !0,
1687
- showTrophy: l = !0,
1692
+ showTrophy: a = !0,
1688
1693
  trophyPosition: u = "bottom-right",
1689
1694
  showOdds: m = !1,
1690
1695
  odds: c
1691
- } = t, { t: f } = bt("common"), p = xe(t.labels), h = Un() ? "m" : "d", F = h === "m" ? nt : tt, B = Pt(), X = mn(), T = Yn(), U = r === "background", $ = ye({
1696
+ } = t, { t: f } = bt("common"), p = Se(t.labels), g = Xn() ? "m" : "d", F = g === "m" ? nt : tt, B = Tt(), X = fn(), T = Kn(), U = r === "background", $ = ke({
1692
1697
  entityId: t.entityId,
1693
1698
  sdk: n,
1694
1699
  language: e,
1695
1700
  userIsLoggedIn: t.userIsLoggedIn,
1696
1701
  callbacks: t.callbacks
1697
- }), { sides: S, votes: it, poll: E, startMs: z, endMs: L } = $, [O, st] = A(!1), [H, C] = A(null), x = z !== null ? z + Kt : null, M = ke(
1702
+ }), { sides: S, votes: it, poll: E, startMs: z, endMs: L } = $, [O, st] = A(!1), [H, C] = A(null), x = z !== null ? z + Jt : null, M = Ie(
1698
1703
  x !== null && L !== null ? Math.max(x, L) : x ?? L
1699
- ), v = (E == null ? void 0 : E.status) === "INACTIVE" && z !== null && M < z + Kt && (L === null || z < L), w = v && M >= (z ?? 0), N = L !== null && M >= L, D = !!E && !v && (E.status !== "ACTIVE" || N), { refresh: P } = $;
1700
- ht(() => {
1704
+ ), v = (E == null ? void 0 : E.status) === "INACTIVE" && z !== null && M < z + Jt && (L === null || z < L), w = v && M >= (z ?? 0), N = L !== null && M >= L, D = !!E && !v && (E.status !== "ACTIVE" || N), { refresh: P } = $;
1705
+ gt(() => {
1701
1706
  if (!w) return;
1702
1707
  P();
1703
- const k = setInterval(P, se);
1708
+ const k = setInterval(P, le);
1704
1709
  return () => clearInterval(k);
1705
1710
  }, [w, P]);
1706
- const et = un(!1);
1707
- ht(() => {
1711
+ const et = pn(!1);
1712
+ gt(() => {
1708
1713
  E && (N ? et.current && (et.current = !1, P()) : et.current = !0);
1709
1714
  }, [E, N, P]);
1710
1715
  const at = q(
@@ -1718,14 +1723,14 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1718
1723
  extras: [
1719
1724
  (k = T.palette.success) == null ? void 0 : k.plainColor,
1720
1725
  (G = T.palette.warning) == null ? void 0 : G.plainColor
1721
- ].filter((Bn) => !!Bn)
1726
+ ].filter((zn) => !!zn)
1722
1727
  };
1723
1728
  },
1724
1729
  [T]
1725
- ), Lt = q(() => S.map((k) => k.brand), [S]), yt = q(() => ve(Lt, at), [Lt, at]), $n = gn(
1726
- ((zt = T.palette.warning) == null ? void 0 : zt.plainColor) ?? at.primary,
1730
+ ), Mt = q(() => S.map((k) => k.brand), [S]), yt = q(() => Ce(Mt, at), [Mt, at]), Cn = bn(
1731
+ ((At = T.palette.warning) == null ? void 0 : At.plainColor) ?? at.primary,
1727
1732
  at
1728
- ), K = c == null ? void 0 : c.eventId, xt = m && !!K && S.length === 2 && S.every((k) => k.kind === "team"), Cn = m && !!K, { odds: wn, loading: Wn } = Kn(
1733
+ ), K = c == null ? void 0 : c.eventId, xt = m && !!K && S.length === 2 && S.every((k) => k.kind === "team"), wn = m && !!K, { odds: Wn, loading: Rn } = Qn(
1729
1734
  n,
1730
1735
  xt && K ? [K] : [],
1731
1736
  {
@@ -1737,58 +1742,76 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1737
1742
  affiliateId: c == null ? void 0 : c.affiliateId,
1738
1743
  affiliateIds: c == null ? void 0 : c.affiliateIds
1739
1744
  }
1740
- ), Mt = K ? wn.get(K) : void 0, Rn = q(
1745
+ ), Nt = K ? Wn.get(K) : void 0, Fn = q(
1741
1746
  () => new Intl.NumberFormat(X, {
1742
1747
  style: "percent",
1743
1748
  maximumFractionDigits: 0
1744
1749
  }),
1745
1750
  [X]
1746
- );
1751
+ ), kt = t.brandedAreaImage ? /* @__PURE__ */ l(
1752
+ Vn,
1753
+ {
1754
+ backgroundImage: t.brandedAreaImage,
1755
+ link: t.brandedAreaLink,
1756
+ height: "150px",
1757
+ minHeight: "120px"
1758
+ }
1759
+ ) : null;
1747
1760
  if ($.status === "loading")
1748
- return /* @__PURE__ */ a(Ye, { layout: h, fill: U, odds: Cn });
1761
+ return /* @__PURE__ */ l(
1762
+ Ke,
1763
+ {
1764
+ layout: g,
1765
+ fill: U,
1766
+ odds: wn,
1767
+ banner: kt
1768
+ }
1769
+ );
1749
1770
  if ($.status !== "ready" || !E)
1750
- return /* @__PURE__ */ a(
1751
- Xe,
1771
+ return /* @__PURE__ */ l(
1772
+ Je,
1752
1773
  {
1753
- layout: h,
1774
+ layout: g,
1754
1775
  label: p,
1755
1776
  kind: $.status === "notFound" ? "notFound" : "error",
1756
- onRetry: $.retry
1777
+ onRetry: $.retry,
1778
+ banner: kt
1757
1779
  }
1758
1780
  );
1759
- const lt = me(it), ct = D ? fe(it) : null, Fn = D && ct === null, J = S.findIndex(
1781
+ const lt = ge(it), ct = D ? he(it) : null, En = D && ct === null, J = S.findIndex(
1760
1782
  (k) => k.optionId === $.votedOptionId
1761
- ), kt = D || o || J >= 0, St = lt.map(
1762
- (k) => kt ? Rn.format(k / 100) : null
1763
- ), En = h === "m" && S.length > 2, Nt = S.map(() => 100 / S.length), Dt = ct !== null ? we(lt, ct, U, h === "m") : U && kt ? Ce(lt, h === "m") : Nt, On = S.map((k, G) => D || J < 0 || J === G), Pn = S.map((k, G) => v ? "upcoming" : J === G ? "chosen" : J >= 0 ? "locked" : $.signInRequired ? "signIn" : $.submitting ? "submitting" : "open"), It = E.authRequirement === "LEAD" && !O && !D && !v && J < 0 ? (At = t.leads) == null ? void 0 : At.position : void 0, Tn = It === "before" || It === "after" && H !== null, Ln = (k) => {
1764
- It === "after" ? C(k) : $.vote(S[k].optionId);
1765
- }, Mn = async () => {
1783
+ ), St = D || o || J >= 0, It = lt.map(
1784
+ (k) => St ? Fn.format(k / 100) : null
1785
+ ), On = g === "m" && S.length > 2, Dt = S.map(() => 100 / S.length), Bt = ct !== null ? Re(lt, ct, U, g === "m") : U && St ? We(lt, g === "m") : Dt, Pn = S.map((k, G) => D || J < 0 || J === G), Tn = S.map((k, G) => v ? "upcoming" : J === G ? "chosen" : J >= 0 ? "locked" : $.signInRequired ? "signIn" : $.submitting ? "submitting" : "open"), vt = E.authRequirement === "LEAD" && !O && !D && !v && J < 0 ? (Vt = t.leads) == null ? void 0 : Vt.position : void 0, Ln = vt === "before" || vt === "after" && H !== null, Mn = (k) => {
1786
+ vt === "after" ? C(k) : $.vote(S[k].optionId);
1787
+ }, Nn = async () => {
1766
1788
  st(!0), H !== null && (await $.vote(S[H].optionId), C(null));
1767
- }, Bt = kt ? `${p("voteSplit")}: ${S.map((k, G) => `${k.name} ${St[G]}`).join(", ")}` : null, Nn = S.every((k) => k.kind === "player"), Dn = v ? w || z === null ? null : Zt(z, M) : L !== null && !D ? Zt(L, M) : null;
1789
+ }, zt = St ? `${p("voteSplit")}: ${S.map((k, G) => `${k.name} ${It[G]}`).join(", ")}` : null, Dn = S.every((k) => k.kind === "player"), Bn = v ? w || z === null ? null : tn(z, M) : L !== null && !D ? tn(L, M) : null;
1768
1790
  return /* @__PURE__ */ b(
1769
1791
  "div",
1770
1792
  {
1771
- css: y[h].root,
1772
- style: { "--bof-trophy-on": $n },
1793
+ css: y[g].root,
1794
+ style: { "--bof-trophy-on": Cn },
1773
1795
  children: [
1774
- /* @__PURE__ */ b("div", { css: y[h].body, children: [
1775
- /* @__PURE__ */ a(
1776
- _e,
1796
+ kt,
1797
+ /* @__PURE__ */ b("div", { css: y[g].body, children: [
1798
+ /* @__PURE__ */ l(
1799
+ je,
1777
1800
  {
1778
- layout: h,
1801
+ layout: g,
1779
1802
  label: p,
1780
- title: ((_t = (Vt = t.labels) == null ? void 0 : Vt.title) == null ? void 0 : _t.trim()) || ((Ht = E.title) == null ? void 0 : Ht.trim()) || p("title"),
1781
- openSubtitle: ((Gt = (jt = t.labels) == null ? void 0 : jt.subtitle) == null ? void 0 : Gt.trim()) || Xn(E.description ?? null).trim() || p(Nn ? "subtitlePlayers" : "subtitleTeams"),
1803
+ title: ((Ht = (_t = t.labels) == null ? void 0 : _t.title) == null ? void 0 : Ht.trim()) || ((jt = E.title) == null ? void 0 : jt.trim()) || p("title"),
1804
+ openSubtitle: ((qt = (Gt = t.labels) == null ? void 0 : Gt.subtitle) == null ? void 0 : qt.trim()) || Jn(E.description ?? null).trim() || p(Dn ? "subtitlePlayers" : "subtitleTeams"),
1782
1805
  ended: D,
1783
- draw: Fn,
1806
+ draw: En,
1784
1807
  upcoming: v,
1785
- left: Dn
1808
+ left: Bn
1786
1809
  }
1787
1810
  ),
1788
- Tn && t.leads ? /* @__PURE__ */ a(
1789
- je,
1811
+ Ln && t.leads ? /* @__PURE__ */ l(
1812
+ qe,
1790
1813
  {
1791
- layout: h,
1814
+ layout: g,
1792
1815
  sdk: n,
1793
1816
  poll: E,
1794
1817
  leads: t.leads,
@@ -1797,64 +1820,64 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1797
1820
  picked: H,
1798
1821
  language: e,
1799
1822
  continueLabel: H !== null ? p("voteFor", { name: S[H].name }) : f("poll.buttons.continue"),
1800
- onContinue: Mn,
1823
+ onContinue: Nn,
1801
1824
  submitting: $.submitting
1802
1825
  }
1803
- ) : /* @__PURE__ */ b(Ot, { children: [
1804
- /* @__PURE__ */ a(
1805
- Ae,
1826
+ ) : /* @__PURE__ */ b(Pt, { children: [
1827
+ /* @__PURE__ */ l(
1828
+ _e,
1806
1829
  {
1807
1830
  view: {
1808
- layout: h,
1831
+ layout: g,
1809
1832
  fill: U,
1810
- rows: En,
1833
+ rows: On,
1811
1834
  sides: S,
1812
1835
  colours: yt,
1813
- percents: St,
1836
+ percents: It,
1814
1837
  ended: D,
1815
1838
  winner: ct,
1816
- lit: On,
1817
- widths: Dt,
1818
- clips: cn(Dt, F.slant, B),
1839
+ lit: Pn,
1840
+ widths: Bt,
1841
+ clips: dn(Bt, F.slant, B),
1819
1842
  slant: F.slant,
1820
- evenClips: cn(Nt, F.slant, B),
1821
- actions: Pn,
1822
- showTrophy: l,
1843
+ evenClips: dn(Dt, F.slant, B),
1844
+ actions: Tn,
1845
+ showTrophy: a,
1823
1846
  trophyPosition: u,
1824
1847
  language: e,
1825
1848
  label: p,
1826
- splitLabel: Bt,
1849
+ splitLabel: zt,
1827
1850
  signInCTA: t.signInCTA,
1828
- onVote: Ln
1851
+ onVote: Mn
1829
1852
  }
1830
1853
  }
1831
1854
  ),
1832
- !U && /* @__PURE__ */ a(
1833
- Ge,
1855
+ !U && /* @__PURE__ */ l(
1856
+ Ue,
1834
1857
  {
1835
- layout: h,
1858
+ layout: g,
1836
1859
  label: p,
1837
1860
  colours: yt,
1838
1861
  shares: lt,
1839
- percents: St,
1862
+ percents: It,
1840
1863
  ended: D,
1841
- splitLabel: Bt
1864
+ splitLabel: zt
1842
1865
  }
1843
1866
  )
1844
1867
  ] })
1845
1868
  ] }),
1846
- Mt ? /* @__PURE__ */ a(
1847
- Jn,
1869
+ Nt ? /* @__PURE__ */ l(
1870
+ Zn,
1848
1871
  {
1849
- odds: Mt,
1872
+ odds: Nt,
1850
1873
  market: (c == null ? void 0 : c.market) ?? "FT_1X2",
1851
- size: h === "m" ? "dense" : "default",
1874
+ size: g === "m" ? "dense" : "default",
1852
1875
  mode: c == null ? void 0 : c.mode,
1853
1876
  flashInterval: c == null ? void 0 : c.flashInterval
1854
1877
  }
1855
- ) : xt && Wn && /* @__PURE__ */ a("div", { css: y[h].oddsSlot, children: /* @__PURE__ */ a(fn, { size: h === "m" ? "dense" : "default" }) }),
1856
- /* @__PURE__ */ a(
1857
- An,
1878
+ ) : xt && Rn && /* @__PURE__ */ l("div", { css: y[g].oddsSlot, children: /* @__PURE__ */ l(gn, { size: g === "m" ? "dense" : "default" }) }),
1879
+ /* @__PURE__ */ l(
1880
+ _n,
1858
1881
  {
1859
1882
  notification: {
1860
1883
  open: !!$.voteError,
@@ -1868,20 +1891,20 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1868
1891
  ]
1869
1892
  }
1870
1893
  );
1871
- }, Je = (t) => {
1894
+ }, Ze = (t) => {
1872
1895
  var n;
1873
- return /* @__PURE__ */ a(
1874
- Vn,
1896
+ return /* @__PURE__ */ l(
1897
+ Hn,
1875
1898
  {
1876
1899
  packageName: "battle-of-fans",
1877
1900
  language: t.language,
1878
1901
  themeOptions: t.themeOptions,
1879
1902
  disableCache: t.disableCache,
1880
1903
  leadPhoneCountryCode: (n = t.leads) == null ? void 0 : n.phoneCountryCode,
1881
- children: /* @__PURE__ */ a(Ke, { ...t })
1904
+ children: /* @__PURE__ */ l(Qe, { ...t })
1882
1905
  }
1883
1906
  );
1884
- }, lo = ne(Je);
1907
+ }, uo = oe(Ze);
1885
1908
  export {
1886
- lo as BattleOfFans
1909
+ uo as BattleOfFans
1887
1910
  };