@everymatrix/player-challenges 0.1.19 → 0.1.21
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/{ArrowLeftIcon-BEURnjpJ.cjs → ArrowLeftIcon-C3H4FNrA.cjs} +1 -1
- package/components/{ArrowLeftIcon-DN6e9luu.js → ArrowLeftIcon-CVqoFs2F.js} +1 -1
- package/components/Badge-Bk82Shs2.cjs +6 -0
- package/components/Badge-KcRiHhBF.js +133 -0
- package/components/{Button-ewgCN0Ji.js → Button-BGa9r5z8.js} +1 -1
- package/components/{Button-Bvh3WQSZ.cjs → Button-DEfAgK79.cjs} +1 -1
- package/components/ChallengeBanner-CMB14bZN.js +75 -0
- package/components/ChallengeBanner-CkSpjqOj.cjs +4 -0
- package/components/{ChallengeBreadcrumbs-SeC9192i.cjs → ChallengeBreadcrumbs-13-Ns0MM.cjs} +1 -1
- package/components/{ChallengeBreadcrumbs-BtOwj4Jl.js → ChallengeBreadcrumbs-BEZ1jwq0.js} +2 -2
- package/components/{ChallengeCard-BZ8CZvgE.js → ChallengeCard-ByCA_1Hl.js} +2 -2
- package/components/{ChallengeCard-Zj92mrKO.cjs → ChallengeCard-CsG6C_ZM.cjs} +1 -1
- package/components/{ChallengeClaimCode-CeM2Z6p6.js → ChallengeClaimCode-BACGk-Jy.js} +2 -2
- package/components/{ChallengeClaimCode-BXn91GDr.cjs → ChallengeClaimCode-BygPzxNi.cjs} +1 -1
- package/components/{ChallengeDetails-BVoZJVVL.cjs → ChallengeDetails-CJJNlQWB.cjs} +1 -1
- package/components/{ChallengeDetails-B5AHPIQM.js → ChallengeDetails-C_8GM2Jq.js} +2 -2
- package/components/{ChallengeDetailsSkeleton-CdG_rSGQ.js → ChallengeDetailsSkeleton-BEV1twmo.js} +10 -10
- package/components/{ChallengeDetailsSkeleton-u24ioQh6.cjs → ChallengeDetailsSkeleton-PosxtpCc.cjs} +1 -1
- package/components/{ChallengeEvents-DkdwGm5z.js → ChallengeEvents-DjKkeUuR.js} +1 -1
- package/components/{ChallengeEvents-7BMohfz-.cjs → ChallengeEvents-E1WQjAzJ.cjs} +1 -1
- package/components/{ChallengeGames-BvHQAgRm.js → ChallengeGames-CNAMmHUp.js} +16 -16
- package/components/{ChallengeGames-hnPYCbOH.cjs → ChallengeGames-Cx_GYjQm.cjs} +1 -1
- package/components/{ChallengeHistory-DoXcpVtR.cjs → ChallengeHistory-DrQz7uBE.cjs} +1 -1
- package/components/{ChallengeHistory-C0lhKrpA.js → ChallengeHistory-h27C33wv.js} +2 -2
- package/components/{ChallengeLevels-CmLntQ0a.js → ChallengeLevels-BZeFqcK1.js} +58 -58
- package/components/{ChallengeLevels-BpGMpkdK.cjs → ChallengeLevels-DLkqfeNt.cjs} +1 -1
- package/components/ChallengeList-B2u3JpzC.js +1234 -0
- package/components/ChallengeList-DYnjsVUW.cjs +21 -0
- package/components/{ChallengeProgress-BPSQNZFN.js → ChallengeProgress-BCBcs2jH.js} +9 -9
- package/components/{ChallengeProgress-vtUcMyKL.cjs → ChallengeProgress-BZvt_E-M.cjs} +1 -1
- package/components/{ChallengeProgressItem-3A5VPooB.js → ChallengeProgressItem-BQlOQvIh.js} +67 -67
- package/components/{ChallengeProgressItem-bSzmG8l2.cjs → ChallengeProgressItem-Cz1YgWGi.cjs} +4 -4
- package/components/{ChallengeRules-YzymE0DQ.js → ChallengeRules-Dgu_jast.js} +14 -14
- package/components/{ChallengeRules-VFOXD1ge.cjs → ChallengeRules-WVXMxGFk.cjs} +1 -1
- package/components/ChallengeSummary-Cf0YIRGn.cjs +1 -0
- package/components/ChallengeSummary-D16-HQmO.js +230 -0
- package/components/{ChallengeTabContent-2kOyabcA.js → ChallengeTabContent-B1A2UCu0.js} +105 -102
- package/components/{ChallengeTabContent-BmBcztk_.cjs → ChallengeTabContent-CVDmk4w-.cjs} +4 -4
- package/components/{ChallengeTabPanel-D_brgA-W.cjs → ChallengeTabPanel-CKsTZbcl.cjs} +1 -1
- package/components/{ChallengeTabPanel-CqwPtmvo.js → ChallengeTabPanel-xjZCBH5D.js} +8 -8
- package/components/ChallengeTabs-Bnf7anrC.cjs +14 -0
- package/components/ChallengeTabs-ChPgDbCC.js +8747 -0
- package/components/{CheckIcon-DlNpzYWO.js → CheckIcon-BTnHaUd4.js} +1 -1
- package/components/{CheckIcon-DeZrzQxv.cjs → CheckIcon-mIgZl9-4.cjs} +1 -1
- package/components/{ChevronIcon-Bx8g9KW1.cjs → ChevronIcon-BgZI62XE.cjs} +1 -1
- package/components/{ChevronIcon-BLforcQh.js → ChevronIcon-Cas27TfT.js} +1 -1
- package/components/{ChipIcon-kKYQ4DVa.cjs → ChipIcon-BFoUES1n.cjs} +1 -1
- package/components/{ChipIcon-BIaydmmL.js → ChipIcon-BfOOHuhg.js} +1 -1
- package/components/{ChipShineIcon-BhJxc-7o.cjs → ChipShineIcon-D2yIxpRQ.cjs} +1 -1
- package/components/{ChipShineIcon-x_PFBpiC.js → ChipShineIcon-DSRfQjmd.js} +4 -4
- package/components/{ExistIcon--rtolulO.cjs → ExistIcon-C3tzN5xT.cjs} +1 -1
- package/components/{ExistIcon-eNMDxHqT.js → ExistIcon-CRMznheO.js} +1 -1
- package/components/{GiftIcon-BEczx5al.cjs → GiftIcon-Cq0_r3yQ.cjs} +1 -1
- package/components/{GiftIcon-B0dDFiN1.js → GiftIcon-_250eu0E.js} +1 -1
- package/components/{LinkIcon-B1a0ukPT.js → LinkIcon-BtU9ho_D.js} +1 -1
- package/components/{LinkIcon-D8SAcoU1.cjs → LinkIcon-CP63MlZb.cjs} +1 -1
- package/components/{LockIcon-B96T_uuy.js → LockIcon-CoRJ3QaD.js} +1 -1
- package/components/{LockIcon-C0YL_dFy.cjs → LockIcon-F5xc2hVw.cjs} +1 -1
- package/components/{Pagination-Xk727E7v.cjs → Pagination-BQmOBvur.cjs} +1 -1
- package/components/{Pagination-BACM981T.js → Pagination-DGZVZT1e.js} +5 -5
- package/components/{PlayerChallenges-r9ozrIGW.js → PlayerChallenges-BYcLZ7yq.js} +109 -106
- package/components/PlayerChallenges-I5SuK5dv.cjs +1 -0
- package/components/{StarIcon-D891Qux1.cjs → StarIcon-BicdS0r7.cjs} +1 -1
- package/components/{StarIcon-BcWj-wRN.js → StarIcon-XvJeT5Kx.js} +1 -1
- package/components/{TargetIcon-CCXuJUbZ.cjs → TargetIcon-BUbBjPdb.cjs} +1 -1
- package/components/{TargetIcon-Bv2zPej6.js → TargetIcon-Bk9wDeBq.js} +1 -1
- package/esnext/player-challenges.cjs +1 -1
- package/esnext/player-challenges.js +2 -2
- package/package.json +1 -1
- package/components/Badge-BEjEww7C.cjs +0 -9
- package/components/Badge-DSBvI-B9.js +0 -138
- package/components/ChallengeBanner-E82laAQ0.js +0 -103
- package/components/ChallengeBanner-WwVvI1Uu.cjs +0 -30
- package/components/ChallengeList-DWrRtGZ6.cjs +0 -47
- package/components/ChallengeList-Dztxku3t.js +0 -1259
- package/components/ChallengeSummary-D6OJ_aBt.cjs +0 -1
- package/components/ChallengeSummary-rhsO5YE0.js +0 -205
- package/components/ChallengeTabs-Bkx7hDSs.cjs +0 -14
- package/components/ChallengeTabs-DrR1HXiu.js +0 -8749
- package/components/PlayerChallenges-T3zWVcYA.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { a as
|
|
3
|
-
import { C as
|
|
4
|
-
import { b as
|
|
1
|
+
import { c as W, d as X, h as ce, p as s, u as U, q as he, au as O, aA as G, v as z, E as V, w as N, x as q, aR as y, aW as H, F as _, A as t, aX as x, aY as be, aT as me, z as ve, a as B, b as Y, C as i, k as Z, e as r, aP as fe, n as Te, r as Ie, I as F, o as J, aZ as ye, a_ as Ce, a$ as De, aU as R, av as ke, aV as Se } from "./ChallengeTabs-ChPgDbCC.js";
|
|
2
|
+
import { a as _e } from "./ChallengeList-B2u3JpzC.js";
|
|
3
|
+
import { C as Me } from "./ChallengeBreadcrumbs-BEZ1jwq0.js";
|
|
4
|
+
import { b as ze } from "./ChallengeTabContent-B1A2UCu0.js";
|
|
5
5
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
6
6
|
}, globalThis.customElements = { define() {
|
|
7
7
|
}, get() {
|
|
8
8
|
}, whenDefined() {
|
|
9
9
|
} });
|
|
10
|
-
const
|
|
10
|
+
const Le = {
|
|
11
11
|
en: {
|
|
12
12
|
noChallenges: "No challenges at the moment. Try exploring events or keep playing to unlock new ones.",
|
|
13
13
|
loadMore: "Load more",
|
|
@@ -44,61 +44,61 @@ const _e = {
|
|
|
44
44
|
challengesAnonymous: "Jelentkezzen be, hogy lássa a kihívásait és haladását."
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
var K =
|
|
48
|
-
const
|
|
47
|
+
var K = Z("<!> <!>", 1), we = Z('<div class="player-challenges svelte-1edjcz1"><!></div>');
|
|
48
|
+
const Pe = {
|
|
49
49
|
hash: "svelte-1edjcz1",
|
|
50
50
|
code: ".player-challenges.svelte-1edjcz1 {display:flex;flex-direction:column;gap:12px;width:100%;}"
|
|
51
51
|
};
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
const g = s(
|
|
55
|
-
|
|
56
|
-
m() &&
|
|
57
|
-
}),
|
|
58
|
-
|
|
52
|
+
function Q(w, n) {
|
|
53
|
+
X(n, !0), ce(w, Pe);
|
|
54
|
+
const g = s(n, "endpoint", 7, ""), c = s(n, "userSession", 7, ""), h = s(n, "userId", 7, ""), b = s(n, "domainId", 7, ""), l = s(n, "locale", 7, "en"), m = s(n, "translationUrl", 7), d = s(n, "isMobile", 7, !0), T = s(n, "activeTab", 23, () => y.Promo), C = s(n, "activeChallengeId", 7), D = s(n, "activeDetailsTab", 7), k = s(n, "historyLimit", 7), S = s(n, "showTabDot", 7, !1);
|
|
55
|
+
U(() => he(l(), Le)), O(() => {
|
|
56
|
+
m() && G(m(), "challenge-card");
|
|
57
|
+
}), z(() => {
|
|
58
|
+
V(l() || "en");
|
|
59
59
|
});
|
|
60
|
-
let v =
|
|
61
|
-
|
|
60
|
+
let v = N(q(U(() => H(T())) ?? y.Promo));
|
|
61
|
+
z(() => {
|
|
62
62
|
const e = H(T());
|
|
63
|
-
e !== void 0 &&
|
|
63
|
+
e !== void 0 && _(v, e, !0);
|
|
64
64
|
});
|
|
65
|
-
const M =
|
|
66
|
-
let f =
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
const M = i(() => d() ? void 0 : C() || void 0);
|
|
66
|
+
let f = N(q(U(() => t(M))));
|
|
67
|
+
z(() => {
|
|
68
|
+
t(M) !== void 0 && (_(f, t(M), !0), x(!0, t(M)));
|
|
69
69
|
});
|
|
70
|
-
let
|
|
71
|
-
const A =
|
|
70
|
+
let L = N(void 0);
|
|
71
|
+
const A = i(() => !c() && !h()), u = be(() => ({
|
|
72
72
|
endpoint: g(),
|
|
73
73
|
domainId: b(),
|
|
74
74
|
userSession: c(),
|
|
75
75
|
userId: h(),
|
|
76
|
-
locale:
|
|
77
|
-
pageSize:
|
|
78
|
-
})),
|
|
76
|
+
locale: l(),
|
|
77
|
+
pageSize: fe(d())
|
|
78
|
+
})), P = i(() => u.findChallenge(t(f))), a = i(() => {
|
|
79
79
|
const e = [];
|
|
80
|
-
return u.activeChallenges.some((
|
|
80
|
+
return u.activeChallenges.some((o) => o.IsNew) && e.push(y.Active), u.awaitingChallenges.some((o) => o.IsNew) && e.push(y.Pending), e;
|
|
81
81
|
}), ee = (e) => {
|
|
82
|
-
e !==
|
|
83
|
-
}, te = (e,
|
|
84
|
-
|
|
82
|
+
e !== t(v) && (_(v, e, !0), Ce(De[e]));
|
|
83
|
+
}, te = (e, o) => {
|
|
84
|
+
_(f, e, !0), _(L, o, !0), d() || x(!0, e);
|
|
85
85
|
}, ne = () => {
|
|
86
|
-
d() || x(!1,
|
|
86
|
+
d() || x(!1, t(f)), _(f, void 0), _(L, void 0);
|
|
87
87
|
};
|
|
88
88
|
O(() => {
|
|
89
|
-
m() &&
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
}),
|
|
93
|
-
const e =
|
|
89
|
+
m() && G(m(), "player-challenges");
|
|
90
|
+
}), z(() => {
|
|
91
|
+
V(l() || "en");
|
|
92
|
+
}), z(() => {
|
|
93
|
+
const e = t(v), o = {
|
|
94
94
|
endpoint: g(),
|
|
95
95
|
domainId: b(),
|
|
96
96
|
userSession: c(),
|
|
97
97
|
userId: h(),
|
|
98
|
-
locale:
|
|
99
|
-
}, I =
|
|
100
|
-
!
|
|
101
|
-
}),
|
|
98
|
+
locale: l()
|
|
99
|
+
}, I = me[e];
|
|
100
|
+
!o.endpoint || !I || u.load(I, t(A));
|
|
101
|
+
}), z(() => {
|
|
102
102
|
if (g())
|
|
103
103
|
return u.connect(), () => u.disconnect();
|
|
104
104
|
});
|
|
@@ -128,10 +128,10 @@ function Z(w, t) {
|
|
|
128
128
|
b(e), r();
|
|
129
129
|
},
|
|
130
130
|
get locale() {
|
|
131
|
-
return
|
|
131
|
+
return l();
|
|
132
132
|
},
|
|
133
133
|
set locale(e = "en") {
|
|
134
|
-
|
|
134
|
+
l(e), r();
|
|
135
135
|
},
|
|
136
136
|
get translationUrl() {
|
|
137
137
|
return m();
|
|
@@ -148,44 +148,44 @@ function Z(w, t) {
|
|
|
148
148
|
get activeTab() {
|
|
149
149
|
return T();
|
|
150
150
|
},
|
|
151
|
-
set activeTab(e =
|
|
151
|
+
set activeTab(e = y.Promo) {
|
|
152
152
|
T(e), r();
|
|
153
153
|
},
|
|
154
154
|
get activeChallengeId() {
|
|
155
|
-
return
|
|
155
|
+
return C();
|
|
156
156
|
},
|
|
157
157
|
set activeChallengeId(e) {
|
|
158
|
-
|
|
158
|
+
C(e), r();
|
|
159
159
|
},
|
|
160
160
|
get activeDetailsTab() {
|
|
161
|
-
return
|
|
161
|
+
return D();
|
|
162
162
|
},
|
|
163
163
|
set activeDetailsTab(e) {
|
|
164
|
-
|
|
164
|
+
D(e), r();
|
|
165
165
|
},
|
|
166
166
|
get historyLimit() {
|
|
167
|
-
return
|
|
167
|
+
return k();
|
|
168
168
|
},
|
|
169
169
|
set historyLimit(e) {
|
|
170
|
-
|
|
170
|
+
k(e), r();
|
|
171
171
|
},
|
|
172
172
|
get showTabDot() {
|
|
173
|
-
return
|
|
173
|
+
return S();
|
|
174
174
|
},
|
|
175
175
|
set showTabDot(e = !1) {
|
|
176
|
-
|
|
176
|
+
S(e), r();
|
|
177
177
|
}
|
|
178
|
-
},
|
|
178
|
+
}, p = we(), se = Te(p);
|
|
179
179
|
{
|
|
180
180
|
var re = (e) => {
|
|
181
|
-
var
|
|
182
|
-
|
|
181
|
+
var o = K(), I = F(o);
|
|
182
|
+
Me(I, { onBack: ne });
|
|
183
183
|
var j = J(I, 2);
|
|
184
184
|
{
|
|
185
|
-
let le =
|
|
186
|
-
|
|
185
|
+
let le = i(() => t(v) === y.Promo), oe = i(() => t(v) === y.Pending), de = i(() => !!t(P) && u.pausedChallengeIds.includes(t(P).ChallengeId)), ue = i(() => t(L) ?? D());
|
|
186
|
+
_e(j, {
|
|
187
187
|
get challengeId() {
|
|
188
|
-
return
|
|
188
|
+
return t(f);
|
|
189
189
|
},
|
|
190
190
|
get endpoint() {
|
|
191
191
|
return g();
|
|
@@ -200,41 +200,44 @@ function Z(w, t) {
|
|
|
200
200
|
return b();
|
|
201
201
|
},
|
|
202
202
|
get locale() {
|
|
203
|
-
return
|
|
203
|
+
return l();
|
|
204
204
|
},
|
|
205
205
|
get isPromo() {
|
|
206
|
-
return
|
|
206
|
+
return t(le);
|
|
207
|
+
},
|
|
208
|
+
get isPending() {
|
|
209
|
+
return t(oe);
|
|
207
210
|
},
|
|
208
211
|
get isPaused() {
|
|
209
|
-
return
|
|
212
|
+
return t(de);
|
|
210
213
|
},
|
|
211
|
-
onStatusChange: (E,
|
|
214
|
+
onStatusChange: (E, ge) => u.patchProgress(E, { Status: ge }),
|
|
212
215
|
onViewed: (E) => u.patchProgress(E, { IsNew: !1 }),
|
|
213
216
|
get activeTab() {
|
|
214
|
-
return
|
|
217
|
+
return t(ue);
|
|
215
218
|
},
|
|
216
219
|
get isMobile() {
|
|
217
220
|
return d();
|
|
218
221
|
}
|
|
219
222
|
});
|
|
220
223
|
}
|
|
221
|
-
B(e,
|
|
224
|
+
B(e, o);
|
|
222
225
|
}, ie = (e) => {
|
|
223
|
-
var
|
|
224
|
-
|
|
226
|
+
var o = K(), I = F(o);
|
|
227
|
+
ye(I, {
|
|
225
228
|
get activeTab() {
|
|
226
|
-
return
|
|
229
|
+
return t(v);
|
|
227
230
|
},
|
|
228
231
|
onTabChange: ee,
|
|
229
232
|
get notifyTabs() {
|
|
230
|
-
return
|
|
233
|
+
return t(a);
|
|
231
234
|
},
|
|
232
235
|
get showTabDot() {
|
|
233
|
-
return
|
|
236
|
+
return S();
|
|
234
237
|
}
|
|
235
238
|
});
|
|
236
239
|
var j = J(I, 2);
|
|
237
|
-
|
|
240
|
+
ze(j, {
|
|
238
241
|
get endpoint() {
|
|
239
242
|
return g();
|
|
240
243
|
},
|
|
@@ -248,31 +251,31 @@ function Z(w, t) {
|
|
|
248
251
|
return b();
|
|
249
252
|
},
|
|
250
253
|
get locale() {
|
|
251
|
-
return
|
|
254
|
+
return l();
|
|
252
255
|
},
|
|
253
256
|
get challenges() {
|
|
254
257
|
return u;
|
|
255
258
|
},
|
|
256
259
|
onViewDetails: te,
|
|
257
260
|
get activeTab() {
|
|
258
|
-
return
|
|
261
|
+
return t(v);
|
|
259
262
|
},
|
|
260
263
|
get isMobile() {
|
|
261
264
|
return d();
|
|
262
265
|
},
|
|
263
266
|
get historyLimit() {
|
|
264
|
-
return
|
|
267
|
+
return k();
|
|
265
268
|
}
|
|
266
|
-
}), B(e,
|
|
269
|
+
}), B(e, o);
|
|
267
270
|
};
|
|
268
|
-
|
|
269
|
-
|
|
271
|
+
ve(se, (e) => {
|
|
272
|
+
t(f) ? e(re) : e(ie, -1);
|
|
270
273
|
});
|
|
271
274
|
}
|
|
272
|
-
return
|
|
275
|
+
return Ie(p), B(w, p), Y(ae);
|
|
273
276
|
}
|
|
274
|
-
|
|
275
|
-
|
|
277
|
+
W(
|
|
278
|
+
Q,
|
|
276
279
|
{
|
|
277
280
|
endpoint: {},
|
|
278
281
|
userSession: {},
|
|
@@ -291,11 +294,11 @@ Q(
|
|
|
291
294
|
[],
|
|
292
295
|
{ mode: "open" }
|
|
293
296
|
);
|
|
294
|
-
function $(w,
|
|
295
|
-
|
|
296
|
-
let g = s(
|
|
297
|
-
const v =
|
|
298
|
-
var
|
|
297
|
+
function $(w, n) {
|
|
298
|
+
X(n, !0);
|
|
299
|
+
let g = s(n, "endpoint", 7, ""), c = s(n, "userSession", 7, ""), h = s(n, "userId", 7, ""), b = s(n, "domainId", 7, ""), l = s(n, "locale", 7, "en"), m = s(n, "translationUrl", 7, ""), d = s(n, "isMobile", 7), T = s(n, "activeTab", 7), C = s(n, "activeChallengeId", 7), D = s(n, "activeDetailsTab", 7), k = s(n, "historyLimit", 7), S = s(n, "showTabDot", 7);
|
|
300
|
+
const v = i(() => R(d(), !0)), M = i(() => H(T()) ?? y.Promo), f = i(() => C() || void 0), L = i(() => ke(D())), A = i(() => R(S())), u = i(() => Se(k(), 0) || void 0);
|
|
301
|
+
var P = {
|
|
299
302
|
get endpoint() {
|
|
300
303
|
return g();
|
|
301
304
|
},
|
|
@@ -321,10 +324,10 @@ function $(w, t) {
|
|
|
321
324
|
b(a), r();
|
|
322
325
|
},
|
|
323
326
|
get locale() {
|
|
324
|
-
return
|
|
327
|
+
return l();
|
|
325
328
|
},
|
|
326
329
|
set locale(a = "en") {
|
|
327
|
-
|
|
330
|
+
l(a), r();
|
|
328
331
|
},
|
|
329
332
|
get translationUrl() {
|
|
330
333
|
return m();
|
|
@@ -345,31 +348,31 @@ function $(w, t) {
|
|
|
345
348
|
T(a), r();
|
|
346
349
|
},
|
|
347
350
|
get activeChallengeId() {
|
|
348
|
-
return
|
|
351
|
+
return C();
|
|
349
352
|
},
|
|
350
353
|
set activeChallengeId(a) {
|
|
351
|
-
|
|
354
|
+
C(a), r();
|
|
352
355
|
},
|
|
353
356
|
get activeDetailsTab() {
|
|
354
|
-
return
|
|
357
|
+
return D();
|
|
355
358
|
},
|
|
356
359
|
set activeDetailsTab(a) {
|
|
357
|
-
|
|
360
|
+
D(a), r();
|
|
358
361
|
},
|
|
359
362
|
get historyLimit() {
|
|
360
|
-
return
|
|
363
|
+
return k();
|
|
361
364
|
},
|
|
362
365
|
set historyLimit(a) {
|
|
363
|
-
|
|
366
|
+
k(a), r();
|
|
364
367
|
},
|
|
365
368
|
get showTabDot() {
|
|
366
|
-
return
|
|
369
|
+
return S();
|
|
367
370
|
},
|
|
368
371
|
set showTabDot(a) {
|
|
369
|
-
|
|
372
|
+
S(a), r();
|
|
370
373
|
}
|
|
371
374
|
};
|
|
372
|
-
return
|
|
375
|
+
return Q(w, {
|
|
373
376
|
get endpoint() {
|
|
374
377
|
return g();
|
|
375
378
|
},
|
|
@@ -383,32 +386,32 @@ function $(w, t) {
|
|
|
383
386
|
return b();
|
|
384
387
|
},
|
|
385
388
|
get locale() {
|
|
386
|
-
return
|
|
389
|
+
return l();
|
|
387
390
|
},
|
|
388
391
|
get translationUrl() {
|
|
389
392
|
return m();
|
|
390
393
|
},
|
|
391
394
|
get isMobile() {
|
|
392
|
-
return
|
|
395
|
+
return t(v);
|
|
393
396
|
},
|
|
394
397
|
get activeTab() {
|
|
395
|
-
return
|
|
398
|
+
return t(M);
|
|
396
399
|
},
|
|
397
400
|
get activeChallengeId() {
|
|
398
|
-
return
|
|
401
|
+
return t(f);
|
|
399
402
|
},
|
|
400
403
|
get activeDetailsTab() {
|
|
401
|
-
return
|
|
404
|
+
return t(L);
|
|
402
405
|
},
|
|
403
406
|
get historyLimit() {
|
|
404
|
-
return
|
|
407
|
+
return t(u);
|
|
405
408
|
},
|
|
406
409
|
get showTabDot() {
|
|
407
|
-
return
|
|
410
|
+
return t(A);
|
|
408
411
|
}
|
|
409
|
-
}),
|
|
412
|
+
}), Y(P);
|
|
410
413
|
}
|
|
411
|
-
customElements.define("player-challenges",
|
|
414
|
+
customElements.define("player-challenges", W(
|
|
412
415
|
$,
|
|
413
416
|
{
|
|
414
417
|
endpoint: {},
|
|
@@ -427,11 +430,11 @@ customElements.define("player-challenges", Q(
|
|
|
427
430
|
[],
|
|
428
431
|
[]
|
|
429
432
|
));
|
|
430
|
-
const
|
|
433
|
+
const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
431
434
|
__proto__: null,
|
|
432
435
|
default: $
|
|
433
436
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
434
437
|
export {
|
|
435
|
-
|
|
436
|
-
|
|
438
|
+
Q as P,
|
|
439
|
+
Ue as a
|
|
437
440
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-Bnf7anrC.cjs"),V=require("./ChallengeList-DYnjsVUW.cjs"),F=require("./ChallengeBreadcrumbs-13-Ns0MM.cjs"),K=require("./ChallengeTabContent-CVDmk4w-.cjs"),R={en:{noChallenges:"No challenges at the moment. Try exploring events or keep playing to unlock new ones.",loadMore:"Load more",challengesAnonymous:"Login to see your challenges and progress."},tr:{noChallenges:"Şu anda görev yok. Etkinliklere göz atabilir veya oynamaya devam ederek yenilerinin kilidini açabilirsin.",loadMore:"Daha fazla yükle",challengesAnonymous:"Görevlerinizi ve ilerlemenizi görmek için giriş yapın."},da:{noChallenges:"Ingen udfordringer i øjeblikket. Prøv at udforske events, eller bliv ved med at spille for at låse nye op.",loadMore:"Indlæs mere",challengesAnonymous:"Log ind for at se dine udfordringer og fremskridt."},de:{noChallenges:"Aktuell keine Herausforderungen verfügbar. Entdecke Events oder spiele weiter, um neue freizuschalten.",loadMore:"Mehr laden",challengesAnonymous:"Melde dich an, um deine Herausforderungen und Fortschritte zu sehen."},nl:{noChallenges:"Op dit moment geen uitdagingen beschikbaar. Bekijk events of blijf spelen om nieuwe uitdagingen te ontgrendelen.",loadMore:"Meer laden",challengesAnonymous:"Log in om je uitdagingen en voortgang te zien."},fr:{noChallenges:"Aucun défi pour le moment. Découvrez les événements ou continuez à jouer pour en débloquer de nouveaux.",loadMore:"Charger plus",challengesAnonymous:"Connectez-vous pour voir vos défis et votre progression."},hu:{noChallenges:"Jelenleg nincs elérhető kihívás. Nézz szét az események között, vagy játssz tovább, hogy újakat oldj fel.",loadMore:"Több betöltése",challengesAnonymous:"Jelentkezzen be, hogy lássa a kihívásait és haladását."}};var P=e.from_html("<!> <!>",1),Q=e.from_html('<div class="player-challenges svelte-1edjcz1"><!></div>');const W={hash:"svelte-1edjcz1",code:".player-challenges.svelte-1edjcz1 {display:flex;flex-direction:column;gap:12px;width:100%;}"};function z(I,n){e.push(n,!0),e.append_styles(I,W);const o=e.prop(n,"endpoint",7,""),u=e.prop(n,"userSession",7,""),d=e.prop(n,"userId",7,""),g=e.prop(n,"domainId",7,""),s=e.prop(n,"locale",7,"en"),c=e.prop(n,"translationUrl",7),l=e.prop(n,"isMobile",7,!0),f=e.prop(n,"activeTab",23,()=>e.ChallengesTab.Promo),m=e.prop(n,"activeChallengeId",7),y=e.prop(n,"activeDetailsTab",7),T=e.prop(n,"historyLimit",7),p=e.prop(n,"showTabDot",7,!1);e.untrack(()=>e.initI18n(s(),R)),e.user_pre_effect(()=>{c()&&e.loadTranslationUrl(c(),"challenge-card")}),e.user_effect(()=>{e.setLocale(s()||"en")});let h=e.state(e.proxy(e.untrack(()=>e.toChallengesTab(f()))??e.ChallengesTab.Promo));e.user_effect(()=>{const t=e.toChallengesTab(f());t!==void 0&&e.set(h,t,!0)});const C=e.user_derived(()=>l()?void 0:m()||void 0);let b=e.state(e.proxy(e.untrack(()=>e.get(C))));e.user_effect(()=>{e.get(C)!==void 0&&(e.set(b,e.get(C),!0),e.sendChallengeDetailPageOpen(!0,e.get(C)))});let _=e.state(void 0);const D=e.user_derived(()=>!u()&&!d()),i=e.createChallengesData(()=>({endpoint:o(),domainId:g(),userSession:u(),userId:d(),locale:s(),pageSize:e.getPageSize(l())})),S=e.user_derived(()=>i.findChallenge(e.get(b))),r=e.user_derived(()=>{const t=[];return i.activeChallenges.some(a=>a.IsNew)&&t.push(e.ChallengesTab.Active),i.awaitingChallenges.some(a=>a.IsNew)&&t.push(e.ChallengesTab.Pending),t}),A=t=>{t!==e.get(h)&&(e.set(h,t,!0),e.sendChallengeTabClicked(e.CHALLENGES_TAB_NAMES[t]))},j=(t,a)=>{e.set(b,t,!0),e.set(_,a,!0),l()||e.sendChallengeDetailPageOpen(!0,t)},U=()=>{l()||e.sendChallengeDetailPageOpen(!1,e.get(b)),e.set(b,void 0),e.set(_,void 0)};e.user_pre_effect(()=>{c()&&e.loadTranslationUrl(c(),"player-challenges")}),e.user_effect(()=>{e.setLocale(s()||"en")}),e.user_effect(()=>{const t=e.get(h),a={endpoint:o(),domainId:g(),userSession:u(),userId:d(),locale:s()},v=e.CHALLENGES_TAB_LIST_KIND[t];!a.endpoint||!v||i.load(v,e.get(D))}),e.user_effect(()=>{if(o())return i.connect(),()=>i.disconnect()});var E={get endpoint(){return o()},set endpoint(t=""){o(t),e.flushSync()},get userSession(){return u()},set userSession(t=""){u(t),e.flushSync()},get userId(){return d()},set userId(t=""){d(t),e.flushSync()},get domainId(){return g()},set domainId(t=""){g(t),e.flushSync()},get locale(){return s()},set locale(t="en"){s(t),e.flushSync()},get translationUrl(){return c()},set translationUrl(t){c(t),e.flushSync()},get isMobile(){return l()},set isMobile(t=!0){l(t),e.flushSync()},get activeTab(){return f()},set activeTab(t=e.ChallengesTab.Promo){f(t),e.flushSync()},get activeChallengeId(){return m()},set activeChallengeId(t){m(t),e.flushSync()},get activeDetailsTab(){return y()},set activeDetailsTab(t){y(t),e.flushSync()},get historyLimit(){return T()},set historyLimit(t){T(t),e.flushSync()},get showTabDot(){return p()},set showTabDot(t=!1){p(t),e.flushSync()}},k=Q(),N=e.child(k);{var x=t=>{var a=P(),v=e.first_child(a);F.ChallengeBreadcrumbs(v,{onBack:U});var L=e.sibling(v,2);{let O=e.user_derived(()=>e.get(h)===e.ChallengesTab.Promo),H=e.user_derived(()=>e.get(h)===e.ChallengesTab.Pending),q=e.user_derived(()=>!!e.get(S)&&i.pausedChallengeIds.includes(e.get(S).ChallengeId)),G=e.user_derived(()=>e.get(_)??y());V.ChallengeDetails(L,{get challengeId(){return e.get(b)},get endpoint(){return o()},get userSession(){return u()},get userId(){return d()},get domainId(){return g()},get locale(){return s()},get isPromo(){return e.get(O)},get isPending(){return e.get(H)},get isPaused(){return e.get(q)},onStatusChange:(M,J)=>i.patchProgress(M,{Status:J}),onViewed:M=>i.patchProgress(M,{IsNew:!1}),get activeTab(){return e.get(G)},get isMobile(){return l()}})}e.append(t,a)},B=t=>{var a=P(),v=e.first_child(a);e.ChallengeTabs$1(v,{get activeTab(){return e.get(h)},onTabChange:A,get notifyTabs(){return e.get(r)},get showTabDot(){return p()}});var L=e.sibling(v,2);K.ChallengeTabContent(L,{get endpoint(){return o()},get userSession(){return u()},get userId(){return d()},get domainId(){return g()},get locale(){return s()},get challenges(){return i},onViewDetails:j,get activeTab(){return e.get(h)},get isMobile(){return l()},get historyLimit(){return T()}}),e.append(t,a)};e.if_block(N,t=>{e.get(b)?t(x):t(B,-1)})}return e.reset(k),e.append(I,k),e.pop(E)}e.create_custom_element(z,{endpoint:{},userSession:{},userId:{},domainId:{},locale:{},translationUrl:{},isMobile:{},activeTab:{},activeChallengeId:{},activeDetailsTab:{},historyLimit:{},showTabDot:{}},[],[],{mode:"open"});function w(I,n){e.push(n,!0);let o=e.prop(n,"endpoint",7,""),u=e.prop(n,"userSession",7,""),d=e.prop(n,"userId",7,""),g=e.prop(n,"domainId",7,""),s=e.prop(n,"locale",7,"en"),c=e.prop(n,"translationUrl",7,""),l=e.prop(n,"isMobile",7),f=e.prop(n,"activeTab",7),m=e.prop(n,"activeChallengeId",7),y=e.prop(n,"activeDetailsTab",7),T=e.prop(n,"historyLimit",7),p=e.prop(n,"showTabDot",7);const h=e.user_derived(()=>e.toBoolean(l(),!0)),C=e.user_derived(()=>e.toChallengesTab(f())??e.ChallengesTab.Promo),b=e.user_derived(()=>m()||void 0),_=e.user_derived(()=>e.toChallengeDetailsTab(y())),D=e.user_derived(()=>e.toBoolean(p())),i=e.user_derived(()=>e.toNumber(T(),0)||void 0);var S={get endpoint(){return o()},set endpoint(r=""){o(r),e.flushSync()},get userSession(){return u()},set userSession(r=""){u(r),e.flushSync()},get userId(){return d()},set userId(r=""){d(r),e.flushSync()},get domainId(){return g()},set domainId(r=""){g(r),e.flushSync()},get locale(){return s()},set locale(r="en"){s(r),e.flushSync()},get translationUrl(){return c()},set translationUrl(r=""){c(r),e.flushSync()},get isMobile(){return l()},set isMobile(r){l(r),e.flushSync()},get activeTab(){return f()},set activeTab(r){f(r),e.flushSync()},get activeChallengeId(){return m()},set activeChallengeId(r){m(r),e.flushSync()},get activeDetailsTab(){return y()},set activeDetailsTab(r){y(r),e.flushSync()},get historyLimit(){return T()},set historyLimit(r){T(r),e.flushSync()},get showTabDot(){return p()},set showTabDot(r){p(r),e.flushSync()}};return z(I,{get endpoint(){return o()},get userSession(){return u()},get userId(){return d()},get domainId(){return g()},get locale(){return s()},get translationUrl(){return c()},get isMobile(){return e.get(h)},get activeTab(){return e.get(C)},get activeChallengeId(){return e.get(b)},get activeDetailsTab(){return e.get(_)},get historyLimit(){return e.get(i)},get showTabDot(){return e.get(D)}}),e.pop(S)}customElements.define("player-challenges",e.create_custom_element(w,{endpoint:{},userSession:{},userId:{},domainId:{},locale:{},translationUrl:{},isMobile:{},activeTab:{},activeChallengeId:{},activeDetailsTab:{},historyLimit:{},showTabDot:{}},[],[]));const X=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"}));exports.PlayerChallenges=z;exports.PlayerChallenges_ce=X;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-Bnf7anrC.cjs");var a=e.from_svg('<svg viewBox="0 0 11 12" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M4.46289 0.26802C5.08176 -0.0893401 5.845 -0.0893401 6.46387 0.26802L9.92676 2.26802C10.5455 2.6253 10.9268 3.28596 10.9268 4.00044V8.00044C10.9268 8.71492 10.5455 9.37558 9.92676 9.73286L6.46387 11.7329C5.845 12.0902 5.08176 12.0902 4.46289 11.7329L1 9.73286C0.381267 9.37558 0 8.71492 0 8.00044V4.00044C0 3.28596 0.381267 2.6253 1 2.26802L4.46289 0.26802ZM4.36914 4.49263L1.86328 4.82954L3.69238 6.57466L3.23828 9.06197L5.46387 7.86177L7.68848 9.06197L7.23535 6.57466L9.06348 4.82954L6.55859 4.49263L5.46387 2.21333L4.36914 4.49263Z" fill="currentColor"></path></svg>');function s(o,t){e.push(t,!0);let h=e.prop(t,"width",7,11),i=e.prop(t,"height",7,12);var l={get width(){return h()},set width(r=11){h(r),e.flushSync()},get height(){return i()},set height(r=12){i(r),e.flushSync()}},n=a();return e.template_effect(()=>{e.set_attribute(n,"width",h()),e.set_attribute(n,"height",i())}),e.append(o,n),e.pop(l)}e.create_custom_element(s,{width:{},height:{}},[],[],{mode:"open"});exports.StarIcon=s;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as g, d, p as i, t as L, a as f, b as p, f as u, e as r, s as n } from "./ChallengeTabs-
|
|
1
|
+
import { c as g, d, p as i, t as L, a as f, b as p, f as u, e as r, s as n } from "./ChallengeTabs-ChPgDbCC.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-Bnf7anrC.cjs");var h=e.from_svg('<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3193_42932)"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.90553 0.0070498C10.0786 0.035135 10.2276 0.144704 10.306 0.301526L10.7702 1.22981L11.6985 1.69396C11.8553 1.77237 11.9648 1.92138 11.9929 2.09445C12.021 2.26752 11.9642 2.44354 11.8402 2.56752L10.2039 4.20388C10.1016 4.30618 9.96282 4.36364 9.81816 4.36364H8.40773L6.38568 6.38567C6.17266 6.59869 5.8273 6.59868 5.61429 6.38567C5.40128 6.17266 5.40128 5.82729 5.61429 5.61428L7.63634 3.59225V2.18182C7.63634 2.03716 7.69381 1.89842 7.7961 1.79613L9.43246 0.159767C9.55644 0.0357875 9.73246 -0.0210354 9.90553 0.0070498ZM8.72725 3.27273H9.59222L10.5337 2.33125L10.1197 2.12424C10.0141 2.07146 9.92853 1.98587 9.87574 1.88031L9.66873 1.46628L8.72725 2.40776V3.27273ZM6 1.09092C3.28878 1.09092 1.09091 3.28879 1.09091 6.00001C1.09091 8.71122 3.28878 10.9091 6 10.9091C8.71122 10.9091 10.9091 8.71122 10.9091 6.00001C10.9091 5.69876 11.1533 5.45455 11.4545 5.45455C11.7558 5.45455 12 5.69876 12 6.00001C12 9.31372 9.31371 12 6 12C2.68629 12 0 9.31372 0 6.00001C0 2.6863 2.68629 6.58379e-06 6 6.58379e-06C6.30125 6.58379e-06 6.54545 0.244215 6.54545 0.545461C6.54545 0.846707 6.30125 1.09092 6 1.09092ZM6 3.81819C4.79502 3.81819 3.81818 4.79502 3.81818 6.00001C3.81818 7.20499 4.79502 8.18183 6 8.18183C7.20499 8.18183 8.18182 7.20499 8.18182 6.00001C8.18182 5.69876 8.42603 5.45455 8.72727 5.45455C9.02852 5.45455 9.27273 5.69876 9.27273 6.00001C9.27273 7.80748 7.80748 9.27273 6 9.27273C4.19252 9.27273 2.72727 7.80748 2.72727 6.00001C2.72727 4.19253 4.19252 2.72728 6 2.72728C6.30125 2.72728 6.54545 2.97149 6.54545 3.27273C6.54545 3.57398 6.30125 3.81819 6 3.81819Z" fill="currentColor"></path></g><defs><clipPath id="clip0_3193_42932"><rect fill="currentColor"></rect></clipPath></defs></svg>');function C(n,i){e.push(i,!0);let t=e.prop(i,"size",7,12);var o={get size(){return t()},set size(c=12){t(c),e.flushSync()}},l=h(),r=e.sibling(e.child(l)),a=e.child(r),s=e.only_child(a);return e.reset(r),e.reset(l),e.template_effect(()=>{e.set_attribute(l,"width",t()),e.set_attribute(l,"height",t()),e.set_attribute(s,"width",t()),e.set_attribute(s,"height",t())}),e.append(n,l),e.pop(o)}e.create_custom_element(C,{size:{}},[],[],{mode:"open"});exports.TargetIcon=C;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as h, d, p as f, o as g, n as r, t as u, a as v, b as m, f as L, e as _, D as w, r as C, s } from "./ChallengeTabs-
|
|
1
|
+
import { c as h, d, p as f, o as g, n as r, t as u, a as v, b as m, f as L, e as _, D as w, r as C, s } from "./ChallengeTabs-ChPgDbCC.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const l=require("../components/PlayerChallenges-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const l=require("../components/PlayerChallenges-I5SuK5dv.cjs");if(typeof window<"u"){let s=function(e){return function(...t){try{return e.apply(this,t)}catch(n){if(n instanceof DOMException&&n.message.includes("has already been used with this registry")||n instanceof Error&&n.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw n}}};customElements.define=s(customElements.define),Promise.resolve().then(()=>require("../components/PlayerChallenges-I5SuK5dv.cjs")).then(e=>e.PlayerChallenges_ce).then(e=>{const t=e.default||e;customElements.get("player-challenges")||customElements.define("player-challenges",t.element||t)}).catch(e=>{console.error("BOOT ERROR:",e)})}module.exports=l.PlayerChallenges;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as o } from "../components/PlayerChallenges-
|
|
1
|
+
import { P as o } from "../components/PlayerChallenges-BYcLZ7yq.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -16,7 +16,7 @@ if (typeof window < "u") {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
customElements.define = s(customElements.define), import("../components/PlayerChallenges-
|
|
19
|
+
customElements.define = s(customElements.define), import("../components/PlayerChallenges-BYcLZ7yq.js").then((e) => e.a).then((e) => {
|
|
20
20
|
const n = e.default || e;
|
|
21
21
|
customElements.get("player-challenges") || customElements.define("player-challenges", n.element || n);
|
|
22
22
|
}).catch((e) => {
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-Bkx7hDSs.cjs");var $=e.from_html('<span class="timer-date svelte-tfkqbj"> </span>'),A=e.from_html('<span class="timer-label svelte-tfkqbj"> </span> <span class="timer-dash svelte-tfkqbj"></span> <span class="timer-countdown"> </span>',1),F=e.from_html('<div class="timer svelte-tfkqbj"><!> <!></div>'),J=e.from_html('<div class="challenge-badge svelte-tfkqbj"><div class="status-pill svelte-tfkqbj"><span></span> <span class="status-label svelte-tfkqbj"> </span></div> <!></div>');const K={hash:"svelte-tfkqbj",code:`.challenge-badge.svelte-tfkqbj {box-sizing:border-box;display:flex;flex-direction:row;align-items:center;padding:2px 8px 2px 2px;gap:6px;position:relative;background-color:var(--alpha-white-10, rgba(0, 0, 0, 0.3));border:1px solid var(--alpha-white-25, rgba(251, 251, 251, 0.2));backdrop-filter:blur(10px);border-radius:100px;width:fit-content;height:25px;&[data-status='scheduled'],
|
|
2
|
-
&[data-status='ongoing'],
|
|
3
|
-
&[data-status='paused'],
|
|
4
|
-
&[data-status='suspended'] {background-color:var(--alpha-white-10, rgba(251, 251, 251, 0.1));}.status-pill:where(.svelte-tfkqbj) {box-sizing:border-box;display:flex;align-items:center;gap:4px;padding:2px 8px 2px 6px;border-radius:20px;border:0.8px solid var(--alpha-white-25, rgba(251, 251, 251, 0.2));box-shadow:0px 0.83px 1.66px 0px rgba(16, 24, 40, 0.05);background-color:var(--alpha-black-20, rgba(0, 0, 0, 0.2));height:21px;.dot-status:where(.svelte-tfkqbj) {width:5px;height:5px;border-radius:50%;flex-shrink:0;transition:background 0.2s ease,
|
|
5
|
-
box-shadow 0.2s ease;&.new,
|
|
6
|
-
&.completed {background:var(--semantic-success-400, rgba(45, 223, 0, 1));}&.scheduled,
|
|
7
|
-
&.ongoing {background:var(--semantic-info-400, rgba(0, 156, 245, 1));}&.paused,
|
|
8
|
-
&.suspended {background:var(--bg-primary-level-1, rgba(255, 204, 0, 1));}&.expired {background:var(--secondary-300, rgba(78, 103, 134, 1));}&.rejected {background:var(--semantic-error-500, rgba(235, 0, 0, 1));}}.status-label:where(.svelte-tfkqbj) {font-weight:500;font-size:11px;line-height:13px;text-align:center;color:var(--secondary-50, rgba(223, 227, 232, 1));}}.timer:where(.svelte-tfkqbj) {display:flex;align-items:center;gap:6px;color:var(--secondary-50, rgba(223, 227, 232, 1));font-size:10px;line-height:1;white-space:nowrap;.timer-label:where(.svelte-tfkqbj),
|
|
9
|
-
.timer-date:where(.svelte-tfkqbj) {font-weight:400;}.timer-dash:where(.svelte-tfkqbj) {font-weight:500;opacity:0.7;}}}`};function y(x,r){e.push(r,!0),e.append_styles(x,K);const g=()=>e.store_get(e.$format,"$_",q),[q,S]=e.setup_stores(),d=e.prop(r,"status",7),u=e.prop(r,"time",7),i=e.prop(r,"locale",7,""),b=e.prop(r,"isNew",7,!1),v=e.prop(r,"isSuspended",7,!1);e.untrack(()=>e.initI18n(i())),e.user_effect(()=>{e.setLocale(i()??"en")});let m=e.state(e.proxy(e.dayjs().valueOf()));e.user_effect(()=>{const t=setInterval(()=>{e.set(m,e.dayjs().valueOf(),!0)},1e3);return()=>clearInterval(t)});const T={new:"new",scheduled:"scheduled",ongoing:"onGoing",paused:"paused",suspended:"suspended",completed:"completed",expired:"expired",rejected:"rejected"},n=e.user_derived(()=>e.getBadgeContent(d(),u(),e.get(m))),s=e.user_derived(()=>e.mapChallengeStatus(d(),b(),v()));var C={get status(){return d()},set status(t){d(t),e.flushSync()},get time(){return u()},set time(t){u(t),e.flushSync()},get locale(){return i()},set locale(t=""){i(t),e.flushSync()},get isNew(){return b()},set isNew(t=!1){b(t),e.flushSync()},get isSuspended(){return v()},set isSuspended(t=!1){v(t),e.flushSync()}},o=J(),p=e.child(o),_=e.child(p);let w;var N=e.sibling(_,2),z=e.only_child(N,!0);e.reset(p);var L=e.sibling(p,2);{var B=t=>{var h=F(),k=e.child(h);{var I=a=>{var l=$(),c=e.only_child(l,!0);e.template_effect(f=>e.set_text(c,f),[()=>g()(e.get(n).date)]),e.append(a,l)};e.if_block(k,a=>{e.get(n).date&&a(I)})}var H=e.sibling(k,2);{var M=a=>{var l=A(),c=e.first_child(l),f=e.only_child(c,!0),j=e.sibling(c,2);j.textContent="-";var O=e.sibling(j,2),D=e.only_child(O,!0);e.template_effect(G=>{e.set_text(f,G),e.set_text(D,e.get(n).countdownTime)},[()=>g()(e.get(n).label)]),e.append(a,l)};e.if_block(H,a=>{e.get(n).countdownTime&&a(M)})}e.reset(h),e.append(t,h)};e.if_block(L,t=>{e.get(n)&&t(B)})}e.reset(o),e.template_effect(t=>{e.set_attribute(o,"data-status",e.get(s)),e.set_attribute(p,"data-status",e.get(s)),w=e.set_class(_,1,"dot dot-status svelte-tfkqbj",null,w,{new:e.get(s)==="new",scheduled:e.get(s)==="scheduled",ongoing:e.get(s)==="ongoing",paused:e.get(s)==="paused",suspended:e.get(s)==="suspended",completed:e.get(s)==="completed",expired:e.get(s)==="expired",rejected:e.get(s)==="rejected"}),e.set_text(z,t)},[()=>g()(T[e.get(s)])]),e.append(x,o);var E=e.pop(C);return S(),E}e.create_custom_element(y,{status:{},time:{},locale:{},isNew:{},isSuspended:{}},[],[],{mode:"open"});exports.Badge=y;
|