@streamlayer/react 0.40.0 → 0.40.1
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 +14 -14
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +55 -55
- package/lib/dist/es/gamification-feature.js +423 -418
- package/lib/dist/es/masters.js +5717 -5703
- package/lib/dist/index.d.ts +4 -2
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +181 -176
- package/lib/es/masters2.js +232 -221
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@ import { s as t, c as A, d as ce } from "./useSdkFeature.js";
|
|
|
3
3
|
import { useStore as S } from "@nanostores/react";
|
|
4
4
|
import { useState as E, useLayoutEffect as Re, useCallback as B, useEffect as ee, useMemo as V, PureComponent as we, useTransition as ke } from "react";
|
|
5
5
|
import { o as de, I as pe, s as ue, c as Te, q as xe, J as me, n as he, F as Se, h as qe, a as Ee, p as Ve, C as Ne, b as Ie, m as De, d as Le, l as Pe, e as Oe, V as Qe, f as Me } from "./masters2.js";
|
|
6
|
-
import { QuestionType as m, QuestionStatus as N, QuestionImages as
|
|
6
|
+
import { QuestionType as m, QuestionStatus as N, QuestionImages as M, PickHistoryStatus as F } from "@streamlayer/sdk-web-types";
|
|
7
7
|
import "react-countup";
|
|
8
8
|
import { CountdownCircleTimer as _e } from "react-countdown-circle-timer";
|
|
9
9
|
import { E as D } from "./index2.js";
|
|
@@ -199,15 +199,15 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
199
199
|
/* @__PURE__ */ s(W, { indicator: `${u || 0}%`, title: "Succ. rate" })
|
|
200
200
|
] })
|
|
201
201
|
] })
|
|
202
|
-
] }),
|
|
202
|
+
] }), gs = /* @__PURE__ */ t("div")({
|
|
203
203
|
name: "SponsorLogoWrap",
|
|
204
204
|
class: "s8p5v5z",
|
|
205
205
|
propsAsIs: !1
|
|
206
|
-
}),
|
|
206
|
+
}), $s = () => A, bs = /* @__PURE__ */ t($s())({
|
|
207
207
|
name: "SponsorLogo",
|
|
208
208
|
class: "s755yti",
|
|
209
209
|
propsAsIs: !0
|
|
210
|
-
}), ys = () => /* @__PURE__ */ s(
|
|
210
|
+
}), ys = () => /* @__PURE__ */ s(gs, {
|
|
211
211
|
children: /* @__PURE__ */ s(bs, {
|
|
212
212
|
name: "mastersLogo"
|
|
213
213
|
})
|
|
@@ -269,8 +269,8 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
269
269
|
enteredAnActiveQuestion: h,
|
|
270
270
|
marketClosed: C
|
|
271
271
|
}) => {
|
|
272
|
-
const I = i && (o === m.TRIVIA || o === m.PREDICTION) && l && d !== N.RESOLVED, f = o === m.PREDICTION && !r, k = C && o === m.PREDICTION && !i && !h || o === m.PREDICTION && u && l && h,
|
|
273
|
-
if (!p && !a &&
|
|
272
|
+
const I = i && (o === m.TRIVIA || o === m.PREDICTION) && l && d !== N.RESOLVED, f = o === m.PREDICTION && !r, k = C && o === m.PREDICTION && !i && !h || o === m.PREDICTION && u && l && h, $ = I && f, w = I && r, b = o === m.PREDICTION && i && l && r, L = i && o === m.POLL && l;
|
|
273
|
+
if (!p && !a && !$ && !w && !k && !L && !b)
|
|
274
274
|
return null;
|
|
275
275
|
const q = n ? "correct" : "incorrect", T = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
276
276
|
return /* @__PURE__ */ c(xs, { "data-isPrediction": f, children: [
|
|
@@ -295,7 +295,7 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
295
295
|
/* @__PURE__ */ s(X, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
296
296
|
] })
|
|
297
297
|
] }),
|
|
298
|
-
|
|
298
|
+
$ && /* @__PURE__ */ c(x, { children: [
|
|
299
299
|
/* @__PURE__ */ s(qs, { name: "icon-prediction" }),
|
|
300
300
|
/* @__PURE__ */ s(Q, { children: "Stay tuned to see if your prediction was correct." })
|
|
301
301
|
] }),
|
|
@@ -384,11 +384,11 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
384
384
|
class: "c1j2j0s0",
|
|
385
385
|
propsAsIs: !0
|
|
386
386
|
}), oe = {
|
|
387
|
-
[
|
|
388
|
-
[
|
|
389
|
-
[
|
|
390
|
-
[
|
|
391
|
-
[
|
|
387
|
+
[M.CENTERED]: (e) => /* @__PURE__ */ s(Fs, { alt: "option-icon", src: e }),
|
|
388
|
+
[M.TRANSPARENT]: (e) => /* @__PURE__ */ s(Us, { children: /* @__PURE__ */ s(Bs, { style: { backgroundImage: `url(${e})` } }) }),
|
|
389
|
+
[M.ROUNDED]: (e) => /* @__PURE__ */ s(Zs, { alt: "option-icon", src: e }),
|
|
390
|
+
[M.NONE]: () => null,
|
|
391
|
+
[M.UNSET]: () => null
|
|
392
392
|
}, en = ({ questionType: e, hasCorrectAnswer: n, correct: i, youVoted: o, questionVoted: r }) => {
|
|
393
393
|
if (e === m.POLL && o)
|
|
394
394
|
return "correct";
|
|
@@ -423,13 +423,13 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
423
423
|
answerTimeExpired: I,
|
|
424
424
|
questionStatus: f,
|
|
425
425
|
isLoading: k,
|
|
426
|
-
questionType:
|
|
426
|
+
questionType: $,
|
|
427
427
|
correct: w,
|
|
428
428
|
hasCorrectAnswer: b,
|
|
429
429
|
votedAfterQuestionClosed: L,
|
|
430
430
|
enteredAnActiveQuestion: q,
|
|
431
431
|
marketClosed: T
|
|
432
|
-
} = e, [
|
|
432
|
+
} = e, [_, z] = E(d), P = en(e), G = sn({ questionType: $, questionVoted: h, correct: w, hasCorrectAnswer: b, questionStatus: f }), v = T && $ === m.PREDICTION, g = h || v, y = $ === m.PREDICTION && !h && !T, J = h && !u && P !== "incorrect";
|
|
433
433
|
return Re(() => {
|
|
434
434
|
d > 0 && (z(0), requestAnimationFrame(() => {
|
|
435
435
|
z(d);
|
|
@@ -444,11 +444,11 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
444
444
|
"data-is-not-checked": J,
|
|
445
445
|
onClick: (K) => {
|
|
446
446
|
l(
|
|
447
|
-
|
|
447
|
+
$ === m.PREDICTION ? T : f === N.RESOLVED
|
|
448
448
|
), a(K);
|
|
449
449
|
},
|
|
450
450
|
children: [
|
|
451
|
-
/* @__PURE__ */ s(_s, { "data-answer-state": P, style: { width: `${
|
|
451
|
+
/* @__PURE__ */ s(_s, { "data-answer-state": P, style: { width: `${g ? _ : 0}%` } }),
|
|
452
452
|
/* @__PURE__ */ c(js, { children: [
|
|
453
453
|
o && C && ((n = oe[C]) == null ? void 0 : n.call(oe, o)),
|
|
454
454
|
/* @__PURE__ */ s(Hs, { children: r }),
|
|
@@ -456,7 +456,7 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
456
456
|
p,
|
|
457
457
|
/* @__PURE__ */ s(Gs, { children: "pts" })
|
|
458
458
|
] }),
|
|
459
|
-
|
|
459
|
+
g && /* @__PURE__ */ c(Ys, { children: [
|
|
460
460
|
G && /* @__PURE__ */ s(Xs, { name: "selected" }),
|
|
461
461
|
/* @__PURE__ */ s(Js, { children: /* @__PURE__ */ s(ce, { value: d, suffix: "%" }) })
|
|
462
462
|
] })
|
|
@@ -546,7 +546,7 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
546
546
|
o && d !== m.PREDICTION && /* @__PURE__ */ s(cn, { isPlaying: i, onTimerExpired: a, duration: p })
|
|
547
547
|
] }), An = ({ openedQuestion: e, isLoading: n, vote: i, close: o }) => {
|
|
548
548
|
var r, d;
|
|
549
|
-
const p = e.subject, a = e.type, l = e.status, u = (r = e.options) == null ? void 0 : r.options, h = e.marketClosed, [C, I] = E(!1), [f, k] = E(!1), [
|
|
549
|
+
const p = e.subject, a = e.type, l = e.status, u = (r = e.options) == null ? void 0 : r.options, h = e.marketClosed, [C, I] = E(!1), [f, k] = E(!1), [$, w] = E(!0), [b, L] = E(!1), [q, T] = E(""), _ = e == null ? void 0 : e.id;
|
|
550
550
|
ee(() => {
|
|
551
551
|
a === m.PREDICTION ? h && w(!1) : l === N.RESOLVED && w(!1);
|
|
552
552
|
}, []);
|
|
@@ -554,39 +554,39 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
554
554
|
k(R), I(!0);
|
|
555
555
|
}, []), P = B(
|
|
556
556
|
async (R) => {
|
|
557
|
-
if (
|
|
558
|
-
const
|
|
559
|
-
T(
|
|
557
|
+
if (_) {
|
|
558
|
+
const j = R.currentTarget.value;
|
|
559
|
+
T(j), await i(_, j);
|
|
560
560
|
}
|
|
561
561
|
},
|
|
562
|
-
[
|
|
562
|
+
[_, T, i]
|
|
563
563
|
), G = B(() => {
|
|
564
564
|
L(!0), setTimeout(o, 3e3);
|
|
565
565
|
}, [o]), v = V(
|
|
566
566
|
() => e == null ? void 0 : e.answers.find((R) => R.youVoted === !0),
|
|
567
567
|
[e]
|
|
568
|
-
),
|
|
568
|
+
), g = V(
|
|
569
569
|
() => !!(e != null && e.answers.find((R) => R.correct === !0)),
|
|
570
570
|
[e]
|
|
571
571
|
), y = V(
|
|
572
572
|
() => e == null ? void 0 : e.answers.find((R) => R.correct === !0),
|
|
573
573
|
[e]
|
|
574
574
|
), J = V(() => e ? e.answers.map((R) => {
|
|
575
|
-
var
|
|
575
|
+
var j;
|
|
576
576
|
return {
|
|
577
577
|
...R,
|
|
578
578
|
questionVoted: !!v,
|
|
579
579
|
youSelected: q === R.id,
|
|
580
580
|
isLoading: n,
|
|
581
|
-
hasCorrectAnswer:
|
|
581
|
+
hasCorrectAnswer: g,
|
|
582
582
|
questionType: e.type,
|
|
583
583
|
answerTimeExpired: b,
|
|
584
584
|
questionStatus: l,
|
|
585
|
-
imageMode: (
|
|
585
|
+
imageMode: (j = e.appearance) == null ? void 0 : j.images,
|
|
586
586
|
onVote: P
|
|
587
587
|
};
|
|
588
588
|
}) : [], [
|
|
589
|
-
|
|
589
|
+
g,
|
|
590
590
|
b,
|
|
591
591
|
n,
|
|
592
592
|
e,
|
|
@@ -594,8 +594,8 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
594
594
|
l,
|
|
595
595
|
P,
|
|
596
596
|
q
|
|
597
|
-
]), K = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, O = l === N.RESOLVED && a === m.TRIVIA && !v &&
|
|
598
|
-
if (a === m.PREDICTION && v && (
|
|
597
|
+
]), K = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, O = l === N.RESOLVED && a === m.TRIVIA && !v && !$, se = a === m.TRIVIA && f && C && $, ne = V(() => a === m.PREDICTION ? !!(v && !g || v && g && y != null && y.youVoted) : !0, [a, v, g, y]), ge = V(() => {
|
|
598
|
+
if (a === m.PREDICTION && v && (!g || g && y != null && y.youVoted))
|
|
599
599
|
return v.points;
|
|
600
600
|
if (!(O || b))
|
|
601
601
|
return l === N.RESOLVED ? 0 : v ? v.correct ? v.points : 0 : y == null ? void 0 : y.points;
|
|
@@ -606,8 +606,8 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
606
606
|
l,
|
|
607
607
|
O,
|
|
608
608
|
a,
|
|
609
|
-
|
|
610
|
-
]),
|
|
609
|
+
g
|
|
610
|
+
]), $e = V(() => a === m.PREDICTION && v ? g ? g && y != null && y.youVoted ? "You won" : "" : "To win" : O || b ? "Time expired" : a === m.POLL ? "Time remaining" : v ? "You won" : "To win", [b, a, v, O, g, y]), be = (a === m.TRIVIA || a === m.PREDICTION) && v && g && (y == null ? void 0 : y.youVoted), ye = v || O || se || a === m.TRIVIA && l === N.RESOLVED && $;
|
|
611
611
|
return /* @__PURE__ */ s(Ls, { children: /* @__PURE__ */ s(Ns, { children: /* @__PURE__ */ c(Ps, { children: [
|
|
612
612
|
/* @__PURE__ */ s(
|
|
613
613
|
Vs,
|
|
@@ -616,21 +616,21 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
616
616
|
questionVoted: !!v,
|
|
617
617
|
questionVotedCorrectly: v == null ? void 0 : v.correct,
|
|
618
618
|
questionType: a,
|
|
619
|
-
hasCorrectAnswer:
|
|
619
|
+
hasCorrectAnswer: g,
|
|
620
620
|
questionStatus: l,
|
|
621
621
|
showExpiredNotification: O,
|
|
622
622
|
showClosedNotificationTrivia: se,
|
|
623
623
|
votedInCurrentRender: C,
|
|
624
624
|
votedAfterQuestionClosed: f,
|
|
625
|
-
enteredAnActiveQuestion:
|
|
625
|
+
enteredAnActiveQuestion: $,
|
|
626
626
|
marketClosed: h
|
|
627
627
|
}
|
|
628
628
|
),
|
|
629
629
|
ne && /* @__PURE__ */ s(
|
|
630
630
|
fn,
|
|
631
631
|
{
|
|
632
|
-
title:
|
|
633
|
-
points:
|
|
632
|
+
title: $e,
|
|
633
|
+
points: ge,
|
|
634
634
|
onTimerExpired: G,
|
|
635
635
|
questionType: e.type,
|
|
636
636
|
isTimer: !n,
|
|
@@ -653,18 +653,18 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
653
653
|
...R,
|
|
654
654
|
markThatVoted: z,
|
|
655
655
|
votedAfterQuestionClosed: f,
|
|
656
|
-
enteredAnActiveQuestion:
|
|
656
|
+
enteredAnActiveQuestion: $,
|
|
657
657
|
marketClosed: h
|
|
658
658
|
},
|
|
659
659
|
R.id
|
|
660
660
|
)) })
|
|
661
661
|
] })
|
|
662
662
|
] }) }) });
|
|
663
|
-
},
|
|
663
|
+
}, gn = /* @__PURE__ */ t("div")({
|
|
664
664
|
name: "Container",
|
|
665
665
|
class: "cgn5uen",
|
|
666
666
|
propsAsIs: !1
|
|
667
|
-
}),
|
|
667
|
+
}), $n = /* @__PURE__ */ t("div")({
|
|
668
668
|
name: "Content",
|
|
669
669
|
class: "c1px8nt6",
|
|
670
670
|
propsAsIs: !1
|
|
@@ -680,72 +680,77 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
680
680
|
name: "Image",
|
|
681
681
|
class: "id3lh3p",
|
|
682
682
|
propsAsIs: !1
|
|
683
|
+
}), wn = /* @__PURE__ */ t("div")({
|
|
684
|
+
name: "ImageContainer",
|
|
685
|
+
class: "i1gfjeu5",
|
|
686
|
+
propsAsIs: !1
|
|
683
687
|
}), Ae = ({
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
+
imageMode: e,
|
|
689
|
+
instantView: n,
|
|
690
|
+
isDetail: i,
|
|
691
|
+
notification: o,
|
|
692
|
+
controlVideo: r
|
|
688
693
|
}) => {
|
|
689
|
-
const
|
|
690
|
-
return /* @__PURE__ */ c(
|
|
691
|
-
(
|
|
694
|
+
const d = n == null ? void 0 : n.heading, p = n == null ? void 0 : n.body, a = d || p, l = o == null ? void 0 : o.title, u = o == null ? void 0 : o.body;
|
|
695
|
+
return /* @__PURE__ */ c(gn, { children: [
|
|
696
|
+
(n == null ? void 0 : n.video) && /* @__PURE__ */ s(
|
|
692
697
|
xe,
|
|
693
698
|
{
|
|
694
|
-
source:
|
|
695
|
-
poster:
|
|
696
|
-
controlVideo:
|
|
699
|
+
source: n.video.url,
|
|
700
|
+
poster: n.video.thumbnailUrl,
|
|
701
|
+
controlVideo: r
|
|
697
702
|
}
|
|
698
703
|
),
|
|
699
|
-
(
|
|
700
|
-
/* @__PURE__ */ c(
|
|
701
|
-
/* @__PURE__ */ s(bn, { children:
|
|
702
|
-
/* @__PURE__ */ s(yn, { children:
|
|
704
|
+
(n == null ? void 0 : n.image) && !(n != null && n.video) && /* @__PURE__ */ s(wn, { "data-rounded": e === M.ROUNDED, children: /* @__PURE__ */ s(Rn, { src: n == null ? void 0 : n.image }) }),
|
|
705
|
+
/* @__PURE__ */ c($n, { children: [
|
|
706
|
+
/* @__PURE__ */ s(bn, { children: i && a ? d : l }),
|
|
707
|
+
/* @__PURE__ */ s(yn, { children: i && a ? p : u })
|
|
703
708
|
] })
|
|
704
709
|
] });
|
|
705
|
-
},
|
|
710
|
+
}, kn = /* @__PURE__ */ t("div")({
|
|
706
711
|
name: "Container",
|
|
707
712
|
class: "c1euiow",
|
|
708
713
|
propsAsIs: !1
|
|
709
|
-
}),
|
|
714
|
+
}), Tn = /* @__PURE__ */ t("a")({
|
|
710
715
|
name: "WebLinkBtn",
|
|
711
716
|
class: "w19zie3h",
|
|
712
717
|
propsAsIs: !1
|
|
713
|
-
}),
|
|
718
|
+
}), xn = ({ instantView: e, ...n }) => /* @__PURE__ */ c(kn, { children: [
|
|
714
719
|
/* @__PURE__ */ s(Ae, { instantView: e, ...n, isDetail: !0 }),
|
|
715
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ c(
|
|
720
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ c(Tn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
716
721
|
e == null ? void 0 : e.webLink.label,
|
|
717
722
|
/* @__PURE__ */ s(A, { name: "icon-external-link" })
|
|
718
723
|
] })
|
|
719
|
-
] }),
|
|
724
|
+
] }), Sn = /* @__PURE__ */ t("div")({
|
|
720
725
|
name: "Container",
|
|
721
726
|
class: "c1dcxmvf",
|
|
722
727
|
propsAsIs: !1
|
|
723
|
-
}),
|
|
728
|
+
}), qn = /* @__PURE__ */ t("blockquote")({
|
|
724
729
|
name: "Quote",
|
|
725
730
|
class: "qb4q22c",
|
|
726
731
|
propsAsIs: !1
|
|
727
|
-
}),
|
|
728
|
-
e.title && /* @__PURE__ */ s(
|
|
732
|
+
}), En = (e) => /* @__PURE__ */ c(Sn, { children: [
|
|
733
|
+
e.title && /* @__PURE__ */ s(qn, { children: e.title }),
|
|
729
734
|
/* @__PURE__ */ s(me, { ...e, isDetail: !0 })
|
|
730
|
-
] }),
|
|
735
|
+
] }), Vn = /* @__PURE__ */ t("div")({
|
|
731
736
|
name: "QuestionContainer",
|
|
732
737
|
class: "qdri6g3",
|
|
733
738
|
propsAsIs: !1
|
|
734
|
-
}),
|
|
739
|
+
}), Nn = ({
|
|
735
740
|
openedQuestion: e
|
|
736
741
|
}) => {
|
|
737
742
|
var n, i;
|
|
738
743
|
const {
|
|
739
744
|
sdk: o
|
|
740
745
|
} = he();
|
|
741
|
-
return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(
|
|
746
|
+
return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(xn, {
|
|
742
747
|
...e.attributes.attributes.value,
|
|
743
748
|
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
744
|
-
}) : ((i = e == null ? void 0 : e.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ s(
|
|
749
|
+
}) : ((i = e == null ? void 0 : e.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ s(En, {
|
|
745
750
|
...e.attributes.attributes.value,
|
|
746
751
|
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
747
752
|
}) : null;
|
|
748
|
-
},
|
|
753
|
+
}, Dn = ({
|
|
749
754
|
extendedQuestion: e,
|
|
750
755
|
vote: n,
|
|
751
756
|
close: i
|
|
@@ -760,7 +765,7 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
760
765
|
openedQuestion: r,
|
|
761
766
|
isLoading: !!o
|
|
762
767
|
}) : null;
|
|
763
|
-
},
|
|
768
|
+
}, Ln = ({
|
|
764
769
|
gamification: e
|
|
765
770
|
}) => {
|
|
766
771
|
var n;
|
|
@@ -768,39 +773,39 @@ const Ue = /* @__PURE__ */ t("div")({
|
|
|
768
773
|
if (!i)
|
|
769
774
|
return null;
|
|
770
775
|
const r = i.type;
|
|
771
|
-
return /* @__PURE__ */ c(
|
|
776
|
+
return /* @__PURE__ */ c(Vn, {
|
|
772
777
|
children: [/* @__PURE__ */ s(ve, {
|
|
773
778
|
close: e.closeQuestion,
|
|
774
779
|
type: ((n = i.attributes) == null ? void 0 : n.type) || m.UNSET
|
|
775
|
-
}), r === "question" && /* @__PURE__ */ s(
|
|
780
|
+
}), r === "question" && /* @__PURE__ */ s(Dn, {
|
|
776
781
|
vote: e.submitAnswer,
|
|
777
782
|
close: e.closeQuestion,
|
|
778
783
|
extendedQuestion: o
|
|
779
|
-
}), r !== "question" && /* @__PURE__ */ s(
|
|
784
|
+
}), r !== "question" && /* @__PURE__ */ s(Nn, {
|
|
780
785
|
openedQuestion: i
|
|
781
786
|
}), /* @__PURE__ */ s(ys, {
|
|
782
787
|
sponsorLogo: ""
|
|
783
788
|
})]
|
|
784
789
|
});
|
|
785
|
-
},
|
|
790
|
+
}, Pn = /* @__PURE__ */ t("div")({
|
|
786
791
|
name: "Container",
|
|
787
792
|
class: "c115qtkr",
|
|
788
793
|
propsAsIs: !1
|
|
789
|
-
}),
|
|
794
|
+
}), On = /* @__PURE__ */ t("div")({
|
|
790
795
|
name: "STabs",
|
|
791
796
|
class: "sxnslc8",
|
|
792
797
|
propsAsIs: !1
|
|
793
|
-
}),
|
|
798
|
+
}), Qn = /* @__PURE__ */ t("button")({
|
|
794
799
|
name: "Button",
|
|
795
800
|
class: "b1umzux0",
|
|
796
801
|
propsAsIs: !1
|
|
797
|
-
}),
|
|
802
|
+
}), Mn = /* @__PURE__ */ t("span")({
|
|
798
803
|
name: "Title",
|
|
799
804
|
class: "tspsaas",
|
|
800
805
|
propsAsIs: !1
|
|
801
806
|
});
|
|
802
807
|
var Y = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(Y || {});
|
|
803
|
-
const re = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(
|
|
808
|
+
const re = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(Qn, { onClick: i, "data-selected": n, children: /* @__PURE__ */ s(Mn, { children: e }) }), _n = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(Pn, { children: /* @__PURE__ */ c(On, { "data-position": e === "home" ? "left" : "right", children: [
|
|
804
809
|
/* @__PURE__ */ s(re, { title: "Home", active: e === "home", onClick: () => n(
|
|
805
810
|
"home"
|
|
806
811
|
/* HOME */
|
|
@@ -816,43 +821,43 @@ const re = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(On, { onCl
|
|
|
816
821
|
)
|
|
817
822
|
}
|
|
818
823
|
)
|
|
819
|
-
] }) }),
|
|
824
|
+
] }) }), jn = /* @__PURE__ */ t("div")({
|
|
820
825
|
name: "Container",
|
|
821
826
|
class: "c1ux29ft",
|
|
822
827
|
propsAsIs: !1
|
|
823
|
-
}),
|
|
828
|
+
}), Un = /* @__PURE__ */ t("img")({
|
|
824
829
|
name: "FriendsIcon",
|
|
825
830
|
class: "f10ncfg2",
|
|
826
831
|
propsAsIs: !1
|
|
827
|
-
}),
|
|
832
|
+
}), Bn = /* @__PURE__ */ t("div")({
|
|
828
833
|
name: "Content",
|
|
829
834
|
class: "c1yc07bd",
|
|
830
835
|
propsAsIs: !1
|
|
831
|
-
}),
|
|
836
|
+
}), zn = /* @__PURE__ */ t("div")({
|
|
832
837
|
name: "Title",
|
|
833
838
|
class: "tj6cq7w",
|
|
834
839
|
propsAsIs: !1
|
|
835
|
-
}),
|
|
840
|
+
}), Fn = /* @__PURE__ */ t("div")({
|
|
836
841
|
name: "Description",
|
|
837
842
|
class: "d1ag78xo",
|
|
838
843
|
propsAsIs: !1
|
|
839
|
-
}),
|
|
844
|
+
}), Wn = () => A, Zn = /* @__PURE__ */ t(Wn())({
|
|
840
845
|
name: "ArrowInviteIcon",
|
|
841
846
|
class: "awohrz6",
|
|
842
847
|
propsAsIs: !0
|
|
843
|
-
}),
|
|
844
|
-
/* @__PURE__ */ s(
|
|
845
|
-
/* @__PURE__ */ c(
|
|
846
|
-
/* @__PURE__ */ s(
|
|
847
|
-
/* @__PURE__ */ s(
|
|
848
|
+
}), Hn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", Yn = ({ title: e, description: n, onClick: i, className: o }) => /* @__PURE__ */ c(jn, { onClick: i, className: o, children: [
|
|
849
|
+
/* @__PURE__ */ s(Un, { alt: "friends-icon", src: Hn }),
|
|
850
|
+
/* @__PURE__ */ c(Bn, { children: [
|
|
851
|
+
/* @__PURE__ */ s(zn, { children: e }),
|
|
852
|
+
/* @__PURE__ */ s(Fn, { children: n })
|
|
848
853
|
] }),
|
|
849
|
-
/* @__PURE__ */ s(
|
|
854
|
+
/* @__PURE__ */ s(Zn, { name: "icon-copy" })
|
|
850
855
|
] });
|
|
851
|
-
function
|
|
856
|
+
function Gn(e) {
|
|
852
857
|
var n = e.lastRenderedStartIndex, i = e.lastRenderedStopIndex, o = e.startIndex, r = e.stopIndex;
|
|
853
858
|
return !(o > i || r < n);
|
|
854
859
|
}
|
|
855
|
-
function
|
|
860
|
+
function Jn(e) {
|
|
856
861
|
for (var n = e.isItemLoaded, i = e.itemCount, o = e.minimumBatchSize, r = e.startIndex, d = e.stopIndex, p = [], a = null, l = null, u = r; u <= d; u++) {
|
|
857
862
|
var h = n(u);
|
|
858
863
|
h ? l !== null && (p.push(a, l), a = l = null) : (l = u, a === null && (a = u));
|
|
@@ -872,10 +877,10 @@ function Gn(e) {
|
|
|
872
877
|
}
|
|
873
878
|
return p;
|
|
874
879
|
}
|
|
875
|
-
var
|
|
880
|
+
var Kn = function(e, n) {
|
|
876
881
|
if (!(e instanceof n))
|
|
877
882
|
throw new TypeError("Cannot call a class as a function");
|
|
878
|
-
},
|
|
883
|
+
}, Xn = /* @__PURE__ */ function() {
|
|
879
884
|
function e(n, i) {
|
|
880
885
|
for (var o = 0; o < i.length; o++) {
|
|
881
886
|
var r = i[o];
|
|
@@ -885,7 +890,7 @@ var Jn = function(e, n) {
|
|
|
885
890
|
return function(n, i, o) {
|
|
886
891
|
return i && e(n.prototype, i), o && e(n, o), n;
|
|
887
892
|
};
|
|
888
|
-
}(),
|
|
893
|
+
}(), et = function(e, n) {
|
|
889
894
|
if (typeof n != "function" && n !== null)
|
|
890
895
|
throw new TypeError("Super expression must either be null or a function, not " + typeof n);
|
|
891
896
|
e.prototype = Object.create(n && n.prototype, {
|
|
@@ -902,10 +907,10 @@ var Jn = function(e, n) {
|
|
|
902
907
|
return n && (typeof n == "object" || typeof n == "function") ? n : e;
|
|
903
908
|
};
|
|
904
909
|
(function(e) {
|
|
905
|
-
|
|
910
|
+
et(n, e);
|
|
906
911
|
function n() {
|
|
907
912
|
var i, o, r, d;
|
|
908
|
-
|
|
913
|
+
Kn(this, n);
|
|
909
914
|
for (var p = arguments.length, a = Array(p), l = 0; l < p; l++)
|
|
910
915
|
a[l] = arguments[l];
|
|
911
916
|
return d = (o = (r = ae(this, (i = n.__proto__ || Object.getPrototypeOf(n)).call.apply(i, [this].concat(a))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(u) {
|
|
@@ -915,7 +920,7 @@ var Jn = function(e, n) {
|
|
|
915
920
|
r._listRef = u;
|
|
916
921
|
}, o), ae(r, d);
|
|
917
922
|
}
|
|
918
|
-
return
|
|
923
|
+
return Xn(n, [{
|
|
919
924
|
key: "resetloadMoreItemsCache",
|
|
920
925
|
value: function() {
|
|
921
926
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -937,7 +942,7 @@ var Jn = function(e, n) {
|
|
|
937
942
|
}, {
|
|
938
943
|
key: "_ensureRowsLoaded",
|
|
939
944
|
value: function(o, r) {
|
|
940
|
-
var d = this.props, p = d.isItemLoaded, a = d.itemCount, l = d.minimumBatchSize, u = l === void 0 ? 10 : l, h = d.threshold, C = h === void 0 ? 15 : h, I =
|
|
945
|
+
var d = this.props, p = d.isItemLoaded, a = d.itemCount, l = d.minimumBatchSize, u = l === void 0 ? 10 : l, h = d.threshold, C = h === void 0 ? 15 : h, I = Jn({
|
|
941
946
|
isItemLoaded: p,
|
|
942
947
|
itemCount: a,
|
|
943
948
|
minimumBatchSize: u,
|
|
@@ -954,7 +959,7 @@ var Jn = function(e, n) {
|
|
|
954
959
|
for (var r = this, d = this.props.loadMoreItems || this.props.loadMoreRows, p = function(u) {
|
|
955
960
|
var h = o[u], C = o[u + 1], I = d(h, C);
|
|
956
961
|
I != null && I.then(function() {
|
|
957
|
-
if (
|
|
962
|
+
if (Gn({
|
|
958
963
|
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
959
964
|
lastRenderedStopIndex: r._lastRenderedStopIndex,
|
|
960
965
|
startIndex: h,
|
|
@@ -970,39 +975,39 @@ var Jn = function(e, n) {
|
|
|
970
975
|
}
|
|
971
976
|
}]), n;
|
|
972
977
|
})(we);
|
|
973
|
-
const
|
|
978
|
+
const st = /* @__PURE__ */ t("div")({
|
|
974
979
|
name: "Container",
|
|
975
980
|
class: "culdu4a",
|
|
976
981
|
propsAsIs: !1
|
|
977
|
-
}),
|
|
982
|
+
}), nt = /* @__PURE__ */ t("div")({
|
|
978
983
|
name: "Position",
|
|
979
984
|
class: "pwf8e69",
|
|
980
985
|
propsAsIs: !1
|
|
981
|
-
}),
|
|
986
|
+
}), tt = /* @__PURE__ */ t("img")({
|
|
982
987
|
name: "Avatar",
|
|
983
988
|
class: "atf4yh4",
|
|
984
989
|
propsAsIs: !1
|
|
985
|
-
}),
|
|
990
|
+
}), ot = /* @__PURE__ */ t("div")({
|
|
986
991
|
name: "AvatarPlaceholder",
|
|
987
992
|
class: "a1dg29ja",
|
|
988
993
|
propsAsIs: !1
|
|
989
|
-
}),
|
|
994
|
+
}), it = /* @__PURE__ */ t("div")({
|
|
990
995
|
name: "Content",
|
|
991
996
|
class: "c10a68rc",
|
|
992
997
|
propsAsIs: !1
|
|
993
|
-
}),
|
|
998
|
+
}), rt = /* @__PURE__ */ t("div")({
|
|
994
999
|
name: "NameContainer",
|
|
995
1000
|
class: "nc4kck5",
|
|
996
1001
|
propsAsIs: !1
|
|
997
|
-
}),
|
|
1002
|
+
}), at = /* @__PURE__ */ t("span")({
|
|
998
1003
|
name: "Name",
|
|
999
1004
|
class: "njsrqgr",
|
|
1000
1005
|
propsAsIs: !1
|
|
1001
|
-
}),
|
|
1006
|
+
}), lt = () => A, ct = /* @__PURE__ */ t(lt())({
|
|
1002
1007
|
name: "CurrentUserBadge",
|
|
1003
1008
|
class: "c17uc4zr",
|
|
1004
1009
|
propsAsIs: !0
|
|
1005
|
-
}),
|
|
1010
|
+
}), dt = ({
|
|
1006
1011
|
rank: e,
|
|
1007
1012
|
avatar: n,
|
|
1008
1013
|
name: i,
|
|
@@ -1010,21 +1015,21 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1010
1015
|
isCurrentUser: r,
|
|
1011
1016
|
openItemDetail: d,
|
|
1012
1017
|
style: p
|
|
1013
|
-
}) => /* @__PURE__ */ c(
|
|
1014
|
-
/* @__PURE__ */ s(
|
|
1015
|
-
/* @__PURE__ */ c(
|
|
1016
|
-
n ? /* @__PURE__ */ s(
|
|
1017
|
-
/* @__PURE__ */ c(
|
|
1018
|
-
/* @__PURE__ */ s(
|
|
1019
|
-
r && /* @__PURE__ */ s(
|
|
1018
|
+
}) => /* @__PURE__ */ c(st, { onClick: d, style: p, children: [
|
|
1019
|
+
/* @__PURE__ */ s(nt, { children: e || 0 }),
|
|
1020
|
+
/* @__PURE__ */ c(it, { children: [
|
|
1021
|
+
n ? /* @__PURE__ */ s(tt, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(ot, { children: pe(i || "") }),
|
|
1022
|
+
/* @__PURE__ */ c(rt, { children: [
|
|
1023
|
+
/* @__PURE__ */ s(at, { children: i || "" }),
|
|
1024
|
+
r && /* @__PURE__ */ s(ct, { name: "icon-star" })
|
|
1020
1025
|
] })
|
|
1021
1026
|
] }),
|
|
1022
1027
|
/* @__PURE__ */ s("div", { children: ue(o) })
|
|
1023
|
-
] }),
|
|
1028
|
+
] }), pt = /* @__PURE__ */ t("div")({
|
|
1024
1029
|
name: "Container",
|
|
1025
1030
|
class: "c16btbfp",
|
|
1026
1031
|
propsAsIs: !1
|
|
1027
|
-
}),
|
|
1032
|
+
}), ut = ({
|
|
1028
1033
|
items: e,
|
|
1029
1034
|
currentUserId: n,
|
|
1030
1035
|
openItemDetail: i,
|
|
@@ -1037,14 +1042,14 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1037
1042
|
hasMore: d,
|
|
1038
1043
|
useWindow: !1,
|
|
1039
1044
|
getScrollParent: () => r.current,
|
|
1040
|
-
children: /* @__PURE__ */ s(
|
|
1041
|
-
children: e.map((p) => /* @__PURE__ */ s(
|
|
1045
|
+
children: /* @__PURE__ */ s(pt, {
|
|
1046
|
+
children: e.map((p) => /* @__PURE__ */ s(dt, {
|
|
1042
1047
|
...p,
|
|
1043
1048
|
openItemDetail: () => i(p.userId),
|
|
1044
1049
|
isCurrentUser: !!n && n === p.userId
|
|
1045
1050
|
}, p.userId))
|
|
1046
1051
|
})
|
|
1047
|
-
}),
|
|
1052
|
+
}), mt = ({ renderClipBoardNode: e, deepLink: n }) => /* @__PURE__ */ s(
|
|
1048
1053
|
Se,
|
|
1049
1054
|
{
|
|
1050
1055
|
renderToNode: e,
|
|
@@ -1064,11 +1069,11 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1064
1069
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
1065
1070
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1066
1071
|
}
|
|
1067
|
-
),
|
|
1072
|
+
), ht = /* @__PURE__ */ t("div")({
|
|
1068
1073
|
name: "InviteLinkContainer",
|
|
1069
1074
|
class: "i1chxfpe",
|
|
1070
1075
|
propsAsIs: !1
|
|
1071
|
-
}),
|
|
1076
|
+
}), It = ({
|
|
1072
1077
|
gamification: e,
|
|
1073
1078
|
scrollNode: n,
|
|
1074
1079
|
scrollStore: i,
|
|
@@ -1082,11 +1087,11 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1082
1087
|
} = S(e.leaderboardList.$store), {
|
|
1083
1088
|
data: l
|
|
1084
1089
|
} = S(e.deepLink.$store), [u, h] = qe(o);
|
|
1085
|
-
return !r.length && !p ? /* @__PURE__ */ s(
|
|
1090
|
+
return !r.length && !p ? /* @__PURE__ */ s(mt, {
|
|
1086
1091
|
renderClipBoardNode: o,
|
|
1087
1092
|
deepLink: l
|
|
1088
1093
|
}) : /* @__PURE__ */ c(x, {
|
|
1089
|
-
children: [/* @__PURE__ */ s(
|
|
1094
|
+
children: [/* @__PURE__ */ s(ut, {
|
|
1090
1095
|
items: r,
|
|
1091
1096
|
scrollNode: n,
|
|
1092
1097
|
scrollStore: i,
|
|
@@ -1094,56 +1099,56 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1094
1099
|
hasMore: d,
|
|
1095
1100
|
openItemDetail: e.openUser,
|
|
1096
1101
|
currentUserId: e.currentUserId.get()
|
|
1097
|
-
}, a), l && /* @__PURE__ */ s(
|
|
1098
|
-
children: /* @__PURE__ */ s(
|
|
1102
|
+
}, a), l && /* @__PURE__ */ s(ht, {
|
|
1103
|
+
children: /* @__PURE__ */ s(Yn, {
|
|
1099
1104
|
onClick: () => u(l),
|
|
1100
1105
|
title: "Invite Friends",
|
|
1101
1106
|
description: "Challenge them now!"
|
|
1102
1107
|
})
|
|
1103
1108
|
}), h]
|
|
1104
1109
|
});
|
|
1105
|
-
},
|
|
1110
|
+
}, vt = /* @__PURE__ */ t("div")({
|
|
1106
1111
|
name: "QuestionItem",
|
|
1107
1112
|
class: "q1w97g3p",
|
|
1108
1113
|
propsAsIs: !1
|
|
1109
|
-
}),
|
|
1114
|
+
}), Ct = /* @__PURE__ */ t("div")({
|
|
1110
1115
|
name: "QuestionCaption",
|
|
1111
1116
|
class: "q2sl39u",
|
|
1112
1117
|
propsAsIs: !1
|
|
1113
|
-
}),
|
|
1118
|
+
}), ft = /* @__PURE__ */ t("div")({
|
|
1114
1119
|
name: "QuestionBody",
|
|
1115
1120
|
class: "qd5h0uc",
|
|
1116
1121
|
propsAsIs: !1
|
|
1117
|
-
}),
|
|
1122
|
+
}), At = /* @__PURE__ */ t("div")({
|
|
1118
1123
|
name: "QuestionAction",
|
|
1119
1124
|
class: "q105uluy",
|
|
1120
1125
|
propsAsIs: !1
|
|
1121
|
-
}),
|
|
1126
|
+
}), gt = () => A, H = /* @__PURE__ */ t(gt())({
|
|
1122
1127
|
name: "QuestionActionIcon",
|
|
1123
1128
|
class: "q1fa0b9h",
|
|
1124
1129
|
propsAsIs: !0
|
|
1125
|
-
}), $t = () => A,
|
|
1130
|
+
}), $t = () => A, bt = /* @__PURE__ */ t($t())({
|
|
1126
1131
|
name: "QuestionTypeIcon",
|
|
1127
1132
|
class: "qxlt78s",
|
|
1128
1133
|
propsAsIs: !0
|
|
1129
|
-
}),
|
|
1134
|
+
}), yt = /* @__PURE__ */ t("div")({
|
|
1130
1135
|
name: "QuestionTypeLabel",
|
|
1131
1136
|
class: "qmg0vkx",
|
|
1132
1137
|
propsAsIs: !1
|
|
1133
|
-
}),
|
|
1138
|
+
}), Rt = /* @__PURE__ */ t("div")({
|
|
1134
1139
|
name: "QuestionContent",
|
|
1135
1140
|
class: "q1uz5j1g",
|
|
1136
1141
|
propsAsIs: !1
|
|
1137
|
-
}),
|
|
1142
|
+
}), wt = /* @__PURE__ */ t("button")({
|
|
1138
1143
|
name: "PlayButton",
|
|
1139
1144
|
class: "p1pba9p1",
|
|
1140
1145
|
propsAsIs: !1
|
|
1141
|
-
}),
|
|
1146
|
+
}), kt = {
|
|
1142
1147
|
[F.LOST]: /* @__PURE__ */ s(H, { name: "incorrectVoted" }),
|
|
1143
1148
|
[F.WON]: /* @__PURE__ */ s(H, { name: "icon-check" }),
|
|
1144
1149
|
[F.UNSET]: /* @__PURE__ */ s(H, { name: "icon-arrow" }),
|
|
1145
1150
|
[F.DNP]: /* @__PURE__ */ s(H, { name: "icon-arrow" })
|
|
1146
|
-
},
|
|
1151
|
+
}, Tt = ({
|
|
1147
1152
|
questionId: e,
|
|
1148
1153
|
questionType: n,
|
|
1149
1154
|
questionStatus: i,
|
|
@@ -1152,72 +1157,72 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1152
1157
|
openQuestion: d,
|
|
1153
1158
|
status: p
|
|
1154
1159
|
}) => {
|
|
1155
|
-
const a = de[n], l =
|
|
1156
|
-
return a ? /* @__PURE__ */ c(
|
|
1157
|
-
/* @__PURE__ */ c(
|
|
1158
|
-
/* @__PURE__ */ c(
|
|
1160
|
+
const a = de[n], l = kt[p];
|
|
1161
|
+
return a ? /* @__PURE__ */ c(vt, { onClick: () => d == null ? void 0 : d(e), children: [
|
|
1162
|
+
/* @__PURE__ */ c(Rt, { children: [
|
|
1163
|
+
/* @__PURE__ */ c(Ct, { children: [
|
|
1159
1164
|
/* @__PURE__ */ s(
|
|
1160
|
-
|
|
1165
|
+
bt,
|
|
1161
1166
|
{
|
|
1162
1167
|
"data-type-trivia": n === m.TRIVIA,
|
|
1163
1168
|
"data-type-poll": n === m.POLL,
|
|
1164
1169
|
name: a.iconName
|
|
1165
1170
|
}
|
|
1166
1171
|
),
|
|
1167
|
-
/* @__PURE__ */ c(
|
|
1172
|
+
/* @__PURE__ */ c(yt, { children: [
|
|
1168
1173
|
a.label,
|
|
1169
1174
|
n === m.TRIVIA && i === N.RESOLVED && " • Expired"
|
|
1170
1175
|
] })
|
|
1171
1176
|
] }),
|
|
1172
|
-
/* @__PURE__ */ s(
|
|
1177
|
+
/* @__PURE__ */ s(ft, { children: o || "" })
|
|
1173
1178
|
] }),
|
|
1174
|
-
/* @__PURE__ */ s(
|
|
1179
|
+
/* @__PURE__ */ s(At, { children: r ? /* @__PURE__ */ s(wt, { children: "Play" }) : l })
|
|
1175
1180
|
] }) : null;
|
|
1176
|
-
},
|
|
1181
|
+
}, xt = /* @__PURE__ */ t("div")({
|
|
1177
1182
|
name: "Container",
|
|
1178
1183
|
class: "cll3md7",
|
|
1179
1184
|
propsAsIs: !1
|
|
1180
|
-
}),
|
|
1185
|
+
}), St = /* @__PURE__ */ t("button")({
|
|
1181
1186
|
name: "ActionBtn",
|
|
1182
1187
|
class: "a10g1iik",
|
|
1183
1188
|
propsAsIs: !1
|
|
1184
|
-
}),
|
|
1189
|
+
}), qt = ({ openInsight: e, questionId: n, ...i }) => /* @__PURE__ */ c(xt, { children: [
|
|
1185
1190
|
/* @__PURE__ */ s(Ae, { questionId: n, ...i }),
|
|
1186
|
-
e && /* @__PURE__ */ s(
|
|
1187
|
-
] }),
|
|
1191
|
+
e && /* @__PURE__ */ s(St, { onClick: () => e(n), children: "View Insight" })
|
|
1192
|
+
] }), Et = /* @__PURE__ */ t("div")({
|
|
1188
1193
|
name: "Container",
|
|
1189
1194
|
class: "cl56x6b",
|
|
1190
1195
|
propsAsIs: !1
|
|
1191
|
-
}),
|
|
1196
|
+
}), Vt = () => Ee, Nt = /* @__PURE__ */ t(Vt())({
|
|
1192
1197
|
name: "ActionButton",
|
|
1193
1198
|
class: "a11pzf92",
|
|
1194
1199
|
propsAsIs: !0
|
|
1195
|
-
}),
|
|
1200
|
+
}), Dt = /* @__PURE__ */ t("blockquote")({
|
|
1196
1201
|
name: "Quote",
|
|
1197
1202
|
class: "q1hbaleq",
|
|
1198
1203
|
propsAsIs: !1
|
|
1199
|
-
}),
|
|
1200
|
-
n.title && /* @__PURE__ */ s(
|
|
1204
|
+
}), Lt = ({ openTweet: e, ...n }) => /* @__PURE__ */ c(Et, { children: [
|
|
1205
|
+
n.title && /* @__PURE__ */ s(Dt, { children: n.title }),
|
|
1201
1206
|
/* @__PURE__ */ s(me, { ...n }),
|
|
1202
|
-
e && /* @__PURE__ */ s(
|
|
1203
|
-
] }),
|
|
1207
|
+
e && /* @__PURE__ */ s(Nt, { onClick: () => e(n.tweetId), children: "View Insight" })
|
|
1208
|
+
] }), Pt = /* @__PURE__ */ t("div")({
|
|
1204
1209
|
name: "QuestionsContainer",
|
|
1205
1210
|
class: "qvghv3l",
|
|
1206
1211
|
propsAsIs: !1
|
|
1207
|
-
}),
|
|
1212
|
+
}), Ot = ({ questions: e, openQuestion: n, controlVideo: i }) => /* @__PURE__ */ s(Pt, { children: e == null ? void 0 : e.map((o) => {
|
|
1208
1213
|
var r, d, p;
|
|
1209
1214
|
if (o.type === "question" && ((r = o.attributes) == null ? void 0 : r.attributes.case) === "question") {
|
|
1210
1215
|
const a = o.attributes.attributes.value;
|
|
1211
|
-
return /* @__PURE__ */ s(
|
|
1216
|
+
return /* @__PURE__ */ s(Tt, { openQuestion: n, ...a }, a.questionId);
|
|
1212
1217
|
}
|
|
1213
1218
|
if (o.type === "insight" && ((d = o.attributes) == null ? void 0 : d.attributes.case) === "insight") {
|
|
1214
1219
|
const a = o.attributes.attributes.value;
|
|
1215
|
-
return /* @__PURE__ */ s(
|
|
1220
|
+
return /* @__PURE__ */ s(qt, { openInsight: n, controlVideo: i, ...a }, a.questionId);
|
|
1216
1221
|
}
|
|
1217
1222
|
if (o.type === "tweet" && ((p = o.attributes) == null ? void 0 : p.attributes.case) === "tweet") {
|
|
1218
1223
|
const a = o.attributes.attributes.value, l = o.attributes.id;
|
|
1219
1224
|
return /* @__PURE__ */ s(
|
|
1220
|
-
|
|
1225
|
+
Lt,
|
|
1221
1226
|
{
|
|
1222
1227
|
openTweet: n,
|
|
1223
1228
|
controlVideo: i,
|
|
@@ -1228,10 +1233,10 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1228
1233
|
);
|
|
1229
1234
|
}
|
|
1230
1235
|
return null;
|
|
1231
|
-
}) }),
|
|
1236
|
+
}) }), Qt = ({ store: e, openQuestion: n }) => {
|
|
1232
1237
|
const { sdk: i } = he(), o = S(e);
|
|
1233
|
-
return o != null && o.data ? /* @__PURE__ */ s(
|
|
1234
|
-
},
|
|
1238
|
+
return o != null && o.data ? /* @__PURE__ */ s(Ot, { openQuestion: n, questions: o.data, controlVideo: i == null ? void 0 : i.controlVideoPlayer }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1239
|
+
}, Mt = ({ userSummary: e }) => {
|
|
1235
1240
|
var n;
|
|
1236
1241
|
const [i, o] = E(void 0);
|
|
1237
1242
|
return ee(() => {
|
|
@@ -1242,7 +1247,7 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1242
1247
|
r();
|
|
1243
1248
|
};
|
|
1244
1249
|
}, [e]), i != null && i.summary ? /* @__PURE__ */ s(Ce, { ...i.summary, successRate: (n = i.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1245
|
-
},
|
|
1250
|
+
}, _t = ({ gamification: e, className: n, scrollStore: i, scrollNode: o, appNode: r, style: d, responsiveStore: p, headerNode: a }) => {
|
|
1246
1251
|
const { tabsShown: l } = S(i, { keys: ["tabsShown"] }), [u, h] = E(Y.HOME), [, C] = ke(), { sdkInDesktopView: I } = S(p, { keys: ["sdkInDesktopView"] }), f = (w) => {
|
|
1247
1252
|
C(() => {
|
|
1248
1253
|
var b;
|
|
@@ -1258,7 +1263,7 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1258
1263
|
}), [i, p]);
|
|
1259
1264
|
let k = "0px";
|
|
1260
1265
|
I ? k = l ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : k = l ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px";
|
|
1261
|
-
const
|
|
1266
|
+
const $ = I ? r : a;
|
|
1262
1267
|
return /* @__PURE__ */ c(Ve, { className: n, style: d, children: [
|
|
1263
1268
|
/* @__PURE__ */ s(
|
|
1264
1269
|
Ne,
|
|
@@ -1266,38 +1271,38 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1266
1271
|
style: {
|
|
1267
1272
|
top: k
|
|
1268
1273
|
},
|
|
1269
|
-
children: /* @__PURE__ */ s(
|
|
1274
|
+
children: /* @__PURE__ */ s(_n, { activePage: u, toggleActivePage: f })
|
|
1270
1275
|
}
|
|
1271
1276
|
),
|
|
1272
1277
|
u === Y.HOME && /* @__PURE__ */ c(x, { children: [
|
|
1273
|
-
/* @__PURE__ */ s(Ie, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(De, { children: /* @__PURE__ */ s(
|
|
1274
|
-
/* @__PURE__ */ s(Le, { style: { flex: 1 }, children: /* @__PURE__ */ s(
|
|
1278
|
+
/* @__PURE__ */ s(Ie, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(De, { children: /* @__PURE__ */ s(Mt, { userSummary: e.userSummary }) }) }),
|
|
1279
|
+
/* @__PURE__ */ s(Le, { style: { flex: 1 }, children: /* @__PURE__ */ s(Qt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1275
1280
|
] }),
|
|
1276
1281
|
u === Y.LEADERBOARD && /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ s(
|
|
1277
|
-
|
|
1282
|
+
It,
|
|
1278
1283
|
{
|
|
1279
|
-
renderClipBoardNode:
|
|
1284
|
+
renderClipBoardNode: $,
|
|
1280
1285
|
scrollStore: i,
|
|
1281
1286
|
scrollNode: o,
|
|
1282
1287
|
gamification: e
|
|
1283
1288
|
}
|
|
1284
1289
|
) })
|
|
1285
1290
|
] });
|
|
1286
|
-
},
|
|
1291
|
+
}, jt = () => Me, le = /* @__PURE__ */ t(jt())({
|
|
1287
1292
|
name: "OpenedContainer",
|
|
1288
1293
|
class: "oar61gl",
|
|
1289
1294
|
propsAsIs: !0
|
|
1290
|
-
}),
|
|
1295
|
+
}), Ut = /* @__PURE__ */ t("div")({
|
|
1291
1296
|
name: "UserContainer",
|
|
1292
1297
|
class: "u14zaal4",
|
|
1293
1298
|
propsAsIs: !1
|
|
1294
|
-
}),
|
|
1299
|
+
}), Bt = ({
|
|
1295
1300
|
correct: e,
|
|
1296
1301
|
incorrect: n
|
|
1297
1302
|
}) => {
|
|
1298
1303
|
const i = e + n;
|
|
1299
1304
|
return i === 0 ? 0 : Math.round(e / i * 100);
|
|
1300
|
-
},
|
|
1305
|
+
}, io = ({
|
|
1301
1306
|
gamification: e,
|
|
1302
1307
|
scrollStore: n,
|
|
1303
1308
|
className: i,
|
|
@@ -1317,19 +1322,19 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1317
1322
|
return null;
|
|
1318
1323
|
const f = a ? /* @__PURE__ */ s(le, {
|
|
1319
1324
|
className: i,
|
|
1320
|
-
children: /* @__PURE__ */ s(
|
|
1325
|
+
children: /* @__PURE__ */ s(Ln, {
|
|
1321
1326
|
gamification: e
|
|
1322
1327
|
})
|
|
1323
1328
|
}) : l ? /* @__PURE__ */ s(le, {
|
|
1324
1329
|
className: i,
|
|
1325
|
-
children: /* @__PURE__ */ c(
|
|
1330
|
+
children: /* @__PURE__ */ c(Ut, {
|
|
1326
1331
|
children: [/* @__PURE__ */ s(ve, {
|
|
1327
1332
|
label: "Friend's Rank",
|
|
1328
1333
|
close: e.closeUser
|
|
1329
1334
|
}), /* @__PURE__ */ s(Ie, {
|
|
1330
1335
|
children: /* @__PURE__ */ s(Ce, {
|
|
1331
1336
|
...l,
|
|
1332
|
-
successRate:
|
|
1337
|
+
successRate: Bt(l)
|
|
1333
1338
|
})
|
|
1334
1339
|
})]
|
|
1335
1340
|
})
|
|
@@ -1342,7 +1347,7 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1342
1347
|
});
|
|
1343
1348
|
}, [o, i, e, a, l, u]);
|
|
1344
1349
|
return /* @__PURE__ */ c(x, {
|
|
1345
|
-
children: [h, /* @__PURE__ */ s(
|
|
1350
|
+
children: [h, /* @__PURE__ */ s(_t, {
|
|
1346
1351
|
appNode: o,
|
|
1347
1352
|
headerNode: d,
|
|
1348
1353
|
scrollStore: n,
|
|
@@ -1354,5 +1359,5 @@ const et = /* @__PURE__ */ t("div")({
|
|
|
1354
1359
|
});
|
|
1355
1360
|
};
|
|
1356
1361
|
export {
|
|
1357
|
-
|
|
1362
|
+
io as default
|
|
1358
1363
|
};
|