@streamlayer/react 0.30.3 → 0.30.5
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 +4 -4
- package/lib/dist/es/gamification-feature.js +316 -303
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +37 -32
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +359 -346
- package/lib/es/masters2.js +304 -299
- package/lib/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,177 +1,177 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as s, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { s as o, i as j } from "./index3.js";
|
|
3
3
|
import { useStore as w } from "@nanostores/react";
|
|
4
|
-
import { o as Ne, r as te, w as $e, A as Re, O as Qe,
|
|
5
|
-
import { useState as R, useCallback as
|
|
6
|
-
import { QuestionType as x, QuestionStatus as Q, QuestionImages as
|
|
7
|
-
import { o as ye, i as Te, r as
|
|
8
|
-
import { CountdownCircleTimer as
|
|
9
|
-
import { E
|
|
4
|
+
import { o as Ne, r as te, w as $e, A as Re, O as Qe, a as K, n as Ue, d as _e } from "./masters2.js";
|
|
5
|
+
import { useState as R, useCallback as F, useMemo as W, createElement as H, PureComponent as Ae } from "react";
|
|
6
|
+
import { QuestionType as x, QuestionStatus as Q, QuestionImages as $, PickHistoryStatus as q } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { o as ye, i as Te, r as qe, a as Ye, n as Pe } from "./common.js";
|
|
8
|
+
import { CountdownCircleTimer as We } from "react-countdown-circle-timer";
|
|
9
|
+
import { E } from "./index2.js";
|
|
10
10
|
import "@streamlayer/sdk-web-interfaces";
|
|
11
11
|
import "@streamlayer/sdk-web-notifications";
|
|
12
12
|
import "@lottiefiles/react-lottie-player";
|
|
13
13
|
import "./useStreamLayerApp.js";
|
|
14
14
|
import "@streamlayer/sdk-web";
|
|
15
|
-
const
|
|
15
|
+
const Ve = /* @__PURE__ */ o("div")({
|
|
16
16
|
name: "Container",
|
|
17
17
|
class: "c1vwopgc",
|
|
18
18
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
19
|
+
}), Fe = /* @__PURE__ */ o("div")({
|
|
20
20
|
name: "QuestionTypeWrap",
|
|
21
21
|
class: "qyktpt0",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
23
|
+
}), Be = () => j, He = /* @__PURE__ */ o(Be())({
|
|
24
24
|
name: "QuestionTypeIcon",
|
|
25
25
|
class: "q951jdx",
|
|
26
26
|
propsAsIs: !0
|
|
27
|
-
}),
|
|
27
|
+
}), Ze = /* @__PURE__ */ o("span")({
|
|
28
28
|
name: "QuestionTypeTitle",
|
|
29
29
|
class: "qss5f0e",
|
|
30
30
|
propsAsIs: !1
|
|
31
|
-
}),
|
|
31
|
+
}), Ge = /* @__PURE__ */ o("button")({
|
|
32
32
|
name: "CloseButton",
|
|
33
33
|
class: "c1ao1jtv",
|
|
34
34
|
propsAsIs: !1
|
|
35
|
-
}),
|
|
35
|
+
}), Je = () => j, Ke = /* @__PURE__ */ o(Je())({
|
|
36
36
|
name: "CloseIcon",
|
|
37
37
|
class: "cvsl7l3",
|
|
38
38
|
propsAsIs: !0
|
|
39
39
|
}), De = ({ type: e, close: t, label: n }) => {
|
|
40
40
|
const i = e ? Ne[e] : { label: n, iconName: void 0 };
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
|
|
44
|
-
(i == null ? void 0 : i.label) && /* @__PURE__ */ s(
|
|
41
|
+
return /* @__PURE__ */ p(Ve, { children: [
|
|
42
|
+
/* @__PURE__ */ p(Fe, { children: [
|
|
43
|
+
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(He, { name: i.iconName }),
|
|
44
|
+
(i == null ? void 0 : i.label) && /* @__PURE__ */ s(Ze, { children: i.label })
|
|
45
45
|
] }),
|
|
46
|
-
/* @__PURE__ */ s(
|
|
46
|
+
/* @__PURE__ */ s(Ge, { onClick: t, children: /* @__PURE__ */ s(Ke, { name: "icon-cross" }) })
|
|
47
47
|
] });
|
|
48
|
-
},
|
|
48
|
+
}, Xe = /* @__PURE__ */ o("div")({
|
|
49
49
|
name: "Container",
|
|
50
50
|
class: "c1zy8a",
|
|
51
51
|
propsAsIs: !1
|
|
52
|
-
}),
|
|
52
|
+
}), et = /* @__PURE__ */ o("div")({
|
|
53
53
|
name: "Title",
|
|
54
54
|
class: "t1vih9p5",
|
|
55
55
|
propsAsIs: !1
|
|
56
|
-
}),
|
|
56
|
+
}), tt = /* @__PURE__ */ o("div")({
|
|
57
57
|
name: "Indicator",
|
|
58
58
|
class: "i1fbnvpb",
|
|
59
59
|
propsAsIs: !1
|
|
60
|
-
}), oe = ({ indicator: e, title: t }) => /* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ s(
|
|
62
|
-
/* @__PURE__ */ s(
|
|
63
|
-
] }),
|
|
60
|
+
}), oe = ({ indicator: e, title: t }) => /* @__PURE__ */ p(Xe, { children: [
|
|
61
|
+
/* @__PURE__ */ s(et, { children: t }),
|
|
62
|
+
/* @__PURE__ */ s(tt, { children: e })
|
|
63
|
+
] }), nt = /* @__PURE__ */ o("div")({
|
|
64
64
|
name: "Container",
|
|
65
65
|
class: "ctmhwyc",
|
|
66
66
|
propsAsIs: !1
|
|
67
|
-
}),
|
|
67
|
+
}), st = /* @__PURE__ */ o("div")({
|
|
68
68
|
name: "Indicator",
|
|
69
69
|
class: "i1jri200",
|
|
70
70
|
propsAsIs: !1
|
|
71
|
-
}),
|
|
71
|
+
}), it = /* @__PURE__ */ o("div")({
|
|
72
72
|
name: "Title",
|
|
73
73
|
class: "t8s05oq",
|
|
74
74
|
propsAsIs: !1
|
|
75
|
-
}), Y = ({ indicator: e, title: t }) => /* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */ s(
|
|
77
|
-
/* @__PURE__ */ s(
|
|
78
|
-
] }),
|
|
75
|
+
}), Y = ({ indicator: e, title: t }) => /* @__PURE__ */ p(nt, { children: [
|
|
76
|
+
/* @__PURE__ */ s(st, { children: e }),
|
|
77
|
+
/* @__PURE__ */ s(it, { children: t })
|
|
78
|
+
] }), rt = /* @__PURE__ */ o("div")({
|
|
79
79
|
name: "Container",
|
|
80
80
|
class: "c1yrpn9o",
|
|
81
81
|
propsAsIs: !1
|
|
82
|
-
}),
|
|
82
|
+
}), ot = /* @__PURE__ */ o("div")({
|
|
83
83
|
name: "TopInfo",
|
|
84
84
|
class: "t17fwahh",
|
|
85
85
|
propsAsIs: !1
|
|
86
|
-
}),
|
|
86
|
+
}), at = /* @__PURE__ */ o("div")({
|
|
87
87
|
name: "BottomInfo",
|
|
88
88
|
class: "by6w7e9",
|
|
89
89
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
90
|
+
}), lt = /* @__PURE__ */ o("div")({
|
|
91
91
|
name: "User",
|
|
92
92
|
class: "u1g7arbm",
|
|
93
93
|
propsAsIs: !1
|
|
94
|
-
}),
|
|
94
|
+
}), ct = /* @__PURE__ */ o("img")({
|
|
95
95
|
name: "Avatar",
|
|
96
96
|
class: "a1ldeata",
|
|
97
97
|
propsAsIs: !1
|
|
98
|
-
}),
|
|
98
|
+
}), dt = /* @__PURE__ */ o("div")({
|
|
99
99
|
name: "UserInfo",
|
|
100
100
|
class: "u10d4koz",
|
|
101
101
|
propsAsIs: !1
|
|
102
|
-
}),
|
|
102
|
+
}), ut = /* @__PURE__ */ o("div")({
|
|
103
103
|
name: "UserName",
|
|
104
104
|
class: "u1q6roj0",
|
|
105
105
|
propsAsIs: !1
|
|
106
|
-
}),
|
|
106
|
+
}), pt = /* @__PURE__ */ o("div")({
|
|
107
107
|
name: "UserRating",
|
|
108
108
|
class: "ui0m425",
|
|
109
109
|
propsAsIs: !1
|
|
110
|
-
}),
|
|
110
|
+
}), mt = /* @__PURE__ */ o("img")({
|
|
111
111
|
name: "TrophyIcon",
|
|
112
112
|
class: "t1el3mrn",
|
|
113
113
|
propsAsIs: !1
|
|
114
|
-
}),
|
|
114
|
+
}), It = /* @__PURE__ */ o("div")({
|
|
115
115
|
name: "Rts",
|
|
116
116
|
class: "r2vgnxv",
|
|
117
117
|
propsAsIs: !1
|
|
118
|
-
}),
|
|
118
|
+
}), ht = /* @__PURE__ */ o("div")({
|
|
119
119
|
name: "RtsIndicator",
|
|
120
120
|
class: "roqn06j",
|
|
121
121
|
propsAsIs: !1
|
|
122
|
-
}),
|
|
122
|
+
}), ft = /* @__PURE__ */ o("div")({
|
|
123
123
|
name: "RtsLabel",
|
|
124
124
|
class: "r15adx7c",
|
|
125
125
|
propsAsIs: !1
|
|
126
|
-
}),
|
|
126
|
+
}), gt = /* @__PURE__ */ o("div")({
|
|
127
127
|
name: "Divider",
|
|
128
128
|
class: "dv59lta",
|
|
129
129
|
propsAsIs: !1
|
|
130
|
-
}),
|
|
130
|
+
}), Mt = /* @__PURE__ */ o("div")({
|
|
131
131
|
name: "Ranks",
|
|
132
132
|
class: "r55lotb",
|
|
133
133
|
propsAsIs: !1
|
|
134
|
-
}),
|
|
134
|
+
}), vt = /* @__PURE__ */ o("div")({
|
|
135
135
|
name: "Statistics",
|
|
136
136
|
class: "s1knfgqt",
|
|
137
137
|
propsAsIs: !1
|
|
138
|
-
}),
|
|
138
|
+
}), Nt = /* @__PURE__ */ o("div")({
|
|
139
139
|
name: "AvatarPlaceholder",
|
|
140
140
|
class: "a1mqo824",
|
|
141
141
|
propsAsIs: !1
|
|
142
|
-
}),
|
|
142
|
+
}), At = /* @__PURE__ */ o("button")({
|
|
143
143
|
name: "UserAccountBtn",
|
|
144
144
|
class: "uxareh6",
|
|
145
145
|
propsAsIs: !1
|
|
146
|
-
}),
|
|
146
|
+
}), yt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Se = ({
|
|
147
147
|
avatar: e,
|
|
148
148
|
name: t,
|
|
149
149
|
points: n,
|
|
150
150
|
friendsRank: i,
|
|
151
151
|
rank: r,
|
|
152
152
|
streak: I,
|
|
153
|
-
correct:
|
|
154
|
-
incorrect:
|
|
153
|
+
correct: u,
|
|
154
|
+
incorrect: m,
|
|
155
155
|
inTop: d,
|
|
156
|
-
successRate:
|
|
157
|
-
}) => /* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ s(
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
e && /* @__PURE__ */ s(
|
|
161
|
-
!e && /* @__PURE__ */ s(
|
|
156
|
+
successRate: h
|
|
157
|
+
}) => /* @__PURE__ */ p(rt, { children: [
|
|
158
|
+
/* @__PURE__ */ s(ot, { children: /* @__PURE__ */ p(lt, { children: [
|
|
159
|
+
/* @__PURE__ */ p(At, { children: [
|
|
160
|
+
e && /* @__PURE__ */ s(ct, { alt: "avatar", src: e }),
|
|
161
|
+
!e && /* @__PURE__ */ s(Nt, { children: ye(t || "") })
|
|
162
162
|
] }),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */ s(
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */ s(
|
|
168
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ p(dt, { children: [
|
|
164
|
+
/* @__PURE__ */ s(ut, { children: t }),
|
|
165
|
+
/* @__PURE__ */ p(pt, { children: [
|
|
166
|
+
/* @__PURE__ */ p(It, { children: [
|
|
167
|
+
/* @__PURE__ */ s(mt, { alt: "rank-icon", src: yt }),
|
|
168
|
+
/* @__PURE__ */ p(ht, { children: [
|
|
169
169
|
Te(n),
|
|
170
|
-
/* @__PURE__ */ s(
|
|
170
|
+
/* @__PURE__ */ s(ft, { children: "PTS" })
|
|
171
171
|
] })
|
|
172
172
|
] }),
|
|
173
|
-
/* @__PURE__ */ s(
|
|
174
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ s(gt, {}),
|
|
174
|
+
/* @__PURE__ */ p("div", { children: [
|
|
175
175
|
"TOP ",
|
|
176
176
|
d || 0,
|
|
177
177
|
"%"
|
|
@@ -179,39 +179,39 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
179
179
|
] })
|
|
180
180
|
] })
|
|
181
181
|
] }) }),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ p(at, { children: [
|
|
183
|
+
/* @__PURE__ */ p(Mt, { children: [
|
|
184
184
|
/* @__PURE__ */ s(oe, { indicator: i || 0, title: "Friends rank" }),
|
|
185
185
|
/* @__PURE__ */ s(oe, { indicator: r || 0, title: "Global rank" })
|
|
186
186
|
] }),
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ p(vt, { children: [
|
|
188
188
|
/* @__PURE__ */ s(Y, { indicator: I || 0, title: "Win streak" }),
|
|
189
|
-
/* @__PURE__ */ s(Y, { indicator:
|
|
190
|
-
/* @__PURE__ */ s(Y, { indicator:
|
|
191
|
-
/* @__PURE__ */ s(Y, { indicator: `${
|
|
189
|
+
/* @__PURE__ */ s(Y, { indicator: u || 0, title: "Correct" }),
|
|
190
|
+
/* @__PURE__ */ s(Y, { indicator: m || 0, title: "Incorrect" }),
|
|
191
|
+
/* @__PURE__ */ s(Y, { indicator: `${h || 0}%`, title: "Succ. rate" })
|
|
192
192
|
] })
|
|
193
193
|
] })
|
|
194
|
-
] }),
|
|
194
|
+
] }), Tt = /* @__PURE__ */ o("div")({
|
|
195
195
|
name: "Container",
|
|
196
196
|
class: "c38csyt",
|
|
197
197
|
propsAsIs: !1
|
|
198
|
-
}),
|
|
198
|
+
}), Dt = /* @__PURE__ */ o("div")({
|
|
199
199
|
name: "Title",
|
|
200
200
|
class: "ty221rx",
|
|
201
201
|
propsAsIs: !1
|
|
202
|
-
}),
|
|
202
|
+
}), St = /* @__PURE__ */ o("div")({
|
|
203
203
|
name: "Description",
|
|
204
204
|
class: "dlaj9xp",
|
|
205
205
|
propsAsIs: !1
|
|
206
|
-
}),
|
|
206
|
+
}), zt = ({ title: e, description: t }) => /* @__PURE__ */ p(Tt, { children: [
|
|
207
207
|
/* @__PURE__ */ s(j, { name: "icon-check-circle" }),
|
|
208
|
-
/* @__PURE__ */ s(
|
|
209
|
-
/* @__PURE__ */ s(
|
|
210
|
-
] }),
|
|
208
|
+
/* @__PURE__ */ s(Dt, { children: e }),
|
|
209
|
+
/* @__PURE__ */ s(St, { children: t })
|
|
210
|
+
] }), xt = /* @__PURE__ */ o("div")({
|
|
211
211
|
name: "Container",
|
|
212
212
|
class: "c16sbdnm",
|
|
213
213
|
propsAsIs: !1
|
|
214
|
-
}),
|
|
214
|
+
}), jt = () => j, Ot = /* @__PURE__ */ o(jt())({
|
|
215
215
|
name: "IconPrediction",
|
|
216
216
|
class: "ibhorgl",
|
|
217
217
|
propsAsIs: !0
|
|
@@ -223,19 +223,19 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
223
223
|
name: "FeedbackHeader",
|
|
224
224
|
class: "f455ozj",
|
|
225
225
|
propsAsIs: !1
|
|
226
|
-
}),
|
|
226
|
+
}), kt = /* @__PURE__ */ o("span")({
|
|
227
227
|
name: "FeedbackTitle",
|
|
228
228
|
class: "f1913njx",
|
|
229
229
|
propsAsIs: !1
|
|
230
|
-
}),
|
|
230
|
+
}), Z = /* @__PURE__ */ o("span")({
|
|
231
231
|
name: "FeedbackDescription",
|
|
232
232
|
class: "fzfk69z",
|
|
233
233
|
propsAsIs: !1
|
|
234
|
-
}),
|
|
234
|
+
}), wt = /* @__PURE__ */ o("div")({
|
|
235
235
|
name: "FeedbackText",
|
|
236
236
|
class: "fx87qaj",
|
|
237
237
|
propsAsIs: !1
|
|
238
|
-
}),
|
|
238
|
+
}), Ct = ({
|
|
239
239
|
feedbackMessages: e,
|
|
240
240
|
questionVotedCorrectly: t,
|
|
241
241
|
questionVoted: n,
|
|
@@ -243,63 +243,63 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
243
243
|
hasCorrectAnswer: r,
|
|
244
244
|
questionStatus: I
|
|
245
245
|
}) => {
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
246
|
+
const u = n && (i === x.TRIVIA || i === x.PREDICTION);
|
|
247
|
+
if (!u && I !== Q.RESOLVED)
|
|
248
248
|
return null;
|
|
249
|
-
const
|
|
250
|
-
return /* @__PURE__ */
|
|
251
|
-
I === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */
|
|
249
|
+
const m = i === x.PREDICTION && !r, d = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
|
|
250
|
+
return /* @__PURE__ */ p(xt, { "data-isPrediction": m, children: [
|
|
251
|
+
I === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ p(b, { children: [
|
|
252
252
|
/* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
|
|
255
|
-
/* @__PURE__ */ s(
|
|
253
|
+
/* @__PURE__ */ p("div", { children: [
|
|
254
|
+
/* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
|
|
255
|
+
/* @__PURE__ */ s(wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
256
256
|
] })
|
|
257
257
|
] }),
|
|
258
|
-
|
|
259
|
-
/* @__PURE__ */ s(
|
|
260
|
-
/* @__PURE__ */ s(
|
|
258
|
+
u && m && /* @__PURE__ */ p(b, { children: [
|
|
259
|
+
/* @__PURE__ */ s(Ot, { name: "icon-prediction" }),
|
|
260
|
+
/* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
|
|
261
261
|
] }),
|
|
262
|
-
|
|
262
|
+
u && r && /* @__PURE__ */ p(b, { children: [
|
|
263
263
|
/* @__PURE__ */ s(ae, { "data-feedbackType": d, children: /* @__PURE__ */ s(j, { name: d }) }),
|
|
264
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
|
265
|
-
/* @__PURE__ */ s(
|
|
266
|
-
/* @__PURE__ */ s(
|
|
264
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(le, { children: [
|
|
265
|
+
/* @__PURE__ */ s(kt, { "data-feedbackType": d, children: h == null ? void 0 : h.title }),
|
|
266
|
+
/* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
|
|
267
267
|
] }) })
|
|
268
268
|
] })
|
|
269
269
|
] });
|
|
270
|
-
},
|
|
270
|
+
}, bt = /* @__PURE__ */ o("div")({
|
|
271
271
|
name: "Container",
|
|
272
272
|
class: "c14ielyq",
|
|
273
273
|
propsAsIs: !1
|
|
274
|
-
}),
|
|
274
|
+
}), Et = /* @__PURE__ */ o("div")({
|
|
275
275
|
name: "Content",
|
|
276
276
|
class: "c1tlqx57",
|
|
277
277
|
propsAsIs: !1
|
|
278
|
-
}),
|
|
278
|
+
}), Lt = /* @__PURE__ */ o("div")({
|
|
279
279
|
name: "Title",
|
|
280
280
|
class: "t1hq58md",
|
|
281
281
|
propsAsIs: !1
|
|
282
|
-
}),
|
|
282
|
+
}), $t = /* @__PURE__ */ o("div")({
|
|
283
283
|
name: "Options",
|
|
284
284
|
class: "o1c8nxcx",
|
|
285
285
|
propsAsIs: !1
|
|
286
|
-
}),
|
|
286
|
+
}), Rt = /* @__PURE__ */ o("button")({
|
|
287
287
|
name: "ButtonContainer",
|
|
288
288
|
class: "b1b6dl8t",
|
|
289
289
|
propsAsIs: !1
|
|
290
|
-
}),
|
|
290
|
+
}), Qt = /* @__PURE__ */ o("div")({
|
|
291
291
|
name: "ButtonPct",
|
|
292
292
|
class: "b4iik8i",
|
|
293
293
|
propsAsIs: !1
|
|
294
|
-
}),
|
|
294
|
+
}), Ut = /* @__PURE__ */ o("span")({
|
|
295
295
|
name: "ButtonBody",
|
|
296
296
|
class: "b1gq1lnf",
|
|
297
297
|
propsAsIs: !1
|
|
298
|
-
}),
|
|
298
|
+
}), _t = /* @__PURE__ */ o("div")({
|
|
299
299
|
name: "IconContainer",
|
|
300
300
|
class: "i1j65z51",
|
|
301
301
|
propsAsIs: !1
|
|
302
|
-
}),
|
|
302
|
+
}), qt = /* @__PURE__ */ o("div")({
|
|
303
303
|
name: "IconWrap",
|
|
304
304
|
class: "i19tpfua",
|
|
305
305
|
propsAsIs: !1
|
|
@@ -307,37 +307,37 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
307
307
|
name: "Icon",
|
|
308
308
|
class: "i1tubmma",
|
|
309
309
|
propsAsIs: !1
|
|
310
|
-
}),
|
|
310
|
+
}), Yt = () => ze, Pt = /* @__PURE__ */ o(Yt())({
|
|
311
311
|
name: "IconDefault",
|
|
312
312
|
class: "i1grrgwj",
|
|
313
313
|
propsAsIs: !0
|
|
314
|
-
}),
|
|
314
|
+
}), Wt = () => ze, Vt = /* @__PURE__ */ o(Wt())({
|
|
315
315
|
name: "IconCircle",
|
|
316
316
|
class: "ibemyq8",
|
|
317
317
|
propsAsIs: !0
|
|
318
|
-
}),
|
|
318
|
+
}), Ft = /* @__PURE__ */ o("span")({
|
|
319
319
|
name: "Title",
|
|
320
320
|
class: "t1dceht",
|
|
321
321
|
propsAsIs: !1
|
|
322
|
-
}),
|
|
322
|
+
}), Bt = /* @__PURE__ */ o("span")({
|
|
323
323
|
name: "Indicators",
|
|
324
324
|
class: "i116q4vq",
|
|
325
325
|
propsAsIs: !1
|
|
326
|
-
}),
|
|
326
|
+
}), Ht = /* @__PURE__ */ o("span")({
|
|
327
327
|
name: "Percentage",
|
|
328
328
|
class: "p17ajcu2",
|
|
329
329
|
propsAsIs: !1
|
|
330
|
-
}),
|
|
330
|
+
}), Zt = () => j, Gt = /* @__PURE__ */ o(Zt())({
|
|
331
331
|
name: "CheckIcon",
|
|
332
332
|
class: "cu9kmlb",
|
|
333
333
|
propsAsIs: !0
|
|
334
334
|
}), ce = {
|
|
335
|
-
[
|
|
336
|
-
[
|
|
337
|
-
[
|
|
338
|
-
[
|
|
339
|
-
[
|
|
340
|
-
},
|
|
335
|
+
[$.CENTERED]: (e) => /* @__PURE__ */ s(Pt, { alt: "option-icon", src: e }),
|
|
336
|
+
[$.TRANSPARENT]: (e) => /* @__PURE__ */ s(_t, { children: /* @__PURE__ */ s(qt, { style: { backgroundImage: `url(${e})` } }) }),
|
|
337
|
+
[$.ROUNDED]: (e) => /* @__PURE__ */ s(Vt, { alt: "option-icon", src: e }),
|
|
338
|
+
[$.NONE]: () => null,
|
|
339
|
+
[$.UNSET]: () => null
|
|
340
|
+
}, Jt = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
|
|
341
341
|
if (e === x.POLL && i)
|
|
342
342
|
return "correct";
|
|
343
343
|
if (e === x.PREDICTION) {
|
|
@@ -347,13 +347,13 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
347
347
|
return "correct";
|
|
348
348
|
}
|
|
349
349
|
return e === x.TRIVIA && r ? i ? n ? "correct" : "incorrect" : n ? "correct" : "unset" : "unset";
|
|
350
|
-
},
|
|
350
|
+
}, Kt = ({
|
|
351
351
|
questionType: e,
|
|
352
352
|
questionVoted: t,
|
|
353
353
|
correct: n,
|
|
354
354
|
hasCorrectAnswer: i,
|
|
355
355
|
questionStatus: r
|
|
356
|
-
}) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1,
|
|
356
|
+
}) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1, Xt = (e) => {
|
|
357
357
|
var t;
|
|
358
358
|
const {
|
|
359
359
|
// option props
|
|
@@ -362,34 +362,34 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
362
362
|
text: r,
|
|
363
363
|
percentageDecimal: I,
|
|
364
364
|
// extra props
|
|
365
|
-
onVote:
|
|
366
|
-
youSelected:
|
|
365
|
+
onVote: u,
|
|
366
|
+
youSelected: m,
|
|
367
367
|
questionVoted: d,
|
|
368
368
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
369
|
-
imageMode:
|
|
369
|
+
imageMode: h,
|
|
370
370
|
answerTimeExpired: A,
|
|
371
371
|
questionStatus: D,
|
|
372
372
|
isLoading: N,
|
|
373
373
|
questionType: y,
|
|
374
374
|
correct: T,
|
|
375
375
|
hasCorrectAnswer: a
|
|
376
|
-
} = e, l =
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
|
|
376
|
+
} = e, l = Jt(e), c = Kt({ questionType: y, questionVoted: d, correct: T, hasCorrectAnswer: a, questionStatus: D }), f = d || D === Q.RESOLVED && y === x.PREDICTION;
|
|
377
|
+
return /* @__PURE__ */ p(
|
|
378
|
+
Rt,
|
|
379
379
|
{
|
|
380
380
|
value: n,
|
|
381
|
-
"data-selected":
|
|
381
|
+
"data-selected": m,
|
|
382
382
|
"data-answerState": l,
|
|
383
383
|
disabled: d || N || A,
|
|
384
|
-
onClick:
|
|
384
|
+
onClick: u,
|
|
385
385
|
children: [
|
|
386
|
-
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
i && ((t = ce[
|
|
389
|
-
/* @__PURE__ */ s(
|
|
390
|
-
|
|
391
|
-
c && /* @__PURE__ */ s(
|
|
392
|
-
/* @__PURE__ */
|
|
386
|
+
f && /* @__PURE__ */ s(Qt, { "data-answerState": l, style: { width: `${I}%` } }),
|
|
387
|
+
/* @__PURE__ */ p(Ut, { children: [
|
|
388
|
+
i && h && ((t = ce[h]) == null ? void 0 : t.call(ce, i)),
|
|
389
|
+
/* @__PURE__ */ s(Ft, { children: r }),
|
|
390
|
+
f && /* @__PURE__ */ p(Bt, { children: [
|
|
391
|
+
c && /* @__PURE__ */ s(Gt, { name: "selected" }),
|
|
392
|
+
/* @__PURE__ */ p(Ht, { children: [
|
|
393
393
|
I,
|
|
394
394
|
"%"
|
|
395
395
|
] })
|
|
@@ -398,80 +398,80 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
398
398
|
]
|
|
399
399
|
}
|
|
400
400
|
);
|
|
401
|
-
},
|
|
401
|
+
}, en = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], tn = [10, 10, 0], nn = /* @__PURE__ */ o("div")({
|
|
402
402
|
name: "RemainingTime",
|
|
403
403
|
class: "r165427",
|
|
404
404
|
propsAsIs: !1
|
|
405
|
-
}),
|
|
405
|
+
}), sn = E.SECONDARY_GREEN6, de = E.SECONDARY_RED3, rn = E.NEUTRALS_GRAY3, on = ({
|
|
406
406
|
isPlaying: e = !0,
|
|
407
407
|
duration: t = 30,
|
|
408
408
|
onTimerExpired: n
|
|
409
409
|
}) => {
|
|
410
|
-
const [i, r] = R(t > 10 ?
|
|
410
|
+
const [i, r] = R(t > 10 ? sn : de), I = ({
|
|
411
411
|
remainingTime: d
|
|
412
|
-
}) => /* @__PURE__ */ s(
|
|
412
|
+
}) => /* @__PURE__ */ s(nn, {
|
|
413
413
|
children: d
|
|
414
|
-
}),
|
|
415
|
-
n == null || n(), r(
|
|
416
|
-
}, [n, r]),
|
|
414
|
+
}), u = F(() => {
|
|
415
|
+
n == null || n(), r(rn);
|
|
416
|
+
}, [n, r]), m = F((d) => {
|
|
417
417
|
d === 10 && r(de);
|
|
418
418
|
}, [r]);
|
|
419
|
-
return /* @__PURE__ */ s(
|
|
419
|
+
return /* @__PURE__ */ s(We, {
|
|
420
420
|
isPlaying: e,
|
|
421
421
|
duration: t,
|
|
422
|
-
colors:
|
|
423
|
-
colorsTime:
|
|
422
|
+
colors: en,
|
|
423
|
+
colorsTime: tn,
|
|
424
424
|
size: 32,
|
|
425
425
|
strokeWidth: 2,
|
|
426
426
|
trailStrokeWidth: 2,
|
|
427
427
|
trailColor: i,
|
|
428
|
-
onComplete:
|
|
429
|
-
onUpdate:
|
|
428
|
+
onComplete: u,
|
|
429
|
+
onUpdate: m,
|
|
430
430
|
children: I
|
|
431
431
|
});
|
|
432
|
-
},
|
|
432
|
+
}, an = /* @__PURE__ */ o("div")({
|
|
433
433
|
name: "WinBarContainer",
|
|
434
434
|
class: "wie6cqo",
|
|
435
435
|
propsAsIs: !1
|
|
436
|
-
}),
|
|
436
|
+
}), ln = /* @__PURE__ */ o("div")({
|
|
437
437
|
name: "Content",
|
|
438
438
|
class: "cgizw4u",
|
|
439
439
|
propsAsIs: !1
|
|
440
|
-
}),
|
|
440
|
+
}), cn = /* @__PURE__ */ o("div")({
|
|
441
441
|
name: "Title",
|
|
442
442
|
class: "t1l3ucjp",
|
|
443
443
|
propsAsIs: !1
|
|
444
|
-
}),
|
|
444
|
+
}), dn = () => j, un = /* @__PURE__ */ o(dn())({
|
|
445
445
|
name: "WinIcon",
|
|
446
446
|
class: "wx7j799",
|
|
447
447
|
propsAsIs: !0
|
|
448
|
-
}),
|
|
448
|
+
}), pn = /* @__PURE__ */ o("div")({
|
|
449
449
|
name: "Points",
|
|
450
450
|
class: "p4lwuj0",
|
|
451
451
|
propsAsIs: !1
|
|
452
|
-
}),
|
|
452
|
+
}), mn = /* @__PURE__ */ o("span")({
|
|
453
453
|
name: "PointsCount",
|
|
454
454
|
class: "po9i64o",
|
|
455
455
|
propsAsIs: !1
|
|
456
|
-
}),
|
|
456
|
+
}), In = /* @__PURE__ */ o("span")({
|
|
457
457
|
name: "PointsUnits",
|
|
458
458
|
class: "pe5g05h",
|
|
459
459
|
propsAsIs: !1
|
|
460
|
-
}),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
e && /* @__PURE__ */ s(
|
|
463
|
-
t !== void 0 && /* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */ s(
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */ s(
|
|
467
|
-
/* @__PURE__ */ s(
|
|
460
|
+
}), hn = ({ title: e, points: t, isPlayingTimer: n, isTimer: i, onTimerExpired: r }) => /* @__PURE__ */ p(an, { children: [
|
|
461
|
+
/* @__PURE__ */ p(ln, { children: [
|
|
462
|
+
e && /* @__PURE__ */ s(cn, { children: e }),
|
|
463
|
+
t !== void 0 && /* @__PURE__ */ p(b, { children: [
|
|
464
|
+
/* @__PURE__ */ s(un, { name: "icon-trophy" }),
|
|
465
|
+
/* @__PURE__ */ p(pn, { children: [
|
|
466
|
+
/* @__PURE__ */ s(mn, { children: t }),
|
|
467
|
+
/* @__PURE__ */ s(In, { children: "PTS" })
|
|
468
468
|
] })
|
|
469
469
|
] })
|
|
470
470
|
] }),
|
|
471
|
-
i && /* @__PURE__ */ s(
|
|
472
|
-
] }),
|
|
471
|
+
i && /* @__PURE__ */ s(on, { isPlaying: n, onTimerExpired: r })
|
|
472
|
+
] }), fn = ({ openedQuestion: e, vote: t, close: n }) => {
|
|
473
473
|
var i;
|
|
474
|
-
const r = e.subject, I = e.type,
|
|
474
|
+
const r = e.subject, I = e.type, u = (i = e.options) == null ? void 0 : i.options, [m, d] = R(!1), [h, A] = R(!1), [D, N] = R(""), y = e == null ? void 0 : e.id, T = F(
|
|
475
475
|
async (v) => {
|
|
476
476
|
if (y) {
|
|
477
477
|
const g = v.currentTarget.value;
|
|
@@ -479,29 +479,33 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
481
|
[y, N, t]
|
|
482
|
-
), a =
|
|
482
|
+
), a = F(() => {
|
|
483
483
|
d(!0), setTimeout(n, 3e3);
|
|
484
|
-
}, [n]), l =
|
|
484
|
+
}, [n]), l = W(
|
|
485
485
|
() => e == null ? void 0 : e.answers.find((v) => v.youVoted === !0),
|
|
486
486
|
[e]
|
|
487
|
-
), c =
|
|
487
|
+
), c = W(
|
|
488
488
|
() => !!(e != null && e.answers.find((v) => v.correct === !0)),
|
|
489
489
|
[e]
|
|
490
|
-
),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
490
|
+
), f = W(() => e ? e.answers.map((v) => {
|
|
491
|
+
var g;
|
|
492
|
+
return {
|
|
493
|
+
...v,
|
|
494
|
+
questionVoted: !!l,
|
|
495
|
+
youSelected: D === v.id,
|
|
496
|
+
isLoading: h,
|
|
497
|
+
hasCorrectAnswer: c,
|
|
498
|
+
questionType: e.type,
|
|
499
|
+
answerTimeExpired: m,
|
|
500
|
+
questionStatus: e.status,
|
|
501
|
+
imageMode: (g = e.appearance) == null ? void 0 : g.images,
|
|
502
|
+
// ToDo: Figure out why imageMode is not in the response
|
|
503
|
+
onVote: T
|
|
504
|
+
};
|
|
505
|
+
}) : [], [c, m, h, e, l, T, D]), M = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0;
|
|
506
|
+
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(bt, { children: /* @__PURE__ */ p(Et, { children: [
|
|
503
507
|
M && /* @__PURE__ */ s(
|
|
504
|
-
|
|
508
|
+
Ct,
|
|
505
509
|
{
|
|
506
510
|
feedbackMessages: M,
|
|
507
511
|
questionVoted: !!l,
|
|
@@ -512,67 +516,72 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
512
516
|
}
|
|
513
517
|
),
|
|
514
518
|
/* @__PURE__ */ s(
|
|
515
|
-
|
|
519
|
+
hn,
|
|
516
520
|
{
|
|
517
|
-
title:
|
|
518
|
-
points:
|
|
521
|
+
title: m ? "Time expired" : "To win",
|
|
522
|
+
points: m ? void 0 : 100,
|
|
519
523
|
onTimerExpired: a,
|
|
520
524
|
isTimer: !0
|
|
521
525
|
}
|
|
522
526
|
),
|
|
523
|
-
|
|
524
|
-
|
|
527
|
+
m ? /* @__PURE__ */ s(
|
|
528
|
+
zt,
|
|
525
529
|
{
|
|
526
530
|
title: "More to come...",
|
|
527
531
|
description: "Watch for additional enhanced stream interactive experience."
|
|
528
532
|
}
|
|
529
|
-
) : /* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */ s(
|
|
531
|
-
/* @__PURE__ */ s(
|
|
533
|
+
) : /* @__PURE__ */ p(b, { children: [
|
|
534
|
+
/* @__PURE__ */ s(Lt, { children: r }),
|
|
535
|
+
/* @__PURE__ */ s($t, { children: f.map((v) => /* @__PURE__ */ s(Xt, { ...v }, v.id)) })
|
|
532
536
|
] })
|
|
533
537
|
] }) }) });
|
|
534
|
-
},
|
|
538
|
+
}, gn = /* @__PURE__ */ o("div")({
|
|
535
539
|
name: "Container",
|
|
536
540
|
class: "cgn5uen",
|
|
537
541
|
propsAsIs: !1
|
|
538
|
-
}),
|
|
542
|
+
}), Mn = /* @__PURE__ */ o("div")({
|
|
539
543
|
name: "Content",
|
|
540
544
|
class: "c1px8nt6",
|
|
541
545
|
propsAsIs: !1
|
|
542
|
-
}),
|
|
546
|
+
}), vn = /* @__PURE__ */ o("h3")({
|
|
543
547
|
name: "Title",
|
|
544
548
|
class: "t5et2jt",
|
|
545
549
|
propsAsIs: !1
|
|
546
|
-
}),
|
|
550
|
+
}), Nn = /* @__PURE__ */ o("div")({
|
|
547
551
|
name: "Description",
|
|
548
552
|
class: "d1i2kpk2",
|
|
549
553
|
propsAsIs: !1
|
|
550
|
-
}),
|
|
554
|
+
}), An = /* @__PURE__ */ o("div")({
|
|
551
555
|
name: "DateWrap",
|
|
552
556
|
class: "dd3lh3p",
|
|
553
557
|
propsAsIs: !1
|
|
554
|
-
}),
|
|
555
|
-
|
|
558
|
+
}), yn = /* @__PURE__ */ o("img")({
|
|
559
|
+
name: "Image",
|
|
560
|
+
class: "i1gfjeu5",
|
|
561
|
+
propsAsIs: !1
|
|
562
|
+
}), xe = ({ created: e, image: t, title: n, instantView: i }) => {
|
|
563
|
+
const r = W(() => {
|
|
556
564
|
if (e) {
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
565
|
+
const u = new Date(e);
|
|
566
|
+
if (qe(u))
|
|
559
567
|
return {
|
|
560
|
-
date:
|
|
561
|
-
time:
|
|
568
|
+
date: Ye(u),
|
|
569
|
+
time: Pe(u)
|
|
562
570
|
};
|
|
563
571
|
}
|
|
564
572
|
return null;
|
|
565
|
-
}, [e]);
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
|
|
568
|
-
|
|
573
|
+
}, [e]), I = (i == null ? void 0 : i.image) || t;
|
|
574
|
+
return /* @__PURE__ */ p(gn, { children: [
|
|
575
|
+
r && /* @__PURE__ */ p(An, { children: [
|
|
576
|
+
r.date,
|
|
569
577
|
" · ",
|
|
570
|
-
|
|
578
|
+
r.time
|
|
571
579
|
] }),
|
|
572
|
-
(
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
|
|
575
|
-
/* @__PURE__ */ s(
|
|
580
|
+
(i == null ? void 0 : i.video) && /* @__PURE__ */ s($e, { source: i.video.url, poster: i.video.thumbnailUrl }),
|
|
581
|
+
I && /* @__PURE__ */ s(yn, { src: I }),
|
|
582
|
+
/* @__PURE__ */ p(Mn, { children: [
|
|
583
|
+
/* @__PURE__ */ s(vn, { children: (i == null ? void 0 : i.heading) || n }),
|
|
584
|
+
/* @__PURE__ */ s(Nn, { children: i == null ? void 0 : i.body })
|
|
576
585
|
] })
|
|
577
586
|
] });
|
|
578
587
|
}, Tn = /* @__PURE__ */ o("div")({
|
|
@@ -583,9 +592,9 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
583
592
|
name: "WebLinkBtn",
|
|
584
593
|
class: "w19zie3h",
|
|
585
594
|
propsAsIs: !1
|
|
586
|
-
}), Sn = ({ instantView: e, ...t }) => /* @__PURE__ */
|
|
595
|
+
}), Sn = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Tn, { children: [
|
|
587
596
|
/* @__PURE__ */ s(xe, { instantView: e, ...t }),
|
|
588
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */
|
|
597
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Dn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
589
598
|
"Explore more of the Masters History",
|
|
590
599
|
/* @__PURE__ */ s(j, { name: "icon-external-link" })
|
|
591
600
|
] })
|
|
@@ -610,7 +619,7 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
610
619
|
loading: i,
|
|
611
620
|
data: r
|
|
612
621
|
} = e;
|
|
613
|
-
return !i && r ? /* @__PURE__ */ s(
|
|
622
|
+
return !i && r ? /* @__PURE__ */ s(fn, {
|
|
614
623
|
vote: t,
|
|
615
624
|
close: n,
|
|
616
625
|
openedQuestion: r
|
|
@@ -623,7 +632,7 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
623
632
|
if (!n)
|
|
624
633
|
return null;
|
|
625
634
|
const r = n.type;
|
|
626
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ p(zn, {
|
|
627
636
|
children: [/* @__PURE__ */ s(De, {
|
|
628
637
|
close: e.closeQuestion,
|
|
629
638
|
type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
|
|
@@ -652,8 +661,8 @@ const Fe = /* @__PURE__ */ o("div")({
|
|
|
652
661
|
class: "tspsaas",
|
|
653
662
|
propsAsIs: !1
|
|
654
663
|
});
|
|
655
|
-
var
|
|
656
|
-
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Cn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(bn, { children: e }) }), En = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(kn, { children: /* @__PURE__ */
|
|
664
|
+
var V = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(V || {});
|
|
665
|
+
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Cn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(bn, { children: e }) }), En = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(kn, { children: /* @__PURE__ */ p(wn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
657
666
|
/* @__PURE__ */ s(ue, { title: "Home", active: e === "home", onClick: () => t(
|
|
658
667
|
"home"
|
|
659
668
|
/* HOME */
|
|
@@ -707,15 +716,15 @@ function Rn(e, t) {
|
|
|
707
716
|
return !1;
|
|
708
717
|
return !0;
|
|
709
718
|
}
|
|
710
|
-
function
|
|
719
|
+
function G(e, t) {
|
|
711
720
|
t === void 0 && (t = Rn);
|
|
712
721
|
var n, i = [], r, I = !1;
|
|
713
|
-
function
|
|
714
|
-
for (var
|
|
715
|
-
|
|
716
|
-
return I && n === this && t(
|
|
722
|
+
function u() {
|
|
723
|
+
for (var m = [], d = 0; d < arguments.length; d++)
|
|
724
|
+
m[d] = arguments[d];
|
|
725
|
+
return I && n === this && t(m, i) || (r = e.apply(this, m), I = !0, n = this, i = m), r;
|
|
717
726
|
}
|
|
718
|
-
return
|
|
727
|
+
return u;
|
|
719
728
|
}
|
|
720
729
|
var Qn = typeof performance == "object" && typeof performance.now == "function", Ie = Qn ? function() {
|
|
721
730
|
return performance.now();
|
|
@@ -735,13 +744,13 @@ function Un(e, t) {
|
|
|
735
744
|
};
|
|
736
745
|
return r;
|
|
737
746
|
}
|
|
738
|
-
var
|
|
747
|
+
var J = -1;
|
|
739
748
|
function fe(e) {
|
|
740
|
-
if (e === void 0 && (e = !1),
|
|
749
|
+
if (e === void 0 && (e = !1), J === -1 || e) {
|
|
741
750
|
var t = document.createElement("div"), n = t.style;
|
|
742
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t),
|
|
751
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), J = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
743
752
|
}
|
|
744
|
-
return
|
|
753
|
+
return J;
|
|
745
754
|
}
|
|
746
755
|
var C = null;
|
|
747
756
|
function ge(e) {
|
|
@@ -757,7 +766,7 @@ var _n = 150, qn = function(t, n) {
|
|
|
757
766
|
return t;
|
|
758
767
|
};
|
|
759
768
|
function Yn(e) {
|
|
760
|
-
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, I = e.getOffsetForIndexAndAlignment,
|
|
769
|
+
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, I = e.getOffsetForIndexAndAlignment, u = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, d = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, A = e.validateProps;
|
|
761
770
|
return t = /* @__PURE__ */ function(D) {
|
|
762
771
|
Ln(N, D);
|
|
763
772
|
function N(T) {
|
|
@@ -768,25 +777,25 @@ function Yn(e) {
|
|
|
768
777
|
scrollDirection: "forward",
|
|
769
778
|
scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
|
|
770
779
|
scrollUpdateWasRequested: !1
|
|
771
|
-
}, a._callOnItemsRendered = void 0, a._callOnItemsRendered =
|
|
780
|
+
}, a._callOnItemsRendered = void 0, a._callOnItemsRendered = G(function(l, c, f, M) {
|
|
772
781
|
return a.props.onItemsRendered({
|
|
773
782
|
overscanStartIndex: l,
|
|
774
783
|
overscanStopIndex: c,
|
|
775
|
-
visibleStartIndex:
|
|
784
|
+
visibleStartIndex: f,
|
|
776
785
|
visibleStopIndex: M
|
|
777
786
|
});
|
|
778
|
-
}), a._callOnScroll = void 0, a._callOnScroll =
|
|
787
|
+
}), a._callOnScroll = void 0, a._callOnScroll = G(function(l, c, f) {
|
|
779
788
|
return a.props.onScroll({
|
|
780
789
|
scrollDirection: l,
|
|
781
790
|
scrollOffset: c,
|
|
782
|
-
scrollUpdateWasRequested:
|
|
791
|
+
scrollUpdateWasRequested: f
|
|
783
792
|
});
|
|
784
793
|
}), a._getItemStyle = void 0, a._getItemStyle = function(l) {
|
|
785
|
-
var c = a.props,
|
|
794
|
+
var c = a.props, f = c.direction, M = c.itemSize, v = c.layout, g = a._getItemStyleCache(h && M, h && v, h && f), S;
|
|
786
795
|
if (g.hasOwnProperty(l))
|
|
787
796
|
S = g[l];
|
|
788
797
|
else {
|
|
789
|
-
var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), k =
|
|
798
|
+
var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), k = f === "horizontal" || v === "horizontal", U = f === "rtl", _ = k ? z : 0;
|
|
790
799
|
g[l] = S = {
|
|
791
800
|
position: "absolute",
|
|
792
801
|
left: U ? void 0 : _,
|
|
@@ -797,10 +806,10 @@ function Yn(e) {
|
|
|
797
806
|
};
|
|
798
807
|
}
|
|
799
808
|
return S;
|
|
800
|
-
}, a._getItemStyleCache = void 0, a._getItemStyleCache =
|
|
809
|
+
}, a._getItemStyleCache = void 0, a._getItemStyleCache = G(function(l, c, f) {
|
|
801
810
|
return {};
|
|
802
811
|
}), a._onScrollHorizontal = function(l) {
|
|
803
|
-
var c = l.currentTarget,
|
|
812
|
+
var c = l.currentTarget, f = c.clientWidth, M = c.scrollLeft, v = c.scrollWidth;
|
|
804
813
|
a.setState(function(g) {
|
|
805
814
|
if (g.scrollOffset === M)
|
|
806
815
|
return null;
|
|
@@ -811,10 +820,10 @@ function Yn(e) {
|
|
|
811
820
|
z = -M;
|
|
812
821
|
break;
|
|
813
822
|
case "positive-descending":
|
|
814
|
-
z = v -
|
|
823
|
+
z = v - f - M;
|
|
815
824
|
break;
|
|
816
825
|
}
|
|
817
|
-
return z = Math.max(0, Math.min(z, v -
|
|
826
|
+
return z = Math.max(0, Math.min(z, v - f)), {
|
|
818
827
|
isScrolling: !0,
|
|
819
828
|
scrollDirection: g.scrollOffset < M ? "forward" : "backward",
|
|
820
829
|
scrollOffset: z,
|
|
@@ -822,11 +831,11 @@ function Yn(e) {
|
|
|
822
831
|
};
|
|
823
832
|
}, a._resetIsScrollingDebounced);
|
|
824
833
|
}, a._onScrollVertical = function(l) {
|
|
825
|
-
var c = l.currentTarget,
|
|
834
|
+
var c = l.currentTarget, f = c.clientHeight, M = c.scrollHeight, v = c.scrollTop;
|
|
826
835
|
a.setState(function(g) {
|
|
827
836
|
if (g.scrollOffset === v)
|
|
828
837
|
return null;
|
|
829
|
-
var S = Math.max(0, Math.min(v, M -
|
|
838
|
+
var S = Math.max(0, Math.min(v, M - f));
|
|
830
839
|
return {
|
|
831
840
|
isScrolling: !0,
|
|
832
841
|
scrollDirection: g.scrollOffset < S ? "forward" : "backward",
|
|
@@ -861,8 +870,8 @@ function Yn(e) {
|
|
|
861
870
|
}, this._resetIsScrollingDebounced);
|
|
862
871
|
}, y.scrollToItem = function(a, l) {
|
|
863
872
|
l === void 0 && (l = "auto");
|
|
864
|
-
var c = this.props,
|
|
865
|
-
a = Math.max(0, Math.min(a,
|
|
873
|
+
var c = this.props, f = c.itemCount, M = c.layout, v = this.state.scrollOffset;
|
|
874
|
+
a = Math.max(0, Math.min(a, f - 1));
|
|
866
875
|
var g = 0;
|
|
867
876
|
if (this._outerRef) {
|
|
868
877
|
var S = this._outerRef;
|
|
@@ -870,14 +879,14 @@ function Yn(e) {
|
|
|
870
879
|
}
|
|
871
880
|
this.scrollTo(I(this.props, a, l, v, this._instanceProps, g));
|
|
872
881
|
}, y.componentDidMount = function() {
|
|
873
|
-
var a = this.props, l = a.direction, c = a.initialScrollOffset,
|
|
882
|
+
var a = this.props, l = a.direction, c = a.initialScrollOffset, f = a.layout;
|
|
874
883
|
if (typeof c == "number" && this._outerRef != null) {
|
|
875
884
|
var M = this._outerRef;
|
|
876
|
-
l === "horizontal" ||
|
|
885
|
+
l === "horizontal" || f === "horizontal" ? M.scrollLeft = c : M.scrollTop = c;
|
|
877
886
|
}
|
|
878
887
|
this._callPropsCallbacks();
|
|
879
888
|
}, y.componentDidUpdate = function() {
|
|
880
|
-
var a = this.props, l = a.direction, c = a.layout,
|
|
889
|
+
var a = this.props, l = a.direction, c = a.layout, f = this.state, M = f.scrollOffset, v = f.scrollUpdateWasRequested;
|
|
881
890
|
if (v && this._outerRef != null) {
|
|
882
891
|
var g = this._outerRef;
|
|
883
892
|
if (l === "horizontal" || c === "horizontal")
|
|
@@ -903,18 +912,18 @@ function Yn(e) {
|
|
|
903
912
|
}, y.componentWillUnmount = function() {
|
|
904
913
|
this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
|
|
905
914
|
}, y.render = function() {
|
|
906
|
-
var a = this.props, l = a.children, c = a.className,
|
|
915
|
+
var a = this.props, l = a.children, c = a.className, f = a.direction, M = a.height, v = a.innerRef, g = a.innerElementType, S = a.innerTagName, z = a.itemCount, O = a.itemData, k = a.itemKey, U = k === void 0 ? qn : k, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, ke = a.style, we = a.useIsScrolling, Ce = a.width, ne = this.state.isScrolling, B = f === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
|
|
907
916
|
if (z > 0)
|
|
908
|
-
for (var
|
|
909
|
-
ie.push(
|
|
917
|
+
for (var L = Ee; L <= Le; L++)
|
|
918
|
+
ie.push(H(l, {
|
|
910
919
|
data: O,
|
|
911
|
-
key: U(
|
|
912
|
-
index:
|
|
920
|
+
key: U(L, O),
|
|
921
|
+
index: L,
|
|
913
922
|
isScrolling: we ? ne : void 0,
|
|
914
|
-
style: this._getItemStyle(
|
|
923
|
+
style: this._getItemStyle(L)
|
|
915
924
|
}));
|
|
916
925
|
var re = i(this.props, this._instanceProps);
|
|
917
|
-
return
|
|
926
|
+
return H(je || Oe || "div", {
|
|
918
927
|
className: c,
|
|
919
928
|
onScroll: be,
|
|
920
929
|
ref: this._outerRefSetter,
|
|
@@ -925,23 +934,23 @@ function Yn(e) {
|
|
|
925
934
|
overflow: "auto",
|
|
926
935
|
WebkitOverflowScrolling: "touch",
|
|
927
936
|
willChange: "transform",
|
|
928
|
-
direction:
|
|
937
|
+
direction: f
|
|
929
938
|
}, ke)
|
|
930
|
-
},
|
|
939
|
+
}, H(g || S || "div", {
|
|
931
940
|
children: ie,
|
|
932
941
|
ref: v,
|
|
933
942
|
style: {
|
|
934
|
-
height:
|
|
943
|
+
height: B ? "100%" : re,
|
|
935
944
|
pointerEvents: ne ? "none" : void 0,
|
|
936
|
-
width:
|
|
945
|
+
width: B ? re : "100%"
|
|
937
946
|
}
|
|
938
947
|
}));
|
|
939
948
|
}, y._callPropsCallbacks = function() {
|
|
940
949
|
if (typeof this.props.onItemsRendered == "function") {
|
|
941
950
|
var a = this.props.itemCount;
|
|
942
951
|
if (a > 0) {
|
|
943
|
-
var l = this._getRangeToRender(), c = l[0],
|
|
944
|
-
this._callOnItemsRendered(c,
|
|
952
|
+
var l = this._getRangeToRender(), c = l[0], f = l[1], M = l[2], v = l[3];
|
|
953
|
+
this._callOnItemsRendered(c, f, M, v);
|
|
945
954
|
}
|
|
946
955
|
}
|
|
947
956
|
if (typeof this.props.onScroll == "function") {
|
|
@@ -949,10 +958,10 @@ function Yn(e) {
|
|
|
949
958
|
this._callOnScroll(S, z, O);
|
|
950
959
|
}
|
|
951
960
|
}, y._getRangeToRender = function() {
|
|
952
|
-
var a = this.props, l = a.itemCount, c = a.overscanCount,
|
|
961
|
+
var a = this.props, l = a.itemCount, c = a.overscanCount, f = this.state, M = f.isScrolling, v = f.scrollDirection, g = f.scrollOffset;
|
|
953
962
|
if (l === 0)
|
|
954
963
|
return [0, 0, 0, 0];
|
|
955
|
-
var S =
|
|
964
|
+
var S = u(this.props, g, this._instanceProps), z = m(this.props, S, g, this._instanceProps), O = !M || v === "backward" ? Math.max(1, c) : 1, k = !M || v === "forward" ? Math.max(1, c) : 1;
|
|
956
965
|
return [Math.max(0, S - O), Math.max(0, Math.min(l - 1, z + k)), S, z];
|
|
957
966
|
}, N;
|
|
958
967
|
}(Ae), t.defaultProps = {
|
|
@@ -978,16 +987,16 @@ var Pn = function(t, n) {
|
|
|
978
987
|
var n = t.itemCount, i = t.itemSize;
|
|
979
988
|
return i * n;
|
|
980
989
|
},
|
|
981
|
-
getOffsetForIndexAndAlignment: function(t, n, i, r, I,
|
|
982
|
-
var
|
|
990
|
+
getOffsetForIndexAndAlignment: function(t, n, i, r, I, u) {
|
|
991
|
+
var m = t.direction, d = t.height, h = t.itemCount, A = t.itemSize, D = t.layout, N = t.width, y = m === "horizontal" || D === "horizontal", T = y ? N : d, a = Math.max(0, h * A - T), l = Math.min(a, n * A), c = Math.max(0, n * A - T + A + u);
|
|
983
992
|
switch (i === "smart" && (r >= c - T && r <= l + T ? i = "auto" : i = "center"), i) {
|
|
984
993
|
case "start":
|
|
985
994
|
return l;
|
|
986
995
|
case "end":
|
|
987
996
|
return c;
|
|
988
997
|
case "center": {
|
|
989
|
-
var
|
|
990
|
-
return
|
|
998
|
+
var f = Math.round(c + (l - c) / 2);
|
|
999
|
+
return f < Math.ceil(T / 2) ? 0 : f > a + Math.floor(T / 2) ? a : f;
|
|
991
1000
|
}
|
|
992
1001
|
case "auto":
|
|
993
1002
|
default:
|
|
@@ -999,9 +1008,9 @@ var Pn = function(t, n) {
|
|
|
999
1008
|
return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
|
|
1000
1009
|
},
|
|
1001
1010
|
getStopIndexForStartIndex: function(t, n, i) {
|
|
1002
|
-
var r = t.direction, I = t.height,
|
|
1011
|
+
var r = t.direction, I = t.height, u = t.itemCount, m = t.itemSize, d = t.layout, h = t.width, A = r === "horizontal" || d === "horizontal", D = n * m, N = A ? h : I, y = Math.ceil((N + i - D) / m);
|
|
1003
1012
|
return Math.max(0, Math.min(
|
|
1004
|
-
|
|
1013
|
+
u - 1,
|
|
1005
1014
|
n + y - 1
|
|
1006
1015
|
// -1 is because stop index is inclusive
|
|
1007
1016
|
));
|
|
@@ -1018,24 +1027,24 @@ function Vn(e) {
|
|
|
1018
1027
|
return !(i > n || r < t);
|
|
1019
1028
|
}
|
|
1020
1029
|
function Fn(e) {
|
|
1021
|
-
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, I = e.stopIndex,
|
|
1022
|
-
var A = t(
|
|
1023
|
-
A ? d !== null && (
|
|
1030
|
+
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, I = e.stopIndex, u = [], m = null, d = null, h = r; h <= I; h++) {
|
|
1031
|
+
var A = t(h);
|
|
1032
|
+
A ? d !== null && (u.push(m, d), m = d = null) : (d = h, m === null && (m = h));
|
|
1024
1033
|
}
|
|
1025
1034
|
if (d !== null) {
|
|
1026
|
-
for (var D = Math.min(Math.max(d,
|
|
1035
|
+
for (var D = Math.min(Math.max(d, m + i - 1), n - 1), N = d + 1; N <= D && !t(N); N++)
|
|
1027
1036
|
d = N;
|
|
1028
|
-
|
|
1037
|
+
u.push(m, d);
|
|
1029
1038
|
}
|
|
1030
|
-
if (
|
|
1031
|
-
for (;
|
|
1032
|
-
var y =
|
|
1039
|
+
if (u.length)
|
|
1040
|
+
for (; u[1] - u[0] + 1 < i && u[0] > 0; ) {
|
|
1041
|
+
var y = u[0] - 1;
|
|
1033
1042
|
if (!t(y))
|
|
1034
|
-
|
|
1043
|
+
u[0] = y;
|
|
1035
1044
|
else
|
|
1036
1045
|
break;
|
|
1037
1046
|
}
|
|
1038
|
-
return
|
|
1047
|
+
return u;
|
|
1039
1048
|
}
|
|
1040
1049
|
var Bn = function(e, t) {
|
|
1041
1050
|
if (!(e instanceof t))
|
|
@@ -1070,13 +1079,13 @@ var Bn = function(e, t) {
|
|
|
1070
1079
|
function t() {
|
|
1071
1080
|
var n, i, r, I;
|
|
1072
1081
|
Bn(this, t);
|
|
1073
|
-
for (var
|
|
1074
|
-
|
|
1075
|
-
return I = (i = (r = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(
|
|
1076
|
-
var A =
|
|
1082
|
+
for (var u = arguments.length, m = Array(u), d = 0; d < u; d++)
|
|
1083
|
+
m[d] = arguments[d];
|
|
1084
|
+
return I = (i = (r = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(h) {
|
|
1085
|
+
var A = h.visibleStartIndex, D = h.visibleStopIndex;
|
|
1077
1086
|
r._lastRenderedStartIndex = A, r._lastRenderedStopIndex = D, r._ensureRowsLoaded(A, D);
|
|
1078
|
-
}, r._setRef = function(
|
|
1079
|
-
r._listRef =
|
|
1087
|
+
}, r._setRef = function(h) {
|
|
1088
|
+
r._listRef = h;
|
|
1080
1089
|
}, i), Me(r, I);
|
|
1081
1090
|
}
|
|
1082
1091
|
return Hn(t, [{
|
|
@@ -1101,12 +1110,12 @@ var Bn = function(e, t) {
|
|
|
1101
1110
|
}, {
|
|
1102
1111
|
key: "_ensureRowsLoaded",
|
|
1103
1112
|
value: function(i, r) {
|
|
1104
|
-
var I = this.props,
|
|
1105
|
-
isItemLoaded:
|
|
1106
|
-
itemCount:
|
|
1107
|
-
minimumBatchSize:
|
|
1113
|
+
var I = this.props, u = I.isItemLoaded, m = I.itemCount, d = I.minimumBatchSize, h = d === void 0 ? 10 : d, A = I.threshold, D = A === void 0 ? 15 : A, N = Fn({
|
|
1114
|
+
isItemLoaded: u,
|
|
1115
|
+
itemCount: m,
|
|
1116
|
+
minimumBatchSize: h,
|
|
1108
1117
|
startIndex: Math.max(0, i - D),
|
|
1109
|
-
stopIndex: Math.min(
|
|
1118
|
+
stopIndex: Math.min(m - 1, r + D)
|
|
1110
1119
|
});
|
|
1111
1120
|
(this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(y, T) {
|
|
1112
1121
|
return N[T] !== y;
|
|
@@ -1115,8 +1124,8 @@ var Bn = function(e, t) {
|
|
|
1115
1124
|
}, {
|
|
1116
1125
|
key: "_loadUnloadedRanges",
|
|
1117
1126
|
value: function(i) {
|
|
1118
|
-
for (var r = this, I = this.props.loadMoreItems || this.props.loadMoreRows,
|
|
1119
|
-
var A = i[
|
|
1127
|
+
for (var r = this, I = this.props.loadMoreItems || this.props.loadMoreRows, u = function(h) {
|
|
1128
|
+
var A = i[h], D = i[h + 1], N = I(A, D);
|
|
1120
1129
|
N != null && N.then(function() {
|
|
1121
1130
|
if (Vn({
|
|
1122
1131
|
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
@@ -1129,8 +1138,8 @@ var Bn = function(e, t) {
|
|
|
1129
1138
|
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(A, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
|
|
1130
1139
|
}
|
|
1131
1140
|
});
|
|
1132
|
-
},
|
|
1133
|
-
m
|
|
1141
|
+
}, m = 0; m < i.length; m += 2)
|
|
1142
|
+
u(m);
|
|
1134
1143
|
}
|
|
1135
1144
|
}]), t;
|
|
1136
1145
|
}(Ae);
|
|
@@ -1173,12 +1182,12 @@ const Jn = /* @__PURE__ */ o("div")({
|
|
|
1173
1182
|
points: i,
|
|
1174
1183
|
isCurrentUser: r,
|
|
1175
1184
|
openItemDetail: I,
|
|
1176
|
-
style:
|
|
1177
|
-
}) => /* @__PURE__ */
|
|
1185
|
+
style: u
|
|
1186
|
+
}) => /* @__PURE__ */ p(Jn, { onClick: I, style: u, children: [
|
|
1178
1187
|
/* @__PURE__ */ s(Kn, { children: e || 0 }),
|
|
1179
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ p(ts, { children: [
|
|
1180
1189
|
t ? /* @__PURE__ */ s(Xn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(es, { children: ye(n || "") }),
|
|
1181
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ p(ns, { children: [
|
|
1182
1191
|
/* @__PURE__ */ s(ss, { children: n || "" }),
|
|
1183
1192
|
r && /* @__PURE__ */ s(rs, { name: "icon-star" })
|
|
1184
1193
|
] })
|
|
@@ -1196,22 +1205,22 @@ const Jn = /* @__PURE__ */ o("div")({
|
|
|
1196
1205
|
}) => /* @__PURE__ */ s(Re, { children: ({ width: r, height: I }) => /* @__PURE__ */ s(
|
|
1197
1206
|
Gn,
|
|
1198
1207
|
{
|
|
1199
|
-
isItemLoaded: (
|
|
1208
|
+
isItemLoaded: (u) => u < e.length,
|
|
1200
1209
|
itemCount: e.length + 1,
|
|
1201
1210
|
loadMoreItems: i,
|
|
1202
|
-
children: ({ onItemsRendered:
|
|
1211
|
+
children: ({ onItemsRendered: u, ref: m }) => /* @__PURE__ */ s(as, { children: /* @__PURE__ */ s(
|
|
1203
1212
|
Wn,
|
|
1204
1213
|
{
|
|
1205
1214
|
itemSize: 56,
|
|
1206
|
-
onItemsRendered:
|
|
1207
|
-
ref:
|
|
1215
|
+
onItemsRendered: u,
|
|
1216
|
+
ref: m,
|
|
1208
1217
|
itemCount: e.length,
|
|
1209
1218
|
width: r,
|
|
1210
1219
|
height: I,
|
|
1211
|
-
children: ({ index: d, style:
|
|
1220
|
+
children: ({ index: d, style: h }) => /* @__PURE__ */ s(
|
|
1212
1221
|
os,
|
|
1213
1222
|
{
|
|
1214
|
-
style: { ...
|
|
1223
|
+
style: { ...h, maxHeight: 48 },
|
|
1215
1224
|
...e[d],
|
|
1216
1225
|
openItemDetail: () => n(e[d].userId),
|
|
1217
1226
|
isCurrentUser: !!t && t === e[d].userId
|
|
@@ -1270,7 +1279,7 @@ const Jn = /* @__PURE__ */ o("div")({
|
|
|
1270
1279
|
name: "QuestionAction",
|
|
1271
1280
|
class: "q105uluy",
|
|
1272
1281
|
propsAsIs: !1
|
|
1273
|
-
}), hs = () => j,
|
|
1282
|
+
}), hs = () => j, P = /* @__PURE__ */ o(hs())({
|
|
1274
1283
|
name: "QuestionActionIcon",
|
|
1275
1284
|
class: "q1fa0b9h",
|
|
1276
1285
|
propsAsIs: !0
|
|
@@ -1286,76 +1295,80 @@ const Jn = /* @__PURE__ */ o("div")({
|
|
|
1286
1295
|
name: "QuestionContent",
|
|
1287
1296
|
class: "q1uz5j1g",
|
|
1288
1297
|
propsAsIs: !1
|
|
1289
|
-
}), Ns = {
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1298
|
+
}), Ns = /* @__PURE__ */ o("button")({
|
|
1299
|
+
name: "PlayButton",
|
|
1300
|
+
class: "p1pba9p1",
|
|
1301
|
+
propsAsIs: !1
|
|
1302
|
+
}), As = {
|
|
1303
|
+
[q.LOST]: /* @__PURE__ */ s(P, { name: "icon-cross" }),
|
|
1304
|
+
[q.WON]: /* @__PURE__ */ s(P, { name: "icon-check" }),
|
|
1305
|
+
[q.UNSET]: /* @__PURE__ */ s(P, { name: "icon-arrow" }),
|
|
1306
|
+
[q.DNP]: /* @__PURE__ */ s(P, { name: "icon-arrow" })
|
|
1307
|
+
}, ys = ({
|
|
1295
1308
|
questionId: e,
|
|
1296
1309
|
questionType: t,
|
|
1297
1310
|
questionStatus: n,
|
|
1298
1311
|
subject: i,
|
|
1299
1312
|
openForVoting: r,
|
|
1300
1313
|
openQuestion: I,
|
|
1301
|
-
status:
|
|
1314
|
+
status: u
|
|
1302
1315
|
}) => {
|
|
1303
|
-
const
|
|
1304
|
-
return
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
/* @__PURE__ */
|
|
1307
|
-
/* @__PURE__ */ s(gs, { name:
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
|
|
1316
|
+
const m = Ne[t], d = As[u];
|
|
1317
|
+
return m ? /* @__PURE__ */ p(us, { onClick: () => I == null ? void 0 : I(e), children: [
|
|
1318
|
+
/* @__PURE__ */ p(vs, { children: [
|
|
1319
|
+
/* @__PURE__ */ p(ps, { children: [
|
|
1320
|
+
/* @__PURE__ */ s(gs, { name: m.iconName }),
|
|
1321
|
+
/* @__PURE__ */ p(Ms, { children: [
|
|
1322
|
+
m.label,
|
|
1310
1323
|
t === x.TRIVIA && n === Q.RESOLVED && " • Expired"
|
|
1311
1324
|
] })
|
|
1312
1325
|
] }),
|
|
1313
1326
|
/* @__PURE__ */ s(ms, { children: i || "" })
|
|
1314
1327
|
] }),
|
|
1315
|
-
/* @__PURE__ */ s(Is, { children:
|
|
1328
|
+
/* @__PURE__ */ s(Is, { children: r ? /* @__PURE__ */ s(Ns, { children: "Play" }) : d })
|
|
1316
1329
|
] }) : null;
|
|
1317
|
-
},
|
|
1330
|
+
}, Ts = /* @__PURE__ */ o("div")({
|
|
1318
1331
|
name: "Container",
|
|
1319
1332
|
class: "cll3md7",
|
|
1320
1333
|
propsAsIs: !1
|
|
1321
|
-
}),
|
|
1334
|
+
}), Ds = /* @__PURE__ */ o("button")({
|
|
1322
1335
|
name: "ActionBtn",
|
|
1323
1336
|
class: "a10g1iik",
|
|
1324
1337
|
propsAsIs: !1
|
|
1325
|
-
}),
|
|
1338
|
+
}), Ss = ({
|
|
1326
1339
|
openInsight: e,
|
|
1327
1340
|
questionId: t,
|
|
1328
1341
|
...n
|
|
1329
|
-
}) => /* @__PURE__ */
|
|
1342
|
+
}) => /* @__PURE__ */ p(Ts, { children: [
|
|
1330
1343
|
/* @__PURE__ */ s(xe, { questionId: t, ...n }),
|
|
1331
|
-
e && /* @__PURE__ */ s(
|
|
1332
|
-
] }),
|
|
1344
|
+
e && /* @__PURE__ */ s(Ds, { onClick: () => e(t), children: "View Insight" })
|
|
1345
|
+
] }), zs = /* @__PURE__ */ o("div")({
|
|
1333
1346
|
name: "QuestionsContainer",
|
|
1334
1347
|
class: "qvghv3l",
|
|
1335
1348
|
propsAsIs: !1
|
|
1336
|
-
}),
|
|
1349
|
+
}), xs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(zs, { children: e == null ? void 0 : e.map((n) => {
|
|
1337
1350
|
var i, r;
|
|
1338
1351
|
if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1339
1352
|
const I = n.attributes.attributes.value;
|
|
1340
|
-
return /* @__PURE__ */ s(
|
|
1353
|
+
return /* @__PURE__ */ s(ys, { openQuestion: t, ...I }, I.questionId);
|
|
1341
1354
|
}
|
|
1342
1355
|
if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
|
|
1343
1356
|
const I = n.attributes.attributes.value;
|
|
1344
|
-
return /* @__PURE__ */ s(
|
|
1357
|
+
return /* @__PURE__ */ s(Ss, { openInsight: t, ...I }, I.questionId);
|
|
1345
1358
|
}
|
|
1346
1359
|
return null;
|
|
1347
|
-
}) }),
|
|
1360
|
+
}) }), js = ({ store: e, openQuestion: t }) => {
|
|
1348
1361
|
const n = w(e);
|
|
1349
|
-
return n != null && n.data ? /* @__PURE__ */ s(
|
|
1350
|
-
},
|
|
1362
|
+
return n != null && n.data ? /* @__PURE__ */ s(xs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1363
|
+
}, Os = ({ userSummary: e }) => {
|
|
1351
1364
|
var t, n;
|
|
1352
1365
|
const i = w(e.getStore());
|
|
1353
1366
|
return (t = i.data) != null && t.summary ? /* @__PURE__ */ s(Se, { ...i.data.summary, successRate: (n = i.data.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1354
|
-
},
|
|
1367
|
+
}, ks = ({
|
|
1355
1368
|
gamification: e
|
|
1356
1369
|
}) => {
|
|
1357
|
-
const [t, n] = R(
|
|
1358
|
-
return /* @__PURE__ */
|
|
1370
|
+
const [t, n] = R(V.HOME);
|
|
1371
|
+
return /* @__PURE__ */ p("div", {
|
|
1359
1372
|
style: {
|
|
1360
1373
|
height: "100%",
|
|
1361
1374
|
display: "flex",
|
|
@@ -1370,47 +1383,47 @@ const Jn = /* @__PURE__ */ o("div")({
|
|
|
1370
1383
|
activePage: t,
|
|
1371
1384
|
toggleActivePage: n
|
|
1372
1385
|
})
|
|
1373
|
-
}), t ===
|
|
1386
|
+
}), t === V.HOME && /* @__PURE__ */ p(te, {
|
|
1374
1387
|
children: [/* @__PURE__ */ s(K, {
|
|
1375
1388
|
style: {
|
|
1376
1389
|
paddingTop: "12px"
|
|
1377
1390
|
},
|
|
1378
|
-
children: /* @__PURE__ */ s(
|
|
1391
|
+
children: /* @__PURE__ */ s(Os, {
|
|
1379
1392
|
userSummary: e.userSummary
|
|
1380
1393
|
})
|
|
1381
|
-
}), /* @__PURE__ */ s(
|
|
1382
|
-
children: /* @__PURE__ */ s(
|
|
1394
|
+
}), /* @__PURE__ */ s(Ue, {
|
|
1395
|
+
children: /* @__PURE__ */ s(js, {
|
|
1383
1396
|
openQuestion: e.openQuestion,
|
|
1384
1397
|
store: e.feedList.getStore()
|
|
1385
1398
|
})
|
|
1386
1399
|
})]
|
|
1387
|
-
}), t ===
|
|
1400
|
+
}), t === V.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1388
1401
|
className: "c1bp9dj2",
|
|
1389
1402
|
children: /* @__PURE__ */ s(ds, {
|
|
1390
1403
|
gamification: e
|
|
1391
1404
|
})
|
|
1392
1405
|
})]
|
|
1393
1406
|
});
|
|
1394
|
-
},
|
|
1407
|
+
}, ws = () => _e, ve = /* @__PURE__ */ o(ws())({
|
|
1395
1408
|
name: "OpenedContainer",
|
|
1396
1409
|
class: "oar61gl",
|
|
1397
1410
|
propsAsIs: !0
|
|
1398
|
-
}),
|
|
1411
|
+
}), Cs = /* @__PURE__ */ o("div")({
|
|
1399
1412
|
name: "UserContainer",
|
|
1400
1413
|
class: "u14zaal4",
|
|
1401
1414
|
propsAsIs: !1
|
|
1402
|
-
}),
|
|
1415
|
+
}), bs = ({
|
|
1403
1416
|
correct: e,
|
|
1404
1417
|
incorrect: t
|
|
1405
1418
|
}) => {
|
|
1406
1419
|
const n = e + t;
|
|
1407
1420
|
return n === 0 ? 0 : Math.round(e / n * 100);
|
|
1408
|
-
},
|
|
1421
|
+
}, Hs = ({
|
|
1409
1422
|
gamification: e,
|
|
1410
1423
|
className: t
|
|
1411
1424
|
}) => {
|
|
1412
1425
|
const n = w(e.openedQuestion.$store), i = w(e.openedUser);
|
|
1413
|
-
return /* @__PURE__ */
|
|
1426
|
+
return /* @__PURE__ */ p(b, {
|
|
1414
1427
|
children: [n && /* @__PURE__ */ s(ve, {
|
|
1415
1428
|
className: t,
|
|
1416
1429
|
children: /* @__PURE__ */ s(On, {
|
|
@@ -1418,26 +1431,26 @@ const Jn = /* @__PURE__ */ o("div")({
|
|
|
1418
1431
|
})
|
|
1419
1432
|
}), i && /* @__PURE__ */ s(ve, {
|
|
1420
1433
|
className: t,
|
|
1421
|
-
children: /* @__PURE__ */
|
|
1434
|
+
children: /* @__PURE__ */ p(Cs, {
|
|
1422
1435
|
children: [/* @__PURE__ */ s(De, {
|
|
1423
1436
|
label: "Friend's Rank",
|
|
1424
1437
|
close: e.closeUser
|
|
1425
1438
|
}), /* @__PURE__ */ s(K, {
|
|
1426
1439
|
children: /* @__PURE__ */ s(Se, {
|
|
1427
1440
|
...i,
|
|
1428
|
-
successRate:
|
|
1441
|
+
successRate: bs(i)
|
|
1429
1442
|
})
|
|
1430
1443
|
})]
|
|
1431
1444
|
})
|
|
1432
1445
|
}), /* @__PURE__ */ s(te, {
|
|
1433
1446
|
className: t,
|
|
1434
1447
|
"data-nav": "true",
|
|
1435
|
-
children: /* @__PURE__ */ s(
|
|
1448
|
+
children: /* @__PURE__ */ s(ks, {
|
|
1436
1449
|
gamification: e
|
|
1437
1450
|
})
|
|
1438
1451
|
})]
|
|
1439
1452
|
});
|
|
1440
1453
|
};
|
|
1441
1454
|
export {
|
|
1442
|
-
|
|
1455
|
+
Hs as default
|
|
1443
1456
|
};
|