@everymatrix/casino-tournaments-list-controller 1.67.3 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{CasinoTournamentsListController-CtInxe7N.js → CasinoTournamentsListController-916JL4F7.js} +1822 -1828
- package/components/CasinoTournamentsListController-CLH2CE8z.cjs +15 -0
- package/components/{CasinoTournamentsListController-B462E0qG.js → CasinoTournamentsListController-DZAcldSI.js} +1834 -1840
- package/components/{CasinoTournamentsThumbnail-ByXAPz4b.js → CasinoTournamentsThumbnail-CO-eYscS.js} +177 -185
- package/components/{CasinoTournamentsThumbnail-14EXKDty.cjs → CasinoTournamentsThumbnail-CPbOt4AY.cjs} +2 -2
- package/components/{CasinoTournamentsThumbnail-DfAXgn4t.js → CasinoTournamentsThumbnail-nwxK7LAX.js} +177 -185
- package/components/CasinoTournamentsThumbnailController-A_BKNTJR.cjs +16 -0
- package/components/{CasinoTournamentsThumbnailController-hECyfAwI.js → CasinoTournamentsThumbnailController-Bq1AssJj.js} +774 -673
- package/components/{CasinoTournamentsThumbnailController-CPyJp_n-.js → CasinoTournamentsThumbnailController-CKIWWza3.js} +800 -699
- package/components/{CasinoTournamentsThumbnailDuration-B0XmmYAV.js → CasinoTournamentsThumbnailDuration-CoD7UhLT.js} +147 -153
- package/components/{CasinoTournamentsThumbnailDuration-CgopDMJt.js → CasinoTournamentsThumbnailDuration-Cs4yX-Vh.js} +147 -153
- package/components/CasinoTournamentsThumbnailDuration-D96wnUeF.cjs +1 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-BsYSU3V2.cjs +1 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-DeZzlvbO.js +435 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-DyvJUNdJ.js +435 -0
- package/components/CasinoTournamentsThumbnailPrizes-8tONX9SA.cjs +1 -0
- package/components/CasinoTournamentsThumbnailPrizes-BJHbDTCY.js +307 -0
- package/components/CasinoTournamentsThumbnailPrizes-CuVL_zHr.js +307 -0
- package/es2015/casino-tournaments-list-controller.cjs +1 -1
- package/es2015/casino-tournaments-list-controller.js +1 -1
- package/esnext/casino-tournaments-list-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{index-97d17652-ChRvzjAp.js → index-97d17652-BEnqZAxL.js} +186 -186
- package/stencil/index-97d17652-D5_8Vwfn.cjs +1 -0
- package/stencil/{index-97d17652-DKsTmN3Z.js → index-97d17652-WK_DbPS4.js} +175 -175
- package/stencil/index-b2193545-BOMvxBzV.js +519 -0
- package/stencil/index-b2193545-CFn9dM-v.js +503 -0
- package/stencil/index-b2193545-DPygl1Qn.cjs +1 -0
- package/stencil/{ui-image-ClXqMGwp.js → ui-image-3hy4ZvUC.js} +1 -1
- package/stencil/{ui-image-YphrYZtA.js → ui-image-D0wxuPze.js} +1 -1
- package/stencil/{ui-image-Db5QCSmt.cjs → ui-image-DE8MJHCZ.cjs} +1 -1
- package/stencil/{ui-image-b7b48fe5-B43lELFk.js → ui-image-b7b48fe5-Cf9Vq5pI.js} +1 -1
- package/stencil/{ui-image-b7b48fe5-CRQDt62Z.cjs → ui-image-b7b48fe5-DCck2kk1.cjs} +1 -1
- package/stencil/{ui-image-b7b48fe5-DVcK_myk.js → ui-image-b7b48fe5-V9vp4faA.js} +1 -1
- package/stencil/{ui-image_2-Df0q0jE8.js → ui-image_2-B56t6kXT.js} +2 -2
- package/stencil/{ui-image_2-EP2dwjfi.js → ui-image_2-BncuYpLi.js} +2 -2
- package/stencil/{ui-image_2-CyHaM9Na.cjs → ui-image_2-YkYxLKu7.cjs} +1 -1
- package/stencil/{ui-skeleton-1cb75d00-U47XWOV2.js → ui-skeleton-1cb75d00-B-R8GbLJ.js} +1 -1
- package/stencil/{ui-skeleton-1cb75d00-nmwFu55Y.cjs → ui-skeleton-1cb75d00-BTnhspbc.cjs} +1 -1
- package/stencil/{ui-skeleton-1cb75d00-bf7NJcVF.js → ui-skeleton-1cb75d00-Dy30RNE6.js} +1 -1
- package/stencil/{ui-skeleton-DSlZCsjK.js → ui-skeleton-CVBjRUvi.js} +2 -2
- package/stencil/{ui-skeleton-P9Vv-0Vy.js → ui-skeleton-RkXNxPG1.js} +2 -2
- package/stencil/{ui-skeleton-DXCQ8Yoq.cjs → ui-skeleton-se83zfWh.cjs} +1 -1
- package/components/CasinoTournamentsListController-DuFdroc_.cjs +0 -28
- package/components/CasinoTournamentsThumbnailController-qI0rc-Ej.cjs +0 -3
- package/components/CasinoTournamentsThumbnailDuration-CfNd-_JR.cjs +0 -1
- package/components/CasinoTournamentsThumbnailGamesSlider-BuvDMzWR.js +0 -443
- package/components/CasinoTournamentsThumbnailGamesSlider-CIcdSmKi.js +0 -443
- package/components/CasinoTournamentsThumbnailGamesSlider-DuLodhfq.cjs +0 -1
- package/components/CasinoTournamentsThumbnailPrizes-BxVgCfCL.cjs +0 -1
- package/components/CasinoTournamentsThumbnailPrizes-CIhSfxTp.js +0 -315
- package/components/CasinoTournamentsThumbnailPrizes-Cgv1iFmY.js +0 -315
- package/stencil/index-97d17652-qWThG1U9.cjs +0 -1
- package/stencil/index-b2193545-C1ayEiG4.js +0 -503
- package/stencil/index-b2193545-CyidmLE0.cjs +0 -1
- package/stencil/index-b2193545-s3PsNboB.js +0 -519
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
import { b as H, S as K, i as Y, s as Z, f as C, c as J, n as L, d as w, g as B, j as v, e as l, l as Q, o as V, m as M, h as y, q as X, t as j, k as A, p as $, F as N, z as tt, A as et, B as nt, C as it, D as st } from "./CasinoTournamentsListController-916JL4F7.js";
|
|
2
|
+
function O(n, t) {
|
|
3
|
+
H(n, t);
|
|
4
4
|
}
|
|
5
|
-
const
|
|
5
|
+
const U = {
|
|
6
6
|
en: {
|
|
7
7
|
finished: "Finished",
|
|
8
8
|
starting: "Starting in ",
|
|
@@ -92,100 +92,100 @@ const O = {
|
|
|
92
92
|
days: "days"
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
|
|
95
|
+
function rt(n) {
|
|
96
|
+
J(n, "svelte-6h4bfy", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}");
|
|
97
97
|
}
|
|
98
|
-
function q(
|
|
98
|
+
function q(n) {
|
|
99
99
|
let t, e, s = (
|
|
100
100
|
/*formatDate*/
|
|
101
|
-
|
|
101
|
+
n[10](
|
|
102
102
|
/*startdate*/
|
|
103
|
-
|
|
103
|
+
n[0]
|
|
104
104
|
) + ""
|
|
105
105
|
), a, u, o, d = (
|
|
106
106
|
/*formatDate*/
|
|
107
|
-
|
|
107
|
+
n[10](
|
|
108
108
|
/*enddate*/
|
|
109
|
-
|
|
109
|
+
n[1]
|
|
110
110
|
) + ""
|
|
111
|
-
), g,
|
|
112
|
-
function
|
|
111
|
+
), g, T, b, m, P, _, D;
|
|
112
|
+
function R(r, f) {
|
|
113
113
|
return (
|
|
114
114
|
/*status*/
|
|
115
115
|
r[2] == "Finished" || /*status*/
|
|
116
116
|
r[2] == "Closing" || /*status*/
|
|
117
|
-
r[2] == "Closed" ?
|
|
117
|
+
r[2] == "Closed" ? ot : (
|
|
118
118
|
/*tournamentUntilStartDays*/
|
|
119
|
-
r[5] > 0 ?
|
|
119
|
+
r[5] > 0 ? lt : at
|
|
120
120
|
)
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
|
-
let z =
|
|
124
|
-
function
|
|
123
|
+
let z = R(n), p = z(n);
|
|
124
|
+
function I(r, f) {
|
|
125
125
|
if (
|
|
126
126
|
/*status*/
|
|
127
127
|
r[2] == "Finished" || /*status*/
|
|
128
128
|
r[2] == "Closing" || /*status*/
|
|
129
129
|
r[2] == "Closed"
|
|
130
130
|
)
|
|
131
|
-
return
|
|
131
|
+
return ct;
|
|
132
132
|
if (
|
|
133
133
|
/*tournamentUntilStartDays*/
|
|
134
134
|
r[5] > 0
|
|
135
135
|
)
|
|
136
|
-
return
|
|
136
|
+
return dt;
|
|
137
137
|
if (
|
|
138
138
|
/*tournamentLeftDays*/
|
|
139
139
|
r[4] > 0
|
|
140
140
|
)
|
|
141
|
-
return
|
|
141
|
+
return ut;
|
|
142
142
|
}
|
|
143
|
-
let
|
|
143
|
+
let F = I(n), c = F && F(n);
|
|
144
144
|
return {
|
|
145
145
|
c() {
|
|
146
|
-
t = v("div"), e = v("div"), a =
|
|
146
|
+
t = v("div"), e = v("div"), a = j(s), u = A(), o = v("div"), g = j(d), T = A(), b = v("div"), m = v("div"), p.c(), P = A(), c && c.c(), l(e, "class", "StartDate"), l(e, "part", "StartDate"), l(o, "class", "EndDate"), l(o, "part", "EndDate"), l(t, "class", "TournamentDates"), l(t, "part", "TournamentDates"), l(m, "class", "ProgressBar"), l(m, "part", "ProgressBar"), l(b, "class", "ProgressBarWrapper"), l(b, "part", "ProgressBarWrapper");
|
|
147
147
|
},
|
|
148
|
-
m(r,
|
|
149
|
-
|
|
148
|
+
m(r, f) {
|
|
149
|
+
B(r, t, f), y(t, e), y(e, a), y(t, u), y(t, o), y(o, g), B(r, T, f), B(r, b, f), y(b, m), p.m(m, null), y(m, P), c && c.m(m, null), _ || (D = X(
|
|
150
150
|
/*getDuration*/
|
|
151
|
-
|
|
152
|
-
),
|
|
151
|
+
n[9].call(null, b)
|
|
152
|
+
), _ = !0);
|
|
153
153
|
},
|
|
154
|
-
p(r,
|
|
155
|
-
|
|
154
|
+
p(r, f) {
|
|
155
|
+
f & /*startdate*/
|
|
156
156
|
1 && s !== (s = /*formatDate*/
|
|
157
157
|
r[10](
|
|
158
158
|
/*startdate*/
|
|
159
159
|
r[0]
|
|
160
|
-
) + "") && M(a, s),
|
|
160
|
+
) + "") && M(a, s), f & /*enddate*/
|
|
161
161
|
2 && d !== (d = /*formatDate*/
|
|
162
162
|
r[10](
|
|
163
163
|
/*enddate*/
|
|
164
164
|
r[1]
|
|
165
|
-
) + "") && M(g, d), z === (z =
|
|
165
|
+
) + "") && M(g, d), z === (z = R(r)) && p ? p.p(r, f) : (p.d(1), p = z(r), p && (p.c(), p.m(m, P))), F === (F = I(r)) && c ? c.p(r, f) : (c && c.d(1), c = F && F(r), c && (c.c(), c.m(m, null)));
|
|
166
166
|
},
|
|
167
167
|
d(r) {
|
|
168
|
-
r && (
|
|
168
|
+
r && (w(t), w(T), w(b)), p.d(), c && c.d(), _ = !1, D();
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function at(n) {
|
|
173
173
|
let t;
|
|
174
174
|
return {
|
|
175
175
|
c() {
|
|
176
|
-
t = v("div"), l(t, "class", "ProgressBarFill"), l(t, "part", "ProgressBarFill"),
|
|
176
|
+
t = v("div"), l(t, "class", "ProgressBarFill"), l(t, "part", "ProgressBarFill"), N(
|
|
177
177
|
t,
|
|
178
178
|
"width",
|
|
179
179
|
/*getProgress*/
|
|
180
|
-
|
|
180
|
+
n[7]() + "%"
|
|
181
181
|
);
|
|
182
182
|
},
|
|
183
183
|
m(e, s) {
|
|
184
|
-
|
|
184
|
+
B(e, t, s);
|
|
185
185
|
},
|
|
186
186
|
p(e, s) {
|
|
187
187
|
s & /*getProgress*/
|
|
188
|
-
128 &&
|
|
188
|
+
128 && N(
|
|
189
189
|
t,
|
|
190
190
|
"width",
|
|
191
191
|
/*getProgress*/
|
|
@@ -193,54 +193,54 @@ function st(i) {
|
|
|
193
193
|
);
|
|
194
194
|
},
|
|
195
195
|
d(e) {
|
|
196
|
-
e &&
|
|
196
|
+
e && w(t);
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function lt(n) {
|
|
201
201
|
let t;
|
|
202
202
|
return {
|
|
203
203
|
c() {
|
|
204
204
|
t = v("div"), l(t, "class", "ProgressBarFillStarting"), l(t, "part", "ProgressBarFillStarting");
|
|
205
205
|
},
|
|
206
206
|
m(e, s) {
|
|
207
|
-
|
|
207
|
+
B(e, t, s);
|
|
208
208
|
},
|
|
209
|
-
p:
|
|
209
|
+
p: L,
|
|
210
210
|
d(e) {
|
|
211
|
-
e &&
|
|
211
|
+
e && w(t);
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function ot(n) {
|
|
216
216
|
let t;
|
|
217
217
|
return {
|
|
218
218
|
c() {
|
|
219
219
|
t = v("div"), l(t, "class", "ProgressBarFillEnd"), l(t, "part", "ProgressBarFillEnd");
|
|
220
220
|
},
|
|
221
221
|
m(e, s) {
|
|
222
|
-
|
|
222
|
+
B(e, t, s);
|
|
223
223
|
},
|
|
224
|
-
p:
|
|
224
|
+
p: L,
|
|
225
225
|
d(e) {
|
|
226
|
-
e &&
|
|
226
|
+
e && w(t);
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ut(n) {
|
|
231
231
|
let t, e, s, a = (
|
|
232
232
|
/*$_*/
|
|
233
|
-
|
|
233
|
+
n[8]("left") + ""
|
|
234
234
|
), u;
|
|
235
235
|
return {
|
|
236
236
|
c() {
|
|
237
|
-
t = v("div"), e =
|
|
237
|
+
t = v("div"), e = j(
|
|
238
238
|
/*showRemain*/
|
|
239
|
-
|
|
240
|
-
), s =
|
|
239
|
+
n[6]
|
|
240
|
+
), s = A(), u = j(a), l(t, "class", "Remaining"), l(t, "part", "Remaining");
|
|
241
241
|
},
|
|
242
242
|
m(o, d) {
|
|
243
|
-
|
|
243
|
+
B(o, t, d), y(t, e), y(t, s), y(t, u);
|
|
244
244
|
},
|
|
245
245
|
p(o, d) {
|
|
246
246
|
d & /*showRemain*/
|
|
@@ -253,27 +253,27 @@ function lt(i) {
|
|
|
253
253
|
o[8]("left") + "") && M(u, a);
|
|
254
254
|
},
|
|
255
255
|
d(o) {
|
|
256
|
-
o &&
|
|
256
|
+
o && w(t);
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function dt(n) {
|
|
261
261
|
let t, e = (
|
|
262
262
|
/*$_*/
|
|
263
|
-
|
|
263
|
+
n[8]("starting") + ""
|
|
264
264
|
), s, a, u = (
|
|
265
265
|
/*getTextByDiff*/
|
|
266
|
-
|
|
266
|
+
n[11](
|
|
267
267
|
/*tournamentUntilStartDays*/
|
|
268
|
-
|
|
268
|
+
n[5]
|
|
269
269
|
) + ""
|
|
270
270
|
), o;
|
|
271
271
|
return {
|
|
272
272
|
c() {
|
|
273
|
-
t = v("div"), s =
|
|
273
|
+
t = v("div"), s = j(e), a = A(), o = j(u), l(t, "class", "Remaining"), l(t, "part", "Remaining");
|
|
274
274
|
},
|
|
275
275
|
m(d, g) {
|
|
276
|
-
|
|
276
|
+
B(d, t, g), y(t, s), y(t, a), y(t, o);
|
|
277
277
|
},
|
|
278
278
|
p(d, g) {
|
|
279
279
|
g & /*$_*/
|
|
@@ -286,21 +286,21 @@ function ot(i) {
|
|
|
286
286
|
) + "") && M(o, u);
|
|
287
287
|
},
|
|
288
288
|
d(d) {
|
|
289
|
-
d &&
|
|
289
|
+
d && w(t);
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function ct(n) {
|
|
294
294
|
let t, e = (
|
|
295
295
|
/*$_*/
|
|
296
|
-
|
|
296
|
+
n[8]("finished") + ""
|
|
297
297
|
), s;
|
|
298
298
|
return {
|
|
299
299
|
c() {
|
|
300
|
-
t = v("div"), s =
|
|
300
|
+
t = v("div"), s = j(e), l(t, "class", "Finished"), l(t, "part", "Finished");
|
|
301
301
|
},
|
|
302
302
|
m(a, u) {
|
|
303
|
-
|
|
303
|
+
B(a, t, u), y(t, s);
|
|
304
304
|
},
|
|
305
305
|
p(a, u) {
|
|
306
306
|
u & /*$_*/
|
|
@@ -308,145 +308,132 @@ function ut(i) {
|
|
|
308
308
|
a[8]("finished") + "") && M(s, e);
|
|
309
309
|
},
|
|
310
310
|
d(a) {
|
|
311
|
-
a &&
|
|
311
|
+
a && w(t);
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function ft(n) {
|
|
316
316
|
let t, e = (
|
|
317
317
|
/*startdate*/
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
n[0] && /*enddate*/
|
|
319
|
+
n[1] && q(n)
|
|
320
320
|
);
|
|
321
321
|
return {
|
|
322
322
|
c() {
|
|
323
323
|
t = v("div"), e && e.c(), l(t, "class", "TournamentDuration"), l(t, "part", "TournamentDuration");
|
|
324
324
|
},
|
|
325
325
|
m(s, a) {
|
|
326
|
-
|
|
326
|
+
B(s, t, a), e && e.m(t, null), n[17](t);
|
|
327
327
|
},
|
|
328
328
|
p(s, [a]) {
|
|
329
329
|
/*startdate*/
|
|
330
330
|
s[0] && /*enddate*/
|
|
331
331
|
s[1] ? e ? e.p(s, a) : (e = q(s), e.c(), e.m(t, null)) : e && (e.d(1), e = null);
|
|
332
332
|
},
|
|
333
|
-
i:
|
|
334
|
-
o:
|
|
333
|
+
i: L,
|
|
334
|
+
o: L,
|
|
335
335
|
d(s) {
|
|
336
|
-
s &&
|
|
336
|
+
s && w(t), e && e.d(), n[17](null);
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function gt(n, t, e) {
|
|
341
341
|
let s, a;
|
|
342
|
-
|
|
343
|
-
let { startdate: u = "" } = t, { enddate: o = "" } = t, { status: d = "" } = t, { lang: g = "en" } = t, { clientstyling:
|
|
344
|
-
const
|
|
345
|
-
fetch(
|
|
346
|
-
Object.keys(
|
|
347
|
-
|
|
342
|
+
Q(n, st, (i) => e(8, a = i));
|
|
343
|
+
let { startdate: u = "" } = t, { enddate: o = "" } = t, { status: d = "" } = t, { lang: g = "en" } = t, { clientstyling: T = "" } = t, { clientstylingurl: b = "" } = t, { translationurl: m = "" } = t, { mbsource: P } = t, _, D = "", R = "", z = "";
|
|
344
|
+
const p = () => {
|
|
345
|
+
fetch(m).then((h) => h.json()).then((h) => {
|
|
346
|
+
Object.keys(h).forEach((S) => {
|
|
347
|
+
O(S, h[S]);
|
|
348
348
|
});
|
|
349
|
-
}).catch((
|
|
350
|
-
console.log(
|
|
349
|
+
}).catch((h) => {
|
|
350
|
+
console.log(h);
|
|
351
351
|
});
|
|
352
352
|
};
|
|
353
|
-
Object.keys(
|
|
354
|
-
|
|
353
|
+
Object.keys(U).forEach((i) => {
|
|
354
|
+
O(i, U[i]);
|
|
355
355
|
});
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
e(4,
|
|
359
|
-
},
|
|
360
|
-
const
|
|
361
|
-
let
|
|
362
|
-
return `${
|
|
363
|
-
},
|
|
364
|
-
const
|
|
365
|
-
const
|
|
366
|
-
return
|
|
356
|
+
const I = (i) => new Date(i).getTime(), F = (i, h) => (I(h) - I(i)) / (1e3 * 60), c = () => {
|
|
357
|
+
const i = /* @__PURE__ */ new Date();
|
|
358
|
+
e(4, D = F(i, o)), e(5, R = F(i, u)), e(6, z = f(D));
|
|
359
|
+
}, r = (i) => {
|
|
360
|
+
const h = { month: "long" };
|
|
361
|
+
let S = new Date(i), E = new Intl.DateTimeFormat(g, h).format(S);
|
|
362
|
+
return `${S.getDate()} ${E}, ${S.toLocaleString("en-GB", { hour: "numeric", minute: "numeric" })}, ${S.getUTCFullYear()}`;
|
|
363
|
+
}, f = (i) => {
|
|
364
|
+
const h = (E, k) => E + " " + a(k), S = (E) => {
|
|
365
|
+
const k = Math.floor(E);
|
|
366
|
+
return k < 10 ? `0${k}` : `${k}`;
|
|
367
367
|
};
|
|
368
|
-
if (
|
|
369
|
-
const
|
|
370
|
-
return [
|
|
368
|
+
if (i < 1440) {
|
|
369
|
+
const E = i / 60, k = i % 60, W = (k - Math.floor(k)) * 60;
|
|
370
|
+
return [E, k, W].map((G) => S(G)).join(":");
|
|
371
371
|
}
|
|
372
|
-
return
|
|
373
|
-
}, b = () => {
|
|
374
|
-
let n = document.createElement("style");
|
|
375
|
-
n.innerHTML = S, D.appendChild(n);
|
|
376
|
-
}, x = () => {
|
|
377
|
-
let n = new URL(p), c = document.createElement("style");
|
|
378
|
-
fetch(n.href).then((_) => _.text()).then((_) => {
|
|
379
|
-
c.innerHTML = _, setTimeout(
|
|
380
|
-
() => {
|
|
381
|
-
D.appendChild(c);
|
|
382
|
-
},
|
|
383
|
-
1
|
|
384
|
-
), setTimeout(
|
|
385
|
-
() => {
|
|
386
|
-
},
|
|
387
|
-
500
|
|
388
|
-
);
|
|
389
|
-
});
|
|
372
|
+
return h(Math.ceil(i / (60 * 24)), "days");
|
|
390
373
|
};
|
|
391
|
-
|
|
374
|
+
V(() => {
|
|
392
375
|
window.postMessage({ type: "TournamentThumbnailMounted" }, window.location.href);
|
|
393
|
-
const
|
|
376
|
+
const i = setInterval(
|
|
394
377
|
() => {
|
|
395
|
-
u && o &&
|
|
378
|
+
u && o && c();
|
|
396
379
|
},
|
|
397
380
|
1e3
|
|
398
381
|
);
|
|
399
|
-
return () =>
|
|
382
|
+
return () => {
|
|
383
|
+
clearInterval(i);
|
|
384
|
+
};
|
|
400
385
|
});
|
|
401
|
-
function
|
|
402
|
-
|
|
403
|
-
|
|
386
|
+
function x(i) {
|
|
387
|
+
$[i ? "unshift" : "push"](() => {
|
|
388
|
+
_ = i, e(3, _);
|
|
404
389
|
});
|
|
405
390
|
}
|
|
406
|
-
return
|
|
407
|
-
"startdate" in
|
|
408
|
-
},
|
|
409
|
-
|
|
391
|
+
return n.$$set = (i) => {
|
|
392
|
+
"startdate" in i && e(0, u = i.startdate), "enddate" in i && e(1, o = i.enddate), "status" in i && e(2, d = i.status), "lang" in i && e(12, g = i.lang), "clientstyling" in i && e(13, T = i.clientstyling), "clientstylingurl" in i && e(14, b = i.clientstylingurl), "translationurl" in i && e(15, m = i.translationurl), "mbsource" in i && e(16, P = i.mbsource);
|
|
393
|
+
}, n.$$.update = () => {
|
|
394
|
+
n.$$.dirty & /*tournamentLeftDays, startdate, enddate*/
|
|
410
395
|
19 && e(7, s = () => {
|
|
411
|
-
if (
|
|
396
|
+
if (D <= 0)
|
|
412
397
|
return 100;
|
|
413
|
-
const
|
|
414
|
-
return Math.floor((
|
|
415
|
-
}),
|
|
416
|
-
19 && u && o &&
|
|
417
|
-
4096 && g &&
|
|
418
|
-
4112 && g &&
|
|
419
|
-
32768 &&
|
|
420
|
-
8200 &&
|
|
421
|
-
16392 &&
|
|
398
|
+
const i = F(u, o), h = 100 / i;
|
|
399
|
+
return Math.floor((i - D) * h);
|
|
400
|
+
}), n.$$.dirty & /*startdate, enddate, tournamentLeftDays*/
|
|
401
|
+
19 && u && o && c() && f(D), n.$$.dirty & /*lang*/
|
|
402
|
+
4096 && g && c(), n.$$.dirty & /*lang, tournamentLeftDays*/
|
|
403
|
+
4112 && g && f(D), n.$$.dirty & /*translationurl*/
|
|
404
|
+
32768 && m && p(), n.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
405
|
+
8200 && T && _ && tt(_, T), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
406
|
+
16392 && b && _ && et(_, b), n.$$.dirty & /*mbsource, customStylingContainer*/
|
|
407
|
+
65544 && P && _ && nt(_, `${P}.Style`);
|
|
422
408
|
}, [
|
|
423
409
|
u,
|
|
424
410
|
o,
|
|
425
411
|
d,
|
|
412
|
+
_,
|
|
426
413
|
D,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
I,
|
|
414
|
+
R,
|
|
415
|
+
z,
|
|
430
416
|
s,
|
|
431
417
|
a,
|
|
432
|
-
|
|
433
|
-
f,
|
|
418
|
+
c,
|
|
434
419
|
r,
|
|
420
|
+
f,
|
|
435
421
|
g,
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
422
|
+
T,
|
|
423
|
+
b,
|
|
424
|
+
m,
|
|
425
|
+
P,
|
|
426
|
+
x
|
|
440
427
|
];
|
|
441
428
|
}
|
|
442
|
-
class
|
|
429
|
+
class mt extends K {
|
|
443
430
|
constructor(t) {
|
|
444
|
-
super(),
|
|
431
|
+
super(), Y(
|
|
445
432
|
this,
|
|
446
433
|
t,
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
434
|
+
gt,
|
|
435
|
+
ft,
|
|
436
|
+
Z,
|
|
450
437
|
{
|
|
451
438
|
startdate: 0,
|
|
452
439
|
enddate: 1,
|
|
@@ -454,9 +441,10 @@ class ft extends Y {
|
|
|
454
441
|
lang: 12,
|
|
455
442
|
clientstyling: 13,
|
|
456
443
|
clientstylingurl: 14,
|
|
457
|
-
translationurl: 15
|
|
444
|
+
translationurl: 15,
|
|
445
|
+
mbsource: 16
|
|
458
446
|
},
|
|
459
|
-
|
|
447
|
+
rt
|
|
460
448
|
);
|
|
461
449
|
}
|
|
462
450
|
get startdate() {
|
|
@@ -501,8 +489,14 @@ class ft extends Y {
|
|
|
501
489
|
set translationurl(t) {
|
|
502
490
|
this.$$set({ translationurl: t }), C();
|
|
503
491
|
}
|
|
492
|
+
get mbsource() {
|
|
493
|
+
return this.$$.ctx[16];
|
|
494
|
+
}
|
|
495
|
+
set mbsource(t) {
|
|
496
|
+
this.$$set({ mbsource: t }), C();
|
|
497
|
+
}
|
|
504
498
|
}
|
|
505
|
-
|
|
499
|
+
it(mt, { startdate: {}, enddate: {}, status: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {} }, [], [], !0);
|
|
506
500
|
export {
|
|
507
|
-
|
|
501
|
+
mt as default
|
|
508
502
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoTournamentsListController-CLH2CE8z.cjs");function C(r,e){t.addMessages(r,e)}const M={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},hr:{finished:"Završeno",starting:"Starting in ",left:"preostalo",minutes:"minute",hours:"sati",days:"dana"},"zh-hk":{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"},fr:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"},ro:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"},tr:{finished:"Bitti",starting:"İçinde başlayan",left:"sol",minutes:"dakika",hours:"saat",days:"günler"},el:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"},es:{finished:"Finalizado",starting:"Iniciando en ",left:"queda",minutes:"minutos",hours:"horas",days:"días"},hu:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"},pt:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"},"en-us":{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"}};function I(r){t.append_styles(r,"svelte-6h4bfy","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}")}function z(r){let e,n,a=r[10](r[0])+"",l,u,o,d=r[10](r[1])+"",g,k,y,m,w,p,b;function T(s,f){return s[2]=="Finished"||s[2]=="Closing"||s[2]=="Closed"?N:s[5]>0?O:L}let B=T(r),_=B(r);function P(s,f){if(s[2]=="Finished"||s[2]=="Closing"||s[2]=="Closed")return A;if(s[5]>0)return q;if(s[4]>0)return U}let v=P(r),c=v&&v(r);return{c(){e=t.element("div"),n=t.element("div"),l=t.text(a),u=t.space(),o=t.element("div"),g=t.text(d),k=t.space(),y=t.element("div"),m=t.element("div"),_.c(),w=t.space(),c&&c.c(),t.attr(n,"class","StartDate"),t.attr(n,"part","StartDate"),t.attr(o,"class","EndDate"),t.attr(o,"part","EndDate"),t.attr(e,"class","TournamentDates"),t.attr(e,"part","TournamentDates"),t.attr(m,"class","ProgressBar"),t.attr(m,"part","ProgressBar"),t.attr(y,"class","ProgressBarWrapper"),t.attr(y,"part","ProgressBarWrapper")},m(s,f){t.insert(s,e,f),t.append(e,n),t.append(n,l),t.append(e,u),t.append(e,o),t.append(o,g),t.insert(s,k,f),t.insert(s,y,f),t.append(y,m),_.m(m,null),t.append(m,w),c&&c.m(m,null),p||(b=t.action_destroyer(r[9].call(null,y)),p=!0)},p(s,f){f&1&&a!==(a=s[10](s[0])+"")&&t.set_data(l,a),f&2&&d!==(d=s[10](s[1])+"")&&t.set_data(g,d),B===(B=T(s))&&_?_.p(s,f):(_.d(1),_=B(s),_&&(_.c(),_.m(m,w))),v===(v=P(s))&&c?c.p(s,f):(c&&c.d(1),c=v&&v(s),c&&(c.c(),c.m(m,null)))},d(s){s&&(t.detach(e),t.detach(k),t.detach(y)),_.d(),c&&c.d(),p=!1,b()}}}function L(r){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFill"),t.attr(e,"part","ProgressBarFill"),t.set_style(e,"width",r[7]()+"%")},m(n,a){t.insert(n,e,a)},p(n,a){a&128&&t.set_style(e,"width",n[7]()+"%")},d(n){n&&t.detach(e)}}}function O(r){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillStarting"),t.attr(e,"part","ProgressBarFillStarting")},m(n,a){t.insert(n,e,a)},p:t.noop,d(n){n&&t.detach(e)}}}function N(r){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillEnd"),t.attr(e,"part","ProgressBarFillEnd")},m(n,a){t.insert(n,e,a)},p:t.noop,d(n){n&&t.detach(e)}}}function U(r){let e,n,a,l=r[8]("left")+"",u;return{c(){e=t.element("div"),n=t.text(r[6]),a=t.space(),u=t.text(l),t.attr(e,"class","Remaining"),t.attr(e,"part","Remaining")},m(o,d){t.insert(o,e,d),t.append(e,n),t.append(e,a),t.append(e,u)},p(o,d){d&64&&t.set_data(n,o[6]),d&256&&l!==(l=o[8]("left")+"")&&t.set_data(u,l)},d(o){o&&t.detach(e)}}}function q(r){let e,n=r[8]("starting")+"",a,l,u=r[11](r[5])+"",o;return{c(){e=t.element("div"),a=t.text(n),l=t.space(),o=t.text(u),t.attr(e,"class","Remaining"),t.attr(e,"part","Remaining")},m(d,g){t.insert(d,e,g),t.append(e,a),t.append(e,l),t.append(e,o)},p(d,g){g&256&&n!==(n=d[8]("starting")+"")&&t.set_data(a,n),g&32&&u!==(u=d[11](d[5])+"")&&t.set_data(o,u)},d(d){d&&t.detach(e)}}}function A(r){let e,n=r[8]("finished")+"",a;return{c(){e=t.element("div"),a=t.text(n),t.attr(e,"class","Finished"),t.attr(e,"part","Finished")},m(l,u){t.insert(l,e,u),t.append(e,a)},p(l,u){u&256&&n!==(n=l[8]("finished")+"")&&t.set_data(a,n)},d(l){l&&t.detach(e)}}}function W(r){let e,n=r[0]&&r[1]&&z(r);return{c(){e=t.element("div"),n&&n.c(),t.attr(e,"class","TournamentDuration"),t.attr(e,"part","TournamentDuration")},m(a,l){t.insert(a,e,l),n&&n.m(e,null),r[17](e)},p(a,[l]){a[0]&&a[1]?n?n.p(a,l):(n=z(a),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:t.noop,o:t.noop,d(a){a&&t.detach(e),n&&n.d(),r[17](null)}}}function G(r,e,n){let a,l;t.component_subscribe(r,t.$format,i=>n(8,l=i));let{startdate:u=""}=e,{enddate:o=""}=e,{status:d=""}=e,{lang:g="en"}=e,{clientstyling:k=""}=e,{clientstylingurl:y=""}=e,{translationurl:m=""}=e,{mbsource:w}=e,p,b="",T="",B="";const _=()=>{fetch(m).then(h=>h.json()).then(h=>{Object.keys(h).forEach(F=>{C(F,h[F])})}).catch(h=>{console.log(h)})};Object.keys(M).forEach(i=>{C(i,M[i])});const P=i=>new Date(i).getTime(),v=(i,h)=>(P(h)-P(i))/(1e3*60),c=()=>{const i=new Date;n(4,b=v(i,o)),n(5,T=v(i,u)),n(6,B=f(b))},s=i=>{const h={month:"long"};let F=new Date(i),S=new Intl.DateTimeFormat(g,h).format(F);return`${F.getDate()} ${S}, ${F.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${F.getUTCFullYear()}`},f=i=>{const h=(S,D)=>S+" "+l(D),F=S=>{const D=Math.floor(S);return D<10?`0${D}`:`${D}`};if(i<1440){const S=i/60,D=i%60,R=(D-Math.floor(D))*60;return[S,D,R].map(x=>F(x)).join(":")}return h(Math.ceil(i/(60*24)),"days")};t.onMount(()=>{window.postMessage({type:"TournamentThumbnailMounted"},window.location.href);const i=setInterval(()=>{u&&o&&c()},1e3);return()=>{clearInterval(i)}});function j(i){t.binding_callbacks[i?"unshift":"push"](()=>{p=i,n(3,p)})}return r.$$set=i=>{"startdate"in i&&n(0,u=i.startdate),"enddate"in i&&n(1,o=i.enddate),"status"in i&&n(2,d=i.status),"lang"in i&&n(12,g=i.lang),"clientstyling"in i&&n(13,k=i.clientstyling),"clientstylingurl"in i&&n(14,y=i.clientstylingurl),"translationurl"in i&&n(15,m=i.translationurl),"mbsource"in i&&n(16,w=i.mbsource)},r.$$.update=()=>{r.$$.dirty&19&&n(7,a=()=>{if(b<=0)return 100;const i=v(u,o),h=100/i;return Math.floor((i-b)*h)}),r.$$.dirty&19&&u&&o&&c()&&f(b),r.$$.dirty&4096&&g&&c(),r.$$.dirty&4112&&g&&f(b),r.$$.dirty&32768&&m&&_(),r.$$.dirty&8200&&k&&p&&t.setClientStyling(p,k),r.$$.dirty&16392&&y&&p&&t.setClientStylingURL(p,y),r.$$.dirty&65544&&w&&p&&t.setStreamStyling(p,`${w}.Style`)},[u,o,d,p,b,T,B,a,l,c,s,f,g,k,y,m,w,j]}class E extends t.SvelteComponent{constructor(e){super(),t.init(this,e,G,W,t.safe_not_equal,{startdate:0,enddate:1,status:2,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15,mbsource:16},I)}get startdate(){return this.$$.ctx[0]}set startdate(e){this.$$set({startdate:e}),t.flush()}get enddate(){return this.$$.ctx[1]}set enddate(e){this.$$set({enddate:e}),t.flush()}get status(){return this.$$.ctx[2]}set status(e){this.$$set({status:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}get mbsource(){return this.$$.ctx[16]}set mbsource(e){this.$$set({mbsource:e}),t.flush()}}t.create_custom_element(E,{startdate:{},enddate:{},status:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},mbsource:{}},[],[],!0);exports.default=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoTournamentsListController-CLH2CE8z.cjs"),se=require("./CasinoTournamentsThumbnailController-A_BKNTJR.cjs");function U(t,l){e.addMessages(t,l)}const D={en:{playNow:"Play now"},hr:{playNow:"Započni sada"},"zh-hk":{playNow:"现在播放"},fr:{playNow:"Joue maintenant"},ro:{playNow:"Joaca acum"},tr:{playNow:"Şimdi oyna"},el:{playNow:"Παίξε τώρα"},es:{playNow:"Jugar Ya"},pt:{playNow:"Jogue agora"},"en-us":{playNow:"Play now"}};function ie(t){e.append_styles(t,"svelte-xgd67c","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentsGamesSlider{background:var(--emw--color-contrast, #07072A);color:var(--emw--color-white, #FFFFFF);display:flex;justify-content:center}.disabled{color:var(--emw--color-contrast, #07072A)}.SliderNavButton{background:var(--emw--color-contrast, #07072A);border:0px;width:25px;display:flex;align-items:center;justify-content:center}.SliderNavButton svg{width:20px}.NavButton{background:var(--emw--color-contrast, #07072A);border:0px;width:25px;display:flex;align-items:center;justify-content:center}main{width:95%;overflow:hidden}.items{display:flex;transition:transform 0.4s ease-in-out;transform:translateX(0px)}.item{min-width:119px;height:96px;margin:0 4px;background-color:var(--emw--color-secondary, #FD2839);color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.PlayNowButton{position:absolute;background:var(--emw--color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emw--color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.itemHover{opacity:1}.items .item:first-child{margin-left:0}.items .item:last-child{margin-right:0}")}function I(t,l,n){const i=t.slice();return i[49]=l[n],i[51]=n,i}function W(t){let l,n,i,d,h,p,y,a,_,w,g=e.ensure_array_like(t[1]),o=[];for(let s=0;s<g.length;s+=1)o[s]=G(I(t,g,s));return{c(){l=e.element("div"),n=e.element("div"),n.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>',i=e.space(),d=e.element("main"),h=e.element("div");for(let s=0;s<o.length;s+=1)o[s].c();y=e.space(),a=e.element("div"),a.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>',e.attr(n,"class","SliderNavButton"),e.attr(n,"part","SliderNavButton"),e.toggle_class(n,"disabled",t[8]),e.attr(h,"class","items"),e.attr(h,"part","items"),e.set_style(h,"transform","translateX("+t[2]+"px)"),e.add_render_callback(()=>t[29].call(d)),e.attr(a,"class","SliderNavButton"),e.attr(a,"part","SliderNavButton"),e.toggle_class(a,"disabled",t[9]),e.attr(l,"class","TournamentsGamesSlider"),e.attr(l,"part","TournamentsGamesSlider")},m(s,m){e.insert(s,l,m),e.append(l,n),e.append(l,i),e.append(l,d),e.append(d,h);for(let u=0;u<o.length;u+=1)o[u]&&o[u].m(h,null);t[28](h),p=e.add_iframe_resize_listener(d,t[29].bind(d)),e.append(l,y),e.append(l,a),t[31](l),_||(w=[e.listen(n,"click",t[24]),e.listen(a,"click",t[30])],_=!0)},p(s,m){if(m[0]&256&&e.toggle_class(n,"disabled",s[8]),m[0]&23650){g=e.ensure_array_like(s[1]);let u;for(u=0;u<g.length;u+=1){const v=I(s,g,u);o[u]?o[u].p(v,m):(o[u]=G(v),o[u].c(),o[u].m(h,null))}for(;u<o.length;u+=1)o[u].d(1);o.length=g.length}m[0]&4&&e.set_style(h,"transform","translateX("+s[2]+"px)"),m[0]&512&&e.toggle_class(a,"disabled",s[9])},d(s){s&&e.detach(l),e.destroy_each(o,s),t[28](null),p(),t[31](null),_=!1,e.run_all(w)}}}function G(t){let l,n,i=t[10]("playNow")+"",d,h,p,y,a,_,w,g,o,s,m;function u(){return t[25](t[49])}function v(){return t[26](t[51])}return{c(){l=e.element("div"),n=e.element("span"),d=e.text(i),y=e.space(),a=e.element("img"),o=e.space(),e.attr(n,"class",h="PlayNowButton "+(t[5]&&t[6]==t[51]?"itemHover":"")),e.attr(n,"part",p="PlayNowButton "+(t[5]&&t[6]==t[51]?"itemHover":"")),e.src_url_equal(a.src,_=t[49].thumbnail)||e.attr(a,"src",_),e.attr(a,"width","132px"),e.attr(a,"height","100px"),e.attr(a,"alt",w=t[49].name),e.attr(a,"title",g=t[49].name),e.attr(l,"class","item"),e.attr(l,"part","item")},m(b,c){e.insert(b,l,c),e.append(l,n),e.append(n,d),e.append(l,y),e.append(l,a),e.append(l,o),s||(m=[e.listen(l,"click",u),e.listen(l,"mouseenter",v),e.listen(l,"mouseleave",t[27])],s=!0)},p(b,c){t=b,c[0]&1024&&i!==(i=t[10]("playNow")+"")&&e.set_data(d,i),c[0]&96&&h!==(h="PlayNowButton "+(t[5]&&t[6]==t[51]?"itemHover":""))&&e.attr(n,"class",h),c[0]&96&&p!==(p="PlayNowButton "+(t[5]&&t[6]==t[51]?"itemHover":""))&&e.attr(n,"part",p),c[0]&2&&!e.src_url_equal(a.src,_=t[49].thumbnail)&&e.attr(a,"src",_),c[0]&2&&w!==(w=t[49].name)&&e.attr(a,"alt",w),c[0]&2&&g!==(g=t[49].name)&&e.attr(a,"title",g)},d(b){b&&e.detach(l),s=!1,e.run_all(m)}}}function oe(t){let l,n=t[1]&&t[1].length>0&&W(t);return{c(){l=e.element("div"),n&&n.c()},m(i,d){e.insert(i,l,d),n&&n.m(l,null),t[32](l)},p(i,d){i[1]&&i[1].length>0?n?n.p(i,d):(n=W(i),n.c(),n.m(l,null)):n&&(n.d(1),n=null)},i:e.noop,o:e.noop,d(i){i&&e.detach(l),n&&n.d(),t[32](null)}}}let ce=30;function ue(t,l,n){let i,d,h;e.component_subscribe(t,e.$format,r=>n(10,h=r));let{tournamenturl:p=""}=l,{scrollby:y="3"}=l,{pagfactor:a="175"}=l,{lang:_=""}=l,{translationurl:w=""}=l,{clientstyling:g=""}=l,{clientstylingurl:o=""}=l,{mbsource:s}=l,m,u=window.navigator.userAgent,v,b=[],c=0,k,B=null,C=null,E=!1,j,T,P=0,N;const X=()=>{fetch(w).then(f=>f.json()).then(f=>{Object.keys(f).forEach(M=>{U(M,f[M])})}).catch(f=>{console.log(f)})};Object.keys(D).forEach(r=>{U(r,D[r])});const L=r=>{n(5,E=!0),n(6,j=r)},z=()=>{n(5,E=!1),n(6,j=-1)},J=r=>r.touches||r.originalEvent.touches,A=r=>{const f=J(r)[0];B=f.clientX,C=f.clientY},H=r=>{if(!B||!C)return;let f=r.touches[0].clientX,M=r.touches[0].clientY,S=B-f,ae=C-M;Math.abs(S)>Math.abs(ae)&&(S>0?F(1):F(-1)),B=null,C=null},F=r=>{r>0&&!d?(n(2,c-=v),n(2,c=c<P?P:c)):r<0&&!i&&(n(2,c+=v),n(2,c=c>0?0:c))},q=r=>{window.postMessage({type:"TournamentGameAction",gameId:r.id,name:r.name,launchUrl:r.launchUrl},window.location.href)},R=()=>{let r=new URL(p),f=new Headers;r.searchParams.append("expand","games"),r.searchParams.append("pagination",`games(limit=${ce},offset=${c})`),r.searchParams.append("fields","games(id,name,thumbnail,launchUrl)"),r.searchParams.append("language",_),r.searchParams.append("platform",se.getDevice(u)),fetch(r,{method:"GET",headers:f}).then(S=>S.json()).then(S=>{n(1,b=S.item.games.items),S.item.games.total})},x=()=>{k.addEventListener("touchstart",A,{passive:!0}),k.addEventListener("touchmove",H,{passive:!0})},Y=()=>{setTimeout(()=>{n(23,P=(T.scrollWidth-T.clientWidth)*-1),n(16,a=new String(T.scrollWidth/b.length)),v=parseInt(y,10)*parseFloat(a,2).toFixed(2)},1e3)},Z=()=>{N>0&&N<Math.floor((parseInt(y)+1)*a)&&n(15,y=Math.ceil(N/a).toString())};e.onMount(()=>(v=parseInt(y,10)*parseInt(a,10),()=>{k.removeEventListener("touchstart",A),k.removeEventListener("touchmove",H)}));const K=()=>F(-1),Q=r=>q(r),V=r=>L(r),$=()=>z();function ee(r){e.binding_callbacks[r?"unshift":"push"](()=>{T=r,n(7,T)})}function te(){N=this.clientWidth,n(4,N)}const ne=()=>F(1);function le(r){e.binding_callbacks[r?"unshift":"push"](()=>{k=r,n(3,k)})}function re(r){e.binding_callbacks[r?"unshift":"push"](()=>{m=r,n(0,m)})}return t.$$set=r=>{"tournamenturl"in r&&n(17,p=r.tournamenturl),"scrollby"in r&&n(15,y=r.scrollby),"pagfactor"in r&&n(16,a=r.pagfactor),"lang"in r&&n(18,_=r.lang),"translationurl"in r&&n(19,w=r.translationurl),"clientstyling"in r&&n(20,g=r.clientstyling),"clientstylingurl"in r&&n(21,o=r.clientstylingurl),"mbsource"in r&&n(22,s=r.mbsource)},t.$$.update=()=>{t.$$.dirty[0]&4&&n(8,i=c===0),t.$$.dirty[0]&8388612&&n(9,d=c<=P),t.$$.dirty[0]&16&&N&&Z(),t.$$.dirty[0]&131072&&p&&R(),t.$$.dirty[0]&8&&k&&x(),t.$$.dirty[0]&524288&&w&&X(),t.$$.dirty[0]&2&&b.length&&Y(),t.$$.dirty[0]&1048577&&g&&m&&e.setClientStyling(m,g),t.$$.dirty[0]&2097153&&o&&m&&e.setClientStylingURL(m,o),t.$$.dirty[0]&4194305&&s&&m&&e.setStreamStyling(m,`${s}.Style`)},n(2,c=0),[m,b,c,k,N,E,j,T,i,d,h,L,z,F,q,y,a,p,_,w,g,o,s,P,K,Q,V,$,ee,te,ne,le,re]}class O extends e.SvelteComponent{constructor(l){super(),e.init(this,l,ue,oe,e.safe_not_equal,{tournamenturl:17,scrollby:15,pagfactor:16,lang:18,translationurl:19,clientstyling:20,clientstylingurl:21,mbsource:22},ie,[-1,-1])}get tournamenturl(){return this.$$.ctx[17]}set tournamenturl(l){this.$$set({tournamenturl:l}),e.flush()}get scrollby(){return this.$$.ctx[15]}set scrollby(l){this.$$set({scrollby:l}),e.flush()}get pagfactor(){return this.$$.ctx[16]}set pagfactor(l){this.$$set({pagfactor:l}),e.flush()}get lang(){return this.$$.ctx[18]}set lang(l){this.$$set({lang:l}),e.flush()}get translationurl(){return this.$$.ctx[19]}set translationurl(l){this.$$set({translationurl:l}),e.flush()}get clientstyling(){return this.$$.ctx[20]}set clientstyling(l){this.$$set({clientstyling:l}),e.flush()}get clientstylingurl(){return this.$$.ctx[21]}set clientstylingurl(l){this.$$set({clientstylingurl:l}),e.flush()}get mbsource(){return this.$$.ctx[22]}set mbsource(l){this.$$set({mbsource:l}),e.flush()}}e.create_custom_element(O,{tournamenturl:{},scrollby:{},pagfactor:{},lang:{},translationurl:{},clientstyling:{},clientstylingurl:{},mbsource:{}},[],[],!0);exports.default=O;
|