@streamlayer/react 0.31.6 → 0.31.8
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/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +14 -14
- package/lib/dist/es/gamification-feature.js +409 -407
- package/lib/dist/es/masters.js +754 -754
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +347 -345
- package/lib/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as
|
|
1
|
+
import { jsxs as m, jsx as s, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { s as r, n as O } from "./index4.js";
|
|
3
3
|
import { useStore as k } from "@nanostores/react";
|
|
4
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 { QuestionType as z, QuestionStatus as
|
|
6
|
-
import { useState as
|
|
5
|
+
import { QuestionType as z, QuestionStatus as R, QuestionImages as $, PickHistoryStatus as _ } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { useState as V, useCallback as F, useMemo as Y, createElement as H, PureComponent as ye } from "react";
|
|
7
7
|
import { d as Pe } from "./index3.js";
|
|
8
8
|
import "react-countup";
|
|
9
9
|
import { CountdownCircleTimer as qe } from "react-countdown-circle-timer";
|
|
10
|
-
import { E } from "./index2.js";
|
|
10
|
+
import { E as L } from "./index2.js";
|
|
11
11
|
import "@streamlayer/sdk-web-interfaces";
|
|
12
12
|
import "@streamlayer/sdk-web-notifications";
|
|
13
13
|
import "@lottiefiles/react-lottie-player";
|
|
14
14
|
import "./useStreamLayerApp.js";
|
|
15
15
|
import "@streamlayer/sdk-web";
|
|
16
|
-
const Ye = /* @__PURE__ */
|
|
16
|
+
const Ye = /* @__PURE__ */ r("div")({
|
|
17
17
|
name: "Container",
|
|
18
18
|
class: "c1vwopgc",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}), We = /* @__PURE__ */
|
|
20
|
+
}), We = /* @__PURE__ */ r("div")({
|
|
21
21
|
name: "QuestionTypeWrap",
|
|
22
22
|
class: "qyktpt0",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}), Ve = () => O, Fe = /* @__PURE__ */
|
|
24
|
+
}), Ve = () => O, Fe = /* @__PURE__ */ r(Ve())({
|
|
25
25
|
name: "QuestionTypeIcon",
|
|
26
26
|
class: "q951jdx",
|
|
27
27
|
propsAsIs: !0
|
|
28
|
-
}), Be = /* @__PURE__ */
|
|
28
|
+
}), Be = /* @__PURE__ */ r("span")({
|
|
29
29
|
name: "QuestionTypeTitle",
|
|
30
30
|
class: "qss5f0e",
|
|
31
31
|
propsAsIs: !1
|
|
32
|
-
}), He = /* @__PURE__ */
|
|
32
|
+
}), He = /* @__PURE__ */ r("button")({
|
|
33
33
|
name: "CloseButton",
|
|
34
34
|
class: "c1ao1jtv",
|
|
35
35
|
propsAsIs: !1
|
|
36
|
-
}), Ze = () => O, Ge = /* @__PURE__ */
|
|
36
|
+
}), Ze = () => O, Ge = /* @__PURE__ */ r(Ze())({
|
|
37
37
|
name: "CloseIcon",
|
|
38
38
|
class: "cvsl7l3",
|
|
39
39
|
propsAsIs: !0
|
|
40
40
|
}), Ae = ({ type: e, close: t, label: n }) => {
|
|
41
41
|
const i = e ? Ne[e] : { label: n, iconName: void 0 };
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ m(Ye, { children: [
|
|
43
|
+
/* @__PURE__ */ m(We, { children: [
|
|
44
44
|
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
|
|
45
45
|
Fe,
|
|
46
46
|
{
|
|
@@ -60,101 +60,101 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
60
60
|
}), Ke = (e) => e.toLocaleTimeString("en-US", {
|
|
61
61
|
hour: "2-digit",
|
|
62
62
|
minute: "2-digit"
|
|
63
|
-
}), Xe = (e) => !isNaN(e.getTime()), et = /* @__PURE__ */
|
|
63
|
+
}), Xe = (e) => !isNaN(e.getTime()), et = /* @__PURE__ */ r("div")({
|
|
64
64
|
name: "Container",
|
|
65
65
|
class: "c1zy8a",
|
|
66
66
|
propsAsIs: !1
|
|
67
|
-
}), tt = /* @__PURE__ */
|
|
67
|
+
}), tt = /* @__PURE__ */ r("div")({
|
|
68
68
|
name: "Title",
|
|
69
69
|
class: "t1vih9p5",
|
|
70
70
|
propsAsIs: !1
|
|
71
|
-
}), nt = /* @__PURE__ */
|
|
71
|
+
}), nt = /* @__PURE__ */ r("div")({
|
|
72
72
|
name: "Indicator",
|
|
73
73
|
class: "i1fbnvpb",
|
|
74
74
|
propsAsIs: !1
|
|
75
|
-
}),
|
|
75
|
+
}), re = ({ indicator: e, title: t }) => /* @__PURE__ */ m(et, { children: [
|
|
76
76
|
/* @__PURE__ */ s(tt, { children: t }),
|
|
77
77
|
/* @__PURE__ */ s(nt, { children: e })
|
|
78
|
-
] }), st = /* @__PURE__ */
|
|
78
|
+
] }), st = /* @__PURE__ */ r("div")({
|
|
79
79
|
name: "Container",
|
|
80
80
|
class: "ctmhwyc",
|
|
81
81
|
propsAsIs: !1
|
|
82
|
-
}), it = /* @__PURE__ */
|
|
82
|
+
}), it = /* @__PURE__ */ r("div")({
|
|
83
83
|
name: "Indicator",
|
|
84
84
|
class: "i1jri200",
|
|
85
85
|
propsAsIs: !1
|
|
86
|
-
}),
|
|
86
|
+
}), ot = /* @__PURE__ */ r("div")({
|
|
87
87
|
name: "Title",
|
|
88
88
|
class: "t8s05oq",
|
|
89
89
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
90
|
+
}), P = ({ indicator: e, title: t }) => /* @__PURE__ */ m(st, { children: [
|
|
91
91
|
/* @__PURE__ */ s(it, { children: e }),
|
|
92
|
-
/* @__PURE__ */ s(
|
|
93
|
-
] }),
|
|
92
|
+
/* @__PURE__ */ s(ot, { children: t })
|
|
93
|
+
] }), rt = /* @__PURE__ */ r("div")({
|
|
94
94
|
name: "Container",
|
|
95
95
|
class: "c1yrpn9o",
|
|
96
96
|
propsAsIs: !1
|
|
97
|
-
}), at = /* @__PURE__ */
|
|
97
|
+
}), at = /* @__PURE__ */ r("div")({
|
|
98
98
|
name: "TopInfo",
|
|
99
99
|
class: "t17fwahh",
|
|
100
100
|
propsAsIs: !1
|
|
101
|
-
}), lt = /* @__PURE__ */
|
|
101
|
+
}), lt = /* @__PURE__ */ r("div")({
|
|
102
102
|
name: "BottomInfo",
|
|
103
103
|
class: "by6w7e9",
|
|
104
104
|
propsAsIs: !1
|
|
105
|
-
}), ct = /* @__PURE__ */
|
|
105
|
+
}), ct = /* @__PURE__ */ r("div")({
|
|
106
106
|
name: "User",
|
|
107
107
|
class: "u1g7arbm",
|
|
108
108
|
propsAsIs: !1
|
|
109
|
-
}), dt = /* @__PURE__ */
|
|
109
|
+
}), dt = /* @__PURE__ */ r("img")({
|
|
110
110
|
name: "Avatar",
|
|
111
111
|
class: "a1ldeata",
|
|
112
112
|
propsAsIs: !1
|
|
113
|
-
}), ut = /* @__PURE__ */
|
|
113
|
+
}), ut = /* @__PURE__ */ r("div")({
|
|
114
114
|
name: "UserInfo",
|
|
115
115
|
class: "u10d4koz",
|
|
116
116
|
propsAsIs: !1
|
|
117
|
-
}), pt = /* @__PURE__ */
|
|
117
|
+
}), pt = /* @__PURE__ */ r("div")({
|
|
118
118
|
name: "UserName",
|
|
119
119
|
class: "u1q6roj0",
|
|
120
120
|
propsAsIs: !1
|
|
121
|
-
}), mt = /* @__PURE__ */
|
|
121
|
+
}), mt = /* @__PURE__ */ r("div")({
|
|
122
122
|
name: "UserRating",
|
|
123
123
|
class: "ui0m425",
|
|
124
124
|
propsAsIs: !1
|
|
125
|
-
}), It = /* @__PURE__ */
|
|
125
|
+
}), It = /* @__PURE__ */ r("img")({
|
|
126
126
|
name: "TrophyIcon",
|
|
127
127
|
class: "t1el3mrn",
|
|
128
128
|
propsAsIs: !1
|
|
129
|
-
}), ht = /* @__PURE__ */
|
|
129
|
+
}), ht = /* @__PURE__ */ r("div")({
|
|
130
130
|
name: "Rts",
|
|
131
131
|
class: "r2vgnxv",
|
|
132
132
|
propsAsIs: !1
|
|
133
|
-
}), gt = /* @__PURE__ */
|
|
133
|
+
}), gt = /* @__PURE__ */ r("div")({
|
|
134
134
|
name: "RtsIndicator",
|
|
135
135
|
class: "roqn06j",
|
|
136
136
|
propsAsIs: !1
|
|
137
|
-
}), ft = /* @__PURE__ */
|
|
137
|
+
}), ft = /* @__PURE__ */ r("div")({
|
|
138
138
|
name: "RtsLabel",
|
|
139
139
|
class: "r15adx7c",
|
|
140
140
|
propsAsIs: !1
|
|
141
|
-
}), Mt = /* @__PURE__ */
|
|
141
|
+
}), Mt = /* @__PURE__ */ r("div")({
|
|
142
142
|
name: "Divider",
|
|
143
143
|
class: "dv59lta",
|
|
144
144
|
propsAsIs: !1
|
|
145
|
-
}), vt = /* @__PURE__ */
|
|
145
|
+
}), vt = /* @__PURE__ */ r("div")({
|
|
146
146
|
name: "Ranks",
|
|
147
147
|
class: "r55lotb",
|
|
148
148
|
propsAsIs: !1
|
|
149
|
-
}), Nt = /* @__PURE__ */
|
|
149
|
+
}), Nt = /* @__PURE__ */ r("div")({
|
|
150
150
|
name: "Statistics",
|
|
151
151
|
class: "s1knfgqt",
|
|
152
152
|
propsAsIs: !1
|
|
153
|
-
}), yt = /* @__PURE__ */
|
|
153
|
+
}), yt = /* @__PURE__ */ r("div")({
|
|
154
154
|
name: "AvatarPlaceholder",
|
|
155
155
|
class: "a1mqo824",
|
|
156
156
|
propsAsIs: !1
|
|
157
|
-
}), At = /* @__PURE__ */
|
|
157
|
+
}), At = /* @__PURE__ */ r("button")({
|
|
158
158
|
name: "UserAccountBtn",
|
|
159
159
|
class: "uxareh6",
|
|
160
160
|
propsAsIs: !1
|
|
@@ -163,90 +163,90 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
163
163
|
name: t,
|
|
164
164
|
points: n,
|
|
165
165
|
friendsRank: i,
|
|
166
|
-
rank:
|
|
167
|
-
streak:
|
|
168
|
-
correct:
|
|
166
|
+
rank: o,
|
|
167
|
+
streak: u,
|
|
168
|
+
correct: p,
|
|
169
169
|
incorrect: I,
|
|
170
|
-
inTop:
|
|
170
|
+
inTop: c,
|
|
171
171
|
successRate: h
|
|
172
|
-
}) => /* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */ s(at, { children: /* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
172
|
+
}) => /* @__PURE__ */ m(rt, { children: [
|
|
173
|
+
/* @__PURE__ */ s(at, { children: /* @__PURE__ */ m(ct, { children: [
|
|
174
|
+
/* @__PURE__ */ m(At, { children: [
|
|
175
175
|
e && /* @__PURE__ */ s(dt, { alt: "avatar", src: e }),
|
|
176
176
|
!e && /* @__PURE__ */ s(yt, { children: Te(t || "") })
|
|
177
177
|
] }),
|
|
178
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ m(ut, { children: [
|
|
179
179
|
/* @__PURE__ */ s(pt, { children: t }),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ m(mt, { children: [
|
|
181
|
+
/* @__PURE__ */ m(ht, { children: [
|
|
182
182
|
/* @__PURE__ */ s(It, { alt: "rank-icon", src: Tt }),
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ m(gt, { children: [
|
|
184
184
|
De(n),
|
|
185
185
|
/* @__PURE__ */ s(ft, { children: "PTS" })
|
|
186
186
|
] })
|
|
187
187
|
] }),
|
|
188
188
|
/* @__PURE__ */ s(Mt, {}),
|
|
189
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ m("div", { children: [
|
|
190
190
|
"TOP ",
|
|
191
|
-
|
|
191
|
+
c || 0,
|
|
192
192
|
"%"
|
|
193
193
|
] })
|
|
194
194
|
] })
|
|
195
195
|
] })
|
|
196
196
|
] }) }),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */ s(
|
|
200
|
-
/* @__PURE__ */ s(
|
|
197
|
+
/* @__PURE__ */ m(lt, { children: [
|
|
198
|
+
/* @__PURE__ */ m(vt, { children: [
|
|
199
|
+
/* @__PURE__ */ s(re, { indicator: i || 0, title: "Friends rank" }),
|
|
200
|
+
/* @__PURE__ */ s(re, { indicator: o || 0, title: "Global rank" })
|
|
201
201
|
] }),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */ s(
|
|
204
|
-
/* @__PURE__ */ s(
|
|
205
|
-
/* @__PURE__ */ s(
|
|
206
|
-
/* @__PURE__ */ s(
|
|
202
|
+
/* @__PURE__ */ m(Nt, { children: [
|
|
203
|
+
/* @__PURE__ */ s(P, { indicator: u || 0, title: "Win streak" }),
|
|
204
|
+
/* @__PURE__ */ s(P, { indicator: p || 0, title: "Correct" }),
|
|
205
|
+
/* @__PURE__ */ s(P, { indicator: I || 0, title: "Incorrect" }),
|
|
206
|
+
/* @__PURE__ */ s(P, { indicator: `${h || 0}%`, title: "Succ. rate" })
|
|
207
207
|
] })
|
|
208
208
|
] })
|
|
209
|
-
] }), Dt = /* @__PURE__ */
|
|
209
|
+
] }), Dt = /* @__PURE__ */ r("div")({
|
|
210
210
|
name: "Container",
|
|
211
211
|
class: "c38csyt",
|
|
212
212
|
propsAsIs: !1
|
|
213
|
-
}), St = /* @__PURE__ */
|
|
213
|
+
}), St = /* @__PURE__ */ r("div")({
|
|
214
214
|
name: "Title",
|
|
215
215
|
class: "ty221rx",
|
|
216
216
|
propsAsIs: !1
|
|
217
|
-
}), zt = /* @__PURE__ */
|
|
217
|
+
}), zt = /* @__PURE__ */ r("div")({
|
|
218
218
|
name: "Description",
|
|
219
219
|
class: "dlaj9xp",
|
|
220
220
|
propsAsIs: !1
|
|
221
|
-
}), xt = ({ title: e, description: t }) => /* @__PURE__ */
|
|
221
|
+
}), xt = ({ title: e, description: t }) => /* @__PURE__ */ m(Dt, { children: [
|
|
222
222
|
/* @__PURE__ */ s(O, { name: "icon-check-circle" }),
|
|
223
223
|
/* @__PURE__ */ s(St, { children: e }),
|
|
224
224
|
/* @__PURE__ */ s(zt, { children: t })
|
|
225
|
-
] }), Ot = /* @__PURE__ */
|
|
225
|
+
] }), Ot = /* @__PURE__ */ r("div")({
|
|
226
226
|
name: "Container",
|
|
227
227
|
class: "c16sbdnm",
|
|
228
228
|
propsAsIs: !1
|
|
229
|
-
}), jt = () => O, Ct = /* @__PURE__ */
|
|
229
|
+
}), jt = () => O, Ct = /* @__PURE__ */ r(jt())({
|
|
230
230
|
name: "IconPrediction",
|
|
231
231
|
class: "ibhorgl",
|
|
232
232
|
propsAsIs: !0
|
|
233
|
-
}), ae = /* @__PURE__ */
|
|
233
|
+
}), ae = /* @__PURE__ */ r("div")({
|
|
234
234
|
name: "FeedbackIconWrap",
|
|
235
235
|
class: "f1g20ja7",
|
|
236
236
|
propsAsIs: !1
|
|
237
|
-
}), le = /* @__PURE__ */
|
|
237
|
+
}), le = /* @__PURE__ */ r("div")({
|
|
238
238
|
name: "FeedbackHeader",
|
|
239
239
|
class: "f455ozj",
|
|
240
240
|
propsAsIs: !1
|
|
241
|
-
}), kt = /* @__PURE__ */
|
|
241
|
+
}), kt = /* @__PURE__ */ r("span")({
|
|
242
242
|
name: "FeedbackTitle",
|
|
243
243
|
class: "f1913njx",
|
|
244
244
|
propsAsIs: !1
|
|
245
|
-
}), Z = /* @__PURE__ */
|
|
245
|
+
}), Z = /* @__PURE__ */ r("span")({
|
|
246
246
|
name: "FeedbackDescription",
|
|
247
247
|
class: "fzfk69z",
|
|
248
248
|
propsAsIs: !1
|
|
249
|
-
}), wt = /* @__PURE__ */
|
|
249
|
+
}), wt = /* @__PURE__ */ r("div")({
|
|
250
250
|
name: "FeedbackText",
|
|
251
251
|
class: "fx87qaj",
|
|
252
252
|
propsAsIs: !1
|
|
@@ -255,94 +255,94 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
255
255
|
questionVotedCorrectly: t,
|
|
256
256
|
questionVoted: n,
|
|
257
257
|
questionType: i,
|
|
258
|
-
hasCorrectAnswer:
|
|
259
|
-
questionStatus:
|
|
258
|
+
hasCorrectAnswer: o,
|
|
259
|
+
questionStatus: u
|
|
260
260
|
}) => {
|
|
261
|
-
const
|
|
262
|
-
if (!
|
|
261
|
+
const p = n && (i === z.TRIVIA || i === z.PREDICTION);
|
|
262
|
+
if (!p && u !== R.RESOLVED)
|
|
263
263
|
return null;
|
|
264
|
-
const I = i === z.PREDICTION && !
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
|
|
264
|
+
const I = i === z.PREDICTION && !o, c = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
|
|
265
|
+
return /* @__PURE__ */ m(Ot, { "data-isPrediction": I, children: [
|
|
266
|
+
u === R.RESOLVED && i === z.TRIVIA && !n && /* @__PURE__ */ m(b, { children: [
|
|
267
267
|
/* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(O, { name: "questionExpired" }) }),
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ m("div", { children: [
|
|
269
269
|
/* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
|
|
270
270
|
/* @__PURE__ */ s(wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
271
271
|
] })
|
|
272
272
|
] }),
|
|
273
|
-
|
|
273
|
+
p && I && /* @__PURE__ */ m(b, { children: [
|
|
274
274
|
/* @__PURE__ */ s(Ct, { name: "icon-prediction" }),
|
|
275
275
|
/* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
|
|
276
276
|
] }),
|
|
277
|
-
|
|
278
|
-
/* @__PURE__ */ s(ae, { "data-feedbackType":
|
|
279
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */ s(kt, { "data-feedbackType":
|
|
277
|
+
p && o && /* @__PURE__ */ m(b, { children: [
|
|
278
|
+
/* @__PURE__ */ s(ae, { "data-feedbackType": c, children: /* @__PURE__ */ s(O, { name: c }) }),
|
|
279
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ m(le, { children: [
|
|
280
|
+
/* @__PURE__ */ s(kt, { "data-feedbackType": c, children: h == null ? void 0 : h.title }),
|
|
281
281
|
/* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
|
|
282
282
|
] }) })
|
|
283
283
|
] })
|
|
284
284
|
] });
|
|
285
|
-
},
|
|
285
|
+
}, Lt = /* @__PURE__ */ r("div")({
|
|
286
286
|
name: "Container",
|
|
287
287
|
class: "c14ielyq",
|
|
288
288
|
propsAsIs: !1
|
|
289
|
-
}),
|
|
289
|
+
}), Et = /* @__PURE__ */ r("div")({
|
|
290
290
|
name: "Content",
|
|
291
291
|
class: "c1tlqx57",
|
|
292
292
|
propsAsIs: !1
|
|
293
|
-
}), $t = /* @__PURE__ */
|
|
293
|
+
}), $t = /* @__PURE__ */ r("div")({
|
|
294
294
|
name: "Title",
|
|
295
295
|
class: "t1hq58md",
|
|
296
296
|
propsAsIs: !1
|
|
297
|
-
}), Rt = /* @__PURE__ */
|
|
297
|
+
}), Rt = /* @__PURE__ */ r("div")({
|
|
298
298
|
name: "Options",
|
|
299
299
|
class: "o1c8nxcx",
|
|
300
300
|
propsAsIs: !1
|
|
301
|
-
}), Qt = /* @__PURE__ */
|
|
301
|
+
}), Qt = /* @__PURE__ */ r("button")({
|
|
302
302
|
name: "ButtonContainer",
|
|
303
303
|
class: "b1b6dl8t",
|
|
304
304
|
propsAsIs: !1
|
|
305
|
-
}), Ut = /* @__PURE__ */
|
|
305
|
+
}), Ut = /* @__PURE__ */ r("div")({
|
|
306
306
|
name: "ButtonPct",
|
|
307
307
|
class: "b4iik8i",
|
|
308
308
|
propsAsIs: !1
|
|
309
|
-
}), _t = /* @__PURE__ */
|
|
309
|
+
}), _t = /* @__PURE__ */ r("span")({
|
|
310
310
|
name: "ButtonBody",
|
|
311
311
|
class: "b1gq1lnf",
|
|
312
312
|
propsAsIs: !1
|
|
313
|
-
}), Pt = /* @__PURE__ */
|
|
313
|
+
}), Pt = /* @__PURE__ */ r("div")({
|
|
314
314
|
name: "IconContainer",
|
|
315
315
|
class: "i1j65z51",
|
|
316
316
|
propsAsIs: !1
|
|
317
|
-
}), qt = /* @__PURE__ */
|
|
317
|
+
}), qt = /* @__PURE__ */ r("div")({
|
|
318
318
|
name: "IconWrap",
|
|
319
319
|
class: "i19tpfua",
|
|
320
320
|
propsAsIs: !1
|
|
321
|
-
}), ze = /* @__PURE__ */
|
|
321
|
+
}), ze = /* @__PURE__ */ r("img")({
|
|
322
322
|
name: "Icon",
|
|
323
323
|
class: "i1tubmma",
|
|
324
324
|
propsAsIs: !1
|
|
325
|
-
}), Yt = () => ze, Wt = /* @__PURE__ */
|
|
325
|
+
}), Yt = () => ze, Wt = /* @__PURE__ */ r(Yt())({
|
|
326
326
|
name: "IconDefault",
|
|
327
327
|
class: "i1grrgwj",
|
|
328
328
|
propsAsIs: !0
|
|
329
|
-
}), Vt = () => ze, Ft = /* @__PURE__ */
|
|
329
|
+
}), Vt = () => ze, Ft = /* @__PURE__ */ r(Vt())({
|
|
330
330
|
name: "IconCircle",
|
|
331
331
|
class: "ibemyq8",
|
|
332
332
|
propsAsIs: !0
|
|
333
|
-
}), Bt = /* @__PURE__ */
|
|
333
|
+
}), Bt = /* @__PURE__ */ r("span")({
|
|
334
334
|
name: "Title",
|
|
335
335
|
class: "t1dceht",
|
|
336
336
|
propsAsIs: !1
|
|
337
|
-
}), Ht = /* @__PURE__ */
|
|
337
|
+
}), Ht = /* @__PURE__ */ r("span")({
|
|
338
338
|
name: "Indicators",
|
|
339
339
|
class: "i116q4vq",
|
|
340
340
|
propsAsIs: !1
|
|
341
|
-
}), Zt = /* @__PURE__ */
|
|
341
|
+
}), Zt = /* @__PURE__ */ r("span")({
|
|
342
342
|
name: "Percentage",
|
|
343
343
|
class: "p17ajcu2",
|
|
344
344
|
propsAsIs: !1
|
|
345
|
-
}), Gt = () => O, Jt = /* @__PURE__ */
|
|
345
|
+
}), Gt = () => O, Jt = /* @__PURE__ */ r(Gt())({
|
|
346
346
|
name: "CheckIcon",
|
|
347
347
|
class: "cu9kmlb",
|
|
348
348
|
propsAsIs: !0
|
|
@@ -352,34 +352,34 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
352
352
|
[$.ROUNDED]: (e) => /* @__PURE__ */ s(Ft, { alt: "option-icon", src: e }),
|
|
353
353
|
[$.NONE]: () => null,
|
|
354
354
|
[$.UNSET]: () => null
|
|
355
|
-
}, Kt = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted:
|
|
355
|
+
}, Kt = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: o }) => {
|
|
356
356
|
if (e === z.POLL && i)
|
|
357
357
|
return "correct";
|
|
358
358
|
if (e === z.PREDICTION) {
|
|
359
|
-
if (t &&
|
|
360
|
-
return i ? n ? "correct" : "incorrect" :
|
|
359
|
+
if (t && o)
|
|
360
|
+
return i ? n ? "correct" : "incorrect" : "unset";
|
|
361
361
|
if (i)
|
|
362
362
|
return "correct";
|
|
363
363
|
}
|
|
364
|
-
return e === z.TRIVIA &&
|
|
364
|
+
return e === z.TRIVIA && o && i ? n ? "correct" : "incorrect" : "unset";
|
|
365
365
|
}, Xt = ({
|
|
366
366
|
questionType: e,
|
|
367
367
|
questionVoted: t,
|
|
368
368
|
correct: n,
|
|
369
369
|
hasCorrectAnswer: i,
|
|
370
|
-
questionStatus:
|
|
371
|
-
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i ||
|
|
370
|
+
questionStatus: o
|
|
371
|
+
}) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || o === R.RESOLVED && n : !1, en = (e) => {
|
|
372
372
|
var t;
|
|
373
373
|
const {
|
|
374
374
|
// option props
|
|
375
375
|
id: n,
|
|
376
376
|
icon: i,
|
|
377
|
-
text:
|
|
378
|
-
percentageDecimal:
|
|
377
|
+
text: o,
|
|
378
|
+
percentageDecimal: u,
|
|
379
379
|
// extra props
|
|
380
|
-
onVote:
|
|
380
|
+
onVote: p,
|
|
381
381
|
youSelected: I,
|
|
382
|
-
questionVoted:
|
|
382
|
+
questionVoted: c,
|
|
383
383
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
384
384
|
imageMode: h,
|
|
385
385
|
answerTimeExpired: y,
|
|
@@ -388,46 +388,47 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
388
388
|
questionType: A,
|
|
389
389
|
correct: T,
|
|
390
390
|
hasCorrectAnswer: a
|
|
391
|
-
} = e, l = Kt(e), d = Xt({ questionType: A, questionVoted:
|
|
392
|
-
return /* @__PURE__ */
|
|
391
|
+
} = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: c, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = c || D === R.RESOLVED && A === z.PREDICTION;
|
|
392
|
+
return /* @__PURE__ */ m(
|
|
393
393
|
Qt,
|
|
394
394
|
{
|
|
395
395
|
value: n,
|
|
396
396
|
"data-selected": I,
|
|
397
397
|
"data-answerState": l,
|
|
398
|
-
disabled:
|
|
399
|
-
|
|
398
|
+
disabled: c || N || y,
|
|
399
|
+
"data-isNotChecked": c && !I && l !== "incorrect",
|
|
400
|
+
onClick: p,
|
|
400
401
|
children: [
|
|
401
|
-
|
|
402
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ s(Ut, { "data-answerState": l, style: { width: `${g ? u : 0}%` } }),
|
|
403
|
+
/* @__PURE__ */ m(_t, { children: [
|
|
403
404
|
i && h && ((t = ce[h]) == null ? void 0 : t.call(ce, i)),
|
|
404
|
-
/* @__PURE__ */ s(Bt, { children:
|
|
405
|
-
g && /* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ s(Bt, { children: o }),
|
|
406
|
+
g && /* @__PURE__ */ m(Ht, { children: [
|
|
406
407
|
d && /* @__PURE__ */ s(Jt, { name: "selected" }),
|
|
407
|
-
/* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(Pe, { value:
|
|
408
|
+
/* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(Pe, { value: u, suffix: "%" }) })
|
|
408
409
|
] })
|
|
409
410
|
] })
|
|
410
411
|
]
|
|
411
412
|
}
|
|
412
413
|
);
|
|
413
|
-
}, tn = [
|
|
414
|
+
}, tn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1], nn = [10, 10, 0], sn = /* @__PURE__ */ r("div")({
|
|
414
415
|
name: "RemainingTime",
|
|
415
416
|
class: "r165427",
|
|
416
417
|
propsAsIs: !1
|
|
417
|
-
}),
|
|
418
|
+
}), on = L.SECONDARY_GREEN6, de = L.SECONDARY_RED3, rn = L.NEUTRALS_GRAY3, an = ({
|
|
418
419
|
isPlaying: e = !0,
|
|
419
420
|
duration: t = 30,
|
|
420
421
|
onTimerExpired: n
|
|
421
422
|
}) => {
|
|
422
|
-
const [i,
|
|
423
|
-
remainingTime:
|
|
423
|
+
const [i, o] = V(t > 10 ? on : de), u = ({
|
|
424
|
+
remainingTime: c
|
|
424
425
|
}) => /* @__PURE__ */ s(sn, {
|
|
425
|
-
children:
|
|
426
|
-
}),
|
|
427
|
-
n == null || n(),
|
|
428
|
-
}, [n,
|
|
429
|
-
|
|
430
|
-
}, [
|
|
426
|
+
children: c
|
|
427
|
+
}), p = F(() => {
|
|
428
|
+
n == null || n(), o(rn);
|
|
429
|
+
}, [n, o]), I = F((c) => {
|
|
430
|
+
c === 10 && o(de);
|
|
431
|
+
}, [o]);
|
|
431
432
|
return /* @__PURE__ */ s(qe, {
|
|
432
433
|
isPlaying: e,
|
|
433
434
|
duration: t,
|
|
@@ -437,35 +438,35 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
437
438
|
strokeWidth: 2,
|
|
438
439
|
trailStrokeWidth: 2,
|
|
439
440
|
trailColor: i,
|
|
440
|
-
onComplete:
|
|
441
|
+
onComplete: p,
|
|
441
442
|
onUpdate: I,
|
|
442
|
-
children:
|
|
443
|
+
children: u
|
|
443
444
|
});
|
|
444
|
-
}, ln = /* @__PURE__ */
|
|
445
|
+
}, ln = /* @__PURE__ */ r("div")({
|
|
445
446
|
name: "WinBarContainer",
|
|
446
447
|
class: "wie6cqo",
|
|
447
448
|
propsAsIs: !1
|
|
448
|
-
}), cn = /* @__PURE__ */
|
|
449
|
+
}), cn = /* @__PURE__ */ r("div")({
|
|
449
450
|
name: "Content",
|
|
450
451
|
class: "cgizw4u",
|
|
451
452
|
propsAsIs: !1
|
|
452
|
-
}), dn = /* @__PURE__ */
|
|
453
|
+
}), dn = /* @__PURE__ */ r("div")({
|
|
453
454
|
name: "Title",
|
|
454
455
|
class: "t1l3ucjp",
|
|
455
456
|
propsAsIs: !1
|
|
456
|
-
}), un = () => O, pn = /* @__PURE__ */
|
|
457
|
+
}), un = () => O, pn = /* @__PURE__ */ r(un())({
|
|
457
458
|
name: "WinIcon",
|
|
458
459
|
class: "wx7j799",
|
|
459
460
|
propsAsIs: !0
|
|
460
|
-
}), mn = /* @__PURE__ */
|
|
461
|
+
}), mn = /* @__PURE__ */ r("div")({
|
|
461
462
|
name: "Points",
|
|
462
463
|
class: "p4lwuj0",
|
|
463
464
|
propsAsIs: !1
|
|
464
|
-
}), In = /* @__PURE__ */
|
|
465
|
+
}), In = /* @__PURE__ */ r("span")({
|
|
465
466
|
name: "PointsCount",
|
|
466
467
|
class: "po9i64o",
|
|
467
468
|
propsAsIs: !1
|
|
468
|
-
}), hn = /* @__PURE__ */
|
|
469
|
+
}), hn = /* @__PURE__ */ r("span")({
|
|
469
470
|
name: "PointsUnits",
|
|
470
471
|
class: "pe5g05h",
|
|
471
472
|
propsAsIs: !1
|
|
@@ -474,63 +475,63 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
474
475
|
points: t,
|
|
475
476
|
isPlayingTimer: n,
|
|
476
477
|
isTimer: i,
|
|
477
|
-
questionType:
|
|
478
|
-
timerDuration:
|
|
479
|
-
onTimerExpired:
|
|
480
|
-
}) => /* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
478
|
+
questionType: o,
|
|
479
|
+
timerDuration: u,
|
|
480
|
+
onTimerExpired: p
|
|
481
|
+
}) => /* @__PURE__ */ m(ln, { children: [
|
|
482
|
+
/* @__PURE__ */ m(cn, { children: [
|
|
482
483
|
e && /* @__PURE__ */ s(dn, { children: e }),
|
|
483
|
-
t !== void 0 &&
|
|
484
|
+
t !== void 0 && o !== z.POLL && /* @__PURE__ */ m(b, { children: [
|
|
484
485
|
/* @__PURE__ */ s(pn, { name: "icon-trophy" }),
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ m(mn, { children: [
|
|
486
487
|
/* @__PURE__ */ s(In, { children: t }),
|
|
487
488
|
/* @__PURE__ */ s(hn, { children: "PTS" })
|
|
488
489
|
] })
|
|
489
490
|
] })
|
|
490
491
|
] }),
|
|
491
|
-
i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired:
|
|
492
|
-
] }), fn = ({ openedQuestion: e,
|
|
493
|
-
var
|
|
494
|
-
const
|
|
492
|
+
i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired: p, duration: u })
|
|
493
|
+
] }), fn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
|
|
494
|
+
var o, u;
|
|
495
|
+
const p = e.subject, I = e.type, c = (o = e.options) == null ? void 0 : o.options, [h, y] = V(!1), [D, N] = V(""), A = e == null ? void 0 : e.id, T = F(
|
|
495
496
|
async (v) => {
|
|
496
497
|
if (A) {
|
|
497
498
|
const f = v.currentTarget.value;
|
|
498
|
-
N(f),
|
|
499
|
+
N(f), await n(A, f);
|
|
499
500
|
}
|
|
500
501
|
},
|
|
501
|
-
[A, N,
|
|
502
|
+
[A, N, n]
|
|
502
503
|
), a = F(() => {
|
|
503
|
-
|
|
504
|
-
}, [
|
|
504
|
+
y(!0), setTimeout(i, 3e3);
|
|
505
|
+
}, [i]), l = Y(
|
|
505
506
|
() => e == null ? void 0 : e.answers.find((v) => v.youVoted === !0),
|
|
506
507
|
[e]
|
|
507
|
-
), d =
|
|
508
|
+
), d = Y(
|
|
508
509
|
() => !!(e != null && e.answers.find((v) => v.correct === !0)),
|
|
509
510
|
[e]
|
|
510
|
-
), g =
|
|
511
|
+
), g = Y(() => e ? e.answers.map((v) => {
|
|
511
512
|
var f;
|
|
512
513
|
return {
|
|
513
514
|
...v,
|
|
514
515
|
questionVoted: !!l,
|
|
515
516
|
youSelected: D === v.id,
|
|
516
|
-
isLoading:
|
|
517
|
+
isLoading: t,
|
|
517
518
|
hasCorrectAnswer: d,
|
|
518
519
|
questionType: e.type,
|
|
519
|
-
answerTimeExpired:
|
|
520
|
+
answerTimeExpired: h,
|
|
520
521
|
questionStatus: e.status,
|
|
521
522
|
imageMode: (f = e.appearance) == null ? void 0 : f.images,
|
|
522
523
|
// ToDo: Figure out why imageMode is not in the response
|
|
523
524
|
onVote: T
|
|
524
525
|
};
|
|
525
|
-
}) : [], [d,
|
|
526
|
-
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(
|
|
526
|
+
}) : [], [d, h, t, e, l, T, D]), M = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0;
|
|
527
|
+
return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Lt, { children: /* @__PURE__ */ m(Et, { children: [
|
|
527
528
|
M && /* @__PURE__ */ s(
|
|
528
529
|
bt,
|
|
529
530
|
{
|
|
530
531
|
feedbackMessages: M,
|
|
531
532
|
questionVoted: !!l,
|
|
532
533
|
questionVotedCorrectly: l == null ? void 0 : l.correct,
|
|
533
|
-
questionType:
|
|
534
|
+
questionType: I,
|
|
534
535
|
hasCorrectAnswer: d,
|
|
535
536
|
questionStatus: e.status
|
|
536
537
|
}
|
|
@@ -538,90 +539,90 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
538
539
|
e.type !== z.PREDICTION && /* @__PURE__ */ s(
|
|
539
540
|
gn,
|
|
540
541
|
{
|
|
541
|
-
title:
|
|
542
|
-
points:
|
|
542
|
+
title: h ? "Time expired" : e.type === z.POLL ? "Time remaining" : "To win",
|
|
543
|
+
points: h ? void 0 : 100,
|
|
543
544
|
onTimerExpired: a,
|
|
544
545
|
questionType: e.type,
|
|
545
|
-
isTimer: !
|
|
546
|
+
isTimer: !t,
|
|
546
547
|
isPlayingTimer: !l,
|
|
547
|
-
timerDuration: l ? 0 : 30
|
|
548
|
+
timerDuration: l ? 0 : Number(((u = e == null ? void 0 : e.appearance) == null ? void 0 : u.autoHideInterval) || "30")
|
|
548
549
|
}
|
|
549
550
|
),
|
|
550
|
-
|
|
551
|
+
h ? /* @__PURE__ */ s(
|
|
551
552
|
xt,
|
|
552
553
|
{
|
|
553
554
|
title: "More to come...",
|
|
554
555
|
description: "Watch for additional enhanced stream interactive experience."
|
|
555
556
|
}
|
|
556
|
-
) : /* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */ s($t, { "data-isPrediction": e.type === z.PREDICTION, children:
|
|
557
|
+
) : /* @__PURE__ */ m(b, { children: [
|
|
558
|
+
/* @__PURE__ */ s($t, { "data-isPrediction": e.type === z.PREDICTION, children: p }),
|
|
558
559
|
/* @__PURE__ */ s(Rt, { children: g.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
|
|
559
560
|
] })
|
|
560
561
|
] }) }) });
|
|
561
|
-
}, Mn = /* @__PURE__ */
|
|
562
|
+
}, Mn = /* @__PURE__ */ r("div")({
|
|
562
563
|
name: "Container",
|
|
563
564
|
class: "cgn5uen",
|
|
564
565
|
propsAsIs: !1
|
|
565
|
-
}), vn = /* @__PURE__ */
|
|
566
|
+
}), vn = /* @__PURE__ */ r("div")({
|
|
566
567
|
name: "Content",
|
|
567
568
|
class: "c1px8nt6",
|
|
568
569
|
propsAsIs: !1
|
|
569
|
-
}), Nn = /* @__PURE__ */
|
|
570
|
+
}), Nn = /* @__PURE__ */ r("h3")({
|
|
570
571
|
name: "Title",
|
|
571
572
|
class: "t5et2jt",
|
|
572
573
|
propsAsIs: !1
|
|
573
|
-
}), yn = /* @__PURE__ */
|
|
574
|
+
}), yn = /* @__PURE__ */ r("div")({
|
|
574
575
|
name: "Description",
|
|
575
576
|
class: "d1i2kpk2",
|
|
576
577
|
propsAsIs: !1
|
|
577
|
-
}), An = /* @__PURE__ */
|
|
578
|
+
}), An = /* @__PURE__ */ r("div")({
|
|
578
579
|
name: "DateWrap",
|
|
579
580
|
class: "dd3lh3p",
|
|
580
581
|
propsAsIs: !1
|
|
581
|
-
}), Tn = /* @__PURE__ */
|
|
582
|
+
}), Tn = /* @__PURE__ */ r("img")({
|
|
582
583
|
name: "Image",
|
|
583
584
|
class: "i1gfjeu5",
|
|
584
585
|
propsAsIs: !1
|
|
585
586
|
}), xe = ({ created: e, image: t, title: n, instantView: i }) => {
|
|
586
|
-
const
|
|
587
|
+
const o = Y(() => {
|
|
587
588
|
if (e) {
|
|
588
|
-
const
|
|
589
|
-
if (Xe(
|
|
589
|
+
const p = new Date(e);
|
|
590
|
+
if (Xe(p))
|
|
590
591
|
return {
|
|
591
|
-
date: Je(
|
|
592
|
-
time: Ke(
|
|
592
|
+
date: Je(p),
|
|
593
|
+
time: Ke(p)
|
|
593
594
|
};
|
|
594
595
|
}
|
|
595
596
|
return null;
|
|
596
|
-
}, [e]),
|
|
597
|
-
return /* @__PURE__ */
|
|
598
|
-
|
|
599
|
-
|
|
597
|
+
}, [e]), u = (i == null ? void 0 : i.image) || t;
|
|
598
|
+
return /* @__PURE__ */ m(Mn, { children: [
|
|
599
|
+
o && /* @__PURE__ */ m(An, { children: [
|
|
600
|
+
o.date,
|
|
600
601
|
" · ",
|
|
601
|
-
|
|
602
|
+
o.time
|
|
602
603
|
] }),
|
|
603
604
|
(i == null ? void 0 : i.video) && /* @__PURE__ */ s($e, { source: i.video.url, poster: i.video.thumbnailUrl }),
|
|
604
|
-
|
|
605
|
-
/* @__PURE__ */
|
|
605
|
+
u && /* @__PURE__ */ s(Tn, { src: u }),
|
|
606
|
+
/* @__PURE__ */ m(vn, { children: [
|
|
606
607
|
/* @__PURE__ */ s(Nn, { children: (i == null ? void 0 : i.heading) || n }),
|
|
607
608
|
/* @__PURE__ */ s(yn, { children: i == null ? void 0 : i.body })
|
|
608
609
|
] })
|
|
609
610
|
] });
|
|
610
|
-
}, Dn = /* @__PURE__ */
|
|
611
|
+
}, Dn = /* @__PURE__ */ r("div")({
|
|
611
612
|
name: "Container",
|
|
612
613
|
class: "c1euiow",
|
|
613
614
|
propsAsIs: !1
|
|
614
|
-
}), Sn = /* @__PURE__ */
|
|
615
|
+
}), Sn = /* @__PURE__ */ r("a")({
|
|
615
616
|
name: "WebLinkBtn",
|
|
616
617
|
class: "w19zie3h",
|
|
617
618
|
propsAsIs: !1
|
|
618
|
-
}), zn = ({ instantView: e, ...t }) => /* @__PURE__ */
|
|
619
|
+
}), zn = ({ instantView: e, ...t }) => /* @__PURE__ */ m(Dn, { children: [
|
|
619
620
|
/* @__PURE__ */ s(xe, { instantView: e, ...t }),
|
|
620
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */
|
|
621
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ m(Sn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
621
622
|
"Explore more of the Masters History",
|
|
622
623
|
/* @__PURE__ */ s(O, { name: "icon-external-link" })
|
|
623
624
|
] })
|
|
624
|
-
] }), xn = /* @__PURE__ */
|
|
625
|
+
] }), xn = /* @__PURE__ */ r("div")({
|
|
625
626
|
name: "QuestionContainer",
|
|
626
627
|
class: "qdri6g3",
|
|
627
628
|
propsAsIs: !1
|
|
@@ -640,12 +641,13 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
640
641
|
}) => {
|
|
641
642
|
const {
|
|
642
643
|
loading: i,
|
|
643
|
-
data:
|
|
644
|
+
data: o
|
|
644
645
|
} = e;
|
|
645
|
-
return
|
|
646
|
+
return o ? /* @__PURE__ */ s(fn, {
|
|
646
647
|
vote: t,
|
|
647
648
|
close: n,
|
|
648
|
-
openedQuestion:
|
|
649
|
+
openedQuestion: o,
|
|
650
|
+
isLoading: !!i
|
|
649
651
|
}) : null;
|
|
650
652
|
}, Cn = ({
|
|
651
653
|
gamification: e
|
|
@@ -654,38 +656,38 @@ const Ye = /* @__PURE__ */ o("div")({
|
|
|
654
656
|
const n = k(e.openedQuestion.$store), i = k(e.openedQuestion.$extendedStore);
|
|
655
657
|
if (!n)
|
|
656
658
|
return null;
|
|
657
|
-
const
|
|
658
|
-
return /* @__PURE__ */
|
|
659
|
+
const o = n.type;
|
|
660
|
+
return /* @__PURE__ */ m(xn, {
|
|
659
661
|
children: [/* @__PURE__ */ s(Ae, {
|
|
660
662
|
close: e.closeQuestion,
|
|
661
663
|
type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
|
|
662
|
-
}),
|
|
664
|
+
}), o === "question" && /* @__PURE__ */ s(jn, {
|
|
663
665
|
vote: e.submitAnswer,
|
|
664
666
|
close: e.closeQuestion,
|
|
665
667
|
extendedQuestion: i
|
|
666
|
-
}),
|
|
668
|
+
}), o !== "question" && /* @__PURE__ */ s(On, {
|
|
667
669
|
openedQuestion: n
|
|
668
670
|
})]
|
|
669
671
|
});
|
|
670
|
-
}, kn = /* @__PURE__ */
|
|
672
|
+
}, kn = /* @__PURE__ */ r("div")({
|
|
671
673
|
name: "Container",
|
|
672
674
|
class: "c115qtkr",
|
|
673
675
|
propsAsIs: !1
|
|
674
|
-
}), wn = /* @__PURE__ */
|
|
676
|
+
}), wn = /* @__PURE__ */ r("div")({
|
|
675
677
|
name: "STabs",
|
|
676
678
|
class: "sxnslc8",
|
|
677
679
|
propsAsIs: !1
|
|
678
|
-
}), bn = /* @__PURE__ */
|
|
680
|
+
}), bn = /* @__PURE__ */ r("button")({
|
|
679
681
|
name: "Button",
|
|
680
682
|
class: "b1umzux0",
|
|
681
683
|
propsAsIs: !1
|
|
682
|
-
}),
|
|
684
|
+
}), Ln = /* @__PURE__ */ r("span")({
|
|
683
685
|
name: "Title",
|
|
684
686
|
class: "tspsaas",
|
|
685
687
|
propsAsIs: !1
|
|
686
688
|
});
|
|
687
|
-
var
|
|
688
|
-
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(bn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(
|
|
689
|
+
var W = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(W || {});
|
|
690
|
+
const ue = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(bn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Ln, { children: e }) }), En = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(kn, { children: /* @__PURE__ */ m(wn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
689
691
|
/* @__PURE__ */ s(ue, { title: "Home", active: e === "home", onClick: () => t(
|
|
690
692
|
"home"
|
|
691
693
|
/* HOME */
|
|
@@ -718,8 +720,8 @@ function pe(e) {
|
|
|
718
720
|
return e;
|
|
719
721
|
}
|
|
720
722
|
function ee(e, t) {
|
|
721
|
-
return ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i,
|
|
722
|
-
return i.__proto__ =
|
|
723
|
+
return ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, o) {
|
|
724
|
+
return i.__proto__ = o, i;
|
|
723
725
|
}, ee(e, t);
|
|
724
726
|
}
|
|
725
727
|
function $n(e, t) {
|
|
@@ -741,13 +743,13 @@ function Qn(e, t) {
|
|
|
741
743
|
}
|
|
742
744
|
function G(e, t) {
|
|
743
745
|
t === void 0 && (t = Qn);
|
|
744
|
-
var n, i = [],
|
|
745
|
-
function
|
|
746
|
-
for (var I = [],
|
|
747
|
-
I[
|
|
748
|
-
return
|
|
746
|
+
var n, i = [], o, u = !1;
|
|
747
|
+
function p() {
|
|
748
|
+
for (var I = [], c = 0; c < arguments.length; c++)
|
|
749
|
+
I[c] = arguments[c];
|
|
750
|
+
return u && n === this && t(I, i) || (o = e.apply(this, I), u = !0, n = this, i = I), o;
|
|
749
751
|
}
|
|
750
|
-
return
|
|
752
|
+
return p;
|
|
751
753
|
}
|
|
752
754
|
var Un = typeof performance == "object" && typeof performance.now == "function", Ie = Un ? function() {
|
|
753
755
|
return performance.now();
|
|
@@ -760,12 +762,12 @@ function he(e) {
|
|
|
760
762
|
function _n(e, t) {
|
|
761
763
|
var n = Ie();
|
|
762
764
|
function i() {
|
|
763
|
-
Ie() - n >= t ? e.call(null) :
|
|
765
|
+
Ie() - n >= t ? e.call(null) : o.id = requestAnimationFrame(i);
|
|
764
766
|
}
|
|
765
|
-
var
|
|
767
|
+
var o = {
|
|
766
768
|
id: requestAnimationFrame(i)
|
|
767
769
|
};
|
|
768
|
-
return
|
|
770
|
+
return o;
|
|
769
771
|
}
|
|
770
772
|
var J = -1;
|
|
771
773
|
function ge(e) {
|
|
@@ -780,8 +782,8 @@ function fe(e) {
|
|
|
780
782
|
if (e === void 0 && (e = !1), w === null || e) {
|
|
781
783
|
var t = document.createElement("div"), n = t.style;
|
|
782
784
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
783
|
-
var i = document.createElement("div"),
|
|
784
|
-
return
|
|
785
|
+
var i = document.createElement("div"), o = i.style;
|
|
786
|
+
return o.width = "100px", o.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? w = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? w = "negative" : w = "positive-ascending"), document.body.removeChild(t), w;
|
|
785
787
|
}
|
|
786
788
|
return w;
|
|
787
789
|
}
|
|
@@ -789,12 +791,12 @@ var Pn = 150, qn = function(t, n) {
|
|
|
789
791
|
return t;
|
|
790
792
|
};
|
|
791
793
|
function Yn(e) {
|
|
792
|
-
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize,
|
|
794
|
+
var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, o = e.getItemSize, u = e.getOffsetForIndexAndAlignment, p = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, c = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, y = e.validateProps;
|
|
793
795
|
return t = /* @__PURE__ */ function(D) {
|
|
794
796
|
$n(N, D);
|
|
795
797
|
function N(T) {
|
|
796
798
|
var a;
|
|
797
|
-
return a = D.call(this, T) || this, a._instanceProps =
|
|
799
|
+
return a = D.call(this, T) || this, a._instanceProps = c(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
|
|
798
800
|
instance: pe(a),
|
|
799
801
|
isScrolling: !1,
|
|
800
802
|
scrollDirection: "forward",
|
|
@@ -818,11 +820,11 @@ function Yn(e) {
|
|
|
818
820
|
if (f.hasOwnProperty(l))
|
|
819
821
|
S = f[l];
|
|
820
822
|
else {
|
|
821
|
-
var x = n(a.props, l, a._instanceProps), j =
|
|
823
|
+
var x = n(a.props, l, a._instanceProps), j = o(a.props, l, a._instanceProps), C = g === "horizontal" || v === "horizontal", Q = g === "rtl", U = C ? x : 0;
|
|
822
824
|
f[l] = S = {
|
|
823
825
|
position: "absolute",
|
|
824
|
-
left:
|
|
825
|
-
right:
|
|
826
|
+
left: Q ? void 0 : U,
|
|
827
|
+
right: Q ? U : void 0,
|
|
826
828
|
top: C ? 0 : x,
|
|
827
829
|
height: C ? "100%" : j,
|
|
828
830
|
width: C ? j : "100%"
|
|
@@ -900,7 +902,7 @@ function Yn(e) {
|
|
|
900
902
|
var S = this._outerRef;
|
|
901
903
|
M === "vertical" ? f = S.scrollWidth > S.clientWidth ? ge() : 0 : f = S.scrollHeight > S.clientHeight ? ge() : 0;
|
|
902
904
|
}
|
|
903
|
-
this.scrollTo(
|
|
905
|
+
this.scrollTo(u(this.props, a, l, v, this._instanceProps, f));
|
|
904
906
|
}, A.componentDidMount = function() {
|
|
905
907
|
var a = this.props, l = a.direction, d = a.initialScrollOffset, g = a.layout;
|
|
906
908
|
if (typeof d == "number" && this._outerRef != null) {
|
|
@@ -935,17 +937,17 @@ function Yn(e) {
|
|
|
935
937
|
}, A.componentWillUnmount = function() {
|
|
936
938
|
this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
|
|
937
939
|
}, A.render = function() {
|
|
938
|
-
var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey,
|
|
940
|
+
var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey, Q = C === void 0 ? qn : C, U = a.layout, Oe = a.outerElementType, je = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || U === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Le = se[0], Ee = se[1], ie = [];
|
|
939
941
|
if (x > 0)
|
|
940
|
-
for (var
|
|
942
|
+
for (var E = Le; E <= Ee; E++)
|
|
941
943
|
ie.push(H(l, {
|
|
942
944
|
data: j,
|
|
943
|
-
key:
|
|
944
|
-
index:
|
|
945
|
+
key: Q(E, j),
|
|
946
|
+
index: E,
|
|
945
947
|
isScrolling: ke ? ne : void 0,
|
|
946
|
-
style: this._getItemStyle(
|
|
948
|
+
style: this._getItemStyle(E)
|
|
947
949
|
}));
|
|
948
|
-
var
|
|
950
|
+
var oe = i(this.props, this._instanceProps);
|
|
949
951
|
return H(Oe || je || "div", {
|
|
950
952
|
className: d,
|
|
951
953
|
onScroll: be,
|
|
@@ -963,9 +965,9 @@ function Yn(e) {
|
|
|
963
965
|
children: ie,
|
|
964
966
|
ref: v,
|
|
965
967
|
style: {
|
|
966
|
-
height: B ? "100%" :
|
|
968
|
+
height: B ? "100%" : oe,
|
|
967
969
|
pointerEvents: ne ? "none" : void 0,
|
|
968
|
-
width: B ?
|
|
970
|
+
width: B ? oe : "100%"
|
|
969
971
|
}
|
|
970
972
|
}));
|
|
971
973
|
}, A._callPropsCallbacks = function() {
|
|
@@ -984,7 +986,7 @@ function Yn(e) {
|
|
|
984
986
|
var a = this.props, l = a.itemCount, d = a.overscanCount, g = this.state, M = g.isScrolling, v = g.scrollDirection, f = g.scrollOffset;
|
|
985
987
|
if (l === 0)
|
|
986
988
|
return [0, 0, 0, 0];
|
|
987
|
-
var S =
|
|
989
|
+
var S = p(this.props, f, this._instanceProps), x = I(this.props, S, f, this._instanceProps), j = !M || v === "backward" ? Math.max(1, d) : 1, C = !M || v === "forward" ? Math.max(1, d) : 1;
|
|
988
990
|
return [Math.max(0, S - j), Math.max(0, Math.min(l - 1, x + C)), S, x];
|
|
989
991
|
}, N;
|
|
990
992
|
}(ye), t.defaultProps = {
|
|
@@ -1010,9 +1012,9 @@ var Wn = function(t, n) {
|
|
|
1010
1012
|
var n = t.itemCount, i = t.itemSize;
|
|
1011
1013
|
return i * n;
|
|
1012
1014
|
},
|
|
1013
|
-
getOffsetForIndexAndAlignment: function(t, n, i,
|
|
1014
|
-
var I = t.direction,
|
|
1015
|
-
switch (i === "smart" && (
|
|
1015
|
+
getOffsetForIndexAndAlignment: function(t, n, i, o, u, p) {
|
|
1016
|
+
var I = t.direction, c = t.height, h = t.itemCount, y = t.itemSize, D = t.layout, N = t.width, A = I === "horizontal" || D === "horizontal", T = A ? N : c, a = Math.max(0, h * y - T), l = Math.min(a, n * y), d = Math.max(0, n * y - T + y + p);
|
|
1017
|
+
switch (i === "smart" && (o >= d - T && o <= l + T ? i = "auto" : i = "center"), i) {
|
|
1016
1018
|
case "start":
|
|
1017
1019
|
return l;
|
|
1018
1020
|
case "end":
|
|
@@ -1023,17 +1025,17 @@ var Wn = function(t, n) {
|
|
|
1023
1025
|
}
|
|
1024
1026
|
case "auto":
|
|
1025
1027
|
default:
|
|
1026
|
-
return
|
|
1028
|
+
return o >= d && o <= l ? o : o < d ? d : l;
|
|
1027
1029
|
}
|
|
1028
1030
|
},
|
|
1029
1031
|
getStartIndexForOffset: function(t, n) {
|
|
1030
|
-
var i = t.itemCount,
|
|
1031
|
-
return Math.max(0, Math.min(i - 1, Math.floor(n /
|
|
1032
|
+
var i = t.itemCount, o = t.itemSize;
|
|
1033
|
+
return Math.max(0, Math.min(i - 1, Math.floor(n / o)));
|
|
1032
1034
|
},
|
|
1033
1035
|
getStopIndexForStartIndex: function(t, n, i) {
|
|
1034
|
-
var
|
|
1036
|
+
var o = t.direction, u = t.height, p = t.itemCount, I = t.itemSize, c = t.layout, h = t.width, y = o === "horizontal" || c === "horizontal", D = n * I, N = y ? h : u, A = Math.ceil((N + i - D) / I);
|
|
1035
1037
|
return Math.max(0, Math.min(
|
|
1036
|
-
|
|
1038
|
+
p - 1,
|
|
1037
1039
|
n + A - 1
|
|
1038
1040
|
// -1 is because stop index is inclusive
|
|
1039
1041
|
));
|
|
@@ -1046,28 +1048,28 @@ var Wn = function(t, n) {
|
|
|
1046
1048
|
}
|
|
1047
1049
|
});
|
|
1048
1050
|
function Fn(e) {
|
|
1049
|
-
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex,
|
|
1050
|
-
return !(i > n ||
|
|
1051
|
+
var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, o = e.stopIndex;
|
|
1052
|
+
return !(i > n || o < t);
|
|
1051
1053
|
}
|
|
1052
1054
|
function Bn(e) {
|
|
1053
|
-
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize,
|
|
1055
|
+
for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, o = e.startIndex, u = e.stopIndex, p = [], I = null, c = null, h = o; h <= u; h++) {
|
|
1054
1056
|
var y = t(h);
|
|
1055
|
-
y ?
|
|
1057
|
+
y ? c !== null && (p.push(I, c), I = c = null) : (c = h, I === null && (I = h));
|
|
1056
1058
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
for (var D = Math.min(Math.max(
|
|
1059
|
-
|
|
1060
|
-
|
|
1059
|
+
if (c !== null) {
|
|
1060
|
+
for (var D = Math.min(Math.max(c, I + i - 1), n - 1), N = c + 1; N <= D && !t(N); N++)
|
|
1061
|
+
c = N;
|
|
1062
|
+
p.push(I, c);
|
|
1061
1063
|
}
|
|
1062
|
-
if (
|
|
1063
|
-
for (;
|
|
1064
|
-
var A =
|
|
1064
|
+
if (p.length)
|
|
1065
|
+
for (; p[1] - p[0] + 1 < i && p[0] > 0; ) {
|
|
1066
|
+
var A = p[0] - 1;
|
|
1065
1067
|
if (!t(A))
|
|
1066
|
-
|
|
1068
|
+
p[0] = A;
|
|
1067
1069
|
else
|
|
1068
1070
|
break;
|
|
1069
1071
|
}
|
|
1070
|
-
return
|
|
1072
|
+
return p;
|
|
1071
1073
|
}
|
|
1072
1074
|
var Hn = function(e, t) {
|
|
1073
1075
|
if (!(e instanceof t))
|
|
@@ -1075,8 +1077,8 @@ var Hn = function(e, t) {
|
|
|
1075
1077
|
}, Zn = function() {
|
|
1076
1078
|
function e(t, n) {
|
|
1077
1079
|
for (var i = 0; i < n.length; i++) {
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1080
|
+
var o = n[i];
|
|
1081
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
|
|
1080
1082
|
}
|
|
1081
1083
|
}
|
|
1082
1084
|
return function(t, n, i) {
|
|
@@ -1100,16 +1102,16 @@ var Hn = function(e, t) {
|
|
|
1100
1102
|
}, Jn = function(e) {
|
|
1101
1103
|
Gn(t, e);
|
|
1102
1104
|
function t() {
|
|
1103
|
-
var n, i,
|
|
1105
|
+
var n, i, o, u;
|
|
1104
1106
|
Hn(this, t);
|
|
1105
|
-
for (var
|
|
1106
|
-
I[
|
|
1107
|
-
return
|
|
1107
|
+
for (var p = arguments.length, I = Array(p), c = 0; c < p; c++)
|
|
1108
|
+
I[c] = arguments[c];
|
|
1109
|
+
return u = (i = (o = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(I))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(h) {
|
|
1108
1110
|
var y = h.visibleStartIndex, D = h.visibleStopIndex;
|
|
1109
|
-
|
|
1110
|
-
},
|
|
1111
|
-
|
|
1112
|
-
}, i), Me(
|
|
1111
|
+
o._lastRenderedStartIndex = y, o._lastRenderedStopIndex = D, o._ensureRowsLoaded(y, D);
|
|
1112
|
+
}, o._setRef = function(h) {
|
|
1113
|
+
o._listRef = h;
|
|
1114
|
+
}, i), Me(o, u);
|
|
1113
1115
|
}
|
|
1114
1116
|
return Zn(t, [{
|
|
1115
1117
|
key: "resetloadMoreItemsCache",
|
|
@@ -1132,13 +1134,13 @@ var Hn = function(e, t) {
|
|
|
1132
1134
|
}
|
|
1133
1135
|
}, {
|
|
1134
1136
|
key: "_ensureRowsLoaded",
|
|
1135
|
-
value: function(i,
|
|
1136
|
-
var
|
|
1137
|
-
isItemLoaded:
|
|
1137
|
+
value: function(i, o) {
|
|
1138
|
+
var u = this.props, p = u.isItemLoaded, I = u.itemCount, c = u.minimumBatchSize, h = c === void 0 ? 10 : c, y = u.threshold, D = y === void 0 ? 15 : y, N = Bn({
|
|
1139
|
+
isItemLoaded: p,
|
|
1138
1140
|
itemCount: I,
|
|
1139
1141
|
minimumBatchSize: h,
|
|
1140
1142
|
startIndex: Math.max(0, i - D),
|
|
1141
|
-
stopIndex: Math.min(I - 1,
|
|
1143
|
+
stopIndex: Math.min(I - 1, o + D)
|
|
1142
1144
|
});
|
|
1143
1145
|
(this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(A, T) {
|
|
1144
1146
|
return N[T] !== A;
|
|
@@ -1147,54 +1149,54 @@ var Hn = function(e, t) {
|
|
|
1147
1149
|
}, {
|
|
1148
1150
|
key: "_loadUnloadedRanges",
|
|
1149
1151
|
value: function(i) {
|
|
1150
|
-
for (var
|
|
1151
|
-
var y = i[h], D = i[h + 1], N =
|
|
1152
|
+
for (var o = this, u = this.props.loadMoreItems || this.props.loadMoreRows, p = function(h) {
|
|
1153
|
+
var y = i[h], D = i[h + 1], N = u(y, D);
|
|
1152
1154
|
N != null && N.then(function() {
|
|
1153
1155
|
if (Fn({
|
|
1154
|
-
lastRenderedStartIndex:
|
|
1155
|
-
lastRenderedStopIndex:
|
|
1156
|
+
lastRenderedStartIndex: o._lastRenderedStartIndex,
|
|
1157
|
+
lastRenderedStopIndex: o._lastRenderedStopIndex,
|
|
1156
1158
|
startIndex: y,
|
|
1157
1159
|
stopIndex: D
|
|
1158
1160
|
})) {
|
|
1159
|
-
if (
|
|
1161
|
+
if (o._listRef == null)
|
|
1160
1162
|
return;
|
|
1161
|
-
typeof
|
|
1163
|
+
typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(y, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
|
|
1162
1164
|
}
|
|
1163
1165
|
});
|
|
1164
1166
|
}, I = 0; I < i.length; I += 2)
|
|
1165
|
-
|
|
1167
|
+
p(I);
|
|
1166
1168
|
}
|
|
1167
1169
|
}]), t;
|
|
1168
1170
|
}(ye);
|
|
1169
|
-
const Kn = /* @__PURE__ */
|
|
1171
|
+
const Kn = /* @__PURE__ */ r("div")({
|
|
1170
1172
|
name: "Container",
|
|
1171
1173
|
class: "culdu4a",
|
|
1172
1174
|
propsAsIs: !1
|
|
1173
|
-
}), Xn = /* @__PURE__ */
|
|
1175
|
+
}), Xn = /* @__PURE__ */ r("div")({
|
|
1174
1176
|
name: "Position",
|
|
1175
1177
|
class: "pwf8e69",
|
|
1176
1178
|
propsAsIs: !1
|
|
1177
|
-
}), es = /* @__PURE__ */
|
|
1179
|
+
}), es = /* @__PURE__ */ r("img")({
|
|
1178
1180
|
name: "Avatar",
|
|
1179
1181
|
class: "atf4yh4",
|
|
1180
1182
|
propsAsIs: !1
|
|
1181
|
-
}), ts = /* @__PURE__ */
|
|
1183
|
+
}), ts = /* @__PURE__ */ r("div")({
|
|
1182
1184
|
name: "AvatarPlaceholder",
|
|
1183
1185
|
class: "a1dg29ja",
|
|
1184
1186
|
propsAsIs: !1
|
|
1185
|
-
}), ns = /* @__PURE__ */
|
|
1187
|
+
}), ns = /* @__PURE__ */ r("div")({
|
|
1186
1188
|
name: "Content",
|
|
1187
1189
|
class: "c10a68rc",
|
|
1188
1190
|
propsAsIs: !1
|
|
1189
|
-
}), ss = /* @__PURE__ */
|
|
1191
|
+
}), ss = /* @__PURE__ */ r("div")({
|
|
1190
1192
|
name: "NameContainer",
|
|
1191
1193
|
class: "nc4kck5",
|
|
1192
1194
|
propsAsIs: !1
|
|
1193
|
-
}), is = /* @__PURE__ */
|
|
1195
|
+
}), is = /* @__PURE__ */ r("span")({
|
|
1194
1196
|
name: "Name",
|
|
1195
1197
|
class: "njsrqgr",
|
|
1196
1198
|
propsAsIs: !1
|
|
1197
|
-
}),
|
|
1199
|
+
}), os = () => O, rs = /* @__PURE__ */ r(os())({
|
|
1198
1200
|
name: "CurrentUserBadge",
|
|
1199
1201
|
class: "c17uc4zr",
|
|
1200
1202
|
propsAsIs: !0
|
|
@@ -1203,20 +1205,20 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1203
1205
|
avatar: t,
|
|
1204
1206
|
name: n,
|
|
1205
1207
|
points: i,
|
|
1206
|
-
isCurrentUser:
|
|
1207
|
-
openItemDetail:
|
|
1208
|
-
style:
|
|
1209
|
-
}) => /* @__PURE__ */
|
|
1208
|
+
isCurrentUser: o,
|
|
1209
|
+
openItemDetail: u,
|
|
1210
|
+
style: p
|
|
1211
|
+
}) => /* @__PURE__ */ m(Kn, { onClick: u, style: p, children: [
|
|
1210
1212
|
/* @__PURE__ */ s(Xn, { children: e || 0 }),
|
|
1211
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ m(ns, { children: [
|
|
1212
1214
|
t ? /* @__PURE__ */ s(es, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(ts, { children: Te(n || "") }),
|
|
1213
|
-
/* @__PURE__ */
|
|
1215
|
+
/* @__PURE__ */ m(ss, { children: [
|
|
1214
1216
|
/* @__PURE__ */ s(is, { children: n || "" }),
|
|
1215
|
-
|
|
1217
|
+
o && /* @__PURE__ */ s(rs, { name: "icon-star" })
|
|
1216
1218
|
] })
|
|
1217
1219
|
] }),
|
|
1218
1220
|
/* @__PURE__ */ s("div", { children: De(i) })
|
|
1219
|
-
] }), ls = /* @__PURE__ */
|
|
1221
|
+
] }), ls = /* @__PURE__ */ r("div")({
|
|
1220
1222
|
name: "ScrollContainer",
|
|
1221
1223
|
class: "s13d8sg6",
|
|
1222
1224
|
propsAsIs: !1
|
|
@@ -1225,30 +1227,30 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1225
1227
|
currentUserId: t,
|
|
1226
1228
|
openItemDetail: n,
|
|
1227
1229
|
fetchMore: i
|
|
1228
|
-
}) => /* @__PURE__ */ s(Re, { children: ({ width:
|
|
1230
|
+
}) => /* @__PURE__ */ s(Re, { children: ({ width: o, height: u }) => /* @__PURE__ */ s(
|
|
1229
1231
|
Jn,
|
|
1230
1232
|
{
|
|
1231
|
-
isItemLoaded: (
|
|
1233
|
+
isItemLoaded: (p) => p < e.length,
|
|
1232
1234
|
itemCount: e.length + 1,
|
|
1233
1235
|
loadMoreItems: i,
|
|
1234
|
-
children: ({ onItemsRendered:
|
|
1236
|
+
children: ({ onItemsRendered: p, ref: I }) => /* @__PURE__ */ s(ls, { children: /* @__PURE__ */ s(
|
|
1235
1237
|
Vn,
|
|
1236
1238
|
{
|
|
1237
1239
|
itemSize: 56,
|
|
1238
|
-
onItemsRendered:
|
|
1240
|
+
onItemsRendered: p,
|
|
1239
1241
|
ref: I,
|
|
1240
1242
|
itemCount: e.length,
|
|
1241
|
-
width:
|
|
1242
|
-
height:
|
|
1243
|
-
children: ({ index:
|
|
1243
|
+
width: o,
|
|
1244
|
+
height: u,
|
|
1245
|
+
children: ({ index: c, style: h }) => /* @__PURE__ */ s(
|
|
1244
1246
|
as,
|
|
1245
1247
|
{
|
|
1246
1248
|
style: { ...h, maxHeight: 48 },
|
|
1247
|
-
...e[
|
|
1248
|
-
openItemDetail: () => n(e[
|
|
1249
|
-
isCurrentUser: !!t && t === e[
|
|
1249
|
+
...e[c],
|
|
1250
|
+
openItemDetail: () => n(e[c].userId),
|
|
1251
|
+
isCurrentUser: !!t && t === e[c].userId
|
|
1250
1252
|
},
|
|
1251
|
-
e[
|
|
1253
|
+
e[c].userId
|
|
1252
1254
|
)
|
|
1253
1255
|
}
|
|
1254
1256
|
) })
|
|
@@ -1286,60 +1288,60 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1286
1288
|
currentUserId: e.currentUserId.get()
|
|
1287
1289
|
}
|
|
1288
1290
|
) : /* @__PURE__ */ s(ds, { deepLink: e.deepLink });
|
|
1289
|
-
}, ps = /* @__PURE__ */
|
|
1291
|
+
}, ps = /* @__PURE__ */ r("div")({
|
|
1290
1292
|
name: "QuestionItem",
|
|
1291
1293
|
class: "q1w97g3p",
|
|
1292
1294
|
propsAsIs: !1
|
|
1293
|
-
}), ms = /* @__PURE__ */
|
|
1295
|
+
}), ms = /* @__PURE__ */ r("div")({
|
|
1294
1296
|
name: "QuestionCaption",
|
|
1295
1297
|
class: "q2sl39u",
|
|
1296
1298
|
propsAsIs: !1
|
|
1297
|
-
}), Is = /* @__PURE__ */
|
|
1299
|
+
}), Is = /* @__PURE__ */ r("div")({
|
|
1298
1300
|
name: "QuestionBody",
|
|
1299
1301
|
class: "qd5h0uc",
|
|
1300
1302
|
propsAsIs: !1
|
|
1301
|
-
}), hs = /* @__PURE__ */
|
|
1303
|
+
}), hs = /* @__PURE__ */ r("div")({
|
|
1302
1304
|
name: "QuestionAction",
|
|
1303
1305
|
class: "q105uluy",
|
|
1304
1306
|
propsAsIs: !1
|
|
1305
|
-
}), gs = () => O,
|
|
1307
|
+
}), gs = () => O, q = /* @__PURE__ */ r(gs())({
|
|
1306
1308
|
name: "QuestionActionIcon",
|
|
1307
1309
|
class: "q1fa0b9h",
|
|
1308
1310
|
propsAsIs: !0
|
|
1309
|
-
}), fs = () => O, Ms = /* @__PURE__ */
|
|
1311
|
+
}), fs = () => O, Ms = /* @__PURE__ */ r(fs())({
|
|
1310
1312
|
name: "QuestionTypeIcon",
|
|
1311
1313
|
class: "qxlt78s",
|
|
1312
1314
|
propsAsIs: !0
|
|
1313
|
-
}), vs = /* @__PURE__ */
|
|
1315
|
+
}), vs = /* @__PURE__ */ r("div")({
|
|
1314
1316
|
name: "QuestionTypeLabel",
|
|
1315
1317
|
class: "qmg0vkx",
|
|
1316
1318
|
propsAsIs: !1
|
|
1317
|
-
}), Ns = /* @__PURE__ */
|
|
1319
|
+
}), Ns = /* @__PURE__ */ r("div")({
|
|
1318
1320
|
name: "QuestionContent",
|
|
1319
1321
|
class: "q1uz5j1g",
|
|
1320
1322
|
propsAsIs: !1
|
|
1321
|
-
}), ys = /* @__PURE__ */
|
|
1323
|
+
}), ys = /* @__PURE__ */ r("button")({
|
|
1322
1324
|
name: "PlayButton",
|
|
1323
1325
|
class: "p1pba9p1",
|
|
1324
1326
|
propsAsIs: !1
|
|
1325
1327
|
}), As = {
|
|
1326
|
-
[
|
|
1327
|
-
[
|
|
1328
|
-
[
|
|
1329
|
-
[
|
|
1328
|
+
[_.LOST]: /* @__PURE__ */ s(q, { name: "incorrectVoted" }),
|
|
1329
|
+
[_.WON]: /* @__PURE__ */ s(q, { name: "icon-check" }),
|
|
1330
|
+
[_.UNSET]: /* @__PURE__ */ s(q, { name: "icon-arrow" }),
|
|
1331
|
+
[_.DNP]: /* @__PURE__ */ s(q, { name: "icon-arrow" })
|
|
1330
1332
|
}, Ts = ({
|
|
1331
1333
|
questionId: e,
|
|
1332
1334
|
questionType: t,
|
|
1333
1335
|
questionStatus: n,
|
|
1334
1336
|
subject: i,
|
|
1335
|
-
openForVoting:
|
|
1336
|
-
openQuestion:
|
|
1337
|
-
status:
|
|
1337
|
+
openForVoting: o,
|
|
1338
|
+
openQuestion: u,
|
|
1339
|
+
status: p
|
|
1338
1340
|
}) => {
|
|
1339
|
-
const I = Ne[t],
|
|
1340
|
-
return I ? /* @__PURE__ */
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1341
|
+
const I = Ne[t], c = As[p];
|
|
1342
|
+
return I ? /* @__PURE__ */ m(ps, { onClick: () => u == null ? void 0 : u(e), children: [
|
|
1343
|
+
/* @__PURE__ */ m(Ns, { children: [
|
|
1344
|
+
/* @__PURE__ */ m(ms, { children: [
|
|
1343
1345
|
/* @__PURE__ */ s(
|
|
1344
1346
|
Ms,
|
|
1345
1347
|
{
|
|
@@ -1348,20 +1350,20 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1348
1350
|
name: I.iconName
|
|
1349
1351
|
}
|
|
1350
1352
|
),
|
|
1351
|
-
/* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ m(vs, { children: [
|
|
1352
1354
|
I.label,
|
|
1353
|
-
t === z.TRIVIA && n ===
|
|
1355
|
+
t === z.TRIVIA && n === R.RESOLVED && " • Expired"
|
|
1354
1356
|
] })
|
|
1355
1357
|
] }),
|
|
1356
1358
|
/* @__PURE__ */ s(Is, { children: i || "" })
|
|
1357
1359
|
] }),
|
|
1358
|
-
/* @__PURE__ */ s(hs, { children:
|
|
1360
|
+
/* @__PURE__ */ s(hs, { children: o ? /* @__PURE__ */ s(ys, { children: "Play" }) : c })
|
|
1359
1361
|
] }) : null;
|
|
1360
|
-
}, Ds = /* @__PURE__ */
|
|
1362
|
+
}, Ds = /* @__PURE__ */ r("div")({
|
|
1361
1363
|
name: "Container",
|
|
1362
1364
|
class: "cll3md7",
|
|
1363
1365
|
propsAsIs: !1
|
|
1364
|
-
}), Ss = /* @__PURE__ */
|
|
1366
|
+
}), Ss = /* @__PURE__ */ r("button")({
|
|
1365
1367
|
name: "ActionBtn",
|
|
1366
1368
|
class: "a10g1iik",
|
|
1367
1369
|
propsAsIs: !1
|
|
@@ -1369,22 +1371,22 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1369
1371
|
openInsight: e,
|
|
1370
1372
|
questionId: t,
|
|
1371
1373
|
...n
|
|
1372
|
-
}) => /* @__PURE__ */
|
|
1374
|
+
}) => /* @__PURE__ */ m(Ds, { children: [
|
|
1373
1375
|
/* @__PURE__ */ s(xe, { questionId: t, ...n }),
|
|
1374
1376
|
e && /* @__PURE__ */ s(Ss, { onClick: () => e(t), children: "View Insight" })
|
|
1375
|
-
] }), xs = /* @__PURE__ */
|
|
1377
|
+
] }), xs = /* @__PURE__ */ r("div")({
|
|
1376
1378
|
name: "QuestionsContainer",
|
|
1377
1379
|
class: "qvghv3l",
|
|
1378
1380
|
propsAsIs: !1
|
|
1379
1381
|
}), Os = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(xs, { children: e == null ? void 0 : e.map((n) => {
|
|
1380
|
-
var i,
|
|
1382
|
+
var i, o;
|
|
1381
1383
|
if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1382
|
-
const
|
|
1383
|
-
return /* @__PURE__ */ s(Ts, { openQuestion: t, ...
|
|
1384
|
+
const u = n.attributes.attributes.value;
|
|
1385
|
+
return /* @__PURE__ */ s(Ts, { openQuestion: t, ...u }, u.questionId);
|
|
1384
1386
|
}
|
|
1385
|
-
if (n.type === "insight" && ((
|
|
1386
|
-
const
|
|
1387
|
-
return /* @__PURE__ */ s(zs, { openInsight: t, ...
|
|
1387
|
+
if (n.type === "insight" && ((o = n.attributes) == null ? void 0 : o.attributes.case) === "insight") {
|
|
1388
|
+
const u = n.attributes.attributes.value;
|
|
1389
|
+
return /* @__PURE__ */ s(zs, { openInsight: t, ...u }, u.questionId);
|
|
1388
1390
|
}
|
|
1389
1391
|
return null;
|
|
1390
1392
|
}) }), js = ({ store: e, openQuestion: t }) => {
|
|
@@ -1397,8 +1399,8 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1397
1399
|
}, ks = ({
|
|
1398
1400
|
gamification: e
|
|
1399
1401
|
}) => {
|
|
1400
|
-
const [t, n] =
|
|
1401
|
-
return /* @__PURE__ */
|
|
1402
|
+
const [t, n] = V(W.HOME);
|
|
1403
|
+
return /* @__PURE__ */ m("div", {
|
|
1402
1404
|
style: {
|
|
1403
1405
|
height: "100%",
|
|
1404
1406
|
display: "flex",
|
|
@@ -1409,11 +1411,11 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1409
1411
|
style: {
|
|
1410
1412
|
paddingBottom: "4px"
|
|
1411
1413
|
},
|
|
1412
|
-
children: /* @__PURE__ */ s(
|
|
1414
|
+
children: /* @__PURE__ */ s(En, {
|
|
1413
1415
|
activePage: t,
|
|
1414
1416
|
toggleActivePage: n
|
|
1415
1417
|
})
|
|
1416
|
-
}), t ===
|
|
1418
|
+
}), t === W.HOME && /* @__PURE__ */ m(te, {
|
|
1417
1419
|
children: [/* @__PURE__ */ s(K, {
|
|
1418
1420
|
style: {
|
|
1419
1421
|
paddingTop: "12px"
|
|
@@ -1427,22 +1429,22 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1427
1429
|
store: e.feedList.getStore()
|
|
1428
1430
|
})
|
|
1429
1431
|
})]
|
|
1430
|
-
}), t ===
|
|
1432
|
+
}), t === W.LEADERBOARD && /* @__PURE__ */ s("div", {
|
|
1431
1433
|
className: "c1bp9dj2",
|
|
1432
1434
|
children: /* @__PURE__ */ s(us, {
|
|
1433
1435
|
gamification: e
|
|
1434
1436
|
})
|
|
1435
1437
|
})]
|
|
1436
1438
|
});
|
|
1437
|
-
}, ws = () => _e, ve = /* @__PURE__ */
|
|
1439
|
+
}, ws = () => _e, ve = /* @__PURE__ */ r(ws())({
|
|
1438
1440
|
name: "OpenedContainer",
|
|
1439
1441
|
class: "oar61gl",
|
|
1440
1442
|
propsAsIs: !0
|
|
1441
|
-
}), bs = /* @__PURE__ */
|
|
1443
|
+
}), bs = /* @__PURE__ */ r("div")({
|
|
1442
1444
|
name: "UserContainer",
|
|
1443
1445
|
class: "u14zaal4",
|
|
1444
1446
|
propsAsIs: !1
|
|
1445
|
-
}),
|
|
1447
|
+
}), Ls = ({
|
|
1446
1448
|
correct: e,
|
|
1447
1449
|
incorrect: t
|
|
1448
1450
|
}) => {
|
|
@@ -1453,7 +1455,7 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1453
1455
|
className: t
|
|
1454
1456
|
}) => {
|
|
1455
1457
|
const n = k(e.openedQuestion.$store), i = k(e.openedUser);
|
|
1456
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ m(b, {
|
|
1457
1459
|
children: [n && /* @__PURE__ */ s(ve, {
|
|
1458
1460
|
className: t,
|
|
1459
1461
|
children: /* @__PURE__ */ s(Cn, {
|
|
@@ -1461,14 +1463,14 @@ const Kn = /* @__PURE__ */ o("div")({
|
|
|
1461
1463
|
})
|
|
1462
1464
|
}), i && /* @__PURE__ */ s(ve, {
|
|
1463
1465
|
className: t,
|
|
1464
|
-
children: /* @__PURE__ */
|
|
1466
|
+
children: /* @__PURE__ */ m(bs, {
|
|
1465
1467
|
children: [/* @__PURE__ */ s(Ae, {
|
|
1466
1468
|
label: "Friend's Rank",
|
|
1467
1469
|
close: e.closeUser
|
|
1468
1470
|
}), /* @__PURE__ */ s(K, {
|
|
1469
1471
|
children: /* @__PURE__ */ s(Se, {
|
|
1470
1472
|
...i,
|
|
1471
|
-
successRate:
|
|
1473
|
+
successRate: Ls(i)
|
|
1472
1474
|
})
|
|
1473
1475
|
})]
|
|
1474
1476
|
})
|