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