@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Me = Object.defineProperty;
|
|
2
|
-
var _e = (
|
|
3
|
-
var ne = (
|
|
2
|
+
var _e = (t, e, n) => e in t ? Me(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var ne = (t, e, n) => (_e(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
4
|
import { jsxs as p, jsx as s, Fragment as x } from "react/jsx-runtime";
|
|
5
|
-
import { s as r, c as R, Q as f, o as Ie, I as Ce, a as ge, b as M, d as Qe, e as
|
|
6
|
-
import
|
|
5
|
+
import { s as r, c as R, Q as f, o as Ie, I as Ce, a as ge, b as M, d as Qe, e as W, f as Ae, E as Q, q as je, J as ye, u as q, n as $e, g as Ue, F as We, h as Be, P as Y, i as ze, p as Fe, C as He, j as be, m as Ye, k as Ze, l as Ge, r as Je, V as Ke, t as Xe } from "./masters.js";
|
|
6
|
+
import B, { useState as P, useLayoutEffect as we, useRef as _, useCallback as z, useEffect as X, useMemo as O, PureComponent as et, Component as tt, useTransition as st } from "react";
|
|
7
7
|
const nt = /* @__PURE__ */ r("div")({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c1vwopgc",
|
|
@@ -28,21 +28,21 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
28
28
|
name: "CloseIcon",
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
31
|
-
}), Te = ({ type:
|
|
32
|
-
const o =
|
|
31
|
+
}), Te = ({ type: t, close: e, label: n }) => {
|
|
32
|
+
const o = t ? Ie[t] : { label: n, iconName: void 0 };
|
|
33
33
|
return /* @__PURE__ */ p(nt, { children: [
|
|
34
34
|
/* @__PURE__ */ p(ot, { children: [
|
|
35
35
|
(o == null ? void 0 : o.iconName) && /* @__PURE__ */ s(
|
|
36
36
|
rt,
|
|
37
37
|
{
|
|
38
|
-
"data-type-trivia":
|
|
39
|
-
"data-type-poll":
|
|
38
|
+
"data-type-trivia": t === f.TRIVIA,
|
|
39
|
+
"data-type-poll": t === f.POLL,
|
|
40
40
|
name: o.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
43
|
(o == null ? void 0 : o.label) && /* @__PURE__ */ s(at, { children: o.label })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */ s(lt, { onClick:
|
|
45
|
+
/* @__PURE__ */ s(lt, { onClick: e, children: /* @__PURE__ */ s(dt, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
47
|
}, pt = /* @__PURE__ */ r("div")({
|
|
48
48
|
name: "Container",
|
|
@@ -56,9 +56,9 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
56
56
|
name: "Indicator",
|
|
57
57
|
class: "i1fbnvpb",
|
|
58
58
|
propsAsIs: !1
|
|
59
|
-
}), le = ({ indicator:
|
|
60
|
-
/* @__PURE__ */ s(ut, { children:
|
|
61
|
-
/* @__PURE__ */ s(ht, { children:
|
|
59
|
+
}), le = ({ indicator: t, title: e }) => /* @__PURE__ */ p(pt, { children: [
|
|
60
|
+
/* @__PURE__ */ s(ut, { children: e }),
|
|
61
|
+
/* @__PURE__ */ s(ht, { children: t })
|
|
62
62
|
] }), mt = /* @__PURE__ */ r("div")({
|
|
63
63
|
name: "Container",
|
|
64
64
|
class: "ctmhwyc",
|
|
@@ -71,9 +71,9 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
71
71
|
name: "Title",
|
|
72
72
|
class: "t8s05oq",
|
|
73
73
|
propsAsIs: !1
|
|
74
|
-
}), Z = ({ indicator:
|
|
75
|
-
/* @__PURE__ */ s(vt, { children:
|
|
76
|
-
/* @__PURE__ */ s(ft, { children:
|
|
74
|
+
}), Z = ({ indicator: t, title: e }) => /* @__PURE__ */ p(mt, { children: [
|
|
75
|
+
/* @__PURE__ */ s(vt, { children: t }),
|
|
76
|
+
/* @__PURE__ */ s(ft, { children: e })
|
|
77
77
|
] }), It = /* @__PURE__ */ r("div")({
|
|
78
78
|
name: "Container",
|
|
79
79
|
class: "c1yrpn9o",
|
|
@@ -86,11 +86,11 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
86
86
|
name: "BottomInfo",
|
|
87
87
|
class: "by6w7e9",
|
|
88
88
|
propsAsIs: !1
|
|
89
|
-
}),
|
|
89
|
+
}), At = /* @__PURE__ */ r("div")({
|
|
90
90
|
name: "User",
|
|
91
91
|
class: "u1g7arbm",
|
|
92
92
|
propsAsIs: !1
|
|
93
|
-
}),
|
|
93
|
+
}), yt = /* @__PURE__ */ r("img")({
|
|
94
94
|
name: "Avatar",
|
|
95
95
|
class: "a1ldeata",
|
|
96
96
|
propsAsIs: !1
|
|
@@ -143,8 +143,8 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
143
143
|
class: "uxareh6",
|
|
144
144
|
propsAsIs: !1
|
|
145
145
|
}), Nt = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", Re = ({
|
|
146
|
-
avatar:
|
|
147
|
-
name:
|
|
146
|
+
avatar: t,
|
|
147
|
+
name: e,
|
|
148
148
|
points: n,
|
|
149
149
|
friendsRank: o,
|
|
150
150
|
rank: i,
|
|
@@ -154,13 +154,13 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
154
154
|
inTop: d,
|
|
155
155
|
successRate: u
|
|
156
156
|
}) => /* @__PURE__ */ p(It, { children: [
|
|
157
|
-
/* @__PURE__ */ s(Ct, { children: /* @__PURE__ */ p(
|
|
157
|
+
/* @__PURE__ */ s(Ct, { children: /* @__PURE__ */ p(At, { children: [
|
|
158
158
|
/* @__PURE__ */ p(qt, { children: [
|
|
159
|
-
|
|
160
|
-
!
|
|
159
|
+
t && /* @__PURE__ */ s(yt, { alt: "avatar", src: t }),
|
|
160
|
+
!t && /* @__PURE__ */ s(Pt, { children: Ce(e || "") })
|
|
161
161
|
] }),
|
|
162
162
|
/* @__PURE__ */ p($t, { children: [
|
|
163
|
-
/* @__PURE__ */ s(bt, { children:
|
|
163
|
+
/* @__PURE__ */ s(bt, { children: e }),
|
|
164
164
|
/* @__PURE__ */ p(wt, { children: [
|
|
165
165
|
/* @__PURE__ */ p(Rt, { children: [
|
|
166
166
|
/* @__PURE__ */ s(Tt, { alt: "rank-icon", src: Nt }),
|
|
@@ -214,10 +214,10 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
214
214
|
name: "Description",
|
|
215
215
|
class: "dlaj9xp",
|
|
216
216
|
propsAsIs: !1
|
|
217
|
-
}), Ut = ({ title:
|
|
217
|
+
}), Ut = ({ title: t, description: e }) => /* @__PURE__ */ p(_t, { children: [
|
|
218
218
|
/* @__PURE__ */ s(R, { name: "icon-check-circle" }),
|
|
219
|
-
/* @__PURE__ */ s(Qt, { children:
|
|
220
|
-
/* @__PURE__ */ s(jt, { children:
|
|
219
|
+
/* @__PURE__ */ s(Qt, { children: t }),
|
|
220
|
+
/* @__PURE__ */ s(jt, { children: e })
|
|
221
221
|
] }), Wt = /* @__PURE__ */ r("div")({
|
|
222
222
|
name: "Container",
|
|
223
223
|
class: "c16sbdnm",
|
|
@@ -247,8 +247,8 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
247
247
|
class: "fx87qaj",
|
|
248
248
|
propsAsIs: !1
|
|
249
249
|
}), Ht = ({
|
|
250
|
-
feedbackMessages:
|
|
251
|
-
questionVotedCorrectly:
|
|
250
|
+
feedbackMessages: t,
|
|
251
|
+
questionVotedCorrectly: e,
|
|
252
252
|
questionVoted: n,
|
|
253
253
|
questionType: o,
|
|
254
254
|
hasCorrectAnswer: i,
|
|
@@ -260,10 +260,10 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
260
260
|
enteredAnActiveQuestion: h,
|
|
261
261
|
marketClosed: v
|
|
262
262
|
}) => {
|
|
263
|
-
const m = n && (o === f.TRIVIA || o === f.PREDICTION) && d && c !== M.RESOLVED, I = o === f.PREDICTION && !i, $ = v && o === f.PREDICTION && !n && !h || o === f.PREDICTION && u && d && h,
|
|
264
|
-
if (!a && !l && !
|
|
263
|
+
const m = n && (o === f.TRIVIA || o === f.PREDICTION) && d && c !== M.RESOLVED, I = o === f.PREDICTION && !i, $ = v && o === f.PREDICTION && !n && !h || o === f.PREDICTION && u && d && h, y = m && I, g = m && i, C = o === f.PREDICTION && n && d && i, w = n && o === f.POLL && d;
|
|
264
|
+
if (!a && !l && !y && !g && !$ && !w && !C)
|
|
265
265
|
return null;
|
|
266
|
-
const b =
|
|
266
|
+
const b = e ? "correct" : "incorrect", T = e ? t == null ? void 0 : t.correctFeedback : t == null ? void 0 : t.incorrectFeedback;
|
|
267
267
|
return /* @__PURE__ */ p(Wt, { "data-isPrediction": I, children: [
|
|
268
268
|
a && /* @__PURE__ */ p(x, { children: [
|
|
269
269
|
/* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(R, { name: "questionExpired" }) }),
|
|
@@ -286,7 +286,7 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
286
286
|
/* @__PURE__ */ s(oe, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
|
-
|
|
289
|
+
y && /* @__PURE__ */ p(x, { children: [
|
|
290
290
|
/* @__PURE__ */ s(zt, { name: "icon-prediction" }),
|
|
291
291
|
/* @__PURE__ */ s(U, { children: "Stay tuned to see if your prediction was correct." })
|
|
292
292
|
] }),
|
|
@@ -375,29 +375,29 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
375
375
|
class: "c1j2j0s0",
|
|
376
376
|
propsAsIs: !0
|
|
377
377
|
}), ce = {
|
|
378
|
-
[
|
|
379
|
-
[
|
|
380
|
-
[
|
|
381
|
-
[
|
|
382
|
-
[
|
|
383
|
-
}, vs = ({ questionType:
|
|
384
|
-
if (
|
|
378
|
+
[W.CENTERED]: (t) => /* @__PURE__ */ s(rs, { alt: "option-icon", src: t }),
|
|
379
|
+
[W.TRANSPARENT]: (t) => /* @__PURE__ */ s(ns, { children: /* @__PURE__ */ s(os, { style: { backgroundImage: `url(${t})` } }) }),
|
|
380
|
+
[W.ROUNDED]: (t) => /* @__PURE__ */ s(ls, { alt: "option-icon", src: t }),
|
|
381
|
+
[W.NONE]: () => null,
|
|
382
|
+
[W.UNSET]: () => null
|
|
383
|
+
}, vs = ({ questionType: t, hasCorrectAnswer: e, correct: n, youVoted: o, questionVoted: i }) => {
|
|
384
|
+
if (t === f.POLL && o)
|
|
385
385
|
return "correct";
|
|
386
|
-
if (
|
|
387
|
-
if (
|
|
386
|
+
if (t === f.PREDICTION) {
|
|
387
|
+
if (e && i)
|
|
388
388
|
return o ? n ? "correct" : "incorrect" : "unset";
|
|
389
389
|
if (o)
|
|
390
390
|
return "correct";
|
|
391
391
|
}
|
|
392
|
-
return
|
|
392
|
+
return t === f.TRIVIA && i && o ? n ? "correct" : "incorrect" : "unset";
|
|
393
393
|
}, fs = ({
|
|
394
|
-
questionType:
|
|
395
|
-
questionVoted:
|
|
394
|
+
questionType: t,
|
|
395
|
+
questionVoted: e,
|
|
396
396
|
correct: n,
|
|
397
397
|
hasCorrectAnswer: o,
|
|
398
398
|
questionStatus: i
|
|
399
|
-
}) =>
|
|
400
|
-
var
|
|
399
|
+
}) => t === f.TRIVIA ? e && n : t === f.PREDICTION ? e && n && o || i === M.RESOLVED && n : !1, Is = (t) => {
|
|
400
|
+
var e;
|
|
401
401
|
const {
|
|
402
402
|
// option props
|
|
403
403
|
id: n,
|
|
@@ -414,13 +414,13 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
414
414
|
answerTimeExpired: m,
|
|
415
415
|
questionStatus: I,
|
|
416
416
|
isLoading: $,
|
|
417
|
-
questionType:
|
|
417
|
+
questionType: y,
|
|
418
418
|
correct: g,
|
|
419
419
|
hasCorrectAnswer: C,
|
|
420
420
|
votedAfterQuestionClosed: w,
|
|
421
421
|
enteredAnActiveQuestion: b,
|
|
422
422
|
marketClosed: T
|
|
423
|
-
} =
|
|
423
|
+
} = t, [N, V] = P(c), D = vs(t), ee = fs({ questionType: y, questionVoted: h, correct: g, hasCorrectAnswer: C, questionStatus: I }), A = T && y === f.PREDICTION, k = h || A, S = y === f.PREDICTION && !h && !T, te = h && !u && D !== "incorrect";
|
|
424
424
|
return we(() => {
|
|
425
425
|
c > 0 && (V(0), requestAnimationFrame(() => {
|
|
426
426
|
V(c);
|
|
@@ -431,17 +431,17 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
431
431
|
value: n,
|
|
432
432
|
"data-selected": u,
|
|
433
433
|
"data-answer-state": D,
|
|
434
|
-
disabled: h || $ || m ||
|
|
434
|
+
disabled: h || $ || m || A && !b || A && b && w,
|
|
435
435
|
"data-is-not-checked": te,
|
|
436
436
|
onClick: (se) => {
|
|
437
437
|
d(
|
|
438
|
-
|
|
438
|
+
y === f.PREDICTION ? T : I === M.RESOLVED
|
|
439
439
|
), l(se);
|
|
440
440
|
},
|
|
441
441
|
children: [
|
|
442
442
|
/* @__PURE__ */ s(ts, { "data-answer-state": D, style: { width: `${k ? N : 0}%` } }),
|
|
443
443
|
/* @__PURE__ */ p(ss, { children: [
|
|
444
|
-
o && v && ((
|
|
444
|
+
o && v && ((e = ce[v]) == null ? void 0 : e.call(ce, o)),
|
|
445
445
|
/* @__PURE__ */ s(cs, { children: i }),
|
|
446
446
|
S && /* @__PURE__ */ p("div", { children: [
|
|
447
447
|
a,
|
|
@@ -449,14 +449,14 @@ const nt = /* @__PURE__ */ r("div")({
|
|
|
449
449
|
] }),
|
|
450
450
|
k && /* @__PURE__ */ p(ds, { children: [
|
|
451
451
|
ee && /* @__PURE__ */ s(ms, { name: "selected" }),
|
|
452
|
-
/* @__PURE__ */ s(us, { children: /* @__PURE__ */ s(
|
|
452
|
+
/* @__PURE__ */ s(us, { children: /* @__PURE__ */ s(Ae, { value: c, suffix: "%" }) })
|
|
453
453
|
] })
|
|
454
454
|
] })
|
|
455
455
|
]
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
458
|
};
|
|
459
|
-
var de = typeof window > "u" ? X : we, Cs = ({ isPlaying:
|
|
459
|
+
var de = typeof window > "u" ? X : we, Cs = ({ isPlaying: t, duration: e, startAt: n = 0, updateInterval: o = 0, onComplete: i, onUpdate: c }) => {
|
|
460
460
|
let [a, l] = P(n), d = _(0), u = _(n), h = _(n * -1e3), v = _(null), m = _(null), I = _(null), $ = (C) => {
|
|
461
461
|
let w = C / 1e3;
|
|
462
462
|
if (m.current === null) {
|
|
@@ -465,59 +465,59 @@ var de = typeof window > "u" ? X : we, Cs = ({ isPlaying: e, duration: t, startA
|
|
|
465
465
|
}
|
|
466
466
|
let b = w - m.current, T = d.current + b;
|
|
467
467
|
m.current = w, d.current = T;
|
|
468
|
-
let N = u.current + (o === 0 ? T : (T / o | 0) * o), V = u.current + T, D = typeof
|
|
469
|
-
l(D ?
|
|
470
|
-
},
|
|
468
|
+
let N = u.current + (o === 0 ? T : (T / o | 0) * o), V = u.current + T, D = typeof e == "number" && V >= e;
|
|
469
|
+
l(D ? e : N), D || (v.current = requestAnimationFrame($));
|
|
470
|
+
}, y = () => {
|
|
471
471
|
v.current && cancelAnimationFrame(v.current), I.current && clearTimeout(I.current), m.current = null;
|
|
472
|
-
}, g =
|
|
473
|
-
|
|
472
|
+
}, g = z((C) => {
|
|
473
|
+
y(), d.current = 0;
|
|
474
474
|
let w = typeof C == "number" ? C : n;
|
|
475
|
-
u.current = w, l(w),
|
|
476
|
-
}, [
|
|
475
|
+
u.current = w, l(w), t && (v.current = requestAnimationFrame($));
|
|
476
|
+
}, [t, n]);
|
|
477
477
|
return de(() => {
|
|
478
|
-
if (c == null || c(a),
|
|
479
|
-
h.current +=
|
|
478
|
+
if (c == null || c(a), e && a >= e) {
|
|
479
|
+
h.current += e * 1e3;
|
|
480
480
|
let { shouldRepeat: C = !1, delay: w = 0, newStartAt: b } = (i == null ? void 0 : i(h.current / 1e3)) || {};
|
|
481
481
|
C && (I.current = setTimeout(() => g(b), w * 1e3));
|
|
482
482
|
}
|
|
483
|
-
}, [a,
|
|
484
|
-
}, gs = (
|
|
485
|
-
let o =
|
|
483
|
+
}, [a, e]), de(() => (t && (v.current = requestAnimationFrame($)), y), [t, e, o]), { elapsedTime: a, reset: g };
|
|
484
|
+
}, gs = (t, e, n) => {
|
|
485
|
+
let o = t / 2, i = e / 2, c = o - i, a = 2 * c, l = n === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * c;
|
|
486
486
|
return { path: `m ${o},${i} a ${c},${c} 0 ${l} 0,${a} a ${c},${c} 0 ${l} 0,-${a}`, pathLength: d };
|
|
487
|
-
}, pe = (
|
|
487
|
+
}, pe = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, As = (t) => ({ position: "relative", width: t, height: t }), ys = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Se = (t, e, n, o, i) => {
|
|
488
488
|
if (o === 0)
|
|
489
|
-
return
|
|
490
|
-
let c = (i ? o -
|
|
491
|
-
return
|
|
492
|
-
}, ue = (
|
|
493
|
-
var
|
|
494
|
-
return (n = (
|
|
495
|
-
}, $s = (
|
|
489
|
+
return e;
|
|
490
|
+
let c = (i ? o - t : t) / o;
|
|
491
|
+
return e + n * c;
|
|
492
|
+
}, ue = (t) => {
|
|
493
|
+
var e, n;
|
|
494
|
+
return (n = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (o, i, c, a) => `#${i}${i}${c}${c}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((o) => parseInt(o, 16))) != null ? n : [];
|
|
495
|
+
}, $s = (t, e) => {
|
|
496
496
|
var n;
|
|
497
|
-
let { colors: o, colorsTime: i, isSmoothColorTransition: c = !0 } =
|
|
497
|
+
let { colors: o, colorsTime: i, isSmoothColorTransition: c = !0 } = t;
|
|
498
498
|
if (typeof o == "string")
|
|
499
499
|
return o;
|
|
500
|
-
let a = (n = i == null ? void 0 : i.findIndex((m, I) => m >=
|
|
500
|
+
let a = (n = i == null ? void 0 : i.findIndex((m, I) => m >= e && e >= i[I + 1])) != null ? n : -1;
|
|
501
501
|
if (!i || a === -1)
|
|
502
502
|
return o[0];
|
|
503
503
|
if (!c)
|
|
504
504
|
return o[a];
|
|
505
|
-
let l = i[a] -
|
|
505
|
+
let l = i[a] - e, d = i[a] - i[a + 1], u = ue(o[a]), h = ue(o[a + 1]), v = !!t.isGrowing;
|
|
506
506
|
return `rgb(${u.map((m, I) => Se(l, m, h[I] - m, d, v) | 0).join(",")})`;
|
|
507
|
-
}, bs = (
|
|
508
|
-
let { duration:
|
|
509
|
-
let b = Math.ceil(
|
|
507
|
+
}, bs = (t) => {
|
|
508
|
+
let { duration: e, initialRemainingTime: n, updateInterval: o, size: i = 180, strokeWidth: c = 12, trailStrokeWidth: a, isPlaying: l = !1, isGrowing: d = !1, rotation: u = "clockwise", onComplete: h, onUpdate: v } = t, m = _(), I = Math.max(c, a ?? 0), { path: $, pathLength: y } = gs(i, I, u), { elapsedTime: g } = Cs({ isPlaying: l, duration: e, startAt: pe(e, n), updateInterval: o, onUpdate: typeof v == "function" ? (w) => {
|
|
509
|
+
let b = Math.ceil(e - w);
|
|
510
510
|
b !== m.current && (m.current = b, v(b));
|
|
511
511
|
} : void 0, onComplete: typeof h == "function" ? (w) => {
|
|
512
512
|
var b;
|
|
513
513
|
let { shouldRepeat: T, delay: N, newInitialRemainingTime: V } = (b = h(w)) != null ? b : {};
|
|
514
514
|
if (T)
|
|
515
|
-
return { shouldRepeat: T, delay: N, newStartAt: pe(
|
|
516
|
-
} : void 0 }), C =
|
|
517
|
-
return { elapsedTime: g, path: $, pathLength:
|
|
518
|
-
}, Le = (
|
|
519
|
-
let { children:
|
|
520
|
-
return
|
|
515
|
+
return { shouldRepeat: T, delay: N, newStartAt: pe(e, V) };
|
|
516
|
+
} : void 0 }), C = e - g;
|
|
517
|
+
return { elapsedTime: g, path: $, pathLength: y, remainingTime: Math.ceil(C), rotation: u, size: i, stroke: $s(t, C), strokeDashoffset: Se(g, 0, y, e, d), strokeWidth: c };
|
|
518
|
+
}, Le = (t) => {
|
|
519
|
+
let { children: e, strokeLinecap: n, trailColor: o, trailStrokeWidth: i } = t, { path: c, pathLength: a, stroke: l, strokeDashoffset: d, remainingTime: u, elapsedTime: h, size: v, strokeWidth: m } = bs(t);
|
|
520
|
+
return B.createElement("div", { style: As(v) }, B.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, B.createElement("path", { d: c, fill: "none", stroke: o ?? "#d9d9d9", strokeWidth: i ?? m }), B.createElement("path", { d: c, fill: "none", stroke: l, strokeLinecap: n ?? "round", strokeWidth: m, strokeDasharray: a, strokeDashoffset: d })), typeof e == "function" && B.createElement("div", { style: ys }, e({ remainingTime: u, elapsedTime: h, color: l })));
|
|
521
521
|
};
|
|
522
522
|
Le.displayName = "CountdownCircleTimer";
|
|
523
523
|
const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRAY3], Ts = [10, 10, 1, 0], Rs = /* @__PURE__ */ r("div")({
|
|
@@ -525,22 +525,22 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
525
525
|
class: "r165427",
|
|
526
526
|
propsAsIs: !1
|
|
527
527
|
}), ks = Q.SECONDARY_GREEN6, he = Q.SECONDARY_RED3, Ss = Q.NEUTRALS_GRAY3, Ls = ({
|
|
528
|
-
isPlaying:
|
|
529
|
-
duration:
|
|
528
|
+
isPlaying: t = !0,
|
|
529
|
+
duration: e = 30,
|
|
530
530
|
onTimerExpired: n
|
|
531
531
|
}) => {
|
|
532
|
-
const [o, i] = P(
|
|
532
|
+
const [o, i] = P(e > 10 ? ks : he), c = ({
|
|
533
533
|
remainingTime: d
|
|
534
534
|
}) => /* @__PURE__ */ s(Rs, {
|
|
535
535
|
children: d
|
|
536
|
-
}), a =
|
|
536
|
+
}), a = z(() => {
|
|
537
537
|
n == null || n(), i(Ss);
|
|
538
|
-
}, [n, i]), l =
|
|
538
|
+
}, [n, i]), l = z((d) => {
|
|
539
539
|
d === 10 && i(he);
|
|
540
540
|
}, [i]);
|
|
541
541
|
return /* @__PURE__ */ s(Le, {
|
|
542
|
-
isPlaying:
|
|
543
|
-
duration:
|
|
542
|
+
isPlaying: t,
|
|
543
|
+
duration: e,
|
|
544
544
|
colors: ws,
|
|
545
545
|
colorsTime: Ts,
|
|
546
546
|
size: 32,
|
|
@@ -580,8 +580,8 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
580
580
|
class: "pe5g05h",
|
|
581
581
|
propsAsIs: !1
|
|
582
582
|
}), Ms = ({
|
|
583
|
-
title:
|
|
584
|
-
points:
|
|
583
|
+
title: t,
|
|
584
|
+
points: e,
|
|
585
585
|
isPlayingTimer: n,
|
|
586
586
|
isTimer: o,
|
|
587
587
|
animatePoints: i,
|
|
@@ -590,87 +590,87 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
590
590
|
onTimerExpired: l
|
|
591
591
|
}) => /* @__PURE__ */ p(Es, { style: { justifyContent: c === f.PREDICTION ? "center" : "space-between" }, children: [
|
|
592
592
|
/* @__PURE__ */ p(xs, { children: [
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
t && /* @__PURE__ */ s(Ps, { children: t }),
|
|
594
|
+
e !== void 0 && c !== f.POLL && /* @__PURE__ */ p(x, { children: [
|
|
595
595
|
/* @__PURE__ */ s(Ns, { name: "icon-trophy" }),
|
|
596
596
|
/* @__PURE__ */ p(Ds, { children: [
|
|
597
|
-
/* @__PURE__ */ s(Vs, { children: i ? /* @__PURE__ */ s(
|
|
597
|
+
/* @__PURE__ */ s(Vs, { children: i ? /* @__PURE__ */ s(Ae, { value: e, delay: 0.3 }) : e }),
|
|
598
598
|
/* @__PURE__ */ s(Os, { children: "PTS" })
|
|
599
599
|
] })
|
|
600
600
|
] })
|
|
601
601
|
] }),
|
|
602
602
|
o && c !== f.PREDICTION && /* @__PURE__ */ s(Ls, { isPlaying: n, onTimerExpired: l, duration: a })
|
|
603
|
-
] }), _s = ({ openedQuestion:
|
|
603
|
+
] }), _s = ({ openedQuestion: t, isLoading: e, vote: n, close: o }) => {
|
|
604
604
|
var i, c;
|
|
605
|
-
const a =
|
|
605
|
+
const a = t.subject, l = t.type, d = t.status, u = (i = t.options) == null ? void 0 : i.options, h = t.marketClosed, [v, m] = P(!1), [I, $] = P(!1), [y, g] = P(!0), [C, w] = P(!1), [b, T] = P(""), N = t == null ? void 0 : t.id;
|
|
606
606
|
X(() => {
|
|
607
607
|
l === f.PREDICTION ? h && g(!1) : d === M.RESOLVED && g(!1);
|
|
608
608
|
}, []);
|
|
609
|
-
const V =
|
|
609
|
+
const V = z((L) => {
|
|
610
610
|
$(L), m(!0);
|
|
611
|
-
}, []), D =
|
|
611
|
+
}, []), D = z(
|
|
612
612
|
async (L) => {
|
|
613
613
|
if (N) {
|
|
614
|
-
const
|
|
615
|
-
T(
|
|
614
|
+
const F = L.currentTarget.value;
|
|
615
|
+
T(F), await n(N, F);
|
|
616
616
|
}
|
|
617
617
|
},
|
|
618
618
|
[N, T, n]
|
|
619
|
-
), ee =
|
|
619
|
+
), ee = z(() => {
|
|
620
620
|
w(!0), setTimeout(o, 3e3);
|
|
621
|
-
}, [o]),
|
|
622
|
-
() =>
|
|
623
|
-
[
|
|
621
|
+
}, [o]), A = O(
|
|
622
|
+
() => t == null ? void 0 : t.answers.find((L) => L.youVoted === !0),
|
|
623
|
+
[t]
|
|
624
624
|
), k = O(
|
|
625
|
-
() => !!(
|
|
626
|
-
[
|
|
625
|
+
() => !!(t != null && t.answers.find((L) => L.correct === !0)),
|
|
626
|
+
[t]
|
|
627
627
|
), S = O(
|
|
628
|
-
() =>
|
|
629
|
-
[
|
|
630
|
-
), te = O(() =>
|
|
631
|
-
var
|
|
628
|
+
() => t == null ? void 0 : t.answers.find((L) => L.correct === !0),
|
|
629
|
+
[t]
|
|
630
|
+
), te = O(() => t ? t.answers.map((L) => {
|
|
631
|
+
var F;
|
|
632
632
|
return {
|
|
633
633
|
...L,
|
|
634
|
-
questionVoted: !!
|
|
634
|
+
questionVoted: !!A,
|
|
635
635
|
youSelected: b === L.id,
|
|
636
|
-
isLoading:
|
|
636
|
+
isLoading: e,
|
|
637
637
|
hasCorrectAnswer: k,
|
|
638
|
-
questionType:
|
|
638
|
+
questionType: t.type,
|
|
639
639
|
answerTimeExpired: C,
|
|
640
640
|
questionStatus: d,
|
|
641
|
-
imageMode: (
|
|
641
|
+
imageMode: (F = t.appearance) == null ? void 0 : F.images,
|
|
642
642
|
onVote: D
|
|
643
643
|
};
|
|
644
644
|
}) : [], [
|
|
645
645
|
k,
|
|
646
646
|
C,
|
|
647
|
-
t,
|
|
648
647
|
e,
|
|
649
|
-
|
|
648
|
+
t,
|
|
649
|
+
A,
|
|
650
650
|
d,
|
|
651
651
|
D,
|
|
652
652
|
b
|
|
653
|
-
]), se = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, j = d === M.RESOLVED && l === f.TRIVIA && !
|
|
654
|
-
if (l === f.PREDICTION &&
|
|
655
|
-
return
|
|
653
|
+
]), se = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, j = d === M.RESOLVED && l === f.TRIVIA && !A && !y, re = l === f.TRIVIA && I && v && y, ae = O(() => l === f.PREDICTION ? !!(A && !k || A && k && S != null && S.youVoted) : !0, [l, A, k, S]), Ne = O(() => {
|
|
654
|
+
if (l === f.PREDICTION && A && (!k || k && S != null && S.youVoted))
|
|
655
|
+
return A.points;
|
|
656
656
|
if (!(j || C))
|
|
657
|
-
return d === M.RESOLVED ? 0 :
|
|
657
|
+
return d === M.RESOLVED ? 0 : A ? A.correct ? A.points : 0 : S == null ? void 0 : S.points;
|
|
658
658
|
}, [
|
|
659
659
|
C,
|
|
660
|
-
|
|
660
|
+
A,
|
|
661
661
|
S,
|
|
662
662
|
d,
|
|
663
663
|
j,
|
|
664
664
|
l,
|
|
665
665
|
k
|
|
666
|
-
]), De = O(() => l === f.PREDICTION &&
|
|
666
|
+
]), De = O(() => l === f.PREDICTION && A ? k ? k && S != null && S.youVoted ? "You won" : "" : "To win" : j || C ? "Time expired" : l === f.POLL ? "Time remaining" : A ? "You won" : "To win", [C, l, A, j, k, S]), Ve = (l === f.TRIVIA || l === f.PREDICTION) && A && k && (S == null ? void 0 : S.youVoted), Oe = A || j || re || l === f.TRIVIA && d === M.RESOLVED && y;
|
|
667
667
|
return /* @__PURE__ */ s(Gt, { children: /* @__PURE__ */ s(Yt, { children: /* @__PURE__ */ p(Jt, { children: [
|
|
668
668
|
/* @__PURE__ */ s(
|
|
669
669
|
Ht,
|
|
670
670
|
{
|
|
671
671
|
feedbackMessages: se,
|
|
672
|
-
questionVoted: !!
|
|
673
|
-
questionVotedCorrectly:
|
|
672
|
+
questionVoted: !!A,
|
|
673
|
+
questionVotedCorrectly: A == null ? void 0 : A.correct,
|
|
674
674
|
questionType: l,
|
|
675
675
|
hasCorrectAnswer: k,
|
|
676
676
|
questionStatus: d,
|
|
@@ -678,7 +678,7 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
678
678
|
showClosedNotificationTrivia: re,
|
|
679
679
|
votedInCurrentRender: v,
|
|
680
680
|
votedAfterQuestionClosed: I,
|
|
681
|
-
enteredAnActiveQuestion:
|
|
681
|
+
enteredAnActiveQuestion: y,
|
|
682
682
|
marketClosed: h
|
|
683
683
|
}
|
|
684
684
|
),
|
|
@@ -688,11 +688,11 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
688
688
|
title: De,
|
|
689
689
|
points: Ne,
|
|
690
690
|
onTimerExpired: ee,
|
|
691
|
-
questionType:
|
|
692
|
-
isTimer: !
|
|
693
|
-
isPlayingTimer: !
|
|
691
|
+
questionType: t.type,
|
|
692
|
+
isTimer: !e,
|
|
693
|
+
isPlayingTimer: !A,
|
|
694
694
|
animatePoints: Ve,
|
|
695
|
-
timerDuration: Oe ? 0 : Number(((c =
|
|
695
|
+
timerDuration: Oe ? 0 : Number(((c = t == null ? void 0 : t.appearance) == null ? void 0 : c.autoHideInterval) || "30")
|
|
696
696
|
}
|
|
697
697
|
),
|
|
698
698
|
C ? /* @__PURE__ */ s(
|
|
@@ -709,7 +709,7 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
709
709
|
...L,
|
|
710
710
|
markThatVoted: V,
|
|
711
711
|
votedAfterQuestionClosed: I,
|
|
712
|
-
enteredAnActiveQuestion:
|
|
712
|
+
enteredAnActiveQuestion: y,
|
|
713
713
|
marketClosed: h
|
|
714
714
|
},
|
|
715
715
|
L.id
|
|
@@ -736,128 +736,133 @@ const ws = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
736
736
|
name: "Image",
|
|
737
737
|
class: "id3lh3p",
|
|
738
738
|
propsAsIs: !1
|
|
739
|
+
}), zs = /* @__PURE__ */ r("div")({
|
|
740
|
+
name: "ImageContainer",
|
|
741
|
+
class: "i1gfjeu5",
|
|
742
|
+
propsAsIs: !1
|
|
739
743
|
}), Ee = ({
|
|
744
|
+
imageMode: t,
|
|
740
745
|
instantView: e,
|
|
741
|
-
isDetail:
|
|
742
|
-
notification:
|
|
743
|
-
controlVideo:
|
|
746
|
+
isDetail: n,
|
|
747
|
+
notification: o,
|
|
748
|
+
controlVideo: i
|
|
744
749
|
}) => {
|
|
745
|
-
const
|
|
750
|
+
const c = e == null ? void 0 : e.heading, a = e == null ? void 0 : e.body, l = c || a, d = o == null ? void 0 : o.title, u = o == null ? void 0 : o.body;
|
|
746
751
|
return /* @__PURE__ */ p(Qs, { children: [
|
|
747
752
|
(e == null ? void 0 : e.video) && /* @__PURE__ */ s(
|
|
748
753
|
je,
|
|
749
754
|
{
|
|
750
755
|
source: e.video.url,
|
|
751
756
|
poster: e.video.thumbnailUrl,
|
|
752
|
-
controlVideo:
|
|
757
|
+
controlVideo: i
|
|
753
758
|
}
|
|
754
759
|
),
|
|
755
|
-
(e == null ? void 0 : e.image) && !(e != null && e.video) && /* @__PURE__ */ s(Bs, { src: e == null ? void 0 : e.image }),
|
|
760
|
+
(e == null ? void 0 : e.image) && !(e != null && e.video) && /* @__PURE__ */ s(zs, { "data-rounded": t === W.ROUNDED, children: /* @__PURE__ */ s(Bs, { src: e == null ? void 0 : e.image }) }),
|
|
756
761
|
/* @__PURE__ */ p(js, { children: [
|
|
757
|
-
/* @__PURE__ */ s(Us, { children:
|
|
758
|
-
/* @__PURE__ */ s(Ws, { children:
|
|
762
|
+
/* @__PURE__ */ s(Us, { children: n && l ? c : d }),
|
|
763
|
+
/* @__PURE__ */ s(Ws, { children: n && l ? a : u })
|
|
759
764
|
] })
|
|
760
765
|
] });
|
|
761
|
-
},
|
|
766
|
+
}, Fs = /* @__PURE__ */ r("div")({
|
|
762
767
|
name: "Container",
|
|
763
768
|
class: "c1euiow",
|
|
764
769
|
propsAsIs: !1
|
|
765
|
-
}),
|
|
770
|
+
}), Hs = /* @__PURE__ */ r("a")({
|
|
766
771
|
name: "WebLinkBtn",
|
|
767
772
|
class: "w19zie3h",
|
|
768
773
|
propsAsIs: !1
|
|
769
|
-
}),
|
|
770
|
-
/* @__PURE__ */ s(Ee, { instantView:
|
|
771
|
-
(
|
|
772
|
-
|
|
774
|
+
}), Ys = ({ instantView: t, ...e }) => /* @__PURE__ */ p(Fs, { children: [
|
|
775
|
+
/* @__PURE__ */ s(Ee, { instantView: t, ...e, isDetail: !0 }),
|
|
776
|
+
(t == null ? void 0 : t.webLink) && /* @__PURE__ */ p(Hs, { href: t == null ? void 0 : t.webLink.url, target: "_blank", children: [
|
|
777
|
+
t == null ? void 0 : t.webLink.label,
|
|
773
778
|
/* @__PURE__ */ s(R, { name: "icon-external-link" })
|
|
774
779
|
] })
|
|
775
|
-
] }),
|
|
780
|
+
] }), Zs = /* @__PURE__ */ r("div")({
|
|
776
781
|
name: "Container",
|
|
777
782
|
class: "c1dcxmvf",
|
|
778
783
|
propsAsIs: !1
|
|
779
|
-
}),
|
|
784
|
+
}), Gs = /* @__PURE__ */ r("blockquote")({
|
|
780
785
|
name: "Quote",
|
|
781
786
|
class: "qb4q22c",
|
|
782
787
|
propsAsIs: !1
|
|
783
|
-
}),
|
|
784
|
-
|
|
785
|
-
/* @__PURE__ */ s(
|
|
786
|
-
] }),
|
|
788
|
+
}), Js = (t) => /* @__PURE__ */ p(Zs, { children: [
|
|
789
|
+
t.title && /* @__PURE__ */ s(Gs, { children: t.title }),
|
|
790
|
+
/* @__PURE__ */ s(ye, { ...t, isDetail: !0 })
|
|
791
|
+
] }), Ks = /* @__PURE__ */ r("div")({
|
|
787
792
|
name: "QuestionContainer",
|
|
788
793
|
class: "qdri6g3",
|
|
789
794
|
propsAsIs: !1
|
|
790
|
-
}),
|
|
791
|
-
openedQuestion:
|
|
795
|
+
}), Xs = ({
|
|
796
|
+
openedQuestion: t
|
|
792
797
|
}) => {
|
|
793
|
-
var
|
|
798
|
+
var e, n;
|
|
794
799
|
const {
|
|
795
800
|
sdk: o
|
|
796
801
|
} = $e();
|
|
797
|
-
return ((
|
|
798
|
-
...
|
|
802
|
+
return ((e = t == null ? void 0 : t.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ s(Ys, {
|
|
803
|
+
...t.attributes.attributes.value,
|
|
799
804
|
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
800
|
-
}) : ((n =
|
|
801
|
-
...
|
|
805
|
+
}) : ((n = t == null ? void 0 : t.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(Js, {
|
|
806
|
+
...t.attributes.attributes.value,
|
|
802
807
|
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
803
808
|
}) : null;
|
|
804
|
-
},
|
|
805
|
-
extendedQuestion:
|
|
806
|
-
vote:
|
|
809
|
+
}, en = ({
|
|
810
|
+
extendedQuestion: t,
|
|
811
|
+
vote: e,
|
|
807
812
|
close: n
|
|
808
813
|
}) => {
|
|
809
814
|
const {
|
|
810
815
|
loading: o,
|
|
811
816
|
data: i
|
|
812
|
-
} =
|
|
817
|
+
} = t;
|
|
813
818
|
return i ? /* @__PURE__ */ s(_s, {
|
|
814
|
-
vote:
|
|
819
|
+
vote: e,
|
|
815
820
|
close: n,
|
|
816
821
|
openedQuestion: i,
|
|
817
822
|
isLoading: !!o
|
|
818
823
|
}) : null;
|
|
819
|
-
},
|
|
820
|
-
gamification:
|
|
824
|
+
}, tn = ({
|
|
825
|
+
gamification: t
|
|
821
826
|
}) => {
|
|
822
|
-
var
|
|
823
|
-
const n = q(
|
|
827
|
+
var e;
|
|
828
|
+
const n = q(t.openedQuestion.$store), o = q(t.openedQuestion.$extendedStore);
|
|
824
829
|
if (!n)
|
|
825
830
|
return null;
|
|
826
831
|
const i = n.type;
|
|
827
|
-
return /* @__PURE__ */ p(
|
|
832
|
+
return /* @__PURE__ */ p(Ks, {
|
|
828
833
|
children: [/* @__PURE__ */ s(Te, {
|
|
829
|
-
close:
|
|
830
|
-
type: ((
|
|
831
|
-
}), i === "question" && /* @__PURE__ */ s(
|
|
832
|
-
vote:
|
|
833
|
-
close:
|
|
834
|
+
close: t.closeQuestion,
|
|
835
|
+
type: ((e = n.attributes) == null ? void 0 : e.type) || f.UNSET
|
|
836
|
+
}), i === "question" && /* @__PURE__ */ s(en, {
|
|
837
|
+
vote: t.submitAnswer,
|
|
838
|
+
close: t.closeQuestion,
|
|
834
839
|
extendedQuestion: o
|
|
835
|
-
}), i !== "question" && /* @__PURE__ */ s(
|
|
840
|
+
}), i !== "question" && /* @__PURE__ */ s(Xs, {
|
|
836
841
|
openedQuestion: n
|
|
837
842
|
}), /* @__PURE__ */ s(Mt, {
|
|
838
843
|
sponsorLogo: ""
|
|
839
844
|
})]
|
|
840
845
|
});
|
|
841
|
-
},
|
|
846
|
+
}, sn = /* @__PURE__ */ r("div")({
|
|
842
847
|
name: "Container",
|
|
843
848
|
class: "c115qtkr",
|
|
844
849
|
propsAsIs: !1
|
|
845
|
-
}),
|
|
850
|
+
}), nn = /* @__PURE__ */ r("div")({
|
|
846
851
|
name: "STabs",
|
|
847
852
|
class: "sxnslc8",
|
|
848
853
|
propsAsIs: !1
|
|
849
|
-
}),
|
|
854
|
+
}), on = /* @__PURE__ */ r("button")({
|
|
850
855
|
name: "Button",
|
|
851
856
|
class: "b1umzux0",
|
|
852
857
|
propsAsIs: !1
|
|
853
|
-
}),
|
|
858
|
+
}), rn = /* @__PURE__ */ r("span")({
|
|
854
859
|
name: "Title",
|
|
855
860
|
class: "tspsaas",
|
|
856
861
|
propsAsIs: !1
|
|
857
862
|
});
|
|
858
|
-
var K = /* @__PURE__ */ ((
|
|
859
|
-
const me = ({ title:
|
|
860
|
-
/* @__PURE__ */ s(me, { title: "Home", active:
|
|
863
|
+
var K = /* @__PURE__ */ ((t) => (t.HOME = "home", t.LEADERBOARD = "leaderboard", t))(K || {});
|
|
864
|
+
const me = ({ title: t, active: e, onClick: n }) => /* @__PURE__ */ s(on, { onClick: n, "data-selected": e, children: /* @__PURE__ */ s(rn, { children: t }) }), an = ({ activePage: t = "home", toggleActivePage: e }) => /* @__PURE__ */ s(sn, { children: /* @__PURE__ */ p(nn, { "data-position": t === "home" ? "left" : "right", children: [
|
|
865
|
+
/* @__PURE__ */ s(me, { title: "Home", active: t === "home", onClick: () => e(
|
|
861
866
|
"home"
|
|
862
867
|
/* HOME */
|
|
863
868
|
) }),
|
|
@@ -865,113 +870,113 @@ const me = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(nn, { onCl
|
|
|
865
870
|
me,
|
|
866
871
|
{
|
|
867
872
|
title: "Friends",
|
|
868
|
-
active:
|
|
869
|
-
onClick: () =>
|
|
873
|
+
active: t === "leaderboard",
|
|
874
|
+
onClick: () => e(
|
|
870
875
|
"leaderboard"
|
|
871
876
|
/* LEADERBOARD */
|
|
872
877
|
)
|
|
873
878
|
}
|
|
874
879
|
)
|
|
875
|
-
] }) }),
|
|
880
|
+
] }) }), ln = /* @__PURE__ */ r("div")({
|
|
876
881
|
name: "Container",
|
|
877
882
|
class: "c1ux29ft",
|
|
878
883
|
propsAsIs: !1
|
|
879
|
-
}),
|
|
884
|
+
}), cn = /* @__PURE__ */ r("img")({
|
|
880
885
|
name: "FriendsIcon",
|
|
881
886
|
class: "f10ncfg2",
|
|
882
887
|
propsAsIs: !1
|
|
883
|
-
}),
|
|
888
|
+
}), dn = /* @__PURE__ */ r("div")({
|
|
884
889
|
name: "Content",
|
|
885
890
|
class: "c1yc07bd",
|
|
886
891
|
propsAsIs: !1
|
|
887
|
-
}),
|
|
892
|
+
}), pn = /* @__PURE__ */ r("div")({
|
|
888
893
|
name: "Title",
|
|
889
894
|
class: "tj6cq7w",
|
|
890
895
|
propsAsIs: !1
|
|
891
|
-
}),
|
|
896
|
+
}), un = /* @__PURE__ */ r("div")({
|
|
892
897
|
name: "Description",
|
|
893
898
|
class: "d1ag78xo",
|
|
894
899
|
propsAsIs: !1
|
|
895
|
-
}),
|
|
900
|
+
}), hn = () => R, mn = /* @__PURE__ */ r(hn())({
|
|
896
901
|
name: "ArrowInviteIcon",
|
|
897
902
|
class: "awohrz6",
|
|
898
903
|
propsAsIs: !0
|
|
899
|
-
}),
|
|
900
|
-
/* @__PURE__ */ s(
|
|
901
|
-
/* @__PURE__ */ p(
|
|
902
|
-
/* @__PURE__ */ s(
|
|
903
|
-
/* @__PURE__ */ s(
|
|
904
|
+
}), vn = "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", fn = ({ title: t, description: e, onClick: n, className: o }) => /* @__PURE__ */ p(ln, { onClick: n, className: o, children: [
|
|
905
|
+
/* @__PURE__ */ s(cn, { alt: "friends-icon", src: vn }),
|
|
906
|
+
/* @__PURE__ */ p(dn, { children: [
|
|
907
|
+
/* @__PURE__ */ s(pn, { children: t }),
|
|
908
|
+
/* @__PURE__ */ s(un, { children: e })
|
|
904
909
|
] }),
|
|
905
|
-
/* @__PURE__ */ s(
|
|
910
|
+
/* @__PURE__ */ s(mn, { name: "icon-copy" })
|
|
906
911
|
] });
|
|
907
|
-
function
|
|
908
|
-
var
|
|
909
|
-
return !(o > n || i <
|
|
912
|
+
function In(t) {
|
|
913
|
+
var e = t.lastRenderedStartIndex, n = t.lastRenderedStopIndex, o = t.startIndex, i = t.stopIndex;
|
|
914
|
+
return !(o > n || i < e);
|
|
910
915
|
}
|
|
911
|
-
function
|
|
912
|
-
for (var
|
|
913
|
-
var h =
|
|
916
|
+
function Cn(t) {
|
|
917
|
+
for (var e = t.isItemLoaded, n = t.itemCount, o = t.minimumBatchSize, i = t.startIndex, c = t.stopIndex, a = [], l = null, d = null, u = i; u <= c; u++) {
|
|
918
|
+
var h = e(u);
|
|
914
919
|
h ? d !== null && (a.push(l, d), l = d = null) : (d = u, l === null && (l = u));
|
|
915
920
|
}
|
|
916
921
|
if (d !== null) {
|
|
917
|
-
for (var v = Math.min(Math.max(d, l + o - 1), n - 1), m = d + 1; m <= v && !
|
|
922
|
+
for (var v = Math.min(Math.max(d, l + o - 1), n - 1), m = d + 1; m <= v && !e(m); m++)
|
|
918
923
|
d = m;
|
|
919
924
|
a.push(l, d);
|
|
920
925
|
}
|
|
921
926
|
if (a.length)
|
|
922
927
|
for (; a[1] - a[0] + 1 < o && a[0] > 0; ) {
|
|
923
928
|
var I = a[0] - 1;
|
|
924
|
-
if (!
|
|
929
|
+
if (!e(I))
|
|
925
930
|
a[0] = I;
|
|
926
931
|
else
|
|
927
932
|
break;
|
|
928
933
|
}
|
|
929
934
|
return a;
|
|
930
935
|
}
|
|
931
|
-
var
|
|
932
|
-
if (!(
|
|
936
|
+
var gn = function(t, e) {
|
|
937
|
+
if (!(t instanceof e))
|
|
933
938
|
throw new TypeError("Cannot call a class as a function");
|
|
934
|
-
},
|
|
935
|
-
function e
|
|
939
|
+
}, An = /* @__PURE__ */ function() {
|
|
940
|
+
function t(e, n) {
|
|
936
941
|
for (var o = 0; o < n.length; o++) {
|
|
937
942
|
var i = n[o];
|
|
938
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(
|
|
943
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
939
944
|
}
|
|
940
945
|
}
|
|
941
|
-
return function(
|
|
942
|
-
return n && e
|
|
946
|
+
return function(e, n, o) {
|
|
947
|
+
return n && t(e.prototype, n), o && t(e, o), e;
|
|
943
948
|
};
|
|
944
|
-
}(), yn = function(
|
|
945
|
-
if (typeof
|
|
946
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof
|
|
947
|
-
|
|
949
|
+
}(), yn = function(t, e) {
|
|
950
|
+
if (typeof e != "function" && e !== null)
|
|
951
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
952
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
948
953
|
constructor: {
|
|
949
|
-
value:
|
|
954
|
+
value: t,
|
|
950
955
|
enumerable: !1,
|
|
951
956
|
writable: !0,
|
|
952
957
|
configurable: !0
|
|
953
958
|
}
|
|
954
|
-
}),
|
|
955
|
-
}, ve = function(
|
|
956
|
-
if (!
|
|
959
|
+
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
960
|
+
}, ve = function(t, e) {
|
|
961
|
+
if (!t)
|
|
957
962
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
958
|
-
return
|
|
963
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
959
964
|
};
|
|
960
|
-
(function(
|
|
961
|
-
yn(
|
|
962
|
-
function
|
|
965
|
+
(function(t) {
|
|
966
|
+
yn(e, t);
|
|
967
|
+
function e() {
|
|
963
968
|
var n, o, i, c;
|
|
964
|
-
|
|
969
|
+
gn(this, e);
|
|
965
970
|
for (var a = arguments.length, l = Array(a), d = 0; d < a; d++)
|
|
966
971
|
l[d] = arguments[d];
|
|
967
|
-
return c = (o = (i = ve(this, (n =
|
|
972
|
+
return c = (o = (i = ve(this, (n = e.__proto__ || Object.getPrototypeOf(e)).call.apply(n, [this].concat(l))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(u) {
|
|
968
973
|
var h = u.visibleStartIndex, v = u.visibleStopIndex;
|
|
969
974
|
i._lastRenderedStartIndex = h, i._lastRenderedStopIndex = v, i._ensureRowsLoaded(h, v);
|
|
970
975
|
}, i._setRef = function(u) {
|
|
971
976
|
i._listRef = u;
|
|
972
977
|
}, o), ve(i, c);
|
|
973
978
|
}
|
|
974
|
-
return
|
|
979
|
+
return An(e, [{
|
|
975
980
|
key: "resetloadMoreItemsCache",
|
|
976
981
|
value: function() {
|
|
977
982
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -993,7 +998,7 @@ var Cn = function(e, t) {
|
|
|
993
998
|
}, {
|
|
994
999
|
key: "_ensureRowsLoaded",
|
|
995
1000
|
value: function(o, i) {
|
|
996
|
-
var c = this.props, a = c.isItemLoaded, l = c.itemCount, d = c.minimumBatchSize, u = d === void 0 ? 10 : d, h = c.threshold, v = h === void 0 ? 15 : h, m =
|
|
1001
|
+
var c = this.props, a = c.isItemLoaded, l = c.itemCount, d = c.minimumBatchSize, u = d === void 0 ? 10 : d, h = c.threshold, v = h === void 0 ? 15 : h, m = Cn({
|
|
997
1002
|
isItemLoaded: a,
|
|
998
1003
|
itemCount: l,
|
|
999
1004
|
minimumBatchSize: u,
|
|
@@ -1010,7 +1015,7 @@ var Cn = function(e, t) {
|
|
|
1010
1015
|
for (var i = this, c = this.props.loadMoreItems || this.props.loadMoreRows, a = function(u) {
|
|
1011
1016
|
var h = o[u], v = o[u + 1], m = c(h, v);
|
|
1012
1017
|
m != null && m.then(function() {
|
|
1013
|
-
if (
|
|
1018
|
+
if (In({
|
|
1014
1019
|
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1015
1020
|
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1016
1021
|
startIndex: h,
|
|
@@ -1024,99 +1029,99 @@ var Cn = function(e, t) {
|
|
|
1024
1029
|
}, l = 0; l < o.length; l += 2)
|
|
1025
1030
|
a(l);
|
|
1026
1031
|
}
|
|
1027
|
-
}]),
|
|
1032
|
+
}]), e;
|
|
1028
1033
|
})(et);
|
|
1029
|
-
const
|
|
1034
|
+
const $n = /* @__PURE__ */ r("div")({
|
|
1030
1035
|
name: "Container",
|
|
1031
1036
|
class: "culdu4a",
|
|
1032
1037
|
propsAsIs: !1
|
|
1033
|
-
}),
|
|
1038
|
+
}), bn = /* @__PURE__ */ r("div")({
|
|
1034
1039
|
name: "Position",
|
|
1035
1040
|
class: "pwf8e69",
|
|
1036
1041
|
propsAsIs: !1
|
|
1037
|
-
}),
|
|
1042
|
+
}), wn = /* @__PURE__ */ r("img")({
|
|
1038
1043
|
name: "Avatar",
|
|
1039
1044
|
class: "atf4yh4",
|
|
1040
1045
|
propsAsIs: !1
|
|
1041
|
-
}),
|
|
1046
|
+
}), Tn = /* @__PURE__ */ r("div")({
|
|
1042
1047
|
name: "AvatarPlaceholder",
|
|
1043
1048
|
class: "a1dg29ja",
|
|
1044
1049
|
propsAsIs: !1
|
|
1045
|
-
}),
|
|
1050
|
+
}), Rn = /* @__PURE__ */ r("div")({
|
|
1046
1051
|
name: "Content",
|
|
1047
1052
|
class: "c10a68rc",
|
|
1048
1053
|
propsAsIs: !1
|
|
1049
|
-
}),
|
|
1054
|
+
}), kn = /* @__PURE__ */ r("div")({
|
|
1050
1055
|
name: "NameContainer",
|
|
1051
1056
|
class: "nc4kck5",
|
|
1052
1057
|
propsAsIs: !1
|
|
1053
|
-
}),
|
|
1058
|
+
}), Sn = /* @__PURE__ */ r("span")({
|
|
1054
1059
|
name: "Name",
|
|
1055
1060
|
class: "njsrqgr",
|
|
1056
1061
|
propsAsIs: !1
|
|
1057
|
-
}),
|
|
1062
|
+
}), Ln = () => R, En = /* @__PURE__ */ r(Ln())({
|
|
1058
1063
|
name: "CurrentUserBadge",
|
|
1059
1064
|
class: "c17uc4zr",
|
|
1060
1065
|
propsAsIs: !0
|
|
1061
1066
|
});
|
|
1062
|
-
var xe = { exports: {} },
|
|
1067
|
+
var xe = { exports: {} }, xn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", Pn = xn, qn = Pn;
|
|
1063
1068
|
function Pe() {
|
|
1064
1069
|
}
|
|
1065
1070
|
function qe() {
|
|
1066
1071
|
}
|
|
1067
1072
|
qe.resetWarningCache = Pe;
|
|
1068
|
-
var
|
|
1069
|
-
function
|
|
1070
|
-
if (d !==
|
|
1073
|
+
var Nn = function() {
|
|
1074
|
+
function t(o, i, c, a, l, d) {
|
|
1075
|
+
if (d !== qn) {
|
|
1071
1076
|
var u = new Error(
|
|
1072
1077
|
"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"
|
|
1073
1078
|
);
|
|
1074
1079
|
throw u.name = "Invariant Violation", u;
|
|
1075
1080
|
}
|
|
1076
1081
|
}
|
|
1077
|
-
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1082
|
+
t.isRequired = t;
|
|
1083
|
+
function e() {
|
|
1084
|
+
return t;
|
|
1080
1085
|
}
|
|
1081
1086
|
var n = {
|
|
1082
|
-
array:
|
|
1083
|
-
bigint:
|
|
1084
|
-
bool:
|
|
1085
|
-
func:
|
|
1086
|
-
number:
|
|
1087
|
-
object:
|
|
1088
|
-
string:
|
|
1089
|
-
symbol:
|
|
1090
|
-
any:
|
|
1091
|
-
arrayOf:
|
|
1092
|
-
element:
|
|
1093
|
-
elementType:
|
|
1094
|
-
instanceOf:
|
|
1095
|
-
node:
|
|
1096
|
-
objectOf:
|
|
1097
|
-
oneOf:
|
|
1098
|
-
oneOfType:
|
|
1099
|
-
shape:
|
|
1100
|
-
exact:
|
|
1087
|
+
array: t,
|
|
1088
|
+
bigint: t,
|
|
1089
|
+
bool: t,
|
|
1090
|
+
func: t,
|
|
1091
|
+
number: t,
|
|
1092
|
+
object: t,
|
|
1093
|
+
string: t,
|
|
1094
|
+
symbol: t,
|
|
1095
|
+
any: t,
|
|
1096
|
+
arrayOf: e,
|
|
1097
|
+
element: t,
|
|
1098
|
+
elementType: t,
|
|
1099
|
+
instanceOf: e,
|
|
1100
|
+
node: t,
|
|
1101
|
+
objectOf: e,
|
|
1102
|
+
oneOf: e,
|
|
1103
|
+
oneOfType: e,
|
|
1104
|
+
shape: e,
|
|
1105
|
+
exact: e,
|
|
1101
1106
|
checkPropTypes: qe,
|
|
1102
1107
|
resetWarningCache: Pe
|
|
1103
1108
|
};
|
|
1104
1109
|
return n.PropTypes = n, n;
|
|
1105
1110
|
};
|
|
1106
|
-
xe.exports =
|
|
1107
|
-
var
|
|
1108
|
-
const E = /* @__PURE__ */ Ue(
|
|
1111
|
+
xe.exports = Nn();
|
|
1112
|
+
var Dn = xe.exports;
|
|
1113
|
+
const E = /* @__PURE__ */ Ue(Dn);
|
|
1109
1114
|
class ie extends tt {
|
|
1110
|
-
constructor(
|
|
1111
|
-
super(
|
|
1115
|
+
constructor(e) {
|
|
1116
|
+
super(e), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
|
|
1112
1117
|
}
|
|
1113
1118
|
componentDidMount() {
|
|
1114
1119
|
this.pageLoaded = this.props.pageStart, this.options = this.eventListenerOptions(), this.attachScrollListener();
|
|
1115
1120
|
}
|
|
1116
1121
|
componentDidUpdate() {
|
|
1117
1122
|
if (this.props.isReverse && this.loadMore) {
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1123
|
+
const e = this.getParentElement(this.scrollComponent);
|
|
1124
|
+
e.scrollTop = e.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop, this.loadMore = !1;
|
|
1120
1125
|
}
|
|
1121
1126
|
this.attachScrollListener();
|
|
1122
1127
|
}
|
|
@@ -1124,64 +1129,64 @@ class ie extends tt {
|
|
|
1124
1129
|
this.detachScrollListener(), this.detachMousewheelListener();
|
|
1125
1130
|
}
|
|
1126
1131
|
isPassiveSupported() {
|
|
1127
|
-
let
|
|
1132
|
+
let e = !1;
|
|
1128
1133
|
const n = {
|
|
1129
1134
|
get passive() {
|
|
1130
|
-
|
|
1135
|
+
e = !0;
|
|
1131
1136
|
}
|
|
1132
1137
|
};
|
|
1133
1138
|
try {
|
|
1134
1139
|
document.addEventListener("test", null, n), document.removeEventListener("test", null, n);
|
|
1135
1140
|
} catch {
|
|
1136
1141
|
}
|
|
1137
|
-
return
|
|
1142
|
+
return e;
|
|
1138
1143
|
}
|
|
1139
1144
|
eventListenerOptions() {
|
|
1140
|
-
let
|
|
1141
|
-
return this.isPassiveSupported() ?
|
|
1145
|
+
let e = this.props.useCapture;
|
|
1146
|
+
return this.isPassiveSupported() ? e = {
|
|
1142
1147
|
useCapture: this.props.useCapture,
|
|
1143
1148
|
passive: !0
|
|
1144
|
-
} :
|
|
1149
|
+
} : e = {
|
|
1145
1150
|
passive: !1
|
|
1146
|
-
},
|
|
1151
|
+
}, e;
|
|
1147
1152
|
}
|
|
1148
1153
|
// Set a defaut loader for all your `InfiniteScroll` components
|
|
1149
|
-
setDefaultLoader(
|
|
1150
|
-
this.defaultLoader =
|
|
1154
|
+
setDefaultLoader(e) {
|
|
1155
|
+
this.defaultLoader = e;
|
|
1151
1156
|
}
|
|
1152
1157
|
detachMousewheelListener() {
|
|
1153
|
-
let
|
|
1154
|
-
this.props.useWindow === !1 && (
|
|
1158
|
+
let e = window;
|
|
1159
|
+
this.props.useWindow === !1 && (e = this.scrollComponent.parentNode), e.removeEventListener(
|
|
1155
1160
|
"mousewheel",
|
|
1156
1161
|
this.mousewheelListener,
|
|
1157
1162
|
this.options ? this.options : this.props.useCapture
|
|
1158
1163
|
);
|
|
1159
1164
|
}
|
|
1160
1165
|
detachScrollListener() {
|
|
1161
|
-
let
|
|
1162
|
-
this.props.useWindow === !1 && (
|
|
1166
|
+
let e = window;
|
|
1167
|
+
this.props.useWindow === !1 && (e = this.getParentElement(this.scrollComponent)), e.removeEventListener(
|
|
1163
1168
|
"scroll",
|
|
1164
1169
|
this.scrollListener,
|
|
1165
1170
|
this.options ? this.options : this.props.useCapture
|
|
1166
|
-
),
|
|
1171
|
+
), e.removeEventListener(
|
|
1167
1172
|
"resize",
|
|
1168
1173
|
this.scrollListener,
|
|
1169
1174
|
this.options ? this.options : this.props.useCapture
|
|
1170
1175
|
);
|
|
1171
1176
|
}
|
|
1172
|
-
getParentElement(
|
|
1177
|
+
getParentElement(e) {
|
|
1173
1178
|
const n = this.props.getScrollParent && this.props.getScrollParent();
|
|
1174
|
-
return n ?? (
|
|
1179
|
+
return n ?? (e && e.parentNode);
|
|
1175
1180
|
}
|
|
1176
|
-
filterProps(
|
|
1177
|
-
return
|
|
1181
|
+
filterProps(e) {
|
|
1182
|
+
return e;
|
|
1178
1183
|
}
|
|
1179
1184
|
attachScrollListener() {
|
|
1180
|
-
const
|
|
1181
|
-
if (!this.props.hasMore || !
|
|
1185
|
+
const e = this.getParentElement(this.scrollComponent);
|
|
1186
|
+
if (!this.props.hasMore || !e)
|
|
1182
1187
|
return;
|
|
1183
1188
|
let n = window;
|
|
1184
|
-
this.props.useWindow === !1 && (n =
|
|
1189
|
+
this.props.useWindow === !1 && (n = e), n.addEventListener(
|
|
1185
1190
|
"mousewheel",
|
|
1186
1191
|
this.mousewheelListener,
|
|
1187
1192
|
this.options ? this.options : this.props.useCapture
|
|
@@ -1195,27 +1200,27 @@ class ie extends tt {
|
|
|
1195
1200
|
this.options ? this.options : this.props.useCapture
|
|
1196
1201
|
), this.props.initialLoad && this.scrollListener();
|
|
1197
1202
|
}
|
|
1198
|
-
mousewheelListener(
|
|
1199
|
-
|
|
1203
|
+
mousewheelListener(e) {
|
|
1204
|
+
e.deltaY === 1 && !this.isPassiveSupported() && e.preventDefault();
|
|
1200
1205
|
}
|
|
1201
1206
|
scrollListener() {
|
|
1202
|
-
const
|
|
1207
|
+
const e = this.scrollComponent, n = window, o = this.getParentElement(e);
|
|
1203
1208
|
let i;
|
|
1204
1209
|
if (this.props.useWindow) {
|
|
1205
1210
|
const c = document.documentElement || document.body.parentNode || document.body, a = n.pageYOffset !== void 0 ? n.pageYOffset : c.scrollTop;
|
|
1206
|
-
this.props.isReverse ? i = a : i = this.calculateOffset(
|
|
1211
|
+
this.props.isReverse ? i = a : i = this.calculateOffset(e, a);
|
|
1207
1212
|
} else
|
|
1208
|
-
this.props.isReverse ? i = o.scrollTop : i =
|
|
1209
|
-
i < Number(this.props.threshold) &&
|
|
1213
|
+
this.props.isReverse ? i = o.scrollTop : i = e.scrollHeight - o.scrollTop - o.clientHeight;
|
|
1214
|
+
i < Number(this.props.threshold) && e && e.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = o.scrollHeight, this.beforeScrollTop = o.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
|
|
1210
1215
|
}
|
|
1211
|
-
calculateOffset(
|
|
1212
|
-
return
|
|
1216
|
+
calculateOffset(e, n) {
|
|
1217
|
+
return e ? this.calculateTopPosition(e) + (e.offsetHeight - n - window.innerHeight) : 0;
|
|
1213
1218
|
}
|
|
1214
|
-
calculateTopPosition(
|
|
1215
|
-
return
|
|
1219
|
+
calculateTopPosition(e) {
|
|
1220
|
+
return e ? e.offsetTop + this.calculateTopPosition(e.offsetParent) : 0;
|
|
1216
1221
|
}
|
|
1217
1222
|
render() {
|
|
1218
|
-
const
|
|
1223
|
+
const e = this.filterProps(this.props), {
|
|
1219
1224
|
children: n,
|
|
1220
1225
|
element: o,
|
|
1221
1226
|
hasMore: i,
|
|
@@ -1229,13 +1234,13 @@ class ie extends tt {
|
|
|
1229
1234
|
useCapture: m,
|
|
1230
1235
|
useWindow: I,
|
|
1231
1236
|
getScrollParent: $,
|
|
1232
|
-
...
|
|
1233
|
-
} =
|
|
1234
|
-
|
|
1237
|
+
...y
|
|
1238
|
+
} = e;
|
|
1239
|
+
y.ref = (C) => {
|
|
1235
1240
|
this.scrollComponent = C, h && h(C);
|
|
1236
1241
|
};
|
|
1237
1242
|
const g = [n];
|
|
1238
|
-
return i && (l ? a ? g.unshift(l) : g.push(l) : this.defaultLoader && (a ? g.unshift(this.defaultLoader) : g.push(this.defaultLoader))),
|
|
1243
|
+
return i && (l ? a ? g.unshift(l) : g.push(l) : this.defaultLoader && (a ? g.unshift(this.defaultLoader) : g.push(this.defaultLoader))), B.createElement(o, y, g);
|
|
1239
1244
|
}
|
|
1240
1245
|
}
|
|
1241
1246
|
ne(ie, "propTypes", {
|
|
@@ -1265,31 +1270,31 @@ ne(ie, "propTypes", {
|
|
|
1265
1270
|
loader: null,
|
|
1266
1271
|
getScrollParent: null
|
|
1267
1272
|
});
|
|
1268
|
-
const
|
|
1269
|
-
rank:
|
|
1270
|
-
avatar:
|
|
1273
|
+
const Vn = ({
|
|
1274
|
+
rank: t,
|
|
1275
|
+
avatar: e,
|
|
1271
1276
|
name: n,
|
|
1272
1277
|
points: o,
|
|
1273
1278
|
isCurrentUser: i,
|
|
1274
1279
|
openItemDetail: c,
|
|
1275
1280
|
style: a
|
|
1276
|
-
}) => /* @__PURE__ */ p(
|
|
1277
|
-
/* @__PURE__ */ s(
|
|
1278
|
-
/* @__PURE__ */ p(
|
|
1279
|
-
|
|
1280
|
-
/* @__PURE__ */ p(
|
|
1281
|
-
/* @__PURE__ */ s(
|
|
1282
|
-
i && /* @__PURE__ */ s(
|
|
1281
|
+
}) => /* @__PURE__ */ p($n, { onClick: c, style: a, children: [
|
|
1282
|
+
/* @__PURE__ */ s(bn, { children: t || 0 }),
|
|
1283
|
+
/* @__PURE__ */ p(Rn, { children: [
|
|
1284
|
+
e ? /* @__PURE__ */ s(wn, { alt: "leaderboard-item-avatar", src: e }) : /* @__PURE__ */ s(Tn, { children: Ce(n || "") }),
|
|
1285
|
+
/* @__PURE__ */ p(kn, { children: [
|
|
1286
|
+
/* @__PURE__ */ s(Sn, { children: n || "" }),
|
|
1287
|
+
i && /* @__PURE__ */ s(En, { name: "icon-star" })
|
|
1283
1288
|
] })
|
|
1284
1289
|
] }),
|
|
1285
1290
|
/* @__PURE__ */ s("div", { children: ge(o) })
|
|
1286
|
-
] }),
|
|
1291
|
+
] }), On = /* @__PURE__ */ r("div")({
|
|
1287
1292
|
name: "Container",
|
|
1288
1293
|
class: "c16btbfp",
|
|
1289
1294
|
propsAsIs: !1
|
|
1290
|
-
}),
|
|
1291
|
-
items:
|
|
1292
|
-
currentUserId:
|
|
1295
|
+
}), Mn = ({
|
|
1296
|
+
items: t,
|
|
1297
|
+
currentUserId: e,
|
|
1293
1298
|
openItemDetail: n,
|
|
1294
1299
|
fetchMore: o,
|
|
1295
1300
|
scrollNode: i,
|
|
@@ -1300,18 +1305,18 @@ const Dn = ({
|
|
|
1300
1305
|
hasMore: c,
|
|
1301
1306
|
useWindow: !1,
|
|
1302
1307
|
getScrollParent: () => i.current,
|
|
1303
|
-
children: /* @__PURE__ */ s(
|
|
1304
|
-
children:
|
|
1308
|
+
children: /* @__PURE__ */ s(On, {
|
|
1309
|
+
children: t.map((a) => /* @__PURE__ */ s(Vn, {
|
|
1305
1310
|
...a,
|
|
1306
1311
|
openItemDetail: () => n(a.userId),
|
|
1307
|
-
isCurrentUser: !!
|
|
1312
|
+
isCurrentUser: !!e && e === a.userId
|
|
1308
1313
|
}, a.userId))
|
|
1309
1314
|
})
|
|
1310
|
-
}),
|
|
1315
|
+
}), _n = ({ renderClipBoardNode: t, deepLink: e }) => /* @__PURE__ */ s(
|
|
1311
1316
|
We,
|
|
1312
1317
|
{
|
|
1313
|
-
renderToNode:
|
|
1314
|
-
inviteLink:
|
|
1318
|
+
renderToNode: t,
|
|
1319
|
+
inviteLink: e,
|
|
1315
1320
|
socialLinks: [
|
|
1316
1321
|
{
|
|
1317
1322
|
icon: "icon-facebook",
|
|
@@ -1327,13 +1332,13 @@ const Dn = ({
|
|
|
1327
1332
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
1328
1333
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1329
1334
|
}
|
|
1330
|
-
),
|
|
1335
|
+
), Qn = /* @__PURE__ */ r("div")({
|
|
1331
1336
|
name: "InviteLinkContainer",
|
|
1332
1337
|
class: "i1chxfpe",
|
|
1333
1338
|
propsAsIs: !1
|
|
1334
|
-
}),
|
|
1335
|
-
gamification:
|
|
1336
|
-
scrollNode:
|
|
1339
|
+
}), jn = ({
|
|
1340
|
+
gamification: t,
|
|
1341
|
+
scrollNode: e,
|
|
1337
1342
|
scrollStore: n,
|
|
1338
1343
|
renderClipBoardNode: o
|
|
1339
1344
|
}) => {
|
|
@@ -1342,147 +1347,147 @@ const Dn = ({
|
|
|
1342
1347
|
hasMore: c,
|
|
1343
1348
|
loading: a,
|
|
1344
1349
|
key: l
|
|
1345
|
-
} = q(
|
|
1350
|
+
} = q(t.leaderboardList.$store), {
|
|
1346
1351
|
data: d
|
|
1347
|
-
} = q(
|
|
1348
|
-
return !i.length && !a ? /* @__PURE__ */ s(
|
|
1352
|
+
} = q(t.deepLink.$store), [u, h] = Be(o);
|
|
1353
|
+
return !i.length && !a ? /* @__PURE__ */ s(_n, {
|
|
1349
1354
|
renderClipBoardNode: o,
|
|
1350
1355
|
deepLink: d
|
|
1351
1356
|
}) : /* @__PURE__ */ p(x, {
|
|
1352
|
-
children: [/* @__PURE__ */ s(
|
|
1357
|
+
children: [/* @__PURE__ */ s(Mn, {
|
|
1353
1358
|
items: i,
|
|
1354
|
-
scrollNode:
|
|
1359
|
+
scrollNode: e,
|
|
1355
1360
|
scrollStore: n,
|
|
1356
|
-
fetchMore:
|
|
1361
|
+
fetchMore: t.leaderboardList.fetchMore,
|
|
1357
1362
|
hasMore: c,
|
|
1358
|
-
openItemDetail:
|
|
1359
|
-
currentUserId:
|
|
1360
|
-
}, l), d && /* @__PURE__ */ s(
|
|
1361
|
-
children: /* @__PURE__ */ s(
|
|
1363
|
+
openItemDetail: t.openUser,
|
|
1364
|
+
currentUserId: t.currentUserId.get()
|
|
1365
|
+
}, l), d && /* @__PURE__ */ s(Qn, {
|
|
1366
|
+
children: /* @__PURE__ */ s(fn, {
|
|
1362
1367
|
onClick: () => u(d),
|
|
1363
1368
|
title: "Invite Friends",
|
|
1364
1369
|
description: "Challenge them now!"
|
|
1365
1370
|
})
|
|
1366
1371
|
}), h]
|
|
1367
1372
|
});
|
|
1368
|
-
},
|
|
1373
|
+
}, Un = /* @__PURE__ */ r("div")({
|
|
1369
1374
|
name: "QuestionItem",
|
|
1370
1375
|
class: "q1w97g3p",
|
|
1371
1376
|
propsAsIs: !1
|
|
1372
|
-
}),
|
|
1377
|
+
}), Wn = /* @__PURE__ */ r("div")({
|
|
1373
1378
|
name: "QuestionCaption",
|
|
1374
1379
|
class: "q2sl39u",
|
|
1375
1380
|
propsAsIs: !1
|
|
1376
|
-
}),
|
|
1381
|
+
}), Bn = /* @__PURE__ */ r("div")({
|
|
1377
1382
|
name: "QuestionBody",
|
|
1378
1383
|
class: "qd5h0uc",
|
|
1379
1384
|
propsAsIs: !1
|
|
1380
|
-
}),
|
|
1385
|
+
}), zn = /* @__PURE__ */ r("div")({
|
|
1381
1386
|
name: "QuestionAction",
|
|
1382
1387
|
class: "q105uluy",
|
|
1383
1388
|
propsAsIs: !1
|
|
1384
|
-
}),
|
|
1389
|
+
}), Fn = () => R, J = /* @__PURE__ */ r(Fn())({
|
|
1385
1390
|
name: "QuestionActionIcon",
|
|
1386
1391
|
class: "q1fa0b9h",
|
|
1387
1392
|
propsAsIs: !0
|
|
1388
|
-
}),
|
|
1393
|
+
}), Hn = () => R, Yn = /* @__PURE__ */ r(Hn())({
|
|
1389
1394
|
name: "QuestionTypeIcon",
|
|
1390
1395
|
class: "qxlt78s",
|
|
1391
1396
|
propsAsIs: !0
|
|
1392
|
-
}),
|
|
1397
|
+
}), Zn = /* @__PURE__ */ r("div")({
|
|
1393
1398
|
name: "QuestionTypeLabel",
|
|
1394
1399
|
class: "qmg0vkx",
|
|
1395
1400
|
propsAsIs: !1
|
|
1396
|
-
}),
|
|
1401
|
+
}), Gn = /* @__PURE__ */ r("div")({
|
|
1397
1402
|
name: "QuestionContent",
|
|
1398
1403
|
class: "q1uz5j1g",
|
|
1399
1404
|
propsAsIs: !1
|
|
1400
|
-
}),
|
|
1405
|
+
}), Jn = /* @__PURE__ */ r("button")({
|
|
1401
1406
|
name: "PlayButton",
|
|
1402
1407
|
class: "p1pba9p1",
|
|
1403
1408
|
propsAsIs: !1
|
|
1404
|
-
}),
|
|
1409
|
+
}), Kn = {
|
|
1405
1410
|
[Y.LOST]: /* @__PURE__ */ s(J, { name: "incorrectVoted" }),
|
|
1406
1411
|
[Y.WON]: /* @__PURE__ */ s(J, { name: "icon-check" }),
|
|
1407
1412
|
[Y.UNSET]: /* @__PURE__ */ s(J, { name: "icon-arrow" }),
|
|
1408
1413
|
[Y.DNP]: /* @__PURE__ */ s(J, { name: "icon-arrow" })
|
|
1409
|
-
},
|
|
1410
|
-
questionId:
|
|
1411
|
-
questionType:
|
|
1414
|
+
}, Xn = ({
|
|
1415
|
+
questionId: t,
|
|
1416
|
+
questionType: e,
|
|
1412
1417
|
questionStatus: n,
|
|
1413
1418
|
subject: o,
|
|
1414
1419
|
openForVoting: i,
|
|
1415
1420
|
openQuestion: c,
|
|
1416
1421
|
status: a
|
|
1417
1422
|
}) => {
|
|
1418
|
-
const l = Ie[
|
|
1419
|
-
return l ? /* @__PURE__ */ p(
|
|
1420
|
-
/* @__PURE__ */ p(
|
|
1421
|
-
/* @__PURE__ */ p(
|
|
1423
|
+
const l = Ie[e], d = Kn[a];
|
|
1424
|
+
return l ? /* @__PURE__ */ p(Un, { onClick: () => c == null ? void 0 : c(t), children: [
|
|
1425
|
+
/* @__PURE__ */ p(Gn, { children: [
|
|
1426
|
+
/* @__PURE__ */ p(Wn, { children: [
|
|
1422
1427
|
/* @__PURE__ */ s(
|
|
1423
|
-
|
|
1428
|
+
Yn,
|
|
1424
1429
|
{
|
|
1425
|
-
"data-type-trivia":
|
|
1426
|
-
"data-type-poll":
|
|
1430
|
+
"data-type-trivia": e === f.TRIVIA,
|
|
1431
|
+
"data-type-poll": e === f.POLL,
|
|
1427
1432
|
name: l.iconName
|
|
1428
1433
|
}
|
|
1429
1434
|
),
|
|
1430
|
-
/* @__PURE__ */ p(
|
|
1435
|
+
/* @__PURE__ */ p(Zn, { children: [
|
|
1431
1436
|
l.label,
|
|
1432
|
-
|
|
1437
|
+
e === f.TRIVIA && n === M.RESOLVED && " • Expired"
|
|
1433
1438
|
] })
|
|
1434
1439
|
] }),
|
|
1435
|
-
/* @__PURE__ */ s(
|
|
1440
|
+
/* @__PURE__ */ s(Bn, { children: o || "" })
|
|
1436
1441
|
] }),
|
|
1437
|
-
/* @__PURE__ */ s(
|
|
1442
|
+
/* @__PURE__ */ s(zn, { children: i ? /* @__PURE__ */ s(Jn, { children: "Play" }) : d })
|
|
1438
1443
|
] }) : null;
|
|
1439
|
-
},
|
|
1444
|
+
}, eo = /* @__PURE__ */ r("div")({
|
|
1440
1445
|
name: "Container",
|
|
1441
1446
|
class: "cll3md7",
|
|
1442
1447
|
propsAsIs: !1
|
|
1443
|
-
}),
|
|
1448
|
+
}), to = /* @__PURE__ */ r("button")({
|
|
1444
1449
|
name: "ActionBtn",
|
|
1445
1450
|
class: "a10g1iik",
|
|
1446
1451
|
propsAsIs: !1
|
|
1447
|
-
}),
|
|
1448
|
-
/* @__PURE__ */ s(Ee, { questionId:
|
|
1449
|
-
|
|
1450
|
-
] }),
|
|
1452
|
+
}), so = ({ openInsight: t, questionId: e, ...n }) => /* @__PURE__ */ p(eo, { children: [
|
|
1453
|
+
/* @__PURE__ */ s(Ee, { questionId: e, ...n }),
|
|
1454
|
+
t && /* @__PURE__ */ s(to, { onClick: () => t(e), children: "View Insight" })
|
|
1455
|
+
] }), no = /* @__PURE__ */ r("div")({
|
|
1451
1456
|
name: "Container",
|
|
1452
1457
|
class: "cl56x6b",
|
|
1453
1458
|
propsAsIs: !1
|
|
1454
|
-
}),
|
|
1459
|
+
}), oo = () => ze, io = /* @__PURE__ */ r(oo())({
|
|
1455
1460
|
name: "ActionButton",
|
|
1456
1461
|
class: "a11pzf92",
|
|
1457
1462
|
propsAsIs: !0
|
|
1458
|
-
}),
|
|
1463
|
+
}), ro = /* @__PURE__ */ r("blockquote")({
|
|
1459
1464
|
name: "Quote",
|
|
1460
1465
|
class: "q1hbaleq",
|
|
1461
1466
|
propsAsIs: !1
|
|
1462
|
-
}),
|
|
1463
|
-
|
|
1464
|
-
/* @__PURE__ */ s(
|
|
1465
|
-
|
|
1466
|
-
] }),
|
|
1467
|
+
}), ao = ({ openTweet: t, ...e }) => /* @__PURE__ */ p(no, { children: [
|
|
1468
|
+
e.title && /* @__PURE__ */ s(ro, { children: e.title }),
|
|
1469
|
+
/* @__PURE__ */ s(ye, { ...e }),
|
|
1470
|
+
t && /* @__PURE__ */ s(io, { onClick: () => t(e.tweetId), children: "View Insight" })
|
|
1471
|
+
] }), lo = /* @__PURE__ */ r("div")({
|
|
1467
1472
|
name: "QuestionsContainer",
|
|
1468
1473
|
class: "qvghv3l",
|
|
1469
1474
|
propsAsIs: !1
|
|
1470
|
-
}),
|
|
1475
|
+
}), co = ({ questions: t, openQuestion: e, controlVideo: n }) => /* @__PURE__ */ s(lo, { children: t == null ? void 0 : t.map((o) => {
|
|
1471
1476
|
var i, c, a;
|
|
1472
1477
|
if (o.type === "question" && ((i = o.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1473
1478
|
const l = o.attributes.attributes.value;
|
|
1474
|
-
return /* @__PURE__ */ s(
|
|
1479
|
+
return /* @__PURE__ */ s(Xn, { openQuestion: e, ...l }, l.questionId);
|
|
1475
1480
|
}
|
|
1476
1481
|
if (o.type === "insight" && ((c = o.attributes) == null ? void 0 : c.attributes.case) === "insight") {
|
|
1477
1482
|
const l = o.attributes.attributes.value;
|
|
1478
|
-
return /* @__PURE__ */ s(
|
|
1483
|
+
return /* @__PURE__ */ s(so, { openInsight: e, controlVideo: n, ...l }, l.questionId);
|
|
1479
1484
|
}
|
|
1480
1485
|
if (o.type === "tweet" && ((a = o.attributes) == null ? void 0 : a.attributes.case) === "tweet") {
|
|
1481
1486
|
const l = o.attributes.attributes.value, d = o.attributes.id;
|
|
1482
1487
|
return /* @__PURE__ */ s(
|
|
1483
|
-
|
|
1488
|
+
ao,
|
|
1484
1489
|
{
|
|
1485
|
-
openTweet:
|
|
1490
|
+
openTweet: e,
|
|
1486
1491
|
controlVideo: n,
|
|
1487
1492
|
...l,
|
|
1488
1493
|
tweetId: d
|
|
@@ -1491,21 +1496,21 @@ const Dn = ({
|
|
|
1491
1496
|
);
|
|
1492
1497
|
}
|
|
1493
1498
|
return null;
|
|
1494
|
-
}) }),
|
|
1495
|
-
const { sdk: n } = $e(), o = q(
|
|
1496
|
-
return o != null && o.data ? /* @__PURE__ */ s(
|
|
1497
|
-
},
|
|
1498
|
-
var
|
|
1499
|
+
}) }), po = ({ store: t, openQuestion: e }) => {
|
|
1500
|
+
const { sdk: n } = $e(), o = q(t);
|
|
1501
|
+
return o != null && o.data ? /* @__PURE__ */ s(co, { openQuestion: e, questions: o.data, controlVideo: n == null ? void 0 : n.controlVideoPlayer }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1502
|
+
}, uo = ({ userSummary: t }) => {
|
|
1503
|
+
var e;
|
|
1499
1504
|
const [n, o] = P(void 0);
|
|
1500
1505
|
return X(() => {
|
|
1501
|
-
const i =
|
|
1506
|
+
const i = t.subscribe((c) => {
|
|
1502
1507
|
c != null && c.data && o(c.data);
|
|
1503
1508
|
});
|
|
1504
1509
|
return () => {
|
|
1505
1510
|
i();
|
|
1506
1511
|
};
|
|
1507
|
-
}, [
|
|
1508
|
-
},
|
|
1512
|
+
}, [t]), n != null && n.summary ? /* @__PURE__ */ s(Re, { ...n.summary, successRate: (e = n.percentage) == null ? void 0 : e.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1513
|
+
}, ho = ({ gamification: t, className: e, scrollStore: n, scrollNode: o, appNode: i, style: c, responsiveStore: a, headerNode: l }) => {
|
|
1509
1514
|
const { tabsShown: d } = q(n, { keys: ["tabsShown"] }), [u, h] = P(K.HOME), [, v] = st(), { sdkInDesktopView: m } = q(a, { keys: ["sdkInDesktopView"] }), I = (g) => {
|
|
1510
1515
|
v(() => {
|
|
1511
1516
|
var C;
|
|
@@ -1521,55 +1526,55 @@ const Dn = ({
|
|
|
1521
1526
|
}), [n, a]);
|
|
1522
1527
|
let $ = "0px";
|
|
1523
1528
|
m ? $ = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : $ = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px";
|
|
1524
|
-
const
|
|
1525
|
-
return /* @__PURE__ */ p(Fe, { className:
|
|
1529
|
+
const y = m ? i : l;
|
|
1530
|
+
return /* @__PURE__ */ p(Fe, { className: e, style: c, children: [
|
|
1526
1531
|
/* @__PURE__ */ s(
|
|
1527
1532
|
He,
|
|
1528
1533
|
{
|
|
1529
1534
|
style: {
|
|
1530
1535
|
top: $
|
|
1531
1536
|
},
|
|
1532
|
-
children: /* @__PURE__ */ s(
|
|
1537
|
+
children: /* @__PURE__ */ s(an, { activePage: u, toggleActivePage: I })
|
|
1533
1538
|
}
|
|
1534
1539
|
),
|
|
1535
1540
|
u === K.HOME && /* @__PURE__ */ p(x, { children: [
|
|
1536
|
-
/* @__PURE__ */ s(be, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(Ye, { children: /* @__PURE__ */ s(
|
|
1537
|
-
/* @__PURE__ */ s(Ze, { style: { flex: 1 }, children: /* @__PURE__ */ s(
|
|
1541
|
+
/* @__PURE__ */ s(be, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(Ye, { children: /* @__PURE__ */ s(uo, { userSummary: t.userSummary }) }) }),
|
|
1542
|
+
/* @__PURE__ */ s(Ze, { style: { flex: 1 }, children: /* @__PURE__ */ s(po, { openQuestion: t.openQuestion, store: t.feedList.getStore() }) })
|
|
1538
1543
|
] }),
|
|
1539
1544
|
u === K.LEADERBOARD && /* @__PURE__ */ s(Ge, { children: /* @__PURE__ */ s(
|
|
1540
|
-
|
|
1545
|
+
jn,
|
|
1541
1546
|
{
|
|
1542
|
-
renderClipBoardNode:
|
|
1547
|
+
renderClipBoardNode: y,
|
|
1543
1548
|
scrollStore: n,
|
|
1544
1549
|
scrollNode: o,
|
|
1545
|
-
gamification:
|
|
1550
|
+
gamification: t
|
|
1546
1551
|
}
|
|
1547
1552
|
) })
|
|
1548
1553
|
] });
|
|
1549
|
-
},
|
|
1554
|
+
}, mo = () => Xe, fe = /* @__PURE__ */ r(mo())({
|
|
1550
1555
|
name: "OpenedContainer",
|
|
1551
1556
|
class: "oar61gl",
|
|
1552
1557
|
propsAsIs: !0
|
|
1553
|
-
}),
|
|
1558
|
+
}), vo = /* @__PURE__ */ r("div")({
|
|
1554
1559
|
name: "UserContainer",
|
|
1555
1560
|
class: "u14zaal4",
|
|
1556
1561
|
propsAsIs: !1
|
|
1557
|
-
}),
|
|
1558
|
-
correct:
|
|
1559
|
-
incorrect:
|
|
1562
|
+
}), fo = ({
|
|
1563
|
+
correct: t,
|
|
1564
|
+
incorrect: e
|
|
1560
1565
|
}) => {
|
|
1561
|
-
const n =
|
|
1562
|
-
return n === 0 ? 0 : Math.round(
|
|
1566
|
+
const n = t + e;
|
|
1567
|
+
return n === 0 ? 0 : Math.round(t / n * 100);
|
|
1563
1568
|
}, yo = ({
|
|
1564
|
-
gamification:
|
|
1565
|
-
scrollStore:
|
|
1569
|
+
gamification: t,
|
|
1570
|
+
scrollStore: e,
|
|
1566
1571
|
className: n,
|
|
1567
1572
|
appNode: o,
|
|
1568
1573
|
scrollNode: i,
|
|
1569
1574
|
headerNode: c,
|
|
1570
1575
|
responsiveStore: a
|
|
1571
1576
|
}) => {
|
|
1572
|
-
const l = q(
|
|
1577
|
+
const l = q(t.openedQuestion.$store), d = q(t.openedUser), {
|
|
1573
1578
|
sdkInDesktopView: u
|
|
1574
1579
|
} = q(a, {
|
|
1575
1580
|
keys: ["sdkInDesktopView"]
|
|
@@ -1580,19 +1585,19 @@ const Dn = ({
|
|
|
1580
1585
|
return null;
|
|
1581
1586
|
const I = l ? /* @__PURE__ */ s(fe, {
|
|
1582
1587
|
className: n,
|
|
1583
|
-
children: /* @__PURE__ */ s(
|
|
1584
|
-
gamification:
|
|
1588
|
+
children: /* @__PURE__ */ s(tn, {
|
|
1589
|
+
gamification: t
|
|
1585
1590
|
})
|
|
1586
1591
|
}) : d ? /* @__PURE__ */ s(fe, {
|
|
1587
1592
|
className: n,
|
|
1588
|
-
children: /* @__PURE__ */ p(
|
|
1593
|
+
children: /* @__PURE__ */ p(vo, {
|
|
1589
1594
|
children: [/* @__PURE__ */ s(Te, {
|
|
1590
1595
|
label: "Friend's Rank",
|
|
1591
|
-
close:
|
|
1596
|
+
close: t.closeUser
|
|
1592
1597
|
}), /* @__PURE__ */ s(be, {
|
|
1593
1598
|
children: /* @__PURE__ */ s(Re, {
|
|
1594
1599
|
...d,
|
|
1595
|
-
successRate:
|
|
1600
|
+
successRate: fo(d)
|
|
1596
1601
|
})
|
|
1597
1602
|
})]
|
|
1598
1603
|
})
|
|
@@ -1603,15 +1608,15 @@ const Dn = ({
|
|
|
1603
1608
|
fixedView: m,
|
|
1604
1609
|
children: I
|
|
1605
1610
|
});
|
|
1606
|
-
}, [o, n,
|
|
1611
|
+
}, [o, n, t, l, d, u]);
|
|
1607
1612
|
return /* @__PURE__ */ p(x, {
|
|
1608
|
-
children: [h, /* @__PURE__ */ s(
|
|
1613
|
+
children: [h, /* @__PURE__ */ s(ho, {
|
|
1609
1614
|
appNode: o,
|
|
1610
1615
|
headerNode: c,
|
|
1611
|
-
scrollStore:
|
|
1616
|
+
scrollStore: e,
|
|
1612
1617
|
scrollNode: i,
|
|
1613
1618
|
className: n,
|
|
1614
|
-
gamification:
|
|
1619
|
+
gamification: t,
|
|
1615
1620
|
responsiveStore: a
|
|
1616
1621
|
})]
|
|
1617
1622
|
});
|