@everymatrix/tournament-details-page 0.0.1
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-CJVSWVXD.js +6927 -0
- package/components/TournamentDetails-amGR_-Hv.js +6845 -0
- package/components/TournamentDetails-upe3WFia.cjs +7 -0
- package/components/TournamentDetailsPage-BlWvqhbK.js +953 -0
- package/components/TournamentDetailsPage-BsjnqhIP.cjs +63 -0
- package/components/TournamentDetailsPage-DnknTo0Y.js +976 -0
- package/components/TournamentGames-BqZd-C9h.js +351 -0
- package/components/TournamentGames-Cb2LP2tF.js +324 -0
- package/components/TournamentGames-D5Nyb0Nx.cjs +26 -0
- package/components/TournamentLeaderboard-BjmkrtNX.js +800 -0
- package/components/TournamentLeaderboard-C1tIH5FA.js +784 -0
- package/components/TournamentLeaderboard-DWYhqHPh.cjs +36 -0
- package/es2015/tournament-details-page.cjs +1 -0
- package/es2015/tournament-details-page.js +16 -0
- package/esnext/tournament-details-page.js +14 -0
- package/package.json +25 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TournamentDetails-upe3WFia.cjs");function ze(ee,U){e.addMessages(ee,U)}function Ue(ee){e.$locale.set(ee)}const Ie={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:"Puanlar",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:"Currently there are no players enrolled in this tournament",joinButton:"Join",previousButton:"Previous",nextButton:"Next"}};var Oe={exports:{}};/** @license
|
|
2
|
+
* eventsource.js
|
|
3
|
+
* Available under MIT License (MIT)
|
|
4
|
+
* https://github.com/Yaffle/EventSource/
|
|
5
|
+
*/(function(ee,U){(function(g){var X=g.setTimeout,te=g.clearTimeout,_=g.XMLHttpRequest,J=g.XDomainRequest,q=g.ActiveXObject,W=g.EventSource,A=g.document,Ae=g.Promise,C=g.fetch,ae=g.Response,K=g.TextDecoder,ve=g.TextEncoder,G=g.AbortController;if(typeof window!="undefined"&&typeof A!="undefined"&&!("readyState"in A)&&A.body==null&&(A.readyState="loading",window.addEventListener("load",function(t){A.readyState="complete"},!1)),_==null&&q!=null&&(_=function(){return new q("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(t){function s(){}return s.prototype=t,new s}),Date.now||(Date.now=function(){return new Date().getTime()}),G==null){var O=C;C=function(t,s){var i=s.signal;return O(t,{headers:s.headers,credentials:s.credentials,cache:s.cache}).then(function(o){var r=o.body.getReader();return i._reader=r,i._aborted&&i._reader.cancel(),{status:o.status,statusText:o.statusText,headers:o.headers,body:{getReader:function(){return r}}}})},G=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function L(){this.bitsNeeded=0,this.codePoint=0}L.prototype.decode=function(t){function s(c,h,l){if(l===1)return c>=128>>h&&c<<h<=2047;if(l===2)return c>=2048>>h&&c<<h<=55295||c>=57344>>h&&c<<h<=65535;if(l===3)return c>=65536>>h&&c<<h<=1114111;throw new Error}function i(c,h){if(c===6*1)return h>>6>15?3:h>31?2:1;if(c===6*2)return h>15?3:2;if(c===6*3)return 3;throw new Error}for(var o=65533,r="",n=this.bitsNeeded,a=this.codePoint,v=0;v<t.length;v+=1){var d=t[v];n!==0&&(d<128||d>191||!s(a<<6|d&63,n-6,i(n,a)))&&(n=0,a=o,r+=String.fromCharCode(a)),n===0?(d>=0&&d<=127?(n=0,a=d):d>=192&&d<=223?(n=6*1,a=d&31):d>=224&&d<=239?(n=6*2,a=d&15):d>=240&&d<=247?(n=6*3,a=d&7):(n=0,a=o),n!==0&&!s(a,n,i(n,a))&&(n=0,a=o)):(n-=6,a=a<<6|d&63),n===0&&(a<=65535?r+=String.fromCharCode(a):(r+=String.fromCharCode(55296+(a-65535-1>>10)),r+=String.fromCharCode(56320+(a-65535-1&1023))))}return this.bitsNeeded=n,this.codePoint=a,r};var oe=function(){try{return new K().decode(new ve().encode("test"),{stream:!0})==="test"}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1};(K==null||ve==null||!oe())&&(K=L);var T=function(){};function B(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=T,this.onload=T,this.onerror=T,this.onreadystatechange=T,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=T}B.prototype.open=function(t,s){this._abort(!0);var i=this,o=this._xhr,r=1,n=0;this._abort=function(l){i._sendTimeout!==0&&(te(i._sendTimeout),i._sendTimeout=0),(r===1||r===2||r===3)&&(r=4,o.onload=T,o.onerror=T,o.onabort=T,o.onprogress=T,o.onreadystatechange=T,o.abort(),n!==0&&(te(n),n=0),l||(i.readyState=4,i.onabort(null),i.onreadystatechange())),r=0};var a=function(){if(r===1){var l=0,f="",p=void 0;if("contentType"in o)l=200,f="OK",p=o.contentType;else try{l=o.status,f=o.statusText,p=o.getResponseHeader("Content-Type")}catch(w){l=0,f="",p=void 0}l!==0&&(r=2,i.readyState=2,i.status=l,i.statusText=f,i._contentType=p,i.onreadystatechange())}},v=function(){if(a(),r===2||r===3){r=3;var l="";try{l=o.responseText}catch(f){}i.readyState=3,i.responseText=l,i.onprogress()}},d=function(l,f){if((f==null||f.preventDefault==null)&&(f={preventDefault:T}),v(),r===1||r===2||r===3){if(r=4,n!==0&&(te(n),n=0),i.readyState=4,l==="load")i.onload(f);else if(l==="error")i.onerror(f);else if(l==="abort")i.onabort(f);else throw new TypeError;i.onreadystatechange()}},c=function(l){o!=null&&(o.readyState===4?(!("onload"in o)||!("onerror"in o)||!("onabort"in o))&&d(o.responseText===""?"error":"load",l):o.readyState===3?"onprogress"in o||v():o.readyState===2&&a())},h=function(){n=X(function(){h()},500),o.readyState===3&&v()};"onload"in o&&(o.onload=function(l){d("load",l)}),"onerror"in o&&(o.onerror=function(l){d("error",l)}),"onabort"in o&&(o.onabort=function(l){d("abort",l)}),"onprogress"in o&&(o.onprogress=v),"onreadystatechange"in o&&(o.onreadystatechange=function(l){c(l)}),("contentType"in o||!("ontimeout"in _.prototype))&&(s+=(s.indexOf("?")===-1?"?":"&")+"padding=true"),o.open(t,s,!0),"readyState"in o&&(n=X(function(){h()},0))},B.prototype.abort=function(){this._abort(!1)},B.prototype.getResponseHeader=function(t){return this._contentType},B.prototype.setRequestHeader=function(t,s){var i=this._xhr;"setRequestHeader"in i&&i.setRequestHeader(t,s)},B.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},B.prototype.send=function(){if((!("ontimeout"in _.prototype)||!("sendAsBinary"in _.prototype)&&!("mozAnon"in _.prototype))&&A!=null&&A.readyState!=null&&A.readyState!=="complete"){var t=this;t._sendTimeout=X(function(){t._sendTimeout=0,t.send()},4);return}var s=this._xhr;"withCredentials"in s&&(s.withCredentials=this.withCredentials);try{s.send(void 0)}catch(i){throw i}};function we(t){return t.replace(/[A-Z]/g,function(s){return String.fromCharCode(s.charCodeAt(0)+32)})}function se(t){for(var s=Object.create(null),i=t.split(`\r
|
|
6
|
+
`),o=0;o<i.length;o+=1){var r=i[o],n=r.split(": "),a=n.shift(),v=n.join(": ");s[we(a)]=v}this._map=s}se.prototype.get=function(t){return this._map[we(t)]},_!=null&&_.HEADERS_RECEIVED==null&&(_.HEADERS_RECEIVED=2);function xe(){}xe.prototype.open=function(t,s,i,o,r,n,a){t.open("GET",r);var v=0;t.onprogress=function(){var c=t.responseText,h=c.slice(v);v+=h.length,i(h)},t.onerror=function(c){c.preventDefault(),o(new Error("NetworkError"))},t.onload=function(){o(null)},t.onabort=function(){o(null)},t.onreadystatechange=function(){if(t.readyState===_.HEADERS_RECEIVED){var c=t.status,h=t.statusText,l=t.getResponseHeader("Content-Type"),f=t.getAllResponseHeaders();s(c,h,l,new se(f))}},t.withCredentials=n;for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&t.setRequestHeader(d,a[d]);return t.send(),t};function je(t){this._headers=t}je.prototype.get=function(t){return this._headers.get(t)};function Se(){}Se.prototype.open=function(t,s,i,o,r,n,a){var v=null,d=new G,c=d.signal,h=new K;return C(r,{headers:a,credentials:n?"include":"same-origin",signal:c,cache:"no-store"}).then(function(l){return v=l.body.getReader(),s(l.status,l.statusText,l.headers.get("Content-Type"),new je(l.headers)),new Ae(function(f,p){var w=function(){v.read().then(function(y){if(y.done)f(void 0);else{var b=h.decode(y.value,{stream:!0});i(b),w()}}).catch(function(y){p(y)})};w()})}).catch(function(l){if(l.name!=="AbortError")return l}).then(function(l){o(l)}),{abort:function(){v!=null&&v.cancel(),d.abort()}}};function ie(){this._listeners=Object.create(null)}function Ee(t){X(function(){throw t},0)}ie.prototype.dispatchEvent=function(t){t.target=this;var s=this._listeners[t.type];if(s!=null)for(var i=s.length,o=0;o<i;o+=1){var r=s[o];try{typeof r.handleEvent=="function"?r.handleEvent(t):r.call(this,t)}catch(n){Ee(n)}}},ie.prototype.addEventListener=function(t,s){t=String(t);var i=this._listeners,o=i[t];o==null&&(o=[],i[t]=o);for(var r=!1,n=0;n<o.length;n+=1)o[n]===s&&(r=!0);r||o.push(s)},ie.prototype.removeEventListener=function(t,s){t=String(t);var i=this._listeners,o=i[t];if(o!=null){for(var r=[],n=0;n<o.length;n+=1)o[n]!==s&&r.push(o[n]);r.length===0?delete i[t]:i[t]=r}};function re(t){this.type=t,this.target=void 0}function le(t,s){re.call(this,t),this.data=s.data,this.lastEventId=s.lastEventId}le.prototype=Object.create(re.prototype);function de(t,s){re.call(this,t),this.status=s.status,this.statusText=s.statusText,this.headers=s.headers}de.prototype=Object.create(re.prototype);function ke(t,s){re.call(this,t),this.error=s.error}ke.prototype=Object.create(re.prototype);var ue=-1,$=0,V=1,ne=2,pe=-1,I=0,ce=1,ge=2,me=3,Ce=/^text\/event\-stream(;.*)?$/i,ye=1e3,Le=18e6,he=function(t,s){var i=t==null?s:parseInt(t,10);return i!==i&&(i=s),be(i)},be=function(t){return Math.min(Math.max(t,ye),Le)},Q=function(t,s,i){try{typeof s=="function"&&s.call(t,i)}catch(o){Ee(o)}};function N(t,s){ie.call(this),s=s||{},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,De(this,t,s)}function Pe(){return _!=null&&"withCredentials"in _.prototype||J==null?new _:new J}var Ne=C!=null&&ae!=null&&"body"in ae.prototype;function De(t,s,i){s=String(s);var o=!!i.withCredentials,r=i.lastEventIdQueryParameterName||"lastEventId",n=be(1e3),a=he(i.heartbeatTimeout,45e3),v="",d=n,c=!1,h=0,l=i.headers||{},f=i.Transport,p=Ne&&f==null?void 0:new B(f!=null?new f:Pe()),w=f!=null&&typeof f!="string"?new f:p==null?new Se:new xe,y=void 0,b=0,u=ue,m="",x="",k="",M="",j=I,z=0,H=0,Re=function(E,S,D,F){if(u===$)if(E===200&&D!=null&&Ce.test(D)){u=V,c=Date.now(),d=n,t.readyState=V;var R=new de("open",{status:E,statusText:S,headers:F});t.dispatchEvent(R),Q(t,t.onopen,R)}else{var P="";E!==200?(S&&(S=S.replace(/\s+/g," ")),P="EventSource's response has a status "+E+" "+S+" that is not 200. Aborting the connection."):P="EventSource's response has a Content-Type specifying an unsupported type: "+(D==null?"-":D.replace(/\s+/g," "))+". Aborting the connection.",Fe();var R=new de("error",{status:E,statusText:S,headers:F});t.dispatchEvent(R),Q(t,t.onerror,R),console.error(P)}},Me=function(E){if(u===V){for(var S=-1,D=0;D<E.length;D+=1){var F=E.charCodeAt(D);(F===10||F===13)&&(S=D)}var R=(S!==-1?M:"")+E.slice(0,S+1);M=(S===-1?M:"")+E.slice(S+1),E!==""&&(c=Date.now(),h+=E.length);for(var P=0;P<R.length;P+=1){var F=R.charCodeAt(P);if(j===pe&&F===10)j=I;else if(j===pe&&(j=I),F===13||F===10){if(j!==I){j===ce&&(H=P+1);var Y=R.slice(z,H-1),Z=R.slice(H+(H<P&&R.charCodeAt(H)===32?1:0),P);Y==="data"?(m+=`
|
|
7
|
+
`,m+=Z):Y==="id"?x=Z:Y==="event"?k=Z:Y==="retry"?(n=he(Z,n),d=n):Y==="heartbeatTimeout"&&(a=he(Z,a),b!==0&&(te(b),b=X(function(){_e()},a)))}if(j===I){if(m!==""){v=x,k===""&&(k="message");var fe=new le(k,{data:m.slice(1),lastEventId:x});if(t.dispatchEvent(fe),k==="open"?Q(t,t.onopen,fe):k==="message"?Q(t,t.onmessage,fe):k==="error"&&Q(t,t.onerror,fe),u===ne)return}m="",k=""}j=F===13?pe:I}else j===I&&(z=P,j=ce),j===ce?F===58&&(H=P+1,j=ge):j===ge&&(j=me)}}},Be=function(E){if(u===V||u===$){u=ue,b!==0&&(te(b),b=0),b=X(function(){_e()},d),d=be(Math.min(n*16,d*2)),t.readyState=$;var S=new ke("error",{error:E});t.dispatchEvent(S),Q(t,t.onerror,S),E!=null&&console.error(E)}},Fe=function(){u=ne,y!=null&&(y.abort(),y=void 0),b!==0&&(te(b),b=0),t.readyState=ne},_e=function(){if(b=0,u!==ue){if(!c&&y!=null)Be(new Error("No activity within "+a+" milliseconds. "+(u===$?"No response received.":h+" chars received.")+" Reconnecting.")),y!=null&&(y.abort(),y=void 0);else{var E=Math.max((c||Date.now())+a-Date.now(),1);c=!1,b=X(function(){_e()},E)}return}c=!1,h=0,b=X(function(){_e()},a),u=$,m="",k="",x=v,M="",z=0,H=0,j=I;var S=s;if(s.slice(0,5)!=="data:"&&s.slice(0,5)!=="blob:"&&v!==""){var D=s.indexOf("?");S=D===-1?s:s.slice(0,D+1)+s.slice(D+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Z,fe){return fe===r?"":Z}),S+=(s.indexOf("?")===-1?"?":"&")+r+"="+encodeURIComponent(v)}var F=t.withCredentials,R={};R.Accept="text/event-stream";var P=t.headers;if(P!=null)for(var Y in P)Object.prototype.hasOwnProperty.call(P,Y)&&(R[Y]=P[Y]);try{y=w.open(p,Re,Me,Be,S,F,R)}catch(Z){throw Fe(),Z}};t.url=s,t.readyState=$,t.withCredentials=o,t.headers=l,t._close=Fe,_e()}N.prototype=Object.create(ie.prototype),N.prototype.CONNECTING=$,N.prototype.OPEN=V,N.prototype.CLOSED=ne,N.prototype.close=function(){this._close()},N.CONNECTING=$,N.OPEN=V,N.CLOSED=ne,N.prototype.withCredentials=void 0;var Te=W;_!=null&&(W==null||!("withCredentials"in W.prototype))&&(Te=N),function(t){{var s=t(U);s!==void 0&&(ee.exports=s)}}(function(t){t.EventSourcePolyfill=N,t.NativeEventSource=W,t.EventSource=Te})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Oe,Oe.exports);var Xe=Oe.exports,qe=e.from_html('<span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span> <span class="svelte-75jgrh"> </span>',1),We=e.from_html('<p class="svelte-75jgrh"> </p>'),Ge=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('<tr class="SkeletonRow svelte-75jgrh"><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td><td class="Skeleton svelte-75jgrh"><div class="svelte-75jgrh"></div></td></tr>'),Ve=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>'),Je=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>'),Ke=e.from_html('<span class="PaginationButton Elipsis svelte-75jgrh">...</span>'),Qe=e.from_html("<button> </button>"),Ye=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>'),Ze=e.from_html('<div class="PaginationSkeleton svelte-75jgrh"><div class="PaginationSkeletonButton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationNumberSkeleton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div> <div class="PaginationSkeletonButton svelte-75jgrh"><div class="SkeletonShimmer svelte-75jgrh"></div></div></div>'),et=e.from_html('<div class="LeaderboardWrapper svelte-75jgrh"><!> <table class="LeaderboardTable svelte-75jgrh"><thead class="LeaderboardTableHeader svelte-75jgrh"><tr class="svelte-75jgrh"><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th><th class="svelte-75jgrh"> </th></tr></thead><tbody class="LeaderboardTableBody svelte-75jgrh"><!></tbody></table> <!></div>');const tt={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;}.PlayerRankWrapper.svelte-75jgrh {display:flex;flex-direction:column;gap:5px;margin-top:20px;.PlayerRankLabels:where(.svelte-75jgrh), .PlayerRankData:where(.svelte-75jgrh) {display:grid;grid-template-columns:1fr 1fr 2fr;padding:6px;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:400;& > span:where(.svelte-75jgrh):last-child{justify-self:end;}p:where(.svelte-75jgrh) {width:max-content;}}.PlayerRankData:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;padding:12px;}}.PaginationWrapper.svelte-75jgrh {display:flex;justify-content:space-between;.PageNumberWrapper:where(.svelte-75jgrh) {display:flex;gap:6px;}.PaginationButton:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography, #ffffff);border-radius:6px;border:none;outline:none;padding:10px;width:auto;cursor:pointer;&.Number {background-color:transparent;min-width:0;padding:0 10px;}&:hover {background-color:var(--emw-color-bg-elements, #4A4A4A);cursor:pointer;}&:active {transform:scale(0.9);}&:disabled {opacity:60%;pointer-events:none;}&.Active {background-color:var(--emw-color-bg-elements, #4A4A4A);}&.Elipsis {pointer-events:none;background-color:transparent;min-width:0;padding:0;align-self:center;}}}.LeaderboardTable.svelte-75jgrh {border-collapse:separate;border-spacing:0 12px;width:100%;table-layout:fixed;.PlayerRow:where(.svelte-75jgrh) {color:#F9C408;}thead:where(.svelte-75jgrh) th:where(.svelte-75jgrh) {background:transparent;padding:6px 16px;text-align:center;font-weight:400;color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;}tbody:where(.svelte-75jgrh) tr:where(.svelte-75jgrh) {background-color:var(--emw-color-bg-section, #434343);color:var(--emw-color-typography-secondary, #bdbdbd);font-size:14px;font-weight:500;&:last-child{justify-self:end;}}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh) {padding:12px;background-color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):first-child {border-top-left-radius:8px;border-bottom-left-radius:8px;width:15%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(2) {width:35%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):nth-child(3) {width:20%;}tbody:where(.svelte-75jgrh) td:where(.svelte-75jgrh):last-child {border-top-right-radius:8px;border-bottom-right-radius:8px;width:30%;}th:where(.svelte-75jgrh), td:where(.svelte-75jgrh) {text-align:center;vertical-align:middle;}tbody:where(.svelte-75jgrh) tr.Gold:where(.svelte-75jgrh){background:linear-gradient(to right, #a2851a, color-mix(in srgb, #a2851a 50%, var(--emw-color-bg-secondary, #434343) 50%), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Silver:where(.svelte-75jgrh) {background:linear-gradient(to right, #b0aeae, color-mix(in srgb, #b0aeae, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}tbody:where(.svelte-75jgrh) tr.Bronze:where(.svelte-75jgrh) {background:linear-gradient(to right, #ac763c, color-mix(in srgb, #ac763c, var(--emw-color-bg-secondary, #434343)), var(--emw-color-bg-secondary, #434343));}}.EmptyLeaderboard.svelte-75jgrh {background-color:var(--emw-color-bg-secondary, #333232);color:var(--emw-color-typography-secondary, #bdbdbd);width:100%;border-radius:8px;margin:10px 0;text-align:center;padding:10px 0;}.SkeletonRow.svelte-75jgrh {height:41px;background:linear-gradient(
|
|
10
|
+
90deg,
|
|
11
|
+
#f0f0f0 25%,
|
|
12
|
+
#e0e0e0 50%,
|
|
13
|
+
#f0f0f0 75%
|
|
14
|
+
);background-size:200% 100%;
|
|
15
|
+
animation: svelte-75jgrh-loading 1.5s infinite;border-radius:4px;}.PaginationSkeleton.svelte-75jgrh {display:flex;justify-content:space-between;gap:6px;}.PaginationSkeletonButton.svelte-75jgrh {width:80px;height:40px;border-radius:6px;background-color:var(--emw-color-bg-elements, #4A4A4A);overflow:hidden;position:relative;}.PaginationNumberSkeleton.svelte-75jgrh {width:40px;height:40px;border-radius:6px;background-color:var(--emw-color-bg-elements, #4A4A4A);overflow:hidden;position:relative;}.SkeletonShimmer.svelte-75jgrh {width:100%;height:100%;background:linear-gradient(
|
|
16
|
+
90deg,
|
|
17
|
+
transparent 0%,
|
|
18
|
+
var(--emw-color-bg-secondary, #434343) 50%,
|
|
19
|
+
transparent 100%
|
|
20
|
+
);
|
|
21
|
+
animation: svelte-75jgrh-loading 1.5s infinite;transform:translateX(-100%);}
|
|
22
|
+
|
|
23
|
+
@keyframes svelte-75jgrh-loading {
|
|
24
|
+
0% {
|
|
25
|
+
transform: translateX(-100%);
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
transform: translateX(100%);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (min-width: 1000px) {.ShowPlayersButton.svelte-75jgrh {display:block;width:300px;margin:auto;background-color:var(--emw-color-bg-primary, #212121);}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (min-width: 750px) {.PaginationWrapper.svelte-75jgrh, .PaginationSkeleton.svelte-75jgrh {justify-content:end;gap:10px;}.PaginationButton.svelte-75jgrh {min-width:75px;}
|
|
36
|
+
}`};function He(ee,U){e.push(U,!0),e.append_styles(ee,tt);const g=()=>e.store_get(e.$format,"$_",X),[X,te]=e.setup_stores(),_=e.prop(U,"endpoint"),J=e.prop(U,"language",7,"en"),q=e.prop(U,"session"),W=e.prop(U,"tournamentid"),A=e.prop(U,"platform");Object.keys(Ie).forEach(r=>{ze(r,Ie[r])});const Ae=()=>{Ue(J())};e.user_effect(()=>{Ae()});let C=null,ae=e.state(void 0),K=e.state(!1),ve=e.state(!1),G=e.state(void 0),O=e.state(0),L=e.state(10),oe=e.state(void 0),T=e.state(void 0);const B=()=>{if(de.has(e.get(le)))return;e.set(K,!0);const r=new URL(`${_()}/v1/tournaments/${W()}/leaderboard`),n=new Headers;q()&&n.append("X-SessionId",q()),r.searchParams.append("language",J()),r.searchParams.append("platform",A()),r.searchParams.append("pagination",`offset=${e.get(O)},limit=${e.get(L)}`),fetch(r).then(a=>a.json()).then(a=>{e.set(ae,a==null?void 0:a.items,!0),e.set(oe,a==null?void 0:a.pages,!0),e.set(T,a==null?void 0:a.total,!0),de.set(e.get(le),e.get(ae))}).catch(a=>console.log(a)).finally(()=>e.set(K,!1))},we=r=>{const n=JSON.parse(r.data);n&&n.messageType==="LeaderBoardUpdate"&&e.set(ae,n==null?void 0:n.items,!0)},se=()=>{C&&(C.close(),C=null);const r=new URL(`${_()}/v1/tournaments/${W()}/leaderboard/updates`);r.searchParams.append("HeartBeat","false"),r.searchParams.append("language",J()),r.searchParams.append("filter","includeUnqualifiedPlayer=true"),r.searchParams.append("pagination",`offset=${e.get(O)},limit=${e.get(L)}`),r.searchParams.append("platform",A()),C=new Xe.EventSourcePolyfill(r,{headers:{accept:"text/event-stream","X-SessionId":q()}}),C.onmessage=we},xe=()=>{e.set(ve,!0);const r=new URL(`${_()}/v1/tournaments/leaderboard/player`),n=new Headers;r.searchParams.append("language",J()),r.searchParams.append("platform",A()),r.searchParams.append("filter","includeUnqualifiedPlayer=false"),q()&&n.append("X-SessionId",q()),fetch(r,{method:"GET",headers:n}).then(v=>v.json()).then(v=>{var c;const d=(c=v==null?void 0:v.items)==null?void 0:c.find(h=>{var l;return((l=h==null?void 0:h.tournament)==null?void 0:l.id)===W()});e.set(G,d==null?void 0:d.leaderBoard,!0)}).catch(v=>{console.log(v)}).finally(()=>e.set(ve,!1))},je=()=>{var r;(r=e.get(oe))!=null&&r.next&&(e.set(O,e.get(O)+e.get(L)),B(),se())},Se=()=>{var r;(r=e.get(oe))!=null&&r.previous&&e.get(O)!==0&&(e.set(O,e.get(O)-e.get(L)),B(),se())},ie=r=>{e.set(O,(r-1)*e.get(L)),B(),se()},Ee=()=>{const r=Math.ceil(e.get(T)/e.get(L)),n=Math.floor(e.get(O)/e.get(L))+1;if(r<=5)return Array.from({length:r},(v,d)=>d+1);const a=[];return a.push(1),n<=3?(a.push(2,3),a.push("..."),a.push(r)):n>=r-2?(a.push("..."),a.push(r-2,r-1,r)):(a.push("..."),a.push(n-1,n,n+1),a.push("..."),a.push(r)),a},re=e.user_derived(Ee),le=e.user_derived(()=>Math.floor(e.get(O)/e.get(L))+1);let de=new Map,ke=e.user_derived(()=>{var r;return(r=de.get(e.get(le)))!=null?r:[]});const ue=(r,n)=>{const a=[];return n&&a.push("PlayerRow"),r===1&&a.push("Gold"),r===2&&a.push("Silver"),r===3&&a.push("Bronze"),a.join(" ")};e.onMount(()=>(B(),xe(),se(),()=>{C==null||C.close(),C=null}));var $={get endpoint(){return _()},set endpoint(r){_(r),e.flushSync()},get language(){return J()},set language(r="en"){J(r),e.flushSync()},get session(){return q()},set session(r){q(r),e.flushSync()},get tournamentid(){return W()},set tournamentid(r){W(r),e.flushSync()},get platform(){return A()},set platform(r){A(r),e.flushSync()}},V=et(),ne=e.child(V);{var pe=r=>{var n=Ge(),a=e.child(n),v=e.child(a),d=e.child(v,!0);e.reset(v);var c=e.sibling(v,2),h=e.child(c,!0);e.reset(c);var l=e.sibling(c,2),f=e.child(l,!0);e.reset(l),e.reset(a);var p=e.sibling(a,2),w=e.child(p);{var y=u=>{var m=qe(),x=e.first_child(m),k=e.child(x);e.reset(x);var M=e.sibling(x,2),j=e.child(M,!0);e.reset(M);var z=e.sibling(M,2),H=e.child(z,!0);e.reset(z),e.template_effect(()=>{var Re;e.set_text(k,`${(Re=e.get(G).rank)!=null?Re:""}.`),e.set_text(j,e.get(G).score),e.set_text(H,e.get(G).prizeName||"-")}),e.append(u,m)},b=u=>{var m=We(),x=e.child(m,!0);e.reset(m),e.template_effect(k=>e.set_text(x,k),[()=>g()("notEnrolledRank")]),e.append(u,m)};e.if_block(w,u=>{e.get(G)?u(y):u(b,!1)})}e.reset(p),e.reset(n),e.template_effect((u,m,x)=>{e.set_text(d,u),e.set_text(h,m),e.set_text(f,x)},[()=>g()("myRanking"),()=>g()("points"),()=>g()("prize")]),e.append(r,n)};e.if_block(ne,r=>{e.get(ve)||r(pe)})}var I=e.sibling(ne,2),ce=e.child(I),ge=e.child(ce),me=e.child(ge),Ce=e.child(me,!0);e.reset(me);var ye=e.sibling(me),Le=e.child(ye,!0);e.reset(ye);var he=e.sibling(ye),be=e.child(he,!0);e.reset(he);var Q=e.sibling(he),N=e.child(Q,!0);e.reset(Q),e.reset(ge),e.reset(ce);var Pe=e.sibling(ce),Ne=e.child(Pe);{var De=r=>{var n=e.comment(),a=e.first_child(n);e.each(a,17,()=>Array(e.get(L)),e.index,(v,d,c,h)=>{var l=$e();e.append(v,l)}),e.append(r,n)},Te=r=>{var n=e.comment(),a=e.first_child(n);{var v=c=>{var h=e.comment(),l=e.first_child(h);e.each(l,17,()=>e.get(ke),f=>f.rank,(f,p)=>{var w=Ve(),y=e.child(w),b=e.child(y);e.reset(y);var u=e.sibling(y),m=e.child(u,!0);e.reset(u);var x=e.sibling(u),k=e.child(x,!0);e.reset(x);var M=e.sibling(x),j=e.child(M,!0);e.reset(M),e.reset(w),e.template_effect(z=>{var H;e.set_class(w,1,z,"svelte-75jgrh"),e.set_text(b,`${(H=e.get(p).rank)!=null?H:""}.`),e.set_text(m,e.get(p).shortName||"-"),e.set_text(k,e.get(p).score||"-"),e.set_text(j,e.get(p).prizeName||"-")},[()=>{var z;return e.clsx(ue(e.get(p).rank,e.get(p).rank===((z=e.get(G))==null?void 0:z.rank)))}]),e.append(f,w)}),e.append(c,h)},d=c=>{var h=Je(),l=e.child(h),f=e.child(l),p=e.child(f),w=e.child(p,!0);e.reset(p),e.reset(f),e.reset(l),e.reset(h),e.template_effect(y=>e.set_text(w,y),[()=>g()("emptyLeaderboard")]),e.append(c,h)};e.if_block(a,c=>{var h;((h=e.get(ae))==null?void 0:h.length)>0?c(v):c(d,!1)},!0)}e.append(r,n)};e.if_block(Ne,r=>{e.get(K)?r(De):r(Te,!1)})}e.reset(Pe),e.reset(I);var t=e.sibling(I,2);{var s=r=>{var n=Ye(),a=e.child(n);a.__click=Se;var v=e.child(a,!0);e.reset(a);var d=e.sibling(a,2);e.each(d,21,()=>e.get(re),e.index,(l,f)=>{var p=e.comment(),w=e.first_child(p);{var y=u=>{var m=Ke();e.append(u,m)},b=u=>{var m=Qe();let x;m.__click=()=>ie(e.get(f));var k=e.child(m,!0);e.reset(m),e.template_effect(()=>{x=e.set_class(m,1,"PaginationButton Number svelte-75jgrh",null,x,{Active:e.get(f)===e.get(le)}),e.set_text(k,e.get(f))}),e.append(u,m)};e.if_block(w,u=>{typeof e.get(f)!="number"?u(y):u(b,!1)})}e.append(l,p)}),e.reset(d);var c=e.sibling(d,2);c.__click=je;var h=e.child(c,!0);e.reset(c),e.reset(n),e.template_effect((l,f)=>{var p,w;a.disabled=!((p=e.get(oe))!=null&&p.previous),e.set_text(v,l),c.disabled=!((w=e.get(oe))!=null&&w.next),e.set_text(h,f)},[()=>g()("previousButton"),()=>g()("nextButton")]),e.append(r,n)},i=r=>{var n=Ze();e.append(r,n)};e.if_block(t,r=>{!e.get(K)&&e.get(T)>e.get(L)?r(s):r(i,!1)})}e.reset(V),e.template_effect((r,n,a,v)=>{e.set_text(Ce,r),e.set_text(Le,n),e.set_text(be,a),e.set_text(N,v)},[()=>g()("rank"),()=>g()("user"),()=>g()("points"),()=>g()("prize")]),e.append(ee,V);var o=e.pop($);return te(),o}e.delegate(["click"]);e.create_custom_element(He,{endpoint:{},language:{},session:{},tournamentid:{},platform:{}},[],[],!0);exports.default=He;
|
|
@@ -0,0 +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-BsjnqhIP.cjs")).then(e=>e.TournamentDetailsPage_ce).then(({default:e})=>{!customElements.get("tournament-details-page")&&customElements.define("tournament-details-page",e.element)})}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
if (typeof window != "undefined") {
|
|
2
|
+
let n = function(e) {
|
|
3
|
+
return function(...s) {
|
|
4
|
+
try {
|
|
5
|
+
return e.apply(this, s);
|
|
6
|
+
} catch (t) {
|
|
7
|
+
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"))
|
|
8
|
+
return !1;
|
|
9
|
+
throw t;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/TournamentDetailsPage-DnknTo0Y.js").then((e) => e.T).then(({ default: e }) => {
|
|
14
|
+
!customElements.get("tournament-details-page") && customElements.define("tournament-details-page", e.element);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { T as s } from "../components/TournamentDetailsPage-BlWvqhbK.js";
|
|
2
|
+
function a(t) {
|
|
3
|
+
return function(...n) {
|
|
4
|
+
try {
|
|
5
|
+
return t.apply(this, n);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
8
|
+
return !1;
|
|
9
|
+
throw e;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
customElements.define = a(customElements.define);
|
|
14
|
+
!customElements.get("tournament-details-page") && customElements.define("tournament-details-page", s.element);
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@everymatrix/tournament-details-page",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "es2015/tournament-details-page.cjs",
|
|
6
|
+
"module": "esnext/tournament-details-page.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./esnext/tournament-details-page.js",
|
|
10
|
+
"require": "./es2015/tournament-details-page.cjs"
|
|
11
|
+
},
|
|
12
|
+
"./es2015/tournament-details-page.cjs": "./es2015/tournament-details-page.cjs",
|
|
13
|
+
"./es2015/tournament-details-page.js": "./es2015/tournament-details-page.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"components/",
|
|
17
|
+
"es2015/",
|
|
18
|
+
"stencil",
|
|
19
|
+
"angular",
|
|
20
|
+
"esnext/"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
}
|
|
25
|
+
}
|