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