@streamlayer/react 0.37.0 → 0.37.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/app.js +1 -1
- package/lib/cjs/gamification-feature.js +2 -2
- package/lib/cjs/index2.js +13 -3
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +30 -30
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useSdkFeature.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +2 -2
- package/lib/dist/cjs/masters.js +76 -65
- package/lib/dist/es/gamification-feature.js +611 -610
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +22672 -20022
- package/lib/dist/index.d.ts +55 -55
- package/lib/dist/style.css +1 -1
- package/lib/es/app.js +5 -5
- package/lib/es/gamification-feature.js +614 -614
- package/lib/es/index2.js +59 -24
- package/lib/es/masters.js +4 -3
- package/lib/es/masters2.js +5728 -5677
- package/lib/es/points.js +21 -22
- package/lib/es/useSdkFeature.js +112 -97
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +14 -14
- package/lib/cjs/index3.js +0 -1
- package/lib/es/index3.js +0 -19
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsxs as p, jsx as n, Fragment as
|
|
5
|
-
import { s as
|
|
6
|
-
import W, {
|
|
7
|
-
const
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var We = (e, t, s) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var ne = (e, t, s) => (We(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
import { jsxs as p, jsx as n, Fragment as P } from "react/jsx-runtime";
|
|
5
|
+
import { s as o, c as R, Q as f, o as ye, a as _, b as Be, d as F, e as $e, E as Q, w as ze, j as be, u as O, g as Fe, f as He, K as Ye, P as Z, h as Ze, p as Ge, C as Ke, n as we, m as Je, i as Xe, l as et, D as Te, Y as pe, k as tt } from "./masters.js";
|
|
6
|
+
import W, { useState as q, useLayoutEffect as Re, useRef as V, useCallback as B, useEffect as Y, useMemo as x, PureComponent as st, Component as nt, useTransition as rt } from "react";
|
|
7
|
+
const it = /* @__PURE__ */ o("div")({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c1vwopgc",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), ot = /* @__PURE__ */ o("div")({
|
|
12
12
|
name: "QuestionTypeWrap",
|
|
13
13
|
class: "qyktpt0",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), at = () => R, lt = /* @__PURE__ */ o(at())({
|
|
16
16
|
name: "QuestionTypeIcon",
|
|
17
17
|
class: "q951jdx",
|
|
18
18
|
propsAsIs: !0
|
|
19
|
-
}),
|
|
19
|
+
}), ct = /* @__PURE__ */ o("span")({
|
|
20
20
|
name: "QuestionTypeTitle",
|
|
21
21
|
class: "qss5f0e",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
24
|
-
name: "
|
|
23
|
+
}), dt = /* @__PURE__ */ o("div")({
|
|
24
|
+
name: "CloseIconWrap",
|
|
25
25
|
class: "c1ao1jtv",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
27
|
+
}), pt = () => R, ut = /* @__PURE__ */ o(pt())({
|
|
28
28
|
name: "CloseIcon",
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
31
|
-
}),
|
|
32
|
-
const r = e ?
|
|
33
|
-
return /* @__PURE__ */ p(
|
|
34
|
-
/* @__PURE__ */ p(
|
|
31
|
+
}), Se = ({ type: e, close: t, label: s }) => {
|
|
32
|
+
const r = e ? ye[e] : { label: s, iconName: void 0 };
|
|
33
|
+
return /* @__PURE__ */ p(it, { children: [
|
|
34
|
+
/* @__PURE__ */ p(ot, { children: [
|
|
35
35
|
(r == null ? void 0 : r.iconName) && /* @__PURE__ */ n(
|
|
36
|
-
|
|
36
|
+
lt,
|
|
37
37
|
{
|
|
38
|
-
"data-type-trivia": e ===
|
|
39
|
-
"data-type-poll": e ===
|
|
38
|
+
"data-type-trivia": e === f.TRIVIA,
|
|
39
|
+
"data-type-poll": e === f.POLL,
|
|
40
40
|
name: r.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
(r == null ? void 0 : r.label) && /* @__PURE__ */ n(
|
|
43
|
+
(r == null ? void 0 : r.label) && /* @__PURE__ */ n(ct, { children: r.label })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */ n(
|
|
45
|
+
/* @__PURE__ */ n(dt, { onClick: t, children: /* @__PURE__ */ n(ut, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
|
-
},
|
|
47
|
+
}, ke = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Le = (e) => e ? e.toLocaleString("en-US") : "0", oe = (e) => e.toLocaleDateString("en-US", {
|
|
48
48
|
weekday: "short",
|
|
49
49
|
month: "short",
|
|
50
50
|
day: "numeric"
|
|
51
|
-
}),
|
|
51
|
+
}), ae = (e) => e.toLocaleTimeString("en-US", {
|
|
52
52
|
hour: "2-digit",
|
|
53
53
|
minute: "2-digit"
|
|
54
|
-
}),
|
|
54
|
+
}), le = (e) => !isNaN(e.getTime()), ht = /* @__PURE__ */ o("div")({
|
|
55
55
|
name: "Container",
|
|
56
56
|
class: "c1zy8a",
|
|
57
57
|
propsAsIs: !1
|
|
58
|
-
}),
|
|
58
|
+
}), mt = /* @__PURE__ */ o("div")({
|
|
59
59
|
name: "Title",
|
|
60
60
|
class: "t1vih9p5",
|
|
61
61
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
62
|
+
}), vt = /* @__PURE__ */ o("div")({
|
|
63
63
|
name: "Indicator",
|
|
64
64
|
class: "i1fbnvpb",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */ n(
|
|
68
|
-
/* @__PURE__ */ n(
|
|
69
|
-
] }),
|
|
66
|
+
}), ue = ({ indicator: e, title: t }) => /* @__PURE__ */ p(ht, { children: [
|
|
67
|
+
/* @__PURE__ */ n(mt, { children: t }),
|
|
68
|
+
/* @__PURE__ */ n(vt, { children: e })
|
|
69
|
+
] }), ft = /* @__PURE__ */ o("div")({
|
|
70
70
|
name: "Container",
|
|
71
71
|
class: "ctmhwyc",
|
|
72
72
|
propsAsIs: !1
|
|
73
|
-
}),
|
|
73
|
+
}), It = /* @__PURE__ */ o("div")({
|
|
74
74
|
name: "Indicator",
|
|
75
75
|
class: "i1jri200",
|
|
76
76
|
propsAsIs: !1
|
|
77
|
-
}),
|
|
77
|
+
}), Ct = /* @__PURE__ */ o("div")({
|
|
78
78
|
name: "Title",
|
|
79
79
|
class: "t8s05oq",
|
|
80
80
|
propsAsIs: !1
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ n(
|
|
83
|
-
/* @__PURE__ */ n(
|
|
84
|
-
] }),
|
|
81
|
+
}), G = ({ indicator: e, title: t }) => /* @__PURE__ */ p(ft, { children: [
|
|
82
|
+
/* @__PURE__ */ n(It, { children: e }),
|
|
83
|
+
/* @__PURE__ */ n(Ct, { children: t })
|
|
84
|
+
] }), gt = /* @__PURE__ */ o("div")({
|
|
85
85
|
name: "Container",
|
|
86
86
|
class: "c1yrpn9o",
|
|
87
87
|
propsAsIs: !1
|
|
88
|
-
}),
|
|
88
|
+
}), At = /* @__PURE__ */ o("div")({
|
|
89
89
|
name: "TopInfo",
|
|
90
90
|
class: "t17fwahh",
|
|
91
91
|
propsAsIs: !1
|
|
92
|
-
}),
|
|
92
|
+
}), yt = /* @__PURE__ */ o("div")({
|
|
93
93
|
name: "BottomInfo",
|
|
94
94
|
class: "by6w7e9",
|
|
95
95
|
propsAsIs: !1
|
|
96
|
-
}),
|
|
96
|
+
}), $t = /* @__PURE__ */ o("div")({
|
|
97
97
|
name: "User",
|
|
98
98
|
class: "u1g7arbm",
|
|
99
99
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
100
|
+
}), bt = /* @__PURE__ */ o("img")({
|
|
101
101
|
name: "Avatar",
|
|
102
102
|
class: "a1ldeata",
|
|
103
103
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
104
|
+
}), wt = /* @__PURE__ */ o("div")({
|
|
105
105
|
name: "UserInfo",
|
|
106
106
|
class: "u10d4koz",
|
|
107
107
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
108
|
+
}), Tt = /* @__PURE__ */ o("div")({
|
|
109
109
|
name: "UserName",
|
|
110
110
|
class: "u1q6roj0",
|
|
111
111
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
112
|
+
}), Rt = /* @__PURE__ */ o("div")({
|
|
113
113
|
name: "UserRating",
|
|
114
114
|
class: "ui0m425",
|
|
115
115
|
propsAsIs: !1
|
|
116
|
-
}),
|
|
116
|
+
}), St = /* @__PURE__ */ o("img")({
|
|
117
117
|
name: "TrophyIcon",
|
|
118
118
|
class: "t1el3mrn",
|
|
119
119
|
propsAsIs: !1
|
|
120
|
-
}),
|
|
120
|
+
}), kt = /* @__PURE__ */ o("div")({
|
|
121
121
|
name: "Rts",
|
|
122
122
|
class: "r2vgnxv",
|
|
123
123
|
propsAsIs: !1
|
|
124
|
-
}),
|
|
124
|
+
}), Lt = /* @__PURE__ */ o("div")({
|
|
125
125
|
name: "RtsIndicator",
|
|
126
126
|
class: "roqn06j",
|
|
127
127
|
propsAsIs: !1
|
|
128
|
-
}),
|
|
128
|
+
}), Et = /* @__PURE__ */ o("div")({
|
|
129
129
|
name: "RtsLabel",
|
|
130
130
|
class: "r15adx7c",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}),
|
|
132
|
+
}), xt = /* @__PURE__ */ o("div")({
|
|
133
133
|
name: "Divider",
|
|
134
134
|
class: "dv59lta",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}),
|
|
136
|
+
}), Pt = /* @__PURE__ */ o("div")({
|
|
137
137
|
name: "Ranks",
|
|
138
138
|
class: "r55lotb",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}),
|
|
140
|
+
}), qt = /* @__PURE__ */ o("div")({
|
|
141
141
|
name: "Statistics",
|
|
142
142
|
class: "s1knfgqt",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}),
|
|
144
|
+
}), Nt = /* @__PURE__ */ o("div")({
|
|
145
145
|
name: "AvatarPlaceholder",
|
|
146
146
|
class: "a1mqo824",
|
|
147
147
|
propsAsIs: !1
|
|
148
|
-
}),
|
|
148
|
+
}), Dt = /* @__PURE__ */ o("button")({
|
|
149
149
|
name: "UserAccountBtn",
|
|
150
150
|
class: "uxareh6",
|
|
151
151
|
propsAsIs: !1
|
|
152
|
-
}),
|
|
152
|
+
}), Ot = "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", Ee = ({
|
|
153
153
|
avatar: e,
|
|
154
154
|
name: t,
|
|
155
155
|
points: s,
|
|
156
156
|
friendsRank: r,
|
|
157
|
-
rank:
|
|
157
|
+
rank: i,
|
|
158
158
|
streak: l,
|
|
159
159
|
correct: a,
|
|
160
160
|
incorrect: c,
|
|
161
161
|
inTop: d,
|
|
162
162
|
successRate: u
|
|
163
|
-
}) => /* @__PURE__ */ p(
|
|
164
|
-
/* @__PURE__ */ n(
|
|
165
|
-
/* @__PURE__ */ p(
|
|
166
|
-
e && /* @__PURE__ */ n(
|
|
167
|
-
!e && /* @__PURE__ */ n(
|
|
163
|
+
}) => /* @__PURE__ */ p(gt, { children: [
|
|
164
|
+
/* @__PURE__ */ n(At, { children: /* @__PURE__ */ p($t, { children: [
|
|
165
|
+
/* @__PURE__ */ p(Dt, { children: [
|
|
166
|
+
e && /* @__PURE__ */ n(bt, { alt: "avatar", src: e }),
|
|
167
|
+
!e && /* @__PURE__ */ n(Nt, { children: ke(t || "") })
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */ p(
|
|
170
|
-
/* @__PURE__ */ n(
|
|
171
|
-
/* @__PURE__ */ p(
|
|
172
|
-
/* @__PURE__ */ p(
|
|
173
|
-
/* @__PURE__ */ n(
|
|
174
|
-
/* @__PURE__ */ p(
|
|
175
|
-
|
|
176
|
-
/* @__PURE__ */ n(
|
|
169
|
+
/* @__PURE__ */ p(wt, { children: [
|
|
170
|
+
/* @__PURE__ */ n(Tt, { children: t }),
|
|
171
|
+
/* @__PURE__ */ p(Rt, { children: [
|
|
172
|
+
/* @__PURE__ */ p(kt, { children: [
|
|
173
|
+
/* @__PURE__ */ n(St, { alt: "rank-icon", src: Ot }),
|
|
174
|
+
/* @__PURE__ */ p(Lt, { children: [
|
|
175
|
+
Le(s),
|
|
176
|
+
/* @__PURE__ */ n(Et, { children: "PTS" })
|
|
177
177
|
] })
|
|
178
178
|
] }),
|
|
179
|
-
/* @__PURE__ */ n(
|
|
179
|
+
/* @__PURE__ */ n(xt, {}),
|
|
180
180
|
/* @__PURE__ */ p("div", { children: [
|
|
181
181
|
"TOP ",
|
|
182
182
|
d || 0,
|
|
@@ -185,80 +185,80 @@ const st = /* @__PURE__ */ i("div")({
|
|
|
185
185
|
] })
|
|
186
186
|
] })
|
|
187
187
|
] }) }),
|
|
188
|
-
/* @__PURE__ */ p(
|
|
189
|
-
/* @__PURE__ */ p(
|
|
190
|
-
/* @__PURE__ */ n(
|
|
191
|
-
/* @__PURE__ */ n(
|
|
188
|
+
/* @__PURE__ */ p(yt, { children: [
|
|
189
|
+
/* @__PURE__ */ p(Pt, { children: [
|
|
190
|
+
/* @__PURE__ */ n(ue, { indicator: r || 0, title: "Friends rank" }),
|
|
191
|
+
/* @__PURE__ */ n(ue, { indicator: i || 0, title: "Global rank" })
|
|
192
192
|
] }),
|
|
193
|
-
/* @__PURE__ */ p(
|
|
194
|
-
/* @__PURE__ */ n(
|
|
195
|
-
/* @__PURE__ */ n(
|
|
196
|
-
/* @__PURE__ */ n(
|
|
197
|
-
/* @__PURE__ */ n(
|
|
193
|
+
/* @__PURE__ */ p(qt, { children: [
|
|
194
|
+
/* @__PURE__ */ n(G, { indicator: l || 0, title: "Win streak" }),
|
|
195
|
+
/* @__PURE__ */ n(G, { indicator: a || 0, title: "Correct" }),
|
|
196
|
+
/* @__PURE__ */ n(G, { indicator: c || 0, title: "Incorrect" }),
|
|
197
|
+
/* @__PURE__ */ n(G, { indicator: `${u || 0}%`, title: "Succ. rate" })
|
|
198
198
|
] })
|
|
199
199
|
] })
|
|
200
|
-
] }),
|
|
200
|
+
] }), Mt = /* @__PURE__ */ o("div")({
|
|
201
201
|
name: "SponsorLogoWrap",
|
|
202
202
|
class: "s8p5v5z",
|
|
203
203
|
propsAsIs: !1
|
|
204
|
-
}),
|
|
204
|
+
}), Vt = () => R, _t = /* @__PURE__ */ o(Vt())({
|
|
205
205
|
name: "SponsorLogo",
|
|
206
206
|
class: "s755yti",
|
|
207
207
|
propsAsIs: !0
|
|
208
|
-
}),
|
|
209
|
-
children: /* @__PURE__ */ n(
|
|
208
|
+
}), Qt = () => /* @__PURE__ */ n(Mt, {
|
|
209
|
+
children: /* @__PURE__ */ n(_t, {
|
|
210
210
|
name: "mastersLogo"
|
|
211
211
|
})
|
|
212
|
-
}),
|
|
212
|
+
}), Ut = /* @__PURE__ */ o("div")({
|
|
213
213
|
name: "Container",
|
|
214
214
|
class: "c38csyt",
|
|
215
215
|
propsAsIs: !1
|
|
216
|
-
}),
|
|
216
|
+
}), jt = /* @__PURE__ */ o("div")({
|
|
217
217
|
name: "Title",
|
|
218
218
|
class: "ty221rx",
|
|
219
219
|
propsAsIs: !1
|
|
220
|
-
}),
|
|
220
|
+
}), Wt = /* @__PURE__ */ o("div")({
|
|
221
221
|
name: "Description",
|
|
222
222
|
class: "dlaj9xp",
|
|
223
223
|
propsAsIs: !1
|
|
224
|
-
}),
|
|
224
|
+
}), Bt = ({ title: e, description: t }) => /* @__PURE__ */ p(Ut, { children: [
|
|
225
225
|
/* @__PURE__ */ n(R, { name: "icon-check-circle" }),
|
|
226
|
-
/* @__PURE__ */ n(
|
|
227
|
-
/* @__PURE__ */ n(
|
|
228
|
-
] }),
|
|
226
|
+
/* @__PURE__ */ n(jt, { children: e }),
|
|
227
|
+
/* @__PURE__ */ n(Wt, { children: t })
|
|
228
|
+
] }), zt = /* @__PURE__ */ o("div")({
|
|
229
229
|
name: "Container",
|
|
230
230
|
class: "c16sbdnm",
|
|
231
231
|
propsAsIs: !1
|
|
232
|
-
}),
|
|
232
|
+
}), Ft = () => R, Ht = /* @__PURE__ */ o(Ft())({
|
|
233
233
|
name: "IconPrediction",
|
|
234
234
|
class: "ibhorgl",
|
|
235
235
|
propsAsIs: !0
|
|
236
|
-
}), H = /* @__PURE__ */
|
|
236
|
+
}), H = /* @__PURE__ */ o("div")({
|
|
237
237
|
name: "FeedbackIconWrap",
|
|
238
238
|
class: "f1g20ja7",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}),
|
|
240
|
+
}), K = /* @__PURE__ */ o("div")({
|
|
241
241
|
name: "FeedbackHeader",
|
|
242
242
|
class: "f455ozj",
|
|
243
243
|
propsAsIs: !1
|
|
244
|
-
}),
|
|
244
|
+
}), Yt = /* @__PURE__ */ o("span")({
|
|
245
245
|
name: "FeedbackTitle",
|
|
246
246
|
class: "f1913njx",
|
|
247
247
|
propsAsIs: !1
|
|
248
|
-
}), j = /* @__PURE__ */
|
|
248
|
+
}), j = /* @__PURE__ */ o("span")({
|
|
249
249
|
name: "FeedbackDescription",
|
|
250
250
|
class: "fzfk69z",
|
|
251
251
|
propsAsIs: !1
|
|
252
|
-
}),
|
|
252
|
+
}), re = /* @__PURE__ */ o("div")({
|
|
253
253
|
name: "FeedbackText",
|
|
254
254
|
class: "fx87qaj",
|
|
255
255
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
256
|
+
}), Zt = ({
|
|
257
257
|
feedbackMessages: e,
|
|
258
258
|
questionVotedCorrectly: t,
|
|
259
259
|
questionVoted: s,
|
|
260
260
|
questionType: r,
|
|
261
|
-
hasCorrectAnswer:
|
|
261
|
+
hasCorrectAnswer: i,
|
|
262
262
|
questionStatus: l,
|
|
263
263
|
showExpiredNotification: a,
|
|
264
264
|
showClosedNotificationTrivia: c,
|
|
@@ -267,149 +267,149 @@ const st = /* @__PURE__ */ i("div")({
|
|
|
267
267
|
enteredAnActiveQuestion: h,
|
|
268
268
|
marketClosed: v
|
|
269
269
|
}) => {
|
|
270
|
-
const m = s && (r ===
|
|
271
|
-
if (!a && !c && !C && !y && !
|
|
270
|
+
const m = s && (r === f.TRIVIA || r === f.PREDICTION) && d && l !== _.RESOLVED, I = r === f.PREDICTION && !i, w = v && r === f.PREDICTION && !s && !h || r === f.PREDICTION && u && d && h, C = m && I, y = m && i, g = r === f.PREDICTION && s && d && i, A = s && r === f.POLL && d;
|
|
271
|
+
if (!a && !c && !C && !y && !w && !A && !g)
|
|
272
272
|
return null;
|
|
273
|
-
const
|
|
274
|
-
return /* @__PURE__ */ p(
|
|
275
|
-
a && /* @__PURE__ */ p(
|
|
273
|
+
const b = t ? "correct" : "incorrect", T = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
274
|
+
return /* @__PURE__ */ p(zt, { "data-isPrediction": I, children: [
|
|
275
|
+
a && /* @__PURE__ */ p(P, { children: [
|
|
276
276
|
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
|
|
277
277
|
/* @__PURE__ */ p("div", { children: [
|
|
278
|
-
/* @__PURE__ */ n(
|
|
279
|
-
/* @__PURE__ */ n(
|
|
278
|
+
/* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(j, { children: "Question Expired" }) }),
|
|
279
|
+
/* @__PURE__ */ n(re, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
280
280
|
] })
|
|
281
281
|
] }),
|
|
282
|
-
c && /* @__PURE__ */ p(
|
|
282
|
+
c && /* @__PURE__ */ p(P, { children: [
|
|
283
283
|
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
|
|
284
284
|
/* @__PURE__ */ p("div", { children: [
|
|
285
|
-
/* @__PURE__ */ n(
|
|
286
|
-
/* @__PURE__ */ n(
|
|
285
|
+
/* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(j, { children: "Question Closed" }) }),
|
|
286
|
+
/* @__PURE__ */ n(re, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
|
-
|
|
289
|
+
w && /* @__PURE__ */ p(P, { children: [
|
|
290
290
|
/* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
|
|
291
291
|
/* @__PURE__ */ p("div", { children: [
|
|
292
|
-
/* @__PURE__ */ n(
|
|
293
|
-
/* @__PURE__ */ n(
|
|
292
|
+
/* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(j, { children: "Question Closed" }) }),
|
|
293
|
+
/* @__PURE__ */ n(re, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
294
294
|
] })
|
|
295
295
|
] }),
|
|
296
|
-
C && /* @__PURE__ */ p(
|
|
297
|
-
/* @__PURE__ */ n(
|
|
296
|
+
C && /* @__PURE__ */ p(P, { children: [
|
|
297
|
+
/* @__PURE__ */ n(Ht, { name: "icon-prediction" }),
|
|
298
298
|
/* @__PURE__ */ n(j, { children: "Stay tuned to see if your prediction was correct." })
|
|
299
299
|
] }),
|
|
300
|
-
|
|
300
|
+
A && /* @__PURE__ */ p(P, { children: [
|
|
301
301
|
/* @__PURE__ */ n(H, { "data-feedback-type": "correct", children: /* @__PURE__ */ n(R, { name: "correct" }) }),
|
|
302
302
|
/* @__PURE__ */ n(j, { children: "That's for answering. Please stay tuned for the next question." })
|
|
303
303
|
] }),
|
|
304
|
-
(y ||
|
|
305
|
-
/* @__PURE__ */ n(H, { "data-feedback-type":
|
|
306
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ p(
|
|
307
|
-
/* @__PURE__ */ n(
|
|
304
|
+
(y || g) && /* @__PURE__ */ p(P, { children: [
|
|
305
|
+
/* @__PURE__ */ n(H, { "data-feedback-type": b, children: /* @__PURE__ */ n(R, { name: b }) }),
|
|
306
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ p(K, { children: [
|
|
307
|
+
/* @__PURE__ */ n(Yt, { "data-feedback-type": b, children: T == null ? void 0 : T.title }),
|
|
308
308
|
/* @__PURE__ */ n(j, { children: T == null ? void 0 : T.description })
|
|
309
309
|
] }) })
|
|
310
310
|
] })
|
|
311
311
|
] });
|
|
312
|
-
},
|
|
312
|
+
}, Gt = /* @__PURE__ */ o("div")({
|
|
313
313
|
name: "Container",
|
|
314
314
|
class: "c14ielyq",
|
|
315
315
|
propsAsIs: !1
|
|
316
|
-
}),
|
|
316
|
+
}), Kt = () => Be, Jt = /* @__PURE__ */ o(Kt())({
|
|
317
317
|
name: "QuestionScrollContainer",
|
|
318
318
|
class: "q1tlqx57",
|
|
319
319
|
propsAsIs: !0
|
|
320
|
-
}),
|
|
320
|
+
}), Xt = /* @__PURE__ */ o("div")({
|
|
321
321
|
name: "Content",
|
|
322
322
|
class: "c1hq58md",
|
|
323
323
|
propsAsIs: !1
|
|
324
|
-
}),
|
|
324
|
+
}), es = /* @__PURE__ */ o("div")({
|
|
325
325
|
name: "Title",
|
|
326
326
|
class: "t1c8nxcx",
|
|
327
327
|
propsAsIs: !1
|
|
328
|
-
}),
|
|
328
|
+
}), ts = /* @__PURE__ */ o("div")({
|
|
329
329
|
name: "Options",
|
|
330
330
|
class: "oiozuc3",
|
|
331
331
|
propsAsIs: !1
|
|
332
|
-
}),
|
|
332
|
+
}), ss = /* @__PURE__ */ o("button")({
|
|
333
333
|
name: "ButtonContainer",
|
|
334
334
|
class: "b1b6dl8t",
|
|
335
335
|
propsAsIs: !1
|
|
336
|
-
}),
|
|
336
|
+
}), ns = /* @__PURE__ */ o("div")({
|
|
337
337
|
name: "ButtonPct",
|
|
338
338
|
class: "b4iik8i",
|
|
339
339
|
propsAsIs: !1
|
|
340
|
-
}),
|
|
340
|
+
}), rs = /* @__PURE__ */ o("span")({
|
|
341
341
|
name: "ButtonBody",
|
|
342
342
|
class: "b1gq1lnf",
|
|
343
343
|
propsAsIs: !1
|
|
344
|
-
}),
|
|
344
|
+
}), is = /* @__PURE__ */ o("div")({
|
|
345
345
|
name: "IconContainer",
|
|
346
346
|
class: "i1j65z51",
|
|
347
347
|
propsAsIs: !1
|
|
348
|
-
}),
|
|
348
|
+
}), os = /* @__PURE__ */ o("div")({
|
|
349
349
|
name: "IconWrap",
|
|
350
350
|
class: "i19tpfua",
|
|
351
351
|
propsAsIs: !1
|
|
352
|
-
}),
|
|
352
|
+
}), xe = /* @__PURE__ */ o("img")({
|
|
353
353
|
name: "Icon",
|
|
354
354
|
class: "i1tubmma",
|
|
355
355
|
propsAsIs: !1
|
|
356
|
-
}),
|
|
356
|
+
}), as = () => xe, ls = /* @__PURE__ */ o(as())({
|
|
357
357
|
name: "IconDefault",
|
|
358
358
|
class: "i1grrgwj",
|
|
359
359
|
propsAsIs: !0
|
|
360
|
-
}),
|
|
360
|
+
}), cs = () => xe, ds = /* @__PURE__ */ o(cs())({
|
|
361
361
|
name: "IconCircle",
|
|
362
362
|
class: "ibemyq8",
|
|
363
363
|
propsAsIs: !0
|
|
364
|
-
}),
|
|
364
|
+
}), ps = /* @__PURE__ */ o("span")({
|
|
365
365
|
name: "Title",
|
|
366
366
|
class: "t1dceht",
|
|
367
367
|
propsAsIs: !1
|
|
368
|
-
}),
|
|
368
|
+
}), us = /* @__PURE__ */ o("span")({
|
|
369
369
|
name: "Indicators",
|
|
370
370
|
class: "i116q4vq",
|
|
371
371
|
propsAsIs: !1
|
|
372
|
-
}),
|
|
372
|
+
}), hs = /* @__PURE__ */ o("span")({
|
|
373
373
|
name: "Pts",
|
|
374
374
|
class: "p17ajcu2",
|
|
375
375
|
propsAsIs: !1
|
|
376
|
-
}),
|
|
376
|
+
}), ms = /* @__PURE__ */ o("span")({
|
|
377
377
|
name: "Percentage",
|
|
378
378
|
class: "pu9kmlb",
|
|
379
379
|
propsAsIs: !1
|
|
380
|
-
}),
|
|
380
|
+
}), vs = () => R, fs = /* @__PURE__ */ o(vs())({
|
|
381
381
|
name: "CheckIcon",
|
|
382
382
|
class: "c1j2j0s0",
|
|
383
383
|
propsAsIs: !0
|
|
384
|
-
}),
|
|
385
|
-
[F.CENTERED]: (e) => /* @__PURE__ */ n(
|
|
386
|
-
[F.TRANSPARENT]: (e) => /* @__PURE__ */ n(
|
|
387
|
-
[F.ROUNDED]: (e) => /* @__PURE__ */ n(
|
|
384
|
+
}), he = {
|
|
385
|
+
[F.CENTERED]: (e) => /* @__PURE__ */ n(ls, { alt: "option-icon", src: e }),
|
|
386
|
+
[F.TRANSPARENT]: (e) => /* @__PURE__ */ n(is, { children: /* @__PURE__ */ n(os, { style: { backgroundImage: `url(${e})` } }) }),
|
|
387
|
+
[F.ROUNDED]: (e) => /* @__PURE__ */ n(ds, { alt: "option-icon", src: e }),
|
|
388
388
|
[F.NONE]: () => null,
|
|
389
389
|
[F.UNSET]: () => null
|
|
390
|
-
},
|
|
391
|
-
if (e ===
|
|
390
|
+
}, Is = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: r, questionVoted: i }) => {
|
|
391
|
+
if (e === f.POLL && r)
|
|
392
392
|
return "correct";
|
|
393
|
-
if (e ===
|
|
394
|
-
if (t &&
|
|
393
|
+
if (e === f.PREDICTION) {
|
|
394
|
+
if (t && i)
|
|
395
395
|
return r ? s ? "correct" : "incorrect" : "unset";
|
|
396
396
|
if (r)
|
|
397
397
|
return "correct";
|
|
398
398
|
}
|
|
399
|
-
return e ===
|
|
400
|
-
},
|
|
399
|
+
return e === f.TRIVIA && i && r ? s ? "correct" : "incorrect" : "unset";
|
|
400
|
+
}, Cs = ({
|
|
401
401
|
questionType: e,
|
|
402
402
|
questionVoted: t,
|
|
403
403
|
correct: s,
|
|
404
404
|
hasCorrectAnswer: r,
|
|
405
|
-
questionStatus:
|
|
406
|
-
}) => e ===
|
|
405
|
+
questionStatus: i
|
|
406
|
+
}) => e === f.TRIVIA ? t && s : e === f.PREDICTION ? t && s && r || i === _.RESOLVED && s : !1, gs = (e) => {
|
|
407
407
|
var t;
|
|
408
408
|
const {
|
|
409
409
|
// option props
|
|
410
410
|
id: s,
|
|
411
411
|
icon: r,
|
|
412
|
-
text:
|
|
412
|
+
text: i,
|
|
413
413
|
percentageDecimal: l,
|
|
414
414
|
points: a,
|
|
415
415
|
// extra props
|
|
@@ -419,133 +419,137 @@ const st = /* @__PURE__ */ i("div")({
|
|
|
419
419
|
questionVoted: h,
|
|
420
420
|
imageMode: v,
|
|
421
421
|
answerTimeExpired: m,
|
|
422
|
-
questionStatus:
|
|
423
|
-
isLoading:
|
|
422
|
+
questionStatus: I,
|
|
423
|
+
isLoading: w,
|
|
424
424
|
questionType: C,
|
|
425
425
|
correct: y,
|
|
426
|
-
hasCorrectAnswer:
|
|
427
|
-
votedAfterQuestionClosed:
|
|
428
|
-
enteredAnActiveQuestion:
|
|
426
|
+
hasCorrectAnswer: g,
|
|
427
|
+
votedAfterQuestionClosed: A,
|
|
428
|
+
enteredAnActiveQuestion: b,
|
|
429
429
|
marketClosed: T
|
|
430
|
-
} = e,
|
|
431
|
-
return
|
|
432
|
-
|
|
430
|
+
} = e, [N, M] = q(l), D = Is(e), ee = Cs({ questionType: C, questionVoted: h, correct: y, hasCorrectAnswer: g, questionStatus: I }), $ = T && C === f.PREDICTION, S = h || $, k = C === f.PREDICTION && !h && !T, te = h && !u && D !== "incorrect";
|
|
431
|
+
return Re(() => {
|
|
432
|
+
l > 0 && (M(0), requestAnimationFrame(() => {
|
|
433
|
+
M(l);
|
|
434
|
+
}));
|
|
435
|
+
}, [l]), /* @__PURE__ */ p(
|
|
436
|
+
ss,
|
|
433
437
|
{
|
|
434
438
|
value: s,
|
|
435
439
|
"data-selected": u,
|
|
436
|
-
"data-answer-state":
|
|
437
|
-
disabled: h ||
|
|
438
|
-
"data-is-not-checked":
|
|
439
|
-
onClick: (
|
|
440
|
+
"data-answer-state": D,
|
|
441
|
+
disabled: h || w || m || $ && !b || $ && b && A,
|
|
442
|
+
"data-is-not-checked": te,
|
|
443
|
+
onClick: (se) => {
|
|
440
444
|
d(
|
|
441
|
-
C ===
|
|
442
|
-
), c(
|
|
445
|
+
C === f.PREDICTION ? T : I === _.RESOLVED
|
|
446
|
+
), c(se);
|
|
443
447
|
},
|
|
444
448
|
children: [
|
|
445
|
-
/* @__PURE__ */ n(
|
|
446
|
-
/* @__PURE__ */ p(
|
|
447
|
-
r && v && ((t =
|
|
448
|
-
/* @__PURE__ */ n(
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
/* @__PURE__ */ n(
|
|
449
|
+
/* @__PURE__ */ n(ns, { "data-answer-state": D, style: { width: `${S ? N : 0}%` } }),
|
|
450
|
+
/* @__PURE__ */ p(rs, { children: [
|
|
451
|
+
r && v && ((t = he[v]) == null ? void 0 : t.call(he, r)),
|
|
452
|
+
/* @__PURE__ */ n(ps, { children: i }),
|
|
453
|
+
k && /* @__PURE__ */ p("div", { children: [
|
|
454
|
+
a,
|
|
455
|
+
/* @__PURE__ */ n(hs, { children: "pts" })
|
|
452
456
|
] }),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
/* @__PURE__ */ n(
|
|
457
|
+
S && /* @__PURE__ */ p(us, { children: [
|
|
458
|
+
ee && /* @__PURE__ */ n(fs, { name: "selected" }),
|
|
459
|
+
/* @__PURE__ */ n(ms, { children: /* @__PURE__ */ n($e, { value: l, suffix: "%" }) })
|
|
456
460
|
] })
|
|
457
461
|
] })
|
|
458
462
|
]
|
|
459
463
|
}
|
|
460
464
|
);
|
|
461
465
|
};
|
|
462
|
-
var
|
|
463
|
-
let [a, c] =
|
|
464
|
-
let
|
|
466
|
+
var me = typeof window > "u" ? Y : Re, As = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: r = 0, onComplete: i, onUpdate: l }) => {
|
|
467
|
+
let [a, c] = q(s), d = V(0), u = V(s), h = V(s * -1e3), v = V(null), m = V(null), I = V(null), w = (g) => {
|
|
468
|
+
let A = g / 1e3;
|
|
465
469
|
if (m.current === null) {
|
|
466
|
-
m.current =
|
|
470
|
+
m.current = A, v.current = requestAnimationFrame(w);
|
|
467
471
|
return;
|
|
468
472
|
}
|
|
469
|
-
let
|
|
470
|
-
m.current =
|
|
471
|
-
let
|
|
472
|
-
c(D ? t :
|
|
473
|
+
let b = A - m.current, T = d.current + b;
|
|
474
|
+
m.current = A, d.current = T;
|
|
475
|
+
let N = u.current + (r === 0 ? T : (T / r | 0) * r), M = u.current + T, D = typeof t == "number" && M >= t;
|
|
476
|
+
c(D ? t : N), D || (v.current = requestAnimationFrame(w));
|
|
473
477
|
}, C = () => {
|
|
474
|
-
v.current && cancelAnimationFrame(v.current),
|
|
475
|
-
}, y = B((
|
|
478
|
+
v.current && cancelAnimationFrame(v.current), I.current && clearTimeout(I.current), m.current = null;
|
|
479
|
+
}, y = B((g) => {
|
|
476
480
|
C(), d.current = 0;
|
|
477
|
-
let
|
|
478
|
-
u.current =
|
|
481
|
+
let A = typeof g == "number" ? g : s;
|
|
482
|
+
u.current = A, c(A), e && (v.current = requestAnimationFrame(w));
|
|
479
483
|
}, [e, s]);
|
|
480
|
-
return
|
|
484
|
+
return me(() => {
|
|
481
485
|
if (l == null || l(a), t && a >= t) {
|
|
482
486
|
h.current += t * 1e3;
|
|
483
|
-
let { shouldRepeat:
|
|
484
|
-
|
|
487
|
+
let { shouldRepeat: g = !1, delay: A = 0, newStartAt: b } = (i == null ? void 0 : i(h.current / 1e3)) || {};
|
|
488
|
+
g && (I.current = setTimeout(() => y(b), A * 1e3));
|
|
485
489
|
}
|
|
486
|
-
}, [a, t]),
|
|
487
|
-
},
|
|
488
|
-
let r = e / 2,
|
|
489
|
-
return { path: `m ${r},${
|
|
490
|
-
},
|
|
490
|
+
}, [a, t]), me(() => (e && (v.current = requestAnimationFrame(w)), C), [e, t, r]), { elapsedTime: a, reset: y };
|
|
491
|
+
}, ys = (e, t, s) => {
|
|
492
|
+
let r = e / 2, i = t / 2, l = r - i, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
|
|
493
|
+
return { path: `m ${r},${i} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
|
|
494
|
+
}, ve = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, $s = (e) => ({ position: "relative", width: e, height: e }), bs = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Pe = (e, t, s, r, i) => {
|
|
491
495
|
if (r === 0)
|
|
492
496
|
return t;
|
|
493
|
-
let l = (
|
|
497
|
+
let l = (i ? r - e : e) / r;
|
|
494
498
|
return t + s * l;
|
|
495
|
-
},
|
|
499
|
+
}, fe = (e) => {
|
|
496
500
|
var t, s;
|
|
497
|
-
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (r,
|
|
498
|
-
},
|
|
501
|
+
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (r, i, l, a) => `#${i}${i}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((r) => parseInt(r, 16))) != null ? s : [];
|
|
502
|
+
}, ws = (e, t) => {
|
|
499
503
|
var s;
|
|
500
|
-
let { colors: r, colorsTime:
|
|
504
|
+
let { colors: r, colorsTime: i, isSmoothColorTransition: l = !0 } = e;
|
|
501
505
|
if (typeof r == "string")
|
|
502
506
|
return r;
|
|
503
|
-
let a = (s =
|
|
504
|
-
if (!
|
|
507
|
+
let a = (s = i == null ? void 0 : i.findIndex((m, I) => m >= t && t >= i[I + 1])) != null ? s : -1;
|
|
508
|
+
if (!i || a === -1)
|
|
505
509
|
return r[0];
|
|
506
510
|
if (!l)
|
|
507
511
|
return r[a];
|
|
508
|
-
let c =
|
|
509
|
-
return `rgb(${u.map((m,
|
|
510
|
-
},
|
|
511
|
-
let { duration: t, initialRemainingTime: s, updateInterval: r, size:
|
|
512
|
-
let
|
|
513
|
-
|
|
514
|
-
} : void 0, onComplete: typeof h == "function" ? (
|
|
515
|
-
var
|
|
516
|
-
let { shouldRepeat: T, delay:
|
|
512
|
+
let c = i[a] - t, d = i[a] - i[a + 1], u = fe(r[a]), h = fe(r[a + 1]), v = !!e.isGrowing;
|
|
513
|
+
return `rgb(${u.map((m, I) => Pe(c, m, h[I] - m, d, v) | 0).join(",")})`;
|
|
514
|
+
}, Ts = (e) => {
|
|
515
|
+
let { duration: t, initialRemainingTime: s, updateInterval: r, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: u = "clockwise", onComplete: h, onUpdate: v } = e, m = V(), I = Math.max(l, a ?? 0), { path: w, pathLength: C } = ys(i, I, u), { elapsedTime: y } = As({ isPlaying: c, duration: t, startAt: ve(t, s), updateInterval: r, onUpdate: typeof v == "function" ? (A) => {
|
|
516
|
+
let b = Math.ceil(t - A);
|
|
517
|
+
b !== m.current && (m.current = b, v(b));
|
|
518
|
+
} : void 0, onComplete: typeof h == "function" ? (A) => {
|
|
519
|
+
var b;
|
|
520
|
+
let { shouldRepeat: T, delay: N, newInitialRemainingTime: M } = (b = h(A)) != null ? b : {};
|
|
517
521
|
if (T)
|
|
518
|
-
return { shouldRepeat: T, delay:
|
|
519
|
-
} : void 0 }),
|
|
520
|
-
return { elapsedTime: y, path:
|
|
521
|
-
},
|
|
522
|
-
let { children: t, strokeLinecap: s, trailColor: r, trailStrokeWidth:
|
|
523
|
-
return W.createElement("div", { style:
|
|
522
|
+
return { shouldRepeat: T, delay: N, newStartAt: ve(t, M) };
|
|
523
|
+
} : void 0 }), g = t - y;
|
|
524
|
+
return { elapsedTime: y, path: w, pathLength: C, remainingTime: Math.ceil(g), rotation: u, size: i, stroke: ws(e, g), strokeDashoffset: Pe(y, 0, C, t, d), strokeWidth: l };
|
|
525
|
+
}, qe = (e) => {
|
|
526
|
+
let { children: t, strokeLinecap: s, trailColor: r, trailStrokeWidth: i } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: u, elapsedTime: h, size: v, strokeWidth: m } = Ts(e);
|
|
527
|
+
return W.createElement("div", { style: $s(v) }, W.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, W.createElement("path", { d: l, fill: "none", stroke: r ?? "#d9d9d9", strokeWidth: i ?? m }), W.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: m, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && W.createElement("div", { style: bs }, t({ remainingTime: u, elapsedTime: h, color: c })));
|
|
524
528
|
};
|
|
525
|
-
|
|
526
|
-
const
|
|
529
|
+
qe.displayName = "CountdownCircleTimer";
|
|
530
|
+
const Rs = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRAY3], Ss = [10, 10, 1, 0], ks = /* @__PURE__ */ o("div")({
|
|
527
531
|
name: "RemainingTime",
|
|
528
532
|
class: "r165427",
|
|
529
533
|
propsAsIs: !1
|
|
530
|
-
}),
|
|
534
|
+
}), Ls = Q.SECONDARY_GREEN6, Ie = Q.SECONDARY_RED3, Es = Q.NEUTRALS_GRAY3, xs = ({
|
|
531
535
|
isPlaying: e = !0,
|
|
532
536
|
duration: t = 30,
|
|
533
537
|
onTimerExpired: s
|
|
534
538
|
}) => {
|
|
535
|
-
const [r,
|
|
539
|
+
const [r, i] = q(t > 10 ? Ls : Ie), l = ({
|
|
536
540
|
remainingTime: d
|
|
537
|
-
}) => /* @__PURE__ */ n(
|
|
541
|
+
}) => /* @__PURE__ */ n(ks, {
|
|
538
542
|
children: d
|
|
539
543
|
}), a = B(() => {
|
|
540
|
-
s == null || s(),
|
|
541
|
-
}, [s,
|
|
542
|
-
d === 10 &&
|
|
543
|
-
}, [
|
|
544
|
-
return /* @__PURE__ */ n(
|
|
544
|
+
s == null || s(), i(Es);
|
|
545
|
+
}, [s, i]), c = B((d) => {
|
|
546
|
+
d === 10 && i(Ie);
|
|
547
|
+
}, [i]);
|
|
548
|
+
return /* @__PURE__ */ n(qe, {
|
|
545
549
|
isPlaying: e,
|
|
546
550
|
duration: t,
|
|
547
|
-
colors:
|
|
548
|
-
colorsTime:
|
|
551
|
+
colors: Rs,
|
|
552
|
+
colorsTime: Ss,
|
|
549
553
|
size: 32,
|
|
550
554
|
strokeWidth: 2,
|
|
551
555
|
trailStrokeWidth: 2,
|
|
@@ -554,348 +558,344 @@ const bs = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRA
|
|
|
554
558
|
onUpdate: c,
|
|
555
559
|
children: l
|
|
556
560
|
});
|
|
557
|
-
},
|
|
561
|
+
}, Ps = /* @__PURE__ */ o("div")({
|
|
558
562
|
name: "WinBarContainer",
|
|
559
563
|
class: "wie6cqo",
|
|
560
564
|
propsAsIs: !1
|
|
561
|
-
}),
|
|
565
|
+
}), qs = /* @__PURE__ */ o("div")({
|
|
562
566
|
name: "Content",
|
|
563
567
|
class: "cgizw4u",
|
|
564
568
|
propsAsIs: !1
|
|
565
|
-
}),
|
|
569
|
+
}), Ns = /* @__PURE__ */ o("div")({
|
|
566
570
|
name: "Title",
|
|
567
571
|
class: "t1l3ucjp",
|
|
568
572
|
propsAsIs: !1
|
|
569
|
-
}),
|
|
573
|
+
}), Ds = () => R, Os = /* @__PURE__ */ o(Ds())({
|
|
570
574
|
name: "WinIcon",
|
|
571
575
|
class: "wx7j799",
|
|
572
576
|
propsAsIs: !0
|
|
573
|
-
}),
|
|
577
|
+
}), Ms = /* @__PURE__ */ o("div")({
|
|
574
578
|
name: "Points",
|
|
575
579
|
class: "p4lwuj0",
|
|
576
580
|
propsAsIs: !1
|
|
577
|
-
}),
|
|
581
|
+
}), Vs = /* @__PURE__ */ o("span")({
|
|
578
582
|
name: "PointsCount",
|
|
579
583
|
class: "po9i64o",
|
|
580
584
|
propsAsIs: !1
|
|
581
|
-
}),
|
|
585
|
+
}), _s = /* @__PURE__ */ o("span")({
|
|
582
586
|
name: "PointsUnits",
|
|
583
587
|
class: "pe5g05h",
|
|
584
588
|
propsAsIs: !1
|
|
585
|
-
}),
|
|
589
|
+
}), Qs = ({
|
|
586
590
|
title: e,
|
|
587
591
|
points: t,
|
|
588
592
|
isPlayingTimer: s,
|
|
589
593
|
isTimer: r,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
|
|
600
|
-
/* @__PURE__ */ n(
|
|
594
|
+
animatePoints: i,
|
|
595
|
+
questionType: l,
|
|
596
|
+
timerDuration: a,
|
|
597
|
+
onTimerExpired: c
|
|
598
|
+
}) => /* @__PURE__ */ p(Ps, { style: { justifyContent: l === f.PREDICTION ? "center" : "space-between" }, children: [
|
|
599
|
+
/* @__PURE__ */ p(qs, { children: [
|
|
600
|
+
e && /* @__PURE__ */ n(Ns, { children: e }),
|
|
601
|
+
t !== void 0 && l !== f.POLL && /* @__PURE__ */ p(P, { children: [
|
|
602
|
+
/* @__PURE__ */ n(Os, { name: "icon-trophy" }),
|
|
603
|
+
/* @__PURE__ */ p(Ms, { children: [
|
|
604
|
+
/* @__PURE__ */ n(Vs, { children: i ? /* @__PURE__ */ n($e, { value: t, delay: 0.3 }) : t }),
|
|
605
|
+
/* @__PURE__ */ n(_s, { children: "PTS" })
|
|
601
606
|
] })
|
|
602
607
|
] })
|
|
603
608
|
] }),
|
|
604
|
-
r &&
|
|
605
|
-
] }),
|
|
606
|
-
var
|
|
607
|
-
const a = e.subject, c = e.type, d = e.status, u = (
|
|
609
|
+
r && l !== f.PREDICTION && /* @__PURE__ */ n(xs, { isPlaying: s, onTimerExpired: c, duration: a })
|
|
610
|
+
] }), Us = ({ openedQuestion: e, isLoading: t, vote: s, close: r }) => {
|
|
611
|
+
var i, l;
|
|
612
|
+
const a = e.subject, c = e.type, d = e.status, u = (i = e.options) == null ? void 0 : i.options, h = e.marketClosed, [v, m] = q(!1), [I, w] = q(!1), [C, y] = q(!0), [g, A] = q(!1), [b, T] = q(""), N = e == null ? void 0 : e.id;
|
|
608
613
|
Y(() => {
|
|
609
|
-
c ===
|
|
614
|
+
c === f.PREDICTION ? h && y(!1) : d === _.RESOLVED && y(!1);
|
|
610
615
|
}, []);
|
|
611
|
-
const
|
|
612
|
-
|
|
616
|
+
const M = B((L) => {
|
|
617
|
+
w(L), m(!0);
|
|
613
618
|
}, []), D = B(
|
|
614
|
-
async (
|
|
615
|
-
if (
|
|
616
|
-
const z =
|
|
617
|
-
T(z), await s(
|
|
619
|
+
async (L) => {
|
|
620
|
+
if (N) {
|
|
621
|
+
const z = L.currentTarget.value;
|
|
622
|
+
T(z), await s(N, z);
|
|
618
623
|
}
|
|
619
624
|
},
|
|
620
|
-
[
|
|
621
|
-
),
|
|
622
|
-
|
|
623
|
-
}, [r]),
|
|
624
|
-
() => e == null ? void 0 : e.answers.find((
|
|
625
|
+
[N, T, s]
|
|
626
|
+
), ee = B(() => {
|
|
627
|
+
A(!0), setTimeout(r, 3e3);
|
|
628
|
+
}, [r]), $ = x(
|
|
629
|
+
() => e == null ? void 0 : e.answers.find((L) => L.youVoted === !0),
|
|
625
630
|
[e]
|
|
626
|
-
),
|
|
627
|
-
() => !!(e != null && e.answers.find((
|
|
631
|
+
), S = x(
|
|
632
|
+
() => !!(e != null && e.answers.find((L) => L.correct === !0)),
|
|
628
633
|
[e]
|
|
629
|
-
),
|
|
630
|
-
() => e == null ? void 0 : e.answers.find((
|
|
634
|
+
), k = x(
|
|
635
|
+
() => e == null ? void 0 : e.answers.find((L) => L.correct === !0),
|
|
631
636
|
[e]
|
|
632
|
-
),
|
|
637
|
+
), te = x(() => e ? e.answers.map((L) => {
|
|
633
638
|
var z;
|
|
634
639
|
return {
|
|
635
|
-
...
|
|
636
|
-
questionVoted:
|
|
637
|
-
youSelected:
|
|
640
|
+
...L,
|
|
641
|
+
questionVoted: !!$,
|
|
642
|
+
youSelected: b === L.id,
|
|
638
643
|
isLoading: t,
|
|
639
|
-
hasCorrectAnswer:
|
|
644
|
+
hasCorrectAnswer: S,
|
|
640
645
|
questionType: e.type,
|
|
641
|
-
answerTimeExpired:
|
|
646
|
+
answerTimeExpired: g,
|
|
642
647
|
questionStatus: d,
|
|
643
648
|
imageMode: (z = e.appearance) == null ? void 0 : z.images,
|
|
644
649
|
onVote: D
|
|
645
650
|
};
|
|
646
651
|
}) : [], [
|
|
647
|
-
|
|
648
|
-
|
|
652
|
+
S,
|
|
653
|
+
g,
|
|
649
654
|
t,
|
|
650
655
|
e,
|
|
651
|
-
|
|
656
|
+
$,
|
|
652
657
|
d,
|
|
653
658
|
D,
|
|
654
|
-
|
|
655
|
-
]),
|
|
656
|
-
if (c ===
|
|
657
|
-
return
|
|
658
|
-
if (!(U ||
|
|
659
|
-
return d ===
|
|
659
|
+
b
|
|
660
|
+
]), se = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, U = d === _.RESOLVED && c === f.TRIVIA && !$ && !C, ce = c === f.TRIVIA && I && v && C, de = x(() => c === f.PREDICTION ? !!($ && !S || $ && S && k != null && k.youVoted) : !0, [c, $, S, k]), Ve = x(() => {
|
|
661
|
+
if (c === f.PREDICTION && $ && (!S || S && k != null && k.youVoted))
|
|
662
|
+
return $.points;
|
|
663
|
+
if (!(U || g))
|
|
664
|
+
return d === _.RESOLVED ? 0 : $ ? $.correct ? $.points : 0 : k == null ? void 0 : k.points;
|
|
660
665
|
}, [
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
666
|
+
g,
|
|
667
|
+
$,
|
|
668
|
+
k,
|
|
664
669
|
d,
|
|
665
670
|
U,
|
|
666
671
|
c,
|
|
667
|
-
|
|
668
|
-
]),
|
|
669
|
-
return /* @__PURE__ */ n(
|
|
672
|
+
S
|
|
673
|
+
]), _e = x(() => c === f.PREDICTION && $ ? S ? S && k != null && k.youVoted ? "You won" : "" : "To win" : U || g ? "Time expired" : c === f.POLL ? "Time remaining" : $ ? "You won" : "To win", [g, c, $, U, S, k]), Qe = (c === f.TRIVIA || c === f.PREDICTION) && $ && S && (k == null ? void 0 : k.youVoted), Ue = $ || U || ce || c === f.TRIVIA && d === _.RESOLVED && C;
|
|
674
|
+
return /* @__PURE__ */ n(Jt, { children: /* @__PURE__ */ n(Gt, { children: /* @__PURE__ */ p(Xt, { children: [
|
|
670
675
|
/* @__PURE__ */ n(
|
|
671
|
-
|
|
676
|
+
Zt,
|
|
672
677
|
{
|
|
673
|
-
feedbackMessages:
|
|
674
|
-
questionVoted:
|
|
675
|
-
questionVotedCorrectly:
|
|
678
|
+
feedbackMessages: se,
|
|
679
|
+
questionVoted: !!$,
|
|
680
|
+
questionVotedCorrectly: $ == null ? void 0 : $.correct,
|
|
676
681
|
questionType: c,
|
|
677
|
-
hasCorrectAnswer:
|
|
682
|
+
hasCorrectAnswer: S,
|
|
678
683
|
questionStatus: d,
|
|
679
684
|
showExpiredNotification: U,
|
|
680
|
-
showClosedNotificationTrivia:
|
|
685
|
+
showClosedNotificationTrivia: ce,
|
|
681
686
|
votedInCurrentRender: v,
|
|
682
|
-
votedAfterQuestionClosed:
|
|
687
|
+
votedAfterQuestionClosed: I,
|
|
683
688
|
enteredAnActiveQuestion: C,
|
|
684
689
|
marketClosed: h
|
|
685
690
|
}
|
|
686
691
|
),
|
|
687
|
-
|
|
688
|
-
|
|
692
|
+
de && /* @__PURE__ */ n(
|
|
693
|
+
Qs,
|
|
689
694
|
{
|
|
690
|
-
title:
|
|
691
|
-
points:
|
|
692
|
-
onTimerExpired:
|
|
695
|
+
title: _e,
|
|
696
|
+
points: Ve,
|
|
697
|
+
onTimerExpired: ee,
|
|
693
698
|
questionType: e.type,
|
|
694
699
|
isTimer: !t,
|
|
695
|
-
isPlayingTimer:
|
|
696
|
-
|
|
700
|
+
isPlayingTimer: !$,
|
|
701
|
+
animatePoints: Qe,
|
|
702
|
+
timerDuration: Ue ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
|
|
697
703
|
}
|
|
698
704
|
),
|
|
699
|
-
|
|
700
|
-
|
|
705
|
+
g ? /* @__PURE__ */ n(
|
|
706
|
+
Bt,
|
|
701
707
|
{
|
|
702
708
|
title: "More to come...",
|
|
703
709
|
description: "Watch for additional enhanced stream interactive experience."
|
|
704
710
|
}
|
|
705
|
-
) : /* @__PURE__ */ p(
|
|
706
|
-
/* @__PURE__ */ n(
|
|
707
|
-
/* @__PURE__ */ n(
|
|
708
|
-
|
|
711
|
+
) : /* @__PURE__ */ p(P, { children: [
|
|
712
|
+
/* @__PURE__ */ n(es, { style: de ? {} : { marginTop: 0 }, children: a }),
|
|
713
|
+
/* @__PURE__ */ n(ts, { children: te.map((L) => /* @__PURE__ */ n(
|
|
714
|
+
gs,
|
|
709
715
|
{
|
|
710
|
-
...
|
|
711
|
-
markThatVoted:
|
|
712
|
-
votedAfterQuestionClosed:
|
|
716
|
+
...L,
|
|
717
|
+
markThatVoted: M,
|
|
718
|
+
votedAfterQuestionClosed: I,
|
|
713
719
|
enteredAnActiveQuestion: C,
|
|
714
720
|
marketClosed: h
|
|
715
721
|
},
|
|
716
|
-
|
|
722
|
+
L.id
|
|
717
723
|
)) })
|
|
718
724
|
] })
|
|
719
725
|
] }) }) });
|
|
720
|
-
},
|
|
726
|
+
}, js = /* @__PURE__ */ o("div")({
|
|
721
727
|
name: "Container",
|
|
722
728
|
class: "cgn5uen",
|
|
723
729
|
propsAsIs: !1
|
|
724
|
-
}),
|
|
730
|
+
}), Ws = /* @__PURE__ */ o("div")({
|
|
725
731
|
name: "Content",
|
|
726
732
|
class: "c1px8nt6",
|
|
727
733
|
propsAsIs: !1
|
|
728
|
-
}),
|
|
734
|
+
}), Bs = /* @__PURE__ */ o("h3")({
|
|
729
735
|
name: "Title",
|
|
730
736
|
class: "t5et2jt",
|
|
731
737
|
propsAsIs: !1
|
|
732
|
-
}),
|
|
738
|
+
}), zs = /* @__PURE__ */ o("div")({
|
|
733
739
|
name: "Description",
|
|
734
740
|
class: "d1i2kpk2",
|
|
735
741
|
propsAsIs: !1
|
|
736
|
-
}),
|
|
742
|
+
}), Fs = /* @__PURE__ */ o("div")({
|
|
737
743
|
name: "DateWrap",
|
|
738
744
|
class: "dd3lh3p",
|
|
739
745
|
propsAsIs: !1
|
|
740
|
-
}),
|
|
746
|
+
}), Hs = /* @__PURE__ */ o("img")({
|
|
741
747
|
name: "Image",
|
|
742
748
|
class: "i1gfjeu5",
|
|
743
749
|
propsAsIs: !1
|
|
744
|
-
}),
|
|
745
|
-
|
|
746
|
-
title: t,
|
|
747
|
-
isPickHistory: s,
|
|
748
|
-
instantView: r,
|
|
749
|
-
notification: o
|
|
750
|
-
}) => {
|
|
751
|
-
const l = P(() => {
|
|
750
|
+
}), Ne = ({ created: e, instantView: t, isDetail: s, notification: r }) => {
|
|
751
|
+
const i = x(() => {
|
|
752
752
|
if (e) {
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
753
|
+
const h = new Date(e);
|
|
754
|
+
if (le(h))
|
|
755
755
|
return {
|
|
756
|
-
date: oe(
|
|
757
|
-
time:
|
|
756
|
+
date: oe(h),
|
|
757
|
+
time: ae(h)
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
760
|
return null;
|
|
761
|
-
}, [e]);
|
|
762
|
-
return /* @__PURE__ */ p(
|
|
763
|
-
|
|
764
|
-
|
|
761
|
+
}, [e]), l = t == null ? void 0 : t.heading, a = t == null ? void 0 : t.body, c = l || a, d = r == null ? void 0 : r.title, u = r == null ? void 0 : r.body;
|
|
762
|
+
return /* @__PURE__ */ p(js, { children: [
|
|
763
|
+
i && /* @__PURE__ */ p(Fs, { children: [
|
|
764
|
+
i.date,
|
|
765
765
|
" · ",
|
|
766
|
-
|
|
766
|
+
i.time
|
|
767
767
|
] }),
|
|
768
|
-
(
|
|
769
|
-
(
|
|
770
|
-
/* @__PURE__ */ p(
|
|
771
|
-
/* @__PURE__ */ n(
|
|
772
|
-
/* @__PURE__ */ n(
|
|
768
|
+
(t == null ? void 0 : t.video) && /* @__PURE__ */ n(ze, { source: t.video.url, poster: t.video.thumbnailUrl }),
|
|
769
|
+
(t == null ? void 0 : t.image) && !(t != null && t.video) && /* @__PURE__ */ n(Hs, { src: t == null ? void 0 : t.image }),
|
|
770
|
+
/* @__PURE__ */ p(Ws, { children: [
|
|
771
|
+
/* @__PURE__ */ n(Bs, { children: s && c ? l : d }),
|
|
772
|
+
/* @__PURE__ */ n(zs, { children: s && c ? a : u })
|
|
773
773
|
] })
|
|
774
774
|
] });
|
|
775
|
-
},
|
|
775
|
+
}, Ys = /* @__PURE__ */ o("div")({
|
|
776
776
|
name: "Container",
|
|
777
777
|
class: "c1euiow",
|
|
778
778
|
propsAsIs: !1
|
|
779
|
-
}),
|
|
779
|
+
}), Zs = /* @__PURE__ */ o("a")({
|
|
780
780
|
name: "WebLinkBtn",
|
|
781
781
|
class: "w19zie3h",
|
|
782
782
|
propsAsIs: !1
|
|
783
|
-
}),
|
|
784
|
-
/* @__PURE__ */ n(
|
|
785
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(
|
|
783
|
+
}), Gs = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Ys, { children: [
|
|
784
|
+
/* @__PURE__ */ n(Ne, { instantView: e, ...t, isDetail: !0 }),
|
|
785
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Zs, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
786
786
|
e == null ? void 0 : e.webLink.label,
|
|
787
787
|
/* @__PURE__ */ n(R, { name: "icon-external-link" })
|
|
788
788
|
] })
|
|
789
|
-
] }),
|
|
789
|
+
] }), Ks = /* @__PURE__ */ o("div")({
|
|
790
790
|
name: "Container",
|
|
791
791
|
class: "c1dcxmvf",
|
|
792
792
|
propsAsIs: !1
|
|
793
|
-
}),
|
|
793
|
+
}), Js = /* @__PURE__ */ o("div")({
|
|
794
794
|
name: "DateTime",
|
|
795
795
|
class: "db4q22c",
|
|
796
796
|
propsAsIs: !1
|
|
797
|
-
}),
|
|
797
|
+
}), Xs = /* @__PURE__ */ o("blockquote")({
|
|
798
798
|
name: "Quote",
|
|
799
799
|
class: "q111mmic",
|
|
800
800
|
propsAsIs: !1
|
|
801
|
-
}),
|
|
802
|
-
const s =
|
|
801
|
+
}), en = ({ created: e, ...t }) => {
|
|
802
|
+
const s = x(() => {
|
|
803
803
|
if (e) {
|
|
804
804
|
const r = new Date(e);
|
|
805
|
-
if (
|
|
805
|
+
if (le(r))
|
|
806
806
|
return {
|
|
807
807
|
date: oe(r),
|
|
808
|
-
time:
|
|
808
|
+
time: ae(r)
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
811
|
return null;
|
|
812
812
|
}, [e]);
|
|
813
|
-
return /* @__PURE__ */ p(
|
|
814
|
-
s && /* @__PURE__ */ p(
|
|
813
|
+
return /* @__PURE__ */ p(Ks, { children: [
|
|
814
|
+
s && /* @__PURE__ */ p(Js, { children: [
|
|
815
815
|
s.date,
|
|
816
816
|
" · ",
|
|
817
817
|
s.time
|
|
818
818
|
] }),
|
|
819
|
-
t.title && /* @__PURE__ */ n(
|
|
820
|
-
/* @__PURE__ */ n(
|
|
819
|
+
t.title && /* @__PURE__ */ n(Xs, { children: t.title }),
|
|
820
|
+
/* @__PURE__ */ n(be, { ...t })
|
|
821
821
|
] });
|
|
822
|
-
},
|
|
822
|
+
}, tn = /* @__PURE__ */ o("div")({
|
|
823
823
|
name: "QuestionContainer",
|
|
824
824
|
class: "qdri6g3",
|
|
825
825
|
propsAsIs: !1
|
|
826
|
-
}),
|
|
826
|
+
}), sn = ({
|
|
827
827
|
openedQuestion: e
|
|
828
828
|
}) => {
|
|
829
829
|
var t, s;
|
|
830
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(
|
|
830
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(Gs, {
|
|
831
831
|
created: e.attributes.created,
|
|
832
832
|
...e.attributes.attributes.value
|
|
833
|
-
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(
|
|
833
|
+
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(en, {
|
|
834
834
|
created: e.attributes.created,
|
|
835
835
|
...e.attributes.attributes.value
|
|
836
836
|
}) : null;
|
|
837
|
-
},
|
|
837
|
+
}, nn = ({
|
|
838
838
|
extendedQuestion: e,
|
|
839
839
|
vote: t,
|
|
840
840
|
close: s
|
|
841
841
|
}) => {
|
|
842
842
|
const {
|
|
843
843
|
loading: r,
|
|
844
|
-
data:
|
|
844
|
+
data: i
|
|
845
845
|
} = e;
|
|
846
|
-
return
|
|
846
|
+
return i ? /* @__PURE__ */ n(Us, {
|
|
847
847
|
vote: t,
|
|
848
848
|
close: s,
|
|
849
|
-
openedQuestion:
|
|
849
|
+
openedQuestion: i,
|
|
850
850
|
isLoading: !!r
|
|
851
851
|
}) : null;
|
|
852
|
-
},
|
|
852
|
+
}, rn = ({
|
|
853
853
|
gamification: e
|
|
854
854
|
}) => {
|
|
855
855
|
var t;
|
|
856
856
|
const s = O(e.openedQuestion.$store), r = O(e.openedQuestion.$extendedStore);
|
|
857
857
|
if (!s)
|
|
858
858
|
return null;
|
|
859
|
-
const
|
|
860
|
-
return /* @__PURE__ */ p(
|
|
861
|
-
children: [/* @__PURE__ */ n(
|
|
859
|
+
const i = s.type;
|
|
860
|
+
return /* @__PURE__ */ p(tn, {
|
|
861
|
+
children: [/* @__PURE__ */ n(Se, {
|
|
862
862
|
close: e.closeQuestion,
|
|
863
|
-
type: ((t = s.attributes) == null ? void 0 : t.type) ||
|
|
864
|
-
}),
|
|
863
|
+
type: ((t = s.attributes) == null ? void 0 : t.type) || f.UNSET
|
|
864
|
+
}), i === "question" && /* @__PURE__ */ n(nn, {
|
|
865
865
|
vote: e.submitAnswer,
|
|
866
866
|
close: e.closeQuestion,
|
|
867
867
|
extendedQuestion: r
|
|
868
|
-
}),
|
|
868
|
+
}), i !== "question" && /* @__PURE__ */ n(sn, {
|
|
869
869
|
openedQuestion: s
|
|
870
|
-
}), /* @__PURE__ */ n(
|
|
870
|
+
}), /* @__PURE__ */ n(Qt, {
|
|
871
871
|
sponsorLogo: ""
|
|
872
872
|
})]
|
|
873
873
|
});
|
|
874
|
-
},
|
|
874
|
+
}, on = /* @__PURE__ */ o("div")({
|
|
875
875
|
name: "Container",
|
|
876
876
|
class: "c115qtkr",
|
|
877
877
|
propsAsIs: !1
|
|
878
|
-
}),
|
|
878
|
+
}), an = /* @__PURE__ */ o("div")({
|
|
879
879
|
name: "STabs",
|
|
880
880
|
class: "sxnslc8",
|
|
881
881
|
propsAsIs: !1
|
|
882
|
-
}),
|
|
882
|
+
}), ln = /* @__PURE__ */ o("button")({
|
|
883
883
|
name: "Button",
|
|
884
884
|
class: "b1umzux0",
|
|
885
885
|
propsAsIs: !1
|
|
886
|
-
}),
|
|
886
|
+
}), cn = /* @__PURE__ */ o("span")({
|
|
887
887
|
name: "Title",
|
|
888
888
|
class: "tspsaas",
|
|
889
889
|
propsAsIs: !1
|
|
890
890
|
});
|
|
891
|
-
var
|
|
892
|
-
const
|
|
893
|
-
/* @__PURE__ */ n(
|
|
891
|
+
var X = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(X || {});
|
|
892
|
+
const Ce = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(ln, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(cn, { children: e }) }), dn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(on, { children: /* @__PURE__ */ p(an, { "data-position": e === "home" ? "left" : "right", children: [
|
|
893
|
+
/* @__PURE__ */ n(Ce, { title: "Home", active: e === "home", onClick: () => t(
|
|
894
894
|
"home"
|
|
895
895
|
/* HOME */
|
|
896
896
|
) }),
|
|
897
897
|
/* @__PURE__ */ n(
|
|
898
|
-
|
|
898
|
+
Ce,
|
|
899
899
|
{
|
|
900
900
|
title: "Friends",
|
|
901
901
|
active: e === "leaderboard",
|
|
@@ -905,44 +905,44 @@ const Ie = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(rn, { onCl
|
|
|
905
905
|
)
|
|
906
906
|
}
|
|
907
907
|
)
|
|
908
|
-
] }) }),
|
|
908
|
+
] }) }), pn = /* @__PURE__ */ o("div")({
|
|
909
909
|
name: "Container",
|
|
910
910
|
class: "c1ux29ft",
|
|
911
911
|
propsAsIs: !1
|
|
912
|
-
}),
|
|
912
|
+
}), un = /* @__PURE__ */ o("img")({
|
|
913
913
|
name: "FriendsIcon",
|
|
914
914
|
class: "f10ncfg2",
|
|
915
915
|
propsAsIs: !1
|
|
916
|
-
}),
|
|
916
|
+
}), hn = /* @__PURE__ */ o("div")({
|
|
917
917
|
name: "Content",
|
|
918
918
|
class: "c1yc07bd",
|
|
919
919
|
propsAsIs: !1
|
|
920
|
-
}),
|
|
920
|
+
}), mn = /* @__PURE__ */ o("div")({
|
|
921
921
|
name: "Title",
|
|
922
922
|
class: "tj6cq7w",
|
|
923
923
|
propsAsIs: !1
|
|
924
|
-
}),
|
|
924
|
+
}), vn = /* @__PURE__ */ o("div")({
|
|
925
925
|
name: "Description",
|
|
926
926
|
class: "d1ag78xo",
|
|
927
927
|
propsAsIs: !1
|
|
928
|
-
}),
|
|
928
|
+
}), fn = () => R, In = /* @__PURE__ */ o(fn())({
|
|
929
929
|
name: "ArrowInviteIcon",
|
|
930
930
|
class: "awohrz6",
|
|
931
931
|
propsAsIs: !0
|
|
932
|
-
}),
|
|
933
|
-
/* @__PURE__ */ n(
|
|
934
|
-
/* @__PURE__ */ p(
|
|
935
|
-
/* @__PURE__ */ n(
|
|
936
|
-
/* @__PURE__ */ n(
|
|
932
|
+
}), Cn = "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", gn = ({ title: e, description: t, onClick: s, className: r }) => /* @__PURE__ */ p(pn, { onClick: s, className: r, children: [
|
|
933
|
+
/* @__PURE__ */ n(un, { alt: "friends-icon", src: Cn }),
|
|
934
|
+
/* @__PURE__ */ p(hn, { children: [
|
|
935
|
+
/* @__PURE__ */ n(mn, { children: e }),
|
|
936
|
+
/* @__PURE__ */ n(vn, { children: t })
|
|
937
937
|
] }),
|
|
938
|
-
/* @__PURE__ */ n(
|
|
938
|
+
/* @__PURE__ */ n(In, { name: "icon-copy" })
|
|
939
939
|
] });
|
|
940
|
-
function
|
|
941
|
-
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, r = e.startIndex,
|
|
942
|
-
return !(r > s ||
|
|
940
|
+
function An(e) {
|
|
941
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, r = e.startIndex, i = e.stopIndex;
|
|
942
|
+
return !(r > s || i < t);
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
for (var t = e.isItemLoaded, s = e.itemCount, r = e.minimumBatchSize,
|
|
944
|
+
function yn(e) {
|
|
945
|
+
for (var t = e.isItemLoaded, s = e.itemCount, r = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, u = i; u <= l; u++) {
|
|
946
946
|
var h = t(u);
|
|
947
947
|
h ? d !== null && (a.push(c, d), c = d = null) : (d = u, c === null && (c = u));
|
|
948
948
|
}
|
|
@@ -953,28 +953,28 @@ function Cn(e) {
|
|
|
953
953
|
}
|
|
954
954
|
if (a.length)
|
|
955
955
|
for (; a[1] - a[0] + 1 < r && a[0] > 0; ) {
|
|
956
|
-
var
|
|
957
|
-
if (!t(
|
|
958
|
-
a[0] =
|
|
956
|
+
var I = a[0] - 1;
|
|
957
|
+
if (!t(I))
|
|
958
|
+
a[0] = I;
|
|
959
959
|
else
|
|
960
960
|
break;
|
|
961
961
|
}
|
|
962
962
|
return a;
|
|
963
963
|
}
|
|
964
|
-
var
|
|
964
|
+
var $n = function(e, t) {
|
|
965
965
|
if (!(e instanceof t))
|
|
966
966
|
throw new TypeError("Cannot call a class as a function");
|
|
967
|
-
},
|
|
967
|
+
}, bn = /* @__PURE__ */ function() {
|
|
968
968
|
function e(t, s) {
|
|
969
969
|
for (var r = 0; r < s.length; r++) {
|
|
970
|
-
var
|
|
971
|
-
|
|
970
|
+
var i = s[r];
|
|
971
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
return function(t, s, r) {
|
|
975
975
|
return s && e(t.prototype, s), r && e(t, r), t;
|
|
976
976
|
};
|
|
977
|
-
}(),
|
|
977
|
+
}(), wn = function(e, t) {
|
|
978
978
|
if (typeof t != "function" && t !== null)
|
|
979
979
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
980
980
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -985,26 +985,26 @@ var gn = function(e, t) {
|
|
|
985
985
|
configurable: !0
|
|
986
986
|
}
|
|
987
987
|
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
988
|
-
},
|
|
988
|
+
}, ge = function(e, t) {
|
|
989
989
|
if (!e)
|
|
990
990
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
991
991
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
992
992
|
};
|
|
993
993
|
(function(e) {
|
|
994
|
-
|
|
994
|
+
wn(t, e);
|
|
995
995
|
function t() {
|
|
996
|
-
var s, r,
|
|
997
|
-
|
|
996
|
+
var s, r, i, l;
|
|
997
|
+
$n(this, t);
|
|
998
998
|
for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
|
|
999
999
|
c[d] = arguments[d];
|
|
1000
|
-
return l = (r = (
|
|
1000
|
+
return l = (r = (i = ge(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(u) {
|
|
1001
1001
|
var h = u.visibleStartIndex, v = u.visibleStopIndex;
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1004
|
-
|
|
1005
|
-
}, r),
|
|
1002
|
+
i._lastRenderedStartIndex = h, i._lastRenderedStopIndex = v, i._ensureRowsLoaded(h, v);
|
|
1003
|
+
}, i._setRef = function(u) {
|
|
1004
|
+
i._listRef = u;
|
|
1005
|
+
}, r), ge(i, l);
|
|
1006
1006
|
}
|
|
1007
|
-
return
|
|
1007
|
+
return bn(t, [{
|
|
1008
1008
|
key: "resetloadMoreItemsCache",
|
|
1009
1009
|
value: function() {
|
|
1010
1010
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1025,82 +1025,82 @@ var gn = function(e, t) {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
}, {
|
|
1027
1027
|
key: "_ensureRowsLoaded",
|
|
1028
|
-
value: function(r,
|
|
1029
|
-
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, u = d === void 0 ? 10 : d, h = l.threshold, v = h === void 0 ? 15 : h, m =
|
|
1028
|
+
value: function(r, i) {
|
|
1029
|
+
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, u = d === void 0 ? 10 : d, h = l.threshold, v = h === void 0 ? 15 : h, m = yn({
|
|
1030
1030
|
isItemLoaded: a,
|
|
1031
1031
|
itemCount: c,
|
|
1032
1032
|
minimumBatchSize: u,
|
|
1033
1033
|
startIndex: Math.max(0, r - v),
|
|
1034
|
-
stopIndex: Math.min(c - 1,
|
|
1034
|
+
stopIndex: Math.min(c - 1, i + v)
|
|
1035
1035
|
});
|
|
1036
|
-
(this._memoizedUnloadedRanges.length !== m.length || this._memoizedUnloadedRanges.some(function(
|
|
1037
|
-
return m[
|
|
1036
|
+
(this._memoizedUnloadedRanges.length !== m.length || this._memoizedUnloadedRanges.some(function(I, w) {
|
|
1037
|
+
return m[w] !== I;
|
|
1038
1038
|
})) && (this._memoizedUnloadedRanges = m, this._loadUnloadedRanges(m));
|
|
1039
1039
|
}
|
|
1040
1040
|
}, {
|
|
1041
1041
|
key: "_loadUnloadedRanges",
|
|
1042
1042
|
value: function(r) {
|
|
1043
|
-
for (var
|
|
1043
|
+
for (var i = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(u) {
|
|
1044
1044
|
var h = r[u], v = r[u + 1], m = l(h, v);
|
|
1045
1045
|
m != null && m.then(function() {
|
|
1046
|
-
if (
|
|
1047
|
-
lastRenderedStartIndex:
|
|
1048
|
-
lastRenderedStopIndex:
|
|
1046
|
+
if (An({
|
|
1047
|
+
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1048
|
+
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1049
1049
|
startIndex: h,
|
|
1050
1050
|
stopIndex: v
|
|
1051
1051
|
})) {
|
|
1052
|
-
if (
|
|
1052
|
+
if (i._listRef == null)
|
|
1053
1053
|
return;
|
|
1054
|
-
typeof
|
|
1054
|
+
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(h, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
|
|
1055
1055
|
}
|
|
1056
1056
|
});
|
|
1057
1057
|
}, c = 0; c < r.length; c += 2)
|
|
1058
1058
|
a(c);
|
|
1059
1059
|
}
|
|
1060
1060
|
}]), t;
|
|
1061
|
-
})(
|
|
1062
|
-
const
|
|
1061
|
+
})(st);
|
|
1062
|
+
const Tn = /* @__PURE__ */ o("div")({
|
|
1063
1063
|
name: "Container",
|
|
1064
1064
|
class: "culdu4a",
|
|
1065
1065
|
propsAsIs: !1
|
|
1066
|
-
}),
|
|
1066
|
+
}), Rn = /* @__PURE__ */ o("div")({
|
|
1067
1067
|
name: "Position",
|
|
1068
1068
|
class: "pwf8e69",
|
|
1069
1069
|
propsAsIs: !1
|
|
1070
|
-
}),
|
|
1070
|
+
}), Sn = /* @__PURE__ */ o("img")({
|
|
1071
1071
|
name: "Avatar",
|
|
1072
1072
|
class: "atf4yh4",
|
|
1073
1073
|
propsAsIs: !1
|
|
1074
|
-
}),
|
|
1074
|
+
}), kn = /* @__PURE__ */ o("div")({
|
|
1075
1075
|
name: "AvatarPlaceholder",
|
|
1076
1076
|
class: "a1dg29ja",
|
|
1077
1077
|
propsAsIs: !1
|
|
1078
|
-
}),
|
|
1078
|
+
}), Ln = /* @__PURE__ */ o("div")({
|
|
1079
1079
|
name: "Content",
|
|
1080
1080
|
class: "c10a68rc",
|
|
1081
1081
|
propsAsIs: !1
|
|
1082
|
-
}),
|
|
1082
|
+
}), En = /* @__PURE__ */ o("div")({
|
|
1083
1083
|
name: "NameContainer",
|
|
1084
1084
|
class: "nc4kck5",
|
|
1085
1085
|
propsAsIs: !1
|
|
1086
|
-
}),
|
|
1086
|
+
}), xn = /* @__PURE__ */ o("span")({
|
|
1087
1087
|
name: "Name",
|
|
1088
1088
|
class: "njsrqgr",
|
|
1089
1089
|
propsAsIs: !1
|
|
1090
|
-
}),
|
|
1090
|
+
}), Pn = () => R, qn = /* @__PURE__ */ o(Pn())({
|
|
1091
1091
|
name: "CurrentUserBadge",
|
|
1092
1092
|
class: "c17uc4zr",
|
|
1093
1093
|
propsAsIs: !0
|
|
1094
1094
|
});
|
|
1095
|
-
var
|
|
1096
|
-
function
|
|
1095
|
+
var De = { exports: {} }, Nn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", Dn = Nn, On = Dn;
|
|
1096
|
+
function Oe() {
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Me() {
|
|
1099
1099
|
}
|
|
1100
|
-
|
|
1101
|
-
var
|
|
1102
|
-
function e(r,
|
|
1103
|
-
if (d !==
|
|
1100
|
+
Me.resetWarningCache = Oe;
|
|
1101
|
+
var Mn = function() {
|
|
1102
|
+
function e(r, i, l, a, c, d) {
|
|
1103
|
+
if (d !== On) {
|
|
1104
1104
|
var u = new Error(
|
|
1105
1105
|
"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"
|
|
1106
1106
|
);
|
|
@@ -1131,15 +1131,15 @@ var Nn = function() {
|
|
|
1131
1131
|
oneOfType: t,
|
|
1132
1132
|
shape: t,
|
|
1133
1133
|
exact: t,
|
|
1134
|
-
checkPropTypes:
|
|
1135
|
-
resetWarningCache:
|
|
1134
|
+
checkPropTypes: Me,
|
|
1135
|
+
resetWarningCache: Oe
|
|
1136
1136
|
};
|
|
1137
1137
|
return s.PropTypes = s, s;
|
|
1138
1138
|
};
|
|
1139
|
-
|
|
1140
|
-
var
|
|
1141
|
-
const
|
|
1142
|
-
class
|
|
1139
|
+
De.exports = Mn();
|
|
1140
|
+
var Vn = De.exports;
|
|
1141
|
+
const E = /* @__PURE__ */ Fe(Vn);
|
|
1142
|
+
class ie extends nt {
|
|
1143
1143
|
constructor(t) {
|
|
1144
1144
|
super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
|
|
1145
1145
|
}
|
|
@@ -1233,13 +1233,13 @@ class re extends et {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
scrollListener() {
|
|
1235
1235
|
const t = this.scrollComponent, s = window, r = this.getParentElement(t);
|
|
1236
|
-
let
|
|
1236
|
+
let i;
|
|
1237
1237
|
if (this.props.useWindow) {
|
|
1238
1238
|
const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
|
|
1239
|
-
this.props.isReverse ?
|
|
1239
|
+
this.props.isReverse ? i = a : i = this.calculateOffset(t, a);
|
|
1240
1240
|
} else
|
|
1241
|
-
this.props.isReverse ?
|
|
1242
|
-
|
|
1241
|
+
this.props.isReverse ? i = r.scrollTop : i = t.scrollHeight - r.scrollTop - r.clientHeight;
|
|
1242
|
+
i < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = r.scrollHeight, this.beforeScrollTop = r.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
|
|
1243
1243
|
}
|
|
1244
1244
|
calculateOffset(t, s) {
|
|
1245
1245
|
return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
|
|
@@ -1251,7 +1251,7 @@ class re extends et {
|
|
|
1251
1251
|
const t = this.filterProps(this.props), {
|
|
1252
1252
|
children: s,
|
|
1253
1253
|
element: r,
|
|
1254
|
-
hasMore:
|
|
1254
|
+
hasMore: i,
|
|
1255
1255
|
initialLoad: l,
|
|
1256
1256
|
isReverse: a,
|
|
1257
1257
|
loader: c,
|
|
@@ -1260,32 +1260,32 @@ class re extends et {
|
|
|
1260
1260
|
ref: h,
|
|
1261
1261
|
threshold: v,
|
|
1262
1262
|
useCapture: m,
|
|
1263
|
-
useWindow:
|
|
1264
|
-
getScrollParent:
|
|
1263
|
+
useWindow: I,
|
|
1264
|
+
getScrollParent: w,
|
|
1265
1265
|
...C
|
|
1266
1266
|
} = t;
|
|
1267
|
-
C.ref = (
|
|
1268
|
-
this.scrollComponent =
|
|
1267
|
+
C.ref = (g) => {
|
|
1268
|
+
this.scrollComponent = g, h && h(g);
|
|
1269
1269
|
};
|
|
1270
1270
|
const y = [s];
|
|
1271
|
-
return
|
|
1271
|
+
return i && (c ? a ? y.unshift(c) : y.push(c) : this.defaultLoader && (a ? y.unshift(this.defaultLoader) : y.push(this.defaultLoader))), W.createElement(r, C, y);
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
|
|
1275
|
-
children:
|
|
1276
|
-
element:
|
|
1277
|
-
hasMore:
|
|
1278
|
-
initialLoad:
|
|
1279
|
-
isReverse:
|
|
1280
|
-
loader:
|
|
1281
|
-
loadMore:
|
|
1282
|
-
pageStart:
|
|
1283
|
-
ref:
|
|
1284
|
-
getScrollParent:
|
|
1285
|
-
threshold:
|
|
1286
|
-
useCapture:
|
|
1287
|
-
useWindow:
|
|
1288
|
-
}),
|
|
1274
|
+
ne(ie, "propTypes", {
|
|
1275
|
+
children: E.node.isRequired,
|
|
1276
|
+
element: E.node,
|
|
1277
|
+
hasMore: E.bool,
|
|
1278
|
+
initialLoad: E.bool,
|
|
1279
|
+
isReverse: E.bool,
|
|
1280
|
+
loader: E.node,
|
|
1281
|
+
loadMore: E.func.isRequired,
|
|
1282
|
+
pageStart: E.number,
|
|
1283
|
+
ref: E.func,
|
|
1284
|
+
getScrollParent: E.func,
|
|
1285
|
+
threshold: E.number,
|
|
1286
|
+
useCapture: E.bool,
|
|
1287
|
+
useWindow: E.bool
|
|
1288
|
+
}), ne(ie, "defaultProps", {
|
|
1289
1289
|
element: "div",
|
|
1290
1290
|
hasMore: !1,
|
|
1291
1291
|
initialLoad: !0,
|
|
@@ -1298,50 +1298,50 @@ te(re, "propTypes", {
|
|
|
1298
1298
|
loader: null,
|
|
1299
1299
|
getScrollParent: null
|
|
1300
1300
|
});
|
|
1301
|
-
const
|
|
1301
|
+
const _n = ({
|
|
1302
1302
|
rank: e,
|
|
1303
1303
|
avatar: t,
|
|
1304
1304
|
name: s,
|
|
1305
1305
|
points: r,
|
|
1306
|
-
isCurrentUser:
|
|
1306
|
+
isCurrentUser: i,
|
|
1307
1307
|
openItemDetail: l,
|
|
1308
1308
|
style: a
|
|
1309
|
-
}) => /* @__PURE__ */ p(
|
|
1310
|
-
/* @__PURE__ */ n(
|
|
1311
|
-
/* @__PURE__ */ p(
|
|
1312
|
-
t ? /* @__PURE__ */ n(
|
|
1313
|
-
/* @__PURE__ */ p(
|
|
1314
|
-
/* @__PURE__ */ n(
|
|
1315
|
-
|
|
1309
|
+
}) => /* @__PURE__ */ p(Tn, { onClick: l, style: a, children: [
|
|
1310
|
+
/* @__PURE__ */ n(Rn, { children: e || 0 }),
|
|
1311
|
+
/* @__PURE__ */ p(Ln, { children: [
|
|
1312
|
+
t ? /* @__PURE__ */ n(Sn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(kn, { children: ke(s || "") }),
|
|
1313
|
+
/* @__PURE__ */ p(En, { children: [
|
|
1314
|
+
/* @__PURE__ */ n(xn, { children: s || "" }),
|
|
1315
|
+
i && /* @__PURE__ */ n(qn, { name: "icon-star" })
|
|
1316
1316
|
] })
|
|
1317
1317
|
] }),
|
|
1318
|
-
/* @__PURE__ */ n("div", { children:
|
|
1319
|
-
] }),
|
|
1318
|
+
/* @__PURE__ */ n("div", { children: Le(r) })
|
|
1319
|
+
] }), Qn = /* @__PURE__ */ o("div")({
|
|
1320
1320
|
name: "Container",
|
|
1321
1321
|
class: "c16btbfp",
|
|
1322
1322
|
propsAsIs: !1
|
|
1323
|
-
}),
|
|
1323
|
+
}), Un = ({
|
|
1324
1324
|
items: e,
|
|
1325
1325
|
currentUserId: t,
|
|
1326
1326
|
openItemDetail: s,
|
|
1327
1327
|
fetchMore: r,
|
|
1328
|
-
scrollNode:
|
|
1328
|
+
scrollNode: i,
|
|
1329
1329
|
hasMore: l
|
|
1330
|
-
}) => /* @__PURE__ */ n(
|
|
1330
|
+
}) => /* @__PURE__ */ n(ie, {
|
|
1331
1331
|
loadMore: r,
|
|
1332
1332
|
initialLoad: !1,
|
|
1333
1333
|
hasMore: l,
|
|
1334
1334
|
useWindow: !1,
|
|
1335
|
-
getScrollParent: () =>
|
|
1336
|
-
children: /* @__PURE__ */ n(
|
|
1337
|
-
children: e.map((a) => /* @__PURE__ */ n(
|
|
1335
|
+
getScrollParent: () => i.current,
|
|
1336
|
+
children: /* @__PURE__ */ n(Qn, {
|
|
1337
|
+
children: e.map((a) => /* @__PURE__ */ n(_n, {
|
|
1338
1338
|
...a,
|
|
1339
1339
|
openItemDetail: () => s(a.userId),
|
|
1340
1340
|
isCurrentUser: !!t && t === a.userId
|
|
1341
1341
|
}, a.userId))
|
|
1342
1342
|
})
|
|
1343
|
-
}),
|
|
1344
|
-
|
|
1343
|
+
}), jn = ({ renderClipBoardNode: e, deepLink: t }) => /* @__PURE__ */ n(
|
|
1344
|
+
He,
|
|
1345
1345
|
{
|
|
1346
1346
|
renderToNode: e,
|
|
1347
1347
|
inviteLink: t,
|
|
@@ -1360,272 +1360,272 @@ const On = ({
|
|
|
1360
1360
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
1361
1361
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1362
1362
|
}
|
|
1363
|
-
),
|
|
1363
|
+
), Wn = /* @__PURE__ */ o("div")({
|
|
1364
1364
|
name: "InviteLinkContainer",
|
|
1365
1365
|
class: "i1chxfpe",
|
|
1366
1366
|
propsAsIs: !1
|
|
1367
|
-
}),
|
|
1367
|
+
}), Bn = ({
|
|
1368
1368
|
gamification: e,
|
|
1369
1369
|
scrollNode: t,
|
|
1370
1370
|
scrollStore: s,
|
|
1371
1371
|
renderClipBoardNode: r
|
|
1372
1372
|
}) => {
|
|
1373
1373
|
const {
|
|
1374
|
-
data:
|
|
1374
|
+
data: i,
|
|
1375
1375
|
hasMore: l,
|
|
1376
1376
|
loading: a,
|
|
1377
1377
|
key: c
|
|
1378
1378
|
} = O(e.leaderboardList.$store), {
|
|
1379
1379
|
data: d
|
|
1380
|
-
} = O(e.deepLink.$store), [u, h] =
|
|
1381
|
-
return !
|
|
1380
|
+
} = O(e.deepLink.$store), [u, h] = Ye(r);
|
|
1381
|
+
return !i.length && !a ? /* @__PURE__ */ n(jn, {
|
|
1382
1382
|
renderClipBoardNode: r,
|
|
1383
1383
|
deepLink: d
|
|
1384
|
-
}) : /* @__PURE__ */ p(
|
|
1385
|
-
children: [/* @__PURE__ */ n(
|
|
1386
|
-
items:
|
|
1384
|
+
}) : /* @__PURE__ */ p(P, {
|
|
1385
|
+
children: [/* @__PURE__ */ n(Un, {
|
|
1386
|
+
items: i,
|
|
1387
1387
|
scrollNode: t,
|
|
1388
1388
|
scrollStore: s,
|
|
1389
1389
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1390
1390
|
hasMore: l,
|
|
1391
1391
|
openItemDetail: e.openUser,
|
|
1392
1392
|
currentUserId: e.currentUserId.get()
|
|
1393
|
-
}, c), d && /* @__PURE__ */ n(
|
|
1394
|
-
children: /* @__PURE__ */ n(
|
|
1393
|
+
}, c), d && /* @__PURE__ */ n(Wn, {
|
|
1394
|
+
children: /* @__PURE__ */ n(gn, {
|
|
1395
1395
|
onClick: () => u(d),
|
|
1396
1396
|
title: "Invite Friends",
|
|
1397
1397
|
description: "Challenge them now!"
|
|
1398
1398
|
})
|
|
1399
1399
|
}), h]
|
|
1400
1400
|
});
|
|
1401
|
-
},
|
|
1401
|
+
}, zn = /* @__PURE__ */ o("div")({
|
|
1402
1402
|
name: "QuestionItem",
|
|
1403
1403
|
class: "q1w97g3p",
|
|
1404
1404
|
propsAsIs: !1
|
|
1405
|
-
}),
|
|
1405
|
+
}), Fn = /* @__PURE__ */ o("div")({
|
|
1406
1406
|
name: "QuestionCaption",
|
|
1407
1407
|
class: "q2sl39u",
|
|
1408
1408
|
propsAsIs: !1
|
|
1409
|
-
}),
|
|
1409
|
+
}), Hn = /* @__PURE__ */ o("div")({
|
|
1410
1410
|
name: "QuestionBody",
|
|
1411
1411
|
class: "qd5h0uc",
|
|
1412
1412
|
propsAsIs: !1
|
|
1413
|
-
}),
|
|
1413
|
+
}), Yn = /* @__PURE__ */ o("div")({
|
|
1414
1414
|
name: "QuestionAction",
|
|
1415
1415
|
class: "q105uluy",
|
|
1416
1416
|
propsAsIs: !1
|
|
1417
|
-
}),
|
|
1417
|
+
}), Zn = () => R, J = /* @__PURE__ */ o(Zn())({
|
|
1418
1418
|
name: "QuestionActionIcon",
|
|
1419
1419
|
class: "q1fa0b9h",
|
|
1420
1420
|
propsAsIs: !0
|
|
1421
|
-
}),
|
|
1421
|
+
}), Gn = () => R, Kn = /* @__PURE__ */ o(Gn())({
|
|
1422
1422
|
name: "QuestionTypeIcon",
|
|
1423
1423
|
class: "qxlt78s",
|
|
1424
1424
|
propsAsIs: !0
|
|
1425
|
-
}),
|
|
1425
|
+
}), Jn = /* @__PURE__ */ o("div")({
|
|
1426
1426
|
name: "QuestionTypeLabel",
|
|
1427
1427
|
class: "qmg0vkx",
|
|
1428
1428
|
propsAsIs: !1
|
|
1429
|
-
}),
|
|
1429
|
+
}), Xn = /* @__PURE__ */ o("div")({
|
|
1430
1430
|
name: "QuestionContent",
|
|
1431
1431
|
class: "q1uz5j1g",
|
|
1432
1432
|
propsAsIs: !1
|
|
1433
|
-
}),
|
|
1433
|
+
}), er = /* @__PURE__ */ o("button")({
|
|
1434
1434
|
name: "PlayButton",
|
|
1435
1435
|
class: "p1pba9p1",
|
|
1436
1436
|
propsAsIs: !1
|
|
1437
|
-
}),
|
|
1438
|
-
[
|
|
1439
|
-
[
|
|
1440
|
-
[
|
|
1441
|
-
[
|
|
1442
|
-
},
|
|
1437
|
+
}), tr = {
|
|
1438
|
+
[Z.LOST]: /* @__PURE__ */ n(J, { name: "incorrectVoted" }),
|
|
1439
|
+
[Z.WON]: /* @__PURE__ */ n(J, { name: "icon-check" }),
|
|
1440
|
+
[Z.UNSET]: /* @__PURE__ */ n(J, { name: "icon-arrow" }),
|
|
1441
|
+
[Z.DNP]: /* @__PURE__ */ n(J, { name: "icon-arrow" })
|
|
1442
|
+
}, sr = ({
|
|
1443
1443
|
questionId: e,
|
|
1444
1444
|
questionType: t,
|
|
1445
1445
|
questionStatus: s,
|
|
1446
1446
|
subject: r,
|
|
1447
|
-
openForVoting:
|
|
1447
|
+
openForVoting: i,
|
|
1448
1448
|
openQuestion: l,
|
|
1449
1449
|
status: a
|
|
1450
1450
|
}) => {
|
|
1451
|
-
const c =
|
|
1452
|
-
return c ? /* @__PURE__ */ p(
|
|
1453
|
-
/* @__PURE__ */ p(
|
|
1454
|
-
/* @__PURE__ */ p(
|
|
1451
|
+
const c = ye[t], d = tr[a];
|
|
1452
|
+
return c ? /* @__PURE__ */ p(zn, { onClick: () => l == null ? void 0 : l(e), children: [
|
|
1453
|
+
/* @__PURE__ */ p(Xn, { children: [
|
|
1454
|
+
/* @__PURE__ */ p(Fn, { children: [
|
|
1455
1455
|
/* @__PURE__ */ n(
|
|
1456
|
-
|
|
1456
|
+
Kn,
|
|
1457
1457
|
{
|
|
1458
|
-
"data-type-trivia": t ===
|
|
1459
|
-
"data-type-poll": t ===
|
|
1458
|
+
"data-type-trivia": t === f.TRIVIA,
|
|
1459
|
+
"data-type-poll": t === f.POLL,
|
|
1460
1460
|
name: c.iconName
|
|
1461
1461
|
}
|
|
1462
1462
|
),
|
|
1463
|
-
/* @__PURE__ */ p(
|
|
1463
|
+
/* @__PURE__ */ p(Jn, { children: [
|
|
1464
1464
|
c.label,
|
|
1465
|
-
t ===
|
|
1465
|
+
t === f.TRIVIA && s === _.RESOLVED && " • Expired"
|
|
1466
1466
|
] })
|
|
1467
1467
|
] }),
|
|
1468
|
-
/* @__PURE__ */ n(
|
|
1468
|
+
/* @__PURE__ */ n(Hn, { children: r || "" })
|
|
1469
1469
|
] }),
|
|
1470
|
-
/* @__PURE__ */ n(
|
|
1470
|
+
/* @__PURE__ */ n(Yn, { children: i ? /* @__PURE__ */ n(er, { children: "Play" }) : d })
|
|
1471
1471
|
] }) : null;
|
|
1472
|
-
},
|
|
1472
|
+
}, nr = /* @__PURE__ */ o("div")({
|
|
1473
1473
|
name: "Container",
|
|
1474
1474
|
class: "cll3md7",
|
|
1475
1475
|
propsAsIs: !1
|
|
1476
|
-
}),
|
|
1476
|
+
}), rr = /* @__PURE__ */ o("button")({
|
|
1477
1477
|
name: "ActionBtn",
|
|
1478
1478
|
class: "a10g1iik",
|
|
1479
1479
|
propsAsIs: !1
|
|
1480
|
-
}),
|
|
1480
|
+
}), ir = ({
|
|
1481
1481
|
openInsight: e,
|
|
1482
1482
|
questionId: t,
|
|
1483
1483
|
...s
|
|
1484
|
-
}) => /* @__PURE__ */ p(
|
|
1485
|
-
/* @__PURE__ */ n(
|
|
1486
|
-
e && /* @__PURE__ */ n(
|
|
1487
|
-
] }),
|
|
1484
|
+
}) => /* @__PURE__ */ p(nr, { children: [
|
|
1485
|
+
/* @__PURE__ */ n(Ne, { questionId: t, ...s }),
|
|
1486
|
+
e && /* @__PURE__ */ n(rr, { onClick: () => e(t), children: "View Insight" })
|
|
1487
|
+
] }), or = /* @__PURE__ */ o("div")({
|
|
1488
1488
|
name: "Container",
|
|
1489
1489
|
class: "cl56x6b",
|
|
1490
1490
|
propsAsIs: !1
|
|
1491
|
-
}),
|
|
1491
|
+
}), ar = () => Ze, lr = /* @__PURE__ */ o(ar())({
|
|
1492
1492
|
name: "ActionButton",
|
|
1493
1493
|
class: "a11pzf92",
|
|
1494
1494
|
propsAsIs: !0
|
|
1495
|
-
}),
|
|
1495
|
+
}), cr = /* @__PURE__ */ o("div")({
|
|
1496
1496
|
name: "DateTime",
|
|
1497
1497
|
class: "d1hbaleq",
|
|
1498
1498
|
propsAsIs: !1
|
|
1499
|
-
}),
|
|
1499
|
+
}), dr = /* @__PURE__ */ o("blockquote")({
|
|
1500
1500
|
name: "Quote",
|
|
1501
1501
|
class: "qvvgqjm",
|
|
1502
1502
|
propsAsIs: !1
|
|
1503
|
-
}),
|
|
1503
|
+
}), pr = ({
|
|
1504
1504
|
openTweet: e,
|
|
1505
1505
|
created: t,
|
|
1506
1506
|
...s
|
|
1507
1507
|
}) => {
|
|
1508
|
-
const r =
|
|
1508
|
+
const r = x(() => {
|
|
1509
1509
|
if (t) {
|
|
1510
|
-
const
|
|
1511
|
-
if (
|
|
1510
|
+
const i = new Date(t);
|
|
1511
|
+
if (le(i))
|
|
1512
1512
|
return {
|
|
1513
|
-
date: oe(
|
|
1514
|
-
time:
|
|
1513
|
+
date: oe(i),
|
|
1514
|
+
time: ae(i)
|
|
1515
1515
|
};
|
|
1516
1516
|
}
|
|
1517
1517
|
return null;
|
|
1518
1518
|
}, [t]);
|
|
1519
|
-
return /* @__PURE__ */ p(
|
|
1520
|
-
r && /* @__PURE__ */ p(
|
|
1519
|
+
return /* @__PURE__ */ p(or, { children: [
|
|
1520
|
+
r && /* @__PURE__ */ p(cr, { children: [
|
|
1521
1521
|
r.date,
|
|
1522
1522
|
" · ",
|
|
1523
1523
|
r.time
|
|
1524
1524
|
] }),
|
|
1525
|
-
s.title && /* @__PURE__ */ n(
|
|
1526
|
-
/* @__PURE__ */ n(
|
|
1527
|
-
e && /* @__PURE__ */ n(
|
|
1525
|
+
s.title && /* @__PURE__ */ n(dr, { children: s.title }),
|
|
1526
|
+
/* @__PURE__ */ n(be, { ...s }),
|
|
1527
|
+
e && /* @__PURE__ */ n(lr, { onClick: () => e(s.tweetId), children: "View Insight" })
|
|
1528
1528
|
] });
|
|
1529
|
-
},
|
|
1529
|
+
}, ur = /* @__PURE__ */ o("div")({
|
|
1530
1530
|
name: "QuestionsContainer",
|
|
1531
1531
|
class: "qvghv3l",
|
|
1532
1532
|
propsAsIs: !1
|
|
1533
|
-
}),
|
|
1534
|
-
var r,
|
|
1533
|
+
}), hr = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(ur, { children: e == null ? void 0 : e.map((s) => {
|
|
1534
|
+
var r, i, l;
|
|
1535
1535
|
if (s.type === "question" && ((r = s.attributes) == null ? void 0 : r.attributes.case) === "question") {
|
|
1536
1536
|
const a = s.attributes.attributes.value;
|
|
1537
|
-
return /* @__PURE__ */ n(
|
|
1537
|
+
return /* @__PURE__ */ n(sr, { openQuestion: t, ...a }, a.questionId);
|
|
1538
1538
|
}
|
|
1539
|
-
if (s.type === "insight" && ((
|
|
1539
|
+
if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1540
1540
|
const a = s.attributes.attributes.value, c = s.attributes.created;
|
|
1541
|
-
return /* @__PURE__ */ n(
|
|
1541
|
+
return /* @__PURE__ */ n(ir, { openInsight: t, ...a, created: c }, a.questionId);
|
|
1542
1542
|
}
|
|
1543
1543
|
if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
|
|
1544
1544
|
const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
|
|
1545
|
-
return /* @__PURE__ */ n(
|
|
1545
|
+
return /* @__PURE__ */ n(pr, { openTweet: t, ...a, tweetId: c, created: d }, c);
|
|
1546
1546
|
}
|
|
1547
1547
|
return null;
|
|
1548
|
-
}) }),
|
|
1548
|
+
}) }), mr = ({ store: e, openQuestion: t }) => {
|
|
1549
1549
|
const s = O(e);
|
|
1550
|
-
return s != null && s.data ? /* @__PURE__ */ n(
|
|
1551
|
-
},
|
|
1550
|
+
return s != null && s.data ? /* @__PURE__ */ n(hr, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
|
|
1551
|
+
}, vr = ({ userSummary: e }) => {
|
|
1552
1552
|
var t;
|
|
1553
|
-
const [s, r] =
|
|
1553
|
+
const [s, r] = q(void 0);
|
|
1554
1554
|
return Y(() => {
|
|
1555
|
-
const
|
|
1555
|
+
const i = e.subscribe((l) => {
|
|
1556
1556
|
l != null && l.data && r(l.data);
|
|
1557
1557
|
});
|
|
1558
1558
|
return () => {
|
|
1559
|
-
|
|
1559
|
+
i();
|
|
1560
1560
|
};
|
|
1561
|
-
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(
|
|
1562
|
-
},
|
|
1563
|
-
const [d, u] =
|
|
1561
|
+
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(Ee, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
|
|
1562
|
+
}, fr = ({ gamification: e, className: t, scrollStore: s, scrollNode: r, appNode: i, style: l, responsiveStore: a, headerNode: c }) => {
|
|
1563
|
+
const [d, u] = q(!1), [h, v] = q(X.HOME), [, m] = rt(), { sdkInScrollView: I } = O(a, { keys: ["sdkInScrollView"] }), w = (A) => {
|
|
1564
1564
|
m(() => {
|
|
1565
|
-
var
|
|
1566
|
-
v(
|
|
1565
|
+
var b;
|
|
1566
|
+
v(A), I === !1 && (((b = i.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && Te(i, { behavior: "instant" });
|
|
1567
1567
|
});
|
|
1568
|
-
}, C = (
|
|
1569
|
-
m(() => u(
|
|
1568
|
+
}, C = (A) => {
|
|
1569
|
+
m(() => u(A));
|
|
1570
1570
|
};
|
|
1571
|
-
Y(() => s.listen((
|
|
1572
|
-
if (
|
|
1571
|
+
Y(() => s.listen((A) => {
|
|
1572
|
+
if (A.scrollPosition === 0) {
|
|
1573
1573
|
C(!1), s.setKey("tabsShown", !1);
|
|
1574
1574
|
return;
|
|
1575
1575
|
}
|
|
1576
|
-
C(
|
|
1576
|
+
C(A.scrollDirection === "forward"), s.setKey("tabsShown", A.scrollDirection !== "forward");
|
|
1577
1577
|
}), [s]);
|
|
1578
1578
|
let y = "0px";
|
|
1579
|
-
|
|
1580
|
-
const
|
|
1581
|
-
return /* @__PURE__ */ p(
|
|
1579
|
+
I ? y = d ? "calc(8px - var(--header-height) - var(--header-offset))" : "0px" : y = d ? "calc(var(--header-height) + var(--header-offset))" : "0px";
|
|
1580
|
+
const g = I ? i : c;
|
|
1581
|
+
return /* @__PURE__ */ p(Ge, { className: t, style: l, children: [
|
|
1582
1582
|
/* @__PURE__ */ n(
|
|
1583
|
-
|
|
1583
|
+
Ke,
|
|
1584
1584
|
{
|
|
1585
1585
|
style: {
|
|
1586
1586
|
top: y
|
|
1587
1587
|
},
|
|
1588
|
-
children: /* @__PURE__ */ n(
|
|
1588
|
+
children: /* @__PURE__ */ n(dn, { activePage: h, toggleActivePage: w })
|
|
1589
1589
|
}
|
|
1590
1590
|
),
|
|
1591
|
-
h ===
|
|
1592
|
-
/* @__PURE__ */ n(
|
|
1593
|
-
/* @__PURE__ */ n(
|
|
1591
|
+
h === X.HOME && /* @__PURE__ */ p(P, { children: [
|
|
1592
|
+
/* @__PURE__ */ n(we, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Je, { children: /* @__PURE__ */ n(vr, { userSummary: e.userSummary }) }) }),
|
|
1593
|
+
/* @__PURE__ */ n(Xe, { style: { flex: 1 }, children: /* @__PURE__ */ n(mr, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1594
1594
|
] }),
|
|
1595
|
-
h ===
|
|
1596
|
-
|
|
1595
|
+
h === X.LEADERBOARD && /* @__PURE__ */ n(et, { children: /* @__PURE__ */ n(
|
|
1596
|
+
Bn,
|
|
1597
1597
|
{
|
|
1598
|
-
renderClipBoardNode:
|
|
1598
|
+
renderClipBoardNode: g,
|
|
1599
1599
|
scrollStore: s,
|
|
1600
1600
|
scrollNode: r,
|
|
1601
1601
|
gamification: e
|
|
1602
1602
|
}
|
|
1603
1603
|
) })
|
|
1604
1604
|
] });
|
|
1605
|
-
},
|
|
1605
|
+
}, Ir = () => tt, Ae = /* @__PURE__ */ o(Ir())({
|
|
1606
1606
|
name: "OpenedContainer",
|
|
1607
1607
|
class: "oar61gl",
|
|
1608
1608
|
propsAsIs: !0
|
|
1609
|
-
}),
|
|
1609
|
+
}), Cr = /* @__PURE__ */ o("div")({
|
|
1610
1610
|
name: "UserContainer",
|
|
1611
1611
|
class: "u14zaal4",
|
|
1612
1612
|
propsAsIs: !1
|
|
1613
|
-
}),
|
|
1613
|
+
}), gr = ({
|
|
1614
1614
|
correct: e,
|
|
1615
1615
|
incorrect: t
|
|
1616
1616
|
}) => {
|
|
1617
1617
|
const s = e + t;
|
|
1618
1618
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
1619
|
-
},
|
|
1619
|
+
}, Ar = `
|
|
1620
1620
|
body {
|
|
1621
1621
|
overflow: hidden
|
|
1622
1622
|
}
|
|
1623
|
-
`,
|
|
1623
|
+
`, Tr = ({
|
|
1624
1624
|
gamification: e,
|
|
1625
1625
|
scrollStore: t,
|
|
1626
1626
|
className: s,
|
|
1627
1627
|
appNode: r,
|
|
1628
|
-
scrollNode:
|
|
1628
|
+
scrollNode: i,
|
|
1629
1629
|
headerNode: l,
|
|
1630
1630
|
responsiveStore: a
|
|
1631
1631
|
}) => {
|
|
@@ -1633,52 +1633,53 @@ const On = ({
|
|
|
1633
1633
|
sdkInScrollView: u
|
|
1634
1634
|
} = O(a, {
|
|
1635
1635
|
keys: ["sdkInScrollView"]
|
|
1636
|
-
}), h =
|
|
1637
|
-
var
|
|
1638
|
-
const
|
|
1639
|
-
if ((c || d) &&
|
|
1636
|
+
}), h = V(0), [v, m] = x(() => {
|
|
1637
|
+
var I;
|
|
1638
|
+
const w = u ? r : l, C = (((I = r.current) == null ? void 0 : I.getBoundingClientRect().y) || 0) < 0;
|
|
1639
|
+
if ((c || d) && w.current) {
|
|
1640
1640
|
C && (h.current = window.scrollY);
|
|
1641
1641
|
const y = () => (Y(() => {
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
|
|
1642
|
+
const g = setTimeout(() => {
|
|
1643
|
+
Te(r, {
|
|
1644
|
+
behavior: "instant"
|
|
1645
|
+
});
|
|
1645
1646
|
}, 1e3);
|
|
1646
1647
|
return () => {
|
|
1647
|
-
clearTimeout(
|
|
1648
|
+
clearTimeout(g), h.current !== 0 && (window.scroll({
|
|
1648
1649
|
top: h.current
|
|
1649
1650
|
}), h.current = 0);
|
|
1650
1651
|
};
|
|
1651
1652
|
}, []), /* @__PURE__ */ n("style", {
|
|
1652
|
-
children:
|
|
1653
|
+
children: Ar
|
|
1653
1654
|
}));
|
|
1654
|
-
return [C, c ?
|
|
1655
|
+
return [C, c ? pe.createPortal(/* @__PURE__ */ p(Ae, {
|
|
1655
1656
|
className: s,
|
|
1656
|
-
children: [/* @__PURE__ */ n(
|
|
1657
|
+
children: [/* @__PURE__ */ n(rn, {
|
|
1657
1658
|
gamification: e
|
|
1658
1659
|
}), C && !u && /* @__PURE__ */ n(y, {})]
|
|
1659
|
-
}),
|
|
1660
|
+
}), w.current) : d ? pe.createPortal(/* @__PURE__ */ n(Ae, {
|
|
1660
1661
|
className: s,
|
|
1661
|
-
children: /* @__PURE__ */ p(
|
|
1662
|
-
children: [/* @__PURE__ */ n(
|
|
1662
|
+
children: /* @__PURE__ */ p(Cr, {
|
|
1663
|
+
children: [/* @__PURE__ */ n(Se, {
|
|
1663
1664
|
label: "Friend's Rank",
|
|
1664
1665
|
close: e.closeUser
|
|
1665
|
-
}), /* @__PURE__ */ n(
|
|
1666
|
-
children: /* @__PURE__ */ n(
|
|
1666
|
+
}), /* @__PURE__ */ n(we, {
|
|
1667
|
+
children: /* @__PURE__ */ n(Ee, {
|
|
1667
1668
|
...d,
|
|
1668
|
-
successRate:
|
|
1669
|
+
successRate: gr(d)
|
|
1669
1670
|
})
|
|
1670
1671
|
})]
|
|
1671
1672
|
})
|
|
1672
|
-
}),
|
|
1673
|
+
}), w.current) : null];
|
|
1673
1674
|
}
|
|
1674
1675
|
return [C, null];
|
|
1675
1676
|
}, [r, s, e, l, c, d, u]);
|
|
1676
|
-
return /* @__PURE__ */ p(
|
|
1677
|
-
children: [m, /* @__PURE__ */ n(
|
|
1677
|
+
return /* @__PURE__ */ p(P, {
|
|
1678
|
+
children: [m, /* @__PURE__ */ n(fr, {
|
|
1678
1679
|
appNode: r,
|
|
1679
1680
|
headerNode: l,
|
|
1680
1681
|
scrollStore: t,
|
|
1681
|
-
scrollNode:
|
|
1682
|
+
scrollNode: i,
|
|
1682
1683
|
className: s,
|
|
1683
1684
|
gamification: e,
|
|
1684
1685
|
responsiveStore: a,
|
|
@@ -1690,5 +1691,5 @@ const On = ({
|
|
|
1690
1691
|
});
|
|
1691
1692
|
};
|
|
1692
1693
|
export {
|
|
1693
|
-
|
|
1694
|
+
Tr as default
|
|
1694
1695
|
};
|