@everymatrix/tournament-details-page 0.0.7 → 0.0.9

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 (26) hide show
  1. package/components/{TournamentDetails-qcyLTtSv.js → TournamentDetails-CKMkVYxd.js} +1976 -1943
  2. package/components/{TournamentDetails-DoBMS_9T.js → TournamentDetails-H6pHb_yG.js} +1608 -1575
  3. package/components/TournamentDetails-nG7lN2NT.cjs +7 -0
  4. package/components/TournamentDetailsPage-0JKgpPb4.js +1107 -0
  5. package/components/TournamentDetailsPage-CNDHXiDn.cjs +59 -0
  6. package/components/TournamentDetailsPage-D-pwFR-w.js +1082 -0
  7. package/components/TournamentGames-COHWeopg.js +377 -0
  8. package/components/TournamentGames-DLS2XJfo.js +403 -0
  9. package/components/TournamentGames-DO485kHn.cjs +27 -0
  10. package/components/TournamentLeaderboard-BnP-SIlN.cjs +31 -0
  11. package/components/TournamentLeaderboard-Dnpxq0_A.js +839 -0
  12. package/components/TournamentLeaderboard-ivZpO_TZ.js +823 -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/TournamentDetails-C-zS8XGk.cjs +0 -7
  18. package/components/TournamentDetailsPage-C2wcS4rg.js +0 -987
  19. package/components/TournamentDetailsPage-CQFv3xok.js +0 -1010
  20. package/components/TournamentDetailsPage-CR3ti0az.cjs +0 -66
  21. package/components/TournamentGames-KOJ004rg.js +0 -387
  22. package/components/TournamentGames-xrJB7h-M.js +0 -359
  23. package/components/TournamentGames-zikPbhES.cjs +0 -27
  24. package/components/TournamentLeaderboard-BjBItfy9.js +0 -788
  25. package/components/TournamentLeaderboard-D9naoaD9.cjs +0 -30
  26. package/components/TournamentLeaderboard-Dc8xv6be.js +0 -804
