@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,794 @@
|
|
|
1
|
+
import { b as nt, $ as ot, M as st, g as it, h as Le, u as lt, o as dt, j as W, k as je, z as ce, n as L, q as vt, r as ct, v as Ne, p as ht, l as A, m as p, C as ut, E as R, e as ft, f as pt, w as d, L as Qe, t as q, s as he, F as gt, x as f, I as Xe, y as De, J as Ye, K as tt, N as mt, B as rt } from "./TournamentDetails-glnpe9gf.js";
|
|
2
|
+
function yt(se, V) {
|
|
3
|
+
nt(se, V);
|
|
4
|
+
}
|
|
5
|
+
function bt(se) {
|
|
6
|
+
ot.set(se);
|
|
7
|
+
}
|
|
8
|
+
const at = {
|
|
9
|
+
en: {
|
|
10
|
+
rank: "Rank",
|
|
11
|
+
user: "User",
|
|
12
|
+
points: "Points",
|
|
13
|
+
prize: "Prize",
|
|
14
|
+
notEnrolledRank: "You are currently not enrolled in this torunament",
|
|
15
|
+
myRanking: "My Ranking",
|
|
16
|
+
showMore: "Show More",
|
|
17
|
+
showLess: "Show Less",
|
|
18
|
+
emptyLeaderboard: "Currently there are no players enrolled in this tournament",
|
|
19
|
+
joinButton: "Join",
|
|
20
|
+
previousButton: "Previous",
|
|
21
|
+
nextButton: "Next"
|
|
22
|
+
},
|
|
23
|
+
tr: {
|
|
24
|
+
rank: "Sıralama",
|
|
25
|
+
user: "Kullanıcı",
|
|
26
|
+
points: "Puanlar",
|
|
27
|
+
prize: "Ödül",
|
|
28
|
+
notEnrolledRank: "Şu anda bu turnuvaya kayıtlı değilsiniz",
|
|
29
|
+
myRanking: "Sıralamam",
|
|
30
|
+
showMore: "Daha Fazla Göster",
|
|
31
|
+
showLess: "Daha Az Göster",
|
|
32
|
+
emptyLeaderboard: "Currently there are no players enrolled in this tournament",
|
|
33
|
+
joinButton: "Join",
|
|
34
|
+
previousButton: "Previous",
|
|
35
|
+
nextButton: "Next"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var Ze = { exports: {} };
|
|
39
|
+
/** @license
|
|
40
|
+
* eventsource.js
|
|
41
|
+
* Available under MIT License (MIT)
|
|
42
|
+
* https://github.com/Yaffle/EventSource/
|
|
43
|
+
*/
|
|
44
|
+
(function(se, V) {
|
|
45
|
+
(function(b) {
|
|
46
|
+
var J = b.setTimeout, ie = b.clearTimeout, k = b.XMLHttpRequest, ae = b.XDomainRequest, K = b.ActiveXObject, G = b.EventSource, F = b.document, qe = b.Promise, M = b.fetch, ue = b.Response, Q = b.TextDecoder, _e = b.TextEncoder, Y = b.AbortController;
|
|
47
|
+
if (typeof window < "u" && typeof F < "u" && !("readyState" in F) && F.body == null && (F.readyState = "loading", window.addEventListener("load", function(e) {
|
|
48
|
+
F.readyState = "complete";
|
|
49
|
+
}, !1)), k == null && K != null && (k = function() {
|
|
50
|
+
return new K("Microsoft.XMLHTTP");
|
|
51
|
+
}), Object.create == null && (Object.create = function(e) {
|
|
52
|
+
function n() {
|
|
53
|
+
}
|
|
54
|
+
return n.prototype = e, new n();
|
|
55
|
+
}), Date.now || (Date.now = function() {
|
|
56
|
+
return (/* @__PURE__ */ new Date()).getTime();
|
|
57
|
+
}), Y == null) {
|
|
58
|
+
var z = M;
|
|
59
|
+
M = function(e, n) {
|
|
60
|
+
var o = n.signal;
|
|
61
|
+
return z(e, { headers: n.headers, credentials: n.credentials, cache: n.cache }).then(function(a) {
|
|
62
|
+
var c = a.body.getReader();
|
|
63
|
+
return o._reader = c, o._aborted && o._reader.cancel(), {
|
|
64
|
+
status: a.status,
|
|
65
|
+
statusText: a.statusText,
|
|
66
|
+
headers: a.headers,
|
|
67
|
+
body: {
|
|
68
|
+
getReader: function() {
|
|
69
|
+
return c;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
}, Y = function() {
|
|
75
|
+
this.signal = {
|
|
76
|
+
_reader: null,
|
|
77
|
+
_aborted: !1
|
|
78
|
+
}, this.abort = function() {
|
|
79
|
+
this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function B() {
|
|
84
|
+
this.bitsNeeded = 0, this.codePoint = 0;
|
|
85
|
+
}
|
|
86
|
+
B.prototype.decode = function(e) {
|
|
87
|
+
function n(v, h, s) {
|
|
88
|
+
if (s === 1)
|
|
89
|
+
return v >= 128 >> h && v << h <= 2047;
|
|
90
|
+
if (s === 2)
|
|
91
|
+
return v >= 2048 >> h && v << h <= 55295 || v >= 57344 >> h && v << h <= 65535;
|
|
92
|
+
if (s === 3)
|
|
93
|
+
return v >= 65536 >> h && v << h <= 1114111;
|
|
94
|
+
throw new Error();
|
|
95
|
+
}
|
|
96
|
+
function o(v, h) {
|
|
97
|
+
if (v === 6 * 1)
|
|
98
|
+
return h >> 6 > 15 ? 3 : h > 31 ? 2 : 1;
|
|
99
|
+
if (v === 6 * 2)
|
|
100
|
+
return h > 15 ? 3 : 2;
|
|
101
|
+
if (v === 6 * 3)
|
|
102
|
+
return 3;
|
|
103
|
+
throw new Error();
|
|
104
|
+
}
|
|
105
|
+
for (var a = 65533, c = "", l = this.bitsNeeded, t = this.codePoint, i = 0; i < e.length; i += 1) {
|
|
106
|
+
var r = e[i];
|
|
107
|
+
l !== 0 && (r < 128 || r > 191 || !n(t << 6 | r & 63, l - 6, o(l, t))) && (l = 0, t = a, c += String.fromCharCode(t)), l === 0 ? (r >= 0 && r <= 127 ? (l = 0, t = r) : r >= 192 && r <= 223 ? (l = 6 * 1, t = r & 31) : r >= 224 && r <= 239 ? (l = 6 * 2, t = r & 15) : r >= 240 && r <= 247 ? (l = 6 * 3, t = r & 7) : (l = 0, t = a), l !== 0 && !n(t, l, o(l, t)) && (l = 0, t = a)) : (l -= 6, t = t << 6 | r & 63), l === 0 && (t <= 65535 ? c += String.fromCharCode(t) : (c += String.fromCharCode(55296 + (t - 65535 - 1 >> 10)), c += String.fromCharCode(56320 + (t - 65535 - 1 & 1023))));
|
|
108
|
+
}
|
|
109
|
+
return this.bitsNeeded = l, this.codePoint = t, c;
|
|
110
|
+
};
|
|
111
|
+
var fe = function() {
|
|
112
|
+
try {
|
|
113
|
+
return new Q().decode(new _e().encode("test"), { stream: !0 }) === "test";
|
|
114
|
+
} catch (e) {
|
|
115
|
+
console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
|
|
116
|
+
}
|
|
117
|
+
return !1;
|
|
118
|
+
};
|
|
119
|
+
(Q == null || _e == null || !fe()) && (Q = B);
|
|
120
|
+
var N = function() {
|
|
121
|
+
};
|
|
122
|
+
function U(e) {
|
|
123
|
+
this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = N, this.onload = N, this.onerror = N, this.onreadystatechange = N, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = N;
|
|
124
|
+
}
|
|
125
|
+
U.prototype.open = function(e, n) {
|
|
126
|
+
this._abort(!0);
|
|
127
|
+
var o = this, a = this._xhr, c = 1, l = 0;
|
|
128
|
+
this._abort = function(s) {
|
|
129
|
+
o._sendTimeout !== 0 && (ie(o._sendTimeout), o._sendTimeout = 0), (c === 1 || c === 2 || c === 3) && (c = 4, a.onload = N, a.onerror = N, a.onabort = N, a.onprogress = N, a.onreadystatechange = N, a.abort(), l !== 0 && (ie(l), l = 0), s || (o.readyState = 4, o.onabort(null), o.onreadystatechange())), c = 0;
|
|
130
|
+
};
|
|
131
|
+
var t = function() {
|
|
132
|
+
if (c === 1) {
|
|
133
|
+
var s = 0, u = "", j = void 0;
|
|
134
|
+
if ("contentType" in a)
|
|
135
|
+
s = 200, u = "OK", j = a.contentType;
|
|
136
|
+
else
|
|
137
|
+
try {
|
|
138
|
+
s = a.status, u = a.statusText, j = a.getResponseHeader("Content-Type");
|
|
139
|
+
} catch {
|
|
140
|
+
s = 0, u = "", j = void 0;
|
|
141
|
+
}
|
|
142
|
+
s !== 0 && (c = 2, o.readyState = 2, o.status = s, o.statusText = u, o._contentType = j, o.onreadystatechange());
|
|
143
|
+
}
|
|
144
|
+
}, i = function() {
|
|
145
|
+
if (t(), c === 2 || c === 3) {
|
|
146
|
+
c = 3;
|
|
147
|
+
var s = "";
|
|
148
|
+
try {
|
|
149
|
+
s = a.responseText;
|
|
150
|
+
} catch {
|
|
151
|
+
}
|
|
152
|
+
o.readyState = 3, o.responseText = s, o.onprogress();
|
|
153
|
+
}
|
|
154
|
+
}, r = function(s, u) {
|
|
155
|
+
if ((u == null || u.preventDefault == null) && (u = {
|
|
156
|
+
preventDefault: N
|
|
157
|
+
}), i(), c === 1 || c === 2 || c === 3) {
|
|
158
|
+
if (c = 4, l !== 0 && (ie(l), l = 0), o.readyState = 4, s === "load")
|
|
159
|
+
o.onload(u);
|
|
160
|
+
else if (s === "error")
|
|
161
|
+
o.onerror(u);
|
|
162
|
+
else if (s === "abort")
|
|
163
|
+
o.onabort(u);
|
|
164
|
+
else
|
|
165
|
+
throw new TypeError();
|
|
166
|
+
o.onreadystatechange();
|
|
167
|
+
}
|
|
168
|
+
}, v = function(s) {
|
|
169
|
+
a != null && (a.readyState === 4 ? (!("onload" in a) || !("onerror" in a) || !("onabort" in a)) && r(a.responseText === "" ? "error" : "load", s) : a.readyState === 3 ? "onprogress" in a || i() : a.readyState === 2 && t());
|
|
170
|
+
}, h = function() {
|
|
171
|
+
l = J(function() {
|
|
172
|
+
h();
|
|
173
|
+
}, 500), a.readyState === 3 && i();
|
|
174
|
+
};
|
|
175
|
+
"onload" in a && (a.onload = function(s) {
|
|
176
|
+
r("load", s);
|
|
177
|
+
}), "onerror" in a && (a.onerror = function(s) {
|
|
178
|
+
r("error", s);
|
|
179
|
+
}), "onabort" in a && (a.onabort = function(s) {
|
|
180
|
+
r("abort", s);
|
|
181
|
+
}), "onprogress" in a && (a.onprogress = i), "onreadystatechange" in a && (a.onreadystatechange = function(s) {
|
|
182
|
+
v(s);
|
|
183
|
+
}), ("contentType" in a || !("ontimeout" in k.prototype)) && (n += (n.indexOf("?") === -1 ? "?" : "&") + "padding=true"), a.open(e, n, !0), "readyState" in a && (l = J(function() {
|
|
184
|
+
h();
|
|
185
|
+
}, 0));
|
|
186
|
+
}, U.prototype.abort = function() {
|
|
187
|
+
this._abort(!1);
|
|
188
|
+
}, U.prototype.getResponseHeader = function(e) {
|
|
189
|
+
return this._contentType;
|
|
190
|
+
}, U.prototype.setRequestHeader = function(e, n) {
|
|
191
|
+
var o = this._xhr;
|
|
192
|
+
"setRequestHeader" in o && o.setRequestHeader(e, n);
|
|
193
|
+
}, U.prototype.getAllResponseHeaders = function() {
|
|
194
|
+
return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
|
|
195
|
+
}, U.prototype.send = function() {
|
|
196
|
+
if ((!("ontimeout" in k.prototype) || !("sendAsBinary" in k.prototype) && !("mozAnon" in k.prototype)) && F != null && F.readyState != null && F.readyState !== "complete") {
|
|
197
|
+
var e = this;
|
|
198
|
+
e._sendTimeout = J(function() {
|
|
199
|
+
e._sendTimeout = 0, e.send();
|
|
200
|
+
}, 4);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
var n = this._xhr;
|
|
204
|
+
"withCredentials" in n && (n.withCredentials = this.withCredentials);
|
|
205
|
+
try {
|
|
206
|
+
n.send(void 0);
|
|
207
|
+
} catch (o) {
|
|
208
|
+
throw o;
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
function Fe(e) {
|
|
212
|
+
return e.replace(/[A-Z]/g, function(n) {
|
|
213
|
+
return String.fromCharCode(n.charCodeAt(0) + 32);
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function pe(e) {
|
|
217
|
+
for (var n = /* @__PURE__ */ Object.create(null), o = e.split(`\r
|
|
218
|
+
`), a = 0; a < o.length; a += 1) {
|
|
219
|
+
var c = o[a], l = c.split(": "), t = l.shift(), i = l.join(": ");
|
|
220
|
+
n[Fe(t)] = i;
|
|
221
|
+
}
|
|
222
|
+
this._map = n;
|
|
223
|
+
}
|
|
224
|
+
pe.prototype.get = function(e) {
|
|
225
|
+
return this._map[Fe(e)];
|
|
226
|
+
}, k != null && k.HEADERS_RECEIVED == null && (k.HEADERS_RECEIVED = 2);
|
|
227
|
+
function Oe() {
|
|
228
|
+
}
|
|
229
|
+
Oe.prototype.open = function(e, n, o, a, c, l, t) {
|
|
230
|
+
e.open("GET", c);
|
|
231
|
+
var i = 0;
|
|
232
|
+
e.onprogress = function() {
|
|
233
|
+
var v = e.responseText, h = v.slice(i);
|
|
234
|
+
i += h.length, o(h);
|
|
235
|
+
}, e.onerror = function(v) {
|
|
236
|
+
v.preventDefault(), a(new Error("NetworkError"));
|
|
237
|
+
}, e.onload = function() {
|
|
238
|
+
a(null);
|
|
239
|
+
}, e.onabort = function() {
|
|
240
|
+
a(null);
|
|
241
|
+
}, e.onreadystatechange = function() {
|
|
242
|
+
if (e.readyState === k.HEADERS_RECEIVED) {
|
|
243
|
+
var v = e.status, h = e.statusText, s = e.getResponseHeader("Content-Type"), u = e.getAllResponseHeaders();
|
|
244
|
+
n(v, h, s, new pe(u));
|
|
245
|
+
}
|
|
246
|
+
}, e.withCredentials = l;
|
|
247
|
+
for (var r in t)
|
|
248
|
+
Object.prototype.hasOwnProperty.call(t, r) && e.setRequestHeader(r, t[r]);
|
|
249
|
+
return e.send(), e;
|
|
250
|
+
};
|
|
251
|
+
function Be(e) {
|
|
252
|
+
this._headers = e;
|
|
253
|
+
}
|
|
254
|
+
Be.prototype.get = function(e) {
|
|
255
|
+
return this._headers.get(e);
|
|
256
|
+
};
|
|
257
|
+
function Ie() {
|
|
258
|
+
}
|
|
259
|
+
Ie.prototype.open = function(e, n, o, a, c, l, t) {
|
|
260
|
+
var i = null, r = new Y(), v = r.signal, h = new Q();
|
|
261
|
+
return M(c, {
|
|
262
|
+
headers: t,
|
|
263
|
+
credentials: l ? "include" : "same-origin",
|
|
264
|
+
signal: v,
|
|
265
|
+
cache: "no-store"
|
|
266
|
+
}).then(function(s) {
|
|
267
|
+
return i = s.body.getReader(), n(s.status, s.statusText, s.headers.get("Content-Type"), new Be(s.headers)), new qe(function(u, j) {
|
|
268
|
+
var x = function() {
|
|
269
|
+
i.read().then(function(g) {
|
|
270
|
+
if (g.done)
|
|
271
|
+
u(void 0);
|
|
272
|
+
else {
|
|
273
|
+
var y = h.decode(g.value, { stream: !0 });
|
|
274
|
+
o(y), x();
|
|
275
|
+
}
|
|
276
|
+
}).catch(function(g) {
|
|
277
|
+
j(g);
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
x();
|
|
281
|
+
});
|
|
282
|
+
}).catch(function(s) {
|
|
283
|
+
if (s.name !== "AbortError")
|
|
284
|
+
return s;
|
|
285
|
+
}).then(function(s) {
|
|
286
|
+
a(s);
|
|
287
|
+
}), {
|
|
288
|
+
abort: function() {
|
|
289
|
+
i?.cancel(), r.abort();
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
function ge() {
|
|
294
|
+
this._listeners = /* @__PURE__ */ Object.create(null);
|
|
295
|
+
}
|
|
296
|
+
function We(e) {
|
|
297
|
+
J(function() {
|
|
298
|
+
throw e;
|
|
299
|
+
}, 0);
|
|
300
|
+
}
|
|
301
|
+
ge.prototype.dispatchEvent = function(e) {
|
|
302
|
+
e.target = this;
|
|
303
|
+
var n = this._listeners[e.type];
|
|
304
|
+
if (n != null)
|
|
305
|
+
for (var o = n.length, a = 0; a < o; a += 1) {
|
|
306
|
+
var c = n[a];
|
|
307
|
+
try {
|
|
308
|
+
typeof c.handleEvent == "function" ? c.handleEvent(e) : c.call(this, e);
|
|
309
|
+
} catch (l) {
|
|
310
|
+
We(l);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}, ge.prototype.addEventListener = function(e, n) {
|
|
314
|
+
e = String(e);
|
|
315
|
+
var o = this._listeners, a = o[e];
|
|
316
|
+
a == null && (a = [], o[e] = a);
|
|
317
|
+
for (var c = !1, l = 0; l < a.length; l += 1)
|
|
318
|
+
a[l] === n && (c = !0);
|
|
319
|
+
c || a.push(n);
|
|
320
|
+
}, ge.prototype.removeEventListener = function(e, n) {
|
|
321
|
+
e = String(e);
|
|
322
|
+
var o = this._listeners, a = o[e];
|
|
323
|
+
if (a != null) {
|
|
324
|
+
for (var c = [], l = 0; l < a.length; l += 1)
|
|
325
|
+
a[l] !== n && c.push(a[l]);
|
|
326
|
+
c.length === 0 ? delete o[e] : o[e] = c;
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
function le(e) {
|
|
330
|
+
this.type = e, this.target = void 0;
|
|
331
|
+
}
|
|
332
|
+
function me(e, n) {
|
|
333
|
+
le.call(this, e), this.data = n.data, this.lastEventId = n.lastEventId;
|
|
334
|
+
}
|
|
335
|
+
me.prototype = Object.create(le.prototype);
|
|
336
|
+
function ye(e, n) {
|
|
337
|
+
le.call(this, e), this.status = n.status, this.statusText = n.statusText, this.headers = n.headers;
|
|
338
|
+
}
|
|
339
|
+
ye.prototype = Object.create(le.prototype);
|
|
340
|
+
function He(e, n) {
|
|
341
|
+
le.call(this, e), this.error = n.error;
|
|
342
|
+
}
|
|
343
|
+
He.prototype = Object.create(le.prototype);
|
|
344
|
+
var Ee = -1, Z = 0, ee = 1, de = 2, Pe = -1, te = 0, be = 1, xe = 2, Me = 3, Re = /^text\/event\-stream(;.*)?$/i, Ge = 1e3, Te = 18e6, Ce = function(e, n) {
|
|
345
|
+
var o = e == null ? n : parseInt(e, 10);
|
|
346
|
+
return o !== o && (o = n), we(o);
|
|
347
|
+
}, we = function(e) {
|
|
348
|
+
return Math.min(Math.max(e, Ge), Te);
|
|
349
|
+
}, ve = function(e, n, o) {
|
|
350
|
+
try {
|
|
351
|
+
typeof n == "function" && n.call(e, o);
|
|
352
|
+
} catch (a) {
|
|
353
|
+
We(a);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
function O(e, n) {
|
|
357
|
+
ge.call(this), n = n || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, Ve(this, e, n);
|
|
358
|
+
}
|
|
359
|
+
function $e() {
|
|
360
|
+
return k != null && "withCredentials" in k.prototype || ae == null ? new k() : new ae();
|
|
361
|
+
}
|
|
362
|
+
var ze = M != null && ue != null && "body" in ue.prototype;
|
|
363
|
+
function Ve(e, n, o) {
|
|
364
|
+
n = String(n);
|
|
365
|
+
var a = !!o.withCredentials, c = o.lastEventIdQueryParameterName || "lastEventId", l = we(1e3), t = Ce(o.heartbeatTimeout, 45e3), i = "", r = l, v = !1, h = 0, s = o.headers || {}, u = o.Transport, j = ze && u == null ? void 0 : new U(u != null ? new u() : $e()), x = u != null && typeof u != "string" ? new u() : j == null ? new Ie() : new Oe(), g = void 0, y = 0, S = Ee, X = "", w = "", m = "", E = "", _ = te, re = 0, $ = 0, Se = function(T, P, I, H) {
|
|
366
|
+
if (S === Z)
|
|
367
|
+
if (T === 200 && I != null && Re.test(I)) {
|
|
368
|
+
S = ee, v = Date.now(), r = l, e.readyState = ee;
|
|
369
|
+
var D = new ye("open", {
|
|
370
|
+
status: T,
|
|
371
|
+
statusText: P,
|
|
372
|
+
headers: H
|
|
373
|
+
});
|
|
374
|
+
e.dispatchEvent(D), ve(e, e.onopen, D);
|
|
375
|
+
} else {
|
|
376
|
+
var C = "";
|
|
377
|
+
T !== 200 ? (P && (P = P.replace(/\s+/g, " ")), C = "EventSource's response has a status " + T + " " + P + " that is not 200. Aborting the connection.") : C = "EventSource's response has a Content-Type specifying an unsupported type: " + (I == null ? "-" : I.replace(/\s+/g, " ")) + ". Aborting the connection.", Ke();
|
|
378
|
+
var D = new ye("error", {
|
|
379
|
+
status: T,
|
|
380
|
+
statusText: P,
|
|
381
|
+
headers: H
|
|
382
|
+
});
|
|
383
|
+
e.dispatchEvent(D), ve(e, e.onerror, D), console.error(C);
|
|
384
|
+
}
|
|
385
|
+
}, Je = function(T) {
|
|
386
|
+
if (S === ee) {
|
|
387
|
+
for (var P = -1, I = 0; I < T.length; I += 1) {
|
|
388
|
+
var H = T.charCodeAt(I);
|
|
389
|
+
(H === 10 || H === 13) && (P = I);
|
|
390
|
+
}
|
|
391
|
+
var D = (P !== -1 ? E : "") + T.slice(0, P + 1);
|
|
392
|
+
E = (P === -1 ? E : "") + T.slice(P + 1), T !== "" && (v = Date.now(), h += T.length);
|
|
393
|
+
for (var C = 0; C < D.length; C += 1) {
|
|
394
|
+
var H = D.charCodeAt(C);
|
|
395
|
+
if (_ === Pe && H === 10)
|
|
396
|
+
_ = te;
|
|
397
|
+
else if (_ === Pe && (_ = te), H === 13 || H === 10) {
|
|
398
|
+
if (_ !== te) {
|
|
399
|
+
_ === be && ($ = C + 1);
|
|
400
|
+
var ne = D.slice(re, $ - 1), oe = D.slice($ + ($ < C && D.charCodeAt($) === 32 ? 1 : 0), C);
|
|
401
|
+
ne === "data" ? (X += `
|
|
402
|
+
`, X += oe) : ne === "id" ? w = oe : ne === "event" ? m = oe : ne === "retry" ? (l = Ce(oe, l), r = l) : ne === "heartbeatTimeout" && (t = Ce(oe, t), y !== 0 && (ie(y), y = J(function() {
|
|
403
|
+
Ae();
|
|
404
|
+
}, t)));
|
|
405
|
+
}
|
|
406
|
+
if (_ === te) {
|
|
407
|
+
if (X !== "") {
|
|
408
|
+
i = w, m === "" && (m = "message");
|
|
409
|
+
var ke = new me(m, {
|
|
410
|
+
data: X.slice(1),
|
|
411
|
+
lastEventId: w
|
|
412
|
+
});
|
|
413
|
+
if (e.dispatchEvent(ke), m === "open" ? ve(e, e.onopen, ke) : m === "message" ? ve(e, e.onmessage, ke) : m === "error" && ve(e, e.onerror, ke), S === de)
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
X = "", m = "";
|
|
417
|
+
}
|
|
418
|
+
_ = H === 13 ? Pe : te;
|
|
419
|
+
} else
|
|
420
|
+
_ === te && (re = C, _ = be), _ === be ? H === 58 && ($ = C + 1, _ = xe) : _ === xe && (_ = Me);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}, et = function(T) {
|
|
424
|
+
if (S === ee || S === Z) {
|
|
425
|
+
S = Ee, y !== 0 && (ie(y), y = 0), y = J(function() {
|
|
426
|
+
Ae();
|
|
427
|
+
}, r), r = we(Math.min(l * 16, r * 2)), e.readyState = Z;
|
|
428
|
+
var P = new He("error", { error: T });
|
|
429
|
+
e.dispatchEvent(P), ve(e, e.onerror, P), T != null && console.error(T);
|
|
430
|
+
}
|
|
431
|
+
}, Ke = function() {
|
|
432
|
+
S = de, g != null && (g.abort(), g = void 0), y !== 0 && (ie(y), y = 0), e.readyState = de;
|
|
433
|
+
}, Ae = function() {
|
|
434
|
+
if (y = 0, S !== Ee) {
|
|
435
|
+
if (!v && g != null)
|
|
436
|
+
et(new Error("No activity within " + t + " milliseconds. " + (S === Z ? "No response received." : h + " chars received.") + " Reconnecting.")), g != null && (g.abort(), g = void 0);
|
|
437
|
+
else {
|
|
438
|
+
var T = Math.max((v || Date.now()) + t - Date.now(), 1);
|
|
439
|
+
v = !1, y = J(function() {
|
|
440
|
+
Ae();
|
|
441
|
+
}, T);
|
|
442
|
+
}
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
v = !1, h = 0, y = J(function() {
|
|
446
|
+
Ae();
|
|
447
|
+
}, t), S = Z, X = "", m = "", w = i, E = "", re = 0, $ = 0, _ = te;
|
|
448
|
+
var P = n;
|
|
449
|
+
if (n.slice(0, 5) !== "data:" && n.slice(0, 5) !== "blob:" && i !== "") {
|
|
450
|
+
var I = n.indexOf("?");
|
|
451
|
+
P = I === -1 ? n : n.slice(0, I + 1) + n.slice(I + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(oe, ke) {
|
|
452
|
+
return ke === c ? "" : oe;
|
|
453
|
+
}), P += (n.indexOf("?") === -1 ? "?" : "&") + c + "=" + encodeURIComponent(i);
|
|
454
|
+
}
|
|
455
|
+
var H = e.withCredentials, D = {};
|
|
456
|
+
D.Accept = "text/event-stream";
|
|
457
|
+
var C = e.headers;
|
|
458
|
+
if (C != null)
|
|
459
|
+
for (var ne in C)
|
|
460
|
+
Object.prototype.hasOwnProperty.call(C, ne) && (D[ne] = C[ne]);
|
|
461
|
+
try {
|
|
462
|
+
g = x.open(j, Se, Je, et, P, H, D);
|
|
463
|
+
} catch (oe) {
|
|
464
|
+
throw Ke(), oe;
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
e.url = n, e.readyState = Z, e.withCredentials = a, e.headers = s, e._close = Ke, Ae();
|
|
468
|
+
}
|
|
469
|
+
O.prototype = Object.create(ge.prototype), O.prototype.CONNECTING = Z, O.prototype.OPEN = ee, O.prototype.CLOSED = de, O.prototype.close = function() {
|
|
470
|
+
this._close();
|
|
471
|
+
}, O.CONNECTING = Z, O.OPEN = ee, O.CLOSED = de, O.prototype.withCredentials = void 0;
|
|
472
|
+
var Ue = G;
|
|
473
|
+
k != null && (G == null || !("withCredentials" in G.prototype)) && (Ue = O), function(e) {
|
|
474
|
+
{
|
|
475
|
+
var n = e(V);
|
|
476
|
+
n !== void 0 && (se.exports = n);
|
|
477
|
+
}
|
|
478
|
+
}(function(e) {
|
|
479
|
+
e.EventSourcePolyfill = O, e.NativeEventSource = G, e.EventSource = Ue;
|
|
480
|
+
});
|
|
481
|
+
})(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : st : globalThis);
|
|
482
|
+
})(Ze, Ze.exports);
|
|
483
|
+
var wt = Ze.exports, jt = W('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span>', 1), _t = W('<p class="svelte-75jgrh"> </p>'), xt = W('<div class="PlayerRankWrapper svelte-75jgrh"><div class="PlayerRankLabels svelte-75jgrh"><span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span></div> <div class="PlayerRankData svelte-75jgrh"><!></div></div>'), St = W('<div class="PlayerRankSkeletonWrapper svelte-75jgrh"><div class="PlayerRankSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PlayerRankSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div></div>'), kt = W('<tr class="SkeletonRow svelte-75jgrh"><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td></tr>'), Et = W('<tr><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td></tr>'), Pt = W('<tr class="svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"><div class="EmptyLeaderboard svelte-75jgrh"><p class="svelte-75jgrh"> </p></div></td></tr>'), Rt = W('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'), Tt = W("<button> </button>"), Ct = W('<div class="PaginationWrapper svelte-75jgrh"><button class="PaginationButton svelte-75jgrh"> </button> <div class="PageNumberWrapper svelte-75jgrh"></div> <button class="PaginationButton svelte-75jgrh"> </button></div>'), At = W('<div class="PaginationSkeleton svelte-75jgrh"><div class="PaginationSkeletonButton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationSkeletonButton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div></div>'), Lt = W('<div class="LeaderboardWrapper svelte-75jgrh"><!> <table class="LeaderboardTable svelte-75jgrh"><thead class="LeaderboardTableHeader svelte-75jgrh"><tr class="svelte-75jgrh"><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th></tr></thead><tbody class="LeaderboardTableBody svelte-75jgrh"><!></tbody></table> <!> <!></div>');
|
|
484
|
+
const Nt = {
|
|
485
|
+
hash: "svelte-75jgrh",
|
|
486
|
+
code: `.svelte-75jgrh,
|
|
487
|
+
.svelte-75jgrh::before,
|
|
488
|
+
.svelte-75jgrh::after {margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit;}.LeaderboardWrapper.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);border-radius:6px;padding:16px;overflow:hidden;}.PlayerRankWrapper.svelte-75jgrh {display:flex;flex-direction:column;gap:5px;margin-top:20px;.PlayerRankLabels:where(.svelte-75jgrh), .PlayerRankData:where(.svelte-75jgrh) {display:grid;grid-template-columns:1fr 1fr 2fr;padding:6px;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:400;& > span:where(.svelte-75jgrh):last-child{justify-self:end;}p:where(.svelte-75jgrh) {width:max-content;}}.PlayerRankData:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;padding:12px;}}.PaginationWrapper.svelte-75jgrh {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-75jgrh) {display:flex;gap:6px;}.PaginationButton:where(.svelte-75jgrh) {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;}}}.LeaderboardTable.svelte-75jgrh {border-collapse:separate;border-spacing:0 12px;width:100%;table-layout:fixed;.PlayerRow:where(.svelte-75jgrh) {color:#F9C408;}thead:where(.svelte-75jgrh) th:where(.svelte-75jgrh) {background:transparent;padding:6px 16px;text-align:center;font-weight:400;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;}tbody:where(.svelte-75jgrh) tr:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:500;&:last-child{justify-self:end;}}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh) {padding:12px;background-color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):first-child {border-top-left-radius:8px;border-bottom-left-radius:8px;width:15%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(2) {width:35%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(3) {width:20%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):last-child {border-top-right-radius:8px;border-bottom-right-radius:8px;width:30%;}th:where(.svelte-75jgrh), td:where(.svelte-75jgrh) {text-align:center;vertical-align:middle;}tbody:where(.svelte-75jgrh) tr.Gold:where(.svelte-75jgrh){background:linear-gradient(to right, #a2851a, color-mix(in srgb, #a2851a 50%, var(--emw-color-bg-secondary, #434343) 50%), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Silver:where(.svelte-75jgrh) {background:linear-gradient(to right, #b0aeae, color-mix(in srgb, #b0aeae, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Bronze:where(.svelte-75jgrh) {background:linear-gradient(to right, #ac763c, color-mix(in srgb, #ac763c, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}}.EmptyLeaderboard.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);color:var(--emw-color-typography-secondary, #bdbdbd);width:100%;border-radius:8px;margin:10px 0;text-align:center;padding:10px 0;}.SkeletonRow.svelte-75jgrh {height:41px;background:linear-gradient(
|
|
489
|
+
90deg,
|
|
490
|
+
transparent 25%,
|
|
491
|
+
var(--emw-color-skeleton, #333232) 50%,
|
|
492
|
+
transparent 75%
|
|
493
|
+
);background-size:200% 100%;
|
|
494
|
+
animation: svelte-75jgrh-loading 1.5s infinite;border-radius:4px;}.PlayerRankSkeletonWrapper.svelte-75jgrh {display:flex;justify-content:space-between;width:100%;gap:6px;flex-direction:column;.PlayerRankSkeleton:where(.svelte-75jgrh) {width:100%;height:40px;border-radius:6px;background-color:var(--emw-color-bg-secondary, #333232);border-radius:6px;}}.PaginationSkeleton.svelte-75jgrh {display:flex;justify-content:space-between;gap:6px;}.PaginationSkeletonButton.svelte-75jgrh {width:80px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.PaginationNumberSkeleton.svelte-75jgrh {width:40px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.SkeletonShimmer.svelte-75jgrh {width:100%;height:100%;background:linear-gradient(
|
|
495
|
+
90deg,
|
|
496
|
+
transparent 0%,
|
|
497
|
+
var(--emw-color-skeleton, #333232) 50%,
|
|
498
|
+
transparent 100%
|
|
499
|
+
);
|
|
500
|
+
animation: svelte-75jgrh-loading 1.5s infinite;transform:translateX(-100%);}
|
|
501
|
+
|
|
502
|
+
@keyframes svelte-75jgrh-loading {
|
|
503
|
+
0% {
|
|
504
|
+
transform: translateX(-100%);
|
|
505
|
+
}
|
|
506
|
+
100% {
|
|
507
|
+
transform: translateX(100%);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
@media (min-width: 1000px) {.ShowPlayersButton.svelte-75jgrh {display:block;width:300px;margin:auto;background-color:var(--emw-color-bg-primary, #212121);}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@media (min-width: 750px) {.PaginationWrapper.svelte-75jgrh, .PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;}.PaginationButton.svelte-75jgrh {min-width:75px;}
|
|
515
|
+
}`
|
|
516
|
+
};
|
|
517
|
+
function Dt(se, V) {
|
|
518
|
+
ht(V, !0), it(se, Nt);
|
|
519
|
+
const b = () => ut(gt, "$_", J), [J, ie] = ct(), k = Le(V, "endpoint"), ae = Le(V, "language", 7, "en"), K = Le(V, "session"), G = Le(V, "tournamentid"), F = Le(V, "platform");
|
|
520
|
+
Object.keys(at).forEach((t) => {
|
|
521
|
+
yt(t, at[t]);
|
|
522
|
+
});
|
|
523
|
+
const qe = () => {
|
|
524
|
+
bt(ae());
|
|
525
|
+
};
|
|
526
|
+
lt(() => {
|
|
527
|
+
qe();
|
|
528
|
+
});
|
|
529
|
+
let M = null, ue = he(void 0), Q = he(!1), _e = he(!1), Y = he(void 0), z = he(0), B = he(10), fe = he(void 0), N = he(void 0);
|
|
530
|
+
const U = () => {
|
|
531
|
+
if (ye.has(d(me)))
|
|
532
|
+
return;
|
|
533
|
+
q(Q, !0);
|
|
534
|
+
const t = new URL(`${k()}/v1/tournaments/${G()}/leaderboard`), i = new Headers();
|
|
535
|
+
K() && i.append("X-SessionId", K()), t.searchParams.append("language", ae()), t.searchParams.append("platform", F()), t.searchParams.append("pagination", `offset=${d(z)},limit=${d(B)}`), fetch(t).then((r) => r.json()).then((r) => {
|
|
536
|
+
q(ue, r?.items, !0), q(fe, r?.pages, !0), q(N, r?.total, !0), ye.set(d(me), d(ue));
|
|
537
|
+
}).catch((r) => console.log(r)).finally(() => q(Q, !1));
|
|
538
|
+
}, Fe = (t) => {
|
|
539
|
+
const i = JSON.parse(t.data);
|
|
540
|
+
i && i.messageType === "LeaderBoardUpdate" && q(ue, i?.items, !0);
|
|
541
|
+
}, pe = () => {
|
|
542
|
+
M && (M.close(), M = null);
|
|
543
|
+
const t = new URL(`${k()}/v1/tournaments/${G()}/leaderboard/updates`);
|
|
544
|
+
t.searchParams.append("HeartBeat", "false"), t.searchParams.append("language", ae()), t.searchParams.append("filter", "includeUnqualifiedPlayer=true"), t.searchParams.append("pagination", `offset=${d(z)},limit=${d(B)}`), t.searchParams.append("platform", F()), M = new wt.EventSourcePolyfill(t, {
|
|
545
|
+
headers: { accept: "text/event-stream", "X-SessionId": K() }
|
|
546
|
+
}), M.onmessage = Fe;
|
|
547
|
+
}, Oe = () => {
|
|
548
|
+
q(_e, !0);
|
|
549
|
+
const t = new URL(`${k()}/v1/tournaments/leaderboard/player`), i = new Headers();
|
|
550
|
+
t.searchParams.append("language", ae()), t.searchParams.append("platform", F()), t.searchParams.append("filter", "includeUnqualifiedPlayer=false"), K() && i.append("X-SessionId", K()), fetch(t, { method: "GET", headers: i }).then((v) => v.json()).then((v) => {
|
|
551
|
+
const h = v?.items?.find((s) => s?.tournament?.id === G());
|
|
552
|
+
q(Y, h?.leaderBoard, !0), console.log(h, G(), v.items, "--- bla");
|
|
553
|
+
}).catch((v) => {
|
|
554
|
+
console.log(v);
|
|
555
|
+
}).finally(() => q(_e, !1));
|
|
556
|
+
}, Be = () => {
|
|
557
|
+
d(fe)?.next && (q(z, d(z) + d(B)), U(), pe());
|
|
558
|
+
}, Ie = () => {
|
|
559
|
+
d(fe)?.previous && d(z) !== 0 && (q(z, d(z) - d(B)), U(), pe());
|
|
560
|
+
}, ge = (t) => {
|
|
561
|
+
q(z, (t - 1) * d(B)), U(), pe();
|
|
562
|
+
}, le = Qe(() => {
|
|
563
|
+
const t = Math.ceil(d(N) / d(B)), i = Math.floor(d(z) / d(B)) + 1;
|
|
564
|
+
if (t <= 5)
|
|
565
|
+
return Array.from({ length: t }, (v, h) => h + 1);
|
|
566
|
+
const r = [];
|
|
567
|
+
return r.push(1), i <= 3 ? (r.push(2, 3), r.push("..."), r.push(t)) : i >= t - 2 ? (r.push("..."), r.push(t - 2, t - 1, t)) : (r.push("..."), r.push(i - 1, i, i + 1), r.push("..."), r.push(t)), r;
|
|
568
|
+
}), me = Qe(() => Math.floor(d(z) / d(B)) + 1);
|
|
569
|
+
let ye = /* @__PURE__ */ new Map(), He = Qe(() => ye.get(d(me)) ?? []);
|
|
570
|
+
const Ee = (t, i) => {
|
|
571
|
+
const r = [];
|
|
572
|
+
return i && r.push("PlayerRow"), t === 1 && r.push("Gold"), t === 2 && r.push("Silver"), t === 3 && r.push("Bronze"), r.join(" ");
|
|
573
|
+
};
|
|
574
|
+
dt(() => (U(), Oe(), pe(), () => {
|
|
575
|
+
M?.close(), M = null;
|
|
576
|
+
}));
|
|
577
|
+
var Z = {
|
|
578
|
+
get endpoint() {
|
|
579
|
+
return k();
|
|
580
|
+
},
|
|
581
|
+
set endpoint(t) {
|
|
582
|
+
k(t), Ne();
|
|
583
|
+
},
|
|
584
|
+
get language() {
|
|
585
|
+
return ae();
|
|
586
|
+
},
|
|
587
|
+
set language(t = "en") {
|
|
588
|
+
ae(t), Ne();
|
|
589
|
+
},
|
|
590
|
+
get session() {
|
|
591
|
+
return K();
|
|
592
|
+
},
|
|
593
|
+
set session(t) {
|
|
594
|
+
K(t), Ne();
|
|
595
|
+
},
|
|
596
|
+
get tournamentid() {
|
|
597
|
+
return G();
|
|
598
|
+
},
|
|
599
|
+
set tournamentid(t) {
|
|
600
|
+
G(t), Ne();
|
|
601
|
+
},
|
|
602
|
+
get platform() {
|
|
603
|
+
return F();
|
|
604
|
+
},
|
|
605
|
+
set platform(t) {
|
|
606
|
+
F(t), Ne();
|
|
607
|
+
}
|
|
608
|
+
}, ee = Lt(), de = p(ee);
|
|
609
|
+
{
|
|
610
|
+
var Pe = (t) => {
|
|
611
|
+
var i = xt(), r = p(i), v = p(r), h = p(v, !0);
|
|
612
|
+
f(v);
|
|
613
|
+
var s = A(v, 2), u = p(s, !0);
|
|
614
|
+
f(s);
|
|
615
|
+
var j = A(s, 2), x = p(j, !0);
|
|
616
|
+
f(j), f(r);
|
|
617
|
+
var g = A(r, 2), y = p(g);
|
|
618
|
+
{
|
|
619
|
+
var S = (w) => {
|
|
620
|
+
var m = jt(), E = De(m), _ = p(E);
|
|
621
|
+
f(E);
|
|
622
|
+
var re = A(E, 2), $ = p(re, !0);
|
|
623
|
+
f(re);
|
|
624
|
+
var Se = A(re, 2), Je = p(Se, !0);
|
|
625
|
+
f(Se), ce(() => {
|
|
626
|
+
R(_, `${d(Y).rank ?? ""}.`), R($, d(Y).score), R(Je, d(Y).prizeName || "-");
|
|
627
|
+
}), L(w, m);
|
|
628
|
+
}, X = (w) => {
|
|
629
|
+
var m = _t(), E = p(m, !0);
|
|
630
|
+
f(m), ce((_) => R(E, _), [() => b()("notEnrolledRank")]), L(w, m);
|
|
631
|
+
};
|
|
632
|
+
je(y, (w) => {
|
|
633
|
+
d(Y) ? w(S) : w(X, !1);
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
f(g), f(i), ce(
|
|
637
|
+
(w, m, E) => {
|
|
638
|
+
R(h, w), R(u, m), R(x, E);
|
|
639
|
+
},
|
|
640
|
+
[
|
|
641
|
+
() => b()("myRanking"),
|
|
642
|
+
() => b()("points"),
|
|
643
|
+
() => b()("prize")
|
|
644
|
+
]
|
|
645
|
+
), L(t, i);
|
|
646
|
+
}, te = (t) => {
|
|
647
|
+
var i = St();
|
|
648
|
+
L(t, i);
|
|
649
|
+
};
|
|
650
|
+
je(de, (t) => {
|
|
651
|
+
d(_e) ? t(te, !1) : t(Pe);
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
var be = A(de, 2), xe = p(be), Me = p(xe), Re = p(Me), Ge = p(Re, !0);
|
|
655
|
+
f(Re);
|
|
656
|
+
var Te = A(Re), Ce = p(Te, !0);
|
|
657
|
+
f(Te);
|
|
658
|
+
var we = A(Te), ve = p(we, !0);
|
|
659
|
+
f(we);
|
|
660
|
+
var O = A(we), $e = p(O, !0);
|
|
661
|
+
f(O), f(Me), f(xe);
|
|
662
|
+
var ze = A(xe), Ve = p(ze);
|
|
663
|
+
{
|
|
664
|
+
var Ue = (t) => {
|
|
665
|
+
var i = Xe(), r = De(i);
|
|
666
|
+
Ye(r, 17, () => Array(d(B)), tt, (v, h, s, u) => {
|
|
667
|
+
var j = kt();
|
|
668
|
+
L(v, j);
|
|
669
|
+
}), L(t, i);
|
|
670
|
+
}, e = (t) => {
|
|
671
|
+
var i = Xe(), r = De(i);
|
|
672
|
+
{
|
|
673
|
+
var v = (s) => {
|
|
674
|
+
var u = Xe(), j = De(u);
|
|
675
|
+
Ye(j, 17, () => d(He), (x) => x.rank, (x, g) => {
|
|
676
|
+
var y = Et(), S = p(y), X = p(S);
|
|
677
|
+
f(S);
|
|
678
|
+
var w = A(S), m = p(w, !0);
|
|
679
|
+
f(w);
|
|
680
|
+
var E = A(w), _ = p(E, !0);
|
|
681
|
+
f(E);
|
|
682
|
+
var re = A(E), $ = p(re, !0);
|
|
683
|
+
f(re), f(y), ce(
|
|
684
|
+
(Se) => {
|
|
685
|
+
rt(y, 1, Se, "svelte-75jgrh"), R(X, `${d(g).rank ?? ""}.`), R(m, d(g).shortName || "-"), R(_, d(g).score || "-"), R($, d(g).prizeName || "-");
|
|
686
|
+
},
|
|
687
|
+
[
|
|
688
|
+
() => mt(Ee(d(g).rank, d(g).rank === d(Y)?.rank))
|
|
689
|
+
]
|
|
690
|
+
), L(x, y);
|
|
691
|
+
}), L(s, u);
|
|
692
|
+
}, h = (s) => {
|
|
693
|
+
var u = Pt(), j = p(u), x = p(j), g = p(x), y = p(g, !0);
|
|
694
|
+
f(g), f(x), f(j), f(u), ce((S) => R(y, S), [() => b()("emptyLeaderboard")]), L(s, u);
|
|
695
|
+
};
|
|
696
|
+
je(
|
|
697
|
+
r,
|
|
698
|
+
(s) => {
|
|
699
|
+
d(ue)?.length > 0 ? s(v) : s(h, !1);
|
|
700
|
+
},
|
|
701
|
+
!0
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
L(t, i);
|
|
705
|
+
};
|
|
706
|
+
je(Ve, (t) => {
|
|
707
|
+
d(Q) ? t(Ue) : t(e, !1);
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
f(ze), f(be);
|
|
711
|
+
var n = A(be, 2);
|
|
712
|
+
{
|
|
713
|
+
var o = (t) => {
|
|
714
|
+
var i = Ct(), r = p(i);
|
|
715
|
+
r.__click = Ie;
|
|
716
|
+
var v = p(r, !0);
|
|
717
|
+
f(r);
|
|
718
|
+
var h = A(r, 2);
|
|
719
|
+
Ye(h, 21, () => d(le), tt, (j, x) => {
|
|
720
|
+
var g = Xe(), y = De(g);
|
|
721
|
+
{
|
|
722
|
+
var S = (w) => {
|
|
723
|
+
var m = Rt();
|
|
724
|
+
L(w, m);
|
|
725
|
+
}, X = (w) => {
|
|
726
|
+
var m = Tt();
|
|
727
|
+
let E;
|
|
728
|
+
m.__click = () => ge(d(x));
|
|
729
|
+
var _ = p(m, !0);
|
|
730
|
+
f(m), ce(() => {
|
|
731
|
+
E = rt(m, 1, "PaginationButton Number svelte-75jgrh", null, E, { Active: d(x) === d(me) }), R(_, d(x));
|
|
732
|
+
}), L(w, m);
|
|
733
|
+
};
|
|
734
|
+
je(y, (w) => {
|
|
735
|
+
typeof d(x) != "number" ? w(S) : w(X, !1);
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
L(j, g);
|
|
739
|
+
}), f(h);
|
|
740
|
+
var s = A(h, 2);
|
|
741
|
+
s.__click = Be;
|
|
742
|
+
var u = p(s, !0);
|
|
743
|
+
f(s), f(i), ce(
|
|
744
|
+
(j, x) => {
|
|
745
|
+
r.disabled = !d(fe)?.previous, R(v, j), s.disabled = !d(fe)?.next, R(u, x);
|
|
746
|
+
},
|
|
747
|
+
[() => b()("previousButton"), () => b()("nextButton")]
|
|
748
|
+
), L(t, i);
|
|
749
|
+
};
|
|
750
|
+
je(n, (t) => {
|
|
751
|
+
!d(Q) && d(N) > d(B) && t(o);
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
var a = A(n, 2);
|
|
755
|
+
{
|
|
756
|
+
var c = (t) => {
|
|
757
|
+
var i = At();
|
|
758
|
+
L(t, i);
|
|
759
|
+
};
|
|
760
|
+
je(a, (t) => {
|
|
761
|
+
d(Q) && t(c);
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
f(ee), ce(
|
|
765
|
+
(t, i, r, v) => {
|
|
766
|
+
R(Ge, t), R(Ce, i), R(ve, r), R($e, v);
|
|
767
|
+
},
|
|
768
|
+
[
|
|
769
|
+
() => b()("rank"),
|
|
770
|
+
() => b()("user"),
|
|
771
|
+
() => b()("points"),
|
|
772
|
+
() => b()("prize")
|
|
773
|
+
]
|
|
774
|
+
), L(se, ee);
|
|
775
|
+
var l = vt(Z);
|
|
776
|
+
return ie(), l;
|
|
777
|
+
}
|
|
778
|
+
ft(["click"]);
|
|
779
|
+
customElements.define("tournament-leaderboard", pt(
|
|
780
|
+
Dt,
|
|
781
|
+
{
|
|
782
|
+
endpoint: {},
|
|
783
|
+
language: {},
|
|
784
|
+
session: {},
|
|
785
|
+
tournamentid: {},
|
|
786
|
+
platform: {}
|
|
787
|
+
},
|
|
788
|
+
[],
|
|
789
|
+
[],
|
|
790
|
+
!1
|
|
791
|
+
));
|
|
792
|
+
export {
|
|
793
|
+
Dt as default
|
|
794
|
+
};
|