@everymatrix/casino-tournament-prizes 1.31.1 → 1.32.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/casino-tournament-prizes/casino-tournament-prizes.esm.js +0 -1
  4. package/dist/casino-tournament-prizes/index.esm.js +0 -0
  5. package/dist/casino-tournament-prizes/p-0c9dcd23.entry.js +0 -1
  6. package/dist/casino-tournament-prizes/p-44cdb103.js +0 -1
  7. package/dist/cjs/casino-tournament-prizes.cjs.entry.js +0 -177
  8. package/dist/cjs/casino-tournament-prizes.cjs.js +0 -19
  9. package/dist/cjs/index-edbd2afe.js +0 -1195
  10. package/dist/cjs/index.cjs.js +0 -2
  11. package/dist/cjs/loader.cjs.js +0 -21
  12. package/dist/collection/collection-manifest.json +0 -12
  13. package/dist/collection/components/casino-tournament-prizes/casino-tournament-prizes.css +0 -100
  14. package/dist/collection/components/casino-tournament-prizes/casino-tournament-prizes.js +0 -319
  15. package/dist/collection/index.js +0 -1
  16. package/dist/collection/utils/locale.utils.js +0 -58
  17. package/dist/collection/utils/utils.js +0 -3
  18. package/dist/components/casino-tournament-prizes.d.ts +0 -11
  19. package/dist/components/casino-tournament-prizes.js +0 -205
  20. package/dist/components/index.d.ts +0 -26
  21. package/dist/components/index.js +0 -1
  22. package/dist/esm/casino-tournament-prizes.entry.js +0 -173
  23. package/dist/esm/casino-tournament-prizes.js +0 -17
  24. package/dist/esm/index-fd6b56d4.js +0 -1169
  25. package/dist/esm/index.js +0 -1
  26. package/dist/esm/loader.js +0 -17
  27. package/dist/esm/polyfills/core-js.js +0 -11
  28. package/dist/esm/polyfills/css-shim.js +0 -1
  29. package/dist/esm/polyfills/dom.js +0 -79
  30. package/dist/esm/polyfills/es5-html-element.js +0 -1
  31. package/dist/esm/polyfills/index.js +0 -34
  32. package/dist/esm/polyfills/system.js +0 -6
  33. package/dist/index.cjs.js +0 -1
  34. package/dist/index.js +0 -1
  35. package/dist/stencil.config.js +0 -22
  36. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/casino-tournament-prizes/.stencil/packages/casino-tournament-prizes/stencil.config.d.ts +0 -2
  37. package/dist/types/components/casino-tournament-prizes/casino-tournament-prizes.d.ts +0 -24
  38. package/dist/types/components.d.ts +0 -55
  39. package/dist/types/index.d.ts +0 -1
  40. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  41. package/dist/types/utils/locale.utils.d.ts +0 -1
  42. package/dist/types/utils/utils.d.ts +0 -1
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-tournament-prizes",
3
- "version": "1.31.1",
3
+ "version": "1.32.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -15,5 +15,6 @@
15
15
  ],
16
16
  "publishConfig": {
17
17
  "access": "public"
18
- }
18
+ },
19
+ "gitHead": "69a4e0bb1b0460c07baef352d283492a6e2dc4b0"
19
20
  }