@@ -1,788 +0,0 @@
1
- import { b as ot, $ as st, M as it, g as dt, h as Le, u as lt, o as ct, j as W, k as je, z as ve, n as L, q as vt, r as ht, v as Ne, p as ut, l as A, m as p, C as ft, E as R, e as pt, f as gt, w as l, L as Qe, t as q, s as he, F as mt, x as f, I as Xe, y as De, J as Ye, K as tt, N as yt, B as rt } from "./TournamentDetails-DoBMS_9T.js";
2
- function bt(se, $) {
3
- ot(se, $);
4
- }
5
- function at(se) {
6
- st.set(se);
7
- }
8
- const nt = {
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: "Puan",
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: "Şu anda bu turnuvaya kayıtlı oyuncu bulunmuyor",
33
- joinButton: "Katıl",
34
- previousButton: "Önceki",
35
- nextButton: "Sonraki"
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, $) {
45
- (function(b) {
46
- var V = b.setTimeout, ie = b.clearTimeout, k = b.XMLHttpRequest, K = b.XDomainRequest, J = b.ActiveXObject, Q = b.EventSource, F = b.document, qe = b.Promise, M = b.fetch, ue = b.Response, Y = b.TextDecoder, _e = b.TextEncoder, Z = 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 && J != null && (k = function() {
50
- return new J("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
- }), Z == null) {
58
- var U = M;
59
- M = function(e, n) {
60
- var o = n.signal;
61
- return U(e, { headers: n.headers, credentials: n.credentials, cache: n.cache }).then(function(a) {
62
- var v = a.body.getReader();
63
- return o._reader = v, o._aborted && o._reader.cancel(), {
64
- status: a.status,
65
- statusText: a.statusText,
66
- headers: a.headers,
67
- body: {
68
- getReader: function() {
69
- return v;
70
- }
71
- }
72
- };
73
- });
74
- }, Z = 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(c, h, s) {
88
- if (s === 1)
89
- return c >= 128 >> h && c << h <= 2047;
90
- if (s === 2)
91
- return c >= 2048 >> h && c << h <= 55295 || c >= 57344 >> h && c << h <= 65535;
92
- if (s === 3)
93
- return c >= 65536 >> h && c << h <= 1114111;
94
- throw new Error();
95
- }
96
- function o(c, h) {
97
- if (c === 6 * 1)
98
- return h >> 6 > 15 ? 3 : h > 31 ? 2 : 1;
99
- if (c === 6 * 2)
100
- return h > 15 ? 3 : 2;
101
- if (c === 6 * 3)
102
- return 3;
103
- throw new Error();
104
- }
105
- for (var a = 65533, v = "", d = this.bitsNeeded, t = this.codePoint, i = 0; i < e.length; i += 1) {
106
- var r = e[i];
107
- d !== 0 && (r < 128 || r > 191 || !n(t << 6 | r & 63, d - 6, o(d, t))) && (d = 0, t = a, v += String.fromCharCode(t)), d === 0 ? (r >= 0 && r <= 127 ? (d = 0, t = r) : r >= 192 && r <= 223 ? (d = 6 * 1, t = r & 31) : r >= 224 && r <= 239 ? (d = 6 * 2, t = r & 15) : r >= 240 && r <= 247 ? (d = 6 * 3, t = r & 7) : (d = 0, t = a), d !== 0 && !n(t, d, o(d, t)) && (d = 0, t = a)) : (d -= 6, t = t << 6 | r & 63), d === 0 && (t <= 65535 ? v += String.fromCharCode(t) : (v += String.fromCharCode(55296 + (t - 65535 - 1 >> 10)), v += String.fromCharCode(56320 + (t - 65535 - 1 & 1023))));
108
- }
109
- return this.bitsNeeded = d, this.codePoint = t, v;
110
- };
111
- var fe = function() {
112
- try {
113
- return new Y().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
- (Y == null || _e == null || !fe()) && (Y = B);
120
- var N = function() {
121
- };
122
- function z(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
- z.prototype.open = function(e, n) {
126
- this._abort(!0);
127
- var o = this, a = this._xhr, v = 1, d = 0;
128
- this._abort = function(s) {
129
- o._sendTimeout !== 0 && (ie(o._sendTimeout), o._sendTimeout = 0), (v === 1 || v === 2 || v === 3) && (v = 4, a.onload = N, a.onerror = N, a.onabort = N, a.onprogress = N, a.onreadystatechange = N, a.abort(), d !== 0 && (ie(d), d = 0), s || (o.readyState = 4, o.onabort(null), o.onreadystatechange())), v = 0;
130
- };
131
- var t = function() {
132
- if (v === 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 && (v = 2, o.readyState = 2, o.status = s, o.statusText = u, o._contentType = j, o.onreadystatechange());
143
- }
144
- }, i = function() {
145
- if (t(), v === 2 || v === 3) {
146
- v = 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(), v === 1 || v === 2 || v === 3) {
158
- if (v = 4, d !== 0 && (ie(d), d = 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
- }, c = 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
- d = V(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
- c(s);
183
- }), ("contentType" in a || !("ontimeout" in k.prototype)) && (n += (n.indexOf("?") === -1 ? "?" : "&") + "padding=true"), a.open(e, n, !0), "readyState" in a && (d = V(function() {
184
- h();
185
- }, 0));
186
- }, z.prototype.abort = function() {
187
- this._abort(!1);
188
- }, z.prototype.getResponseHeader = function(e) {
189
- return this._contentType;
190
- }, z.prototype.setRequestHeader = function(e, n) {
191
- var o = this._xhr;
192
- "setRequestHeader" in o && o.setRequestHeader(e, n);
193
- }, z.prototype.getAllResponseHeaders = function() {
194
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
195
- }, z.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 = V(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 v = o[a], d = v.split(": "), t = d.shift(), i = d.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, v, d, t) {
230
- e.open("GET", v);
231
- var i = 0;
232
- e.onprogress = function() {
233
- var c = e.responseText, h = c.slice(i);
234
- i += h.length, o(h);
235
- }, e.onerror = function(c) {
236
- c.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 c = e.status, h = e.statusText, s = e.getResponseHeader("Content-Type"), u = e.getAllResponseHeaders();
244
- n(c, h, s, new pe(u));
245
- }
246
- }, e.withCredentials = d;
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, v, d, t) {
260
- var i = null, r = new Z(), c = r.signal, h = new Y();
261
- return M(v, {
262
- headers: t,
263
- credentials: d ? "include" : "same-origin",
264
- signal: c,
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
- V(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 v = n[a];
307
- try {
308
- typeof v.handleEvent == "function" ? v.handleEvent(e) : v.call(this, e);
309
- } catch (d) {
310
- We(d);
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 v = !1, d = 0; d < a.length; d += 1)
318
- a[d] === n && (v = !0);
319
- v || 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 v = [], d = 0; d < a.length; d += 1)
325
- a[d] !== n && v.push(a[d]);
326
- v.length === 0 ? delete o[e] : o[e] = v;
327
- }
328
- };
329
- function de(e) {
330
- this.type = e, this.target = void 0;
331
- }
332
- function me(e, n) {
333
- de.call(this, e), this.data = n.data, this.lastEventId = n.lastEventId;
334
- }
335
- me.prototype = Object.create(de.prototype);
336
- function ye(e, n) {
337
- de.call(this, e), this.status = n.status, this.statusText = n.statusText, this.headers = n.headers;
338
- }
339
- ye.prototype = Object.create(de.prototype);
340
- function He(e, n) {
341
- de.call(this, e), this.error = n.error;
342
- }
343
- He.prototype = Object.create(de.prototype);
344
- var Ee = -1, ee = 0, te = 1, le = 2, Pe = -1, re = 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
- }, ce = 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 || K == null ? new k() : new K();
361
- }
362
- var Ue = M != null && ue != null && "body" in ue.prototype;
363
- function Ve(e, n, o) {
364
- n = String(n);
365
- var a = !!o.withCredentials, v = o.lastEventIdQueryParameterName || "lastEventId", d = we(1e3), t = Ce(o.heartbeatTimeout, 45e3), i = "", r = d, c = !1, h = 0, s = o.headers || {}, u = o.Transport, j = Ue && u == null ? void 0 : new z(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 = "", _ = re, ae = 0, G = 0, Se = function(T, P, I, H) {
366
- if (S === ee)
367
- if (T === 200 && I != null && Re.test(I)) {
368
- S = te, c = Date.now(), r = d, e.readyState = te;
369
- var D = new ye("open", {
370
- status: T,
371
- statusText: P,
372
- headers: H
373
- });
374
- e.dispatchEvent(D), ce(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.", Je();
378
- var D = new ye("error", {
379
- status: T,
380
- statusText: P,
381
- headers: H
382
- });
383
- e.dispatchEvent(D), ce(e, e.onerror, D), console.error(C);
384
- }
385
- }, Ke = function(T) {
386
- if (S === te) {
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 !== "" && (c = 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
- _ = re;
397
- else if (_ === Pe && (_ = re), H === 13 || H === 10) {
398
- if (_ !== re) {
399
- _ === be && (G = C + 1);
400
- var ne = D.slice(ae, G - 1), oe = D.slice(G + (G < C && D.charCodeAt(G) === 32 ? 1 : 0), C);
401
- ne === "data" ? (X += `
402
- `, X += oe) : ne === "id" ? w = oe : ne === "event" ? m = oe : ne === "retry" ? (d = Ce(oe, d), r = d) : ne === "heartbeatTimeout" && (t = Ce(oe, t), y !== 0 && (ie(y), y = V(function() {
403
- Ae();
404
- }, t)));
405
- }
406
- if (_ === re) {
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" ? ce(e, e.onopen, ke) : m === "message" ? ce(e, e.onmessage, ke) : m === "error" && ce(e, e.onerror, ke), S === le)
414
- return;
415
- }
416
- X = "", m = "";
417
- }
418
- _ = H === 13 ? Pe : re;
419
- } else
420
- _ === re && (ae = C, _ = be), _ === be ? H === 58 && (G = C + 1, _ = xe) : _ === xe && (_ = Me);
421
- }
422
- }
423
- }, et = function(T) {
424
- if (S === te || S === ee) {
425
- S = Ee, y !== 0 && (ie(y), y = 0), y = V(function() {
426
- Ae();
427
- }, r), r = we(Math.min(d * 16, r * 2)), e.readyState = ee;
428
- var P = new He("error", { error: T });
429
- e.dispatchEvent(P), ce(e, e.onerror, P), T != null && console.error(T);
430
- }
431
- }, Je = function() {
432
- S = le, g != null && (g.abort(), g = void 0), y !== 0 && (ie(y), y = 0), e.readyState = le;
433
- }, Ae = function() {
434
- if (y = 0, S !== Ee) {
435
- if (!c && g != null)
436
- et(new Error("No activity within " + t + " milliseconds. " + (S === ee ? "No response received." : h + " chars received.") + " Reconnecting.")), g != null && (g.abort(), g = void 0);
437
- else {
438
- var T = Math.max((c || Date.now()) + t - Date.now(), 1);
439
- c = !1, y = V(function() {
440
- Ae();
441
- }, T);
442
- }
443
- return;
444
- }
445
- c = !1, h = 0, y = V(function() {
446
- Ae();
447
- }, t), S = ee, X = "", m = "", w = i, E = "", ae = 0, G = 0, _ = re;
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 === v ? "" : oe;
453
- }), P += (n.indexOf("?") === -1 ? "?" : "&") + v + "=" + 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, Ke, et, P, H, D);
463
- } catch (oe) {
464
- throw Je(), oe;
465
- }
466
- };
467
- e.url = n, e.readyState = ee, e.withCredentials = a, e.headers = s, e._close = Je, Ae();
468
- }
469
- O.prototype = Object.create(ge.prototype), O.prototype.CONNECTING = ee, O.prototype.OPEN = te, O.prototype.CLOSED = le, O.prototype.close = function() {
470
- this._close();
471
- }, O.CONNECTING = ee, O.OPEN = te, O.CLOSED = le, O.prototype.withCredentials = void 0;
472
- var ze = Q;
473
- k != null && (Q == null || !("withCredentials" in Q.prototype)) && (ze = O), function(e) {
474
- {
475
- var n = e($);
476
- n !== void 0 && (se.exports = n);
477
- }
478
- }(function(e) {
479
- e.EventSourcePolyfill = O, e.NativeEventSource = Q, e.EventSource = ze;
480
- });
481
- })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : it : 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 colspan="4" class="SkeletonShimmer 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('<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>'), Tt = W('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'), Ct = W("<button> </button>"), At = 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>'), 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;overflow:hidden;.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;overflow:hidden;}.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:where(.svelte-75jgrh) {width:60px;height:40px;border-radius:6px;background-color:var(--emw-color-skeleton, #333232);overflow:hidden;position:relative;}.PaginationNumberSkeleton:where(.svelte-75jgrh) {width:30px;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(
489
- 90deg,
490
- transparent 0%,
491
- var(--emw-color-skeleton, #333232) 50%,
492
- transparent 100%
493
- );
494
- animation: svelte-75jgrh-loading 1.5s infinite;transform:translateX(-100%);}
495
-
496
- @keyframes svelte-75jgrh-loading {
497
- 0% {
498
- transform: translateX(-100%);
499
- }
500
- 100% {
501
- transform: translateX(100%);
502
- }
503
- }
504
-
505
- @media (min-width: 1000px) {.ShowPlayersButton.svelte-75jgrh {display:block;width:300px;margin:auto;background-color:var(--emw-color-bg-primary, #212121);}
506
- }
507
-
508
- @media (min-width: 750px) {.PaginationWrapper.svelte-75jgrh, .PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;}.PaginationButton.svelte-75jgrh {min-width:75px;}.PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;.PaginationSkeletonButton:where(.svelte-75jgrh) {width:auto;min-width:55px;}.PaginationNumberSkeleton:where(.svelte-75jgrh) {width:25px;}}
509
- }`
510
- };
511
- function Dt(se, $) {
512
- ut($, !0), dt(se, Nt);
513
- const b = () => ft(mt, "$_", V), [V, ie] = ht(), k = Le($, "endpoint"), K = Le($, "language", 7, "en"), J = Le($, "session"), Q = Le($, "tournamentid"), F = Le($, "platform");
514
- Object.keys(nt).forEach((t) => {
515
- bt(t, nt[t]);
516
- }), at(K());
517
- const qe = () => {
518
- at(K());
519
- };
520
- lt(() => {
521
- qe();
522
- });
523
- let M = null, ue = he(void 0), Y = he(!1), _e = he(!1), Z = he(void 0), U = he(0), B = he(10), fe = he(void 0), N = he(void 0);
524
- const z = () => {
525
- if (ye.has(l(me)))
526
- return;
527
- q(Y, !0);
528
- const t = new URL(`${k()}/v1/tournaments/${Q()}/leaderboard`), i = new Headers();
529
- J() && i.append("X-SessionId", J()), t.searchParams.append("language", K()), t.searchParams.append("platform", F()), t.searchParams.append("pagination", `offset=${l(U)},limit=${l(B)}`), fetch(t).then((r) => r.json()).then((r) => {
530
- q(ue, r?.items, !0), q(fe, r?.pages, !0), q(N, r?.total, !0), ye.set(l(me), l(ue));
531
- }).catch((r) => console.log(r)).finally(() => q(Y, !1));
532
- }, Fe = (t) => {
533
- const i = JSON.parse(t.data);
534
- i && i.messageType === "LeaderBoardUpdate" && q(ue, i?.items, !0);
535
- }, pe = () => {
536
- M && (M.close(), M = null);
537
- const t = new URL(`${k()}/v1/tournaments/${Q()}/leaderboard/updates`);
538
- t.searchParams.append("HeartBeat", "false"), t.searchParams.append("language", K()), t.searchParams.append("filter", "includeUnqualifiedPlayer=true"), t.searchParams.append("pagination", `offset=${l(U)},limit=${l(B)}`), t.searchParams.append("platform", F()), M = new wt.EventSourcePolyfill(t, {
539
- headers: { accept: "text/event-stream", "X-SessionId": J() }
540
- }), M.onmessage = Fe;
541
- }, Oe = () => {
542
- q(_e, !0);
543
- const t = new URL(`${k()}/v1/tournaments/leaderboard/player`), i = new Headers();
544
- t.searchParams.append("language", K()), t.searchParams.append("platform", F()), t.searchParams.append("filter", "includeUnqualifiedPlayer=false"), J() && i.append("X-SessionId", J()), fetch(t, { method: "GET", headers: i }).then((c) => c.json()).then((c) => {
545
- const h = c?.items?.find((s) => s?.tournament?.id === Q());
546
- q(Z, h?.leaderBoard, !0);
547
- }).catch((c) => {
548
- console.log(c);
549
- }).finally(() => q(_e, !1));
550
- }, Be = () => {
551
- l(fe)?.next && (q(U, l(U) + l(B)), z(), pe());
552
- }, Ie = () => {
553
- l(fe)?.previous && l(U) !== 0 && (q(U, l(U) - l(B)), z(), pe());
554
- }, ge = (t) => {
555
- q(U, (t - 1) * l(B)), z(), pe();
556
- }, de = Qe(() => {
557
- const t = Math.ceil(l(N) / l(B)), i = Math.floor(l(U) / l(B)) + 1;
558
- if (t <= 5)
559
- return Array.from({ length: t }, (c, h) => h + 1);
560
- const r = [];
561
- 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;
562
- }), me = Qe(() => Math.floor(l(U) / l(B)) + 1);
563
- let ye = /* @__PURE__ */ new Map(), He = Qe(() => ye.get(l(me)) ?? []);
564
- const Ee = (t, i) => {
565
- const r = [];
566
- return i && r.push("PlayerRow"), t === 1 && r.push("Gold"), t === 2 && r.push("Silver"), t === 3 && r.push("Bronze"), r.join(" ");
567
- };
568
- ct(() => (z(), Oe(), pe(), () => {
569
- M?.close(), M = null;
570
- }));
571
- var ee = {
572
- get endpoint() {
573
- return k();
574
- },
575
- set endpoint(t) {
576
- k(t), Ne();
577
- },
578
- get language() {
579
- return K();
580
- },
581
- set language(t = "en") {
582
- K(t), Ne();
583
- },
584
- get session() {
585
- return J();
586
- },
587
- set session(t) {
588
- J(t), Ne();
589
- },
590
- get tournamentid() {
591
- return Q();
592
- },
593
- set tournamentid(t) {
594
- Q(t), Ne();
595
- },
596
- get platform() {
597
- return F();
598
- },
599
- set platform(t) {
600
- F(t), Ne();
601
- }
602
- }, te = Lt(), le = p(te);
603
- {
604
- var Pe = (t) => {
605
- var i = xt(), r = p(i), c = p(r), h = p(c, !0);
606
- f(c);
607
- var s = A(c, 2), u = p(s, !0);
608
- f(s);
609
- var j = A(s, 2), x = p(j, !0);
610
- f(j), f(r);
611
- var g = A(r, 2), y = p(g);
612
- {
613
- var S = (w) => {
614
- var m = jt(), E = De(m), _ = p(E);
615
- f(E);
616
- var ae = A(E, 2), G = p(ae, !0);
617
- f(ae);
618
- var Se = A(ae, 2), Ke = p(Se, !0);
619
- f(Se), ve(() => {
620
- R(_, `${l(Z).rank ?? ""}.`), R(G, l(Z).score), R(Ke, l(Z).prizeName || "-");
621
- }), L(w, m);
622
- }, X = (w) => {
623
- var m = _t(), E = p(m, !0);
624
- f(m), ve((_) => R(E, _), [() => b()("notEnrolledRank")]), L(w, m);
625
- };
626
- je(y, (w) => {
627
- l(Z) ? w(S) : w(X, !1);
628
- });
629
- }
630
- f(g), f(i), ve(
631
- (w, m, E) => {
632
- R(h, w), R(u, m), R(x, E);
633
- },
634
- [
635
- () => b()("myRanking"),
636
- () => b()("points"),
637
- () => b()("prize")
638
- ]
639
- ), L(t, i);
640
- }, re = (t) => {
641
- var i = St();
642
- L(t, i);
643
- };
644
- je(le, (t) => {
645
- l(_e) ? t(re, !1) : t(Pe);
646
- });
647
- }
648
- var be = A(le, 2), xe = p(be), Me = p(xe), Re = p(Me), Ge = p(Re, !0);
649
- f(Re);
650
- var Te = A(Re), Ce = p(Te, !0);
651
- f(Te);
652
- var we = A(Te), ce = p(we, !0);
653
- f(we);
654
- var O = A(we), $e = p(O, !0);
655
- f(O), f(Me), f(xe);
656
- var Ue = A(xe), Ve = p(Ue);
657
- {
658
- var ze = (t) => {
659
- var i = Xe(), r = De(i);
660
- Ye(r, 17, () => Array(l(B)), tt, (c, h, s, u) => {
661
- var j = kt();
662
- L(c, j);
663
- }), L(t, i);
664
- }, e = (t) => {
665
- var i = Xe(), r = De(i);
666
- {
667
- var c = (s) => {
668
- var u = Xe(), j = De(u);
669
- Ye(j, 17, () => l(He), (x) => x.rank, (x, g) => {
670
- var y = Et(), S = p(y), X = p(S);
671
- f(S);
672
- var w = A(S), m = p(w, !0);
673
- f(w);
674
- var E = A(w), _ = p(E, !0);
675
- f(E);
676
- var ae = A(E), G = p(ae, !0);
677
- f(ae), f(y), ve(
678
- (Se) => {
679
- rt(y, 1, Se, "svelte-75jgrh"), R(X, `${l(g).rank ?? ""}.`), R(m, l(g).shortName || "-"), R(_, l(g).score || "-"), R(G, l(g).prizeName || "-");
680
- },
681
- [
682
- () => yt(Ee(l(g).rank, l(g).rank === l(Z)?.rank))
683
- ]
684
- ), L(x, y);
685
- }), L(s, u);
686
- }, h = (s) => {
687
- var u = Pt(), j = p(u), x = p(j), g = p(x), y = p(g, !0);
688
- f(g), f(x), f(j), f(u), ve((S) => R(y, S), [() => b()("emptyLeaderboard")]), L(s, u);
689
- };
690
- je(
691
- r,
692
- (s) => {
693
- l(ue)?.length > 0 ? s(c) : s(h, !1);
694
- },
695
- !0
696
- );
697
- }
698
- L(t, i);
699
- };
700
- je(Ve, (t) => {
701
- l(Y) ? t(ze) : t(e, !1);
702
- });
703
- }
704
- f(Ue), f(be);
705
- var n = A(be, 2);
706
- {
707
- var o = (t) => {
708
- var i = Rt();
709
- L(t, i);
710
- };
711
- je(n, (t) => {
712
- l(Y) && t(o);
713
- });
714
- }
715
- var a = A(n, 2);
716
- {
717
- var v = (t) => {
718
- var i = At(), r = p(i);
719
- r.__click = Ie;
720
- var c = p(r, !0);
721
- f(r);
722
- var h = A(r, 2);
723
- Ye(h, 21, () => l(de), tt, (j, x) => {
724
- var g = Xe(), y = De(g);
725
- {
726
- var S = (w) => {
727
- var m = Tt();
728
- L(w, m);
729
- }, X = (w) => {
730
- var m = Ct();
731
- let E;
732
- m.__click = () => ge(l(x));
733
- var _ = p(m, !0);
734
- f(m), ve(() => {
735
- E = rt(m, 1, "PaginationButton Number svelte-75jgrh", null, E, { Active: l(x) === l(me) }), R(_, l(x));
736
- }), L(w, m);
737
- };
738
- je(y, (w) => {
739
- typeof l(x) != "number" ? w(S) : w(X, !1);
740
- });
741
- }
742
- L(j, g);
743
- }), f(h);
744
- var s = A(h, 2);
745
- s.__click = Be;
746
- var u = p(s, !0);
747
- f(s), f(i), ve(
748
- (j, x) => {
749
- r.disabled = !l(fe)?.previous, R(c, j), s.disabled = !l(fe)?.next, R(u, x);
750
- },
751
- [() => b()("previousButton"), () => b()("nextButton")]
752
- ), L(t, i);
753
- };
754
- je(a, (t) => {
755
- !l(Y) && l(N) > l(B) && t(v);
756
- });
757
- }
758
- f(te), ve(
759
- (t, i, r, c) => {
760
- R(Ge, t), R(Ce, i), R(ce, r), R($e, c);
761
- },
762
- [
763
- () => b()("rank"),
764
- () => b()("user"),
765
- () => b()("points"),
766
- () => b()("prize")
767
- ]
768
- ), L(se, te);
769
- var d = vt(ee);
770
- return ie(), d;
771
- }
772
- pt(["click"]);
773
- customElements.define("tournament-leaderboard", gt(
774
- Dt,
775
- {
776
- endpoint: {},
777
- language: {},
778
- session: {},
779
- tournamentid: {},
780
- platform: {}
781
- },
782
- [],
783
- [],
784
- !1
785
- ));
786
- export {
787
- Dt as default
788
- };