@everymatrix/casino-header-controller-nd 1.54.6 → 1.54.8
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/{CasinoHamburgerMenuNd-CkPg6ouB.js → CasinoHamburgerMenuNd-BN4YipjD.js} +829 -837
- package/components/CasinoHamburgerMenuNd-BRXAq9EB.js +5463 -0
- package/components/CasinoHamburgerMenuNd-DWivJdEW.cjs +5 -0
- package/components/CasinoHeaderControllerNd-Bcge1xWm.cjs +1 -0
- package/components/{CasinoHeaderControllerNd-BX0AvD48.js → CasinoHeaderControllerNd-DB6p0pM9.js} +85 -85
- package/components/CasinoHeaderControllerNd-y-KHL_bQ.js +2168 -0
- package/components/{PlayerAccountBalanceModalNd-K5u0ko-m.js → PlayerAccountBalanceModalNd-Cx1wys48.js} +93 -93
- package/components/PlayerAccountBalanceModalNd-DijTlCAM.js +1586 -0
- package/components/PlayerAccountBalanceModalNd-LPAeUZ5O.cjs +13 -0
- package/components/{PlayerDeposit-DsOspOgB.js → PlayerDeposit-DJtyV372.js} +46 -46
- package/components/PlayerDeposit-Dlc74zh3.js +395 -0
- package/components/PlayerDeposit-oYFoY9mr.cjs +1 -0
- package/es2015/casino-header-controller-nd.cjs +1 -0
- package/es2015/casino-header-controller-nd.js +16 -0
- package/esnext/casino-header-controller-nd.js +1 -1
- package/package.json +4 -1
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
- package/stencil/{gamification-dropdown-Rl66gqyp.js → gamification-dropdown-DSXwe6wL.js} +1 -1
- package/stencil/gamification-dropdown-DXwjfRK6.js +25 -0
- package/stencil/gamification-dropdown-DxQYaq9A.cjs +1 -0
- package/stencil/gamification-dropdown-dc081799-DhEx3oAW.js +121 -0
- package/stencil/{gamification-dropdown-ae7b7c69-C61VnAKy.js → gamification-dropdown-dc081799-DwwONu50.js} +1 -1
- package/stencil/gamification-dropdown-dc081799-grwre2mR.cjs +1 -0
- package/stencil/gamification-dropdown_4-DMyo0Cai.js +468 -0
- package/stencil/gamification-dropdown_4-Js76nmRP.cjs +192 -0
- package/stencil/{gamification-dropdown_4-AbKMnPZ5.js → gamification-dropdown_4-xIuhYShe.js} +3 -3
- package/stencil/index-5e36ea65-BYsPysDo.cjs +1 -0
- package/stencil/index-5e36ea65-COdY7Qod.js +859 -0
- package/stencil/index-5e36ea65-DT7tZRpo.js +832 -0
- package/stencil/{player-elevate-card-B4AMnqub.js → player-elevate-card-BcvihY18.js} +2 -2
- package/stencil/player-elevate-card-Ci_xja9l.js +105 -0
- package/stencil/player-elevate-card-DOMKpcd1.cjs +64 -0
- package/stencil/player-elevate-card-items-2a1dc5b5-B3hUJxjm.cjs +1 -0
- package/stencil/{player-elevate-card-items-9d490a3b-BxciIvXh.js → player-elevate-card-items-2a1dc5b5-R0FZQK7I.js} +1 -3
- package/stencil/player-elevate-card-items-2a1dc5b5-e_chraGM.js +1439 -0
- package/stencil/{player-elevate-pointcard-BeXukLE-.js → player-elevate-pointcard-BLdrrwJF.js} +2 -2
- package/stencil/player-elevate-pointcard-CZiVmETE.js +43 -0
- package/stencil/player-elevate-pointcard-DdN-6RUK.cjs +1 -0
- package/stencil/index-ea7720e4-FqoOOnHW.js +0 -826
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import { b as V, $ as X, S as Z, i as J, s as $, f as b, d as ee, z as H, g as S, D as L, M as P, m as T, n as p, p as _, q as E, E as C, r as d, v as te, I as ie, w as ae, o as se, F as M, A as re, B as z, c as ne, K as oe } from "./CasinoHamburgerMenuNd-BRXAq9EB.js";
|
|
2
|
+
function W(a, e) {
|
|
3
|
+
V(a, e);
|
|
4
|
+
}
|
|
5
|
+
function le(a) {
|
|
6
|
+
X.set(a);
|
|
7
|
+
}
|
|
8
|
+
const j = {
|
|
9
|
+
en: {
|
|
10
|
+
titleDeposit: "Deposit",
|
|
11
|
+
loading: "Loading, please wait ..."
|
|
12
|
+
},
|
|
13
|
+
"zh-hk": {
|
|
14
|
+
titleDeposit: "訂金",
|
|
15
|
+
loading: "加載請稍候…"
|
|
16
|
+
},
|
|
17
|
+
fr: {
|
|
18
|
+
titleDeposit: "Dépôt",
|
|
19
|
+
loading: "Chargement, veuillez patienter ..."
|
|
20
|
+
},
|
|
21
|
+
tr: {
|
|
22
|
+
titleDeposit: "PARA YATIR",
|
|
23
|
+
loading: "Yükleniyor ..."
|
|
24
|
+
},
|
|
25
|
+
ro: {
|
|
26
|
+
titleDeposit: "Depunere",
|
|
27
|
+
loading: "Se încarcă..."
|
|
28
|
+
},
|
|
29
|
+
es: {
|
|
30
|
+
titleDeposit: "Deposita",
|
|
31
|
+
loading: "Cargando ..."
|
|
32
|
+
},
|
|
33
|
+
pt: {
|
|
34
|
+
titleDeposit: "Depósito",
|
|
35
|
+
loading: "Carregando, por favor espere ..."
|
|
36
|
+
},
|
|
37
|
+
hr: {
|
|
38
|
+
titleDeposit: "Uplata",
|
|
39
|
+
loading: "Učitavanje"
|
|
40
|
+
},
|
|
41
|
+
"pt-br": {
|
|
42
|
+
titleDeposit: "Depositar",
|
|
43
|
+
Loading: "Carregando, por favor espere..."
|
|
44
|
+
},
|
|
45
|
+
"es-mx": {
|
|
46
|
+
titleDeposit: "Depositar",
|
|
47
|
+
Loading: "Cargando, por favor espere..."
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
function ce(a) {
|
|
51
|
+
ee(a, "svelte-lvm6lo", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
|
|
52
|
+
}
|
|
53
|
+
function de(a) {
|
|
54
|
+
let e, i, n, s, l, m, c, u, y, o, r = (
|
|
55
|
+
/*$_*/
|
|
56
|
+
a[4]("titleDeposit") + ""
|
|
57
|
+
), h, D, v;
|
|
58
|
+
return {
|
|
59
|
+
c() {
|
|
60
|
+
e = _("div"), i = M("svg"), n = M("defs"), s = M("style"), l = C(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = M("g"), c = M("g"), u = M("path"), y = E(), o = _("h2"), h = C(r), d(u, "class", "aaa"), d(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(u, "transform", "translate(15 15) rotate(180)"), d(c, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "15"), d(i, "viewBox", "0 0 15 15"), d(o, "class", "DepositTitleMobile"), d(e, "class", "MenuReturnButton");
|
|
61
|
+
},
|
|
62
|
+
m(g, k) {
|
|
63
|
+
T(g, e, k), p(e, i), p(i, n), p(n, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h), D || (v = se(
|
|
64
|
+
e,
|
|
65
|
+
"click",
|
|
66
|
+
/*click_handler*/
|
|
67
|
+
a[17]
|
|
68
|
+
), D = !0);
|
|
69
|
+
},
|
|
70
|
+
p(g, k) {
|
|
71
|
+
k & /*$_*/
|
|
72
|
+
16 && r !== (r = /*$_*/
|
|
73
|
+
g[4]("titleDeposit") + "") && L(h, r);
|
|
74
|
+
},
|
|
75
|
+
d(g) {
|
|
76
|
+
g && S(e), D = !1, v();
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function he(a) {
|
|
81
|
+
let e, i, n;
|
|
82
|
+
return {
|
|
83
|
+
c() {
|
|
84
|
+
e = _("div"), i = _("iframe"), z(i.src, n = /*iframeUrl*/
|
|
85
|
+
a[3]) || d(i, "src", n), d(i, "title", "Deposit Iframe"), d(e, "class", "DepositIframeWrapper");
|
|
86
|
+
},
|
|
87
|
+
m(s, l) {
|
|
88
|
+
T(s, e, l), p(e, i);
|
|
89
|
+
},
|
|
90
|
+
p(s, l) {
|
|
91
|
+
l & /*iframeUrl*/
|
|
92
|
+
8 && !z(i.src, n = /*iframeUrl*/
|
|
93
|
+
s[3]) && d(i, "src", n);
|
|
94
|
+
},
|
|
95
|
+
d(s) {
|
|
96
|
+
s && S(e);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function pe(a) {
|
|
101
|
+
let e, i = (
|
|
102
|
+
/*$_*/
|
|
103
|
+
a[4]("loading") + ""
|
|
104
|
+
), n;
|
|
105
|
+
return {
|
|
106
|
+
c() {
|
|
107
|
+
e = _("p"), n = C(i);
|
|
108
|
+
},
|
|
109
|
+
m(s, l) {
|
|
110
|
+
T(s, e, l), p(e, n);
|
|
111
|
+
},
|
|
112
|
+
p(s, l) {
|
|
113
|
+
l & /*$_*/
|
|
114
|
+
16 && i !== (i = /*$_*/
|
|
115
|
+
s[4]("loading") + "") && L(n, i);
|
|
116
|
+
},
|
|
117
|
+
d(s) {
|
|
118
|
+
s && S(e);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function ue(a) {
|
|
123
|
+
let e, i, n, s = (
|
|
124
|
+
/*$_*/
|
|
125
|
+
a[4]("titleDeposit") + ""
|
|
126
|
+
), l, m, c = (
|
|
127
|
+
/*isMobile*/
|
|
128
|
+
a[5] && de(a)
|
|
129
|
+
);
|
|
130
|
+
function u(r, h) {
|
|
131
|
+
return (
|
|
132
|
+
/*isLoading*/
|
|
133
|
+
r[1] ? pe : he
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
let y = u(a), o = y(a);
|
|
137
|
+
return {
|
|
138
|
+
c() {
|
|
139
|
+
e = _("div"), c && c.c(), i = E(), n = _("h2"), l = C(s), m = E(), o.c(), d(n, "class", "DepositTitle " + /*isMobile*/
|
|
140
|
+
(a[5] ? "DepositTitleNone" : "")), d(e, "class", "DepositWrapper " + /*isMobile*/
|
|
141
|
+
(a[5] ? "DepositWrapperMobile" : "")), P(
|
|
142
|
+
e,
|
|
143
|
+
"--dynamic-height",
|
|
144
|
+
/*dynamicHeight*/
|
|
145
|
+
a[2]
|
|
146
|
+
);
|
|
147
|
+
},
|
|
148
|
+
m(r, h) {
|
|
149
|
+
T(r, e, h), c && c.m(e, null), p(e, i), p(e, n), p(n, l), p(e, m), o.m(e, null), a[18](e);
|
|
150
|
+
},
|
|
151
|
+
p(r, [h]) {
|
|
152
|
+
/*isMobile*/
|
|
153
|
+
r[5] && c.p(r, h), h & /*$_*/
|
|
154
|
+
16 && s !== (s = /*$_*/
|
|
155
|
+
r[4]("titleDeposit") + "") && L(l, s), y === (y = u(r)) && o ? o.p(r, h) : (o.d(1), o = y(r), o && (o.c(), o.m(e, null))), h & /*dynamicHeight*/
|
|
156
|
+
4 && P(
|
|
157
|
+
e,
|
|
158
|
+
"--dynamic-height",
|
|
159
|
+
/*dynamicHeight*/
|
|
160
|
+
r[2]
|
|
161
|
+
);
|
|
162
|
+
},
|
|
163
|
+
i: H,
|
|
164
|
+
o: H,
|
|
165
|
+
d(r) {
|
|
166
|
+
r && S(e), c && c.d(), o.d(), a[18](null);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function ge(a, e, i) {
|
|
171
|
+
let n, s;
|
|
172
|
+
te(a, oe, (t) => i(4, s = t));
|
|
173
|
+
let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: r = "" } = e, { translationurl: h = "" } = e, { playercurrency: D = "" } = e, { shortcashierenabled: v = "false" } = e, g, k = window.navigator.userAgent, R = ie(k) !== "PC", B = !0, F, x = 0, I = "";
|
|
174
|
+
const G = () => {
|
|
175
|
+
fetch(h).then((w) => w.json()).then((w) => {
|
|
176
|
+
Object.keys(w).forEach((f) => {
|
|
177
|
+
W(f, w[f]);
|
|
178
|
+
});
|
|
179
|
+
}).catch((w) => {
|
|
180
|
+
console.log(w);
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
Object.keys(j).forEach((t) => {
|
|
184
|
+
W(t, j[t]);
|
|
185
|
+
});
|
|
186
|
+
const U = () => {
|
|
187
|
+
window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
|
|
188
|
+
}, A = (t) => {
|
|
189
|
+
if (t.data) {
|
|
190
|
+
switch (t.data.type) {
|
|
191
|
+
case "ProfileDetailsData":
|
|
192
|
+
i(7, D = t.data.profileDetails.currency);
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
switch (t.data["MMFE:setQuickDepositHeight"] && i(2, F = t.data["MMFE:setQuickDepositHeight"].toString() + "px"), t.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), t.data.redirect) {
|
|
196
|
+
case "mm-hc-casino":
|
|
197
|
+
window.postMessage({ type: "GoToCasino" }, window.location.href);
|
|
198
|
+
break;
|
|
199
|
+
case "mm-hc-sports":
|
|
200
|
+
window.postMessage({ type: "GoToSports" }, window.location.href);
|
|
201
|
+
break;
|
|
202
|
+
case "mm-hc-contact":
|
|
203
|
+
window.postMessage({ type: "GoToCustomerSupport" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href);
|
|
204
|
+
break;
|
|
205
|
+
case "mm-hc-back-to-merchant":
|
|
206
|
+
window.postMessage({ type: "GoToHomepage" }, window.location.href);
|
|
207
|
+
break;
|
|
208
|
+
case "mm-wm-hc-init-deposit":
|
|
209
|
+
window.postMessage(
|
|
210
|
+
{
|
|
211
|
+
type: "RedirectWithdrawDepositCloseModal"
|
|
212
|
+
},
|
|
213
|
+
window.location.href
|
|
214
|
+
);
|
|
215
|
+
break;
|
|
216
|
+
case "mm-wm-hc-init-deposit-quick":
|
|
217
|
+
window.postMessage({ type: "CloseShortCashier" }, window.location.href);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}, N = () => {
|
|
222
|
+
let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
|
|
223
|
+
if (t.searchParams.append("language", u), n && t.searchParams.append("isShortCashier", v), y)
|
|
224
|
+
switch (D) {
|
|
225
|
+
case "USD":
|
|
226
|
+
x = 0.4;
|
|
227
|
+
break;
|
|
228
|
+
case "CDF":
|
|
229
|
+
x = 1e3;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
let w = {
|
|
233
|
+
method: "POST",
|
|
234
|
+
headers: {
|
|
235
|
+
"X-SessionId": m,
|
|
236
|
+
currency: D || "EUR",
|
|
237
|
+
amount: x,
|
|
238
|
+
cashierMode: "Default",
|
|
239
|
+
IsShortCashier: v,
|
|
240
|
+
accept: "application/json"
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
fetch(t.href, w).then((f) => f.json()).then(
|
|
244
|
+
(f) => {
|
|
245
|
+
i(1, B = !1), i(3, I = f.CashierUrl);
|
|
246
|
+
},
|
|
247
|
+
(f) => {
|
|
248
|
+
console.error(f);
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
}, q = () => {
|
|
252
|
+
le(u);
|
|
253
|
+
}, O = () => {
|
|
254
|
+
let t = document.createElement("style");
|
|
255
|
+
t.innerHTML = o, g.appendChild(t);
|
|
256
|
+
}, Q = () => {
|
|
257
|
+
let t = new URL(r), w = document.createElement("style");
|
|
258
|
+
fetch(t.href).then((f) => f.text()).then((f) => {
|
|
259
|
+
w.innerHTML = f, setTimeout(
|
|
260
|
+
() => {
|
|
261
|
+
g.appendChild(w);
|
|
262
|
+
},
|
|
263
|
+
1
|
|
264
|
+
);
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
ae(() => (window.addEventListener("message", A, !1), () => {
|
|
268
|
+
window.removeEventListener("message", A);
|
|
269
|
+
}));
|
|
270
|
+
const Y = () => U();
|
|
271
|
+
function K(t) {
|
|
272
|
+
re[t ? "unshift" : "push"](() => {
|
|
273
|
+
g = t, i(0, g);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
return a.$$set = (t) => {
|
|
277
|
+
"endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, r = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7, D = t.playercurrency), "shortcashierenabled" in t && i(16, v = t.shortcashierenabled);
|
|
278
|
+
}, a.$$.update = () => {
|
|
279
|
+
a.$$.dirty & /*lang*/
|
|
280
|
+
2048 && u && q(), a.$$.dirty & /*shortcashierenabled*/
|
|
281
|
+
65536 && (n = v.toLocaleLowerCase() === "true"), a.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
282
|
+
16385 && r && g && Q(), a.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
283
|
+
8193 && o && g && O(), a.$$.dirty & /*translationurl*/
|
|
284
|
+
32768 && h && G(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
|
|
285
|
+
69504 && m && c && l && D && u && v && N();
|
|
286
|
+
}, [
|
|
287
|
+
g,
|
|
288
|
+
B,
|
|
289
|
+
F,
|
|
290
|
+
I,
|
|
291
|
+
s,
|
|
292
|
+
R,
|
|
293
|
+
U,
|
|
294
|
+
D,
|
|
295
|
+
l,
|
|
296
|
+
m,
|
|
297
|
+
c,
|
|
298
|
+
u,
|
|
299
|
+
y,
|
|
300
|
+
o,
|
|
301
|
+
r,
|
|
302
|
+
h,
|
|
303
|
+
v,
|
|
304
|
+
Y,
|
|
305
|
+
K
|
|
306
|
+
];
|
|
307
|
+
}
|
|
308
|
+
class me extends Z {
|
|
309
|
+
constructor(e) {
|
|
310
|
+
super(), J(
|
|
311
|
+
this,
|
|
312
|
+
e,
|
|
313
|
+
ge,
|
|
314
|
+
ue,
|
|
315
|
+
$,
|
|
316
|
+
{
|
|
317
|
+
endpoint: 8,
|
|
318
|
+
session: 9,
|
|
319
|
+
playerid: 10,
|
|
320
|
+
lang: 11,
|
|
321
|
+
hasdefaultamount: 12,
|
|
322
|
+
clientstyling: 13,
|
|
323
|
+
clientstylingurl: 14,
|
|
324
|
+
translationurl: 15,
|
|
325
|
+
playercurrency: 7,
|
|
326
|
+
shortcashierenabled: 16
|
|
327
|
+
},
|
|
328
|
+
ce
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
get endpoint() {
|
|
332
|
+
return this.$$.ctx[8];
|
|
333
|
+
}
|
|
334
|
+
set endpoint(e) {
|
|
335
|
+
this.$$set({ endpoint: e }), b();
|
|
336
|
+
}
|
|
337
|
+
get session() {
|
|
338
|
+
return this.$$.ctx[9];
|
|
339
|
+
}
|
|
340
|
+
set session(e) {
|
|
341
|
+
this.$$set({ session: e }), b();
|
|
342
|
+
}
|
|
343
|
+
get playerid() {
|
|
344
|
+
return this.$$.ctx[10];
|
|
345
|
+
}
|
|
346
|
+
set playerid(e) {
|
|
347
|
+
this.$$set({ playerid: e }), b();
|
|
348
|
+
}
|
|
349
|
+
get lang() {
|
|
350
|
+
return this.$$.ctx[11];
|
|
351
|
+
}
|
|
352
|
+
set lang(e) {
|
|
353
|
+
this.$$set({ lang: e }), b();
|
|
354
|
+
}
|
|
355
|
+
get hasdefaultamount() {
|
|
356
|
+
return this.$$.ctx[12];
|
|
357
|
+
}
|
|
358
|
+
set hasdefaultamount(e) {
|
|
359
|
+
this.$$set({ hasdefaultamount: e }), b();
|
|
360
|
+
}
|
|
361
|
+
get clientstyling() {
|
|
362
|
+
return this.$$.ctx[13];
|
|
363
|
+
}
|
|
364
|
+
set clientstyling(e) {
|
|
365
|
+
this.$$set({ clientstyling: e }), b();
|
|
366
|
+
}
|
|
367
|
+
get clientstylingurl() {
|
|
368
|
+
return this.$$.ctx[14];
|
|
369
|
+
}
|
|
370
|
+
set clientstylingurl(e) {
|
|
371
|
+
this.$$set({ clientstylingurl: e }), b();
|
|
372
|
+
}
|
|
373
|
+
get translationurl() {
|
|
374
|
+
return this.$$.ctx[15];
|
|
375
|
+
}
|
|
376
|
+
set translationurl(e) {
|
|
377
|
+
this.$$set({ translationurl: e }), b();
|
|
378
|
+
}
|
|
379
|
+
get playercurrency() {
|
|
380
|
+
return this.$$.ctx[7];
|
|
381
|
+
}
|
|
382
|
+
set playercurrency(e) {
|
|
383
|
+
this.$$set({ playercurrency: e }), b();
|
|
384
|
+
}
|
|
385
|
+
get shortcashierenabled() {
|
|
386
|
+
return this.$$.ctx[16];
|
|
387
|
+
}
|
|
388
|
+
set shortcashierenabled(e) {
|
|
389
|
+
this.$$set({ shortcashierenabled: e }), b();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
ne(me, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, shortcashierenabled: {} }, [], [], !0);
|
|
393
|
+
export {
|
|
394
|
+
me as default
|
|
395
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-DWivJdEW.cjs");function x(n,t){e.addMessages(n,t)}function A(n){e.$locale.set(n)}const L={en:{titleDeposit:"Deposit",loading:"Loading, please wait ..."},"zh-hk":{titleDeposit:"訂金",loading:"加載請稍候…"},fr:{titleDeposit:"Dépôt",loading:"Chargement, veuillez patienter ..."},tr:{titleDeposit:"PARA YATIR",loading:"Yükleniyor ..."},ro:{titleDeposit:"Depunere",loading:"Se încarcă..."},es:{titleDeposit:"Deposita",loading:"Cargando ..."},pt:{titleDeposit:"Depósito",loading:"Carregando, por favor espere ..."},hr:{titleDeposit:"Uplata",loading:"Učitavanje"},"pt-br":{titleDeposit:"Depositar",Loading:"Carregando, por favor espere..."},"es-mx":{titleDeposit:"Depositar",Loading:"Cargando, por favor espere..."}};function W(n){e.append_styles(n,"svelte-lvm6lo","button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}")}function j(n){let t,a,l,r,c,m,d,h,f,o,s=n[4]("titleDeposit")+"",p,w,b;return{c(){t=e.element("div"),a=e.svg_element("svg"),l=e.svg_element("defs"),r=e.svg_element("style"),c=e.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),m=e.svg_element("g"),d=e.svg_element("g"),h=e.svg_element("path"),f=e.space(),o=e.element("h2"),p=e.text(s),e.attr(h,"class","aaa"),e.attr(h,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(h,"transform","translate(15 15) rotate(180)"),e.attr(d,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(a,"xmlns","http://www.w3.org/2000/svg"),e.attr(a,"width","15"),e.attr(a,"height","15"),e.attr(a,"viewBox","0 0 15 15"),e.attr(o,"class","DepositTitleMobile"),e.attr(t,"class","MenuReturnButton")},m(u,D){e.insert(u,t,D),e.append(t,a),e.append(a,l),e.append(l,r),e.append(r,c),e.append(a,m),e.append(m,d),e.append(d,h),e.append(t,f),e.append(t,o),e.append(o,p),w||(b=e.listen(t,"click",n[17]),w=!0)},p(u,D){D&16&&s!==(s=u[4]("titleDeposit")+"")&&e.set_data(p,s)},d(u){u&&e.detach(t),w=!1,b()}}}function z(n){let t,a,l;return{c(){t=e.element("div"),a=e.element("iframe"),e.src_url_equal(a.src,l=n[3])||e.attr(a,"src",l),e.attr(a,"title","Deposit Iframe"),e.attr(t,"class","DepositIframeWrapper")},m(r,c){e.insert(r,t,c),e.append(t,a)},p(r,c){c&8&&!e.src_url_equal(a.src,l=r[3])&&e.attr(a,"src",l)},d(r){r&&e.detach(t)}}}function G(n){let t,a=n[4]("loading")+"",l;return{c(){t=e.element("p"),l=e.text(a)},m(r,c){e.insert(r,t,c),e.append(t,l)},p(r,c){c&16&&a!==(a=r[4]("loading")+"")&&e.set_data(l,a)},d(r){r&&e.detach(t)}}}function N(n){let t,a,l,r=n[4]("titleDeposit")+"",c,m,d=n[5]&&j(n);function h(s,p){return s[1]?G:z}let f=h(n),o=f(n);return{c(){t=e.element("div"),d&&d.c(),a=e.space(),l=e.element("h2"),c=e.text(r),m=e.space(),o.c(),e.attr(l,"class","DepositTitle "+(n[5]?"DepositTitleNone":"")),e.attr(t,"class","DepositWrapper "+(n[5]?"DepositWrapperMobile":"")),e.set_style(t,"--dynamic-height",n[2])},m(s,p){e.insert(s,t,p),d&&d.m(t,null),e.append(t,a),e.append(t,l),e.append(l,c),e.append(t,m),o.m(t,null),n[18](t)},p(s,[p]){s[5]&&d.p(s,p),p&16&&r!==(r=s[4]("titleDeposit")+"")&&e.set_data(c,r),f===(f=h(s))&&o?o.p(s,p):(o.d(1),o=f(s),o&&(o.c(),o.m(t,null))),p&4&&e.set_style(t,"--dynamic-height",s[2])},i:e.noop,o:e.noop,d(s){s&&e.detach(t),d&&d.d(),o.d(),n[18](null)}}}function q(n,t,a){let l,r;e.component_subscribe(n,e.$format,i=>a(4,r=i));let{endpoint:c=""}=t,{session:m=""}=t,{playerid:d=""}=t,{lang:h="en"}=t,{hasdefaultamount:f=""}=t,{clientstyling:o=""}=t,{clientstylingurl:s=""}=t,{translationurl:p=""}=t,{playercurrency:w=""}=t,{shortcashierenabled:b="false"}=t,u,D=window.navigator.userAgent,v=e.getDevice(D)!=="PC",M=!0,C,_=0,k="";const R=()=>{fetch(p).then(y=>y.json()).then(y=>{Object.keys(y).forEach(g=>{x(g,y[g])})}).catch(y=>{console.log(y)})};Object.keys(L).forEach(i=>{x(i,L[i])});const S=()=>{window.postMessage({type:"GoToPreviousRoute",isMobile:v},window.location.href)},T=i=>{if(i.data){switch(i.data.type){case"ProfileDetailsData":a(7,w=i.data.profileDetails.currency);break}switch(i.data["MMFE:setQuickDepositHeight"]&&a(2,C=i.data["MMFE:setQuickDepositHeight"].toString()+"px"),i.data["MMFE:openFullCashier"]==="true"&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),i.data.redirect){case"mm-hc-casino":window.postMessage({type:"GoToCasino"},window.location.href);break;case"mm-hc-sports":window.postMessage({type:"GoToSports"},window.location.href);break;case"mm-hc-contact":window.postMessage({type:"GoToCustomerSupport"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href);break;case"mm-hc-back-to-merchant":window.postMessage({type:"GoToHomepage"},window.location.href);break;case"mm-wm-hc-init-deposit":window.postMessage({type:"RedirectWithdrawDepositCloseModal"},window.location.href);break;case"mm-wm-hc-init-deposit-quick":window.postMessage({type:"CloseShortCashier"},window.location.href);break}}},B=()=>{let i=new URL(`${c}/v1/player/${d}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);if(i.searchParams.append("language",h),l&&i.searchParams.append("isShortCashier",b),f)switch(w){case"USD":_=.4;break;case"CDF":_=1e3;break}let y={method:"POST",headers:{"X-SessionId":m,currency:w||"EUR",amount:_,cashierMode:"Default",IsShortCashier:b,accept:"application/json"}};fetch(i.href,y).then(g=>g.json()).then(g=>{a(1,M=!1),a(3,k=g.CashierUrl)},g=>{console.error(g)})},H=()=>{A(h)},P=()=>{let i=document.createElement("style");i.innerHTML=o,u.appendChild(i)},U=()=>{let i=new URL(s),y=document.createElement("style");fetch(i.href).then(g=>g.text()).then(g=>{y.innerHTML=g,setTimeout(()=>{u.appendChild(y)},1)})};e.onMount(()=>(window.addEventListener("message",T,!1),()=>{window.removeEventListener("message",T)}));const F=()=>S();function I(i){e.binding_callbacks[i?"unshift":"push"](()=>{u=i,a(0,u)})}return n.$$set=i=>{"endpoint"in i&&a(8,c=i.endpoint),"session"in i&&a(9,m=i.session),"playerid"in i&&a(10,d=i.playerid),"lang"in i&&a(11,h=i.lang),"hasdefaultamount"in i&&a(12,f=i.hasdefaultamount),"clientstyling"in i&&a(13,o=i.clientstyling),"clientstylingurl"in i&&a(14,s=i.clientstylingurl),"translationurl"in i&&a(15,p=i.translationurl),"playercurrency"in i&&a(7,w=i.playercurrency),"shortcashierenabled"in i&&a(16,b=i.shortcashierenabled)},n.$$.update=()=>{n.$$.dirty&2048&&h&&H(),n.$$.dirty&65536&&(l=b.toLocaleLowerCase()==="true"),n.$$.dirty&16385&&s&&u&&U(),n.$$.dirty&8193&&o&&u&&P(),n.$$.dirty&32768&&p&&R(),n.$$.dirty&69504&&m&&d&&c&&w&&h&&b&&B()},[u,M,C,k,r,v,S,w,c,m,d,h,f,o,s,p,b,F,I]}class E extends e.SvelteComponent{constructor(t){super(),e.init(this,t,q,N,e.safe_not_equal,{endpoint:8,session:9,playerid:10,lang:11,hasdefaultamount:12,clientstyling:13,clientstylingurl:14,translationurl:15,playercurrency:7,shortcashierenabled:16},W)}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[9]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[11]}set lang(t){this.$$set({lang:t}),e.flush()}get hasdefaultamount(){return this.$$.ctx[12]}set hasdefaultamount(t){this.$$set({hasdefaultamount:t}),e.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get playercurrency(){return this.$$.ctx[7]}set playercurrency(t){this.$$set({playercurrency:t}),e.flush()}get shortcashierenabled(){return this.$$.ctx[16]}set shortcashierenabled(t){this.$$set({shortcashierenabled:t}),e.flush()}}e.create_custom_element(E,{endpoint:{},session:{},playerid:{},lang:{},hasdefaultamount:{},clientstyling:{},clientstylingurl:{},translationurl:{},playercurrency:{},shortcashierenabled:{}},[],[],!0);exports.default=E;
|
|
@@ -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/CasinoHeaderControllerNd-Bcge1xWm.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",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/CasinoHeaderControllerNd-y-KHL_bQ.js").then(({ default: t }) => {
|
|
14
|
+
!customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", t.element);
|
|
15
|
+
});
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-header-controller-nd",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "esnext/casino-header-controller-nd.js",
|
|
6
6
|
"module": "esnext/casino-header-controller-nd.js",
|
|
@@ -20,5 +20,8 @@
|
|
|
20
20
|
],
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@everymatrix/gamification-dropdown": "*"
|
|
23
26
|
}
|
|
24
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=()=>{};exports.globalScripts=s;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var o = (a, n, t) => new Promise((s, i) => {
|
|
2
|
+
var p = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
l(t.next(e));
|
|
5
|
+
} catch (r) {
|
|
6
|
+
i(r);
|
|
7
|
+
}
|
|
8
|
+
}, d = (e) => {
|
|
9
|
+
try {
|
|
10
|
+
l(t.throw(e));
|
|
11
|
+
} catch (r) {
|
|
12
|
+
i(r);
|
|
13
|
+
}
|
|
14
|
+
}, l = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(p, d);
|
|
15
|
+
l((t = t.apply(a, n)).next());
|
|
16
|
+
});
|
|
17
|
+
import { b as y, p as g } from "./index-5e36ea65-COdY7Qod.js";
|
|
18
|
+
import { g as v } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
19
|
+
var c = () => {
|
|
20
|
+
const a = import.meta.url, n = {};
|
|
21
|
+
return a !== "" && (n.resourcesUrl = new URL(".", a).href), g(n);
|
|
22
|
+
};
|
|
23
|
+
c().then((a) => o(void 0, null, function* () {
|
|
24
|
+
return yield v(), y([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], stylingAppends: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]]], a);
|
|
25
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var y=e=>{try{l(t.next(e))}catch(r){o(r)}},g=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(y,g);l((t=t.apply(n,a)).next())});const p=require("./index-5e36ea65-BYsPysDo.cjs"),c=require("./app-globals-0f993ce5-sCt45RkC.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-DxQYaq9A.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),p.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield c.globalScripts(),p.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],stylingAppends:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]]],n)}));
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var p = (e, i, t) => new Promise((n, s) => {
|
|
2
|
+
var o = (l) => {
|
|
3
|
+
try {
|
|
4
|
+
a(t.next(l));
|
|
5
|
+
} catch (d) {
|
|
6
|
+
s(d);
|
|
7
|
+
}
|
|
8
|
+
}, c = (l) => {
|
|
9
|
+
try {
|
|
10
|
+
a(t.throw(l));
|
|
11
|
+
} catch (d) {
|
|
12
|
+
s(d);
|
|
13
|
+
}
|
|
14
|
+
}, a = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(o, c);
|
|
15
|
+
a((t = t.apply(e, i)).next());
|
|
16
|
+
});
|
|
17
|
+
import { r as g, h as r, g as m } from "./index-5e36ea65-COdY7Qod.js";
|
|
18
|
+
const u = "en";
|
|
19
|
+
let h = {
|
|
20
|
+
en: {
|
|
21
|
+
gamificationNoPoints: "No points"
|
|
22
|
+
},
|
|
23
|
+
de: {
|
|
24
|
+
gamificationNoPoints: "No points"
|
|
25
|
+
},
|
|
26
|
+
ro: {
|
|
27
|
+
gamificationNoPoints: "No points"
|
|
28
|
+
},
|
|
29
|
+
fr: {
|
|
30
|
+
gamificationNoPoints: "No points"
|
|
31
|
+
},
|
|
32
|
+
ar: {
|
|
33
|
+
gamificationNoPoints: "No points"
|
|
34
|
+
},
|
|
35
|
+
hr: {
|
|
36
|
+
gamificationNoPoints: "No points"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const f = (e) => new Promise((i) => {
|
|
40
|
+
fetch(e).then((t) => t.json()).then((t) => {
|
|
41
|
+
Object.keys(t).forEach((n) => {
|
|
42
|
+
h[n] || (h[n] = {});
|
|
43
|
+
for (let s in t[n])
|
|
44
|
+
h[n][s] = t[n][s];
|
|
45
|
+
}), i(!0);
|
|
46
|
+
});
|
|
47
|
+
}), y = (e, i) => {
|
|
48
|
+
const t = i;
|
|
49
|
+
return h[t !== void 0 && t in h ? t : u][e];
|
|
50
|
+
}, w = ":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}", v = w, D = class {
|
|
51
|
+
constructor(e) {
|
|
52
|
+
g(this, e), this.language = "en", this.session = "", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.stylingAppends = !1, this.setClientStyling = () => {
|
|
53
|
+
let i = document.createElement("style");
|
|
54
|
+
i.innerHTML = this.clientStyling, this.stylingContainer.prepend(i);
|
|
55
|
+
}, this.setClientStylingURL = () => {
|
|
56
|
+
let i = new URL(this.clientStylingUrl), t = document.createElement("style");
|
|
57
|
+
fetch(i.href).then((n) => n.text()).then((n) => {
|
|
58
|
+
t.innerHTML = n, setTimeout(() => {
|
|
59
|
+
this.stylingContainer.prepend(t);
|
|
60
|
+
}, 1);
|
|
61
|
+
}).catch((n) => {
|
|
62
|
+
console.log("error ", n);
|
|
63
|
+
});
|
|
64
|
+
}, this.navigateToGamification = () => {
|
|
65
|
+
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
66
|
+
}, this.handleOutsideClick = (i) => {
|
|
67
|
+
i.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
|
|
68
|
+
}, this.handleDropdownClick = (i) => {
|
|
69
|
+
i.stopPropagation(), this.isOpen = !this.isOpen, this.isOpen ? document.addEventListener("click", this.handleOutsideClick) : document.removeEventListener("click", this.handleOutsideClick);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
handleNewTranslations() {
|
|
73
|
+
this.isLoading = !0, f(this.translationUrl).then(() => {
|
|
74
|
+
this.isLoading = !1;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
componentWillLoad() {
|
|
78
|
+
return p(this, null, function* () {
|
|
79
|
+
if (this.translationUrl.length > 2 && (yield f(this.translationUrl)), this.endpoint && this.language)
|
|
80
|
+
return this.fetchPointsData();
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
componentDidRender() {
|
|
84
|
+
!this.stylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.stylingAppends = !0);
|
|
85
|
+
}
|
|
86
|
+
fetchPointsData() {
|
|
87
|
+
let e = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
|
|
88
|
+
e.searchParams.append("language", this.language);
|
|
89
|
+
const i = new Headers();
|
|
90
|
+
i.append("X-SessionId", this.session);
|
|
91
|
+
const t = {
|
|
92
|
+
method: "GET",
|
|
93
|
+
headers: i
|
|
94
|
+
};
|
|
95
|
+
return new Promise((n, s) => {
|
|
96
|
+
this.isLoading = !0, fetch(e.href, t).then((o) => o.json()).then((o) => {
|
|
97
|
+
var c, a;
|
|
98
|
+
this.loyaltyPoints = (a = (c = o == null ? void 0 : o.data) === null || c === void 0 ? void 0 : c.level) === null || a === void 0 ? void 0 : a.loyaltyPoints, n(!0);
|
|
99
|
+
}).catch((o) => {
|
|
100
|
+
console.error(o), s(o);
|
|
101
|
+
}).finally(() => {
|
|
102
|
+
this.isLoading = !1;
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
return this.isLoading ? null : r("div", { ref: (e) => this.stylingContainer = e, class: "GamificationDropdownContainer" }, r("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (e) => this.handleDropdownClick(e), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : y("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", r("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, r("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && r("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, r("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })));
|
|
108
|
+
}
|
|
109
|
+
get el() {
|
|
110
|
+
return m(this);
|
|
111
|
+
}
|
|
112
|
+
static get watchers() {
|
|
113
|
+
return {
|
|
114
|
+
translationUrl: ["handleNewTranslations"]
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
D.style = v;
|
|
119
|
+
export {
|
|
120
|
+
D as G
|
|
121
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=(e,t,i)=>new Promise((n,a)=>{var o=r=>{try{l(i.next(r))}catch(d){a(d)}},c=r=>{try{l(i.throw(r))}catch(d){a(d)}},l=r=>r.done?n(r.value):Promise.resolve(r.value).then(o,c);l((i=i.apply(e,t)).next())});const s=require("./index-5e36ea65-BYsPysDo.cjs"),u="en";let h={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const f=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(n=>{h[n]||(h[n]={});for(let a in i[n])h[n][a]=i[n][a]}),t(!0)})}),m=(e,t)=>{const i=t;return h[i!==void 0&&i in h?i:u][e]},y=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}",w=y,g=class{constructor(e){s.registerInstance(this,e),this.language="en",this.session="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{i.innerHTML=n,setTimeout(()=>{this.stylingContainer.prepend(i)},1)}).catch(n=>{console.log("error ",n)})},this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=t=>{t.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}}handleNewTranslations(){this.isLoading=!0,f(this.translationUrl).then(()=>{this.isLoading=!1})}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield f(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}fetchPointsData(){let e=new URL(`${this.endpoint}/v1/elevate/playerInfo`);e.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const i={method:"GET",headers:t};return new Promise((n,a)=>{this.isLoading=!0,fetch(e.href,i).then(o=>o.json()).then(o=>{var c,l;this.loyaltyPoints=(l=(c=o==null?void 0:o.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,n(!0)}).catch(o=>{console.error(o),a(o)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:s.h("div",{ref:e=>this.stylingContainer=e,class:"GamificationDropdownContainer"},s.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:e=>this.handleDropdownClick(e),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):m("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",s.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},s.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},s.h("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&s.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},s.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling})))}get el(){return s.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};g.style=w;exports.GamificationDropdown=g;
|