@everymatrix/player-account-menu 1.99.57 → 1.99.59

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.
@@ -1,300 +0,0 @@
1
- import { a as q, $ as D, S as V, i as Z, s as Q, f as p, b as X, n as F, d as v, c as B, e as w, g as Y, h as J, o as K, j as W, k as f, l as E, m as x, t as k, p as $, q as b, r as tt, u as I, v as L, w as et, x as nt, y as ot, z as st } from "./PlayerAccountMenu-gooXNa1g.js";
2
- const lt = (e, t = {}) => {
3
- const o = new CustomEvent("track-custom-event", {
4
- detail: {
5
- type: e,
6
- data: t
7
- },
8
- bubbles: !0,
9
- composed: !0
10
- });
11
- document.dispatchEvent(o);
12
- };
13
- function P(e, t) {
14
- q(e, t);
15
- }
16
- function it(e) {
17
- D.set(e);
18
- }
19
- const S = {
20
- en: {
21
- logoutButton: "Logout"
22
- },
23
- "zh-hk": {
24
- logoutButton: "登出"
25
- },
26
- fr: {
27
- logoutButton: "Déconnexion"
28
- },
29
- tr: {
30
- logoutButton: "Çıkış Yap"
31
- },
32
- ro: {
33
- logoutButton: "Iesire"
34
- },
35
- es: {
36
- logoutButton: "Cerrar sesión"
37
- },
38
- pt: {
39
- logoutButton: "Sair"
40
- },
41
- hr: {
42
- logoutButton: "Odjava"
43
- },
44
- "pt-br": {
45
- logoutButton: "Fechar Sessão"
46
- },
47
- "es-mx": {
48
- logoutButton: "Cerrar sesión"
49
- },
50
- "en-us": {
51
- logoutButton: "Logout"
52
- }
53
- };
54
- function at(e) {
55
- X(e, "svelte-xtnqa3", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.PlayerAccountMenuItemBox{padding:20px;font-size:16px;display:inline-flex;width:100%;box-sizing:border-box;align-items:center;cursor:pointer}.PlayerAccountMenuItemBox .PlayerLogoutText{margin-left:20px}.PlayerAccountMenuItemBox svg{fill:var(--emw--pam-typography-color-nav-bg, var(--emw--color-white, #FFFFFF))}.PlayerAccountMenuItemBoxMobile.PlayerAccountMenuItemBox{height:auto;justify-content:center;position:relative;display:flex;width:unset;padding:0}.PlayerAccountMenuItemBoxMobile.PlayerAccountMenuItemBox svg{fill:var(--emw--pam-typography-color-nav-bg, var(--emw--color-white, #FFFFFF))}");
56
- }
57
- function rt(e) {
58
- let t, o, i, n = (
59
- /*$_*/
60
- e[2]("logoutButton") + ""
61
- ), l, a, c;
62
- return {
63
- c() {
64
- t = w("div"), o = w("button"), i = w("span"), l = k(n), b(t, "class", "GeneralLogout");
65
- },
66
- m(r, d) {
67
- B(r, t, d), f(t, o), f(o, i), f(i, l), a || (c = E(
68
- o,
69
- "click",
70
- /*click_handler_1*/
71
- e[14]
72
- ), a = !0);
73
- },
74
- p(r, d) {
75
- d & /*$_*/
76
- 4 && n !== (n = /*$_*/
77
- r[2]("logoutButton") + "") && I(l, n);
78
- },
79
- d(r) {
80
- r && v(t), a = !1, c();
81
- }
82
- };
83
- }
84
- function ut(e) {
85
- let t, o, i, n, l, a, c, r, d, h, _, g = !/*isMobile*/
86
- e[3] && ct(e);
87
- return {
88
- c() {
89
- t = w("p"), o = w("span"), i = x("svg"), n = x("defs"), l = x("style"), a = k(".a88316b4-2478-4a69-b2eb-d32a5fb419dd{fill:var(--emw--color-white, #FFFFFF);}"), c = x("path"), r = x("path"), d = $(), g && g.c(), b(c, "class", "a88316b4-2478-4a69-b2eb-d32a5fb419dd"), b(c, "d", "M147.16,67.69,115.42,36a9.6,9.6,0,1,0-13.58,13.58l15.32,15.31H49.58a9.63,9.63,0,1,0,0,19.26h67.58L101.84,99.42a9.64,9.64,0,0,0,6.79,16.43,9.41,9.41,0,0,0,6.79-2.85l31.74-31.73a9.53,9.53,0,0,0,0-13.58Z"), b(r, "class", "a88316b4-2478-4a69-b2eb-d32a5fb419dd"), b(r, "d", "M45.16,122.16H19.26V26.79H45.32a9.63,9.63,0,1,0,0-19.26H9.63A9.56,9.56,0,0,0,0,17.16V131.63a9.57,9.57,0,0,0,9.63,9.64H45.32A9.57,9.57,0,0,0,55,131.63a9.78,9.78,0,0,0-9.79-9.47Z"), b(i, "id", "bbfaf345-72af-4296-bf4b-2fd41fc03d5d"), b(i, "data-name", "Layer 1"), b(i, "xmlns", "http://www.w3.org/2000/svg"), b(i, "viewBox", "0 0 150 150"), tt(o, "width", /*isMobile*/
90
- e[3] ? (
91
- /*mediaQuery*/
92
- e[4].matches ? "20px" : "24px"
93
- ) : "20px"), b(t, "class", "PlayerAccountMenuItemBox " + /*isMobile*/
94
- (e[3] ? "PlayerAccountMenuItemBoxMobile" : "") + " " + /*mediaQuery*/
95
- (e[4].matches && /*isMobile*/
96
- e[3] ? "PlayerAccountMenuItemBoxTablet" : ""));
97
- },
98
- m(y, u) {
99
- B(y, t, u), f(t, o), f(o, i), f(i, n), f(n, l), f(l, a), f(i, c), f(i, r), f(t, d), g && g.m(t, null), h || (_ = E(
100
- t,
101
- "click",
102
- /*click_handler*/
103
- e[13]
104
- ), h = !0);
105
- },
106
- p(y, u) {
107
- /*isMobile*/
108
- y[3] || g.p(y, u);
109
- },
110
- d(y) {
111
- y && v(t), g && g.d(), h = !1, _();
112
- }
113
- };
114
- }
115
- function ct(e) {
116
- let t, o = (
117
- /*$_*/
118
- e[2]("logoutButton") + ""
119
- ), i;
120
- return {
121
- c() {
122
- t = w("span"), i = k(o), b(t, "class", "PlayerLogoutText");
123
- },
124
- m(n, l) {
125
- B(n, t, l), f(t, i);
126
- },
127
- p(n, l) {
128
- l & /*$_*/
129
- 4 && o !== (o = /*$_*/
130
- n[2]("logoutButton") + "") && I(i, o);
131
- },
132
- d(n) {
133
- n && v(t);
134
- }
135
- };
136
- }
137
- function dt(e) {
138
- let t;
139
- function o(l, a) {
140
- return (
141
- /*buttonlocation*/
142
- l[0] === "PlayerAccountMenu" ? ut : rt
143
- );
144
- }
145
- let i = o(e), n = i(e);
146
- return {
147
- c() {
148
- t = w("div"), n.c();
149
- },
150
- m(l, a) {
151
- B(l, t, a), n.m(t, null), e[15](t);
152
- },
153
- p(l, [a]) {
154
- i === (i = o(l)) && n ? n.p(l, a) : (n.d(1), n = i(l), n && (n.c(), n.m(t, null)));
155
- },
156
- i: F,
157
- o: F,
158
- d(l) {
159
- l && v(t), n.d(), e[15](null);
160
- }
161
- };
162
- }
163
- function gt(e, t, o) {
164
- let i;
165
- Y(e, st, (s) => o(2, i = s));
166
- let { endpoint: n = "" } = t, { session: l = "" } = t, { buttonlocation: a = "" } = t, { lang: c = "" } = t, { mbsource: r } = t, { clientstyling: d = "" } = t, { clientstylingurl: h = "" } = t, { translationurl: _ = "" } = t, g = "", y = !1, u, C, T = window.navigator.userAgent, O = J(T) !== "PC";
167
- const j = window.matchMedia("(min-width: 768px)"), H = () => {
168
- fetch(_).then((m) => m.json()).then((m) => {
169
- Object.keys(m).forEach((A) => {
170
- P(A, m[A]);
171
- });
172
- }).catch((m) => {
173
- console.log(m);
174
- });
175
- };
176
- Object.keys(S).forEach((s) => {
177
- P(s, S[s]);
178
- });
179
- const M = () => {
180
- let s = new Headers();
181
- s.append("Content-type", "application/json"), s.append("X-SessionID", l);
182
- let m = { method: "DELETE", headers: s };
183
- fetch(`${n}/v1/player/session/player`, m).then((A) => {
184
- window.postMessage({ type: "LogoutSuccessfull" }, window.location.href), lt("logged_out", {});
185
- });
186
- }, G = () => (n || (g = "GENERAL-LOGOUT - Endpoint is missing! Please provide a valid endpointURL.", y = !0, console.error(g)), l || (g = "GENERAL-LOGOUT - Session is missing! Please provide a valid session.", y = !0, console.error(g)), y), z = () => {
187
- it(c);
188
- };
189
- K(() => () => {
190
- });
191
- const N = () => M(), R = () => M();
192
- function U(s) {
193
- W[s ? "unshift" : "push"](() => {
194
- u = s, o(1, u);
195
- });
196
- }
197
- return e.$$set = (s) => {
198
- "endpoint" in s && o(6, n = s.endpoint), "session" in s && o(7, l = s.session), "buttonlocation" in s && o(0, a = s.buttonlocation), "lang" in s && o(8, c = s.lang), "mbsource" in s && o(9, r = s.mbsource), "clientstyling" in s && o(10, d = s.clientstyling), "clientstylingurl" in s && o(11, h = s.clientstylingurl), "translationurl" in s && o(12, _ = s.translationurl);
199
- }, e.$$.update = () => {
200
- e.$$.dirty & /*endpoint, session, buttonlocation*/
201
- 193 && n && l && a && G(), e.$$.dirty & /*lang*/
202
- 256 && c && z(), e.$$.dirty & /*clientstyling, customStylingContainer*/
203
- 1026 && d && u && L(), e.$$.dirty & /*clientstyling, customStylingContainer*/
204
- 1026 && d && u && L(u, d), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
205
- 2050 && h && u && et(u, h), e.$$.dirty & /*mbsource, customStylingContainer*/
206
- 514 && r && u && nt(u, `${r}.Style`, C), e.$$.dirty & /*translationurl*/
207
- 4096 && _ && H();
208
- }, [
209
- a,
210
- u,
211
- i,
212
- O,
213
- j,
214
- M,
215
- n,
216
- l,
217
- c,
218
- r,
219
- d,
220
- h,
221
- _,
222
- N,
223
- R,
224
- U
225
- ];
226
- }
227
- class ft extends V {
228
- constructor(t) {
229
- super(), Z(
230
- this,
231
- t,
232
- gt,
233
- dt,
234
- Q,
235
- {
236
- endpoint: 6,
237
- session: 7,
238
- buttonlocation: 0,
239
- lang: 8,
240
- mbsource: 9,
241
- clientstyling: 10,
242
- clientstylingurl: 11,
243
- translationurl: 12
244
- },
245
- at
246
- );
247
- }
248
- get endpoint() {
249
- return this.$$.ctx[6];
250
- }
251
- set endpoint(t) {
252
- this.$$set({ endpoint: t }), p();
253
- }
254
- get session() {
255
- return this.$$.ctx[7];
256
- }
257
- set session(t) {
258
- this.$$set({ session: t }), p();
259
- }
260
- get buttonlocation() {
261
- return this.$$.ctx[0];
262
- }
263
- set buttonlocation(t) {
264
- this.$$set({ buttonlocation: t }), p();
265
- }
266
- get lang() {
267
- return this.$$.ctx[8];
268
- }
269
- set lang(t) {
270
- this.$$set({ lang: t }), p();
271
- }
272
- get mbsource() {
273
- return this.$$.ctx[9];
274
- }
275
- set mbsource(t) {
276
- this.$$set({ mbsource: t }), p();
277
- }
278
- get clientstyling() {
279
- return this.$$.ctx[10];
280
- }
281
- set clientstyling(t) {
282
- this.$$set({ clientstyling: t }), p();
283
- }
284
- get clientstylingurl() {
285
- return this.$$.ctx[11];
286
- }
287
- set clientstylingurl(t) {
288
- this.$$set({ clientstylingurl: t }), p();
289
- }
290
- get translationurl() {
291
- return this.$$.ctx[12];
292
- }
293
- set translationurl(t) {
294
- this.$$set({ translationurl: t }), p();
295
- }
296
- }
297
- ot(ft, { endpoint: {}, session: {}, buttonlocation: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
298
- export {
299
- ft as default
300
- };