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