@streamlayer/react 0.30.0 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/app.js +1 -0
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +4 -0
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +6 -0
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -0
- package/lib/dist/cjs/index.js +1 -0
- package/lib/dist/cjs/masters.js +297 -1
- package/lib/dist/{index-bcabe854.js → es/gamification-feature.js} +578 -545
- package/lib/dist/es/index.js +9 -0
- package/lib/dist/es/masters.js +26797 -7
- package/lib/dist/index.d.ts +6 -5
- package/lib/dist/style.css +1 -1
- package/lib/{app-c53bb384.js → es/app.js} +1 -1
- package/lib/es/auth.js +2 -2
- package/lib/es/gamification-feature.js +1443 -0
- package/lib/es/index.js +2 -2
- package/lib/{index-89366251.js → es/index2.js} +12 -12
- package/lib/es/masters.js +3 -3
- package/lib/es/masters2.js +2433 -0
- package/lib/es/points.js +45 -36
- package/lib/style.css +1 -1
- package/package.json +11 -11
- package/lib/app-36051bbe.cjs +0 -1
- package/lib/dist/index-f504e8d3.cjs +0 -1
- package/lib/dist/masters-3c9c6ffe.js +0 -26765
- package/lib/dist/masters-fe5f1486.cjs +0 -297
- package/lib/index-af5c5738.cjs +0 -1
- package/lib/index-dd93a61a.cjs +0 -4
- package/lib/index-e26b3493.js +0 -1410
- package/lib/masters-bf25c11c.js +0 -2415
- package/lib/masters-f135002d.cjs +0 -6
- /package/lib/{common-f34b9d88.cjs → cjs/common.js} +0 -0
- /package/lib/{index-565f26fb.cjs → cjs/index3.js} +0 -0
- /package/lib/{common-2d2a3ba3.js → es/common.js} +0 -0
- /package/lib/{index-15f61ac8.js → es/index3.js} +0 -0
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
import { jsxs as I, jsx as r, Fragment as
|
|
2
|
-
import { s as a, i as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as I, jsx as r, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { s as a, i as j, o as Se, a as ze, b as xe, Q as x, c as _, d as b, E as L, r as se, e as Ye, f as We, n as Fe, w as Ve, u as w, A as Be, O as He, P as W, g as Ge, h as ee, j as Ze, k as Je } from "./masters.js";
|
|
3
|
+
import U, { useRef as C, useState as R, useCallback as q, useEffect as Ke, useLayoutEffect as Xe, useMemo as V, createElement as G, PureComponent as je } from "react";
|
|
4
4
|
const et = /* @__PURE__ */ a("div")({
|
|
5
5
|
name: "Container",
|
|
6
|
-
class: "
|
|
6
|
+
class: "c1vwopgc",
|
|
7
7
|
propsAsIs: !1
|
|
8
8
|
}), tt = /* @__PURE__ */ a("div")({
|
|
9
9
|
name: "QuestionTypeWrap",
|
|
10
|
-
class: "
|
|
10
|
+
class: "qyktpt0",
|
|
11
11
|
propsAsIs: !1
|
|
12
|
-
}), nt = () =>
|
|
12
|
+
}), nt = () => j, st = /* @__PURE__ */ a(nt())({
|
|
13
13
|
name: "QuestionTypeIcon",
|
|
14
|
-
class: "
|
|
14
|
+
class: "q951jdx",
|
|
15
15
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
16
|
+
}), it = /* @__PURE__ */ a("span")({
|
|
17
17
|
name: "QuestionTypeTitle",
|
|
18
|
-
class: "
|
|
18
|
+
class: "qss5f0e",
|
|
19
19
|
propsAsIs: !1
|
|
20
20
|
}), rt = /* @__PURE__ */ a("button")({
|
|
21
21
|
name: "CloseButton",
|
|
22
|
-
class: "
|
|
22
|
+
class: "c1ao1jtv",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}), ot = () =>
|
|
24
|
+
}), ot = () => j, at = /* @__PURE__ */ a(ot())({
|
|
25
25
|
name: "CloseIcon",
|
|
26
|
-
class: "
|
|
26
|
+
class: "cvsl7l3",
|
|
27
27
|
propsAsIs: !0
|
|
28
28
|
}), ke = ({ type: e, close: t, label: n }) => {
|
|
29
|
-
const
|
|
29
|
+
const s = e ? Se[e] : { label: n, iconName: void 0 };
|
|
30
30
|
return /* @__PURE__ */ I(et, { children: [
|
|
31
31
|
/* @__PURE__ */ I(tt, { children: [
|
|
32
|
-
(
|
|
33
|
-
(
|
|
32
|
+
(s == null ? void 0 : s.iconName) && /* @__PURE__ */ r(st, { name: s.iconName }),
|
|
33
|
+
(s == null ? void 0 : s.label) && /* @__PURE__ */ r(it, { children: s.label })
|
|
34
34
|
] }),
|
|
35
35
|
/* @__PURE__ */ r(rt, { onClick: t, children: /* @__PURE__ */ r(at, { name: "icon-cross" }) })
|
|
36
36
|
] });
|
|
37
37
|
}, lt = /* @__PURE__ */ a("div")({
|
|
38
38
|
name: "Container",
|
|
39
|
-
class: "
|
|
39
|
+
class: "c1zy8a",
|
|
40
40
|
propsAsIs: !1
|
|
41
41
|
}), ct = /* @__PURE__ */ a("div")({
|
|
42
42
|
name: "Title",
|
|
43
|
-
class: "
|
|
43
|
+
class: "t1vih9p5",
|
|
44
44
|
propsAsIs: !1
|
|
45
45
|
}), dt = /* @__PURE__ */ a("div")({
|
|
46
46
|
name: "Indicator",
|
|
47
|
-
class: "
|
|
47
|
+
class: "i1fbnvpb",
|
|
48
48
|
propsAsIs: !1
|
|
49
|
-
}),
|
|
49
|
+
}), le = ({ indicator: e, title: t }) => /* @__PURE__ */ I(lt, { children: [
|
|
50
50
|
/* @__PURE__ */ r(ct, { children: t }),
|
|
51
51
|
/* @__PURE__ */ r(dt, { children: e })
|
|
52
52
|
] }), ut = /* @__PURE__ */ a("div")({
|
|
53
53
|
name: "Container",
|
|
54
|
-
class: "
|
|
54
|
+
class: "ctmhwyc",
|
|
55
55
|
propsAsIs: !1
|
|
56
56
|
}), pt = /* @__PURE__ */ a("div")({
|
|
57
57
|
name: "Indicator",
|
|
58
|
-
class: "
|
|
58
|
+
class: "i1jri200",
|
|
59
59
|
propsAsIs: !1
|
|
60
60
|
}), mt = /* @__PURE__ */ a("div")({
|
|
61
61
|
name: "Title",
|
|
62
|
-
class: "
|
|
62
|
+
class: "t8s05oq",
|
|
63
63
|
propsAsIs: !1
|
|
64
|
-
}),
|
|
64
|
+
}), F = ({ indicator: e, title: t }) => /* @__PURE__ */ I(ut, { children: [
|
|
65
65
|
/* @__PURE__ */ r(pt, { children: e }),
|
|
66
66
|
/* @__PURE__ */ r(mt, { children: t })
|
|
67
67
|
] }), ht = /* @__PURE__ */ a("div")({
|
|
68
68
|
name: "Container",
|
|
69
|
-
class: "
|
|
69
|
+
class: "c1yrpn9o",
|
|
70
70
|
propsAsIs: !1
|
|
71
71
|
}), It = /* @__PURE__ */ a("div")({
|
|
72
72
|
name: "TopInfo",
|
|
73
|
-
class: "
|
|
73
|
+
class: "t17fwahh",
|
|
74
74
|
propsAsIs: !1
|
|
75
75
|
}), ft = /* @__PURE__ */ a("div")({
|
|
76
76
|
name: "BottomInfo",
|
|
77
|
-
class: "
|
|
77
|
+
class: "by6w7e9",
|
|
78
78
|
propsAsIs: !1
|
|
79
79
|
}), gt = /* @__PURE__ */ a("div")({
|
|
80
80
|
name: "User",
|
|
81
|
-
class: "
|
|
81
|
+
class: "u1g7arbm",
|
|
82
82
|
propsAsIs: !1
|
|
83
83
|
}), Mt = /* @__PURE__ */ a("img")({
|
|
84
84
|
name: "Avatar",
|
|
85
|
-
class: "
|
|
85
|
+
class: "a1ldeata",
|
|
86
86
|
propsAsIs: !1
|
|
87
87
|
}), vt = /* @__PURE__ */ a("div")({
|
|
88
88
|
name: "UserInfo",
|
|
89
|
-
class: "
|
|
89
|
+
class: "u10d4koz",
|
|
90
90
|
propsAsIs: !1
|
|
91
91
|
}), yt = /* @__PURE__ */ a("div")({
|
|
92
92
|
name: "UserName",
|
|
93
|
-
class: "
|
|
93
|
+
class: "u1q6roj0",
|
|
94
94
|
propsAsIs: !1
|
|
95
|
-
}),
|
|
95
|
+
}), Nt = /* @__PURE__ */ a("div")({
|
|
96
96
|
name: "UserRating",
|
|
97
|
-
class: "
|
|
97
|
+
class: "ui0m425",
|
|
98
98
|
propsAsIs: !1
|
|
99
99
|
}), At = /* @__PURE__ */ a("img")({
|
|
100
100
|
name: "TrophyIcon",
|
|
101
|
-
class: "
|
|
101
|
+
class: "t1el3mrn",
|
|
102
102
|
propsAsIs: !1
|
|
103
|
-
}),
|
|
103
|
+
}), Tt = /* @__PURE__ */ a("div")({
|
|
104
104
|
name: "Rts",
|
|
105
|
-
class: "
|
|
105
|
+
class: "r2vgnxv",
|
|
106
106
|
propsAsIs: !1
|
|
107
107
|
}), Dt = /* @__PURE__ */ a("div")({
|
|
108
108
|
name: "RtsIndicator",
|
|
109
|
-
class: "
|
|
109
|
+
class: "roqn06j",
|
|
110
110
|
propsAsIs: !1
|
|
111
111
|
}), St = /* @__PURE__ */ a("div")({
|
|
112
112
|
name: "RtsLabel",
|
|
113
|
-
class: "
|
|
113
|
+
class: "r15adx7c",
|
|
114
114
|
propsAsIs: !1
|
|
115
115
|
}), zt = /* @__PURE__ */ a("div")({
|
|
116
116
|
name: "Divider",
|
|
117
|
-
class: "
|
|
117
|
+
class: "dv59lta",
|
|
118
118
|
propsAsIs: !1
|
|
119
119
|
}), xt = /* @__PURE__ */ a("div")({
|
|
120
120
|
name: "Ranks",
|
|
121
|
-
class: "
|
|
121
|
+
class: "r55lotb",
|
|
122
122
|
propsAsIs: !1
|
|
123
|
-
}),
|
|
123
|
+
}), jt = /* @__PURE__ */ a("div")({
|
|
124
124
|
name: "Statistics",
|
|
125
|
-
class: "
|
|
125
|
+
class: "s1knfgqt",
|
|
126
126
|
propsAsIs: !1
|
|
127
127
|
}), kt = /* @__PURE__ */ a("div")({
|
|
128
128
|
name: "AvatarPlaceholder",
|
|
129
|
-
class: "
|
|
129
|
+
class: "a1mqo824",
|
|
130
130
|
propsAsIs: !1
|
|
131
|
-
}),
|
|
131
|
+
}), Ot = /* @__PURE__ */ a("button")({
|
|
132
132
|
name: "UserAccountBtn",
|
|
133
|
-
class: "
|
|
133
|
+
class: "uxareh6",
|
|
134
134
|
propsAsIs: !1
|
|
135
|
-
}),
|
|
135
|
+
}), wt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Oe = ({
|
|
136
136
|
avatar: e,
|
|
137
137
|
name: t,
|
|
138
138
|
points: n,
|
|
139
|
-
friendsRank:
|
|
140
|
-
rank:
|
|
139
|
+
friendsRank: s,
|
|
140
|
+
rank: i,
|
|
141
141
|
streak: c,
|
|
142
142
|
correct: l,
|
|
143
143
|
incorrect: m,
|
|
@@ -145,17 +145,17 @@ const et = /* @__PURE__ */ a("div")({
|
|
|
145
145
|
successRate: f
|
|
146
146
|
}) => /* @__PURE__ */ I(ht, { children: [
|
|
147
147
|
/* @__PURE__ */ r(It, { children: /* @__PURE__ */ I(gt, { children: [
|
|
148
|
-
/* @__PURE__ */ I(
|
|
148
|
+
/* @__PURE__ */ I(Ot, { children: [
|
|
149
149
|
e && /* @__PURE__ */ r(Mt, { alt: "avatar", src: e }),
|
|
150
|
-
!e && /* @__PURE__ */ r(kt, { children:
|
|
150
|
+
!e && /* @__PURE__ */ r(kt, { children: ze(t || "") })
|
|
151
151
|
] }),
|
|
152
152
|
/* @__PURE__ */ I(vt, { children: [
|
|
153
153
|
/* @__PURE__ */ r(yt, { children: t }),
|
|
154
|
-
/* @__PURE__ */ I(
|
|
155
|
-
/* @__PURE__ */ I(
|
|
156
|
-
/* @__PURE__ */ r(At, { alt: "rank-icon", src:
|
|
154
|
+
/* @__PURE__ */ I(Nt, { children: [
|
|
155
|
+
/* @__PURE__ */ I(Tt, { children: [
|
|
156
|
+
/* @__PURE__ */ r(At, { alt: "rank-icon", src: wt }),
|
|
157
157
|
/* @__PURE__ */ I(Dt, { children: [
|
|
158
|
-
|
|
158
|
+
xe(n),
|
|
159
159
|
/* @__PURE__ */ r(St, { children: "PTS" })
|
|
160
160
|
] })
|
|
161
161
|
] }),
|
|
@@ -170,185 +170,185 @@ const et = /* @__PURE__ */ a("div")({
|
|
|
170
170
|
] }) }),
|
|
171
171
|
/* @__PURE__ */ I(ft, { children: [
|
|
172
172
|
/* @__PURE__ */ I(xt, { children: [
|
|
173
|
-
/* @__PURE__ */ r(
|
|
174
|
-
/* @__PURE__ */ r(
|
|
173
|
+
/* @__PURE__ */ r(le, { indicator: s || 0, title: "Friends rank" }),
|
|
174
|
+
/* @__PURE__ */ r(le, { indicator: i || 0, title: "Global rank" })
|
|
175
175
|
] }),
|
|
176
|
-
/* @__PURE__ */ I(
|
|
177
|
-
/* @__PURE__ */ r(
|
|
178
|
-
/* @__PURE__ */ r(
|
|
179
|
-
/* @__PURE__ */ r(
|
|
180
|
-
/* @__PURE__ */ r(
|
|
176
|
+
/* @__PURE__ */ I(jt, { children: [
|
|
177
|
+
/* @__PURE__ */ r(F, { indicator: c || 0, title: "Win streak" }),
|
|
178
|
+
/* @__PURE__ */ r(F, { indicator: l || 0, title: "Correct" }),
|
|
179
|
+
/* @__PURE__ */ r(F, { indicator: m || 0, title: "Incorrect" }),
|
|
180
|
+
/* @__PURE__ */ r(F, { indicator: `${f || 0}%`, title: "Succ. rate" })
|
|
181
181
|
] })
|
|
182
182
|
] })
|
|
183
|
-
] }),
|
|
183
|
+
] }), Ct = /* @__PURE__ */ a("div")({
|
|
184
184
|
name: "Container",
|
|
185
|
-
class: "
|
|
185
|
+
class: "c38csyt",
|
|
186
186
|
propsAsIs: !1
|
|
187
|
-
}),
|
|
187
|
+
}), $t = /* @__PURE__ */ a("div")({
|
|
188
188
|
name: "Title",
|
|
189
|
-
class: "
|
|
189
|
+
class: "ty221rx",
|
|
190
190
|
propsAsIs: !1
|
|
191
191
|
}), bt = /* @__PURE__ */ a("div")({
|
|
192
192
|
name: "Description",
|
|
193
|
-
class: "
|
|
193
|
+
class: "dlaj9xp",
|
|
194
194
|
propsAsIs: !1
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ r(
|
|
197
|
-
/* @__PURE__ */ r(
|
|
195
|
+
}), Et = ({ title: e, description: t }) => /* @__PURE__ */ I(Ct, { children: [
|
|
196
|
+
/* @__PURE__ */ r(j, { name: "icon-check-circle" }),
|
|
197
|
+
/* @__PURE__ */ r($t, { children: e }),
|
|
198
198
|
/* @__PURE__ */ r(bt, { children: t })
|
|
199
|
-
] }),
|
|
199
|
+
] }), Lt = /* @__PURE__ */ a("div")({
|
|
200
200
|
name: "Container",
|
|
201
|
-
class: "
|
|
201
|
+
class: "c16sbdnm",
|
|
202
202
|
propsAsIs: !1
|
|
203
|
-
}),
|
|
203
|
+
}), Rt = () => j, Qt = /* @__PURE__ */ a(Rt())({
|
|
204
204
|
name: "IconPrediction",
|
|
205
|
-
class: "
|
|
205
|
+
class: "ibhorgl",
|
|
206
206
|
propsAsIs: !0
|
|
207
|
-
}),
|
|
207
|
+
}), ce = /* @__PURE__ */ a("div")({
|
|
208
208
|
name: "FeedbackIconWrap",
|
|
209
|
-
class: "
|
|
209
|
+
class: "f1g20ja7",
|
|
210
210
|
propsAsIs: !1
|
|
211
|
-
}),
|
|
211
|
+
}), de = /* @__PURE__ */ a("div")({
|
|
212
212
|
name: "FeedbackHeader",
|
|
213
|
-
class: "
|
|
213
|
+
class: "f455ozj",
|
|
214
214
|
propsAsIs: !1
|
|
215
|
-
}),
|
|
215
|
+
}), Ut = /* @__PURE__ */ a("span")({
|
|
216
216
|
name: "FeedbackTitle",
|
|
217
|
-
class: "
|
|
217
|
+
class: "f1913njx",
|
|
218
218
|
propsAsIs: !1
|
|
219
219
|
}), Z = /* @__PURE__ */ a("span")({
|
|
220
220
|
name: "FeedbackDescription",
|
|
221
|
-
class: "
|
|
221
|
+
class: "fzfk69z",
|
|
222
222
|
propsAsIs: !1
|
|
223
|
-
}),
|
|
223
|
+
}), _t = /* @__PURE__ */ a("div")({
|
|
224
224
|
name: "FeedbackText",
|
|
225
|
-
class: "
|
|
225
|
+
class: "fx87qaj",
|
|
226
226
|
propsAsIs: !1
|
|
227
|
-
}),
|
|
227
|
+
}), qt = ({
|
|
228
228
|
feedbackMessages: e,
|
|
229
229
|
questionVotedCorrectly: t,
|
|
230
230
|
questionVoted: n,
|
|
231
|
-
questionType:
|
|
232
|
-
hasCorrectAnswer:
|
|
231
|
+
questionType: s,
|
|
232
|
+
hasCorrectAnswer: i,
|
|
233
233
|
questionStatus: c
|
|
234
234
|
}) => {
|
|
235
|
-
const l = n && (
|
|
236
|
-
if (!l && c !==
|
|
235
|
+
const l = n && (s === x.TRIVIA || s === x.PREDICTION);
|
|
236
|
+
if (!l && c !== _.RESOLVED)
|
|
237
237
|
return null;
|
|
238
|
-
const m =
|
|
239
|
-
return /* @__PURE__ */ I(
|
|
240
|
-
c ===
|
|
241
|
-
/* @__PURE__ */ r(
|
|
238
|
+
const m = s === x.PREDICTION && !i, d = t ? "correct" : "incorrect", f = t ? e.correctFeedback : e.incorrectFeedback;
|
|
239
|
+
return /* @__PURE__ */ I(Lt, { "data-isPrediction": m, children: [
|
|
240
|
+
c === _.RESOLVED && s === x.TRIVIA && !n && /* @__PURE__ */ I(E, { children: [
|
|
241
|
+
/* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(j, { name: "questionExpired" }) }),
|
|
242
242
|
/* @__PURE__ */ I("div", { children: [
|
|
243
|
-
/* @__PURE__ */ r(
|
|
244
|
-
/* @__PURE__ */ r(
|
|
243
|
+
/* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(Z, { children: "Question Expired" }) }),
|
|
244
|
+
/* @__PURE__ */ r(_t, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
245
245
|
] })
|
|
246
246
|
] }),
|
|
247
|
-
l && m && /* @__PURE__ */ I(
|
|
248
|
-
/* @__PURE__ */ r(
|
|
247
|
+
l && m && /* @__PURE__ */ I(E, { children: [
|
|
248
|
+
/* @__PURE__ */ r(Qt, { name: "icon-prediction" }),
|
|
249
249
|
/* @__PURE__ */ r(Z, { children: "Stay tuned to see if your prediction was correct." })
|
|
250
250
|
] }),
|
|
251
|
-
l &&
|
|
252
|
-
/* @__PURE__ */ r(
|
|
253
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ I(
|
|
254
|
-
/* @__PURE__ */ r(
|
|
251
|
+
l && i && /* @__PURE__ */ I(E, { children: [
|
|
252
|
+
/* @__PURE__ */ r(ce, { "data-feedbackType": d, children: /* @__PURE__ */ r(j, { name: d }) }),
|
|
253
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ I(de, { children: [
|
|
254
|
+
/* @__PURE__ */ r(Ut, { "data-feedbackType": d, children: f == null ? void 0 : f.title }),
|
|
255
255
|
/* @__PURE__ */ r(Z, { children: f == null ? void 0 : f.description })
|
|
256
256
|
] }) })
|
|
257
257
|
] })
|
|
258
258
|
] });
|
|
259
|
-
},
|
|
259
|
+
}, Pt = /* @__PURE__ */ a("div")({
|
|
260
260
|
name: "Container",
|
|
261
|
-
class: "
|
|
261
|
+
class: "c14ielyq",
|
|
262
262
|
propsAsIs: !1
|
|
263
263
|
}), Yt = /* @__PURE__ */ a("div")({
|
|
264
264
|
name: "Content",
|
|
265
|
-
class: "
|
|
265
|
+
class: "c1tlqx57",
|
|
266
266
|
propsAsIs: !1
|
|
267
267
|
}), Wt = /* @__PURE__ */ a("div")({
|
|
268
268
|
name: "Title",
|
|
269
|
-
class: "
|
|
269
|
+
class: "t1hq58md",
|
|
270
270
|
propsAsIs: !1
|
|
271
271
|
}), Ft = /* @__PURE__ */ a("div")({
|
|
272
272
|
name: "Options",
|
|
273
|
-
class: "
|
|
273
|
+
class: "o1c8nxcx",
|
|
274
274
|
propsAsIs: !1
|
|
275
|
-
}),
|
|
275
|
+
}), Vt = /* @__PURE__ */ a("button")({
|
|
276
276
|
name: "ButtonContainer",
|
|
277
|
-
class: "
|
|
277
|
+
class: "b1b6dl8t",
|
|
278
278
|
propsAsIs: !1
|
|
279
|
-
}),
|
|
279
|
+
}), Bt = /* @__PURE__ */ a("div")({
|
|
280
280
|
name: "ButtonPct",
|
|
281
|
-
class: "
|
|
281
|
+
class: "b4iik8i",
|
|
282
282
|
propsAsIs: !1
|
|
283
283
|
}), Ht = /* @__PURE__ */ a("span")({
|
|
284
284
|
name: "ButtonBody",
|
|
285
|
-
class: "
|
|
285
|
+
class: "b1gq1lnf",
|
|
286
286
|
propsAsIs: !1
|
|
287
287
|
}), Gt = /* @__PURE__ */ a("div")({
|
|
288
288
|
name: "IconContainer",
|
|
289
|
-
class: "
|
|
289
|
+
class: "i1j65z51",
|
|
290
290
|
propsAsIs: !1
|
|
291
291
|
}), Zt = /* @__PURE__ */ a("div")({
|
|
292
292
|
name: "IconWrap",
|
|
293
|
-
class: "
|
|
293
|
+
class: "i19tpfua",
|
|
294
294
|
propsAsIs: !1
|
|
295
|
-
}),
|
|
295
|
+
}), we = /* @__PURE__ */ a("img")({
|
|
296
296
|
name: "Icon",
|
|
297
|
-
class: "
|
|
297
|
+
class: "i1tubmma",
|
|
298
298
|
propsAsIs: !1
|
|
299
|
-
}), Jt = () =>
|
|
299
|
+
}), Jt = () => we, Kt = /* @__PURE__ */ a(Jt())({
|
|
300
300
|
name: "IconDefault",
|
|
301
|
-
class: "
|
|
301
|
+
class: "i1grrgwj",
|
|
302
302
|
propsAsIs: !0
|
|
303
|
-
}), Xt = () =>
|
|
303
|
+
}), Xt = () => we, en = /* @__PURE__ */ a(Xt())({
|
|
304
304
|
name: "IconCircle",
|
|
305
|
-
class: "
|
|
305
|
+
class: "ibemyq8",
|
|
306
306
|
propsAsIs: !0
|
|
307
307
|
}), tn = /* @__PURE__ */ a("span")({
|
|
308
308
|
name: "Title",
|
|
309
|
-
class: "
|
|
309
|
+
class: "t1dceht",
|
|
310
310
|
propsAsIs: !1
|
|
311
311
|
}), nn = /* @__PURE__ */ a("span")({
|
|
312
312
|
name: "Indicators",
|
|
313
|
-
class: "
|
|
313
|
+
class: "i116q4vq",
|
|
314
314
|
propsAsIs: !1
|
|
315
315
|
}), sn = /* @__PURE__ */ a("span")({
|
|
316
316
|
name: "Percentage",
|
|
317
|
-
class: "
|
|
317
|
+
class: "p17ajcu2",
|
|
318
318
|
propsAsIs: !1
|
|
319
|
-
}), rn = () =>
|
|
319
|
+
}), rn = () => j, on = /* @__PURE__ */ a(rn())({
|
|
320
320
|
name: "CheckIcon",
|
|
321
|
-
class: "
|
|
321
|
+
class: "cu9kmlb",
|
|
322
322
|
propsAsIs: !0
|
|
323
|
-
}),
|
|
323
|
+
}), ue = {
|
|
324
324
|
[b.CENTERED]: (e) => /* @__PURE__ */ r(Kt, { alt: "option-icon", src: e }),
|
|
325
325
|
[b.TRANSPARENT]: (e) => /* @__PURE__ */ r(Gt, { children: /* @__PURE__ */ r(Zt, { style: { backgroundImage: `url(${e})` } }) }),
|
|
326
326
|
[b.ROUNDED]: (e) => /* @__PURE__ */ r(en, { alt: "option-icon", src: e }),
|
|
327
327
|
[b.NONE]: () => null,
|
|
328
328
|
[b.UNSET]: () => null
|
|
329
|
-
}, an = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted:
|
|
330
|
-
if (e === x.POLL &&
|
|
329
|
+
}, an = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: s, questionVoted: i }) => {
|
|
330
|
+
if (e === x.POLL && s)
|
|
331
331
|
return "correct";
|
|
332
332
|
if (e === x.PREDICTION) {
|
|
333
|
-
if (t &&
|
|
334
|
-
return
|
|
335
|
-
if (
|
|
333
|
+
if (t && i)
|
|
334
|
+
return s ? n ? "correct" : "incorrect" : n ? "correct" : "unset";
|
|
335
|
+
if (s)
|
|
336
336
|
return "correct";
|
|
337
337
|
}
|
|
338
|
-
return e === x.TRIVIA &&
|
|
338
|
+
return e === x.TRIVIA && i ? s ? n ? "correct" : "incorrect" : n ? "correct" : "unset" : "unset";
|
|
339
339
|
}, ln = ({
|
|
340
340
|
questionType: e,
|
|
341
341
|
questionVoted: t,
|
|
342
342
|
correct: n,
|
|
343
|
-
hasCorrectAnswer:
|
|
344
|
-
questionStatus:
|
|
345
|
-
}) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n &&
|
|
343
|
+
hasCorrectAnswer: s,
|
|
344
|
+
questionStatus: i
|
|
345
|
+
}) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && s || i === _.RESOLVED && n : !1, cn = (e) => {
|
|
346
346
|
var t;
|
|
347
347
|
const {
|
|
348
348
|
// option props
|
|
349
349
|
id: n,
|
|
350
|
-
icon:
|
|
351
|
-
text:
|
|
350
|
+
icon: s,
|
|
351
|
+
text: i,
|
|
352
352
|
percentageDecimal: c,
|
|
353
353
|
// extra props
|
|
354
354
|
onVote: l,
|
|
@@ -359,12 +359,12 @@ const et = /* @__PURE__ */ a("div")({
|
|
|
359
359
|
answerTimeExpired: A,
|
|
360
360
|
questionStatus: v,
|
|
361
361
|
isLoading: g,
|
|
362
|
-
questionType:
|
|
362
|
+
questionType: T,
|
|
363
363
|
correct: D,
|
|
364
364
|
hasCorrectAnswer: o
|
|
365
|
-
} = e, u = an(e), p = ln({ questionType:
|
|
365
|
+
} = e, u = an(e), p = ln({ questionType: T, questionVoted: d, correct: D, hasCorrectAnswer: o, questionStatus: v }), h = d || v === _.RESOLVED && T === x.PREDICTION;
|
|
366
366
|
return /* @__PURE__ */ I(
|
|
367
|
-
|
|
367
|
+
Vt,
|
|
368
368
|
{
|
|
369
369
|
value: n,
|
|
370
370
|
"data-selected": m,
|
|
@@ -372,10 +372,10 @@ const et = /* @__PURE__ */ a("div")({
|
|
|
372
372
|
disabled: d || g || A,
|
|
373
373
|
onClick: l,
|
|
374
374
|
children: [
|
|
375
|
-
h && /* @__PURE__ */ r(
|
|
375
|
+
h && /* @__PURE__ */ r(Bt, { "data-answerState": u, style: { width: `${c}%` } }),
|
|
376
376
|
/* @__PURE__ */ I(Ht, { children: [
|
|
377
|
-
|
|
378
|
-
/* @__PURE__ */ r(tn, { children:
|
|
377
|
+
s && ((t = ue[f]) == null ? void 0 : t.call(ue, s)),
|
|
378
|
+
/* @__PURE__ */ r(tn, { children: i }),
|
|
379
379
|
h && /* @__PURE__ */ I(nn, { children: [
|
|
380
380
|
p && /* @__PURE__ */ r(on, { name: "selected" }),
|
|
381
381
|
/* @__PURE__ */ I(sn, { children: [
|
|
@@ -388,8 +388,8 @@ const et = /* @__PURE__ */ a("div")({
|
|
|
388
388
|
}
|
|
389
389
|
);
|
|
390
390
|
};
|
|
391
|
-
var
|
|
392
|
-
let [l, m] =
|
|
391
|
+
var pe = typeof window > "u" ? Ke : Xe, dn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: s = 0, onComplete: i, onUpdate: c }) => {
|
|
392
|
+
let [l, m] = R(n), d = C(0), f = C(n), A = C(n * -1e3), v = C(null), g = C(null), T = C(null), D = (p) => {
|
|
393
393
|
let h = p / 1e3;
|
|
394
394
|
if (g.current === null) {
|
|
395
395
|
g.current = h, v.current = requestAnimationFrame(D);
|
|
@@ -397,80 +397,80 @@ var ue = typeof window > "u" ? Ke : Xe, dn = ({ isPlaying: e, duration: t, start
|
|
|
397
397
|
}
|
|
398
398
|
let M = h - g.current, y = d.current + M;
|
|
399
399
|
g.current = h, d.current = y;
|
|
400
|
-
let
|
|
401
|
-
m(z ? t :
|
|
400
|
+
let N = f.current + (s === 0 ? y : (y / s | 0) * s), S = f.current + y, z = typeof t == "number" && S >= t;
|
|
401
|
+
m(z ? t : N), z || (v.current = requestAnimationFrame(D));
|
|
402
402
|
}, o = () => {
|
|
403
|
-
v.current && cancelAnimationFrame(v.current),
|
|
403
|
+
v.current && cancelAnimationFrame(v.current), T.current && clearTimeout(T.current), g.current = null;
|
|
404
404
|
}, u = q((p) => {
|
|
405
405
|
o(), d.current = 0;
|
|
406
406
|
let h = typeof p == "number" ? p : n;
|
|
407
407
|
f.current = h, m(h), e && (v.current = requestAnimationFrame(D));
|
|
408
408
|
}, [e, n]);
|
|
409
|
-
return
|
|
409
|
+
return pe(() => {
|
|
410
410
|
if (c == null || c(l), t && l >= t) {
|
|
411
411
|
A.current += t * 1e3;
|
|
412
|
-
let { shouldRepeat: p = !1, delay: h = 0, newStartAt: M } = (
|
|
413
|
-
p && (
|
|
412
|
+
let { shouldRepeat: p = !1, delay: h = 0, newStartAt: M } = (i == null ? void 0 : i(A.current / 1e3)) || {};
|
|
413
|
+
p && (T.current = setTimeout(() => u(M), h * 1e3));
|
|
414
414
|
}
|
|
415
|
-
}, [l, t]),
|
|
415
|
+
}, [l, t]), pe(() => (e && (v.current = requestAnimationFrame(D)), o), [e, t, s]), { elapsedTime: l, reset: u };
|
|
416
416
|
}, un = (e, t, n) => {
|
|
417
|
-
let
|
|
418
|
-
return { path: `m ${
|
|
419
|
-
},
|
|
420
|
-
if (
|
|
417
|
+
let s = e / 2, i = t / 2, c = s - i, l = 2 * c, m = n === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * c;
|
|
418
|
+
return { path: `m ${s},${i} a ${c},${c} 0 ${m} 0,${l} a ${c},${c} 0 ${m} 0,-${l}`, pathLength: d };
|
|
419
|
+
}, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, pn = (e) => ({ position: "relative", width: e, height: e }), mn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Ce = (e, t, n, s, i) => {
|
|
420
|
+
if (s === 0)
|
|
421
421
|
return t;
|
|
422
|
-
let c = (
|
|
422
|
+
let c = (i ? s - e : e) / s;
|
|
423
423
|
return t + n * c;
|
|
424
|
-
},
|
|
424
|
+
}, he = (e) => {
|
|
425
425
|
var t, n;
|
|
426
|
-
return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (
|
|
426
|
+
return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (s, i, c, l) => `#${i}${i}${c}${c}${l}${l}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((s) => parseInt(s, 16))) != null ? n : [];
|
|
427
427
|
}, hn = (e, t) => {
|
|
428
428
|
var n;
|
|
429
|
-
let { colors:
|
|
430
|
-
if (typeof
|
|
431
|
-
return
|
|
432
|
-
let l = (n =
|
|
433
|
-
if (!
|
|
434
|
-
return
|
|
429
|
+
let { colors: s, colorsTime: i, isSmoothColorTransition: c = !0 } = e;
|
|
430
|
+
if (typeof s == "string")
|
|
431
|
+
return s;
|
|
432
|
+
let l = (n = i == null ? void 0 : i.findIndex((g, T) => g >= t && t >= i[T + 1])) != null ? n : -1;
|
|
433
|
+
if (!i || l === -1)
|
|
434
|
+
return s[0];
|
|
435
435
|
if (!c)
|
|
436
|
-
return
|
|
437
|
-
let m =
|
|
438
|
-
return `rgb(${f.map((g,
|
|
436
|
+
return s[l];
|
|
437
|
+
let m = i[l] - t, d = i[l] - i[l + 1], f = he(s[l]), A = he(s[l + 1]), v = !!e.isGrowing;
|
|
438
|
+
return `rgb(${f.map((g, T) => Ce(m, g, A[T] - g, d, v) | 0).join(",")})`;
|
|
439
439
|
}, In = (e) => {
|
|
440
|
-
let { duration: t, initialRemainingTime: n, updateInterval:
|
|
440
|
+
let { duration: t, initialRemainingTime: n, updateInterval: s, size: i = 180, strokeWidth: c = 12, trailStrokeWidth: l, isPlaying: m = !1, isGrowing: d = !1, rotation: f = "clockwise", onComplete: A, onUpdate: v } = e, g = C(), T = Math.max(c, l ?? 0), { path: D, pathLength: o } = un(i, T, f), { elapsedTime: u } = dn({ isPlaying: m, duration: t, startAt: me(t, n), updateInterval: s, onUpdate: typeof v == "function" ? (h) => {
|
|
441
441
|
let M = Math.ceil(t - h);
|
|
442
442
|
M !== g.current && (g.current = M, v(M));
|
|
443
443
|
} : void 0, onComplete: typeof A == "function" ? (h) => {
|
|
444
444
|
var M;
|
|
445
|
-
let { shouldRepeat: y, delay:
|
|
445
|
+
let { shouldRepeat: y, delay: N, newInitialRemainingTime: S } = (M = A(h)) != null ? M : {};
|
|
446
446
|
if (y)
|
|
447
|
-
return { shouldRepeat: y, delay:
|
|
447
|
+
return { shouldRepeat: y, delay: N, newStartAt: me(t, S) };
|
|
448
448
|
} : void 0 }), p = t - u;
|
|
449
|
-
return { elapsedTime: u, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size:
|
|
450
|
-
},
|
|
451
|
-
let { children: t, strokeLinecap: n, trailColor:
|
|
452
|
-
return
|
|
449
|
+
return { elapsedTime: u, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size: i, stroke: hn(e, p), strokeDashoffset: Ce(u, 0, o, t, d), strokeWidth: c };
|
|
450
|
+
}, $e = (e) => {
|
|
451
|
+
let { children: t, strokeLinecap: n, trailColor: s, trailStrokeWidth: i } = e, { path: c, pathLength: l, stroke: m, strokeDashoffset: d, remainingTime: f, elapsedTime: A, size: v, strokeWidth: g } = In(e);
|
|
452
|
+
return U.createElement("div", { style: pn(v) }, U.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: c, fill: "none", stroke: s ?? "#d9d9d9", strokeWidth: i ?? g }), U.createElement("path", { d: c, fill: "none", stroke: m, strokeLinecap: n ?? "round", strokeWidth: g, strokeDasharray: l, strokeDashoffset: d })), typeof t == "function" && U.createElement("div", { style: mn }, t({ remainingTime: f, elapsedTime: A, color: m })));
|
|
453
453
|
};
|
|
454
|
-
|
|
455
|
-
const fn = [
|
|
454
|
+
$e.displayName = "CountdownCircleTimer";
|
|
455
|
+
const fn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], gn = [10, 10, 0], Mn = /* @__PURE__ */ a("div")({
|
|
456
456
|
name: "RemainingTime",
|
|
457
|
-
class: "
|
|
457
|
+
class: "r165427",
|
|
458
458
|
propsAsIs: !1
|
|
459
|
-
}), vn =
|
|
459
|
+
}), vn = L.SECONDARY_GREEN6, Ie = L.SECONDARY_RED3, yn = L.NEUTRALS_GRAY3, Nn = ({
|
|
460
460
|
isPlaying: e = !0,
|
|
461
461
|
duration: t = 30,
|
|
462
462
|
onTimerExpired: n
|
|
463
463
|
}) => {
|
|
464
|
-
const [
|
|
464
|
+
const [s, i] = R(t > 10 ? vn : Ie), c = ({
|
|
465
465
|
remainingTime: d
|
|
466
466
|
}) => /* @__PURE__ */ r(Mn, {
|
|
467
467
|
children: d
|
|
468
468
|
}), l = q(() => {
|
|
469
|
-
n == null || n(),
|
|
470
|
-
}, [n,
|
|
471
|
-
d === 10 &&
|
|
472
|
-
}, [
|
|
473
|
-
return /* @__PURE__ */ r(
|
|
469
|
+
n == null || n(), i(yn);
|
|
470
|
+
}, [n, i]), m = q((d) => {
|
|
471
|
+
d === 10 && i(Ie);
|
|
472
|
+
}, [i]);
|
|
473
|
+
return /* @__PURE__ */ r($e, {
|
|
474
474
|
isPlaying: e,
|
|
475
475
|
duration: t,
|
|
476
476
|
colors: fn,
|
|
@@ -478,61 +478,61 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
|
|
|
478
478
|
size: 32,
|
|
479
479
|
strokeWidth: 2,
|
|
480
480
|
trailStrokeWidth: 2,
|
|
481
|
-
trailColor:
|
|
481
|
+
trailColor: s,
|
|
482
482
|
onComplete: l,
|
|
483
483
|
onUpdate: m,
|
|
484
484
|
children: c
|
|
485
485
|
});
|
|
486
486
|
}, An = /* @__PURE__ */ a("div")({
|
|
487
487
|
name: "WinBarContainer",
|
|
488
|
-
class: "
|
|
488
|
+
class: "wie6cqo",
|
|
489
489
|
propsAsIs: !1
|
|
490
|
-
}),
|
|
490
|
+
}), Tn = /* @__PURE__ */ a("div")({
|
|
491
491
|
name: "Content",
|
|
492
|
-
class: "
|
|
492
|
+
class: "cgizw4u",
|
|
493
493
|
propsAsIs: !1
|
|
494
494
|
}), Dn = /* @__PURE__ */ a("div")({
|
|
495
495
|
name: "Title",
|
|
496
|
-
class: "
|
|
496
|
+
class: "t1l3ucjp",
|
|
497
497
|
propsAsIs: !1
|
|
498
|
-
}), Sn = () =>
|
|
498
|
+
}), Sn = () => j, zn = /* @__PURE__ */ a(Sn())({
|
|
499
499
|
name: "WinIcon",
|
|
500
|
-
class: "
|
|
500
|
+
class: "wx7j799",
|
|
501
501
|
propsAsIs: !0
|
|
502
502
|
}), xn = /* @__PURE__ */ a("div")({
|
|
503
503
|
name: "Points",
|
|
504
|
-
class: "
|
|
504
|
+
class: "p4lwuj0",
|
|
505
505
|
propsAsIs: !1
|
|
506
|
-
}),
|
|
506
|
+
}), jn = /* @__PURE__ */ a("span")({
|
|
507
507
|
name: "PointsCount",
|
|
508
|
-
class: "
|
|
508
|
+
class: "po9i64o",
|
|
509
509
|
propsAsIs: !1
|
|
510
510
|
}), kn = /* @__PURE__ */ a("span")({
|
|
511
511
|
name: "PointsUnits",
|
|
512
|
-
class: "
|
|
512
|
+
class: "pe5g05h",
|
|
513
513
|
propsAsIs: !1
|
|
514
|
-
}),
|
|
515
|
-
/* @__PURE__ */ I(
|
|
514
|
+
}), On = ({ title: e, points: t, isPlayingTimer: n, isTimer: s, onTimerExpired: i }) => /* @__PURE__ */ I(An, { children: [
|
|
515
|
+
/* @__PURE__ */ I(Tn, { children: [
|
|
516
516
|
e && /* @__PURE__ */ r(Dn, { children: e }),
|
|
517
|
-
t !== void 0 && /* @__PURE__ */ I(
|
|
517
|
+
t !== void 0 && /* @__PURE__ */ I(E, { children: [
|
|
518
518
|
/* @__PURE__ */ r(zn, { name: "icon-trophy" }),
|
|
519
519
|
/* @__PURE__ */ I(xn, { children: [
|
|
520
|
-
/* @__PURE__ */ r(
|
|
520
|
+
/* @__PURE__ */ r(jn, { children: t }),
|
|
521
521
|
/* @__PURE__ */ r(kn, { children: "PTS" })
|
|
522
522
|
] })
|
|
523
523
|
] })
|
|
524
524
|
] }),
|
|
525
|
-
|
|
526
|
-
] }),
|
|
527
|
-
var
|
|
528
|
-
const
|
|
525
|
+
s && /* @__PURE__ */ r(Nn, { isPlaying: n, onTimerExpired: i })
|
|
526
|
+
] }), wn = ({ openedQuestion: e, vote: t, close: n }) => {
|
|
527
|
+
var s;
|
|
528
|
+
const i = e.subject, c = e.type, l = (s = e.options) == null ? void 0 : s.options, [m, d] = R(!1), [f, A] = R(!1), [v, g] = R(""), T = e == null ? void 0 : e.id, D = q(
|
|
529
529
|
async (y) => {
|
|
530
|
-
if (
|
|
531
|
-
const
|
|
532
|
-
g(
|
|
530
|
+
if (T) {
|
|
531
|
+
const N = y.currentTarget.value;
|
|
532
|
+
g(N), A(!0), await t(T, N), A(!1);
|
|
533
533
|
}
|
|
534
534
|
},
|
|
535
|
-
[
|
|
535
|
+
[T, g, t]
|
|
536
536
|
), o = q(() => {
|
|
537
537
|
d(!0), setTimeout(n, 3e3);
|
|
538
538
|
}, [n]), u = V(
|
|
@@ -553,9 +553,9 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
|
|
|
553
553
|
// ToDo: Figure out why imageMode is not in the response
|
|
554
554
|
onVote: D
|
|
555
555
|
})) : [], [p, m, f, e, u, D, v]), M = l && (l.case === "trivia" || l.case === "prediction") ? l.value : void 0;
|
|
556
|
-
return /* @__PURE__ */ r(
|
|
556
|
+
return /* @__PURE__ */ r(se, { "data-question-header": "true", children: /* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ I(Yt, { children: [
|
|
557
557
|
M && /* @__PURE__ */ r(
|
|
558
|
-
|
|
558
|
+
qt,
|
|
559
559
|
{
|
|
560
560
|
feedbackMessages: M,
|
|
561
561
|
questionVoted: !!u,
|
|
@@ -566,7 +566,7 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
|
|
|
566
566
|
}
|
|
567
567
|
),
|
|
568
568
|
/* @__PURE__ */ r(
|
|
569
|
-
|
|
569
|
+
On,
|
|
570
570
|
{
|
|
571
571
|
title: m ? "Time expired" : "To win",
|
|
572
572
|
points: m ? void 0 : 100,
|
|
@@ -575,145 +575,145 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
|
|
|
575
575
|
}
|
|
576
576
|
),
|
|
577
577
|
m ? /* @__PURE__ */ r(
|
|
578
|
-
|
|
578
|
+
Et,
|
|
579
579
|
{
|
|
580
580
|
title: "More to come...",
|
|
581
581
|
description: "Watch for additional enhanced stream interactive experience."
|
|
582
582
|
}
|
|
583
|
-
) : /* @__PURE__ */ I(
|
|
584
|
-
/* @__PURE__ */ r(Wt, { children:
|
|
583
|
+
) : /* @__PURE__ */ I(E, { children: [
|
|
584
|
+
/* @__PURE__ */ r(Wt, { children: i }),
|
|
585
585
|
/* @__PURE__ */ r(Ft, { children: h.map((y) => /* @__PURE__ */ r(cn, { ...y }, y.id)) })
|
|
586
586
|
] })
|
|
587
587
|
] }) }) });
|
|
588
|
-
},
|
|
588
|
+
}, Cn = /* @__PURE__ */ a("div")({
|
|
589
589
|
name: "Container",
|
|
590
|
-
class: "
|
|
590
|
+
class: "cgn5uen",
|
|
591
591
|
propsAsIs: !1
|
|
592
|
-
}),
|
|
592
|
+
}), $n = /* @__PURE__ */ a("div")({
|
|
593
593
|
name: "Content",
|
|
594
|
-
class: "
|
|
594
|
+
class: "c1px8nt6",
|
|
595
595
|
propsAsIs: !1
|
|
596
596
|
}), bn = /* @__PURE__ */ a("h3")({
|
|
597
597
|
name: "Title",
|
|
598
|
-
class: "
|
|
598
|
+
class: "t5et2jt",
|
|
599
599
|
propsAsIs: !1
|
|
600
|
-
}),
|
|
600
|
+
}), En = /* @__PURE__ */ a("div")({
|
|
601
601
|
name: "Description",
|
|
602
|
-
class: "
|
|
602
|
+
class: "d1i2kpk2",
|
|
603
603
|
propsAsIs: !1
|
|
604
|
-
}),
|
|
604
|
+
}), Ln = /* @__PURE__ */ a("div")({
|
|
605
605
|
name: "DateWrap",
|
|
606
|
-
class: "
|
|
606
|
+
class: "dd3lh3p",
|
|
607
607
|
propsAsIs: !1
|
|
608
608
|
}), be = ({ created: e, title: t, instantView: n }) => {
|
|
609
|
-
const
|
|
609
|
+
const s = V(() => {
|
|
610
610
|
if (e) {
|
|
611
|
-
const
|
|
612
|
-
if (Ye(
|
|
611
|
+
const i = new Date(e);
|
|
612
|
+
if (Ye(i))
|
|
613
613
|
return {
|
|
614
|
-
date: We(
|
|
615
|
-
time: Fe(
|
|
614
|
+
date: We(i),
|
|
615
|
+
time: Fe(i)
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
618
|
return null;
|
|
619
619
|
}, [e]);
|
|
620
|
-
return /* @__PURE__ */ I(
|
|
621
|
-
|
|
622
|
-
|
|
620
|
+
return /* @__PURE__ */ I(Cn, { children: [
|
|
621
|
+
s && /* @__PURE__ */ I(Ln, { children: [
|
|
622
|
+
s.date,
|
|
623
623
|
" · ",
|
|
624
|
-
|
|
624
|
+
s.time
|
|
625
625
|
] }),
|
|
626
|
-
(n == null ? void 0 : n.video) && /* @__PURE__ */ r(
|
|
627
|
-
/* @__PURE__ */ I(
|
|
626
|
+
(n == null ? void 0 : n.video) && /* @__PURE__ */ r(Ve, { source: n.video.url, poster: n.video.thumbnailUrl }),
|
|
627
|
+
/* @__PURE__ */ I($n, { children: [
|
|
628
628
|
/* @__PURE__ */ r(bn, { children: (n == null ? void 0 : n.heading) || t }),
|
|
629
|
-
/* @__PURE__ */ r(
|
|
629
|
+
/* @__PURE__ */ r(En, { children: n == null ? void 0 : n.body })
|
|
630
630
|
] })
|
|
631
631
|
] });
|
|
632
|
-
},
|
|
632
|
+
}, Rn = /* @__PURE__ */ a("div")({
|
|
633
633
|
name: "Container",
|
|
634
|
-
class: "
|
|
634
|
+
class: "c1euiow",
|
|
635
635
|
propsAsIs: !1
|
|
636
|
-
}),
|
|
636
|
+
}), Qn = /* @__PURE__ */ a("a")({
|
|
637
637
|
name: "WebLinkBtn",
|
|
638
|
-
class: "
|
|
638
|
+
class: "w19zie3h",
|
|
639
639
|
propsAsIs: !1
|
|
640
|
-
}),
|
|
640
|
+
}), Un = ({ instantView: e, ...t }) => /* @__PURE__ */ I(Rn, { children: [
|
|
641
641
|
/* @__PURE__ */ r(be, { instantView: e, ...t }),
|
|
642
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ I(
|
|
642
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ I(Qn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
643
643
|
"Explore more of the Masters History",
|
|
644
|
-
/* @__PURE__ */ r(
|
|
644
|
+
/* @__PURE__ */ r(j, { name: "icon-external-link" })
|
|
645
645
|
] })
|
|
646
|
-
] }),
|
|
646
|
+
] }), _n = /* @__PURE__ */ a("div")({
|
|
647
647
|
name: "QuestionContainer",
|
|
648
|
-
class: "
|
|
648
|
+
class: "qdri6g3",
|
|
649
649
|
propsAsIs: !1
|
|
650
|
-
}),
|
|
650
|
+
}), qn = ({
|
|
651
651
|
openedQuestion: e
|
|
652
652
|
}) => {
|
|
653
653
|
var t;
|
|
654
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ r(
|
|
654
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ r(Un, {
|
|
655
655
|
created: e.attributes.created,
|
|
656
656
|
...e.attributes.attributes.value
|
|
657
657
|
}) : null;
|
|
658
|
-
},
|
|
658
|
+
}, Pn = ({
|
|
659
659
|
extendedQuestion: e,
|
|
660
660
|
vote: t,
|
|
661
661
|
close: n
|
|
662
662
|
}) => {
|
|
663
663
|
const {
|
|
664
|
-
loading:
|
|
665
|
-
data:
|
|
664
|
+
loading: s,
|
|
665
|
+
data: i
|
|
666
666
|
} = e;
|
|
667
|
-
return !
|
|
667
|
+
return !s && i ? /* @__PURE__ */ r(wn, {
|
|
668
668
|
vote: t,
|
|
669
669
|
close: n,
|
|
670
|
-
openedQuestion:
|
|
670
|
+
openedQuestion: i
|
|
671
671
|
}) : null;
|
|
672
672
|
}, Yn = ({
|
|
673
673
|
gamification: e
|
|
674
674
|
}) => {
|
|
675
675
|
var t;
|
|
676
|
-
const n =
|
|
676
|
+
const n = w(e.openedQuestion.$store), s = w(e.openedQuestion.$extendedStore);
|
|
677
677
|
if (!n)
|
|
678
678
|
return null;
|
|
679
|
-
const
|
|
680
|
-
return /* @__PURE__ */ I(
|
|
679
|
+
const i = n.type;
|
|
680
|
+
return /* @__PURE__ */ I(_n, {
|
|
681
681
|
children: [/* @__PURE__ */ r(ke, {
|
|
682
682
|
close: e.closeQuestion,
|
|
683
683
|
type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
|
|
684
|
-
}),
|
|
684
|
+
}), i === "question" && /* @__PURE__ */ r(Pn, {
|
|
685
685
|
vote: e.submitAnswer,
|
|
686
686
|
close: e.closeQuestion,
|
|
687
|
-
extendedQuestion:
|
|
688
|
-
}),
|
|
687
|
+
extendedQuestion: s
|
|
688
|
+
}), i !== "question" && /* @__PURE__ */ r(qn, {
|
|
689
689
|
openedQuestion: n
|
|
690
690
|
})]
|
|
691
691
|
});
|
|
692
692
|
}, Wn = /* @__PURE__ */ a("div")({
|
|
693
693
|
name: "Container",
|
|
694
|
-
class: "
|
|
694
|
+
class: "c115qtkr",
|
|
695
695
|
propsAsIs: !1
|
|
696
696
|
}), Fn = /* @__PURE__ */ a("div")({
|
|
697
697
|
name: "STabs",
|
|
698
|
-
class: "
|
|
698
|
+
class: "sxnslc8",
|
|
699
699
|
propsAsIs: !1
|
|
700
|
-
}),
|
|
700
|
+
}), Vn = /* @__PURE__ */ a("button")({
|
|
701
701
|
name: "Button",
|
|
702
|
-
class: "
|
|
702
|
+
class: "b1umzux0",
|
|
703
703
|
propsAsIs: !1
|
|
704
|
-
}),
|
|
704
|
+
}), Bn = /* @__PURE__ */ a("span")({
|
|
705
705
|
name: "Title",
|
|
706
|
-
class: "
|
|
706
|
+
class: "tspsaas",
|
|
707
707
|
propsAsIs: !1
|
|
708
708
|
});
|
|
709
|
-
var
|
|
710
|
-
const
|
|
711
|
-
/* @__PURE__ */ r(
|
|
709
|
+
var B = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(B || {});
|
|
710
|
+
const fe = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ r(Vn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ r(Bn, { children: e }) }), Hn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ r(Wn, { children: /* @__PURE__ */ I(Fn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
711
|
+
/* @__PURE__ */ r(fe, { title: "Home", active: e === "home", onClick: () => t(
|
|
712
712
|
"home"
|
|
713
713
|
/* HOME */
|
|
714
714
|
) }),
|
|
715
715
|
/* @__PURE__ */ r(
|
|
716
|
-
|
|
716
|
+
fe,
|
|
717
717
|
{
|
|
718
718
|
title: "Leader Board",
|
|
719
719
|
active: e === "leaderboard",
|
|
@@ -728,30 +728,30 @@ function te() {
|
|
|
728
728
|
return te = Object.assign ? Object.assign.bind() : function(e) {
|
|
729
729
|
for (var t = 1; t < arguments.length; t++) {
|
|
730
730
|
var n = arguments[t];
|
|
731
|
-
for (var
|
|
732
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
731
|
+
for (var s in n)
|
|
732
|
+
Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]);
|
|
733
733
|
}
|
|
734
734
|
return e;
|
|
735
735
|
}, te.apply(this, arguments);
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function ge(e) {
|
|
738
738
|
if (e === void 0)
|
|
739
739
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
740
740
|
return e;
|
|
741
741
|
}
|
|
742
742
|
function ne(e, t) {
|
|
743
|
-
return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
744
|
-
return
|
|
743
|
+
return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, i) {
|
|
744
|
+
return s.__proto__ = i, s;
|
|
745
745
|
}, ne(e, t);
|
|
746
746
|
}
|
|
747
747
|
function Gn(e, t) {
|
|
748
748
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ne(e, t);
|
|
749
749
|
}
|
|
750
|
-
var
|
|
750
|
+
var Me = Number.isNaN || function(t) {
|
|
751
751
|
return typeof t == "number" && t !== t;
|
|
752
752
|
};
|
|
753
753
|
function Zn(e, t) {
|
|
754
|
-
return !!(e === t ||
|
|
754
|
+
return !!(e === t || Me(e) && Me(t));
|
|
755
755
|
}
|
|
756
756
|
function Jn(e, t) {
|
|
757
757
|
if (e.length !== t.length)
|
|
@@ -763,61 +763,61 @@ function Jn(e, t) {
|
|
|
763
763
|
}
|
|
764
764
|
function J(e, t) {
|
|
765
765
|
t === void 0 && (t = Jn);
|
|
766
|
-
var n,
|
|
766
|
+
var n, s = [], i, c = !1;
|
|
767
767
|
function l() {
|
|
768
768
|
for (var m = [], d = 0; d < arguments.length; d++)
|
|
769
769
|
m[d] = arguments[d];
|
|
770
|
-
return c && n === this && t(m,
|
|
770
|
+
return c && n === this && t(m, s) || (i = e.apply(this, m), c = !0, n = this, s = m), i;
|
|
771
771
|
}
|
|
772
772
|
return l;
|
|
773
773
|
}
|
|
774
|
-
var Kn = typeof performance == "object" && typeof performance.now == "function",
|
|
774
|
+
var Kn = typeof performance == "object" && typeof performance.now == "function", ve = Kn ? function() {
|
|
775
775
|
return performance.now();
|
|
776
776
|
} : function() {
|
|
777
777
|
return Date.now();
|
|
778
778
|
};
|
|
779
|
-
function
|
|
779
|
+
function ye(e) {
|
|
780
780
|
cancelAnimationFrame(e.id);
|
|
781
781
|
}
|
|
782
782
|
function Xn(e, t) {
|
|
783
|
-
var n =
|
|
784
|
-
function
|
|
785
|
-
|
|
783
|
+
var n = ve();
|
|
784
|
+
function s() {
|
|
785
|
+
ve() - n >= t ? e.call(null) : i.id = requestAnimationFrame(s);
|
|
786
786
|
}
|
|
787
|
-
var
|
|
788
|
-
id: requestAnimationFrame(
|
|
787
|
+
var i = {
|
|
788
|
+
id: requestAnimationFrame(s)
|
|
789
789
|
};
|
|
790
|
-
return
|
|
790
|
+
return i;
|
|
791
791
|
}
|
|
792
792
|
var K = -1;
|
|
793
|
-
function
|
|
793
|
+
function Ne(e) {
|
|
794
794
|
if (e === void 0 && (e = !1), K === -1 || e) {
|
|
795
795
|
var t = document.createElement("div"), n = t.style;
|
|
796
796
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), K = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
797
797
|
}
|
|
798
798
|
return K;
|
|
799
799
|
}
|
|
800
|
-
var
|
|
801
|
-
function
|
|
802
|
-
if (e === void 0 && (e = !1),
|
|
800
|
+
var $ = null;
|
|
801
|
+
function Ae(e) {
|
|
802
|
+
if (e === void 0 && (e = !1), $ === null || e) {
|
|
803
803
|
var t = document.createElement("div"), n = t.style;
|
|
804
804
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
805
|
-
var
|
|
806
|
-
return
|
|
805
|
+
var s = document.createElement("div"), i = s.style;
|
|
806
|
+
return i.width = "100px", i.height = "100px", t.appendChild(s), document.body.appendChild(t), t.scrollLeft > 0 ? $ = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? $ = "negative" : $ = "positive-ascending"), document.body.removeChild(t), $;
|
|
807
807
|
}
|
|
808
|
-
return
|
|
808
|
+
return $;
|
|
809
809
|
}
|
|
810
|
-
var
|
|
810
|
+
var es = 150, ts = function(t, n) {
|
|
811
811
|
return t;
|
|
812
812
|
};
|
|
813
|
-
function
|
|
814
|
-
var t, n = e.getItemOffset,
|
|
813
|
+
function ns(e) {
|
|
814
|
+
var t, n = e.getItemOffset, s = e.getEstimatedTotalSize, i = e.getItemSize, c = e.getOffsetForIndexAndAlignment, l = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, d = e.initInstanceProps, f = e.shouldResetStyleCacheOnItemSizeChange, A = e.validateProps;
|
|
815
815
|
return t = /* @__PURE__ */ function(v) {
|
|
816
816
|
Gn(g, v);
|
|
817
817
|
function g(D) {
|
|
818
818
|
var o;
|
|
819
|
-
return o = v.call(this, D) || this, o._instanceProps = d(o.props,
|
|
820
|
-
instance:
|
|
819
|
+
return o = v.call(this, D) || this, o._instanceProps = d(o.props, ge(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
|
|
820
|
+
instance: ge(o),
|
|
821
821
|
isScrolling: !1,
|
|
822
822
|
scrollDirection: "forward",
|
|
823
823
|
scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
|
|
@@ -836,18 +836,18 @@ function ni(e) {
|
|
|
836
836
|
scrollUpdateWasRequested: h
|
|
837
837
|
});
|
|
838
838
|
}), o._getItemStyle = void 0, o._getItemStyle = function(u) {
|
|
839
|
-
var p = o.props, h = p.direction, M = p.itemSize, y = p.layout,
|
|
840
|
-
if (
|
|
841
|
-
S =
|
|
839
|
+
var p = o.props, h = p.direction, M = p.itemSize, y = p.layout, N = o._getItemStyleCache(f && M, f && y, f && h), S;
|
|
840
|
+
if (N.hasOwnProperty(u))
|
|
841
|
+
S = N[u];
|
|
842
842
|
else {
|
|
843
|
-
var z = n(o.props, u, o._instanceProps), k =
|
|
844
|
-
|
|
843
|
+
var z = n(o.props, u, o._instanceProps), k = i(o.props, u, o._instanceProps), O = h === "horizontal" || y === "horizontal", P = h === "rtl", Y = O ? z : 0;
|
|
844
|
+
N[u] = S = {
|
|
845
845
|
position: "absolute",
|
|
846
|
-
left:
|
|
847
|
-
right:
|
|
848
|
-
top:
|
|
849
|
-
height:
|
|
850
|
-
width:
|
|
846
|
+
left: P ? void 0 : Y,
|
|
847
|
+
right: P ? Y : void 0,
|
|
848
|
+
top: O ? 0 : z,
|
|
849
|
+
height: O ? "100%" : k,
|
|
850
|
+
width: O ? k : "100%"
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
853
|
return S;
|
|
@@ -855,12 +855,12 @@ function ni(e) {
|
|
|
855
855
|
return {};
|
|
856
856
|
}), o._onScrollHorizontal = function(u) {
|
|
857
857
|
var p = u.currentTarget, h = p.clientWidth, M = p.scrollLeft, y = p.scrollWidth;
|
|
858
|
-
o.setState(function(
|
|
859
|
-
if (
|
|
858
|
+
o.setState(function(N) {
|
|
859
|
+
if (N.scrollOffset === M)
|
|
860
860
|
return null;
|
|
861
861
|
var S = o.props.direction, z = M;
|
|
862
862
|
if (S === "rtl")
|
|
863
|
-
switch (
|
|
863
|
+
switch (Ae()) {
|
|
864
864
|
case "negative":
|
|
865
865
|
z = -M;
|
|
866
866
|
break;
|
|
@@ -870,20 +870,20 @@ function ni(e) {
|
|
|
870
870
|
}
|
|
871
871
|
return z = Math.max(0, Math.min(z, y - h)), {
|
|
872
872
|
isScrolling: !0,
|
|
873
|
-
scrollDirection:
|
|
873
|
+
scrollDirection: N.scrollOffset < M ? "forward" : "backward",
|
|
874
874
|
scrollOffset: z,
|
|
875
875
|
scrollUpdateWasRequested: !1
|
|
876
876
|
};
|
|
877
877
|
}, o._resetIsScrollingDebounced);
|
|
878
878
|
}, o._onScrollVertical = function(u) {
|
|
879
879
|
var p = u.currentTarget, h = p.clientHeight, M = p.scrollHeight, y = p.scrollTop;
|
|
880
|
-
o.setState(function(
|
|
881
|
-
if (
|
|
880
|
+
o.setState(function(N) {
|
|
881
|
+
if (N.scrollOffset === y)
|
|
882
882
|
return null;
|
|
883
883
|
var S = Math.max(0, Math.min(y, M - h));
|
|
884
884
|
return {
|
|
885
885
|
isScrolling: !0,
|
|
886
|
-
scrollDirection:
|
|
886
|
+
scrollDirection: N.scrollOffset < S ? "forward" : "backward",
|
|
887
887
|
scrollOffset: S,
|
|
888
888
|
scrollUpdateWasRequested: !1
|
|
889
889
|
};
|
|
@@ -892,7 +892,7 @@ function ni(e) {
|
|
|
892
892
|
var p = o.props.outerRef;
|
|
893
893
|
o._outerRef = u, typeof p == "function" ? p(u) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = u);
|
|
894
894
|
}, o._resetIsScrollingDebounced = function() {
|
|
895
|
-
o._resetIsScrollingTimeoutId !== null &&
|
|
895
|
+
o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Xn(o._resetIsScrolling, es);
|
|
896
896
|
}, o._resetIsScrolling = function() {
|
|
897
897
|
o._resetIsScrollingTimeoutId = null, o.setState({
|
|
898
898
|
isScrolling: !1
|
|
@@ -902,10 +902,10 @@ function ni(e) {
|
|
|
902
902
|
}, o;
|
|
903
903
|
}
|
|
904
904
|
g.getDerivedStateFromProps = function(o, u) {
|
|
905
|
-
return
|
|
905
|
+
return ss(o, u), A(o), null;
|
|
906
906
|
};
|
|
907
|
-
var
|
|
908
|
-
return
|
|
907
|
+
var T = g.prototype;
|
|
908
|
+
return T.scrollTo = function(o) {
|
|
909
909
|
o = Math.max(0, o), this.setState(function(u) {
|
|
910
910
|
return u.scrollOffset === o ? null : {
|
|
911
911
|
scrollDirection: u.scrollOffset < o ? "forward" : "backward",
|
|
@@ -913,84 +913,84 @@ function ni(e) {
|
|
|
913
913
|
scrollUpdateWasRequested: !0
|
|
914
914
|
};
|
|
915
915
|
}, this._resetIsScrollingDebounced);
|
|
916
|
-
},
|
|
916
|
+
}, T.scrollToItem = function(o, u) {
|
|
917
917
|
u === void 0 && (u = "auto");
|
|
918
918
|
var p = this.props, h = p.itemCount, M = p.layout, y = this.state.scrollOffset;
|
|
919
919
|
o = Math.max(0, Math.min(o, h - 1));
|
|
920
|
-
var
|
|
920
|
+
var N = 0;
|
|
921
921
|
if (this._outerRef) {
|
|
922
922
|
var S = this._outerRef;
|
|
923
|
-
M === "vertical" ?
|
|
923
|
+
M === "vertical" ? N = S.scrollWidth > S.clientWidth ? Ne() : 0 : N = S.scrollHeight > S.clientHeight ? Ne() : 0;
|
|
924
924
|
}
|
|
925
|
-
this.scrollTo(c(this.props, o, u, y, this._instanceProps,
|
|
926
|
-
},
|
|
925
|
+
this.scrollTo(c(this.props, o, u, y, this._instanceProps, N));
|
|
926
|
+
}, T.componentDidMount = function() {
|
|
927
927
|
var o = this.props, u = o.direction, p = o.initialScrollOffset, h = o.layout;
|
|
928
928
|
if (typeof p == "number" && this._outerRef != null) {
|
|
929
929
|
var M = this._outerRef;
|
|
930
930
|
u === "horizontal" || h === "horizontal" ? M.scrollLeft = p : M.scrollTop = p;
|
|
931
931
|
}
|
|
932
932
|
this._callPropsCallbacks();
|
|
933
|
-
},
|
|
933
|
+
}, T.componentDidUpdate = function() {
|
|
934
934
|
var o = this.props, u = o.direction, p = o.layout, h = this.state, M = h.scrollOffset, y = h.scrollUpdateWasRequested;
|
|
935
935
|
if (y && this._outerRef != null) {
|
|
936
|
-
var
|
|
936
|
+
var N = this._outerRef;
|
|
937
937
|
if (u === "horizontal" || p === "horizontal")
|
|
938
938
|
if (u === "rtl")
|
|
939
|
-
switch (
|
|
939
|
+
switch (Ae()) {
|
|
940
940
|
case "negative":
|
|
941
|
-
|
|
941
|
+
N.scrollLeft = -M;
|
|
942
942
|
break;
|
|
943
943
|
case "positive-ascending":
|
|
944
|
-
|
|
944
|
+
N.scrollLeft = M;
|
|
945
945
|
break;
|
|
946
946
|
default:
|
|
947
|
-
var S =
|
|
948
|
-
|
|
947
|
+
var S = N.clientWidth, z = N.scrollWidth;
|
|
948
|
+
N.scrollLeft = z - S - M;
|
|
949
949
|
break;
|
|
950
950
|
}
|
|
951
951
|
else
|
|
952
|
-
|
|
952
|
+
N.scrollLeft = M;
|
|
953
953
|
else
|
|
954
|
-
|
|
954
|
+
N.scrollTop = M;
|
|
955
955
|
}
|
|
956
956
|
this._callPropsCallbacks();
|
|
957
|
-
},
|
|
958
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
959
|
-
},
|
|
960
|
-
var o = this.props, u = o.children, p = o.className, h = o.direction, M = o.height, y = o.innerRef,
|
|
957
|
+
}, T.componentWillUnmount = function() {
|
|
958
|
+
this._resetIsScrollingTimeoutId !== null && ye(this._resetIsScrollingTimeoutId);
|
|
959
|
+
}, T.render = function() {
|
|
960
|
+
var o = this.props, u = o.children, p = o.className, h = o.direction, M = o.height, y = o.innerRef, N = o.innerElementType, S = o.innerTagName, z = o.itemCount, k = o.itemData, O = o.itemKey, P = O === void 0 ? ts : O, Y = o.layout, Ee = o.outerElementType, Le = o.outerTagName, Re = o.style, Qe = o.useIsScrolling, Ue = o.width, ie = this.state.isScrolling, H = h === "horizontal" || Y === "horizontal", _e = H ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), qe = re[0], Pe = re[1], oe = [];
|
|
961
961
|
if (z > 0)
|
|
962
|
-
for (var
|
|
963
|
-
|
|
962
|
+
for (var Q = qe; Q <= Pe; Q++)
|
|
963
|
+
oe.push(G(u, {
|
|
964
964
|
data: k,
|
|
965
|
-
key:
|
|
966
|
-
index:
|
|
967
|
-
isScrolling:
|
|
968
|
-
style: this._getItemStyle(
|
|
965
|
+
key: P(Q, k),
|
|
966
|
+
index: Q,
|
|
967
|
+
isScrolling: Qe ? ie : void 0,
|
|
968
|
+
style: this._getItemStyle(Q)
|
|
969
969
|
}));
|
|
970
|
-
var
|
|
971
|
-
return G(
|
|
970
|
+
var ae = s(this.props, this._instanceProps);
|
|
971
|
+
return G(Ee || Le || "div", {
|
|
972
972
|
className: p,
|
|
973
|
-
onScroll:
|
|
973
|
+
onScroll: _e,
|
|
974
974
|
ref: this._outerRefSetter,
|
|
975
975
|
style: te({
|
|
976
976
|
position: "relative",
|
|
977
977
|
height: M,
|
|
978
|
-
width:
|
|
978
|
+
width: Ue,
|
|
979
979
|
overflow: "auto",
|
|
980
980
|
WebkitOverflowScrolling: "touch",
|
|
981
981
|
willChange: "transform",
|
|
982
982
|
direction: h
|
|
983
|
-
},
|
|
984
|
-
}, G(
|
|
985
|
-
children:
|
|
983
|
+
}, Re)
|
|
984
|
+
}, G(N || S || "div", {
|
|
985
|
+
children: oe,
|
|
986
986
|
ref: y,
|
|
987
987
|
style: {
|
|
988
|
-
height: H ? "100%" :
|
|
988
|
+
height: H ? "100%" : ae,
|
|
989
989
|
pointerEvents: ie ? "none" : void 0,
|
|
990
|
-
width: H ?
|
|
990
|
+
width: H ? ae : "100%"
|
|
991
991
|
}
|
|
992
992
|
}));
|
|
993
|
-
},
|
|
993
|
+
}, T._callPropsCallbacks = function() {
|
|
994
994
|
if (typeof this.props.onItemsRendered == "function") {
|
|
995
995
|
var o = this.props.itemCount;
|
|
996
996
|
if (o > 0) {
|
|
@@ -999,17 +999,17 @@ function ni(e) {
|
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
if (typeof this.props.onScroll == "function") {
|
|
1002
|
-
var
|
|
1002
|
+
var N = this.state, S = N.scrollDirection, z = N.scrollOffset, k = N.scrollUpdateWasRequested;
|
|
1003
1003
|
this._callOnScroll(S, z, k);
|
|
1004
1004
|
}
|
|
1005
|
-
},
|
|
1006
|
-
var o = this.props, u = o.itemCount, p = o.overscanCount, h = this.state, M = h.isScrolling, y = h.scrollDirection,
|
|
1005
|
+
}, T._getRangeToRender = function() {
|
|
1006
|
+
var o = this.props, u = o.itemCount, p = o.overscanCount, h = this.state, M = h.isScrolling, y = h.scrollDirection, N = h.scrollOffset;
|
|
1007
1007
|
if (u === 0)
|
|
1008
1008
|
return [0, 0, 0, 0];
|
|
1009
|
-
var S = l(this.props,
|
|
1010
|
-
return [Math.max(0, S - k), Math.max(0, Math.min(u - 1, z +
|
|
1009
|
+
var S = l(this.props, N, this._instanceProps), z = m(this.props, S, N, this._instanceProps), k = !M || y === "backward" ? Math.max(1, p) : 1, O = !M || y === "forward" ? Math.max(1, p) : 1;
|
|
1010
|
+
return [Math.max(0, S - k), Math.max(0, Math.min(u - 1, z + O)), S, z];
|
|
1011
1011
|
}, g;
|
|
1012
|
-
}(
|
|
1012
|
+
}(je), t.defaultProps = {
|
|
1013
1013
|
direction: "ltr",
|
|
1014
1014
|
itemData: void 0,
|
|
1015
1015
|
layout: "vertical",
|
|
@@ -1017,24 +1017,24 @@ function ni(e) {
|
|
|
1017
1017
|
useIsScrolling: !1
|
|
1018
1018
|
}, t;
|
|
1019
1019
|
}
|
|
1020
|
-
var
|
|
1020
|
+
var ss = function(t, n) {
|
|
1021
1021
|
t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
|
|
1022
|
-
},
|
|
1022
|
+
}, is = /* @__PURE__ */ ns({
|
|
1023
1023
|
getItemOffset: function(t, n) {
|
|
1024
|
-
var
|
|
1025
|
-
return n *
|
|
1024
|
+
var s = t.itemSize;
|
|
1025
|
+
return n * s;
|
|
1026
1026
|
},
|
|
1027
1027
|
getItemSize: function(t, n) {
|
|
1028
|
-
var
|
|
1029
|
-
return
|
|
1028
|
+
var s = t.itemSize;
|
|
1029
|
+
return s;
|
|
1030
1030
|
},
|
|
1031
1031
|
getEstimatedTotalSize: function(t) {
|
|
1032
|
-
var n = t.itemCount,
|
|
1033
|
-
return
|
|
1032
|
+
var n = t.itemCount, s = t.itemSize;
|
|
1033
|
+
return s * n;
|
|
1034
1034
|
},
|
|
1035
|
-
getOffsetForIndexAndAlignment: function(t, n,
|
|
1036
|
-
var m = t.direction, d = t.height, f = t.itemCount, A = t.itemSize, v = t.layout, g = t.width,
|
|
1037
|
-
switch (
|
|
1035
|
+
getOffsetForIndexAndAlignment: function(t, n, s, i, c, l) {
|
|
1036
|
+
var m = t.direction, d = t.height, f = t.itemCount, A = t.itemSize, v = t.layout, g = t.width, T = m === "horizontal" || v === "horizontal", D = T ? g : d, o = Math.max(0, f * A - D), u = Math.min(o, n * A), p = Math.max(0, n * A - D + A + l);
|
|
1037
|
+
switch (s === "smart" && (i >= p - D && i <= u + D ? s = "auto" : s = "center"), s) {
|
|
1038
1038
|
case "start":
|
|
1039
1039
|
return u;
|
|
1040
1040
|
case "end":
|
|
@@ -1045,18 +1045,18 @@ var ii = function(t, n) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
case "auto":
|
|
1047
1047
|
default:
|
|
1048
|
-
return
|
|
1048
|
+
return i >= p && i <= u ? i : i < p ? p : u;
|
|
1049
1049
|
}
|
|
1050
1050
|
},
|
|
1051
1051
|
getStartIndexForOffset: function(t, n) {
|
|
1052
|
-
var
|
|
1053
|
-
return Math.max(0, Math.min(
|
|
1052
|
+
var s = t.itemCount, i = t.itemSize;
|
|
1053
|
+
return Math.max(0, Math.min(s - 1, Math.floor(n / i)));
|
|
1054
1054
|
},
|
|
1055
|
-
getStopIndexForStartIndex: function(t, n,
|
|
1056
|
-
var
|
|
1055
|
+
getStopIndexForStartIndex: function(t, n, s) {
|
|
1056
|
+
var i = t.direction, c = t.height, l = t.itemCount, m = t.itemSize, d = t.layout, f = t.width, A = i === "horizontal" || d === "horizontal", v = n * m, g = A ? f : c, T = Math.ceil((g + s - v) / m);
|
|
1057
1057
|
return Math.max(0, Math.min(
|
|
1058
1058
|
l - 1,
|
|
1059
|
-
n +
|
|
1059
|
+
n + T - 1
|
|
1060
1060
|
// -1 is because stop index is inclusive
|
|
1061
1061
|
));
|
|
1062
1062
|
},
|
|
@@ -1067,44 +1067,44 @@ var ii = function(t, n) {
|
|
|
1067
1067
|
t.itemSize;
|
|
1068
1068
|
}
|
|
1069
1069
|
});
|
|
1070
|
-
function
|
|
1071
|
-
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex,
|
|
1072
|
-
return !(
|
|
1070
|
+
function rs(e) {
|
|
1071
|
+
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, s = e.startIndex, i = e.stopIndex;
|
|
1072
|
+
return !(s > n || i < t);
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1075
|
-
for (var t = e.isItemLoaded, n = e.itemCount,
|
|
1074
|
+
function os(e) {
|
|
1075
|
+
for (var t = e.isItemLoaded, n = e.itemCount, s = e.minimumBatchSize, i = e.startIndex, c = e.stopIndex, l = [], m = null, d = null, f = i; f <= c; f++) {
|
|
1076
1076
|
var A = t(f);
|
|
1077
1077
|
A ? d !== null && (l.push(m, d), m = d = null) : (d = f, m === null && (m = f));
|
|
1078
1078
|
}
|
|
1079
1079
|
if (d !== null) {
|
|
1080
|
-
for (var v = Math.min(Math.max(d, m +
|
|
1080
|
+
for (var v = Math.min(Math.max(d, m + s - 1), n - 1), g = d + 1; g <= v && !t(g); g++)
|
|
1081
1081
|
d = g;
|
|
1082
1082
|
l.push(m, d);
|
|
1083
1083
|
}
|
|
1084
1084
|
if (l.length)
|
|
1085
|
-
for (; l[1] - l[0] + 1 <
|
|
1086
|
-
var
|
|
1087
|
-
if (!t(
|
|
1088
|
-
l[0] =
|
|
1085
|
+
for (; l[1] - l[0] + 1 < s && l[0] > 0; ) {
|
|
1086
|
+
var T = l[0] - 1;
|
|
1087
|
+
if (!t(T))
|
|
1088
|
+
l[0] = T;
|
|
1089
1089
|
else
|
|
1090
1090
|
break;
|
|
1091
1091
|
}
|
|
1092
1092
|
return l;
|
|
1093
1093
|
}
|
|
1094
|
-
var
|
|
1094
|
+
var as = function(e, t) {
|
|
1095
1095
|
if (!(e instanceof t))
|
|
1096
1096
|
throw new TypeError("Cannot call a class as a function");
|
|
1097
|
-
},
|
|
1097
|
+
}, ls = function() {
|
|
1098
1098
|
function e(t, n) {
|
|
1099
|
-
for (var
|
|
1100
|
-
var
|
|
1101
|
-
|
|
1099
|
+
for (var s = 0; s < n.length; s++) {
|
|
1100
|
+
var i = n[s];
|
|
1101
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
return function(t, n,
|
|
1105
|
-
return n && e(t.prototype, n),
|
|
1104
|
+
return function(t, n, s) {
|
|
1105
|
+
return n && e(t.prototype, n), s && e(t, s), t;
|
|
1106
1106
|
};
|
|
1107
|
-
}(),
|
|
1107
|
+
}(), cs = function(e, t) {
|
|
1108
1108
|
if (typeof t != "function" && t !== null)
|
|
1109
1109
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
1110
1110
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1115,29 +1115,29 @@ var ai = function(e, t) {
|
|
|
1115
1115
|
configurable: !0
|
|
1116
1116
|
}
|
|
1117
1117
|
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
1118
|
-
},
|
|
1118
|
+
}, Te = function(e, t) {
|
|
1119
1119
|
if (!e)
|
|
1120
1120
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1121
1121
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1122
|
+
}, ds = function(e) {
|
|
1123
|
+
cs(t, e);
|
|
1124
1124
|
function t() {
|
|
1125
|
-
var n,
|
|
1126
|
-
|
|
1125
|
+
var n, s, i, c;
|
|
1126
|
+
as(this, t);
|
|
1127
1127
|
for (var l = arguments.length, m = Array(l), d = 0; d < l; d++)
|
|
1128
1128
|
m[d] = arguments[d];
|
|
1129
|
-
return c = (
|
|
1129
|
+
return c = (s = (i = Te(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(f) {
|
|
1130
1130
|
var A = f.visibleStartIndex, v = f.visibleStopIndex;
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
|
|
1134
|
-
},
|
|
1131
|
+
i._lastRenderedStartIndex = A, i._lastRenderedStopIndex = v, i._ensureRowsLoaded(A, v);
|
|
1132
|
+
}, i._setRef = function(f) {
|
|
1133
|
+
i._listRef = f;
|
|
1134
|
+
}, s), Te(i, c);
|
|
1135
1135
|
}
|
|
1136
|
-
return
|
|
1136
|
+
return ls(t, [{
|
|
1137
1137
|
key: "resetloadMoreItemsCache",
|
|
1138
1138
|
value: function() {
|
|
1139
|
-
var
|
|
1140
|
-
this._memoizedUnloadedRanges = [],
|
|
1139
|
+
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1140
|
+
this._memoizedUnloadedRanges = [], s && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
1141
1141
|
}
|
|
1142
1142
|
}, {
|
|
1143
1143
|
key: "componentDidMount",
|
|
@@ -1146,120 +1146,124 @@ var ai = function(e, t) {
|
|
|
1146
1146
|
}, {
|
|
1147
1147
|
key: "render",
|
|
1148
1148
|
value: function() {
|
|
1149
|
-
var
|
|
1150
|
-
return
|
|
1149
|
+
var s = this.props.children;
|
|
1150
|
+
return s({
|
|
1151
1151
|
onItemsRendered: this._onItemsRendered,
|
|
1152
1152
|
ref: this._setRef
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
1155
|
}, {
|
|
1156
1156
|
key: "_ensureRowsLoaded",
|
|
1157
|
-
value: function(
|
|
1158
|
-
var c = this.props, l = c.isItemLoaded, m = c.itemCount, d = c.minimumBatchSize, f = d === void 0 ? 10 : d, A = c.threshold, v = A === void 0 ? 15 : A, g =
|
|
1157
|
+
value: function(s, i) {
|
|
1158
|
+
var c = this.props, l = c.isItemLoaded, m = c.itemCount, d = c.minimumBatchSize, f = d === void 0 ? 10 : d, A = c.threshold, v = A === void 0 ? 15 : A, g = os({
|
|
1159
1159
|
isItemLoaded: l,
|
|
1160
1160
|
itemCount: m,
|
|
1161
1161
|
minimumBatchSize: f,
|
|
1162
|
-
startIndex: Math.max(0,
|
|
1163
|
-
stopIndex: Math.min(m - 1,
|
|
1162
|
+
startIndex: Math.max(0, s - v),
|
|
1163
|
+
stopIndex: Math.min(m - 1, i + v)
|
|
1164
1164
|
});
|
|
1165
|
-
(this._memoizedUnloadedRanges.length !== g.length || this._memoizedUnloadedRanges.some(function(
|
|
1166
|
-
return g[D] !==
|
|
1165
|
+
(this._memoizedUnloadedRanges.length !== g.length || this._memoizedUnloadedRanges.some(function(T, D) {
|
|
1166
|
+
return g[D] !== T;
|
|
1167
1167
|
})) && (this._memoizedUnloadedRanges = g, this._loadUnloadedRanges(g));
|
|
1168
1168
|
}
|
|
1169
1169
|
}, {
|
|
1170
1170
|
key: "_loadUnloadedRanges",
|
|
1171
|
-
value: function(
|
|
1172
|
-
for (var
|
|
1173
|
-
var A =
|
|
1171
|
+
value: function(s) {
|
|
1172
|
+
for (var i = this, c = this.props.loadMoreItems || this.props.loadMoreRows, l = function(f) {
|
|
1173
|
+
var A = s[f], v = s[f + 1], g = c(A, v);
|
|
1174
1174
|
g != null && g.then(function() {
|
|
1175
|
-
if (
|
|
1176
|
-
lastRenderedStartIndex:
|
|
1177
|
-
lastRenderedStopIndex:
|
|
1175
|
+
if (rs({
|
|
1176
|
+
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1177
|
+
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1178
1178
|
startIndex: A,
|
|
1179
1179
|
stopIndex: v
|
|
1180
1180
|
})) {
|
|
1181
|
-
if (
|
|
1181
|
+
if (i._listRef == null)
|
|
1182
1182
|
return;
|
|
1183
|
-
typeof
|
|
1183
|
+
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(A, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
|
|
1184
1184
|
}
|
|
1185
1185
|
});
|
|
1186
|
-
}, m = 0; m <
|
|
1186
|
+
}, m = 0; m < s.length; m += 2)
|
|
1187
1187
|
l(m);
|
|
1188
1188
|
}
|
|
1189
1189
|
}]), t;
|
|
1190
|
-
}(
|
|
1191
|
-
const
|
|
1190
|
+
}(je);
|
|
1191
|
+
const us = /* @__PURE__ */ a("div")({
|
|
1192
1192
|
name: "Container",
|
|
1193
|
-
class: "
|
|
1193
|
+
class: "culdu4a",
|
|
1194
1194
|
propsAsIs: !1
|
|
1195
|
-
}),
|
|
1195
|
+
}), ps = /* @__PURE__ */ a("div")({
|
|
1196
1196
|
name: "Position",
|
|
1197
|
-
class: "
|
|
1197
|
+
class: "pwf8e69",
|
|
1198
1198
|
propsAsIs: !1
|
|
1199
|
-
}),
|
|
1199
|
+
}), ms = /* @__PURE__ */ a("img")({
|
|
1200
1200
|
name: "Avatar",
|
|
1201
|
-
class: "
|
|
1201
|
+
class: "atf4yh4",
|
|
1202
1202
|
propsAsIs: !1
|
|
1203
|
-
}),
|
|
1203
|
+
}), hs = /* @__PURE__ */ a("div")({
|
|
1204
1204
|
name: "AvatarPlaceholder",
|
|
1205
|
-
class: "
|
|
1205
|
+
class: "a1dg29ja",
|
|
1206
1206
|
propsAsIs: !1
|
|
1207
|
-
}),
|
|
1207
|
+
}), Is = /* @__PURE__ */ a("div")({
|
|
1208
1208
|
name: "Content",
|
|
1209
|
-
class: "
|
|
1209
|
+
class: "c10a68rc",
|
|
1210
1210
|
propsAsIs: !1
|
|
1211
|
-
}),
|
|
1211
|
+
}), fs = /* @__PURE__ */ a("div")({
|
|
1212
1212
|
name: "NameContainer",
|
|
1213
|
-
class: "
|
|
1213
|
+
class: "nc4kck5",
|
|
1214
1214
|
propsAsIs: !1
|
|
1215
|
-
}),
|
|
1215
|
+
}), gs = /* @__PURE__ */ a("span")({
|
|
1216
1216
|
name: "Name",
|
|
1217
|
-
class: "
|
|
1217
|
+
class: "njsrqgr",
|
|
1218
1218
|
propsAsIs: !1
|
|
1219
|
-
}),
|
|
1219
|
+
}), Ms = () => j, vs = /* @__PURE__ */ a(Ms())({
|
|
1220
1220
|
name: "CurrentUserBadge",
|
|
1221
|
-
class: "
|
|
1221
|
+
class: "c17uc4zr",
|
|
1222
1222
|
propsAsIs: !0
|
|
1223
|
-
}),
|
|
1223
|
+
}), ys = ({
|
|
1224
1224
|
rank: e,
|
|
1225
1225
|
avatar: t,
|
|
1226
1226
|
name: n,
|
|
1227
|
-
points:
|
|
1228
|
-
isCurrentUser:
|
|
1227
|
+
points: s,
|
|
1228
|
+
isCurrentUser: i,
|
|
1229
1229
|
openItemDetail: c,
|
|
1230
1230
|
style: l
|
|
1231
|
-
}) => /* @__PURE__ */ I(
|
|
1232
|
-
/* @__PURE__ */ r(
|
|
1233
|
-
/* @__PURE__ */ I(
|
|
1234
|
-
t ? /* @__PURE__ */ r(
|
|
1235
|
-
/* @__PURE__ */ I(
|
|
1236
|
-
/* @__PURE__ */ r(
|
|
1237
|
-
|
|
1231
|
+
}) => /* @__PURE__ */ I(us, { onClick: c, style: l, children: [
|
|
1232
|
+
/* @__PURE__ */ r(ps, { children: e || 0 }),
|
|
1233
|
+
/* @__PURE__ */ I(Is, { children: [
|
|
1234
|
+
t ? /* @__PURE__ */ r(ms, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ r(hs, { children: ze(n || "") }),
|
|
1235
|
+
/* @__PURE__ */ I(fs, { children: [
|
|
1236
|
+
/* @__PURE__ */ r(gs, { children: n || "" }),
|
|
1237
|
+
i && /* @__PURE__ */ r(vs, { name: "icon-star" })
|
|
1238
1238
|
] })
|
|
1239
1239
|
] }),
|
|
1240
|
-
/* @__PURE__ */ r("div", { children:
|
|
1241
|
-
] }),
|
|
1240
|
+
/* @__PURE__ */ r("div", { children: xe(s) })
|
|
1241
|
+
] }), Ns = /* @__PURE__ */ a("div")({
|
|
1242
|
+
name: "ScrollContainer",
|
|
1243
|
+
class: "s13d8sg6",
|
|
1244
|
+
propsAsIs: !1
|
|
1245
|
+
}), As = ({
|
|
1242
1246
|
items: e,
|
|
1243
1247
|
currentUserId: t,
|
|
1244
1248
|
openItemDetail: n,
|
|
1245
|
-
fetchMore:
|
|
1246
|
-
}) => /* @__PURE__ */ r(
|
|
1247
|
-
|
|
1249
|
+
fetchMore: s
|
|
1250
|
+
}) => /* @__PURE__ */ r(Be, { children: ({ width: i, height: c }) => /* @__PURE__ */ r(
|
|
1251
|
+
ds,
|
|
1248
1252
|
{
|
|
1249
1253
|
isItemLoaded: (l) => l < e.length,
|
|
1250
1254
|
itemCount: e.length + 1,
|
|
1251
|
-
loadMoreItems:
|
|
1252
|
-
children: ({ onItemsRendered: l, ref: m }) => /* @__PURE__ */ r(
|
|
1253
|
-
|
|
1255
|
+
loadMoreItems: s,
|
|
1256
|
+
children: ({ onItemsRendered: l, ref: m }) => /* @__PURE__ */ r(Ns, { children: /* @__PURE__ */ r(
|
|
1257
|
+
is,
|
|
1254
1258
|
{
|
|
1255
1259
|
itemSize: 56,
|
|
1256
1260
|
onItemsRendered: l,
|
|
1257
1261
|
ref: m,
|
|
1258
1262
|
itemCount: e.length,
|
|
1259
|
-
width:
|
|
1263
|
+
width: i,
|
|
1260
1264
|
height: c,
|
|
1261
1265
|
children: ({ index: d, style: f }) => /* @__PURE__ */ r(
|
|
1262
|
-
|
|
1266
|
+
ys,
|
|
1263
1267
|
{
|
|
1264
1268
|
style: { ...f, maxHeight: 48 },
|
|
1265
1269
|
...e[d],
|
|
@@ -1269,10 +1273,10 @@ const ui = /* @__PURE__ */ a("div")({
|
|
|
1269
1273
|
e[d].userId
|
|
1270
1274
|
)
|
|
1271
1275
|
}
|
|
1272
|
-
)
|
|
1276
|
+
) })
|
|
1273
1277
|
}
|
|
1274
|
-
) }),
|
|
1275
|
-
const { data: t } =
|
|
1278
|
+
) }), Ts = ({ deepLink: e }) => {
|
|
1279
|
+
const { data: t } = w(e.$store);
|
|
1276
1280
|
return /* @__PURE__ */ r(
|
|
1277
1281
|
He,
|
|
1278
1282
|
{
|
|
@@ -1293,172 +1297,201 @@ const ui = /* @__PURE__ */ a("div")({
|
|
|
1293
1297
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1294
1298
|
}
|
|
1295
1299
|
);
|
|
1296
|
-
},
|
|
1297
|
-
const { data: t } =
|
|
1300
|
+
}, Ds = ({ gamification: e }) => {
|
|
1301
|
+
const { data: t } = w(e.leaderboardList.$store);
|
|
1298
1302
|
return t != null && t.length ? /* @__PURE__ */ r(
|
|
1299
|
-
|
|
1303
|
+
As,
|
|
1300
1304
|
{
|
|
1301
1305
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1302
1306
|
items: t,
|
|
1303
1307
|
openItemDetail: e.openUser,
|
|
1304
1308
|
currentUserId: e.currentUserId.get()
|
|
1305
1309
|
}
|
|
1306
|
-
) : /* @__PURE__ */ r(
|
|
1307
|
-
},
|
|
1310
|
+
) : /* @__PURE__ */ r(Ts, { deepLink: e.deepLink });
|
|
1311
|
+
}, Ss = /* @__PURE__ */ a("div")({
|
|
1308
1312
|
name: "QuestionItem",
|
|
1309
|
-
class: "
|
|
1313
|
+
class: "q1w97g3p",
|
|
1310
1314
|
propsAsIs: !1
|
|
1311
|
-
}),
|
|
1315
|
+
}), zs = /* @__PURE__ */ a("div")({
|
|
1312
1316
|
name: "QuestionCaption",
|
|
1313
|
-
class: "
|
|
1317
|
+
class: "q2sl39u",
|
|
1314
1318
|
propsAsIs: !1
|
|
1315
|
-
}),
|
|
1319
|
+
}), xs = /* @__PURE__ */ a("div")({
|
|
1316
1320
|
name: "QuestionBody",
|
|
1317
|
-
class: "
|
|
1321
|
+
class: "qd5h0uc",
|
|
1318
1322
|
propsAsIs: !1
|
|
1319
|
-
}),
|
|
1323
|
+
}), js = /* @__PURE__ */ a("div")({
|
|
1320
1324
|
name: "QuestionAction",
|
|
1321
|
-
class: "
|
|
1325
|
+
class: "q105uluy",
|
|
1322
1326
|
propsAsIs: !1
|
|
1323
|
-
}),
|
|
1327
|
+
}), ks = () => j, X = /* @__PURE__ */ a(ks())({
|
|
1324
1328
|
name: "QuestionActionIcon",
|
|
1325
|
-
class: "
|
|
1329
|
+
class: "q1fa0b9h",
|
|
1326
1330
|
propsAsIs: !0
|
|
1327
|
-
}),
|
|
1331
|
+
}), Os = () => j, ws = /* @__PURE__ */ a(Os())({
|
|
1328
1332
|
name: "QuestionTypeIcon",
|
|
1329
|
-
class: "
|
|
1333
|
+
class: "qxlt78s",
|
|
1330
1334
|
propsAsIs: !0
|
|
1331
|
-
}),
|
|
1335
|
+
}), Cs = /* @__PURE__ */ a("div")({
|
|
1332
1336
|
name: "QuestionTypeLabel",
|
|
1333
|
-
class: "
|
|
1337
|
+
class: "qmg0vkx",
|
|
1334
1338
|
propsAsIs: !1
|
|
1335
|
-
}),
|
|
1339
|
+
}), $s = /* @__PURE__ */ a("div")({
|
|
1336
1340
|
name: "QuestionContent",
|
|
1337
|
-
class: "
|
|
1338
|
-
propsAsIs: !1
|
|
1339
|
-
}),
|
|
1340
|
-
[
|
|
1341
|
-
[
|
|
1342
|
-
[
|
|
1343
|
-
[
|
|
1344
|
-
},
|
|
1341
|
+
class: "q1uz5j1g",
|
|
1342
|
+
propsAsIs: !1
|
|
1343
|
+
}), bs = {
|
|
1344
|
+
[W.LOST]: /* @__PURE__ */ r(X, { name: "icon-cross" }),
|
|
1345
|
+
[W.WON]: /* @__PURE__ */ r(X, { name: "icon-check" }),
|
|
1346
|
+
[W.UNSET]: void 0,
|
|
1347
|
+
[W.DNP]: /* @__PURE__ */ r(X, { name: "icon-arrow" })
|
|
1348
|
+
}, Es = ({
|
|
1345
1349
|
questionId: e,
|
|
1346
1350
|
questionType: t,
|
|
1347
1351
|
questionStatus: n,
|
|
1348
|
-
subject:
|
|
1349
|
-
openForVoting:
|
|
1352
|
+
subject: s,
|
|
1353
|
+
openForVoting: i,
|
|
1350
1354
|
openQuestion: c,
|
|
1351
1355
|
status: l
|
|
1352
1356
|
}) => {
|
|
1353
|
-
const m =
|
|
1354
|
-
return m ? /* @__PURE__ */ I(
|
|
1355
|
-
/* @__PURE__ */ I(
|
|
1356
|
-
/* @__PURE__ */ I(
|
|
1357
|
-
/* @__PURE__ */ r(
|
|
1358
|
-
/* @__PURE__ */ I(
|
|
1357
|
+
const m = Se[t], d = bs[l];
|
|
1358
|
+
return m ? /* @__PURE__ */ I(Ss, { onClick: () => c == null ? void 0 : c(e), children: [
|
|
1359
|
+
/* @__PURE__ */ I($s, { children: [
|
|
1360
|
+
/* @__PURE__ */ I(zs, { children: [
|
|
1361
|
+
/* @__PURE__ */ r(ws, { name: m.iconName }),
|
|
1362
|
+
/* @__PURE__ */ I(Cs, { children: [
|
|
1359
1363
|
m.label,
|
|
1360
|
-
t === x.TRIVIA && n ===
|
|
1364
|
+
t === x.TRIVIA && n === _.RESOLVED && " • Expired"
|
|
1361
1365
|
] })
|
|
1362
1366
|
] }),
|
|
1363
|
-
/* @__PURE__ */ r(
|
|
1367
|
+
/* @__PURE__ */ r(xs, { children: s || "" })
|
|
1364
1368
|
] }),
|
|
1365
|
-
/* @__PURE__ */ r(
|
|
1369
|
+
/* @__PURE__ */ r(js, { children: d || (i ? /* @__PURE__ */ r(Ge, { children: "Play" }) : null) })
|
|
1366
1370
|
] }) : null;
|
|
1367
|
-
},
|
|
1371
|
+
}, Ls = /* @__PURE__ */ a("div")({
|
|
1368
1372
|
name: "Container",
|
|
1369
|
-
class: "
|
|
1373
|
+
class: "cll3md7",
|
|
1370
1374
|
propsAsIs: !1
|
|
1371
|
-
}),
|
|
1375
|
+
}), Rs = /* @__PURE__ */ a("button")({
|
|
1372
1376
|
name: "ActionBtn",
|
|
1373
|
-
class: "
|
|
1377
|
+
class: "a10g1iik",
|
|
1374
1378
|
propsAsIs: !1
|
|
1375
|
-
}),
|
|
1379
|
+
}), Qs = ({
|
|
1376
1380
|
openInsight: e,
|
|
1377
1381
|
questionId: t,
|
|
1378
1382
|
...n
|
|
1379
|
-
}) => /* @__PURE__ */ I(
|
|
1383
|
+
}) => /* @__PURE__ */ I(Ls, { children: [
|
|
1380
1384
|
/* @__PURE__ */ r(be, { questionId: t, ...n }),
|
|
1381
|
-
e && /* @__PURE__ */ r(
|
|
1382
|
-
] }),
|
|
1385
|
+
e && /* @__PURE__ */ r(Rs, { onClick: () => e(t), children: "View Insight" })
|
|
1386
|
+
] }), Us = /* @__PURE__ */ a("div")({
|
|
1383
1387
|
name: "QuestionsContainer",
|
|
1384
|
-
class: "
|
|
1388
|
+
class: "qvghv3l",
|
|
1385
1389
|
propsAsIs: !1
|
|
1386
|
-
}),
|
|
1387
|
-
var
|
|
1388
|
-
if (n.type === "question" && ((
|
|
1390
|
+
}), _s = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(Us, { children: e == null ? void 0 : e.map((n) => {
|
|
1391
|
+
var s, i;
|
|
1392
|
+
if (n.type === "question" && ((s = n.attributes) == null ? void 0 : s.attributes.case) === "question") {
|
|
1389
1393
|
const c = n.attributes.attributes.value;
|
|
1390
|
-
return /* @__PURE__ */ r(
|
|
1394
|
+
return /* @__PURE__ */ r(Es, { openQuestion: t, ...c }, c.questionId);
|
|
1391
1395
|
}
|
|
1392
|
-
if (n.type === "insight" && ((
|
|
1396
|
+
if (n.type === "insight" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1393
1397
|
const c = n.attributes.attributes.value;
|
|
1394
|
-
return /* @__PURE__ */ r(
|
|
1398
|
+
return /* @__PURE__ */ r(Qs, { openInsight: t, ...c }, c.questionId);
|
|
1395
1399
|
}
|
|
1396
1400
|
return null;
|
|
1397
|
-
}) }),
|
|
1398
|
-
const n =
|
|
1399
|
-
return n != null && n.data ? /* @__PURE__ */ r(
|
|
1400
|
-
},
|
|
1401
|
+
}) }), qs = ({ store: e, openQuestion: t }) => {
|
|
1402
|
+
const n = w(e);
|
|
1403
|
+
return n != null && n.data ? /* @__PURE__ */ r(_s, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
|
|
1404
|
+
}, Ps = ({ userSummary: e }) => {
|
|
1401
1405
|
var t, n;
|
|
1402
|
-
const
|
|
1403
|
-
return (t =
|
|
1404
|
-
},
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
},
|
|
1406
|
+
const s = w(e.getStore());
|
|
1407
|
+
return (t = s.data) != null && t.summary ? /* @__PURE__ */ r(Oe, { ...s.data.summary, successRate: (n = s.data.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ r("div", { children: "wait user..." });
|
|
1408
|
+
}, Ys = ({
|
|
1409
|
+
gamification: e
|
|
1410
|
+
}) => {
|
|
1411
|
+
const [t, n] = R(B.HOME);
|
|
1412
|
+
return /* @__PURE__ */ I("div", {
|
|
1413
|
+
style: {
|
|
1414
|
+
height: "100%",
|
|
1415
|
+
display: "flex",
|
|
1416
|
+
flexDirection: "column",
|
|
1417
|
+
overflow: "hidden"
|
|
1418
|
+
},
|
|
1419
|
+
children: [/* @__PURE__ */ r(ee, {
|
|
1420
|
+
style: {
|
|
1421
|
+
paddingBottom: "4px"
|
|
1422
|
+
},
|
|
1423
|
+
children: /* @__PURE__ */ r(Hn, {
|
|
1424
|
+
activePage: t,
|
|
1425
|
+
toggleActivePage: n
|
|
1426
|
+
})
|
|
1427
|
+
}), t === B.HOME && /* @__PURE__ */ I(se, {
|
|
1428
|
+
children: [/* @__PURE__ */ r(ee, {
|
|
1429
|
+
style: {
|
|
1430
|
+
paddingTop: "12px"
|
|
1431
|
+
},
|
|
1432
|
+
children: /* @__PURE__ */ r(Ps, {
|
|
1433
|
+
userSummary: e.userSummary
|
|
1434
|
+
})
|
|
1435
|
+
}), /* @__PURE__ */ r(Ze, {
|
|
1436
|
+
children: /* @__PURE__ */ r(qs, {
|
|
1437
|
+
openQuestion: e.openQuestion,
|
|
1438
|
+
store: e.feedList.getStore()
|
|
1439
|
+
})
|
|
1440
|
+
})]
|
|
1441
|
+
}), t === B.LEADERBOARD && /* @__PURE__ */ r("div", {
|
|
1442
|
+
className: "c1bp9dj2",
|
|
1443
|
+
children: /* @__PURE__ */ r(Ds, {
|
|
1444
|
+
gamification: e
|
|
1445
|
+
})
|
|
1446
|
+
})]
|
|
1447
|
+
});
|
|
1448
|
+
}, Ws = () => Je, De = /* @__PURE__ */ a(Ws())({
|
|
1415
1449
|
name: "OpenedContainer",
|
|
1416
|
-
class: "
|
|
1450
|
+
class: "oar61gl",
|
|
1417
1451
|
propsAsIs: !0
|
|
1418
|
-
}),
|
|
1452
|
+
}), Fs = /* @__PURE__ */ a("div")({
|
|
1419
1453
|
name: "UserContainer",
|
|
1420
|
-
class: "
|
|
1454
|
+
class: "u14zaal4",
|
|
1421
1455
|
propsAsIs: !1
|
|
1422
|
-
}),
|
|
1456
|
+
}), Vs = ({
|
|
1423
1457
|
correct: e,
|
|
1424
1458
|
incorrect: t
|
|
1425
1459
|
}) => {
|
|
1426
1460
|
const n = e + t;
|
|
1427
1461
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
1428
|
-
},
|
|
1462
|
+
}, Zs = ({
|
|
1429
1463
|
gamification: e,
|
|
1430
1464
|
className: t
|
|
1431
1465
|
}) => {
|
|
1432
|
-
const n =
|
|
1433
|
-
return /* @__PURE__ */ I(
|
|
1434
|
-
children: [n && /* @__PURE__ */ r(
|
|
1466
|
+
const n = w(e.openedQuestion.$store), s = w(e.openedUser);
|
|
1467
|
+
return /* @__PURE__ */ I(E, {
|
|
1468
|
+
children: [n && /* @__PURE__ */ r(De, {
|
|
1435
1469
|
className: t,
|
|
1436
1470
|
children: /* @__PURE__ */ r(Yn, {
|
|
1437
1471
|
gamification: e
|
|
1438
1472
|
})
|
|
1439
|
-
}),
|
|
1473
|
+
}), s && /* @__PURE__ */ r(De, {
|
|
1440
1474
|
className: t,
|
|
1441
|
-
children: /* @__PURE__ */ I(
|
|
1475
|
+
children: /* @__PURE__ */ I(Fs, {
|
|
1442
1476
|
children: [/* @__PURE__ */ r(ke, {
|
|
1443
1477
|
label: "Friend's Rank",
|
|
1444
1478
|
close: e.closeUser
|
|
1445
1479
|
}), /* @__PURE__ */ r(ee, {
|
|
1446
|
-
children: /* @__PURE__ */ r(
|
|
1447
|
-
...
|
|
1448
|
-
successRate:
|
|
1480
|
+
children: /* @__PURE__ */ r(Oe, {
|
|
1481
|
+
...s,
|
|
1482
|
+
successRate: Vs(s)
|
|
1449
1483
|
})
|
|
1450
1484
|
})]
|
|
1451
1485
|
})
|
|
1452
|
-
}), /* @__PURE__ */ r(
|
|
1486
|
+
}), /* @__PURE__ */ r(se, {
|
|
1453
1487
|
className: t,
|
|
1454
1488
|
"data-nav": "true",
|
|
1455
|
-
children: /* @__PURE__ */ r(
|
|
1489
|
+
children: /* @__PURE__ */ r(Ys, {
|
|
1456
1490
|
gamification: e
|
|
1457
1491
|
})
|
|
1458
1492
|
})]
|
|
1459
1493
|
});
|
|
1460
1494
|
};
|
|
1461
1495
|
export {
|
|
1462
|
-
|
|
1463
|
-
Gi as default
|
|
1496
|
+
Zs as default
|
|
1464
1497
|
};
|