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