@streamlayer/react 0.34.6 → 0.34.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/cjs/masters2.js +3 -3
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +36 -36
- package/lib/dist/es/gamification-feature.js +324 -300
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +2107 -2106
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +417 -393
- package/lib/es/masters2.js +215 -215
- package/lib/style.css +1 -1
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@ var Ue = Object.defineProperty;
|
|
|
2
2
|
var Ye = (e, t, s) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var se = (e, t, s) => (Ye(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
4
|
import { jsxs as u, jsx as n, Fragment as S } from "react/jsx-runtime";
|
|
5
|
-
import { s as r, c as x, Q as N, o as Ae, a as $, b as B, d as ie, E as U, r as Pe, w as qe,
|
|
5
|
+
import { s as r, c as x, Q as N, o as Ae, a as $, b as B, d as ie, E as U, r as Pe, w as qe, j as je, u as Y, g as Ve, O as We, P as H, e as _e, f as K, n as Be, h as ue, x as Fe } from "./masters.js";
|
|
6
6
|
import V, { useRef as R, useState as w, useCallback as W, useEffect as te, useLayoutEffect as Ze, useMemo as k, PureComponent as He, Component as Ge, useTransition as Je } from "react";
|
|
7
7
|
const Xe = /* @__PURE__ */ r("div")({
|
|
8
8
|
name: "Container",
|
|
@@ -29,18 +29,18 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
31
31
|
}), ye = ({ type: e, close: t, label: s }) => {
|
|
32
|
-
const
|
|
32
|
+
const i = e ? Ae[e] : { label: s, iconName: void 0 };
|
|
33
33
|
return /* @__PURE__ */ u(Xe, { children: [
|
|
34
34
|
/* @__PURE__ */ u(Ke, { children: [
|
|
35
|
-
(
|
|
35
|
+
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ n(
|
|
36
36
|
tt,
|
|
37
37
|
{
|
|
38
38
|
"data-type-trivia": e === N.TRIVIA,
|
|
39
39
|
"data-type-poll": e === N.POLL,
|
|
40
|
-
name:
|
|
40
|
+
name: i.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
(
|
|
43
|
+
(i == null ? void 0 : i.label) && /* @__PURE__ */ n(st, { children: i.label })
|
|
44
44
|
] }),
|
|
45
45
|
/* @__PURE__ */ n(nt, { onClick: t, children: /* @__PURE__ */ n(ot, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
@@ -78,7 +78,7 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
78
78
|
name: "Title",
|
|
79
79
|
class: "t8s05oq",
|
|
80
80
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
81
|
+
}), G = ({ indicator: e, title: t }) => /* @__PURE__ */ u(ct, { children: [
|
|
82
82
|
/* @__PURE__ */ n(dt, { children: e }),
|
|
83
83
|
/* @__PURE__ */ n(ut, { children: t })
|
|
84
84
|
] }), pt = /* @__PURE__ */ r("div")({
|
|
@@ -153,8 +153,8 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
153
153
|
avatar: e,
|
|
154
154
|
name: t,
|
|
155
155
|
points: s,
|
|
156
|
-
friendsRank:
|
|
157
|
-
rank:
|
|
156
|
+
friendsRank: i,
|
|
157
|
+
rank: o,
|
|
158
158
|
streak: l,
|
|
159
159
|
correct: a,
|
|
160
160
|
incorrect: c,
|
|
@@ -187,14 +187,14 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
187
187
|
] }) }),
|
|
188
188
|
/* @__PURE__ */ u(It, { children: [
|
|
189
189
|
/* @__PURE__ */ u(xt, { children: [
|
|
190
|
-
/* @__PURE__ */ n(pe, { indicator:
|
|
191
|
-
/* @__PURE__ */ n(pe, { indicator:
|
|
190
|
+
/* @__PURE__ */ n(pe, { indicator: i || 0, title: "Friends rank" }),
|
|
191
|
+
/* @__PURE__ */ n(pe, { indicator: o || 0, title: "Global rank" })
|
|
192
192
|
] }),
|
|
193
193
|
/* @__PURE__ */ u(ft, { children: [
|
|
194
|
-
/* @__PURE__ */ n(
|
|
195
|
-
/* @__PURE__ */ n(
|
|
196
|
-
/* @__PURE__ */ n(
|
|
197
|
-
/* @__PURE__ */ n(
|
|
194
|
+
/* @__PURE__ */ n(G, { indicator: l || 0, title: "Win streak" }),
|
|
195
|
+
/* @__PURE__ */ n(G, { indicator: a || 0, title: "Correct" }),
|
|
196
|
+
/* @__PURE__ */ n(G, { indicator: c || 0, title: "Incorrect" }),
|
|
197
|
+
/* @__PURE__ */ n(G, { indicator: `${M || 0}%`, title: "Succ. rate" })
|
|
198
198
|
] })
|
|
199
199
|
] })
|
|
200
200
|
] }), Ot = /* @__PURE__ */ r("div")({
|
|
@@ -237,7 +237,7 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
237
237
|
name: "FeedbackIconWrap",
|
|
238
238
|
class: "f1g20ja7",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}),
|
|
240
|
+
}), J = /* @__PURE__ */ r("div")({
|
|
241
241
|
name: "FeedbackHeader",
|
|
242
242
|
class: "f455ozj",
|
|
243
243
|
propsAsIs: !1
|
|
@@ -257,8 +257,8 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
257
257
|
feedbackMessages: e,
|
|
258
258
|
questionVotedCorrectly: t,
|
|
259
259
|
questionVoted: s,
|
|
260
|
-
questionType:
|
|
261
|
-
hasCorrectAnswer:
|
|
260
|
+
questionType: i,
|
|
261
|
+
hasCorrectAnswer: o,
|
|
262
262
|
questionStatus: l,
|
|
263
263
|
showExpiredNotification: a,
|
|
264
264
|
showClosedNotificationTrivia: c,
|
|
@@ -267,7 +267,7 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
267
267
|
enteredAnActiveQuestion: I,
|
|
268
268
|
marketClosed: p
|
|
269
269
|
}) => {
|
|
270
|
-
const h = s && (
|
|
270
|
+
const h = s && (i === N.TRIVIA || i === N.PREDICTION) && d && l !== $.RESOLVED, m = i === N.PREDICTION && !o, f = p && i === N.PREDICTION && !s && !I || i === N.PREDICTION && M && d && I, D = h && m, A = h && o, g = i === N.PREDICTION && s && d && o, y = s && i === N.POLL && d;
|
|
271
271
|
if (!a && !c && !D && !A && !f && !y && !g)
|
|
272
272
|
return null;
|
|
273
273
|
const j = t ? "correct" : "incorrect", v = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
@@ -275,21 +275,21 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
275
275
|
a && /* @__PURE__ */ u(S, { children: [
|
|
276
276
|
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(x, { name: "questionExpired" }) }),
|
|
277
277
|
/* @__PURE__ */ u("div", { children: [
|
|
278
|
-
/* @__PURE__ */ n(
|
|
278
|
+
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(q, { children: "Question Expired" }) }),
|
|
279
279
|
/* @__PURE__ */ n(ne, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
280
280
|
] })
|
|
281
281
|
] }),
|
|
282
282
|
c && /* @__PURE__ */ u(S, { children: [
|
|
283
283
|
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(x, { name: "questionExpired" }) }),
|
|
284
284
|
/* @__PURE__ */ u("div", { children: [
|
|
285
|
-
/* @__PURE__ */ n(
|
|
285
|
+
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(q, { children: "Question Closed" }) }),
|
|
286
286
|
/* @__PURE__ */ n(ne, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
289
|
f && /* @__PURE__ */ u(S, { children: [
|
|
290
290
|
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(x, { name: "questionExpired" }) }),
|
|
291
291
|
/* @__PURE__ */ u("div", { children: [
|
|
292
|
-
/* @__PURE__ */ n(
|
|
292
|
+
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(q, { children: "Question Closed" }) }),
|
|
293
293
|
/* @__PURE__ */ n(ne, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
294
294
|
] })
|
|
295
295
|
] }),
|
|
@@ -303,7 +303,7 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
303
303
|
] }),
|
|
304
304
|
(A || g) && /* @__PURE__ */ u(S, { children: [
|
|
305
305
|
/* @__PURE__ */ n(F, { "data-feedbackType": j, children: /* @__PURE__ */ n(x, { name: j }) }),
|
|
306
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(
|
|
306
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(J, { children: [
|
|
307
307
|
/* @__PURE__ */ n(Pt, { "data-feedbackType": j, children: v == null ? void 0 : v.title }),
|
|
308
308
|
/* @__PURE__ */ n(q, { children: v == null ? void 0 : v.description })
|
|
309
309
|
] }) })
|
|
@@ -383,29 +383,29 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
383
383
|
[B.ROUNDED]: (e) => /* @__PURE__ */ n(ts, { alt: "option-icon", src: e }),
|
|
384
384
|
[B.NONE]: () => null,
|
|
385
385
|
[B.UNSET]: () => null
|
|
386
|
-
}, ls = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted:
|
|
387
|
-
if (e === N.POLL &&
|
|
386
|
+
}, ls = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: i, questionVoted: o }) => {
|
|
387
|
+
if (e === N.POLL && i)
|
|
388
388
|
return "correct";
|
|
389
389
|
if (e === N.PREDICTION) {
|
|
390
|
-
if (t &&
|
|
391
|
-
return
|
|
392
|
-
if (
|
|
390
|
+
if (t && o)
|
|
391
|
+
return i ? s ? "correct" : "incorrect" : "unset";
|
|
392
|
+
if (i)
|
|
393
393
|
return "correct";
|
|
394
394
|
}
|
|
395
|
-
return e === N.TRIVIA &&
|
|
395
|
+
return e === N.TRIVIA && o && i ? s ? "correct" : "incorrect" : "unset";
|
|
396
396
|
}, cs = ({
|
|
397
397
|
questionType: e,
|
|
398
398
|
questionVoted: t,
|
|
399
399
|
correct: s,
|
|
400
|
-
hasCorrectAnswer:
|
|
401
|
-
questionStatus:
|
|
402
|
-
}) => e === N.TRIVIA ? t && s : e === N.PREDICTION ? t && s &&
|
|
400
|
+
hasCorrectAnswer: i,
|
|
401
|
+
questionStatus: o
|
|
402
|
+
}) => e === N.TRIVIA ? t && s : e === N.PREDICTION ? t && s && i || o === $.RESOLVED && s : !1, ds = (e) => {
|
|
403
403
|
var t;
|
|
404
404
|
const {
|
|
405
405
|
// option props
|
|
406
406
|
id: s,
|
|
407
|
-
icon:
|
|
408
|
-
text:
|
|
407
|
+
icon: i,
|
|
408
|
+
text: o,
|
|
409
409
|
percentageDecimal: l,
|
|
410
410
|
points: a,
|
|
411
411
|
// extra props
|
|
@@ -423,7 +423,7 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
423
423
|
votedAfterQuestionClosed: y,
|
|
424
424
|
enteredAnActiveQuestion: j,
|
|
425
425
|
marketClosed: v
|
|
426
|
-
} = e, O = ls(e), Q = cs({ questionType: D, questionVoted: I, correct: A, hasCorrectAnswer: g, questionStatus: m }), b = v && D === N.PREDICTION,
|
|
426
|
+
} = e, O = ls(e), Q = cs({ questionType: D, questionVoted: I, correct: A, hasCorrectAnswer: g, questionStatus: m }), b = v && D === N.PREDICTION, Z = I || b, T = D === N.PREDICTION && !I && m !== $.RESOLVED;
|
|
427
427
|
return /* @__PURE__ */ u(
|
|
428
428
|
Ft,
|
|
429
429
|
{
|
|
@@ -438,15 +438,15 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
438
438
|
), c(L);
|
|
439
439
|
},
|
|
440
440
|
children: [
|
|
441
|
-
/* @__PURE__ */ n(Zt, { "data-answer-state": O, style: { width: `${
|
|
441
|
+
/* @__PURE__ */ n(Zt, { "data-answer-state": O, style: { width: `${Z ? l : 0}%` } }),
|
|
442
442
|
/* @__PURE__ */ u(Ht, { children: [
|
|
443
|
-
|
|
444
|
-
/* @__PURE__ */ n(ss, { children:
|
|
443
|
+
i && p && ((t = Me[p]) == null ? void 0 : t.call(Me, i)),
|
|
444
|
+
/* @__PURE__ */ n(ss, { children: o }),
|
|
445
445
|
T && /* @__PURE__ */ u("div", { children: [
|
|
446
446
|
/* @__PURE__ */ n(ie, { value: a }),
|
|
447
447
|
/* @__PURE__ */ n(is, { children: "pts" })
|
|
448
448
|
] }),
|
|
449
|
-
|
|
449
|
+
Z && /* @__PURE__ */ u(ns, { children: [
|
|
450
450
|
Q && /* @__PURE__ */ n(as, { name: "selected" }),
|
|
451
451
|
/* @__PURE__ */ n(os, { children: /* @__PURE__ */ n(ie, { value: l, suffix: "%" }) })
|
|
452
452
|
] })
|
|
@@ -455,7 +455,7 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
};
|
|
458
|
-
var Ie = typeof window > "u" ? te : Ze, us = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval:
|
|
458
|
+
var Ie = typeof window > "u" ? te : Ze, us = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: i = 0, onComplete: o, onUpdate: l }) => {
|
|
459
459
|
let [a, c] = w(s), d = R(0), M = R(s), I = R(s * -1e3), p = R(null), h = R(null), m = R(null), f = (g) => {
|
|
460
460
|
let y = g / 1e3;
|
|
461
461
|
if (h.current === null) {
|
|
@@ -464,7 +464,7 @@ var Ie = typeof window > "u" ? te : Ze, us = ({ isPlaying: e, duration: t, start
|
|
|
464
464
|
}
|
|
465
465
|
let j = y - h.current, v = d.current + j;
|
|
466
466
|
h.current = y, d.current = v;
|
|
467
|
-
let O = M.current + (
|
|
467
|
+
let O = M.current + (i === 0 ? v : (v / i | 0) * i), Q = M.current + v, b = typeof t == "number" && Q >= t;
|
|
468
468
|
c(b ? t : O), b || (p.current = requestAnimationFrame(f));
|
|
469
469
|
}, D = () => {
|
|
470
470
|
p.current && cancelAnimationFrame(p.current), m.current && clearTimeout(m.current), h.current = null;
|
|
@@ -476,35 +476,35 @@ var Ie = typeof window > "u" ? te : Ze, us = ({ isPlaying: e, duration: t, start
|
|
|
476
476
|
return Ie(() => {
|
|
477
477
|
if (l == null || l(a), t && a >= t) {
|
|
478
478
|
I.current += t * 1e3;
|
|
479
|
-
let { shouldRepeat: g = !1, delay: y = 0, newStartAt: j } = (
|
|
479
|
+
let { shouldRepeat: g = !1, delay: y = 0, newStartAt: j } = (o == null ? void 0 : o(I.current / 1e3)) || {};
|
|
480
480
|
g && (m.current = setTimeout(() => A(j), y * 1e3));
|
|
481
481
|
}
|
|
482
|
-
}, [a, t]), Ie(() => (e && (p.current = requestAnimationFrame(f)), D), [e, t,
|
|
482
|
+
}, [a, t]), Ie(() => (e && (p.current = requestAnimationFrame(f)), D), [e, t, i]), { elapsedTime: a, reset: A };
|
|
483
483
|
}, ps = (e, t, s) => {
|
|
484
|
-
let
|
|
485
|
-
return { path: `m ${
|
|
486
|
-
}, he = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, Ms = (e) => ({ position: "relative", width: e, height: e }), Is = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Le = (e, t, s,
|
|
487
|
-
if (
|
|
484
|
+
let i = e / 2, o = t / 2, l = i - o, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
|
|
485
|
+
return { path: `m ${i},${o} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
|
|
486
|
+
}, he = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, Ms = (e) => ({ position: "relative", width: e, height: e }), Is = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Le = (e, t, s, i, o) => {
|
|
487
|
+
if (i === 0)
|
|
488
488
|
return t;
|
|
489
|
-
let l = (
|
|
489
|
+
let l = (o ? i - e : e) / i;
|
|
490
490
|
return t + s * l;
|
|
491
491
|
}, Ne = (e) => {
|
|
492
492
|
var t, s;
|
|
493
|
-
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (
|
|
493
|
+
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, o, l, a) => `#${o}${o}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((i) => parseInt(i, 16))) != null ? s : [];
|
|
494
494
|
}, hs = (e, t) => {
|
|
495
495
|
var s;
|
|
496
|
-
let { colors:
|
|
497
|
-
if (typeof
|
|
498
|
-
return
|
|
499
|
-
let a = (s =
|
|
500
|
-
if (!
|
|
501
|
-
return
|
|
496
|
+
let { colors: i, colorsTime: o, isSmoothColorTransition: l = !0 } = e;
|
|
497
|
+
if (typeof i == "string")
|
|
498
|
+
return i;
|
|
499
|
+
let a = (s = o == null ? void 0 : o.findIndex((h, m) => h >= t && t >= o[m + 1])) != null ? s : -1;
|
|
500
|
+
if (!o || a === -1)
|
|
501
|
+
return i[0];
|
|
502
502
|
if (!l)
|
|
503
|
-
return
|
|
504
|
-
let c =
|
|
503
|
+
return i[a];
|
|
504
|
+
let c = o[a] - t, d = o[a] - o[a + 1], M = Ne(i[a]), I = Ne(i[a + 1]), p = !!e.isGrowing;
|
|
505
505
|
return `rgb(${M.map((h, m) => Le(c, h, I[m] - h, d, p) | 0).join(",")})`;
|
|
506
506
|
}, Ns = (e) => {
|
|
507
|
-
let { duration: t, initialRemainingTime: s, updateInterval:
|
|
507
|
+
let { duration: t, initialRemainingTime: s, updateInterval: i, size: o = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: M = "clockwise", onComplete: I, onUpdate: p } = e, h = R(), m = Math.max(l, a ?? 0), { path: f, pathLength: D } = ps(o, m, M), { elapsedTime: A } = us({ isPlaying: c, duration: t, startAt: he(t, s), updateInterval: i, onUpdate: typeof p == "function" ? (y) => {
|
|
508
508
|
let j = Math.ceil(t - y);
|
|
509
509
|
j !== h.current && (h.current = j, p(j));
|
|
510
510
|
} : void 0, onComplete: typeof I == "function" ? (y) => {
|
|
@@ -513,10 +513,10 @@ var Ie = typeof window > "u" ? te : Ze, us = ({ isPlaying: e, duration: t, start
|
|
|
513
513
|
if (v)
|
|
514
514
|
return { shouldRepeat: v, delay: O, newStartAt: he(t, Q) };
|
|
515
515
|
} : void 0 }), g = t - A;
|
|
516
|
-
return { elapsedTime: A, path: f, pathLength: D, remainingTime: Math.ceil(g), rotation: M, size:
|
|
516
|
+
return { elapsedTime: A, path: f, pathLength: D, remainingTime: Math.ceil(g), rotation: M, size: o, stroke: hs(e, g), strokeDashoffset: Le(A, 0, D, t, d), strokeWidth: l };
|
|
517
517
|
}, ze = (e) => {
|
|
518
|
-
let { children: t, strokeLinecap: s, trailColor:
|
|
519
|
-
return V.createElement("div", { style: Ms(p) }, V.createElement("svg", { viewBox: `0 0 ${p} ${p}`, width: p, height: p, xmlns: "http://www.w3.org/2000/svg" }, V.createElement("path", { d: l, fill: "none", stroke:
|
|
518
|
+
let { children: t, strokeLinecap: s, trailColor: i, trailStrokeWidth: o } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: M, elapsedTime: I, size: p, strokeWidth: h } = Ns(e);
|
|
519
|
+
return V.createElement("div", { style: Ms(p) }, V.createElement("svg", { viewBox: `0 0 ${p} ${p}`, width: p, height: p, xmlns: "http://www.w3.org/2000/svg" }, V.createElement("path", { d: l, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: o ?? h }), V.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: h, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && V.createElement("div", { style: Is }, t({ remainingTime: M, elapsedTime: I, color: c })));
|
|
520
520
|
};
|
|
521
521
|
ze.displayName = "CountdownCircleTimer";
|
|
522
522
|
const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRAY3], gs = [10, 10, 1, 0], Ds = /* @__PURE__ */ r("div")({
|
|
@@ -528,15 +528,15 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
528
528
|
duration: t = 30,
|
|
529
529
|
onTimerExpired: s
|
|
530
530
|
}) => {
|
|
531
|
-
const [
|
|
531
|
+
const [i, o] = w(t > 10 ? Ts : me), l = ({
|
|
532
532
|
remainingTime: d
|
|
533
533
|
}) => /* @__PURE__ */ n(Ds, {
|
|
534
534
|
children: d
|
|
535
535
|
}), a = W(() => {
|
|
536
|
-
s == null || s(),
|
|
537
|
-
}, [s,
|
|
538
|
-
d === 10 &&
|
|
539
|
-
}, [
|
|
536
|
+
s == null || s(), o(As);
|
|
537
|
+
}, [s, o]), c = W((d) => {
|
|
538
|
+
d === 10 && o(me);
|
|
539
|
+
}, [o]);
|
|
540
540
|
return /* @__PURE__ */ n(ze, {
|
|
541
541
|
isPlaying: e,
|
|
542
542
|
duration: t,
|
|
@@ -545,7 +545,7 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
545
545
|
size: 32,
|
|
546
546
|
strokeWidth: 2,
|
|
547
547
|
trailStrokeWidth: 2,
|
|
548
|
-
trailColor:
|
|
548
|
+
trailColor: i,
|
|
549
549
|
onComplete: a,
|
|
550
550
|
onUpdate: c,
|
|
551
551
|
children: l
|
|
@@ -582,14 +582,14 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
582
582
|
title: e,
|
|
583
583
|
points: t,
|
|
584
584
|
isPlayingTimer: s,
|
|
585
|
-
isTimer:
|
|
586
|
-
questionType:
|
|
585
|
+
isTimer: i,
|
|
586
|
+
questionType: o,
|
|
587
587
|
timerDuration: l,
|
|
588
588
|
onTimerExpired: a
|
|
589
|
-
}) => /* @__PURE__ */ u(ys, { style: { justifyContent:
|
|
589
|
+
}) => /* @__PURE__ */ u(ys, { style: { justifyContent: o === N.PREDICTION ? "center" : "space-between" }, children: [
|
|
590
590
|
/* @__PURE__ */ u(vs, { children: [
|
|
591
591
|
e && /* @__PURE__ */ n(xs, { children: e }),
|
|
592
|
-
t !== void 0 &&
|
|
592
|
+
t !== void 0 && o !== N.POLL && /* @__PURE__ */ u(S, { children: [
|
|
593
593
|
/* @__PURE__ */ n(Es, { name: "icon-trophy" }),
|
|
594
594
|
/* @__PURE__ */ u(Ls, { children: [
|
|
595
595
|
/* @__PURE__ */ n(zs, { children: /* @__PURE__ */ n(ie, { value: t }) }),
|
|
@@ -597,10 +597,10 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
597
597
|
] })
|
|
598
598
|
] })
|
|
599
599
|
] }),
|
|
600
|
-
|
|
601
|
-
] }), Ss = ({ openedQuestion: e, isLoading: t, vote: s, close:
|
|
602
|
-
var
|
|
603
|
-
const a = e.subject, c = e.type, d = e.status, M = (
|
|
600
|
+
i && o !== N.PREDICTION && /* @__PURE__ */ n(js, { isPlaying: s, onTimerExpired: a, duration: l })
|
|
601
|
+
] }), Ss = ({ openedQuestion: e, isLoading: t, vote: s, close: i }) => {
|
|
602
|
+
var o, l;
|
|
603
|
+
const a = e.subject, c = e.type, d = e.status, M = (o = e.options) == null ? void 0 : o.options, I = e.marketClosed, [p, h] = w(!1), [m, f] = w(!1), [D, A] = w(!0), [g, y] = w(!1), [j, v] = w(""), O = e == null ? void 0 : e.id;
|
|
604
604
|
te(() => {
|
|
605
605
|
c === N.PREDICTION ? I && A(!1) : d === $.RESOLVED && A(!1);
|
|
606
606
|
}, []);
|
|
@@ -614,9 +614,9 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
616
|
[O, v, s]
|
|
617
|
-
),
|
|
618
|
-
y(!0), setTimeout(
|
|
619
|
-
}, [
|
|
617
|
+
), Z = W(() => {
|
|
618
|
+
y(!0), setTimeout(i, 3e3);
|
|
619
|
+
}, [i]), T = k(
|
|
620
620
|
() => e == null ? void 0 : e.answers.find((E) => E.youVoted === !0),
|
|
621
621
|
[e]
|
|
622
622
|
), L = k(
|
|
@@ -685,7 +685,7 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
685
685
|
{
|
|
686
686
|
title: Qe,
|
|
687
687
|
points: $e,
|
|
688
|
-
onTimerExpired:
|
|
688
|
+
onTimerExpired: Z,
|
|
689
689
|
questionType: e.type,
|
|
690
690
|
isTimer: !t,
|
|
691
691
|
isPlayingTimer: !T,
|
|
@@ -741,8 +741,8 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
741
741
|
created: e,
|
|
742
742
|
image: t,
|
|
743
743
|
title: s,
|
|
744
|
-
isPickHistory:
|
|
745
|
-
instantView:
|
|
744
|
+
isPickHistory: i,
|
|
745
|
+
instantView: o,
|
|
746
746
|
notification: l
|
|
747
747
|
}) => {
|
|
748
748
|
const a = k(() => {
|
|
@@ -755,18 +755,18 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
757
|
return null;
|
|
758
|
-
}, [e]), c = (
|
|
758
|
+
}, [e]), c = (o == null ? void 0 : o.image) || t;
|
|
759
759
|
return /* @__PURE__ */ u(ks, { children: [
|
|
760
760
|
a && /* @__PURE__ */ u(Qs, { children: [
|
|
761
761
|
a.date,
|
|
762
762
|
" · ",
|
|
763
763
|
a.time
|
|
764
764
|
] }),
|
|
765
|
-
(
|
|
766
|
-
c && !(
|
|
765
|
+
(o == null ? void 0 : o.video) && /* @__PURE__ */ n(qe, { source: o.video.url, poster: o.video.thumbnailUrl }),
|
|
766
|
+
c && !(o != null && o.video) && /* @__PURE__ */ n(Rs, { src: c }),
|
|
767
767
|
/* @__PURE__ */ u(ws, { children: [
|
|
768
|
-
/* @__PURE__ */ n(bs, { children:
|
|
769
|
-
/* @__PURE__ */ n($s, { children:
|
|
768
|
+
/* @__PURE__ */ n(bs, { children: i ? s : o == null ? void 0 : o.heading }),
|
|
769
|
+
/* @__PURE__ */ n($s, { children: i ? l == null ? void 0 : l.body : o == null ? void 0 : o.body })
|
|
770
770
|
] })
|
|
771
771
|
] });
|
|
772
772
|
}, Us = /* @__PURE__ */ r("div")({
|
|
@@ -798,11 +798,11 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
798
798
|
}), _s = ({ created: e, ...t }) => {
|
|
799
799
|
const s = k(() => {
|
|
800
800
|
if (e) {
|
|
801
|
-
const
|
|
802
|
-
if (le(
|
|
801
|
+
const i = new Date(e);
|
|
802
|
+
if (le(i))
|
|
803
803
|
return {
|
|
804
|
-
date: re(
|
|
805
|
-
time: ae(
|
|
804
|
+
date: re(i),
|
|
805
|
+
time: ae(i)
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
808
|
return null;
|
|
@@ -837,87 +837,56 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
837
837
|
close: s
|
|
838
838
|
}) => {
|
|
839
839
|
const {
|
|
840
|
-
loading:
|
|
841
|
-
data:
|
|
840
|
+
loading: i,
|
|
841
|
+
data: o
|
|
842
842
|
} = e;
|
|
843
|
-
return
|
|
843
|
+
return o ? /* @__PURE__ */ n(Ss, {
|
|
844
844
|
vote: t,
|
|
845
845
|
close: s,
|
|
846
|
-
openedQuestion:
|
|
847
|
-
isLoading: !!
|
|
846
|
+
openedQuestion: o,
|
|
847
|
+
isLoading: !!i
|
|
848
848
|
}) : null;
|
|
849
849
|
}, Hs = ({
|
|
850
850
|
gamification: e
|
|
851
851
|
}) => {
|
|
852
852
|
var t;
|
|
853
|
-
const s = Y(e.openedQuestion.$store),
|
|
853
|
+
const s = Y(e.openedQuestion.$store), i = Y(e.openedQuestion.$extendedStore);
|
|
854
854
|
if (!s)
|
|
855
855
|
return null;
|
|
856
|
-
const
|
|
856
|
+
const o = s.type;
|
|
857
857
|
return /* @__PURE__ */ u(Bs, {
|
|
858
858
|
children: [/* @__PURE__ */ n(ye, {
|
|
859
859
|
close: e.closeQuestion,
|
|
860
860
|
type: ((t = s.attributes) == null ? void 0 : t.type) || N.UNSET
|
|
861
|
-
}),
|
|
861
|
+
}), o === "question" && /* @__PURE__ */ n(Zs, {
|
|
862
862
|
vote: e.submitAnswer,
|
|
863
863
|
close: e.closeQuestion,
|
|
864
|
-
extendedQuestion:
|
|
865
|
-
}),
|
|
864
|
+
extendedQuestion: i
|
|
865
|
+
}), o !== "question" && /* @__PURE__ */ n(Fs, {
|
|
866
866
|
openedQuestion: s
|
|
867
867
|
}), /* @__PURE__ */ n(kt, {
|
|
868
868
|
sponsorLogo: ""
|
|
869
869
|
})]
|
|
870
870
|
});
|
|
871
871
|
}, Gs = /* @__PURE__ */ r("div")({
|
|
872
|
-
name: "Container",
|
|
873
|
-
class: "c1ux29ft",
|
|
874
|
-
propsAsIs: !1
|
|
875
|
-
}), Js = /* @__PURE__ */ r("img")({
|
|
876
|
-
name: "FriendsIcon",
|
|
877
|
-
class: "f10ncfg2",
|
|
878
|
-
propsAsIs: !1
|
|
879
|
-
}), Xs = /* @__PURE__ */ r("div")({
|
|
880
|
-
name: "Content",
|
|
881
|
-
class: "c1yc07bd",
|
|
882
|
-
propsAsIs: !1
|
|
883
|
-
}), Ks = /* @__PURE__ */ r("div")({
|
|
884
|
-
name: "Title",
|
|
885
|
-
class: "tj6cq7w",
|
|
886
|
-
propsAsIs: !1
|
|
887
|
-
}), en = /* @__PURE__ */ r("div")({
|
|
888
|
-
name: "Description",
|
|
889
|
-
class: "d1ag78xo",
|
|
890
|
-
propsAsIs: !1
|
|
891
|
-
}), tn = () => x, sn = /* @__PURE__ */ r(tn())({
|
|
892
|
-
name: "ArrowInviteIcon",
|
|
893
|
-
class: "awohrz6",
|
|
894
|
-
propsAsIs: !0
|
|
895
|
-
}), nn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiByeD0iMTYiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMC40NjE1IDEyLjY4NzVDOS40NDIzMSAxMi42ODc1IDguNjE1MzggMTMuNDY2NSA4LjYxNTM4IDE0LjQyNjZDOC42MTUzOCAxNS4zODY4IDkuNDQyMzEgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThDMTEuNDgwOCAxNi4xNjU4IDEyLjMwNzcgMTUuMzg2OCAxMi4zMDc3IDE0LjQyNjZDMTIuMzA3NyAxMy40NjY1IDExLjQ4MDggMTIuNjg3NSAxMC40NjE1IDEyLjY4NzVaTTEwLjQ2MTUgMTYuMTY1OEM5LjEwODE3IDE2LjE2NTggOCAxNy4yMDk3IDggMTguNDg0NlYxOS43NTI3QzggMTkuNzUyNyA4LjYxNTM4IDIwLjIyMzcgMTAuNDYxNSAyMC4yMjM3QzEyLjMwNzcgMjAuMjIzNyAxMi45MjMxIDE5Ljc1M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MTcuNjMxNCAxMi42ODc1IDE2Ljc4MjggMTMuMTc5NiAxNi4zMjY2IDEzLjkxNjZDMTcuMzA1MiAxNC4wMzkxIDE4LjE0ODcgMTQuNTI0IDE4LjY3MTIgMTUuMjYxQzE4LjY3MTIgMTUuMDE2MSAxOC42MSAxNC43NzYxIDE4LjYxIDE0LjUzMTJDMTguNjEgMTMuODU0MiAxOC44MDg4IDEzLjIzNzIgMTkuMjAxMiAxMi43NDUxQzE5LjAwNSAxMi42ODI3IDE4LjgwNjIgMTIuNjg3NSAxOC42MSAxMi42ODc1WiIgZmlsbD0iIzEwN0Q1NyIvPgo8L3N2Zz4K", on = ({ title: e, description: t, onClick: s }) => /* @__PURE__ */ u(Gs, { onClick: s, children: [
|
|
896
|
-
/* @__PURE__ */ n(Js, { alt: "friends-icon", src: nn }),
|
|
897
|
-
/* @__PURE__ */ u(Xs, { children: [
|
|
898
|
-
/* @__PURE__ */ n(Ks, { children: e }),
|
|
899
|
-
/* @__PURE__ */ n(en, { children: t })
|
|
900
|
-
] }),
|
|
901
|
-
/* @__PURE__ */ n(sn, { name: "icon-copy" })
|
|
902
|
-
] }), rn = /* @__PURE__ */ r("div")({
|
|
903
872
|
name: "Container",
|
|
904
873
|
class: "c115qtkr",
|
|
905
874
|
propsAsIs: !1
|
|
906
|
-
}),
|
|
875
|
+
}), Js = /* @__PURE__ */ r("div")({
|
|
907
876
|
name: "STabs",
|
|
908
877
|
class: "sxnslc8",
|
|
909
878
|
propsAsIs: !1
|
|
910
|
-
}),
|
|
879
|
+
}), Xs = /* @__PURE__ */ r("button")({
|
|
911
880
|
name: "Button",
|
|
912
881
|
class: "b1umzux0",
|
|
913
882
|
propsAsIs: !1
|
|
914
|
-
}),
|
|
883
|
+
}), Ks = /* @__PURE__ */ r("span")({
|
|
915
884
|
name: "Title",
|
|
916
885
|
class: "tspsaas",
|
|
917
886
|
propsAsIs: !1
|
|
918
887
|
});
|
|
919
888
|
var ee = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(ee || {});
|
|
920
|
-
const ge = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(
|
|
889
|
+
const ge = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(Xs, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(Ks, { children: e }) }), en = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(Gs, { children: /* @__PURE__ */ u(Js, { "data-position": e === "home" ? "left" : "right", children: [
|
|
921
890
|
/* @__PURE__ */ n(ge, { title: "Home", active: e === "home", onClick: () => t(
|
|
922
891
|
"home"
|
|
923
892
|
/* HOME */
|
|
@@ -933,23 +902,54 @@ const ge = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(ln, { onCl
|
|
|
933
902
|
)
|
|
934
903
|
}
|
|
935
904
|
)
|
|
936
|
-
] }) })
|
|
905
|
+
] }) }), tn = /* @__PURE__ */ r("div")({
|
|
906
|
+
name: "Container",
|
|
907
|
+
class: "c1ux29ft",
|
|
908
|
+
propsAsIs: !1
|
|
909
|
+
}), sn = /* @__PURE__ */ r("img")({
|
|
910
|
+
name: "FriendsIcon",
|
|
911
|
+
class: "f10ncfg2",
|
|
912
|
+
propsAsIs: !1
|
|
913
|
+
}), nn = /* @__PURE__ */ r("div")({
|
|
914
|
+
name: "Content",
|
|
915
|
+
class: "c1yc07bd",
|
|
916
|
+
propsAsIs: !1
|
|
917
|
+
}), on = /* @__PURE__ */ r("div")({
|
|
918
|
+
name: "Title",
|
|
919
|
+
class: "tj6cq7w",
|
|
920
|
+
propsAsIs: !1
|
|
921
|
+
}), rn = /* @__PURE__ */ r("div")({
|
|
922
|
+
name: "Description",
|
|
923
|
+
class: "d1ag78xo",
|
|
924
|
+
propsAsIs: !1
|
|
925
|
+
}), an = () => x, ln = /* @__PURE__ */ r(an())({
|
|
926
|
+
name: "ArrowInviteIcon",
|
|
927
|
+
class: "awohrz6",
|
|
928
|
+
propsAsIs: !0
|
|
929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s, className: i }) => /* @__PURE__ */ u(tn, { onClick: s, className: i, children: [
|
|
930
|
+
/* @__PURE__ */ n(sn, { alt: "friends-icon", src: cn }),
|
|
931
|
+
/* @__PURE__ */ u(nn, { children: [
|
|
932
|
+
/* @__PURE__ */ n(on, { children: e }),
|
|
933
|
+
/* @__PURE__ */ n(rn, { children: t })
|
|
934
|
+
] }),
|
|
935
|
+
/* @__PURE__ */ n(ln, { name: "icon-copy" })
|
|
936
|
+
] });
|
|
937
937
|
function un(e) {
|
|
938
|
-
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex,
|
|
939
|
-
return !(
|
|
938
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, i = e.startIndex, o = e.stopIndex;
|
|
939
|
+
return !(i > s || o < t);
|
|
940
940
|
}
|
|
941
941
|
function pn(e) {
|
|
942
|
-
for (var t = e.isItemLoaded, s = e.itemCount,
|
|
942
|
+
for (var t = e.isItemLoaded, s = e.itemCount, i = e.minimumBatchSize, o = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, M = o; M <= l; M++) {
|
|
943
943
|
var I = t(M);
|
|
944
944
|
I ? d !== null && (a.push(c, d), c = d = null) : (d = M, c === null && (c = M));
|
|
945
945
|
}
|
|
946
946
|
if (d !== null) {
|
|
947
|
-
for (var p = Math.min(Math.max(d, c +
|
|
947
|
+
for (var p = Math.min(Math.max(d, c + i - 1), s - 1), h = d + 1; h <= p && !t(h); h++)
|
|
948
948
|
d = h;
|
|
949
949
|
a.push(c, d);
|
|
950
950
|
}
|
|
951
951
|
if (a.length)
|
|
952
|
-
for (; a[1] - a[0] + 1 <
|
|
952
|
+
for (; a[1] - a[0] + 1 < i && a[0] > 0; ) {
|
|
953
953
|
var m = a[0] - 1;
|
|
954
954
|
if (!t(m))
|
|
955
955
|
a[0] = m;
|
|
@@ -963,13 +963,13 @@ var Mn = function(e, t) {
|
|
|
963
963
|
throw new TypeError("Cannot call a class as a function");
|
|
964
964
|
}, In = function() {
|
|
965
965
|
function e(t, s) {
|
|
966
|
-
for (var
|
|
967
|
-
var
|
|
968
|
-
|
|
966
|
+
for (var i = 0; i < s.length; i++) {
|
|
967
|
+
var o = s[i];
|
|
968
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
return function(t, s,
|
|
972
|
-
return s && e(t.prototype, s),
|
|
971
|
+
return function(t, s, i) {
|
|
972
|
+
return s && e(t.prototype, s), i && e(t, i), t;
|
|
973
973
|
};
|
|
974
974
|
}(), hn = function(e, t) {
|
|
975
975
|
if (typeof t != "function" && t !== null)
|
|
@@ -990,22 +990,22 @@ var Mn = function(e, t) {
|
|
|
990
990
|
(function(e) {
|
|
991
991
|
hn(t, e);
|
|
992
992
|
function t() {
|
|
993
|
-
var s,
|
|
993
|
+
var s, i, o, l;
|
|
994
994
|
Mn(this, t);
|
|
995
995
|
for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
|
|
996
996
|
c[d] = arguments[d];
|
|
997
|
-
return l = (
|
|
997
|
+
return l = (i = (o = De(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(M) {
|
|
998
998
|
var I = M.visibleStartIndex, p = M.visibleStopIndex;
|
|
999
|
-
|
|
1000
|
-
},
|
|
1001
|
-
|
|
1002
|
-
},
|
|
999
|
+
o._lastRenderedStartIndex = I, o._lastRenderedStopIndex = p, o._ensureRowsLoaded(I, p);
|
|
1000
|
+
}, o._setRef = function(M) {
|
|
1001
|
+
o._listRef = M;
|
|
1002
|
+
}, i), De(o, l);
|
|
1003
1003
|
}
|
|
1004
1004
|
return In(t, [{
|
|
1005
1005
|
key: "resetloadMoreItemsCache",
|
|
1006
1006
|
value: function() {
|
|
1007
|
-
var
|
|
1008
|
-
this._memoizedUnloadedRanges = [],
|
|
1007
|
+
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1008
|
+
this._memoizedUnloadedRanges = [], i && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
1009
1009
|
}
|
|
1010
1010
|
}, {
|
|
1011
1011
|
key: "componentDidMount",
|
|
@@ -1014,21 +1014,21 @@ var Mn = function(e, t) {
|
|
|
1014
1014
|
}, {
|
|
1015
1015
|
key: "render",
|
|
1016
1016
|
value: function() {
|
|
1017
|
-
var
|
|
1018
|
-
return
|
|
1017
|
+
var i = this.props.children;
|
|
1018
|
+
return i({
|
|
1019
1019
|
onItemsRendered: this._onItemsRendered,
|
|
1020
1020
|
ref: this._setRef
|
|
1021
1021
|
});
|
|
1022
1022
|
}
|
|
1023
1023
|
}, {
|
|
1024
1024
|
key: "_ensureRowsLoaded",
|
|
1025
|
-
value: function(
|
|
1025
|
+
value: function(i, o) {
|
|
1026
1026
|
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, M = d === void 0 ? 10 : d, I = l.threshold, p = I === void 0 ? 15 : I, h = pn({
|
|
1027
1027
|
isItemLoaded: a,
|
|
1028
1028
|
itemCount: c,
|
|
1029
1029
|
minimumBatchSize: M,
|
|
1030
|
-
startIndex: Math.max(0,
|
|
1031
|
-
stopIndex: Math.min(c - 1,
|
|
1030
|
+
startIndex: Math.max(0, i - p),
|
|
1031
|
+
stopIndex: Math.min(c - 1, o + p)
|
|
1032
1032
|
});
|
|
1033
1033
|
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(m, f) {
|
|
1034
1034
|
return h[f] !== m;
|
|
@@ -1036,22 +1036,22 @@ var Mn = function(e, t) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
}, {
|
|
1038
1038
|
key: "_loadUnloadedRanges",
|
|
1039
|
-
value: function(
|
|
1040
|
-
for (var
|
|
1041
|
-
var I =
|
|
1039
|
+
value: function(i) {
|
|
1040
|
+
for (var o = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(M) {
|
|
1041
|
+
var I = i[M], p = i[M + 1], h = l(I, p);
|
|
1042
1042
|
h != null && h.then(function() {
|
|
1043
1043
|
if (un({
|
|
1044
|
-
lastRenderedStartIndex:
|
|
1045
|
-
lastRenderedStopIndex:
|
|
1044
|
+
lastRenderedStartIndex: o._lastRenderedStartIndex,
|
|
1045
|
+
lastRenderedStopIndex: o._lastRenderedStopIndex,
|
|
1046
1046
|
startIndex: I,
|
|
1047
1047
|
stopIndex: p
|
|
1048
1048
|
})) {
|
|
1049
|
-
if (
|
|
1049
|
+
if (o._listRef == null)
|
|
1050
1050
|
return;
|
|
1051
|
-
typeof
|
|
1051
|
+
typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(I, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
|
|
1052
1052
|
}
|
|
1053
1053
|
});
|
|
1054
|
-
}, c = 0; c <
|
|
1054
|
+
}, c = 0; c < i.length; c += 2)
|
|
1055
1055
|
a(c);
|
|
1056
1056
|
}
|
|
1057
1057
|
}]), t;
|
|
@@ -1096,7 +1096,7 @@ function ke() {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
ke.resetWarningCache = Se;
|
|
1098
1098
|
var Ln = function() {
|
|
1099
|
-
function e(
|
|
1099
|
+
function e(i, o, l, a, c, d) {
|
|
1100
1100
|
if (d !== En) {
|
|
1101
1101
|
var M = new Error(
|
|
1102
1102
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -1229,14 +1229,14 @@ class oe extends Ge {
|
|
|
1229
1229
|
t.deltaY === 1 && !this.isPassiveSupported() && t.preventDefault();
|
|
1230
1230
|
}
|
|
1231
1231
|
scrollListener() {
|
|
1232
|
-
const t = this.scrollComponent, s = window,
|
|
1233
|
-
let
|
|
1232
|
+
const t = this.scrollComponent, s = window, i = this.getParentElement(t);
|
|
1233
|
+
let o;
|
|
1234
1234
|
if (this.props.useWindow) {
|
|
1235
1235
|
const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
|
|
1236
|
-
this.props.isReverse ?
|
|
1236
|
+
this.props.isReverse ? o = a : o = this.calculateOffset(t, a);
|
|
1237
1237
|
} else
|
|
1238
|
-
this.props.isReverse ?
|
|
1239
|
-
|
|
1238
|
+
this.props.isReverse ? o = i.scrollTop : o = t.scrollHeight - i.scrollTop - i.clientHeight;
|
|
1239
|
+
o < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = i.scrollHeight, this.beforeScrollTop = i.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
|
|
1240
1240
|
}
|
|
1241
1241
|
calculateOffset(t, s) {
|
|
1242
1242
|
return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
|
|
@@ -1247,8 +1247,8 @@ class oe extends Ge {
|
|
|
1247
1247
|
render() {
|
|
1248
1248
|
const t = this.filterProps(this.props), {
|
|
1249
1249
|
children: s,
|
|
1250
|
-
element:
|
|
1251
|
-
hasMore:
|
|
1250
|
+
element: i,
|
|
1251
|
+
hasMore: o,
|
|
1252
1252
|
initialLoad: l,
|
|
1253
1253
|
isReverse: a,
|
|
1254
1254
|
loader: c,
|
|
@@ -1265,7 +1265,7 @@ class oe extends Ge {
|
|
|
1265
1265
|
this.scrollComponent = g, I && I(g);
|
|
1266
1266
|
};
|
|
1267
1267
|
const A = [s];
|
|
1268
|
-
return
|
|
1268
|
+
return o && (c ? a ? A.unshift(c) : A.push(c) : this.defaultLoader && (a ? A.unshift(this.defaultLoader) : A.push(this.defaultLoader))), V.createElement(i, D, A);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
se(oe, "propTypes", {
|
|
@@ -1299,8 +1299,8 @@ const On = ({
|
|
|
1299
1299
|
rank: e,
|
|
1300
1300
|
avatar: t,
|
|
1301
1301
|
name: s,
|
|
1302
|
-
points:
|
|
1303
|
-
isCurrentUser:
|
|
1302
|
+
points: i,
|
|
1303
|
+
isCurrentUser: o,
|
|
1304
1304
|
openItemDetail: l,
|
|
1305
1305
|
style: a
|
|
1306
1306
|
}) => /* @__PURE__ */ u(Nn, { onClick: l, style: a, children: [
|
|
@@ -1309,10 +1309,10 @@ const On = ({
|
|
|
1309
1309
|
t ? /* @__PURE__ */ n(gn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(Dn, { children: ve(s || "") }),
|
|
1310
1310
|
/* @__PURE__ */ u(An, { children: [
|
|
1311
1311
|
/* @__PURE__ */ n(jn, { children: s || "" }),
|
|
1312
|
-
|
|
1312
|
+
o && /* @__PURE__ */ n(vn, { name: "icon-star" })
|
|
1313
1313
|
] })
|
|
1314
1314
|
] }),
|
|
1315
|
-
/* @__PURE__ */ n("div", { children: xe(
|
|
1315
|
+
/* @__PURE__ */ n("div", { children: xe(i) })
|
|
1316
1316
|
] }), Cn = /* @__PURE__ */ r("div")({
|
|
1317
1317
|
name: "Container",
|
|
1318
1318
|
class: "c16btbfp",
|
|
@@ -1321,15 +1321,15 @@ const On = ({
|
|
|
1321
1321
|
items: e,
|
|
1322
1322
|
currentUserId: t,
|
|
1323
1323
|
openItemDetail: s,
|
|
1324
|
-
fetchMore:
|
|
1325
|
-
scrollNode:
|
|
1324
|
+
fetchMore: i,
|
|
1325
|
+
scrollNode: o,
|
|
1326
1326
|
hasMore: l
|
|
1327
1327
|
}) => /* @__PURE__ */ n(oe, {
|
|
1328
|
-
loadMore:
|
|
1328
|
+
loadMore: i,
|
|
1329
1329
|
initialLoad: !1,
|
|
1330
1330
|
hasMore: l,
|
|
1331
1331
|
useWindow: !1,
|
|
1332
|
-
getScrollParent: () =>
|
|
1332
|
+
getScrollParent: () => o.current,
|
|
1333
1333
|
children: /* @__PURE__ */ n(Cn, {
|
|
1334
1334
|
children: e.map((a) => /* @__PURE__ */ n(On, {
|
|
1335
1335
|
...a,
|
|
@@ -1337,205 +1337,232 @@ const On = ({
|
|
|
1337
1337
|
isCurrentUser: !!t && t === a.userId
|
|
1338
1338
|
}, a.userId))
|
|
1339
1339
|
})
|
|
1340
|
-
}), kn = ({ deepLink: e }) =>
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1340
|
+
}), kn = ({ deepLink: e }) => /* @__PURE__ */ n(
|
|
1341
|
+
We,
|
|
1342
|
+
{
|
|
1343
|
+
inviteLink: e,
|
|
1344
|
+
socialLinks: [
|
|
1345
|
+
{
|
|
1346
|
+
icon: "icon-facebook",
|
|
1347
|
+
link: "https://www.facebook.com/TheMasters",
|
|
1348
|
+
label: "Facebook"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
icon: "icon-twitter",
|
|
1352
|
+
link: "https://twitter.com/@TheMasters",
|
|
1353
|
+
label: "X"
|
|
1354
|
+
}
|
|
1355
|
+
],
|
|
1356
|
+
inviteCardTitle: "It’s More Fun With Friends",
|
|
1357
|
+
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1358
|
+
}
|
|
1359
|
+
), wn = /* @__PURE__ */ r("div")({
|
|
1360
|
+
name: "InviteLinkContainer",
|
|
1361
|
+
class: "i1chxfpe",
|
|
1362
|
+
propsAsIs: !1
|
|
1363
|
+
}), bn = ({
|
|
1364
|
+
gamification: e,
|
|
1365
|
+
scrollNode: t,
|
|
1366
|
+
scrollStore: s
|
|
1367
|
+
}) => {
|
|
1368
|
+
const {
|
|
1369
|
+
data: i,
|
|
1370
|
+
hasMore: o
|
|
1371
|
+
} = Y(e.leaderboardList.$store), {
|
|
1372
|
+
data: l
|
|
1373
|
+
} = Y(e.deepLink.$store);
|
|
1374
|
+
if (!(i != null && i.length))
|
|
1375
|
+
return /* @__PURE__ */ n(kn, {
|
|
1376
|
+
deepLink: l
|
|
1377
|
+
});
|
|
1378
|
+
const a = async () => {
|
|
1379
|
+
if (l)
|
|
1380
|
+
try {
|
|
1381
|
+
await navigator.clipboard.writeText(l);
|
|
1382
|
+
} catch (c) {
|
|
1383
|
+
console.error("Unable to copy to clipboard", c);
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
return /* @__PURE__ */ u(S, {
|
|
1387
|
+
children: [/* @__PURE__ */ n(Sn, {
|
|
1388
|
+
items: i,
|
|
1368
1389
|
scrollNode: t,
|
|
1369
1390
|
scrollStore: s,
|
|
1370
1391
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1371
|
-
hasMore:
|
|
1392
|
+
hasMore: o,
|
|
1372
1393
|
openItemDetail: e.openUser,
|
|
1373
1394
|
currentUserId: e.currentUserId.get()
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1395
|
+
}), l && /* @__PURE__ */ n(wn, {
|
|
1396
|
+
children: /* @__PURE__ */ n(dn, {
|
|
1397
|
+
onClick: a,
|
|
1398
|
+
title: "Invite Friends",
|
|
1399
|
+
description: "Challenge them now!"
|
|
1400
|
+
})
|
|
1401
|
+
})]
|
|
1402
|
+
});
|
|
1403
|
+
}, $n = /* @__PURE__ */ r("div")({
|
|
1377
1404
|
name: "QuestionItem",
|
|
1378
1405
|
class: "q1w97g3p",
|
|
1379
1406
|
propsAsIs: !1
|
|
1380
|
-
}),
|
|
1407
|
+
}), Qn = /* @__PURE__ */ r("div")({
|
|
1381
1408
|
name: "QuestionCaption",
|
|
1382
1409
|
class: "q2sl39u",
|
|
1383
1410
|
propsAsIs: !1
|
|
1384
|
-
}),
|
|
1411
|
+
}), Rn = /* @__PURE__ */ r("div")({
|
|
1385
1412
|
name: "QuestionBody",
|
|
1386
1413
|
class: "qd5h0uc",
|
|
1387
1414
|
propsAsIs: !1
|
|
1388
|
-
}),
|
|
1415
|
+
}), Un = /* @__PURE__ */ r("div")({
|
|
1389
1416
|
name: "QuestionAction",
|
|
1390
1417
|
class: "q105uluy",
|
|
1391
1418
|
propsAsIs: !1
|
|
1392
|
-
}),
|
|
1419
|
+
}), Yn = () => x, X = /* @__PURE__ */ r(Yn())({
|
|
1393
1420
|
name: "QuestionActionIcon",
|
|
1394
1421
|
class: "q1fa0b9h",
|
|
1395
1422
|
propsAsIs: !0
|
|
1396
|
-
}),
|
|
1423
|
+
}), Pn = () => x, qn = /* @__PURE__ */ r(Pn())({
|
|
1397
1424
|
name: "QuestionTypeIcon",
|
|
1398
1425
|
class: "qxlt78s",
|
|
1399
1426
|
propsAsIs: !0
|
|
1400
|
-
}),
|
|
1427
|
+
}), Vn = /* @__PURE__ */ r("div")({
|
|
1401
1428
|
name: "QuestionTypeLabel",
|
|
1402
1429
|
class: "qmg0vkx",
|
|
1403
1430
|
propsAsIs: !1
|
|
1404
|
-
}),
|
|
1431
|
+
}), Wn = /* @__PURE__ */ r("div")({
|
|
1405
1432
|
name: "QuestionContent",
|
|
1406
1433
|
class: "q1uz5j1g",
|
|
1407
1434
|
propsAsIs: !1
|
|
1408
|
-
}),
|
|
1435
|
+
}), _n = /* @__PURE__ */ r("button")({
|
|
1409
1436
|
name: "PlayButton",
|
|
1410
1437
|
class: "p1pba9p1",
|
|
1411
1438
|
propsAsIs: !1
|
|
1412
|
-
}),
|
|
1413
|
-
[
|
|
1414
|
-
[
|
|
1415
|
-
[
|
|
1416
|
-
[
|
|
1417
|
-
},
|
|
1439
|
+
}), Bn = {
|
|
1440
|
+
[H.LOST]: /* @__PURE__ */ n(X, { name: "incorrectVoted" }),
|
|
1441
|
+
[H.WON]: /* @__PURE__ */ n(X, { name: "icon-check" }),
|
|
1442
|
+
[H.UNSET]: /* @__PURE__ */ n(X, { name: "icon-arrow" }),
|
|
1443
|
+
[H.DNP]: /* @__PURE__ */ n(X, { name: "icon-arrow" })
|
|
1444
|
+
}, Fn = ({
|
|
1418
1445
|
questionId: e,
|
|
1419
1446
|
questionType: t,
|
|
1420
1447
|
questionStatus: s,
|
|
1421
|
-
subject:
|
|
1422
|
-
openForVoting:
|
|
1448
|
+
subject: i,
|
|
1449
|
+
openForVoting: o,
|
|
1423
1450
|
openQuestion: l,
|
|
1424
1451
|
status: a
|
|
1425
1452
|
}) => {
|
|
1426
|
-
const c = Ae[t], d =
|
|
1427
|
-
return c ? /* @__PURE__ */ u(
|
|
1428
|
-
/* @__PURE__ */ u(
|
|
1429
|
-
/* @__PURE__ */ u(
|
|
1453
|
+
const c = Ae[t], d = Bn[a];
|
|
1454
|
+
return c ? /* @__PURE__ */ u($n, { onClick: () => l == null ? void 0 : l(e), children: [
|
|
1455
|
+
/* @__PURE__ */ u(Wn, { children: [
|
|
1456
|
+
/* @__PURE__ */ u(Qn, { children: [
|
|
1430
1457
|
/* @__PURE__ */ n(
|
|
1431
|
-
|
|
1458
|
+
qn,
|
|
1432
1459
|
{
|
|
1433
1460
|
"data-type-trivia": t === N.TRIVIA,
|
|
1434
1461
|
"data-type-poll": t === N.POLL,
|
|
1435
1462
|
name: c.iconName
|
|
1436
1463
|
}
|
|
1437
1464
|
),
|
|
1438
|
-
/* @__PURE__ */ u(
|
|
1465
|
+
/* @__PURE__ */ u(Vn, { children: [
|
|
1439
1466
|
c.label,
|
|
1440
1467
|
t === N.TRIVIA && s === $.RESOLVED && " • Expired"
|
|
1441
1468
|
] })
|
|
1442
1469
|
] }),
|
|
1443
|
-
/* @__PURE__ */ n(
|
|
1470
|
+
/* @__PURE__ */ n(Rn, { children: i || "" })
|
|
1444
1471
|
] }),
|
|
1445
|
-
/* @__PURE__ */ n(
|
|
1472
|
+
/* @__PURE__ */ n(Un, { children: o ? /* @__PURE__ */ n(_n, { children: "Play" }) : d })
|
|
1446
1473
|
] }) : null;
|
|
1447
|
-
},
|
|
1474
|
+
}, Zn = /* @__PURE__ */ r("div")({
|
|
1448
1475
|
name: "Container",
|
|
1449
1476
|
class: "cll3md7",
|
|
1450
1477
|
propsAsIs: !1
|
|
1451
|
-
}),
|
|
1478
|
+
}), Hn = /* @__PURE__ */ r("button")({
|
|
1452
1479
|
name: "ActionBtn",
|
|
1453
1480
|
class: "a10g1iik",
|
|
1454
1481
|
propsAsIs: !1
|
|
1455
|
-
}),
|
|
1482
|
+
}), Gn = ({
|
|
1456
1483
|
openInsight: e,
|
|
1457
1484
|
questionId: t,
|
|
1458
1485
|
...s
|
|
1459
|
-
}) => /* @__PURE__ */ u(
|
|
1486
|
+
}) => /* @__PURE__ */ u(Zn, { children: [
|
|
1460
1487
|
/* @__PURE__ */ n(Oe, { questionId: t, ...s, isPickHistory: !0 }),
|
|
1461
|
-
e && /* @__PURE__ */ n(
|
|
1462
|
-
] }),
|
|
1488
|
+
e && /* @__PURE__ */ n(Hn, { onClick: () => e(t), children: "View Insight" })
|
|
1489
|
+
] }), Jn = /* @__PURE__ */ r("div")({
|
|
1463
1490
|
name: "Container",
|
|
1464
1491
|
class: "cl56x6b",
|
|
1465
1492
|
propsAsIs: !1
|
|
1466
|
-
}),
|
|
1493
|
+
}), Xn = () => _e, Kn = /* @__PURE__ */ r(Xn())({
|
|
1467
1494
|
name: "ActionButton",
|
|
1468
1495
|
class: "a11pzf92",
|
|
1469
1496
|
propsAsIs: !0
|
|
1470
|
-
}),
|
|
1497
|
+
}), ei = /* @__PURE__ */ r("div")({
|
|
1471
1498
|
name: "DateTime",
|
|
1472
1499
|
class: "d1hbaleq",
|
|
1473
1500
|
propsAsIs: !1
|
|
1474
|
-
}),
|
|
1501
|
+
}), ti = /* @__PURE__ */ r("blockquote")({
|
|
1475
1502
|
name: "Quote",
|
|
1476
1503
|
class: "qvvgqjm",
|
|
1477
1504
|
propsAsIs: !1
|
|
1478
|
-
}),
|
|
1505
|
+
}), si = ({
|
|
1479
1506
|
openTweet: e,
|
|
1480
1507
|
created: t,
|
|
1481
1508
|
...s
|
|
1482
1509
|
}) => {
|
|
1483
|
-
const
|
|
1510
|
+
const i = k(() => {
|
|
1484
1511
|
if (t) {
|
|
1485
|
-
const
|
|
1486
|
-
if (le(
|
|
1512
|
+
const o = new Date(t);
|
|
1513
|
+
if (le(o))
|
|
1487
1514
|
return {
|
|
1488
|
-
date: re(
|
|
1489
|
-
time: ae(
|
|
1515
|
+
date: re(o),
|
|
1516
|
+
time: ae(o)
|
|
1490
1517
|
};
|
|
1491
1518
|
}
|
|
1492
1519
|
return null;
|
|
1493
1520
|
}, [t]);
|
|
1494
|
-
return /* @__PURE__ */ u(
|
|
1495
|
-
|
|
1496
|
-
|
|
1521
|
+
return /* @__PURE__ */ u(Jn, { children: [
|
|
1522
|
+
i && /* @__PURE__ */ u(ei, { children: [
|
|
1523
|
+
i.date,
|
|
1497
1524
|
" · ",
|
|
1498
|
-
|
|
1525
|
+
i.time
|
|
1499
1526
|
] }),
|
|
1500
|
-
s.title && /* @__PURE__ */ n(
|
|
1527
|
+
s.title && /* @__PURE__ */ n(ti, { children: s.title }),
|
|
1501
1528
|
/* @__PURE__ */ n(je, { ...s }),
|
|
1502
|
-
e && /* @__PURE__ */ n(
|
|
1529
|
+
e && /* @__PURE__ */ n(Kn, { onClick: () => e(s.tweetId), children: "View Insight" })
|
|
1503
1530
|
] });
|
|
1504
|
-
},
|
|
1531
|
+
}, ni = /* @__PURE__ */ r("div")({
|
|
1505
1532
|
name: "QuestionsContainer",
|
|
1506
1533
|
class: "qvghv3l",
|
|
1507
1534
|
propsAsIs: !1
|
|
1508
|
-
}),
|
|
1509
|
-
var
|
|
1510
|
-
if (s.type === "question" && ((
|
|
1535
|
+
}), ii = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(ni, { children: e == null ? void 0 : e.map((s) => {
|
|
1536
|
+
var i, o, l;
|
|
1537
|
+
if (s.type === "question" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1511
1538
|
const a = s.attributes.attributes.value;
|
|
1512
|
-
return /* @__PURE__ */ n(
|
|
1539
|
+
return /* @__PURE__ */ n(Fn, { openQuestion: t, ...a }, a.questionId);
|
|
1513
1540
|
}
|
|
1514
|
-
if (s.type === "insight" && ((
|
|
1541
|
+
if (s.type === "insight" && ((o = s.attributes) == null ? void 0 : o.attributes.case) === "insight") {
|
|
1515
1542
|
const a = s.attributes.attributes.value, c = s.attributes.created;
|
|
1516
|
-
return /* @__PURE__ */ n(
|
|
1543
|
+
return /* @__PURE__ */ n(Gn, { openInsight: t, ...a, created: c }, a.questionId);
|
|
1517
1544
|
}
|
|
1518
1545
|
if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
|
|
1519
1546
|
const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
|
|
1520
|
-
return /* @__PURE__ */ n(
|
|
1547
|
+
return /* @__PURE__ */ n(si, { openTweet: t, ...a, tweetId: c, created: d }, c);
|
|
1521
1548
|
}
|
|
1522
1549
|
return null;
|
|
1523
|
-
}) }),
|
|
1550
|
+
}) }), oi = ({ store: e, openQuestion: t }) => {
|
|
1524
1551
|
const s = Y(e);
|
|
1525
|
-
return s != null && s.data ? /* @__PURE__ */ n(
|
|
1526
|
-
},
|
|
1552
|
+
return s != null && s.data ? /* @__PURE__ */ n(ii, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
|
|
1553
|
+
}, ri = ({ userSummary: e }) => {
|
|
1527
1554
|
var t;
|
|
1528
|
-
const [s,
|
|
1555
|
+
const [s, i] = w(void 0);
|
|
1529
1556
|
return te(() => {
|
|
1530
|
-
const
|
|
1531
|
-
l != null && l.data &&
|
|
1557
|
+
const o = e.subscribe((l) => {
|
|
1558
|
+
l != null && l.data && i(l.data);
|
|
1532
1559
|
});
|
|
1533
1560
|
return () => {
|
|
1534
|
-
|
|
1561
|
+
o();
|
|
1535
1562
|
};
|
|
1536
1563
|
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(fe, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
|
|
1537
|
-
},
|
|
1538
|
-
const [
|
|
1564
|
+
}, ai = ({ gamification: e, className: t, scrollStore: s, scrollNode: i }) => {
|
|
1565
|
+
const [o, l] = w(!1), [a, c] = w(ee.HOME), [, d] = Je(), M = (p) => {
|
|
1539
1566
|
d(() => c(p));
|
|
1540
1567
|
}, I = (p) => {
|
|
1541
1568
|
d(() => l(p));
|
|
@@ -1548,75 +1575,72 @@ const On = ({
|
|
|
1548
1575
|
I(p.scrollDirection === "forward"), s.setKey("tabsShown", p.scrollDirection !== "forward");
|
|
1549
1576
|
}), [s]), /* @__PURE__ */ u("div", { className: t, children: [
|
|
1550
1577
|
/* @__PURE__ */ n(
|
|
1551
|
-
|
|
1578
|
+
K,
|
|
1552
1579
|
{
|
|
1553
1580
|
style: {
|
|
1554
1581
|
paddingBottom: "8px",
|
|
1555
1582
|
position: "sticky",
|
|
1556
1583
|
transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
|
|
1557
|
-
top:
|
|
1584
|
+
top: o ? "-60px" : "0px"
|
|
1558
1585
|
},
|
|
1559
|
-
children: /* @__PURE__ */ n(
|
|
1586
|
+
children: /* @__PURE__ */ n(en, { activePage: a, toggleActivePage: M })
|
|
1560
1587
|
}
|
|
1561
1588
|
),
|
|
1562
1589
|
a === ee.HOME && /* @__PURE__ */ u(S, { children: [
|
|
1563
|
-
/* @__PURE__ */ n(
|
|
1564
|
-
/* @__PURE__ */ n(Be, { children: /* @__PURE__ */ n(
|
|
1590
|
+
/* @__PURE__ */ n(K, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(ri, { userSummary: e.userSummary }) }),
|
|
1591
|
+
/* @__PURE__ */ n(Be, { children: /* @__PURE__ */ n(oi, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1565
1592
|
] }),
|
|
1566
|
-
a === ee.LEADERBOARD && /* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */ n(Z, { style: { paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ n(wn, { scrollStore: s, scrollNode: o, gamification: e }) }),
|
|
1568
|
-
/* @__PURE__ */ n(Z, { style: { position: "sticky", bottom: "0", paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ n(on, { title: "Invite Friends", description: "Challenge them now!" }) })
|
|
1569
|
-
] })
|
|
1593
|
+
a === ee.LEADERBOARD && /* @__PURE__ */ n(K, { style: { paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ n(bn, { scrollStore: s, scrollNode: i, gamification: e }) })
|
|
1570
1594
|
] });
|
|
1571
|
-
},
|
|
1595
|
+
}, li = () => Fe, Te = /* @__PURE__ */ r(li())({
|
|
1572
1596
|
name: "OpenedContainer",
|
|
1573
1597
|
class: "oar61gl",
|
|
1574
1598
|
propsAsIs: !0
|
|
1575
|
-
}),
|
|
1599
|
+
}), ci = /* @__PURE__ */ r("div")({
|
|
1576
1600
|
name: "UserContainer",
|
|
1577
1601
|
class: "u14zaal4",
|
|
1578
1602
|
propsAsIs: !1
|
|
1579
|
-
}),
|
|
1603
|
+
}), di = ({
|
|
1580
1604
|
correct: e,
|
|
1581
1605
|
incorrect: t
|
|
1582
1606
|
}) => {
|
|
1583
1607
|
const s = e + t;
|
|
1584
1608
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
1585
|
-
},
|
|
1609
|
+
}, hi = ({
|
|
1586
1610
|
gamification: e,
|
|
1587
1611
|
scrollStore: t,
|
|
1588
1612
|
className: s,
|
|
1589
|
-
appNode:
|
|
1590
|
-
scrollNode:
|
|
1613
|
+
appNode: i,
|
|
1614
|
+
scrollNode: o
|
|
1591
1615
|
}) => {
|
|
1592
1616
|
const l = Y(e.openedQuestion.$store), a = Y(e.openedUser);
|
|
1593
1617
|
return /* @__PURE__ */ u(S, {
|
|
1594
|
-
children: [l &&
|
|
1618
|
+
children: [l && i.current && ue.createPortal(/* @__PURE__ */ n(Te, {
|
|
1595
1619
|
className: s,
|
|
1596
1620
|
children: /* @__PURE__ */ n(Hs, {
|
|
1597
1621
|
gamification: e
|
|
1598
1622
|
})
|
|
1599
|
-
}),
|
|
1623
|
+
}), i.current), a && i.current && ue.createPortal(/* @__PURE__ */ n(Te, {
|
|
1600
1624
|
className: s,
|
|
1601
|
-
children: /* @__PURE__ */ u(
|
|
1625
|
+
children: /* @__PURE__ */ u(ci, {
|
|
1602
1626
|
children: [/* @__PURE__ */ n(ye, {
|
|
1603
1627
|
label: "Friend's Rank",
|
|
1604
1628
|
close: e.closeUser
|
|
1605
|
-
}), /* @__PURE__ */ n(
|
|
1629
|
+
}), /* @__PURE__ */ n(K, {
|
|
1606
1630
|
children: /* @__PURE__ */ n(fe, {
|
|
1607
1631
|
...a,
|
|
1608
|
-
successRate:
|
|
1632
|
+
successRate: di(a)
|
|
1609
1633
|
})
|
|
1610
1634
|
})]
|
|
1611
1635
|
})
|
|
1612
|
-
}),
|
|
1636
|
+
}), i.current), /* @__PURE__ */ n(ai, {
|
|
1613
1637
|
scrollStore: t,
|
|
1614
|
-
scrollNode:
|
|
1638
|
+
scrollNode: o,
|
|
1615
1639
|
className: s,
|
|
1616
1640
|
gamification: e
|
|
1617
1641
|
})]
|
|
1618
1642
|
});
|
|
1619
1643
|
};
|
|
1620
1644
|
export {
|
|
1621
|
-
|
|
1645
|
+
hi as default
|
|
1622
1646
|
};
|