@everymatrix/tournament-details-page 0.0.2 → 0.0.4
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/components/{TournamentDetails-upe3WFia.cjs → TournamentDetails-AYkmST0l.cjs} +5 -5
- package/components/{TournamentDetails-CJVSWVXD.js → TournamentDetails-CIK1Vnx8.js} +684 -684
- package/components/{TournamentDetails-amGR_-Hv.js → TournamentDetails-glnpe9gf.js} +306 -306
- package/components/TournamentDetailsPage-85B_WTCl.cjs +63 -0
- package/components/{TournamentDetailsPage-B21wsWnv.js → TournamentDetailsPage-D6daHDII.js} +116 -116
- package/components/{TournamentDetailsPage-DW00w9RP.js → TournamentDetailsPage-DCB9anwm.js} +153 -153
- package/components/TournamentGames-0RUJ48Xu.js +362 -0
- package/components/TournamentGames-3qu_5rFn.cjs +26 -0
- package/components/TournamentGames-CDfNoeoq.js +335 -0
- package/components/TournamentLeaderboard-5oGHOpP6.js +794 -0
- package/components/TournamentLeaderboard-BUiKtCk5.cjs +36 -0
- package/components/TournamentLeaderboard-CF-QWN1C.js +810 -0
- package/es2015/tournament-details-page.cjs +1 -1
- package/es2015/tournament-details-page.js +1 -1
- package/esnext/tournament-details-page.js +1 -1
- package/package.json +1 -1
- package/components/TournamentDetailsPage-BlWvqhbK.js +0 -953
- package/components/TournamentDetailsPage-BsjnqhIP.cjs +0 -63
- package/components/TournamentDetailsPage-DnknTo0Y.js +0 -976
- package/components/TournamentDetailsPage-FO-PGATk.cjs +0 -63
- package/components/TournamentGames-B0ap9lHo.cjs +0 -26
- package/components/TournamentGames-BqZd-C9h.js +0 -351
- package/components/TournamentGames-C0-voJOi.js +0 -324
- package/components/TournamentGames-Cb2LP2tF.js +0 -324
- package/components/TournamentGames-D5Nyb0Nx.cjs +0 -26
- package/components/TournamentGames-DIIgfZ-E.js +0 -351
- package/components/TournamentLeaderboard-BjmkrtNX.js +0 -800
- package/components/TournamentLeaderboard-C1tIH5FA.js +0 -784
- package/components/TournamentLeaderboard-DWYhqHPh.cjs +0 -36
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
var ce = (T, m, i) => new Promise((K, z) => {
|
|
2
|
+
var D = (f) => {
|
|
3
|
+
try {
|
|
4
|
+
k(i.next(f));
|
|
5
|
+
} catch (G) {
|
|
6
|
+
z(G);
|
|
7
|
+
}
|
|
8
|
+
}, O = (f) => {
|
|
9
|
+
try {
|
|
10
|
+
k(i.throw(f));
|
|
11
|
+
} catch (G) {
|
|
12
|
+
z(G);
|
|
13
|
+
}
|
|
14
|
+
}, k = (f) => f.done ? K(f.value) : Promise.resolve(f.value).then(D, O);
|
|
15
|
+
k((i = i.apply(T, m)).next());
|
|
16
|
+
});
|
|
17
|
+
import { a as Fe, $ as He, m as Xe, e as Ue, p as P, u as de, s as R, f as Je, g as _, r as x, q as l, i as E, n as a, y as A, C as qe, E as w, A as L, h as v, j as Ke, k as Qe, F as Ve, w as y, l as S, J, K as q, I as ae, x as ne, L as oe, t as Ye, v as Ze, B as r, D as fe } from "./TournamentDetails-CIK1Vnx8.js";
|
|
18
|
+
import { g as $e } from "./TournamentDetailsPage-D6daHDII.js";
|
|
19
|
+
function et(T, m) {
|
|
20
|
+
Fe(T, m);
|
|
21
|
+
}
|
|
22
|
+
function tt(T) {
|
|
23
|
+
He.set(T);
|
|
24
|
+
}
|
|
25
|
+
const ue = {
|
|
26
|
+
en: {
|
|
27
|
+
previousButton: "Previous",
|
|
28
|
+
nextButton: "Next",
|
|
29
|
+
casinoTab: "Casino",
|
|
30
|
+
sportsbookTab: "Sportsbook",
|
|
31
|
+
gamesDescriptionTitle: "Participating games",
|
|
32
|
+
gamesDescriptionSubtitle: "Discover the games",
|
|
33
|
+
sportsRulesParseError: "Error parsing tournament rules",
|
|
34
|
+
noAvailableGames: "No games have been configured yet!"
|
|
35
|
+
},
|
|
36
|
+
tr: {
|
|
37
|
+
previousButton: "Previous",
|
|
38
|
+
nextButton: "Next",
|
|
39
|
+
casinoTab: "Casino",
|
|
40
|
+
sportsbookTab: "Sportsbook"
|
|
41
|
+
}
|
|
42
|
+
}, at = () => typeof window == "undefined";
|
|
43
|
+
var nt = _('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), ot = _('<p class="svelte-p7mf8l"> </p>'), st = _("<div></div>"), rt = _('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), lt = _('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'), it = _('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), pt = _("<button> </button>"), mt = _('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'), vt = _('<p class="NoGamesAvailable svelte-p7mf8l"> </p>'), ct = _('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div></div>'), dt = _('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');
|
|
44
|
+
const ft = {
|
|
45
|
+
hash: "svelte-p7mf8l",
|
|
46
|
+
code: `.svelte-p7mf8l,
|
|
47
|
+
.svelte-p7mf8l::before,
|
|
48
|
+
.svelte-p7mf8l::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.GamesDescription.svelte-p7mf8l {display:flex;flex-direction:column;gap:6px;margin:10px 0;.GamesDescriptionTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:16px;font-weight:600;}.GamesDescriptionSubTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:200;}}.TournamentGamesTabs.svelte-p7mf8l {display:flex;border-radius:50px;background-color:var(--emw-color-bg-section, #434343);padding:6px;margin-bottom:6px;width:100%;justify-content:center;.Tab:where(.svelte-p7mf8l) {padding:5px 20px;color:var(--emw-color-typography, #ffffff);width:100%;border-radius:50px;background-color:transparent;border:none;cursor:pointer;}.Active:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-elements, #4A4A4A);border:none;}}.TournamentRulesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:400;margin:10px 0;}.TournamentGamesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;gap:10px;background-color:var(--emw-color-bg-secondary, #333232);padding:10px;border-radius:6px;}.TournamentGamesContainer.svelte-p7mf8l {display:grid;gap:12px;grid-template-columns:repeat(auto-fit, minmax(min(150px, 100%), 1fr));.TournamentGameThumbnailSkeleton:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:linear-gradient(
|
|
49
|
+
to top,
|
|
50
|
+
var(--emw-color-primary, #FF1D4E),
|
|
51
|
+
transparent
|
|
52
|
+
);background-size:100% 200%;
|
|
53
|
+
animation: pulse 1.5s ease-in-out infinite;}.ImageContainer:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;}img:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;border-radius:6px;}.PlayButtonOverlay:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(0, 0, 0, 0.6);display:flex;justify-content:center;align-items:center;opacity:0;&:hover {opacity:1;transition:opacity 0.5s;}.PlayGameButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-primary, #FF1D4E);border-radius:6px;color:var(--emw-color-typography, #ffffff);padding:10px;border:none;outline:none;min-width:50%;cursor:pointer;&:hover {background-color:var(--emw-color-primary-hover, #ff3a65);cursor:pointer;}&:active {transform:scale(0.9);}}}}.PaginationWrapper.svelte-p7mf8l {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-p7mf8l) {display:flex;gap:3px;}.PaginationButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;border:none;outline:none;padding:10px;width:auto;cursor:pointer;&.Number {background-color:transparent;min-width:0;padding:0 10px;}&:hover {background-color:var(--emw-color-bg-elements, #4A4A4A);cursor:pointer;}&:active {transform:scale(0.9);}&:disabled {opacity:60%;pointer-events:none;}&.Active {background-color:var(--emw-color-bg-elements, #4A4A4A);}&.Elipsis {pointer-events:none;background-color:transparent;min-width:0;padding:0;align-self:center;}}}.NoGamesAvailable.svelte-p7mf8l {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:300;}.PaginationSkeleton.svelte-p7mf8l {display:flex;justify-content:space-between;gap:6px;}.PaginationSkeletonButton.svelte-p7mf8l {width:80px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.PaginationNumberSkeleton.svelte-p7mf8l {width:40px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.SkeletonShimmer.svelte-p7mf8l {width:100%;height:100%;background:linear-gradient(
|
|
54
|
+
90deg,
|
|
55
|
+
transparent 0%,
|
|
56
|
+
var(--emw-color-skeleton, #333232) 50%,
|
|
57
|
+
transparent 100%
|
|
58
|
+
);
|
|
59
|
+
animation: svelte-p7mf8l-loading 1.5s infinite;transform:translateX(-100%);}
|
|
60
|
+
|
|
61
|
+
@keyframes svelte-p7mf8l-loading {
|
|
62
|
+
0% {
|
|
63
|
+
transform: translateX(-100%);
|
|
64
|
+
}
|
|
65
|
+
100% {
|
|
66
|
+
transform: translateX(100%);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (min-width: 750px) {.TournamentGamesTabs.svelte-p7mf8l {width:fit-content;}.PaginationWrapper.svelte-p7mf8l {justify-content:end;gap:10px;}.PaginationButton.svelte-p7mf8l {width:auto;min-width:75px;}
|
|
71
|
+
}.Hidden.svelte-p7mf8l {display:none;}`
|
|
72
|
+
};
|
|
73
|
+
function ut(T, m) {
|
|
74
|
+
var me;
|
|
75
|
+
Xe(m, !0), Ue(T, ft);
|
|
76
|
+
const i = () => qe(Ve, "$_", K), [K, z] = Qe(), D = P(m, "initialGames"), O = P(m, "endpoint"), k = P(m, "language", 7, "en"), f = P(m, "session"), G = P(m, "tournamentid"), g = P(m, "gamesLimit", 7, 6), W = P(m, "totalGames"), Q = P(m, "platformProp", 7, null), M = P(m, "tournamentMetadata");
|
|
77
|
+
Object.keys(ue).forEach((e) => {
|
|
78
|
+
et(e, ue[e]);
|
|
79
|
+
});
|
|
80
|
+
const ge = () => {
|
|
81
|
+
tt(k());
|
|
82
|
+
};
|
|
83
|
+
de(() => {
|
|
84
|
+
ge();
|
|
85
|
+
});
|
|
86
|
+
let I = R(Je(D() || [])), C = R(!1), u = R(0), F = R(void 0);
|
|
87
|
+
const be = at() ? (me = Q()) != null ? me : "dk" : $e(window.navigator.userAgent), V = () => ce(this, null, function* () {
|
|
88
|
+
if (Y.has(a(H)))
|
|
89
|
+
return;
|
|
90
|
+
y(C, !0);
|
|
91
|
+
const e = new URL(`${O()}/v1/tournaments/${G()}`), t = new Headers();
|
|
92
|
+
f() && t.append("X-SessionId", f());
|
|
93
|
+
const n = { method: "GET", headers: t };
|
|
94
|
+
e.searchParams.append("filter", `id=${G()}`), e.searchParams.append("language", k()), e.searchParams.append("expand", "games"), e.searchParams.append("pagination", `games(limit=${g()},offset=${a(u)})`), e.searchParams.append("platform", be), fetch(e, n).then((o) => o.json()).then((o) => {
|
|
95
|
+
var p, s;
|
|
96
|
+
y(I, (s = (p = o == null ? void 0 : o.item) == null ? void 0 : p.games) == null ? void 0 : s.items, !0), Y.set(a(H), a(I));
|
|
97
|
+
}).catch((o) => console.log(o)).finally(() => y(C, !1));
|
|
98
|
+
}), he = () => {
|
|
99
|
+
const e = Math.ceil(W() / g()), t = Math.floor(a(u) / g()) + 1;
|
|
100
|
+
if (e <= 5)
|
|
101
|
+
return Array.from({ length: e }, (o, p) => p + 1);
|
|
102
|
+
const n = [];
|
|
103
|
+
return n.push(1), t <= 3 ? (n.push(2, 3), n.push("..."), n.push(e)) : t >= e - 2 ? (n.push("..."), n.push(e - 2, e - 1, e)) : (n.push("..."), n.push(t - 1, t, t + 1), n.push("..."), n.push(e)), n;
|
|
104
|
+
}, _e = () => {
|
|
105
|
+
a(u) < W() && (y(u, a(u) + g()), V());
|
|
106
|
+
}, xe = () => {
|
|
107
|
+
a(u) !== 0 && (y(u, a(u) - g()), V());
|
|
108
|
+
}, we = (e) => {
|
|
109
|
+
y(u, (e - 1) * g()), V();
|
|
110
|
+
}, ye = oe(he), H = oe(() => Math.floor(a(u) / g()) + 1);
|
|
111
|
+
let Y = /* @__PURE__ */ new Map([[1, D()]]), ke = oe(() => {
|
|
112
|
+
var e;
|
|
113
|
+
return (e = Y.get(a(H))) != null ? e : [];
|
|
114
|
+
}), B = R("casino");
|
|
115
|
+
const Pe = () => {
|
|
116
|
+
var n;
|
|
117
|
+
if (!M()) return;
|
|
118
|
+
const e = (n = M().sports) == null ? void 0 : n.rules;
|
|
119
|
+
let t;
|
|
120
|
+
if (e)
|
|
121
|
+
try {
|
|
122
|
+
t = JSON.parse(e), y(F, t[k()] || t["*"], !0);
|
|
123
|
+
} catch (o) {
|
|
124
|
+
console.log(o), y(F, `${i()("sportsRulesParseError")}`);
|
|
125
|
+
}
|
|
126
|
+
}, Se = (e) => {
|
|
127
|
+
window.postMessage(
|
|
128
|
+
{
|
|
129
|
+
type: "Tournaments:PlayGame",
|
|
130
|
+
launchUrl: e.launchUrl,
|
|
131
|
+
id: e.gameId,
|
|
132
|
+
platform: e.platform,
|
|
133
|
+
thumbnail: e.thumbnail,
|
|
134
|
+
name: e.name
|
|
135
|
+
},
|
|
136
|
+
window.location.href
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
de(() => {
|
|
140
|
+
Object.keys(M()).length !== 0 && Pe();
|
|
141
|
+
});
|
|
142
|
+
var Te = {
|
|
143
|
+
get initialGames() {
|
|
144
|
+
return D();
|
|
145
|
+
},
|
|
146
|
+
set initialGames(e) {
|
|
147
|
+
D(e), S();
|
|
148
|
+
},
|
|
149
|
+
get endpoint() {
|
|
150
|
+
return O();
|
|
151
|
+
},
|
|
152
|
+
set endpoint(e) {
|
|
153
|
+
O(e), S();
|
|
154
|
+
},
|
|
155
|
+
get language() {
|
|
156
|
+
return k();
|
|
157
|
+
},
|
|
158
|
+
set language(e = "en") {
|
|
159
|
+
k(e), S();
|
|
160
|
+
},
|
|
161
|
+
get session() {
|
|
162
|
+
return f();
|
|
163
|
+
},
|
|
164
|
+
set session(e) {
|
|
165
|
+
f(e), S();
|
|
166
|
+
},
|
|
167
|
+
get tournamentid() {
|
|
168
|
+
return G();
|
|
169
|
+
},
|
|
170
|
+
set tournamentid(e) {
|
|
171
|
+
G(e), S();
|
|
172
|
+
},
|
|
173
|
+
get gamesLimit() {
|
|
174
|
+
return g();
|
|
175
|
+
},
|
|
176
|
+
set gamesLimit(e = 6) {
|
|
177
|
+
g(e), S();
|
|
178
|
+
},
|
|
179
|
+
get totalGames() {
|
|
180
|
+
return W();
|
|
181
|
+
},
|
|
182
|
+
set totalGames(e) {
|
|
183
|
+
W(e), S();
|
|
184
|
+
},
|
|
185
|
+
get platformProp() {
|
|
186
|
+
return Q();
|
|
187
|
+
},
|
|
188
|
+
set platformProp(e = null) {
|
|
189
|
+
Q(e), S();
|
|
190
|
+
},
|
|
191
|
+
get tournamentMetadata() {
|
|
192
|
+
return M();
|
|
193
|
+
},
|
|
194
|
+
set tournamentMetadata(e) {
|
|
195
|
+
M(e), S();
|
|
196
|
+
}
|
|
197
|
+
}, Z = dt(), $ = l(Z), ee = l($), Ge = l(ee, !0);
|
|
198
|
+
r(ee);
|
|
199
|
+
var se = x(ee, 2), Ae = l(se, !0);
|
|
200
|
+
r(se), r($);
|
|
201
|
+
var re = x($, 2);
|
|
202
|
+
{
|
|
203
|
+
var Be = (e) => {
|
|
204
|
+
var t = nt(), n = l(t);
|
|
205
|
+
let o;
|
|
206
|
+
n.__click = () => y(B, "casino");
|
|
207
|
+
var p = l(n, !0);
|
|
208
|
+
r(n);
|
|
209
|
+
var s = x(n, 2);
|
|
210
|
+
let c;
|
|
211
|
+
s.__click = () => y(B, "sports");
|
|
212
|
+
var d = l(s, !0);
|
|
213
|
+
r(s), r(t), A(
|
|
214
|
+
(b, h) => {
|
|
215
|
+
o = L(n, 1, "Tab svelte-p7mf8l", null, o, { Active: a(B) === "casino" }), w(p, b), c = L(s, 1, "Tab svelte-p7mf8l", null, c, { Active: a(B) === "sports" }), w(d, h);
|
|
216
|
+
},
|
|
217
|
+
[() => i()("casinoTab"), () => i()("sportsbookTab")]
|
|
218
|
+
), v(e, t);
|
|
219
|
+
};
|
|
220
|
+
E(re, (e) => {
|
|
221
|
+
Object.keys(M()).length !== 0 && e(Be);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
var le = x(re, 2);
|
|
225
|
+
{
|
|
226
|
+
var Ne = (e) => {
|
|
227
|
+
var t = st();
|
|
228
|
+
let n;
|
|
229
|
+
J(t, 21, () => a(F), q, (o, p) => {
|
|
230
|
+
var s = ot(), c = l(s);
|
|
231
|
+
r(s), A((d) => {
|
|
232
|
+
var b;
|
|
233
|
+
return w(c, `${(b = a(p).rule) != null ? b : ""} ${d != null ? d : ""}`);
|
|
234
|
+
}, [() => i()("contribution")]), v(o, s);
|
|
235
|
+
}), r(t), A(() => n = L(t, 1, "TournamentRulesWrapper svelte-p7mf8l", null, n, { Hidden: a(B) === "casino" })), v(e, t);
|
|
236
|
+
};
|
|
237
|
+
E(le, (e) => {
|
|
238
|
+
a(F) && e(Ne);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
var X = x(le, 2);
|
|
242
|
+
let ie;
|
|
243
|
+
var De = l(X);
|
|
244
|
+
{
|
|
245
|
+
var Me = (e) => {
|
|
246
|
+
var t = ae(), n = ne(t);
|
|
247
|
+
J(n, 17, () => Array(g()), q, (o, p, s, c) => {
|
|
248
|
+
var d = rt();
|
|
249
|
+
v(o, d);
|
|
250
|
+
}), v(e, t);
|
|
251
|
+
}, je = (e) => {
|
|
252
|
+
var t = ae(), n = ne(t);
|
|
253
|
+
J(n, 17, () => a(ke), q, (o, p) => {
|
|
254
|
+
var s = lt();
|
|
255
|
+
s.__click = () => Se(a(p));
|
|
256
|
+
var c = l(s), d = l(c), b = x(d, 2), h = l(b), U = l(h, !0);
|
|
257
|
+
r(h), r(b), r(c), r(s), A(
|
|
258
|
+
(te) => {
|
|
259
|
+
fe(d, "src", `https:${a(p).thumbnail}`), fe(d, "alt", a(p).name), w(U, te);
|
|
260
|
+
},
|
|
261
|
+
[() => i()("play")]
|
|
262
|
+
), v(o, s);
|
|
263
|
+
}), v(e, t);
|
|
264
|
+
};
|
|
265
|
+
E(De, (e) => {
|
|
266
|
+
var t;
|
|
267
|
+
a(C) && ((t = a(I)) == null ? void 0 : t.length) === 0 ? e(Me) : e(je, !1);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
r(X);
|
|
271
|
+
var pe = x(X, 2);
|
|
272
|
+
{
|
|
273
|
+
var Ee = (e) => {
|
|
274
|
+
var t = mt();
|
|
275
|
+
let n;
|
|
276
|
+
var o = l(t);
|
|
277
|
+
o.__click = xe;
|
|
278
|
+
var p = l(o, !0);
|
|
279
|
+
r(o);
|
|
280
|
+
var s = x(o, 2);
|
|
281
|
+
J(s, 21, () => a(ye), q, (b, h) => {
|
|
282
|
+
var U = ae(), te = ne(U);
|
|
283
|
+
{
|
|
284
|
+
var Re = (j) => {
|
|
285
|
+
var N = it();
|
|
286
|
+
v(j, N);
|
|
287
|
+
}, ze = (j) => {
|
|
288
|
+
var N = pt();
|
|
289
|
+
let ve;
|
|
290
|
+
N.__click = () => we(a(h));
|
|
291
|
+
var Ie = l(N, !0);
|
|
292
|
+
r(N), A(() => {
|
|
293
|
+
ve = L(N, 1, "PaginationButton Number svelte-p7mf8l", null, ve, { Active: a(h) === a(H) }), w(Ie, a(h));
|
|
294
|
+
}), v(j, N);
|
|
295
|
+
};
|
|
296
|
+
E(te, (j) => {
|
|
297
|
+
typeof a(h) != "number" ? j(Re) : j(ze, !1);
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
v(b, U);
|
|
301
|
+
}), r(s);
|
|
302
|
+
var c = x(s, 2);
|
|
303
|
+
c.__click = _e;
|
|
304
|
+
var d = l(c, !0);
|
|
305
|
+
r(c), r(t), A(
|
|
306
|
+
(b, h) => {
|
|
307
|
+
n = L(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(B) === "sports" }), o.disabled = a(u) === 0, w(p, b), c.disabled = a(u) >= W() - g(), w(d, h);
|
|
308
|
+
},
|
|
309
|
+
[() => i()("previousButton"), () => i()("nextButton")]
|
|
310
|
+
), v(e, t);
|
|
311
|
+
}, Le = (e) => {
|
|
312
|
+
var t = vt(), n = l(t, !0);
|
|
313
|
+
r(t), A((o) => w(n, o), [() => i()("noAvailableGames")]), v(e, t);
|
|
314
|
+
};
|
|
315
|
+
E(pe, (e) => {
|
|
316
|
+
var t;
|
|
317
|
+
!a(C) && ((t = a(I)) == null ? void 0 : t.length) > 0 ? e(Ee) : e(Le, !1);
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
var Oe = x(pe, 2);
|
|
321
|
+
{
|
|
322
|
+
var We = (e) => {
|
|
323
|
+
var t = ct();
|
|
324
|
+
v(e, t);
|
|
325
|
+
};
|
|
326
|
+
E(Oe, (e) => {
|
|
327
|
+
a(C) && e(We);
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
r(Z), A(
|
|
331
|
+
(e, t) => {
|
|
332
|
+
w(Ge, e), w(Ae, t), ie = L(X, 1, "TournamentGamesContainer svelte-p7mf8l", null, ie, { Hidden: a(B) === "sports" });
|
|
333
|
+
},
|
|
334
|
+
[
|
|
335
|
+
() => i()("gamesDescriptionTitle"),
|
|
336
|
+
() => i()("gamesDescriptionSubtitle")
|
|
337
|
+
]
|
|
338
|
+
), v(T, Z);
|
|
339
|
+
var Ce = Ke(Te);
|
|
340
|
+
return z(), Ce;
|
|
341
|
+
}
|
|
342
|
+
Ye(["click"]);
|
|
343
|
+
customElements.define("tournament-games", Ze(
|
|
344
|
+
ut,
|
|
345
|
+
{
|
|
346
|
+
initialGames: {},
|
|
347
|
+
endpoint: {},
|
|
348
|
+
language: {},
|
|
349
|
+
session: {},
|
|
350
|
+
tournamentid: {},
|
|
351
|
+
gamesLimit: {},
|
|
352
|
+
totalGames: {},
|
|
353
|
+
platformProp: {},
|
|
354
|
+
tournamentMetadata: {}
|
|
355
|
+
},
|
|
356
|
+
[],
|
|
357
|
+
[],
|
|
358
|
+
!1
|
|
359
|
+
));
|
|
360
|
+
export {
|
|
361
|
+
ut as default
|
|
362
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";var K=(h,i,o)=>new Promise((j,G)=>{var y=c=>{try{g(o.next(c))}catch(b){G(b)}},P=c=>{try{g(o.throw(c))}catch(b){G(b)}},g=c=>c.done?j(c.value):Promise.resolve(c.value).then(y,P);g((o=o.apply(h,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetails-AYkmST0l.cjs"),ke=require("./TournamentDetailsPage-85B_WTCl.cjs");function Pe(h,i){e.addMessages(h,i)}function Se(h){e.$locale.set(h)}const Q={en:{previousButton:"Previous",nextButton:"Next",casinoTab:"Casino",sportsbookTab:"Sportsbook",gamesDescriptionTitle:"Participating games",gamesDescriptionSubtitle:"Discover the games",sportsRulesParseError:"Error parsing tournament rules",noAvailableGames:"No games have been configured yet!"},tr:{previousButton:"Previous",nextButton:"Next",casinoTab:"Casino",sportsbookTab:"Sportsbook"}},Te=()=>typeof window=="undefined";var Ge=e.from_html('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'),Ae=e.from_html('<p class="svelte-p7mf8l"> </p>'),Ne=e.from_html("<div></div>"),Be=e.from_html('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'),De=e.from_html('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'),Me=e.from_html('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'),je=e.from_html("<button> </button>"),Ee=e.from_html('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'),Le=e.from_html('<p class="NoGamesAvailable svelte-p7mf8l"> </p>'),Oe=e.from_html('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div> <div class="PaginationSkeletonButton svelte-p7mf8l"><div class="SkeletonShimmer svelte-p7mf8l"></div></div></div>'),We=e.from_html('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');const Re={hash:"svelte-p7mf8l",code:`.svelte-p7mf8l,
|
|
2
|
+
.svelte-p7mf8l::before,
|
|
3
|
+
.svelte-p7mf8l::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.GamesDescription.svelte-p7mf8l {display:flex;flex-direction:column;gap:6px;margin:10px 0;.GamesDescriptionTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:16px;font-weight:600;}.GamesDescriptionSubTitle:where(.svelte-p7mf8l) {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:200;}}.TournamentGamesTabs.svelte-p7mf8l {display:flex;border-radius:50px;background-color:var(--emw-color-bg-section, #434343);padding:6px;margin-bottom:6px;width:100%;justify-content:center;.Tab:where(.svelte-p7mf8l) {padding:5px 20px;color:var(--emw-color-typography, #ffffff);width:100%;border-radius:50px;background-color:transparent;border:none;cursor:pointer;}.Active:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-elements, #4A4A4A);border:none;}}.TournamentRulesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:400;margin:10px 0;}.TournamentGamesWrapper.svelte-p7mf8l {display:flex;flex-direction:column;gap:10px;background-color:var(--emw-color-bg-secondary, #333232);padding:10px;border-radius:6px;}.TournamentGamesContainer.svelte-p7mf8l {display:grid;gap:12px;grid-template-columns:repeat(auto-fit, minmax(min(150px, 100%), 1fr));.TournamentGameThumbnailSkeleton:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:linear-gradient(
|
|
4
|
+
to top,
|
|
5
|
+
var(--emw-color-primary, #FF1D4E),
|
|
6
|
+
transparent
|
|
7
|
+
);background-size:100% 200%;
|
|
8
|
+
animation: pulse 1.5s ease-in-out infinite;}.ImageContainer:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;}img:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;border-radius:6px;}.PlayButtonOverlay:where(.svelte-p7mf8l) {position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(0, 0, 0, 0.6);display:flex;justify-content:center;align-items:center;opacity:0;&:hover {opacity:1;transition:opacity 0.5s;}.PlayGameButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-primary, #FF1D4E);border-radius:6px;color:var(--emw-color-typography, #ffffff);padding:10px;border:none;outline:none;min-width:50%;cursor:pointer;&:hover {background-color:var(--emw-color-primary-hover, #ff3a65);cursor:pointer;}&:active {transform:scale(0.9);}}}}.PaginationWrapper.svelte-p7mf8l {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-p7mf8l) {display:flex;gap:3px;}.PaginationButton:where(.svelte-p7mf8l) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;border:none;outline:none;padding:10px;width:auto;cursor:pointer;&.Number {background-color:transparent;min-width:0;padding:0 10px;}&:hover {background-color:var(--emw-color-bg-elements, #4A4A4A);cursor:pointer;}&:active {transform:scale(0.9);}&:disabled {opacity:60%;pointer-events:none;}&.Active {background-color:var(--emw-color-bg-elements, #4A4A4A);}&.Elipsis {pointer-events:none;background-color:transparent;min-width:0;padding:0;align-self:center;}}}.NoGamesAvailable.svelte-p7mf8l {color:var(--emw-color-typography, #ffffff);font-size:14px;font-weight:300;}.PaginationSkeleton.svelte-p7mf8l {display:flex;justify-content:space-between;gap:6px;}.PaginationSkeletonButton.svelte-p7mf8l {width:80px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.PaginationNumberSkeleton.svelte-p7mf8l {width:40px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.SkeletonShimmer.svelte-p7mf8l {width:100%;height:100%;background:linear-gradient(
|
|
9
|
+
90deg,
|
|
10
|
+
transparent 0%,
|
|
11
|
+
var(--emw-color-skeleton, #333232) 50%,
|
|
12
|
+
transparent 100%
|
|
13
|
+
);
|
|
14
|
+
animation: svelte-p7mf8l-loading 1.5s infinite;transform:translateX(-100%);}
|
|
15
|
+
|
|
16
|
+
@keyframes svelte-p7mf8l-loading {
|
|
17
|
+
0% {
|
|
18
|
+
transform: translateX(-100%);
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
transform: translateX(100%);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: 750px) {.TournamentGamesTabs.svelte-p7mf8l {width:fit-content;}.PaginationWrapper.svelte-p7mf8l {justify-content:end;gap:10px;}.PaginationButton.svelte-p7mf8l {width:auto;min-width:75px;}
|
|
26
|
+
}.Hidden.svelte-p7mf8l {display:none;}`};function V(h,i){var q;e.push(i,!0),e.append_styles(h,Re);const o=()=>e.store_get(e.$format,"$_",j),[j,G]=e.setup_stores(),y=e.prop(i,"initialGames"),P=e.prop(i,"endpoint"),g=e.prop(i,"language",7,"en"),c=e.prop(i,"session"),b=e.prop(i,"tournamentid"),f=e.prop(i,"gamesLimit",7,6),S=e.prop(i,"totalGames"),E=e.prop(i,"platformProp",7,null),w=e.prop(i,"tournamentMetadata");Object.keys(Q).forEach(t=>{Pe(t,Q[t])});const Y=()=>{Se(g())};e.user_effect(()=>{Y()});let A=e.state(e.proxy(y()||[])),T=e.state(!1),d=e.state(0),N=e.state(void 0);const Z=Te()?(q=E())!=null?q:"dk":ke.getDevice(window.navigator.userAgent),L=()=>K(this,null,function*(){if(O.has(e.get(B)))return;e.set(T,!0);const t=new URL(`${P()}/v1/tournaments/${b()}`),a=new Headers;c()&&a.append("X-SessionId",c());const n={method:"GET",headers:a};t.searchParams.append("filter",`id=${b()}`),t.searchParams.append("language",g()),t.searchParams.append("expand","games"),t.searchParams.append("pagination",`games(limit=${f()},offset=${e.get(d)})`),t.searchParams.append("platform",Z),fetch(t,n).then(s=>s.json()).then(s=>{var l,r;e.set(A,(r=(l=s==null?void 0:s.item)==null?void 0:l.games)==null?void 0:r.items,!0),O.set(e.get(B),e.get(A))}).catch(s=>console.log(s)).finally(()=>e.set(T,!1))}),$=()=>{const t=Math.ceil(S()/f()),a=Math.floor(e.get(d)/f())+1;if(t<=5)return Array.from({length:t},(s,l)=>l+1);const n=[];return n.push(1),a<=3?(n.push(2,3),n.push("..."),n.push(t)):a>=t-2?(n.push("..."),n.push(t-2,t-1,t)):(n.push("..."),n.push(a-1,a,a+1),n.push("..."),n.push(t)),n},ee=()=>{e.get(d)<S()&&(e.set(d,e.get(d)+f()),L())},te=()=>{e.get(d)!==0&&(e.set(d,e.get(d)-f()),L())},ae=t=>{e.set(d,(t-1)*f()),L()},ne=e.user_derived($),B=e.user_derived(()=>Math.floor(e.get(d)/f())+1);let O=new Map([[1,y()]]),se=e.user_derived(()=>{var t;return(t=O.get(e.get(B)))!=null?t:[]}),_=e.state("casino");const re=()=>{var n;if(!w())return;const t=(n=w().sports)==null?void 0:n.rules;let a;if(t)try{a=JSON.parse(t),e.set(N,a[g()]||a["*"],!0)}catch(s){console.log(s),e.set(N,`${o()("sportsRulesParseError")}`)}},oe=t=>{window.postMessage({type:"Tournaments:PlayGame",launchUrl:t.launchUrl,id:t.gameId,platform:t.platform,thumbnail:t.thumbnail,name:t.name},window.location.href)};e.user_effect(()=>{Object.keys(w()).length!==0&&re()});var le={get initialGames(){return y()},set initialGames(t){y(t),e.flushSync()},get endpoint(){return P()},set endpoint(t){P(t),e.flushSync()},get language(){return g()},set language(t="en"){g(t),e.flushSync()},get session(){return c()},set session(t){c(t),e.flushSync()},get tournamentid(){return b()},set tournamentid(t){b(t),e.flushSync()},get gamesLimit(){return f()},set gamesLimit(t=6){f(t),e.flushSync()},get totalGames(){return S()},set totalGames(t){S(t),e.flushSync()},get platformProp(){return E()},set platformProp(t=null){E(t),e.flushSync()},get tournamentMetadata(){return w()},set tournamentMetadata(t){w(t),e.flushSync()}},W=We(),R=e.child(W),z=e.child(R),ie=e.child(z,!0);e.reset(z);var H=e.sibling(z,2),pe=e.child(H,!0);e.reset(H),e.reset(R);var I=e.sibling(R,2);{var me=t=>{var a=Ge(),n=e.child(a);let s;n.__click=()=>e.set(_,"casino");var l=e.child(n,!0);e.reset(n);var r=e.sibling(n,2);let p;r.__click=()=>e.set(_,"sports");var m=e.child(r,!0);e.reset(r),e.reset(a),e.template_effect((v,u)=>{s=e.set_class(n,1,"Tab svelte-p7mf8l",null,s,{Active:e.get(_)==="casino"}),e.set_text(l,v),p=e.set_class(r,1,"Tab svelte-p7mf8l",null,p,{Active:e.get(_)==="sports"}),e.set_text(m,u)},[()=>o()("casinoTab"),()=>o()("sportsbookTab")]),e.append(t,a)};e.if_block(I,t=>{Object.keys(w()).length!==0&&t(me)})}var F=e.sibling(I,2);{var ce=t=>{var a=Ne();let n;e.each(a,21,()=>e.get(N),e.index,(s,l)=>{var r=Ae(),p=e.child(r);e.reset(r),e.template_effect(m=>{var v;return e.set_text(p,`${(v=e.get(l).rule)!=null?v:""} ${m!=null?m:""}`)},[()=>o()("contribution")]),e.append(s,r)}),e.reset(a),e.template_effect(()=>n=e.set_class(a,1,"TournamentRulesWrapper svelte-p7mf8l",null,n,{Hidden:e.get(_)==="casino"})),e.append(t,a)};e.if_block(F,t=>{e.get(N)&&t(ce)})}var D=e.sibling(F,2);let X;var de=e.child(D);{var fe=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>Array(f()),e.index,(s,l,r,p)=>{var m=Be();e.append(s,m)}),e.append(t,a)},ve=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>e.get(se),e.index,(s,l)=>{var r=De();r.__click=()=>oe(e.get(l));var p=e.child(r),m=e.child(p),v=e.sibling(m,2),u=e.child(v),M=e.child(u,!0);e.reset(u),e.reset(v),e.reset(p),e.reset(r),e.template_effect(C=>{e.set_attribute(m,"src",`https:${e.get(l).thumbnail}`),e.set_attribute(m,"alt",e.get(l).name),e.set_text(M,C)},[()=>o()("play")]),e.append(s,r)}),e.append(t,a)};e.if_block(de,t=>{var a;e.get(T)&&((a=e.get(A))==null?void 0:a.length)===0?t(fe):t(ve,!1)})}e.reset(D);var U=e.sibling(D,2);{var ue=t=>{var a=Ee();let n;var s=e.child(a);s.__click=te;var l=e.child(s,!0);e.reset(s);var r=e.sibling(s,2);e.each(r,21,()=>e.get(ne),e.index,(v,u)=>{var M=e.comment(),C=e.first_child(M);{var xe=k=>{var x=Me();e.append(k,x)},ye=k=>{var x=je();let J;x.__click=()=>ae(e.get(u));var we=e.child(x,!0);e.reset(x),e.template_effect(()=>{J=e.set_class(x,1,"PaginationButton Number svelte-p7mf8l",null,J,{Active:e.get(u)===e.get(B)}),e.set_text(we,e.get(u))}),e.append(k,x)};e.if_block(C,k=>{typeof e.get(u)!="number"?k(xe):k(ye,!1)})}e.append(v,M)}),e.reset(r);var p=e.sibling(r,2);p.__click=ee;var m=e.child(p,!0);e.reset(p),e.reset(a),e.template_effect((v,u)=>{n=e.set_class(a,1,"PaginationWrapper svelte-p7mf8l",null,n,{Hidden:e.get(_)==="sports"}),s.disabled=e.get(d)===0,e.set_text(l,v),p.disabled=e.get(d)>=S()-f(),e.set_text(m,u)},[()=>o()("previousButton"),()=>o()("nextButton")]),e.append(t,a)},ge=t=>{var a=Le(),n=e.child(a,!0);e.reset(a),e.template_effect(s=>e.set_text(n,s),[()=>o()("noAvailableGames")]),e.append(t,a)};e.if_block(U,t=>{var a;!e.get(T)&&((a=e.get(A))==null?void 0:a.length)>0?t(ue):t(ge,!1)})}var he=e.sibling(U,2);{var be=t=>{var a=Oe();e.append(t,a)};e.if_block(he,t=>{e.get(T)&&t(be)})}e.reset(W),e.template_effect((t,a)=>{e.set_text(ie,t),e.set_text(pe,a),X=e.set_class(D,1,"TournamentGamesContainer svelte-p7mf8l",null,X,{Hidden:e.get(_)==="sports"})},[()=>o()("gamesDescriptionTitle"),()=>o()("gamesDescriptionSubtitle")]),e.append(h,W);var _e=e.pop(le);return G(),_e}e.delegate(["click"]);customElements.define("tournament-games",e.create_custom_element(V,{initialGames:{},endpoint:{},language:{},session:{},tournamentid:{},gamesLimit:{},totalGames:{},platformProp:{},tournamentMetadata:{}},[],[],!1));exports.default=V;
|