@everymatrix/casino-tournament-prizes 1.27.9 → 1.28.0
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/dist/casino-tournament-prizes/casino-tournament-prizes.esm.js +1 -1
- package/dist/casino-tournament-prizes/p-374cc663.entry.js +1 -0
- package/dist/casino-tournament-prizes/p-44cdb103.js +1 -0
- package/dist/cjs/casino-tournament-prizes.cjs.entry.js +24 -16
- package/dist/cjs/casino-tournament-prizes.cjs.js +2 -2
- package/dist/cjs/{index-e93b78a6.js → index-edbd2afe.js} +2 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/casino-tournament-prizes/casino-tournament-prizes.js +24 -17
- package/dist/components/casino-tournament-prizes.js +23 -16
- package/dist/esm/casino-tournament-prizes.entry.js +24 -16
- package/dist/esm/casino-tournament-prizes.js +2 -2
- package/dist/esm/{index-dbfbefa7.js → index-fd6b56d4.js} +2 -14
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-tournament-prizes/.stencil/packages/casino-tournament-prizes/stencil.config.d.ts +2 -0
- package/dist/types/components/casino-tournament-prizes/casino-tournament-prizes.d.ts +3 -3
- package/package.json +1 -1
- package/dist/casino-tournament-prizes/p-7408fc25.entry.js +0 -1
- package/dist/casino-tournament-prizes/p-77e12a29.js +0 -1
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/casino-tournament-prizes/.stencil/packages/casino-tournament-prizes/stencil.config.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
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-374cc663",[[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)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as e,g as s}from"./p-44cdb103.js";const t=["ro","en","zh-hk","fr","hu","tr","el","es","pt","hr"],r={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"}},a=(i,e)=>{const s=e;return r[void 0!==s&&t.includes(s)?s:"en"][i]},l=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"},a("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"},a("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," ",a("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)," ",a("place",this.language),": ",i.name)))),!this.prizes&&e("p",null,a("noprizes",this.language))))}get host(){return s(this)}};l.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{l as casino_tournament_prizes}
|
|
@@ -0,0 +1 @@
|
|
|
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}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-edbd2afe.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt', 'hr'];
|
|
@@ -76,18 +76,6 @@ const CasinoTournamentPrizes = class {
|
|
|
76
76
|
this.prizes = [];
|
|
77
77
|
this.prizeGroups = [];
|
|
78
78
|
this.initialLoad = false;
|
|
79
|
-
this.setClientStyling = () => {
|
|
80
|
-
let sheet = document.createElement('style');
|
|
81
|
-
sheet.innerHTML = this.clientStyling;
|
|
82
|
-
this.stylingContainer.prepend(sheet);
|
|
83
|
-
};
|
|
84
|
-
this.setClientStylingURL = () => {
|
|
85
|
-
let cssFile = document.createElement('style');
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
cssFile.innerHTML = this.clientStylingUrl;
|
|
88
|
-
this.stylingContainer.prepend(cssFile);
|
|
89
|
-
}, 1);
|
|
90
|
-
};
|
|
91
79
|
}
|
|
92
80
|
infoCompletedHandler(event) {
|
|
93
81
|
if (event.detail) {
|
|
@@ -110,7 +98,7 @@ const CasinoTournamentPrizes = class {
|
|
|
110
98
|
});
|
|
111
99
|
}
|
|
112
100
|
getTournamentInfo() {
|
|
113
|
-
let url = new URL(this.endpoint + `/tournaments/${this.tournamentId}`);
|
|
101
|
+
let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
|
|
114
102
|
let reqHeaders = new Headers();
|
|
115
103
|
url.searchParams.append('expand', 'games');
|
|
116
104
|
url.searchParams.append('language', this.language);
|
|
@@ -144,7 +132,7 @@ const CasinoTournamentPrizes = class {
|
|
|
144
132
|
}
|
|
145
133
|
}
|
|
146
134
|
componentDidRender() {
|
|
147
|
-
if (!this.limitStylingAppends && this.
|
|
135
|
+
if (!this.limitStylingAppends && this.host) {
|
|
148
136
|
if (this.clientStyling)
|
|
149
137
|
this.setClientStyling();
|
|
150
138
|
if (this.clientStylingUrl)
|
|
@@ -152,9 +140,28 @@ const CasinoTournamentPrizes = class {
|
|
|
152
140
|
this.limitStylingAppends = true;
|
|
153
141
|
}
|
|
154
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
|
+
}
|
|
155
162
|
render() {
|
|
156
163
|
{
|
|
157
|
-
return index.h("div", {
|
|
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) => {
|
|
158
165
|
return index.h("div", { class: `PrizeGroup Group${groupIndex + 1}` }, group && group.map((prize, prizeIndex) => {
|
|
159
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)));
|
|
160
167
|
}));
|
|
@@ -163,6 +170,7 @@ const CasinoTournamentPrizes = class {
|
|
|
163
170
|
}), !this.prizes && index.h("p", null, translate('noprizes', this.language))));
|
|
164
171
|
}
|
|
165
172
|
}
|
|
173
|
+
get host() { return index.getElement(this); }
|
|
166
174
|
};
|
|
167
175
|
CasinoTournamentPrizes.style = casinoTournamentPrizesCss;
|
|
168
176
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-edbd2afe.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
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],"
|
|
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
19
|
});
|
|
@@ -273,12 +273,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
273
273
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
274
274
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
275
275
|
}
|
|
276
|
-
else if (memberName === 'ref') {
|
|
277
|
-
// minifier will clean this up
|
|
278
|
-
if (newValue) {
|
|
279
|
-
newValue(elm);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
276
|
else {
|
|
283
277
|
// Set property if it exists and it's not a SVG
|
|
284
278
|
const isComplex = isComplexType(newValue);
|
|
@@ -413,7 +407,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
413
407
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
414
408
|
if ((vnode = vnodes[startIdx])) {
|
|
415
409
|
elm = vnode.$elm$;
|
|
416
|
-
callNodeRefs(vnode);
|
|
417
410
|
// remove the vnode's element from the dom
|
|
418
411
|
elm.remove();
|
|
419
412
|
}
|
|
@@ -541,12 +534,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
541
534
|
elm.data = text;
|
|
542
535
|
}
|
|
543
536
|
};
|
|
544
|
-
const callNodeRefs = (vNode) => {
|
|
545
|
-
{
|
|
546
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
547
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
537
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
551
538
|
const hostElm = hostRef.$hostElement$;
|
|
552
539
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -562,6 +549,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
562
549
|
// synchronous patch
|
|
563
550
|
patch(oldVNode, rootVnode);
|
|
564
551
|
};
|
|
552
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
565
553
|
/**
|
|
566
554
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
567
555
|
* @param elm the target of the Event
|
|
@@ -1201,6 +1189,7 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1201
1189
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1202
1190
|
|
|
1203
1191
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1192
|
+
exports.getElement = getElement;
|
|
1204
1193
|
exports.h = h;
|
|
1205
1194
|
exports.promiseResolve = promiseResolve;
|
|
1206
1195
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-edbd2afe.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
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],"
|
|
17
|
+
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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Prop, h, State, Listen } from '@stencil/core';
|
|
1
|
+
import { Component, Prop, h, State, Listen, Element } from '@stencil/core';
|
|
2
2
|
import { translate } from '../../utils/locale.utils';
|
|
3
3
|
export class CasinoTournamentPrizes {
|
|
4
4
|
constructor() {
|
|
@@ -10,18 +10,6 @@ export class CasinoTournamentPrizes {
|
|
|
10
10
|
this.prizes = [];
|
|
11
11
|
this.prizeGroups = [];
|
|
12
12
|
this.initialLoad = false;
|
|
13
|
-
this.setClientStyling = () => {
|
|
14
|
-
let sheet = document.createElement('style');
|
|
15
|
-
sheet.innerHTML = this.clientStyling;
|
|
16
|
-
this.stylingContainer.prepend(sheet);
|
|
17
|
-
};
|
|
18
|
-
this.setClientStylingURL = () => {
|
|
19
|
-
let cssFile = document.createElement('style');
|
|
20
|
-
setTimeout(() => {
|
|
21
|
-
cssFile.innerHTML = this.clientStylingUrl;
|
|
22
|
-
this.stylingContainer.prepend(cssFile);
|
|
23
|
-
}, 1);
|
|
24
|
-
};
|
|
25
13
|
}
|
|
26
14
|
infoCompletedHandler(event) {
|
|
27
15
|
if (event.detail) {
|
|
@@ -44,7 +32,7 @@ export class CasinoTournamentPrizes {
|
|
|
44
32
|
});
|
|
45
33
|
}
|
|
46
34
|
getTournamentInfo() {
|
|
47
|
-
let url = new URL(this.endpoint + `/tournaments/${this.tournamentId}`);
|
|
35
|
+
let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
|
|
48
36
|
let reqHeaders = new Headers();
|
|
49
37
|
url.searchParams.append('expand', 'games');
|
|
50
38
|
url.searchParams.append('language', this.language);
|
|
@@ -78,7 +66,7 @@ export class CasinoTournamentPrizes {
|
|
|
78
66
|
}
|
|
79
67
|
}
|
|
80
68
|
componentDidRender() {
|
|
81
|
-
if (!this.limitStylingAppends && this.
|
|
69
|
+
if (!this.limitStylingAppends && this.host) {
|
|
82
70
|
if (this.clientStyling)
|
|
83
71
|
this.setClientStyling();
|
|
84
72
|
if (this.clientStylingUrl)
|
|
@@ -86,10 +74,29 @@ export class CasinoTournamentPrizes {
|
|
|
86
74
|
this.limitStylingAppends = true;
|
|
87
75
|
}
|
|
88
76
|
}
|
|
77
|
+
setClientStyling() {
|
|
78
|
+
const sheet = new CSSStyleSheet();
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
sheet.replace(this.clientStyling);
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
83
|
+
}
|
|
84
|
+
setClientStylingURL() {
|
|
85
|
+
let url = new URL(this.clientStylingUrl);
|
|
86
|
+
fetch(url.href)
|
|
87
|
+
.then((res) => res.text())
|
|
88
|
+
.then((data) => {
|
|
89
|
+
const sheet = new CSSStyleSheet();
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
sheet.replace(data);
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
94
|
+
});
|
|
95
|
+
}
|
|
89
96
|
render() {
|
|
90
97
|
{
|
|
91
98
|
this.prizes && this.prizes.length > 0;
|
|
92
|
-
return h("div", {
|
|
99
|
+
return h("div", { class: `TournamentPrizes ${this.useGroup ? '' : 'PrizeView'}` },
|
|
93
100
|
this.initialLoad && !this.useGroup && h("div", { class: "PrizeTitle" },
|
|
94
101
|
h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "30", height: "27.454", viewBox: "0 0 30 27.454" },
|
|
95
102
|
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)" })),
|
|
@@ -297,11 +304,11 @@ export class CasinoTournamentPrizes {
|
|
|
297
304
|
}; }
|
|
298
305
|
static get states() { return {
|
|
299
306
|
"limitStylingAppends": {},
|
|
300
|
-
"stylingContainer": {},
|
|
301
307
|
"prizes": {},
|
|
302
308
|
"prizeGroups": {},
|
|
303
309
|
"initialLoad": {}
|
|
304
310
|
}; }
|
|
311
|
+
static get elementRef() { return "host"; }
|
|
305
312
|
static get listeners() { return [{
|
|
306
313
|
"name": "getTournamentInfoCompleted",
|
|
307
314
|
"method": "infoCompletedHandler",
|
|
@@ -74,18 +74,6 @@ const CasinoTournamentPrizes$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
74
74
|
this.prizes = [];
|
|
75
75
|
this.prizeGroups = [];
|
|
76
76
|
this.initialLoad = false;
|
|
77
|
-
this.setClientStyling = () => {
|
|
78
|
-
let sheet = document.createElement('style');
|
|
79
|
-
sheet.innerHTML = this.clientStyling;
|
|
80
|
-
this.stylingContainer.prepend(sheet);
|
|
81
|
-
};
|
|
82
|
-
this.setClientStylingURL = () => {
|
|
83
|
-
let cssFile = document.createElement('style');
|
|
84
|
-
setTimeout(() => {
|
|
85
|
-
cssFile.innerHTML = this.clientStylingUrl;
|
|
86
|
-
this.stylingContainer.prepend(cssFile);
|
|
87
|
-
}, 1);
|
|
88
|
-
};
|
|
89
77
|
}
|
|
90
78
|
infoCompletedHandler(event) {
|
|
91
79
|
if (event.detail) {
|
|
@@ -108,7 +96,7 @@ const CasinoTournamentPrizes$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
108
96
|
});
|
|
109
97
|
}
|
|
110
98
|
getTournamentInfo() {
|
|
111
|
-
let url = new URL(this.endpoint + `/tournaments/${this.tournamentId}`);
|
|
99
|
+
let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
|
|
112
100
|
let reqHeaders = new Headers();
|
|
113
101
|
url.searchParams.append('expand', 'games');
|
|
114
102
|
url.searchParams.append('language', this.language);
|
|
@@ -142,7 +130,7 @@ const CasinoTournamentPrizes$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
142
130
|
}
|
|
143
131
|
}
|
|
144
132
|
componentDidRender() {
|
|
145
|
-
if (!this.limitStylingAppends && this.
|
|
133
|
+
if (!this.limitStylingAppends && this.host) {
|
|
146
134
|
if (this.clientStyling)
|
|
147
135
|
this.setClientStyling();
|
|
148
136
|
if (this.clientStylingUrl)
|
|
@@ -150,9 +138,28 @@ const CasinoTournamentPrizes$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
150
138
|
this.limitStylingAppends = true;
|
|
151
139
|
}
|
|
152
140
|
}
|
|
141
|
+
setClientStyling() {
|
|
142
|
+
const sheet = new CSSStyleSheet();
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
sheet.replace(this.clientStyling);
|
|
145
|
+
// @ts-ignore
|
|
146
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
147
|
+
}
|
|
148
|
+
setClientStylingURL() {
|
|
149
|
+
let url = new URL(this.clientStylingUrl);
|
|
150
|
+
fetch(url.href)
|
|
151
|
+
.then((res) => res.text())
|
|
152
|
+
.then((data) => {
|
|
153
|
+
const sheet = new CSSStyleSheet();
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
sheet.replace(data);
|
|
156
|
+
// @ts-ignore
|
|
157
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
158
|
+
});
|
|
159
|
+
}
|
|
153
160
|
render() {
|
|
154
161
|
{
|
|
155
|
-
return h("div", {
|
|
162
|
+
return h("div", { class: `TournamentPrizes ${this.useGroup ? '' : 'PrizeView'}` }, this.initialLoad && !this.useGroup && h("div", { class: "PrizeTitle" }, h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "30", height: "27.454", viewBox: "0 0 30 27.454" }, 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)" })), h("div", { class: "Title" }, translate('prizes', this.language))), this.initialLoad && this.useGroup && h("div", { class: "GroupPrizeTitle" }, h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "19", height: "16", viewBox: "0 0 19 16", fill: "none" }, h("g", { "clip-path": "url(#clip0_2459_42455)" }, 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" })), h("defs", null, h("clipPath", { id: "clip0_2459_42455" }, h("rect", { width: "18.2857", height: "16", fill: "white", transform: "translate(0.5)" })))), h("div", { class: "Title" }, translate('prizes', this.language))), h("div", { class: "PrizeGroups" }, this.useGroup == true && this.prizeGroups && this.prizeGroups.map((group, groupIndex) => {
|
|
156
163
|
return h("div", { class: `PrizeGroup Group${groupIndex + 1}` }, group && group.map((prize, prizeIndex) => {
|
|
157
164
|
return h("div", { class: "PrizeRow" }, h("div", { class: `PrizeItem Rank${prizeIndex + 1}` }, h("span", { class: "PrizeRank" }, prize.rank, " ", translate('place', this.language), " "), h("span", { class: "PrizeName" }, prize.name)));
|
|
158
165
|
}));
|
|
@@ -161,6 +168,7 @@ const CasinoTournamentPrizes$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
161
168
|
}), !this.prizes && h("p", null, translate('noprizes', this.language))));
|
|
162
169
|
}
|
|
163
170
|
}
|
|
171
|
+
get host() { return this; }
|
|
164
172
|
static get style() { return casinoTournamentPrizesCss; }
|
|
165
173
|
}, [1, "casino-tournament-prizes", {
|
|
166
174
|
"language": [1],
|
|
@@ -173,7 +181,6 @@ const CasinoTournamentPrizes$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
173
181
|
"clientStyling": [1, "client-styling"],
|
|
174
182
|
"clientStylingUrl": [1, "client-styling-url"],
|
|
175
183
|
"limitStylingAppends": [32],
|
|
176
|
-
"stylingContainer": [32],
|
|
177
184
|
"prizes": [32],
|
|
178
185
|
"prizeGroups": [32],
|
|
179
186
|
"initialLoad": [32]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-fd6b56d4.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt', 'hr'];
|
|
@@ -72,18 +72,6 @@ const CasinoTournamentPrizes = class {
|
|
|
72
72
|
this.prizes = [];
|
|
73
73
|
this.prizeGroups = [];
|
|
74
74
|
this.initialLoad = false;
|
|
75
|
-
this.setClientStyling = () => {
|
|
76
|
-
let sheet = document.createElement('style');
|
|
77
|
-
sheet.innerHTML = this.clientStyling;
|
|
78
|
-
this.stylingContainer.prepend(sheet);
|
|
79
|
-
};
|
|
80
|
-
this.setClientStylingURL = () => {
|
|
81
|
-
let cssFile = document.createElement('style');
|
|
82
|
-
setTimeout(() => {
|
|
83
|
-
cssFile.innerHTML = this.clientStylingUrl;
|
|
84
|
-
this.stylingContainer.prepend(cssFile);
|
|
85
|
-
}, 1);
|
|
86
|
-
};
|
|
87
75
|
}
|
|
88
76
|
infoCompletedHandler(event) {
|
|
89
77
|
if (event.detail) {
|
|
@@ -106,7 +94,7 @@ const CasinoTournamentPrizes = class {
|
|
|
106
94
|
});
|
|
107
95
|
}
|
|
108
96
|
getTournamentInfo() {
|
|
109
|
-
let url = new URL(this.endpoint + `/tournaments/${this.tournamentId}`);
|
|
97
|
+
let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
|
|
110
98
|
let reqHeaders = new Headers();
|
|
111
99
|
url.searchParams.append('expand', 'games');
|
|
112
100
|
url.searchParams.append('language', this.language);
|
|
@@ -140,7 +128,7 @@ const CasinoTournamentPrizes = class {
|
|
|
140
128
|
}
|
|
141
129
|
}
|
|
142
130
|
componentDidRender() {
|
|
143
|
-
if (!this.limitStylingAppends && this.
|
|
131
|
+
if (!this.limitStylingAppends && this.host) {
|
|
144
132
|
if (this.clientStyling)
|
|
145
133
|
this.setClientStyling();
|
|
146
134
|
if (this.clientStylingUrl)
|
|
@@ -148,9 +136,28 @@ const CasinoTournamentPrizes = class {
|
|
|
148
136
|
this.limitStylingAppends = true;
|
|
149
137
|
}
|
|
150
138
|
}
|
|
139
|
+
setClientStyling() {
|
|
140
|
+
const sheet = new CSSStyleSheet();
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
sheet.replace(this.clientStyling);
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
145
|
+
}
|
|
146
|
+
setClientStylingURL() {
|
|
147
|
+
let url = new URL(this.clientStylingUrl);
|
|
148
|
+
fetch(url.href)
|
|
149
|
+
.then((res) => res.text())
|
|
150
|
+
.then((data) => {
|
|
151
|
+
const sheet = new CSSStyleSheet();
|
|
152
|
+
// @ts-ignore
|
|
153
|
+
sheet.replace(data);
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
|
|
156
|
+
});
|
|
157
|
+
}
|
|
151
158
|
render() {
|
|
152
159
|
{
|
|
153
|
-
return h("div", {
|
|
160
|
+
return h("div", { class: `TournamentPrizes ${this.useGroup ? '' : 'PrizeView'}` }, this.initialLoad && !this.useGroup && h("div", { class: "PrizeTitle" }, h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "30", height: "27.454", viewBox: "0 0 30 27.454" }, 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)" })), h("div", { class: "Title" }, translate('prizes', this.language))), this.initialLoad && this.useGroup && h("div", { class: "GroupPrizeTitle" }, h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "19", height: "16", viewBox: "0 0 19 16", fill: "none" }, h("g", { "clip-path": "url(#clip0_2459_42455)" }, 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" })), h("defs", null, h("clipPath", { id: "clip0_2459_42455" }, h("rect", { width: "18.2857", height: "16", fill: "white", transform: "translate(0.5)" })))), h("div", { class: "Title" }, translate('prizes', this.language))), h("div", { class: "PrizeGroups" }, this.useGroup == true && this.prizeGroups && this.prizeGroups.map((group, groupIndex) => {
|
|
154
161
|
return h("div", { class: `PrizeGroup Group${groupIndex + 1}` }, group && group.map((prize, prizeIndex) => {
|
|
155
162
|
return h("div", { class: "PrizeRow" }, h("div", { class: `PrizeItem Rank${prizeIndex + 1}` }, h("span", { class: "PrizeRank" }, prize.rank, " ", translate('place', this.language), " "), h("span", { class: "PrizeName" }, prize.name)));
|
|
156
163
|
}));
|
|
@@ -159,6 +166,7 @@ const CasinoTournamentPrizes = class {
|
|
|
159
166
|
}), !this.prizes && h("p", null, translate('noprizes', this.language))));
|
|
160
167
|
}
|
|
161
168
|
}
|
|
169
|
+
get host() { return getElement(this); }
|
|
162
170
|
};
|
|
163
171
|
CasinoTournamentPrizes.style = casinoTournamentPrizesCss;
|
|
164
172
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fd6b56d4.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-tournament-prizes",[[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],"
|
|
16
|
+
return bootstrapLazy([["casino-tournament-prizes",[[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);
|
|
17
17
|
});
|
|
@@ -251,12 +251,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
251
251
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
252
252
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
253
253
|
}
|
|
254
|
-
else if (memberName === 'ref') {
|
|
255
|
-
// minifier will clean this up
|
|
256
|
-
if (newValue) {
|
|
257
|
-
newValue(elm);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
254
|
else {
|
|
261
255
|
// Set property if it exists and it's not a SVG
|
|
262
256
|
const isComplex = isComplexType(newValue);
|
|
@@ -391,7 +385,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
391
385
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
392
386
|
if ((vnode = vnodes[startIdx])) {
|
|
393
387
|
elm = vnode.$elm$;
|
|
394
|
-
callNodeRefs(vnode);
|
|
395
388
|
// remove the vnode's element from the dom
|
|
396
389
|
elm.remove();
|
|
397
390
|
}
|
|
@@ -519,12 +512,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
519
512
|
elm.data = text;
|
|
520
513
|
}
|
|
521
514
|
};
|
|
522
|
-
const callNodeRefs = (vNode) => {
|
|
523
|
-
{
|
|
524
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
525
|
-
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
526
|
-
}
|
|
527
|
-
};
|
|
528
515
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
529
516
|
const hostElm = hostRef.$hostElement$;
|
|
530
517
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -540,6 +527,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
540
527
|
// synchronous patch
|
|
541
528
|
patch(oldVNode, rootVnode);
|
|
542
529
|
};
|
|
530
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
543
531
|
/**
|
|
544
532
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
545
533
|
* @param elm the target of the Event
|
|
@@ -1178,4 +1166,4 @@ const flush = () => {
|
|
|
1178
1166
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1179
1167
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1180
1168
|
|
|
1181
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1169
|
+
export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fd6b56d4.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-tournament-prizes",[[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],"
|
|
13
|
+
return bootstrapLazy([["casino-tournament-prizes",[[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);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -9,16 +9,16 @@ export declare class CasinoTournamentPrizes {
|
|
|
9
9
|
clientStyling: string;
|
|
10
10
|
clientStylingUrl: string;
|
|
11
11
|
limitStylingAppends: boolean;
|
|
12
|
-
stylingContainer: HTMLElement;
|
|
13
12
|
prizes: Array<any>;
|
|
14
13
|
prizeGroups: Array<any>;
|
|
15
14
|
initialLoad: boolean;
|
|
15
|
+
host: HTMLElement;
|
|
16
16
|
infoCompletedHandler(event: CustomEvent<any>): void;
|
|
17
17
|
formatGroup(): void;
|
|
18
18
|
getTournamentInfo(): void;
|
|
19
19
|
componentWillLoad(): void;
|
|
20
20
|
componentDidRender(): void;
|
|
21
|
-
setClientStyling
|
|
22
|
-
setClientStylingURL
|
|
21
|
+
setClientStyling(): void;
|
|
22
|
+
setClientStylingURL(): void;
|
|
23
23
|
render(): any;
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as e}from"./p-77e12a29.js";const s=["ro","en","zh-hk","fr","hu","tr","el","es","pt","hr"],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)=>{const r=e;return t[void 0!==r&&s.includes(r)?r:"en"][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,this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling,this.stylingContainer.prepend(i)},this.setClientStylingURL=()=>{let i=document.createElement("style");setTimeout((()=>{i.innerHTML=this.clientStylingUrl,this.stylingContainer.prepend(i)}),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+`/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.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return e("div",{ref:i=>this.stylingContainer=i,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))))}};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 if("ref"===t)l&&l(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,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.v,P(l),s.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=>{e.p&&e.p.ref&&e.p.ref(null),e.m&&e.m.map(P)},E=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},L=(e,t)=>{if(e.t|=16,!(4&e.t))return E(e,e.j),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.O,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.O,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.O,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.O)}return null},W=e=>{const t=e.O,n=e.j;U(e.i,"componentDidRender"),64&e.t||(e.t|=64,z(t),e.C(t),n||A()),e.S&&(e.S(),e.S=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.j=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.j,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,O: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,y as h,i as p,_ as r}
|