@everymatrix/casino-tournament-slider 1.31.1 → 1.31.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-7bade785.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-039bfb6a",[[1,"casino-tournament-slider",{useEvent:[1,"use-event"],endpoint:[1],tournamentId:[1,"tournament-id"],session:[1],language:[1],gamesLimit:[2,"games-limit"],offset:[2],slideNumber:[2,"slide-number"],slideShow:[2,"slide-show"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],showTitle:[4,"show-title"],limitStylingAppends:[32],games:[32],hover:[32],hoverIndex:[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{slideNumber:[2,"slide-number"],slideShow:[2,"slide-show"],showArrow:[4,"show-arrow"],showButton:[4,"show-button"],autoSlide:[4,"auto-slide"],loopTime:[2,"loop-time"],autoItemHeight:[4,"auto-item-height"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],currentSlideNumber:[32],slidesCount:[32],limitStylingAppends:[32]}]]]],e)));
1
+ import{p as e,b as t}from"./p-d2b1e2e0.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-48e044d4",[[1,"casino-tournament-slider",{useEvent:[1,"use-event"],endpoint:[1],tournamentId:[1,"tournament-id"],session:[1],language:[1],gamesLimit:[2,"games-limit"],offset:[2],slideNumber:[2,"slide-number"],slideShow:[2,"slide-show"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],showTitle:[4,"show-title"],limitStylingAppends:[32],games:[32],hover:[32],hoverIndex:[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{showStatus:[4,"show-status"],slideNumber:[2,"slide-number"],slideShow:[2,"slide-show"],showArrow:[4,"show-arrow"],showButton:[4,"show-button"],autoSlide:[4,"auto-slide"],loopTime:[2,"loop-time"],autoItemHeight:[4,"auto-item-height"],currentSlideNumber:[32]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as s}from"./p-d2b1e2e0.js";const e={en:{playNow:"Play now",sliderTitle:"Participanting games"},"zh-hk":{playNow:"现在播放"},fr:{playNow:"Joue maintenant"},ro:{playNow:"Joaca acum"},hu:{playNow:"Játsszon most"},tr:{playNow:"Şimdi oyna"},el:{playNow:"Παίξε τώρα"},es:{playNow:"Jugar Ya"},pt:{playNow:"Jogue agora"},hr:{playNow:"IGRAJ SADA"}},o=(t,i)=>{var s,o;return(null===(s=e[i])||void 0===s?void 0:s[t])||(null===(o=e.en)||void 0===o?void 0:o[t])},h=class{constructor(i){t(this,i),this.gamesLimit=30,this.offset=0,this.slideNumber=3,this.slideShow=3,this.clientStyling="",this.clientStylingUrl="",this.showTitle=!1,this.limitStylingAppends=!1,this.enter=t=>{this.hover=!0,this.hoverIndex=t},this.leave=()=>{this.hover=!1,this.hoverIndex=-1},this.gameClicked=t=>{window.postMessage({type:"TournamentGameAction",gameId:t.id,name:t.name},window.location.href)}}todoCompletedHandler(t){if(t.detail&&this.useEvent){if(!t.detail.games)return;this.games=t.detail.games.items}}getTournamentInfo(){let t=new URL(this.endpoint+`/v1/tournaments/${this.tournamentId}`),i=new Headers;t.searchParams.append("expand","games"),t.searchParams.append("language",this.language),t.searchParams.append("pagination",`games(limit=${this.gamesLimit},offset=${this.offset})`),t.searchParams.append("fields","games(id,name,thumbnail)"),this.session&&i.append("X-SessionId",this.session),fetch(t.href,{method:"GET",headers:i}).then((t=>t.json())).then((t=>{this.games=t.item.games.items}))}componentWillLoad(){!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 t=new CSSStyleSheet;t.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const i=new CSSStyleSheet;i.replace(t),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,i]}))}render(){return i("div",{class:"TournamentSliderWrap"},i("div",{class:"TournamentSlider"},this.showTitle&&this.games&&i("div",{class:"SliderTitle"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"25",viewBox:"0 0 21 25",fill:"none"},i("path",{d:"M6.1774 22.1728C6.36493 22.2725 6.56274 22.0566 6.44793 21.8779C5.82475 20.908 5.23463 19.2759 6.17483 17.174C7.74273 13.6689 8.6968 11.8535 8.6968 11.8535C8.6968 11.8535 9.20426 13.9721 10.5799 15.8558C11.9038 17.6687 12.6285 19.9488 11.4602 21.8482C11.3506 22.0265 11.5439 22.2368 11.7302 22.1415C13.1763 21.4017 14.7983 19.9179 14.9813 16.965C15.0488 16.0627 14.9476 14.7995 14.4416 13.2054C13.791 11.185 12.9911 10.2423 12.5283 9.83741C12.3899 9.71629 12.1746 9.82363 12.1859 10.0072C12.3208 12.1872 11.5007 12.7404 11.0339 11.4937C10.8474 10.9957 10.7387 10.1344 10.7387 9.08558C10.7387 7.3394 10.2321 5.54188 9.1152 4.0812C8.82475 3.70134 8.4849 3.3464 8.09498 3.04372C7.95382 2.93411 7.74919 3.04428 7.76212 3.22252C7.84788 4.40628 7.77018 7.79884 4.79383 11.8519C2.09515 15.6115 3.14088 18.4989 3.51195 19.281C4.2214 20.7791 5.21098 21.6589 6.1774 22.1728Z",fill:"white"})),i("span",{class:"Title"},o("sliderTitle",this.language))),i("div",{class:"Items"},this.games&&i("general-slider",{"slide-number":this.slideNumber,"slide-show":this.slideShow},this.games&&this.games.map(((t,s)=>i("li",{class:"Item",onMouseEnter:()=>this.enter(s),onMouseLeave:()=>this.leave()},i("span",{class:"PlayNowButton "+(this.hoverIndex==s?"ItemHover":""),onClick:()=>{this.gameClicked(t)}},o("playNow",this.language)),i("img",{class:"Img",src:t.thumbnail,alt:t.name,title:t.name}))))))))}get host(){return s(this)}};h.style=":host{display:block}.Item{color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.Item .Img{width:100%;height:100%}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}.Items .Item:first-child{margin-left:0}.Items .Item:last-child{margin-right:0}.SliderTitle{display:flex;align-items:center;padding:6px 0;gap:11px}.Title{color:#fff;font-size:14px;font-weight:600}";const l=class{constructor(i){t(this,i),this.showStatus=!1,this.slideNumber=3,this.slideShow=3,this.showArrow=!0,this.showButton=!1,this.autoSlide=!1,this.loopTime=1,this.autoItemHeight=!1,this.currentSlideNumber=0,this.slidesCount=0,this.slideWidth=0,this.currentPage=0,this.controls={Prev:null,Next:null},this.xDown=null,this.yDown=null}slide(t){let i=0;i=t?this.currentSlideNumber+this.slideNumber:this.currentSlideNumber-this.slideNumber,i<0||i>=this.slidesCount||(this.currentSlideNumber=i,this.currentPage=this.currentSlideNumber/this.slideNumber,this.updateListStyle())}slideTo(t){this.currentSlideNumber=t*this.slideNumber,this.currentPage=t,this.updateListStyle()}updateControls(){this.switchControl("Prev",0!==this.currentSlideNumber),this.switchControl("Next",this.currentSlideNumber!==this.slidesCount-this.slideShow)}switchControl(t,i){this.controls[t]&&(this.controls[t].disabled=!i)}componentWillLoad(){this.slides=this.el.querySelectorAll("li"),this.slidesCount=this.slides.length,this.slideNumber||(this.slideNumber=1),this.slideShow||(this.slideShow=1)}componentDidLoad(){this.sliderList=this.el.shadowRoot.querySelector("ul"),this.slideWidth=this.slides[0].offsetWidth;for(let t in this.controls)this.controls[t]=this.el.shadowRoot.querySelector(".Button"+t);this.updateControls(),this.autoSlide&&this.setSlideAutoInterval()}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.updateListStyle()}updateListStyle(){this.autoItemHeight&&this.el.querySelectorAll("li").forEach(((t,i)=>{t.classList.add("hide"),i>=this.currentPage*this.slideNumber&&i<(this.currentPage+1)*this.slideNumber&&t.classList.remove("hide")}))}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY,clearInterval(this.sliderInterval)}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,s=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(s)&&this.slide(i>0),this.xDown=null,this.yDown=null,this.autoSlide&&this.setSlideAutoInterval()}setSlideAutoInterval(){0!=this.loopTime&&(clearInterval(this.sliderInterval),this.sliderInterval=setInterval((()=>{this.slideTo(this.currentPage+1<this.slidesCount/this.slideNumber?this.currentPage+1:0)}),1e3*Number(this.loopTime)))}componentDidUpdate(){this.sliderList.style.transform=`translateX(${this.currentSlideNumber*this.slideWidth*-1}px)`,this.updateControls()}switchLoopStatus(t){this.autoSlide&&this.loopTime>0&&(t?clearInterval(this.sliderInterval):this.setSlideAutoInterval())}render(){return i("div",{class:"GeneralSlider"},i("div",{class:"Slider"},this.showArrow&&i("div",null,i("button",{type:"button",class:"Button ButtonNext",onClick:this.slide.bind(this,!0),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},">"),i("button",{type:"button",class:"Button ButtonPrev",onClick:this.slide.bind(this,!1),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},"<")),i("ul",{class:`SliderList Col-${this.slideShow}`,part:"SliderList",onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},i("slot",null))),this.showButton&&this.slidesCount>0&&i("div",{class:"PageButtons",part:"PageButtons"},[...Array(this.slidesCount/this.slideNumber)].map(((t,s)=>i("div",{class:"PageButton "+(this.currentPage==s?"active":""),title:`page${s}`,onClick:this.slideTo.bind(this,s),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)}," ")))))}get el(){return s(this)}};l.style=":host{display:block}.GeneralSlider{position:relative}.Slider{position:relative;width:100%;margin:0 auto;overflow:hidden}.SliderList{display:flex;margin:0;padding:0;list-style:none;transition:transform 0.5s ease-in-out}::slotted(li){flex:1 0 auto;width:100%;margin:auto}::slotted(li.hide){visibility:hidden;height:0;transition-delay:500ms}.Col-2 ::slotted(li){flex:2 0 auto;width:50%}.Col-3 ::slotted(li){flex:3 0 auto;width:33.3333333333%}.Col-4 ::slotted(li){flex:4 0 auto;width:25%}.Col-5 ::slotted(li){flex:5 0 auto;width:20%}.Col-6 ::slotted(li){flex:6 0 auto;width:16.6666666667%}.Col-7 ::slotted(li){flex:7 0 auto;width:14.2857142857%}.Col-8 ::slotted(li){flex:8 0 auto;width:12.5%}.Col-9 ::slotted(li){flex:9 0 auto;width:11.1111111111%}.Col-10 ::slotted(li){flex:10 0 auto;width:10%}.Col-11 ::slotted(li){flex:11 0 auto;width:9.0909090909%}.Col-12 ::slotted(li){flex:12 0 auto;width:8.3333333333%}.Button{position:absolute;z-index:1;top:calc(50% - 32px);padding:20px;font-size:20px;line-height:20px;opacity:0.5;border:none;background:var(--emfe-w-color-contrast, #07072A);color:var(--emfe-w-color-white, #FFFFFF);cursor:pointer}.Button:hover{opacity:1;transition:opacity 0.5s ease-in-out}.Button[disabled],.Button[disabled]:hover{color:var(--emfe-w-color-gray-150, #828282);opacity:0.25}.Button.ButtonNext{right:0}.PageButtons{display:flex;gap:4px;margin-top:8px}.PageButton{width:15px;height:4px;border-radius:4px;background-color:var(--emfe-w-tournament-color-primary, #0072ed);opacity:0.2;cursor:pointer;float:right}.PageButton.active{width:45px;opacity:1}";export{h as casino_tournament_slider,l as general_slider}
@@ -0,0 +1 @@
1
+ let e,t,n=!1,l=!1;const o="undefined"!=typeof window?window:{},s=o.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)},c=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=f(e,n),c=u(t,o),i=d(n);r.ael(s,l,c,i),(t.o=t.o||[]).push((()=>r.rel(s,l,c,i)))}))},u=(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?o:e,d=e=>0!=(2&e),h=new WeakMap,p=e=>"sc-"+e.h,m={},$=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,o=!1,s=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!$(l))&&(l+=""),o&&s?r[r.length-1].p+=l:r.push(o?w(null,l):l),s=o)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=w(e,null);return i.m=t,r.length>0&&(i.$=r),i},w=(e,t)=>({t:0,g:e,p:t,v:null,$:null,m:null}),b={},g=(e,t,n,l,s,c)=>{if(n!==l){let i=G(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,o=S(n),s=S(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const o=$(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):G(o,a)?a.slice(2):a[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},v=/\s/,S=e=>e?e.split(v):[],j=(e,t,n,l)=>{const o=11===t.v.nodeType&&t.v.host?t.v.host:t.v,s=e&&e.m||m,r=t.m||m;for(l in s)l in r||g(o,l,s[l],void 0,n,t.t);for(l in r)g(o,l,s[l],r[l],n,t.t)},O=(t,l,o)=>{let r,c,i=l.$[o],a=0;if(null!==i.p)r=i.v=s.createTextNode(i.p);else{if(n||(n="svg"===i.g),r=i.v=s.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.g),n&&"foreignObject"===i.g&&(n=!1),j(null,i,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),i.$)for(a=0;a<i.$.length;++a)c=O(t,i,a),c&&r.appendChild(c);"svg"===i.g?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},M=(e,n,l,o,s,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);s<=r;++s)o[s]&&(c=O(null,l,s),c&&(o[s].v=c,i.insertBefore(c,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,o=e.$,s=t.$,r=t.g,c=t.p;null===c?(n="svg"===r||"foreignObject"!==r&&n,"slot"===r||j(e,t,n),null!==o&&null!==s?((e,t,n,l)=>{let o,s=0,r=0,c=t.length-1,i=t[0],a=t[c],u=l.length-1,f=l[0],d=l[u];for(;s<=c&&r<=u;)null==i?i=t[++s]:null==a?a=t[--c]:null==f?f=l[++r]:null==d?d=l[--u]:C(i,f)?(x(i,f),i=t[++s],f=l[++r]):C(a,d)?(x(a,d),a=t[--c],d=l[--u]):C(i,d)?(x(i,d),e.insertBefore(i.v,a.v.nextSibling),i=t[++s],d=l[--u]):C(a,f)?(x(a,f),e.insertBefore(a.v,i.v),a=t[--c],f=l[++r]):(o=O(t&&t[r],n,r),f=l[++r],o&&i.v.parentNode.insertBefore(o,i.v));s>c?M(e,null==l[u+1]?null:l[u+1].v,n,l,r,u):r>u&&k(t,s,c)})(l,o,t,s):null!==s?(null!==e.p&&(l.textContent=""),M(l,null,t,s,0,s.length-1)):null!==o&&k(o,0,o.length-1),n&&"svg"===r&&(n=!1)):e.p!==c&&(l.data=c)},L=e=>_(e).S,P=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},D=(e,t)=>{if(e.t|=16,!(4&e.t))return P(e,e.O),le((()=>E(e,t)));e.t|=512},E=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>W(n,e,t))),e.u=null),l=W(n,"componentWillLoad")),A(l,(()=>N(e,n,t)))},N=async(e,t,n)=>{const l=e.S,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,o=((e,t)=>{let n=p(t),l=Q.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=h.get(e=e.head||e);o||h.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.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"]=o,n.classList.add(o+"-h"))})(e);R(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>T(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},R=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const o=n.S,s=n.k||w(null,null),r=(e=>e&&e.g===b)(l)?l:y(null,null,l);t=o.tagName,r.g=null,r.t|=4,n.k=r,r.v=s.v=o.shadowRoot||o,e=o["s-sc"],x(s,r)})(n,l)}catch(e){I(e,n.S)}return null},T=e=>{const t=e.S,n=e.i,l=e.O;W(n,"componentDidRender"),64&e.t?W(n,"componentDidUpdate"):(e.t|=64,F(t),W(n,"componentDidLoad"),e.C(t),l||U()),e.j&&(e.j(),e.j=void 0),512&e.t&&ne((()=>D(e,!1))),e.t&=-517},U=()=>{F(s.documentElement),ne((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"casino-tournament-slider"}});return e.dispatchEvent(t),t})(o)))},W=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){I(e)}},A=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),q=(e,t,n)=>{if(t.L){const l=Object.entries(t.L),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>_(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=_(e),s=o.P.get(t),r=o.t,c=o.i;n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.L[t][0]),8&r&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n)||(o.P.set(t,n),c&&2==(18&r)&&D(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){r.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.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},H=(e,t={})=>{const n=[],l=t.exclude||[],c=o.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),h=[];let m,$=!0;Object.assign(r,t),r.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const o={t:t[0],h:t[1],L:t[2],D:t[3]};o.L=t[2],o.D=t[3];const s=o.h,u=class extends HTMLElement{constructor(e){super(e),B(e=this,o),1&o.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),$?h.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=_(e),n=t.M,l=()=>{};if(1&t.t)a(e,t,n.D);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){P(t,t.O=n);break}}n.L&&Object.entries(n.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=K(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(q(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){I(e)}t.t&=-9,e()}if(o.style){let e=o.style;const t=p(n);if(!Q.has(t)){const l=()=>{};((e,t,n)=>{let l=Q.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,Q.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.O,r=()=>D(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{if(0==(1&r.t)){const e=_(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),W(t,"disconnectedCallback")}})()))}componentOnReady(){return _(this).N}};o.R=e[0],l.includes(s)||c.get(s)||(n.push(s),c.define(s,q(u,o,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),$=!1,h.length?h.map((e=>e.connectedCallback())):r.jmp((()=>m=setTimeout(U,30)))},V=new WeakMap,_=e=>V.get(e),z=(e,t)=>V.set(t.i=e,t),B=(e,t)=>{const n={t:0,S:e,M:t,P:new Map};return n.N=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.D),V.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.R,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=>c().then(e),le=Z(Y,!0);export{H as b,L as g,y as h,c as p,z as r}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f60eba31.js');
3
+ const index = require('./index-147d65ae.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-slider_2.cjs",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"currentSlideNumber":[32],"slidesCount":[32],"limitStylingAppends":[32]}]]]], options);
18
+ return index.bootstrapLazy([["casino-tournament-slider_2.cjs",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"showStatus":[4,"show-status"],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"currentSlideNumber":[32]}]]]], options);
19
19
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f60eba31.js');
5
+ const index = require('./index-147d65ae.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -144,46 +144,16 @@ const generalSliderCss = ":host{display:block}.GeneralSlider{position:relative}.
144
144
  const GeneralSlider = class {
145
145
  constructor(hostRef) {
146
146
  index.registerInstance(this, hostRef);
147
- /**
148
- * Slide Count
149
- */
147
+ this.showStatus = false;
150
148
  this.slideNumber = 3;
151
- /**
152
- * Slides to show
153
- */
154
149
  this.slideShow = 3;
155
- /**
156
- * Display the arrow icon
157
- */
158
150
  this.showArrow = true;
159
- /**
160
- * Display the button
161
- */
162
151
  this.showButton = false;
163
- /**
164
- * Auto Slide
165
- */
166
152
  this.autoSlide = false;
167
- /**
168
- * Auto Slide loop time
169
- */
170
153
  this.loopTime = 1;
171
- /**
172
- * Auto fill the Item height
173
- */
174
154
  this.autoItemHeight = false;
175
- /**
176
- * Client custom styling via inline styles
177
- */
178
- this.clientStyling = '';
179
- /**
180
- * Client custom styling via url
181
- */
182
- this.clientStylingUrl = '';
183
155
  this.currentSlideNumber = 0;
184
156
  this.slidesCount = 0;
185
- this.limitStylingAppends = false;
186
- this.slides = null;
187
157
  this.slideWidth = 0;
188
158
  this.currentPage = 0;
189
159
  this.controls = {
@@ -222,54 +192,38 @@ const GeneralSlider = class {
222
192
  }
223
193
  }
224
194
  componentWillLoad() {
195
+ this.slides = this.el.querySelectorAll('li');
196
+ this.slidesCount = this.slides.length;
225
197
  if (!this.slideNumber)
226
198
  this.slideNumber = 1;
227
199
  if (!this.slideShow)
228
200
  this.slideShow = 1;
229
201
  }
230
202
  componentDidLoad() {
231
- this.slides = this.slotEl.assignedElements();
232
- this.slidesCount = this.slides.length;
203
+ this.sliderList = this.el.shadowRoot.querySelector('ul');
204
+ this.slideWidth = this.slides[0].offsetWidth;
233
205
  for (let type in this.controls) {
234
206
  this.controls[type] = this.el.shadowRoot.querySelector('.Button' + type);
235
207
  }
208
+ this.updateControls();
236
209
  if (this.autoSlide) {
237
210
  this.setSlideAutoInterval();
238
211
  }
239
- if (!this.limitStylingAppends && this.el.shadowRoot) {
240
- if (this.clientStyling)
241
- this.setClientStyling();
242
- if (this.clientStylingUrl)
243
- this.setClientStylingURL();
244
- this.limitStylingAppends = true;
245
- }
246
212
  }
247
213
  componentDidRender() {
248
- if (this.slides)
249
- this.slideWidth = this.slides[0].offsetWidth;
250
214
  this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
251
215
  this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
252
216
  this.updateListStyle();
253
- if (!this.limitStylingAppends && this.el.shadowRoot) {
254
- if (this.clientStyling)
255
- this.setClientStyling();
256
- if (this.clientStylingUrl)
257
- this.setClientStylingURL();
258
- this.limitStylingAppends = true;
259
- }
260
217
  }
261
218
  updateListStyle() {
262
219
  if (!this.autoItemHeight)
263
220
  return;
264
- if (this.slides === null)
265
- return;
266
- this.slides.forEach((li, index) => {
221
+ const sliderlist = this.el.querySelectorAll('li');
222
+ sliderlist.forEach((li, index) => {
223
+ li.classList.add('hide');
267
224
  if (index >= this.currentPage * this.slideNumber && index < (this.currentPage + 1) * this.slideNumber) {
268
225
  li.classList.remove('hide');
269
226
  }
270
- else {
271
- li.classList.add('hide');
272
- }
273
227
  });
274
228
  }
275
229
  disconnectedCallback() {
@@ -322,7 +276,7 @@ const GeneralSlider = class {
322
276
  }, Number(this.loopTime) * 1000);
323
277
  }
324
278
  componentDidUpdate() {
325
- this.sliderEl.style.transform = `translateX(${this.currentSlideNumber * this.slideWidth * -1}px)`;
279
+ this.sliderList.style.transform = `translateX(${this.currentSlideNumber * this.slideWidth * -1}px)`;
326
280
  this.updateControls();
327
281
  }
328
282
  switchLoopStatus(isMouseMoveEnter) {
@@ -337,28 +291,9 @@ const GeneralSlider = class {
337
291
  }
338
292
  }
339
293
  }
340
- setClientStyling() {
341
- const sheet = new CSSStyleSheet();
342
- // @ts-ignore
343
- sheet.replace(this.clientStyling);
344
- // @ts-ignore
345
- this.el.shadowRoot.adoptedStyleSheets = [...this.el.shadowRoot.adoptedStyleSheets, sheet];
346
- }
347
- setClientStylingURL() {
348
- let url = new URL(this.clientStylingUrl);
349
- fetch(url.href)
350
- .then((res) => res.text())
351
- .then((data) => {
352
- const sheet = new CSSStyleSheet();
353
- // @ts-ignore
354
- sheet.replace(data);
355
- // @ts-ignore
356
- this.el.shadowRoot.adoptedStyleSheets = [...this.el.shadowRoot.adoptedStyleSheets, sheet];
357
- });
358
- }
359
294
  render() {
360
295
  return (index.h("div", { class: "GeneralSlider" }, index.h("div", { class: "Slider" }, this.showArrow &&
361
- index.h("div", null, index.h("button", { type: "button", class: "Button ButtonNext", onClick: this.slide.bind(this, true), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, ">"), index.h("button", { type: "button", class: "Button ButtonPrev", onClick: this.slide.bind(this, false), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "<")), index.h("ul", { class: `SliderList Col-${this.slideShow}`, part: "SliderList", onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false), ref: (el) => this.sliderEl = el }, index.h("slot", { ref: (el) => this.slotEl = el }))), this.showButton && this.slidesCount > 0 &&
296
+ index.h("div", null, index.h("button", { type: "button", class: "Button ButtonNext", onClick: this.slide.bind(this, true), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, ">"), index.h("button", { type: "button", class: "Button ButtonPrev", onClick: this.slide.bind(this, false), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "<")), index.h("ul", { class: `SliderList Col-${this.slideShow}`, part: "SliderList", onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, index.h("slot", null))), this.showButton && this.slidesCount > 0 &&
362
297
  index.h("div", { class: "PageButtons", part: "PageButtons" }, [...Array(this.slidesCount / this.slideNumber)].map((_x, i) => index.h("div", { class: `PageButton ${this.currentPage == i ? 'active' : ''}`, title: `page${i}`, onClick: this.slideTo.bind(this, i), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "\u00A0")))));
363
298
  }
364
299
  get el() { return index.getElement(this); }
@@ -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 if ((!isProp ) &&
283
277
  memberName[0] === 'o' &&
284
278
  memberName[1] === 'n') {
@@ -452,7 +446,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
452
446
  for (; startIdx <= endIdx; ++startIdx) {
453
447
  if ((vnode = vnodes[startIdx])) {
454
448
  elm = vnode.$elm$;
455
- callNodeRefs(vnode);
456
449
  // remove the vnode's element from the dom
457
450
  elm.remove();
458
451
  }
@@ -582,12 +575,6 @@ const patch = (oldVNode, newVNode) => {
582
575
  elm.data = text;
583
576
  }
584
577
  };
585
- const callNodeRefs = (vNode) => {
586
- {
587
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
588
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
589
- }
590
- };
591
578
  const renderVdom = (hostRef, renderFnResults) => {
592
579
  const hostElm = hostRef.$hostElement$;
593
580
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f60eba31.js');
5
+ const index = require('./index-147d65ae.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-slider_2.cjs",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"currentSlideNumber":[32],"slidesCount":[32],"limitStylingAppends":[32]}]]]], options);
17
+ return index.bootstrapLazy([["casino-tournament-slider_2.cjs",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"showStatus":[4,"show-status"],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"currentSlideNumber":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -7,46 +7,16 @@ const GeneralSlider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
7
7
  super();
8
8
  this.__registerHost();
9
9
  this.__attachShadow();
10
- /**
11
- * Slide Count
12
- */
10
+ this.showStatus = false;
13
11
  this.slideNumber = 3;
14
- /**
15
- * Slides to show
16
- */
17
12
  this.slideShow = 3;
18
- /**
19
- * Display the arrow icon
20
- */
21
13
  this.showArrow = true;
22
- /**
23
- * Display the button
24
- */
25
14
  this.showButton = false;
26
- /**
27
- * Auto Slide
28
- */
29
15
  this.autoSlide = false;
30
- /**
31
- * Auto Slide loop time
32
- */
33
16
  this.loopTime = 1;
34
- /**
35
- * Auto fill the Item height
36
- */
37
17
  this.autoItemHeight = false;
38
- /**
39
- * Client custom styling via inline styles
40
- */
41
- this.clientStyling = '';
42
- /**
43
- * Client custom styling via url
44
- */
45
- this.clientStylingUrl = '';
46
18
  this.currentSlideNumber = 0;
47
19
  this.slidesCount = 0;
48
- this.limitStylingAppends = false;
49
- this.slides = null;
50
20
  this.slideWidth = 0;
51
21
  this.currentPage = 0;
52
22
  this.controls = {
@@ -85,54 +55,38 @@ const GeneralSlider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
85
55
  }
86
56
  }
87
57
  componentWillLoad() {
58
+ this.slides = this.el.querySelectorAll('li');
59
+ this.slidesCount = this.slides.length;
88
60
  if (!this.slideNumber)
89
61
  this.slideNumber = 1;
90
62
  if (!this.slideShow)
91
63
  this.slideShow = 1;
92
64
  }
93
65
  componentDidLoad() {
94
- this.slides = this.slotEl.assignedElements();
95
- this.slidesCount = this.slides.length;
66
+ this.sliderList = this.el.shadowRoot.querySelector('ul');
67
+ this.slideWidth = this.slides[0].offsetWidth;
96
68
  for (let type in this.controls) {
97
69
  this.controls[type] = this.el.shadowRoot.querySelector('.Button' + type);
98
70
  }
71
+ this.updateControls();
99
72
  if (this.autoSlide) {
100
73
  this.setSlideAutoInterval();
101
74
  }
102
- if (!this.limitStylingAppends && this.el.shadowRoot) {
103
- if (this.clientStyling)
104
- this.setClientStyling();
105
- if (this.clientStylingUrl)
106
- this.setClientStylingURL();
107
- this.limitStylingAppends = true;
108
- }
109
75
  }
110
76
  componentDidRender() {
111
- if (this.slides)
112
- this.slideWidth = this.slides[0].offsetWidth;
113
77
  this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
114
78
  this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
115
79
  this.updateListStyle();
116
- if (!this.limitStylingAppends && this.el.shadowRoot) {
117
- if (this.clientStyling)
118
- this.setClientStyling();
119
- if (this.clientStylingUrl)
120
- this.setClientStylingURL();
121
- this.limitStylingAppends = true;
122
- }
123
80
  }
124
81
  updateListStyle() {
125
82
  if (!this.autoItemHeight)
126
83
  return;
127
- if (this.slides === null)
128
- return;
129
- this.slides.forEach((li, index) => {
84
+ const sliderlist = this.el.querySelectorAll('li');
85
+ sliderlist.forEach((li, index) => {
86
+ li.classList.add('hide');
130
87
  if (index >= this.currentPage * this.slideNumber && index < (this.currentPage + 1) * this.slideNumber) {
131
88
  li.classList.remove('hide');
132
89
  }
133
- else {
134
- li.classList.add('hide');
135
- }
136
90
  });
137
91
  }
138
92
  disconnectedCallback() {
@@ -185,7 +139,7 @@ const GeneralSlider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
185
139
  }, Number(this.loopTime) * 1000);
186
140
  }
187
141
  componentDidUpdate() {
188
- this.sliderEl.style.transform = `translateX(${this.currentSlideNumber * this.slideWidth * -1}px)`;
142
+ this.sliderList.style.transform = `translateX(${this.currentSlideNumber * this.slideWidth * -1}px)`;
189
143
  this.updateControls();
190
144
  }
191
145
  switchLoopStatus(isMouseMoveEnter) {
@@ -200,33 +154,15 @@ const GeneralSlider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
200
154
  }
201
155
  }
202
156
  }
203
- setClientStyling() {
204
- const sheet = new CSSStyleSheet();
205
- // @ts-ignore
206
- sheet.replace(this.clientStyling);
207
- // @ts-ignore
208
- this.el.shadowRoot.adoptedStyleSheets = [...this.el.shadowRoot.adoptedStyleSheets, sheet];
209
- }
210
- setClientStylingURL() {
211
- let url = new URL(this.clientStylingUrl);
212
- fetch(url.href)
213
- .then((res) => res.text())
214
- .then((data) => {
215
- const sheet = new CSSStyleSheet();
216
- // @ts-ignore
217
- sheet.replace(data);
218
- // @ts-ignore
219
- this.el.shadowRoot.adoptedStyleSheets = [...this.el.shadowRoot.adoptedStyleSheets, sheet];
220
- });
221
- }
222
157
  render() {
223
158
  return (h("div", { class: "GeneralSlider" }, h("div", { class: "Slider" }, this.showArrow &&
224
- h("div", null, h("button", { type: "button", class: "Button ButtonNext", onClick: this.slide.bind(this, true), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, ">"), h("button", { type: "button", class: "Button ButtonPrev", onClick: this.slide.bind(this, false), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "<")), h("ul", { class: `SliderList Col-${this.slideShow}`, part: "SliderList", onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false), ref: (el) => this.sliderEl = el }, h("slot", { ref: (el) => this.slotEl = el }))), this.showButton && this.slidesCount > 0 &&
159
+ h("div", null, h("button", { type: "button", class: "Button ButtonNext", onClick: this.slide.bind(this, true), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, ">"), h("button", { type: "button", class: "Button ButtonPrev", onClick: this.slide.bind(this, false), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "<")), h("ul", { class: `SliderList Col-${this.slideShow}`, part: "SliderList", onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, h("slot", null))), this.showButton && this.slidesCount > 0 &&
225
160
  h("div", { class: "PageButtons", part: "PageButtons" }, [...Array(this.slidesCount / this.slideNumber)].map((_x, i) => h("div", { class: `PageButton ${this.currentPage == i ? 'active' : ''}`, title: `page${i}`, onClick: this.slideTo.bind(this, i), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "\u00A0")))));
226
161
  }
227
162
  get el() { return this; }
228
163
  static get style() { return generalSliderCss; }
229
164
  }, [1, "general-slider", {
165
+ "showStatus": [4, "show-status"],
230
166
  "slideNumber": [2, "slide-number"],
231
167
  "slideShow": [2, "slide-show"],
232
168
  "showArrow": [4, "show-arrow"],
@@ -234,11 +170,7 @@ const GeneralSlider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
234
170
  "autoSlide": [4, "auto-slide"],
235
171
  "loopTime": [2, "loop-time"],
236
172
  "autoItemHeight": [4, "auto-item-height"],
237
- "clientStyling": [1, "client-styling"],
238
- "clientStylingUrl": [1, "client-styling-url"],
239
- "currentSlideNumber": [32],
240
- "slidesCount": [32],
241
- "limitStylingAppends": [32]
173
+ "currentSlideNumber": [32]
242
174
  }]);
243
175
  function defineCustomElement() {
244
176
  if (typeof customElements === "undefined") {
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-c48feefa.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-3d143a9c.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-slider_2",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"currentSlideNumber":[32],"slidesCount":[32],"limitStylingAppends":[32]}]]]], options);
16
+ return bootstrapLazy([["casino-tournament-slider_2",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"showStatus":[4,"show-status"],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"currentSlideNumber":[32]}]]]], options);
17
17
  });
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, g as getElement } from './index-c48feefa.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-3d143a9c.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -140,46 +140,16 @@ const generalSliderCss = ":host{display:block}.GeneralSlider{position:relative}.
140
140
  const GeneralSlider = class {
141
141
  constructor(hostRef) {
142
142
  registerInstance(this, hostRef);
143
- /**
144
- * Slide Count
145
- */
143
+ this.showStatus = false;
146
144
  this.slideNumber = 3;
147
- /**
148
- * Slides to show
149
- */
150
145
  this.slideShow = 3;
151
- /**
152
- * Display the arrow icon
153
- */
154
146
  this.showArrow = true;
155
- /**
156
- * Display the button
157
- */
158
147
  this.showButton = false;
159
- /**
160
- * Auto Slide
161
- */
162
148
  this.autoSlide = false;
163
- /**
164
- * Auto Slide loop time
165
- */
166
149
  this.loopTime = 1;
167
- /**
168
- * Auto fill the Item height
169
- */
170
150
  this.autoItemHeight = false;
171
- /**
172
- * Client custom styling via inline styles
173
- */
174
- this.clientStyling = '';
175
- /**
176
- * Client custom styling via url
177
- */
178
- this.clientStylingUrl = '';
179
151
  this.currentSlideNumber = 0;
180
152
  this.slidesCount = 0;
181
- this.limitStylingAppends = false;
182
- this.slides = null;
183
153
  this.slideWidth = 0;
184
154
  this.currentPage = 0;
185
155
  this.controls = {
@@ -218,54 +188,38 @@ const GeneralSlider = class {
218
188
  }
219
189
  }
220
190
  componentWillLoad() {
191
+ this.slides = this.el.querySelectorAll('li');
192
+ this.slidesCount = this.slides.length;
221
193
  if (!this.slideNumber)
222
194
  this.slideNumber = 1;
223
195
  if (!this.slideShow)
224
196
  this.slideShow = 1;
225
197
  }
226
198
  componentDidLoad() {
227
- this.slides = this.slotEl.assignedElements();
228
- this.slidesCount = this.slides.length;
199
+ this.sliderList = this.el.shadowRoot.querySelector('ul');
200
+ this.slideWidth = this.slides[0].offsetWidth;
229
201
  for (let type in this.controls) {
230
202
  this.controls[type] = this.el.shadowRoot.querySelector('.Button' + type);
231
203
  }
204
+ this.updateControls();
232
205
  if (this.autoSlide) {
233
206
  this.setSlideAutoInterval();
234
207
  }
235
- if (!this.limitStylingAppends && this.el.shadowRoot) {
236
- if (this.clientStyling)
237
- this.setClientStyling();
238
- if (this.clientStylingUrl)
239
- this.setClientStylingURL();
240
- this.limitStylingAppends = true;
241
- }
242
208
  }
243
209
  componentDidRender() {
244
- if (this.slides)
245
- this.slideWidth = this.slides[0].offsetWidth;
246
210
  this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
247
211
  this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
248
212
  this.updateListStyle();
249
- if (!this.limitStylingAppends && this.el.shadowRoot) {
250
- if (this.clientStyling)
251
- this.setClientStyling();
252
- if (this.clientStylingUrl)
253
- this.setClientStylingURL();
254
- this.limitStylingAppends = true;
255
- }
256
213
  }
257
214
  updateListStyle() {
258
215
  if (!this.autoItemHeight)
259
216
  return;
260
- if (this.slides === null)
261
- return;
262
- this.slides.forEach((li, index) => {
217
+ const sliderlist = this.el.querySelectorAll('li');
218
+ sliderlist.forEach((li, index) => {
219
+ li.classList.add('hide');
263
220
  if (index >= this.currentPage * this.slideNumber && index < (this.currentPage + 1) * this.slideNumber) {
264
221
  li.classList.remove('hide');
265
222
  }
266
- else {
267
- li.classList.add('hide');
268
- }
269
223
  });
270
224
  }
271
225
  disconnectedCallback() {
@@ -318,7 +272,7 @@ const GeneralSlider = class {
318
272
  }, Number(this.loopTime) * 1000);
319
273
  }
320
274
  componentDidUpdate() {
321
- this.sliderEl.style.transform = `translateX(${this.currentSlideNumber * this.slideWidth * -1}px)`;
275
+ this.sliderList.style.transform = `translateX(${this.currentSlideNumber * this.slideWidth * -1}px)`;
322
276
  this.updateControls();
323
277
  }
324
278
  switchLoopStatus(isMouseMoveEnter) {
@@ -333,28 +287,9 @@ const GeneralSlider = class {
333
287
  }
334
288
  }
335
289
  }
336
- setClientStyling() {
337
- const sheet = new CSSStyleSheet();
338
- // @ts-ignore
339
- sheet.replace(this.clientStyling);
340
- // @ts-ignore
341
- this.el.shadowRoot.adoptedStyleSheets = [...this.el.shadowRoot.adoptedStyleSheets, sheet];
342
- }
343
- setClientStylingURL() {
344
- let url = new URL(this.clientStylingUrl);
345
- fetch(url.href)
346
- .then((res) => res.text())
347
- .then((data) => {
348
- const sheet = new CSSStyleSheet();
349
- // @ts-ignore
350
- sheet.replace(data);
351
- // @ts-ignore
352
- this.el.shadowRoot.adoptedStyleSheets = [...this.el.shadowRoot.adoptedStyleSheets, sheet];
353
- });
354
- }
355
290
  render() {
356
291
  return (h("div", { class: "GeneralSlider" }, h("div", { class: "Slider" }, this.showArrow &&
357
- h("div", null, h("button", { type: "button", class: "Button ButtonNext", onClick: this.slide.bind(this, true), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, ">"), h("button", { type: "button", class: "Button ButtonPrev", onClick: this.slide.bind(this, false), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "<")), h("ul", { class: `SliderList Col-${this.slideShow}`, part: "SliderList", onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false), ref: (el) => this.sliderEl = el }, h("slot", { ref: (el) => this.slotEl = el }))), this.showButton && this.slidesCount > 0 &&
292
+ h("div", null, h("button", { type: "button", class: "Button ButtonNext", onClick: this.slide.bind(this, true), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, ">"), h("button", { type: "button", class: "Button ButtonPrev", onClick: this.slide.bind(this, false), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "<")), h("ul", { class: `SliderList Col-${this.slideShow}`, part: "SliderList", onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, h("slot", null))), this.showButton && this.slidesCount > 0 &&
358
293
  h("div", { class: "PageButtons", part: "PageButtons" }, [...Array(this.slidesCount / this.slideNumber)].map((_x, i) => h("div", { class: `PageButton ${this.currentPage == i ? 'active' : ''}`, title: `page${i}`, onClick: this.slideTo.bind(this, i), onMouseEnter: this.switchLoopStatus.bind(this, true), onMouseLeave: this.switchLoopStatus.bind(this, false) }, "\u00A0")))));
359
294
  }
360
295
  get el() { return getElement(this); }
@@ -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 if ((!isProp ) &&
261
255
  memberName[0] === 'o' &&
262
256
  memberName[1] === 'n') {
@@ -430,7 +424,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
430
424
  for (; startIdx <= endIdx; ++startIdx) {
431
425
  if ((vnode = vnodes[startIdx])) {
432
426
  elm = vnode.$elm$;
433
- callNodeRefs(vnode);
434
427
  // remove the vnode's element from the dom
435
428
  elm.remove();
436
429
  }
@@ -560,12 +553,6 @@ const patch = (oldVNode, newVNode) => {
560
553
  elm.data = text;
561
554
  }
562
555
  };
563
- const callNodeRefs = (vNode) => {
564
- {
565
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
566
- vNode.$children$ && vNode.$children$.map(callNodeRefs);
567
- }
568
- };
569
556
  const renderVdom = (hostRef, renderFnResults) => {
570
557
  const hostElm = hostRef.$hostElement$;
571
558
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-c48feefa.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-3d143a9c.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-slider_2",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"currentSlideNumber":[32],"slidesCount":[32],"limitStylingAppends":[32]}]]]], options);
13
+ return bootstrapLazy([["casino-tournament-slider_2",[[1,"casino-tournament-slider",{"useEvent":[1,"use-event"],"endpoint":[1],"tournamentId":[1,"tournament-id"],"session":[1],"language":[1],"gamesLimit":[2,"games-limit"],"offset":[2],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"showTitle":[4,"show-title"],"limitStylingAppends":[32],"games":[32],"hover":[32],"hoverIndex":[32]},[[8,"getTournamentInfoCompleted","todoCompletedHandler"]]],[1,"general-slider",{"showStatus":[4,"show-status"],"slideNumber":[2,"slide-number"],"slideShow":[2,"slide-show"],"showArrow":[4,"show-arrow"],"showButton":[4,"show-button"],"autoSlide":[4,"auto-slide"],"loopTime":[2,"loop-time"],"autoItemHeight":[4,"auto-item-height"],"currentSlideNumber":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-tournament-slider",
3
- "version": "1.31.1",
3
+ "version": "1.31.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as s}from"./p-7bade785.js";const e={en:{playNow:"Play now",sliderTitle:"Participanting games"},"zh-hk":{playNow:"现在播放"},fr:{playNow:"Joue maintenant"},ro:{playNow:"Joaca acum"},hu:{playNow:"Játsszon most"},tr:{playNow:"Şimdi oyna"},el:{playNow:"Παίξε τώρα"},es:{playNow:"Jugar Ya"},pt:{playNow:"Jogue agora"},hr:{playNow:"IGRAJ SADA"}},h=(t,i)=>{var s,h;return(null===(s=e[i])||void 0===s?void 0:s[t])||(null===(h=e.en)||void 0===h?void 0:h[t])},o=class{constructor(i){t(this,i),this.gamesLimit=30,this.offset=0,this.slideNumber=3,this.slideShow=3,this.clientStyling="",this.clientStylingUrl="",this.showTitle=!1,this.limitStylingAppends=!1,this.enter=t=>{this.hover=!0,this.hoverIndex=t},this.leave=()=>{this.hover=!1,this.hoverIndex=-1},this.gameClicked=t=>{window.postMessage({type:"TournamentGameAction",gameId:t.id,name:t.name},window.location.href)}}todoCompletedHandler(t){if(t.detail&&this.useEvent){if(!t.detail.games)return;this.games=t.detail.games.items}}getTournamentInfo(){let t=new URL(this.endpoint+`/v1/tournaments/${this.tournamentId}`),i=new Headers;t.searchParams.append("expand","games"),t.searchParams.append("language",this.language),t.searchParams.append("pagination",`games(limit=${this.gamesLimit},offset=${this.offset})`),t.searchParams.append("fields","games(id,name,thumbnail)"),this.session&&i.append("X-SessionId",this.session),fetch(t.href,{method:"GET",headers:i}).then((t=>t.json())).then((t=>{this.games=t.item.games.items}))}componentWillLoad(){!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 t=new CSSStyleSheet;t.replace(this.clientStyling),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const i=new CSSStyleSheet;i.replace(t),this.host.shadowRoot.adoptedStyleSheets=[...this.host.shadowRoot.adoptedStyleSheets,i]}))}render(){return i("div",{class:"TournamentSliderWrap"},i("div",{class:"TournamentSlider"},this.showTitle&&this.games&&i("div",{class:"SliderTitle"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"25",viewBox:"0 0 21 25",fill:"none"},i("path",{d:"M6.1774 22.1728C6.36493 22.2725 6.56274 22.0566 6.44793 21.8779C5.82475 20.908 5.23463 19.2759 6.17483 17.174C7.74273 13.6689 8.6968 11.8535 8.6968 11.8535C8.6968 11.8535 9.20426 13.9721 10.5799 15.8558C11.9038 17.6687 12.6285 19.9488 11.4602 21.8482C11.3506 22.0265 11.5439 22.2368 11.7302 22.1415C13.1763 21.4017 14.7983 19.9179 14.9813 16.965C15.0488 16.0627 14.9476 14.7995 14.4416 13.2054C13.791 11.185 12.9911 10.2423 12.5283 9.83741C12.3899 9.71629 12.1746 9.82363 12.1859 10.0072C12.3208 12.1872 11.5007 12.7404 11.0339 11.4937C10.8474 10.9957 10.7387 10.1344 10.7387 9.08558C10.7387 7.3394 10.2321 5.54188 9.1152 4.0812C8.82475 3.70134 8.4849 3.3464 8.09498 3.04372C7.95382 2.93411 7.74919 3.04428 7.76212 3.22252C7.84788 4.40628 7.77018 7.79884 4.79383 11.8519C2.09515 15.6115 3.14088 18.4989 3.51195 19.281C4.2214 20.7791 5.21098 21.6589 6.1774 22.1728Z",fill:"white"})),i("span",{class:"Title"},h("sliderTitle",this.language))),i("div",{class:"Items"},this.games&&i("general-slider",{"slide-number":this.slideNumber,"slide-show":this.slideShow},this.games&&this.games.map(((t,s)=>i("li",{class:"Item",onMouseEnter:()=>this.enter(s),onMouseLeave:()=>this.leave()},i("span",{class:"PlayNowButton "+(this.hoverIndex==s?"ItemHover":""),onClick:()=>{this.gameClicked(t)}},h("playNow",this.language)),i("img",{class:"Img",src:t.thumbnail,alt:t.name,title:t.name}))))))))}get host(){return s(this)}};o.style=":host{display:block}.Item{color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.Item .Img{width:100%;height:100%}.PlayNowButton{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ItemHover{opacity:1}.Items .Item:first-child{margin-left:0}.Items .Item:last-child{margin-right:0}.SliderTitle{display:flex;align-items:center;padding:6px 0;gap:11px}.Title{color:#fff;font-size:14px;font-weight:600}";const l=class{constructor(i){t(this,i),this.slideNumber=3,this.slideShow=3,this.showArrow=!0,this.showButton=!1,this.autoSlide=!1,this.loopTime=1,this.autoItemHeight=!1,this.clientStyling="",this.clientStylingUrl="",this.currentSlideNumber=0,this.slidesCount=0,this.limitStylingAppends=!1,this.slides=null,this.slideWidth=0,this.currentPage=0,this.controls={Prev:null,Next:null},this.xDown=null,this.yDown=null}slide(t){let i=0;i=t?this.currentSlideNumber+this.slideNumber:this.currentSlideNumber-this.slideNumber,i<0||i>=this.slidesCount||(this.currentSlideNumber=i,this.currentPage=this.currentSlideNumber/this.slideNumber,this.updateListStyle())}slideTo(t){this.currentSlideNumber=t*this.slideNumber,this.currentPage=t,this.updateListStyle()}updateControls(){this.switchControl("Prev",0!==this.currentSlideNumber),this.switchControl("Next",this.currentSlideNumber!==this.slidesCount-this.slideShow)}switchControl(t,i){this.controls[t]&&(this.controls[t].disabled=!i)}componentWillLoad(){this.slideNumber||(this.slideNumber=1),this.slideShow||(this.slideShow=1)}componentDidLoad(){this.slides=this.slotEl.assignedElements(),this.slidesCount=this.slides.length;for(let t in this.controls)this.controls[t]=this.el.shadowRoot.querySelector(".Button"+t);this.autoSlide&&this.setSlideAutoInterval(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidRender(){this.slides&&(this.slideWidth=this.slides[0].offsetWidth),this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.updateListStyle(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}updateListStyle(){this.autoItemHeight&&null!==this.slides&&this.slides.forEach(((t,i)=>{i>=this.currentPage*this.slideNumber&&i<(this.currentPage+1)*this.slideNumber?t.classList.remove("hide"):t.classList.add("hide")}))}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY,clearInterval(this.sliderInterval)}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,s=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(s)&&this.slide(i>0),this.xDown=null,this.yDown=null,this.autoSlide&&this.setSlideAutoInterval()}setSlideAutoInterval(){0!=this.loopTime&&(clearInterval(this.sliderInterval),this.sliderInterval=setInterval((()=>{this.slideTo(this.currentPage+1<this.slidesCount/this.slideNumber?this.currentPage+1:0)}),1e3*Number(this.loopTime)))}componentDidUpdate(){this.sliderEl.style.transform=`translateX(${this.currentSlideNumber*this.slideWidth*-1}px)`,this.updateControls()}switchLoopStatus(t){this.autoSlide&&this.loopTime>0&&(t?clearInterval(this.sliderInterval):this.setSlideAutoInterval())}setClientStyling(){const t=new CSSStyleSheet;t.replace(this.clientStyling),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,t]}setClientStylingURL(){let t=new URL(this.clientStylingUrl);fetch(t.href).then((t=>t.text())).then((t=>{const i=new CSSStyleSheet;i.replace(t),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,i]}))}render(){return i("div",{class:"GeneralSlider"},i("div",{class:"Slider"},this.showArrow&&i("div",null,i("button",{type:"button",class:"Button ButtonNext",onClick:this.slide.bind(this,!0),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},">"),i("button",{type:"button",class:"Button ButtonPrev",onClick:this.slide.bind(this,!1),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},"<")),i("ul",{class:`SliderList Col-${this.slideShow}`,part:"SliderList",onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1),ref:t=>this.sliderEl=t},i("slot",{ref:t=>this.slotEl=t}))),this.showButton&&this.slidesCount>0&&i("div",{class:"PageButtons",part:"PageButtons"},[...Array(this.slidesCount/this.slideNumber)].map(((t,s)=>i("div",{class:"PageButton "+(this.currentPage==s?"active":""),title:`page${s}`,onClick:this.slideTo.bind(this,s),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)}," ")))))}get el(){return s(this)}};l.style=":host{display:block}.GeneralSlider{position:relative}.Slider{position:relative;width:100%;margin:0 auto;overflow:hidden}.SliderList{display:flex;margin:0;padding:0;list-style:none;transition:transform 0.5s ease-in-out}::slotted(li){flex:1 0 auto;width:100%;margin:auto}::slotted(li.hide){visibility:hidden;height:0;transition-delay:500ms}.Col-2 ::slotted(li){flex:2 0 auto;width:50%}.Col-3 ::slotted(li){flex:3 0 auto;width:33.3333333333%}.Col-4 ::slotted(li){flex:4 0 auto;width:25%}.Col-5 ::slotted(li){flex:5 0 auto;width:20%}.Col-6 ::slotted(li){flex:6 0 auto;width:16.6666666667%}.Col-7 ::slotted(li){flex:7 0 auto;width:14.2857142857%}.Col-8 ::slotted(li){flex:8 0 auto;width:12.5%}.Col-9 ::slotted(li){flex:9 0 auto;width:11.1111111111%}.Col-10 ::slotted(li){flex:10 0 auto;width:10%}.Col-11 ::slotted(li){flex:11 0 auto;width:9.0909090909%}.Col-12 ::slotted(li){flex:12 0 auto;width:8.3333333333%}.Button{position:absolute;z-index:1;top:calc(50% - 32px);padding:20px;font-size:20px;line-height:20px;opacity:0.5;border:none;background:var(--emfe-w-color-contrast, #07072A);color:var(--emfe-w-color-white, #FFFFFF);cursor:pointer}.Button:hover{opacity:1;transition:opacity 0.5s ease-in-out}.Button[disabled],.Button[disabled]:hover{color:var(--emfe-w-color-gray-150, #828282);opacity:0.25}.Button.ButtonNext{right:0}.PageButtons{display:flex;gap:4px;margin-top:8px}.PageButton{width:15px;height:4px;border-radius:4px;background-color:var(--emfe-w-tournament-color-primary, #0072ed);opacity:0.2;cursor:pointer;float:right}.PageButton.active{width:45px;opacity:1}";export{o as casino_tournament_slider,l as general_slider}
@@ -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})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),i=u(t,s),c=d(n);r.ael(o,l,i,c),(t.o=t.o||[]).push((()=>r.rel(o,l,i,c)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){J(e)}},f=(e,t)=>8&t?s:e,d=e=>0!=(2&e),h=new WeakMap,p=e=>"sc-"+e.h,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&&!$(l))&&(l+=""),s&&o?r[r.length-1].p+=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.m=t,r.length>0&&(c.$=r),c},w=(e,t)=>({t:0,g:e,p:t,v:null,$:null,m:null}),b={},g=(e,t,n,l,o,i)=>{if(n!==l){let c=I(e,t),a=t.toLowerCase();if("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 if(c||"o"!==t[0]||"n"!==t[1]){const s=$(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):I(s,a)?a.slice(2):a[2]+t.slice(3),n&&r.rel(e,t,n,!1),l&&r.ael(e,t,l,!1)}},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.m||m,r=t.m||m;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.$[s],a=0;if(null!==c.p)r=c.v=o.createTextNode(c.p);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.$)for(a=0;a<c.$.length;++a)i=O(t,c,a),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,L(l),s.remove())},C=(e,t)=>e.g===t.g,x=(e,t)=>{const l=t.v=e.v,s=e.$,o=t.$,r=t.g,i=t.p;null===i?(n="svg"===r||"foreignObject"!==r&&n,"slot"===r||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],a=t[i],u=l.length-1,f=l[0],d=l[u];for(;o<=i&&r<=u;)null==c?c=t[++o]:null==a?a=t[--i]:null==f?f=l[++r]:null==d?d=l[--u]:C(c,f)?(x(c,f),c=t[++o],f=l[++r]):C(a,d)?(x(a,d),a=t[--i],d=l[--u]):C(c,d)?(x(c,d),e.insertBefore(c.v,a.v.nextSibling),c=t[++o],d=l[--u]):C(a,f)?(x(a,f),e.insertBefore(a.v,c.v),a=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[u+1]?null:l[u+1].v,n,l,r,u):r>u&&k(t,o,i)})(l,s,t,o):null!==o?(null!==e.p&&(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.p!==i&&(l.data=i)},L=e=>{e.m&&e.m.ref&&e.m.ref(null),e.$&&e.$.map(L)},P=e=>z(e).S,D=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},E=(e,t)=>{if(e.t|=16,!(4&e.t))return D(e,e.O),se((()=>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])=>A(n,e,t))),e.u=null),l=A(n,"componentWillLoad")),F(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=X.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.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=()=>U(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){J(e,n.S)}return null},U=e=>{const t=e.S,n=e.i,l=e.O;A(n,"componentDidRender"),64&e.t?A(n,"componentDidUpdate"):(e.t|=64,q(t),A(n,"componentDidLoad"),e.C(t),l||W()),e.j&&(e.j(),e.j=void 0),512&e.t&&le((()=>E(e,!1))),e.t&=-517},W=()=>{q(o.documentElement),le((()=>(e=>{const t=r.ce("appload",{detail:{namespace:"casino-tournament-slider"}});return e.dispatchEvent(t),t})(s)))},A=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){J(e)}},F=(e,t)=>e&&e.then?e.then(t):t(),q=e=>e.classList.add("hydrated"),H=(e,t,n)=>{if(t.L){const l=Object.entries(t.L),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>z(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=z(e),o=s.P.get(t),r=s.t,i=s.i;n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.L[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),i&&2==(18&r)&&E(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},V=(e,t={})=>{const n=[],l=t.exclude||[],i=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),d=o.createElement("style"),h=[];let 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],L:t[2],D:t[3]};s.L=t[2],s.D=t[3];const o=s.h,u=class extends HTMLElement{constructor(e){super(e),G(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),$?h.push(this):r.jmp((()=>(e=>{if(0==(1&r.t)){const t=z(e),n=t.M,l=()=>{};if(1&t.t)a(e,t,n.D);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){D(t,t.O=n);break}}n.L&&Object.entries(n.L).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=Q(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(H(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){J(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=p(n);if(!X.has(t)){const l=()=>{};((e,t,n)=>{let l=X.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,X.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,r=()=>E(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=z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),A(t,"disconnectedCallback")}})()))}componentOnReady(){return z(this).N}};s.R=e[0],l.includes(o)||i.get(o)||(n.push(o),i.define(o,H(u,s,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),$=!1,h.length?h.map((e=>e.connectedCallback())):r.jmp((()=>m=setTimeout(W,30)))},_=new WeakMap,z=e=>_.get(e),B=(e,t)=>_.set(t.i=e,t),G=(e,t)=>{const n={t:0,S:e,M:t,P:new Map};return n.N=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.D),_.set(e,n)},I=(e,t)=>t in e,J=(e,t)=>(0,console.error)(e,t),K=new Map,Q=e=>{const t=e.h.replace(/-/g,"_"),n=e.R,l=K.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(K.set(n,e),e[t])),J)},X=new Map,Y=[],Z=[],ee=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&r.t?le(ne):r.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){J(e)}e.length=0},ne=()=>{te(Y),te(Z),(l=Y.length>0)&&r.raf(ne)},le=e=>i().then(e),se=ee(Z,!0);export{V as b,P as g,y as h,i as p,B as r}
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;