@everymatrix/casino-lobby 1.53.11 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{CasinoCalendar-Ic3lq1UY.js → CasinoCalendar--_TG0VEV.js} +1078 -1039
- package/components/CasinoCalendar-Bzrlnxmc.cjs +9 -0
- package/components/{CasinoCalendarDailyDetails-buDoufAV.js → CasinoCalendarDailyDetails-BXGq5a2T.js} +1 -1
- package/components/CasinoCalendarDailyDetails-H5yaxv9P.cjs +1 -0
- package/components/CasinoCalendarDailyItem-BvYs7mGd.cjs +1 -0
- package/components/{CasinoCalendarDailyItem-koPRd703.js → CasinoCalendarDailyItem-D2aX3lqV.js} +1 -1
- package/components/CasinoCategoriesSlider-Dj810VWn.cjs +1 -0
- package/components/{CasinoCategoriesSlider-Bp9JHeM_.js → CasinoCategoriesSlider-J5nWaz3g.js} +3 -3
- package/components/CasinoCollectionsProviders-CGAhYp6h.cjs +1 -0
- package/components/{CasinoCollectionsProviders-CrpNb22N.js → CasinoCollectionsProviders-CuCFosXw.js} +242 -237
- package/components/CasinoFavoritesSection-DSMFNuL7.cjs +1 -0
- package/components/{CasinoFavoritesSection-C1XEW6Z6.js → CasinoFavoritesSection-y1wno4sj.js} +3 -3
- package/components/CasinoFilter-DSWjEuYT.cjs +1 -0
- package/components/{CasinoFilter-CYZHW74M.js → CasinoFilter-Dzg88RIE.js} +54 -53
- package/components/{CasinoGamePage-CCqWDOmI.js → CasinoGamePage-D6-QXHCi.js} +1301 -1280
- package/components/CasinoGamePage-DR56fBWR.cjs +18 -0
- package/components/{CasinoGameThumbnail-zLPpnkNm.js → CasinoGameThumbnail-D0H15Csw.js} +321 -305
- package/components/CasinoGameThumbnail-Dtr9U58k.cjs +38 -0
- package/components/CasinoGamesCategorySection-BhY8_Szi.cjs +1 -0
- package/components/{CasinoGamesCategorySection-DMGyKJ-j.js → CasinoGamesCategorySection-Cl_p9So4.js} +1135 -1104
- package/components/{CasinoJackpotBanner-CL7SMQDH.js → CasinoJackpotBanner-BD8WK4Rz.js} +157 -153
- package/components/CasinoJackpotBanner-CNAYdfAP.cjs +1 -0
- package/components/CasinoLastPlayedSection-D4Y31NgL.cjs +1 -0
- package/components/{CasinoLastPlayedSection-Cm6BF1pV.js → CasinoLastPlayedSection-ctqze_4r.js} +2 -2
- package/components/{CasinoLobby-DPo1HzH2.js → CasinoLobby-CXaWKeNB.js} +13 -13
- package/components/CasinoLobby-DJkqmh-Q.cjs +1 -0
- package/components/{CasinoModal-z0xixUlG.js → CasinoModal-BBqGUhwr.js} +1 -1
- package/components/CasinoModal-DqY-wVQ9.cjs +1 -0
- package/components/{CasinoMostPlayedSection-CA67PY54.js → CasinoMostPlayedSection-BeiZTG1A.js} +2 -2
- package/components/CasinoMostPlayedSection-Dj0QI5j_.cjs +1 -0
- package/components/CasinoMyGames-CHpklmlj.cjs +1 -0
- package/components/{CasinoMyGames-DvJ46R6O.js → CasinoMyGames-D_Eo_aAx.js} +72 -71
- package/components/{CasinoPage-CfEe4r2D.js → CasinoPage-DcCY3qwb.js} +795 -792
- package/components/CasinoPage-SM6shSGz.cjs +1 -0
- package/components/{CasinoRandomGame-efA8CEqy.js → CasinoRandomGame-Cv4OhwGN.js} +247 -231
- package/components/CasinoRandomGame-Dldt___P.cjs +2 -0
- package/components/CasinoSearch-B4flIPra.cjs +1 -0
- package/components/{CasinoSearch-CZ5ggDbP.js → CasinoSearch-BXhg9VMw.js} +194 -192
- package/components/{CasinoSlider-BPqJIB5d.js → CasinoSlider-CWFiUGzM.js} +215 -209
- package/components/CasinoSlider-UZ_dMYzs.cjs +1 -0
- package/components/CasinoSort-Cg-ANbV3.cjs +1 -0
- package/components/{CasinoSort-CBtcK7i0.js → CasinoSort-PDbvW-vI.js} +3 -2
- package/components/CasinoWinners-CSBr561I.cjs +1 -0
- package/components/{CasinoWinners-Db2ivy-R.js → CasinoWinners-D-uK3YLU.js} +148 -146
- package/components/GeneralAnimationLoading-CzSDAjam.cjs +1 -0
- package/components/{GeneralAnimationLoading-DiwFEyef.js → GeneralAnimationLoading-oX4fYtDr.js} +1 -1
- package/es2015/casino-lobby.cjs +1 -0
- package/es2015/casino-lobby.js +16 -0
- package/package.json +14 -12
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
- package/stencil/{casino-play-random-game-BrayzMrR.js → casino-play-random-game-CdK9RTmU.js} +62 -44
- package/stencil/casino-play-random-game-D5-NhS5J.cjs +371 -0
- package/stencil/{index-47910d1c-CWwDm8i3.js → index-47910d1c-BJIxkb-p.js} +238 -222
- package/stencil/index-47910d1c-CDXxJ6XN.cjs +1 -0
- package/esnext/casino-lobby.js +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoCalendar-Bzrlnxmc.cjs");function h(n){t.append_styles(n,"svelte-gnt082",".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}")}function m(n){let i;return{c(){i=t.element("div"),i.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>'},m(l,d){t.insert(l,i,d),n[3](i)},p:t.noop,i:t.noop,o:t.noop,d(l){l&&t.detach(i),n[3](null)}}}function g(n,i,l){let{clientstyling:d=""}=i,{clientstylingurl:r=""}=i,s;const u=()=>{let e=document.createElement("style");e.innerHTML=d,s.appendChild(e)},p=()=>{let e=new URL(r),c=document.createElement("style");fetch(e.href).then(a=>a.text()).then(a=>{c.innerHTML=a,setTimeout(()=>{s.appendChild(c)},1),setTimeout(()=>{},500)})};function f(e){t.binding_callbacks[e?"unshift":"push"](()=>{s=e,l(0,s)})}return n.$$set=e=>{"clientstyling"in e&&l(1,d=e.clientstyling),"clientstylingurl"in e&&l(2,r=e.clientstylingurl)},n.$$.update=()=>{n.$$.dirty&3&&d&&s&&u(),n.$$.dirty&5&&r&&s&&p()},[s,d,r,f]}class o extends t.SvelteComponent{constructor(i){super(),t.init(this,i,g,m,t.safe_not_equal,{clientstyling:1,clientstylingurl:2},h)}get clientstyling(){return this.$$.ctx[1]}set clientstyling(i){this.$$set({clientstyling:i}),t.flush()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(i){this.$$set({clientstylingurl:i}),t.flush()}}t.create_custom_element(o,{clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=o;
|
package/components/{GeneralAnimationLoading-DiwFEyef.js → GeneralAnimationLoading-oX4fYtDr.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as m, i as h, f as o, c as g, s as y, b as v, e as x, d as b, D as r, j as _, n as C } from "./CasinoCalendar
|
|
1
|
+
import { S as m, i as h, f as o, c as g, s as y, b as v, e as x, d as b, D as r, j as _, n as C } from "./CasinoCalendar--_TG0VEV.js";
|
|
2
2
|
function L(e) {
|
|
3
3
|
v(e, "svelte-gnt082", ".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}");
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoLobby-DJkqmh-Q.cjs")).then(({default:t})=>{!customElements.get("casino-lobby")&&customElements.define("casino-lobby",t.element)})}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
if (typeof window != "undefined") {
|
|
2
|
+
let n = function(t) {
|
|
3
|
+
return function(...s) {
|
|
4
|
+
try {
|
|
5
|
+
return t.apply(this, s);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
8
|
+
return !1;
|
|
9
|
+
throw e;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/CasinoLobby-CXaWKeNB.js").then(({ default: t }) => {
|
|
14
|
+
!customElements.get("casino-lobby") && customElements.define("casino-lobby", t.element);
|
|
15
|
+
});
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
1
|
{
|
|
3
2
|
"name": "@everymatrix/casino-lobby",
|
|
4
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0",
|
|
5
4
|
"type": "module",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
5
|
+
"main": "es2015/casino-lobby.cjs",
|
|
6
|
+
"module": "es2015/casino-lobby.js",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
|
-
"import": "./
|
|
9
|
+
"import": "./es2015/casino-lobby.js",
|
|
10
|
+
"require": "./es2015/casino-lobby.cjs"
|
|
11
11
|
},
|
|
12
|
-
"./es2015/casino-lobby.cjs": "./es2015/casino-lobby.cjs"
|
|
13
|
-
"./es2015/casino-lobby.js": "./es2015/casino-lobby.js"
|
|
12
|
+
"./es2015/casino-lobby.cjs": "./es2015/casino-lobby.cjs"
|
|
14
13
|
},
|
|
15
14
|
"files": [
|
|
16
|
-
"components/",
|
|
17
15
|
"es2015/",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"esnext/"
|
|
16
|
+
"components",
|
|
17
|
+
"stencil"
|
|
21
18
|
],
|
|
22
19
|
"publishConfig": {
|
|
23
20
|
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@everymatrix/casino-categories-slider": "1.45.7",
|
|
24
|
+
"@everymatrix/casino-page": "1.45.7",
|
|
25
|
+
"@everymatrix/casino-modal": "1.45.7",
|
|
26
|
+
"@everymatrix/casino-game-page": "1.45.7"
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
|
-
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=()=>{};exports.globalScripts=s;
|
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var p = (n, e, a) => new Promise((t, o) => {
|
|
2
|
+
var m = (r) => {
|
|
3
|
+
try {
|
|
4
|
+
c(a.next(r));
|
|
5
|
+
} catch (h) {
|
|
6
|
+
o(h);
|
|
7
|
+
}
|
|
8
|
+
}, d = (r) => {
|
|
9
|
+
try {
|
|
10
|
+
c(a.throw(r));
|
|
11
|
+
} catch (h) {
|
|
12
|
+
o(h);
|
|
13
|
+
}
|
|
14
|
+
}, c = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(m, d);
|
|
15
|
+
c((a = a.apply(n, e)).next());
|
|
16
|
+
});
|
|
17
|
+
import { b as u, p as f, r as w, h as i, g as x } from "./index-47910d1c-BJIxkb-p.js";
|
|
18
|
+
import { g as y } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
19
|
+
var G = () => {
|
|
4
20
|
const n = import.meta.url, e = {};
|
|
5
|
-
return n !== "" && (e.resourcesUrl = new URL(".", n).href),
|
|
21
|
+
return n !== "" && (e.resourcesUrl = new URL(".", n).href), f(e);
|
|
6
22
|
};
|
|
7
|
-
|
|
8
|
-
|
|
23
|
+
G().then((n) => p(void 0, null, function* () {
|
|
24
|
+
return yield y(), u([["casino-play-random-game", [[1, "casino-play-random-game", { endpoint: [513], datasource: [513], language: [513], specificCategory: [513, "specific-category"], iconVisible: [513, "icon-visible"], iconVisibleOnAnim: [513, "icon-visible-on-anim"], launchByGameCard: [513, "launch-by-game-card"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], hasErrors: [32], limitStylingAppends: [32], isLoading: [32], gamesToShow: [32], selectedGame: [32], animationDone: [32], animationStarted: [32] }, null, { endpoint: ["watchEndpoint"], datasource: ["watchEndpoint"], language: ["watchEndpoint"], translationUrl: ["handleNewTranslations"], iconVisible: ["handleIsIconVisible"] }]]]], n);
|
|
25
|
+
}));
|
|
26
|
+
const b = () => {
|
|
9
27
|
let n = window.navigator.userAgent;
|
|
10
28
|
return n.toLowerCase().match(/android/i) ? "Android" : n.toLowerCase().match(/iphone/i) ? "iPhone" : n.toLowerCase().match(/ipad|ipod/i) ? "iPad" : "PC";
|
|
11
|
-
},
|
|
29
|
+
}, v = "en", l = {
|
|
12
30
|
en: {
|
|
13
31
|
error: "Error",
|
|
14
32
|
randomGameLoading: "Loading ...",
|
|
@@ -51,18 +69,18 @@ const w = () => {
|
|
|
51
69
|
playNowRandomGame: "Şimdi Oyna",
|
|
52
70
|
spinRandomGame: "DEĞİŞTİR"
|
|
53
71
|
}
|
|
54
|
-
},
|
|
55
|
-
fetch(n).then((
|
|
56
|
-
Object.keys(
|
|
57
|
-
|
|
58
|
-
for (let
|
|
59
|
-
|
|
72
|
+
}, g = (n) => new Promise((e) => {
|
|
73
|
+
fetch(n).then((a) => a.json()).then((a) => {
|
|
74
|
+
Object.keys(a).forEach((t) => {
|
|
75
|
+
l[t] || (l[t] = {});
|
|
76
|
+
for (let o in a[t])
|
|
77
|
+
l[t][o] = a[t][o];
|
|
60
78
|
}), e(!0);
|
|
61
79
|
});
|
|
62
|
-
}),
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
},
|
|
80
|
+
}), s = (n, e) => {
|
|
81
|
+
const a = e;
|
|
82
|
+
return l[a !== void 0 && a in l ? a : v][n];
|
|
83
|
+
}, R = `:host {
|
|
66
84
|
display: block;
|
|
67
85
|
font-family: inherit;
|
|
68
86
|
-webkit-transform: translate3d(0, 0, 0);
|
|
@@ -432,21 +450,21 @@ const w = () => {
|
|
|
432
450
|
width: 70px;
|
|
433
451
|
height: 85px;
|
|
434
452
|
}
|
|
435
|
-
}`,
|
|
453
|
+
}`, k = R, C = class {
|
|
436
454
|
constructor(n) {
|
|
437
|
-
|
|
438
|
-
let
|
|
439
|
-
for (;
|
|
440
|
-
|
|
455
|
+
w(this, n), this.language = "en", this.specificCategory = "", this.iconVisible = "", this.iconVisibleOnAnim = "", this.launchByGameCard = "", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.hasErrors = !1, this.limitStylingAppends = !1, this.isLoading = !0, this.selectedGame = null, this.animationDone = !1, this.animationStarted = !1, this.animation = null, this.selectedGameIndex = null, this.selectedGameEl = null, this.iconVisibility = null, this.shuffle = (e) => {
|
|
456
|
+
let a = e.length, t;
|
|
457
|
+
for (; a !== 0; )
|
|
458
|
+
t = Math.floor(Math.random() * a), a--, [e[a], e[t]] = [e[t], e[a]];
|
|
441
459
|
return e;
|
|
442
460
|
}, this.setClientStyling = () => {
|
|
443
461
|
let e = document.createElement("style");
|
|
444
462
|
e.innerHTML = this.clientStyling, this.host.shadowRoot.prepend(e);
|
|
445
463
|
}, this.setClientStylingURL = () => {
|
|
446
|
-
let e = new URL(this.clientStylingUrl),
|
|
447
|
-
fetch(e.href).then((
|
|
448
|
-
|
|
449
|
-
this.host.shadowRoot.prepend(
|
|
464
|
+
let e = new URL(this.clientStylingUrl), a = document.createElement("style");
|
|
465
|
+
fetch(e.href).then((t) => t.text()).then((t) => {
|
|
466
|
+
a.innerHTML = t, this.clientStyling = t, setTimeout(() => {
|
|
467
|
+
this.host.shadowRoot.prepend(a);
|
|
450
468
|
}, 1);
|
|
451
469
|
});
|
|
452
470
|
};
|
|
@@ -455,7 +473,7 @@ const w = () => {
|
|
|
455
473
|
n && n != e && this.endpoint && this.fetchGameList();
|
|
456
474
|
}
|
|
457
475
|
handleNewTranslations() {
|
|
458
|
-
this.isLoading = !0,
|
|
476
|
+
this.isLoading = !0, g(this.translationUrl).then(() => {
|
|
459
477
|
this.isLoading = !1;
|
|
460
478
|
});
|
|
461
479
|
}
|
|
@@ -466,7 +484,7 @@ const w = () => {
|
|
|
466
484
|
this.handleIsIconVisible();
|
|
467
485
|
}
|
|
468
486
|
componentWillLoad() {
|
|
469
|
-
if (this.translationUrl.length > 2 &&
|
|
487
|
+
if (this.translationUrl.length > 2 && g(this.translationUrl), this.endpoint && this.language && this.datasource)
|
|
470
488
|
return this.fetchGameList();
|
|
471
489
|
}
|
|
472
490
|
componentDidLoad() {
|
|
@@ -474,11 +492,11 @@ const w = () => {
|
|
|
474
492
|
}
|
|
475
493
|
fetchGameList() {
|
|
476
494
|
let n = new URL(`${this.endpoint}/v1/casino/games`);
|
|
477
|
-
return n.searchParams.append("platform",
|
|
478
|
-
this.isLoading = !0, fetch(n.href).then((
|
|
479
|
-
this.gamesToShow = this.setUpGames(
|
|
480
|
-
}).catch((
|
|
481
|
-
console.error(
|
|
495
|
+
return n.searchParams.append("platform", b()), n.searchParams.append("datasource", this.datasource), n.searchParams.append("fields", "gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"), n.searchParams.append("expand", "vendor"), n.searchParams.append("pagination", "offset=0,limit=423"), n.searchParams.append("language", this.language), this.specificCategory && n.searchParams.append("filter", `categories(id=${this.specificCategory})`), new Promise((e, a) => {
|
|
496
|
+
this.isLoading = !0, fetch(n.href).then((t) => t.json()).then((t) => {
|
|
497
|
+
this.gamesToShow = this.setUpGames(t == null ? void 0 : t.items), e(!0);
|
|
498
|
+
}).catch((t) => {
|
|
499
|
+
console.error(t), this.hasErrors = !0, a(t);
|
|
482
500
|
}).finally(() => {
|
|
483
501
|
this.isLoading = !1;
|
|
484
502
|
});
|
|
@@ -504,12 +522,12 @@ const w = () => {
|
|
|
504
522
|
}
|
|
505
523
|
animateGames() {
|
|
506
524
|
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();
|
|
507
|
-
const n = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), e = parseInt(n, 10),
|
|
508
|
-
|
|
509
|
-
|
|
525
|
+
const n = window.getComputedStyle(this.gameContainer).getPropertyValue("gap"), e = parseInt(n, 10), a = this.selectedGameEl.offsetWidth, t = this.gameContainer.offsetWidth, o = (a + e) * this.selectedGameIndex + // Width of game cards up to the selected
|
|
526
|
+
a / 2 - // Additional half card width to center to the selected game
|
|
527
|
+
t / 2, m = [
|
|
510
528
|
{ transform: "translateX(0px)", scale: 1 },
|
|
511
529
|
{ scale: 0.75 },
|
|
512
|
-
{ transform: `translateX(-${
|
|
530
|
+
{ transform: `translateX(-${o}px)`, scale: 1 }
|
|
513
531
|
], d = {
|
|
514
532
|
duration: 3e3,
|
|
515
533
|
easing: "cubic-bezier(0.5, 0, 0.5, 1.2)",
|
|
@@ -530,18 +548,18 @@ const w = () => {
|
|
|
530
548
|
});
|
|
531
549
|
}
|
|
532
550
|
renderGameDetails() {
|
|
533
|
-
return
|
|
551
|
+
return i("div", { class: "RandomButtonsWrapper" }, i("div", { class: "RandomGameDetails" }, i("span", { class: "RandomGameTitle" }, this.selectedGame.name), i("span", { class: "RandomGameInfo", onClick: () => this.showGameInfo() }, "i")), i("div", { class: "RandomButtons" }, i("button", { class: "RandomButton On", onClick: () => this.respin() }, s("spinRandomGame", this.language)), !this.launchByGameCard && i("button", { class: "RandomButton On", onClick: () => this.playGame() }, s("playNowRandomGame", this.language))));
|
|
534
552
|
}
|
|
535
553
|
render() {
|
|
536
554
|
if (this.hasErrors)
|
|
537
|
-
return
|
|
555
|
+
return i("div", { class: "RandomGameError" }, i("div", { class: "Title" }, s("error", this.language)));
|
|
538
556
|
if (this.isLoading)
|
|
539
|
-
return
|
|
557
|
+
return i("div", { class: "RandomGameLoading" }, i("div", { class: "Title" }, s("randomGameLoading", this.language)));
|
|
540
558
|
if (!this.isLoading)
|
|
541
|
-
return
|
|
559
|
+
return i("div", { class: "RandomGameWrapper" }, i("div", { class: "GameContainerGradient" }), i("div", { class: "GamesContainer", ref: (n) => this.gameContainer = n }, this.gamesToShow && this.gamesToShow.map((n, e) => i("div", { class: "RandomGameCard", key: e, onClick: this.launchByGameCard === "true" ? () => this.playGame() : null }, i("div", { class: "RandomGameVendor" }, n.vendor.name), i("img", { class: "RandomGameImage", src: n.thumbnail, alt: n.name, title: n.name }), this.selectedGame && this.selectedGameIndex === e && this.renderGameDetails()))), i("div", { class: `ButtonWrapper ${this.animationDone ? "HideAnimation" : ""}` }, i("div", { class: "ButtonContainer" }, this.iconVisibility && i("div", { class: `ButtonIcon ${this.animationStarted ? "Flip" : ""}` }, i("div", { class: "QustionMark" }, "?"), i("div", { class: "HexagonMarkShadow" }), i("div", { class: "HexagonMark" })), !this.animationStarted && i("div", { class: `RandomButton ${this.animationStarted ? "HideAnimation" : ""}`, onClick: () => this.playRandomGame() }, s("playRandomGame", this.language)))));
|
|
542
560
|
}
|
|
543
561
|
get host() {
|
|
544
|
-
return
|
|
562
|
+
return x(this);
|
|
545
563
|
}
|
|
546
564
|
static get watchers() {
|
|
547
565
|
return {
|
|
@@ -553,7 +571,7 @@ const w = () => {
|
|
|
553
571
|
};
|
|
554
572
|
}
|
|
555
573
|
};
|
|
556
|
-
|
|
574
|
+
C.style = k;
|
|
557
575
|
export {
|
|
558
|
-
|
|
576
|
+
C as casino_play_random_game
|
|
559
577
|
};
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
"use strict";var g=(n,e,a)=>new Promise((i,o)=>{var m=r=>{try{c(a.next(r))}catch(h){o(h)}},d=r=>{try{c(a.throw(r))}catch(h){o(h)}},c=r=>r.done?i(r.value):Promise.resolve(r.value).then(m,d);c((a=a.apply(n,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-47910d1c-CDXxJ6XN.cjs"),w=require("./app-globals-0f993ce5-sCt45RkC.cjs");var p=typeof document!="undefined"?document.currentScript:null,y=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:p&&p.tagName.toUpperCase()==="SCRIPT"&&p.src||new URL("stencil/casino-play-random-game-D5-NhS5J.cjs",document.baseURI).href,e={};return n!==""&&(e.resourcesUrl=new URL(".",n).href),t.promiseResolve(e)};y().then(n=>g(exports,null,function*(){return yield w.globalScripts(),t.bootstrapLazy([["casino-play-random-game",[[1,"casino-play-random-game",{endpoint:[513],datasource:[513],language:[513],specificCategory:[513,"specific-category"],iconVisible:[513,"icon-visible"],iconVisibleOnAnim:[513,"icon-visible-on-anim"],launchByGameCard:[513,"launch-by-game-card"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],gamesToShow:[32],selectedGame:[32],animationDone:[32],animationStarted:[32]},null,{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"]}]]]],n)}));const x=()=>{let n=window.navigator.userAgent;return n.toLowerCase().match(/android/i)?"Android":n.toLowerCase().match(/iphone/i)?"iPhone":n.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"},G="en",l={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:"Rasgele bir oyun oyna",playNowRandomGame:"Şimdi Oyna",spinRandomGame:"DEĞİŞTİR"}},u=n=>new Promise(e=>{fetch(n).then(a=>a.json()).then(a=>{Object.keys(a).forEach(i=>{l[i]||(l[i]={});for(let o in a[i])l[i][o]=a[i][o]}),e(!0)})}),s=(n,e)=>{const a=e;return l[a!==void 0&&a in l?a:G][n]},b=`:host {
|
|
2
|
+
display: block;
|
|
3
|
+
font-family: inherit;
|
|
4
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
5
|
+
transform: translate3d(0, 0, 0);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host * {
|
|
9
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
10
|
+
transform: translate3d(0, 0, 0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.RandomGameWrapper {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: var(--emw--size-4x-medium, 700px);
|
|
16
|
+
background: transparent;
|
|
17
|
+
position: relative;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.GameContainerGradient {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 10%;
|
|
24
|
+
left: -5px;
|
|
25
|
+
width: 100vw;
|
|
26
|
+
height: 80%;
|
|
27
|
+
background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.5) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.5) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
filter: blur(10px);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.GamesContainer {
|
|
34
|
+
display: flex;
|
|
35
|
+
height: var(--emw--size-4x-medium, 600px);
|
|
36
|
+
flex-direction: row;
|
|
37
|
+
flex-wrap: nowrap;
|
|
38
|
+
justify-content: flex-start;
|
|
39
|
+
align-items: center;
|
|
40
|
+
align-content: flex-start;
|
|
41
|
+
gap: var(--emw--spacing-large, 20px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.RandomGameCard {
|
|
45
|
+
position: relative;
|
|
46
|
+
width: var(--emw--size-3x-medium, 300px);
|
|
47
|
+
height: var(--emw--size-4x-medium, 420px);
|
|
48
|
+
border-radius: var(--emw--border-radius-large, 20px);
|
|
49
|
+
top: 8%;
|
|
50
|
+
filter: blur(5px);
|
|
51
|
+
}
|
|
52
|
+
.RandomGameCard .RandomGameVendor {
|
|
53
|
+
position: absolute;
|
|
54
|
+
font-size: var(--emw--font-size-x-small, 12px);
|
|
55
|
+
bottom: var(--emw--spacing-small-minus, 10px);
|
|
56
|
+
left: var(--emw--spacing-small-minus, 10px);
|
|
57
|
+
color: var(--emw--color-typography, #FFFFFF);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.TheRandomGame {
|
|
61
|
+
animation-name: ZoomFadeIn;
|
|
62
|
+
animation-duration: 0.5s;
|
|
63
|
+
animation-fill-mode: forwards;
|
|
64
|
+
-webkit-animation-name: ZoomFadeIn;
|
|
65
|
+
-webkit-animation-duration: 0.5s;
|
|
66
|
+
-webkit-animation-fill-mode: forwards;
|
|
67
|
+
opacity: 1;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
filter: blur(0);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.RandomGameImage {
|
|
73
|
+
width: inherit;
|
|
74
|
+
height: inherit;
|
|
75
|
+
object-fit: cover;
|
|
76
|
+
border-radius: var(--emw--border-radius-large, 20px);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.RandomGameDetails {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: row;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
align-items: center;
|
|
84
|
+
color: var(--emw--color-typography, #FFFFFF);
|
|
85
|
+
font-size: var(--emw--font-size-small, 14px);
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
|
+
.RandomGameDetails .RandomGameTitle {
|
|
89
|
+
line-height: 18px;
|
|
90
|
+
}
|
|
91
|
+
.RandomGameDetails .RandomGameInfo {
|
|
92
|
+
border-radius: 50%;
|
|
93
|
+
width: var(--emw--spacing-medium, 16px);
|
|
94
|
+
height: var(--emw--spacing-medium, 16px);
|
|
95
|
+
font-size: var(--emw--font-size-x-small, 12px);
|
|
96
|
+
font-weight: var(--emw--font-weight-normal, 400);
|
|
97
|
+
border: solid 1px var(--emw--color-typography, #FFFFFF);
|
|
98
|
+
text-align: center;
|
|
99
|
+
margin: var(--emw--spacing-2x-small, 4px) 0;
|
|
100
|
+
line-height: 14px;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
}
|
|
103
|
+
.RandomGameDetails .RandomGamePlay {
|
|
104
|
+
background: var(--emw--color-primary, #4bd004);
|
|
105
|
+
color: var(--emw--color-typography, #FFFFFF);
|
|
106
|
+
border: none;
|
|
107
|
+
border-radius: var(--emw--border-radius-medium, 5px);
|
|
108
|
+
width: 200px;
|
|
109
|
+
height: 40px;
|
|
110
|
+
font-size: var(--emw--font-size-small, 14px);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ButtonWrapper {
|
|
115
|
+
position: absolute;
|
|
116
|
+
top: 50%;
|
|
117
|
+
left: 50%;
|
|
118
|
+
transform: translate(-50%, -50%);
|
|
119
|
+
z-index: 20;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ButtonContainer {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
align-items: center;
|
|
127
|
+
gap: 10px;
|
|
128
|
+
width: 100%;
|
|
129
|
+
position: relative;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ButtonIcon {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: var(--emw--spacing-2x-small, 5px);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.QustionMark {
|
|
141
|
+
position: absolute;
|
|
142
|
+
font-family: sans-serif;
|
|
143
|
+
font-size: 120px;
|
|
144
|
+
font-weight: 900;
|
|
145
|
+
color: color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 10%);
|
|
146
|
+
text-shadow: 0px 12px 0px color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 50%);
|
|
147
|
+
left: 50%;
|
|
148
|
+
top: -20%;
|
|
149
|
+
transform: translateX(-50%);
|
|
150
|
+
z-index: 10;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.HexagonMarkShadow {
|
|
154
|
+
width: 100px;
|
|
155
|
+
height: 115px;
|
|
156
|
+
display: flex;
|
|
157
|
+
justify-content: center;
|
|
158
|
+
align-items: center;
|
|
159
|
+
background: color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 70%);
|
|
160
|
+
clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.HexagonMark {
|
|
164
|
+
position: absolute;
|
|
165
|
+
width: var(--emw--size-medium, 90px);
|
|
166
|
+
height: 105px;
|
|
167
|
+
background: linear-gradient(to bottom, color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 20%) 0%, var(--emw--categories-color-secondary, var(--emw--color-secondary, #eeac4a)) 100%);
|
|
168
|
+
clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.RandomButtons {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: row;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: var(--emw--spacing-2x-small, 5px);
|
|
177
|
+
width: 100%;
|
|
178
|
+
position: relative;
|
|
179
|
+
z-index: 10;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.RandomButton {
|
|
183
|
+
font-size: var(--emw--font-size-large, 20px);
|
|
184
|
+
text-transform: uppercase;
|
|
185
|
+
width: max-content;
|
|
186
|
+
border-radius: var(--emw--button-border-radius, 50px);
|
|
187
|
+
padding: var(--emw--spacing-large, 20px) var(--emw--spacing-2x-large, 40px);
|
|
188
|
+
border: solid 3px var(--emw--button-border-color, #063B17);
|
|
189
|
+
color: var(--emw--button-text-color, #FFFFFF);
|
|
190
|
+
opacity: 1;
|
|
191
|
+
animation: ButtonEffect 3s linear infinite;
|
|
192
|
+
background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));
|
|
193
|
+
background-size: 300% 100%;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
position: relative;
|
|
196
|
+
z-index: 10;
|
|
197
|
+
}
|
|
198
|
+
.RandomButton:hover {
|
|
199
|
+
opacity: 0.8;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.HideAnimation {
|
|
203
|
+
filter: blur(5px);
|
|
204
|
+
animation: AnimateButton 0.2s forwards;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.Flip {
|
|
208
|
+
animation-name: Flip, Blur;
|
|
209
|
+
animation-duration: 0.75s, 3s;
|
|
210
|
+
animation-iteration-count: infinite, 1;
|
|
211
|
+
-webkit-animation-name: Flip, Blur;
|
|
212
|
+
-webkit-animation-duration: 0.75s, 3s;
|
|
213
|
+
-webkit-animation-iteration-count: infinite, 1;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@keyframes ButtonEffect {
|
|
217
|
+
0% {
|
|
218
|
+
background-position: 0% 50%;
|
|
219
|
+
}
|
|
220
|
+
33% {
|
|
221
|
+
background-position: 100% 50%;
|
|
222
|
+
}
|
|
223
|
+
66% {
|
|
224
|
+
background-position: 200% 50%;
|
|
225
|
+
}
|
|
226
|
+
100% {
|
|
227
|
+
background-position: 300% 50%;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
@keyframes ZoomFadeIn {
|
|
231
|
+
0% {
|
|
232
|
+
transform: scale(0.2) translateY(0);
|
|
233
|
+
filter: blur(5px);
|
|
234
|
+
opacity: 0.3;
|
|
235
|
+
}
|
|
236
|
+
50% {
|
|
237
|
+
transform: scale(1.1) translateY(-30px);
|
|
238
|
+
filter: blur(2px);
|
|
239
|
+
opacity: 0.7;
|
|
240
|
+
}
|
|
241
|
+
100% {
|
|
242
|
+
transform: scale(1) translateY(-30px);
|
|
243
|
+
filter: blur(0px);
|
|
244
|
+
opacity: 1;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
@keyframes AnimateButton {
|
|
248
|
+
0% {
|
|
249
|
+
opacity: 0.7;
|
|
250
|
+
}
|
|
251
|
+
50% {
|
|
252
|
+
opacity: 0.4;
|
|
253
|
+
}
|
|
254
|
+
100% {
|
|
255
|
+
opacity: 0;
|
|
256
|
+
display: none;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
@keyframes Flip {
|
|
260
|
+
0% {
|
|
261
|
+
transform: rotateY(0deg);
|
|
262
|
+
}
|
|
263
|
+
50% {
|
|
264
|
+
transform: rotateY(180deg);
|
|
265
|
+
}
|
|
266
|
+
100% {
|
|
267
|
+
transform: rotateY(360deg);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
@keyframes Blur {
|
|
271
|
+
0% {
|
|
272
|
+
filter: blur(0);
|
|
273
|
+
}
|
|
274
|
+
50% {
|
|
275
|
+
filter: blur(1px);
|
|
276
|
+
}
|
|
277
|
+
100% {
|
|
278
|
+
filter: blur(3px);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
@container (max-width: 475px) {
|
|
282
|
+
.GamesContainer {
|
|
283
|
+
height: inherit;
|
|
284
|
+
gap: var(--emw--spacing-2x-small, 5px);
|
|
285
|
+
}
|
|
286
|
+
.RandomGameWrapper {
|
|
287
|
+
width: 100%;
|
|
288
|
+
height: 300px;
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
background: transparent;
|
|
291
|
+
position: relative;
|
|
292
|
+
}
|
|
293
|
+
.GameContainerGradient {
|
|
294
|
+
position: absolute;
|
|
295
|
+
top: 10%;
|
|
296
|
+
left: -5px;
|
|
297
|
+
width: 100vw;
|
|
298
|
+
height: 80%;
|
|
299
|
+
background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.2) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.2) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);
|
|
300
|
+
pointer-events: none;
|
|
301
|
+
z-index: 1;
|
|
302
|
+
filter: blur(5px);
|
|
303
|
+
}
|
|
304
|
+
.RandomGameCard {
|
|
305
|
+
width: 100px;
|
|
306
|
+
height: 150px;
|
|
307
|
+
top: 0%;
|
|
308
|
+
border-radius: var(--emw--border-radius-medium, 4px);
|
|
309
|
+
filter: blur(5px);
|
|
310
|
+
}
|
|
311
|
+
.RandomGameImage {
|
|
312
|
+
width: 102px;
|
|
313
|
+
height: inherit;
|
|
314
|
+
top: 0%;
|
|
315
|
+
}
|
|
316
|
+
.RandomGameDetails {
|
|
317
|
+
font-size: 14px;
|
|
318
|
+
width: 100%;
|
|
319
|
+
}
|
|
320
|
+
.RandomGameDetails .RandomGameTitle {
|
|
321
|
+
line-height: 18px;
|
|
322
|
+
width: 75%;
|
|
323
|
+
}
|
|
324
|
+
.RandomGameDetails .RandomGameInfo {
|
|
325
|
+
border-radius: 50%;
|
|
326
|
+
width: 16px;
|
|
327
|
+
height: 16px;
|
|
328
|
+
font-size: var(--emw--font-size-x-small, 12px);
|
|
329
|
+
line-height: 14px;
|
|
330
|
+
}
|
|
331
|
+
.RandomGameDetails .RandomGamePlay {
|
|
332
|
+
background: var(--emw--color-primary, #52d004);
|
|
333
|
+
color: var(--emw--color-typography, #FFFFFF);
|
|
334
|
+
border: none;
|
|
335
|
+
border-radius: 5px;
|
|
336
|
+
width: 200px;
|
|
337
|
+
height: 40px;
|
|
338
|
+
font-size: 14px;
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
}
|
|
341
|
+
.RandomGameCard .RandomGameVendor {
|
|
342
|
+
font-size: var(--emw--font-size-x-small, 12px);
|
|
343
|
+
bottom: 5px;
|
|
344
|
+
right: 5px;
|
|
345
|
+
}
|
|
346
|
+
.RandomButtons {
|
|
347
|
+
display: flex;
|
|
348
|
+
flex-direction: column;
|
|
349
|
+
justify-content: center;
|
|
350
|
+
align-items: center;
|
|
351
|
+
gap: 5px;
|
|
352
|
+
width: 100%;
|
|
353
|
+
}
|
|
354
|
+
.RandomButton {
|
|
355
|
+
font-size: var(--emw--font-size-x-small, 12px);
|
|
356
|
+
padding: 10px 15px;
|
|
357
|
+
border: solid 1px var(--emw--button-border-color, #063B17);
|
|
358
|
+
}
|
|
359
|
+
.QustionMark {
|
|
360
|
+
font-size: 100px;
|
|
361
|
+
font-weight: 700;
|
|
362
|
+
}
|
|
363
|
+
.HexagonMarkShadow {
|
|
364
|
+
width: 80px;
|
|
365
|
+
height: 95px;
|
|
366
|
+
}
|
|
367
|
+
.HexagonMark {
|
|
368
|
+
width: 70px;
|
|
369
|
+
height: 85px;
|
|
370
|
+
}
|
|
371
|
+
}`,v=b,f=class{constructor(n){t.registerInstance(this,n),this.language="en",this.specificCategory="",this.iconVisible="",this.iconVisibleOnAnim="",this.launchByGameCard="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.hasErrors=!1,this.limitStylingAppends=!1,this.isLoading=!0,this.selectedGame=null,this.animationDone=!1,this.animationStarted=!1,this.animation=null,this.selectedGameIndex=null,this.selectedGameEl=null,this.iconVisibility=null,this.shuffle=e=>{let a=e.length,i;for(;a!==0;)i=Math.floor(Math.random()*a),a--,[e[a],e[i]]=[e[i],e[a]];return e},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(e.href).then(i=>i.text()).then(i=>{a.innerHTML=i,this.clientStyling=i,setTimeout(()=>{this.host.shadowRoot.prepend(a)},1)})}}watchEndpoint(n,e){n&&n!=e&&this.endpoint&&this.fetchGameList()}handleNewTranslations(){this.isLoading=!0,u(this.translationUrl).then(()=>{this.isLoading=!1})}handleIsIconVisible(){this.iconVisibility=this.iconVisible==="true"}connectedCallback(){this.handleIsIconVisible()}componentWillLoad(){if(this.translationUrl.length>2&&u(this.translationUrl),this.endpoint&&this.language&&this.datasource)return this.fetchGameList()}componentDidLoad(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}fetchGameList(){let n=new URL(`${this.endpoint}/v1/casino/games`);return n.searchParams.append("platform",x()),n.searchParams.append("datasource",this.datasource),n.searchParams.append("fields","gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"),n.searchParams.append("expand","vendor"),n.searchParams.append("pagination","offset=0,limit=423"),n.searchParams.append("language",this.language),this.specificCategory&&n.searchParams.append("filter",`categories(id=${this.specificCategory})`),new Promise((e,a)=>{this.isLoading=!0,fetch(n.href).then(i=>i.json()).then(i=>{this.gamesToShow=this.setUpGames(i==null?void 0:i.items),e(!0)}).catch(i=>{console.error(i),this.hasErrors=!0,a(i)}).finally(()=>{this.isLoading=!1})})}setUpGames(n){const e=this.shuffle(n).slice(0,40);return e.concat(e)}selectRandomGame(){const n=this.gamesToShow.length/2;this.selectedGameIndex=Math.floor(Math.random()*(n-3)),this.selectedGameIndex+=n,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 n=window.getComputedStyle(this.gameContainer).getPropertyValue("gap"),e=parseInt(n,10),a=this.selectedGameEl.offsetWidth,i=this.gameContainer.offsetWidth,o=(a+e)*this.selectedGameIndex+a/2-i/2,m=[{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${o}px)`,scale:1}],d={duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"};this.animation=this.gameContainer.animate(m,d),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 t.h("div",{class:"RandomButtonsWrapper"},t.h("div",{class:"RandomGameDetails"},t.h("span",{class:"RandomGameTitle"},this.selectedGame.name),t.h("span",{class:"RandomGameInfo",onClick:()=>this.showGameInfo()},"i")),t.h("div",{class:"RandomButtons"},t.h("button",{class:"RandomButton On",onClick:()=>this.respin()},s("spinRandomGame",this.language)),!this.launchByGameCard&&t.h("button",{class:"RandomButton On",onClick:()=>this.playGame()},s("playNowRandomGame",this.language))))}render(){if(this.hasErrors)return t.h("div",{class:"RandomGameError"},t.h("div",{class:"Title"},s("error",this.language)));if(this.isLoading)return t.h("div",{class:"RandomGameLoading"},t.h("div",{class:"Title"},s("randomGameLoading",this.language)));if(!this.isLoading)return t.h("div",{class:"RandomGameWrapper"},t.h("div",{class:"GameContainerGradient"}),t.h("div",{class:"GamesContainer",ref:n=>this.gameContainer=n},this.gamesToShow&&this.gamesToShow.map((n,e)=>t.h("div",{class:"RandomGameCard",key:e,onClick:this.launchByGameCard==="true"?()=>this.playGame():null},t.h("div",{class:"RandomGameVendor"},n.vendor.name),t.h("img",{class:"RandomGameImage",src:n.thumbnail,alt:n.name,title:n.name}),this.selectedGame&&this.selectedGameIndex===e&&this.renderGameDetails()))),t.h("div",{class:`ButtonWrapper ${this.animationDone?"HideAnimation":""}`},t.h("div",{class:"ButtonContainer"},this.iconVisibility&&t.h("div",{class:`ButtonIcon ${this.animationStarted?"Flip":""}`},t.h("div",{class:"QustionMark"},"?"),t.h("div",{class:"HexagonMarkShadow"}),t.h("div",{class:"HexagonMark"})),!this.animationStarted&&t.h("div",{class:`RandomButton ${this.animationStarted?"HideAnimation":""}`,onClick:()=>this.playRandomGame()},s("playRandomGame",this.language)))))}get host(){return t.getElement(this)}static get watchers(){return{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"]}}};f.style=v;exports.casino_play_random_game=f;
|