@everymatrix/tournament-details-page 0.1.4 → 0.1.6
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-DKJiK4kF.js → TournamentDetails-BG4EVKp8.js} +77 -46
- package/components/TournamentDetails-BM-igEZ4.cjs +3 -0
- package/components/{TournamentDetails-BMenCmyc.js → TournamentDetails-boFwK9Mf.js} +80 -49
- package/components/{TournamentDetailsPage-Cwwspvbg.cjs → TournamentDetailsPage-BZaRRP7T.cjs} +12 -12
- package/components/{TournamentDetailsPage-h9UAjavK.js → TournamentDetailsPage-C08JNvqr.js} +983 -944
- package/components/{TournamentDetailsPage-CuPo8QmD.js → TournamentDetailsPage-wAedD3fv.js} +599 -560
- package/components/{TournamentGames-BcBd8Ehe.js → TournamentGames-7ERafB_x.js} +117 -107
- package/components/{TournamentGames-H4Vm5pYZ.cjs → TournamentGames-DO4SvwhG.cjs} +2 -2
- package/components/{TournamentGames-DPAJjMG1.js → TournamentGames-uZanAkIu.js} +96 -86
- package/components/{TournamentLeaderboard-CBzkoTK0.js → TournamentLeaderboard-2JPas5ba.js} +151 -136
- package/components/{TournamentLeaderboard-YkG0Ta4Y.js → TournamentLeaderboard-CyreGYkx.js} +164 -149
- package/components/{TournamentLeaderboard-Dvecnzo5.cjs → TournamentLeaderboard-DsankBPB.cjs} +5 -5
- 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/TournamentDetails-DpAkBfOc.cjs +0 -3
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var ge = (A, p, m) => new Promise((te, H) => {
|
|
2
|
-
var L = (
|
|
2
|
+
var L = (f) => {
|
|
3
3
|
try {
|
|
4
|
-
w(m.next(
|
|
4
|
+
w(m.next(f));
|
|
5
5
|
} catch (B) {
|
|
6
6
|
H(B);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, R = (f) => {
|
|
9
9
|
try {
|
|
10
|
-
w(m.throw(
|
|
10
|
+
w(m.throw(f));
|
|
11
11
|
} catch (B) {
|
|
12
12
|
H(B);
|
|
13
13
|
}
|
|
14
|
-
}, w = (
|
|
14
|
+
}, w = (f) => f.done ? te(f.value) : Promise.resolve(f.value).then(L, R);
|
|
15
15
|
w((m = m.apply(A, p)).next());
|
|
16
16
|
});
|
|
17
|
-
import { a as Je, $ as Ke, p as Xe, b as Qe, d as y, u as Ve, e as
|
|
17
|
+
import { a as Je, $ as Ke, p as Xe, b as Qe, d as y, u as Ve, e as be, j as C, L as Ye, P as Ze, w as k, i as E, g as a, t as D, y as P, H as M, f as u, h as $e, C as et, D as tt, s as at, k as x, m as T, n as l, v as Y, z as Z, q as $, r as ee, x as _, l as pe, A as nt, B as ot, E as i, N as he } from "./TournamentDetailsPage-C08JNvqr.js";
|
|
18
18
|
function xe(A, p) {
|
|
19
19
|
Je(A, p);
|
|
20
20
|
}
|
|
@@ -41,10 +41,20 @@ const we = {
|
|
|
41
41
|
gamesDescriptionSubtitle: "Oyunları keşfedin",
|
|
42
42
|
sportsRulesParseError: "Turnuva kuralları ayrıştırma hatası",
|
|
43
43
|
noAvailableGames: "Henüz oyun yapılandırılmamış!"
|
|
44
|
+
},
|
|
45
|
+
da: {
|
|
46
|
+
previousButton: "Forrige",
|
|
47
|
+
nextButton: "Næste",
|
|
48
|
+
casinoTab: "Casino",
|
|
49
|
+
sportsbookTab: "Sportsbook",
|
|
50
|
+
gamesDescriptionTitle: "Deltagende spil",
|
|
51
|
+
gamesDescriptionSubtitle: "Opdag spillene",
|
|
52
|
+
sportsRulesParseError: "Fejl ved parsing af turneringsregler",
|
|
53
|
+
noAvailableGames: "Der er endnu ikke konfigureret nogen spil!"
|
|
44
54
|
}
|
|
45
55
|
}, rt = () => typeof window == "undefined";
|
|
46
|
-
var st = _('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), it = _('<p class="svelte-p7mf8l"> </p>'), lt = _("<div></div>"), pt = _('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), mt = _("<p> </p>"), ut = _('<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>'), ct = _('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), vt = _("<button> </button>"),
|
|
47
|
-
const
|
|
56
|
+
var st = _('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), it = _('<p class="svelte-p7mf8l"> </p>'), lt = _("<div></div>"), pt = _('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), mt = _("<p> </p>"), ut = _('<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>'), ct = _('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), vt = _("<button> </button>"), dt = _('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'), ft = _('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationSkeletonButton svelte-p7mf8l"></div></div>'), gt = _('<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>');
|
|
57
|
+
const bt = {
|
|
48
58
|
hash: "svelte-p7mf8l",
|
|
49
59
|
code: `.svelte-p7mf8l,
|
|
50
60
|
.svelte-p7mf8l::before,
|
|
@@ -83,11 +93,11 @@ const ht = {
|
|
|
83
93
|
@media (min-width: 1500px) {.TournamentGamesContainer.svelte-p7mf8l {gap:5px;grid-template-columns:repeat(auto-fill, minmax(min(215px, 100%), 1fr));}
|
|
84
94
|
}.Hidden.svelte-p7mf8l {display:none;}`
|
|
85
95
|
};
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
Xe(p, !0), Qe(A,
|
|
89
|
-
const m = () => et(tt, "$_", te), [te, H] = at(), L = y(p, "initialGames"),
|
|
90
|
-
let e = new URL(
|
|
96
|
+
function ht(A, p) {
|
|
97
|
+
var fe;
|
|
98
|
+
Xe(p, !0), Qe(A, bt);
|
|
99
|
+
const m = () => et(tt, "$_", te), [te, H] = at(), L = y(p, "initialGames"), R = y(p, "endpoint"), w = y(p, "language", 7, "en"), f = y(p, "session"), B = y(p, "tournamentid"), g = y(p, "gamesLimit", 7, 6), O = y(p, "totalGames"), ae = y(p, "platformProp", 7, null), z = y(p, "tournamentMetadata"), F = y(p, "translationurl"), ye = () => {
|
|
100
|
+
let e = new URL(F());
|
|
91
101
|
fetch(e.href).then((t) => t.json()).then((t) => {
|
|
92
102
|
Object.keys(t).forEach((n) => {
|
|
93
103
|
xe(n, t[n]);
|
|
@@ -99,53 +109,53 @@ function bt(A, p) {
|
|
|
99
109
|
Object.keys(we).forEach((e) => {
|
|
100
110
|
xe(e, we[e]);
|
|
101
111
|
}), _e(w());
|
|
102
|
-
const
|
|
112
|
+
const ke = () => {
|
|
103
113
|
_e(w());
|
|
104
114
|
};
|
|
105
115
|
Ve(() => {
|
|
106
|
-
|
|
107
|
-
}),
|
|
108
|
-
|
|
116
|
+
F() && ye();
|
|
117
|
+
}), be(() => {
|
|
118
|
+
ke();
|
|
109
119
|
});
|
|
110
|
-
let ne = C(Ye(L() || [])),
|
|
111
|
-
const
|
|
120
|
+
let ne = C(Ye(L() || [])), I = C(!1), b = C(0), U = C(void 0), q = C(!0);
|
|
121
|
+
const Pe = rt() ? (fe = ae()) != null ? fe : "dk" : Ze(window.navigator.userAgent), oe = () => ge(this, null, function* () {
|
|
112
122
|
if (re.has(a(J)))
|
|
113
123
|
return;
|
|
114
|
-
x(
|
|
115
|
-
const e = new URL(`${
|
|
116
|
-
|
|
124
|
+
x(I, !0);
|
|
125
|
+
const e = new URL(`${R()}/v1/tournaments/${B()}`), t = new Headers();
|
|
126
|
+
f() && t.append("X-SessionId", f());
|
|
117
127
|
const n = { method: "GET", headers: t };
|
|
118
|
-
e.searchParams.append("filter", `id=${B()}`), e.searchParams.append("language", w()), e.searchParams.append("expand", "games"), e.searchParams.append("pagination", `games(limit=${g()},offset=${a(
|
|
119
|
-
var
|
|
120
|
-
x(ne, (r = (
|
|
121
|
-
}).catch((o) => console.log(o)).finally(() => x(
|
|
128
|
+
e.searchParams.append("filter", `id=${B()}`), e.searchParams.append("language", w()), e.searchParams.append("expand", "games"), e.searchParams.append("pagination", `games(limit=${g()},offset=${a(b)})`), e.searchParams.append("platform", Pe), fetch(e, n).then((o) => o.json()).then((o) => {
|
|
129
|
+
var d, r;
|
|
130
|
+
x(ne, (r = (d = o == null ? void 0 : o.item) == null ? void 0 : d.games) == null ? void 0 : r.items, !0), re.set(a(J), a(ne)), a(q) || x(q, !0);
|
|
131
|
+
}).catch((o) => console.log(o)).finally(() => x(I, !1));
|
|
122
132
|
}), Te = () => {
|
|
123
|
-
const e = Math.ceil(
|
|
133
|
+
const e = Math.ceil(O() / g()), t = Math.floor(a(b) / g()) + 1;
|
|
124
134
|
if (e <= 5)
|
|
125
|
-
return Array.from({ length: e }, (o,
|
|
135
|
+
return Array.from({ length: e }, (o, d) => d + 1);
|
|
126
136
|
const n = [];
|
|
127
137
|
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;
|
|
128
138
|
}, Ge = () => {
|
|
129
|
-
a(
|
|
139
|
+
a(b) < O() && (x(b, a(b) + g()), oe());
|
|
130
140
|
}, Se = () => {
|
|
131
|
-
a(
|
|
141
|
+
a(b) !== 0 && (x(b, a(b) - g()), oe());
|
|
132
142
|
}, Ae = (e) => {
|
|
133
|
-
x(
|
|
134
|
-
}, Be = pe(Te), J = pe(() => Math.floor(a(
|
|
143
|
+
x(b, (e - 1) * g()), oe();
|
|
144
|
+
}, Be = pe(Te), J = pe(() => Math.floor(a(b) / g()) + 1);
|
|
135
145
|
let re = /* @__PURE__ */ new Map([[1, L()]]), Ne = pe(() => {
|
|
136
146
|
var e;
|
|
137
147
|
return (e = re.get(a(J))) != null ? e : [];
|
|
138
148
|
}), N = C("casino");
|
|
139
149
|
const De = () => {
|
|
140
150
|
var n;
|
|
141
|
-
if (!
|
|
142
|
-
const e = (n =
|
|
151
|
+
if (!z()) return;
|
|
152
|
+
const e = (n = z().sports) == null ? void 0 : n.rules;
|
|
143
153
|
let t;
|
|
144
154
|
if (e)
|
|
145
155
|
try {
|
|
146
|
-
t = JSON.parse(e), x(
|
|
156
|
+
t = JSON.parse(e), x(U, t[w()] || t["*"], !0);
|
|
147
157
|
} catch (o) {
|
|
148
|
-
console.log(o), x(
|
|
158
|
+
console.log(o), x(U, `${m()("sportsRulesParseError")}`);
|
|
149
159
|
}
|
|
150
160
|
}, je = (e) => {
|
|
151
161
|
window.postMessage(
|
|
@@ -159,10 +169,10 @@ function bt(A, p) {
|
|
|
159
169
|
window.location.href
|
|
160
170
|
);
|
|
161
171
|
};
|
|
162
|
-
|
|
163
|
-
Object.keys(
|
|
172
|
+
be(() => {
|
|
173
|
+
Object.keys(z()).length !== 0 && De();
|
|
164
174
|
});
|
|
165
|
-
var
|
|
175
|
+
var Ee = {
|
|
166
176
|
get initialGames() {
|
|
167
177
|
return L();
|
|
168
178
|
},
|
|
@@ -170,10 +180,10 @@ function bt(A, p) {
|
|
|
170
180
|
L(e), T();
|
|
171
181
|
},
|
|
172
182
|
get endpoint() {
|
|
173
|
-
return
|
|
183
|
+
return R();
|
|
174
184
|
},
|
|
175
185
|
set endpoint(e) {
|
|
176
|
-
|
|
186
|
+
R(e), T();
|
|
177
187
|
},
|
|
178
188
|
get language() {
|
|
179
189
|
return w();
|
|
@@ -182,10 +192,10 @@ function bt(A, p) {
|
|
|
182
192
|
w(e), T();
|
|
183
193
|
},
|
|
184
194
|
get session() {
|
|
185
|
-
return
|
|
195
|
+
return f();
|
|
186
196
|
},
|
|
187
197
|
set session(e) {
|
|
188
|
-
|
|
198
|
+
f(e), T();
|
|
189
199
|
},
|
|
190
200
|
get tournamentid() {
|
|
191
201
|
return B();
|
|
@@ -200,10 +210,10 @@ function bt(A, p) {
|
|
|
200
210
|
g(e), T();
|
|
201
211
|
},
|
|
202
212
|
get totalGames() {
|
|
203
|
-
return
|
|
213
|
+
return O();
|
|
204
214
|
},
|
|
205
215
|
set totalGames(e) {
|
|
206
|
-
|
|
216
|
+
O(e), T();
|
|
207
217
|
},
|
|
208
218
|
get platformProp() {
|
|
209
219
|
return ae();
|
|
@@ -212,128 +222,128 @@ function bt(A, p) {
|
|
|
212
222
|
ae(e), T();
|
|
213
223
|
},
|
|
214
224
|
get tournamentMetadata() {
|
|
215
|
-
return
|
|
225
|
+
return z();
|
|
216
226
|
},
|
|
217
227
|
set tournamentMetadata(e) {
|
|
218
|
-
|
|
228
|
+
z(e), T();
|
|
219
229
|
},
|
|
220
230
|
get translationurl() {
|
|
221
|
-
return
|
|
231
|
+
return F();
|
|
222
232
|
},
|
|
223
233
|
set translationurl(e) {
|
|
224
|
-
|
|
234
|
+
F(e), T();
|
|
225
235
|
}
|
|
226
|
-
}, se = gt(), ie = l(se), le = l(ie),
|
|
236
|
+
}, se = gt(), ie = l(se), le = l(ie), Me = l(le, !0);
|
|
227
237
|
i(le);
|
|
228
|
-
var me =
|
|
238
|
+
var me = k(le, 2), Le = l(me, !0);
|
|
229
239
|
i(me), i(ie);
|
|
230
|
-
var ue =
|
|
240
|
+
var ue = k(ie, 2);
|
|
231
241
|
{
|
|
232
|
-
var
|
|
242
|
+
var Oe = (e) => {
|
|
233
243
|
var t = st(), n = l(t);
|
|
234
244
|
let o;
|
|
235
245
|
n.__click = () => x(N, "casino");
|
|
236
|
-
var
|
|
246
|
+
var d = l(n, !0);
|
|
237
247
|
i(n);
|
|
238
|
-
var r =
|
|
248
|
+
var r = k(n, 2);
|
|
239
249
|
let s;
|
|
240
250
|
r.__click = () => x(N, "sports");
|
|
241
251
|
var c = l(r, !0);
|
|
242
252
|
i(r), i(t), D(
|
|
243
|
-
(
|
|
244
|
-
o =
|
|
253
|
+
(h, v) => {
|
|
254
|
+
o = M(n, 1, "Tab svelte-p7mf8l", null, o, { Active: a(N) === "casino" }), P(d, h), s = M(r, 1, "Tab svelte-p7mf8l", null, s, { Active: a(N) === "sports" }), P(c, v);
|
|
245
255
|
},
|
|
246
256
|
[() => m()("casinoTab"), () => m()("sportsbookTab")]
|
|
247
257
|
), u(e, t);
|
|
248
258
|
};
|
|
249
|
-
|
|
250
|
-
Object.keys(
|
|
259
|
+
E(ue, (e) => {
|
|
260
|
+
Object.keys(z()).length !== 0 && e(Oe);
|
|
251
261
|
});
|
|
252
262
|
}
|
|
253
|
-
var ce =
|
|
263
|
+
var ce = k(ue, 2);
|
|
254
264
|
{
|
|
255
|
-
var
|
|
265
|
+
var ze = (e) => {
|
|
256
266
|
var t = lt();
|
|
257
267
|
let n;
|
|
258
|
-
Y(t, 21, () => a(
|
|
268
|
+
Y(t, 21, () => a(U), Z, (o, d) => {
|
|
259
269
|
var r = it(), s = l(r);
|
|
260
270
|
i(r), D((c) => {
|
|
261
|
-
var
|
|
262
|
-
return
|
|
271
|
+
var h;
|
|
272
|
+
return P(s, `${(h = a(d).rule) != null ? h : ""} ${c != null ? c : ""}`);
|
|
263
273
|
}, [() => m()("contribution")]), u(o, r);
|
|
264
|
-
}), i(t), D(() => n =
|
|
274
|
+
}), i(t), D(() => n = M(t, 1, "TournamentRulesWrapper svelte-p7mf8l", null, n, { Hidden: a(N) === "casino" })), u(e, t);
|
|
265
275
|
};
|
|
266
|
-
|
|
267
|
-
a(
|
|
276
|
+
E(ce, (e) => {
|
|
277
|
+
a(U) && e(ze);
|
|
268
278
|
});
|
|
269
279
|
}
|
|
270
|
-
var K =
|
|
280
|
+
var K = k(ce, 2);
|
|
271
281
|
let ve;
|
|
272
282
|
var Ce = l(K);
|
|
273
283
|
{
|
|
274
|
-
var
|
|
284
|
+
var Re = (e) => {
|
|
275
285
|
var t = $(), n = ee(t);
|
|
276
|
-
Y(n, 17, () => Array(g()), Z, (o,
|
|
286
|
+
Y(n, 17, () => Array(g()), Z, (o, d, r, s) => {
|
|
277
287
|
var c = pt();
|
|
278
288
|
u(o, c);
|
|
279
289
|
}), u(e, t);
|
|
280
|
-
},
|
|
290
|
+
}, We = (e) => {
|
|
281
291
|
var t = $(), n = ee(t);
|
|
282
292
|
{
|
|
283
293
|
var o = (r) => {
|
|
284
294
|
var s = mt();
|
|
285
295
|
let c;
|
|
286
|
-
var
|
|
296
|
+
var h = l(s, !0);
|
|
287
297
|
i(s), D(
|
|
288
298
|
(v) => {
|
|
289
|
-
c =
|
|
299
|
+
c = M(s, 1, "NoGamesAvailable svelte-p7mf8l", null, c, { Hidden: a(N) === "sports" }), P(h, v);
|
|
290
300
|
},
|
|
291
301
|
[() => m()("noAvailableGames")]
|
|
292
302
|
), u(r, s);
|
|
293
|
-
},
|
|
303
|
+
}, d = (r) => {
|
|
294
304
|
var s = $(), c = ee(s);
|
|
295
|
-
Y(c, 17, () => a(Ne), Z, (
|
|
305
|
+
Y(c, 17, () => a(Ne), Z, (h, v) => {
|
|
296
306
|
var j = ut();
|
|
297
307
|
j.__click = () => je(a(v));
|
|
298
|
-
var X = l(j),
|
|
308
|
+
var X = l(j), W = l(X), Q = k(W, 2), G = l(Q), S = l(G, !0);
|
|
299
309
|
i(G), i(Q), i(X), i(j), D(
|
|
300
310
|
(V) => {
|
|
301
|
-
|
|
311
|
+
he(W, "src", `https:${a(v).thumbnail}`), he(W, "alt", a(v).name), P(S, V);
|
|
302
312
|
},
|
|
303
313
|
[() => m()("play")]
|
|
304
|
-
), u(
|
|
314
|
+
), u(h, j);
|
|
305
315
|
}), u(r, s);
|
|
306
316
|
};
|
|
307
|
-
|
|
317
|
+
E(
|
|
308
318
|
n,
|
|
309
319
|
(r) => {
|
|
310
320
|
var s;
|
|
311
|
-
!a(
|
|
321
|
+
!a(I) && ((s = a(ne)) == null ? void 0 : s.length) === 0 ? r(o) : r(d, !1);
|
|
312
322
|
},
|
|
313
323
|
!0
|
|
314
324
|
);
|
|
315
325
|
}
|
|
316
326
|
u(e, t);
|
|
317
327
|
};
|
|
318
|
-
|
|
319
|
-
a(
|
|
328
|
+
E(Ce, (e) => {
|
|
329
|
+
a(I) ? e(Re) : e(We, !1);
|
|
320
330
|
});
|
|
321
331
|
}
|
|
322
332
|
i(K);
|
|
323
|
-
var
|
|
333
|
+
var de = k(K, 2);
|
|
324
334
|
{
|
|
325
335
|
var He = (e) => {
|
|
326
|
-
var t =
|
|
336
|
+
var t = dt();
|
|
327
337
|
let n;
|
|
328
338
|
var o = l(t);
|
|
329
339
|
o.__click = Se;
|
|
330
|
-
var
|
|
340
|
+
var d = l(o, !0);
|
|
331
341
|
i(o);
|
|
332
|
-
var r =
|
|
333
|
-
Y(r, 21, () => a(Be), Z, (
|
|
342
|
+
var r = k(o, 2);
|
|
343
|
+
Y(r, 21, () => a(Be), Z, (h, v) => {
|
|
334
344
|
var j = $(), X = ee(j);
|
|
335
345
|
{
|
|
336
|
-
var
|
|
346
|
+
var W = (G) => {
|
|
337
347
|
var S = ct();
|
|
338
348
|
u(G, S);
|
|
339
349
|
}, Q = (G) => {
|
|
@@ -342,54 +352,54 @@ function bt(A, p) {
|
|
|
342
352
|
S.__click = () => Ae(a(v));
|
|
343
353
|
var qe = l(S, !0);
|
|
344
354
|
i(S), D(() => {
|
|
345
|
-
V =
|
|
355
|
+
V = M(S, 1, "PaginationButton Number svelte-p7mf8l", null, V, { Active: a(v) === a(J) }), P(qe, a(v));
|
|
346
356
|
}), u(G, S);
|
|
347
357
|
};
|
|
348
|
-
|
|
349
|
-
typeof a(v) != "number" ? G(
|
|
358
|
+
E(X, (G) => {
|
|
359
|
+
typeof a(v) != "number" ? G(W) : G(Q, !1);
|
|
350
360
|
});
|
|
351
361
|
}
|
|
352
|
-
u(
|
|
362
|
+
u(h, j);
|
|
353
363
|
}), i(r);
|
|
354
|
-
var s =
|
|
364
|
+
var s = k(r, 2);
|
|
355
365
|
s.__click = Ge;
|
|
356
366
|
var c = l(s, !0);
|
|
357
367
|
i(s), i(t), D(
|
|
358
|
-
(
|
|
359
|
-
n =
|
|
368
|
+
(h, v) => {
|
|
369
|
+
n = M(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(N) === "sports" }), o.disabled = a(b) === 0, P(d, h), s.disabled = a(b) >= O() - g(), P(c, v);
|
|
360
370
|
},
|
|
361
371
|
[() => m()("previousButton"), () => m()("nextButton")]
|
|
362
372
|
), u(e, t);
|
|
363
373
|
};
|
|
364
|
-
|
|
365
|
-
a(q) &&
|
|
374
|
+
E(de, (e) => {
|
|
375
|
+
a(q) && O() > g() && e(He);
|
|
366
376
|
});
|
|
367
377
|
}
|
|
368
|
-
var
|
|
378
|
+
var Fe = k(de, 2);
|
|
369
379
|
{
|
|
370
|
-
var
|
|
371
|
-
var t =
|
|
380
|
+
var Ie = (e) => {
|
|
381
|
+
var t = ft();
|
|
372
382
|
u(e, t);
|
|
373
383
|
};
|
|
374
|
-
|
|
375
|
-
a(q) || e(
|
|
384
|
+
E(Fe, (e) => {
|
|
385
|
+
a(q) || e(Ie);
|
|
376
386
|
});
|
|
377
387
|
}
|
|
378
388
|
i(se), D(
|
|
379
389
|
(e, t) => {
|
|
380
|
-
|
|
390
|
+
P(Me, e), P(Le, t), ve = M(K, 1, "TournamentGamesContainer svelte-p7mf8l", null, ve, { Hidden: a(N) === "sports" });
|
|
381
391
|
},
|
|
382
392
|
[
|
|
383
393
|
() => m()("gamesDescriptionTitle"),
|
|
384
394
|
() => m()("gamesDescriptionSubtitle")
|
|
385
395
|
]
|
|
386
396
|
), u(A, se);
|
|
387
|
-
var
|
|
388
|
-
return H(),
|
|
397
|
+
var Ue = $e(Ee);
|
|
398
|
+
return H(), Ue;
|
|
389
399
|
}
|
|
390
400
|
nt(["click"]);
|
|
391
401
|
customElements.define("tournament-games", ot(
|
|
392
|
-
|
|
402
|
+
ht,
|
|
393
403
|
{
|
|
394
404
|
initialGames: {},
|
|
395
405
|
endpoint: {},
|
|
@@ -407,5 +417,5 @@ customElements.define("tournament-games", ot(
|
|
|
407
417
|
!1
|
|
408
418
|
));
|
|
409
419
|
export {
|
|
410
|
-
|
|
420
|
+
ht as default
|
|
411
421
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Z=(_,l,i)=>new Promise((
|
|
1
|
+
"use strict";var Z=(_,l,i)=>new Promise((C,A)=>{var k=f=>{try{g(i.next(f))}catch(x){A(x)}},S=f=>{try{g(i.throw(f))}catch(x){A(x)}},g=f=>f.done?C(f.value):Promise.resolve(f.value).then(k,S);g((i=i.apply(_,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetailsPage-BZaRRP7T.cjs");function $(_,l){e.addMessages(_,l)}function ee(_){e.$locale.set(_)}const te={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:"Önceki",nextButton:"Sonraki",casinoTab:"Casino",sportsbookTab:"Spor Bahisleri",gamesDescriptionTitle:"Katılımcı oyunlar",gamesDescriptionSubtitle:"Oyunları keşfedin",sportsRulesParseError:"Turnuva kuralları ayrıştırma hatası",noAvailableGames:"Henüz oyun yapılandırılmamış!"},da:{previousButton:"Forrige",nextButton:"Næste",casinoTab:"Casino",sportsbookTab:"Sportsbook",gamesDescriptionTitle:"Deltagende spil",gamesDescriptionSubtitle:"Opdag spillene",sportsRulesParseError:"Fejl ved parsing af turneringsregler",noAvailableGames:"Der er endnu ikke konfigureret nogen spil!"}},Ge=()=>typeof window=="undefined";var Ae=e.from_html('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'),Be=e.from_html('<p class="svelte-p7mf8l"> </p>'),Ne=e.from_html("<div></div>"),De=e.from_html('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'),je=e.from_html("<p> </p>"),Me=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>'),Ee=e.from_html('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'),Oe=e.from_html("<button> </button>"),Le=e.from_html('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'),ze=e.from_html('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationSkeletonButton svelte-p7mf8l"></div></div>'),Ce=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
2
|
.svelte-p7mf8l::before,
|
|
3
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;min-height:150px;}.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-fill, minmax(min(170px, 100%), 1fr));.TournamentGameThumbnailSkeleton:where(.svelte-p7mf8l) {position:relative;width:100%;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:linear-gradient(
|
|
4
4
|
to top,
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@media (min-width: 1500px) {.TournamentGamesContainer.svelte-p7mf8l {gap:5px;grid-template-columns:repeat(auto-fill, minmax(min(215px, 100%), 1fr));}
|
|
36
|
-
}.Hidden.svelte-p7mf8l {display:none;}`};function ae(_,l){var Y;e.push(l,!0),e.append_styles(_,
|
|
36
|
+
}.Hidden.svelte-p7mf8l {display:none;}`};function ae(_,l){var Y;e.push(l,!0),e.append_styles(_,Re);const i=()=>e.store_get(e.$format,"$_",C),[C,A]=e.setup_stores(),k=e.prop(l,"initialGames"),S=e.prop(l,"endpoint"),g=e.prop(l,"language",7,"en"),f=e.prop(l,"session"),x=e.prop(l,"tournamentid"),d=e.prop(l,"gamesLimit",7,6),P=e.prop(l,"totalGames"),R=e.prop(l,"platformProp",7,null),T=e.prop(l,"tournamentMetadata"),B=e.prop(l,"translationurl"),ne=()=>{let t=new URL(B());fetch(t.href).then(a=>a.json()).then(a=>{Object.keys(a).forEach(n=>{$(n,a[n])})}).catch(a=>{console.log(a)})};Object.keys(te).forEach(t=>{$(t,te[t])}),ee(g());const re=()=>{ee(g())};e.user_pre_effect(()=>{B()&&ne()}),e.user_effect(()=>{re()});let W=e.state(e.proxy(k()||[])),N=e.state(!1),u=e.state(0),D=e.state(void 0),j=e.state(!0);const se=Ge()?(Y=R())!=null?Y:"dk":e.getDevice(window.navigator.userAgent),H=()=>Z(this,null,function*(){if(F.has(e.get(M)))return;e.set(N,!0);const t=new URL(`${S()}/v1/tournaments/${x()}`),a=new Headers;f()&&a.append("X-SessionId",f());const n={method:"GET",headers:a};t.searchParams.append("filter",`id=${x()}`),t.searchParams.append("language",g()),t.searchParams.append("expand","games"),t.searchParams.append("pagination",`games(limit=${d()},offset=${e.get(u)})`),t.searchParams.append("platform",se),fetch(t,n).then(r=>r.json()).then(r=>{var c,s;e.set(W,(s=(c=r==null?void 0:r.item)==null?void 0:c.games)==null?void 0:s.items,!0),F.set(e.get(M),e.get(W)),e.get(j)||e.set(j,!0)}).catch(r=>console.log(r)).finally(()=>e.set(N,!1))}),oe=()=>{const t=Math.ceil(P()/d()),a=Math.floor(e.get(u)/d())+1;if(t<=5)return Array.from({length:t},(r,c)=>c+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},le=()=>{e.get(u)<P()&&(e.set(u,e.get(u)+d()),H())},ie=()=>{e.get(u)!==0&&(e.set(u,e.get(u)-d()),H())},pe=t=>{e.set(u,(t-1)*d()),H()},me=e.user_derived(oe),M=e.user_derived(()=>Math.floor(e.get(u)/d())+1);let F=new Map([[1,k()]]),ce=e.user_derived(()=>{var t;return(t=F.get(e.get(M)))!=null?t:[]}),y=e.state("casino");const fe=()=>{var n;if(!T())return;const t=(n=T().sports)==null?void 0:n.rules;let a;if(t)try{a=JSON.parse(t),e.set(D,a[g()]||a["*"],!0)}catch(r){console.log(r),e.set(D,`${i()("sportsRulesParseError")}`)}},de=t=>{window.postMessage({type:"Tournaments:PlayGame",launchUrl:t.launchUrl,id:t.gameId,thumbnail:t.thumbnail,name:t.name},window.location.href)};e.user_effect(()=>{Object.keys(T()).length!==0&&fe()});var ue={get initialGames(){return k()},set initialGames(t){k(t),e.flushSync()},get endpoint(){return S()},set endpoint(t){S(t),e.flushSync()},get language(){return g()},set language(t="en"){g(t),e.flushSync()},get session(){return f()},set session(t){f(t),e.flushSync()},get tournamentid(){return x()},set tournamentid(t){x(t),e.flushSync()},get gamesLimit(){return d()},set gamesLimit(t=6){d(t),e.flushSync()},get totalGames(){return P()},set totalGames(t){P(t),e.flushSync()},get platformProp(){return R()},set platformProp(t=null){R(t),e.flushSync()},get tournamentMetadata(){return T()},set tournamentMetadata(t){T(t),e.flushSync()},get translationurl(){return B()},set translationurl(t){B(t),e.flushSync()}},I=Ce(),U=e.child(I),q=e.child(U),ve=e.child(q,!0);e.reset(q);var J=e.sibling(q,2),ge=e.child(J,!0);e.reset(J),e.reset(U);var K=e.sibling(U,2);{var he=t=>{var a=Ae(),n=e.child(a);let r;n.__click=()=>e.set(y,"casino");var c=e.child(n,!0);e.reset(n);var s=e.sibling(n,2);let o;s.__click=()=>e.set(y,"sports");var p=e.child(s,!0);e.reset(s),e.reset(a),e.template_effect((v,m)=>{r=e.set_class(n,1,"Tab svelte-p7mf8l",null,r,{Active:e.get(y)==="casino"}),e.set_text(c,v),o=e.set_class(s,1,"Tab svelte-p7mf8l",null,o,{Active:e.get(y)==="sports"}),e.set_text(p,m)},[()=>i()("casinoTab"),()=>i()("sportsbookTab")]),e.append(t,a)};e.if_block(K,t=>{Object.keys(T()).length!==0&&t(he)})}var X=e.sibling(K,2);{var be=t=>{var a=Ne();let n;e.each(a,21,()=>e.get(D),e.index,(r,c)=>{var s=Be(),o=e.child(s);e.reset(s),e.template_effect(p=>{var v;return e.set_text(o,`${(v=e.get(c).rule)!=null?v:""} ${p!=null?p:""}`)},[()=>i()("contribution")]),e.append(r,s)}),e.reset(a),e.template_effect(()=>n=e.set_class(a,1,"TournamentRulesWrapper svelte-p7mf8l",null,n,{Hidden:e.get(y)==="casino"})),e.append(t,a)};e.if_block(X,t=>{e.get(D)&&t(be)})}var E=e.sibling(X,2);let Q;var _e=e.child(E);{var xe=t=>{var a=e.comment(),n=e.first_child(a);e.each(n,17,()=>Array(d()),e.index,(r,c,s,o)=>{var p=De();e.append(r,p)}),e.append(t,a)},ye=t=>{var a=e.comment(),n=e.first_child(a);{var r=s=>{var o=je();let p;var v=e.child(o,!0);e.reset(o),e.template_effect(m=>{p=e.set_class(o,1,"NoGamesAvailable svelte-p7mf8l",null,p,{Hidden:e.get(y)==="sports"}),e.set_text(v,m)},[()=>i()("noAvailableGames")]),e.append(s,o)},c=s=>{var o=e.comment(),p=e.first_child(o);e.each(p,17,()=>e.get(ce),e.index,(v,m)=>{var w=Me();w.__click=()=>de(e.get(m));var O=e.child(w),G=e.child(O),L=e.sibling(G,2),h=e.child(L),b=e.child(h,!0);e.reset(h),e.reset(L),e.reset(O),e.reset(w),e.template_effect(z=>{e.set_attribute(G,"src",`https:${e.get(m).thumbnail}`),e.set_attribute(G,"alt",e.get(m).name),e.set_text(b,z)},[()=>i()("play")]),e.append(v,w)}),e.append(s,o)};e.if_block(n,s=>{var o;!e.get(N)&&((o=e.get(W))==null?void 0:o.length)===0?s(r):s(c,!1)},!0)}e.append(t,a)};e.if_block(_e,t=>{e.get(N)?t(xe):t(ye,!1)})}e.reset(E);var V=e.sibling(E,2);{var we=t=>{var a=Le();let n;var r=e.child(a);r.__click=ie;var c=e.child(r,!0);e.reset(r);var s=e.sibling(r,2);e.each(s,21,()=>e.get(me),e.index,(v,m)=>{var w=e.comment(),O=e.first_child(w);{var G=h=>{var b=Ee();e.append(h,b)},L=h=>{var b=Oe();let z;b.__click=()=>pe(e.get(m));var Se=e.child(b,!0);e.reset(b),e.template_effect(()=>{z=e.set_class(b,1,"PaginationButton Number svelte-p7mf8l",null,z,{Active:e.get(m)===e.get(M)}),e.set_text(Se,e.get(m))}),e.append(h,b)};e.if_block(O,h=>{typeof e.get(m)!="number"?h(G):h(L,!1)})}e.append(v,w)}),e.reset(s);var o=e.sibling(s,2);o.__click=le;var p=e.child(o,!0);e.reset(o),e.reset(a),e.template_effect((v,m)=>{n=e.set_class(a,1,"PaginationWrapper svelte-p7mf8l",null,n,{Hidden:e.get(y)==="sports"}),r.disabled=e.get(u)===0,e.set_text(c,v),o.disabled=e.get(u)>=P()-d(),e.set_text(p,m)},[()=>i()("previousButton"),()=>i()("nextButton")]),e.append(t,a)};e.if_block(V,t=>{e.get(j)&&P()>d()&&t(we)})}var ke=e.sibling(V,2);{var Pe=t=>{var a=ze();e.append(t,a)};e.if_block(ke,t=>{e.get(j)||t(Pe)})}e.reset(I),e.template_effect((t,a)=>{e.set_text(ve,t),e.set_text(ge,a),Q=e.set_class(E,1,"TournamentGamesContainer svelte-p7mf8l",null,Q,{Hidden:e.get(y)==="sports"})},[()=>i()("gamesDescriptionTitle"),()=>i()("gamesDescriptionSubtitle")]),e.append(_,I);var Te=e.pop(ue);return A(),Te}e.delegate(["click"]);customElements.define("tournament-games",e.create_custom_element(ae,{initialGames:{},endpoint:{},language:{},session:{},tournamentid:{},gamesLimit:{},totalGames:{},platformProp:{},tournamentMetadata:{},translationurl:{}},[],[],!1));exports.default=ae;
|