@everymatrix/tournaments-banner 0.2.2 → 0.2.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.
@@ -1,1302 +0,0 @@
1
- var mt = Object.defineProperty, yt = Object.defineProperties;
2
- var bt = Object.getOwnPropertyDescriptors;
3
- var Qe = Object.getOwnPropertySymbols;
4
- var wt = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
5
- var Je = (m, c, p) => c in m ? mt(m, c, { enumerable: !0, configurable: !0, writable: !0, value: p }) : m[c] = p, Ke = (m, c) => {
6
- for (var p in c || (c = {}))
7
- wt.call(c, p) && Je(m, p, c[p]);
8
- if (Qe)
9
- for (var p of Qe(c))
10
- _t.call(c, p) && Je(m, p, c[p]);
11
- return m;
12
- }, et = (m, c) => yt(m, bt(c));
13
- var Xe = (m, c, p) => new Promise((H, V) => {
14
- var D = (L) => {
15
- try {
16
- P(p.next(L));
17
- } catch (Y) {
18
- V(Y);
19
- }
20
- }, M = (L) => {
21
- try {
22
- P(p.throw(L));
23
- } catch (Y) {
24
- V(Y);
25
- }
26
- }, P = (L) => L.done ? H(L.value) : Promise.resolve(L.value).then(D, M);
27
- P((p = p.apply(m, c)).next());
28
- });
29
- import { z as qe, A as st, B as Tt, c as ut, g as ct, a as St, p as K, C as Dt, D as Mt, E as tt, F as Et, G as Pe, q as $e, H as xt, m as ve, j as T, I as Ot, J as $t, i as nt, b as Fe, d as lt, o as Ye, v as ee, K as Lt, L as At, h as rt, M as at, r as je, N as Ct, s as Ft, e as Ue, O as Re, f as Ne, t as ot, l as We, k as Yt, P as Rt, $ as Ht } from "./StatusBadge-vLV0XrQ8.js";
30
- import { T as It } from "./TournamentImage-jDlLsHTp.js";
31
- typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
32
- }, globalThis.customElements = { define() {
33
- }, get() {
34
- }, whenDefined() {
35
- } });
36
- const Nt = (m, c) => {
37
- window.postMessage(
38
- et(Ke({}, c), {
39
- type: m
40
- }),
41
- window.location.href
42
- );
43
- }, zt = (m, c) => {
44
- Nt(`Tournaments:${m}`, c);
45
- }, kt = (m, c) => {
46
- zt("viewTournamentDetails", {
47
- tournamentId: m.id,
48
- tournamentName: m.nameOrTitle
49
- });
50
- }, Pt = (m) => {
51
- const c = new Headers();
52
- return m && c.append("X-SessionId", m), c;
53
- }, jt = (m) => Xe(void 0, null, function* () {
54
- var V, D, M;
55
- const c = new URL(`${m.endpoint}/v1/tournaments`);
56
- c.searchParams.append("language", m.language), c.searchParams.append("sortField", (V = m.sortField) != null ? V : "StartTime"), c.searchParams.append("sortOrder", (D = m.sortOrder) != null ? D : "desc"), c.searchParams.append("platform", m.platform);
57
- const H = yield (yield fetch(c, { method: "GET", headers: Pt(m.session) })).json();
58
- return (M = H == null ? void 0 : H.items) != null ? M : [];
59
- }), Ut = (m) => Xe(void 0, null, function* () {
60
- const c = yield jt(m), p = /* @__PURE__ */ new Date();
61
- return c.filter((H) => new Date(H.exhibitionEndTime) > p);
62
- });
63
- var it = { exports: {} };
64
- /** @license
65
- * eventsource.js
66
- * Available under MIT License (MIT)
67
- * https://github.com/Yaffle/EventSource/
68
- */
69
- (function(m, c) {
70
- (function(p) {
71
- var H = p.setTimeout, V = p.clearTimeout, D = p.XMLHttpRequest, M = p.XDomainRequest, P = p.ActiveXObject, L = p.EventSource, Y = p.document, R = p.Promise, j = p.fetch, se = p.Response, Z = p.TextDecoder, E = p.TextEncoder, Se = p.AbortController;
72
- if (typeof window != "undefined" && typeof Y != "undefined" && !("readyState" in Y) && Y.body == null && (Y.readyState = "loading", window.addEventListener("load", function(e) {
73
- Y.readyState = "complete";
74
- }, !1)), D == null && P != null && (D = function() {
75
- return new P("Microsoft.XMLHTTP");
76
- }), Object.create == null && (Object.create = function(e) {
77
- function a() {
78
- }
79
- return a.prototype = e, new a();
80
- }), Date.now || (Date.now = function() {
81
- return (/* @__PURE__ */ new Date()).getTime();
82
- }), Se == null) {
83
- var f = j;
84
- j = function(e, a) {
85
- var s = a.signal;
86
- return f(e, { headers: a.headers, credentials: a.credentials, cache: a.cache }).then(function(o) {
87
- var b = o.body.getReader();
88
- return s._reader = b, s._aborted && s._reader.cancel(), {
89
- status: o.status,
90
- statusText: o.statusText,
91
- headers: o.headers,
92
- body: {
93
- getReader: function() {
94
- return b;
95
- }
96
- }
97
- };
98
- });
99
- }, Se = function() {
100
- this.signal = {
101
- _reader: null,
102
- _aborted: !1
103
- }, this.abort = function() {
104
- this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
105
- };
106
- };
107
- }
108
- function x() {
109
- this.bitsNeeded = 0, this.codePoint = 0;
110
- }
111
- x.prototype.decode = function(e) {
112
- function a(z, W, w) {
113
- if (w === 1)
114
- return z >= 128 >> W && z << W <= 2047;
115
- if (w === 2)
116
- return z >= 2048 >> W && z << W <= 55295 || z >= 57344 >> W && z << W <= 65535;
117
- if (w === 3)
118
- return z >= 65536 >> W && z << W <= 1114111;
119
- throw new Error();
120
- }
121
- function s(z, W) {
122
- if (z === 6 * 1)
123
- return W >> 6 > 15 ? 3 : W > 31 ? 2 : 1;
124
- if (z === 6 * 2)
125
- return W > 15 ? 3 : 2;
126
- if (z === 6 * 3)
127
- return 3;
128
- throw new Error();
129
- }
130
- for (var o = 65533, b = "", v = this.bitsNeeded, $ = this.codePoint, X = 0; X < e.length; X += 1) {
131
- var F = e[X];
132
- v !== 0 && (F < 128 || F > 191 || !a($ << 6 | F & 63, v - 6, s(v, $))) && (v = 0, $ = o, b += String.fromCharCode($)), v === 0 ? (F >= 0 && F <= 127 ? (v = 0, $ = F) : F >= 192 && F <= 223 ? (v = 6 * 1, $ = F & 31) : F >= 224 && F <= 239 ? (v = 6 * 2, $ = F & 15) : F >= 240 && F <= 247 ? (v = 6 * 3, $ = F & 7) : (v = 0, $ = o), v !== 0 && !a($, v, s(v, $)) && (v = 0, $ = o)) : (v -= 6, $ = $ << 6 | F & 63), v === 0 && ($ <= 65535 ? b += String.fromCharCode($) : (b += String.fromCharCode(55296 + ($ - 65535 - 1 >> 10)), b += String.fromCharCode(56320 + ($ - 65535 - 1 & 1023))));
133
- }
134
- return this.bitsNeeded = v, this.codePoint = $, b;
135
- };
136
- var I = function() {
137
- try {
138
- return new Z().decode(new E().encode("test"), { stream: !0 }) === "test";
139
- } catch (e) {
140
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
141
- }
142
- return !1;
143
- };
144
- (Z == null || E == null || !I()) && (Z = x);
145
- var y = function() {
146
- };
147
- function G(e) {
148
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = y, this.onload = y, this.onerror = y, this.onreadystatechange = y, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = y;
149
- }
150
- G.prototype.open = function(e, a) {
151
- this._abort(!0);
152
- var s = this, o = this._xhr, b = 1, v = 0;
153
- this._abort = function(w) {
154
- s._sendTimeout !== 0 && (V(s._sendTimeout), s._sendTimeout = 0), (b === 1 || b === 2 || b === 3) && (b = 4, o.onload = y, o.onerror = y, o.onabort = y, o.onprogress = y, o.onreadystatechange = y, o.abort(), v !== 0 && (V(v), v = 0), w || (s.readyState = 4, s.onabort(null), s.onreadystatechange())), b = 0;
155
- };
156
- var $ = function() {
157
- if (b === 1) {
158
- var w = 0, q = "", Me = void 0;
159
- if ("contentType" in o)
160
- w = 200, q = "OK", Me = o.contentType;
161
- else
162
- try {
163
- w = o.status, q = o.statusText, Me = o.getResponseHeader("Content-Type");
164
- } catch (He) {
165
- w = 0, q = "", Me = void 0;
166
- }
167
- w !== 0 && (b = 2, s.readyState = 2, s.status = w, s.statusText = q, s._contentType = Me, s.onreadystatechange());
168
- }
169
- }, X = function() {
170
- if ($(), b === 2 || b === 3) {
171
- b = 3;
172
- var w = "";
173
- try {
174
- w = o.responseText;
175
- } catch (q) {
176
- }
177
- s.readyState = 3, s.responseText = w, s.onprogress();
178
- }
179
- }, F = function(w, q) {
180
- if ((q == null || q.preventDefault == null) && (q = {
181
- preventDefault: y
182
- }), X(), b === 1 || b === 2 || b === 3) {
183
- if (b = 4, v !== 0 && (V(v), v = 0), s.readyState = 4, w === "load")
184
- s.onload(q);
185
- else if (w === "error")
186
- s.onerror(q);
187
- else if (w === "abort")
188
- s.onabort(q);
189
- else
190
- throw new TypeError();
191
- s.onreadystatechange();
192
- }
193
- }, z = function(w) {
194
- o != null && (o.readyState === 4 ? (!("onload" in o) || !("onerror" in o) || !("onabort" in o)) && F(o.responseText === "" ? "error" : "load", w) : o.readyState === 3 ? "onprogress" in o || X() : o.readyState === 2 && $());
195
- }, W = function() {
196
- v = H(function() {
197
- W();
198
- }, 500), o.readyState === 3 && X();
199
- };
200
- "onload" in o && (o.onload = function(w) {
201
- F("load", w);
202
- }), "onerror" in o && (o.onerror = function(w) {
203
- F("error", w);
204
- }), "onabort" in o && (o.onabort = function(w) {
205
- F("abort", w);
206
- }), "onprogress" in o && (o.onprogress = X), "onreadystatechange" in o && (o.onreadystatechange = function(w) {
207
- z(w);
208
- }), ("contentType" in o || !("ontimeout" in D.prototype)) && (a += (a.indexOf("?") === -1 ? "?" : "&") + "padding=true"), o.open(e, a, !0), "readyState" in o && (v = H(function() {
209
- W();
210
- }, 0));
211
- }, G.prototype.abort = function() {
212
- this._abort(!1);
213
- }, G.prototype.getResponseHeader = function(e) {
214
- return this._contentType;
215
- }, G.prototype.setRequestHeader = function(e, a) {
216
- var s = this._xhr;
217
- "setRequestHeader" in s && s.setRequestHeader(e, a);
218
- }, G.prototype.getAllResponseHeaders = function() {
219
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
220
- }, G.prototype.send = function() {
221
- if ((!("ontimeout" in D.prototype) || !("sendAsBinary" in D.prototype) && !("mozAnon" in D.prototype)) && Y != null && Y.readyState != null && Y.readyState !== "complete") {
222
- var e = this;
223
- e._sendTimeout = H(function() {
224
- e._sendTimeout = 0, e.send();
225
- }, 4);
226
- return;
227
- }
228
- var a = this._xhr;
229
- "withCredentials" in a && (a.withCredentials = this.withCredentials);
230
- try {
231
- a.send(void 0);
232
- } catch (s) {
233
- throw s;
234
- }
235
- };
236
- function Q(e) {
237
- return e.replace(/[A-Z]/g, function(a) {
238
- return String.fromCharCode(a.charCodeAt(0) + 32);
239
- });
240
- }
241
- function te(e) {
242
- for (var a = /* @__PURE__ */ Object.create(null), s = e.split(`\r
243
- `), o = 0; o < s.length; o += 1) {
244
- var b = s[o], v = b.split(": "), $ = v.shift(), X = v.join(": ");
245
- a[Q($)] = X;
246
- }
247
- this._map = a;
248
- }
249
- te.prototype.get = function(e) {
250
- return this._map[Q(e)];
251
- }, D != null && D.HEADERS_RECEIVED == null && (D.HEADERS_RECEIVED = 2);
252
- function he() {
253
- }
254
- he.prototype.open = function(e, a, s, o, b, v, $) {
255
- e.open("GET", b);
256
- var X = 0;
257
- e.onprogress = function() {
258
- var z = e.responseText, W = z.slice(X);
259
- X += W.length, s(W);
260
- }, e.onerror = function(z) {
261
- z.preventDefault(), o(new Error("NetworkError"));
262
- }, e.onload = function() {
263
- o(null);
264
- }, e.onabort = function() {
265
- o(null);
266
- }, e.onreadystatechange = function() {
267
- if (e.readyState === D.HEADERS_RECEIVED) {
268
- var z = e.status, W = e.statusText, w = e.getResponseHeader("Content-Type"), q = e.getAllResponseHeaders();
269
- a(z, W, w, new te(q));
270
- }
271
- }, e.withCredentials = v;
272
- for (var F in $)
273
- Object.prototype.hasOwnProperty.call($, F) && e.setRequestHeader(F, $[F]);
274
- return e.send(), e;
275
- };
276
- function ne(e) {
277
- this._headers = e;
278
- }
279
- ne.prototype.get = function(e) {
280
- return this._headers.get(e);
281
- };
282
- function re() {
283
- }
284
- re.prototype.open = function(e, a, s, o, b, v, $) {
285
- var X = null, F = new Se(), z = F.signal, W = new Z();
286
- return j(b, {
287
- headers: $,
288
- credentials: v ? "include" : "same-origin",
289
- signal: z,
290
- cache: "no-store"
291
- }).then(function(w) {
292
- return X = w.body.getReader(), a(w.status, w.statusText, w.headers.get("Content-Type"), new ne(w.headers)), new R(function(q, Me) {
293
- var He = function() {
294
- X.read().then(function(we) {
295
- if (we.done)
296
- q(void 0);
297
- else {
298
- var ge = W.decode(we.value, { stream: !0 });
299
- s(ge), He();
300
- }
301
- }).catch(function(we) {
302
- Me(we);
303
- });
304
- };
305
- He();
306
- });
307
- }).catch(function(w) {
308
- if (w.name !== "AbortError")
309
- return w;
310
- }).then(function(w) {
311
- o(w);
312
- }), {
313
- abort: function() {
314
- X != null && X.cancel(), F.abort();
315
- }
316
- };
317
- };
318
- function A() {
319
- this._listeners = /* @__PURE__ */ Object.create(null);
320
- }
321
- function _(e) {
322
- H(function() {
323
- throw e;
324
- }, 0);
325
- }
326
- A.prototype.dispatchEvent = function(e) {
327
- e.target = this;
328
- var a = this._listeners[e.type];
329
- if (a != null)
330
- for (var s = a.length, o = 0; o < s; o += 1) {
331
- var b = a[o];
332
- try {
333
- typeof b.handleEvent == "function" ? b.handleEvent(e) : b.call(this, e);
334
- } catch (v) {
335
- _(v);
336
- }
337
- }
338
- }, A.prototype.addEventListener = function(e, a) {
339
- e = String(e);
340
- var s = this._listeners, o = s[e];
341
- o == null && (o = [], s[e] = o);
342
- for (var b = !1, v = 0; v < o.length; v += 1)
343
- o[v] === a && (b = !0);
344
- b || o.push(a);
345
- }, A.prototype.removeEventListener = function(e, a) {
346
- e = String(e);
347
- var s = this._listeners, o = s[e];
348
- if (o != null) {
349
- for (var b = [], v = 0; v < o.length; v += 1)
350
- o[v] !== a && b.push(o[v]);
351
- b.length === 0 ? delete s[e] : s[e] = b;
352
- }
353
- };
354
- function B(e) {
355
- this.type = e, this.target = void 0;
356
- }
357
- function ae(e, a) {
358
- B.call(this, e), this.data = a.data, this.lastEventId = a.lastEventId;
359
- }
360
- ae.prototype = Object.create(B.prototype);
361
- function l(e, a) {
362
- B.call(this, e), this.status = a.status, this.statusText = a.statusText, this.headers = a.headers;
363
- }
364
- l.prototype = Object.create(B.prototype);
365
- function r(e, a) {
366
- B.call(this, e), this.error = a.error;
367
- }
368
- r.prototype = Object.create(B.prototype);
369
- var t = -1, i = 0, n = 1, d = 2, h = -1, g = 0, N = 1, k = 2, J = 3, u = /^text\/event\-stream(;.*)?$/i, S = 1e3, U = 18e6, pe = function(e, a) {
370
- var s = e == null ? a : parseInt(e, 10);
371
- return s !== s && (s = a), ue(s);
372
- }, ue = function(e) {
373
- return Math.min(Math.max(e, S), U);
374
- }, C = function(e, a, s) {
375
- try {
376
- typeof a == "function" && a.call(e, s);
377
- } catch (o) {
378
- _(o);
379
- }
380
- };
381
- function O(e, a) {
382
- A.call(this), a = a || {}, 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, be(this, e, a);
383
- }
384
- function ce() {
385
- return D != null && "withCredentials" in D.prototype || M == null ? new D() : new M();
386
- }
387
- var le = j != null && se != null && "body" in se.prototype;
388
- function be(e, a, s) {
389
- a = String(a);
390
- var o = !!s.withCredentials, b = s.lastEventIdQueryParameterName || "lastEventId", v = ue(1e3), $ = pe(s.heartbeatTimeout, 45e3), X = "", F = v, z = !1, W = 0, w = s.headers || {}, q = s.Transport, Me = le && q == null ? void 0 : new G(q != null ? new q() : ce()), He = q != null && typeof q != "string" ? new q() : Me == null ? new re() : new he(), we = void 0, ge = 0, De = t, Ae = "", ze = "", Ee = "", ke = "", me = g, Be = 0, Le = 0, pt = function(de, ie, _e, Te) {
391
- if (De === i)
392
- if (de === 200 && _e != null && u.test(_e)) {
393
- De = n, z = Date.now(), F = v, e.readyState = n;
394
- var ye = new l("open", {
395
- status: de,
396
- statusText: ie,
397
- headers: Te
398
- });
399
- e.dispatchEvent(ye), C(e, e.onopen, ye);
400
- } else {
401
- var fe = "";
402
- de !== 200 ? (ie && (ie = ie.replace(/\s+/g, " ")), fe = "EventSource's response has a status " + de + " " + ie + " that is not 200. Aborting the connection.") : fe = "EventSource's response has a Content-Type specifying an unsupported type: " + (_e == null ? "-" : _e.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
403
- var ye = new l("error", {
404
- status: de,
405
- statusText: ie,
406
- headers: Te
407
- });
408
- e.dispatchEvent(ye), C(e, e.onerror, ye), console.error(fe);
409
- }
410
- }, gt = function(de) {
411
- if (De === n) {
412
- for (var ie = -1, _e = 0; _e < de.length; _e += 1) {
413
- var Te = de.charCodeAt(_e);
414
- (Te === 10 || Te === 13) && (ie = _e);
415
- }
416
- var ye = (ie !== -1 ? ke : "") + de.slice(0, ie + 1);
417
- ke = (ie === -1 ? ke : "") + de.slice(ie + 1), de !== "" && (z = Date.now(), W += de.length);
418
- for (var fe = 0; fe < ye.length; fe += 1) {
419
- var Te = ye.charCodeAt(fe);
420
- if (me === h && Te === 10)
421
- me = g;
422
- else if (me === h && (me = g), Te === 13 || Te === 10) {
423
- if (me !== g) {
424
- me === N && (Le = fe + 1);
425
- var xe = ye.slice(Be, Le - 1), Oe = ye.slice(Le + (Le < fe && ye.charCodeAt(Le) === 32 ? 1 : 0), fe);
426
- xe === "data" ? (Ae += `
427
- `, Ae += Oe) : xe === "id" ? ze = Oe : xe === "event" ? Ee = Oe : xe === "retry" ? (v = pe(Oe, v), F = v) : xe === "heartbeatTimeout" && ($ = pe(Oe, $), ge !== 0 && (V(ge), ge = H(function() {
428
- Ie();
429
- }, $)));
430
- }
431
- if (me === g) {
432
- if (Ae !== "") {
433
- X = ze, Ee === "" && (Ee = "message");
434
- var Ce = new ae(Ee, {
435
- data: Ae.slice(1),
436
- lastEventId: ze
437
- });
438
- if (e.dispatchEvent(Ce), Ee === "open" ? C(e, e.onopen, Ce) : Ee === "message" ? C(e, e.onmessage, Ce) : Ee === "error" && C(e, e.onerror, Ce), De === d)
439
- return;
440
- }
441
- Ae = "", Ee = "";
442
- }
443
- me = Te === 13 ? h : g;
444
- } else
445
- me === g && (Be = fe, me = N), me === N ? Te === 58 && (Le = fe + 1, me = k) : me === k && (me = J);
446
- }
447
- }
448
- }, Ze = function(de) {
449
- if (De === n || De === i) {
450
- De = t, ge !== 0 && (V(ge), ge = 0), ge = H(function() {
451
- Ie();
452
- }, F), F = ue(Math.min(v * 16, F * 2)), e.readyState = i;
453
- var ie = new r("error", { error: de });
454
- e.dispatchEvent(ie), C(e, e.onerror, ie), de != null && console.error(de);
455
- }
456
- }, Ge = function() {
457
- De = d, we != null && (we.abort(), we = void 0), ge !== 0 && (V(ge), ge = 0), e.readyState = d;
458
- }, Ie = function() {
459
- if (ge = 0, De !== t) {
460
- if (!z && we != null)
461
- Ze(new Error("No activity within " + $ + " milliseconds. " + (De === i ? "No response received." : W + " chars received.") + " Reconnecting.")), we != null && (we.abort(), we = void 0);
462
- else {
463
- var de = Math.max((z || Date.now()) + $ - Date.now(), 1);
464
- z = !1, ge = H(function() {
465
- Ie();
466
- }, de);
467
- }
468
- return;
469
- }
470
- z = !1, W = 0, ge = H(function() {
471
- Ie();
472
- }, $), De = i, Ae = "", Ee = "", ze = X, ke = "", Be = 0, Le = 0, me = g;
473
- var ie = a;
474
- if (a.slice(0, 5) !== "data:" && a.slice(0, 5) !== "blob:" && X !== "") {
475
- var _e = a.indexOf("?");
476
- ie = _e === -1 ? a : a.slice(0, _e + 1) + a.slice(_e + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(Oe, Ce) {
477
- return Ce === b ? "" : Oe;
478
- }), ie += (a.indexOf("?") === -1 ? "?" : "&") + b + "=" + encodeURIComponent(X);
479
- }
480
- var Te = e.withCredentials, ye = {};
481
- ye.Accept = "text/event-stream";
482
- var fe = e.headers;
483
- if (fe != null)
484
- for (var xe in fe)
485
- Object.prototype.hasOwnProperty.call(fe, xe) && (ye[xe] = fe[xe]);
486
- try {
487
- we = He.open(Me, pt, gt, Ze, ie, Te, ye);
488
- } catch (Oe) {
489
- throw Ge(), Oe;
490
- }
491
- };
492
- e.url = a, e.readyState = i, e.withCredentials = o, e.headers = w, e._close = Ge, Ie();
493
- }
494
- O.prototype = Object.create(A.prototype), O.prototype.CONNECTING = i, O.prototype.OPEN = n, O.prototype.CLOSED = d, O.prototype.close = function() {
495
- this._close();
496
- }, O.CONNECTING = i, O.OPEN = n, O.CLOSED = d, O.prototype.withCredentials = void 0;
497
- var oe = L;
498
- D != null && (L == null || !("withCredentials" in L.prototype)) && (oe = O), function(e) {
499
- {
500
- var a = e(c);
501
- a !== void 0 && (m.exports = a);
502
- }
503
- }(function(e) {
504
- e.EventSourcePolyfill = O, e.NativeEventSource = L, e.EventSource = oe;
505
- });
506
- })(typeof globalThis == "undefined" ? typeof window != "undefined" ? window : typeof self != "undefined" ? self : qe : globalThis);
507
- })(it, it.exports);
508
- var dt = { exports: {} };
509
- (function(m, c) {
510
- (function(p, H) {
511
- m.exports = H();
512
- })(qe, function() {
513
- var p = 1e3, H = 6e4, V = 36e5, D = "millisecond", M = "second", P = "minute", L = "hour", Y = "day", R = "week", j = "month", se = "quarter", Z = "year", E = "date", Se = "Invalid Date", f = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, x = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, I = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(l) {
514
- var r = ["th", "st", "nd", "rd"], t = l % 100;
515
- return "[" + l + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
516
- } }, y = function(l, r, t) {
517
- var i = String(l);
518
- return !i || i.length >= r ? l : "" + Array(r + 1 - i.length).join(t) + l;
519
- }, G = { s: y, z: function(l) {
520
- var r = -l.utcOffset(), t = Math.abs(r), i = Math.floor(t / 60), n = t % 60;
521
- return (r <= 0 ? "+" : "-") + y(i, 2, "0") + ":" + y(n, 2, "0");
522
- }, m: function l(r, t) {
523
- if (r.date() < t.date()) return -l(t, r);
524
- var i = 12 * (t.year() - r.year()) + (t.month() - r.month()), n = r.clone().add(i, j), d = t - n < 0, h = r.clone().add(i + (d ? -1 : 1), j);
525
- return +(-(i + (t - n) / (d ? n - h : h - n)) || 0);
526
- }, a: function(l) {
527
- return l < 0 ? Math.ceil(l) || 0 : Math.floor(l);
528
- }, p: function(l) {
529
- return { M: j, y: Z, w: R, d: Y, D: E, h: L, m: P, s: M, ms: D, Q: se }[l] || String(l || "").toLowerCase().replace(/s$/, "");
530
- }, u: function(l) {
531
- return l === void 0;
532
- } }, Q = "en", te = {};
533
- te[Q] = I;
534
- var he = "$isDayjsObject", ne = function(l) {
535
- return l instanceof B || !(!l || !l[he]);
536
- }, re = function l(r, t, i) {
537
- var n;
538
- if (!r) return Q;
539
- if (typeof r == "string") {
540
- var d = r.toLowerCase();
541
- te[d] && (n = d), t && (te[d] = t, n = d);
542
- var h = r.split("-");
543
- if (!n && h.length > 1) return l(h[0]);
544
- } else {
545
- var g = r.name;
546
- te[g] = r, n = g;
547
- }
548
- return !i && n && (Q = n), n || !i && Q;
549
- }, A = function(l, r) {
550
- if (ne(l)) return l.clone();
551
- var t = typeof r == "object" ? r : {};
552
- return t.date = l, t.args = arguments, new B(t);
553
- }, _ = G;
554
- _.l = re, _.i = ne, _.w = function(l, r) {
555
- return A(l, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
556
- };
557
- var B = function() {
558
- function l(t) {
559
- this.$L = re(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[he] = !0;
560
- }
561
- var r = l.prototype;
562
- return r.parse = function(t) {
563
- this.$d = function(i) {
564
- var n = i.date, d = i.utc;
565
- if (n === null) return /* @__PURE__ */ new Date(NaN);
566
- if (_.u(n)) return /* @__PURE__ */ new Date();
567
- if (n instanceof Date) return new Date(n);
568
- if (typeof n == "string" && !/Z$/i.test(n)) {
569
- var h = n.match(f);
570
- if (h) {
571
- var g = h[2] - 1 || 0, N = (h[7] || "0").substring(0, 3);
572
- return d ? new Date(Date.UTC(h[1], g, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, N)) : new Date(h[1], g, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, N);
573
- }
574
- }
575
- return new Date(n);
576
- }(t), this.init();
577
- }, r.init = function() {
578
- var t = this.$d;
579
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
580
- }, r.$utils = function() {
581
- return _;
582
- }, r.isValid = function() {
583
- return this.$d.toString() !== Se;
584
- }, r.isSame = function(t, i) {
585
- var n = A(t);
586
- return this.startOf(i) <= n && n <= this.endOf(i);
587
- }, r.isAfter = function(t, i) {
588
- return A(t) < this.startOf(i);
589
- }, r.isBefore = function(t, i) {
590
- return this.endOf(i) < A(t);
591
- }, r.$g = function(t, i, n) {
592
- return _.u(t) ? this[i] : this.set(n, t);
593
- }, r.unix = function() {
594
- return Math.floor(this.valueOf() / 1e3);
595
- }, r.valueOf = function() {
596
- return this.$d.getTime();
597
- }, r.startOf = function(t, i) {
598
- var n = this, d = !!_.u(i) || i, h = _.p(t), g = function(ue, C) {
599
- var O = _.w(n.$u ? Date.UTC(n.$y, C, ue) : new Date(n.$y, C, ue), n);
600
- return d ? O : O.endOf(Y);
601
- }, N = function(ue, C) {
602
- return _.w(n.toDate()[ue].apply(n.toDate("s"), (d ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(C)), n);
603
- }, k = this.$W, J = this.$M, u = this.$D, S = "set" + (this.$u ? "UTC" : "");
604
- switch (h) {
605
- case Z:
606
- return d ? g(1, 0) : g(31, 11);
607
- case j:
608
- return d ? g(1, J) : g(0, J + 1);
609
- case R:
610
- var U = this.$locale().weekStart || 0, pe = (k < U ? k + 7 : k) - U;
611
- return g(d ? u - pe : u + (6 - pe), J);
612
- case Y:
613
- case E:
614
- return N(S + "Hours", 0);
615
- case L:
616
- return N(S + "Minutes", 1);
617
- case P:
618
- return N(S + "Seconds", 2);
619
- case M:
620
- return N(S + "Milliseconds", 3);
621
- default:
622
- return this.clone();
623
- }
624
- }, r.endOf = function(t) {
625
- return this.startOf(t, !1);
626
- }, r.$set = function(t, i) {
627
- var n, d = _.p(t), h = "set" + (this.$u ? "UTC" : ""), g = (n = {}, n[Y] = h + "Date", n[E] = h + "Date", n[j] = h + "Month", n[Z] = h + "FullYear", n[L] = h + "Hours", n[P] = h + "Minutes", n[M] = h + "Seconds", n[D] = h + "Milliseconds", n)[d], N = d === Y ? this.$D + (i - this.$W) : i;
628
- if (d === j || d === Z) {
629
- var k = this.clone().set(E, 1);
630
- k.$d[g](N), k.init(), this.$d = k.set(E, Math.min(this.$D, k.daysInMonth())).$d;
631
- } else g && this.$d[g](N);
632
- return this.init(), this;
633
- }, r.set = function(t, i) {
634
- return this.clone().$set(t, i);
635
- }, r.get = function(t) {
636
- return this[_.p(t)]();
637
- }, r.add = function(t, i) {
638
- var n, d = this;
639
- t = Number(t);
640
- var h = _.p(i), g = function(J) {
641
- var u = A(d);
642
- return _.w(u.date(u.date() + Math.round(J * t)), d);
643
- };
644
- if (h === j) return this.set(j, this.$M + t);
645
- if (h === Z) return this.set(Z, this.$y + t);
646
- if (h === Y) return g(1);
647
- if (h === R) return g(7);
648
- var N = (n = {}, n[P] = H, n[L] = V, n[M] = p, n)[h] || 1, k = this.$d.getTime() + t * N;
649
- return _.w(k, this);
650
- }, r.subtract = function(t, i) {
651
- return this.add(-1 * t, i);
652
- }, r.format = function(t) {
653
- var i = this, n = this.$locale();
654
- if (!this.isValid()) return n.invalidDate || Se;
655
- var d = t || "YYYY-MM-DDTHH:mm:ssZ", h = _.z(this), g = this.$H, N = this.$m, k = this.$M, J = n.weekdays, u = n.months, S = n.meridiem, U = function(C, O, ce, le) {
656
- return C && (C[O] || C(i, d)) || ce[O].slice(0, le);
657
- }, pe = function(C) {
658
- return _.s(g % 12 || 12, C, "0");
659
- }, ue = S || function(C, O, ce) {
660
- var le = C < 12 ? "AM" : "PM";
661
- return ce ? le.toLowerCase() : le;
662
- };
663
- return d.replace(x, function(C, O) {
664
- return O || function(ce) {
665
- switch (ce) {
666
- case "YY":
667
- return String(i.$y).slice(-2);
668
- case "YYYY":
669
- return _.s(i.$y, 4, "0");
670
- case "M":
671
- return k + 1;
672
- case "MM":
673
- return _.s(k + 1, 2, "0");
674
- case "MMM":
675
- return U(n.monthsShort, k, u, 3);
676
- case "MMMM":
677
- return U(u, k);
678
- case "D":
679
- return i.$D;
680
- case "DD":
681
- return _.s(i.$D, 2, "0");
682
- case "d":
683
- return String(i.$W);
684
- case "dd":
685
- return U(n.weekdaysMin, i.$W, J, 2);
686
- case "ddd":
687
- return U(n.weekdaysShort, i.$W, J, 3);
688
- case "dddd":
689
- return J[i.$W];
690
- case "H":
691
- return String(g);
692
- case "HH":
693
- return _.s(g, 2, "0");
694
- case "h":
695
- return pe(1);
696
- case "hh":
697
- return pe(2);
698
- case "a":
699
- return ue(g, N, !0);
700
- case "A":
701
- return ue(g, N, !1);
702
- case "m":
703
- return String(N);
704
- case "mm":
705
- return _.s(N, 2, "0");
706
- case "s":
707
- return String(i.$s);
708
- case "ss":
709
- return _.s(i.$s, 2, "0");
710
- case "SSS":
711
- return _.s(i.$ms, 3, "0");
712
- case "Z":
713
- return h;
714
- }
715
- return null;
716
- }(C) || h.replace(":", "");
717
- });
718
- }, r.utcOffset = function() {
719
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
720
- }, r.diff = function(t, i, n) {
721
- var d, h = this, g = _.p(i), N = A(t), k = (N.utcOffset() - this.utcOffset()) * H, J = this - N, u = function() {
722
- return _.m(h, N);
723
- };
724
- switch (g) {
725
- case Z:
726
- d = u() / 12;
727
- break;
728
- case j:
729
- d = u();
730
- break;
731
- case se:
732
- d = u() / 3;
733
- break;
734
- case R:
735
- d = (J - k) / 6048e5;
736
- break;
737
- case Y:
738
- d = (J - k) / 864e5;
739
- break;
740
- case L:
741
- d = J / V;
742
- break;
743
- case P:
744
- d = J / H;
745
- break;
746
- case M:
747
- d = J / p;
748
- break;
749
- default:
750
- d = J;
751
- }
752
- return n ? d : _.a(d);
753
- }, r.daysInMonth = function() {
754
- return this.endOf(j).$D;
755
- }, r.$locale = function() {
756
- return te[this.$L];
757
- }, r.locale = function(t, i) {
758
- if (!t) return this.$L;
759
- var n = this.clone(), d = re(t, i, !0);
760
- return d && (n.$L = d), n;
761
- }, r.clone = function() {
762
- return _.w(this.$d, this);
763
- }, r.toDate = function() {
764
- return new Date(this.valueOf());
765
- }, r.toJSON = function() {
766
- return this.isValid() ? this.toISOString() : null;
767
- }, r.toISOString = function() {
768
- return this.$d.toISOString();
769
- }, r.toString = function() {
770
- return this.$d.toUTCString();
771
- }, l;
772
- }(), ae = B.prototype;
773
- return A.prototype = ae, [["$ms", D], ["$s", M], ["$m", P], ["$H", L], ["$W", Y], ["$M", j], ["$y", Z], ["$D", E]].forEach(function(l) {
774
- ae[l[1]] = function(r) {
775
- return this.$g(r, l[0], l[1]);
776
- };
777
- }), A.extend = function(l, r) {
778
- return l.$i || (l(r, B, A), l.$i = !0), A;
779
- }, A.locale = re, A.isDayjs = ne, A.unix = function(l) {
780
- return A(1e3 * l);
781
- }, A.en = te[Q], A.Ls = te, A.p = {}, A;
782
- });
783
- })(dt);
784
- var Wt = dt.exports;
785
- const Vt = /* @__PURE__ */ st(Wt);
786
- var ft = { exports: {} };
787
- (function(m, c) {
788
- (function(p, H) {
789
- m.exports = H();
790
- })(qe, function() {
791
- var p = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, H = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, V = /\d/, D = /\d\d/, M = /\d\d?/, P = /\d*[^-_:/,()\s\d]+/, L = {}, Y = function(f) {
792
- return (f = +f) + (f > 68 ? 1900 : 2e3);
793
- }, R = function(f) {
794
- return function(x) {
795
- this[f] = +x;
796
- };
797
- }, j = [/[+-]\d\d:?(\d\d)?|Z/, function(f) {
798
- (this.zone || (this.zone = {})).offset = function(x) {
799
- if (!x || x === "Z") return 0;
800
- var I = x.match(/([+-]|\d\d)/g), y = 60 * I[1] + (+I[2] || 0);
801
- return y === 0 ? 0 : I[0] === "+" ? -y : y;
802
- }(f);
803
- }], se = function(f) {
804
- var x = L[f];
805
- return x && (x.indexOf ? x : x.s.concat(x.f));
806
- }, Z = function(f, x) {
807
- var I, y = L.meridiem;
808
- if (y) {
809
- for (var G = 1; G <= 24; G += 1) if (f.indexOf(y(G, 0, x)) > -1) {
810
- I = G > 12;
811
- break;
812
- }
813
- } else I = f === (x ? "pm" : "PM");
814
- return I;
815
- }, E = { A: [P, function(f) {
816
- this.afternoon = Z(f, !1);
817
- }], a: [P, function(f) {
818
- this.afternoon = Z(f, !0);
819
- }], Q: [V, function(f) {
820
- this.month = 3 * (f - 1) + 1;
821
- }], S: [V, function(f) {
822
- this.milliseconds = 100 * +f;
823
- }], SS: [D, function(f) {
824
- this.milliseconds = 10 * +f;
825
- }], SSS: [/\d{3}/, function(f) {
826
- this.milliseconds = +f;
827
- }], s: [M, R("seconds")], ss: [M, R("seconds")], m: [M, R("minutes")], mm: [M, R("minutes")], H: [M, R("hours")], h: [M, R("hours")], HH: [M, R("hours")], hh: [M, R("hours")], D: [M, R("day")], DD: [D, R("day")], Do: [P, function(f) {
828
- var x = L.ordinal, I = f.match(/\d+/);
829
- if (this.day = I[0], x) for (var y = 1; y <= 31; y += 1) x(y).replace(/\[|\]/g, "") === f && (this.day = y);
830
- }], w: [M, R("week")], ww: [D, R("week")], M: [M, R("month")], MM: [D, R("month")], MMM: [P, function(f) {
831
- var x = se("months"), I = (se("monthsShort") || x.map(function(y) {
832
- return y.slice(0, 3);
833
- })).indexOf(f) + 1;
834
- if (I < 1) throw new Error();
835
- this.month = I % 12 || I;
836
- }], MMMM: [P, function(f) {
837
- var x = se("months").indexOf(f) + 1;
838
- if (x < 1) throw new Error();
839
- this.month = x % 12 || x;
840
- }], Y: [/[+-]?\d+/, R("year")], YY: [D, function(f) {
841
- this.year = Y(f);
842
- }], YYYY: [/\d{4}/, R("year")], Z: j, ZZ: j };
843
- function Se(f) {
844
- var x, I;
845
- x = f, I = L && L.formats;
846
- for (var y = (f = x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(A, _, B) {
847
- var ae = B && B.toUpperCase();
848
- return _ || I[B] || p[B] || I[ae].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(l, r, t) {
849
- return r || t.slice(1);
850
- });
851
- })).match(H), G = y.length, Q = 0; Q < G; Q += 1) {
852
- var te = y[Q], he = E[te], ne = he && he[0], re = he && he[1];
853
- y[Q] = re ? { regex: ne, parser: re } : te.replace(/^\[|\]$/g, "");
854
- }
855
- return function(A) {
856
- for (var _ = {}, B = 0, ae = 0; B < G; B += 1) {
857
- var l = y[B];
858
- if (typeof l == "string") ae += l.length;
859
- else {
860
- var r = l.regex, t = l.parser, i = A.slice(ae), n = r.exec(i)[0];
861
- t.call(_, n), A = A.replace(n, "");
862
- }
863
- }
864
- return function(d) {
865
- var h = d.afternoon;
866
- if (h !== void 0) {
867
- var g = d.hours;
868
- h ? g < 12 && (d.hours += 12) : g === 12 && (d.hours = 0), delete d.afternoon;
869
- }
870
- }(_), _;
871
- };
872
- }
873
- return function(f, x, I) {
874
- I.p.customParseFormat = !0, f && f.parseTwoDigitYear && (Y = f.parseTwoDigitYear);
875
- var y = x.prototype, G = y.parse;
876
- y.parse = function(Q) {
877
- var te = Q.date, he = Q.utc, ne = Q.args;
878
- this.$u = he;
879
- var re = ne[1];
880
- if (typeof re == "string") {
881
- var A = ne[2] === !0, _ = ne[3] === !0, B = A || _, ae = ne[2];
882
- _ && (ae = ne[2]), L = this.$locale(), !A && ae && (L = I.Ls[ae]), this.$d = function(i, n, d, h) {
883
- try {
884
- if (["x", "X"].indexOf(n) > -1) return new Date((n === "X" ? 1e3 : 1) * i);
885
- var g = Se(n)(i), N = g.year, k = g.month, J = g.day, u = g.hours, S = g.minutes, U = g.seconds, pe = g.milliseconds, ue = g.zone, C = g.week, O = /* @__PURE__ */ new Date(), ce = J || (N || k ? 1 : O.getDate()), le = N || O.getFullYear(), be = 0;
886
- N && !k || (be = k > 0 ? k - 1 : O.getMonth());
887
- var oe, e = u || 0, a = S || 0, s = U || 0, o = pe || 0;
888
- return ue ? new Date(Date.UTC(le, be, ce, e, a, s, o + 60 * ue.offset * 1e3)) : d ? new Date(Date.UTC(le, be, ce, e, a, s, o)) : (oe = new Date(le, be, ce, e, a, s, o), C && (oe = h(oe).week(C).toDate()), oe);
889
- } catch (b) {
890
- return /* @__PURE__ */ new Date("");
891
- }
892
- }(te, re, he, I), this.init(), ae && ae !== !0 && (this.$L = this.locale(ae).$L), B && te != this.format(re) && (this.$d = /* @__PURE__ */ new Date("")), L = {};
893
- } else if (re instanceof Array) for (var l = re.length, r = 1; r <= l; r += 1) {
894
- ne[1] = re[r - 1];
895
- var t = I.apply(this, ne);
896
- if (t.isValid()) {
897
- this.$d = t.$d, this.$L = t.$L, this.init();
898
- break;
899
- }
900
- r === l && (this.$d = /* @__PURE__ */ new Date(""));
901
- }
902
- else G.call(this, Q);
903
- };
904
- };
905
- });
906
- })(ft);
907
- var Bt = ft.exports;
908
- const Gt = /* @__PURE__ */ st(Bt);
909
- Vt.extend(Gt);
910
- const Ve = (m, c = !1) => {
911
- if (typeof m == "boolean") return m;
912
- if (m == null) return c;
913
- if (typeof m == "number") return m !== 0;
914
- const p = String(m).trim().toLowerCase();
915
- return p === "" ? !0 : p !== "false" && p !== "0";
916
- }, Xt = {
917
- en: {
918
- bannerSlideLabel: "Tournament {index} of {total}",
919
- bannerGoToSlide: "Go to tournament {index}"
920
- },
921
- tr: {
922
- bannerSlideLabel: "Turnuva {index} / {total}",
923
- bannerGoToSlide: "{index}. turnuvaya git"
924
- },
925
- da: {
926
- bannerSlideLabel: "Turnering {index} af {total}",
927
- bannerGoToSlide: "Gå til turnering {index}"
928
- }
929
- }, qt = 5e3, Zt = 1e3, Qt = !0, Jt = !0, Kt = !0, en = !0;
930
- var tn = Ne('<div class="tournaments-banner svelte-h8hbcz"><div class="tournaments-banner__skeleton svelte-h8hbcz" aria-busy="true"></div></div>'), nn = Ne('<a class="tournaments-banner__slide svelte-h8hbcz"><!></a>'), rn = Ne('<button type="button"></button>'), an = Ne('<div class="tournaments-banner__dots svelte-h8hbcz"></div>'), on = Ne('<div class="tournaments-banner svelte-h8hbcz" role="region" aria-roledescription="carousel"><div class="tournaments-banner__track svelte-h8hbcz"></div> <!></div>');
931
- const sn = {
932
- hash: "svelte-h8hbcz",
933
- code: `.tournaments-banner.svelte-h8hbcz {display:flex;flex-direction:column;gap:8px;.tournaments-banner__track:where(.svelte-h8hbcz) {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.tournaments-banner__slide:where(.svelte-h8hbcz) {display:block;flex:0 0 100%;color:inherit;text-decoration:none;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;cursor:pointer;&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:-2px;border-radius:13px;}}.tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:308px;border-radius:13px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
934
- animation: svelte-h8hbcz-tournaments-banner-pulse 1.5s ease-in-out infinite;}.tournaments-banner__dots:where(.svelte-h8hbcz) {display:flex;justify-content:center;gap:8px;}.tournaments-banner__dot:where(.svelte-h8hbcz) {width:8px;height:8px;padding:0;border:0;border-radius:50%;background:var(--text-subtle, rgba(223, 227, 232, 1));opacity:0.8;cursor:pointer;&.active {background:var(--text-brand, rgba(255, 204, 0, 1));opacity:1;}&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:2px;}}}
935
-
936
- @keyframes svelte-h8hbcz-tournaments-banner-pulse {
937
- 50% {
938
- opacity: 0.4;
939
- }
940
- }
941
-
942
- @media (max-width: 767px) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:160px;}
943
- }
944
-
945
- @media (prefers-reduced-motion: reduce) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__track:where(.svelte-h8hbcz) {scroll-behavior:auto;}.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {
946
- animation: none;}
947
- }`
948
- };
949
- function ht(m, c) {
950
- ct(c, !0), St(m, sn);
951
- const p = () => Rt(Ht, "$_", H), [H, V] = Lt(), D = K(c, "endpoint"), M = K(c, "language", 7, "en"), P = K(c, "session"), L = K(c, "platform"), Y = K(c, "translationurl"), R = K(c, "navigationhref", 7, ""), j = K(c, "enableautoplay", 7, void 0), se = K(c, "autoplayinterval", 7, void 0), Z = K(c, "pauseoninteraction", 7, void 0), E = K(c, "loop", 7, void 0), Se = K(c, "showdots", 7, void 0);
952
- Dt({ withLocale: "en", translations: {} }), Mt(Xt), tt(M()), Et(() => {
953
- Y() && At(Y());
954
- }), Pe(() => {
955
- tt(M());
956
- });
957
- let f = $e(xt([])), x = $e(!0), I = $e(0), y = $e(null), G = $e(!1), Q = $e(!1), te = $e(!1), he = $e(!1), ne = $e(!1);
958
- const re = Ye(() => Ve(j(), Qt)), A = Ye(() => Ve(Z(), Jt)), _ = Ye(() => Ve(E(), Kt)), B = Ye(() => Ve(Se(), en)), ae = Ye(() => Number(se()) > 0 ? Math.max(Number(se()), Zt) : qt), l = (u) => `${R().replace(/\/$/, "")}/${u.id}`;
959
- Pe(() => {
960
- const u = {
961
- endpoint: D(),
962
- language: M(),
963
- session: P(),
964
- platform: L()
965
- };
966
- if (!u.endpoint)
967
- return;
968
- let S = !1;
969
- return ve(x, !0), Ut(u).then((U) => {
970
- S || (ve(f, U, !0), ve(I, 0));
971
- }).catch((U) => {
972
- console.log(U), S || ve(f, [], !0);
973
- }).finally(() => {
974
- S || ve(x, !1);
975
- }), () => {
976
- S = !0;
977
- };
978
- }), Pe(() => {
979
- const u = window.matchMedia("(prefers-reduced-motion: reduce)"), S = () => {
980
- ve(ne, u.matches, !0);
981
- }, U = () => {
982
- ve(he, document.visibilityState === "hidden");
983
- };
984
- return S(), U(), u.addEventListener("change", S), document.addEventListener("visibilitychange", U), () => {
985
- u.removeEventListener("change", S), document.removeEventListener("visibilitychange", U);
986
- };
987
- }), Pe(() => {
988
- const u = T(I), S = T(f).length, U = T(A) && (T(G) || T(Q) || T(te)), pe = u >= S - 1;
989
- if (!T(re) || S < 2 || U || T(he) || T(ne) || pe && !T(_))
990
- return;
991
- const ue = setTimeout(() => t((u + 1) % S), T(ae));
992
- return () => clearTimeout(ue);
993
- });
994
- const r = () => {
995
- !T(y) || !T(y).clientWidth || ve(I, Math.round(T(y).scrollLeft / T(y).clientWidth), !0);
996
- }, t = (u) => {
997
- var S;
998
- (S = T(y)) == null || S.scrollTo({ left: u * T(y).clientWidth, behavior: "smooth" });
999
- }, i = (u) => {
1000
- ve(Q, u.target.matches(":focus-visible"), !0);
1001
- }, n = (u, S) => {
1002
- R() || (u.preventDefault(), kt(S));
1003
- };
1004
- var d = {
1005
- get endpoint() {
1006
- return D();
1007
- },
1008
- set endpoint(u) {
1009
- D(u), ee();
1010
- },
1011
- get language() {
1012
- return M();
1013
- },
1014
- set language(u = "en") {
1015
- M(u), ee();
1016
- },
1017
- get session() {
1018
- return P();
1019
- },
1020
- set session(u) {
1021
- P(u), ee();
1022
- },
1023
- get platform() {
1024
- return L();
1025
- },
1026
- set platform(u) {
1027
- L(u), ee();
1028
- },
1029
- get translationurl() {
1030
- return Y();
1031
- },
1032
- set translationurl(u) {
1033
- Y(u), ee();
1034
- },
1035
- get navigationhref() {
1036
- return R();
1037
- },
1038
- set navigationhref(u = "") {
1039
- R(u), ee();
1040
- },
1041
- get enableautoplay() {
1042
- return j();
1043
- },
1044
- set enableautoplay(u = void 0) {
1045
- j(u), ee();
1046
- },
1047
- get autoplayinterval() {
1048
- return se();
1049
- },
1050
- set autoplayinterval(u = void 0) {
1051
- se(u), ee();
1052
- },
1053
- get pauseoninteraction() {
1054
- return Z();
1055
- },
1056
- set pauseoninteraction(u = void 0) {
1057
- Z(u), ee();
1058
- },
1059
- get loop() {
1060
- return E();
1061
- },
1062
- set loop(u = void 0) {
1063
- E(u), ee();
1064
- },
1065
- get showdots() {
1066
- return Se();
1067
- },
1068
- set showdots(u = void 0) {
1069
- Se(u), ee();
1070
- }
1071
- }, h = Ot(), g = $t(h);
1072
- {
1073
- var N = (u) => {
1074
- var S = tn();
1075
- Fe(u, S);
1076
- }, k = (u) => {
1077
- var S = on(), U = rt(S);
1078
- at(U, 23, () => T(f), (C) => C.id, (C, O, ce) => {
1079
- var le = nn(), be = rt(le);
1080
- {
1081
- let oe = Ye(() => T(ce) === 0);
1082
- It(be, {
1083
- variant: "banner",
1084
- get priority() {
1085
- return T(oe);
1086
- },
1087
- get src() {
1088
- return T(O).thumbnail;
1089
- },
1090
- get alt() {
1091
- return T(O).nameOrTitle;
1092
- },
1093
- get state() {
1094
- return T(O).state;
1095
- },
1096
- get startTime() {
1097
- return T(O).startTime;
1098
- },
1099
- get endTime() {
1100
- return T(O).endTime;
1101
- },
1102
- get language() {
1103
- return M();
1104
- }
1105
- });
1106
- }
1107
- je(le), ot(
1108
- (oe, e) => {
1109
- We(le, "href", oe), We(le, "aria-label", e);
1110
- },
1111
- [
1112
- () => R() ? l(T(O)) : "#",
1113
- () => `${T(O).nameOrTitle} – ${p()("bannerSlideLabel", {
1114
- values: { index: T(ce) + 1, total: T(f).length }
1115
- })}`
1116
- ]
1117
- ), Re("click", le, (oe) => n(oe, T(O))), Fe(C, le);
1118
- }), je(U), Ct(U, (C) => ve(y, C), () => T(y));
1119
- var pe = Ft(U, 2);
1120
- {
1121
- var ue = (C) => {
1122
- var O = an();
1123
- at(O, 23, () => T(f), (ce) => ce.id, (ce, le, be) => {
1124
- var oe = rn();
1125
- let e;
1126
- ot(
1127
- (a) => {
1128
- e = Yt(oe, 1, "tournaments-banner__dot svelte-h8hbcz", null, e, { active: T(be) === T(I) }), We(oe, "aria-label", a), We(oe, "aria-current", T(be) === T(I) ? "true" : void 0);
1129
- },
1130
- [
1131
- () => p()("bannerGoToSlide", { values: { index: T(be) + 1 } })
1132
- ]
1133
- ), Re("click", oe, () => t(T(be))), Fe(ce, oe);
1134
- }), je(O), Fe(C, O);
1135
- };
1136
- nt(pe, (C) => {
1137
- T(B) && T(f).length > 1 && C(ue);
1138
- });
1139
- }
1140
- je(S), Ue("mouseenter", S, () => ve(G, !0)), Ue("mouseleave", S, () => ve(G, !1)), Re("focusin", S, i), Re("focusout", S, () => ve(Q, !1)), Re("touchstart", S, () => ve(te, !0)), Re("touchend", S, () => ve(te, !1)), Ue("touchcancel", S, () => ve(te, !1)), Ue("scroll", U, r), Fe(u, S);
1141
- };
1142
- nt(g, (u) => {
1143
- T(x) ? u(N) : T(f).length && u(k, 1);
1144
- });
1145
- }
1146
- Fe(m, h);
1147
- var J = lt(d);
1148
- return V(), J;
1149
- }
1150
- Tt(["focusin", "focusout", "touchstart", "touchend", "click"]);
1151
- ut(
1152
- ht,
1153
- {
1154
- endpoint: {},
1155
- language: {},
1156
- session: {},
1157
- platform: {},
1158
- translationurl: {},
1159
- navigationhref: {},
1160
- enableautoplay: {},
1161
- autoplayinterval: {},
1162
- pauseoninteraction: {},
1163
- loop: {},
1164
- showdots: {}
1165
- },
1166
- [],
1167
- [],
1168
- { mode: "open" }
1169
- );
1170
- function vt(m, c) {
1171
- ct(c, !0);
1172
- let p = K(c, "endpoint"), H = K(c, "language", 7, "en"), V = K(c, "session"), D = K(c, "platform"), M = K(c, "translationurl"), P = K(c, "navigationhref"), L = K(c, "enableautoplay"), Y = K(c, "autoplayinterval"), R = K(c, "pauseoninteraction"), j = K(c, "loop"), se = K(c, "showdots");
1173
- var Z = {
1174
- get endpoint() {
1175
- return p();
1176
- },
1177
- set endpoint(E) {
1178
- p(E), ee();
1179
- },
1180
- get language() {
1181
- return H();
1182
- },
1183
- set language(E = "en") {
1184
- H(E), ee();
1185
- },
1186
- get session() {
1187
- return V();
1188
- },
1189
- set session(E) {
1190
- V(E), ee();
1191
- },
1192
- get platform() {
1193
- return D();
1194
- },
1195
- set platform(E) {
1196
- D(E), ee();
1197
- },
1198
- get translationurl() {
1199
- return M();
1200
- },
1201
- set translationurl(E) {
1202
- M(E), ee();
1203
- },
1204
- get navigationhref() {
1205
- return P();
1206
- },
1207
- set navigationhref(E) {
1208
- P(E), ee();
1209
- },
1210
- get enableautoplay() {
1211
- return L();
1212
- },
1213
- set enableautoplay(E) {
1214
- L(E), ee();
1215
- },
1216
- get autoplayinterval() {
1217
- return Y();
1218
- },
1219
- set autoplayinterval(E) {
1220
- Y(E), ee();
1221
- },
1222
- get pauseoninteraction() {
1223
- return R();
1224
- },
1225
- set pauseoninteraction(E) {
1226
- R(E), ee();
1227
- },
1228
- get loop() {
1229
- return j();
1230
- },
1231
- set loop(E) {
1232
- j(E), ee();
1233
- },
1234
- get showdots() {
1235
- return se();
1236
- },
1237
- set showdots(E) {
1238
- se(E), ee();
1239
- }
1240
- };
1241
- return ht(m, {
1242
- get endpoint() {
1243
- return p();
1244
- },
1245
- get language() {
1246
- return H();
1247
- },
1248
- get session() {
1249
- return V();
1250
- },
1251
- get platform() {
1252
- return D();
1253
- },
1254
- get translationurl() {
1255
- return M();
1256
- },
1257
- get navigationhref() {
1258
- return P();
1259
- },
1260
- get enableautoplay() {
1261
- return L();
1262
- },
1263
- get autoplayinterval() {
1264
- return Y();
1265
- },
1266
- get pauseoninteraction() {
1267
- return R();
1268
- },
1269
- get loop() {
1270
- return j();
1271
- },
1272
- get showdots() {
1273
- return se();
1274
- }
1275
- }), lt(Z);
1276
- }
1277
- customElements.define("tournaments-banner", ut(
1278
- vt,
1279
- {
1280
- endpoint: {},
1281
- language: {},
1282
- session: {},
1283
- platform: {},
1284
- translationurl: {},
1285
- navigationhref: {},
1286
- enableautoplay: {},
1287
- autoplayinterval: {},
1288
- pauseoninteraction: {},
1289
- loop: {},
1290
- showdots: {}
1291
- },
1292
- [],
1293
- []
1294
- ));
1295
- const dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1296
- __proto__: null,
1297
- default: vt
1298
- }, Symbol.toStringTag, { value: "Module" }));
1299
- export {
1300
- ht as T,
1301
- dn as a
1302
- };