@@ -1 +0,0 @@
1
- import{p as e,b as n}from"./p-44cdb103.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((e=>n([["p-0c9dcd23",[[1,"casino-tournament-prizes",{language:[1],useGroup:[4,"use-group"],useEvent:[4,"use-event"],endpoint:[1],session:[1],rawPrizes:[1,"raw-prizes"],tournamentId:[1,"tournament-id"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],limitStylingAppends:[32],prizes:[32],prizeGroups:[32],initialLoad:[32]},[[10,"getTournamentInfoCompleted","infoCompletedHandler"]]]]]],e)));
File without changes
@@ -1 +0,0 @@
1
- import{r as i,h as e,g as s}from"./p-44cdb103.js";const t={en:{prizes:"Prizes",noprizes:"No available prizes",place:"place"},"zh-hk":{prizes:"獎品",noprizes:"沒有可用的獎品",place:"place"},fr:{prizes:"Prix",noprizes:"Aucun prix disponible",place:"place"},ro:{prizes:"Premii",noprizes:"Nu sunt disponibile premii",place:"poziție"},tr:{prizes:"Ödüller",noprizes:"Geçerli ödül yok",place:"Sıra"},el:{prizes:"Έπαθλα",noprizes:"Μη διαθέσιμα έπαθλα",place:"θέση"},es:{prizes:"Premios",noprizes:"No hay premios disponibles",place:"posición"},hu:{prizes:"Nyeremények",noprizes:"Nincs elérhető nyeremény",place:"helyezés"},pt:{prizes:"Prêmios",noprizes:"Não há prêmios disponíveis",place:"place"},hr:{prizes:"Nagrade",noprizes:"Nema dostupnih nagrada",place:"mjesto"}},r=(i,e)=>{var s,r;return(null===(s=t[e])||void 0===s?void 0:s[i])||(null===(r=t.en)||void 0===r?void 0:r[i])},a=class{constructor(e){i(this,e),this.useGroup=!1,this.useEvent=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.prizes=[],this.prizeGroups=[],this.initialLoad=!1}infoCompletedHandler(i){i.detail&&(this.prizes=i.detail.prizes,this.formatGroup(),this.initialLoad=!0)}formatGroup(){this.prizes.forEach((i=>{let e=[];if(i.count>0)for(let s=0;s<i.count;s++)e.push({name:i.name,rank:i.rank+s});this.prizeGroups.push(e)}))}getTournamentInfo(){let i=new URL(this.endpoint+`/v1/tournaments/${this.tournamentId}`),e=new Headers;i.searchParams.append("expand","games"),i.searchParams.append("language",this.language),i.searchParams.append("fields","playerEnrolled,games(id,name,thumbnail)"),this.session&&e.append("X-SessionId",this.session),fetch(i.href,{method:"GET",headers:e}).then((i=>i.json())).then((i=>{this.prizes=i.item.prizes,this.useGroup&&this.formatGroup(),this.initialLoad=!0}))}componentWillLoad(){!this.useEvent&&this.rawPrizes&&(this.prizes=JSON.parse(this.rawPrizes),this.useGroup&&this.formatGroup(),this.initialLoad=!0),!this.useEvent&&this.endpoint&&this.tournamentId&&this.getTournamentInfo()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}setClientStyling(){const i=new CSSStyleSheet;i.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,i]}setClientStylingURL(){let i=new URL(this.clientStylingUrl);fetch(i.href).then((i=>i.text())).then((i=>{const e=new CSSStyleSheet;e.replace(i),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,e]}))}render(){return e("div",{class:"TournamentPrizes "+(this.useGroup?"":"PrizeView")},this.initialLoad&&!this.useGroup&&e("div",{class:"PrizeTitle"},e("svg",{class:"PrizeIcon",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"27.454",viewBox:"0 0 30 27.454"},e("path",{d:"M35.84,12.887a1.023,1.023,0,0,0-.853-.481h-5.2l.242-1.456a1.023,1.023,0,0,0-1.023-1.19H12.977a1.023,1.023,0,0,0-1.023,1.19l.242,1.456H7.022a1.023,1.023,0,0,0-.921,1.47l2.967,6.077a6.48,6.48,0,0,0,5.163,3.581,7.227,7.227,0,0,0,3.7,3.963v2.667h-.426a3.525,3.525,0,1,0,0,7.049H24.5a3.525,3.525,0,1,0,0-7.049h-.426V27.5a7.227,7.227,0,0,0,3.7-3.963,6.48,6.48,0,0,0,5.167-3.581L35.9,13.876a1.023,1.023,0,0,0-.058-.989ZM10.914,19.05l-2.241-4.6h3.891l1.153,6.916A4.406,4.406,0,0,1,10.914,19.05ZM25.977,33.687A1.477,1.477,0,0,1,24.5,35.164H17.509a1.478,1.478,0,0,1,0-2.957H24.5A1.48,1.48,0,0,1,25.977,33.687Zm-3.949-3.526H19.982V28.094a6.729,6.729,0,0,0,2.046,0Zm4.123-8.383a5.218,5.218,0,0,1-10.293,0L14.184,11.8H27.826ZM31.1,19.05a4.406,4.406,0,0,1-2.8,2.309l1.153-6.916h3.891Z",transform:"translate(-5.999 -9.76)"})),e("div",{class:"Title"},r("prizes",this.language))),this.initialLoad&&this.useGroup&&e("div",{class:"GroupPrizeTitle"},e("svg",{class:"PrizeIcon",xmlns:"http://www.w3.org/2000/svg",width:"19",height:"16",viewBox:"0 0 19 16",fill:"none"},e("g",{"clip-path":"url(#clip0_2459_42455)"},e("path",{d:"M14.7476 2.84132V0.664551H4.03327V2.84132H0.818359V5.01946C0.818359 6.8229 2.2568 8.28496 4.0326 8.28496C4.36862 8.28496 4.69326 8.23192 4.99647 8.13399C5.76958 9.25604 6.94898 10.07 8.31782 10.3516V13.7266H7.24685C6.06276 13.7266 5.1029 14.701 5.1029 15.9026H13.6753C13.6753 14.7004 12.7168 13.7266 11.5327 13.7266H10.4611V10.3516C11.8293 10.07 13.0087 9.25672 13.7818 8.13399C14.0863 8.23124 14.4116 8.28496 14.7463 8.28496C16.5214 8.28496 17.9612 6.8229 17.9612 5.01946V2.84132H14.7476ZM4.03327 6.99222C2.9623 6.99222 2.0908 6.10751 2.0908 5.01946V3.93005H4.03327V5.01946C4.03327 5.70221 4.15844 6.3564 4.38401 6.9589C4.27089 6.9793 4.15175 6.99086 4.03327 6.99086V6.99222ZM11.0207 5.88989L12.0414 9.06223L9.38945 7.09355L6.7368 9.06223L7.75757 5.88989L5.09688 3.93481L8.3814 3.94229L9.38945 0.767235L10.3968 3.94229L13.6814 3.93481L11.0207 5.88989ZM16.6901 5.01946C16.6901 6.10683 15.8193 6.99222 14.7483 6.99222C14.6285 6.99222 14.512 6.9793 14.3982 6.95958C14.6245 6.3564 14.7483 5.70357 14.7483 5.02014V3.93073H16.6901V5.02014V5.01946Z",fill:"white"})),e("defs",null,e("clipPath",{id:"clip0_2459_42455"},e("rect",{width:"18.2857",height:"16",fill:"white",transform:"translate(0.5)"})))),e("div",{class:"Title"},r("prizes",this.language))),e("div",{class:"PrizeGroups"},1==this.useGroup&&this.prizeGroups&&this.prizeGroups.map(((i,s)=>e("div",{class:`PrizeGroup Group${s+1}`},i&&i.map(((i,s)=>e("div",{class:"PrizeRow"},e("div",{class:`PrizeItem Rank${s+1}`},e("span",{class:"PrizeRank"},i.rank," ",r("place",this.language)," "),e("span",{class:"PrizeName"},i.name)))))))),0==this.useGroup&&this.prizes&&this.prizes.map(((i,s)=>e("div",{class:`Prize Prize${s}`},e("p",{class:"PrizeText"},e("span",{class:"PrizeRank"},i.count>1?`${i.rank}~${i.rank+i.count-1}`:i.rank)," ",r("place",this.language),": ",i.name)))),!this.prizes&&e("p",null,r("noprizes",this.language))))}get host(){return s(this)}};a.style=":host{display:block}.PrizeGroups{color:var(--emfe-w-color-white, #FFFFFF);display:flex;gap:20px;font-size:14px}.PrizeGroup{flex:1;background:var(--emfe-w-tournament-color-bg, #153a5c)}.PrizeTitle{text-align:center;width:100%}.GroupPrizeTitle{width:100%;display:flex;padding:8px 6px;gap:8px;justify-content:center}.PrizeView{display:flex;gap:10px;font-size:12px}.PrizeView .PrizeTitle{display:inline-block;width:auto}.PrizeView .PrizeGroups{display:inline-flex}.Title{text-align:center;color:var(--emfe-w-color-white, #FFFFFF)}.PrizeIcon path{fill:var(--emfe-w-color-white, #FFFFFF)}.PrizeRow{padding:8px;border-bottom:1px solid rgba(206, 210, 214, 0.15)}.PrizeItem{display:flex;justify-content:space-between;padding:6px;font-size:12px;border-radius:2px}.Group1 .Rank1{background:#7e6c22}.Group1 .Rank2{background:#666}.Group1 .Rank3{background:#6a5446}.Prizes{padding-left:20px;flex-wrap:wrap;display:flex;gap:20px;width:100%;min-height:50px;padding-top:8px}.Prize{flex-grow:1;color:var(--emfe-w-color-gray-300, #58586B)}.Prize.Prize0 span{color:#FECF00}.Prize.Prize1 span{color:#D9B206}.Prize.Prize2 span{color:#9B8007}.Prize p{color:var(--emfe-w-color-white, #FFFFFF)}";export{a as casino_tournament_prizes}
@@ -1 +0,0 @@
1
- let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},i=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),i=a(t,s),c=h(n);r.ael(o,l,i,c),(t.o=t.o||[]).push((()=>r.rel(o,l,i,c)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){I(e)}},f=(e,t)=>8&t?s:e,h=e=>0!=(2&e),$=new WeakMap,p=e=>"sc-"+e.h,d={},m=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?r[r.length-1].$+=l:r.push(s?w(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=w(e,null);return c.p=t,r.length>0&&(c.m=r),c},w=(e,t)=>({t:0,g:e,$:t,v:null,m:null,p:null}),b={},g=(e,t,n,l,s,o)=>{if(n!==l){let r=G(e,t);if(t.toLowerCase(),"class"===t){const t=e.classList,s=S(n),o=S(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else{const i=m(l);if((r||i&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&o||s)&&!i&&e.setAttribute(t,l=!0===l?"":l)}}},v=/\s/,S=e=>e?e.split(v):[],j=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.p||d,r=t.p||d;for(l in o)l in r||g(s,l,o[l],void 0,n,t.t);for(l in r)g(s,l,o[l],r[l],n,t.t)},O=(t,l,s)=>{let r,i,c=l.m[s],u=0;if(null!==c.$)r=c.v=o.createTextNode(c.$);else{if(n||(n="svg"===c.g),r=c.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.g),n&&"foreignObject"===c.g&&(n=!1),j(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.m)for(u=0;u<c.m.length;++u)i=O(t,c,u),i&&r.appendChild(i);"svg"===c.g?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},M=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=O(null,l,o),i&&(s[o].v=i,c.insertBefore(i,n)))},k=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.v.remove()},C=(e,t)=>e.g===t.g,x=(e,t)=>{const l=t.v=e.v,s=e.m,o=t.m,r=t.g,i=t.$;null===i?(n="svg"===r||"foreignObject"!==r&&n,j(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],h=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==h?h=l[--a]:C(c,f)?(x(c,f),c=t[++o],f=l[++r]):C(u,h)?(x(u,h),u=t[--i],h=l[--a]):C(c,h)?(x(c,h),e.insertBefore(c.v,u.v.nextSibling),c=t[++o],h=l[--a]):C(u,f)?(x(u,f),e.insertBefore(u.v,c.v),u=t[--i],f=l[++r]):(s=O(t&&t[r],n,r),f=l[++r],s&&c.v.parentNode.insertBefore(s,c.v));o>i?M(e,null==l[a+1]?null:l[a+1].v,n,l,r,a):r>a&&k(t,o,i)})(l,s,t,o):null!==o?(null!==e.$&&(l.textContent=""),M(l,null,t,o,0,o.length-1)):null!==s&&k(s,0,s.length-1),n&&"svg"===r&&(n=!1)):e.$!==i&&(l.data=i)},P=e=>V(e).S,E=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},L=(e,t)=>{if(e.t|=16,!(4&e.t))return E(e,e.O),le((()=>N(e,t)));e.t|=512},N=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>U(n,e,t))),e.u=null),l=U(n,"componentWillLoad")),q(l,(()=>R(e,n,t)))},R=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,s=((e,t)=>{let n=p(t),l=Q.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=$.get(e=e.head||e);s||$.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);T(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>W(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},T=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.k||w(null,null),r=(e=>e&&e.g===b)(l)?l:y(null,null,l);t=s.tagName,r.g=null,r.t|=4,n.k=r,r.v=o.v=s.shadowRoot||s,e=s["s-sc"],x(o,r)})(n,l)}catch(e){I(e,n.S)}return null},W=e=>{const t=e.S,n=e.O;U(e.i,"componentDidRender"),64&e.t||(e.t|=64,z(t),e.C(t),n||A()),e.j&&(e.j(),e.j=void 0),512&e.t&&ne((()=>L(e,!1))),e.t&=-517},A=()=>{z(o.documentElement),ne((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"casino-tournament-prizes"}});return e.dispatchEvent(t),t})(s)))},U=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){I(e)}},q=(e,t)=>e&&e.then?e.then(t):t(),z=e=>e.classList.add("hydrated"),D=(e,t,n)=>{if(t.P){const l=Object.entries(t.P),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>V(this).L.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=V(e),o=s.L.get(t),r=s.t,i=s.i;n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.P[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.L.set(t,n),i&&2==(18&r)&&L(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){r.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},F=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let d,m=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],P:t[2],N:t[3]};s.P=t[2],s.N=t[3];const o=s.h,a=class extends HTMLElement{constructor(e){super(e),B(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),m?$.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=V(e),n=t.M,l=()=>{};if(1&t.t)u(e,t,n.N);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){E(t,t.O=n);break}}n.P&&Object.entries(n.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=K(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(D(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){I(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=p(n);if(!Q.has(t)){const l=()=>{};((e,t,n)=>{let l=Q.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,Q.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,r=()=>L(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{if(0==(1&r.t)){const e=V(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return V(this).R}};s.T=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,D(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):r.jmp((()=>d=setTimeout(A,30)))},H=new WeakMap,V=e=>H.get(e),_=(e,t)=>H.set(t.i=e,t),B=(e,t)=>{const n={t:0,S:e,M:t,L:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],u(e,n,t.N),H.set(e,n)},G=(e,t)=>t in e,I=(e,t)=>(0,console.error)(e,t),J=new Map,K=e=>{const t=e.h.replace(/-/g,"_"),n=e.T,l=J.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(J.set(n,e),e[t])),I)},Q=new Map,X=[],Y=[],Z=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?ne(te):r.raf(te))},ee=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){I(e)}e.length=0},te=()=>{ee(X),ee(Y),(l=X.length>0)&&r.raf(te)},ne=e=>i().then(e),le=Z(Y,!0);export{F as b,P as g,y as h,i as p,_ as r}
@@ -1,177 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-edbd2afe.js');
6
-
7
- const DEFAULT_LANGUAGE = 'en';
8
- const TRANSLATIONS = {
9
- en: {
10
- prizes: 'Prizes',
11
- noprizes: 'No available prizes',
12
- place: 'place',
13
- },
14
- 'zh-hk': {
15
- prizes: '獎品',
16
- noprizes: '沒有可用的獎品',
17
- place: 'place', // need translation
18
- },
19
- fr: {
20
- prizes: 'Prix',
21
- noprizes: 'Aucun prix disponible',
22
- place: 'place', // need translation
23
- },
24
- ro: {
25
- prizes: 'Premii',
26
- noprizes: 'Nu sunt disponibile premii',
27
- place: 'poziție',
28
- },
29
- tr: {
30
- prizes: 'Ödüller',
31
- noprizes: 'Geçerli ödül yok',
32
- place: 'Sıra',
33
- },
34
- el: {
35
- prizes: 'Έπαθλα',
36
- noprizes: 'Μη διαθέσιμα έπαθλα',
37
- place: 'θέση',
38
- },
39
- es: {
40
- prizes: 'Premios',
41
- noprizes: 'No hay premios disponibles',
42
- place: 'posición',
43
- },
44
- hu: {
45
- prizes: 'Nyeremények',
46
- noprizes: 'Nincs elérhető nyeremény',
47
- place: 'helyezés',
48
- },
49
- pt: {
50
- prizes: 'Prêmios',
51
- noprizes: 'Não há prêmios disponíveis',
52
- place: 'place', // need translation
53
- },
54
- hr: {
55
- prizes: 'Nagrade',
56
- noprizes: 'Nema dostupnih nagrada',
57
- place: 'mjesto',
58
- }
59
- };
60
- const translate = (key, customLang) => {
61
- var _a, _b;
62
- const lang = customLang;
63
- return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
64
- };
65
-
66
- const casinoTournamentPrizesCss = ":host{display:block}.PrizeGroups{color:var(--emfe-w-color-white, #FFFFFF);display:flex;gap:20px;font-size:14px}.PrizeGroup{flex:1;background:var(--emfe-w-tournament-color-bg, #153a5c)}.PrizeTitle{text-align:center;width:100%}.GroupPrizeTitle{width:100%;display:flex;padding:8px 6px;gap:8px;justify-content:center}.PrizeView{display:flex;gap:10px;font-size:12px}.PrizeView .PrizeTitle{display:inline-block;width:auto}.PrizeView .PrizeGroups{display:inline-flex}.Title{text-align:center;color:var(--emfe-w-color-white, #FFFFFF)}.PrizeIcon path{fill:var(--emfe-w-color-white, #FFFFFF)}.PrizeRow{padding:8px;border-bottom:1px solid rgba(206, 210, 214, 0.15)}.PrizeItem{display:flex;justify-content:space-between;padding:6px;font-size:12px;border-radius:2px}.Group1 .Rank1{background:#7e6c22}.Group1 .Rank2{background:#666}.Group1 .Rank3{background:#6a5446}.Prizes{padding-left:20px;flex-wrap:wrap;display:flex;gap:20px;width:100%;min-height:50px;padding-top:8px}.Prize{flex-grow:1;color:var(--emfe-w-color-gray-300, #58586B)}.Prize.Prize0 span{color:#FECF00}.Prize.Prize1 span{color:#D9B206}.Prize.Prize2 span{color:#9B8007}.Prize p{color:var(--emfe-w-color-white, #FFFFFF)}";
67
-
68
- const CasinoTournamentPrizes = class {
69
- constructor(hostRef) {
70
- index.registerInstance(this, hostRef);
71
- this.useGroup = false;
72
- this.useEvent = false;
73
- this.clientStyling = '';
74
- this.clientStylingUrl = '';
75
- this.limitStylingAppends = false;
76
- this.prizes = [];
77
- this.prizeGroups = [];
78
- this.initialLoad = false;
79
- }
80
- infoCompletedHandler(event) {
81
- if (event.detail) {
82
- this.prizes = event.detail.prizes;
83
- this.formatGroup();
84
- this.initialLoad = true;
85
- }
86
- }
87
- formatGroup() {
88
- const prizes = this.prizes;
89
- prizes.forEach((prize) => {
90
- let array = [];
91
- if (prize.count > 0) {
92
- for (let index = 0; index < prize.count; index++) {
93
- const element = { name: prize.name, rank: prize.rank + index };
94
- array.push(element);
95
- }
96
- }
97
- this.prizeGroups.push(array);
98
- });
99
- }
100
- getTournamentInfo() {
101
- let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
102
- let reqHeaders = new Headers();
103
- url.searchParams.append('expand', 'games');
104
- url.searchParams.append('language', this.language);
105
- url.searchParams.append('fields', 'playerEnrolled,games(id,name,thumbnail)');
106
- if (this.session) {
107
- reqHeaders.append('X-SessionId', this.session);
108
- }
109
- let requestOptions = {
110
- method: 'GET',
111
- headers: reqHeaders,
112
- };
113
- fetch(url.href, requestOptions).then((res) => res.json())
114
- .then((res) => {
115
- this.prizes = res.item.prizes;
116
- if (this.useGroup) {
117
- this.formatGroup();
118
- }
119
- this.initialLoad = true;
120
- });
121
- }
122
- componentWillLoad() {
123
- if (!this.useEvent && this.rawPrizes) {
124
- this.prizes = JSON.parse(this.rawPrizes);
125
- if (this.useGroup) {
126
- this.formatGroup();
127
- }
128
- this.initialLoad = true;
129
- }
130
- if (!this.useEvent && this.endpoint && this.tournamentId) {
131
- this.getTournamentInfo();
132
- }
133
- }
134
- componentDidRender() {
135
- if (!this.limitStylingAppends && this.host) {
136
- if (this.clientStyling)
137
- this.setClientStyling();
138
- if (this.clientStylingUrl)
139
- this.setClientStylingURL();
140
- this.limitStylingAppends = true;
141
- }
142
- }
143
- setClientStyling() {
144
- const sheet = new CSSStyleSheet();
145
- // @ts-ignore
146
- sheet.replace(this.clientStyling);
147
- // @ts-ignore
148
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
149
- }
150
- setClientStylingURL() {
151
- let url = new URL(this.clientStylingUrl);
152
- fetch(url.href)
153
- .then((res) => res.text())
154
- .then((data) => {
155
- const sheet = new CSSStyleSheet();
156
- // @ts-ignore
157
- sheet.replace(data);
158
- // @ts-ignore
159
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
160
- });
161
- }
162
- render() {
163
- {
164
- return index.h("div", { class: `TournamentPrizes ${this.useGroup ? '' : 'PrizeView'}` }, this.initialLoad && !this.useGroup && index.h("div", { class: "PrizeTitle" }, index.h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "30", height: "27.454", viewBox: "0 0 30 27.454" }, index.h("path", { d: "M35.84,12.887a1.023,1.023,0,0,0-.853-.481h-5.2l.242-1.456a1.023,1.023,0,0,0-1.023-1.19H12.977a1.023,1.023,0,0,0-1.023,1.19l.242,1.456H7.022a1.023,1.023,0,0,0-.921,1.47l2.967,6.077a6.48,6.48,0,0,0,5.163,3.581,7.227,7.227,0,0,0,3.7,3.963v2.667h-.426a3.525,3.525,0,1,0,0,7.049H24.5a3.525,3.525,0,1,0,0-7.049h-.426V27.5a7.227,7.227,0,0,0,3.7-3.963,6.48,6.48,0,0,0,5.167-3.581L35.9,13.876a1.023,1.023,0,0,0-.058-.989ZM10.914,19.05l-2.241-4.6h3.891l1.153,6.916A4.406,4.406,0,0,1,10.914,19.05ZM25.977,33.687A1.477,1.477,0,0,1,24.5,35.164H17.509a1.478,1.478,0,0,1,0-2.957H24.5A1.48,1.48,0,0,1,25.977,33.687Zm-3.949-3.526H19.982V28.094a6.729,6.729,0,0,0,2.046,0Zm4.123-8.383a5.218,5.218,0,0,1-10.293,0L14.184,11.8H27.826ZM31.1,19.05a4.406,4.406,0,0,1-2.8,2.309l1.153-6.916h3.891Z", transform: "translate(-5.999 -9.76)" })), index.h("div", { class: "Title" }, translate('prizes', this.language))), this.initialLoad && this.useGroup && index.h("div", { class: "GroupPrizeTitle" }, index.h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "19", height: "16", viewBox: "0 0 19 16", fill: "none" }, index.h("g", { "clip-path": "url(#clip0_2459_42455)" }, index.h("path", { d: "M14.7476 2.84132V0.664551H4.03327V2.84132H0.818359V5.01946C0.818359 6.8229 2.2568 8.28496 4.0326 8.28496C4.36862 8.28496 4.69326 8.23192 4.99647 8.13399C5.76958 9.25604 6.94898 10.07 8.31782 10.3516V13.7266H7.24685C6.06276 13.7266 5.1029 14.701 5.1029 15.9026H13.6753C13.6753 14.7004 12.7168 13.7266 11.5327 13.7266H10.4611V10.3516C11.8293 10.07 13.0087 9.25672 13.7818 8.13399C14.0863 8.23124 14.4116 8.28496 14.7463 8.28496C16.5214 8.28496 17.9612 6.8229 17.9612 5.01946V2.84132H14.7476ZM4.03327 6.99222C2.9623 6.99222 2.0908 6.10751 2.0908 5.01946V3.93005H4.03327V5.01946C4.03327 5.70221 4.15844 6.3564 4.38401 6.9589C4.27089 6.9793 4.15175 6.99086 4.03327 6.99086V6.99222ZM11.0207 5.88989L12.0414 9.06223L9.38945 7.09355L6.7368 9.06223L7.75757 5.88989L5.09688 3.93481L8.3814 3.94229L9.38945 0.767235L10.3968 3.94229L13.6814 3.93481L11.0207 5.88989ZM16.6901 5.01946C16.6901 6.10683 15.8193 6.99222 14.7483 6.99222C14.6285 6.99222 14.512 6.9793 14.3982 6.95958C14.6245 6.3564 14.7483 5.70357 14.7483 5.02014V3.93073H16.6901V5.02014V5.01946Z", fill: "white" })), index.h("defs", null, index.h("clipPath", { id: "clip0_2459_42455" }, index.h("rect", { width: "18.2857", height: "16", fill: "white", transform: "translate(0.5)" })))), index.h("div", { class: "Title" }, translate('prizes', this.language))), index.h("div", { class: "PrizeGroups" }, this.useGroup == true && this.prizeGroups && this.prizeGroups.map((group, groupIndex) => {
165
- return index.h("div", { class: `PrizeGroup Group${groupIndex + 1}` }, group && group.map((prize, prizeIndex) => {
166
- return index.h("div", { class: "PrizeRow" }, index.h("div", { class: `PrizeItem Rank${prizeIndex + 1}` }, index.h("span", { class: "PrizeRank" }, prize.rank, " ", translate('place', this.language), " "), index.h("span", { class: "PrizeName" }, prize.name)));
167
- }));
168
- }), this.useGroup == false && this.prizes && this.prizes.map((prize, prizeIndex) => {
169
- return index.h("div", { class: `Prize Prize${prizeIndex}` }, index.h("p", { class: "PrizeText" }, index.h("span", { class: "PrizeRank" }, prize.count > 1 ? (`${prize.rank}~${prize.rank + prize.count - 1}`) : (prize.rank)), " ", translate('place', this.language), ": ", prize.name));
170
- }), !this.prizes && index.h("p", null, translate('noprizes', this.language))));
171
- }
172
- }
173
- get host() { return index.getElement(this); }
174
- };
175
- CasinoTournamentPrizes.style = casinoTournamentPrizesCss;
176
-
177
- exports.casino_tournament_prizes = CasinoTournamentPrizes;
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-edbd2afe.js');
4
-
5
- /*
6
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
7
- */
8
- const patchBrowser = () => {
9
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-tournament-prizes.cjs.js', document.baseURI).href));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
15
- };
16
-
17
- patchBrowser().then(options => {
18
- return index.bootstrapLazy([["casino-tournament-prizes.cjs",[[1,"casino-tournament-prizes",{"language":[1],"useGroup":[4,"use-group"],"useEvent":[4,"use-event"],"endpoint":[1],"session":[1],"rawPrizes":[1,"raw-prizes"],"tournamentId":[1,"tournament-id"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"prizes":[32],"prizeGroups":[32],"initialLoad":[32]},[[10,"getTournamentInfoCompleted","infoCompletedHandler"]]]]]], options);
19
- });