@everymatrix/tournament-details-page 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{TournamentDetails-qcyLTtSv.js → TournamentDetails-CKMkVYxd.js} +1976 -1943
- package/components/{TournamentDetails-DoBMS_9T.js → TournamentDetails-H6pHb_yG.js} +1608 -1575
- package/components/TournamentDetails-nG7lN2NT.cjs +7 -0
- package/components/TournamentDetailsPage-B5bbvugX.js +1107 -0
- package/components/TournamentDetailsPage-CjBmguAV.js +1082 -0
- package/components/TournamentDetailsPage-DrDTbkUX.cjs +59 -0
- package/components/TournamentGames-CATtl7ab.js +377 -0
- package/components/TournamentGames-CXKhYSVz.js +405 -0
- package/components/TournamentGames-Dz1Ddedp.cjs +27 -0
- package/components/TournamentLeaderboard-Bdrmjyzv.js +823 -0
- package/components/TournamentLeaderboard-Cvo-K1Xv.js +839 -0
- package/components/TournamentLeaderboard-xrrrpKix.cjs +31 -0
- package/es2015/tournament-details-page.cjs +1 -1
- package/es2015/tournament-details-page.js +1 -1
- package/esnext/tournament-details-page.js +1 -1
- package/package.json +1 -1
- package/components/TournamentDetails-C-zS8XGk.cjs +0 -7
- package/components/TournamentDetailsPage-C2wcS4rg.js +0 -987
- package/components/TournamentDetailsPage-CQFv3xok.js +0 -1010
- package/components/TournamentDetailsPage-CR3ti0az.cjs +0 -66
- package/components/TournamentGames-KOJ004rg.js +0 -387
- package/components/TournamentGames-xrJB7h-M.js +0 -359
- package/components/TournamentGames-zikPbhES.cjs +0 -27
- package/components/TournamentLeaderboard-BjBItfy9.js +0 -788
- package/components/TournamentLeaderboard-D9naoaD9.cjs +0 -30
- package/components/TournamentLeaderboard-Dc8xv6be.js +0 -804
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetails-nG7lN2NT.cjs");function He(ee,W){e.addMessages(ee,W)}function Me(ee){e.$locale.set(ee)}const Ue={en:{rank:"Rank",user:"User",points:"Points",prize:"Prize",notEnrolledRank:"You are currently not enrolled in this torunament",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",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(ee,W){(function(b){var G=b.setTimeout,te=b.clearTimeout,P=b.XMLHttpRequest,V=b.XDomainRequest,$=b.ActiveXObject,K=b.EventSource,B=b.document,ge=b.Promise,me=b.fetch,Re=b.Response,I=b.TextDecoder,ie=b.TextEncoder,le=b.AbortController;if(typeof window!="undefined"&&typeof B!="undefined"&&!("readyState"in B)&&B.body==null&&(B.readyState="loading",window.addEventListener("load",function(t){B.readyState="complete"},!1)),P==null&&$!=null&&(P=function(){return new $("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(t){function o(){}return o.prototype=t,new o}),Date.now||(Date.now=function(){return new Date().getTime()}),le==null){var _e=me;me=function(t,o){var i=o.signal;return _e(t,{headers:o.headers,credentials:o.credentials,cache:o.cache}).then(function(a){var d=a.body.getReader();return i._reader=d,i._aborted&&i._reader.cancel(),{status:a.status,statusText:a.statusText,headers:a.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 J(){this.bitsNeeded=0,this.codePoint=0}J.prototype.decode=function(t){function o(u,r,n){if(n===1)return u>=128>>r&&u<<r<=2047;if(n===2)return u>=2048>>r&&u<<r<=55295||u>=57344>>r&&u<<r<=65535;if(n===3)return u>=65536>>r&&u<<r<=1114111;throw new Error}function i(u,r){if(u===6*1)return r>>6>15?3:r>31?2:1;if(u===6*2)return r>15?3:2;if(u===6*3)return 3;throw new Error}for(var a=65533,d="",l=this.bitsNeeded,c=this.codePoint,w=0;w<t.length;w+=1){var h=t[w];l!==0&&(h<128||h>191||!o(c<<6|h&63,l-6,i(l,c)))&&(l=0,c=a,d+=String.fromCharCode(c)),l===0?(h>=0&&h<=127?(l=0,c=h):h>=192&&h<=223?(l=6*1,c=h&31):h>=224&&h<=239?(l=6*2,c=h&15):h>=240&&h<=247?(l=6*3,c=h&7):(l=0,c=a),l!==0&&!o(c,l,i(l,c))&&(l=0,c=a)):(l-=6,c=c<<6|h&63),l===0&&(c<=65535?d+=String.fromCharCode(c):(d+=String.fromCharCode(55296+(c-65535-1>>10)),d+=String.fromCharCode(56320+(c-65535-1&1023))))}return this.bitsNeeded=l,this.codePoint=c,d};var we=function(){try{return new I().decode(new ie().encode("test"),{stream:!0})==="test"}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1};(I==null||ie==null||!we())&&(I=J);var _=function(){};function A(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=_,this.onload=_,this.onerror=_,this.onreadystatechange=_,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=_}A.prototype.open=function(t,o){this._abort(!0);var i=this,a=this._xhr,d=1,l=0;this._abort=function(n){i._sendTimeout!==0&&(te(i._sendTimeout),i._sendTimeout=0),(d===1||d===2||d===3)&&(d=4,a.onload=_,a.onerror=_,a.onabort=_,a.onprogress=_,a.onreadystatechange=_,a.abort(),l!==0&&(te(l),l=0),n||(i.readyState=4,i.onabort(null),i.onreadystatechange())),d=0};var c=function(){if(d===1){var n=0,s="",p=void 0;if("contentType"in a)n=200,s="OK",p=a.contentType;else try{n=a.status,s=a.statusText,p=a.getResponseHeader("Content-Type")}catch(j){n=0,s="",p=void 0}n!==0&&(d=2,i.readyState=2,i.status=n,i.statusText=s,i._contentType=p,i.onreadystatechange())}},w=function(){if(c(),d===2||d===3){d=3;var n="";try{n=a.responseText}catch(s){}i.readyState=3,i.responseText=n,i.onprogress()}},h=function(n,s){if((s==null||s.preventDefault==null)&&(s={preventDefault:_}),w(),d===1||d===2||d===3){if(d=4,l!==0&&(te(l),l=0),i.readyState=4,n==="load")i.onload(s);else if(n==="error")i.onerror(s);else if(n==="abort")i.onabort(s);else throw new TypeError;i.onreadystatechange()}},u=function(n){a!=null&&(a.readyState===4?(!("onload"in a)||!("onerror"in a)||!("onabort"in a))&&h(a.responseText===""?"error":"load",n):a.readyState===3?"onprogress"in a||w():a.readyState===2&&c())},r=function(){l=G(function(){r()},500),a.readyState===3&&w()};"onload"in a&&(a.onload=function(n){h("load",n)}),"onerror"in a&&(a.onerror=function(n){h("error",n)}),"onabort"in a&&(a.onabort=function(n){h("abort",n)}),"onprogress"in a&&(a.onprogress=w),"onreadystatechange"in a&&(a.onreadystatechange=function(n){u(n)}),("contentType"in a||!("ontimeout"in P.prototype))&&(o+=(o.indexOf("?")===-1?"?":"&")+"padding=true"),a.open(t,o,!0),"readyState"in a&&(l=G(function(){r()},0))},A.prototype.abort=function(){this._abort(!1)},A.prototype.getResponseHeader=function(t){return this._contentType},A.prototype.setRequestHeader=function(t,o){var i=this._xhr;"setRequestHeader"in i&&i.setRequestHeader(t,o)},A.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},A.prototype.send=function(){if((!("ontimeout"in P.prototype)||!("sendAsBinary"in P.prototype)&&!("mozAnon"in P.prototype))&&B!=null&&B.readyState!=null&&B.readyState!=="complete"){var t=this;t._sendTimeout=G(function(){t._sendTimeout=0,t.send()},4);return}var o=this._xhr;"withCredentials"in o&&(o.withCredentials=this.withCredentials);try{o.send(void 0)}catch(i){throw i}};function de(t){return t.replace(/[A-Z]/g,function(o){return String.fromCharCode(o.charCodeAt(0)+32)})}function re(t){for(var o=Object.create(null),i=t.split(`\r
|
|
6
|
+
`),a=0;a<i.length;a+=1){var d=i[a],l=d.split(": "),c=l.shift(),w=l.join(": ");o[de(c)]=w}this._map=o}re.prototype.get=function(t){return this._map[de(t)]},P!=null&&P.HEADERS_RECEIVED==null&&(P.HEADERS_RECEIVED=2);function ce(){}ce.prototype.open=function(t,o,i,a,d,l,c){t.open("GET",d);var w=0;t.onprogress=function(){var u=t.responseText,r=u.slice(w);w+=r.length,i(r)},t.onerror=function(u){u.preventDefault(),a(new Error("NetworkError"))},t.onload=function(){a(null)},t.onabort=function(){a(null)},t.onreadystatechange=function(){if(t.readyState===P.HEADERS_RECEIVED){var u=t.status,r=t.statusText,n=t.getResponseHeader("Content-Type"),s=t.getAllResponseHeaders();o(u,r,n,new re(s))}},t.withCredentials=l;for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&t.setRequestHeader(h,c[h]);return t.send(),t};function Te(t){this._headers=t}Te.prototype.get=function(t){return this._headers.get(t)};function he(){}he.prototype.open=function(t,o,i,a,d,l,c){var w=null,h=new le,u=h.signal,r=new I;return me(d,{headers:c,credentials:l?"include":"same-origin",signal:u,cache:"no-store"}).then(function(n){return w=n.body.getReader(),o(n.status,n.statusText,n.headers.get("Content-Type"),new Te(n.headers)),new ge(function(s,p){var j=function(){w.read().then(function(v){if(v.done)s(void 0);else{var f=r.decode(v.value,{stream:!0});i(f),j()}}).catch(function(v){p(v)})};j()})}).catch(function(n){if(n.name!=="AbortError")return n}).then(function(n){a(n)}),{abort:function(){w!=null&&w.cancel(),h.abort()}}};function fe(){this._listeners=Object.create(null)}function Ce(t){G(function(){throw t},0)}fe.prototype.dispatchEvent=function(t){t.target=this;var o=this._listeners[t.type];if(o!=null)for(var i=o.length,a=0;a<i;a+=1){var d=o[a];try{typeof d.handleEvent=="function"?d.handleEvent(t):d.call(this,t)}catch(l){Ce(l)}}},fe.prototype.addEventListener=function(t,o){t=String(t);var i=this._listeners,a=i[t];a==null&&(a=[],i[t]=a);for(var d=!1,l=0;l<a.length;l+=1)a[l]===o&&(d=!0);d||a.push(o)},fe.prototype.removeEventListener=function(t,o){t=String(t);var i=this._listeners,a=i[t];if(a!=null){for(var d=[],l=0;l<a.length;l+=1)a[l]!==o&&d.push(a[l]);d.length===0?delete i[t]:i[t]=d}};function ne(t){this.type=t,this.target=void 0}function Ae(t,o){ne.call(this,t),this.data=o.data,this.lastEventId=o.lastEventId}Ae.prototype=Object.create(ne.prototype);function xe(t,o){ne.call(this,t),this.status=o.status,this.statusText=o.statusText,this.headers=o.headers}xe.prototype=Object.create(ne.prototype);function Le(t,o){ne.call(this,t),this.error=o.error}Le.prototype=Object.create(ne.prototype);var ae=-1,z=0,oe=1,ve=2,je=-1,q=0,ue=1,Se=2,De=3,Oe=/^text\/event\-stream(;.*)?$/i,Ne=1e3,ke=18e6,ye=function(t,o){var i=t==null?o:parseInt(t,10);return i!==i&&(i=o),pe(i)},pe=function(t){return Math.min(Math.max(t,Ne),ke)},se=function(t,o,i){try{typeof o=="function"&&o.call(t,i)}catch(a){Ce(a)}};function O(t,o){fe.call(this),o=o||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Be(this,t,o)}function Fe(){return P!=null&&"withCredentials"in P.prototype||V==null?new P:new V}var Ee=me!=null&&Re!=null&&"body"in Re.prototype;function Be(t,o,i){o=String(o);var a=!!i.withCredentials,d=i.lastEventIdQueryParameterName||"lastEventId",l=pe(1e3),c=ye(i.heartbeatTimeout,45e3),w="",h=l,u=!1,r=0,n=i.headers||{},s=i.Transport,p=Ee&&s==null?void 0:new A(s!=null?new s:Fe()),j=s!=null&&typeof s!="string"?new s:p==null?new he:new ce,v=void 0,f=0,g=ae,k="",R="",T="",H="",E=q,S=0,x=0,N=function(m,y,D,U){if(g===z)if(m===200&&D!=null&&Oe.test(D)){g=oe,u=Date.now(),h=l,t.readyState=oe;var F=new xe("open",{status:m,statusText:y,headers:U});t.dispatchEvent(F),se(t,t.onopen,F)}else{var L="";m!==200?(y&&(y=y.replace(/\s+/g," ")),L="EventSource's response has a status "+m+" "+y+" that is not 200. Aborting the connection."):L="EventSource's response has a Content-Type specifying an unsupported type: "+(D==null?"-":D.replace(/\s+/g," "))+". Aborting the connection.",M();var F=new xe("error",{status:m,statusText:y,headers:U});t.dispatchEvent(F),se(t,t.onerror,F),console.error(L)}},Q=function(m){if(g===oe){for(var y=-1,D=0;D<m.length;D+=1){var U=m.charCodeAt(D);(U===10||U===13)&&(y=D)}var F=(y!==-1?H:"")+m.slice(0,y+1);H=(y===-1?H:"")+m.slice(y+1),m!==""&&(u=Date.now(),r+=m.length);for(var L=0;L<F.length;L+=1){var U=F.charCodeAt(L);if(E===je&&U===10)E=q;else if(E===je&&(E=q),U===13||U===10){if(E!==q){E===ue&&(x=L+1);var Y=F.slice(S,x-1),Z=F.slice(x+(x<L&&F.charCodeAt(x)===32?1:0),L);Y==="data"?(k+=`
|
|
7
|
+
`,k+=Z):Y==="id"?R=Z:Y==="event"?T=Z:Y==="retry"?(l=ye(Z,l),h=l):Y==="heartbeatTimeout"&&(c=ye(Z,c),f!==0&&(te(f),f=G(function(){C()},c)))}if(E===q){if(k!==""){w=R,T===""&&(T="message");var be=new Ae(T,{data:k.slice(1),lastEventId:R});if(t.dispatchEvent(be),T==="open"?se(t,t.onopen,be):T==="message"?se(t,t.onmessage,be):T==="error"&&se(t,t.onerror,be),g===ve)return}k="",T=""}E=U===13?je:q}else E===q&&(S=L,E=ue),E===ue?U===58&&(x=L+1,E=Se):E===Se&&(E=De)}}},X=function(m){if(g===oe||g===z){g=ae,f!==0&&(te(f),f=0),f=G(function(){C()},h),h=pe(Math.min(l*16,h*2)),t.readyState=z;var y=new Le("error",{error:m});t.dispatchEvent(y),se(t,t.onerror,y),m!=null&&console.error(m)}},M=function(){g=ve,v!=null&&(v.abort(),v=void 0),f!==0&&(te(f),f=0),t.readyState=ve},C=function(){if(f=0,g!==ae){if(!u&&v!=null)X(new Error("No activity within "+c+" milliseconds. "+(g===z?"No response received.":r+" chars received.")+" Reconnecting.")),v!=null&&(v.abort(),v=void 0);else{var m=Math.max((u||Date.now())+c-Date.now(),1);u=!1,f=G(function(){C()},m)}return}u=!1,r=0,f=G(function(){C()},c),g=z,k="",T="",R=w,H="",S=0,x=0,E=q;var y=o;if(o.slice(0,5)!=="data:"&&o.slice(0,5)!=="blob:"&&w!==""){var D=o.indexOf("?");y=D===-1?o:o.slice(0,D+1)+o.slice(D+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Z,be){return be===d?"":Z}),y+=(o.indexOf("?")===-1?"?":"&")+d+"="+encodeURIComponent(w)}var U=t.withCredentials,F={};F.Accept="text/event-stream";var L=t.headers;if(L!=null)for(var Y in L)Object.prototype.hasOwnProperty.call(L,Y)&&(F[Y]=L[Y]);try{v=j.open(p,N,Q,X,y,U,F)}catch(Z){throw M(),Z}};t.url=o,t.readyState=z,t.withCredentials=a,t.headers=n,t._close=M,C()}O.prototype=Object.create(fe.prototype),O.prototype.CONNECTING=z,O.prototype.OPEN=oe,O.prototype.CLOSED=ve,O.prototype.close=function(){this._close()},O.CONNECTING=z,O.OPEN=oe,O.CLOSED=ve,O.prototype.withCredentials=void 0;var Pe=K;P!=null&&(K==null||!("withCredentials"in K.prototype))&&(Pe=O),function(t){{var o=t(W);o!==void 0&&(ee.exports=o)}}(function(t){t.EventSourcePolyfill=O,t.NativeEventSource=K,t.EventSource=Pe})})(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="svelte-75jgrh"> </p>'),Ve=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>'),$e=e.from_html('<div class="PlayerRankSkeletonWrapper svelte-75jgrh"><div class="PlayerRankSkeleton svelte-75jgrh"></div> <div class="PlayerRankSkeleton svelte-75jgrh"></div></div>'),Ke=e.from_html('<tr class="SkeletonRow svelte-75jgrh"><td colspan="4" class="svelte-75jgrh"></td></tr>'),Je=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>'),Qe=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>'),Ye=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>'),Ze=e.from_html('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'),et=e.from_html("<button> </button>"),tt=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>'),rt=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 nt={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;}}.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;background-color:var(--emw-color-skeleton, #535353);
|
|
10
|
+
animation: svelte-75jgrh-pulse 1s 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(ee,W){e.push(W,!0),e.append_styles(ee,nt);const b=()=>e.store_get(e.$format,"$_",G),[G,te]=e.setup_stores(),P=e.prop(W,"endpoint"),V=e.prop(W,"language",7,"en"),$=e.prop(W,"session"),K=e.prop(W,"tournamentid"),B=e.prop(W,"platform"),ge=e.prop(W,"translationurl"),me=()=>{let r=new URL(ge());fetch(r.href).then(n=>n.json()).then(n=>{Object.keys(n).forEach(s=>{He(s,n[s])})}).catch(n=>{console.log(n)})};Object.keys(Ue).forEach(r=>{He(r,Ue[r])}),Me(V());const Re=()=>{Me(V())};e.user_pre_effect(()=>{ge()&&me()}),e.user_effect(()=>{Re()});let I=null,ie=e.state(void 0),le=e.state(!1),_e=e.state(!1),J=e.state(void 0),we=e.state(void 0),_=e.state(0),A=e.state(10),de=e.state(!0),re=e.state(void 0);const ce=()=>{if(z.has(e.get(ae)))return;e.set(le,!0);const r=new URL(`${P()}/v1/tournaments/${K()}/leaderboard`),n=new Headers;$()&&n.append("X-SessionId",$()),r.searchParams.append("language",V()),r.searchParams.append("platform",B()),r.searchParams.append("pagination",`offset=${e.get(_)},limit=${e.get(A)}`),fetch(r).then(s=>s.json()).then(s=>{e.set(ie,s==null?void 0:s.items,!0),e.set(re,s==null?void 0:s.total,!0),z.set(e.get(ae),e.get(ie)),e.get(de)||e.set(de,!0)}).catch(s=>console.log(s)).finally(()=>e.set(le,!1))},Te=r=>{const n=JSON.parse(r.data);n&&n.messageType==="LeaderBoardUpdate"&&e.set(ie,n==null?void 0:n.items,!0)},he=()=>{I&&(I.close(),I=null);const r=new URL(`${P()}/v1/tournaments/${K()}/leaderboard/updates`);r.searchParams.append("HeartBeat","false"),r.searchParams.append("language",V()),r.searchParams.append("filter","includeUnqualifiedPlayer=true"),r.searchParams.append("pagination",`offset=${e.get(_)},limit=${e.get(A)}`),r.searchParams.append("platform",B()),I=new qe.EventSourcePolyfill(r,{headers:{accept:"text/event-stream","X-SessionId":$()}}),I.onmessage=Te},fe=()=>{e.set(_e,!0);const r=new URL(`${P()}/v1/tournaments/leaderboard/player`),n=new Headers;r.searchParams.append("language",V()),r.searchParams.append("platform",B()),r.searchParams.append("filter","includeUnqualifiedPlayer=false"),$()&&n.append("X-SessionId",$()),fetch(r,{method:"GET",headers:n}).then(p=>p.json()).then(p=>{var v;const j=(v=p==null?void 0:p.items)==null?void 0:v.find(f=>{var g;return((g=f==null?void 0:f.tournament)==null?void 0:g.id)===K()});e.set(J,j==null?void 0:j.leaderBoard,!0),e.set(we,j==null?void 0:j.endRank,!0)}).catch(p=>{console.log(p)}).finally(()=>e.set(_e,!1))},Ce=()=>{e.get(_)<e.get(re)&&(e.set(_,e.get(_)+e.get(A)),ce(),he())},ne=()=>{e.get(_)!==0&&(e.set(_,e.get(_)-e.get(A)),ce(),he())},Ae=r=>{e.set(_,(r-1)*e.get(A)),ce(),he()},xe=()=>{const r=Math.ceil(e.get(re)/e.get(A)),n=Math.floor(e.get(_)/e.get(A))+1;if(r<=5)return Array.from({length:r},(p,j)=>j+1);const s=[];return s.push(1),n<=3?(s.push(2,3),s.push("..."),s.push(r)):n>=r-2?(s.push("..."),s.push(r-2,r-1,r)):(s.push("..."),s.push(n-1,n,n+1),s.push("..."),s.push(r)),s},Le=e.user_derived(xe),ae=e.user_derived(()=>Math.floor(e.get(_)/e.get(A))+1);let z=new Map,oe=e.user_derived(()=>{var r;return(r=z.get(e.get(ae)))!=null?r:[]});const ve=(r,n)=>{const s=[];return n&&s.push("PlayerRow"),r===1&&s.push("Gold"),r===2&&s.push("Silver"),r===3&&s.push("Bronze"),s.join(" ")};e.onMount(()=>(ce(),fe(),he(),()=>{I==null||I.close(),I=null}));var je={get endpoint(){return P()},set endpoint(r){P(r),e.flushSync()},get language(){return V()},set language(r="en"){V(r),e.flushSync()},get session(){return $()},set session(r){$(r),e.flushSync()},get tournamentid(){return K()},set tournamentid(r){K(r),e.flushSync()},get platform(){return B()},set platform(r){B(r),e.flushSync()},get translationurl(){return ge()},set translationurl(r){ge(r),e.flushSync()}},q=rt(),ue=e.child(q),Se=e.child(ue);{var De=r=>{var n=Ve(),s=e.child(n),p=e.child(s),j=e.child(p,!0);e.reset(p);var v=e.sibling(p,2),f=e.child(v,!0);e.reset(v);var g=e.sibling(v,2),k=e.child(g,!0);e.reset(g),e.reset(s);var R=e.sibling(s,2),T=e.child(R);{var H=S=>{var x=We(),N=e.first_child(x),Q=e.child(N);e.reset(N);var X=e.sibling(N,2),M=e.child(X,!0);e.reset(X);var C=e.sibling(X,2),m=e.child(C,!0);e.reset(C),e.template_effect(()=>{var y;e.set_text(Q,`${(y=e.get(J).rank)!=null?y:""}.`),e.set_text(M,e.get(J).score),e.set_text(m,e.get(J).prizeName||"—")}),e.append(S,x)},E=S=>{var x=e.comment(),N=e.first_child(x);{var Q=M=>{var C=Xe(),m=e.first_child(C),y=e.child(m);e.reset(m),e.next(4),e.template_effect(()=>{var D;return e.set_text(y,`${(D=e.get(we))!=null?D:""}.`)}),e.append(M,C)},X=M=>{var C=Ge(),m=e.child(C,!0);e.reset(C),e.template_effect(y=>e.set_text(m,y),[()=>b()("notEnrolledRank")]),e.append(M,C)};e.if_block(N,M=>{e.get(we)?M(Q):M(X,!1)},!0)}e.append(S,x)};e.if_block(T,S=>{e.get(J)?S(H):S(E,!1)})}e.reset(R),e.reset(n),e.template_effect((S,x,N)=>{e.set_text(j,S),e.set_text(f,x),e.set_text(k,N)},[()=>b()("myRanking"),()=>b()("points"),()=>b()("prize")]),e.append(r,n)},Oe=r=>{var n=$e();e.append(r,n)};e.if_block(Se,r=>{e.get(_e)?r(Oe,!1):r(De)})}var Ne=e.sibling(Se,2),ke=e.child(Ne),ye=e.child(ke),pe=e.child(ye),se=e.child(pe,!0);e.reset(pe);var O=e.sibling(pe),Fe=e.child(O,!0);e.reset(O);var Ee=e.sibling(O),Be=e.child(Ee,!0);e.reset(Ee);var Pe=e.sibling(Ee),t=e.child(Pe,!0);e.reset(Pe),e.reset(ye),e.reset(ke);var o=e.sibling(ke),i=e.child(o);{var a=r=>{var n=e.comment(),s=e.first_child(n);e.each(s,17,()=>Array(e.get(A)),e.index,(p,j,v,f)=>{var g=Ke();e.append(p,g)}),e.append(r,n)},d=r=>{var n=e.comment(),s=e.first_child(n);{var p=v=>{var f=e.comment(),g=e.first_child(f);e.each(g,17,()=>e.get(oe),k=>k.rank,(k,R)=>{var T=Je(),H=e.child(T),E=e.child(H);e.reset(H);var S=e.sibling(H),x=e.child(S,!0);e.reset(S);var N=e.sibling(S),Q=e.child(N,!0);e.reset(N);var X=e.sibling(N),M=e.child(X,!0);e.reset(X),e.reset(T),e.template_effect(C=>{var m;e.set_class(T,1,C,"svelte-75jgrh"),e.set_text(E,`${(m=e.get(R).rank)!=null?m:""}.`),e.set_text(x,e.get(R).shortName||"—"),e.set_text(Q,e.get(R).score||"—"),e.set_text(M,e.get(R).prizeName||"—")},[()=>{var C;return e.clsx(ve(e.get(R).rank,e.get(R).rank===((C=e.get(J))==null?void 0:C.rank)))}]),e.append(k,T)}),e.append(v,f)},j=v=>{var f=Qe(),g=e.child(f),k=e.child(g),R=e.child(k),T=e.child(R,!0);e.reset(R),e.reset(k),e.reset(g),e.reset(f),e.template_effect(H=>e.set_text(T,H),[()=>b()("emptyLeaderboard")]),e.append(v,f)};e.if_block(s,v=>{var f;((f=e.get(ie))==null?void 0:f.length)>0?v(p):v(j,!1)},!0)}e.append(r,n)};e.if_block(i,r=>{e.get(le)?r(a):r(d,!1)})}e.reset(o),e.reset(Ne),e.reset(ue);var l=e.sibling(ue,2);{var c=r=>{var n=Ye();e.append(r,n)};e.if_block(l,r=>{e.get(de)||r(c)})}var w=e.sibling(l,2);{var h=r=>{var n=tt(),s=e.child(n);s.__click=ne;var p=e.child(s,!0);e.reset(s);var j=e.sibling(s,2);e.each(j,21,()=>e.get(Le),e.index,(g,k)=>{var R=e.comment(),T=e.first_child(R);{var H=S=>{var x=Ze();e.append(S,x)},E=S=>{var x=et();let N;x.__click=()=>Ae(e.get(k));var Q=e.child(x,!0);e.reset(x),e.template_effect(()=>{N=e.set_class(x,1,"PaginationButton Number svelte-75jgrh",null,N,{Active:e.get(k)===e.get(ae)}),e.set_text(Q,e.get(k))}),e.append(S,x)};e.if_block(T,S=>{typeof e.get(k)!="number"?S(H):S(E,!1)})}e.append(g,R)}),e.reset(j);var v=e.sibling(j,2);v.__click=Ce;var f=e.child(v,!0);e.reset(v),e.reset(n),e.template_effect((g,k)=>{s.disabled=e.get(_)===0,e.set_text(p,g),v.disabled=e.get(_)>=e.get(re)-e.get(A),e.set_text(f,k)},[()=>b()("previousButton"),()=>b()("nextButton")]),e.append(r,n)};e.if_block(w,r=>{e.get(de)&&e.get(re)>e.get(A)&&r(h)})}e.reset(q),e.template_effect((r,n,s,p)=>{e.set_text(se,r),e.set_text(Fe,n),e.set_text(Be,s),e.set_text(t,p)},[()=>b()("rank"),()=>b()("user"),()=>b()("points"),()=>b()("prize")]),e.append(ee,q);var u=e.pop(je);return te(),u}e.delegate(["click"]);customElements.define("tournament-leaderboard",e.create_custom_element(ze,{endpoint:{},language:{},session:{},tournamentid:{},platform:{},translationurl:{}},[],[],!1));exports.default=ze;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(e){return function(...s){try{return e.apply(this,s)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/TournamentDetailsPage-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(e){return function(...s){try{return e.apply(this,s)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/TournamentDetailsPage-DrDTbkUX.cjs")).then(e=>e.TournamentDetailsPage_ce).then(({default:e})=>{!customElements.get("tournament-details-page")&&customElements.define("tournament-details-page",e.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/TournamentDetailsPage-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/TournamentDetailsPage-B5bbvugX.js").then((e) => e.T).then(({ default: e }) => {
|
|
14
14
|
!customElements.get("tournament-details-page") && customElements.define("tournament-details-page", e.element);
|
|
15
15
|
});
|
|
16
16
|
}
|