fansunited-frontend-components 0.0.49 → 0.0.52
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.d.ts +5 -0
- package/Betslip.d.ts.map +1 -0
- package/Betslip.js +5 -0
- package/ChanceGame.js +87 -86
- package/ClassicQuizPlay.js +174 -173
- package/CollectLead.js +33 -32
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +171 -170
- package/EventGamePlay.js +25 -24
- package/Leaderboard.js +88 -87
- package/MatchQuizPlay.js +28 -27
- package/PersonalityQuizPlay.js +21 -20
- package/PickThePair.js +87 -86
- package/PollVote.js +19 -18
- package/Predictor.js +4756 -4693
- package/README.md +523 -1
- package/chunks/{AlertMessage-Ds45MBHB.js → AlertMessage-CQ9WJHSb.js} +25 -24
- package/chunks/{ArrowRightAlt-DKADQN2o.js → ArrowRightAlt-C1U8SNu-.js} +5 -5
- package/chunks/{Avatar-K1EWhhkA.js → Avatar-COVJnfGS.js} +79 -78
- package/chunks/Button-COvmPv4P.js +2270 -0
- package/chunks/{ChanceGameEmbedVariant-DqFg4YKU.js → ChanceGameEmbedVariant-lfZlSATv.js} +44 -43
- package/chunks/{CheckCircle-CV9iMpkZ.js → CheckCircle-h7-xLUq-.js} +27 -26
- package/chunks/{Close-C6Cw96SJ.js → Close-BTC6xyyj.js} +1 -1
- package/chunks/{Close-BHp4N1-6.js → Close-DBaorsP1.js} +1 -1
- package/chunks/{CollectLeadForm-DnLKA8qz.js → CollectLeadForm-O7Cpe0ix.js} +128 -127
- package/chunks/{Divider-BvUimRFw.js → Divider-DBCeQt9x.js} +15 -14
- package/chunks/{Edit-CZ3ni-Ur.js → Edit-BwwxJdNv.js} +35 -34
- package/chunks/{EmojiEvents-DpmLq98V.js → EmojiEvents-DVPGlTU_.js} +3 -3
- package/chunks/{FavoriteBorder-DUK_DrY4.js → FavoriteBorder-BnhfbKy1.js} +1 -1
- package/chunks/{FormControl-BUItlVIg.js → FormControl-COjw1gQd.js} +38 -37
- package/chunks/{FormLabel-CeTNPUn7.js → FormLabel-e5_v5cjP.js} +18 -17
- package/chunks/{Input-MJCQcYzo.js → Input-er-Yyqtt.js} +17 -16
- package/chunks/{KeyboardArrowDown-SZpn2GhJ.js → KeyboardArrowDown-BeaYH92n.js} +1 -1
- package/chunks/{ModalDialog-Cfgv9UAA.js → ModalDialog-XkhZtgYm.js} +58 -57
- package/chunks/{NotFoundSkeleton-Cs6DtD9u.js → NotFoundSkeleton-C71TRYl5.js} +95 -94
- package/chunks/{Notification-pcKtlRms.js → Notification-CkPupg9q.js} +57 -56
- package/chunks/{OverlayApiErrorSkeleton-Dl3s5Oaf.js → OverlayApiErrorSkeleton-CkuDu9uV.js} +20 -19
- package/chunks/{OverlayLeadAfterCollection-F2TAV9wK.js → OverlayLeadAfterCollection-Dkxl4cKn.js} +28 -27
- package/chunks/{OverlayScoreStateSkeleton-LQ0svzeX.js → OverlayScoreStateSkeleton-RauDjIg5.js} +16 -15
- package/chunks/{Person-BGdniS_p.js → Person-WCt2MN5j.js} +32 -31
- package/chunks/{PickOneOfX-Ci4ZJf7G.js → PickOneOfX-DabfTR2W.js} +8 -7
- package/chunks/{Popper-DOVSI4rJ.js → Popper-OPgbZzY7.js} +127 -126
- package/chunks/{Portal-Cs0dgwmH.js → Portal-BQilulgu.js} +5 -5
- package/chunks/{PrizeCard-DF3QxwQJ.js → PrizeCard-DgHyperX.js} +5238 -6653
- package/chunks/{Select-BHeTdOYr.js → Select-9gmhEo71.js} +133 -132
- package/chunks/{Spinner-DbUB64Gj.js → Spinner-BoysVPn7.js} +12 -11
- package/chunks/{SplitLeadAfterCollection-DSw6X5fx.js → SplitLeadAfterCollection-C5oCDYT1.js} +15 -14
- package/chunks/{Stack-BpHk5eb0.js → Stack-INH9bhkC.js} +30 -29
- package/chunks/{StandardContentSkeleton-Bae1LLQ_.js → StandardContentSkeleton-DsAhzMfU.js} +1 -1
- package/chunks/{Tabs-hwJ7jsUl.js → Tabs-DaVatjCJ.js} +60 -59
- package/chunks/{Textarea-zOtMdgc5.js → Textarea-DeMxp3Zn.js} +48 -47
- package/chunks/{TimerOutlined-DWE7f0YX.js → TimerOutlined-DJh2vL3s.js} +3 -3
- package/chunks/{helpers-NuC1SzL3.js → helpers-Bd9FT9hj.js} +1 -1
- package/chunks/{index-D1K1OB4p.js → index-5MPtbA_r.js} +255 -239
- package/chunks/index-BjfKDjAM.js +4 -0
- package/chunks/main-DDb9jezz.js +1758 -0
- package/chunks/{main-hB01WcoP.js → main-DWw1vqVY.js} +38 -37
- package/chunks/{useEventCallback-CizlfWBo.js → useEventCallback-vbTEFVPa.js} +8 -7
- package/chunks/{useForwardedInput-RWDntqBU.js → useForwardedInput-DumYVfgj.js} +26 -25
- package/chunks/{useImageVariant-Cex1eIqq.js → useImageVariant-B1ObJh_B.js} +1 -1
- package/components.d.ts +2 -1
- package/components.d.ts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +5 -3
- package/package.json +5 -1
- package/chunks/index-BaypiKlO.js +0 -4
|
@@ -0,0 +1,1758 @@
|
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
|
+
var ht = (t, e, n) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var P = (t, e, n) => ht(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as i, jsxs as h, Fragment as N } from "react/jsx-runtime";
|
|
5
|
+
import M, { useState as L, useRef as gt, useEffect as B, createContext as bt, useMemo as q, useCallback as j, useContext as yt } from "react";
|
|
6
|
+
import { f as R, i as xt, a as St, c as wt, y as vt, e as _, b as T, d as D, a8 as O, H as W, a9 as at, a7 as st } from "./PrizeCard-DgHyperX.js";
|
|
7
|
+
import { P as Ct } from "./Portal-BQilulgu.js";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
import { y as Rt } from "./index-5MPtbA_r.js";
|
|
10
|
+
import { a as Lt, K as _t } from "./KeyboardArrowDown-BeaYH92n.js";
|
|
11
|
+
class kt {
|
|
12
|
+
constructor() {
|
|
13
|
+
P(this, "handler", null);
|
|
14
|
+
P(this, "queue", []);
|
|
15
|
+
}
|
|
16
|
+
/** Called by BetslipShell on mount. Replays any queued pre-mount calls. */
|
|
17
|
+
_mount(e) {
|
|
18
|
+
this.handler = e, this.queue.forEach((n) => n()), this.queue = [];
|
|
19
|
+
}
|
|
20
|
+
/** Called by BetslipShell on unmount. */
|
|
21
|
+
_unmount() {
|
|
22
|
+
this.handler = null;
|
|
23
|
+
}
|
|
24
|
+
setSelection(e) {
|
|
25
|
+
this.handler ? this.handler.setSelection(e) : this.queue.push(() => this.setSelection(e));
|
|
26
|
+
}
|
|
27
|
+
removeSelection(e) {
|
|
28
|
+
var n;
|
|
29
|
+
(n = this.handler) == null || n.removeSelection(e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const J = new kt();
|
|
33
|
+
function $t(t) {
|
|
34
|
+
const e = {}, n = /* @__PURE__ */ new Set();
|
|
35
|
+
return t.forEach((o) => {
|
|
36
|
+
const s = `${o.eventId}::${o.marketId}`;
|
|
37
|
+
e[s] ? (n.add(e[s]), n.add(o.id)) : e[s] = o.id;
|
|
38
|
+
}), n;
|
|
39
|
+
}
|
|
40
|
+
function lt(t) {
|
|
41
|
+
return t.filter((e) => e.status === "active" || !e.status).reduce((e, n) => e * n.odds, 1);
|
|
42
|
+
}
|
|
43
|
+
function Tt(t, e, n, o, s, r) {
|
|
44
|
+
const l = o ?? "Away", a = e.toLowerCase(), p = (r == null ? void 0 : r.draw) || s("betslip.outcomes.draw"), c = (r == null ? void 0 : r.yes) || s("betslip.outcomes.yes"), u = (r == null ? void 0 : r.no) || s("betslip.outcomes.no"), m = (r == null ? void 0 : r.over) || s("betslip.outcomes.over"), d = (r == null ? void 0 : r.under) || s("betslip.outcomes.under"), b = (r == null ? void 0 : r.noGoal) || s("betslip.outcomes.noGoal"), f = (r == null ? void 0 : r.nobody) || s("betslip.outcomes.nobody"), g = (r == null ? void 0 : r.or) || s("betslip.outcomes.or");
|
|
45
|
+
switch (t) {
|
|
46
|
+
case "FT_1X2":
|
|
47
|
+
case "HT_1X2":
|
|
48
|
+
if (e === "1") return n;
|
|
49
|
+
if (a === "x") return p;
|
|
50
|
+
if (e === "2") return l;
|
|
51
|
+
break;
|
|
52
|
+
case "DOUBLE_CHANCE": {
|
|
53
|
+
const x = e.toUpperCase();
|
|
54
|
+
if (x === "1X") return `${n} ${g} ${p}`;
|
|
55
|
+
if (x === "12") return `${n} ${g} ${l}`;
|
|
56
|
+
if (x === "X2") return `${p} ${g} ${l}`;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case "BOTH_TEAMS_SCORE":
|
|
60
|
+
case "RED_CARD_MATCH":
|
|
61
|
+
case "PENALTY_MATCH":
|
|
62
|
+
if (a === "yes") return c;
|
|
63
|
+
if (a === "no") return u;
|
|
64
|
+
break;
|
|
65
|
+
case "CORRECT_SCORE":
|
|
66
|
+
case "CORRECT_SCORE_ADVANCED":
|
|
67
|
+
case "CORRECT_SCORE_HT": {
|
|
68
|
+
const x = e.split(/[-:]/).map(Number);
|
|
69
|
+
return x.length === 2 && !isNaN(x[0]) && !isNaN(x[1]) ? x[0] > x[1] ? n : x[1] > x[0] ? l : p : e;
|
|
70
|
+
}
|
|
71
|
+
case "HT_FT": {
|
|
72
|
+
const x = e.toUpperCase();
|
|
73
|
+
return (x.includes("/") ? x.split("/") : x.split("")).map((S) => S === "1" ? n : S === "2" ? l : p).join(" / ");
|
|
74
|
+
}
|
|
75
|
+
case "DRAW_NO_BET":
|
|
76
|
+
if (e === "1") return n;
|
|
77
|
+
if (e === "2") return l;
|
|
78
|
+
break;
|
|
79
|
+
case "FIRST_TEAM_TO_SCORE":
|
|
80
|
+
case "LAST_TEAM_TO_SCORE":
|
|
81
|
+
if (e === "1") return n;
|
|
82
|
+
if (e === "2") return l;
|
|
83
|
+
if (a === "none" || a === "no goal") return b;
|
|
84
|
+
break;
|
|
85
|
+
case "PLAYER_SCORE_FIRST_GOAL":
|
|
86
|
+
case "PLAYER_SCORE":
|
|
87
|
+
case "PLAYER_SCORE_TWICE":
|
|
88
|
+
case "PLAYER_SCORE_HATTRICK":
|
|
89
|
+
case "PLAYER_RED_CARD":
|
|
90
|
+
case "PLAYER_YELLOW_CARD":
|
|
91
|
+
return a === "none" || a === "no goal" || a === "nobody" ? f : e;
|
|
92
|
+
}
|
|
93
|
+
const y = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
94
|
+
if (y) {
|
|
95
|
+
const S = y[1].toUpperCase() === "OVER" !== (a === "no" || a === "under") ? m : d, w = `${y[3]}.${y[4]}`;
|
|
96
|
+
return `${S} ${w}`;
|
|
97
|
+
}
|
|
98
|
+
return e;
|
|
99
|
+
}
|
|
100
|
+
function Et(t) {
|
|
101
|
+
return `${t.eventId}:${t.market}:${t.outcome}`;
|
|
102
|
+
}
|
|
103
|
+
function It(t) {
|
|
104
|
+
var n;
|
|
105
|
+
const e = (n = t.participantTwo) == null ? void 0 : n.name;
|
|
106
|
+
return e ? `${t.participantOne.name} vs ${e}` : t.participantOne.name;
|
|
107
|
+
}
|
|
108
|
+
function zt(t, e, n) {
|
|
109
|
+
return t.map((o) => {
|
|
110
|
+
var s, r, l;
|
|
111
|
+
return {
|
|
112
|
+
id: Et(o),
|
|
113
|
+
eventId: o.eventId,
|
|
114
|
+
marketId: o.market,
|
|
115
|
+
event: It(o),
|
|
116
|
+
market: o.market,
|
|
117
|
+
name: Tt(
|
|
118
|
+
o.market,
|
|
119
|
+
o.outcome,
|
|
120
|
+
o.participantOne.name,
|
|
121
|
+
(s = o.participantTwo) == null ? void 0 : s.name,
|
|
122
|
+
e,
|
|
123
|
+
n
|
|
124
|
+
),
|
|
125
|
+
odds: 0,
|
|
126
|
+
outcome: o.outcome,
|
|
127
|
+
startAt: o.startAt,
|
|
128
|
+
matchStatus: o.matchStatus,
|
|
129
|
+
participantOne: o.participantOne.name,
|
|
130
|
+
participantTwo: (r = o.participantTwo) == null ? void 0 : r.name,
|
|
131
|
+
participantOneLogo: o.participantOne.logo,
|
|
132
|
+
participantTwoLogo: (l = o.participantTwo) == null ? void 0 : l.logo,
|
|
133
|
+
source: o.source,
|
|
134
|
+
competition: o.competition,
|
|
135
|
+
athlete: o.athlete
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const Ot = {
|
|
140
|
+
HT_FT: ["first_half_and_final_result", "htft", "ht_ft"],
|
|
141
|
+
BOTH_TEAMS_SCORE: ["both_to_score", "btts", "gg"],
|
|
142
|
+
DOUBLE_CHANCE: ["double_chance", "dc"],
|
|
143
|
+
CORRECT_SCORE: ["correct_score", "cs"],
|
|
144
|
+
PLAYER_SCORE_FIRST_GOAL: ["first_goalscorer", "player_score_first_goal"],
|
|
145
|
+
PLAYER_SCORE: ["anytime_goalscorer", "player_score", "anytime_scorer"],
|
|
146
|
+
PLAYER_RED_CARD: ["player_red_card", "red_card"],
|
|
147
|
+
PLAYER_YELLOW_CARD: ["player_yellow_card", "yellow_card"]
|
|
148
|
+
};
|
|
149
|
+
function At(t) {
|
|
150
|
+
return t.replace(/^FT_/i, "").toLowerCase();
|
|
151
|
+
}
|
|
152
|
+
const ct = /^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i;
|
|
153
|
+
function Bt(t, e) {
|
|
154
|
+
const n = t.toLowerCase();
|
|
155
|
+
if (n === At(e)) return !0;
|
|
156
|
+
const o = Ot[e];
|
|
157
|
+
return !!(o !== void 0 && o.includes(n) || ct.test(e) && n === "over_under");
|
|
158
|
+
}
|
|
159
|
+
function Dt(t) {
|
|
160
|
+
const e = t.split(":");
|
|
161
|
+
return e[e.length - 1];
|
|
162
|
+
}
|
|
163
|
+
function Wt(t, e) {
|
|
164
|
+
return t.map((n) => {
|
|
165
|
+
var u, m, d, b, f, g, y, x;
|
|
166
|
+
const s = (e.get(n.eventId) ?? [])[0];
|
|
167
|
+
if (!s) return n;
|
|
168
|
+
const r = Dt(n.id), l = n.marketId.match(ct), a = l !== null, p = a ? r.toLowerCase() === "no" ? "under" : r.toLowerCase() === "yes" ? "over" : r.toLowerCase() : null, c = a ? `${l[3]}.${l[4]}` : null;
|
|
169
|
+
for (const v of s.markets ?? [])
|
|
170
|
+
if (Bt(((u = v == null ? void 0 : v.type) == null ? void 0 : u.code) ?? "", n.marketId))
|
|
171
|
+
for (const S of v.selections ?? []) {
|
|
172
|
+
let w;
|
|
173
|
+
if (a) {
|
|
174
|
+
const E = ((m = S.code) == null ? void 0 : m.toLowerCase()) === p || ((d = S.name) == null ? void 0 : d.toLowerCase()) === p, I = c === null || ((b = S.value) == null ? void 0 : b.toString()) === c;
|
|
175
|
+
w = E && I;
|
|
176
|
+
} else
|
|
177
|
+
w = ((f = S.code) == null ? void 0 : f.toLowerCase()) === r.toLowerCase() || ((g = S.name) == null ? void 0 : g.toLowerCase()) === r.toLowerCase();
|
|
178
|
+
if (w)
|
|
179
|
+
return {
|
|
180
|
+
...n,
|
|
181
|
+
odds: parseFloat(S.odds ?? "0") || 0,
|
|
182
|
+
movement: S.movement === "UP" || S.movement === "DOWN" ? S.movement : void 0,
|
|
183
|
+
selectionId: S.id ?? void 0,
|
|
184
|
+
selectionUrl: ((x = (y = S.urls) == null ? void 0 : y[0]) == null ? void 0 : x.url) ?? void 0
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
return n;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function Ut(t, e, n) {
|
|
191
|
+
const [o, s] = L(null), [r, l] = L(!1), a = gt(null), p = async (c) => {
|
|
192
|
+
if (!t || c.length === 0) return;
|
|
193
|
+
const u = [...new Set(c.map((b) => b.eventId))], m = [
|
|
194
|
+
...new Set(c.map((b) => b.market))
|
|
195
|
+
], d = new Rt({ marketTypes: m });
|
|
196
|
+
l(!0);
|
|
197
|
+
try {
|
|
198
|
+
const b = await t.odds.getByMatchIds(u, d);
|
|
199
|
+
s(b);
|
|
200
|
+
} catch {
|
|
201
|
+
} finally {
|
|
202
|
+
l(!1);
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
return B(() => (p(e), a.current && clearInterval(a.current), t && n > 0 && e.length > 0 && (a.current = setInterval(() => p(e), n)), () => {
|
|
206
|
+
a.current && clearInterval(a.current);
|
|
207
|
+
}), [JSON.stringify(e), n]), { oddsMap: o, oddsLoading: r };
|
|
208
|
+
}
|
|
209
|
+
function Ft(t) {
|
|
210
|
+
var e, n, o;
|
|
211
|
+
for (const s of t.values()) {
|
|
212
|
+
const r = s[0];
|
|
213
|
+
if (!r) continue;
|
|
214
|
+
const l = (o = (n = (e = r.bookmaker) == null ? void 0 : e.assets) == null ? void 0 : n[0]) == null ? void 0 : o.transparentBackgroundUrl;
|
|
215
|
+
if (l) return l;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function Ht(t, e) {
|
|
219
|
+
var o;
|
|
220
|
+
const n = e ? "mobile" : "desktop";
|
|
221
|
+
for (const s of t.values()) {
|
|
222
|
+
const r = s[0];
|
|
223
|
+
if (!r) continue;
|
|
224
|
+
const l = ((o = r.bookmaker) == null ? void 0 : o.links) ?? [], a = l.find((p) => p.appType === n) ?? l[0];
|
|
225
|
+
if (a != null && a.homepageUrl) return a.homepageUrl;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function Pt(t) {
|
|
229
|
+
var e, n, o, s, r;
|
|
230
|
+
for (const l of t.values()) {
|
|
231
|
+
const a = l[0];
|
|
232
|
+
if (!a) continue;
|
|
233
|
+
const p = ((n = (e = a.bookmaker) == null ? void 0 : e.branding) == null ? void 0 : n.backgroundColor) ?? ((r = (s = (o = a.bookmaker) == null ? void 0 : o.assets) == null ? void 0 : s[0]) == null ? void 0 : r.backgroundColor);
|
|
234
|
+
if (p) return p;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const dt = bt(null), Nt = ({
|
|
238
|
+
labels: t = {},
|
|
239
|
+
initialSelections: e = [],
|
|
240
|
+
maxSelections: n,
|
|
241
|
+
currency: o = "€",
|
|
242
|
+
stakePresets: s = [5, 10, 20],
|
|
243
|
+
ctaUrlTemplate: r,
|
|
244
|
+
onExternalRemove: l,
|
|
245
|
+
sharedOddsMap: a,
|
|
246
|
+
children: p
|
|
247
|
+
}) => {
|
|
248
|
+
const { t: c } = R(), [u, m] = L(e), [d, b] = L(""), [f, g] = L(!0), y = xt();
|
|
249
|
+
B(() => {
|
|
250
|
+
m(e);
|
|
251
|
+
}, [JSON.stringify(e)]);
|
|
252
|
+
const x = q(() => {
|
|
253
|
+
if (!a) return !1;
|
|
254
|
+
const C = a.values().next().value;
|
|
255
|
+
return Array.isArray(C) && C[0] !== void 0;
|
|
256
|
+
}, [a]), v = q(() => {
|
|
257
|
+
const C = zt(u, c, t.outcomeLabels);
|
|
258
|
+
return a ? Wt(C, a) : C;
|
|
259
|
+
}, [u, a, c, t.outcomeLabels]), S = $t(v), w = a ? Ft(a) : void 0, E = a ? Ht(a, y) : void 0, I = a ? Pt(a) : void 0, U = j(
|
|
260
|
+
(C) => {
|
|
261
|
+
m(
|
|
262
|
+
(F) => F.filter((z) => `${z.eventId}:${z.market}:${z.outcome}` !== C)
|
|
263
|
+
), l == null || l(C);
|
|
264
|
+
},
|
|
265
|
+
[l]
|
|
266
|
+
);
|
|
267
|
+
return /* @__PURE__ */ i(
|
|
268
|
+
dt.Provider,
|
|
269
|
+
{
|
|
270
|
+
value: {
|
|
271
|
+
labels: t,
|
|
272
|
+
selectionInputs: u,
|
|
273
|
+
selections: v,
|
|
274
|
+
combStake: d,
|
|
275
|
+
open: f,
|
|
276
|
+
oddsLoading: !1,
|
|
277
|
+
oddsReady: x,
|
|
278
|
+
conflictIds: S,
|
|
279
|
+
currency: o,
|
|
280
|
+
stakePresets: s,
|
|
281
|
+
ctaUrlTemplate: r,
|
|
282
|
+
maxSelections: n,
|
|
283
|
+
bookmakerLogoUrl: w,
|
|
284
|
+
bookmakerHomepageUrl: E,
|
|
285
|
+
bookmakerBackgroundColor: I,
|
|
286
|
+
onRemove: U,
|
|
287
|
+
setCombStake: b,
|
|
288
|
+
setOpen: g
|
|
289
|
+
},
|
|
290
|
+
children: p
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}, k = () => {
|
|
294
|
+
const t = yt(dt);
|
|
295
|
+
if (!t) throw new Error("useBetslip must be used within BetslipProvider");
|
|
296
|
+
return t;
|
|
297
|
+
};
|
|
298
|
+
function jt(t) {
|
|
299
|
+
const e = St(), n = wt(), s = vt() === "light";
|
|
300
|
+
return {
|
|
301
|
+
primary: t || e.palette.primary.plainColor,
|
|
302
|
+
primaryHover: e.palette.primary.primaryContainer || t || e.palette.primary.plainColor,
|
|
303
|
+
s1: e.surface,
|
|
304
|
+
s2: e.onSurface,
|
|
305
|
+
s3: s ? e.surfaceVariant : e.onSurface,
|
|
306
|
+
bdr: e.outlineEnabledBorder,
|
|
307
|
+
t1: e.textPrimary,
|
|
308
|
+
t2: e.textSecondary,
|
|
309
|
+
t3: e.textDisabled,
|
|
310
|
+
ok: e.palette.success.plainColor,
|
|
311
|
+
bad: e.palette.danger.plainColor,
|
|
312
|
+
badSoftBg: e.palette.danger.softBg,
|
|
313
|
+
warn: e.palette.warning.plainColor,
|
|
314
|
+
warnSoftBg: e.palette.warning.softBg,
|
|
315
|
+
font: n.primary
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
const Q = ({
|
|
319
|
+
tokens: t,
|
|
320
|
+
isSide: e,
|
|
321
|
+
position: n,
|
|
322
|
+
brandingLogoUrl: o
|
|
323
|
+
}) => {
|
|
324
|
+
const { labels: s, selections: r, open: l, setOpen: a, maxSelections: p, bookmakerLogoUrl: c } = k(), { t: u } = R(), m = _(), d = T(), g = e ? "0" : n === "bottom-right" || n === "bottom-left" ? `${d.md} ${d.md} 0 0` : n === "top-right" || n === "top-left" ? `0 0 ${d.md} ${d.md}` : "0", y = o || c, x = {
|
|
325
|
+
background: "none",
|
|
326
|
+
border: "none",
|
|
327
|
+
cursor: "pointer",
|
|
328
|
+
color: "#fff",
|
|
329
|
+
padding: "5px 7px",
|
|
330
|
+
fontSize: "1em",
|
|
331
|
+
lineHeight: 1,
|
|
332
|
+
borderRadius: d.xs,
|
|
333
|
+
display: "flex",
|
|
334
|
+
alignItems: "center",
|
|
335
|
+
justifyContent: "center",
|
|
336
|
+
transition: "background .15s"
|
|
337
|
+
};
|
|
338
|
+
return /* @__PURE__ */ h(
|
|
339
|
+
"div",
|
|
340
|
+
{
|
|
341
|
+
style: {
|
|
342
|
+
paddingTop: m.sm,
|
|
343
|
+
paddingBottom: m.sm,
|
|
344
|
+
paddingRight: m.xs,
|
|
345
|
+
paddingLeft: y ? m["2xs"] : m.xs,
|
|
346
|
+
background: t.primary,
|
|
347
|
+
display: "flex",
|
|
348
|
+
alignItems: "center",
|
|
349
|
+
justifyContent: "space-between",
|
|
350
|
+
flexShrink: 0,
|
|
351
|
+
color: "#fff",
|
|
352
|
+
borderRadius: g,
|
|
353
|
+
fontFamily: t.font
|
|
354
|
+
},
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
357
|
+
y ? /* @__PURE__ */ i(
|
|
358
|
+
"img",
|
|
359
|
+
{
|
|
360
|
+
src: y,
|
|
361
|
+
alt: "brand",
|
|
362
|
+
style: {
|
|
363
|
+
height: "24px",
|
|
364
|
+
maxWidth: "88px",
|
|
365
|
+
width: "auto",
|
|
366
|
+
objectFit: "contain",
|
|
367
|
+
display: "block",
|
|
368
|
+
flexShrink: 0
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
) : /* @__PURE__ */ i(
|
|
372
|
+
"span",
|
|
373
|
+
{
|
|
374
|
+
style: {
|
|
375
|
+
fontSize: "1.0625em",
|
|
376
|
+
fontWeight: 800,
|
|
377
|
+
fontStyle: "italic",
|
|
378
|
+
fontFamily: "'Ubuntu', sans-serif",
|
|
379
|
+
letterSpacing: "-0.5px",
|
|
380
|
+
color: "#fff"
|
|
381
|
+
},
|
|
382
|
+
children: s.title || u("betslip.title")
|
|
383
|
+
}
|
|
384
|
+
),
|
|
385
|
+
r.length > 0 && p != null && /* @__PURE__ */ h(
|
|
386
|
+
"span",
|
|
387
|
+
{
|
|
388
|
+
style: {
|
|
389
|
+
fontSize: "0.875em",
|
|
390
|
+
fontWeight: 600,
|
|
391
|
+
color: "#fff",
|
|
392
|
+
marginLeft: y ? 0 : m.sm
|
|
393
|
+
},
|
|
394
|
+
children: [
|
|
395
|
+
r.length,
|
|
396
|
+
"/",
|
|
397
|
+
p
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
)
|
|
401
|
+
] }),
|
|
402
|
+
!e && /* @__PURE__ */ i(
|
|
403
|
+
"button",
|
|
404
|
+
{
|
|
405
|
+
style: x,
|
|
406
|
+
onClick: () => a(!l),
|
|
407
|
+
title: l ? "Collapse" : "Expand",
|
|
408
|
+
onMouseEnter: (v) => v.currentTarget.style.background = "rgba(255,255,255,.18)",
|
|
409
|
+
onMouseLeave: (v) => v.currentTarget.style.background = "none",
|
|
410
|
+
children: l ? /* @__PURE__ */ i(Lt, { sx: { fontSize: "1.125em", color: "inherit" } }) : /* @__PURE__ */ i(_t, { sx: { fontSize: "1.125em", color: "inherit" } })
|
|
411
|
+
}
|
|
412
|
+
)
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
}, Z = ({ tokens: t }) => {
|
|
417
|
+
const { t: e } = R(), n = _(), o = D();
|
|
418
|
+
return /* @__PURE__ */ h(
|
|
419
|
+
"div",
|
|
420
|
+
{
|
|
421
|
+
style: {
|
|
422
|
+
display: "flex",
|
|
423
|
+
alignItems: "center",
|
|
424
|
+
gap: n.xs,
|
|
425
|
+
padding: "9px 14px",
|
|
426
|
+
background: t.badSoftBg,
|
|
427
|
+
borderBottom: `${o.size} solid ${t.bad}`,
|
|
428
|
+
flexShrink: 0
|
|
429
|
+
},
|
|
430
|
+
children: [
|
|
431
|
+
/* @__PURE__ */ i(
|
|
432
|
+
"div",
|
|
433
|
+
{
|
|
434
|
+
style: {
|
|
435
|
+
width: 18,
|
|
436
|
+
height: 18,
|
|
437
|
+
borderRadius: "50%",
|
|
438
|
+
border: `1.5px solid ${t.bad}`,
|
|
439
|
+
flexShrink: 0,
|
|
440
|
+
display: "flex",
|
|
441
|
+
alignItems: "center",
|
|
442
|
+
justifyContent: "center",
|
|
443
|
+
fontSize: "0.6875em",
|
|
444
|
+
fontWeight: 700,
|
|
445
|
+
color: t.bad,
|
|
446
|
+
lineHeight: 1
|
|
447
|
+
},
|
|
448
|
+
children: "i"
|
|
449
|
+
}
|
|
450
|
+
),
|
|
451
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.75em", color: t.t1, lineHeight: 1.4 }, children: e("betslip.conflictMessage") })
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
};
|
|
456
|
+
function Mt(t, e, n) {
|
|
457
|
+
const o = e.map((a) => a.selectionId).filter(Boolean).join(","), s = e[0], r = encodeURIComponent(
|
|
458
|
+
typeof window < "u" ? window.location.href : ""
|
|
459
|
+
), l = String(n);
|
|
460
|
+
return t.replace(/\{selectionIds\}/g, encodeURIComponent(o)).replace(/\{currentUrl\}/g, r).replace(/\{stake\}/g, l).replace(/\{eventId\}/g, (s == null ? void 0 : s.eventId) ?? "").replace(/\{oddsDecimal\}/g, s ? String(s.odds) : "").replace(/\{market\}/g, (s == null ? void 0 : s.marketId) ?? "").replace(/\{outcome\}/g, (s == null ? void 0 : s.name) ?? "");
|
|
461
|
+
}
|
|
462
|
+
const Yt = O.a`
|
|
463
|
+
display: flex;
|
|
464
|
+
align-items: center;
|
|
465
|
+
justify-content: center;
|
|
466
|
+
width: 100%;
|
|
467
|
+
background: ${({ primary: t }) => t};
|
|
468
|
+
color: #fff;
|
|
469
|
+
border: none;
|
|
470
|
+
font-weight: 600;
|
|
471
|
+
text-decoration: none;
|
|
472
|
+
box-sizing: border-box;
|
|
473
|
+
cursor: ${({ disabled: t }) => t ? "not-allowed" : "pointer"};
|
|
474
|
+
pointer-events: ${({ disabled: t }) => t ? "none" : "auto"};
|
|
475
|
+
opacity: ${({ disabled: t }) => t ? 0.4 : 1};
|
|
476
|
+
&:hover {
|
|
477
|
+
background: ${({ primaryHover: t }) => t};
|
|
478
|
+
}
|
|
479
|
+
`, pt = ({
|
|
480
|
+
tokens: t,
|
|
481
|
+
brandingLogoUrl: e,
|
|
482
|
+
hasConflicts: n
|
|
483
|
+
}) => {
|
|
484
|
+
const {
|
|
485
|
+
labels: o,
|
|
486
|
+
ctaUrlTemplate: s,
|
|
487
|
+
selections: r,
|
|
488
|
+
combStake: l,
|
|
489
|
+
bookmakerLogoUrl: a,
|
|
490
|
+
bookmakerHomepageUrl: p
|
|
491
|
+
} = k(), { t: c } = R(), u = e || a, m = _(), d = T(), b = o.continueLabel || c("betslip.continueLabel"), f = (() => {
|
|
492
|
+
if (s)
|
|
493
|
+
return Mt(
|
|
494
|
+
s,
|
|
495
|
+
r,
|
|
496
|
+
parseFloat(l) || 0
|
|
497
|
+
);
|
|
498
|
+
if (p) return p;
|
|
499
|
+
})(), g = n || !f;
|
|
500
|
+
return /* @__PURE__ */ i("div", { children: /* @__PURE__ */ h(
|
|
501
|
+
Yt,
|
|
502
|
+
{
|
|
503
|
+
href: g ? void 0 : f,
|
|
504
|
+
target: f ? "_blank" : void 0,
|
|
505
|
+
rel: f ? "noopener noreferrer" : void 0,
|
|
506
|
+
primary: t.primary,
|
|
507
|
+
primaryHover: t.primaryHover,
|
|
508
|
+
disabled: g,
|
|
509
|
+
style: {
|
|
510
|
+
padding: `${m.xs} ${m.md}`,
|
|
511
|
+
borderRadius: d.full,
|
|
512
|
+
fontSize: "0.875em",
|
|
513
|
+
fontFamily: t.font
|
|
514
|
+
},
|
|
515
|
+
children: [
|
|
516
|
+
/* @__PURE__ */ i("span", { children: b }),
|
|
517
|
+
u && /* @__PURE__ */ i(
|
|
518
|
+
"img",
|
|
519
|
+
{
|
|
520
|
+
src: u,
|
|
521
|
+
alt: "",
|
|
522
|
+
style: {
|
|
523
|
+
height: "20px",
|
|
524
|
+
maxWidth: "72px",
|
|
525
|
+
width: "auto",
|
|
526
|
+
objectFit: "contain",
|
|
527
|
+
verticalAlign: "middle",
|
|
528
|
+
marginLeft: m.sm,
|
|
529
|
+
flexShrink: 0
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
)
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
) });
|
|
536
|
+
}, tt = ({ color: t }) => {
|
|
537
|
+
const e = D();
|
|
538
|
+
return /* @__PURE__ */ i("div", { style: { borderBottom: `${e.size} solid ${t}` } });
|
|
539
|
+
}, Vt = ({
|
|
540
|
+
tokens: t,
|
|
541
|
+
brandingLogoUrl: e
|
|
542
|
+
}) => {
|
|
543
|
+
const { labels: n, selections: o, combStake: s, conflictIds: r, currency: l } = k(), { t: a } = R(), p = _(), c = o.filter(
|
|
544
|
+
(g) => g.status === "active" || !g.status
|
|
545
|
+
), u = lt(c), m = parseFloat(s) || 0, d = m * u, b = r.size > 0, f = {
|
|
546
|
+
display: "flex",
|
|
547
|
+
justifyContent: "space-between",
|
|
548
|
+
alignItems: "center",
|
|
549
|
+
padding: "6px 0"
|
|
550
|
+
};
|
|
551
|
+
return /* @__PURE__ */ h(
|
|
552
|
+
"div",
|
|
553
|
+
{
|
|
554
|
+
style: {
|
|
555
|
+
background: t.s1,
|
|
556
|
+
padding: `10px 14px ${p.sm}`,
|
|
557
|
+
fontFamily: t.font
|
|
558
|
+
},
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ h("div", { style: f, children: [
|
|
561
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.6875em", color: t.t3 }, children: n.combinedOddsLabel || a("betslip.combinedOddsLabel") }),
|
|
562
|
+
/* @__PURE__ */ h(
|
|
563
|
+
"span",
|
|
564
|
+
{
|
|
565
|
+
style: {
|
|
566
|
+
fontSize: "0.6875em",
|
|
567
|
+
color: t.t1,
|
|
568
|
+
fontWeight: 600,
|
|
569
|
+
display: "flex",
|
|
570
|
+
alignItems: "center",
|
|
571
|
+
gap: 3
|
|
572
|
+
},
|
|
573
|
+
children: [
|
|
574
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.5em", color: t.ok }, children: "▲" }),
|
|
575
|
+
u.toFixed(2)
|
|
576
|
+
]
|
|
577
|
+
}
|
|
578
|
+
)
|
|
579
|
+
] }),
|
|
580
|
+
/* @__PURE__ */ i(tt, { color: t.bdr }),
|
|
581
|
+
/* @__PURE__ */ h("div", { style: f, children: [
|
|
582
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: n.totalStakeLabel || a("betslip.totalStakeLabel") }),
|
|
583
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: m > 0 ? `${m.toFixed(2)}${l}` : "—" })
|
|
584
|
+
] }),
|
|
585
|
+
/* @__PURE__ */ i(tt, { color: t.bdr }),
|
|
586
|
+
/* @__PURE__ */ h("div", { style: { ...f, borderBottom: "none", marginBottom: 10 }, children: [
|
|
587
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: t.t1 }, children: n.potentialWinLabel || a("betslip.potentialWinLabel") }),
|
|
588
|
+
/* @__PURE__ */ i(
|
|
589
|
+
"span",
|
|
590
|
+
{
|
|
591
|
+
style: {
|
|
592
|
+
fontSize: "0.8125em",
|
|
593
|
+
fontWeight: 700,
|
|
594
|
+
color: d > 0 ? t.primary : t.t1
|
|
595
|
+
},
|
|
596
|
+
children: d > 0 ? d.toFixed(2) : "—"
|
|
597
|
+
}
|
|
598
|
+
)
|
|
599
|
+
] }),
|
|
600
|
+
/* @__PURE__ */ i(
|
|
601
|
+
pt,
|
|
602
|
+
{
|
|
603
|
+
tokens: t,
|
|
604
|
+
brandingLogoUrl: e,
|
|
605
|
+
hasConflicts: b
|
|
606
|
+
}
|
|
607
|
+
)
|
|
608
|
+
]
|
|
609
|
+
}
|
|
610
|
+
);
|
|
611
|
+
};
|
|
612
|
+
function Gt(t, e, n) {
|
|
613
|
+
if (n != null && n[t]) return n[t];
|
|
614
|
+
const o = `betslip.markets.${t}`, s = e(o);
|
|
615
|
+
if (s !== o) return s;
|
|
616
|
+
const r = t.match(/^(OVER|UNDER)_(GOALS|CORNERS)_(\d+)_(\d+)$/i);
|
|
617
|
+
if (r) {
|
|
618
|
+
const l = r[2].charAt(0) + r[2].slice(1).toLowerCase(), a = `betslip.markets.${r[1].toUpperCase() === "OVER" ? "over" : "under"}${l}`, p = `${r[3]}.${r[4]}`, c = e(a, { line: p });
|
|
619
|
+
if (c !== a) return c;
|
|
620
|
+
}
|
|
621
|
+
return t.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (l) => l.toUpperCase());
|
|
622
|
+
}
|
|
623
|
+
const Xt = W`
|
|
624
|
+
from { opacity: 0; transform: translateX(8px); }
|
|
625
|
+
to { opacity: 1; transform: translateX(0); }
|
|
626
|
+
`, Kt = W`
|
|
627
|
+
from { transform: rotate(0deg); }
|
|
628
|
+
to { transform: rotate(360deg); }
|
|
629
|
+
`, qt = O.div`
|
|
630
|
+
width: 12px;
|
|
631
|
+
height: 12px;
|
|
632
|
+
border-radius: 50%;
|
|
633
|
+
border: 2px solid transparent;
|
|
634
|
+
border-top-color: ${({ color: t }) => t};
|
|
635
|
+
animation: ${Kt} 0.7s linear infinite;
|
|
636
|
+
flex-shrink: 0;
|
|
637
|
+
`, Jt = () => /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ i("path", { d: "M7 4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1h3a1 1 0 1 1 0 2h-1l-1.4 13.2A2 2 0 0 1 16.6 22H7.4a2 2 0 0 1-2-1.8L4 7H3a1 1 0 1 1 0-2h3V4zm2 0v1h6V4H9zm-3 3 1.4 12h9.2L18 7H6zm4 2a1 1 0 0 1 1 1v7a1 1 0 1 1-2 0v-7a1 1 0 0 1 1-1zm4 0a1 1 0 0 1 1 1v7a1 1 0 1 1-2 0v-7a1 1 0 0 1 1-1z" }) }), Qt = O.div`
|
|
638
|
+
animation: ${Xt} 0.18s ease;
|
|
639
|
+
`, Zt = W`
|
|
640
|
+
0%, 100% { opacity: 1; }
|
|
641
|
+
50% { opacity: 0.2; }
|
|
642
|
+
`, te = O.span`
|
|
643
|
+
width: 5px;
|
|
644
|
+
height: 5px;
|
|
645
|
+
border-radius: 50%;
|
|
646
|
+
background: #fff;
|
|
647
|
+
flex-shrink: 0;
|
|
648
|
+
animation: ${Zt} 1s ease-in-out infinite;
|
|
649
|
+
`;
|
|
650
|
+
function ee(t, e, n) {
|
|
651
|
+
if (!t) return "";
|
|
652
|
+
const o = new Date(t);
|
|
653
|
+
if (isNaN(o.getTime())) return "";
|
|
654
|
+
const s = /* @__PURE__ */ new Date(), r = s.toDateString(), l = new Date(s.getTime() + 864e5).toDateString(), a = o.toLocaleTimeString(e, {
|
|
655
|
+
hour: "2-digit",
|
|
656
|
+
minute: "2-digit"
|
|
657
|
+
});
|
|
658
|
+
return o.toDateString() === r ? `${n("betslip.today")} ${a}` : o.toDateString() === l ? `${n("betslip.tomorrow")} ${a}` : `${o.toLocaleDateString(e, { month: "short", day: "numeric" })} ${a}`;
|
|
659
|
+
}
|
|
660
|
+
const et = ({
|
|
661
|
+
logo: t,
|
|
662
|
+
name: e,
|
|
663
|
+
tokens: n,
|
|
664
|
+
size: o = 18
|
|
665
|
+
}) => /* @__PURE__ */ i(
|
|
666
|
+
"div",
|
|
667
|
+
{
|
|
668
|
+
style: {
|
|
669
|
+
width: o,
|
|
670
|
+
height: o,
|
|
671
|
+
borderRadius: "50%",
|
|
672
|
+
background: n.s2,
|
|
673
|
+
flexShrink: 0,
|
|
674
|
+
display: "flex",
|
|
675
|
+
alignItems: "center",
|
|
676
|
+
justifyContent: "center",
|
|
677
|
+
fontSize: o * 0.55,
|
|
678
|
+
overflow: "hidden"
|
|
679
|
+
},
|
|
680
|
+
children: t ? /* @__PURE__ */ i(
|
|
681
|
+
"img",
|
|
682
|
+
{
|
|
683
|
+
src: t,
|
|
684
|
+
alt: e,
|
|
685
|
+
style: { width: "100%", height: "100%", objectFit: "contain" }
|
|
686
|
+
}
|
|
687
|
+
) : /* @__PURE__ */ i("span", { style: { color: n.t2, fontWeight: 700 }, children: e.charAt(0) })
|
|
688
|
+
}
|
|
689
|
+
), ne = ({ avatar: t, name: e, tokens: n }) => /* @__PURE__ */ i(
|
|
690
|
+
"div",
|
|
691
|
+
{
|
|
692
|
+
style: {
|
|
693
|
+
width: 22,
|
|
694
|
+
height: 22,
|
|
695
|
+
borderRadius: "50%",
|
|
696
|
+
flexShrink: 0,
|
|
697
|
+
background: n.s2,
|
|
698
|
+
overflow: "hidden",
|
|
699
|
+
display: "flex",
|
|
700
|
+
alignItems: "center",
|
|
701
|
+
justifyContent: "center",
|
|
702
|
+
fontSize: "0.6875em",
|
|
703
|
+
fontWeight: 700
|
|
704
|
+
},
|
|
705
|
+
children: t ? /* @__PURE__ */ i(
|
|
706
|
+
"img",
|
|
707
|
+
{
|
|
708
|
+
src: t,
|
|
709
|
+
alt: e,
|
|
710
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
711
|
+
}
|
|
712
|
+
) : /* @__PURE__ */ i("span", { style: { color: n.t2 }, children: e.charAt(0) })
|
|
713
|
+
}
|
|
714
|
+
), oe = ({ name: t, logo: e, tokens: n }) => {
|
|
715
|
+
const o = _(), s = T(), [r, l] = M.useState(!1);
|
|
716
|
+
return e ? /* @__PURE__ */ h(
|
|
717
|
+
"div",
|
|
718
|
+
{
|
|
719
|
+
style: { position: "relative", display: "inline-flex" },
|
|
720
|
+
onMouseEnter: () => l(!0),
|
|
721
|
+
onMouseLeave: () => l(!1),
|
|
722
|
+
children: [
|
|
723
|
+
/* @__PURE__ */ i(
|
|
724
|
+
"div",
|
|
725
|
+
{
|
|
726
|
+
style: {
|
|
727
|
+
width: 20,
|
|
728
|
+
height: 20,
|
|
729
|
+
borderRadius: "50%",
|
|
730
|
+
overflow: "hidden",
|
|
731
|
+
background: n.s2,
|
|
732
|
+
flexShrink: 0
|
|
733
|
+
},
|
|
734
|
+
children: /* @__PURE__ */ i(
|
|
735
|
+
"img",
|
|
736
|
+
{
|
|
737
|
+
src: e,
|
|
738
|
+
alt: t,
|
|
739
|
+
style: { width: "100%", height: "100%", objectFit: "contain" }
|
|
740
|
+
}
|
|
741
|
+
)
|
|
742
|
+
}
|
|
743
|
+
),
|
|
744
|
+
r && /* @__PURE__ */ i(
|
|
745
|
+
"div",
|
|
746
|
+
{
|
|
747
|
+
style: {
|
|
748
|
+
position: "absolute",
|
|
749
|
+
top: "calc(100% + 5px)",
|
|
750
|
+
right: 0,
|
|
751
|
+
background: "#1e293b",
|
|
752
|
+
color: "#fff",
|
|
753
|
+
fontSize: "0.6875em",
|
|
754
|
+
fontWeight: 500,
|
|
755
|
+
padding: `${o["2xs"]} ${o.xs}`,
|
|
756
|
+
borderRadius: s.xs,
|
|
757
|
+
whiteSpace: "nowrap",
|
|
758
|
+
zIndex: 10,
|
|
759
|
+
pointerEvents: "none",
|
|
760
|
+
boxShadow: "0 2px 8px rgba(0,0,0,.25)"
|
|
761
|
+
},
|
|
762
|
+
children: t
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
]
|
|
766
|
+
}
|
|
767
|
+
) : /* @__PURE__ */ i(
|
|
768
|
+
"span",
|
|
769
|
+
{
|
|
770
|
+
style: { fontSize: "0.625em", color: n.t3, whiteSpace: "nowrap" },
|
|
771
|
+
children: t
|
|
772
|
+
}
|
|
773
|
+
);
|
|
774
|
+
}, nt = ({
|
|
775
|
+
score: t,
|
|
776
|
+
tokens: e
|
|
777
|
+
}) => {
|
|
778
|
+
const n = _(), o = T();
|
|
779
|
+
return /* @__PURE__ */ i(
|
|
780
|
+
"span",
|
|
781
|
+
{
|
|
782
|
+
style: {
|
|
783
|
+
background: e.s1,
|
|
784
|
+
color: e.t1,
|
|
785
|
+
fontWeight: 700,
|
|
786
|
+
fontSize: "0.75em",
|
|
787
|
+
borderRadius: o.xs,
|
|
788
|
+
minWidth: 20,
|
|
789
|
+
height: 20,
|
|
790
|
+
display: "inline-flex",
|
|
791
|
+
alignItems: "center",
|
|
792
|
+
justifyContent: "center",
|
|
793
|
+
flexShrink: 0,
|
|
794
|
+
padding: `0 ${n["2xs"]}`
|
|
795
|
+
},
|
|
796
|
+
children: t
|
|
797
|
+
}
|
|
798
|
+
);
|
|
799
|
+
}, ie = ({
|
|
800
|
+
sel: t,
|
|
801
|
+
tokens: e
|
|
802
|
+
}) => {
|
|
803
|
+
const { labels: n, oddsLoading: o } = k(), { t: s } = R(), { status: r, odds: l, movement: a } = t;
|
|
804
|
+
return r === "settled_won" ? /* @__PURE__ */ h("span", { style: { color: e.ok, fontSize: "0.8125em", fontWeight: 700 }, children: [
|
|
805
|
+
"✓ ",
|
|
806
|
+
s("betslip.settledWon")
|
|
807
|
+
] }) : r === "settled_lost" ? /* @__PURE__ */ h(
|
|
808
|
+
"span",
|
|
809
|
+
{
|
|
810
|
+
style: { color: e.bad, fontSize: "0.8125em", fontWeight: 700 },
|
|
811
|
+
children: [
|
|
812
|
+
"✗ ",
|
|
813
|
+
s("betslip.settledLost")
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
) : r === "settled_void" ? /* @__PURE__ */ i("span", { style: { fontSize: "0.8125em", fontWeight: 700, color: e.t3 }, children: s("betslip.settledVoid") }) : r === "suspended" ? /* @__PURE__ */ i("span", { style: { fontSize: "0.75em", fontWeight: 600, color: e.warn }, children: n.suspendedLabel || s("betslip.suspendedLabel") }) : o ? /* @__PURE__ */ i(qt, { color: e.t3 }) : l === 0 ? /* @__PURE__ */ i("span", { style: { fontSize: "0.8125em", fontWeight: 600, color: e.t3 }, children: n.oddsUnavailableLabel || s("betslip.oddsUnavailableLabel") }) : /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", gap: 3 }, children: [
|
|
817
|
+
a && /* @__PURE__ */ i(
|
|
818
|
+
"span",
|
|
819
|
+
{
|
|
820
|
+
style: {
|
|
821
|
+
fontSize: "0.5625em",
|
|
822
|
+
color: a === "UP" ? e.ok : e.bad,
|
|
823
|
+
lineHeight: 1
|
|
824
|
+
},
|
|
825
|
+
children: a === "UP" ? "▲" : "▼"
|
|
826
|
+
}
|
|
827
|
+
),
|
|
828
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.875em", fontWeight: 700, color: e.t1 }, children: l.toFixed(2) })
|
|
829
|
+
] });
|
|
830
|
+
}, re = ({ sel: t, tokens: e, isConflict: n }) => {
|
|
831
|
+
const { onRemove: o, labels: s } = k(), { t: r, i18n: l } = R(), a = _(), p = T(), c = D(), [u, m] = M.useState(!1), d = ee(t.startAt, l.language, r), b = t.marketId === "CORRECT_SCORE" || t.marketId === "CORRECT_SCORE_ADVANCED" || t.marketId === "CORRECT_SCORE_HT", f = b && t.outcome ? t.outcome.split(/[-:]/) : null, g = f == null ? void 0 : f[0], y = f == null ? void 0 : f[1];
|
|
832
|
+
return /* @__PURE__ */ h(
|
|
833
|
+
Qt,
|
|
834
|
+
{
|
|
835
|
+
style: {
|
|
836
|
+
fontFamily: e.font,
|
|
837
|
+
...n ? {
|
|
838
|
+
padding: "14px 0 0",
|
|
839
|
+
overflow: "hidden",
|
|
840
|
+
background: e.warnSoftBg,
|
|
841
|
+
border: `${c.size} solid ${e.bad}`,
|
|
842
|
+
borderRadius: p.sm,
|
|
843
|
+
margin: "6px 8px"
|
|
844
|
+
} : {
|
|
845
|
+
padding: "14px 12px"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
children: [
|
|
849
|
+
/* @__PURE__ */ h(
|
|
850
|
+
"div",
|
|
851
|
+
{
|
|
852
|
+
style: {
|
|
853
|
+
display: "flex",
|
|
854
|
+
justifyContent: "space-between",
|
|
855
|
+
alignItems: "flex-start",
|
|
856
|
+
gap: a.xs,
|
|
857
|
+
marginBottom: a["3xs"],
|
|
858
|
+
...n && { paddingLeft: a.xs }
|
|
859
|
+
},
|
|
860
|
+
children: [
|
|
861
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
862
|
+
t.athlete && /* @__PURE__ */ i(
|
|
863
|
+
ne,
|
|
864
|
+
{
|
|
865
|
+
avatar: t.athlete.avatar,
|
|
866
|
+
name: t.athlete.name,
|
|
867
|
+
tokens: e
|
|
868
|
+
}
|
|
869
|
+
),
|
|
870
|
+
/* @__PURE__ */ i(
|
|
871
|
+
"span",
|
|
872
|
+
{
|
|
873
|
+
style: {
|
|
874
|
+
fontSize: "0.8125em",
|
|
875
|
+
fontWeight: 700,
|
|
876
|
+
color: n ? e.bad : e.t1
|
|
877
|
+
},
|
|
878
|
+
children: t.name
|
|
879
|
+
}
|
|
880
|
+
)
|
|
881
|
+
] }),
|
|
882
|
+
/* @__PURE__ */ h(
|
|
883
|
+
"div",
|
|
884
|
+
{
|
|
885
|
+
style: {
|
|
886
|
+
display: "flex",
|
|
887
|
+
alignItems: "center",
|
|
888
|
+
gap: 6,
|
|
889
|
+
flexShrink: 0
|
|
890
|
+
},
|
|
891
|
+
children: [
|
|
892
|
+
/* @__PURE__ */ i(ie, { sel: t, tokens: e }),
|
|
893
|
+
/* @__PURE__ */ i(
|
|
894
|
+
"button",
|
|
895
|
+
{
|
|
896
|
+
onClick: () => o(t.id),
|
|
897
|
+
onMouseEnter: () => m(!0),
|
|
898
|
+
onMouseLeave: () => m(!1),
|
|
899
|
+
title: "Remove",
|
|
900
|
+
style: {
|
|
901
|
+
background: u ? "rgba(239,68,68,.08)" : "none",
|
|
902
|
+
border: "none",
|
|
903
|
+
cursor: "pointer",
|
|
904
|
+
color: u ? e.bad : e.t2,
|
|
905
|
+
fontSize: "0.8125em",
|
|
906
|
+
padding: "3px 5px",
|
|
907
|
+
borderRadius: p.xs,
|
|
908
|
+
transition: "color .15s, background .15s",
|
|
909
|
+
lineHeight: 1,
|
|
910
|
+
display: "flex",
|
|
911
|
+
alignItems: "center"
|
|
912
|
+
},
|
|
913
|
+
children: /* @__PURE__ */ i(Jt, {})
|
|
914
|
+
}
|
|
915
|
+
)
|
|
916
|
+
]
|
|
917
|
+
}
|
|
918
|
+
)
|
|
919
|
+
]
|
|
920
|
+
}
|
|
921
|
+
),
|
|
922
|
+
/* @__PURE__ */ i(
|
|
923
|
+
"div",
|
|
924
|
+
{
|
|
925
|
+
style: {
|
|
926
|
+
fontSize: "0.6875em",
|
|
927
|
+
color: e.t3,
|
|
928
|
+
marginBottom: 6,
|
|
929
|
+
...n && { paddingLeft: 8 }
|
|
930
|
+
},
|
|
931
|
+
children: Gt(t.market, r, s.marketLabels)
|
|
932
|
+
}
|
|
933
|
+
),
|
|
934
|
+
/* @__PURE__ */ i(
|
|
935
|
+
"div",
|
|
936
|
+
{
|
|
937
|
+
style: n ? { background: e.s3, paddingTop: 7, paddingBottom: 7 } : {
|
|
938
|
+
background: e.s3,
|
|
939
|
+
borderRadius: p.sm,
|
|
940
|
+
padding: "7px 10px",
|
|
941
|
+
marginTop: 6
|
|
942
|
+
},
|
|
943
|
+
children: /* @__PURE__ */ h(
|
|
944
|
+
"div",
|
|
945
|
+
{
|
|
946
|
+
style: {
|
|
947
|
+
display: "flex",
|
|
948
|
+
alignItems: "stretch",
|
|
949
|
+
gap: 10,
|
|
950
|
+
padding: n ? `0 ${a.sm}` : 0
|
|
951
|
+
},
|
|
952
|
+
children: [
|
|
953
|
+
/* @__PURE__ */ i(
|
|
954
|
+
"div",
|
|
955
|
+
{
|
|
956
|
+
style: {
|
|
957
|
+
flex: "0 1 auto",
|
|
958
|
+
minWidth: 0,
|
|
959
|
+
display: "flex",
|
|
960
|
+
alignItems: "center"
|
|
961
|
+
},
|
|
962
|
+
children: /* @__PURE__ */ h(
|
|
963
|
+
"div",
|
|
964
|
+
{
|
|
965
|
+
style: {
|
|
966
|
+
display: "grid",
|
|
967
|
+
gridTemplateColumns: b ? "auto minmax(0, auto) auto" : "auto minmax(0, auto)",
|
|
968
|
+
columnGap: 6,
|
|
969
|
+
rowGap: a["2xs"],
|
|
970
|
+
alignItems: "center"
|
|
971
|
+
},
|
|
972
|
+
children: [
|
|
973
|
+
/* @__PURE__ */ i(
|
|
974
|
+
et,
|
|
975
|
+
{
|
|
976
|
+
logo: t.participantOneLogo,
|
|
977
|
+
name: t.participantOne ?? "",
|
|
978
|
+
tokens: e
|
|
979
|
+
}
|
|
980
|
+
),
|
|
981
|
+
/* @__PURE__ */ i(
|
|
982
|
+
"span",
|
|
983
|
+
{
|
|
984
|
+
style: {
|
|
985
|
+
fontSize: "0.75em",
|
|
986
|
+
color: e.t1,
|
|
987
|
+
overflow: "hidden",
|
|
988
|
+
textOverflow: "ellipsis",
|
|
989
|
+
whiteSpace: "nowrap"
|
|
990
|
+
},
|
|
991
|
+
children: t.participantOne
|
|
992
|
+
}
|
|
993
|
+
),
|
|
994
|
+
b && (g !== void 0 ? /* @__PURE__ */ i(nt, { score: g, tokens: e }) : /* @__PURE__ */ i("span", {})),
|
|
995
|
+
t.participantTwo && /* @__PURE__ */ i(
|
|
996
|
+
et,
|
|
997
|
+
{
|
|
998
|
+
logo: t.participantTwoLogo,
|
|
999
|
+
name: t.participantTwo,
|
|
1000
|
+
tokens: e
|
|
1001
|
+
}
|
|
1002
|
+
),
|
|
1003
|
+
t.participantTwo && /* @__PURE__ */ i(
|
|
1004
|
+
"span",
|
|
1005
|
+
{
|
|
1006
|
+
style: {
|
|
1007
|
+
fontSize: "0.75em",
|
|
1008
|
+
color: e.t1,
|
|
1009
|
+
overflow: "hidden",
|
|
1010
|
+
textOverflow: "ellipsis",
|
|
1011
|
+
whiteSpace: "nowrap"
|
|
1012
|
+
},
|
|
1013
|
+
children: t.participantTwo
|
|
1014
|
+
}
|
|
1015
|
+
),
|
|
1016
|
+
t.participantTwo && b && (y !== void 0 ? /* @__PURE__ */ i(nt, { score: y, tokens: e }) : /* @__PURE__ */ i("span", {}))
|
|
1017
|
+
]
|
|
1018
|
+
}
|
|
1019
|
+
)
|
|
1020
|
+
}
|
|
1021
|
+
),
|
|
1022
|
+
(t.matchStatus === "inprogress" || d || t.competition) && /* @__PURE__ */ h(
|
|
1023
|
+
"div",
|
|
1024
|
+
{
|
|
1025
|
+
style: {
|
|
1026
|
+
marginLeft: "auto",
|
|
1027
|
+
flexShrink: 0,
|
|
1028
|
+
display: "flex",
|
|
1029
|
+
flexDirection: "column",
|
|
1030
|
+
justifyContent: "space-between",
|
|
1031
|
+
alignItems: "flex-end"
|
|
1032
|
+
},
|
|
1033
|
+
children: [
|
|
1034
|
+
t.matchStatus === "inprogress" ? /* @__PURE__ */ h(
|
|
1035
|
+
"span",
|
|
1036
|
+
{
|
|
1037
|
+
style: {
|
|
1038
|
+
display: "inline-flex",
|
|
1039
|
+
alignItems: "center",
|
|
1040
|
+
gap: 3,
|
|
1041
|
+
backgroundColor: e.bad,
|
|
1042
|
+
color: "#fff",
|
|
1043
|
+
fontSize: "0.6em",
|
|
1044
|
+
fontWeight: 700,
|
|
1045
|
+
letterSpacing: "0.07em",
|
|
1046
|
+
padding: "2px 5px",
|
|
1047
|
+
borderRadius: 3,
|
|
1048
|
+
textTransform: "uppercase",
|
|
1049
|
+
whiteSpace: "nowrap",
|
|
1050
|
+
fontFamily: e.font
|
|
1051
|
+
},
|
|
1052
|
+
children: [
|
|
1053
|
+
/* @__PURE__ */ i(te, {}),
|
|
1054
|
+
r("betslip.live")
|
|
1055
|
+
]
|
|
1056
|
+
}
|
|
1057
|
+
) : d ? /* @__PURE__ */ i(
|
|
1058
|
+
"span",
|
|
1059
|
+
{
|
|
1060
|
+
style: {
|
|
1061
|
+
fontSize: "0.625em",
|
|
1062
|
+
color: e.t3,
|
|
1063
|
+
whiteSpace: "nowrap"
|
|
1064
|
+
},
|
|
1065
|
+
children: d
|
|
1066
|
+
}
|
|
1067
|
+
) : null,
|
|
1068
|
+
t.competition && /* @__PURE__ */ i(
|
|
1069
|
+
oe,
|
|
1070
|
+
{
|
|
1071
|
+
name: t.competition.name,
|
|
1072
|
+
logo: t.competition.logo,
|
|
1073
|
+
tokens: e
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1076
|
+
]
|
|
1077
|
+
}
|
|
1078
|
+
)
|
|
1079
|
+
]
|
|
1080
|
+
}
|
|
1081
|
+
)
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
]
|
|
1085
|
+
}
|
|
1086
|
+
);
|
|
1087
|
+
}, ot = ({
|
|
1088
|
+
tokens: t,
|
|
1089
|
+
isSide: e
|
|
1090
|
+
}) => {
|
|
1091
|
+
const { labels: n, selections: o, conflictIds: s } = k(), { t: r } = R();
|
|
1092
|
+
return /* @__PURE__ */ h(N, { children: [
|
|
1093
|
+
/* @__PURE__ */ i(
|
|
1094
|
+
at,
|
|
1095
|
+
{
|
|
1096
|
+
styles: st`
|
|
1097
|
+
.bs-scrollbody::-webkit-scrollbar {
|
|
1098
|
+
width: 8px;
|
|
1099
|
+
}
|
|
1100
|
+
.bs-scrollbody::-webkit-scrollbar-track {
|
|
1101
|
+
background: transparent;
|
|
1102
|
+
margin: 6px 0;
|
|
1103
|
+
}
|
|
1104
|
+
.bs-scrollbody::-webkit-scrollbar-thumb {
|
|
1105
|
+
background: ${t.s3};
|
|
1106
|
+
border-radius: 6px;
|
|
1107
|
+
border-right: 4px solid transparent;
|
|
1108
|
+
background-clip: padding-box;
|
|
1109
|
+
}
|
|
1110
|
+
`
|
|
1111
|
+
}
|
|
1112
|
+
),
|
|
1113
|
+
/* @__PURE__ */ i(
|
|
1114
|
+
"div",
|
|
1115
|
+
{
|
|
1116
|
+
className: "bs-scrollbody",
|
|
1117
|
+
style: {
|
|
1118
|
+
overflowY: "auto",
|
|
1119
|
+
flex: 1,
|
|
1120
|
+
minHeight: 0,
|
|
1121
|
+
maxHeight: e ? "none" : 300,
|
|
1122
|
+
background: t.s1
|
|
1123
|
+
},
|
|
1124
|
+
children: o.length === 0 ? /* @__PURE__ */ h(
|
|
1125
|
+
"div",
|
|
1126
|
+
{
|
|
1127
|
+
style: {
|
|
1128
|
+
padding: "36px 20px",
|
|
1129
|
+
textAlign: "center",
|
|
1130
|
+
fontFamily: t.font
|
|
1131
|
+
},
|
|
1132
|
+
children: [
|
|
1133
|
+
/* @__PURE__ */ i("div", { style: { fontSize: "2.5em", opacity: 0.25, marginBottom: 14 }, children: "🎯" }),
|
|
1134
|
+
/* @__PURE__ */ i(
|
|
1135
|
+
"div",
|
|
1136
|
+
{
|
|
1137
|
+
style: {
|
|
1138
|
+
fontSize: "0.875em",
|
|
1139
|
+
fontWeight: 600,
|
|
1140
|
+
color: t.t1,
|
|
1141
|
+
marginBottom: 6
|
|
1142
|
+
},
|
|
1143
|
+
children: n.emptyTitle || r("betslip.emptyTitle")
|
|
1144
|
+
}
|
|
1145
|
+
),
|
|
1146
|
+
/* @__PURE__ */ i("div", { style: { fontSize: "0.75em", color: t.t2, lineHeight: 1.5 }, children: n.emptyDescription || r("betslip.emptyDescription") })
|
|
1147
|
+
]
|
|
1148
|
+
}
|
|
1149
|
+
) : o.map((l) => /* @__PURE__ */ i(
|
|
1150
|
+
re,
|
|
1151
|
+
{
|
|
1152
|
+
sel: l,
|
|
1153
|
+
tokens: t,
|
|
1154
|
+
isConflict: s.has(l.id)
|
|
1155
|
+
},
|
|
1156
|
+
l.id
|
|
1157
|
+
))
|
|
1158
|
+
}
|
|
1159
|
+
)
|
|
1160
|
+
] });
|
|
1161
|
+
}, ae = O.button`
|
|
1162
|
+
background: ${({ primary: t }) => t};
|
|
1163
|
+
color: #fff;
|
|
1164
|
+
border: none;
|
|
1165
|
+
width: 44px;
|
|
1166
|
+
cursor: pointer;
|
|
1167
|
+
flex-shrink: 0;
|
|
1168
|
+
&:hover {
|
|
1169
|
+
background: ${({ primary: t }) => t};
|
|
1170
|
+
opacity: 0.88;
|
|
1171
|
+
}
|
|
1172
|
+
`, it = ({ tokens: t, brandingLogoUrl: e }) => {
|
|
1173
|
+
const {
|
|
1174
|
+
labels: n,
|
|
1175
|
+
selections: o,
|
|
1176
|
+
combStake: s,
|
|
1177
|
+
setCombStake: r,
|
|
1178
|
+
conflictIds: l,
|
|
1179
|
+
currency: a,
|
|
1180
|
+
stakePresets: p
|
|
1181
|
+
} = k(), { t: c } = R(), u = _(), m = T(), d = D(), b = o.filter(
|
|
1182
|
+
(w) => w.status === "active" || !w.status
|
|
1183
|
+
), f = lt(b), g = parseFloat(s) || 0, y = g * f, x = l.size > 0, v = (w) => {
|
|
1184
|
+
r(String(w));
|
|
1185
|
+
}, S = M.useRef(null);
|
|
1186
|
+
return /* @__PURE__ */ h(N, { children: [
|
|
1187
|
+
/* @__PURE__ */ i(
|
|
1188
|
+
at,
|
|
1189
|
+
{
|
|
1190
|
+
styles: st`
|
|
1191
|
+
.bs-stake-input::-webkit-outer-spin-button,
|
|
1192
|
+
.bs-stake-input::-webkit-inner-spin-button {
|
|
1193
|
+
-webkit-appearance: none;
|
|
1194
|
+
margin: 0;
|
|
1195
|
+
}
|
|
1196
|
+
.bs-stake-input {
|
|
1197
|
+
-moz-appearance: textfield;
|
|
1198
|
+
}
|
|
1199
|
+
`
|
|
1200
|
+
}
|
|
1201
|
+
),
|
|
1202
|
+
/* @__PURE__ */ i(
|
|
1203
|
+
"div",
|
|
1204
|
+
{
|
|
1205
|
+
style: {
|
|
1206
|
+
padding: `${u.sm} 14px`,
|
|
1207
|
+
flexShrink: 0,
|
|
1208
|
+
borderTop: `${d.size} solid ${t.bdr}`,
|
|
1209
|
+
background: t.s3,
|
|
1210
|
+
fontFamily: t.font
|
|
1211
|
+
},
|
|
1212
|
+
children: /* @__PURE__ */ h(N, { children: [
|
|
1213
|
+
b.length > 0 && /* @__PURE__ */ h(
|
|
1214
|
+
"div",
|
|
1215
|
+
{
|
|
1216
|
+
style: {
|
|
1217
|
+
display: "flex",
|
|
1218
|
+
justifyContent: "space-between",
|
|
1219
|
+
fontSize: "0.75em",
|
|
1220
|
+
color: t.t2,
|
|
1221
|
+
padding: "3px 0",
|
|
1222
|
+
paddingBottom: u.xs
|
|
1223
|
+
},
|
|
1224
|
+
children: [
|
|
1225
|
+
/* @__PURE__ */ i("span", { children: n.combinedOddsLabel || c("betslip.combinedOddsLabel") }),
|
|
1226
|
+
/* @__PURE__ */ h(
|
|
1227
|
+
"span",
|
|
1228
|
+
{
|
|
1229
|
+
style: {
|
|
1230
|
+
display: "flex",
|
|
1231
|
+
alignItems: "center",
|
|
1232
|
+
gap: u["2xs"],
|
|
1233
|
+
fontSize: "0.8125em",
|
|
1234
|
+
fontWeight: 600,
|
|
1235
|
+
color: t.t1
|
|
1236
|
+
},
|
|
1237
|
+
children: [
|
|
1238
|
+
/* @__PURE__ */ i("span", { style: { fontSize: "0.5625em", color: t.ok }, children: "▲" }),
|
|
1239
|
+
f.toFixed(2)
|
|
1240
|
+
]
|
|
1241
|
+
}
|
|
1242
|
+
)
|
|
1243
|
+
]
|
|
1244
|
+
}
|
|
1245
|
+
),
|
|
1246
|
+
/* @__PURE__ */ h(
|
|
1247
|
+
"div",
|
|
1248
|
+
{
|
|
1249
|
+
style: {
|
|
1250
|
+
display: "flex",
|
|
1251
|
+
alignItems: "center",
|
|
1252
|
+
gap: 6,
|
|
1253
|
+
marginBottom: 10
|
|
1254
|
+
},
|
|
1255
|
+
children: [
|
|
1256
|
+
/* @__PURE__ */ i(
|
|
1257
|
+
"span",
|
|
1258
|
+
{
|
|
1259
|
+
style: { fontSize: "0.75em", color: t.t2, flexShrink: 0 },
|
|
1260
|
+
children: n.stakeLabel || c("betslip.stakeLabel")
|
|
1261
|
+
}
|
|
1262
|
+
),
|
|
1263
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, position: "relative", marginBottom: 0 }, children: /* @__PURE__ */ i(
|
|
1264
|
+
"input",
|
|
1265
|
+
{
|
|
1266
|
+
ref: S,
|
|
1267
|
+
className: "bs-stake-input",
|
|
1268
|
+
type: "number",
|
|
1269
|
+
min: "0",
|
|
1270
|
+
step: "1",
|
|
1271
|
+
value: s,
|
|
1272
|
+
onChange: (w) => r(w.target.value),
|
|
1273
|
+
placeholder: "0",
|
|
1274
|
+
onFocus: (w) => w.currentTarget.style.borderColor = t.primary,
|
|
1275
|
+
onBlur: (w) => w.currentTarget.style.borderColor = t.bdr,
|
|
1276
|
+
style: {
|
|
1277
|
+
width: "100%",
|
|
1278
|
+
background: t.s1,
|
|
1279
|
+
border: `${d.size} solid ${t.bdr}`,
|
|
1280
|
+
color: t.t1,
|
|
1281
|
+
padding: "10px",
|
|
1282
|
+
borderRadius: m.sm,
|
|
1283
|
+
fontSize: "0.875em",
|
|
1284
|
+
fontFamily: t.font,
|
|
1285
|
+
outline: "none",
|
|
1286
|
+
transition: "border-color .15s",
|
|
1287
|
+
boxSizing: "border-box"
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
) }),
|
|
1291
|
+
p.map((w) => /* @__PURE__ */ i(
|
|
1292
|
+
ae,
|
|
1293
|
+
{
|
|
1294
|
+
primary: t.primary,
|
|
1295
|
+
onClick: () => v(w),
|
|
1296
|
+
style: {
|
|
1297
|
+
padding: "10px 0",
|
|
1298
|
+
borderRadius: m.sm,
|
|
1299
|
+
fontSize: "0.8125em",
|
|
1300
|
+
fontWeight: 700,
|
|
1301
|
+
fontFamily: t.font,
|
|
1302
|
+
textAlign: "center"
|
|
1303
|
+
},
|
|
1304
|
+
children: w
|
|
1305
|
+
},
|
|
1306
|
+
w
|
|
1307
|
+
))
|
|
1308
|
+
]
|
|
1309
|
+
}
|
|
1310
|
+
),
|
|
1311
|
+
/* @__PURE__ */ h("div", { style: { marginBottom: 10 }, children: [
|
|
1312
|
+
/* @__PURE__ */ h(
|
|
1313
|
+
"div",
|
|
1314
|
+
{
|
|
1315
|
+
style: {
|
|
1316
|
+
display: "flex",
|
|
1317
|
+
justifyContent: "space-between",
|
|
1318
|
+
fontSize: "0.8125em",
|
|
1319
|
+
color: t.t1,
|
|
1320
|
+
fontWeight: 600,
|
|
1321
|
+
padding: "3px 0"
|
|
1322
|
+
},
|
|
1323
|
+
children: [
|
|
1324
|
+
/* @__PURE__ */ i("span", { children: n.totalStakeLabel || c("betslip.totalStakeLabel") }),
|
|
1325
|
+
/* @__PURE__ */ i("span", { children: g > 0 ? `${g.toFixed(2)}${a}` : "—" })
|
|
1326
|
+
]
|
|
1327
|
+
}
|
|
1328
|
+
),
|
|
1329
|
+
/* @__PURE__ */ h(
|
|
1330
|
+
"div",
|
|
1331
|
+
{
|
|
1332
|
+
style: {
|
|
1333
|
+
display: "flex",
|
|
1334
|
+
justifyContent: "space-between",
|
|
1335
|
+
fontSize: "0.8125em",
|
|
1336
|
+
color: t.t1,
|
|
1337
|
+
fontWeight: 600,
|
|
1338
|
+
padding: "3px 0",
|
|
1339
|
+
borderTop: `${d.size} solid ${t.bdr}`
|
|
1340
|
+
},
|
|
1341
|
+
children: [
|
|
1342
|
+
/* @__PURE__ */ i("span", { children: n.potentialWinLabel || c("betslip.potentialWinLabel") }),
|
|
1343
|
+
/* @__PURE__ */ i(
|
|
1344
|
+
"span",
|
|
1345
|
+
{
|
|
1346
|
+
style: {
|
|
1347
|
+
color: y > 0 ? t.primary : void 0
|
|
1348
|
+
},
|
|
1349
|
+
children: y > 0 ? y.toFixed(2) : "—"
|
|
1350
|
+
}
|
|
1351
|
+
)
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
] }),
|
|
1356
|
+
/* @__PURE__ */ i(
|
|
1357
|
+
pt,
|
|
1358
|
+
{
|
|
1359
|
+
tokens: t,
|
|
1360
|
+
brandingLogoUrl: e,
|
|
1361
|
+
hasConflicts: x
|
|
1362
|
+
}
|
|
1363
|
+
),
|
|
1364
|
+
n.disclaimer && /* @__PURE__ */ i(
|
|
1365
|
+
"div",
|
|
1366
|
+
{
|
|
1367
|
+
style: {
|
|
1368
|
+
fontSize: "0.625em",
|
|
1369
|
+
color: t.t3,
|
|
1370
|
+
textAlign: "center",
|
|
1371
|
+
marginTop: u.xs,
|
|
1372
|
+
lineHeight: 1.5,
|
|
1373
|
+
padding: `0 ${u["3xs"]}`
|
|
1374
|
+
},
|
|
1375
|
+
children: n.disclaimer
|
|
1376
|
+
}
|
|
1377
|
+
)
|
|
1378
|
+
] })
|
|
1379
|
+
}
|
|
1380
|
+
)
|
|
1381
|
+
] });
|
|
1382
|
+
};
|
|
1383
|
+
function se(t, e) {
|
|
1384
|
+
const [n, o] = L([]), [s, r] = L((e == null ? void 0 : e.length) > 0);
|
|
1385
|
+
return B(() => {
|
|
1386
|
+
if (!(e != null && e.length)) {
|
|
1387
|
+
o([]), r(!1);
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
const l = e.map((p) => {
|
|
1391
|
+
const c = p.split(":"), u = c[c.length - 1], m = c[c.length - 2];
|
|
1392
|
+
return { eventId: c.slice(0, c.length - 2).join(":"), market: m, outcome: u };
|
|
1393
|
+
}), a = [...new Set(l.map((p) => p.eventId))];
|
|
1394
|
+
r(!0), t.football.getMatches({ matchIds: a }).then((p) => {
|
|
1395
|
+
const c = new Map(
|
|
1396
|
+
p.data.map((m) => [m.id, m])
|
|
1397
|
+
), u = l.flatMap(
|
|
1398
|
+
({ eventId: m, market: d, outcome: b }) => {
|
|
1399
|
+
var g, y, x, v, S;
|
|
1400
|
+
const f = c.get(m);
|
|
1401
|
+
return f ? [
|
|
1402
|
+
{
|
|
1403
|
+
eventId: m,
|
|
1404
|
+
market: d,
|
|
1405
|
+
outcome: b,
|
|
1406
|
+
participantOne: {
|
|
1407
|
+
name: f.homeTeam.name,
|
|
1408
|
+
logo: (g = f.homeTeam.assets) == null ? void 0 : g.logo
|
|
1409
|
+
},
|
|
1410
|
+
participantTwo: {
|
|
1411
|
+
name: f.awayTeam.name,
|
|
1412
|
+
logo: (y = f.awayTeam.assets) == null ? void 0 : y.logo
|
|
1413
|
+
},
|
|
1414
|
+
startAt: f.kickoffAt,
|
|
1415
|
+
matchStatus: (x = f.status) == null ? void 0 : x.type,
|
|
1416
|
+
competition: (v = f.context) != null && v.competition ? {
|
|
1417
|
+
name: f.context.competition.name,
|
|
1418
|
+
logo: (S = f.context.competition.assets) == null ? void 0 : S.logo
|
|
1419
|
+
} : void 0
|
|
1420
|
+
}
|
|
1421
|
+
] : [];
|
|
1422
|
+
}
|
|
1423
|
+
);
|
|
1424
|
+
o(u);
|
|
1425
|
+
}).catch(() => o([])).finally(() => r(!1));
|
|
1426
|
+
}, [JSON.stringify(e)]), { selectionInputs: n, loading: s };
|
|
1427
|
+
}
|
|
1428
|
+
const le = W`
|
|
1429
|
+
from { transform: translateY(100%); opacity: 0; }
|
|
1430
|
+
to { transform: translateY(0); opacity: 1; }
|
|
1431
|
+
`, ce = W`
|
|
1432
|
+
from { transform: translateY(-100%); opacity: 0; }
|
|
1433
|
+
to { transform: translateY(0); opacity: 1; }
|
|
1434
|
+
`;
|
|
1435
|
+
function de(t) {
|
|
1436
|
+
return t.startsWith("top") ? ce : le;
|
|
1437
|
+
}
|
|
1438
|
+
const pe = O.div`
|
|
1439
|
+
position: fixed;
|
|
1440
|
+
z-index: 999;
|
|
1441
|
+
animation: ${({ pos: t }) => de(t)} 0.22s ease;
|
|
1442
|
+
`, A = 320, rt = 340;
|
|
1443
|
+
function me(t) {
|
|
1444
|
+
return t === "bottom-right" ? { bottom: 16, right: 16, width: A } : t === "bottom-left" ? { bottom: 16, left: 16, width: A } : t === "top-right" ? { top: 16, right: 16, width: A } : t === "top-left" ? { top: 16, left: 16, width: A } : { bottom: 16, right: 16, width: A };
|
|
1445
|
+
}
|
|
1446
|
+
const fe = ({ props: t }) => {
|
|
1447
|
+
var E, I, U, C, F, z, Y, V, G, X;
|
|
1448
|
+
const { position: e = "bottom-right", brandingLogoUrl: n } = t, {
|
|
1449
|
+
open: o,
|
|
1450
|
+
setOpen: s,
|
|
1451
|
+
conflictIds: r,
|
|
1452
|
+
selections: l,
|
|
1453
|
+
maxSelections: a,
|
|
1454
|
+
bookmakerLogoUrl: p,
|
|
1455
|
+
bookmakerBackgroundColor: c,
|
|
1456
|
+
oddsReady: u
|
|
1457
|
+
} = k(), m = ((F = (C = (U = (I = (E = t.themeOptions) == null ? void 0 : E.colorSchemes) == null ? void 0 : I.light) == null ? void 0 : U.palette) == null ? void 0 : C.primary) == null ? void 0 : F.plainColor) != null || ((X = (G = (V = (Y = (z = t.themeOptions) == null ? void 0 : z.colorSchemes) == null ? void 0 : Y.dark) == null ? void 0 : V.palette) == null ? void 0 : G.primary) == null ? void 0 : X.plainColor) != null, d = jt(
|
|
1458
|
+
m ? void 0 : c
|
|
1459
|
+
), b = T(), f = D(), g = e.startsWith("side"), y = e === "top-right" || e === "top-left", x = r.size > 0, { t: v } = R();
|
|
1460
|
+
if (!u) return null;
|
|
1461
|
+
if (g) {
|
|
1462
|
+
const $ = e === "side-right", H = $ ? "right" : "left", K = n || p, mt = o ? rt : 0, ft = o ? "translateX(0)" : `translateX(${$ ? "100%" : "-100%"})`;
|
|
1463
|
+
return /* @__PURE__ */ h(
|
|
1464
|
+
"div",
|
|
1465
|
+
{
|
|
1466
|
+
style: {
|
|
1467
|
+
position: "fixed",
|
|
1468
|
+
top: 0,
|
|
1469
|
+
[H]: 0,
|
|
1470
|
+
zIndex: 999,
|
|
1471
|
+
height: "100vh",
|
|
1472
|
+
width: 0,
|
|
1473
|
+
pointerEvents: "none",
|
|
1474
|
+
overflow: "visible"
|
|
1475
|
+
},
|
|
1476
|
+
children: [
|
|
1477
|
+
/* @__PURE__ */ h(
|
|
1478
|
+
"div",
|
|
1479
|
+
{
|
|
1480
|
+
style: {
|
|
1481
|
+
position: "absolute",
|
|
1482
|
+
[H]: mt,
|
|
1483
|
+
top: "33%",
|
|
1484
|
+
transform: "translateY(-50%)",
|
|
1485
|
+
pointerEvents: "all",
|
|
1486
|
+
transition: `${H} 0.3s ease`,
|
|
1487
|
+
display: "flex",
|
|
1488
|
+
flexDirection: "column",
|
|
1489
|
+
alignItems: "center",
|
|
1490
|
+
gap: 6
|
|
1491
|
+
},
|
|
1492
|
+
children: [
|
|
1493
|
+
/* @__PURE__ */ i(
|
|
1494
|
+
"button",
|
|
1495
|
+
{
|
|
1496
|
+
onClick: () => s(!o),
|
|
1497
|
+
title: v(o ? "betslip.hide" : "betslip.show"),
|
|
1498
|
+
style: {
|
|
1499
|
+
position: "relative",
|
|
1500
|
+
display: "flex",
|
|
1501
|
+
alignItems: "center",
|
|
1502
|
+
justifyContent: "center",
|
|
1503
|
+
width: 32,
|
|
1504
|
+
height: 64,
|
|
1505
|
+
background: d.primary,
|
|
1506
|
+
border: "none",
|
|
1507
|
+
cursor: "pointer",
|
|
1508
|
+
borderRadius: $ ? "8px 0 0 8px" : "0 8px 8px 0",
|
|
1509
|
+
boxShadow: $ ? "-4px 0 12px rgba(0,0,0,.22)" : "4px 0 12px rgba(0,0,0,.22)",
|
|
1510
|
+
overflow: "hidden",
|
|
1511
|
+
padding: 0
|
|
1512
|
+
},
|
|
1513
|
+
children: K ? /* @__PURE__ */ i(
|
|
1514
|
+
"img",
|
|
1515
|
+
{
|
|
1516
|
+
src: K,
|
|
1517
|
+
alt: "brand",
|
|
1518
|
+
style: {
|
|
1519
|
+
position: "absolute",
|
|
1520
|
+
top: "50%",
|
|
1521
|
+
left: "50%",
|
|
1522
|
+
width: 52,
|
|
1523
|
+
height: 22,
|
|
1524
|
+
objectFit: "contain",
|
|
1525
|
+
transform: `translate(-50%, -50%) rotate(${$ ? "-90" : "90"}deg)`
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
) : /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
1529
|
+
/* @__PURE__ */ i(
|
|
1530
|
+
"div",
|
|
1531
|
+
{
|
|
1532
|
+
style: {
|
|
1533
|
+
width: 12,
|
|
1534
|
+
height: 2,
|
|
1535
|
+
background: "rgba(255,255,255,.7)",
|
|
1536
|
+
borderRadius: 1
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
),
|
|
1540
|
+
/* @__PURE__ */ i(
|
|
1541
|
+
"div",
|
|
1542
|
+
{
|
|
1543
|
+
style: {
|
|
1544
|
+
width: 12,
|
|
1545
|
+
height: 2,
|
|
1546
|
+
background: "rgba(255,255,255,.7)",
|
|
1547
|
+
borderRadius: 1
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
),
|
|
1551
|
+
/* @__PURE__ */ i(
|
|
1552
|
+
"div",
|
|
1553
|
+
{
|
|
1554
|
+
style: {
|
|
1555
|
+
width: 12,
|
|
1556
|
+
height: 2,
|
|
1557
|
+
background: "rgba(255,255,255,.7)",
|
|
1558
|
+
borderRadius: 1
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
)
|
|
1562
|
+
] })
|
|
1563
|
+
}
|
|
1564
|
+
),
|
|
1565
|
+
!o && a != null && /* @__PURE__ */ h(
|
|
1566
|
+
"div",
|
|
1567
|
+
{
|
|
1568
|
+
style: {
|
|
1569
|
+
fontSize: "0.625rem",
|
|
1570
|
+
fontWeight: 700,
|
|
1571
|
+
color: "#fff",
|
|
1572
|
+
fontFamily: d.font,
|
|
1573
|
+
background: d.primary,
|
|
1574
|
+
borderRadius: 4,
|
|
1575
|
+
padding: "2px 5px",
|
|
1576
|
+
whiteSpace: "nowrap",
|
|
1577
|
+
boxShadow: $ ? "-2px 2px 6px rgba(0,0,0,.2)" : "2px 2px 6px rgba(0,0,0,.2)"
|
|
1578
|
+
},
|
|
1579
|
+
children: [
|
|
1580
|
+
l.length,
|
|
1581
|
+
"/",
|
|
1582
|
+
a
|
|
1583
|
+
]
|
|
1584
|
+
}
|
|
1585
|
+
)
|
|
1586
|
+
]
|
|
1587
|
+
}
|
|
1588
|
+
),
|
|
1589
|
+
/* @__PURE__ */ h(
|
|
1590
|
+
"div",
|
|
1591
|
+
{
|
|
1592
|
+
style: {
|
|
1593
|
+
position: "absolute",
|
|
1594
|
+
top: 0,
|
|
1595
|
+
[H]: 0,
|
|
1596
|
+
width: rt,
|
|
1597
|
+
height: "100%",
|
|
1598
|
+
transform: ft,
|
|
1599
|
+
transition: "transform 0.3s ease",
|
|
1600
|
+
pointerEvents: o ? "all" : "none",
|
|
1601
|
+
display: "flex",
|
|
1602
|
+
flexDirection: "column",
|
|
1603
|
+
background: d.s1,
|
|
1604
|
+
boxShadow: $ ? "-6px 0 24px rgba(0,0,0,.18)" : "6px 0 24px rgba(0,0,0,.18)",
|
|
1605
|
+
outline: `${f.size} solid ${d.bdr}`
|
|
1606
|
+
},
|
|
1607
|
+
children: [
|
|
1608
|
+
/* @__PURE__ */ i(
|
|
1609
|
+
Q,
|
|
1610
|
+
{
|
|
1611
|
+
tokens: d,
|
|
1612
|
+
isSide: g,
|
|
1613
|
+
position: e,
|
|
1614
|
+
brandingLogoUrl: n
|
|
1615
|
+
}
|
|
1616
|
+
),
|
|
1617
|
+
x && /* @__PURE__ */ i(Z, { tokens: d }),
|
|
1618
|
+
/* @__PURE__ */ h(
|
|
1619
|
+
"div",
|
|
1620
|
+
{
|
|
1621
|
+
style: {
|
|
1622
|
+
display: "flex",
|
|
1623
|
+
flexDirection: "column",
|
|
1624
|
+
flex: 1,
|
|
1625
|
+
minHeight: 0,
|
|
1626
|
+
overflow: "hidden"
|
|
1627
|
+
},
|
|
1628
|
+
children: [
|
|
1629
|
+
/* @__PURE__ */ i(ot, { tokens: d, isSide: g }),
|
|
1630
|
+
/* @__PURE__ */ i(it, { tokens: d, brandingLogoUrl: n })
|
|
1631
|
+
]
|
|
1632
|
+
}
|
|
1633
|
+
)
|
|
1634
|
+
]
|
|
1635
|
+
}
|
|
1636
|
+
)
|
|
1637
|
+
]
|
|
1638
|
+
}
|
|
1639
|
+
);
|
|
1640
|
+
}
|
|
1641
|
+
const S = y ? `0 0 ${b.md} ${b.md}` : `${b.md} ${b.md} 0 0`, w = me(e);
|
|
1642
|
+
return /* @__PURE__ */ i(
|
|
1643
|
+
pe,
|
|
1644
|
+
{
|
|
1645
|
+
pos: e,
|
|
1646
|
+
style: {
|
|
1647
|
+
fontFamily: d.font,
|
|
1648
|
+
borderRadius: S,
|
|
1649
|
+
overflow: "hidden",
|
|
1650
|
+
boxShadow: y ? "0 4px 16px rgba(0,0,0,.2)" : "0 -4px 16px rgba(0,0,0,.2)",
|
|
1651
|
+
outline: `${f.size} solid ${d.primary}`,
|
|
1652
|
+
...w
|
|
1653
|
+
},
|
|
1654
|
+
children: /* @__PURE__ */ h(
|
|
1655
|
+
"div",
|
|
1656
|
+
{
|
|
1657
|
+
style: {
|
|
1658
|
+
display: "flex",
|
|
1659
|
+
flexDirection: "column",
|
|
1660
|
+
maxHeight: "calc(100vh - 64px)",
|
|
1661
|
+
background: d.s1
|
|
1662
|
+
},
|
|
1663
|
+
children: [
|
|
1664
|
+
/* @__PURE__ */ i(
|
|
1665
|
+
Q,
|
|
1666
|
+
{
|
|
1667
|
+
tokens: d,
|
|
1668
|
+
isSide: g,
|
|
1669
|
+
position: e,
|
|
1670
|
+
brandingLogoUrl: n
|
|
1671
|
+
}
|
|
1672
|
+
),
|
|
1673
|
+
x && /* @__PURE__ */ i(Z, { tokens: d }),
|
|
1674
|
+
!o && l.length > 0 && /* @__PURE__ */ i(
|
|
1675
|
+
Vt,
|
|
1676
|
+
{
|
|
1677
|
+
tokens: d,
|
|
1678
|
+
brandingLogoUrl: n
|
|
1679
|
+
}
|
|
1680
|
+
),
|
|
1681
|
+
o && /* @__PURE__ */ h(
|
|
1682
|
+
"div",
|
|
1683
|
+
{
|
|
1684
|
+
style: {
|
|
1685
|
+
display: "flex",
|
|
1686
|
+
flexDirection: "column",
|
|
1687
|
+
flex: 1,
|
|
1688
|
+
minHeight: 0,
|
|
1689
|
+
overflow: "hidden"
|
|
1690
|
+
},
|
|
1691
|
+
children: [
|
|
1692
|
+
/* @__PURE__ */ i(ot, { tokens: d, isSide: g }),
|
|
1693
|
+
/* @__PURE__ */ i(it, { tokens: d, brandingLogoUrl: n })
|
|
1694
|
+
]
|
|
1695
|
+
}
|
|
1696
|
+
)
|
|
1697
|
+
]
|
|
1698
|
+
}
|
|
1699
|
+
)
|
|
1700
|
+
}
|
|
1701
|
+
);
|
|
1702
|
+
}, ue = (t) => {
|
|
1703
|
+
const [e, n] = L([]), { selectionInputs: o, loading: s } = se(
|
|
1704
|
+
t.sdk,
|
|
1705
|
+
e
|
|
1706
|
+
), r = o.filter(
|
|
1707
|
+
(c) => c.matchStatus !== "finished"
|
|
1708
|
+
), { oddsMap: l } = Ut(
|
|
1709
|
+
t.sdk,
|
|
1710
|
+
r,
|
|
1711
|
+
t.oddsPollingInterval || 3e4
|
|
1712
|
+
), a = j((c) => {
|
|
1713
|
+
const u = c.split(":"), m = u[u.length - 2], d = u.slice(0, u.length - 2).join(":");
|
|
1714
|
+
n((b) => {
|
|
1715
|
+
const f = b.findIndex((g) => {
|
|
1716
|
+
const y = g.split(":");
|
|
1717
|
+
return y.slice(0, y.length - 2).join(":") === d && y[y.length - 2] === m;
|
|
1718
|
+
});
|
|
1719
|
+
if (f !== -1) {
|
|
1720
|
+
const g = [...b];
|
|
1721
|
+
return g[f] = c, g;
|
|
1722
|
+
}
|
|
1723
|
+
return [...b, c];
|
|
1724
|
+
});
|
|
1725
|
+
}, []), p = j((c) => {
|
|
1726
|
+
n((u) => u.filter((m) => m !== c));
|
|
1727
|
+
}, []);
|
|
1728
|
+
return B(() => {
|
|
1729
|
+
o.filter((c) => c.matchStatus === "finished").forEach((c) => p(`${c.eventId}:${c.market}:${c.outcome}`));
|
|
1730
|
+
}, [o, p]), B(() => (J._mount({ setSelection: a, removeSelection: p }), () => J._unmount()), [a, p]), !e.length || !r.length && s ? null : /* @__PURE__ */ i(
|
|
1731
|
+
Nt,
|
|
1732
|
+
{
|
|
1733
|
+
labels: t.labels,
|
|
1734
|
+
initialSelections: r,
|
|
1735
|
+
maxSelections: t.maxSelections,
|
|
1736
|
+
currency: t.currency,
|
|
1737
|
+
stakePresets: t.stakePresets,
|
|
1738
|
+
ctaUrlTemplate: t.ctaUrlTemplate,
|
|
1739
|
+
onExternalRemove: p,
|
|
1740
|
+
sharedOddsMap: l,
|
|
1741
|
+
children: /* @__PURE__ */ i(fe, { props: t })
|
|
1742
|
+
}
|
|
1743
|
+
);
|
|
1744
|
+
}, Ce = (t) => /* @__PURE__ */ i(
|
|
1745
|
+
Ct,
|
|
1746
|
+
{
|
|
1747
|
+
packageName: "betslip",
|
|
1748
|
+
language: t.language,
|
|
1749
|
+
themeOptions: t.themeOptions,
|
|
1750
|
+
sdk: t.sdk,
|
|
1751
|
+
entityId: "",
|
|
1752
|
+
children: /* @__PURE__ */ i(ue, { ...t })
|
|
1753
|
+
}
|
|
1754
|
+
);
|
|
1755
|
+
export {
|
|
1756
|
+
Ce as M,
|
|
1757
|
+
J as b
|
|
1758
|
+
};
|