@everymatrix/casino-lobby 1.77.13 → 1.77.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{CasinoCalendar-zuTe3VuX.js → CasinoCalendar-2Cpj6Bg6.js} +2 -2
- package/components/{CasinoCalendar-DyBPfr8g.js → CasinoCalendar-CMIWRUUm.js} +2 -2
- package/components/{CasinoCalendar-BXkKXIW5.cjs → CasinoCalendar-DV_HGN_d.cjs} +1 -1
- package/components/{CasinoCalendarDailyDetails-exLcPp9d.js → CasinoCalendarDailyDetails-B5krFnaT.js} +2 -2
- package/components/{CasinoCalendarDailyDetails-BSZTWjUP.js → CasinoCalendarDailyDetails-DA7MIM93.js} +2 -2
- package/components/{CasinoCalendarDailyDetails-C-Z1rUGp.cjs → CasinoCalendarDailyDetails-XuqvF6i3.cjs} +1 -1
- package/components/{CasinoCalendarDailyItem-DhxDC_cY.js → CasinoCalendarDailyItem-BAJJIvIo.js} +2 -2
- package/components/{CasinoCalendarDailyItem-DsszYt1n.js → CasinoCalendarDailyItem-DY2ge_ta.js} +2 -2
- package/components/{CasinoCalendarDailyItem-C2-bAoC9.cjs → CasinoCalendarDailyItem-Q79--gB8.cjs} +1 -1
- package/components/{CasinoCategoriesSlider-BBjSAeXS.cjs → CasinoCategoriesSlider-Bj5sxBdL.cjs} +1 -1
- package/components/{CasinoCategoriesSlider-DbzHTxyP.js → CasinoCategoriesSlider-D8ihGze3.js} +2 -2
- package/components/{CasinoCategoriesSlider-C_rVyJhr.js → CasinoCategoriesSlider-QFkK1VfK.js} +2 -2
- package/components/{CasinoCollectionsProviders-07KHU5kx.js → CasinoCollectionsProviders-4Z4WIkbN.js} +1 -1
- package/components/{CasinoCollectionsProviders-D3Zl7Nz0.cjs → CasinoCollectionsProviders-CyhsgC2q.cjs} +1 -1
- package/components/{CasinoCollectionsProviders-995xsVnL.js → CasinoCollectionsProviders-KSxevvZ5.js} +1 -1
- package/components/{CasinoFavoritesSection-DJZI2rYY.js → CasinoFavoritesSection-5t-YdXxm.js} +2 -2
- package/components/{CasinoFavoritesSection-DfLdFUrZ.js → CasinoFavoritesSection-BJE-MQG7.js} +2 -2
- package/components/{CasinoFavoritesSection-5bYhSr79.cjs → CasinoFavoritesSection-DjiIRQLn.cjs} +1 -1
- package/components/{CasinoFilter-D-MHArIw.cjs → CasinoFilter-BDFP3doT.cjs} +1 -1
- package/components/{CasinoFilter-BuGoytL_.js → CasinoFilter-DqvsdQLm.js} +1 -1
- package/components/{CasinoFilter-MHNyQSU3.js → CasinoFilter-nIExzBTm.js} +1 -1
- package/components/{CasinoGameThumbnail-cHRupZt_.cjs → CasinoGameThumbnail-CRu4wYn9.cjs} +1 -1
- package/components/{CasinoGameThumbnail-C_0Y1dkd.js → CasinoGameThumbnail-D0NeJLRZ.js} +2 -2
- package/components/{CasinoGameThumbnail-BSIYg04A.js → CasinoGameThumbnail-D913j_wH.js} +2 -2
- package/components/{CasinoGamesCategorySection-CESeqX_L.js → CasinoGamesCategorySection-5LFU5yuj.js} +5 -5
- package/components/{CasinoGamesCategorySection-CBkUE5uv.cjs → CasinoGamesCategorySection-CRaxNGy0.cjs} +1 -1
- package/components/{CasinoGamesCategorySection-A08NUgCq.js → CasinoGamesCategorySection-CXzA9Pec.js} +5 -5
- package/components/{CasinoJackpotBanner-75MQ66qi.cjs → CasinoJackpotBanner-C2pEv1Zb.cjs} +1 -1
- package/components/{CasinoJackpotBanner-3DwTsCVK.js → CasinoJackpotBanner-EKq86n9z.js} +2 -2
- package/components/{CasinoJackpotBanner-CnlNGCDY.js → CasinoJackpotBanner-uWhhU8zz.js} +2 -2
- package/components/{CasinoLastPlayedSection-BZtGmUUA.cjs → CasinoLastPlayedSection-9KTmn4zi.cjs} +1 -1
- package/components/{CasinoLastPlayedSection-D-8v-cne.js → CasinoLastPlayedSection-CNaFhDz8.js} +2 -2
- package/components/{CasinoLastPlayedSection-DRoIS-0_.js → CasinoLastPlayedSection-O8WbOixZ.js} +2 -2
- package/components/{CasinoLobby-LgecSfVr.js → CasinoLobby-BFQ4We_Z.js} +3 -3
- package/components/{CasinoLobby-i-a4pZhC.js → CasinoLobby-BgA2Yfeh.js} +3 -3
- package/components/{CasinoLobby-HHgiyccN.cjs → CasinoLobby-BtMWFSuO.cjs} +1 -1
- package/components/{CasinoMostPlayedSection-BwEKJcPf.js → CasinoMostPlayedSection-Akkt-8zb.js} +2 -2
- package/components/{CasinoMostPlayedSection-BBXzsvRl.cjs → CasinoMostPlayedSection-CCxUcNEd.cjs} +1 -1
- package/components/{CasinoMostPlayedSection-CjYZTW4E.js → CasinoMostPlayedSection-DHre12XW.js} +2 -2
- package/components/{CasinoMyGames-xkjGsmOF.js → CasinoMyGames-6UepUaP6.js} +4 -4
- package/components/{CasinoMyGames-77EwW-yt.cjs → CasinoMyGames-C5pDZdI8.cjs} +1 -1
- package/components/{CasinoMyGames-DHuPaNG0.js → CasinoMyGames-CxerF-Yu.js} +4 -4
- package/components/{CasinoPage-DI-PASIJ.js → CasinoPage-Baakldpz.js} +11 -11
- package/components/{CasinoPage-4oV_jcI0.cjs → CasinoPage-Dcsv0xP0.cjs} +1 -1
- package/components/{CasinoPage-CB70PkG7.js → CasinoPage-DpOZxl2w.js} +11 -11
- package/components/{CasinoRandomGame-C9StTrk4.js → CasinoRandomGame-C0LeVa_K.js} +1 -1
- package/components/{CasinoRandomGame-CPpU-72j.cjs → CasinoRandomGame-CN0ZsyT7.cjs} +1 -1
- package/components/{CasinoRandomGame-BYvwFr_b.js → CasinoRandomGame-KqxBje-s.js} +1 -1
- package/components/{CasinoSearch-BfUtEpJL.js → CasinoSearch--k-N3P69.js} +2 -2
- package/components/{CasinoSearch-_jYPvRsN.cjs → CasinoSearch-CpZ8gqIq.cjs} +1 -1
- package/components/{CasinoSearch-igrUXd6J.js → CasinoSearch-D6g4OD8M.js} +2 -2
- package/components/{CasinoSlider-BXIE8lic.js → CasinoSlider-B8GaaNuP.js} +1 -1
- package/components/{CasinoSlider-B7h9pFKI.js → CasinoSlider-CBsaRkSG.js} +1 -1
- package/components/{CasinoSlider-CAMW98Br.cjs → CasinoSlider-DbyJ57E6.cjs} +1 -1
- package/components/{CasinoSort-zgez3kXp.cjs → CasinoSort-5CSg7HAS.cjs} +1 -1
- package/components/{CasinoSort-xXZ4iy3F.js → CasinoSort-DUnBFMEc.js} +1 -1
- package/components/{CasinoSort-BOxuTvzM.js → CasinoSort-DdVCJHJU.js} +1 -1
- package/components/{CasinoWinners-Dk_FM8M_.cjs → CasinoWinners-4uQChe2F.cjs} +1 -1
- package/components/{CasinoWinners-Cm0fFuOT.js → CasinoWinners-BO9ep3XD.js} +2 -2
- package/components/{CasinoWinners-Czcw38Ba.js → CasinoWinners-D9hsy2fX.js} +2 -2
- package/components/{GeneralAnimationLoading-BRm7wmIo.js → GeneralAnimationLoading-DKWSPDDc.js} +1 -1
- package/components/{GeneralAnimationLoading-KzmRRNdV.cjs → GeneralAnimationLoading-DpT91_iF.cjs} +1 -1
- package/components/{GeneralAnimationLoading-D3xBKGsh.js → GeneralAnimationLoading-yNj1-Ym_.js} +1 -1
- package/es2015/casino-lobby.cjs +1 -1
- package/es2015/casino-lobby.js +1 -1
- package/esnext/casino-lobby.js +1 -1
- package/package.json +1 -1
- package/stencil/casino-play-random-game-Cokl6Z0T.js +25 -0
- package/stencil/casino-play-random-game-YkE8NRAS.cjs +1 -0
- package/stencil/casino-play-random-game-aAxIDx1E.js +7 -0
- package/stencil/{casino-play-random-game_3-hXg44sIc.js → casino-play-random-game_2-C4OzRB6p.js} +62 -146
- package/stencil/{casino-play-random-game_3-DwEH0qQ6.cjs → casino-play-random-game_2-CW63Z1oW.cjs} +3 -3
- package/stencil/{casino-play-random-game_3-k-nIZgX3.js → casino-play-random-game_2-DQXJFV3B.js} +62 -146
- package/stencil/index-328e660d-B68qAbuh.js +576 -0
- package/stencil/index-328e660d-Bw8nOXsd.js +560 -0
- package/stencil/index-328e660d-r819jp36.cjs +1 -0
- package/stencil/{index-256b7d4e-DrOXnq3q.js → index-97d17652--F7PvMq9.js} +101 -102
- package/stencil/index-97d17652-BhLhk_xz.cjs +1 -0
- package/stencil/{index-256b7d4e-B27ydHcs.js → index-97d17652-CCFHkzJw.js} +104 -105
- package/stencil/ui-image-2_i-_1cj.js +25 -0
- package/stencil/ui-image-b7b48fe5-ByRuJtdE.js +39 -0
- package/stencil/ui-image-b7b48fe5-D6iig_uN.js +39 -0
- package/stencil/ui-image-b7b48fe5-DG83WzAo.cjs +1 -0
- package/stencil/ui-image-bN_3pDWc.js +7 -0
- package/stencil/ui-image-eY8BEG3a.cjs +1 -0
- package/stencil/{ui-image_2-hEBXfomA.js → ui-image_2-Bm97-wkj.js} +2 -2
- package/stencil/{ui-image_2-C-3C7pxb.cjs → ui-image_2-DdFjzzNO.cjs} +1 -1
- package/stencil/{ui-image_2-D4c_LX5r.js → ui-image_2-qO3reSlr.js} +2 -2
- package/stencil/casino-play-random-game-Baz3hijs.cjs +0 -1
- package/stencil/casino-play-random-game-CBvP0KH-.js +0 -7
- package/stencil/casino-play-random-game-CFbeQuDp.js +0 -25
- package/stencil/index-256b7d4e-yFNBIexD.cjs +0 -1
- package/stencil/index-27b314b8-B8NkclUW.cjs +0 -1
- package/stencil/index-27b314b8-BP-avhfQ.js +0 -581
- package/stencil/index-27b314b8-yHH25nm_.js +0 -565
- package/stencil/ui-image-CApqhy9w.js +0 -25
- package/stencil/ui-image-CSw577-7.js +0 -7
- package/stencil/ui-image-DrI4EMDq.cjs +0 -1
- package/stencil/ui-image-ae115205-Bmmit6PH.js +0 -81
- package/stencil/ui-image-ae115205-C9w0DS-q.js +0 -81
- package/stencil/ui-image-ae115205-CcwMMc09.cjs +0 -1
package/stencil/{casino-play-random-game_3-hXg44sIc.js → casino-play-random-game_2-C4OzRB6p.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as h, c as u, h as n, g as p, H as w } from "./index-328e660d-Bw8nOXsd.js";
|
|
2
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";
|
|
@@ -45,42 +45,42 @@ const f = () => {
|
|
|
45
45
|
playNowRandomGame: "Şimdi Oyna",
|
|
46
46
|
spinRandomGame: "DEĞİŞTİR"
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, l = (e) => new Promise((t) => {
|
|
49
49
|
fetch(e).then((i) => i.json()).then((i) => {
|
|
50
50
|
Object.keys(i).forEach((a) => {
|
|
51
51
|
r[a] || (r[a] = {});
|
|
52
|
-
for (let
|
|
53
|
-
r[a][
|
|
54
|
-
}),
|
|
52
|
+
for (let o in i[a])
|
|
53
|
+
r[a][o] = i[a][o];
|
|
54
|
+
}), t(!0);
|
|
55
55
|
});
|
|
56
|
-
}),
|
|
57
|
-
const i =
|
|
56
|
+
}), s = (e, t) => {
|
|
57
|
+
const i = t;
|
|
58
58
|
return r[i !== void 0 && i in r ? i : y][e];
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function m(e, t) {
|
|
61
61
|
if (e) {
|
|
62
62
|
const i = document.createElement("style");
|
|
63
|
-
i.innerHTML =
|
|
63
|
+
i.innerHTML = t, e.appendChild(i);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const i = new URL(
|
|
66
|
+
function d(e, t) {
|
|
67
|
+
const i = new URL(t);
|
|
68
68
|
fetch(i.href).then((a) => a.text()).then((a) => {
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const o = document.createElement("style");
|
|
70
|
+
o.innerHTML = a, e && e.appendChild(o);
|
|
71
71
|
}).catch((a) => {
|
|
72
72
|
console.error("There was an error while trying to load client styling from URL", a);
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function x(e, t, i) {
|
|
76
76
|
if (window.emMessageBus) {
|
|
77
77
|
const a = document.createElement("style");
|
|
78
|
-
window.emMessageBus.subscribe(
|
|
79
|
-
a.innerHTML =
|
|
78
|
+
window.emMessageBus.subscribe(t, (o) => {
|
|
79
|
+
a.innerHTML = o, e && e.appendChild(a);
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const b = `:host {
|
|
84
84
|
display: block;
|
|
85
85
|
font-family: inherit;
|
|
86
86
|
-webkit-transform: translate3d(0, 0, 0);
|
|
@@ -457,56 +457,50 @@ const x = `:host {
|
|
|
457
457
|
width: 70px;
|
|
458
458
|
height: 85px;
|
|
459
459
|
}
|
|
460
|
-
}`, k =
|
|
460
|
+
}`, k = b, G = class {
|
|
461
461
|
constructor(e) {
|
|
462
|
-
|
|
463
|
-
let i =
|
|
462
|
+
h(this, e), this.dataLoaded = u(this, "data-loaded"), this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (t) => {
|
|
463
|
+
let i = t.length, a;
|
|
464
464
|
for (; i !== 0; )
|
|
465
|
-
a = Math.floor(Math.random() * i), i--, [
|
|
466
|
-
return
|
|
467
|
-
}, 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
|
|
465
|
+
a = Math.floor(Math.random() * i), i--, [t[i], t[a]] = [t[a], t[i]];
|
|
466
|
+
return t;
|
|
467
|
+
}, 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;
|
|
468
468
|
}
|
|
469
|
-
watchEndpoint(e,
|
|
470
|
-
e && e !=
|
|
469
|
+
watchEndpoint(e, t) {
|
|
470
|
+
e && e != t && this.endpoint && this.fetchGameList();
|
|
471
471
|
}
|
|
472
472
|
handleNewTranslations() {
|
|
473
|
-
this.isLoading = !0,
|
|
473
|
+
this.isLoading = !0, l(this.translationUrl).then(() => {
|
|
474
474
|
this.isLoading = !1;
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
handleIsIconVisible() {
|
|
478
478
|
this.iconVisibility = this.iconVisible === "true";
|
|
479
479
|
}
|
|
480
|
-
handleClientStylingChange(e,
|
|
481
|
-
e !=
|
|
480
|
+
handleClientStylingChange(e, t) {
|
|
481
|
+
e != t && m(this.stylingContainer, this.clientStyling);
|
|
482
482
|
}
|
|
483
|
-
handleClientStylingChangeURL(e,
|
|
484
|
-
e !=
|
|
483
|
+
handleClientStylingChangeURL(e, t) {
|
|
484
|
+
e != t && this.clientStylingUrl && d(this.stylingContainer, this.clientStylingUrl);
|
|
485
485
|
}
|
|
486
486
|
connectedCallback() {
|
|
487
487
|
this.handleIsIconVisible();
|
|
488
488
|
}
|
|
489
489
|
componentWillLoad() {
|
|
490
|
-
if (this.translationUrl.length > 2 &&
|
|
490
|
+
if (this.translationUrl.length > 2 && l(this.translationUrl), this.endpoint && this.language && this.datasource)
|
|
491
491
|
return this.fetchGameList();
|
|
492
492
|
}
|
|
493
493
|
componentDidLoad() {
|
|
494
|
-
|
|
495
|
-
e.forEach((n) => {
|
|
496
|
-
var i;
|
|
497
|
-
n.isIntersecting && (this.imageLoadingType = "eager", (i = this.io) === null || i === void 0 || i.unobserve(n.target));
|
|
498
|
-
});
|
|
499
|
-
}, { root: null, rootMargin: this.detectDistance }), this.io.observe(this.host)), window.emMessageBus != null ? b(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && h(this.stylingContainer, this.clientStyling), this.clientStylingUrl && c(this.stylingContainer, this.clientStylingUrl));
|
|
494
|
+
window.emMessageBus != null ? x(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && m(this.stylingContainer, this.clientStyling), this.clientStylingUrl && d(this.stylingContainer, this.clientStylingUrl));
|
|
500
495
|
}
|
|
501
496
|
disconnectedCallback() {
|
|
502
|
-
|
|
503
|
-
(e = this.io) === null || e === void 0 || e.disconnect(), this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
497
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
504
498
|
}
|
|
505
499
|
fetchGameList() {
|
|
506
500
|
let e = new URL(`${this.endpoint}/v1/casino/games`);
|
|
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((
|
|
501
|
+
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) => {
|
|
508
502
|
this.isLoading = !0, fetch(e.href).then((a) => a.json()).then((a) => {
|
|
509
|
-
this.gamesToShow = this.setUpGames(a?.items),
|
|
503
|
+
this.gamesToShow = this.setUpGames(a?.items), t(!0);
|
|
510
504
|
}).catch((a) => {
|
|
511
505
|
console.error(a), this.hasErrors = !0, i(a);
|
|
512
506
|
}).finally(() => {
|
|
@@ -517,8 +511,8 @@ const x = `:host {
|
|
|
517
511
|
});
|
|
518
512
|
}
|
|
519
513
|
setUpGames(e) {
|
|
520
|
-
const
|
|
521
|
-
return
|
|
514
|
+
const t = this.shuffle(e).slice(0, 40);
|
|
515
|
+
return t.concat(t);
|
|
522
516
|
}
|
|
523
517
|
selectRandomGame() {
|
|
524
518
|
const e = this.gamesToShow.length / 2;
|
|
@@ -536,18 +530,18 @@ const x = `:host {
|
|
|
536
530
|
}
|
|
537
531
|
animateGames() {
|
|
538
532
|
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"),
|
|
533
|
+
const e = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), t = parseInt(e, 10), i = this.selectedGameEl.offsetWidth, a = this.gameContainer.offsetWidth, o = (i + t) * this.selectedGameIndex + // Width of game cards up to the selected
|
|
540
534
|
i / 2 - // Additional half card width to center to the selected game
|
|
541
|
-
a / 2,
|
|
535
|
+
a / 2, c = [
|
|
542
536
|
{ transform: "translateX(0px)", scale: 1 },
|
|
543
537
|
{ scale: 0.75 },
|
|
544
|
-
{ transform: `translateX(-${
|
|
545
|
-
],
|
|
538
|
+
{ transform: `translateX(-${o}px)`, scale: 1 }
|
|
539
|
+
], g = {
|
|
546
540
|
duration: 3e3,
|
|
547
541
|
easing: "cubic-bezier(0.5, 0, 0.5, 1.2)",
|
|
548
542
|
fill: "forwards"
|
|
549
543
|
};
|
|
550
|
-
this.animation = this.gameContainer.animate(
|
|
544
|
+
this.animation = this.gameContainer.animate(c, g), this.animation.onfinish = () => {
|
|
551
545
|
this.animationDone = !0, this.selectedGameEl.classList.add("TheRandomGame"), this.selectedGame = this.gamesToShow[this.selectedGameIndex];
|
|
552
546
|
};
|
|
553
547
|
}
|
|
@@ -562,17 +556,17 @@ const x = `:host {
|
|
|
562
556
|
});
|
|
563
557
|
}
|
|
564
558
|
renderGameDetails() {
|
|
565
|
-
return
|
|
559
|
+
return n("div", { class: "RandomButtonsWrapper" }, n("div", { class: "RandomGameDetails" }, n("span", { class: "RandomGameTitle" }, this.selectedGame.name), n("span", { class: "RandomGameInfo", onClick: () => this.showGameInfo() }, "i")), n("div", { class: "RandomButtons" }, n("button", { class: "RandomButton On", onClick: () => this.respin() }, s("spinRandomGame", this.language)), !this.launchByGameCard && n("button", { class: "RandomButton On", onClick: () => this.playGame() }, s("playNowRandomGame", this.language))));
|
|
566
560
|
}
|
|
567
561
|
renderSkeleton() {
|
|
568
|
-
const e = Array.from({ length: 5 }, (
|
|
569
|
-
return
|
|
562
|
+
const e = Array.from({ length: 5 }, (t, i) => n("div", { class: "RandomGameCard", key: i }, n("ui-skeleton", { structure: "rectangle", width: "300px", height: "420px", borderRadius: "10px", animation: !0 })));
|
|
563
|
+
return n("div", { class: "RandomGameWrapper" }, n("div", { class: "GameContainerGradient" }), n("div", { class: "GamesContainer" }, e));
|
|
570
564
|
}
|
|
571
565
|
render() {
|
|
572
|
-
return
|
|
566
|
+
return n("div", { key: "1f326cff688b0b71ca1d6efbc6766c6b768cb846", ref: (e) => this.stylingContainer = e }, this.hasErrors ? n("div", { class: "RandomGameError" }, n("div", { class: "Title" }, s("error", this.language))) : this.isLoading ? this.renderSkeleton() : n("div", { class: "RandomGameWrapper" }, n("div", { class: "GameContainerGradient" }), n("div", { class: "GamesContainer", ref: (e) => this.gameContainer = e }, this.gamesToShow && this.gamesToShow.map((e, t) => n("div", { class: "RandomGameCard", key: t, onClick: this.launchByGameCard === "true" ? () => this.playGame() : void 0 }, n("div", { class: "RandomGameVendor" }, e.vendor.name), n("img", { class: "RandomGameImage", src: e.thumbnail, alt: e.name, title: e.name }), this.selectedGame && this.selectedGameIndex === t && this.renderGameDetails()))), n("div", { class: `ButtonWrapper ${this.animationDone ? "HideAnimation" : ""}` }, n("div", { class: "ButtonContainer" }, this.iconVisibility && n("div", { class: `ButtonIcon ${this.animationStarted ? "Flip" : ""}` }, n("div", { class: "QustionMark" }, "?"), n("div", { class: "HexagonMarkShadow" }), n("div", { class: "HexagonMark" })), !this.animationStarted && n("div", { class: `RandomButton ${this.animationStarted ? "HideAnimation" : ""}`, onClick: () => this.playRandomGame() }, s("playRandomGame", this.language))))));
|
|
573
567
|
}
|
|
574
568
|
get host() {
|
|
575
|
-
return
|
|
569
|
+
return p(this);
|
|
576
570
|
}
|
|
577
571
|
static get watchers() {
|
|
578
572
|
return {
|
|
@@ -586,87 +580,10 @@ const x = `:host {
|
|
|
586
580
|
};
|
|
587
581
|
}
|
|
588
582
|
};
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
constructor(e) {
|
|
592
|
-
d(this, e), 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;
|
|
595
|
-
}
|
|
596
|
-
onSrcChange() {
|
|
597
|
-
this.loading !== "eager" && (this.imgLoaded = !1, (typeof window > "u" || !("IntersectionObserver" in window)) && this.beginLoad());
|
|
598
|
-
}
|
|
599
|
-
onLoadingChange(e, n) {
|
|
600
|
-
e !== n && (this.cleanupObserver(), e === "eager" ? this.imgEl && this.src && (this.imgEl.src = this.src) : (this.imgLoaded = !1, this.setupObserver()));
|
|
601
|
-
}
|
|
602
|
-
componentDidLoad() {
|
|
603
|
-
this.loading !== "eager" && this.setupObserver();
|
|
604
|
-
}
|
|
605
|
-
disconnectedCallback() {
|
|
606
|
-
this.cleanupObserver(), this.imgEl && (this.imgEl.src = "");
|
|
607
|
-
}
|
|
608
|
-
canUseIO() {
|
|
609
|
-
return typeof window < "u" && "IntersectionObserver" in window;
|
|
610
|
-
}
|
|
611
|
-
setupObserver() {
|
|
612
|
-
if (this.loading !== "eager") {
|
|
613
|
-
if (!this.canUseIO()) {
|
|
614
|
-
this.beginLoad();
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
this.io = new IntersectionObserver((e) => {
|
|
618
|
-
var n;
|
|
619
|
-
for (const i of e)
|
|
620
|
-
if (i.isIntersecting) {
|
|
621
|
-
this.beginLoad(), (n = this.io) === null || n === void 0 || n.unobserve(i.target), this.cleanupObserver();
|
|
622
|
-
break;
|
|
623
|
-
}
|
|
624
|
-
}, { root: null, rootMargin: this.detectDistance, threshold: 0 }), this.io.observe(this.el);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
cleanupObserver() {
|
|
628
|
-
var e;
|
|
629
|
-
(e = this.io) === null || e === void 0 || e.disconnect(), this.io = void 0;
|
|
630
|
-
}
|
|
631
|
-
beginLoad() {
|
|
632
|
-
this.preloadAndSetSrc(), this.imgEl && this.imgEl.complete && this.imgEl.naturalWidth > 0 && (this.imgLoaded = !0);
|
|
633
|
-
}
|
|
634
|
-
preloadAndSetSrc() {
|
|
635
|
-
if (!this.src || !this.imgEl)
|
|
636
|
-
return;
|
|
637
|
-
const e = new Image();
|
|
638
|
-
e.onload = () => {
|
|
639
|
-
this.imgEl && (this.imgEl.src = e.src, this.imgLoaded = !0);
|
|
640
|
-
}, e.onerror = () => {
|
|
641
|
-
this.imgEl && (this.imgEl.src = this.src);
|
|
642
|
-
}, e.src = this.src;
|
|
643
|
-
}
|
|
644
|
-
get showSkeleton() {
|
|
645
|
-
return this.loading !== "eager" && !this.imgLoaded;
|
|
646
|
-
}
|
|
647
|
-
renderEager() {
|
|
648
|
-
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" }));
|
|
649
|
-
}
|
|
650
|
-
renderLazy() {
|
|
651
|
-
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" }));
|
|
652
|
-
}
|
|
653
|
-
render() {
|
|
654
|
-
return this.loading === "eager" ? this.renderEager() : this.renderLazy();
|
|
655
|
-
}
|
|
656
|
-
get el() {
|
|
657
|
-
return g(this);
|
|
658
|
-
}
|
|
659
|
-
static get watchers() {
|
|
660
|
-
return {
|
|
661
|
-
src: ["onSrcChange"],
|
|
662
|
-
loading: ["onLoadingChange"]
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
};
|
|
666
|
-
C.style = R;
|
|
667
|
-
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 {
|
|
583
|
+
G.style = k;
|
|
584
|
+
const v = ":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 = v, S = class {
|
|
668
585
|
constructor(e) {
|
|
669
|
-
|
|
586
|
+
h(this, e), this.stylingValue = {
|
|
670
587
|
width: this.handleStylingProps(this.width),
|
|
671
588
|
height: this.handleStylingProps(this.height),
|
|
672
589
|
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
@@ -677,8 +594,8 @@ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
|
|
|
677
594
|
size: this.handleStylingProps(this.size)
|
|
678
595
|
}, 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%";
|
|
679
596
|
}
|
|
680
|
-
handleStructureChange(e,
|
|
681
|
-
|
|
597
|
+
handleStructureChange(e, t) {
|
|
598
|
+
t !== e && this.handleStructure(e);
|
|
682
599
|
}
|
|
683
600
|
handleStylingProps(e) {
|
|
684
601
|
switch (typeof e) {
|
|
@@ -711,22 +628,22 @@ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
|
|
|
711
628
|
}
|
|
712
629
|
}
|
|
713
630
|
renderLogo() {
|
|
714
|
-
return
|
|
631
|
+
return n("div", { class: "SkeletonContainer" }, n("div", { class: "Logo " + (this.animation ? "Skeleton" : "") }));
|
|
715
632
|
}
|
|
716
633
|
renderImage() {
|
|
717
|
-
return
|
|
634
|
+
return n("div", { class: "Image " + (this.animation ? "Skeleton" : "") });
|
|
718
635
|
}
|
|
719
636
|
renderTitle() {
|
|
720
|
-
return
|
|
637
|
+
return n("div", { class: "SkeletonContainer" }, n("div", { class: "Title " + (this.animation ? "Skeleton" : "") }));
|
|
721
638
|
}
|
|
722
639
|
renderText() {
|
|
723
|
-
return
|
|
640
|
+
return n("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((e, t) => n("div", { key: t, class: "Text " + (this.animation ? "Skeleton" : "") })));
|
|
724
641
|
}
|
|
725
642
|
renderRectangle() {
|
|
726
|
-
return
|
|
643
|
+
return n("div", { class: "SkeletonContainer" }, n("div", { class: "Rectangle " + (this.animation ? "Skeleton" : "") }));
|
|
727
644
|
}
|
|
728
645
|
renderCircle() {
|
|
729
|
-
return
|
|
646
|
+
return n("div", { class: "SkeletonContainer" }, n("div", { class: "Circle " + (this.animation ? "Skeleton" : "") }));
|
|
730
647
|
}
|
|
731
648
|
render() {
|
|
732
649
|
let e = "";
|
|
@@ -806,7 +723,7 @@ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
|
|
|
806
723
|
default:
|
|
807
724
|
e = "";
|
|
808
725
|
}
|
|
809
|
-
return
|
|
726
|
+
return n(w, { key: "e6b885bfd985ce7663d990756fe9101e25eb97f0" }, n("style", { key: "06ae24c7bb74f4dacfc12ae58085333f9dc89da5" }, e), this.handleStructure(this.structure));
|
|
810
727
|
}
|
|
811
728
|
static get watchers() {
|
|
812
729
|
return {
|
|
@@ -814,9 +731,8 @@ const S = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear in
|
|
|
814
731
|
};
|
|
815
732
|
}
|
|
816
733
|
};
|
|
817
|
-
|
|
734
|
+
S.style = R;
|
|
818
735
|
export {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
V as ui_skeleton
|
|
736
|
+
G as casino_play_random_game,
|
|
737
|
+
S as ui_skeleton
|
|
822
738
|
};
|
package/stencil/{casino-play-random-game_3-DwEH0qQ6.cjs → casino-play-random-game_2-CW63Z1oW.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-328e660d-r819jp36.cjs"),p=()=>{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",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 o in i[a])r[a][o]=i[a][o]}),t(!0)})}),s=(e,t)=>{const i=t;return r[i!==void 0&&i in r?i:w][e]};function m(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function d(e,t){const i=new URL(t);fetch(i.href).then(a=>a.text()).then(a=>{const o=document.createElement("style");o.innerHTML=a,e&&e.appendChild(o)}).catch(a=>{console.error("There was an error while trying to load client styling from URL",a)})}function f(e,t,i){if(window.emMessageBus){const a=document.createElement("style");window.emMessageBus.subscribe(t,o=>{a.innerHTML=o,e&&e.appendChild(a)})}}const y=`: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,h=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&&m(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&&m(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"&>ag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),typeof gtag=="function"&>ag("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"&>ag("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"&>ag("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"]}}};h.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._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,(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.imgLoaded=!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.preloadAndSetSrc(),this.imgEl&&this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0)}preloadAndSetSrc(){if(!this.src||!this.imgEl)return;const e=new Image;e.onload=()=>{this.imgEl&&(this.imgEl.src=e.src,this.imgLoaded=!0)},e.onerror=()=>{this.imgEl&&(this.imgEl.src=this.src)},e.src=this.src}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=`
|
|
378
|
+
}`,x=y,h=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}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&&m(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&d(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(){window.emMessageBus!=null?f(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&m(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&d(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchGameList(){let e=new URL(`${this.endpoint}/v1/casino/games`);return e.searchParams.append("platform",p()),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"&>ag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),typeof gtag=="function"&>ag("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,o=(i+t)*this.selectedGameIndex+i/2-a/2,g=[{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${o}px)`,scale:1}],u={duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"};this.animation=this.gameContainer.animate(g,u),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"&>ag("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"&>ag("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()},s("spinRandomGame",this.language)),!this.launchByGameCard&&n.h("button",{class:"RandomButton On",onClick:()=>this.playGame()},s("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:"1f326cff688b0b71ca1d6efbc6766c6b768cb846",ref:e=>this.stylingContainer=e},this.hasErrors?n.h("div",{class:"RandomGameError"},n.h("div",{class:"Title"},s("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("img",{class:"RandomGameImage",src:e.thumbnail,alt:e.name,title:e.name}),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()},s("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"]}}};h.style=x;const b=":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)}}",k=b,c=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};
|
|
@@ -429,4 +429,4 @@
|
|
|
429
429
|
:host {
|
|
430
430
|
--emw-skeleton-circle-size: ${this.stylingValue.size};
|
|
431
431
|
}
|
|
432
|
-
`;break;default:e=""}return n.h(n.Host,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},n.h("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};
|
|
432
|
+
`;break;default:e=""}return n.h(n.Host,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},n.h("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};c.style=k;exports.casino_play_random_game=h;exports.ui_skeleton=c;
|