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