@everymatrix/tournament-details-page 0.1.2 → 0.1.3

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,20 +1,20 @@
1
- var ge = (A, p, m) => new Promise((te, C) => {
1
+ var ge = (A, p, m) => new Promise((te, H) => {
2
2
  var L = (f) => {
3
3
  try {
4
4
  y(m.next(f));
5
5
  } catch (B) {
6
- C(B);
6
+ H(B);
7
7
  }
8
8
  }, z = (f) => {
9
9
  try {
10
10
  y(m.throw(f));
11
11
  } catch (B) {
12
- C(B);
12
+ H(B);
13
13
  }
14
14
  }, y = (f) => f.done ? te(f.value) : Promise.resolve(f.value).then(L, z);
15
15
  y((m = m.apply(A, p)).next());
16
16
  });
17
- import { a as Je, $ as Ke, p as Xe, b as Qe, d as w, u as Ve, e as be, j as W, L as Ye, P as Ze, w as k, i as M, g as a, t as D, y as P, H as E, f as c, h as $e, C as et, D as tt, s as at, k as _, m as T, n as l, v as Y, z as Z, q as $, r as ee, x, l as pe, A as nt, B as ot, E as i, N as he } from "./TournamentDetailsPage-CqwgEfgR.js";
17
+ import { a as Je, $ as Ke, p as Xe, b as Qe, d as w, u as Ve, e as be, j as W, L as Ye, P as Ze, w as k, i as M, g as a, t as D, y as P, H as E, f as c, h as $e, C as et, D as tt, s as at, k as _, m as T, n as l, v as Y, z as Z, q as $, r as ee, x, l as pe, A as nt, B as ot, E as i, N as he } from "./TournamentDetailsPage-B2IgC41f.js";
18
18
  function _e(A, p) {
19
19
  Je(A, p);
20
20
  }
@@ -43,7 +43,7 @@ const ye = {
43
43
  noAvailableGames: "Henüz oyun yapılandırılmamış!"
44
44
  }
45
45
  }, rt = () => typeof window == "undefined";
46
- var st = x('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), it = x('<p class="svelte-p7mf8l"> </p>'), lt = x("<div></div>"), pt = x('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), mt = x("<p> </p>"), ct = x('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'), vt = x('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), ut = x("<button> </button>"), dt = x('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'), ft = x('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationSkeletonButton svelte-p7mf8l"></div></div>'), gt = x('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');
46
+ var st = x('<div class="TournamentGamesTabs svelte-p7mf8l"><button> </button> <button> </button></div>'), it = x('<p class="svelte-p7mf8l"> </p>'), lt = x("<div></div>"), pt = x('<div class="TournamentGameThumbnailSkeleton svelte-p7mf8l"></div>'), mt = x("<p> </p>"), ct = x('<div class="TournamentGameThumbnail svelte-p7mf8l"><div class="ImageContainer svelte-p7mf8l"><img class="svelte-p7mf8l"/> <div class="PlayButtonOverlay svelte-p7mf8l"><button class="PlayGameButton svelte-p7mf8l"> </button></div></div></div>'), ut = x('<span class="PaginationButton Elipsis svelte-p7mf8l">...</span>'), vt = x("<button> </button>"), dt = x('<div><button class="PaginationButton svelte-p7mf8l"> </button> <div class="PageNumberWrapper svelte-p7mf8l"></div> <button class="PaginationButton svelte-p7mf8l"> </button></div>'), ft = x('<div class="PaginationSkeleton svelte-p7mf8l"><div class="PaginationSkeletonButton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationNumberSkeleton svelte-p7mf8l"></div> <div class="PaginationSkeletonButton svelte-p7mf8l"></div></div>'), gt = x('<div class="TournamentGamesWrapper svelte-p7mf8l"><div class="GamesDescription svelte-p7mf8l"><p class="GamesDescriptionTitle svelte-p7mf8l"> </p> <p class="GamesDescriptionSubTitle svelte-p7mf8l"> </p></div> <!> <!> <div><!></div> <!> <!></div>');
47
47
  const bt = {
48
48
  hash: "svelte-p7mf8l",
49
49
  code: `.svelte-p7mf8l,
@@ -72,12 +72,15 @@ const bt = {
72
72
 
73
73
  @media (min-width: 750px) {.TournamentGamesTabs.svelte-p7mf8l {width:fit-content;}.PaginationWrapper.svelte-p7mf8l, .PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;}.PaginationButton.svelte-p7mf8l {min-width:75px;}.PaginationSkeleton.svelte-p7mf8l {justify-content:end;gap:10px;.PaginationSkeletonButton:where(.svelte-p7mf8l) {width:auto;min-width:55px;}.PaginationNumberSkeleton:where(.svelte-p7mf8l) {width:35px;}}
74
74
 
75
- }.Hidden.svelte-p7mf8l {display:none;}`
75
+ }
76
+
77
+ @media (max-width: 475px) {.TournamentGamesContainer.svelte-p7mf8l {gap:5px;grid-template-columns:repeat(auto-fill, minmax(min(150px, 100%), 1fr));}
78
+ }.Hidden.svelte-p7mf8l {display:none;}`
76
79
  };
77
80
  function ht(A, p) {
78
81
  var fe;
79
82
  Xe(p, !0), Qe(A, bt);
80
- const m = () => et(tt, "$_", te), [te, C] = at(), L = w(p, "initialGames"), z = w(p, "endpoint"), y = w(p, "language", 7, "en"), f = w(p, "session"), B = w(p, "tournamentid"), g = w(p, "gamesLimit", 7, 6), O = w(p, "totalGames"), ae = w(p, "platformProp", 7, null), R = w(p, "tournamentMetadata"), I = w(p, "translationurl"), we = () => {
83
+ const m = () => et(tt, "$_", te), [te, H] = at(), L = w(p, "initialGames"), z = w(p, "endpoint"), y = w(p, "language", 7, "en"), f = w(p, "session"), B = w(p, "tournamentid"), g = w(p, "gamesLimit", 7, 6), O = w(p, "totalGames"), ae = w(p, "platformProp", 7, null), R = w(p, "tournamentMetadata"), I = w(p, "translationurl"), we = () => {
81
84
  let e = new URL(I());
82
85
  fetch(e.href).then((t) => t.json()).then((t) => {
83
86
  Object.keys(t).forEach((n) => {
@@ -229,10 +232,10 @@ function ht(A, p) {
229
232
  var r = k(n, 2);
230
233
  let s;
231
234
  r.__click = () => _(N, "sports");
232
- var v = l(r, !0);
235
+ var u = l(r, !0);
233
236
  i(r), i(t), D(
234
- (h, u) => {
235
- o = E(n, 1, "Tab svelte-p7mf8l", null, o, { Active: a(N) === "casino" }), P(d, h), s = E(r, 1, "Tab svelte-p7mf8l", null, s, { Active: a(N) === "sports" }), P(v, u);
237
+ (h, v) => {
238
+ o = E(n, 1, "Tab svelte-p7mf8l", null, o, { Active: a(N) === "casino" }), P(d, h), s = E(r, 1, "Tab svelte-p7mf8l", null, s, { Active: a(N) === "sports" }), P(u, v);
236
239
  },
237
240
  [() => m()("casinoTab"), () => m()("sportsbookTab")]
238
241
  ), c(e, t);
@@ -241,55 +244,55 @@ function ht(A, p) {
241
244
  Object.keys(R()).length !== 0 && e(Oe);
242
245
  });
243
246
  }
244
- var ve = k(ce, 2);
247
+ var ue = k(ce, 2);
245
248
  {
246
249
  var Re = (e) => {
247
250
  var t = lt();
248
251
  let n;
249
252
  Y(t, 21, () => a(F), Z, (o, d) => {
250
253
  var r = it(), s = l(r);
251
- i(r), D((v) => {
254
+ i(r), D((u) => {
252
255
  var h;
253
- return P(s, `${(h = a(d).rule) != null ? h : ""} ${v != null ? v : ""}`);
256
+ return P(s, `${(h = a(d).rule) != null ? h : ""} ${u != null ? u : ""}`);
254
257
  }, [() => m()("contribution")]), c(o, r);
255
258
  }), i(t), D(() => n = E(t, 1, "TournamentRulesWrapper svelte-p7mf8l", null, n, { Hidden: a(N) === "casino" })), c(e, t);
256
259
  };
257
- M(ve, (e) => {
260
+ M(ue, (e) => {
258
261
  a(F) && e(Re);
259
262
  });
260
263
  }
261
- var K = k(ve, 2);
262
- let ue;
264
+ var K = k(ue, 2);
265
+ let ve;
263
266
  var We = l(K);
264
267
  {
265
268
  var ze = (e) => {
266
269
  var t = $(), n = ee(t);
267
270
  Y(n, 17, () => Array(g()), Z, (o, d, r, s) => {
268
- var v = pt();
269
- c(o, v);
271
+ var u = pt();
272
+ c(o, u);
270
273
  }), c(e, t);
271
- }, He = (e) => {
274
+ }, Ce = (e) => {
272
275
  var t = $(), n = ee(t);
273
276
  {
274
277
  var o = (r) => {
275
278
  var s = mt();
276
- let v;
279
+ let u;
277
280
  var h = l(s, !0);
278
281
  i(s), D(
279
- (u) => {
280
- v = E(s, 1, "NoGamesAvailable svelte-p7mf8l", null, v, { Hidden: a(N) === "sports" }), P(h, u);
282
+ (v) => {
283
+ u = E(s, 1, "NoGamesAvailable svelte-p7mf8l", null, u, { Hidden: a(N) === "sports" }), P(h, v);
281
284
  },
282
285
  [() => m()("noAvailableGames")]
283
286
  ), c(r, s);
284
287
  }, d = (r) => {
285
- var s = $(), v = ee(s);
286
- Y(v, 17, () => a(Ne), Z, (h, u) => {
288
+ var s = $(), u = ee(s);
289
+ Y(u, 17, () => a(Ne), Z, (h, v) => {
287
290
  var j = ct();
288
- j.__click = () => je(a(u));
289
- var X = l(j), H = l(X), Q = k(H, 2), G = l(Q), S = l(G, !0);
291
+ j.__click = () => je(a(v));
292
+ var X = l(j), C = l(X), Q = k(C, 2), G = l(Q), S = l(G, !0);
290
293
  i(G), i(Q), i(X), i(j), D(
291
294
  (V) => {
292
- he(H, "src", `https:${a(u).thumbnail}`), he(H, "alt", a(u).name), P(S, V);
295
+ he(C, "src", `https:${a(v).thumbnail}`), he(C, "alt", a(v).name), P(S, V);
293
296
  },
294
297
  [() => m()("play")]
295
298
  ), c(h, j);
@@ -307,13 +310,13 @@ function ht(A, p) {
307
310
  c(e, t);
308
311
  };
309
312
  M(We, (e) => {
310
- a(U) ? e(ze) : e(He, !1);
313
+ a(U) ? e(ze) : e(Ce, !1);
311
314
  });
312
315
  }
313
316
  i(K);
314
317
  var de = k(K, 2);
315
318
  {
316
- var Ce = (e) => {
319
+ var He = (e) => {
317
320
  var t = dt();
318
321
  let n;
319
322
  var o = l(t);
@@ -321,39 +324,39 @@ function ht(A, p) {
321
324
  var d = l(o, !0);
322
325
  i(o);
323
326
  var r = k(o, 2);
324
- Y(r, 21, () => a(Be), Z, (h, u) => {
327
+ Y(r, 21, () => a(Be), Z, (h, v) => {
325
328
  var j = $(), X = ee(j);
326
329
  {
327
- var H = (G) => {
328
- var S = vt();
330
+ var C = (G) => {
331
+ var S = ut();
329
332
  c(G, S);
330
333
  }, Q = (G) => {
331
- var S = ut();
334
+ var S = vt();
332
335
  let V;
333
- S.__click = () => Ae(a(u));
336
+ S.__click = () => Ae(a(v));
334
337
  var qe = l(S, !0);
335
338
  i(S), D(() => {
336
- V = E(S, 1, "PaginationButton Number svelte-p7mf8l", null, V, { Active: a(u) === a(J) }), P(qe, a(u));
339
+ V = E(S, 1, "PaginationButton Number svelte-p7mf8l", null, V, { Active: a(v) === a(J) }), P(qe, a(v));
337
340
  }), c(G, S);
338
341
  };
339
342
  M(X, (G) => {
340
- typeof a(u) != "number" ? G(H) : G(Q, !1);
343
+ typeof a(v) != "number" ? G(C) : G(Q, !1);
341
344
  });
342
345
  }
343
346
  c(h, j);
344
347
  }), i(r);
345
348
  var s = k(r, 2);
346
349
  s.__click = Ge;
347
- var v = l(s, !0);
350
+ var u = l(s, !0);
348
351
  i(s), i(t), D(
349
- (h, u) => {
350
- n = E(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(N) === "sports" }), o.disabled = a(b) === 0, P(d, h), s.disabled = a(b) >= O() - g(), P(v, u);
352
+ (h, v) => {
353
+ n = E(t, 1, "PaginationWrapper svelte-p7mf8l", null, n, { Hidden: a(N) === "sports" }), o.disabled = a(b) === 0, P(d, h), s.disabled = a(b) >= O() - g(), P(u, v);
351
354
  },
352
355
  [() => m()("previousButton"), () => m()("nextButton")]
353
356
  ), c(e, t);
354
357
  };
355
358
  M(de, (e) => {
356
- a(q) && O() > g() && e(Ce);
359
+ a(q) && O() > g() && e(He);
357
360
  });
358
361
  }
359
362
  var Ie = k(de, 2);
@@ -368,7 +371,7 @@ function ht(A, p) {
368
371
  }
369
372
  i(se), D(
370
373
  (e, t) => {
371
- P(Ee, e), P(Le, t), ue = E(K, 1, "TournamentGamesContainer svelte-p7mf8l", null, ue, { Hidden: a(N) === "sports" });
374
+ P(Ee, e), P(Le, t), ve = E(K, 1, "TournamentGamesContainer svelte-p7mf8l", null, ve, { Hidden: a(N) === "sports" });
372
375
  },
373
376
  [
374
377
  () => m()("gamesDescriptionTitle"),
@@ -376,7 +379,7 @@ function ht(A, p) {
376
379
  ]
377
380
  ), c(A, se);
378
381
  var Fe = $e(Me);
379
- return C(), Fe;
382
+ return H(), Fe;
380
383
  }
381
384
  nt(["click"]);
382
385
  customElements.define("tournament-games", ot(
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetailsPage-BYR2IdA-.cjs");function He(oe,X){e.addMessages(oe,X)}function Me(oe){e.$locale.set(oe)}const Ue={en:{rank:"Rank",user:"User",points:"Points",prize:"Prize",notEnrolledRank:"You are currently not enrolled in this tournament.",leaderboardNotAvailable:"Leaderboard will be available soon.",myRanking:"My Ranking",showMore:"Show More",showLess:"Show Less",emptyLeaderboard:"Currently there are no players enrolled in this tournament",joinButton:"Join",previousButton:"Previous",nextButton:"Next"},tr:{rank:"Sıralama",user:"Kullanıcı",points:"Puan",prize:"Ödül",notEnrolledRank:"Şu anda bu turnuvaya kayıtlı değilsiniz.",leaderboardNotAvailable:"Liderlik tablosu yakında kullanıma sunulacak.",myRanking:"Sıralamam",showMore:"Daha Fazla Göster",showLess:"Daha Az Göster",emptyLeaderboard:"Şu anda bu turnuvaya kayıtlı oyuncu bulunmuyor.",joinButton:"Katıl",previousButton:"Önceki",nextButton:"Sonraki"}};var Ie={exports:{}};/** @license
2
+ * eventsource.js
3
+ * Available under MIT License (MIT)
4
+ * https://github.com/Yaffle/EventSource/
5
+ */(function(oe,X){(function(w){var K=w.setTimeout,se=w.clearTimeout,C=w.XMLHttpRequest,Q=w.XDomainRequest,Y=w.ActiveXObject,Z=w.EventSource,H=w.document,ge=w.Promise,ie=w.fetch,Ae=w.Response,me=w.TextDecoder,G=w.TextEncoder,le=w.AbortController;if(typeof window!="undefined"&&typeof H!="undefined"&&!("readyState"in H)&&H.body==null&&(H.readyState="loading",window.addEventListener("load",function(t){H.readyState="complete"},!1)),C==null&&Y!=null&&(C=function(){return new Y("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(t){function a(){}return a.prototype=t,new a}),Date.now||(Date.now=function(){return new Date().getTime()}),le==null){var xe=ie;ie=function(t,a){var o=a.signal;return xe(t,{headers:a.headers,credentials:a.credentials,cache:a.cache}).then(function(n){var d=n.body.getReader();return o._reader=d,o._aborted&&o._reader.cancel(),{status:n.status,statusText:n.statusText,headers:n.headers,body:{getReader:function(){return d}}}})},le=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function ye(){this.bitsNeeded=0,this.codePoint=0}ye.prototype.decode=function(t){function a(g,_,c){if(c===1)return g>=128>>_&&g<<_<=2047;if(c===2)return g>=2048>>_&&g<<_<=55295||g>=57344>>_&&g<<_<=65535;if(c===3)return g>=65536>>_&&g<<_<=1114111;throw new Error}function o(g,_){if(g===6*1)return _>>6>15?3:_>31?2:1;if(g===6*2)return _>15?3:2;if(g===6*3)return 3;throw new Error}for(var n=65533,d="",l=this.bitsNeeded,h=this.codePoint,x=0;x<t.length;x+=1){var f=t[x];l!==0&&(f<128||f>191||!a(h<<6|f&63,l-6,o(l,h)))&&(l=0,h=n,d+=String.fromCharCode(h)),l===0?(f>=0&&f<=127?(l=0,h=f):f>=192&&f<=223?(l=6*1,h=f&31):f>=224&&f<=239?(l=6*2,h=f&15):f>=240&&f<=247?(l=6*3,h=f&7):(l=0,h=n),l!==0&&!a(h,l,o(l,h))&&(l=0,h=n)):(l-=6,h=h<<6|f&63),l===0&&(h<=65535?d+=String.fromCharCode(h):(d+=String.fromCharCode(55296+(h-65535-1>>10)),d+=String.fromCharCode(56320+(h-65535-1&1023))))}return this.bitsNeeded=l,this.codePoint=h,d};var de=function(){try{return new me().decode(new G().encode("test"),{stream:!0})==="test"}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1};(me==null||G==null||!de())&&(me=ye);var B=function(){};function R(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=B,this.onload=B,this.onerror=B,this.onreadystatechange=B,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=B}R.prototype.open=function(t,a){this._abort(!0);var o=this,n=this._xhr,d=1,l=0;this._abort=function(c){o._sendTimeout!==0&&(se(o._sendTimeout),o._sendTimeout=0),(d===1||d===2||d===3)&&(d=4,n.onload=B,n.onerror=B,n.onabort=B,n.onprogress=B,n.onreadystatechange=B,n.abort(),l!==0&&(se(l),l=0),c||(o.readyState=4,o.onabort(null),o.onreadystatechange())),d=0};var h=function(){if(d===1){var c=0,r="",s=void 0;if("contentType"in n)c=200,r="OK",s=n.contentType;else try{c=n.status,r=n.statusText,s=n.getResponseHeader("Content-Type")}catch(i){c=0,r="",s=void 0}c!==0&&(d=2,o.readyState=2,o.status=c,o.statusText=r,o._contentType=s,o.onreadystatechange())}},x=function(){if(h(),d===2||d===3){d=3;var c="";try{c=n.responseText}catch(r){}o.readyState=3,o.responseText=c,o.onprogress()}},f=function(c,r){if((r==null||r.preventDefault==null)&&(r={preventDefault:B}),x(),d===1||d===2||d===3){if(d=4,l!==0&&(se(l),l=0),o.readyState=4,c==="load")o.onload(r);else if(c==="error")o.onerror(r);else if(c==="abort")o.onabort(r);else throw new TypeError;o.onreadystatechange()}},g=function(c){n!=null&&(n.readyState===4?(!("onload"in n)||!("onerror"in n)||!("onabort"in n))&&f(n.responseText===""?"error":"load",c):n.readyState===3?"onprogress"in n||x():n.readyState===2&&h())},_=function(){l=K(function(){_()},500),n.readyState===3&&x()};"onload"in n&&(n.onload=function(c){f("load",c)}),"onerror"in n&&(n.onerror=function(c){f("error",c)}),"onabort"in n&&(n.onabort=function(c){f("abort",c)}),"onprogress"in n&&(n.onprogress=x),"onreadystatechange"in n&&(n.onreadystatechange=function(c){g(c)}),("contentType"in n||!("ontimeout"in C.prototype))&&(a+=(a.indexOf("?")===-1?"?":"&")+"padding=true"),n.open(t,a,!0),"readyState"in n&&(l=K(function(){_()},0))},R.prototype.abort=function(){this._abort(!1)},R.prototype.getResponseHeader=function(t){return this._contentType},R.prototype.setRequestHeader=function(t,a){var o=this._xhr;"setRequestHeader"in o&&o.setRequestHeader(t,a)},R.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},R.prototype.send=function(){if((!("ontimeout"in C.prototype)||!("sendAsBinary"in C.prototype)&&!("mozAnon"in C.prototype))&&H!=null&&H.readyState!=null&&H.readyState!=="complete"){var t=this;t._sendTimeout=K(function(){t._sendTimeout=0,t.send()},4);return}var a=this._xhr;"withCredentials"in a&&(a.withCredentials=this.withCredentials);try{a.send(void 0)}catch(o){throw o}};function M(t){return t.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)+32)})}function he(t){for(var a=Object.create(null),o=t.split(`\r
6
+ `),n=0;n<o.length;n+=1){var d=o[n],l=d.split(": "),h=l.shift(),x=l.join(": ");a[M(h)]=x}this._map=a}he.prototype.get=function(t){return this._map[M(t)]},C!=null&&C.HEADERS_RECEIVED==null&&(C.HEADERS_RECEIVED=2);function ce(){}ce.prototype.open=function(t,a,o,n,d,l,h){t.open("GET",d);var x=0;t.onprogress=function(){var g=t.responseText,_=g.slice(x);x+=_.length,o(_)},t.onerror=function(g){g.preventDefault(),n(new Error("NetworkError"))},t.onload=function(){n(null)},t.onabort=function(){n(null)},t.onreadystatechange=function(){if(t.readyState===C.HEADERS_RECEIVED){var g=t.status,_=t.statusText,c=t.getResponseHeader("Content-Type"),r=t.getAllResponseHeaders();a(g,_,c,new he(r))}},t.withCredentials=l;for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&t.setRequestHeader(f,h[f]);return t.send(),t};function je(t){this._headers=t}je.prototype.get=function(t){return this._headers.get(t)};function fe(){}fe.prototype.open=function(t,a,o,n,d,l,h){var x=null,f=new le,g=f.signal,_=new me;return ie(d,{headers:h,credentials:l?"include":"same-origin",signal:g,cache:"no-store"}).then(function(c){return x=c.body.getReader(),a(c.status,c.statusText,c.headers.get("Content-Type"),new je(c.headers)),new ge(function(r,s){var i=function(){x.read().then(function(u){if(u.done)r(void 0);else{var v=_.decode(u.value,{stream:!0});o(v),i()}}).catch(function(u){s(u)})};i()})}).catch(function(c){if(c.name!=="AbortError")return c}).then(function(c){n(c)}),{abort:function(){x!=null&&x.cancel(),f.abort()}}};function ve(){this._listeners=Object.create(null)}function ue(t){K(function(){throw t},0)}ve.prototype.dispatchEvent=function(t){t.target=this;var a=this._listeners[t.type];if(a!=null)for(var o=a.length,n=0;n<o;n+=1){var d=a[n];try{typeof d.handleEvent=="function"?d.handleEvent(t):d.call(this,t)}catch(l){ue(l)}}},ve.prototype.addEventListener=function(t,a){t=String(t);var o=this._listeners,n=o[t];n==null&&(n=[],o[t]=n);for(var d=!1,l=0;l<n.length;l+=1)n[l]===a&&(d=!0);d||n.push(a)},ve.prototype.removeEventListener=function(t,a){t=String(t);var o=this._listeners,n=o[t];if(n!=null){for(var d=[],l=0;l<n.length;l+=1)n[l]!==a&&d.push(n[l]);d.length===0?delete o[t]:o[t]=d}};function re(t){this.type=t,this.target=void 0}function Ce(t,a){re.call(this,t),this.data=a.data,this.lastEventId=a.lastEventId}Ce.prototype=Object.create(re.prototype);function Se(t,a){re.call(this,t),this.status=a.status,this.statusText=a.statusText,this.headers=a.headers}Se.prototype=Object.create(re.prototype);function Ne(t,a){re.call(this,t),this.error=a.error}Ne.prototype=Object.create(re.prototype);var Ee=-1,$=0,V=1,ne=2,ke=-1,ee=0,Pe=1,be=2,Re=3,Le=/^text\/event\-stream(;.*)?$/i,De=1e3,Oe=18e6,_e=function(t,a){var o=t==null?a:parseInt(t,10);return o!==o&&(o=a),pe(o)},pe=function(t){return Math.min(Math.max(t,De),Oe)},ae=function(t,a,o){try{typeof a=="function"&&a.call(t,o)}catch(n){ue(n)}};function I(t,a){ve.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,t,a)}function Fe(){return C!=null&&"withCredentials"in C.prototype||Q==null?new C:new Q}var Te=ie!=null&&Ae!=null&&"body"in Ae.prototype;function Be(t,a,o){a=String(a);var n=!!o.withCredentials,d=o.lastEventIdQueryParameterName||"lastEventId",l=pe(1e3),h=_e(o.heartbeatTimeout,45e3),x="",f=l,g=!1,_=0,c=o.headers||{},r=o.Transport,s=Te&&r==null?void 0:new R(r!=null?new r:Fe()),i=r!=null&&typeof r!="string"?new r:s==null?new fe:new ce,u=void 0,v=0,m=Ee,S="",T="",y="",k="",j=ee,z=0,q=0,A=function(b,p,P,N){if(m===$)if(b===200&&P!=null&&Le.test(P)){m=V,g=Date.now(),f=l,t.readyState=V;var L=new Se("open",{status:b,statusText:p,headers:N});t.dispatchEvent(L),ae(t,t.onopen,L)}else{var E="";b!==200?(p&&(p=p.replace(/\s+/g," ")),E="EventSource's response has a status "+b+" "+p+" that is not 200. Aborting the connection."):E="EventSource's response has a Content-Type specifying an unsupported type: "+(P==null?"-":P.replace(/\s+/g," "))+". Aborting the connection.",J();var L=new Se("error",{status:b,statusText:p,headers:N});t.dispatchEvent(L),ae(t,t.onerror,L),console.error(E)}},D=function(b){if(m===V){for(var p=-1,P=0;P<b.length;P+=1){var N=b.charCodeAt(P);(N===10||N===13)&&(p=P)}var L=(p!==-1?k:"")+b.slice(0,p+1);k=(p===-1?k:"")+b.slice(p+1),b!==""&&(g=Date.now(),_+=b.length);for(var E=0;E<L.length;E+=1){var N=L.charCodeAt(E);if(j===ke&&N===10)j=ee;else if(j===ke&&(j=ee),N===13||N===10){if(j!==ee){j===Pe&&(q=E+1);var F=L.slice(z,q-1),W=L.slice(q+(q<E&&L.charCodeAt(q)===32?1:0),E);F==="data"?(S+=`
7
+ `,S+=W):F==="id"?T=W:F==="event"?y=W:F==="retry"?(l=_e(W,l),f=l):F==="heartbeatTimeout"&&(h=_e(W,h),v!==0&&(se(v),v=K(function(){U()},h)))}if(j===ee){if(S!==""){x=T,y===""&&(y="message");var te=new Ce(y,{data:S.slice(1),lastEventId:T});if(t.dispatchEvent(te),y==="open"?ae(t,t.onopen,te):y==="message"?ae(t,t.onmessage,te):y==="error"&&ae(t,t.onerror,te),m===ne)return}S="",y=""}j=N===13?ke:ee}else j===ee&&(z=E,j=Pe),j===Pe?N===58&&(q=E+1,j=be):j===be&&(j=Re)}}},O=function(b){if(m===V||m===$){m=Ee,v!==0&&(se(v),v=0),v=K(function(){U()},f),f=pe(Math.min(l*16,f*2)),t.readyState=$;var p=new Ne("error",{error:b});t.dispatchEvent(p),ae(t,t.onerror,p),b!=null&&console.error(b)}},J=function(){m=ne,u!=null&&(u.abort(),u=void 0),v!==0&&(se(v),v=0),t.readyState=ne},U=function(){if(v=0,m!==Ee){if(!g&&u!=null)O(new Error("No activity within "+h+" milliseconds. "+(m===$?"No response received.":_+" chars received.")+" Reconnecting.")),u!=null&&(u.abort(),u=void 0);else{var b=Math.max((g||Date.now())+h-Date.now(),1);g=!1,v=K(function(){U()},b)}return}g=!1,_=0,v=K(function(){U()},h),m=$,S="",y="",T=x,k="",z=0,q=0,j=ee;var p=a;if(a.slice(0,5)!=="data:"&&a.slice(0,5)!=="blob:"&&x!==""){var P=a.indexOf("?");p=P===-1?a:a.slice(0,P+1)+a.slice(P+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(W,te){return te===d?"":W}),p+=(a.indexOf("?")===-1?"?":"&")+d+"="+encodeURIComponent(x)}var N=t.withCredentials,L={};L.Accept="text/event-stream";var E=t.headers;if(E!=null)for(var F in E)Object.prototype.hasOwnProperty.call(E,F)&&(L[F]=E[F]);try{u=i.open(s,A,D,O,p,N,L)}catch(W){throw J(),W}};t.url=a,t.readyState=$,t.withCredentials=n,t.headers=c,t._close=J,U()}I.prototype=Object.create(ve.prototype),I.prototype.CONNECTING=$,I.prototype.OPEN=V,I.prototype.CLOSED=ne,I.prototype.close=function(){this._close()},I.CONNECTING=$,I.OPEN=V,I.CLOSED=ne,I.prototype.withCredentials=void 0;var we=Z;C!=null&&(Z==null||!("withCredentials"in Z.prototype))&&(we=I),function(t){{var a=t(X);a!==void 0&&(oe.exports=a)}}(function(t){t.EventSourcePolyfill=I,t.NativeEventSource=Z,t.EventSource=we})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Ie,Ie.exports);var qe=Ie.exports,We=e.from_html('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span>',1),Xe=e.from_html('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh">—</span> <span class="svelte-75jgrh">—</span>',1),Ge=e.from_html('<p class="NoPlayerData svelte-75jgrh"> </p>'),Ve=e.from_html('<p class="NoPlayerData svelte-75jgrh"> </p>'),Je=e.from_html('<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>'),Ke=e.from_html('<div class="PlayerRankSkeletonWrapper svelte-75jgrh"><div class="PlayerRankSkeleton svelte-75jgrh"></div> <div class="PlayerRankSkeleton svelte-75jgrh"></div></div>'),Qe=e.from_html('<tr class="SkeletonRow svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"></td></tr>'),Ye=e.from_html('<tr><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td><td class="svelte-75jgrh"> </td></tr>'),Ze=e.from_html('<tr class="svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"><div class="EmptyLeaderboard svelte-75jgrh"><p class="svelte-75jgrh"> </p></div></td></tr>'),$e=e.from_html('<div class="PaginationSkeleton svelte-75jgrh"><div class="PaginationSkeletonButton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationNumberSkeleton svelte-75jgrh"></div> <div class="PaginationSkeletonButton svelte-75jgrh"></div></div>'),et=e.from_html('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'),tt=e.from_html("<button> </button>"),rt=e.from_html('<div class="PaginationWrapper svelte-75jgrh"><button class="PaginationButton svelte-75jgrh"> </button> <div class="PageNumberWrapper svelte-75jgrh"></div> <button class="PaginationButton svelte-75jgrh"> </button></div>'),nt=e.from_html('<div class="LeaderboardWrapper svelte-75jgrh"><div class="RankingWrapper 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> <!> <!></div>');const at={hash:"svelte-75jgrh",code:`.svelte-75jgrh,
8
+ .svelte-75jgrh::before,
9
+ .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;display:flex;flex-direction:column;justify-content:space-between;}.PlayerRankWrapper.svelte-75jgrh {display:flex;flex-direction:column;gap:5px;min-height:60px;.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);opacity:70%;font-size:14px;font-weight:400;& > span:where(.svelte-75jgrh):last-child{justify-self:end;}p:where(.svelte-75jgrh) {width:max-content;}.NoPlayerData:where(.svelte-75jgrh) {grid-column:1 / -1;text-wrap:auto;width:auto;}}.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;p:where(.svelte-75jgrh) {text-wrap:auto;padding:0 15px;text-align:left;}}.SkeletonRow.svelte-75jgrh {height:41px;overflow:hidden;background-color:var(--emw-color-skeleton, #535353);
10
+ animation: svelte-75jgrh-pulse 1.5s infinite;}.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-skeleton, #535353);border-radius:6px;
11
+ animation: svelte-75jgrh-pulse 1s infinite;}}.PaginationSkeleton.svelte-75jgrh {display:flex;justify-content:space-between;gap:6px;.PaginationSkeletonButton:where(.svelte-75jgrh) {width:60px;height:35px;border-radius:6px;background-color:var(--emw-color-skeleton, #535353);overflow:hidden;position:relative;
12
+ animation: svelte-75jgrh-pulse 1s infinite;}.PaginationNumberSkeleton:where(.svelte-75jgrh) {width:40px;height:35px;border-radius:6px;background-color:var(--emw-color-skeleton, #535353);overflow:hidden;position:relative;
13
+ animation: svelte-75jgrh-pulse 1s infinite;}}
14
+
15
+ @keyframes svelte-75jgrh-pulse {
16
+ 0% {
17
+ opacity: 0;
18
+ }
19
+ 50% {
20
+ opacity: 1;
21
+ }
22
+ 100% {
23
+ opacity: 0;
24
+ }
25
+ }
26
+
27
+ @media (min-width: 1000px) {.ShowPlayersButton.svelte-75jgrh {display:block;width:300px;margin:auto;background-color:var(--emw-color-bg-primary, #212121);}
28
+ }
29
+
30
+ @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;}}
31
+ }`};function ze(oe,X){e.push(X,!0),e.append_styles(oe,at);const w=()=>e.store_get(e.$format,"$_",K),[K,se]=e.setup_stores(),C=e.prop(X,"endpoint"),Q=e.prop(X,"language",7,"en"),Y=e.prop(X,"session"),Z=e.prop(X,"tournamentid"),H=e.prop(X,"platform"),ge=e.prop(X,"translationurl"),ie=e.prop(X,"newlyEnrolled"),Ae=()=>{let r=new URL(ge());fetch(r.href).then(s=>s.json()).then(s=>{Object.keys(s).forEach(i=>{He(i,s[i])})}).catch(s=>{console.log(s)})};Object.keys(Ue).forEach(r=>{He(r,Ue[r])}),Me(Q());const me=()=>{Me(Q())};e.user_pre_effect(()=>{ge()&&Ae()}),e.user_effect(()=>{me()});let G=null,le=e.state(void 0),xe=e.state(!1),ye=e.state(!1),de=e.state(void 0),B=e.state(void 0),R=e.state(0),M=e.state(10),he=e.state(!0),ce=e.state(void 0),je=e.state(!1);const fe=()=>{if(ne.has(e.get(V)))return;e.set(xe,!0);const r=new URL(`${C()}/v1/tournaments/${Z()}/leaderboard`),s=new Headers;Y()&&s.append("X-SessionId",Y()),r.searchParams.append("language",Q()),r.searchParams.append("platform",H()),r.searchParams.append("pagination",`offset=${e.get(R)},limit=${e.get(M)}`),fetch(r).then(i=>i.json()).then(i=>{e.set(le,i==null?void 0:i.items,!0),e.set(ce,i==null?void 0:i.total,!0),ne.set(e.get(V),e.get(le)),e.get(he)||e.set(he,!0)}).catch(i=>console.log(i)).finally(()=>e.set(xe,!1))},ve=r=>{const s=JSON.parse(r.data);s&&s.messageType==="LeaderBoardUpdate"&&e.set(le,s==null?void 0:s.items,!0)},ue=()=>{G&&(G.close(),G=null);const r=new URL(`${C()}/v1/tournaments/${Z()}/leaderboard/updates`);r.searchParams.append("HeartBeat","false"),r.searchParams.append("language",Q()),r.searchParams.append("filter","includeUnqualifiedPlayer=true"),r.searchParams.append("pagination",`offset=${e.get(R)},limit=${e.get(M)}`),r.searchParams.append("platform",H()),G=new qe.EventSourcePolyfill(r,{headers:{accept:"text/event-stream","X-SessionId":Y()}}),G.onmessage=ve},re=()=>{e.set(ye,!0);const r=new URL(`${C()}/v1/tournaments/leaderboard/player`),s=new Headers;r.searchParams.append("language",Q()),r.searchParams.append("platform",H()),r.searchParams.append("filter","includeUnqualifiedPlayer=false"),Y()&&s.append("X-SessionId",Y()),fetch(r,{method:"GET",headers:s}).then(u=>u.json()).then(u=>{var m,S,T;const v=(m=u==null?void 0:u.items)==null?void 0:m.find(y=>{var k;return((k=y==null?void 0:y.tournament)==null?void 0:k.id)===Z()});e.set(de,(S=v==null?void 0:v.tournament)==null?void 0:S.leaderBoard,!0),e.set(B,v==null?void 0:v.endRank,!0),e.set(je,(T=v==null?void 0:v.tournament)==null?void 0:T.playerEnrolled,!0)}).catch(u=>{console.log(u)}).finally(()=>e.set(ye,!1))},Ce=()=>{e.get(R)<e.get(ce)&&(e.set(R,e.get(R)+e.get(M)),fe(),ue())},Se=()=>{e.get(R)!==0&&(e.set(R,e.get(R)-e.get(M)),fe(),ue())},Ne=r=>{e.set(R,(r-1)*e.get(M)),fe(),ue()},Ee=()=>{const r=Math.ceil(e.get(ce)/e.get(M)),s=Math.floor(e.get(R)/e.get(M))+1;if(r<=5)return Array.from({length:r},(u,v)=>v+1);const i=[];return i.push(1),s<=3?(i.push(2,3),i.push("..."),i.push(r)):s>=r-2?(i.push("..."),i.push(r-2,r-1,r)):(i.push("..."),i.push(s-1,s,s+1),i.push("..."),i.push(r)),i},$=e.user_derived(Ee),V=e.user_derived(()=>Math.floor(e.get(R)/e.get(M))+1);let ne=new Map,ke=e.user_derived(()=>{var r;return(r=ne.get(e.get(V)))!=null?r:[]});const ee=(r,s)=>{const i=[];return s&&i.push("PlayerRow"),r===1&&i.push("Gold"),r===2&&i.push("Silver"),r===3&&i.push("Bronze"),i.join(" ")};e.user_effect(()=>{ie()&&re()}),e.onMount(()=>(fe(),re(),ue(),()=>{G==null||G.close(),G=null}));var Pe={get endpoint(){return C()},set endpoint(r){C(r),e.flushSync()},get language(){return Q()},set language(r="en"){Q(r),e.flushSync()},get session(){return Y()},set session(r){Y(r),e.flushSync()},get tournamentid(){return Z()},set tournamentid(r){Z(r),e.flushSync()},get platform(){return H()},set platform(r){H(r),e.flushSync()},get translationurl(){return ge()},set translationurl(r){ge(r),e.flushSync()},get newlyEnrolled(){return ie()},set newlyEnrolled(r){ie(r),e.flushSync()}},be=nt(),Re=e.child(be),Le=e.child(Re);{var De=r=>{var s=Je(),i=e.child(s),u=e.child(i),v=e.child(u,!0);e.reset(u);var m=e.sibling(u,2),S=e.child(m,!0);e.reset(m);var T=e.sibling(m,2),y=e.child(T,!0);e.reset(T),e.reset(i);var k=e.sibling(i,2),j=e.child(k);{var z=A=>{var D=We(),O=e.first_child(D),J=e.child(O);e.reset(O);var U=e.sibling(O,2),b=e.child(U,!0);e.reset(U);var p=e.sibling(U,2),P=e.child(p,!0);e.reset(p),e.template_effect(()=>{var N;e.set_text(J,`${(N=e.get(de).rank)!=null?N:""}.`),e.set_text(b,e.get(de).score),e.set_text(P,e.get(de).prizeName||"—")}),e.append(A,D)},q=A=>{var D=e.comment(),O=e.first_child(D);{var J=b=>{var p=Xe(),P=e.first_child(p),N=e.child(P);e.reset(P),e.next(4),e.template_effect(()=>{var L;return e.set_text(N,`${(L=e.get(B))!=null?L:""}.`)}),e.append(b,p)},U=b=>{var p=e.comment(),P=e.first_child(p);{var N=E=>{var F=Ge(),W=e.child(F,!0);e.reset(F),e.template_effect(te=>e.set_text(W,te),[()=>w()("leaderboardNotAvailable")]),e.append(E,F)},L=E=>{var F=Ve(),W=e.child(F,!0);e.reset(F),e.template_effect(te=>e.set_text(W,te),[()=>w()("notEnrolledRank")]),e.append(E,F)};e.if_block(P,E=>{e.get(je)?E(N):E(L,!1)},!0)}e.append(b,p)};e.if_block(O,b=>{e.get(B)?b(J):b(U,!1)},!0)}e.append(A,D)};e.if_block(j,A=>{e.get(de)?A(z):A(q,!1)})}e.reset(k),e.reset(s),e.template_effect((A,D,O)=>{e.set_text(v,A),e.set_text(S,D),e.set_text(y,O)},[()=>w()("myRanking"),()=>w()("points"),()=>w()("prize")]),e.append(r,s)},Oe=r=>{var s=Ke();e.append(r,s)};e.if_block(Le,r=>{e.get(ye)?r(Oe,!1):r(De)})}var _e=e.sibling(Le,2),pe=e.child(_e),ae=e.child(pe),I=e.child(ae),Fe=e.child(I,!0);e.reset(I);var Te=e.sibling(I),Be=e.child(Te,!0);e.reset(Te);var we=e.sibling(Te),t=e.child(we,!0);e.reset(we);var a=e.sibling(we),o=e.child(a,!0);e.reset(a),e.reset(ae),e.reset(pe);var n=e.sibling(pe),d=e.child(n);{var l=r=>{var s=e.comment(),i=e.first_child(s);e.each(i,17,()=>Array(e.get(M)),e.index,(u,v,m,S)=>{var T=Qe();e.append(u,T)}),e.append(r,s)},h=r=>{var s=e.comment(),i=e.first_child(s);{var u=m=>{var S=e.comment(),T=e.first_child(S);e.each(T,17,()=>e.get(ke),y=>y.rank,(y,k)=>{var j=Ye(),z=e.child(j),q=e.child(z);e.reset(z);var A=e.sibling(z),D=e.child(A,!0);e.reset(A);var O=e.sibling(A),J=e.child(O,!0);e.reset(O);var U=e.sibling(O),b=e.child(U,!0);e.reset(U),e.reset(j),e.template_effect(p=>{var P;e.set_class(j,1,p,"svelte-75jgrh"),e.set_text(q,`${(P=e.get(k).rank)!=null?P:""}.`),e.set_text(D,e.get(k).shortName||"J.D"),e.set_text(J,e.get(k).score||"—"),e.set_text(b,e.get(k).prizeName||"—")},[()=>{var p;return e.clsx(ee(e.get(k).rank,e.get(k).rank===((p=e.get(de))==null?void 0:p.rank)))}]),e.append(y,j)}),e.append(m,S)},v=m=>{var S=Ze(),T=e.child(S),y=e.child(T),k=e.child(y),j=e.child(k,!0);e.reset(k),e.reset(y),e.reset(T),e.reset(S),e.template_effect(z=>e.set_text(j,z),[()=>w()("leaderboardNotAvailable")]),e.append(m,S)};e.if_block(i,m=>{var S;((S=e.get(le))==null?void 0:S.length)>0?m(u):m(v,!1)},!0)}e.append(r,s)};e.if_block(d,r=>{e.get(xe)?r(l):r(h,!1)})}e.reset(n),e.reset(_e),e.reset(Re);var x=e.sibling(Re,2);{var f=r=>{var s=$e();e.append(r,s)};e.if_block(x,r=>{e.get(he)||r(f)})}var g=e.sibling(x,2);{var _=r=>{var s=rt(),i=e.child(s);i.__click=Se;var u=e.child(i,!0);e.reset(i);var v=e.sibling(i,2);e.each(v,21,()=>e.get($),e.index,(T,y)=>{var k=e.comment(),j=e.first_child(k);{var z=A=>{var D=et();e.append(A,D)},q=A=>{var D=tt();let O;D.__click=()=>Ne(e.get(y));var J=e.child(D,!0);e.reset(D),e.template_effect(()=>{O=e.set_class(D,1,"PaginationButton Number svelte-75jgrh",null,O,{Active:e.get(y)===e.get(V)}),e.set_text(J,e.get(y))}),e.append(A,D)};e.if_block(j,A=>{typeof e.get(y)!="number"?A(z):A(q,!1)})}e.append(T,k)}),e.reset(v);var m=e.sibling(v,2);m.__click=Ce;var S=e.child(m,!0);e.reset(m),e.reset(s),e.template_effect((T,y)=>{i.disabled=e.get(R)===0,e.set_text(u,T),m.disabled=e.get(R)>=e.get(ce)-e.get(M),e.set_text(S,y)},[()=>w()("previousButton"),()=>w()("nextButton")]),e.append(r,s)};e.if_block(g,r=>{e.get(he)&&e.get(ce)>e.get(M)&&r(_)})}e.reset(be),e.template_effect((r,s,i,u)=>{e.set_text(Fe,r),e.set_text(Be,s),e.set_text(t,i),e.set_text(o,u)},[()=>w()("rank"),()=>w()("user"),()=>w()("points"),()=>w()("prize")]),e.append(oe,be);var c=e.pop(Pe);return se(),c}e.delegate(["click"]);customElements.define("tournament-leaderboard",e.create_custom_element(ze,{endpoint:{},language:{},session:{},tournamentid:{},platform:{},translationurl:{},newlyEnrolled:{}},[],[],!1));exports.default=ze;