@everymatrix/player-account-menu-nd 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/GeneralLogout-BdWTwQWl.js +4538 -0
- package/components/GeneralLogout-D9s7c6oJ.cjs +5 -0
- package/components/PlayerAccountMenuNd-CfdQm129.js +587 -0
- package/components/PlayerAccountMenuNd-FNhGvQcn.cjs +1 -0
- package/es2015/player-account-menu-nd.cjs +1 -0
- package/es2015/player-account-menu-nd.js +16 -0
- package/package.json +17 -32
- package/CHANGELOG.md +0 -7
- package/README.md +0 -30
- package/dist/player-account-menu-nd.js +0 -2
- package/dist/player-account-menu-nd.js.map +0 -1
- package/icons/iconService.js +0 -28
- package/index.html +0 -37
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -67
- package/src/PlayerAccountMenu.svelte +0 -480
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -32
- package/stories/PlayerAccountMenu.stories.js +0 -13
- package/translations/translations.js +0 -82
- package/tsconfig.json +0 -6
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
import { a as ae, $ as oe, S as ie, i as ue, f as F, c as ve, s as me, b as de, e as w, d as L, n as j, g as B, h as ge, j as R, o as fe, k as ye, l as pe, m as N, p as k, t as H, q as i, r as c, u as z, v as he, w as E, x as W, y as Ae, z as b, A as q } from "./GeneralLogout-BdWTwQWl.js";
|
|
2
|
+
function G(n, e) {
|
|
3
|
+
ae(n, e);
|
|
4
|
+
}
|
|
5
|
+
function be(n) {
|
|
6
|
+
oe.set(n);
|
|
7
|
+
}
|
|
8
|
+
const V = {
|
|
9
|
+
en: {
|
|
10
|
+
title: "My Account"
|
|
11
|
+
},
|
|
12
|
+
"zh-hk": {
|
|
13
|
+
title: "我的帳戶"
|
|
14
|
+
},
|
|
15
|
+
fr: {
|
|
16
|
+
title: "Mon compte"
|
|
17
|
+
},
|
|
18
|
+
tr: {
|
|
19
|
+
title: "Hesabım"
|
|
20
|
+
},
|
|
21
|
+
ro: {
|
|
22
|
+
title: "Contul meu"
|
|
23
|
+
},
|
|
24
|
+
es: {
|
|
25
|
+
title: "Mi Cuenta"
|
|
26
|
+
},
|
|
27
|
+
pt: {
|
|
28
|
+
title: "Minha Conta"
|
|
29
|
+
},
|
|
30
|
+
hr: {
|
|
31
|
+
title: "Moj račun"
|
|
32
|
+
},
|
|
33
|
+
"pt-br": {
|
|
34
|
+
title: "Minha conta"
|
|
35
|
+
},
|
|
36
|
+
"es-mx": {
|
|
37
|
+
title: "Mi cuenta"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
if (typeof window != "undefined") {
|
|
41
|
+
let n = function(e) {
|
|
42
|
+
return function(...t) {
|
|
43
|
+
try {
|
|
44
|
+
return e.apply(this, t);
|
|
45
|
+
} catch (s) {
|
|
46
|
+
if (s instanceof DOMException && s.message.includes("has already been used with this registry") || s.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
47
|
+
return !1;
|
|
48
|
+
throw s;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
customElements.define = n(customElements.define), import("./GeneralLogout-BdWTwQWl.js").then((e) => e.G).then(({ default: e }) => {
|
|
53
|
+
!customElements.get("general-logout") && customElements.define("general-logout", e.element);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function Me(n) {
|
|
57
|
+
de(n, "svelte-1snu0cv", '.PlayerAccountMenuContainer.svelte-1snu0cv.svelte-1snu0cv{color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF));position:relative;height:100vh;display:flex;flex-direction:column;padding:0 15px}.PlayerAccountMenuContainer.svelte-1snu0cv .PlayerAccountMenuItemWrapper.svelte-1snu0cv{margin:0;word-break:break-all;display:flex;align-items:center}.PlayerAccountMenuContainer.svelte-1snu0cv .PlayerAccountMenuItemWrapper span.svelte-1snu0cv{display:flex;align-items:center}.PlayerAccountMenuHeader.svelte-1snu0cv.svelte-1snu0cv{color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF));flex-grow:0;padding:30px 20px}.PlayerAccountMenuHeader.svelte-1snu0cv .PlayerAccountMenuUser.svelte-1snu0cv{margin-bottom:5px;font-size:18px;color:var(--emfe-w-pam-color-secondary, var(--emfe-w-color-secondary, #E98B10))}.PlayerAccountMenuHeader.svelte-1snu0cv .PlayerAccountMenuEmail.svelte-1snu0cv{font-size:14px;text-overflow:ellipsis;overflow:hidden}.PlayerAccountMenuHeader.svelte-1snu0cv p.svelte-1snu0cv{font-weight:300}.PlayerAccountMenuHeaderMobile.svelte-1snu0cv.svelte-1snu0cv{color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF))}.PlayerAccountMenuItemBox.svelte-1snu0cv.svelte-1snu0cv{padding:16px 20px;font-size:16px;line-height:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;border-radius:var(--emw--border-radius-medium, 20px);border:2px solid transparent;cursor:pointer;transition:all 0.3s linear}.PlayerAccountMenuItemBox.svelte-1snu0cv.svelte-1snu0cv:hover{transition:all 0.3s linear;background:rgba(35, 176, 78, 0.3);border:2px solid var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);color:var(--emfe-w-color-white, #FFFFFF)}.PlayerAccountMenuItemBox.svelte-1snu0cv .PlayerAccountMenuItemTitle.svelte-1snu0cv{margin-left:20px}.PlayerAccountMenuItemBox.svelte-1snu0cv .PlayerAccountMenuItemIcon.svelte-1snu0cv{width:20px;padding-top:unset}.PlayerAccountMenuItemBox.svelte-1snu0cv .PlayerAccountMenuItemIconMobile.svelte-1snu0cv{width:30px;padding-top:15px}.PlayerAccountMenuList.svelte-1snu0cv.svelte-1snu0cv::-webkit-scrollbar{width:6px}.PlayerAccountMenuList.svelte-1snu0cv.svelte-1snu0cv::-webkit-scrollbar-track{background:var(--emfe-w-color-gray-300, #58586B)}.PlayerAccountMenuList.svelte-1snu0cv.svelte-1snu0cv::-webkit-scrollbar-thumb{background:var(--emfe-w-color-gray-100, #E6E6E6)}.PlayerAccountLogOutArea.svelte-1snu0cv.svelte-1snu0cv{background-color:rgba(253, 40, 57, 0.3);color:var(--emfe-w-color-white, #FFFFFF);border-radius:var(--emw--border-radius-medium, 20px);width:100%;flex-grow:0}.PlayerAccountMenuActiveItemBox.svelte-1snu0cv.svelte-1snu0cv{background:rgba(35, 176, 78, 0.3);color:var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border:2px solid var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);transition:all 0.3s linear}.PlayerAccountMobileContainer.svelte-1snu0cv.svelte-1snu0cv{height:unset;padding:0}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuCategoryWrapper.svelte-1snu0cv{display:flex;align-items:center;gap:10px;margin-bottom:18px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuCategoryTitle.svelte-1snu0cv{margin:0;font-weight:600}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuItemTitle.svelte-1snu0cv{margin-left:0;text-transform:capitalize;line-height:14px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuEmail.svelte-1snu0cv{margin:0}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList.svelte-1snu0cv{display:flex;flex-direction:column;align-items:flex-start;margin:0px 15px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox.svelte-1snu0cv{background:rgba(35, 176, 78, 0.3);color:var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border:2px solid var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);height:60px;margin:5px 0;align-items:flex-start;position:relative}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox.PlayerAccountMenuActiveItemBox.svelte-1snu0cv{background:var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon.svelte-1snu0cv{width:20px;padding:0 10px 0 15px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox.svelte-1snu0cv::after{content:"";display:inline-block;width:15px;height:15px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2215%22 height=%2215%22 viewBox=%220 0 15 15%22%3E%3Cdefs%3E%3Cstyle%3E.aaa%7Bfill:var(--emfe-w-color-white,%20%23FFFFFF);%7D%3C/style%3E%3C/defs%3E%3Cg transform=%22translate(-20%20-158)%22%3E%3Cg transform=%22translate(20%20158)%22%3E%3Cpath class=%22aaa%22 d=%22M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z%22 transform=%22translate(15%2015)%20rotate(180)%22%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");background-size:contain;transform:scaleX(-1);background-repeat:no-repeat;position:absolute;right:15px;top:22px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper.svelte-1snu0cv{display:flex;justify-items:center;align-items:center;flex-flow:row;gap:6px;position:absolute;top:0;bottom:0;left:0;right:0}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle.svelte-1snu0cv{font-size:16px;line-height:16px;font-weight:400;word-break:break-word;text-align:left;color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF))}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountLogOutArea.svelte-1snu0cv{position:absolute;right:18px;top:56px;bottom:unset;background:transparent;width:48px;border-top:0}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuHeader.svelte-1snu0cv{padding:30px 40px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuCategoryTitle.svelte-1snu0cv{font-size:32px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuUser.svelte-1snu0cv{font-size:26px;color:var(--emfe-w-pam-color-secondary, var(--emfe-w-color-secondary, #E98B10))}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuEmail.svelte-1snu0cv{font-size:20px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList.svelte-1snu0cv{column-gap:20px;row-gap:20px;padding:0 40px 40px;grid-template-columns:calc(33% - 11px) calc(33% - 11px) calc(33% - 11px)}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon.svelte-1snu0cv{width:80px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper.svelte-1snu0cv{gap:28px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle.svelte-1snu0cv{font-size:24px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountLogOutArea.svelte-1snu0cv{right:54px;top:72px}');
|
|
58
|
+
}
|
|
59
|
+
function X(n, e, t) {
|
|
60
|
+
const s = n.slice();
|
|
61
|
+
return s[37] = e[t], s;
|
|
62
|
+
}
|
|
63
|
+
function Pe(n) {
|
|
64
|
+
let e, t, s, r, m, v, g, p, M, P, h, x, A = (
|
|
65
|
+
/*isMobile*/
|
|
66
|
+
n[10] && we(n)
|
|
67
|
+
), d = (
|
|
68
|
+
/*isMobile*/
|
|
69
|
+
n[10] && xe(n)
|
|
70
|
+
), u = N(
|
|
71
|
+
/*menuItems*/
|
|
72
|
+
n[5]
|
|
73
|
+
), o = [];
|
|
74
|
+
for (let a = 0; a < u.length; a += 1)
|
|
75
|
+
o[a] = Z(X(n, u, a));
|
|
76
|
+
let I = !/*isMobile*/
|
|
77
|
+
n[10] && _e(n);
|
|
78
|
+
return {
|
|
79
|
+
c() {
|
|
80
|
+
e = w("div"), t = w("div"), A && A.c(), s = k(), r = w("p"), m = H(
|
|
81
|
+
/*profileUsername*/
|
|
82
|
+
n[7]
|
|
83
|
+
), v = k(), g = w("p"), p = H(
|
|
84
|
+
/*profileEmail*/
|
|
85
|
+
n[8]
|
|
86
|
+
), M = k(), d && d.c(), P = k(), h = w("div");
|
|
87
|
+
for (let a = 0; a < o.length; a += 1)
|
|
88
|
+
o[a].c();
|
|
89
|
+
x = k(), I && I.c(), i(r, "class", "PlayerAccountMenuUser svelte-1snu0cv"), i(g, "class", "PlayerAccountMenuEmail svelte-1snu0cv"), i(t, "class", "PlayerAccountMenuHeader " + /*isMobile*/
|
|
90
|
+
(n[10] ? "PlayerAccountMenuHeaderMobile" : "") + " svelte-1snu0cv"), i(h, "class", "PlayerAccountMenuList svelte-1snu0cv"), i(e, "class", "PlayerAccountMenuContainer " + /*isMobile*/
|
|
91
|
+
(n[10] ? "PlayerAccountMobileContainer" : "") + " " + /*mediaQuery*/
|
|
92
|
+
(n[11].matches && /*isMobile*/
|
|
93
|
+
n[10] ? "PlayerAccountTabletContainer" : "") + " svelte-1snu0cv");
|
|
94
|
+
},
|
|
95
|
+
m(a, C) {
|
|
96
|
+
L(a, e, C), c(e, t), A && A.m(t, null), c(t, s), c(t, r), c(r, m), c(t, v), c(t, g), c(g, p), c(t, M), d && d.m(t, null), c(e, P), c(e, h);
|
|
97
|
+
for (let f = 0; f < o.length; f += 1)
|
|
98
|
+
o[f] && o[f].m(h, null);
|
|
99
|
+
c(e, x), I && I.m(e, null);
|
|
100
|
+
},
|
|
101
|
+
p(a, C) {
|
|
102
|
+
if (
|
|
103
|
+
/*isMobile*/
|
|
104
|
+
a[10] && A.p(a, C), C[0] & /*profileUsername*/
|
|
105
|
+
128 && z(
|
|
106
|
+
m,
|
|
107
|
+
/*profileUsername*/
|
|
108
|
+
a[7]
|
|
109
|
+
), C[0] & /*profileEmail*/
|
|
110
|
+
256 && z(
|
|
111
|
+
p,
|
|
112
|
+
/*profileEmail*/
|
|
113
|
+
a[8]
|
|
114
|
+
), /*isMobile*/
|
|
115
|
+
a[10] && d.p(a, C), C[0] & /*selectedItem, menuItems, isMobile, openAccountSection*/
|
|
116
|
+
5216
|
|
117
|
+
) {
|
|
118
|
+
u = N(
|
|
119
|
+
/*menuItems*/
|
|
120
|
+
a[5]
|
|
121
|
+
);
|
|
122
|
+
let f;
|
|
123
|
+
for (f = 0; f < u.length; f += 1) {
|
|
124
|
+
const T = X(a, u, f);
|
|
125
|
+
o[f] ? o[f].p(T, C) : (o[f] = Z(T), o[f].c(), o[f].m(h, null));
|
|
126
|
+
}
|
|
127
|
+
for (; f < o.length; f += 1)
|
|
128
|
+
o[f].d(1);
|
|
129
|
+
o.length = u.length;
|
|
130
|
+
}
|
|
131
|
+
/*isMobile*/
|
|
132
|
+
a[10] || I.p(a, C);
|
|
133
|
+
},
|
|
134
|
+
d(a) {
|
|
135
|
+
a && B(e), A && A.d(), d && d.d(), he(o, a), I && I.d();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function we(n) {
|
|
140
|
+
let e, t, s, r, m, v, g, p, M, P, h = (
|
|
141
|
+
/*$_*/
|
|
142
|
+
n[9]("title") + ""
|
|
143
|
+
), x, A, d;
|
|
144
|
+
return {
|
|
145
|
+
c() {
|
|
146
|
+
e = w("div"), t = E("svg"), s = E("defs"), r = E("style"), m = H(".aaa{fill:var(--emfe-w-color-white, #FFFFFF);}"), v = E("g"), g = E("g"), p = E("path"), M = k(), P = w("h3"), x = H(h), i(p, "class", "aaa"), i(p, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), i(p, "transform", "translate(15 15) rotate(180)"), i(g, "transform", "translate(20 158)"), i(v, "transform", "translate(-20 -158)"), i(t, "xmlns", "http://www.w3.org/2000/svg"), i(t, "width", "15"), i(t, "height", "15"), i(t, "viewBox", "0 0 15 15"), i(P, "class", "PlayerAccountMenuCategoryTitle svelte-1snu0cv"), i(e, "class", "PlayerAccountMenuCategoryWrapper svelte-1snu0cv");
|
|
147
|
+
},
|
|
148
|
+
m(u, o) {
|
|
149
|
+
L(u, e, o), c(e, t), c(t, s), c(s, r), c(r, m), c(t, v), c(v, g), c(g, p), c(e, M), c(e, P), c(P, x), A || (d = [
|
|
150
|
+
W(
|
|
151
|
+
t,
|
|
152
|
+
"click",
|
|
153
|
+
/*goToHome*/
|
|
154
|
+
n[13]
|
|
155
|
+
),
|
|
156
|
+
W(
|
|
157
|
+
P,
|
|
158
|
+
"click",
|
|
159
|
+
/*goToHome*/
|
|
160
|
+
n[13]
|
|
161
|
+
)
|
|
162
|
+
], A = !0);
|
|
163
|
+
},
|
|
164
|
+
p(u, o) {
|
|
165
|
+
o[0] & /*$_*/
|
|
166
|
+
512 && h !== (h = /*$_*/
|
|
167
|
+
u[9]("title") + "") && z(x, h);
|
|
168
|
+
},
|
|
169
|
+
d(u) {
|
|
170
|
+
u && B(e), A = !1, Ae(d);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function xe(n) {
|
|
175
|
+
let e, t;
|
|
176
|
+
return {
|
|
177
|
+
c() {
|
|
178
|
+
e = w("div"), t = w("general-logout"), b(
|
|
179
|
+
t,
|
|
180
|
+
"endpoint",
|
|
181
|
+
/*endpoint*/
|
|
182
|
+
n[1]
|
|
183
|
+
), b(
|
|
184
|
+
t,
|
|
185
|
+
"session",
|
|
186
|
+
/*session*/
|
|
187
|
+
n[0]
|
|
188
|
+
), b(t, "buttonlocation", "PlayerAccountMenu"), b(
|
|
189
|
+
t,
|
|
190
|
+
"clientstyling",
|
|
191
|
+
/*clientstyling*/
|
|
192
|
+
n[2]
|
|
193
|
+
), b(
|
|
194
|
+
t,
|
|
195
|
+
"clientstylingurl",
|
|
196
|
+
/*clientstylingurl*/
|
|
197
|
+
n[3]
|
|
198
|
+
), i(e, "class", "PlayerAccountLogOutArea svelte-1snu0cv");
|
|
199
|
+
},
|
|
200
|
+
m(s, r) {
|
|
201
|
+
L(s, e, r), c(e, t);
|
|
202
|
+
},
|
|
203
|
+
p(s, r) {
|
|
204
|
+
r[0] & /*endpoint*/
|
|
205
|
+
2 && b(
|
|
206
|
+
t,
|
|
207
|
+
"endpoint",
|
|
208
|
+
/*endpoint*/
|
|
209
|
+
s[1]
|
|
210
|
+
), r[0] & /*session*/
|
|
211
|
+
1 && b(
|
|
212
|
+
t,
|
|
213
|
+
"session",
|
|
214
|
+
/*session*/
|
|
215
|
+
s[0]
|
|
216
|
+
), r[0] & /*clientstyling*/
|
|
217
|
+
4 && b(
|
|
218
|
+
t,
|
|
219
|
+
"clientstyling",
|
|
220
|
+
/*clientstyling*/
|
|
221
|
+
s[2]
|
|
222
|
+
), r[0] & /*clientstylingurl*/
|
|
223
|
+
8 && b(
|
|
224
|
+
t,
|
|
225
|
+
"clientstylingurl",
|
|
226
|
+
/*clientstylingurl*/
|
|
227
|
+
s[3]
|
|
228
|
+
);
|
|
229
|
+
},
|
|
230
|
+
d(s) {
|
|
231
|
+
s && B(e);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function Z(n) {
|
|
236
|
+
let e, t, s, r, m, v, g = (
|
|
237
|
+
/*menuItem*/
|
|
238
|
+
n[37].label + ""
|
|
239
|
+
), p, M, P, h, x;
|
|
240
|
+
function A() {
|
|
241
|
+
return (
|
|
242
|
+
/*click_handler*/
|
|
243
|
+
n[22](
|
|
244
|
+
/*menuItem*/
|
|
245
|
+
n[37]
|
|
246
|
+
)
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
c() {
|
|
251
|
+
e = w("div"), t = w("p"), s = w("img"), m = k(), v = w("span"), p = H(g), M = k(), i(s, "class", "PlayerAccountMenuItemIcon " + /*isMobile*/
|
|
252
|
+
(n[10] ? "PlayerAccountMenuItemIconMobile" : "") + " svelte-1snu0cv"), q(s.src, r = /*menuItem*/
|
|
253
|
+
n[37].img) || i(s, "src", r), i(v, "class", "PlayerAccountMenuItemTitle svelte-1snu0cv"), i(t, "class", "PlayerAccountMenuItemWrapper svelte-1snu0cv"), i(e, "class", P = "PlayerAccountMenuItemBox " + /*selectedItem*/
|
|
254
|
+
(n[6] === /*menuItem*/
|
|
255
|
+
n[37].id && !/*isMobile*/
|
|
256
|
+
n[10] ? "PlayerAccountMenuActiveItemBox" : "") + " svelte-1snu0cv");
|
|
257
|
+
},
|
|
258
|
+
m(d, u) {
|
|
259
|
+
L(d, e, u), c(e, t), c(t, s), c(t, m), c(t, v), c(v, p), c(e, M), h || (x = W(e, "click", A), h = !0);
|
|
260
|
+
},
|
|
261
|
+
p(d, u) {
|
|
262
|
+
n = d, u[0] & /*menuItems*/
|
|
263
|
+
32 && !q(s.src, r = /*menuItem*/
|
|
264
|
+
n[37].img) && i(s, "src", r), u[0] & /*menuItems*/
|
|
265
|
+
32 && g !== (g = /*menuItem*/
|
|
266
|
+
n[37].label + "") && z(p, g), u[0] & /*selectedItem, menuItems*/
|
|
267
|
+
96 && P !== (P = "PlayerAccountMenuItemBox " + /*selectedItem*/
|
|
268
|
+
(n[6] === /*menuItem*/
|
|
269
|
+
n[37].id && !/*isMobile*/
|
|
270
|
+
n[10] ? "PlayerAccountMenuActiveItemBox" : "") + " svelte-1snu0cv") && i(e, "class", P);
|
|
271
|
+
},
|
|
272
|
+
d(d) {
|
|
273
|
+
d && B(e), h = !1, x();
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function _e(n) {
|
|
278
|
+
let e, t;
|
|
279
|
+
return {
|
|
280
|
+
c() {
|
|
281
|
+
e = w("div"), t = w("general-logout"), b(
|
|
282
|
+
t,
|
|
283
|
+
"endpoint",
|
|
284
|
+
/*endpoint*/
|
|
285
|
+
n[1]
|
|
286
|
+
), b(
|
|
287
|
+
t,
|
|
288
|
+
"session",
|
|
289
|
+
/*session*/
|
|
290
|
+
n[0]
|
|
291
|
+
), b(t, "buttonlocation", "PlayerAccountMenu"), b(
|
|
292
|
+
t,
|
|
293
|
+
"clientstyling",
|
|
294
|
+
/*clientstyling*/
|
|
295
|
+
n[2]
|
|
296
|
+
), b(
|
|
297
|
+
t,
|
|
298
|
+
"clientstylingurl",
|
|
299
|
+
/*clientstylingurl*/
|
|
300
|
+
n[3]
|
|
301
|
+
), i(e, "class", "PlayerAccountLogOutArea svelte-1snu0cv");
|
|
302
|
+
},
|
|
303
|
+
m(s, r) {
|
|
304
|
+
L(s, e, r), c(e, t);
|
|
305
|
+
},
|
|
306
|
+
p(s, r) {
|
|
307
|
+
r[0] & /*endpoint*/
|
|
308
|
+
2 && b(
|
|
309
|
+
t,
|
|
310
|
+
"endpoint",
|
|
311
|
+
/*endpoint*/
|
|
312
|
+
s[1]
|
|
313
|
+
), r[0] & /*session*/
|
|
314
|
+
1 && b(
|
|
315
|
+
t,
|
|
316
|
+
"session",
|
|
317
|
+
/*session*/
|
|
318
|
+
s[0]
|
|
319
|
+
), r[0] & /*clientstyling*/
|
|
320
|
+
4 && b(
|
|
321
|
+
t,
|
|
322
|
+
"clientstyling",
|
|
323
|
+
/*clientstyling*/
|
|
324
|
+
s[2]
|
|
325
|
+
), r[0] & /*clientstylingurl*/
|
|
326
|
+
8 && b(
|
|
327
|
+
t,
|
|
328
|
+
"clientstylingurl",
|
|
329
|
+
/*clientstylingurl*/
|
|
330
|
+
s[3]
|
|
331
|
+
);
|
|
332
|
+
},
|
|
333
|
+
d(s) {
|
|
334
|
+
s && B(e);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
function Ce(n) {
|
|
339
|
+
let e;
|
|
340
|
+
function t(m, v) {
|
|
341
|
+
return Pe;
|
|
342
|
+
}
|
|
343
|
+
let r = t()(n);
|
|
344
|
+
return {
|
|
345
|
+
c() {
|
|
346
|
+
e = w("div"), r.c();
|
|
347
|
+
},
|
|
348
|
+
m(m, v) {
|
|
349
|
+
L(m, e, v), r.m(e, null), n[23](e);
|
|
350
|
+
},
|
|
351
|
+
p(m, v) {
|
|
352
|
+
r.p(m, v);
|
|
353
|
+
},
|
|
354
|
+
i: j,
|
|
355
|
+
o: j,
|
|
356
|
+
d(m) {
|
|
357
|
+
m && B(e), r.d(), n[23](null);
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
function Fe(n, e, t) {
|
|
362
|
+
let s;
|
|
363
|
+
ge(n, pe, (l) => t(9, s = l));
|
|
364
|
+
let { endpoint: r = "" } = e, { cmsendpoint: m = "" } = e, { env: v = "" } = e, { session: g = "" } = e, { playerid: p = "" } = e, { lang: M = "en" } = e, { selecteditem: P = "" } = e, { userroles: h = "" } = e, { clientstyling: x = "" } = e, { clientstylingurl: A = "" } = e, { translationurl: d = "" } = e, { activemenuitem: u = "" } = e, o, I = [], a, C = window.navigator.userAgent, f = R(C) !== "PC", T = "", S = "";
|
|
365
|
+
const Q = window.matchMedia("(min-width: 768px)"), J = () => {
|
|
366
|
+
fetch(d).then((y) => y.json()).then((y) => {
|
|
367
|
+
Object.keys(y).forEach((_) => {
|
|
368
|
+
G(_, y[_]);
|
|
369
|
+
});
|
|
370
|
+
}).catch((y) => {
|
|
371
|
+
console.error(y);
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
Object.keys(V).forEach((l) => {
|
|
375
|
+
G(l, V[l]);
|
|
376
|
+
});
|
|
377
|
+
const U = (l) => {
|
|
378
|
+
if (l.data)
|
|
379
|
+
switch (l.data.type) {
|
|
380
|
+
case "AccountMenuDetails":
|
|
381
|
+
availableMenuItemsArray = l.data.accountMenuInfo;
|
|
382
|
+
break;
|
|
383
|
+
case "UserSessionID":
|
|
384
|
+
t(0, g = l.data.session);
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
}, K = () => {
|
|
388
|
+
let l = R(C);
|
|
389
|
+
if (l)
|
|
390
|
+
return l === "PC" ? "dk" : "mtWeb";
|
|
391
|
+
}, Y = () => {
|
|
392
|
+
const l = new URL(`${m}/${M}/profile-menu?env=${v}`);
|
|
393
|
+
l.searchParams.append("device", K()), fetch(l.href).then((y) => y.json()).then((y) => {
|
|
394
|
+
t(5, I = y), O();
|
|
395
|
+
}).catch((y) => {
|
|
396
|
+
console.error("Error getting menu items", y);
|
|
397
|
+
});
|
|
398
|
+
}, $ = () => {
|
|
399
|
+
let l = new URL(`${r}/v1/player/${p}/profile`);
|
|
400
|
+
l.searchParams.append("userRoles", h);
|
|
401
|
+
let y = {
|
|
402
|
+
method: "GET",
|
|
403
|
+
headers: { "X-SessionID": g }
|
|
404
|
+
};
|
|
405
|
+
fetch(l.href, y).then((_) => _.json()).then(
|
|
406
|
+
(_) => {
|
|
407
|
+
t(7, T = _.username), t(8, S = _.email);
|
|
408
|
+
},
|
|
409
|
+
(_) => {
|
|
410
|
+
console.error(_);
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
}, D = (l) => {
|
|
414
|
+
window.postMessage({ type: "ChangeAccountPage", page: l }, window.location.href), t(6, a = l.id);
|
|
415
|
+
}, O = () => {
|
|
416
|
+
var l;
|
|
417
|
+
t(6, a = (l = I.find((y) => y.path.includes(u))) == null ? void 0 : l.id);
|
|
418
|
+
}, ee = () => {
|
|
419
|
+
window.postMessage({ type: "GoToHomepage" }, window.location.href);
|
|
420
|
+
}, te = () => {
|
|
421
|
+
be(M);
|
|
422
|
+
}, ne = () => {
|
|
423
|
+
$();
|
|
424
|
+
}, le = () => {
|
|
425
|
+
let l = document.createElement("style");
|
|
426
|
+
l.innerHTML = x, o.appendChild(l);
|
|
427
|
+
}, se = () => {
|
|
428
|
+
let l = new URL(A), y = document.createElement("style");
|
|
429
|
+
fetch(l.href).then((_) => _.text()).then((_) => {
|
|
430
|
+
y.innerHTML = _, setTimeout(
|
|
431
|
+
() => {
|
|
432
|
+
o.appendChild(y);
|
|
433
|
+
},
|
|
434
|
+
1
|
|
435
|
+
);
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
fe(() => (window.addEventListener("message", U, !1), () => {
|
|
439
|
+
window.removeEventListener("message", U);
|
|
440
|
+
}));
|
|
441
|
+
const re = (l) => D(l);
|
|
442
|
+
function ce(l) {
|
|
443
|
+
ye[l ? "unshift" : "push"](() => {
|
|
444
|
+
o = l, t(4, o);
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
return n.$$set = (l) => {
|
|
448
|
+
"endpoint" in l && t(1, r = l.endpoint), "cmsendpoint" in l && t(14, m = l.cmsendpoint), "env" in l && t(15, v = l.env), "session" in l && t(0, g = l.session), "playerid" in l && t(16, p = l.playerid), "lang" in l && t(17, M = l.lang), "selecteditem" in l && t(18, P = l.selecteditem), "userroles" in l && t(19, h = l.userroles), "clientstyling" in l && t(2, x = l.clientstyling), "clientstylingurl" in l && t(3, A = l.clientstylingurl), "translationurl" in l && t(20, d = l.translationurl), "activemenuitem" in l && t(21, u = l.activemenuitem);
|
|
449
|
+
}, n.$$.update = () => {
|
|
450
|
+
n.$$.dirty[0] & /*lang*/
|
|
451
|
+
131072 && M && te(), n.$$.dirty[0] & /*endpoint, session, playerid, lang*/
|
|
452
|
+
196611 && r && g && p && M && ne(), n.$$.dirty[0] & /*cmsendpoint, lang, env*/
|
|
453
|
+
180224 && m && M && v && Y(), n.$$.dirty[0] & /*activemenuitem*/
|
|
454
|
+
2097152 && u && O(), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
|
|
455
|
+
24 && A && o && se(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
|
|
456
|
+
20 && x && o && le(), n.$$.dirty[0] & /*translationurl*/
|
|
457
|
+
1048576 && d && J();
|
|
458
|
+
}, [
|
|
459
|
+
g,
|
|
460
|
+
r,
|
|
461
|
+
x,
|
|
462
|
+
A,
|
|
463
|
+
o,
|
|
464
|
+
I,
|
|
465
|
+
a,
|
|
466
|
+
T,
|
|
467
|
+
S,
|
|
468
|
+
s,
|
|
469
|
+
f,
|
|
470
|
+
Q,
|
|
471
|
+
D,
|
|
472
|
+
ee,
|
|
473
|
+
m,
|
|
474
|
+
v,
|
|
475
|
+
p,
|
|
476
|
+
M,
|
|
477
|
+
P,
|
|
478
|
+
h,
|
|
479
|
+
d,
|
|
480
|
+
u,
|
|
481
|
+
re,
|
|
482
|
+
ce
|
|
483
|
+
];
|
|
484
|
+
}
|
|
485
|
+
class Ie extends ie {
|
|
486
|
+
constructor(e) {
|
|
487
|
+
super(), ue(
|
|
488
|
+
this,
|
|
489
|
+
e,
|
|
490
|
+
Fe,
|
|
491
|
+
Ce,
|
|
492
|
+
me,
|
|
493
|
+
{
|
|
494
|
+
endpoint: 1,
|
|
495
|
+
cmsendpoint: 14,
|
|
496
|
+
env: 15,
|
|
497
|
+
session: 0,
|
|
498
|
+
playerid: 16,
|
|
499
|
+
lang: 17,
|
|
500
|
+
selecteditem: 18,
|
|
501
|
+
userroles: 19,
|
|
502
|
+
clientstyling: 2,
|
|
503
|
+
clientstylingurl: 3,
|
|
504
|
+
translationurl: 20,
|
|
505
|
+
activemenuitem: 21
|
|
506
|
+
},
|
|
507
|
+
Me,
|
|
508
|
+
[-1, -1]
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
get endpoint() {
|
|
512
|
+
return this.$$.ctx[1];
|
|
513
|
+
}
|
|
514
|
+
set endpoint(e) {
|
|
515
|
+
this.$$set({ endpoint: e }), F();
|
|
516
|
+
}
|
|
517
|
+
get cmsendpoint() {
|
|
518
|
+
return this.$$.ctx[14];
|
|
519
|
+
}
|
|
520
|
+
set cmsendpoint(e) {
|
|
521
|
+
this.$$set({ cmsendpoint: e }), F();
|
|
522
|
+
}
|
|
523
|
+
get env() {
|
|
524
|
+
return this.$$.ctx[15];
|
|
525
|
+
}
|
|
526
|
+
set env(e) {
|
|
527
|
+
this.$$set({ env: e }), F();
|
|
528
|
+
}
|
|
529
|
+
get session() {
|
|
530
|
+
return this.$$.ctx[0];
|
|
531
|
+
}
|
|
532
|
+
set session(e) {
|
|
533
|
+
this.$$set({ session: e }), F();
|
|
534
|
+
}
|
|
535
|
+
get playerid() {
|
|
536
|
+
return this.$$.ctx[16];
|
|
537
|
+
}
|
|
538
|
+
set playerid(e) {
|
|
539
|
+
this.$$set({ playerid: e }), F();
|
|
540
|
+
}
|
|
541
|
+
get lang() {
|
|
542
|
+
return this.$$.ctx[17];
|
|
543
|
+
}
|
|
544
|
+
set lang(e) {
|
|
545
|
+
this.$$set({ lang: e }), F();
|
|
546
|
+
}
|
|
547
|
+
get selecteditem() {
|
|
548
|
+
return this.$$.ctx[18];
|
|
549
|
+
}
|
|
550
|
+
set selecteditem(e) {
|
|
551
|
+
this.$$set({ selecteditem: e }), F();
|
|
552
|
+
}
|
|
553
|
+
get userroles() {
|
|
554
|
+
return this.$$.ctx[19];
|
|
555
|
+
}
|
|
556
|
+
set userroles(e) {
|
|
557
|
+
this.$$set({ userroles: e }), F();
|
|
558
|
+
}
|
|
559
|
+
get clientstyling() {
|
|
560
|
+
return this.$$.ctx[2];
|
|
561
|
+
}
|
|
562
|
+
set clientstyling(e) {
|
|
563
|
+
this.$$set({ clientstyling: e }), F();
|
|
564
|
+
}
|
|
565
|
+
get clientstylingurl() {
|
|
566
|
+
return this.$$.ctx[3];
|
|
567
|
+
}
|
|
568
|
+
set clientstylingurl(e) {
|
|
569
|
+
this.$$set({ clientstylingurl: e }), F();
|
|
570
|
+
}
|
|
571
|
+
get translationurl() {
|
|
572
|
+
return this.$$.ctx[20];
|
|
573
|
+
}
|
|
574
|
+
set translationurl(e) {
|
|
575
|
+
this.$$set({ translationurl: e }), F();
|
|
576
|
+
}
|
|
577
|
+
get activemenuitem() {
|
|
578
|
+
return this.$$.ctx[21];
|
|
579
|
+
}
|
|
580
|
+
set activemenuitem(e) {
|
|
581
|
+
this.$$set({ activemenuitem: e }), F();
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
ve(Ie, { endpoint: {}, cmsendpoint: {}, env: {}, session: {}, playerid: {}, lang: {}, selecteditem: {}, userroles: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, activemenuitem: {} }, [], [], !0);
|
|
585
|
+
export {
|
|
586
|
+
Ie as default
|
|
587
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralLogout-D9s7c6oJ.cjs");function E(l,t){e.addMessages(l,t)}function X(l){e.$locale.set(l)}const L={en:{title:"My Account"},"zh-hk":{title:"我的帳戶"},fr:{title:"Mon compte"},tr:{title:"Hesabım"},ro:{title:"Contul meu"},es:{title:"Mi Cuenta"},pt:{title:"Minha Conta"},hr:{title:"Moj račun"},"pt-br":{title:"Minha conta"},"es-mx":{title:"Mi cuenta"}};if(typeof window!="undefined"){let l=function(t){return function(...n){try{return t.apply(this,n)}catch(a){if(a instanceof DOMException&&a.message.includes("has already been used with this registry")||a.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw a}}};customElements.define=l(customElements.define),Promise.resolve().then(()=>require("./GeneralLogout-D9s7c6oJ.cjs")).then(t=>t.GeneralLogout_ce).then(({default:t})=>{!customElements.get("general-logout")&&customElements.define("general-logout",t.element)})}function Z(l){e.append_styles(l,"svelte-1snu0cv",'.PlayerAccountMenuContainer.svelte-1snu0cv.svelte-1snu0cv{color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF));position:relative;height:100vh;display:flex;flex-direction:column;padding:0 15px}.PlayerAccountMenuContainer.svelte-1snu0cv .PlayerAccountMenuItemWrapper.svelte-1snu0cv{margin:0;word-break:break-all;display:flex;align-items:center}.PlayerAccountMenuContainer.svelte-1snu0cv .PlayerAccountMenuItemWrapper span.svelte-1snu0cv{display:flex;align-items:center}.PlayerAccountMenuHeader.svelte-1snu0cv.svelte-1snu0cv{color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF));flex-grow:0;padding:30px 20px}.PlayerAccountMenuHeader.svelte-1snu0cv .PlayerAccountMenuUser.svelte-1snu0cv{margin-bottom:5px;font-size:18px;color:var(--emfe-w-pam-color-secondary, var(--emfe-w-color-secondary, #E98B10))}.PlayerAccountMenuHeader.svelte-1snu0cv .PlayerAccountMenuEmail.svelte-1snu0cv{font-size:14px;text-overflow:ellipsis;overflow:hidden}.PlayerAccountMenuHeader.svelte-1snu0cv p.svelte-1snu0cv{font-weight:300}.PlayerAccountMenuHeaderMobile.svelte-1snu0cv.svelte-1snu0cv{color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF))}.PlayerAccountMenuItemBox.svelte-1snu0cv.svelte-1snu0cv{padding:16px 20px;font-size:16px;line-height:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;border-radius:var(--emw--border-radius-medium, 20px);border:2px solid transparent;cursor:pointer;transition:all 0.3s linear}.PlayerAccountMenuItemBox.svelte-1snu0cv.svelte-1snu0cv:hover{transition:all 0.3s linear;background:rgba(35, 176, 78, 0.3);border:2px solid var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);color:var(--emfe-w-color-white, #FFFFFF)}.PlayerAccountMenuItemBox.svelte-1snu0cv .PlayerAccountMenuItemTitle.svelte-1snu0cv{margin-left:20px}.PlayerAccountMenuItemBox.svelte-1snu0cv .PlayerAccountMenuItemIcon.svelte-1snu0cv{width:20px;padding-top:unset}.PlayerAccountMenuItemBox.svelte-1snu0cv .PlayerAccountMenuItemIconMobile.svelte-1snu0cv{width:30px;padding-top:15px}.PlayerAccountMenuList.svelte-1snu0cv.svelte-1snu0cv::-webkit-scrollbar{width:6px}.PlayerAccountMenuList.svelte-1snu0cv.svelte-1snu0cv::-webkit-scrollbar-track{background:var(--emfe-w-color-gray-300, #58586B)}.PlayerAccountMenuList.svelte-1snu0cv.svelte-1snu0cv::-webkit-scrollbar-thumb{background:var(--emfe-w-color-gray-100, #E6E6E6)}.PlayerAccountLogOutArea.svelte-1snu0cv.svelte-1snu0cv{background-color:rgba(253, 40, 57, 0.3);color:var(--emfe-w-color-white, #FFFFFF);border-radius:var(--emw--border-radius-medium, 20px);width:100%;flex-grow:0}.PlayerAccountMenuActiveItemBox.svelte-1snu0cv.svelte-1snu0cv{background:rgba(35, 176, 78, 0.3);color:var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border:2px solid var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);transition:all 0.3s linear}.PlayerAccountMobileContainer.svelte-1snu0cv.svelte-1snu0cv{height:unset;padding:0}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuCategoryWrapper.svelte-1snu0cv{display:flex;align-items:center;gap:10px;margin-bottom:18px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuCategoryTitle.svelte-1snu0cv{margin:0;font-weight:600}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuItemTitle.svelte-1snu0cv{margin-left:0;text-transform:capitalize;line-height:14px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuEmail.svelte-1snu0cv{margin:0}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList.svelte-1snu0cv{display:flex;flex-direction:column;align-items:flex-start;margin:0px 15px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox.svelte-1snu0cv{background:rgba(35, 176, 78, 0.3);color:var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border:2px solid var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #23B04E));border-radius:var(--emw--border-radius-medium, 20px);height:60px;margin:5px 0;align-items:flex-start;position:relative}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox.PlayerAccountMenuActiveItemBox.svelte-1snu0cv{background:var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C))}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon.svelte-1snu0cv{width:20px;padding:0 10px 0 15px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox.svelte-1snu0cv::after{content:"";display:inline-block;width:15px;height:15px;background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2215%22 height=%2215%22 viewBox=%220 0 15 15%22%3E%3Cdefs%3E%3Cstyle%3E.aaa%7Bfill:var(--emfe-w-color-white,%20%23FFFFFF);%7D%3C/style%3E%3C/defs%3E%3Cg transform=%22translate(-20%20-158)%22%3E%3Cg transform=%22translate(20%20158)%22%3E%3Cpath class=%22aaa%22 d=%22M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z%22 transform=%22translate(15%2015)%20rotate(180)%22%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");background-size:contain;transform:scaleX(-1);background-repeat:no-repeat;position:absolute;right:15px;top:22px}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper.svelte-1snu0cv{display:flex;justify-items:center;align-items:center;flex-flow:row;gap:6px;position:absolute;top:0;bottom:0;left:0;right:0}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle.svelte-1snu0cv{font-size:16px;line-height:16px;font-weight:400;word-break:break-word;text-align:left;color:var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF))}.PlayerAccountMobileContainer.svelte-1snu0cv .PlayerAccountLogOutArea.svelte-1snu0cv{position:absolute;right:18px;top:56px;bottom:unset;background:transparent;width:48px;border-top:0}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuHeader.svelte-1snu0cv{padding:30px 40px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuCategoryTitle.svelte-1snu0cv{font-size:32px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuUser.svelte-1snu0cv{font-size:26px;color:var(--emfe-w-pam-color-secondary, var(--emfe-w-color-secondary, #E98B10))}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuEmail.svelte-1snu0cv{font-size:20px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList.svelte-1snu0cv{column-gap:20px;row-gap:20px;padding:0 40px 40px;grid-template-columns:calc(33% - 11px) calc(33% - 11px) calc(33% - 11px)}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemBox .PlayerAccountMenuItemIcon.svelte-1snu0cv{width:80px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper.svelte-1snu0cv{gap:28px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountMenuList .PlayerAccountMenuItemWrapper .PlayerAccountMenuItemTitle.svelte-1snu0cv{font-size:24px}.PlayerAccountTabletContainer.svelte-1snu0cv .PlayerAccountLogOutArea.svelte-1snu0cv{right:54px;top:72px}')}function T(l,t,n){const a=l.slice();return a[37]=t[n],a}function Q(l){let t,n,a,r,m,u,d,f,_,A,y,b,h=l[10]&&J(l),v=l[10]&&K(l),i=e.ensure_array_like(l[5]),o=[];for(let c=0;c<i.length;c+=1)o[c]=B(T(l,i,c));let w=!l[10]&&Y(l);return{c(){t=e.element("div"),n=e.element("div"),h&&h.c(),a=e.space(),r=e.element("p"),m=e.text(l[7]),u=e.space(),d=e.element("p"),f=e.text(l[8]),_=e.space(),v&&v.c(),A=e.space(),y=e.element("div");for(let c=0;c<o.length;c+=1)o[c].c();b=e.space(),w&&w.c(),e.attr(r,"class","PlayerAccountMenuUser svelte-1snu0cv"),e.attr(d,"class","PlayerAccountMenuEmail svelte-1snu0cv"),e.attr(n,"class","PlayerAccountMenuHeader "+(l[10]?"PlayerAccountMenuHeaderMobile":"")+" svelte-1snu0cv"),e.attr(y,"class","PlayerAccountMenuList svelte-1snu0cv"),e.attr(t,"class","PlayerAccountMenuContainer "+(l[10]?"PlayerAccountMobileContainer":"")+" "+(l[11].matches&&l[10]?"PlayerAccountTabletContainer":"")+" svelte-1snu0cv")},m(c,P){e.insert(c,t,P),e.append(t,n),h&&h.m(n,null),e.append(n,a),e.append(n,r),e.append(r,m),e.append(n,u),e.append(n,d),e.append(d,f),e.append(n,_),v&&v.m(n,null),e.append(t,A),e.append(t,y);for(let p=0;p<o.length;p+=1)o[p]&&o[p].m(y,null);e.append(t,b),w&&w.m(t,null)},p(c,P){if(c[10]&&h.p(c,P),P[0]&128&&e.set_data(m,c[7]),P[0]&256&&e.set_data(f,c[8]),c[10]&&v.p(c,P),P[0]&5216){i=e.ensure_array_like(c[5]);let p;for(p=0;p<i.length;p+=1){const x=T(c,i,p);o[p]?o[p].p(x,P):(o[p]=B(x),o[p].c(),o[p].m(y,null))}for(;p<o.length;p+=1)o[p].d(1);o.length=i.length}c[10]||w.p(c,P)},d(c){c&&e.detach(t),h&&h.d(),v&&v.d(),e.destroy_each(o,c),w&&w.d()}}}function J(l){let t,n,a,r,m,u,d,f,_,A,y=l[9]("title")+"",b,h,v;return{c(){t=e.element("div"),n=e.svg_element("svg"),a=e.svg_element("defs"),r=e.svg_element("style"),m=e.text(".aaa{fill:var(--emfe-w-color-white, #FFFFFF);}"),u=e.svg_element("g"),d=e.svg_element("g"),f=e.svg_element("path"),_=e.space(),A=e.element("h3"),b=e.text(y),e.attr(f,"class","aaa"),e.attr(f,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(f,"transform","translate(15 15) rotate(180)"),e.attr(d,"transform","translate(20 158)"),e.attr(u,"transform","translate(-20 -158)"),e.attr(n,"xmlns","http://www.w3.org/2000/svg"),e.attr(n,"width","15"),e.attr(n,"height","15"),e.attr(n,"viewBox","0 0 15 15"),e.attr(A,"class","PlayerAccountMenuCategoryTitle svelte-1snu0cv"),e.attr(t,"class","PlayerAccountMenuCategoryWrapper svelte-1snu0cv")},m(i,o){e.insert(i,t,o),e.append(t,n),e.append(n,a),e.append(a,r),e.append(r,m),e.append(n,u),e.append(u,d),e.append(d,f),e.append(t,_),e.append(t,A),e.append(A,b),h||(v=[e.listen(n,"click",l[13]),e.listen(A,"click",l[13])],h=!0)},p(i,o){o[0]&512&&y!==(y=i[9]("title")+"")&&e.set_data(b,y)},d(i){i&&e.detach(t),h=!1,e.run_all(v)}}}function K(l){let t,n;return{c(){t=e.element("div"),n=e.element("general-logout"),e.set_custom_element_data(n,"endpoint",l[1]),e.set_custom_element_data(n,"session",l[0]),e.set_custom_element_data(n,"buttonlocation","PlayerAccountMenu"),e.set_custom_element_data(n,"clientstyling",l[2]),e.set_custom_element_data(n,"clientstylingurl",l[3]),e.attr(t,"class","PlayerAccountLogOutArea svelte-1snu0cv")},m(a,r){e.insert(a,t,r),e.append(t,n)},p(a,r){r[0]&2&&e.set_custom_element_data(n,"endpoint",a[1]),r[0]&1&&e.set_custom_element_data(n,"session",a[0]),r[0]&4&&e.set_custom_element_data(n,"clientstyling",a[2]),r[0]&8&&e.set_custom_element_data(n,"clientstylingurl",a[3])},d(a){a&&e.detach(t)}}}function B(l){let t,n,a,r,m,u,d=l[37].label+"",f,_,A,y,b;function h(){return l[22](l[37])}return{c(){t=e.element("div"),n=e.element("p"),a=e.element("img"),m=e.space(),u=e.element("span"),f=e.text(d),_=e.space(),e.attr(a,"class","PlayerAccountMenuItemIcon "+(l[10]?"PlayerAccountMenuItemIconMobile":"")+" svelte-1snu0cv"),e.src_url_equal(a.src,r=l[37].img)||e.attr(a,"src",r),e.attr(u,"class","PlayerAccountMenuItemTitle svelte-1snu0cv"),e.attr(n,"class","PlayerAccountMenuItemWrapper svelte-1snu0cv"),e.attr(t,"class",A="PlayerAccountMenuItemBox "+(l[6]===l[37].id&&!l[10]?"PlayerAccountMenuActiveItemBox":"")+" svelte-1snu0cv")},m(v,i){e.insert(v,t,i),e.append(t,n),e.append(n,a),e.append(n,m),e.append(n,u),e.append(u,f),e.append(t,_),y||(b=e.listen(t,"click",h),y=!0)},p(v,i){l=v,i[0]&32&&!e.src_url_equal(a.src,r=l[37].img)&&e.attr(a,"src",r),i[0]&32&&d!==(d=l[37].label+"")&&e.set_data(f,d),i[0]&96&&A!==(A="PlayerAccountMenuItemBox "+(l[6]===l[37].id&&!l[10]?"PlayerAccountMenuActiveItemBox":"")+" svelte-1snu0cv")&&e.attr(t,"class",A)},d(v){v&&e.detach(t),y=!1,b()}}}function Y(l){let t,n;return{c(){t=e.element("div"),n=e.element("general-logout"),e.set_custom_element_data(n,"endpoint",l[1]),e.set_custom_element_data(n,"session",l[0]),e.set_custom_element_data(n,"buttonlocation","PlayerAccountMenu"),e.set_custom_element_data(n,"clientstyling",l[2]),e.set_custom_element_data(n,"clientstylingurl",l[3]),e.attr(t,"class","PlayerAccountLogOutArea svelte-1snu0cv")},m(a,r){e.insert(a,t,r),e.append(t,n)},p(a,r){r[0]&2&&e.set_custom_element_data(n,"endpoint",a[1]),r[0]&1&&e.set_custom_element_data(n,"session",a[0]),r[0]&4&&e.set_custom_element_data(n,"clientstyling",a[2]),r[0]&8&&e.set_custom_element_data(n,"clientstylingurl",a[3])},d(a){a&&e.detach(t)}}}function $(l){let t;function n(m,u){return Q}let r=n()(l);return{c(){t=e.element("div"),r.c()},m(m,u){e.insert(m,t,u),r.m(t,null),l[23](t)},p(m,u){r.p(m,u)},i:e.noop,o:e.noop,d(m){m&&e.detach(t),r.d(),l[23](null)}}}function ee(l,t,n){let a;e.component_subscribe(l,e.$format,s=>n(9,a=s));let{endpoint:r=""}=t,{cmsendpoint:m=""}=t,{env:u=""}=t,{session:d=""}=t,{playerid:f=""}=t,{lang:_="en"}=t,{selecteditem:A=""}=t,{userroles:y=""}=t,{clientstyling:b=""}=t,{clientstylingurl:h=""}=t,{translationurl:v=""}=t,{activemenuitem:i=""}=t,o,w=[],c,P=window.navigator.userAgent,p=e.getDevice(P)!=="PC",x="",C="";const z=window.matchMedia("(min-width: 768px)"),S=()=>{fetch(v).then(g=>g.json()).then(g=>{Object.keys(g).forEach(M=>{E(M,g[M])})}).catch(g=>{console.error(g)})};Object.keys(L).forEach(s=>{E(s,L[s])});const F=s=>{if(s.data)switch(s.data.type){case"AccountMenuDetails":availableMenuItemsArray=s.data.accountMenuInfo;break;case"UserSessionID":n(0,d=s.data.session);break}},W=()=>{let s=e.getDevice(P);if(s)return s==="PC"?"dk":"mtWeb"},D=()=>{const s=new URL(`${m}/${_}/profile-menu?env=${u}`);s.searchParams.append("device",W()),fetch(s.href).then(g=>g.json()).then(g=>{n(5,w=g),k()}).catch(g=>{console.error("Error getting menu items",g)})},O=()=>{let s=new URL(`${r}/v1/player/${f}/profile`);s.searchParams.append("userRoles",y);let g={method:"GET",headers:{"X-SessionID":d}};fetch(s.href,g).then(M=>M.json()).then(M=>{n(7,x=M.username),n(8,C=M.email)},M=>{console.error(M)})},I=s=>{window.postMessage({type:"ChangeAccountPage",page:s},window.location.href),n(6,c=s.id)},k=()=>{var s;n(6,c=(s=w.find(g=>g.path.includes(i)))==null?void 0:s.id)},U=()=>{window.postMessage({type:"GoToHomepage"},window.location.href)},j=()=>{X(_)},R=()=>{O()},q=()=>{let s=document.createElement("style");s.innerHTML=b,o.appendChild(s)},G=()=>{let s=new URL(h),g=document.createElement("style");fetch(s.href).then(M=>M.text()).then(M=>{g.innerHTML=M,setTimeout(()=>{o.appendChild(g)},1)})};e.onMount(()=>(window.addEventListener("message",F,!1),()=>{window.removeEventListener("message",F)}));const N=s=>I(s);function V(s){e.binding_callbacks[s?"unshift":"push"](()=>{o=s,n(4,o)})}return l.$$set=s=>{"endpoint"in s&&n(1,r=s.endpoint),"cmsendpoint"in s&&n(14,m=s.cmsendpoint),"env"in s&&n(15,u=s.env),"session"in s&&n(0,d=s.session),"playerid"in s&&n(16,f=s.playerid),"lang"in s&&n(17,_=s.lang),"selecteditem"in s&&n(18,A=s.selecteditem),"userroles"in s&&n(19,y=s.userroles),"clientstyling"in s&&n(2,b=s.clientstyling),"clientstylingurl"in s&&n(3,h=s.clientstylingurl),"translationurl"in s&&n(20,v=s.translationurl),"activemenuitem"in s&&n(21,i=s.activemenuitem)},l.$$.update=()=>{l.$$.dirty[0]&131072&&_&&j(),l.$$.dirty[0]&196611&&r&&d&&f&&_&&R(),l.$$.dirty[0]&180224&&m&&_&&u&&D(),l.$$.dirty[0]&2097152&&i&&k(),l.$$.dirty[0]&24&&h&&o&&G(),l.$$.dirty[0]&20&&b&&o&&q(),l.$$.dirty[0]&1048576&&v&&S()},[d,r,b,h,o,w,c,x,C,a,p,z,I,U,m,u,f,_,A,y,v,i,N,V]}class H extends e.SvelteComponent{constructor(t){super(),e.init(this,t,ee,$,e.safe_not_equal,{endpoint:1,cmsendpoint:14,env:15,session:0,playerid:16,lang:17,selecteditem:18,userroles:19,clientstyling:2,clientstylingurl:3,translationurl:20,activemenuitem:21},Z,[-1,-1])}get endpoint(){return this.$$.ctx[1]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get cmsendpoint(){return this.$$.ctx[14]}set cmsendpoint(t){this.$$set({cmsendpoint:t}),e.flush()}get env(){return this.$$.ctx[15]}set env(t){this.$$set({env:t}),e.flush()}get session(){return this.$$.ctx[0]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[16]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[17]}set lang(t){this.$$set({lang:t}),e.flush()}get selecteditem(){return this.$$.ctx[18]}set selecteditem(t){this.$$set({selecteditem:t}),e.flush()}get userroles(){return this.$$.ctx[19]}set userroles(t){this.$$set({userroles:t}),e.flush()}get clientstyling(){return this.$$.ctx[2]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[3]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[20]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get activemenuitem(){return this.$$.ctx[21]}set activemenuitem(t){this.$$set({activemenuitem:t}),e.flush()}}e.create_custom_element(H,{endpoint:{},cmsendpoint:{},env:{},session:{},playerid:{},lang:{},selecteditem:{},userroles:{},clientstyling:{},clientstylingurl:{},translationurl:{},activemenuitem:{}},[],[],!0);exports.default=H;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountMenuNd-FNhGvQcn.cjs")).then(({default:t})=>{!customElements.get("player-account-menu-nd")&&customElements.define("player-account-menu-nd",t.element)})}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
if (typeof window != "undefined") {
|
|
2
|
+
let n = function(t) {
|
|
3
|
+
return function(...s) {
|
|
4
|
+
try {
|
|
5
|
+
return t.apply(this, s);
|
|
6
|
+
} catch (e) {
|
|
7
|
+
if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
8
|
+
return !1;
|
|
9
|
+
throw e;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/PlayerAccountMenuNd-CfdQm129.js").then(({ default: t }) => {
|
|
14
|
+
!customElements.get("player-account-menu-nd") && customElements.define("player-account-menu-nd", t.element);
|
|
15
|
+
});
|
|
16
|
+
}
|