@everymatrix/casino-header-controller-nd 1.56.0 → 1.56.3
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-8seLiXmp.cjs +18 -0
- package/components/{CasinoHamburgerMenuNd-RHQhri2n.js → CasinoHamburgerMenuNd-BvmRFsu7.js} +1066 -1011
- package/components/{CasinoHamburgerMenuNd-BXOxWDnU.js → CasinoHamburgerMenuNd-DGN7EsHe.js} +1048 -993
- package/components/{CasinoHeaderControllerNd-CrjISN9T.cjs → CasinoHeaderControllerNd-8KgomHue.cjs} +1 -1
- package/components/{CasinoHeaderControllerNd-DdRHib4Y.js → CasinoHeaderControllerNd-BAZe0I7c.js} +87 -87
- package/components/{CasinoHeaderControllerNd-DeFJQOBT.js → CasinoHeaderControllerNd-BH1CjC_0.js} +89 -89
- package/components/PlayerAccountBalanceModalNd-Ci4zwRQC.cjs +13 -0
- package/components/PlayerAccountBalanceModalNd-G0n55uX9.js +1556 -0
- package/components/PlayerAccountBalanceModalNd-fSik9FVK.js +1585 -0
- package/components/PlayerDeposit-65gknfff.cjs +1 -0
- package/components/PlayerDeposit-BM6DeC_i.js +391 -0
- package/components/PlayerDeposit-N91yAMpx.js +391 -0
- package/es2015/casino-header-controller-nd.cjs +1 -1
- package/es2015/casino-header-controller-nd.js +1 -1
- package/esnext/casino-header-controller-nd.js +1 -1
- package/package.json +1 -1
- package/stencil/gamification-dropdown-9a68cf16-7PS2vA4O.cjs +1 -0
- package/stencil/{gamification-dropdown-246b88da-BcsKYpR0.js → gamification-dropdown-9a68cf16-Bd8AEA_I.js} +10 -10
- package/stencil/{gamification-dropdown-246b88da-Dckk_dCi.js → gamification-dropdown-9a68cf16-CDMvtG1f.js} +8 -8
- package/stencil/{gamification-dropdown-CGlt7V-H.js → gamification-dropdown-CojpbTti.js} +1 -1
- package/stencil/{gamification-dropdown-12tdWeqm.cjs → gamification-dropdown-NgRvuRBE.cjs} +1 -1
- package/stencil/{gamification-dropdown-GR6HFAZA.js → gamification-dropdown-i5eJXGuY.js} +1 -1
- package/stencil/{gamification-dropdown_4-Denu_YbM.js → gamification-dropdown_4-BRago1OR.js} +20 -20
- package/stencil/gamification-dropdown_4-CiaqcflT.cjs +192 -0
- package/stencil/{gamification-dropdown_4-QRIgZIS5.js → gamification-dropdown_4-DqaEtPzl.js} +18 -18
- package/stencil/index-da41a34a-0vLzR_8F.js +779 -0
- package/stencil/index-da41a34a-BnGk2l-N.cjs +1 -0
- package/stencil/index-da41a34a-C4WSJVDb.js +752 -0
- package/stencil/{player-elevate-card-BPyvJoKU.js → player-elevate-card-B7TL-o1l.js} +4 -4
- package/stencil/player-elevate-card-Bm091yVi.cjs +64 -0
- package/stencil/{player-elevate-card-CSXjQ70j.js → player-elevate-card-DmRrh482.js} +4 -4
- package/stencil/{player-elevate-card-items-be1e68f1-C-idvDlE.js → player-elevate-card-items-6cc8ac45-BfmKEcUt.js} +7 -3
- package/stencil/player-elevate-card-items-6cc8ac45-GxnGOUPb.cjs +1 -0
- package/stencil/{player-elevate-card-items-be1e68f1-CF4tyvaU.js → player-elevate-card-items-6cc8ac45-mLBMGL3X.js} +7 -3
- package/stencil/{player-elevate-pointcard-Baq8OlNX.js → player-elevate-pointcard-CAfNwafS.js} +7 -7
- package/stencil/{player-elevate-pointcard-jvw6Jdcf.js → player-elevate-pointcard-DBDs-BP8.js} +7 -7
- package/stencil/player-elevate-pointcard-DMCyU0XL.cjs +1 -0
- package/components/CasinoHamburgerMenuNd-CDprnR9N.cjs +0 -5
- package/components/PlayerAccountBalanceModalNd-BduIv2jr.js +0 -1553
- package/components/PlayerAccountBalanceModalNd-ClQUf9hu.js +0 -1582
- package/components/PlayerAccountBalanceModalNd-DB8OTdY6.cjs +0 -13
- package/components/PlayerDeposit-D4E7B0VM.cjs +0 -1
- package/components/PlayerDeposit-Dn8OMUks.js +0 -391
- package/components/PlayerDeposit-Owd9kBaC.js +0 -391
- package/stencil/gamification-dropdown-246b88da-ImWNLZys.cjs +0 -1
- package/stencil/gamification-dropdown_4-BwwlBsis.cjs +0 -192
- package/stencil/index-30fda5fb-CiEO4toK.js +0 -833
- package/stencil/index-30fda5fb-DqSvPD7T.cjs +0 -1
- package/stencil/index-30fda5fb-XWBRFzl0.js +0 -860
- package/stencil/player-elevate-card-D5kbh1fR.cjs +0 -64
- package/stencil/player-elevate-card-items-be1e68f1-CxCehVul.cjs +0 -1
- package/stencil/player-elevate-pointcard-DVXsZKCw.cjs +0 -1
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
import { b as K, $ as V, S as X, i as Z, s as J, f as w, d as $, z as U, g as S, D as L, P as z, m as x, n as h, p as M, q as E, E as C, r as d, v as ee, I as te, w as ie, o as ae, F as k, A as se, B as W, L as re, M as ne, N as oe, c as le, K as ce } from "./CasinoHamburgerMenuNd-RHQhri2n.js";
|
|
2
|
-
function H(a, e) {
|
|
3
|
-
K(a, e);
|
|
4
|
-
}
|
|
5
|
-
function de(a) {
|
|
6
|
-
V.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 ue(a) {
|
|
51
|
-
$(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 he(a) {
|
|
54
|
-
let e, i, n, s, l, m, c, p, y, o, r = (
|
|
55
|
-
/*$_*/
|
|
56
|
-
a[4]("titleDeposit") + ""
|
|
57
|
-
), u, b, _;
|
|
58
|
-
return {
|
|
59
|
-
c() {
|
|
60
|
-
e = M("div"), i = k("svg"), n = k("defs"), s = k("style"), l = C(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = k("g"), c = k("g"), p = k("path"), y = E(), o = M("h2"), u = C(r), d(p, "class", "aaa"), d(p, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(p, "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(f, g) {
|
|
63
|
-
x(f, e, g), h(e, i), h(i, n), h(n, s), h(s, l), h(i, m), h(m, c), h(c, p), h(e, y), h(e, o), h(o, u), b || (_ = ae(
|
|
64
|
-
e,
|
|
65
|
-
"click",
|
|
66
|
-
/*click_handler*/
|
|
67
|
-
a[18]
|
|
68
|
-
), b = !0);
|
|
69
|
-
},
|
|
70
|
-
p(f, g) {
|
|
71
|
-
g & /*$_*/
|
|
72
|
-
16 && r !== (r = /*$_*/
|
|
73
|
-
f[4]("titleDeposit") + "") && L(u, r);
|
|
74
|
-
},
|
|
75
|
-
d(f) {
|
|
76
|
-
f && S(e), b = !1, _();
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function pe(a) {
|
|
81
|
-
let e, i, n;
|
|
82
|
-
return {
|
|
83
|
-
c() {
|
|
84
|
-
e = M("div"), i = M("iframe"), W(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
|
-
x(s, e, l), h(e, i);
|
|
89
|
-
},
|
|
90
|
-
p(s, l) {
|
|
91
|
-
l & /*iframeUrl*/
|
|
92
|
-
8 && !W(i.src, n = /*iframeUrl*/
|
|
93
|
-
s[3]) && d(i, "src", n);
|
|
94
|
-
},
|
|
95
|
-
d(s) {
|
|
96
|
-
s && S(e);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function ge(a) {
|
|
101
|
-
let e, i = (
|
|
102
|
-
/*$_*/
|
|
103
|
-
a[4]("loading") + ""
|
|
104
|
-
), n;
|
|
105
|
-
return {
|
|
106
|
-
c() {
|
|
107
|
-
e = M("p"), n = C(i);
|
|
108
|
-
},
|
|
109
|
-
m(s, l) {
|
|
110
|
-
x(s, e, l), h(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 me(a) {
|
|
123
|
-
let e, i, n, s = (
|
|
124
|
-
/*$_*/
|
|
125
|
-
a[4]("titleDeposit") + ""
|
|
126
|
-
), l, m, c = (
|
|
127
|
-
/*isMobile*/
|
|
128
|
-
a[5] && he(a)
|
|
129
|
-
);
|
|
130
|
-
function p(r, u) {
|
|
131
|
-
return (
|
|
132
|
-
/*isLoading*/
|
|
133
|
-
r[1] ? ge : pe
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
let y = p(a), o = y(a);
|
|
137
|
-
return {
|
|
138
|
-
c() {
|
|
139
|
-
e = M("div"), c && c.c(), i = E(), n = M("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" : "")), z(
|
|
142
|
-
e,
|
|
143
|
-
"--dynamic-height",
|
|
144
|
-
/*dynamicHeight*/
|
|
145
|
-
a[2]
|
|
146
|
-
);
|
|
147
|
-
},
|
|
148
|
-
m(r, u) {
|
|
149
|
-
x(r, e, u), c && c.m(e, null), h(e, i), h(e, n), h(n, l), h(e, m), o.m(e, null), a[19](e);
|
|
150
|
-
},
|
|
151
|
-
p(r, [u]) {
|
|
152
|
-
/*isMobile*/
|
|
153
|
-
r[5] && c.p(r, u), u & /*$_*/
|
|
154
|
-
16 && s !== (s = /*$_*/
|
|
155
|
-
r[4]("titleDeposit") + "") && L(l, s), y === (y = p(r)) && o ? o.p(r, u) : (o.d(1), o = y(r), o && (o.c(), o.m(e, null))), u & /*dynamicHeight*/
|
|
156
|
-
4 && z(
|
|
157
|
-
e,
|
|
158
|
-
"--dynamic-height",
|
|
159
|
-
/*dynamicHeight*/
|
|
160
|
-
r[2]
|
|
161
|
-
);
|
|
162
|
-
},
|
|
163
|
-
i: U,
|
|
164
|
-
o: U,
|
|
165
|
-
d(r) {
|
|
166
|
-
r && S(e), c && c.d(), o.d(), a[19](null);
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function fe(a, e, i) {
|
|
171
|
-
let n, s;
|
|
172
|
-
ee(a, ce, (t) => i(4, s = t));
|
|
173
|
-
let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: p = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: r = "" } = e, { translationurl: u = "" } = e, { playercurrency: b = "" } = e, { mbsource: _ } = e, { shortcashierenabled: f = "false" } = e, g, G = window.navigator.userAgent, R = te(G) !== "PC", B = !0, I, T = 0, P = "";
|
|
174
|
-
const N = () => {
|
|
175
|
-
fetch(u).then((D) => D.json()).then((D) => {
|
|
176
|
-
Object.keys(D).forEach((v) => {
|
|
177
|
-
H(v, D[v]);
|
|
178
|
-
});
|
|
179
|
-
}).catch((D) => {
|
|
180
|
-
console.log(D);
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
Object.keys(j).forEach((t) => {
|
|
184
|
-
H(t, j[t]);
|
|
185
|
-
});
|
|
186
|
-
const A = () => {
|
|
187
|
-
window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
|
|
188
|
-
}, F = (t) => {
|
|
189
|
-
if (t.data) {
|
|
190
|
-
switch (t.data.type) {
|
|
191
|
-
case "ProfileDetailsData":
|
|
192
|
-
i(7, b = t.data.profileDetails.currency);
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
switch (t.data["MMFE:setQuickDepositHeight"] && i(2, I = 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
|
-
}, q = () => {
|
|
222
|
-
let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
|
|
223
|
-
if (t.searchParams.append("language", p), n && t.searchParams.append("isShortCashier", f), y)
|
|
224
|
-
switch (b) {
|
|
225
|
-
case "USD":
|
|
226
|
-
T = 0.4;
|
|
227
|
-
break;
|
|
228
|
-
case "CDF":
|
|
229
|
-
T = 1e3;
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
let D = {
|
|
233
|
-
method: "POST",
|
|
234
|
-
headers: {
|
|
235
|
-
"X-SessionId": m,
|
|
236
|
-
currency: b || "EUR",
|
|
237
|
-
amount: T,
|
|
238
|
-
cashierMode: "Default",
|
|
239
|
-
IsShortCashier: f,
|
|
240
|
-
accept: "application/json"
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
fetch(t.href, D).then((v) => v.json()).then(
|
|
244
|
-
(v) => {
|
|
245
|
-
i(1, B = !1), i(3, P = v.CashierUrl);
|
|
246
|
-
},
|
|
247
|
-
(v) => {
|
|
248
|
-
console.error(v);
|
|
249
|
-
}
|
|
250
|
-
);
|
|
251
|
-
}, O = () => {
|
|
252
|
-
de(p);
|
|
253
|
-
};
|
|
254
|
-
ie(() => (window.addEventListener("message", F, !1), () => {
|
|
255
|
-
window.removeEventListener("message", F);
|
|
256
|
-
}));
|
|
257
|
-
const Q = () => A();
|
|
258
|
-
function Y(t) {
|
|
259
|
-
se[t ? "unshift" : "push"](() => {
|
|
260
|
-
g = t, i(0, g);
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
return a.$$set = (t) => {
|
|
264
|
-
"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, p = 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, u = t.translationurl), "playercurrency" in t && i(7, b = t.playercurrency), "mbsource" in t && i(16, _ = t.mbsource), "shortcashierenabled" in t && i(17, f = t.shortcashierenabled);
|
|
265
|
-
}, a.$$.update = () => {
|
|
266
|
-
a.$$.dirty & /*lang*/
|
|
267
|
-
2048 && p && O(), a.$$.dirty & /*shortcashierenabled*/
|
|
268
|
-
131072 && (n = f.toLocaleLowerCase() === "true"), a.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
269
|
-
8193 && o && g && re(g, o), a.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
270
|
-
16385 && r && g && ne(g, r), a.$$.dirty & /*mbsource, customStylingContainer*/
|
|
271
|
-
65537 && _ && g && oe(g, `${_}.Style`), a.$$.dirty & /*translationurl*/
|
|
272
|
-
32768 && u && N(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
|
|
273
|
-
135040 && m && c && l && b && p && f && q();
|
|
274
|
-
}, [
|
|
275
|
-
g,
|
|
276
|
-
B,
|
|
277
|
-
I,
|
|
278
|
-
P,
|
|
279
|
-
s,
|
|
280
|
-
R,
|
|
281
|
-
A,
|
|
282
|
-
b,
|
|
283
|
-
l,
|
|
284
|
-
m,
|
|
285
|
-
c,
|
|
286
|
-
p,
|
|
287
|
-
y,
|
|
288
|
-
o,
|
|
289
|
-
r,
|
|
290
|
-
u,
|
|
291
|
-
_,
|
|
292
|
-
f,
|
|
293
|
-
Q,
|
|
294
|
-
Y
|
|
295
|
-
];
|
|
296
|
-
}
|
|
297
|
-
class ye extends X {
|
|
298
|
-
constructor(e) {
|
|
299
|
-
super(), Z(
|
|
300
|
-
this,
|
|
301
|
-
e,
|
|
302
|
-
fe,
|
|
303
|
-
me,
|
|
304
|
-
J,
|
|
305
|
-
{
|
|
306
|
-
endpoint: 8,
|
|
307
|
-
session: 9,
|
|
308
|
-
playerid: 10,
|
|
309
|
-
lang: 11,
|
|
310
|
-
hasdefaultamount: 12,
|
|
311
|
-
clientstyling: 13,
|
|
312
|
-
clientstylingurl: 14,
|
|
313
|
-
translationurl: 15,
|
|
314
|
-
playercurrency: 7,
|
|
315
|
-
mbsource: 16,
|
|
316
|
-
shortcashierenabled: 17
|
|
317
|
-
},
|
|
318
|
-
ue
|
|
319
|
-
);
|
|
320
|
-
}
|
|
321
|
-
get endpoint() {
|
|
322
|
-
return this.$$.ctx[8];
|
|
323
|
-
}
|
|
324
|
-
set endpoint(e) {
|
|
325
|
-
this.$$set({ endpoint: e }), w();
|
|
326
|
-
}
|
|
327
|
-
get session() {
|
|
328
|
-
return this.$$.ctx[9];
|
|
329
|
-
}
|
|
330
|
-
set session(e) {
|
|
331
|
-
this.$$set({ session: e }), w();
|
|
332
|
-
}
|
|
333
|
-
get playerid() {
|
|
334
|
-
return this.$$.ctx[10];
|
|
335
|
-
}
|
|
336
|
-
set playerid(e) {
|
|
337
|
-
this.$$set({ playerid: e }), w();
|
|
338
|
-
}
|
|
339
|
-
get lang() {
|
|
340
|
-
return this.$$.ctx[11];
|
|
341
|
-
}
|
|
342
|
-
set lang(e) {
|
|
343
|
-
this.$$set({ lang: e }), w();
|
|
344
|
-
}
|
|
345
|
-
get hasdefaultamount() {
|
|
346
|
-
return this.$$.ctx[12];
|
|
347
|
-
}
|
|
348
|
-
set hasdefaultamount(e) {
|
|
349
|
-
this.$$set({ hasdefaultamount: e }), w();
|
|
350
|
-
}
|
|
351
|
-
get clientstyling() {
|
|
352
|
-
return this.$$.ctx[13];
|
|
353
|
-
}
|
|
354
|
-
set clientstyling(e) {
|
|
355
|
-
this.$$set({ clientstyling: e }), w();
|
|
356
|
-
}
|
|
357
|
-
get clientstylingurl() {
|
|
358
|
-
return this.$$.ctx[14];
|
|
359
|
-
}
|
|
360
|
-
set clientstylingurl(e) {
|
|
361
|
-
this.$$set({ clientstylingurl: e }), w();
|
|
362
|
-
}
|
|
363
|
-
get translationurl() {
|
|
364
|
-
return this.$$.ctx[15];
|
|
365
|
-
}
|
|
366
|
-
set translationurl(e) {
|
|
367
|
-
this.$$set({ translationurl: e }), w();
|
|
368
|
-
}
|
|
369
|
-
get playercurrency() {
|
|
370
|
-
return this.$$.ctx[7];
|
|
371
|
-
}
|
|
372
|
-
set playercurrency(e) {
|
|
373
|
-
this.$$set({ playercurrency: e }), w();
|
|
374
|
-
}
|
|
375
|
-
get mbsource() {
|
|
376
|
-
return this.$$.ctx[16];
|
|
377
|
-
}
|
|
378
|
-
set mbsource(e) {
|
|
379
|
-
this.$$set({ mbsource: e }), w();
|
|
380
|
-
}
|
|
381
|
-
get shortcashierenabled() {
|
|
382
|
-
return this.$$.ctx[17];
|
|
383
|
-
}
|
|
384
|
-
set shortcashierenabled(e) {
|
|
385
|
-
this.$$set({ shortcashierenabled: e }), w();
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
le(ye, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, mbsource: {}, shortcashierenabled: {} }, [], [], !0);
|
|
389
|
-
export {
|
|
390
|
-
ye as default
|
|
391
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=(i,n,t)=>new Promise((e,o)=>{var s=r=>{try{l(t.next(r))}catch(d){o(d)}},c=r=>{try{l(t.throw(r))}catch(d){o(d)}},l=r=>r.done?e(r.value):Promise.resolve(r.value).then(s,c);l((t=t.apply(i,n)).next())});const a=require("./index-30fda5fb-DqSvPD7T.cjs"),y="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 g=i=>new Promise(n=>{fetch(i).then(t=>t.json()).then(t=>{Object.keys(t).forEach(e=>{h[e]||(h[e]={});for(let o in t[e])h[e][o]=t[e][o]}),n(!0)})}),w=(i,n)=>{const t=n;return h[t!==void 0&&t in h?t:y][i]};function f(i,n){if(i){const t=document.createElement("style");t.innerHTML=n,i.appendChild(t)}}function u(i,n){const t=new URL(n);fetch(t.href).then(e=>e.text()).then(e=>{const o=document.createElement("style");o.innerHTML=e,i&&i.appendChild(o)}).catch(e=>{console.error("There was an error while trying to load client styling from URL",e)})}function v(i,n,t){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(n,o=>{e.innerHTML=o,i&&i.appendChild(e)})}}const C=":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}",S=C,m=class{constructor(i){a.registerInstance(this,i),this.language="en",this.session="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=n=>{n.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=n=>{n.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}}handleNewTranslations(){this.isLoading=!0,g(this.translationUrl).then(()=>{this.isLoading=!1})}handleClientStylingChange(i,n){i!=n&&f(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,n){i!=n&&this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield g(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidLoad(){this.stylingContainer&&(window.emMessageBus!=null?v(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&f(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&u(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const n=new Headers;n.append("X-SessionId",this.session);const t={method:"GET",headers:n};return new Promise((e,o)=>{this.isLoading=!0,fetch(i.href,t).then(s=>s.json()).then(s=>{var c,l;this.loyaltyPoints=(l=(c=s==null?void 0:s.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,e(!0)}).catch(s=>{console.error(s),o(s)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:a.h("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},a.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:i=>this.handleDropdownClick(i),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):w("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",a.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},a.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a.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&&a.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},a.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 a.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};m.style=S;exports.GamificationDropdown=m;
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";var f=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},c=d=>{try{s(a.throw(d))}catch(p){l(p)}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,c);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./gamification-dropdown-246b88da-ImWNLZys.cjs"),r=require("./index-30fda5fb-DqSvPD7T.cjs"),o=require("./player-elevate-card-items-be1e68f1-CxCehVul.cjs"),_=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]?t[l]:{};for(let i in n[l])t[l][i]=n[l][i]}),a(!0)})}),M=":host{display:block}",R=M,b=class{constructor(e){r.registerInstance(this,e),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return f(this,null,function*(){const e=[];if(this.translationUrl){const t=_(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return r.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},r.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r.getElement(this)}};b.style=R;function x(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var O=864e5;function q(e,t){o.requiredArgs(2,arguments);var a=x(e),n=x(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),i=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-i)/O)}var N=6e4,$=36e5;function L(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W="trunc";function E(e){return e?m[e]:m[W]}function z(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/$;return E(a==null?void 0:a.roundingMethod)(n)}function U(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/N;return E(a==null?void 0:a.roundingMethod)(n)}function F(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function j(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,i=a.getBBox().width,c=t>1?1:t,s=c*i-n<0?0:c*i-n,d=e.querySelector("#current_level"),p=e.querySelector("#filter_current_level"),h=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),d.setAttribute("width",`${s}`),h.setAttribute("cx",`${s<l?l:s}`),p.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),P=e.querySelector("#filter_heart_ball"),C=e.querySelector("#filter_ball"),k=e.querySelector("#filter_heart"),S=e.querySelector("#filter_lock"),y=e.querySelector("#paint0_linear_ball"),u=e.querySelector("#paint1_linear_lock"),T=e.querySelector("#lock_box"),A=e.querySelector("#heart_box"),D=10,v=i-D;g.setAttribute("cx",`${v}`),u.setAttribute("x1",`${v}`),u.setAttribute("x2",`${v}`),y.setAttribute("x1",`${v-6}`),y.setAttribute("x2",`${v-6+11.2}`),S.setAttribute("x",`${v-6}`),k.setAttribute("x",`${v-6-2}`),C.setAttribute("x",`${v-6-2-2}`),P.setAttribute("x",`${v-6-2-2-4}`),T.setAttribute("x",`${v-6}`),A.setAttribute("x",`${v-6}`),a.parentElement.style.opacity="1"}const H=`:host {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 360px;
|
|
4
|
-
height: 230px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.ElevateCardWrapper {
|
|
8
|
-
contain: layout inline-size;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: fit-content;
|
|
11
|
-
min-height: 218px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.Outer {
|
|
15
|
-
container-type: inline-size;
|
|
16
|
-
font-size: 12px;
|
|
17
|
-
background-size: cover;
|
|
18
|
-
background-repeat: no-repeat;
|
|
19
|
-
line-height: initial;
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 100%;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.Dark {
|
|
25
|
-
color: var(--emw--color-gray150, #efefef);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.Light {
|
|
29
|
-
color: var(--emw--color-black, #0e0e0e);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@container (min-width: 381px) {
|
|
33
|
-
.Outer {
|
|
34
|
-
background-size: cover;
|
|
35
|
-
}
|
|
36
|
-
.Outer .OuterCover {
|
|
37
|
-
min-height: 190px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
@container (min-width: 260px) {
|
|
41
|
-
.Outer {
|
|
42
|
-
background-size: contain;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
.OuterCover {
|
|
46
|
-
width: 100%;
|
|
47
|
-
height: 100%;
|
|
48
|
-
content: "";
|
|
49
|
-
background-repeat: no-repeat;
|
|
50
|
-
background-size: cover;
|
|
51
|
-
border-radius: 15px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.Inner {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
min-height: 158px;
|
|
58
|
-
}
|
|
59
|
-
.Inner .Content {
|
|
60
|
-
padding: 15px;
|
|
61
|
-
flex-wrap: wrap;
|
|
62
|
-
gap: 8px;
|
|
63
|
-
}
|
|
64
|
-
.Inner .Row {
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: row;
|
|
67
|
-
}
|
|
68
|
-
.Inner .CardCell {
|
|
69
|
-
display: flex;
|
|
70
|
-
}
|
|
71
|
-
.Inner .LevelProgress svg {
|
|
72
|
-
transition: opacity 0.4s;
|
|
73
|
-
}
|
|
74
|
-
.Inner .LevelInfo {
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
}
|
|
78
|
-
.Inner .LevelInfo .ElevateLevel .LevelName {
|
|
79
|
-
height: 28px;
|
|
80
|
-
border-radius: 5px;
|
|
81
|
-
line-height: 28px;
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
text-overflow: ellipsis;
|
|
84
|
-
white-space: nowrap;
|
|
85
|
-
}
|
|
86
|
-
.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {
|
|
87
|
-
box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));
|
|
88
|
-
background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);
|
|
89
|
-
}
|
|
90
|
-
.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {
|
|
91
|
-
box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));
|
|
92
|
-
background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);
|
|
93
|
-
}
|
|
94
|
-
.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {
|
|
95
|
-
box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));
|
|
96
|
-
background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);
|
|
97
|
-
}
|
|
98
|
-
.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {
|
|
99
|
-
box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));
|
|
100
|
-
background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);
|
|
101
|
-
}
|
|
102
|
-
.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {
|
|
103
|
-
box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));
|
|
104
|
-
background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);
|
|
105
|
-
}
|
|
106
|
-
.Inner .LevelInfo .ElevateLevel {
|
|
107
|
-
display: flex;
|
|
108
|
-
}
|
|
109
|
-
.Inner .LevelInfo {
|
|
110
|
-
flex: 1;
|
|
111
|
-
flex-grow: 1;
|
|
112
|
-
min-width: 150px;
|
|
113
|
-
}
|
|
114
|
-
.Inner .PlayerImg {
|
|
115
|
-
width: 29%;
|
|
116
|
-
margin: auto;
|
|
117
|
-
max-width: 100px;
|
|
118
|
-
min-width: 30px;
|
|
119
|
-
order: 0;
|
|
120
|
-
}
|
|
121
|
-
.Inner .PlayerAvatar {
|
|
122
|
-
max-width: 100px;
|
|
123
|
-
flex-basis: 100px;
|
|
124
|
-
height: auto;
|
|
125
|
-
margin: auto;
|
|
126
|
-
padding-top: 10px;
|
|
127
|
-
}
|
|
128
|
-
.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {
|
|
129
|
-
width: 100%;
|
|
130
|
-
height: 100%;
|
|
131
|
-
}
|
|
132
|
-
.Inner .PlayerAvatar .Avatar {
|
|
133
|
-
border-radius: 50%;
|
|
134
|
-
background-size: contain;
|
|
135
|
-
background-repeat: no-repeat;
|
|
136
|
-
}
|
|
137
|
-
.Inner .ElevateLevel .ExpirationDate {
|
|
138
|
-
max-width: 138px;
|
|
139
|
-
min-width: 118px;
|
|
140
|
-
}
|
|
141
|
-
.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {
|
|
142
|
-
text-transform: capitalize;
|
|
143
|
-
width: 100%;
|
|
144
|
-
}
|
|
145
|
-
.Inner .PlayerName {
|
|
146
|
-
font-size: 16px;
|
|
147
|
-
}
|
|
148
|
-
.Inner .Row .PointsInfo {
|
|
149
|
-
display: table;
|
|
150
|
-
font-weight: 600;
|
|
151
|
-
}
|
|
152
|
-
.Inner .Row .Redeem {
|
|
153
|
-
justify-content: flex-end;
|
|
154
|
-
margin-left: auto;
|
|
155
|
-
}
|
|
156
|
-
.Inner .Row .Redeem:hover {
|
|
157
|
-
color: var(--emw--elevate-color-redeem-hover, #00ABA4);
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
}
|
|
160
|
-
.Inner .Row .RedeemButton:hover span {
|
|
161
|
-
color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);
|
|
162
|
-
font-weight: bold;
|
|
163
|
-
}
|
|
164
|
-
.Inner .Row .RedeemButton {
|
|
165
|
-
width: 95px;
|
|
166
|
-
height: 35px;
|
|
167
|
-
display: flex;
|
|
168
|
-
align-items: center;
|
|
169
|
-
border-radius: 10px;
|
|
170
|
-
background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);
|
|
171
|
-
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);
|
|
172
|
-
}
|
|
173
|
-
.Inner .Row .RedeemButton span {
|
|
174
|
-
color: var(--emw--color-white, #fff);
|
|
175
|
-
line-height: 18px;
|
|
176
|
-
font-size: 15px;
|
|
177
|
-
text-align: center;
|
|
178
|
-
width: 100%;
|
|
179
|
-
}
|
|
180
|
-
.Inner .Row .Points {
|
|
181
|
-
font-size: large;
|
|
182
|
-
vertical-align: middle;
|
|
183
|
-
}
|
|
184
|
-
.Inner .Row .Points .XP {
|
|
185
|
-
font-size: x-small;
|
|
186
|
-
}
|
|
187
|
-
.Inner .Row .ExpirationPoints {
|
|
188
|
-
font-size: small;
|
|
189
|
-
text-align: right;
|
|
190
|
-
font-weight: bold;
|
|
191
|
-
color: var(--emw--color-red, #9e595f);
|
|
192
|
-
}`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(this,"playerElevateLeveLoaded")}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort((s,d)=>F(new Date(s.expireTime),new Date(d.expireTime))?-1:1);const a=e.aboutToExpire[0],n=q(new Date(a.expireTime),new Date);let l=0,i=0,c=n===0?"pointsToBeExpiredDay":"pointsToBeExpired";return n<=0&&(l=z(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour",l<=0&&(i=U(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=i>1?"pointsToBeExpiredMinutes":"pointsToBeExpiredMinute")),t=o.translateWithParams(c,{expirationPoints:a.points,expireDay:Math.max(n,l,i)}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,i,c;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const d=(i=n.data.spendableWallet)===null||i===void 0?void 0:i.total,p=(c=n.data.loyaltyWallet)===null||c===void 0?void 0:c.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:p});let h=this.calcuatePointsToBeExpired(d),g=this.calcuatePointsToBeExpired(p);(h||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){j(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout(()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)},80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,i)=>l.firstEntryPoints>i.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,i)=>{a>l.firstEntryPoints&&(n=i)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};w.style=G;const X=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}",K=X,I=class{constructor(e){r.registerInstance(this,e),this.theme="Dark",this.language="en",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl=""}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return o.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=r.getAssetPath("../static/card-ground.svg"),t=r.getAssetPath("../static/card-ground-over.svg");return r.h("div",{key:"39295a651da66747a20554699bba5f96b8ad5c35",class:`ElevateCardWrapper ${this.theme}`},r.h("div",{key:"78c34fe054fc2459f8af3354116cd21a68ce01be",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},r.h("general-styling-wrapper",{key:"be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o.TRANSLATIONS,translationUrl:this.translationUrl}),r.h("player-elevate-card-data",{key:"b53e4b59d4ee55a2f567efa09afab3d72969e6e4",params:this.paramProxy}),r.h("div",{key:"1f3e504440bab2df3a181058fad7149c85c48c14",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},r.h("div",{key:"a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1",class:"Content Row"},this.playerElevateLevel&&r.h(r.Fragment,{key:"5c104f5ba1a018219c6ed5f6e50af99b035a0344"},r.h("div",{key:"bd94591e6ab9298ab7c769fa48efaf314dc1a63b",class:"PlayerImg"},r.h(o.PlayerAvatar,{key:"928849ce86d8c7a483eba7850efc83f8149bae43",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),r.h("div",{key:"37192c9b8502eb3c7d93914369df2d784c17e9f7",class:`LevelInfo ${this.playerElevateLevel.name}`},r.h(o.PlayerElevateLoyaltyLevel,{key:"2684a177f4bb1053c4587fd4158666fb35ca23f4",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),r.h("div",{key:"173a37c63868f2d900c12af3ffc2d9a4a57550e4",class:"PointsRange"},r.h(o.PlayerPoints,{key:"a7111154f7dc547e0b05c70d24508bdd75c5d882",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),r.h(o.PlayerPoints,{key:"ad31574e7db81a7ecb7a06b28b1d4968cbcab93e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),r.h(o.PlayerLoyaltyProcess,{key:"88ddfdb326edfb1de9519da6b3d0e5b514725e27"}),r.h("div",{key:"b9c79555a8001bd2c754d7573df04016da235c84",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&r.h("div",{key:"02da725060c9db4a8c1c2e8bad3426894d7f8f2c",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};I.style=K;exports.gamification_dropdown=B.GamificationDropdown;exports.general_styling_wrapper=b;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;
|