fansunited-frontend-components 0.0.98 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Betslip.js +2 -2
- package/ChanceGame.js +952 -1467
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +405 -1163
- package/CompetitionStatistics.js +2042 -2215
- package/CompetitorCard.js +4251 -5085
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +6062 -7544
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +556 -849
- package/List.js +689 -718
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +50 -42
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +925 -1824
- package/PlayerOfTheMatch.js +2106 -2207
- package/PollVote.js +2 -2
- package/Predictor.js +4208 -18675
- package/README.md +1 -1
- package/Standings.js +1014 -1336
- package/TopX.js +3223 -17005
- package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-z8XYzgDW.js} +2 -2
- package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
- package/chunks/PickOneOfX-IvE4OvyT.js +3146 -0
- package/chunks/index-BNl8scz6.js +4 -0
- package/chunks/index-CSa2JU4m.js +4 -0
- package/chunks/index-CVRI82Gb.js +4 -0
- package/chunks/index-Cd1dg0KI.js +4 -0
- package/chunks/index-Cei2fzi7.js +4 -0
- package/chunks/index-Cxb4wEJU.js +4 -0
- package/chunks/index-w1LGN5dz.js +4 -0
- package/chunks/main-07vzblS8.js +2091 -0
- package/chunks/main-C7X4dM_P.js +4827 -0
- package/chunks/main-D_QDfmAw.js +6417 -0
- package/chunks/main-DdL0UekL.js +4775 -0
- package/chunks/main-DmBfwyb4.js +2992 -0
- package/chunks/main-LEE8n2cG.js +3117 -0
- package/chunks/main-P2WNvBZE.js +1804 -0
- package/chunks/main-gV165E-A.js +1928 -0
- package/chunks/predictionsHelpers-fwXaMadu.js +10063 -0
- package/chunks/{withVersionStamp-T8seRk9h.js → withVersionStamp-CPDfSE5H.js} +1 -1
- package/package.json +2 -6
- package/withVersionStamp.d.ts.map +1 -1
- package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
- package/chunks/OddsStrip-BnSp5TXa.js +0 -383
- package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
- package/chunks/chevron-left-CxfCSZcr.js +0 -13
- package/chunks/chevron-right-BEQMacFn.js +0 -13
- package/chunks/chevrons-right-CXSpQt9w.js +0 -25
- package/chunks/createLucideIcon-YBRjY5Kl.js +0 -79
- package/chunks/index-Aq5MbUB9.js +0 -4
- package/chunks/index-BBQm_8LD.js +0 -4
- package/chunks/index-BC_sWWgc.js +0 -4
- package/chunks/index-DXKDJ1Vp.js +0 -4
- package/chunks/index-DjT5NrbA.js +0 -4
- package/chunks/index-DvLRehH6.js +0 -4
- package/chunks/index-aIMaxR-p.js +0 -4
- package/chunks/main-52Wff7qC.js +0 -11441
- package/chunks/main-65WcUqAl.js +0 -4013
- package/chunks/main-B58mi9jx.js +0 -5622
- package/chunks/main-BIdXUTZS.js +0 -7308
- package/chunks/main-DD-NEzC7.js +0 -8241
- package/chunks/main-DUnfJPzY.js +0 -3608
- package/chunks/main-DpCBqqg_.js +0 -1950
- package/chunks/main-Drznt1ak.js +0 -1790
- package/chunks/users-wbJRbqW8.js +0 -16
- package/chunks/x-CK4GYo7T.js +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fansunited-frontend-components",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Various user centric components for Fans United features",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -102,11 +102,7 @@
|
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"@emotion/cache": "^11.13.1",
|
|
104
104
|
"@emotion/react": "^11.13.3",
|
|
105
|
-
"
|
|
106
|
-
"@mui/icons-material": "^6.1.6",
|
|
107
|
-
"@mui/joy": "^5.0.0-beta.52",
|
|
108
|
-
"@mui/material": "^6.1.6",
|
|
109
|
-
"fansunited-frontend-core": "0.0.98",
|
|
105
|
+
"fansunited-frontend-core": "1.0.0",
|
|
110
106
|
"i18next": "^25.2.1",
|
|
111
107
|
"i18next-browser-languagedetector": "^8.1.0",
|
|
112
108
|
"react-i18next": "^15.5.2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withVersionStamp.d.ts","sourceRoot":"","sources":["../../src/withVersionStamp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"withVersionStamp.d.ts","sourceRoot":"","sources":["../../src/withVersionStamp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,aACpC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAChC,KAAK,CAAC,EAAE,CAAC,CAAC,CAOZ,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Box as r } from "@mui/joy";
|
|
3
|
-
import { u as d } from "./OddsStrip-BnSp5TXa.js";
|
|
4
|
-
const i = { default: "2em", dense: "1.75em", compact: "1.625em" }, m = ({ size: e = "default" }) => {
|
|
5
|
-
const { colors: o, radius: s } = d();
|
|
6
|
-
return /* @__PURE__ */ t(
|
|
7
|
-
r,
|
|
8
|
-
{
|
|
9
|
-
"aria-hidden": !0,
|
|
10
|
-
sx: {
|
|
11
|
-
fontSize: "1em",
|
|
12
|
-
height: i[e],
|
|
13
|
-
borderRadius: s.xs,
|
|
14
|
-
backgroundColor: o.skeleton,
|
|
15
|
-
animation: "fuOddsPulse 1.5s ease-in-out infinite",
|
|
16
|
-
"@keyframes fuOddsPulse": {
|
|
17
|
-
"0%, 100%": { opacity: 1 },
|
|
18
|
-
"50%": { opacity: 0.4 }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
m as O
|
|
26
|
-
};
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
import v, { useState as W, useRef as $, useEffect as j } from "react";
|
|
2
|
-
import { OddFormatEnum as H } from "fansunited-sdk-esm/enums";
|
|
3
|
-
import { jsx as S, jsxs as F, Fragment as K } from "react/jsx-runtime";
|
|
4
|
-
import { Box as x, Typography as B } from "@mui/joy";
|
|
5
|
-
import { useTranslation as z } from "react-i18next";
|
|
6
|
-
import { useColors as Y, useFontFamily as J, useCornerRadius as Z, hexToRgb as q, BidiIsolate as Q } from "fansunited-frontend-core";
|
|
7
|
-
const ee = [
|
|
8
|
-
"FT_1X2",
|
|
9
|
-
"HT_1X2",
|
|
10
|
-
"BOTH_TEAMS_SCORE",
|
|
11
|
-
"OVER_GOALS_0_5",
|
|
12
|
-
"OVER_GOALS_1_5",
|
|
13
|
-
"OVER_GOALS_2_5",
|
|
14
|
-
"OVER_GOALS_3_5",
|
|
15
|
-
"OVER_GOALS_4_5",
|
|
16
|
-
"OVER_GOALS_5_5",
|
|
17
|
-
"OVER_GOALS_6_5",
|
|
18
|
-
"OVER_CORNERS_6_5",
|
|
19
|
-
"OVER_CORNERS_7_5",
|
|
20
|
-
"OVER_CORNERS_8_5",
|
|
21
|
-
"OVER_CORNERS_9_5",
|
|
22
|
-
"OVER_CORNERS_10_5",
|
|
23
|
-
"OVER_CORNERS_11_5",
|
|
24
|
-
"OVER_CORNERS_12_5",
|
|
25
|
-
"OVER_CORNERS_13_5"
|
|
26
|
-
], w = "WINNER_OT", re = /* @__PURE__ */ new Set(["FOOTBALL", "HOCKEY", "ICE_HOCKEY"]), P = /^OVER_(GOALS|CORNERS)_(\d+)_(\d+)$/, he = (e) => typeof e == "string" && ee.includes(e), V = (e) => e === "FT_1X2" || e === "HT_1X2" ? ["1", "X", "2"] : e === w ? ["1", "2"] : e === "BOTH_TEAMS_SCORE" ? ["YES", "NO"] : P.test(e) ? ["OVER", "UNDER"] : [], te = (e) => {
|
|
27
|
-
const r = e.match(P);
|
|
28
|
-
return r ? `${r[2]}.${r[3]}` : null;
|
|
29
|
-
}, X = (e, r) => e !== "FT_1X2" ? [e] : !!r && !re.has(r.toUpperCase()) ? [w, "FT_1X2"] : ["FT_1X2", w], ne = (e, r, o) => {
|
|
30
|
-
const n = (r || o || "").trim().toUpperCase();
|
|
31
|
-
return n ? e === "FT_1X2" || e === "HT_1X2" || e === w ? n === "1" || n === "HOME" || n === "HOME_TEAM" ? "1" : n === "X" || n === "DRAW" ? e === w ? null : "X" : n === "2" || n === "AWAY" || n === "AWAY_TEAM" ? "2" : null : V(e).includes(n) ? n : null : null;
|
|
32
|
-
}, Se = (e, r) => {
|
|
33
|
-
if (r == null || r === "") return null;
|
|
34
|
-
const o = V(e);
|
|
35
|
-
if (o.includes("X")) {
|
|
36
|
-
const s = String(r).toUpperCase();
|
|
37
|
-
return o.includes(s) ? s : null;
|
|
38
|
-
}
|
|
39
|
-
const n = typeof r == "boolean" ? r : ["YES", "TRUE"].includes(String(r).toUpperCase()) ? !0 : ["NO", "FALSE"].includes(String(r).toUpperCase()) ? !1 : null;
|
|
40
|
-
return n === null || o.length !== 2 ? null : n ? o[0] : o[1];
|
|
41
|
-
}, xe = (e) => {
|
|
42
|
-
if (typeof e != "string") return null;
|
|
43
|
-
const [r, o] = e.split(":").map((n) => parseInt(n, 10));
|
|
44
|
-
return Number.isNaN(r) || Number.isNaN(o) ? null : r > o ? "1" : r < o ? "2" : "X";
|
|
45
|
-
}, D = (e, r) => `${e}:${r}`, G = (e) => {
|
|
46
|
-
var n;
|
|
47
|
-
if (!Array.isArray(e)) return null;
|
|
48
|
-
const r = e.filter((s) => typeof (s == null ? void 0 : s.url) == "string" && s.url);
|
|
49
|
-
return ((n = r.find((s) => `${s.appType ?? ""}`.toUpperCase() === "DESKTOP") ?? r[0]) == null ? void 0 : n.url) ?? null;
|
|
50
|
-
}, oe = (e) => {
|
|
51
|
-
var o, n;
|
|
52
|
-
if (!e) return null;
|
|
53
|
-
const r = (e.assets ?? [])[0];
|
|
54
|
-
return {
|
|
55
|
-
id: e.id ?? "",
|
|
56
|
-
name: e.name ?? "",
|
|
57
|
-
logo: (r == null ? void 0 : r.transparentBackgroundUrl) || (r == null ? void 0 : r.logo) || null,
|
|
58
|
-
url: G(e.eventUrls) ?? e.url ?? null,
|
|
59
|
-
backgroundColor: ((o = e.branding) == null ? void 0 : o.backgroundColor) ?? (r == null ? void 0 : r.backgroundColor) ?? null,
|
|
60
|
-
textColor: ((n = e.branding) == null ? void 0 : n.textColor) ?? null
|
|
61
|
-
};
|
|
62
|
-
}, ie = (e, r, o, n) => {
|
|
63
|
-
const s = V(r), p = [];
|
|
64
|
-
return ((e == null ? void 0 : e.selections) ?? []).forEach((i) => {
|
|
65
|
-
const c = ne(r, i == null ? void 0 : i.code, i == null ? void 0 : i.name);
|
|
66
|
-
if (!c) return;
|
|
67
|
-
const u = Number(i == null ? void 0 : i.odds);
|
|
68
|
-
if (!Number.isFinite(u) || u <= 0 || p.some((f) => f.pick === c)) return;
|
|
69
|
-
const t = n == null ? void 0 : n.get(D(o, c)), d = `${(i == null ? void 0 : i.movement) ?? ""}`.toUpperCase(), m = d === "UP" || d === "DOWN" ? d.toLowerCase() : t === void 0 || t === u ? "none" : u > t ? "up" : "down";
|
|
70
|
-
p.push({
|
|
71
|
-
pick: c,
|
|
72
|
-
value: u.toFixed(2),
|
|
73
|
-
odd: u,
|
|
74
|
-
change: m,
|
|
75
|
-
url: G(i == null ? void 0 : i.urls)
|
|
76
|
-
});
|
|
77
|
-
}), s.every((i) => p.some((c) => c.pick === i)) ? (p.sort((i, c) => s.indexOf(i.pick) - s.indexOf(c.pick)), { market: r, values: p }) : null;
|
|
78
|
-
}, ae = (e, r) => {
|
|
79
|
-
const o = {};
|
|
80
|
-
return r.markets.forEach((n) => {
|
|
81
|
-
for (const s of X(n, r.sport)) {
|
|
82
|
-
const p = ((e == null ? void 0 : e.markets) ?? []).find(
|
|
83
|
-
(c) => {
|
|
84
|
-
var u, t;
|
|
85
|
-
return `${((u = c == null ? void 0 : c.type) == null ? void 0 : u.code) || ((t = c == null ? void 0 : c.type) == null ? void 0 : t.id) || ""}`.toUpperCase() === s;
|
|
86
|
-
}
|
|
87
|
-
), i = p ? ie(p, s, n, r.previous) : null;
|
|
88
|
-
if (i) {
|
|
89
|
-
o[n] = i;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}), o;
|
|
94
|
-
}, se = (e, r, o) => {
|
|
95
|
-
var u;
|
|
96
|
-
if (!o.markets.length) return null;
|
|
97
|
-
const n = (t) => {
|
|
98
|
-
var m;
|
|
99
|
-
const d = (o.operators ?? []).indexOf((m = t == null ? void 0 : t.bookmaker) == null ? void 0 : m.id);
|
|
100
|
-
return d === -1 ? Number.MAX_SAFE_INTEGER : d;
|
|
101
|
-
}, p = r.map((t, d) => ({ entry: t, index: d })).sort((t, d) => n(t.entry) - n(d.entry) || t.index - d.index).map(({ entry: t }) => t).map((t) => ({ entry: t, markets: ae(t, o) })), i = o.markets[0], c = p.find((t) => t.markets[i]) ?? p.find((t) => Object.keys(t.markets).length > 0);
|
|
102
|
-
return c ? { eventId: e, operator: oe((u = c.entry) == null ? void 0 : u.bookmaker), markets: c.markets } : null;
|
|
103
|
-
}, ce = (e) => {
|
|
104
|
-
const r = /* @__PURE__ */ new Map();
|
|
105
|
-
return Object.entries(e.markets).forEach(
|
|
106
|
-
([o, n]) => n.values.forEach((s) => r.set(D(o, s.pick), s.odd))
|
|
107
|
-
), r;
|
|
108
|
-
}, de = 3e4, pe = ["FT_1X2"], Re = (e, r, o) => {
|
|
109
|
-
const {
|
|
110
|
-
enabled: n,
|
|
111
|
-
markets: s = pe,
|
|
112
|
-
sport: p,
|
|
113
|
-
pollingIntervalMs: i = de,
|
|
114
|
-
operators: c,
|
|
115
|
-
affiliateId: u,
|
|
116
|
-
affiliateIds: t
|
|
117
|
-
} = o, d = [...new Set(r)].filter(Boolean).sort().join(","), m = s.join(","), f = (c ?? []).join(","), N = `${u ?? ""}|${JSON.stringify(t ?? {})}`, R = n && !!e && !!d && !!m, [T, _] = W({ odds: /* @__PURE__ */ new Map(), loading: R }), O = $(/* @__PURE__ */ new Map());
|
|
118
|
-
return j(() => {
|
|
119
|
-
if (!R || !e) {
|
|
120
|
-
O.current = /* @__PURE__ */ new Map(), _({ odds: /* @__PURE__ */ new Map(), loading: !1 });
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
const A = d.split(","), M = m.split(","), k = f ? f.split(",") : [];
|
|
124
|
-
O.current = new Map(
|
|
125
|
-
[...O.current].filter(([E]) => A.includes(E))
|
|
126
|
-
);
|
|
127
|
-
let h = !1;
|
|
128
|
-
_((E) => ({ odds: E.odds, loading: !0 }));
|
|
129
|
-
const y = async () => {
|
|
130
|
-
try {
|
|
131
|
-
const E = [
|
|
132
|
-
...new Set(M.flatMap((a) => X(a, p)))
|
|
133
|
-
], L = {
|
|
134
|
-
oddFormat: H.DECIMAL,
|
|
135
|
-
marketTypes: E,
|
|
136
|
-
...k.length ? { operators: k } : {},
|
|
137
|
-
...u ? { affiliateId: u } : {},
|
|
138
|
-
...t && Object.keys(t).length ? { affiliateIds: t } : {}
|
|
139
|
-
}, C = await e.odds.getByMatchIds(A, L);
|
|
140
|
-
if (h) return;
|
|
141
|
-
const I = /* @__PURE__ */ new Map();
|
|
142
|
-
A.forEach((a) => {
|
|
143
|
-
const g = se(a, (C == null ? void 0 : C.get(a)) ?? [], {
|
|
144
|
-
markets: M,
|
|
145
|
-
sport: p,
|
|
146
|
-
operators: k,
|
|
147
|
-
previous: O.current.get(a)
|
|
148
|
-
});
|
|
149
|
-
g && (I.set(a, g), O.current.set(a, ce(g)));
|
|
150
|
-
}), _({ odds: I, loading: !1 });
|
|
151
|
-
} catch {
|
|
152
|
-
h || _({ odds: /* @__PURE__ */ new Map(), loading: !1 });
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
y();
|
|
156
|
-
const l = i > 0 ? setInterval(y, i) : null;
|
|
157
|
-
return () => {
|
|
158
|
-
h = !0, l && clearInterval(l);
|
|
159
|
-
};
|
|
160
|
-
}, [R, e, d, m, p, f, N, i]), T;
|
|
161
|
-
}, ue = () => {
|
|
162
|
-
const e = Y(), r = J(), o = Z();
|
|
163
|
-
return {
|
|
164
|
-
fonts: r,
|
|
165
|
-
radius: o,
|
|
166
|
-
colors: {
|
|
167
|
-
surface: e.surface,
|
|
168
|
-
/** Muted fill — the operator box when the operator has no brand colour. */
|
|
169
|
-
inner: e.onSurface,
|
|
170
|
-
text: e.textPrimary,
|
|
171
|
-
// The theme's textSecondary equals textPrimary, so the muted tone is derived.
|
|
172
|
-
dim: `rgba(${q(e.textSecondary)}, 0.62)`,
|
|
173
|
-
border: e.outlineEnabledBorder,
|
|
174
|
-
skeleton: e.surfaceVariant,
|
|
175
|
-
success: e.palette.success.plainColor,
|
|
176
|
-
danger: e.palette.danger.plainColor
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
}, le = 3e3, U = {
|
|
180
|
-
default: { box: "2em", gap: "0.375em", padInline: "0.75em", padBlock: "0.625em", operatorPad: "0.625em", operatorMax: "7em", pricePad: "0.625em", priceGap: "0.375em" },
|
|
181
|
-
dense: { box: "1.75em", gap: "0.3125em", padInline: "0.625em", padBlock: "0.625em", operatorPad: "0.375em", operatorMax: "5.25em", pricePad: "0.4375em", priceGap: "0.25em" },
|
|
182
|
-
compact: { box: "1.625em", gap: "0.375em", padInline: "0.625em", padBlock: "0", operatorPad: "0.625em", operatorMax: "7em", pricePad: "0.5em", priceGap: "0.375em" }
|
|
183
|
-
}, ke = ({
|
|
184
|
-
odds: e,
|
|
185
|
-
market: r,
|
|
186
|
-
size: o = "default",
|
|
187
|
-
mode: n,
|
|
188
|
-
flashInterval: s = le,
|
|
189
|
-
picks: p,
|
|
190
|
-
bare: i = !1,
|
|
191
|
-
inline: c = !1,
|
|
192
|
-
linkPrices: u = !0,
|
|
193
|
-
labels: t,
|
|
194
|
-
onSelect: d
|
|
195
|
-
}) => {
|
|
196
|
-
const { t: m } = z("common"), { colors: f, fonts: N, radius: R } = ue(), T = o === "compact", _ = i ? { ...U[o], gap: "0.3125em", operatorPad: "0.375em", operatorMax: "5.25em", priceGap: "0.25em" } : U[o], O = (n ?? (T ? "flash" : "default")) === "flash", [A, M] = v.useState(!1);
|
|
197
|
-
v.useEffect(() => {
|
|
198
|
-
if (!O) return;
|
|
199
|
-
const a = setInterval(() => M((g) => !g), s);
|
|
200
|
-
return () => clearInterval(a);
|
|
201
|
-
}, [O, s]);
|
|
202
|
-
const k = r ?? Object.keys(e.markets)[0], h = k ? e.markets[k] : void 0;
|
|
203
|
-
if (!h) return null;
|
|
204
|
-
const y = p ? h.values.filter((a) => p.includes(a.pick)) : h.values;
|
|
205
|
-
if (y.length === 0) return null;
|
|
206
|
-
const l = e.operator, E = te(h.market) ?? "", L = (a) => {
|
|
207
|
-
var g, b;
|
|
208
|
-
switch (a) {
|
|
209
|
-
case "YES":
|
|
210
|
-
return (t == null ? void 0 : t.yes) ?? m("odds.yes");
|
|
211
|
-
case "NO":
|
|
212
|
-
return (t == null ? void 0 : t.no) ?? m("odds.no");
|
|
213
|
-
case "OVER":
|
|
214
|
-
return ((g = t == null ? void 0 : t.over) == null ? void 0 : g.replace("{{line}}", E)) ?? m("odds.over", { line: E });
|
|
215
|
-
case "UNDER":
|
|
216
|
-
return ((b = t == null ? void 0 : t.under) == null ? void 0 : b.replace("{{line}}", E)) ?? m("odds.under", { line: E });
|
|
217
|
-
default:
|
|
218
|
-
return a;
|
|
219
|
-
}
|
|
220
|
-
}, C = (a) => l ? /* @__PURE__ */ F(
|
|
221
|
-
x,
|
|
222
|
-
{
|
|
223
|
-
component: l.url ? "a" : "div",
|
|
224
|
-
href: l.url ?? void 0,
|
|
225
|
-
target: l.url ? "_blank" : void 0,
|
|
226
|
-
rel: l.url ? "noopener noreferrer" : void 0,
|
|
227
|
-
sx: {
|
|
228
|
-
display: "flex",
|
|
229
|
-
alignItems: "center",
|
|
230
|
-
justifyContent: "center",
|
|
231
|
-
gap: "0.375em",
|
|
232
|
-
height: _.box,
|
|
233
|
-
paddingInline: _.operatorPad,
|
|
234
|
-
borderRadius: R.xs,
|
|
235
|
-
boxSizing: "border-box",
|
|
236
|
-
textDecoration: "none",
|
|
237
|
-
flexShrink: 0,
|
|
238
|
-
whiteSpace: "nowrap",
|
|
239
|
-
// Brand colours are data, not theme: the box should be recognisably theirs.
|
|
240
|
-
backgroundColor: l.backgroundColor ?? f.inner,
|
|
241
|
-
color: l.textColor ?? f.text,
|
|
242
|
-
...a ? { flex: 1 } : { maxWidth: _.operatorMax, width: c ? "auto" : "100%" }
|
|
243
|
-
},
|
|
244
|
-
children: [
|
|
245
|
-
l.logo ? /* @__PURE__ */ S(
|
|
246
|
-
x,
|
|
247
|
-
{
|
|
248
|
-
component: "img",
|
|
249
|
-
src: l.logo,
|
|
250
|
-
alt: l.name,
|
|
251
|
-
loading: "lazy",
|
|
252
|
-
sx: { height: "100%", maxWidth: "100%", width: "auto", objectFit: "contain" }
|
|
253
|
-
}
|
|
254
|
-
) : /* @__PURE__ */ S(
|
|
255
|
-
B,
|
|
256
|
-
{
|
|
257
|
-
sx: {
|
|
258
|
-
fontFamily: N.primary,
|
|
259
|
-
fontSize: "0.75em",
|
|
260
|
-
fontWeight: 600,
|
|
261
|
-
lineHeight: 1.35,
|
|
262
|
-
color: "inherit",
|
|
263
|
-
whiteSpace: "nowrap",
|
|
264
|
-
unicodeBidi: "plaintext"
|
|
265
|
-
},
|
|
266
|
-
children: l.name
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
T && O ? /* @__PURE__ */ S(
|
|
270
|
-
B,
|
|
271
|
-
{
|
|
272
|
-
sx: {
|
|
273
|
-
fontFamily: N.secondary,
|
|
274
|
-
fontSize: "0.75em",
|
|
275
|
-
fontWeight: 400,
|
|
276
|
-
color: "inherit",
|
|
277
|
-
opacity: 0.85,
|
|
278
|
-
whiteSpace: "nowrap"
|
|
279
|
-
},
|
|
280
|
-
children: `· ${(t == null ? void 0 : t.title) ?? m("odds.title")}`
|
|
281
|
-
}
|
|
282
|
-
) : null
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
) : null, I = (a) => {
|
|
286
|
-
const g = u && !!a.url;
|
|
287
|
-
return /* @__PURE__ */ F(
|
|
288
|
-
x,
|
|
289
|
-
{
|
|
290
|
-
component: g ? "a" : "button",
|
|
291
|
-
type: g ? void 0 : "button",
|
|
292
|
-
href: g ? a.url ?? void 0 : void 0,
|
|
293
|
-
target: g ? "_blank" : void 0,
|
|
294
|
-
rel: g ? "noopener noreferrer" : void 0,
|
|
295
|
-
onClick: () => d == null ? void 0 : d({
|
|
296
|
-
matchId: e.eventId,
|
|
297
|
-
market: h.market,
|
|
298
|
-
pick: a.pick,
|
|
299
|
-
odd: a.odd,
|
|
300
|
-
operatorId: (l == null ? void 0 : l.id) || void 0
|
|
301
|
-
}),
|
|
302
|
-
sx: {
|
|
303
|
-
flex: c ? "0 0 auto" : 1,
|
|
304
|
-
minWidth: 0,
|
|
305
|
-
height: _.box,
|
|
306
|
-
display: "flex",
|
|
307
|
-
alignItems: "center",
|
|
308
|
-
justifyContent: "space-between",
|
|
309
|
-
gap: _.priceGap,
|
|
310
|
-
paddingInline: _.pricePad,
|
|
311
|
-
borderRadius: R.xs,
|
|
312
|
-
border: `1px solid ${f.border}`,
|
|
313
|
-
boxSizing: "border-box",
|
|
314
|
-
backgroundColor: f.surface,
|
|
315
|
-
color: f.text,
|
|
316
|
-
cursor: "pointer",
|
|
317
|
-
textDecoration: "none",
|
|
318
|
-
fontFamily: N.secondary,
|
|
319
|
-
// A <button> doesn't inherit font-size, and `height` in em resolves against its own.
|
|
320
|
-
fontSize: "1em",
|
|
321
|
-
lineHeight: 1.35,
|
|
322
|
-
"&:hover": { borderColor: f.dim }
|
|
323
|
-
},
|
|
324
|
-
children: [
|
|
325
|
-
/* @__PURE__ */ S(x, { component: "span", sx: { color: f.dim, fontSize: "0.75em", whiteSpace: "nowrap" }, children: L(a.pick) }),
|
|
326
|
-
/* @__PURE__ */ F(
|
|
327
|
-
x,
|
|
328
|
-
{
|
|
329
|
-
component: "span",
|
|
330
|
-
sx: { fontSize: "0.75em", fontWeight: 700, fontVariantNumeric: "tabular-nums", whiteSpace: "nowrap" },
|
|
331
|
-
children: [
|
|
332
|
-
/* @__PURE__ */ S(Q, { children: a.value }),
|
|
333
|
-
/* @__PURE__ */ S(
|
|
334
|
-
x,
|
|
335
|
-
{
|
|
336
|
-
component: "span",
|
|
337
|
-
"aria-hidden": !0,
|
|
338
|
-
sx: {
|
|
339
|
-
marginInlineStart: "0.25em",
|
|
340
|
-
visibility: a.change === "none" ? "hidden" : "visible",
|
|
341
|
-
color: a.change === "up" ? f.success : f.danger
|
|
342
|
-
},
|
|
343
|
-
children: a.change === "down" ? "↓" : "↑"
|
|
344
|
-
}
|
|
345
|
-
)
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
)
|
|
349
|
-
]
|
|
350
|
-
},
|
|
351
|
-
a.pick
|
|
352
|
-
);
|
|
353
|
-
};
|
|
354
|
-
return /* @__PURE__ */ S(
|
|
355
|
-
x,
|
|
356
|
-
{
|
|
357
|
-
sx: {
|
|
358
|
-
display: c ? "inline-flex" : "flex",
|
|
359
|
-
alignItems: "center",
|
|
360
|
-
gap: _.gap,
|
|
361
|
-
fontSize: "1em",
|
|
362
|
-
...i ? {} : {
|
|
363
|
-
paddingInline: _.padInline,
|
|
364
|
-
paddingBlock: _.padBlock,
|
|
365
|
-
borderBlockStart: `1px solid ${f.border}`,
|
|
366
|
-
...T ? { height: "2.5em" } : {}
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
children: O ? A && l ? C(!0) : y.map(I) : /* @__PURE__ */ F(K, { children: [
|
|
370
|
-
C(!1),
|
|
371
|
-
y.map(I)
|
|
372
|
-
] })
|
|
373
|
-
}
|
|
374
|
-
);
|
|
375
|
-
};
|
|
376
|
-
export {
|
|
377
|
-
ke as O,
|
|
378
|
-
Re as a,
|
|
379
|
-
he as i,
|
|
380
|
-
Se as p,
|
|
381
|
-
xe as s,
|
|
382
|
-
ue as u
|
|
383
|
-
};
|