@everymatrix/casino-header-controller-nd 1.55.0 → 1.56.2
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-BvmRFsu7.js +5542 -0
- package/components/CasinoHamburgerMenuNd-DGN7EsHe.js +5504 -0
- package/components/{CasinoHeaderControllerNd-bGnLcz2g.js → CasinoHeaderControllerNd-BFwMTQlj.js} +440 -388
- package/components/CasinoHeaderControllerNd-DxziYBrY.cjs +1 -0
- package/components/{CasinoHeaderControllerNd-B4Hgo5oq.js → CasinoHeaderControllerNd-R-kFatWM.js} +467 -415
- package/components/PlayerAccountBalanceModalNd-Ci4zwRQC.cjs +13 -0
- package/components/PlayerAccountBalanceModalNd-G0n55uX9.js +1556 -0
- package/components/PlayerAccountBalanceModalNd-fSik9FVK.js +1585 -0
- package/components/PlayerDeposit-CDEpMktB.cjs +1 -0
- package/components/{PlayerDeposit-B0r58Ypp.js → PlayerDeposit-CpAynRtY.js} +132 -155
- package/components/{PlayerDeposit-BkVMpjA9.js → PlayerDeposit-u2QzJGcf.js} +132 -155
- 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-9a68cf16-Bd8AEA_I.js +126 -0
- package/stencil/gamification-dropdown-9a68cf16-CDMvtG1f.js +144 -0
- package/stencil/gamification-dropdown-CojpbTti.js +7 -0
- package/stencil/gamification-dropdown-NgRvuRBE.cjs +1 -0
- package/stencil/gamification-dropdown-i5eJXGuY.js +25 -0
- package/stencil/{gamification-dropdown_4-Cg4EiNTS.js → gamification-dropdown_4-BRago1OR.js} +5 -5
- package/stencil/{gamification-dropdown_4-DNV5b4s7.cjs → gamification-dropdown_4-CiaqcflT.cjs} +2 -2
- package/stencil/{gamification-dropdown_4-BZffGACN.js → gamification-dropdown_4-DqaEtPzl.js} +5 -5
- package/stencil/{index-171550cf-CVTOm2AV.js → index-da41a34a-0vLzR_8F.js} +223 -243
- package/stencil/index-da41a34a-BnGk2l-N.cjs +1 -0
- package/stencil/index-da41a34a-C4WSJVDb.js +752 -0
- package/stencil/{player-elevate-card-Bo3fCMU8.js → player-elevate-card-B7TL-o1l.js} +2 -2
- package/stencil/{player-elevate-card-CW-95gEJ.cjs → player-elevate-card-Bm091yVi.cjs} +1 -1
- package/stencil/{player-elevate-card-CGn57laL.js → player-elevate-card-DmRrh482.js} +2 -2
- package/stencil/{player-elevate-card-items-2078bd83-DvW50KrW.js → player-elevate-card-items-6cc8ac45-BfmKEcUt.js} +5 -3
- package/stencil/{player-elevate-card-items-2078bd83-DSxFMBLz.cjs → player-elevate-card-items-6cc8ac45-GxnGOUPb.cjs} +1 -1
- package/stencil/{player-elevate-card-items-2078bd83-CUXuMGCR.js → player-elevate-card-items-6cc8ac45-mLBMGL3X.js} +5 -3
- package/stencil/{player-elevate-pointcard-jLOeOCx0.js → player-elevate-pointcard-CAfNwafS.js} +2 -2
- package/stencil/{player-elevate-pointcard-teAW1AOh.js → player-elevate-pointcard-DBDs-BP8.js} +2 -2
- package/stencil/{player-elevate-pointcard-DVgy3cq3.cjs → player-elevate-pointcard-DMCyU0XL.cjs} +1 -1
- package/components/CasinoHamburgerMenuNd-CAV9ARg-.js +0 -5485
- package/components/CasinoHamburgerMenuNd-CSCV-5CJ.cjs +0 -5
- package/components/CasinoHamburgerMenuNd-DNYzzmAB.js +0 -5447
- package/components/CasinoHeaderControllerNd-Cd6hH1wA.cjs +0 -1
- package/components/PlayerAccountBalanceModalNd-BJJzPbdP.js +0 -1586
- package/components/PlayerAccountBalanceModalNd-Ca8dF_9M.js +0 -1557
- package/components/PlayerAccountBalanceModalNd-P1iLuuUG.cjs +0 -13
- package/components/PlayerDeposit-CjEddUaf.cjs +0 -1
- package/stencil/gamification-dropdown-456bb56a-BJ9kAxaI.js +0 -103
- package/stencil/gamification-dropdown-456bb56a-CldmfDdk.js +0 -121
- package/stencil/gamification-dropdown-456bb56a-ClnsHPoT.cjs +0 -1
- package/stencil/gamification-dropdown-BdMkPvQc.js +0 -7
- package/stencil/gamification-dropdown-CnrQK1ei.cjs +0 -1
- package/stencil/gamification-dropdown-FVqK4we0.js +0 -25
- package/stencil/index-171550cf-BY--MwdX.cjs +0 -1
- package/stencil/index-171550cf-JwZ7TN-k.js +0 -772
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { r as g, h as a, g as f } from "./index-da41a34a-C4WSJVDb.js";
|
|
2
|
+
const u = "en";
|
|
3
|
+
let l = {
|
|
4
|
+
en: {
|
|
5
|
+
gamificationNoPoints: "No points"
|
|
6
|
+
},
|
|
7
|
+
de: {
|
|
8
|
+
gamificationNoPoints: "No points"
|
|
9
|
+
},
|
|
10
|
+
ro: {
|
|
11
|
+
gamificationNoPoints: "No points"
|
|
12
|
+
},
|
|
13
|
+
fr: {
|
|
14
|
+
gamificationNoPoints: "No points"
|
|
15
|
+
},
|
|
16
|
+
ar: {
|
|
17
|
+
gamificationNoPoints: "No points"
|
|
18
|
+
},
|
|
19
|
+
hr: {
|
|
20
|
+
gamificationNoPoints: "No points"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const h = (i) => new Promise((t) => {
|
|
24
|
+
fetch(i).then((n) => n.json()).then((n) => {
|
|
25
|
+
Object.keys(n).forEach((e) => {
|
|
26
|
+
l[e] || (l[e] = {});
|
|
27
|
+
for (let o in n[e])
|
|
28
|
+
l[e][o] = n[e][o];
|
|
29
|
+
}), t(!0);
|
|
30
|
+
});
|
|
31
|
+
}), m = (i, t) => {
|
|
32
|
+
const n = t;
|
|
33
|
+
return l[n !== void 0 && n in l ? n : u][i];
|
|
34
|
+
};
|
|
35
|
+
function d(i, t) {
|
|
36
|
+
if (i) {
|
|
37
|
+
const n = document.createElement("style");
|
|
38
|
+
n.innerHTML = t, i.appendChild(n);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function p(i, t) {
|
|
42
|
+
const n = new URL(t);
|
|
43
|
+
fetch(n.href).then((e) => e.text()).then((e) => {
|
|
44
|
+
const o = document.createElement("style");
|
|
45
|
+
o.innerHTML = e, i && i.appendChild(o);
|
|
46
|
+
}).catch((e) => {
|
|
47
|
+
console.error("There was an error while trying to load client styling from URL", e);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function y(i, t, n) {
|
|
51
|
+
if (window.emMessageBus) {
|
|
52
|
+
const e = document.createElement("style");
|
|
53
|
+
window.emMessageBus.subscribe(t, (o) => {
|
|
54
|
+
e.innerHTML = o, i && i.appendChild(e);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const 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, S = class {
|
|
59
|
+
constructor(i) {
|
|
60
|
+
g(this, i), this.navigateToGamification = () => {
|
|
61
|
+
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
62
|
+
}, this.handleOutsideClick = (t) => {
|
|
63
|
+
t.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
|
|
64
|
+
}, this.handleDropdownClick = (t) => {
|
|
65
|
+
t.stopPropagation(), this.isOpen = !this.isOpen, this.isOpen ? document.addEventListener("click", this.handleOutsideClick) : document.removeEventListener("click", this.handleOutsideClick);
|
|
66
|
+
}, this.endpoint = void 0, this.language = "en", this.session = "", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.loyaltyPoints = void 0;
|
|
67
|
+
}
|
|
68
|
+
handleNewTranslations() {
|
|
69
|
+
this.isLoading = !0, h(this.translationUrl).then(() => {
|
|
70
|
+
this.isLoading = !1;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
handleClientStylingChange(i, t) {
|
|
74
|
+
i != t && d(this.stylingContainer, this.clientStyling);
|
|
75
|
+
}
|
|
76
|
+
handleClientStylingChangeURL(i, t) {
|
|
77
|
+
i != t && this.clientStylingUrl && p(this.stylingContainer, this.clientStylingUrl);
|
|
78
|
+
}
|
|
79
|
+
async componentWillLoad() {
|
|
80
|
+
if (this.translationUrl.length > 2 && await h(this.translationUrl), this.endpoint && this.language)
|
|
81
|
+
return this.fetchPointsData();
|
|
82
|
+
}
|
|
83
|
+
componentDidLoad() {
|
|
84
|
+
this.stylingContainer && (window.emMessageBus != null ? y(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && d(this.stylingContainer, this.clientStyling), this.clientStylingUrl && p(this.stylingContainer, this.clientStylingUrl)));
|
|
85
|
+
}
|
|
86
|
+
disconnectedCallback() {
|
|
87
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
88
|
+
}
|
|
89
|
+
fetchPointsData() {
|
|
90
|
+
let i = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
|
|
91
|
+
i.searchParams.append("language", this.language);
|
|
92
|
+
const t = new Headers();
|
|
93
|
+
t.append("X-SessionId", this.session);
|
|
94
|
+
const n = {
|
|
95
|
+
method: "GET",
|
|
96
|
+
headers: t
|
|
97
|
+
};
|
|
98
|
+
return new Promise((e, o) => {
|
|
99
|
+
this.isLoading = !0, fetch(i.href, n).then((s) => s.json()).then((s) => {
|
|
100
|
+
var r, c;
|
|
101
|
+
this.loyaltyPoints = (c = (r = s?.data) === null || r === void 0 ? void 0 : r.level) === null || c === void 0 ? void 0 : c.loyaltyPoints, e(!0);
|
|
102
|
+
}).catch((s) => {
|
|
103
|
+
console.error(s), o(s);
|
|
104
|
+
}).finally(() => {
|
|
105
|
+
this.isLoading = !1;
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : m("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", a("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, a("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, a("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("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, a("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })));
|
|
111
|
+
}
|
|
112
|
+
get el() {
|
|
113
|
+
return f(this);
|
|
114
|
+
}
|
|
115
|
+
static get watchers() {
|
|
116
|
+
return {
|
|
117
|
+
translationUrl: ["handleNewTranslations"],
|
|
118
|
+
clientStyling: ["handleClientStylingChange"],
|
|
119
|
+
clientStylingUrl: ["handleClientStylingChangeURL"]
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
S.style = v;
|
|
124
|
+
export {
|
|
125
|
+
S as G
|
|
126
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
var p = (i, n, t) => new Promise((e, o) => {
|
|
2
|
+
var s = (l) => {
|
|
3
|
+
try {
|
|
4
|
+
a(t.next(l));
|
|
5
|
+
} catch (d) {
|
|
6
|
+
o(d);
|
|
7
|
+
}
|
|
8
|
+
}, c = (l) => {
|
|
9
|
+
try {
|
|
10
|
+
a(t.throw(l));
|
|
11
|
+
} catch (d) {
|
|
12
|
+
o(d);
|
|
13
|
+
}
|
|
14
|
+
}, a = (l) => l.done ? e(l.value) : Promise.resolve(l.value).then(s, c);
|
|
15
|
+
a((t = t.apply(i, n)).next());
|
|
16
|
+
});
|
|
17
|
+
import { r as m, h as r, g as y } from "./index-da41a34a-0vLzR_8F.js";
|
|
18
|
+
const w = "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 g = (i) => new Promise((n) => {
|
|
40
|
+
fetch(i).then((t) => t.json()).then((t) => {
|
|
41
|
+
Object.keys(t).forEach((e) => {
|
|
42
|
+
h[e] || (h[e] = {});
|
|
43
|
+
for (let o in t[e])
|
|
44
|
+
h[e][o] = t[e][o];
|
|
45
|
+
}), n(!0);
|
|
46
|
+
});
|
|
47
|
+
}), v = (i, n) => {
|
|
48
|
+
const t = n;
|
|
49
|
+
return h[t !== void 0 && t in h ? t : w][i];
|
|
50
|
+
};
|
|
51
|
+
function f(i, n) {
|
|
52
|
+
if (i) {
|
|
53
|
+
const t = document.createElement("style");
|
|
54
|
+
t.innerHTML = n, i.appendChild(t);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function u(i, n) {
|
|
58
|
+
const t = new URL(n);
|
|
59
|
+
fetch(t.href).then((e) => e.text()).then((e) => {
|
|
60
|
+
const o = document.createElement("style");
|
|
61
|
+
o.innerHTML = e, i && i.appendChild(o);
|
|
62
|
+
}).catch((e) => {
|
|
63
|
+
console.error("There was an error while trying to load client styling from URL", e);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function S(i, n, t) {
|
|
67
|
+
if (window.emMessageBus) {
|
|
68
|
+
const e = document.createElement("style");
|
|
69
|
+
window.emMessageBus.subscribe(n, (o) => {
|
|
70
|
+
e.innerHTML = o, i && i.appendChild(e);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
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}", D = C, G = class {
|
|
75
|
+
constructor(i) {
|
|
76
|
+
m(this, i), this.navigateToGamification = () => {
|
|
77
|
+
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
78
|
+
}, this.handleOutsideClick = (n) => {
|
|
79
|
+
n.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
|
|
80
|
+
}, this.handleDropdownClick = (n) => {
|
|
81
|
+
n.stopPropagation(), this.isOpen = !this.isOpen, this.isOpen ? document.addEventListener("click", this.handleOutsideClick) : document.removeEventListener("click", this.handleOutsideClick);
|
|
82
|
+
}, this.endpoint = void 0, this.language = "en", this.session = "", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.loyaltyPoints = void 0;
|
|
83
|
+
}
|
|
84
|
+
handleNewTranslations() {
|
|
85
|
+
this.isLoading = !0, g(this.translationUrl).then(() => {
|
|
86
|
+
this.isLoading = !1;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
handleClientStylingChange(i, n) {
|
|
90
|
+
i != n && f(this.stylingContainer, this.clientStyling);
|
|
91
|
+
}
|
|
92
|
+
handleClientStylingChangeURL(i, n) {
|
|
93
|
+
i != n && this.clientStylingUrl && u(this.stylingContainer, this.clientStylingUrl);
|
|
94
|
+
}
|
|
95
|
+
componentWillLoad() {
|
|
96
|
+
return p(this, null, function* () {
|
|
97
|
+
if (this.translationUrl.length > 2 && (yield g(this.translationUrl)), this.endpoint && this.language)
|
|
98
|
+
return this.fetchPointsData();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
componentDidLoad() {
|
|
102
|
+
this.stylingContainer && (window.emMessageBus != null ? S(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && f(this.stylingContainer, this.clientStyling), this.clientStylingUrl && u(this.stylingContainer, this.clientStylingUrl)));
|
|
103
|
+
}
|
|
104
|
+
disconnectedCallback() {
|
|
105
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
106
|
+
}
|
|
107
|
+
fetchPointsData() {
|
|
108
|
+
let i = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
|
|
109
|
+
i.searchParams.append("language", this.language);
|
|
110
|
+
const n = new Headers();
|
|
111
|
+
n.append("X-SessionId", this.session);
|
|
112
|
+
const t = {
|
|
113
|
+
method: "GET",
|
|
114
|
+
headers: n
|
|
115
|
+
};
|
|
116
|
+
return new Promise((e, o) => {
|
|
117
|
+
this.isLoading = !0, fetch(i.href, t).then((s) => s.json()).then((s) => {
|
|
118
|
+
var c, a;
|
|
119
|
+
this.loyaltyPoints = (a = (c = s == null ? void 0 : s.data) === null || c === void 0 ? void 0 : c.level) === null || a === void 0 ? void 0 : a.loyaltyPoints, e(!0);
|
|
120
|
+
}).catch((s) => {
|
|
121
|
+
console.error(s), o(s);
|
|
122
|
+
}).finally(() => {
|
|
123
|
+
this.isLoading = !1;
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
return this.isLoading ? null : r("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, r("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : v("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 })));
|
|
129
|
+
}
|
|
130
|
+
get el() {
|
|
131
|
+
return y(this);
|
|
132
|
+
}
|
|
133
|
+
static get watchers() {
|
|
134
|
+
return {
|
|
135
|
+
translationUrl: ["handleNewTranslations"],
|
|
136
|
+
clientStyling: ["handleClientStylingChange"],
|
|
137
|
+
clientStylingUrl: ["handleClientStylingChangeURL"]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
G.style = D;
|
|
142
|
+
export {
|
|
143
|
+
G
|
|
144
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as n, p as t } from "./index-da41a34a-C4WSJVDb.js";
|
|
2
|
+
import { g as l } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
3
|
+
var r = () => {
|
|
4
|
+
const e = import.meta.url, a = {};
|
|
5
|
+
return e !== "" && (a.resourcesUrl = new URL(".", e).href), t(a);
|
|
6
|
+
};
|
|
7
|
+
r().then(async (e) => (await l(), n([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [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"], mbSource: [1, "mb-source"], 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"] }]]]], e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var g=e=>{try{l(t.next(e))}catch(r){o(r)}},y=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,y);l((t=t.apply(n,a)).next())});const p=require("./index-da41a34a-BnGk2l-N.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-NgRvuRBE.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],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[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"],mbSource:[1,"mb-source"],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,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
|
+
}, g = (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, g);
|
|
15
|
+
l((t = t.apply(a, n)).next());
|
|
16
|
+
});
|
|
17
|
+
import { b as y, p as d } from "./index-da41a34a-0vLzR_8F.js";
|
|
18
|
+
import { g as c } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
19
|
+
var v = () => {
|
|
20
|
+
const a = import.meta.url, n = {};
|
|
21
|
+
return a !== "" && (n.resourcesUrl = new URL(".", a).href), d(n);
|
|
22
|
+
};
|
|
23
|
+
v().then((a) => o(void 0, null, function* () {
|
|
24
|
+
return yield c(), y([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [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"], mbSource: [1, "mb-source"], 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
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as ve } from "./gamification-dropdown-
|
|
2
|
-
import { r as u, h as i, g as I, c as M, a as m, F as O } from "./index-
|
|
3
|
-
import { t as P, T as N, P as $, a as W, b, c as z, r as c, g as L, d as p } from "./player-elevate-card-items-
|
|
1
|
+
import { G as ve } from "./gamification-dropdown-9a68cf16-Bd8AEA_I.js";
|
|
2
|
+
import { r as u, h as i, g as I, c as M, a as m, F as O } from "./index-da41a34a-C4WSJVDb.js";
|
|
3
|
+
import { t as P, T as N, P as $, a as W, b, c as z, r as c, g as L, d as p } from "./player-elevate-card-items-6cc8ac45-mLBMGL3X.js";
|
|
4
4
|
const U = (e, t) => new Promise((a) => {
|
|
5
5
|
fetch(e).then((n) => n.json()).then((n) => {
|
|
6
6
|
Object.keys(n).forEach((r) => {
|
|
@@ -394,7 +394,7 @@ const ee = `:host {
|
|
|
394
394
|
ne.style = te;
|
|
395
395
|
const ae = ":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}", re = ae, le = class {
|
|
396
396
|
constructor(e) {
|
|
397
|
-
u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
|
|
397
|
+
u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
|
|
398
398
|
}
|
|
399
399
|
onSessionOrEndpointChange() {
|
|
400
400
|
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
@@ -431,7 +431,7 @@ const ae = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
431
431
|
}
|
|
432
432
|
render() {
|
|
433
433
|
const e = m("../static/card-ground.svg"), t = m("../static/card-ground-over.svg");
|
|
434
|
-
return i("div", { key: "
|
|
434
|
+
return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: N, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "b53e4b59d4ee55a2f567efa09afab3d72969e6e4", params: this.paramProxy }), i("div", { key: "1f3e504440bab2df3a181058fad7149c85c48c14", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1", class: "Content Row" }, this.playerElevateLevel && i(O, { key: "5c104f5ba1a018219c6ed5f6e50af99b035a0344" }, i("div", { key: "bd94591e6ab9298ab7c769fa48efaf314dc1a63b", class: "PlayerImg" }, i($, { key: "928849ce86d8c7a483eba7850efc83f8149bae43", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "37192c9b8502eb3c7d93914369df2d784c17e9f7", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(W, { key: "2684a177f4bb1053c4587fd4158666fb35ca23f4", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "173a37c63868f2d900c12af3ffc2d9a4a57550e4", class: "PointsRange" }, i(b, { key: "a7111154f7dc547e0b05c70d24508bdd75c5d882", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(b, { key: "ad31574e7db81a7ecb7a06b28b1d4968cbcab93e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(z, { key: "88ddfdb326edfb1de9519da6b3d0e5b514725e27" }), i("div", { key: "b9c79555a8001bd2c754d7573df04016da235c84", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "02da725060c9db4a8c1c2e8bad3426894d7f8f2c", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
|
|
435
435
|
}
|
|
436
436
|
static get watchers() {
|
|
437
437
|
return {
|
package/stencil/{gamification-dropdown_4-DNV5b4s7.cjs → gamification-dropdown_4-CiaqcflT.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var f=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},
|
|
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 _=require("./gamification-dropdown-9a68cf16-7PS2vA4O.cjs"),r=require("./index-da41a34a-BnGk2l-N.cjs"),o=require("./player-elevate-card-items-6cc8ac45-GxnGOUPb.cjs"),B=(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.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)})},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}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=B(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 N(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 q=6e4,W=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)}},$="trunc";function E(e){return e?m[e]:m[$]}function z(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/W;return E(a==null?void 0:a.roundingMethod)(n)}function U(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/q;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"),S=e.querySelector("#filter_ball"),C=e.querySelector("#filter_heart"),k=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}`),k.setAttribute("x",`${v-6}`),C.setAttribute("x",`${v-6-2}`),S.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
2
|
display: block;
|
|
3
3
|
width: 360px;
|
|
4
4
|
height: 230px;
|
|
@@ -189,4 +189,4 @@
|
|
|
189
189
|
text-align: right;
|
|
190
190
|
font-weight: bold;
|
|
191
191
|
color: var(--emw--color-red, #9e595f);
|
|
192
|
-
}`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}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=N(new Date(a.expireTime),new Date);let l=0,i=0,
|
|
192
|
+
}`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}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=N(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.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}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=_.GamificationDropdown;exports.general_styling_wrapper=b;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;
|
|
@@ -14,9 +14,9 @@ var m = (e, t, a) => new Promise((n, r) => {
|
|
|
14
14
|
}, o = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(l, d);
|
|
15
15
|
o((a = a.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import { G as pe } from "./gamification-dropdown-
|
|
18
|
-
import { r as u, h as i, g as P, c as O, a as b, F as N } from "./index-
|
|
19
|
-
import { t as k, T as $, P as W, a as z, b as L, c as U, r as p, g as E, d as h } from "./player-elevate-card-items-
|
|
17
|
+
import { G as pe } from "./gamification-dropdown-9a68cf16-CDMvtG1f.js";
|
|
18
|
+
import { r as u, h as i, g as P, c as O, a as b, F as N } from "./index-da41a34a-0vLzR_8F.js";
|
|
19
|
+
import { t as k, T as $, P as W, a as z, b as L, c as U, r as p, g as E, d as h } from "./player-elevate-card-items-6cc8ac45-BfmKEcUt.js";
|
|
20
20
|
const q = (e, t) => new Promise((a) => {
|
|
21
21
|
fetch(e).then((n) => n.json()).then((n) => {
|
|
22
22
|
Object.keys(n).forEach((r) => {
|
|
@@ -412,7 +412,7 @@ const te = `:host {
|
|
|
412
412
|
ae.style = ne;
|
|
413
413
|
const re = ":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}", le = re, ie = class {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
|
|
415
|
+
u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
|
|
416
416
|
}
|
|
417
417
|
onSessionOrEndpointChange() {
|
|
418
418
|
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
@@ -449,7 +449,7 @@ const re = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
449
449
|
}
|
|
450
450
|
render() {
|
|
451
451
|
const e = b("../static/card-ground.svg"), t = b("../static/card-ground-over.svg");
|
|
452
|
-
return i("div", { key: "
|
|
452
|
+
return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: $, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "b53e4b59d4ee55a2f567efa09afab3d72969e6e4", params: this.paramProxy }), i("div", { key: "1f3e504440bab2df3a181058fad7149c85c48c14", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1", class: "Content Row" }, this.playerElevateLevel && i(N, { key: "5c104f5ba1a018219c6ed5f6e50af99b035a0344" }, i("div", { key: "bd94591e6ab9298ab7c769fa48efaf314dc1a63b", class: "PlayerImg" }, i(W, { key: "928849ce86d8c7a483eba7850efc83f8149bae43", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "37192c9b8502eb3c7d93914369df2d784c17e9f7", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(z, { key: "2684a177f4bb1053c4587fd4158666fb35ca23f4", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "173a37c63868f2d900c12af3ffc2d9a4a57550e4", class: "PointsRange" }, i(L, { key: "a7111154f7dc547e0b05c70d24508bdd75c5d882", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(L, { key: "ad31574e7db81a7ecb7a06b28b1d4968cbcab93e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(U, { key: "88ddfdb326edfb1de9519da6b3d0e5b514725e27" }), i("div", { key: "b9c79555a8001bd2c754d7573df04016da235c84", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "02da725060c9db4a8c1c2e8bad3426894d7f8f2c", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
|
|
453
453
|
}
|
|
454
454
|
static get watchers() {
|
|
455
455
|
return {
|