@everymatrix/casino-page 1.77.5 → 1.77.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/components/{CasinoCalendar-BYV7Jkb3.cjs → CasinoCalendar-BYkYwGtA.cjs} +1 -1
  2. package/components/{CasinoCalendar-Dl5rdRDv.js → CasinoCalendar-DkPXyH3Y.js} +2 -2
  3. package/components/{CasinoCalendar-C87haj_O.js → CasinoCalendar-yAps6jUx.js} +2 -2
  4. package/components/{CasinoCalendarDailyDetails-twhKWee5.cjs → CasinoCalendarDailyDetails-C0Jw95Zm.cjs} +1 -1
  5. package/components/{CasinoCalendarDailyDetails-D3VBYPtA.js → CasinoCalendarDailyDetails-DZq_SRXs.js} +2 -2
  6. package/components/{CasinoCalendarDailyDetails-Cc4iwCGm.js → CasinoCalendarDailyDetails-kQDGv3Rx.js} +2 -2
  7. package/components/{CasinoCalendarDailyItem-CBrK-0Cg.cjs → CasinoCalendarDailyItem-BvMkbJ6w.cjs} +1 -1
  8. package/components/{CasinoCalendarDailyItem-DP7arIWF.js → CasinoCalendarDailyItem-C3oFkAL8.js} +2 -2
  9. package/components/{CasinoCalendarDailyItem-Cf02HaSu.js → CasinoCalendarDailyItem-jpD-4XQd.js} +2 -2
  10. package/components/{CasinoCollectionsProviders-DodWHT-n.js → CasinoCollectionsProviders-DN5KovgD.js} +1 -1
  11. package/components/{CasinoCollectionsProviders-Dy5oZRij.cjs → CasinoCollectionsProviders-DWfSVOKD.cjs} +1 -1
  12. package/components/{CasinoCollectionsProviders-BO_QPAkQ.js → CasinoCollectionsProviders-DYD1fdKZ.js} +1 -1
  13. package/components/{CasinoFavoritesSection-3ztqm6wj.js → CasinoFavoritesSection-10VbfhPs.js} +2 -2
  14. package/components/{CasinoFavoritesSection-DHhGCYbk.js → CasinoFavoritesSection-5KQ4bi0I.js} +2 -2
  15. package/components/{CasinoFavoritesSection-0ld0leDz.cjs → CasinoFavoritesSection-D-SOwUHR.cjs} +1 -1
  16. package/components/{CasinoFilter-Cxp3z_JJ.js → CasinoFilter-CEV_MKVN.js} +1 -1
  17. package/components/{CasinoFilter-BiFRqe6s.js → CasinoFilter-DqKEFicc.js} +1 -1
  18. package/components/{CasinoFilter-DN6wvGFG.cjs → CasinoFilter-cqhH6tJe.cjs} +1 -1
  19. package/components/{CasinoGameThumbnail-Cn50Mnpa.cjs → CasinoGameThumbnail-BLSPK7en.cjs} +1 -1
  20. package/components/{CasinoGameThumbnail-D1NHRqNC.js → CasinoGameThumbnail-CcUnWmuJ.js} +2 -2
  21. package/components/{CasinoGameThumbnail-BGqs-yiN.js → CasinoGameThumbnail-Vym0gSKu.js} +2 -2
  22. package/components/{CasinoGamesCategorySection-CLPYePZG.js → CasinoGamesCategorySection-BQPmPMrn.js} +5 -5
  23. package/components/{CasinoGamesCategorySection-CCD9iKBk.cjs → CasinoGamesCategorySection-C1mS5nnY.cjs} +1 -1
  24. package/components/{CasinoGamesCategorySection-B9MO1cr6.js → CasinoGamesCategorySection-G1GbTZ0K.js} +5 -5
  25. package/components/{CasinoJackpotBanner-3c1xcQqD.cjs → CasinoJackpotBanner-CGZos--t.cjs} +1 -1
  26. package/components/{CasinoJackpotBanner-CzIO2X74.js → CasinoJackpotBanner-CnLQElOT.js} +2 -2
  27. package/components/{CasinoJackpotBanner-Bv5mPRE0.js → CasinoJackpotBanner-CzTAjYac.js} +2 -2
  28. package/components/{CasinoLastPlayedSection-CvZ8t98Q.js → CasinoLastPlayedSection-C2IbLdqJ.js} +2 -2
  29. package/components/{CasinoLastPlayedSection-CZvMrFF0.cjs → CasinoLastPlayedSection-DczPAmUh.cjs} +1 -1
  30. package/components/{CasinoLastPlayedSection-D9_JyaUG.js → CasinoLastPlayedSection-RO7pf7gb.js} +2 -2
  31. package/components/{CasinoMostPlayedSection-8i1-se03.cjs → CasinoMostPlayedSection-CLRw3AH6.cjs} +1 -1
  32. package/components/{CasinoMostPlayedSection-B6UYCrK1.js → CasinoMostPlayedSection-Co_MzDoU.js} +2 -2
  33. package/components/{CasinoMostPlayedSection-BWHSFIl9.js → CasinoMostPlayedSection-F5dXLm5q.js} +2 -2
  34. package/components/{CasinoMyGames-CCybLX9d.cjs → CasinoMyGames-BwRaLMHB.cjs} +1 -1
  35. package/components/{CasinoMyGames-XuUh0Iw1.js → CasinoMyGames-CFYipoZx.js} +4 -4
  36. package/components/{CasinoMyGames-GXbEOUz0.js → CasinoMyGames-Czd0B_-6.js} +4 -4
  37. package/components/{CasinoPage-Tt4Yn1a3.js → CasinoPage-CE7eK5k_.js} +11 -11
  38. package/components/{CasinoPage-AT7RLDJ9.cjs → CasinoPage-CEhT_RdJ.cjs} +1 -1
  39. package/components/{CasinoPage-DxFN_yZb.js → CasinoPage-DgZAtqq_.js} +11 -11
  40. package/components/{CasinoRandomGame-C-olALcp.cjs → CasinoRandomGame-B0U0Xb3g.cjs} +1 -1
  41. package/components/{CasinoRandomGame-Do9Ry6mX.js → CasinoRandomGame-BT7A_jmf.js} +1 -1
  42. package/components/{CasinoRandomGame-Be_OC1nS.js → CasinoRandomGame-COc3hvZw.js} +1 -1
  43. package/components/{CasinoSearch-C1MuxfEt.js → CasinoSearch-CJizsKn-.js} +3 -3
  44. package/components/{CasinoSearch-C6_uloxT.js → CasinoSearch-D7CLrzCY.js} +3 -3
  45. package/components/{CasinoSearch-BxbK1vfB.cjs → CasinoSearch-Rkd5hPZe.cjs} +1 -1
  46. package/components/{CasinoSort-CVx2JF6c.js → CasinoSort-7kj5VsUh.js} +1 -1
  47. package/components/{CasinoSort-CXseP4mp.cjs → CasinoSort-B6auynbf.cjs} +1 -1
  48. package/components/{CasinoSort-CFXBcyqN.js → CasinoSort-BLU1kZyO.js} +1 -1
  49. package/components/{CasinoWinners-PplSTWYp.js → CasinoWinners-C9LN8ru_.js} +2 -2
  50. package/components/{CasinoWinners-D_veH7OJ.cjs → CasinoWinners-DZmCwkX7.cjs} +1 -1
  51. package/components/{CasinoWinners-Se8Tt2Fa.js → CasinoWinners-eQy-10xv.js} +2 -2
  52. package/components/{GeneralAnimationLoading-BG-JznT6.js → GeneralAnimationLoading-ClbCR9B0.js} +1 -1
  53. package/components/{GeneralAnimationLoading-BySVl_wz.cjs → GeneralAnimationLoading-DAkF3N6C.cjs} +1 -1
  54. package/components/{GeneralAnimationLoading-Begig657.js → GeneralAnimationLoading-Db3SrIWQ.js} +1 -1
  55. package/es2015/casino-page.cjs +1 -1
  56. package/es2015/casino-page.js +1 -1
  57. package/esnext/casino-page.js +1 -1
  58. package/package.json +1 -1
  59. package/stencil/{casino-play-random-game-3OLT0AIG.js → casino-play-random-game-BJFjsA5t.js} +1 -1
  60. package/stencil/{casino-play-random-game-DTTdIJJ3.cjs → casino-play-random-game-BfIGTp5-.cjs} +1 -1
  61. package/stencil/{casino-play-random-game-BnjMAnCB.js → casino-play-random-game-IBntzp9u.js} +1 -1
  62. package/stencil/{casino-play-random-game_3-BPrURzZF.cjs → casino-play-random-game_3-CWb_GLFH.cjs} +2 -2
  63. package/stencil/{casino-play-random-game_3-DbmTGjC1.js → casino-play-random-game_3-NoHe4Dqj.js} +31 -46
  64. package/stencil/{casino-play-random-game_3-5Bmo5OfX.js → casino-play-random-game_3-Rwyc5VQ-.js} +31 -46
  65. package/stencil/index-256b7d4e-7jcaQ7rC.js +543 -0
  66. package/stencil/index-256b7d4e-BnoVkrXr.cjs +1 -0
  67. package/stencil/index-256b7d4e-CSg5Fmgt.js +559 -0
  68. package/stencil/{index-27b314b8-DWbdQG1d.js → index-27b314b8-5_ilcOjJ.js} +1 -1
  69. package/stencil/{index-27b314b8-B6-HIs2Q.cjs → index-27b314b8-BgJpabNL.cjs} +1 -1
  70. package/stencil/{index-27b314b8-rkjLfQe1.js → index-27b314b8-DSDDLaZx.js} +1 -1
  71. package/stencil/ui-image-8975d115-BIwRmPA-.cjs +1 -0
  72. package/stencil/ui-image-8975d115-C8pJTCfZ.js +71 -0
  73. package/stencil/ui-image-8975d115-DxO6YS6C.js +71 -0
  74. package/stencil/{ui-image-CVrTqLhl.js → ui-image-B3uO8jRI.js} +1 -1
  75. package/stencil/{ui-image-adPxpjgH.js → ui-image-D3NyvObj.js} +1 -1
  76. package/stencil/{ui-image-Cd2KxMB7.cjs → ui-image-DxINavDC.cjs} +1 -1
  77. package/stencil/{ui-image_2-CLk629jW.cjs → ui-image_2-CXGY1IY3.cjs} +1 -1
  78. package/stencil/{ui-image_2-B21W_djK.js → ui-image_2-DwuycSdC.js} +2 -2
  79. package/stencil/{ui-image_2-VgK3B8gQ.js → ui-image_2-rhY_9uoo.js} +2 -2
  80. package/stencil/index-242ac81a-BqeIndhr.js +0 -554
  81. package/stencil/index-242ac81a-CI4JxPRf.js +0 -538
  82. package/stencil/index-242ac81a-CjjM4VND.cjs +0 -1
  83. package/stencil/ui-image-2ff23cd5-BHGIWJop.cjs +0 -1
  84. package/stencil/ui-image-2ff23cd5-D0rXudCW.js +0 -86
  85. package/stencil/ui-image-2ff23cd5-DCLQ0SIO.js +0 -86
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-27b314b8-B6-HIs2Q.cjs"),f=()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},w="en",s={en:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},ro:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},fr:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},hr:{error:"Greška",randomGameLoading:"Učitavanje ...",playRandomGame:"Igraj nasumičnu igru",playNowRandomGame:"Igraj sada",spinRandomGame:"Zavrti"},hu:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},tr:{error:"Hata",randomGameLoading:"Yükleniyor...",playRandomGame:"Rastgele Bir Oyun Oyna",playNowRandomGame:"Şimdi Oyna",spinRandomGame:"DEĞİŞTİR"}},l=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(a=>{s[a]||(s[a]={});for(let r in i[a])s[a][r]=i[a][r]}),t(!0)})}),o=(e,t)=>{const i=t;return s[i!==void 0&&i in s?i:w][e]};function d(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function h(e,t){const i=new URL(t);fetch(i.href).then(a=>a.text()).then(a=>{const r=document.createElement("style");r.innerHTML=a,e&&e.appendChild(r)}).catch(a=>{console.error("There was an error while trying to load client styling from URL",a)})}function y(e,t,i){if(window.emMessageBus){const a=document.createElement("style");window.emMessageBus.subscribe(t,r=>{a.innerHTML=r,e&&e.appendChild(a)})}}const b=`:host {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-27b314b8-BgJpabNL.cjs"),w=()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},f="en",r={en:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},ro:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},fr:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},hr:{error:"Greška",randomGameLoading:"Učitavanje ...",playRandomGame:"Igraj nasumičnu igru",playNowRandomGame:"Igraj sada",spinRandomGame:"Zavrti"},hu:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},tr:{error:"Hata",randomGameLoading:"Yükleniyor...",playRandomGame:"Rastgele Bir Oyun Oyna",playNowRandomGame:"Şimdi Oyna",spinRandomGame:"DEĞİŞTİR"}},l=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(a=>{r[a]||(r[a]={});for(let s in i[a])r[a][s]=i[a][s]}),t(!0)})}),o=(e,t)=>{const i=t;return r[i!==void 0&&i in r?i:f][e]};function d(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function h(e,t){const i=new URL(t);fetch(i.href).then(a=>a.text()).then(a=>{const s=document.createElement("style");s.innerHTML=a,e&&e.appendChild(s)}).catch(a=>{console.error("There was an error while trying to load client styling from URL",a)})}function y(e,t,i){if(window.emMessageBus){const a=document.createElement("style");window.emMessageBus.subscribe(t,s=>{a.innerHTML=s,e&&e.appendChild(a)})}}const b=`:host {
2
2
  display: block;
3
3
  font-family: inherit;
4
4
  -webkit-transform: translate3d(0, 0, 0);
@@ -375,7 +375,7 @@
375
375
  width: 70px;
376
376
  height: 85px;
377
377
  }
378
- }`,x=b,m=class{constructor(e){n.registerInstance(this,e),this.dataLoaded=n.createEvent(this,"data-loaded"),this.animation=null,this.selectedGameIndex=null,this.selectedGameEl=null,this.iconVisibility=null,this.shuffle=t=>{let i=t.length,a;for(;i!==0;)a=Math.floor(Math.random()*i),i--,[t[i],t[a]]=[t[a],t[i]];return t},this.endpoint=void 0,this.datasource=void 0,this.language="en",this.specificCategory="",this.iconVisible="",this.iconVisibleOnAnim="",this.launchByGameCard="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.hasErrors=!1,this.isLoading=!0,this.gamesToShow=void 0,this.selectedGame=null,this.animationDone=!1,this.animationStarted=!1,this.imageLoadingType="lazy",this.detectDistance="200px"}watchEndpoint(e,t){e&&e!=t&&this.endpoint&&this.fetchGameList()}handleNewTranslations(){this.isLoading=!0,l(this.translationUrl).then(()=>{this.isLoading=!1})}handleIsIconVisible(){this.iconVisibility=this.iconVisible==="true"}handleClientStylingChange(e,t){e!=t&&d(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.handleIsIconVisible()}componentWillLoad(){if(this.translationUrl.length>2&&l(this.translationUrl),this.endpoint&&this.language&&this.datasource)return this.fetchGameList()}componentDidLoad(){"IntersectionObserver"in window&&(this.io=new IntersectionObserver(e=>{e.forEach(t=>{var i;t.isIntersecting&&(this.imageLoadingType="eager",(i=this.io)===null||i===void 0||i.unobserve(t.target))})},{root:null,rootMargin:this.detectDistance}),this.io.observe(this.host)),window.emMessageBus!=null?y(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchGameList(){let e=new URL(`${this.endpoint}/v1/casino/games`);return e.searchParams.append("platform",f()),e.searchParams.append("datasource",this.datasource),e.searchParams.append("fields","gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"),e.searchParams.append("expand","vendor"),e.searchParams.append("pagination","offset=0,limit=423"),e.searchParams.append("language",this.language),this.specificCategory&&e.searchParams.append("filter",`categories(id=${this.specificCategory})`),new Promise((t,i)=>{this.isLoading=!0,fetch(e.href).then(a=>a.json()).then(a=>{this.gamesToShow=this.setUpGames(a==null?void 0:a.items),t(!0)}).catch(a=>{console.error(a),this.hasErrors=!0,i(a)}).finally(()=>{this.isLoading=!1,this.dataLoaded.emit({target:this.host})})})}setUpGames(e){const t=this.shuffle(e).slice(0,40);return t.concat(t)}selectRandomGame(){const e=this.gamesToShow.length/2;this.selectedGameIndex=Math.floor(Math.random()*(e-3)),this.selectedGameIndex+=e,this.selectedGameEl=this.gameContainer.children[this.selectedGameIndex]}playRandomGame(){this.animateGames(),typeof gtag=="function"&&gtag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),typeof gtag=="function"&&gtag("event","RespinRandomGame",{context:"CasinoPlayRandomGame"})}animateGames(){this.iconVisibility=this.iconVisibleOnAnim==="true",this.animationStarted=!0,this.animationDone=!1,this.animation&&this.animation.cancel(),this.selectedGameEl&&(this.selectedGameEl.classList.remove("TheRandomGame"),this.selectedGame=null,this.selectedGameIndex=null),this.selectRandomGame();const e=window.getComputedStyle(this.gameContainer).getPropertyValue("gap"),t=parseInt(e,10),i=this.selectedGameEl.offsetWidth,a=this.gameContainer.offsetWidth,r=(i+t)*this.selectedGameIndex+i/2-a/2,u=[{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${r}px)`,scale:1}],p={duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"};this.animation=this.gameContainer.animate(u,p),this.animation.onfinish=()=>{this.animationDone=!0,this.selectedGameEl.classList.add("TheRandomGame"),this.selectedGame=this.gamesToShow[this.selectedGameIndex]}}playGame(){this.selectedGame&&(window.postMessage({type:"PlayRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGame",{context:"CasinoPlayRandomGame"}))}showGameInfo(){window.postMessage({type:"InfoRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGameInfo",{context:"CasinoPlayRandomGame"})}renderGameDetails(){return n.h("div",{class:"RandomButtonsWrapper"},n.h("div",{class:"RandomGameDetails"},n.h("span",{class:"RandomGameTitle"},this.selectedGame.name),n.h("span",{class:"RandomGameInfo",onClick:()=>this.showGameInfo()},"i")),n.h("div",{class:"RandomButtons"},n.h("button",{class:"RandomButton On",onClick:()=>this.respin()},o("spinRandomGame",this.language)),!this.launchByGameCard&&n.h("button",{class:"RandomButton On",onClick:()=>this.playGame()},o("playNowRandomGame",this.language))))}renderSkeleton(){const e=Array.from({length:5},(t,i)=>n.h("div",{class:"RandomGameCard",key:i},n.h("ui-skeleton",{structure:"rectangle",width:"300px",height:"420px",borderRadius:"10px",animation:!0})));return n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer"},e))}render(){return n.h("div",{key:"29fe3535d63177e6d1f30a757bf17b70d89ce386",ref:e=>this.stylingContainer=e},this.hasErrors?n.h("div",{class:"RandomGameError"},n.h("div",{class:"Title"},o("error",this.language))):this.isLoading?this.renderSkeleton():n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer",ref:e=>this.gameContainer=e},this.gamesToShow&&this.gamesToShow.map((e,t)=>n.h("div",{class:"RandomGameCard",key:t,onClick:this.launchByGameCard==="true"?()=>this.playGame():void 0},n.h("div",{class:"RandomGameVendor"},e.vendor.name),n.h("ui-image",{class:"RandomGameImage",src:e.thumbnail,alt:e.name,title:e.name,loading:this.imageLoadingType}),this.selectedGame&&this.selectedGameIndex===t&&this.renderGameDetails()))),n.h("div",{class:`ButtonWrapper ${this.animationDone?"HideAnimation":""}`},n.h("div",{class:"ButtonContainer"},this.iconVisibility&&n.h("div",{class:`ButtonIcon ${this.animationStarted?"Flip":""}`},n.h("div",{class:"QustionMark"},"?"),n.h("div",{class:"HexagonMarkShadow"}),n.h("div",{class:"HexagonMark"})),!this.animationStarted&&n.h("div",{class:`RandomButton ${this.animationStarted?"HideAnimation":""}`,onClick:()=>this.playRandomGame()},o("playRandomGame",this.language))))))}get host(){return n.getElement(this)}static get watchers(){return{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};m.style=x;const v=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",k=v,c=class{constructor(e){n.registerInstance(this,e),this.hasStarted=!1,this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,this.hasStarted=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),this.detachImgHandlers(),e==="eager"?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.detachImgHandlers()}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(e=>{var t;for(const i of e)if(i.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(i.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.io=void 0}wireOnceHandlers(){this.imgEl&&(this.detachImgHandlers(),this._onLoad=()=>{var e;this.currentSrc&&(!((e=this.imgEl)===null||e===void 0)&&e.currentSrc)&&!this.imgEl.currentSrc.includes(this.currentSrc)||(this.imgLoaded=!0)},this._onError=()=>{console.error("Load image failed:",this.src)},this.imgEl.addEventListener("load",this._onLoad,{once:!0}),this.imgEl.addEventListener("error",this._onError,{once:!0}))}detachImgHandlers(){this.imgEl&&(this._onLoad&&this.imgEl.removeEventListener("load",this._onLoad),this._onError&&this.imgEl.removeEventListener("error",this._onError),this._onLoad=void 0,this._onError=void 0)}beginLoad(){if(!this.hasStarted&&this.imgEl&&this.src){if(this.hasStarted=!0,this.wireOnceHandlers(),this.imgEl.complete&&this.imgEl.naturalWidth>0){this.imgLoaded=!0;return}this.currentSrc=this.src,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0)}}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return n.h(n.Host,{class:"HostContainer"},n.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return n.h(n.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&n.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),n.h("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return n.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};c.style=k;const G=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",R=G,g=class{constructor(e){n.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return n.h("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return n.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,t)=>n.h("div",{key:t,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
378
+ }`,x=b,m=class{constructor(e){n.registerInstance(this,e),this.dataLoaded=n.createEvent(this,"data-loaded"),this.animation=null,this.selectedGameIndex=null,this.selectedGameEl=null,this.iconVisibility=null,this.shuffle=t=>{let i=t.length,a;for(;i!==0;)a=Math.floor(Math.random()*i),i--,[t[i],t[a]]=[t[a],t[i]];return t},this.endpoint=void 0,this.datasource=void 0,this.language="en",this.specificCategory="",this.iconVisible="",this.iconVisibleOnAnim="",this.launchByGameCard="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.hasErrors=!1,this.isLoading=!0,this.gamesToShow=void 0,this.selectedGame=null,this.animationDone=!1,this.animationStarted=!1,this.imageLoadingType="lazy",this.detectDistance="200px"}watchEndpoint(e,t){e&&e!=t&&this.endpoint&&this.fetchGameList()}handleNewTranslations(){this.isLoading=!0,l(this.translationUrl).then(()=>{this.isLoading=!1})}handleIsIconVisible(){this.iconVisibility=this.iconVisible==="true"}handleClientStylingChange(e,t){e!=t&&d(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){this.handleIsIconVisible()}componentWillLoad(){if(this.translationUrl.length>2&&l(this.translationUrl),this.endpoint&&this.language&&this.datasource)return this.fetchGameList()}componentDidLoad(){"IntersectionObserver"in window&&(this.io=new IntersectionObserver(e=>{e.forEach(t=>{var i;t.isIntersecting&&(this.imageLoadingType="eager",(i=this.io)===null||i===void 0||i.unobserve(t.target))})},{root:null,rootMargin:this.detectDistance}),this.io.observe(this.host)),window.emMessageBus!=null?y(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&d(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchGameList(){let e=new URL(`${this.endpoint}/v1/casino/games`);return e.searchParams.append("platform",w()),e.searchParams.append("datasource",this.datasource),e.searchParams.append("fields","gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"),e.searchParams.append("expand","vendor"),e.searchParams.append("pagination","offset=0,limit=423"),e.searchParams.append("language",this.language),this.specificCategory&&e.searchParams.append("filter",`categories(id=${this.specificCategory})`),new Promise((t,i)=>{this.isLoading=!0,fetch(e.href).then(a=>a.json()).then(a=>{this.gamesToShow=this.setUpGames(a==null?void 0:a.items),t(!0)}).catch(a=>{console.error(a),this.hasErrors=!0,i(a)}).finally(()=>{this.isLoading=!1,this.dataLoaded.emit({target:this.host})})})}setUpGames(e){const t=this.shuffle(e).slice(0,40);return t.concat(t)}selectRandomGame(){const e=this.gamesToShow.length/2;this.selectedGameIndex=Math.floor(Math.random()*(e-3)),this.selectedGameIndex+=e,this.selectedGameEl=this.gameContainer.children[this.selectedGameIndex]}playRandomGame(){this.animateGames(),typeof gtag=="function"&&gtag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),typeof gtag=="function"&&gtag("event","RespinRandomGame",{context:"CasinoPlayRandomGame"})}animateGames(){this.iconVisibility=this.iconVisibleOnAnim==="true",this.animationStarted=!0,this.animationDone=!1,this.animation&&this.animation.cancel(),this.selectedGameEl&&(this.selectedGameEl.classList.remove("TheRandomGame"),this.selectedGame=null,this.selectedGameIndex=null),this.selectRandomGame();const e=window.getComputedStyle(this.gameContainer).getPropertyValue("gap"),t=parseInt(e,10),i=this.selectedGameEl.offsetWidth,a=this.gameContainer.offsetWidth,s=(i+t)*this.selectedGameIndex+i/2-a/2,u=[{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${s}px)`,scale:1}],p={duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"};this.animation=this.gameContainer.animate(u,p),this.animation.onfinish=()=>{this.animationDone=!0,this.selectedGameEl.classList.add("TheRandomGame"),this.selectedGame=this.gamesToShow[this.selectedGameIndex]}}playGame(){this.selectedGame&&(window.postMessage({type:"PlayRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGame",{context:"CasinoPlayRandomGame"}))}showGameInfo(){window.postMessage({type:"InfoRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),typeof gtag=="function"&&gtag("event","OpenRandomGameInfo",{context:"CasinoPlayRandomGame"})}renderGameDetails(){return n.h("div",{class:"RandomButtonsWrapper"},n.h("div",{class:"RandomGameDetails"},n.h("span",{class:"RandomGameTitle"},this.selectedGame.name),n.h("span",{class:"RandomGameInfo",onClick:()=>this.showGameInfo()},"i")),n.h("div",{class:"RandomButtons"},n.h("button",{class:"RandomButton On",onClick:()=>this.respin()},o("spinRandomGame",this.language)),!this.launchByGameCard&&n.h("button",{class:"RandomButton On",onClick:()=>this.playGame()},o("playNowRandomGame",this.language))))}renderSkeleton(){const e=Array.from({length:5},(t,i)=>n.h("div",{class:"RandomGameCard",key:i},n.h("ui-skeleton",{structure:"rectangle",width:"300px",height:"420px",borderRadius:"10px",animation:!0})));return n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer"},e))}render(){return n.h("div",{key:"29fe3535d63177e6d1f30a757bf17b70d89ce386",ref:e=>this.stylingContainer=e},this.hasErrors?n.h("div",{class:"RandomGameError"},n.h("div",{class:"Title"},o("error",this.language))):this.isLoading?this.renderSkeleton():n.h("div",{class:"RandomGameWrapper"},n.h("div",{class:"GameContainerGradient"}),n.h("div",{class:"GamesContainer",ref:e=>this.gameContainer=e},this.gamesToShow&&this.gamesToShow.map((e,t)=>n.h("div",{class:"RandomGameCard",key:t,onClick:this.launchByGameCard==="true"?()=>this.playGame():void 0},n.h("div",{class:"RandomGameVendor"},e.vendor.name),n.h("ui-image",{class:"RandomGameImage",src:e.thumbnail,alt:e.name,title:e.name,loading:this.imageLoadingType}),this.selectedGame&&this.selectedGameIndex===t&&this.renderGameDetails()))),n.h("div",{class:`ButtonWrapper ${this.animationDone?"HideAnimation":""}`},n.h("div",{class:"ButtonContainer"},this.iconVisibility&&n.h("div",{class:`ButtonIcon ${this.animationStarted?"Flip":""}`},n.h("div",{class:"QustionMark"},"?"),n.h("div",{class:"HexagonMarkShadow"}),n.h("div",{class:"HexagonMark"})),!this.animationStarted&&n.h("div",{class:`RandomButton ${this.animationStarted?"HideAnimation":""}`,onClick:()=>this.playRandomGame()},o("playRandomGame",this.language))))))}get host(){return n.getElement(this)}static get watchers(){return{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};m.style=x;const k=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",v=k,c=class{constructor(e){n.registerInstance(this,e),this.hasStarted=!1,this._onLoad=()=>{this.imgLoaded=!0},this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){this.loading!=="eager"&&(this.imgLoaded=!1,this.hasStarted=!1,(typeof window=="undefined"||!("IntersectionObserver"in window))&&this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),e==="eager"?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){this.loading!=="eager"&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.imgEl&&(this.imgEl.src="")}canUseIO(){return typeof window!="undefined"&&"IntersectionObserver"in window}setupObserver(){if(this.loading!=="eager"){if(!this.canUseIO()){this.beginLoad();return}this.io=new IntersectionObserver(e=>{var t;for(const i of e)if(i.isIntersecting){this.beginLoad(),(t=this.io)===null||t===void 0||t.unobserve(i.target),this.cleanupObserver();break}},{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)}}cleanupObserver(){var e;(e=this.io)===null||e===void 0||e.disconnect(),this.io=void 0}beginLoad(){this.hasStarted||this.imgEl&&this.src&&(this.hasStarted=!0,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0))}get showSkeleton(){return this.loading!=="eager"&&!this.imgLoaded}renderEager(){return n.h(n.Host,{class:"HostContainer"},n.h("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return n.h(n.Host,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&n.h("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),n.h("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,onLoad:this._onLoad,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return this.loading==="eager"?this.renderEager():this.renderLazy()}get el(){return n.getElement(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};c.style=v;const G=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",R=G,g=class{constructor(e){n.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return n.h("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return n.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,t)=>n.h("div",{key:t,class:"Text "+(this.animation?"Skeleton":"")})))}renderRectangle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return n.h("div",{class:"SkeletonContainer"},n.h("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
379
379
  :host {
380
380
  --emw-skeleton-logo-width: ${this.stylingValue.width};
381
381
  --emw-skeleton-logo-height: ${this.stylingValue.height};
@@ -1,8 +1,8 @@
1
- import { r as d, c as f, h as t, g, H as l } from "./index-27b314b8-DWbdQG1d.js";
2
- const w = () => {
1
+ import { r as d, c as w, h as t, g, H as l } from "./index-27b314b8-5_ilcOjJ.js";
2
+ const f = () => {
3
3
  let e = window.navigator.userAgent;
4
4
  return e.toLowerCase().match(/android/i) ? "Android" : e.toLowerCase().match(/iphone/i) ? "iPhone" : e.toLowerCase().match(/ipad|ipod/i) ? "iPad" : "PC";
5
- }, y = "en", s = {
5
+ }, y = "en", r = {
6
6
  en: {
7
7
  error: "Error",
8
8
  randomGameLoading: "Loading ...",
@@ -48,14 +48,14 @@ const w = () => {
48
48
  }, m = (e) => new Promise((n) => {
49
49
  fetch(e).then((i) => i.json()).then((i) => {
50
50
  Object.keys(i).forEach((a) => {
51
- s[a] || (s[a] = {});
52
- for (let r in i[a])
53
- s[a][r] = i[a][r];
51
+ r[a] || (r[a] = {});
52
+ for (let s in i[a])
53
+ r[a][s] = i[a][s];
54
54
  }), n(!0);
55
55
  });
56
56
  }), o = (e, n) => {
57
57
  const i = n;
58
- return s[i !== void 0 && i in s ? i : y][e];
58
+ return r[i !== void 0 && i in r ? i : y][e];
59
59
  };
60
60
  function h(e, n) {
61
61
  if (e) {
@@ -66,8 +66,8 @@ function h(e, n) {
66
66
  function c(e, n) {
67
67
  const i = new URL(n);
68
68
  fetch(i.href).then((a) => a.text()).then((a) => {
69
- const r = document.createElement("style");
70
- r.innerHTML = a, e && e.appendChild(r);
69
+ const s = document.createElement("style");
70
+ s.innerHTML = a, e && e.appendChild(s);
71
71
  }).catch((a) => {
72
72
  console.error("There was an error while trying to load client styling from URL", a);
73
73
  });
@@ -75,8 +75,8 @@ function c(e, n) {
75
75
  function b(e, n, i) {
76
76
  if (window.emMessageBus) {
77
77
  const a = document.createElement("style");
78
- window.emMessageBus.subscribe(n, (r) => {
79
- a.innerHTML = r, e && e.appendChild(a);
78
+ window.emMessageBus.subscribe(n, (s) => {
79
+ a.innerHTML = s, e && e.appendChild(a);
80
80
  });
81
81
  }
82
82
  }
@@ -457,9 +457,9 @@ const x = `:host {
457
457
  width: 70px;
458
458
  height: 85px;
459
459
  }
460
- }`, v = x, k = class {
460
+ }`, k = x, v = class {
461
461
  constructor(e) {
462
- d(this, e), this.dataLoaded = f(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
462
+ d(this, e), this.dataLoaded = w(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
463
463
  let i = n.length, a;
464
464
  for (; i !== 0; )
465
465
  a = Math.floor(Math.random() * i), i--, [n[i], n[a]] = [n[a], n[i]];
@@ -504,7 +504,7 @@ const x = `:host {
504
504
  }
505
505
  fetchGameList() {
506
506
  let e = new URL(`${this.endpoint}/v1/casino/games`);
507
- return e.searchParams.append("platform", w()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
507
+ return e.searchParams.append("platform", f()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
508
508
  this.isLoading = !0, fetch(e.href).then((a) => a.json()).then((a) => {
509
509
  this.gamesToShow = this.setUpGames(a?.items), n(!0);
510
510
  }).catch((a) => {
@@ -536,12 +536,12 @@ const x = `:host {
536
536
  }
537
537
  animateGames() {
538
538
  this.iconVisibility = this.iconVisibleOnAnim === "true", this.animationStarted = !0, this.animationDone = !1, this.animation && this.animation.cancel(), this.selectedGameEl && (this.selectedGameEl.classList.remove("TheRandomGame"), this.selectedGame = null, this.selectedGameIndex = null), this.selectRandomGame();
539
- const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, r = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
539
+ const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, s = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
540
540
  i / 2 - // Additional half card width to center to the selected game
541
541
  a / 2, u = [
542
542
  { transform: "translateX(0px)", scale: 1 },
543
543
  { scale: 0.75 },
544
- { transform: `translateX(-${r}px)`, scale: 1 }
544
+ { transform: `translateX(-${s}px)`, scale: 1 }
545
545
  ], p = {
546
546
  duration: 3e3,
547
547
  easing: "cubic-bezier(0.5, 0, 0.5, 1.2)",
@@ -586,22 +586,24 @@ const x = `:host {
586
586
  };
587
587
  }
588
588
  };
589
- k.style = v;
590
- const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, S = class {
589
+ v.style = k;
590
+ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, C = class {
591
591
  constructor(e) {
592
- d(this, e), this.hasStarted = !1, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
592
+ d(this, e), this.hasStarted = !1, this._onLoad = () => {
593
+ this.imgLoaded = !0;
594
+ }, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
593
595
  }
594
596
  onSrcChange() {
595
597
  this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window > "u" || !("IntersectionObserver" in window)) && this.beginLoad());
596
598
  }
597
599
  onLoadingChange(e, n) {
598
- e !== n && (this.cleanupObserver(), this.detachImgHandlers(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
600
+ e !== n && (this.cleanupObserver(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
599
601
  }
600
602
  componentDidLoad() {
601
603
  this.loading !== "eager" && this.setupObserver();
602
604
  }
603
605
  disconnectedCallback() {
604
- this.cleanupObserver(), this.detachImgHandlers();
606
+ this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
605
607
  }
606
608
  canUseIO() {
607
609
  return typeof window < "u" && "IntersectionObserver" in window;
@@ -626,25 +628,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
626
628
  var e;
627
629
  (e = this.io) === null || e === void 0 || e.disconnect(), this.io = void 0;
628
630
  }
629
- wireOnceHandlers() {
630
- this.imgEl && (this.detachImgHandlers(), this._onLoad = () => {
631
- var e;
632
- this.currentSrc && (!((e = this.imgEl) === null || e === void 0) && e.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc) || (this.imgLoaded = !0);
633
- }, this._onError = () => {
634
- console.error("Load image failed:", this.src);
635
- }, this.imgEl.addEventListener("load", this._onLoad, { once: !0 }), this.imgEl.addEventListener("error", this._onError, { once: !0 }));
636
- }
637
- detachImgHandlers() {
638
- this.imgEl && (this._onLoad && this.imgEl.removeEventListener("load", this._onLoad), this._onError && this.imgEl.removeEventListener("error", this._onError), this._onLoad = void 0, this._onError = void 0);
639
- }
640
631
  beginLoad() {
641
- if (!this.hasStarted && this.imgEl && this.src) {
642
- if (this.hasStarted = !0, this.wireOnceHandlers(), this.imgEl.complete && this.imgEl.naturalWidth > 0) {
643
- this.imgLoaded = !0;
644
- return;
645
- }
646
- this.currentSrc = this.src, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
647
- }
632
+ this.hasStarted || this.imgEl && this.src && (this.hasStarted = !0, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0));
648
633
  }
649
634
  get showSkeleton() {
650
635
  return this.loading !== "eager" && !this.imgLoaded;
@@ -653,7 +638,7 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
653
638
  return t(l, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
654
639
  }
655
640
  renderLazy() {
656
- return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
641
+ return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, onLoad: this._onLoad, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
657
642
  }
658
643
  render() {
659
644
  return this.loading === "eager" ? this.renderEager() : this.renderLazy();
@@ -668,8 +653,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
668
653
  };
669
654
  }
670
655
  };
671
- S.style = R;
672
- const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = C, E = class {
656
+ C.style = R;
657
+ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = S, V = class {
673
658
  constructor(e) {
674
659
  d(this, e), this.stylingValue = {
675
660
  width: this.handleStylingProps(this.width),
@@ -819,9 +804,9 @@ const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
819
804
  };
820
805
  }
821
806
  };
822
- E.style = L;
807
+ V.style = L;
823
808
  export {
824
- k as casino_play_random_game,
825
- S as ui_image,
826
- E as ui_skeleton
809
+ v as casino_play_random_game,
810
+ C as ui_image,
811
+ V as ui_skeleton
827
812
  };
@@ -1,8 +1,8 @@
1
- import { r as d, c as f, h as t, g, H as l } from "./index-27b314b8-rkjLfQe1.js";
2
- const w = () => {
1
+ import { r as d, c as w, h as t, g, H as l } from "./index-27b314b8-DSDDLaZx.js";
2
+ const f = () => {
3
3
  let e = window.navigator.userAgent;
4
4
  return e.toLowerCase().match(/android/i) ? "Android" : e.toLowerCase().match(/iphone/i) ? "iPhone" : e.toLowerCase().match(/ipad|ipod/i) ? "iPad" : "PC";
5
- }, y = "en", s = {
5
+ }, y = "en", r = {
6
6
  en: {
7
7
  error: "Error",
8
8
  randomGameLoading: "Loading ...",
@@ -48,14 +48,14 @@ const w = () => {
48
48
  }, m = (e) => new Promise((n) => {
49
49
  fetch(e).then((i) => i.json()).then((i) => {
50
50
  Object.keys(i).forEach((a) => {
51
- s[a] || (s[a] = {});
52
- for (let r in i[a])
53
- s[a][r] = i[a][r];
51
+ r[a] || (r[a] = {});
52
+ for (let s in i[a])
53
+ r[a][s] = i[a][s];
54
54
  }), n(!0);
55
55
  });
56
56
  }), o = (e, n) => {
57
57
  const i = n;
58
- return s[i !== void 0 && i in s ? i : y][e];
58
+ return r[i !== void 0 && i in r ? i : y][e];
59
59
  };
60
60
  function h(e, n) {
61
61
  if (e) {
@@ -66,8 +66,8 @@ function h(e, n) {
66
66
  function c(e, n) {
67
67
  const i = new URL(n);
68
68
  fetch(i.href).then((a) => a.text()).then((a) => {
69
- const r = document.createElement("style");
70
- r.innerHTML = a, e && e.appendChild(r);
69
+ const s = document.createElement("style");
70
+ s.innerHTML = a, e && e.appendChild(s);
71
71
  }).catch((a) => {
72
72
  console.error("There was an error while trying to load client styling from URL", a);
73
73
  });
@@ -75,8 +75,8 @@ function c(e, n) {
75
75
  function b(e, n, i) {
76
76
  if (window.emMessageBus) {
77
77
  const a = document.createElement("style");
78
- window.emMessageBus.subscribe(n, (r) => {
79
- a.innerHTML = r, e && e.appendChild(a);
78
+ window.emMessageBus.subscribe(n, (s) => {
79
+ a.innerHTML = s, e && e.appendChild(a);
80
80
  });
81
81
  }
82
82
  }
@@ -457,9 +457,9 @@ const x = `:host {
457
457
  width: 70px;
458
458
  height: 85px;
459
459
  }
460
- }`, v = x, k = class {
460
+ }`, k = x, v = class {
461
461
  constructor(e) {
462
- d(this, e), this.dataLoaded = f(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
462
+ d(this, e), this.dataLoaded = w(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (n) => {
463
463
  let i = n.length, a;
464
464
  for (; i !== 0; )
465
465
  a = Math.floor(Math.random() * i), i--, [n[i], n[a]] = [n[a], n[i]];
@@ -504,7 +504,7 @@ const x = `:host {
504
504
  }
505
505
  fetchGameList() {
506
506
  let e = new URL(`${this.endpoint}/v1/casino/games`);
507
- return e.searchParams.append("platform", w()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
507
+ return e.searchParams.append("platform", f()), e.searchParams.append("datasource", this.datasource), e.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), e.searchParams.append("expand", "vendor"), e.searchParams.append("pagination", "offset=0,limit=423"), e.searchParams.append("language", this.language), this.specificCategory && e.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((n, i) => {
508
508
  this.isLoading = !0, fetch(e.href).then((a) => a.json()).then((a) => {
509
509
  this.gamesToShow = this.setUpGames(a == null ? void 0 : a.items), n(!0);
510
510
  }).catch((a) => {
@@ -536,12 +536,12 @@ const x = `:host {
536
536
  }
537
537
  animateGames() {
538
538
  this.iconVisibility = this.iconVisibleOnAnim === "true", this.animationStarted = !0, this.animationDone = !1, this.animation && this.animation.cancel(), this.selectedGameEl && (this.selectedGameEl.classList.remove("TheRandomGame"), this.selectedGame = null, this.selectedGameIndex = null), this.selectRandomGame();
539
- const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, r = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
539
+ const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), n = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, s = (i + n) * this.selectedGameIndex + // Width of game cards up to the selected
540
540
  i / 2 - // Additional half card width to center to the selected game
541
541
  a / 2, u = [
542
542
  { transform: "translateX(0px)", scale: 1 },
543
543
  { scale: 0.75 },
544
- { transform: `translateX(-${r}px)`, scale: 1 }
544
+ { transform: `translateX(-${s}px)`, scale: 1 }
545
545
  ], p = {
546
546
  duration: 3e3,
547
547
  easing: "cubic-bezier(0.5, 0, 0.5, 1.2)",
@@ -586,22 +586,24 @@ const x = `:host {
586
586
  };
587
587
  }
588
588
  };
589
- k.style = v;
590
- const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, S = class {
589
+ v.style = k;
590
+ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", R = G, C = class {
591
591
  constructor(e) {
592
- d(this, e), this.hasStarted = !1, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
592
+ d(this, e), this.hasStarted = !1, this._onLoad = () => {
593
+ this.imgLoaded = !0;
594
+ }, this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.loading = "lazy", this.imgLoaded = !1;
593
595
  }
594
596
  onSrcChange() {
595
597
  this.loading !== "eager" && (this.imgLoaded = !1, this.hasStarted = !1, (typeof window == "undefined" || !("IntersectionObserver" in window)) && this.beginLoad());
596
598
  }
597
599
  onLoadingChange(e, n) {
598
- e !== n && (this.cleanupObserver(), this.detachImgHandlers(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
600
+ e !== n && (this.cleanupObserver(), e === "eager" ? (this.imgEl && this.src && (this.imgEl.src = this.src), this.hasStarted = !0) : (this.imgLoaded = !1, this.hasStarted = !1, this.setupObserver()));
599
601
  }
600
602
  componentDidLoad() {
601
603
  this.loading !== "eager" && this.setupObserver();
602
604
  }
603
605
  disconnectedCallback() {
604
- this.cleanupObserver(), this.detachImgHandlers();
606
+ this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
605
607
  }
606
608
  canUseIO() {
607
609
  return typeof window != "undefined" && "IntersectionObserver" in window;
@@ -626,25 +628,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
626
628
  var e;
627
629
  (e = this.io) === null || e === void 0 || e.disconnect(), this.io = void 0;
628
630
  }
629
- wireOnceHandlers() {
630
- this.imgEl && (this.detachImgHandlers(), this._onLoad = () => {
631
- var e;
632
- this.currentSrc && (!((e = this.imgEl) === null || e === void 0) && e.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc) || (this.imgLoaded = !0);
633
- }, this._onError = () => {
634
- console.error("Load image failed:", this.src);
635
- }, this.imgEl.addEventListener("load", this._onLoad, { once: !0 }), this.imgEl.addEventListener("error", this._onError, { once: !0 }));
636
- }
637
- detachImgHandlers() {
638
- this.imgEl && (this._onLoad && this.imgEl.removeEventListener("load", this._onLoad), this._onError && this.imgEl.removeEventListener("error", this._onError), this._onLoad = void 0, this._onError = void 0);
639
- }
640
631
  beginLoad() {
641
- if (!this.hasStarted && this.imgEl && this.src) {
642
- if (this.hasStarted = !0, this.wireOnceHandlers(), this.imgEl.complete && this.imgEl.naturalWidth > 0) {
643
- this.imgLoaded = !0;
644
- return;
645
- }
646
- this.currentSrc = this.src, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
647
- }
632
+ this.hasStarted || this.imgEl && this.src && (this.hasStarted = !0, this.imgEl.src = this.src, this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0));
648
633
  }
649
634
  get showSkeleton() {
650
635
  return this.loading !== "eager" && !this.imgLoaded;
@@ -653,7 +638,7 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
653
638
  return t(l, { class: "HostContainer" }, t("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" }));
654
639
  }
655
640
  renderLazy() {
656
- return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
641
+ return t(l, { class: "HostContainer", "aria-busy": this.imgLoaded ? "false" : "true" }, this.showSkeleton && t("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" }), t("img", { ref: (e) => this.imgEl = e, src: void 0, decoding: "async", style: this.styles, onLoad: this._onLoad, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
657
642
  }
658
643
  render() {
659
644
  return this.loading === "eager" ? this.renderEager() : this.renderLazy();
@@ -668,8 +653,8 @@ const G = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;bord
668
653
  };
669
654
  }
670
655
  };
671
- S.style = R;
672
- const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = C, E = class {
656
+ C.style = R;
657
+ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", L = S, V = class {
673
658
  constructor(e) {
674
659
  d(this, e), this.stylingValue = {
675
660
  width: this.handleStylingProps(this.width),
@@ -819,9 +804,9 @@ const C = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
819
804
  };
820
805
  }
821
806
  };
822
- E.style = L;
807
+ V.style = L;
823
808
  export {
824
- k as casino_play_random_game,
825
- S as ui_image,
826
- E as ui_skeleton
809
+ v as casino_play_random_game,
810
+ C as ui_image,
811
+ V as ui_skeleton
827
812
  };