@streamlayer/react 0.29.9 → 0.29.10
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/masters.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/index-5d2b7e7a.cjs +1 -0
- package/lib/dist/{index-44ddc69c.js → index-b48a730f.js} +257 -250
- package/lib/dist/index.d.ts +2 -0
- package/lib/dist/{masters-63e8a172.js → masters-187c9707.js} +4 -2
- package/lib/dist/{masters-759c16c9.cjs → masters-9e88aaec.cjs} +2 -2
- package/lib/es/masters.js +1 -1
- package/lib/{index-3ce72dff.cjs → index-3f5c6152.cjs} +2 -2
- package/lib/{index-8774a3f9.js → index-66ccd267.js} +159 -152
- package/lib/{masters-0649c872.cjs → masters-1b02c80d.cjs} +1 -1
- package/lib/{masters-8f8cf5ae.js → masters-5752c805.js} +1 -1
- package/package.json +6 -6
- package/lib/dist/index-cf0d1d15.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as v, jsx as a, Fragment as q } from "react/jsx-runtime";
|
|
2
|
-
import { s as o, C as x, o as Oe, a as Ee, i as je, Q as D, b as Y, c as L, E as C, r as Le, d as Je, e as Ke, n as Xe, w as et, u as O, f as tt, P as F, g as ne, h as st, j as nt } from "./masters-
|
|
3
|
-
import
|
|
2
|
+
import { s as o, C as x, o as Oe, a as Ee, i as je, Q as D, b as Y, c as L, E as C, r as Le, d as Je, e as Ke, n as Xe, w as et, u as O, f as tt, P as F, g as ne, h as st, j as nt } from "./masters-187c9707.js";
|
|
3
|
+
import U, { useRef as E, useState as $, useCallback as G, useEffect as it, useLayoutEffect as rt, useMemo as H, Component as at, createElement as B, PureComponent as Ce } from "react";
|
|
4
4
|
const ot = () => x, lt = () => x, ct = /* @__PURE__ */ o("div")({
|
|
5
5
|
name: "a",
|
|
6
6
|
class: "acysrl1",
|
|
@@ -141,10 +141,10 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
141
141
|
points: s,
|
|
142
142
|
friendsRank: n,
|
|
143
143
|
rank: i,
|
|
144
|
-
streak:
|
|
145
|
-
correct:
|
|
144
|
+
streak: p,
|
|
145
|
+
correct: d,
|
|
146
146
|
incorrect: f,
|
|
147
|
-
inTop:
|
|
147
|
+
inTop: h,
|
|
148
148
|
successRate: g
|
|
149
149
|
}) => /* @__PURE__ */ v(zt, { children: [
|
|
150
150
|
/* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ v(_t, { children: [
|
|
@@ -165,7 +165,7 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
165
165
|
/* @__PURE__ */ a(Et, {}),
|
|
166
166
|
/* @__PURE__ */ v("div", { children: [
|
|
167
167
|
"TOP ",
|
|
168
|
-
|
|
168
|
+
h || 0,
|
|
169
169
|
"%"
|
|
170
170
|
] })
|
|
171
171
|
] })
|
|
@@ -177,18 +177,18 @@ const zt = /* @__PURE__ */ o("div")({
|
|
|
177
177
|
/* @__PURE__ */ a(pe, { indicator: i || 0, title: "Global rank" })
|
|
178
178
|
] }),
|
|
179
179
|
/* @__PURE__ */ v(Lt, { children: [
|
|
180
|
-
/* @__PURE__ */ a(V, { indicator:
|
|
181
|
-
/* @__PURE__ */ a(V, { indicator:
|
|
180
|
+
/* @__PURE__ */ a(V, { indicator: p || 0, title: "Win streak" }),
|
|
181
|
+
/* @__PURE__ */ a(V, { indicator: d || 0, title: "Correct" }),
|
|
182
182
|
/* @__PURE__ */ a(V, { indicator: f || 0, title: "Incorrect" }),
|
|
183
183
|
/* @__PURE__ */ a(V, { indicator: `${g || 0}%`, title: "Succ. rate" })
|
|
184
184
|
] })
|
|
185
185
|
] })
|
|
186
186
|
] });
|
|
187
|
-
const
|
|
187
|
+
const Ut = () => x, Qt = /* @__PURE__ */ o("div")({
|
|
188
188
|
name: "c",
|
|
189
189
|
class: "ciyeb68",
|
|
190
190
|
propsAsIs: !1
|
|
191
|
-
}), qt = /* @__PURE__ */ o(
|
|
191
|
+
}), qt = /* @__PURE__ */ o(Ut())({
|
|
192
192
|
name: "n",
|
|
193
193
|
class: "nfic4xc",
|
|
194
194
|
propsAsIs: !0
|
|
@@ -218,28 +218,28 @@ const Qt = () => x, Ut = /* @__PURE__ */ o("div")({
|
|
|
218
218
|
questionVoted: s,
|
|
219
219
|
questionType: n,
|
|
220
220
|
hasCorrectAnswer: i,
|
|
221
|
-
questionStatus:
|
|
221
|
+
questionStatus: p
|
|
222
222
|
}) => {
|
|
223
|
-
const
|
|
224
|
-
if (!
|
|
223
|
+
const d = s && (n === D.TRIVIA || n === D.PREDICTION);
|
|
224
|
+
if (!d && p !== Y.RESOLVED)
|
|
225
225
|
return null;
|
|
226
|
-
const f = n === D.PREDICTION && !i,
|
|
227
|
-
return /* @__PURE__ */ v(
|
|
228
|
-
|
|
226
|
+
const f = n === D.PREDICTION && !i, h = e ? "correct" : "incorrect", g = e ? t.correctFeedback : t.incorrectFeedback;
|
|
227
|
+
return /* @__PURE__ */ v(Qt, { "data-isPrediction": f, children: [
|
|
228
|
+
p === Y.RESOLVED && n === D.TRIVIA && !s && /* @__PURE__ */ v(q, { children: [
|
|
229
229
|
/* @__PURE__ */ a(he, { children: /* @__PURE__ */ a(x, { name: "questionExpired" }) }),
|
|
230
230
|
/* @__PURE__ */ v("div", { children: [
|
|
231
231
|
/* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(J, { children: "Question Expired" }) }),
|
|
232
232
|
/* @__PURE__ */ a(Pt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
233
233
|
] })
|
|
234
234
|
] }),
|
|
235
|
-
|
|
235
|
+
d && f && /* @__PURE__ */ v(q, { children: [
|
|
236
236
|
/* @__PURE__ */ a(qt, { name: "icon-prediction" }),
|
|
237
237
|
/* @__PURE__ */ a(J, { children: "Stay tuned to see if your prediction was correct." })
|
|
238
238
|
] }),
|
|
239
|
-
|
|
240
|
-
/* @__PURE__ */ a(he, { "data-feedbackType":
|
|
239
|
+
d && i && /* @__PURE__ */ v(q, { children: [
|
|
240
|
+
/* @__PURE__ */ a(he, { "data-feedbackType": h, children: /* @__PURE__ */ a(x, { name: h }) }),
|
|
241
241
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ v(me, { children: [
|
|
242
|
-
/* @__PURE__ */ a(Yt, { "data-feedbackType":
|
|
242
|
+
/* @__PURE__ */ a(Yt, { "data-feedbackType": h, children: g == null ? void 0 : g.title }),
|
|
243
243
|
/* @__PURE__ */ a(J, { children: g == null ? void 0 : g.description })
|
|
244
244
|
] }) })
|
|
245
245
|
] })
|
|
@@ -262,7 +262,7 @@ const Ft = /* @__PURE__ */ o("div")({
|
|
|
262
262
|
class: "r82wnnx",
|
|
263
263
|
propsAsIs: !1
|
|
264
264
|
});
|
|
265
|
-
const Gt = () =>
|
|
265
|
+
const Gt = () => Ue, Zt = () => Ue, Jt = () => x, Kt = /* @__PURE__ */ o("button")({
|
|
266
266
|
name: "c",
|
|
267
267
|
class: "cpm4u8k",
|
|
268
268
|
propsAsIs: !1
|
|
@@ -282,7 +282,7 @@ const Gt = () => Qe, Zt = () => Qe, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
282
282
|
name: "p",
|
|
283
283
|
class: "p198m24r",
|
|
284
284
|
propsAsIs: !1
|
|
285
|
-
}),
|
|
285
|
+
}), Ue = /* @__PURE__ */ o("img")({
|
|
286
286
|
name: "r",
|
|
287
287
|
class: "rbq5eu7",
|
|
288
288
|
propsAsIs: !1
|
|
@@ -339,11 +339,11 @@ const Gt = () => Qe, Zt = () => Qe, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
339
339
|
id: s,
|
|
340
340
|
icon: n,
|
|
341
341
|
text: i,
|
|
342
|
-
percentageDecimal:
|
|
342
|
+
percentageDecimal: p,
|
|
343
343
|
// extra props
|
|
344
|
-
onVote:
|
|
344
|
+
onVote: d,
|
|
345
345
|
youSelected: f,
|
|
346
|
-
questionVoted:
|
|
346
|
+
questionVoted: h,
|
|
347
347
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
348
348
|
imageMode: g = L.ROUNDED,
|
|
349
349
|
answerTimeExpired: N,
|
|
@@ -352,24 +352,24 @@ const Gt = () => Qe, Zt = () => Qe, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
352
352
|
questionType: y,
|
|
353
353
|
correct: M,
|
|
354
354
|
hasCorrectAnswer: r
|
|
355
|
-
} = t,
|
|
355
|
+
} = t, m = cs(t), c = ds({ questionType: y, questionVoted: h, correct: M, hasCorrectAnswer: r, questionStatus: z }), u = h || z === Y.RESOLVED && y === D.PREDICTION;
|
|
356
356
|
return /* @__PURE__ */ v(
|
|
357
357
|
Kt,
|
|
358
358
|
{
|
|
359
359
|
value: s,
|
|
360
360
|
"data-selected": f,
|
|
361
|
-
"data-answerState":
|
|
362
|
-
disabled:
|
|
363
|
-
onClick:
|
|
361
|
+
"data-answerState": m,
|
|
362
|
+
disabled: h || l || N,
|
|
363
|
+
onClick: d,
|
|
364
364
|
children: [
|
|
365
|
-
|
|
365
|
+
u && /* @__PURE__ */ a(Xt, { "data-answerState": m, style: { width: `${p}%` } }),
|
|
366
366
|
/* @__PURE__ */ v(es, { children: [
|
|
367
367
|
n && ((e = fe[g]) == null ? void 0 : e.call(fe, n)),
|
|
368
368
|
/* @__PURE__ */ a(rs, { children: i }),
|
|
369
|
-
|
|
369
|
+
u && /* @__PURE__ */ v(as, { children: [
|
|
370
370
|
c && /* @__PURE__ */ a(ls, { name: "selected" }),
|
|
371
371
|
/* @__PURE__ */ v(os, { children: [
|
|
372
|
-
|
|
372
|
+
p,
|
|
373
373
|
"%"
|
|
374
374
|
] })
|
|
375
375
|
] })
|
|
@@ -378,68 +378,68 @@ const Gt = () => Qe, Zt = () => Qe, Jt = () => x, Kt = /* @__PURE__ */ o("button
|
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
380
|
};
|
|
381
|
-
var ge = typeof window > "u" ? it : rt, ps = ({ isPlaying: t, duration: e, startAt: s = 0, updateInterval: n = 0, onComplete: i, onUpdate:
|
|
382
|
-
let [
|
|
383
|
-
let
|
|
381
|
+
var ge = typeof window > "u" ? it : rt, ps = ({ isPlaying: t, duration: e, startAt: s = 0, updateInterval: n = 0, onComplete: i, onUpdate: p }) => {
|
|
382
|
+
let [d, f] = $(s), h = E(0), g = E(s), N = E(s * -1e3), z = E(null), l = E(null), y = E(null), M = (c) => {
|
|
383
|
+
let u = c / 1e3;
|
|
384
384
|
if (l.current === null) {
|
|
385
|
-
l.current =
|
|
385
|
+
l.current = u, z.current = requestAnimationFrame(M);
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
388
|
-
let I =
|
|
389
|
-
l.current =
|
|
388
|
+
let I = u - l.current, _ = h.current + I;
|
|
389
|
+
l.current = u, h.current = _;
|
|
390
390
|
let A = g.current + (n === 0 ? _ : (_ / n | 0) * n), T = g.current + _, S = typeof e == "number" && T >= e;
|
|
391
391
|
f(S ? e : A), S || (z.current = requestAnimationFrame(M));
|
|
392
392
|
}, r = () => {
|
|
393
393
|
z.current && cancelAnimationFrame(z.current), y.current && clearTimeout(y.current), l.current = null;
|
|
394
|
-
},
|
|
395
|
-
r(),
|
|
396
|
-
let
|
|
397
|
-
g.current =
|
|
394
|
+
}, m = G((c) => {
|
|
395
|
+
r(), h.current = 0;
|
|
396
|
+
let u = typeof c == "number" ? c : s;
|
|
397
|
+
g.current = u, f(u), t && (z.current = requestAnimationFrame(M));
|
|
398
398
|
}, [t, s]);
|
|
399
399
|
return ge(() => {
|
|
400
|
-
if (
|
|
400
|
+
if (p == null || p(d), e && d >= e) {
|
|
401
401
|
N.current += e * 1e3;
|
|
402
|
-
let { shouldRepeat: c = !1, delay:
|
|
403
|
-
c && (y.current = setTimeout(() =>
|
|
402
|
+
let { shouldRepeat: c = !1, delay: u = 0, newStartAt: I } = (i == null ? void 0 : i(N.current / 1e3)) || {};
|
|
403
|
+
c && (y.current = setTimeout(() => m(I), u * 1e3));
|
|
404
404
|
}
|
|
405
|
-
}, [
|
|
405
|
+
}, [d, e]), ge(() => (t && (z.current = requestAnimationFrame(M)), r), [t, e, n]), { elapsedTime: d, reset: m };
|
|
406
406
|
}, hs = (t, e, s) => {
|
|
407
|
-
let n = t / 2, i = e / 2,
|
|
408
|
-
return { path: `m ${n},${i} a ${
|
|
409
|
-
}, Ie = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, ms = (t) => ({ position: "relative", width: t, height: t }), fs = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" },
|
|
407
|
+
let n = t / 2, i = e / 2, p = n - i, d = 2 * p, f = s === "clockwise" ? "1,0" : "0,1", h = 2 * Math.PI * p;
|
|
408
|
+
return { path: `m ${n},${i} a ${p},${p} 0 ${f} 0,${d} a ${p},${p} 0 ${f} 0,-${d}`, pathLength: h };
|
|
409
|
+
}, Ie = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, ms = (t) => ({ position: "relative", width: t, height: t }), fs = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Qe = (t, e, s, n, i) => {
|
|
410
410
|
if (n === 0)
|
|
411
411
|
return e;
|
|
412
|
-
let
|
|
413
|
-
return e + s *
|
|
412
|
+
let p = (i ? n - t : t) / n;
|
|
413
|
+
return e + s * p;
|
|
414
414
|
}, ve = (t) => {
|
|
415
415
|
var e, s;
|
|
416
|
-
return (s = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, i,
|
|
416
|
+
return (s = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, i, p, d) => `#${i}${i}${p}${p}${d}${d}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((n) => parseInt(n, 16))) != null ? s : [];
|
|
417
417
|
}, gs = (t, e) => {
|
|
418
418
|
var s;
|
|
419
|
-
let { colors: n, colorsTime: i, isSmoothColorTransition:
|
|
419
|
+
let { colors: n, colorsTime: i, isSmoothColorTransition: p = !0 } = t;
|
|
420
420
|
if (typeof n == "string")
|
|
421
421
|
return n;
|
|
422
|
-
let
|
|
423
|
-
if (!i ||
|
|
422
|
+
let d = (s = i == null ? void 0 : i.findIndex((l, y) => l >= e && e >= i[y + 1])) != null ? s : -1;
|
|
423
|
+
if (!i || d === -1)
|
|
424
424
|
return n[0];
|
|
425
|
-
if (!
|
|
426
|
-
return n[
|
|
427
|
-
let f = i[
|
|
428
|
-
return `rgb(${g.map((l, y) =>
|
|
425
|
+
if (!p)
|
|
426
|
+
return n[d];
|
|
427
|
+
let f = i[d] - e, h = i[d] - i[d + 1], g = ve(n[d]), N = ve(n[d + 1]), z = !!t.isGrowing;
|
|
428
|
+
return `rgb(${g.map((l, y) => Qe(f, l, N[y] - l, h, z) | 0).join(",")})`;
|
|
429
429
|
}, Is = (t) => {
|
|
430
|
-
let { duration: e, initialRemainingTime: s, updateInterval: n, size: i = 180, strokeWidth:
|
|
431
|
-
let I = Math.ceil(e -
|
|
430
|
+
let { duration: e, initialRemainingTime: s, updateInterval: n, size: i = 180, strokeWidth: p = 12, trailStrokeWidth: d, isPlaying: f = !1, isGrowing: h = !1, rotation: g = "clockwise", onComplete: N, onUpdate: z } = t, l = E(), y = Math.max(p, d ?? 0), { path: M, pathLength: r } = hs(i, y, g), { elapsedTime: m } = ps({ isPlaying: f, duration: e, startAt: Ie(e, s), updateInterval: n, onUpdate: typeof z == "function" ? (u) => {
|
|
431
|
+
let I = Math.ceil(e - u);
|
|
432
432
|
I !== l.current && (l.current = I, z(I));
|
|
433
|
-
} : void 0, onComplete: typeof N == "function" ? (
|
|
433
|
+
} : void 0, onComplete: typeof N == "function" ? (u) => {
|
|
434
434
|
var I;
|
|
435
|
-
let { shouldRepeat: _, delay: A, newInitialRemainingTime: T } = (I = N(
|
|
435
|
+
let { shouldRepeat: _, delay: A, newInitialRemainingTime: T } = (I = N(u)) != null ? I : {};
|
|
436
436
|
if (_)
|
|
437
437
|
return { shouldRepeat: _, delay: A, newStartAt: Ie(e, T) };
|
|
438
|
-
} : void 0 }), c = e -
|
|
439
|
-
return { elapsedTime:
|
|
438
|
+
} : void 0 }), c = e - m;
|
|
439
|
+
return { elapsedTime: m, path: M, pathLength: r, remainingTime: Math.ceil(c), rotation: g, size: i, stroke: gs(t, c), strokeDashoffset: Qe(m, 0, r, e, h), strokeWidth: p };
|
|
440
440
|
}, qe = (t) => {
|
|
441
|
-
let { children: e, strokeLinecap: s, trailColor: n, trailStrokeWidth: i } = t, { path:
|
|
442
|
-
return
|
|
441
|
+
let { children: e, strokeLinecap: s, trailColor: n, trailStrokeWidth: i } = t, { path: p, pathLength: d, stroke: f, strokeDashoffset: h, remainingTime: g, elapsedTime: N, size: z, strokeWidth: l } = Is(t);
|
|
442
|
+
return U.createElement("div", { style: ms(z) }, U.createElement("svg", { viewBox: `0 0 ${z} ${z}`, width: z, height: z, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: p, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: i ?? l }), U.createElement("path", { d: p, fill: "none", stroke: f, strokeLinecap: s ?? "round", strokeWidth: l, strokeDasharray: d, strokeDashoffset: h })), typeof e == "function" && U.createElement("div", { style: fs }, e({ remainingTime: g, elapsedTime: N, color: f })));
|
|
443
443
|
};
|
|
444
444
|
qe.displayName = "CountdownCircleTimer";
|
|
445
445
|
const vs = [C.PRIMARY_GREEN1, C.SECONDARY_RED1, C.SECONDARY_RED1], Ms = [10, 10, 0], ys = /* @__PURE__ */ o("div")({
|
|
@@ -451,14 +451,14 @@ const vs = [C.PRIMARY_GREEN1, C.SECONDARY_RED1, C.SECONDARY_RED1], Ms = [10, 10,
|
|
|
451
451
|
duration: e = 30,
|
|
452
452
|
onTimerExpired: s
|
|
453
453
|
}) => {
|
|
454
|
-
const [n, i] = $(e > 10 ? zs : Me),
|
|
455
|
-
remainingTime:
|
|
454
|
+
const [n, i] = $(e > 10 ? zs : Me), p = ({
|
|
455
|
+
remainingTime: h
|
|
456
456
|
}) => /* @__PURE__ */ a(ys, {
|
|
457
|
-
children:
|
|
458
|
-
}),
|
|
457
|
+
children: h
|
|
458
|
+
}), d = G(() => {
|
|
459
459
|
s == null || s(), i(Ns);
|
|
460
|
-
}, [s, i]), f = G((
|
|
461
|
-
|
|
460
|
+
}, [s, i]), f = G((h) => {
|
|
461
|
+
h === 10 && i(Me);
|
|
462
462
|
}, [i]);
|
|
463
463
|
return /* @__PURE__ */ a(qe, {
|
|
464
464
|
isPlaying: t,
|
|
@@ -469,9 +469,9 @@ const vs = [C.PRIMARY_GREEN1, C.SECONDARY_RED1, C.SECONDARY_RED1], Ms = [10, 10,
|
|
|
469
469
|
strokeWidth: 2,
|
|
470
470
|
trailStrokeWidth: 2,
|
|
471
471
|
trailColor: n,
|
|
472
|
-
onComplete:
|
|
472
|
+
onComplete: d,
|
|
473
473
|
onUpdate: f,
|
|
474
|
-
children:
|
|
474
|
+
children: p
|
|
475
475
|
});
|
|
476
476
|
};
|
|
477
477
|
const _s = () => x, Ts = /* @__PURE__ */ o("div")({
|
|
@@ -516,32 +516,32 @@ const _s = () => x, Ts = /* @__PURE__ */ o("div")({
|
|
|
516
516
|
n && /* @__PURE__ */ a(As, { isPlaying: s, onTimerExpired: i })
|
|
517
517
|
] }), Es = ({ openedQuestion: t, vote: e }) => {
|
|
518
518
|
var s;
|
|
519
|
-
const n = t.subject, i = t.type,
|
|
520
|
-
async (
|
|
519
|
+
const n = t.subject, i = t.type, p = (s = t.options) == null ? void 0 : s.options, [d, f] = $(!1), [h, g] = $(!1), [N, z] = $(""), l = t == null ? void 0 : t.id, y = G(
|
|
520
|
+
async (u) => {
|
|
521
521
|
if (l) {
|
|
522
|
-
const I =
|
|
522
|
+
const I = u.currentTarget.value;
|
|
523
523
|
z(I), g(!0), await e(l, I), g(!1);
|
|
524
524
|
}
|
|
525
525
|
},
|
|
526
526
|
[l, z, e]
|
|
527
527
|
), M = H(
|
|
528
|
-
() => t == null ? void 0 : t.answers.find((
|
|
528
|
+
() => t == null ? void 0 : t.answers.find((u) => u.youVoted === !0),
|
|
529
529
|
[t]
|
|
530
530
|
), r = H(
|
|
531
|
-
() => !!(t != null && t.answers.find((
|
|
531
|
+
() => !!(t != null && t.answers.find((u) => u.correct === !0)),
|
|
532
532
|
[t]
|
|
533
|
-
),
|
|
534
|
-
...
|
|
533
|
+
), m = H(() => t ? t.answers.map((u) => ({
|
|
534
|
+
...u,
|
|
535
535
|
questionVoted: !!M,
|
|
536
|
-
youSelected: N ===
|
|
537
|
-
isLoading:
|
|
536
|
+
youSelected: N === u.id,
|
|
537
|
+
isLoading: h,
|
|
538
538
|
hasCorrectAnswer: r,
|
|
539
539
|
questionType: t.type,
|
|
540
|
-
answerTimeExpired:
|
|
540
|
+
answerTimeExpired: d,
|
|
541
541
|
questionStatus: t.status,
|
|
542
542
|
// ToDo: Figure out why imageMode is not in the response
|
|
543
543
|
onVote: y
|
|
544
|
-
})) : [], [r,
|
|
544
|
+
})) : [], [r, d, h, t, M, y, N]), c = p && (p.case === "trivia" || p.case === "prediction") ? p.value : void 0;
|
|
545
545
|
return /* @__PURE__ */ a(Le, { "data-question-header": "true", children: /* @__PURE__ */ a(Ft, { children: /* @__PURE__ */ v(Vt, { children: [
|
|
546
546
|
c && /* @__PURE__ */ a(
|
|
547
547
|
Wt,
|
|
@@ -557,14 +557,14 @@ const _s = () => x, Ts = /* @__PURE__ */ o("div")({
|
|
|
557
557
|
/* @__PURE__ */ a(
|
|
558
558
|
Os,
|
|
559
559
|
{
|
|
560
|
-
title:
|
|
561
|
-
points:
|
|
560
|
+
title: d ? "Expired" : "To win",
|
|
561
|
+
points: d ? void 0 : 100,
|
|
562
562
|
onTimerExpired: () => f(!0),
|
|
563
563
|
isTimer: !0
|
|
564
564
|
}
|
|
565
565
|
),
|
|
566
566
|
/* @__PURE__ */ a(Ht, { children: n }),
|
|
567
|
-
/* @__PURE__ */ a(Bt, { children:
|
|
567
|
+
/* @__PURE__ */ a(Bt, { children: m.map((u) => /* @__PURE__ */ a(us, { ...u }, u.id)) })
|
|
568
568
|
] }) }) });
|
|
569
569
|
};
|
|
570
570
|
const js = /* @__PURE__ */ o("div")({
|
|
@@ -612,17 +612,17 @@ const js = /* @__PURE__ */ o("div")({
|
|
|
612
612
|
] })
|
|
613
613
|
] });
|
|
614
614
|
};
|
|
615
|
-
const
|
|
615
|
+
const Us = /* @__PURE__ */ o("div")({
|
|
616
616
|
name: "o",
|
|
617
617
|
class: "o18unvw4",
|
|
618
618
|
propsAsIs: !1
|
|
619
|
-
}),
|
|
619
|
+
}), Qs = /* @__PURE__ */ o("a")({
|
|
620
620
|
name: "n",
|
|
621
621
|
class: "ns0uvk8",
|
|
622
622
|
propsAsIs: !1
|
|
623
|
-
}), qs = ({ instantView: t, ...e }) => /* @__PURE__ */ v(
|
|
623
|
+
}), qs = ({ instantView: t, ...e }) => /* @__PURE__ */ v(Us, { children: [
|
|
624
624
|
/* @__PURE__ */ a(Ye, { instantView: t, ...e }),
|
|
625
|
-
(t == null ? void 0 : t.webLink) && /* @__PURE__ */ v(
|
|
625
|
+
(t == null ? void 0 : t.webLink) && /* @__PURE__ */ v(Qs, { href: t == null ? void 0 : t.webLink.url, target: "_blank", children: [
|
|
626
626
|
"Explore more of the Masters History",
|
|
627
627
|
/* @__PURE__ */ a(x, { name: "icon-external-link" })
|
|
628
628
|
] })
|
|
@@ -688,7 +688,7 @@ const Vs = /* @__PURE__ */ o("div")({
|
|
|
688
688
|
class: "i1vk8ojx",
|
|
689
689
|
propsAsIs: !1
|
|
690
690
|
});
|
|
691
|
-
var
|
|
691
|
+
var Q = /* @__PURE__ */ ((t) => (t.HOME = "home", t.LEADERBOARD = "leaderboard", t))(Q || {});
|
|
692
692
|
const ye = ({ title: t, active: e, onClick: s }) => /* @__PURE__ */ a(Bs, { onClick: s, "data-selected": e, children: /* @__PURE__ */ a(Gs, { children: t }) }), Zs = ({ activePage: t = "home", toggleActivePage: e }) => /* @__PURE__ */ a(Vs, { children: /* @__PURE__ */ v(Hs, { "data-position": t === "home" ? "left" : "right", children: [
|
|
693
693
|
/* @__PURE__ */ a(ye, { title: "Home", active: t === "home", onClick: () => e(
|
|
694
694
|
"home"
|
|
@@ -723,34 +723,34 @@ X == null || Ae == null ? (ie = K, re = function(e) {
|
|
|
723
723
|
return [s, n];
|
|
724
724
|
});
|
|
725
725
|
function Js(t) {
|
|
726
|
-
let e, s, n, i,
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
729
|
-
|
|
730
|
-
const
|
|
726
|
+
let e, s, n, i, p, d, f;
|
|
727
|
+
const h = typeof document < "u" && document.attachEvent;
|
|
728
|
+
if (!h) {
|
|
729
|
+
d = function(c) {
|
|
730
|
+
const u = c.__resizeTriggers__, I = u.firstElementChild, _ = u.lastElementChild, A = I.firstElementChild;
|
|
731
731
|
_.scrollLeft = _.scrollWidth, _.scrollTop = _.scrollHeight, A.style.width = I.offsetWidth + 1 + "px", A.style.height = I.offsetHeight + 1 + "px", I.scrollLeft = I.scrollWidth, I.scrollTop = I.scrollHeight;
|
|
732
|
-
},
|
|
732
|
+
}, p = function(c) {
|
|
733
733
|
return c.offsetWidth !== c.__resizeLast__.width || c.offsetHeight !== c.__resizeLast__.height;
|
|
734
734
|
}, f = function(c) {
|
|
735
735
|
if (c.target.className && typeof c.target.className.indexOf == "function" && c.target.className.indexOf("contract-trigger") < 0 && c.target.className.indexOf("expand-trigger") < 0)
|
|
736
736
|
return;
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
A.call(
|
|
737
|
+
const u = this;
|
|
738
|
+
d(this), this.__resizeRAF__ && ie(this.__resizeRAF__), this.__resizeRAF__ = re(function() {
|
|
739
|
+
p(u) && (u.__resizeLast__.width = u.offsetWidth, u.__resizeLast__.height = u.offsetHeight, u.__resizeListeners__.forEach(function(A) {
|
|
740
|
+
A.call(u, c);
|
|
741
741
|
}));
|
|
742
742
|
});
|
|
743
743
|
};
|
|
744
744
|
let l = !1, y = "";
|
|
745
745
|
n = "animationstart";
|
|
746
746
|
const M = "Webkit Moz O ms".split(" ");
|
|
747
|
-
let r = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),
|
|
747
|
+
let r = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), m = "";
|
|
748
748
|
{
|
|
749
749
|
const c = document.createElement("fakeelement");
|
|
750
750
|
if (c.style.animationName !== void 0 && (l = !0), l === !1) {
|
|
751
|
-
for (let
|
|
752
|
-
if (c.style[M[
|
|
753
|
-
|
|
751
|
+
for (let u = 0; u < M.length; u++)
|
|
752
|
+
if (c.style[M[u] + "AnimationName"] !== void 0) {
|
|
753
|
+
m = M[u], y = "-" + m.toLowerCase() + "-", n = r[u], l = !0;
|
|
754
754
|
break;
|
|
755
755
|
}
|
|
756
756
|
}
|
|
@@ -765,24 +765,24 @@ function Js(t) {
|
|
|
765
765
|
};
|
|
766
766
|
return {
|
|
767
767
|
addResizeListener: function(l, y) {
|
|
768
|
-
if (
|
|
768
|
+
if (h)
|
|
769
769
|
l.attachEvent("onresize", y);
|
|
770
770
|
else {
|
|
771
771
|
if (!l.__resizeTriggers__) {
|
|
772
772
|
const M = l.ownerDocument, r = w.getComputedStyle(l);
|
|
773
773
|
r && r.position === "static" && (l.style.position = "relative"), g(M), l.__resizeLast__ = {}, l.__resizeListeners__ = [], (l.__resizeTriggers__ = M.createElement("div")).className = "resize-triggers";
|
|
774
|
-
const
|
|
775
|
-
|
|
774
|
+
const m = M.createElement("div");
|
|
775
|
+
m.className = "expand-trigger", m.appendChild(M.createElement("div"));
|
|
776
776
|
const c = M.createElement("div");
|
|
777
|
-
c.className = "contract-trigger", l.__resizeTriggers__.appendChild(
|
|
778
|
-
I.animationName === s &&
|
|
777
|
+
c.className = "contract-trigger", l.__resizeTriggers__.appendChild(m), l.__resizeTriggers__.appendChild(c), l.appendChild(l.__resizeTriggers__), d(l), l.addEventListener("scroll", f, !0), n && (l.__resizeTriggers__.__animationListener__ = function(I) {
|
|
778
|
+
I.animationName === s && d(l);
|
|
779
779
|
}, l.__resizeTriggers__.addEventListener(n, l.__resizeTriggers__.__animationListener__));
|
|
780
780
|
}
|
|
781
781
|
l.__resizeListeners__.push(y);
|
|
782
782
|
}
|
|
783
783
|
},
|
|
784
784
|
removeResizeListener: function(l, y) {
|
|
785
|
-
if (
|
|
785
|
+
if (h)
|
|
786
786
|
l.detachEvent("onresize", y);
|
|
787
787
|
else if (l.__resizeListeners__.splice(l.__resizeListeners__.indexOf(y), 1), !l.__resizeListeners__.length) {
|
|
788
788
|
l.removeEventListener("scroll", f, !0), l.__resizeTriggers__.__animationListener__ && (l.__resizeTriggers__.removeEventListener(n, l.__resizeTriggers__.__animationListener__), l.__resizeTriggers__.__animationListener__ = null);
|
|
@@ -809,18 +809,18 @@ class Ks extends at {
|
|
|
809
809
|
onResize: i
|
|
810
810
|
} = this.props;
|
|
811
811
|
if (this._parentNode) {
|
|
812
|
-
var
|
|
813
|
-
const g = window.getComputedStyle(this._parentNode) || {}, N = parseFloat((
|
|
814
|
-
(!s && (this.state.height !== c || this.state.scaledHeight !== r) || !n && (this.state.width !==
|
|
812
|
+
var p, d, f, h;
|
|
813
|
+
const g = window.getComputedStyle(this._parentNode) || {}, N = parseFloat((p = g.paddingLeft) !== null && p !== void 0 ? p : "0"), z = parseFloat((d = g.paddingRight) !== null && d !== void 0 ? d : "0"), l = parseFloat((f = g.paddingTop) !== null && f !== void 0 ? f : "0"), y = parseFloat((h = g.paddingBottom) !== null && h !== void 0 ? h : "0"), M = this._parentNode.getBoundingClientRect(), r = M.height - l - y, m = M.width - N - z, c = this._parentNode.offsetHeight - l - y, u = this._parentNode.offsetWidth - N - z;
|
|
814
|
+
(!s && (this.state.height !== c || this.state.scaledHeight !== r) || !n && (this.state.width !== u || this.state.scaledWidth !== m)) && (this.setState({
|
|
815
815
|
height: c,
|
|
816
|
-
width:
|
|
816
|
+
width: u,
|
|
817
817
|
scaledHeight: r,
|
|
818
|
-
scaledWidth:
|
|
818
|
+
scaledWidth: m
|
|
819
819
|
}), typeof i == "function" && i({
|
|
820
820
|
height: c,
|
|
821
821
|
scaledHeight: r,
|
|
822
|
-
scaledWidth:
|
|
823
|
-
width:
|
|
822
|
+
scaledWidth: m,
|
|
823
|
+
width: u
|
|
824
824
|
}));
|
|
825
825
|
}
|
|
826
826
|
}, this._setRef = (s) => {
|
|
@@ -844,10 +844,10 @@ class Ks extends at {
|
|
|
844
844
|
defaultHeight: s,
|
|
845
845
|
defaultWidth: n,
|
|
846
846
|
disableHeight: i = !1,
|
|
847
|
-
disableWidth:
|
|
848
|
-
nonce:
|
|
847
|
+
disableWidth: p = !1,
|
|
848
|
+
nonce: d,
|
|
849
849
|
onResize: f,
|
|
850
|
-
style:
|
|
850
|
+
style: h = {},
|
|
851
851
|
tagName: g = "div",
|
|
852
852
|
...N
|
|
853
853
|
} = this.props, {
|
|
@@ -857,16 +857,16 @@ class Ks extends at {
|
|
|
857
857
|
width: M
|
|
858
858
|
} = this.state, r = {
|
|
859
859
|
overflow: "visible"
|
|
860
|
-
},
|
|
860
|
+
}, m = {};
|
|
861
861
|
let c = !1;
|
|
862
|
-
return i || (z === 0 && (c = !0), r.height = 0,
|
|
862
|
+
return i || (z === 0 && (c = !0), r.height = 0, m.height = z, m.scaledHeight = l), p || (M === 0 && (c = !0), r.width = 0, m.width = M, m.scaledWidth = y), B(g, {
|
|
863
863
|
ref: this._setRef,
|
|
864
864
|
style: {
|
|
865
865
|
...r,
|
|
866
|
-
...
|
|
866
|
+
...h
|
|
867
867
|
},
|
|
868
868
|
...N
|
|
869
|
-
}, !c && e(
|
|
869
|
+
}, !c && e(m));
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
function ae() {
|
|
@@ -908,13 +908,13 @@ function tn(t, e) {
|
|
|
908
908
|
}
|
|
909
909
|
function ee(t, e) {
|
|
910
910
|
e === void 0 && (e = tn);
|
|
911
|
-
var s, n = [], i,
|
|
912
|
-
function
|
|
913
|
-
for (var f = [],
|
|
914
|
-
f[
|
|
915
|
-
return
|
|
911
|
+
var s, n = [], i, p = !1;
|
|
912
|
+
function d() {
|
|
913
|
+
for (var f = [], h = 0; h < arguments.length; h++)
|
|
914
|
+
f[h] = arguments[h];
|
|
915
|
+
return p && s === this && e(f, n) || (i = t.apply(this, f), p = !0, s = this, n = f), i;
|
|
916
916
|
}
|
|
917
|
-
return
|
|
917
|
+
return d;
|
|
918
918
|
}
|
|
919
919
|
var sn = typeof performance == "object" && typeof performance.now == "function", Se = sn ? function() {
|
|
920
920
|
return performance.now();
|
|
@@ -956,37 +956,37 @@ var rn = 150, an = function(e, s) {
|
|
|
956
956
|
return e;
|
|
957
957
|
};
|
|
958
958
|
function on(t) {
|
|
959
|
-
var e, s = t.getItemOffset, n = t.getEstimatedTotalSize, i = t.getItemSize,
|
|
959
|
+
var e, s = t.getItemOffset, n = t.getEstimatedTotalSize, i = t.getItemSize, p = t.getOffsetForIndexAndAlignment, d = t.getStartIndexForOffset, f = t.getStopIndexForStartIndex, h = t.initInstanceProps, g = t.shouldResetStyleCacheOnItemSizeChange, N = t.validateProps;
|
|
960
960
|
return e = /* @__PURE__ */ function(z) {
|
|
961
961
|
Xs(l, z);
|
|
962
962
|
function l(M) {
|
|
963
963
|
var r;
|
|
964
|
-
return r = z.call(this, M) || this, r._instanceProps =
|
|
964
|
+
return r = z.call(this, M) || this, r._instanceProps = h(r.props, _e(r)), r._outerRef = void 0, r._resetIsScrollingTimeoutId = null, r.state = {
|
|
965
965
|
instance: _e(r),
|
|
966
966
|
isScrolling: !1,
|
|
967
967
|
scrollDirection: "forward",
|
|
968
968
|
scrollOffset: typeof r.props.initialScrollOffset == "number" ? r.props.initialScrollOffset : 0,
|
|
969
969
|
scrollUpdateWasRequested: !1
|
|
970
|
-
}, r._callOnItemsRendered = void 0, r._callOnItemsRendered = ee(function(
|
|
970
|
+
}, r._callOnItemsRendered = void 0, r._callOnItemsRendered = ee(function(m, c, u, I) {
|
|
971
971
|
return r.props.onItemsRendered({
|
|
972
|
-
overscanStartIndex:
|
|
972
|
+
overscanStartIndex: m,
|
|
973
973
|
overscanStopIndex: c,
|
|
974
|
-
visibleStartIndex:
|
|
974
|
+
visibleStartIndex: u,
|
|
975
975
|
visibleStopIndex: I
|
|
976
976
|
});
|
|
977
|
-
}), r._callOnScroll = void 0, r._callOnScroll = ee(function(
|
|
977
|
+
}), r._callOnScroll = void 0, r._callOnScroll = ee(function(m, c, u) {
|
|
978
978
|
return r.props.onScroll({
|
|
979
|
-
scrollDirection:
|
|
979
|
+
scrollDirection: m,
|
|
980
980
|
scrollOffset: c,
|
|
981
|
-
scrollUpdateWasRequested:
|
|
981
|
+
scrollUpdateWasRequested: u
|
|
982
982
|
});
|
|
983
|
-
}), r._getItemStyle = void 0, r._getItemStyle = function(
|
|
984
|
-
var c = r.props,
|
|
985
|
-
if (A.hasOwnProperty(
|
|
986
|
-
T = A[
|
|
983
|
+
}), r._getItemStyle = void 0, r._getItemStyle = function(m) {
|
|
984
|
+
var c = r.props, u = c.direction, I = c.itemSize, _ = c.layout, A = r._getItemStyleCache(g && I, g && _, g && u), T;
|
|
985
|
+
if (A.hasOwnProperty(m))
|
|
986
|
+
T = A[m];
|
|
987
987
|
else {
|
|
988
|
-
var S = s(r.props,
|
|
989
|
-
A[
|
|
988
|
+
var S = s(r.props, m, r._instanceProps), k = i(r.props, m, r._instanceProps), b = u === "horizontal" || _ === "horizontal", P = u === "rtl", W = b ? S : 0;
|
|
989
|
+
A[m] = T = {
|
|
990
990
|
position: "absolute",
|
|
991
991
|
left: P ? void 0 : W,
|
|
992
992
|
right: P ? W : void 0,
|
|
@@ -996,10 +996,10 @@ function on(t) {
|
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
998
|
return T;
|
|
999
|
-
}, r._getItemStyleCache = void 0, r._getItemStyleCache = ee(function(
|
|
999
|
+
}, r._getItemStyleCache = void 0, r._getItemStyleCache = ee(function(m, c, u) {
|
|
1000
1000
|
return {};
|
|
1001
|
-
}), r._onScrollHorizontal = function(
|
|
1002
|
-
var c =
|
|
1001
|
+
}), r._onScrollHorizontal = function(m) {
|
|
1002
|
+
var c = m.currentTarget, u = c.clientWidth, I = c.scrollLeft, _ = c.scrollWidth;
|
|
1003
1003
|
r.setState(function(A) {
|
|
1004
1004
|
if (A.scrollOffset === I)
|
|
1005
1005
|
return null;
|
|
@@ -1010,22 +1010,22 @@ function on(t) {
|
|
|
1010
1010
|
S = -I;
|
|
1011
1011
|
break;
|
|
1012
1012
|
case "positive-descending":
|
|
1013
|
-
S = _ -
|
|
1013
|
+
S = _ - u - I;
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
|
-
return S = Math.max(0, Math.min(S, _ -
|
|
1016
|
+
return S = Math.max(0, Math.min(S, _ - u)), {
|
|
1017
1017
|
isScrolling: !0,
|
|
1018
1018
|
scrollDirection: A.scrollOffset < I ? "forward" : "backward",
|
|
1019
1019
|
scrollOffset: S,
|
|
1020
1020
|
scrollUpdateWasRequested: !1
|
|
1021
1021
|
};
|
|
1022
1022
|
}, r._resetIsScrollingDebounced);
|
|
1023
|
-
}, r._onScrollVertical = function(
|
|
1024
|
-
var c =
|
|
1023
|
+
}, r._onScrollVertical = function(m) {
|
|
1024
|
+
var c = m.currentTarget, u = c.clientHeight, I = c.scrollHeight, _ = c.scrollTop;
|
|
1025
1025
|
r.setState(function(A) {
|
|
1026
1026
|
if (A.scrollOffset === _)
|
|
1027
1027
|
return null;
|
|
1028
|
-
var T = Math.max(0, Math.min(_, I -
|
|
1028
|
+
var T = Math.max(0, Math.min(_, I - u));
|
|
1029
1029
|
return {
|
|
1030
1030
|
isScrolling: !0,
|
|
1031
1031
|
scrollDirection: A.scrollOffset < T ? "forward" : "backward",
|
|
@@ -1033,9 +1033,9 @@ function on(t) {
|
|
|
1033
1033
|
scrollUpdateWasRequested: !1
|
|
1034
1034
|
};
|
|
1035
1035
|
}, r._resetIsScrollingDebounced);
|
|
1036
|
-
}, r._outerRefSetter = function(
|
|
1036
|
+
}, r._outerRefSetter = function(m) {
|
|
1037
1037
|
var c = r.props.outerRef;
|
|
1038
|
-
r._outerRef =
|
|
1038
|
+
r._outerRef = m, typeof c == "function" ? c(m) : c != null && typeof c == "object" && c.hasOwnProperty("current") && (c.current = m);
|
|
1039
1039
|
}, r._resetIsScrollingDebounced = function() {
|
|
1040
1040
|
r._resetIsScrollingTimeoutId !== null && xe(r._resetIsScrollingTimeoutId), r._resetIsScrollingTimeoutId = nn(r._resetIsScrolling, rn);
|
|
1041
1041
|
}, r._resetIsScrolling = function() {
|
|
@@ -1046,41 +1046,41 @@ function on(t) {
|
|
|
1046
1046
|
});
|
|
1047
1047
|
}, r;
|
|
1048
1048
|
}
|
|
1049
|
-
l.getDerivedStateFromProps = function(r,
|
|
1050
|
-
return ln(r,
|
|
1049
|
+
l.getDerivedStateFromProps = function(r, m) {
|
|
1050
|
+
return ln(r, m), N(r), null;
|
|
1051
1051
|
};
|
|
1052
1052
|
var y = l.prototype;
|
|
1053
1053
|
return y.scrollTo = function(r) {
|
|
1054
|
-
r = Math.max(0, r), this.setState(function(
|
|
1055
|
-
return
|
|
1056
|
-
scrollDirection:
|
|
1054
|
+
r = Math.max(0, r), this.setState(function(m) {
|
|
1055
|
+
return m.scrollOffset === r ? null : {
|
|
1056
|
+
scrollDirection: m.scrollOffset < r ? "forward" : "backward",
|
|
1057
1057
|
scrollOffset: r,
|
|
1058
1058
|
scrollUpdateWasRequested: !0
|
|
1059
1059
|
};
|
|
1060
1060
|
}, this._resetIsScrollingDebounced);
|
|
1061
|
-
}, y.scrollToItem = function(r,
|
|
1062
|
-
|
|
1063
|
-
var c = this.props,
|
|
1064
|
-
r = Math.max(0, Math.min(r,
|
|
1061
|
+
}, y.scrollToItem = function(r, m) {
|
|
1062
|
+
m === void 0 && (m = "auto");
|
|
1063
|
+
var c = this.props, u = c.itemCount, I = c.layout, _ = this.state.scrollOffset;
|
|
1064
|
+
r = Math.max(0, Math.min(r, u - 1));
|
|
1065
1065
|
var A = 0;
|
|
1066
1066
|
if (this._outerRef) {
|
|
1067
1067
|
var T = this._outerRef;
|
|
1068
1068
|
I === "vertical" ? A = T.scrollWidth > T.clientWidth ? De() : 0 : A = T.scrollHeight > T.clientHeight ? De() : 0;
|
|
1069
1069
|
}
|
|
1070
|
-
this.scrollTo(
|
|
1070
|
+
this.scrollTo(p(this.props, r, m, _, this._instanceProps, A));
|
|
1071
1071
|
}, y.componentDidMount = function() {
|
|
1072
|
-
var r = this.props,
|
|
1072
|
+
var r = this.props, m = r.direction, c = r.initialScrollOffset, u = r.layout;
|
|
1073
1073
|
if (typeof c == "number" && this._outerRef != null) {
|
|
1074
1074
|
var I = this._outerRef;
|
|
1075
|
-
|
|
1075
|
+
m === "horizontal" || u === "horizontal" ? I.scrollLeft = c : I.scrollTop = c;
|
|
1076
1076
|
}
|
|
1077
1077
|
this._callPropsCallbacks();
|
|
1078
1078
|
}, y.componentDidUpdate = function() {
|
|
1079
|
-
var r = this.props,
|
|
1079
|
+
var r = this.props, m = r.direction, c = r.layout, u = this.state, I = u.scrollOffset, _ = u.scrollUpdateWasRequested;
|
|
1080
1080
|
if (_ && this._outerRef != null) {
|
|
1081
1081
|
var A = this._outerRef;
|
|
1082
|
-
if (
|
|
1083
|
-
if (
|
|
1082
|
+
if (m === "horizontal" || c === "horizontal")
|
|
1083
|
+
if (m === "rtl")
|
|
1084
1084
|
switch (we()) {
|
|
1085
1085
|
case "negative":
|
|
1086
1086
|
A.scrollLeft = -I;
|
|
@@ -1102,10 +1102,10 @@ function on(t) {
|
|
|
1102
1102
|
}, y.componentWillUnmount = function() {
|
|
1103
1103
|
this._resetIsScrollingTimeoutId !== null && xe(this._resetIsScrollingTimeoutId);
|
|
1104
1104
|
}, y.render = function() {
|
|
1105
|
-
var r = this.props,
|
|
1105
|
+
var r = this.props, m = r.children, c = r.className, u = r.direction, I = r.height, _ = r.innerRef, A = r.innerElementType, T = r.innerTagName, S = r.itemCount, k = r.itemData, b = r.itemKey, P = b === void 0 ? an : b, W = r.layout, Pe = r.outerElementType, We = r.outerTagName, Fe = r.style, Ve = r.useIsScrolling, He = r.width, le = this.state.isScrolling, Z = u === "horizontal" || W === "horizontal", Be = Z ? this._onScrollHorizontal : this._onScrollVertical, ce = this._getRangeToRender(), Ge = ce[0], Ze = ce[1], de = [];
|
|
1106
1106
|
if (S > 0)
|
|
1107
1107
|
for (var R = Ge; R <= Ze; R++)
|
|
1108
|
-
de.push(B(
|
|
1108
|
+
de.push(B(m, {
|
|
1109
1109
|
data: k,
|
|
1110
1110
|
key: P(R, k),
|
|
1111
1111
|
index: R,
|
|
@@ -1124,7 +1124,7 @@ function on(t) {
|
|
|
1124
1124
|
overflow: "auto",
|
|
1125
1125
|
WebkitOverflowScrolling: "touch",
|
|
1126
1126
|
willChange: "transform",
|
|
1127
|
-
direction:
|
|
1127
|
+
direction: u
|
|
1128
1128
|
}, Fe)
|
|
1129
1129
|
}, B(A || T || "div", {
|
|
1130
1130
|
children: de,
|
|
@@ -1139,8 +1139,8 @@ function on(t) {
|
|
|
1139
1139
|
if (typeof this.props.onItemsRendered == "function") {
|
|
1140
1140
|
var r = this.props.itemCount;
|
|
1141
1141
|
if (r > 0) {
|
|
1142
|
-
var
|
|
1143
|
-
this._callOnItemsRendered(c,
|
|
1142
|
+
var m = this._getRangeToRender(), c = m[0], u = m[1], I = m[2], _ = m[3];
|
|
1143
|
+
this._callOnItemsRendered(c, u, I, _);
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
if (typeof this.props.onScroll == "function") {
|
|
@@ -1148,11 +1148,11 @@ function on(t) {
|
|
|
1148
1148
|
this._callOnScroll(T, S, k);
|
|
1149
1149
|
}
|
|
1150
1150
|
}, y._getRangeToRender = function() {
|
|
1151
|
-
var r = this.props,
|
|
1152
|
-
if (
|
|
1151
|
+
var r = this.props, m = r.itemCount, c = r.overscanCount, u = this.state, I = u.isScrolling, _ = u.scrollDirection, A = u.scrollOffset;
|
|
1152
|
+
if (m === 0)
|
|
1153
1153
|
return [0, 0, 0, 0];
|
|
1154
|
-
var T =
|
|
1155
|
-
return [Math.max(0, T - k), Math.max(0, Math.min(
|
|
1154
|
+
var T = d(this.props, A, this._instanceProps), S = f(this.props, T, A, this._instanceProps), k = !I || _ === "backward" ? Math.max(1, c) : 1, b = !I || _ === "forward" ? Math.max(1, c) : 1;
|
|
1155
|
+
return [Math.max(0, T - k), Math.max(0, Math.min(m - 1, S + b)), T, S];
|
|
1156
1156
|
}, l;
|
|
1157
1157
|
}(Ce), e.defaultProps = {
|
|
1158
1158
|
direction: "ltr",
|
|
@@ -1177,20 +1177,20 @@ var ln = function(e, s) {
|
|
|
1177
1177
|
var s = e.itemCount, n = e.itemSize;
|
|
1178
1178
|
return n * s;
|
|
1179
1179
|
},
|
|
1180
|
-
getOffsetForIndexAndAlignment: function(e, s, n, i,
|
|
1181
|
-
var f = e.direction,
|
|
1182
|
-
switch (n === "smart" && (i >= c - M && i <=
|
|
1180
|
+
getOffsetForIndexAndAlignment: function(e, s, n, i, p, d) {
|
|
1181
|
+
var f = e.direction, h = e.height, g = e.itemCount, N = e.itemSize, z = e.layout, l = e.width, y = f === "horizontal" || z === "horizontal", M = y ? l : h, r = Math.max(0, g * N - M), m = Math.min(r, s * N), c = Math.max(0, s * N - M + N + d);
|
|
1182
|
+
switch (n === "smart" && (i >= c - M && i <= m + M ? n = "auto" : n = "center"), n) {
|
|
1183
1183
|
case "start":
|
|
1184
|
-
return
|
|
1184
|
+
return m;
|
|
1185
1185
|
case "end":
|
|
1186
1186
|
return c;
|
|
1187
1187
|
case "center": {
|
|
1188
|
-
var
|
|
1189
|
-
return
|
|
1188
|
+
var u = Math.round(c + (m - c) / 2);
|
|
1189
|
+
return u < Math.ceil(M / 2) ? 0 : u > r + Math.floor(M / 2) ? r : u;
|
|
1190
1190
|
}
|
|
1191
1191
|
case "auto":
|
|
1192
1192
|
default:
|
|
1193
|
-
return i >= c && i <=
|
|
1193
|
+
return i >= c && i <= m ? i : i < c ? c : m;
|
|
1194
1194
|
}
|
|
1195
1195
|
},
|
|
1196
1196
|
getStartIndexForOffset: function(e, s) {
|
|
@@ -1198,9 +1198,9 @@ var ln = function(e, s) {
|
|
|
1198
1198
|
return Math.max(0, Math.min(n - 1, Math.floor(s / i)));
|
|
1199
1199
|
},
|
|
1200
1200
|
getStopIndexForStartIndex: function(e, s, n) {
|
|
1201
|
-
var i = e.direction,
|
|
1201
|
+
var i = e.direction, p = e.height, d = e.itemCount, f = e.itemSize, h = e.layout, g = e.width, N = i === "horizontal" || h === "horizontal", z = s * f, l = N ? g : p, y = Math.ceil((l + n - z) / f);
|
|
1202
1202
|
return Math.max(0, Math.min(
|
|
1203
|
-
|
|
1203
|
+
d - 1,
|
|
1204
1204
|
s + y - 1
|
|
1205
1205
|
// -1 is because stop index is inclusive
|
|
1206
1206
|
));
|
|
@@ -1217,24 +1217,24 @@ function dn(t) {
|
|
|
1217
1217
|
return !(n > s || i < e);
|
|
1218
1218
|
}
|
|
1219
1219
|
function un(t) {
|
|
1220
|
-
for (var e = t.isItemLoaded, s = t.itemCount, n = t.minimumBatchSize, i = t.startIndex,
|
|
1220
|
+
for (var e = t.isItemLoaded, s = t.itemCount, n = t.minimumBatchSize, i = t.startIndex, p = t.stopIndex, d = [], f = null, h = null, g = i; g <= p; g++) {
|
|
1221
1221
|
var N = e(g);
|
|
1222
|
-
N ?
|
|
1222
|
+
N ? h !== null && (d.push(f, h), f = h = null) : (h = g, f === null && (f = g));
|
|
1223
1223
|
}
|
|
1224
|
-
if (
|
|
1225
|
-
for (var z = Math.min(Math.max(
|
|
1226
|
-
|
|
1227
|
-
|
|
1224
|
+
if (h !== null) {
|
|
1225
|
+
for (var z = Math.min(Math.max(h, f + n - 1), s - 1), l = h + 1; l <= z && !e(l); l++)
|
|
1226
|
+
h = l;
|
|
1227
|
+
d.push(f, h);
|
|
1228
1228
|
}
|
|
1229
|
-
if (
|
|
1230
|
-
for (;
|
|
1231
|
-
var y =
|
|
1229
|
+
if (d.length)
|
|
1230
|
+
for (; d[1] - d[0] + 1 < n && d[0] > 0; ) {
|
|
1231
|
+
var y = d[0] - 1;
|
|
1232
1232
|
if (!e(y))
|
|
1233
|
-
|
|
1233
|
+
d[0] = y;
|
|
1234
1234
|
else
|
|
1235
1235
|
break;
|
|
1236
1236
|
}
|
|
1237
|
-
return
|
|
1237
|
+
return d;
|
|
1238
1238
|
}
|
|
1239
1239
|
var pn = function(t, e) {
|
|
1240
1240
|
if (!(t instanceof e))
|
|
@@ -1267,16 +1267,16 @@ var pn = function(t, e) {
|
|
|
1267
1267
|
}, fn = function(t) {
|
|
1268
1268
|
mn(e, t);
|
|
1269
1269
|
function e() {
|
|
1270
|
-
var s, n, i,
|
|
1270
|
+
var s, n, i, p;
|
|
1271
1271
|
pn(this, e);
|
|
1272
|
-
for (var
|
|
1273
|
-
f[
|
|
1274
|
-
return
|
|
1272
|
+
for (var d = arguments.length, f = Array(d), h = 0; h < d; h++)
|
|
1273
|
+
f[h] = arguments[h];
|
|
1274
|
+
return p = (n = (i = ke(this, (s = e.__proto__ || Object.getPrototypeOf(e)).call.apply(s, [this].concat(f))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(g) {
|
|
1275
1275
|
var N = g.visibleStartIndex, z = g.visibleStopIndex;
|
|
1276
1276
|
i._lastRenderedStartIndex = N, i._lastRenderedStopIndex = z, i._ensureRowsLoaded(N, z);
|
|
1277
1277
|
}, i._setRef = function(g) {
|
|
1278
1278
|
i._listRef = g;
|
|
1279
|
-
}, n), ke(i,
|
|
1279
|
+
}, n), ke(i, p);
|
|
1280
1280
|
}
|
|
1281
1281
|
return hn(e, [{
|
|
1282
1282
|
key: "resetloadMoreItemsCache",
|
|
@@ -1300,8 +1300,8 @@ var pn = function(t, e) {
|
|
|
1300
1300
|
}, {
|
|
1301
1301
|
key: "_ensureRowsLoaded",
|
|
1302
1302
|
value: function(n, i) {
|
|
1303
|
-
var
|
|
1304
|
-
isItemLoaded:
|
|
1303
|
+
var p = this.props, d = p.isItemLoaded, f = p.itemCount, h = p.minimumBatchSize, g = h === void 0 ? 10 : h, N = p.threshold, z = N === void 0 ? 15 : N, l = un({
|
|
1304
|
+
isItemLoaded: d,
|
|
1305
1305
|
itemCount: f,
|
|
1306
1306
|
minimumBatchSize: g,
|
|
1307
1307
|
startIndex: Math.max(0, n - z),
|
|
@@ -1314,8 +1314,8 @@ var pn = function(t, e) {
|
|
|
1314
1314
|
}, {
|
|
1315
1315
|
key: "_loadUnloadedRanges",
|
|
1316
1316
|
value: function(n) {
|
|
1317
|
-
for (var i = this,
|
|
1318
|
-
var N = n[g], z = n[g + 1], l =
|
|
1317
|
+
for (var i = this, p = this.props.loadMoreItems || this.props.loadMoreRows, d = function(g) {
|
|
1318
|
+
var N = n[g], z = n[g + 1], l = p(N, z);
|
|
1319
1319
|
l != null && l.then(function() {
|
|
1320
1320
|
if (dn({
|
|
1321
1321
|
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
@@ -1329,7 +1329,7 @@ var pn = function(t, e) {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
});
|
|
1331
1331
|
}, f = 0; f < n.length; f += 2)
|
|
1332
|
-
|
|
1332
|
+
d(f);
|
|
1333
1333
|
}
|
|
1334
1334
|
}]), e;
|
|
1335
1335
|
}(Ce);
|
|
@@ -1371,9 +1371,9 @@ const gn = () => x, In = /* @__PURE__ */ o("div")({
|
|
|
1371
1371
|
name: s,
|
|
1372
1372
|
points: n,
|
|
1373
1373
|
isCurrentUser: i,
|
|
1374
|
-
openItemDetail:
|
|
1375
|
-
style:
|
|
1376
|
-
}) => /* @__PURE__ */ v(In, { onClick:
|
|
1374
|
+
openItemDetail: p,
|
|
1375
|
+
style: d
|
|
1376
|
+
}) => /* @__PURE__ */ v(In, { onClick: p, style: d, children: [
|
|
1377
1377
|
/* @__PURE__ */ a(vn, { children: t || 0 }),
|
|
1378
1378
|
/* @__PURE__ */ v(zn, { children: [
|
|
1379
1379
|
e ? /* @__PURE__ */ a(Mn, { alt: "leaderboard-item-avatar", src: e }) : /* @__PURE__ */ a(yn, { children: Ee(s || "") }),
|
|
@@ -1383,29 +1383,35 @@ const gn = () => x, In = /* @__PURE__ */ o("div")({
|
|
|
1383
1383
|
] })
|
|
1384
1384
|
] }),
|
|
1385
1385
|
/* @__PURE__ */ a("div", { children: je(n) })
|
|
1386
|
-
] }), Sn = ({
|
|
1386
|
+
] }), Sn = ({
|
|
1387
|
+
items: t,
|
|
1388
|
+
currentUserId: e,
|
|
1389
|
+
openItemDetail: s,
|
|
1390
|
+
fetchMore: n
|
|
1391
|
+
}) => /* @__PURE__ */ a(Ks, { children: ({ width: i, height: p }) => /* @__PURE__ */ a(
|
|
1387
1392
|
fn,
|
|
1388
1393
|
{
|
|
1389
1394
|
isItemLoaded: (d) => d < t.length,
|
|
1390
1395
|
itemCount: t.length + 1,
|
|
1391
|
-
loadMoreItems:
|
|
1392
|
-
children: ({ onItemsRendered: d, ref:
|
|
1396
|
+
loadMoreItems: n,
|
|
1397
|
+
children: ({ onItemsRendered: d, ref: f }) => /* @__PURE__ */ a(
|
|
1393
1398
|
cn,
|
|
1394
1399
|
{
|
|
1395
1400
|
itemSize: 56,
|
|
1396
1401
|
onItemsRendered: d,
|
|
1397
|
-
ref:
|
|
1402
|
+
ref: f,
|
|
1398
1403
|
itemCount: t.length,
|
|
1399
|
-
width:
|
|
1400
|
-
height:
|
|
1401
|
-
children: ({ index:
|
|
1404
|
+
width: i,
|
|
1405
|
+
height: p,
|
|
1406
|
+
children: ({ index: h, style: g }) => /* @__PURE__ */ a(
|
|
1402
1407
|
Tn,
|
|
1403
1408
|
{
|
|
1404
|
-
style: { ...
|
|
1405
|
-
...t[
|
|
1406
|
-
openItemDetail: () =>
|
|
1409
|
+
style: { ...g, maxHeight: 48 },
|
|
1410
|
+
...t[h],
|
|
1411
|
+
openItemDetail: () => s(t[h].userId),
|
|
1412
|
+
isCurrentUser: !!e && e === t[h].userId
|
|
1407
1413
|
},
|
|
1408
|
-
t[
|
|
1414
|
+
t[h].userId
|
|
1409
1415
|
)
|
|
1410
1416
|
}
|
|
1411
1417
|
)
|
|
@@ -1451,11 +1457,11 @@ const xn = () => x, Dn = () => x, wn = /* @__PURE__ */ o("div")({
|
|
|
1451
1457
|
name: "h",
|
|
1452
1458
|
class: "h1iubd2g",
|
|
1453
1459
|
propsAsIs: !1
|
|
1454
|
-
}),
|
|
1460
|
+
}), Un = /* @__PURE__ */ o(Dn())({
|
|
1455
1461
|
name: "m",
|
|
1456
1462
|
class: "mmvjfuo",
|
|
1457
1463
|
propsAsIs: !0
|
|
1458
|
-
}),
|
|
1464
|
+
}), Qn = /* @__PURE__ */ o("div")({
|
|
1459
1465
|
name: "v",
|
|
1460
1466
|
class: "v1oi1553",
|
|
1461
1467
|
propsAsIs: !1
|
|
@@ -1473,8 +1479,8 @@ const xn = () => x, Dn = () => x, wn = /* @__PURE__ */ o("div")({
|
|
|
1473
1479
|
inviteCardTitle: s,
|
|
1474
1480
|
inviteCardSubtext: n,
|
|
1475
1481
|
primaryColor: i,
|
|
1476
|
-
className:
|
|
1477
|
-
}) => /* @__PURE__ */ v(wn, { className:
|
|
1482
|
+
className: p
|
|
1483
|
+
}) => /* @__PURE__ */ v(wn, { className: p, children: [
|
|
1478
1484
|
/* @__PURE__ */ a(kn, { style: { backgroundColor: i }, children: /* @__PURE__ */ a(bn, { name: "invite-game-icon" }) }),
|
|
1479
1485
|
/* @__PURE__ */ v(On, { children: [
|
|
1480
1486
|
/* @__PURE__ */ a(En, { children: s || "" }),
|
|
@@ -1484,19 +1490,19 @@ const xn = () => x, Dn = () => x, wn = /* @__PURE__ */ o("div")({
|
|
|
1484
1490
|
if (t)
|
|
1485
1491
|
try {
|
|
1486
1492
|
await navigator.clipboard.writeText(t);
|
|
1487
|
-
} catch (
|
|
1488
|
-
console.error("Unable to copy to clipboard",
|
|
1493
|
+
} catch (d) {
|
|
1494
|
+
console.error("Unable to copy to clipboard", d);
|
|
1489
1495
|
}
|
|
1490
1496
|
}, children: [
|
|
1491
1497
|
/* @__PURE__ */ v(Cn, { children: [
|
|
1492
1498
|
/* @__PURE__ */ a($n, { children: "Invite link" }),
|
|
1493
1499
|
/* @__PURE__ */ a(Rn, { children: t })
|
|
1494
1500
|
] }),
|
|
1495
|
-
/* @__PURE__ */ a(
|
|
1501
|
+
/* @__PURE__ */ a(Un, { name: "icon-copy" })
|
|
1496
1502
|
] }),
|
|
1497
|
-
e && e.length > 0 && /* @__PURE__ */ a(
|
|
1498
|
-
/* @__PURE__ */ a(x, { name:
|
|
1499
|
-
/* @__PURE__ */ a(Yn, { children:
|
|
1503
|
+
e && e.length > 0 && /* @__PURE__ */ a(Qn, { children: e.map(({ icon: d, link: f, label: h }) => /* @__PURE__ */ v(qn, { href: f, target: "_blank", children: [
|
|
1504
|
+
/* @__PURE__ */ a(x, { name: d }),
|
|
1505
|
+
/* @__PURE__ */ a(Yn, { children: h })
|
|
1500
1506
|
] }, f)) })
|
|
1501
1507
|
] }), Wn = ({ deepLink: t }) => {
|
|
1502
1508
|
const { data: e } = O(t.$store);
|
|
@@ -1527,7 +1533,8 @@ const xn = () => x, Dn = () => x, wn = /* @__PURE__ */ o("div")({
|
|
|
1527
1533
|
{
|
|
1528
1534
|
fetchMore: t.leaderboardList.fetchMore,
|
|
1529
1535
|
items: e,
|
|
1530
|
-
openItemDetail: t.openUser
|
|
1536
|
+
openItemDetail: t.openUser,
|
|
1537
|
+
currentUserId: t.currentUserId.get()
|
|
1531
1538
|
}
|
|
1532
1539
|
) : /* @__PURE__ */ a(Wn, { deepLink: t.deepLink });
|
|
1533
1540
|
};
|
|
@@ -1583,11 +1590,11 @@ const Gn = () => x, Zn = () => x, Jn = /* @__PURE__ */ o("div")({
|
|
|
1583
1590
|
questionStatus: s,
|
|
1584
1591
|
subject: n,
|
|
1585
1592
|
openForVoting: i,
|
|
1586
|
-
openQuestion:
|
|
1587
|
-
status:
|
|
1593
|
+
openQuestion: p,
|
|
1594
|
+
status: d
|
|
1588
1595
|
}) => {
|
|
1589
|
-
const f = Oe[e],
|
|
1590
|
-
return f ? /* @__PURE__ */ v(Jn, { onClick: () =>
|
|
1596
|
+
const f = Oe[e], h = ii[d];
|
|
1597
|
+
return f ? /* @__PURE__ */ v(Jn, { onClick: () => p == null ? void 0 : p(t), children: [
|
|
1591
1598
|
/* @__PURE__ */ v(ni, { children: [
|
|
1592
1599
|
/* @__PURE__ */ v(Kn, { children: [
|
|
1593
1600
|
/* @__PURE__ */ a(ti, { name: f.iconName }),
|
|
@@ -1598,7 +1605,7 @@ const Gn = () => x, Zn = () => x, Jn = /* @__PURE__ */ o("div")({
|
|
|
1598
1605
|
] }),
|
|
1599
1606
|
/* @__PURE__ */ a(Xn, { children: n || "" })
|
|
1600
1607
|
] }),
|
|
1601
|
-
/* @__PURE__ */ a(ei, { children:
|
|
1608
|
+
/* @__PURE__ */ a(ei, { children: h || (i ? /* @__PURE__ */ a(Bn, { children: "Play" }) : null) })
|
|
1602
1609
|
] }) : null;
|
|
1603
1610
|
};
|
|
1604
1611
|
const ai = /* @__PURE__ */ o("div")({
|
|
@@ -1624,12 +1631,12 @@ const ci = /* @__PURE__ */ o("div")({
|
|
|
1624
1631
|
}), di = ({ questions: t, openQuestion: e }) => /* @__PURE__ */ a(ci, { children: t == null ? void 0 : t.map((s) => {
|
|
1625
1632
|
var n, i;
|
|
1626
1633
|
if (s.type === "question" && ((n = s.attributes) == null ? void 0 : n.attributes.case) === "question") {
|
|
1627
|
-
const
|
|
1628
|
-
return /* @__PURE__ */ a(ri, { openQuestion: e, ...
|
|
1634
|
+
const p = s.attributes.attributes.value;
|
|
1635
|
+
return /* @__PURE__ */ a(ri, { openQuestion: e, ...p }, p.questionId);
|
|
1629
1636
|
}
|
|
1630
1637
|
if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1631
|
-
const
|
|
1632
|
-
return /* @__PURE__ */ a(li, { openInsight: e, ...
|
|
1638
|
+
const p = s.attributes.attributes.value;
|
|
1639
|
+
return /* @__PURE__ */ a(li, { openInsight: e, ...p }, p.questionId);
|
|
1633
1640
|
}
|
|
1634
1641
|
return null;
|
|
1635
1642
|
}) }), ui = ({ store: t, openQuestion: e }) => {
|
|
@@ -1640,14 +1647,14 @@ const ci = /* @__PURE__ */ o("div")({
|
|
|
1640
1647
|
const n = O(t.getStore());
|
|
1641
1648
|
return (e = n.data) != null && e.summary ? /* @__PURE__ */ a(Re, { ...n.data.summary, successRate: (s = n.data.percentage) == null ? void 0 : s.correct }) : /* @__PURE__ */ a("div", { children: "wait user..." });
|
|
1642
1649
|
}, hi = ({ gamification: t }) => {
|
|
1643
|
-
const [e, s] = $(
|
|
1650
|
+
const [e, s] = $(Q.HOME);
|
|
1644
1651
|
return /* @__PURE__ */ v("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
1645
1652
|
/* @__PURE__ */ v(ne, { children: [
|
|
1646
1653
|
/* @__PURE__ */ a(Zs, { activePage: e, toggleActivePage: s }),
|
|
1647
|
-
e ===
|
|
1654
|
+
e === Q.HOME && /* @__PURE__ */ a(pi, { userSummary: t.userSummary })
|
|
1648
1655
|
] }),
|
|
1649
|
-
e ===
|
|
1650
|
-
e ===
|
|
1656
|
+
e === Q.HOME && /* @__PURE__ */ a(st, { children: /* @__PURE__ */ a(ui, { openQuestion: t.openQuestion, store: t.feedList.getStore() }) }),
|
|
1657
|
+
e === Q.LEADERBOARD && /* @__PURE__ */ a(ne, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ a(Fn, { gamification: t }) })
|
|
1651
1658
|
] });
|
|
1652
1659
|
};
|
|
1653
1660
|
const mi = () => nt, be = /* @__PURE__ */ o(mi())({
|