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