@everymatrix/casino-collections-providers 1.2.1 → 1.3.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.
@@ -638,7 +638,7 @@ return"logo"==t[1]?_n:/*titletype*/"title"==t[1]?En:void 0}let v=m(t),_=v&&v(t),
|
|
638
638
|
return t[21](/*category*/t[39])}return{c(){e=d("div"),r=d("div"),n=d("div"),_&&_.c(),o=y(),i=d("div");for(let t=0;t<w.length;t+=1)w[t].c();a=y(),g(n,"class","CategorySlideTopContainer"),g(i,"class","CategorySlideGameContainer"),g(r,"class",s="CategorySlide "+(/*category*/"vendor"==t[39]?.flag[0]?"CategorySlideNoHighlight":"")),E(r,"background-image","url("+/*category*/t[39]?.background+")"),g(e,"class","CategoriesSliderWrapper Animation")},m(t,s){h(t,e,s),u(e,r),u(r,n),_&&_.m(n,null),u(r,o),u(r,i);for(let t=0;t<w.length;t+=1)w[t].m(i,null);u(e,a),l||(c=b(r,"click",A),l=!0)},p(e,o){if(v===(v=m(t=e))&&_?_.p(t,o):(_&&_.d(1),_=v&&v(t),_&&(_.c(),_.m(n,null))),/*gameCategories, openGame*/1028&o[0]){let e;for(T=/*category*/t[39].games,e=0;e<T.length;e+=1){const r=bn(t,T,e);w[e]?w[e].p(r,o):(w[e]=Tn(r),w[e].c(),w[e].m(i,null))}for(;e<w.length;e+=1)w[e].d(1);w.length=T.length}/*gameCategories*/4&o[0]&&s!==(s="CategorySlide "+(/*category*/"vendor"==t[39]?.flag[0]?"CategorySlideNoHighlight":""))&&g(r,"class",s),/*gameCategories*/4&o[0]&&E(r,"background-image","url("+/*category*/t[39]?.background+")")},d(t){t&&f(e),_&&_.d(),p(w,t),l=!1,c()}}}function An(e){let r;function n(t,e){/*isLoading*/
|
639
639
|
return t[5]?vn:gn}let o=n(e),i=o(e);return{c(){r=d("div"),i.c(),this.c=t},m(t,n){h(t,r,n),i.m(r,null),
|
640
640
|
/*div_binding*/e[23](r)},p(t,e){o===(o=n(t))&&i?i.p(t,e):(i.d(1),i=o(t),i&&(i.c(),i.m(r,null)))},i:t,o:t,d(t){t&&f(r),i.d(),
|
641
|
-
/*div_binding*/e[23](null)}}}function Bn(t,e,r){let n;var o,i;o=ir,i=t=>r(7,n=t),t.$$.on_destroy.push(c(o,i));let s,a,l,u,h,{endpoint:f=""}=e,{datasource:p=""}=e,{lang:d=""}=e,{type:m=""}=e,{titletype:y=""}=e,{clientstyling:b=""}=e,{clientstylingurl:g=""}=e,{
|
641
|
+
/*div_binding*/e[23](null)}}}function Bn(t,e,r){let n;var o,i;o=ir,i=t=>r(7,n=t),t.$$.on_destroy.push(c(o,i));let s,a,l,u,h,{endpoint:f=""}=e,{datasource:p=""}=e,{lang:d=""}=e,{type:m=""}=e,{titletype:y=""}=e,{clientstyling:b=""}=e,{clientstylingurl:g=""}=e,{translationurl:v=""}=e,E=[],_=!0,T=0,A=0,S=0,H=window.navigator.userAgent;Object.keys(ar).forEach((t=>{sr(t,ar[t])}));const P=t=>{
|
642
642
|
//store each slide HTML element in an array
|
643
643
|
l=[...s.children],
|
644
644
|
//iterate the array of elements and translate each of them by 100% times the index to create the slider
|
@@ -648,7 +648,7 @@ S=Math.round(s.offsetWidth/a)},O=()=>{
|
|
648
648
|
//in order to go to a specific slide, position all the slides relative to one of them, one which is determined by sliderScrollLeft and sliderScrollRight
|
649
649
|
P(T)},L=()=>{S>=A||(0===T?T=A-S:T-S<-1?T=0:T--,O())},I=()=>{S>=A||(T===A-S?T=0:A-S<T+1?T=A-S:T++,O())},N=(t,e,r)=>{window.postMessage({type:"OpenCollectionsProvidersGame",gameId:t,launchUrl:e,gameName:r},window.location.href),
|
650
650
|
//Analytics event
|
651
|
-
"function"==typeof gtag&>ag("event","OpenGame",{context:"CollectionsProviders",gameName:`${r}`})},R=t=>{window.postMessage({type:"OpenCollectionsProvidersCategory",categoryId:t},window.location.href)},M=()=>{var t;t=d,Ke.set(t)};w((()=>{r(6,h=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(H))}));return t.$$set=t=>{"endpoint"in t&&r(12,f=t.endpoint),"datasource"in t&&r(13,p=t.datasource),"lang"in t&&r(14,d=t.lang),"type"in t&&r(0,m=t.type),"titletype"in t&&r(1,y=t.titletype),"clientstyling"in t&&r(15,b=t.clientstyling),"clientstylingurl"in t&&r(16,g=t.clientstylingurl),"
|
651
|
+
"function"==typeof gtag&>ag("event","OpenGame",{context:"CollectionsProviders",gameName:`${r}`})},R=t=>{window.postMessage({type:"OpenCollectionsProvidersCategory",categoryId:t},window.location.href)},M=()=>{var t;t=d,Ke.set(t)};w((()=>{r(6,h=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(H))}));return t.$$set=t=>{"endpoint"in t&&r(12,f=t.endpoint),"datasource"in t&&r(13,p=t.datasource),"lang"in t&&r(14,d=t.lang),"type"in t&&r(0,m=t.type),"titletype"in t&&r(1,y=t.titletype),"clientstyling"in t&&r(15,b=t.clientstyling),"clientstylingurl"in t&&r(16,g=t.clientstylingurl),"translationurl"in t&&r(17,v=t.translationurl)},t.$$.update=()=>{/*endpoint, datasource, lang*/28672&t.$$.dirty[0]&&f&&p&&d&&(()=>{const t=new URL(`${f}/v2/casino/groups/${p}`);t.searchParams.append("language",d),t.searchParams.append("expand","games"),fetch(t.href).then((t=>t.json())).then((t=>{r(5,_=!1);let e=t.items.filter((t=>t.flags==m));r(2,E=e.map((t=>({id:t.id,name:t.name,icon:t.icon,games:t.games.items.slice(0,4).map((t=>t)),background:t.background,flag:t.flags})))),A=E.length}))})(),/*gameCategories, categoriesSlider*/12&t.$$.dirty[0]&&
|
652
652
|
//making sure we have something to position, before trying to
|
653
|
-
E&&s&&P(),/*lang*/16384&t.$$.dirty[0]&&d&&M(),/*clientstyling, customStylingContainer*/32784&t.$$.dirty[0]&&b&&u&&(()=>{let t=document.createElement("style");t.innerHTML=b,u.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/65552&t.$$.dirty[0]&&g&&u&&(()=>{let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{u.appendChild(e)}),1),setTimeout((()=>{}),500)}))})(),/*
|
653
|
+
E&&s&&P(),/*lang*/16384&t.$$.dirty[0]&&d&&M(),/*clientstyling, customStylingContainer*/32784&t.$$.dirty[0]&&b&&u&&(()=>{let t=document.createElement("style");t.innerHTML=b,u.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/65552&t.$$.dirty[0]&&g&&u&&(()=>{let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{u.appendChild(e)}),1),setTimeout((()=>{}),500)}))})(),/*translationurl*/131072&t.$$.dirty[0]&&v&&fetch(v).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{sr(e,t[e])}))})).catch((t=>{console.log(t)}))},[m,y,E,s,u,_,h,n,L,I,N,R,f,p,d,b,g,v,()=>L(),()=>I(),t=>N(t.gameId,t.launchUrl,t.name),t=>R(t.id),function(t){B[t?"unshift":"push"]((()=>{s=t,r(3,s)}))},function(t){B[t?"unshift":"push"]((()=>{u=t,r(4,u)}))}]}class Sn extends x{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CasinoCollectionsProviders{background:var(--emfe-w-color-contrast, #07072A);width:100%;height:330px;margin:0 auto;margin-top:24px}.CategoriesHeader{display:flex;justify-content:space-between;height:70px}.CategoriesHeader .Title{color:var(--emfe-w-color-white, #FFFFFF);font-size:22px;font-weight:500}.CategoriesHeader .ButtonsContainer button{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);height:40px;width:40px;cursor:pointer}.CategoriesHeader .ButtonsContainer button:active{opacity:0.7}.CategoriesSlider{position:relative;height:230px;overflow:hidden}.CategoriesSliderWrapper{position:absolute;top:0;left:0}.CategoriesSlider .Animation{transition:transform 0.8s}.CategoriesSlider .CategorySlide{border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;height:200px;width:400px;margin-right:15px;background-size:cover}.CategoriesSlider .CategorySlide:not(.CategorySlideNoHighlight){background-color:#808080;background-blend-mode:multiply}.CategoriesSlider .CategorySlideTopContainer{height:100px;display:flex;align-items:center}.CategoriesSlider .CategorySlideLogo{max-height:100px}.CategoriesSlider .CategorySlideTitle{color:var(--emfe-w-color-white, #FFFFFF);font-size:18px;letter-spacing:1px}.CategoriesSlider .CategorySlideGameContainer{display:flex;justify-content:center;gap:3%;min-height:70px}.CategoriesSlider .CategorySlideGameImage{border-radius:10px;width:22%;height:55px;object-fit:cover}.Mobile.CasinoCollectionsProviders{padding:25px 10px}.Mobile .CategoriesSlider{overflow:auto;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none}.Mobile .CategoriesSlider::-webkit-scrollbar{display:none}.Mobile .CategorySlide{width:85vw;scroll-snap-align:start}.Mobile .ButtonsContainer{display:none}</style>",G(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},Bn,An,i,{endpoint:12,datasource:13,lang:14,type:0,titletype:1,clientstyling:15,clientstylingurl:16,translationurl:17},null,[-1,-1]),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["endpoint","datasource","lang","type","titletype","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),N()}get datasource(){return this.$$.ctx[13]}set datasource(t){this.$$set({datasource:t}),N()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),N()}get type(){return this.$$.ctx[0]}set type(t){this.$$set({type:t}),N()}get titletype(){return this.$$.ctx[1]}set titletype(t){this.$$set({titletype:t}),N()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}get translationurl(){return this.$$.ctx[17]}set translationurl(t){this.$$set({translationurl:t}),N()}}return!customElements.get("casino-collections-providers")&&customElements.define("casino-collections-providers",Sn),Sn}));
|
654
654
|
//# sourceMappingURL=casino-collections-providers.js.map
|